diff --git a/change/@fluentui-contrib-react-data-grid-react-window-5186ddeb-b4cd-4968-9823-1e0171f60b9d.json b/change/@fluentui-contrib-react-data-grid-react-window-5186ddeb-b4cd-4968-9823-1e0171f60b9d.json new file mode 100644 index 00000000..ae531851 --- /dev/null +++ b/change/@fluentui-contrib-react-data-grid-react-window-5186ddeb-b4cd-4968-9823-1e0171f60b9d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "refactor (react-data-grid-react-window): export all types and hooks", + "packageName": "@fluentui-contrib/react-data-grid-react-window", + "email": "alton@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-data-grid-react-window/src/components/DataGrid/DataGridBody.types.ts b/packages/react-data-grid-react-window/src/components/DataGrid/DataGrid.types.ts similarity index 100% rename from packages/react-data-grid-react-window/src/components/DataGrid/DataGridBody.types.ts rename to packages/react-data-grid-react-window/src/components/DataGrid/DataGrid.types.ts diff --git a/packages/react-data-grid-react-window/src/components/DataGrid/index.ts b/packages/react-data-grid-react-window/src/components/DataGrid/index.ts index 0b3589e2..6709620e 100644 --- a/packages/react-data-grid-react-window/src/components/DataGrid/index.ts +++ b/packages/react-data-grid-react-window/src/components/DataGrid/index.ts @@ -1,2 +1,4 @@ export * from './DataGrid'; +export * from './DataGrid.types'; +export * from './renderDataGrid'; export * from './useDataGrid'; diff --git a/packages/react-data-grid-react-window/src/components/DataGrid/renderDataGrid.tsx b/packages/react-data-grid-react-window/src/components/DataGrid/renderDataGrid.tsx index 3cf9d469..b1c2af78 100644 --- a/packages/react-data-grid-react-window/src/components/DataGrid/renderDataGrid.tsx +++ b/packages/react-data-grid-react-window/src/components/DataGrid/renderDataGrid.tsx @@ -5,7 +5,7 @@ import { } from '@fluentui/react-components'; import { HeaderRefContextProvider } from '../../contexts/headerRefContext'; import { BodyRefContextProvider } from '../../contexts/bodyRefContext'; -import { DataGridState } from './DataGridBody.types'; +import { DataGridState } from './DataGrid.types'; /** * Render the final JSX of DataGrid diff --git a/packages/react-data-grid-react-window/src/components/DataGrid/useDataGrid.ts b/packages/react-data-grid-react-window/src/components/DataGrid/useDataGrid.ts index 9d8fd7c6..af280c86 100644 --- a/packages/react-data-grid-react-window/src/components/DataGrid/useDataGrid.ts +++ b/packages/react-data-grid-react-window/src/components/DataGrid/useDataGrid.ts @@ -4,7 +4,7 @@ import { DataGridProps, } from '@fluentui/react-components'; import { useFluent, useScrollbarWidth } from '@fluentui/react-components'; -import { DataGridState } from './DataGridBody.types'; +import { DataGridState } from './DataGrid.types'; const TABLE_SELECTION_CELL_WIDTH = 44; diff --git a/packages/react-data-grid-react-window/src/components/DataGridBody/index.ts b/packages/react-data-grid-react-window/src/components/DataGridBody/index.ts index 5c9c471c..70d2bbda 100644 --- a/packages/react-data-grid-react-window/src/components/DataGridBody/index.ts +++ b/packages/react-data-grid-react-window/src/components/DataGridBody/index.ts @@ -2,3 +2,4 @@ export * from './DataGridBody'; export * from './DataGridBody.types'; export * from './renderDataGridBody'; export * from './useDataGridBody'; +export * from './useDataGridBodyStyles.styles'; diff --git a/packages/react-data-grid-react-window/src/components/DataGridHeader/index.ts b/packages/react-data-grid-react-window/src/components/DataGridHeader/index.ts index 60c0cdb1..f7b4d637 100644 --- a/packages/react-data-grid-react-window/src/components/DataGridHeader/index.ts +++ b/packages/react-data-grid-react-window/src/components/DataGridHeader/index.ts @@ -1,2 +1,3 @@ export * from './DataGridHeader'; export * from './useDataGridHeader'; +export * from './useDataGridHeaderStyles.styles'; diff --git a/packages/react-data-grid-react-window/src/components/DataGridRow/index.ts b/packages/react-data-grid-react-window/src/components/DataGridRow/index.ts index a5ab3d0a..1a44164b 100644 --- a/packages/react-data-grid-react-window/src/components/DataGridRow/index.ts +++ b/packages/react-data-grid-react-window/src/components/DataGridRow/index.ts @@ -1,2 +1,3 @@ export * from './DataGridRow'; +export * from './useDataGridRow'; export * from './useDataGridRow.styles'; diff --git a/packages/react-data-grid-react-window/src/index.ts b/packages/react-data-grid-react-window/src/index.ts index 4b654fe3..e2ae741e 100644 --- a/packages/react-data-grid-react-window/src/index.ts +++ b/packages/react-data-grid-react-window/src/index.ts @@ -1,7 +1,24 @@ -export { DataGridBody } from './components/DataGridBody'; -export { DataGrid } from './components/DataGrid'; -export { DataGridRow } from './components/DataGridRow'; -export { DataGridHeader } from './components/DataGridHeader'; +export { + DataGridBody, + renderDataGridBody_unstable, + useDataGridBody_unstable, + useDataGridBodyStyles_unstable, +} from './components/DataGridBody'; +export { + DataGrid, + renderDataGrid_unstable, + useDataGrid_unstable, +} from './components/DataGrid'; +export { + DataGridRow, + useDataGridRow_unstable, + useDataGridRowStyles_unstable, +} from './components/DataGridRow'; +export { + DataGridHeader, + useDataGridHeader_unstable, + useDataGridHeaderStyles_unstable, +} from './components/DataGridHeader'; export { DataGridCell, @@ -18,4 +35,9 @@ export type { DataGridProps, } from '@fluentui/react-components'; -export type { DataGridBodyProps, RowRenderer } from './components/DataGridBody'; +export type { + DataGridBodyProps, + DataGridBodyState, + RowRenderer, +} from './components/DataGridBody'; +export type { DataGridState } from './components/DataGrid';