@fluentui/react-table 9.15.20 → 9.15.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/lib/DataGrid.js.map +1 -1
- package/lib/DataGridBody.js.map +1 -1
- package/lib/DataGridCell.js.map +1 -1
- package/lib/DataGridHeader.js.map +1 -1
- package/lib/DataGridHeaderCell.js.map +1 -1
- package/lib/DataGridRow.js.map +1 -1
- package/lib/DataGridSelectionCell.js.map +1 -1
- package/lib/Table.js.map +1 -1
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js.map +1 -1
- package/lib/TableCellActions.js.map +1 -1
- package/lib/TableCellLayout.js.map +1 -1
- package/lib/TableCellPrimaryLayout.js.map +1 -1
- package/lib/TableHeader.js.map +1 -1
- package/lib/TableHeaderCell.js.map +1 -1
- package/lib/TableResizeHandle.js.map +1 -1
- package/lib/TableRow.js.map +1 -1
- package/lib/TableSelectionCell.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib/components/DataGrid/index.js.map +1 -1
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGrid/useDataGridStyles.styles.js +1 -2
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib/components/DataGridBody/index.js.map +1 -1
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js +1 -2
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib/components/DataGridCell/index.js.map +1 -1
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCellStyles.styles.js +1 -2
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib/components/DataGridHeader/index.js.map +1 -1
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js +1 -2
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +1 -2
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib/components/DataGridRow/index.js.map +1 -1
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRowStyles.styles.js +1 -2
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +1 -2
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.styles.js +1 -2
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/TableBody.types.js.map +1 -1
- package/lib/components/TableBody/index.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.styles.js +1 -2
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/index.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.styles.js +1 -2
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib/components/TableCellActions/index.js.map +1 -1
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -2
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib/components/TableCellLayout/index.js.map +1 -1
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js +1 -2
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib/components/TableHeader/index.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.styles.js +1 -2
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/index.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +1 -2
- package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
- package/lib/components/TableResizeHandle/index.js.map +1 -1
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +1 -2
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/TableRow.types.js.map +1 -1
- package/lib/components/TableRow/index.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.styles.js +11 -11
- package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib/components/TableSelectionCell/index.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +3 -2
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +1 -2
- package/lib/contexts/columnIdContext.js.map +1 -1
- package/lib/contexts/dataGridContext.js.map +1 -1
- package/lib/contexts/rowIdContext.js.map +1 -1
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js.map +1 -1
- package/lib/hooks/createColumn.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/useKeyboardResizing.js.map +1 -1
- package/lib/hooks/useMeasureElement.js.map +1 -1
- package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib/hooks/useTableColumnSizing.js.map +1 -1
- package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib/hooks/useTableFeatures.js.map +1 -1
- package/lib/hooks/useTableSelection.js.map +1 -1
- package/lib/hooks/useTableSort.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/columnResizeUtils.js.map +1 -1
- package/lib/utils/isColumnSortable.js.map +1 -1
- package/lib-commonjs/DataGrid.js.map +1 -1
- package/lib-commonjs/DataGridBody.js.map +1 -1
- package/lib-commonjs/DataGridCell.js.map +1 -1
- package/lib-commonjs/DataGridHeader.js.map +1 -1
- package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/DataGridRow.js.map +1 -1
- package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/Table.js.map +1 -1
- package/lib-commonjs/TableBody.js.map +1 -1
- package/lib-commonjs/TableCell.js.map +1 -1
- package/lib-commonjs/TableCellActions.js.map +1 -1
- package/lib-commonjs/TableCellLayout.js.map +1 -1
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
- package/lib-commonjs/TableHeader.js.map +1 -1
- package/lib-commonjs/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib-commonjs/components/DataGrid/index.js.map +1 -1
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +1 -1
- package/lib-commonjs/components/Table/Table.js.map +1 -1
- package/lib-commonjs/components/Table/Table.types.js.map +1 -1
- package/lib-commonjs/components/Table/index.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.styles.js +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
- package/lib-commonjs/components/TableBody/index.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
- package/lib-commonjs/components/TableCell/index.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib-commonjs/components/TableHeader/index.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
- package/lib-commonjs/components/TableRow/index.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +16 -16
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +2 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +1 -1
- package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
- package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
- package/lib-commonjs/hooks/createColumn.js.map +1 -1
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/types.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
- package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
- package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
- package/lib-commonjs/hooks/useTableSort.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
- package/lib-commonjs/utils/isColumnSortable.js.map +1 -1
- package/package.json +12 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n const {\n tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n } = state;\n return {\n ...tableContextValues,\n dataGrid: {\n ...tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n },\n };\n}\n"],"names":["useDataGridContextValues_unstable","state","tableContextValues","useTableContextValues_unstable","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns","compositeRowTabsterAttribute","dataGrid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;uCAH+B;AAGxC,SAASA,kCAAkCC,KAAoB;IACpE,MAAMC,qBAAqBC,IAAAA,qDAAAA,EAA+BF;IAC1D,MAAM,EACJG,UAAU,EACVC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,mBAAmB,EACnBC,gBAAgB,EAChBC,4BAA4B,EAC7B,GAAGT;IACJ,OAAO;QACL,GAAGC,kBAAkB;QACrBS,UAAU;YACR,GAAGP,UAAU;YACbC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGrid/useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n const {\n tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n } = state;\n return {\n ...tableContextValues,\n dataGrid: {\n ...tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n },\n };\n}\n"],"names":["useDataGridContextValues_unstable","state","tableContextValues","useTableContextValues_unstable","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns","compositeRowTabsterAttribute","dataGrid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;uCAH+B;AAGxC,SAASA,kCAAkCC,KAAoB;IACpE,MAAMC,qBAAqBC,IAAAA,qDAAAA,EAA+BF;IAC1D,MAAM,EACJG,UAAU,EACVC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,mBAAmB,EACnBC,gBAAgB,EAChBC,4BAA4B,EAC7B,GAAGT;IACJ,OAAO;QACL,GAAGC,kBAAkB;QACrBS,UAAU;YACR,GAAGP,UAAU;YACbC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF"}
|
|
@@ -26,4 +26,4 @@ const useDataGridStyles_unstable = (state)=>{
|
|
|
26
26
|
(0, _useTableStylesstyles.useTableStyles_unstable)(state);
|
|
27
27
|
state.root.className = (0, _react.mergeClasses)(dataGridClassNames.root, state.root.className);
|
|
28
28
|
return state;
|
|
29
|
-
};
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["DataGridBody","React","forwardRef","props","ref","state","useDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","renderDataGridBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;oCACG;6CACG;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GACiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACrC;AAEAL,aAAaU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridBody/DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["DataGridBody","React","forwardRef","props","ref","state","useDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","renderDataGridBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;oCACG;6CACG;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GACiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACrC;AAEAL,aAAaU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridBody.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowData } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\nexport type RowRenderFunction<TItem = unknown> = (row: TableRowData<TItem>, ...rest: unknown[]) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps<TItem = unknown> = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction<TItem>;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n rows: TableRowData<unknown>[];\n\n renderRow: RowRenderFunction;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridBody/DataGridBody.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowData } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\nexport type RowRenderFunction<TItem = unknown> = (row: TableRowData<TItem>, ...rest: unknown[]) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps<TItem = unknown> = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction<TItem>;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n rows: TableRowData<unknown>[];\n\n renderRow: RowRenderFunction;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridBody';\nexport * from './DataGridBody.types';\nexport * from './renderDataGridBody';\nexport * from './useDataGridBody';\nexport * from './useDataGridBodyStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridBody/index.ts"],"sourcesContent":["export * from './DataGridBody';\nexport * from './DataGridBody.types';\nexport * from './renderDataGridBody';\nexport * from './useDataGridBody';\nexport * from './useDataGridBodyStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridBody_unstable","state","assertSlots","_jsx","root","rows","map","row","TableRowIdContextProvider","value","rowId","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAEc;AAKnC,MAAMA,8BAA8B,CAACC;IAC1CC,IAAAA,2BAAAA,EAA+BD;IAE/B,OAAA,WAAA,GACEE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBACRH,MAAMI,IAAI,CAACC,GAAG,CAACC,CAAAA,MAAAA,WAAAA,GACdJ,IAAAA,eAAA,EAACK,uCAAAA,EAAAA;gBAA0CC,OAAOF,IAAIG,KAAK;0BACxDT,MAAMU,SAAS,CAACJ;eADaA,IAAIG,KAAK;;AAMjD"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridBody/renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridBody_unstable","state","assertSlots","_jsx","root","rows","map","row","TableRowIdContextProvider","value","rowId","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAEc;AAKnC,MAAMA,8BAA8B,CAACC;IAC1CC,IAAAA,2BAAAA,EAA+BD;IAE/B,OAAA,WAAA,GACEE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBACRH,MAAMI,IAAI,CAACC,GAAG,CAACC,CAAAA,MAAAA,WAAAA,GACdJ,IAAAA,eAAA,EAACK,uCAAAA,EAAAA;gBAA0CC,OAAOF,IAAIG,KAAK;0BACxDT,MAAMU,SAAS,CAACJ;eADaA,IAAIG,KAAK;;AAMjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["useDataGridBody_unstable","props","ref","sortable","useTableContext","getRows","useDataGridContext_unstable","ctx","sort","rows","baseState","useTableBody_unstable","children","as","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;8BAEe;iCACM;8BACZ;AAWzB,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,6BAAAA;IACrB,MAAMC,UAAUC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIF,OAAO;IAC9D,MAAMG,OAAOF,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAON,WAAWK,KAAKH,aAAaA;IAE1C,MAAMK,YAAYC,IAAAA,mCAAAA,EAAsB;QAAE,GAAGV,KAAK;QAAEW,UAAU;QAAMC,IAAI;IAAM,GAAGX;IACjF,OAAO;QACL,GAAGQ,SAAS;QACZD;QACAK,WAAWb,MAAMW,QAAQ;IAC3B;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridBody/useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["useDataGridBody_unstable","props","ref","sortable","useTableContext","getRows","useDataGridContext_unstable","ctx","sort","rows","baseState","useTableBody_unstable","children","as","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;8BAEe;iCACM;8BACZ;AAWzB,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,6BAAAA;IACrB,MAAMC,UAAUC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIF,OAAO;IAC9D,MAAMG,OAAOF,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAON,WAAWK,KAAKH,aAAaA;IAE1C,MAAMK,YAAYC,IAAAA,mCAAAA,EAAsB;QAAE,GAAGV,KAAK;QAAEW,UAAU;QAAMC,IAAI;IAAM,GAAGX;IACjF,OAAO;QACL,GAAGQ,SAAS;QACZD;QACAK,WAAWb,MAAMW,QAAQ;IAC3B;AACF"}
|
|
@@ -26,4 +26,4 @@ const useDataGridBodyStyles_unstable = (state)=>{
|
|
|
26
26
|
(0, _useTableBodyStylesstyles.useTableBodyStyles_unstable)(state);
|
|
27
27
|
state.root.className = (0, _react.mergeClasses)(dataGridBodyClassNames.root, state.root.className);
|
|
28
28
|
return state;
|
|
29
|
-
};
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["DataGridCell","React","forwardRef","props","ref","state","useDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;oCACG;6CACG;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACrC;AAEAL,aAAaU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridCell/DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["DataGridCell","React","forwardRef","props","ref","state","useDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;oCACG;6CACG;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACrC;AAEAL,aAAaU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridCell.types.ts"],"sourcesContent":["import { TableCellProps, TableCellSlots, TableCellState } from '../TableCell/TableCell.types';\n\nexport type DataGridCellSlots = TableCellSlots;\n\n/**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n */\nexport type DataGridCellFocusMode = 'group' | 'none' | 'cell';\n\n/**\n * DataGridCell Props\n */\nexport type DataGridCellProps = TableCellProps & {\n /**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n * @default cell\n */\n focusMode?: DataGridCellFocusMode;\n};\n\n/**\n * State used in rendering DataGridCell\n */\nexport type DataGridCellState = TableCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AA0BA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridCell/DataGridCell.types.ts"],"sourcesContent":["import { TableCellProps, TableCellSlots, TableCellState } from '../TableCell/TableCell.types';\n\nexport type DataGridCellSlots = TableCellSlots;\n\n/**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n */\nexport type DataGridCellFocusMode = 'group' | 'none' | 'cell';\n\n/**\n * DataGridCell Props\n */\nexport type DataGridCellProps = TableCellProps & {\n /**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n * @default cell\n */\n focusMode?: DataGridCellFocusMode;\n};\n\n/**\n * State used in rendering DataGridCell\n */\nexport type DataGridCellState = TableCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AA0BA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridCell';\nexport * from './DataGridCell.types';\nexport * from './renderDataGridCell';\nexport * from './useDataGridCell';\nexport * from './useDataGridCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridCell/index.ts"],"sourcesContent":["export * from './DataGridCell';\nexport * from './DataGridCell.types';\nexport * from './renderDataGridCell';\nexport * from './useDataGridCell';\nexport * from './useDataGridCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderDataGridCell_unstable","state","renderTableCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;iCAL4B;AAKlC,MAAMA,8BAA8B,CAACC;IAC1C,OAAOC,IAAAA,yCAAAA,EAAyBD;AAClC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridCell/renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderDataGridCell_unstable","state","renderTableCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;iCAL4B;AAKlC,MAAMA,8BAA8B,CAACC;IAC1C,OAAOC,IAAAA,yCAAAA,EAAyBD;AAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const { focusMode = 'cell' } = props;\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(\n ctx => (ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none',\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableCellProps;\n });\n const focusableGroupAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n ...(focusMode === 'group' && focusableGroupAttr),\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["useDataGridCell_unstable","props","ref","focusMode","columnId","useColumnIdContext","tabbable","useDataGridContext_unstable","ctx","resizableColumns","getTableCellProps","columnSizing_unstable","focusableGroupAttr","useFocusableGroup","tabBehavior","useTableCell_unstable","as","role","tabIndex","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;8BACW;8BAEI;iCACM;iCACT;AAW5B,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,YAAY,MAAM,EAAE,GAAGF;IAC/B,MAAMG,WAAWC,IAAAA,mCAAAA;IACjB,MAAMC,WAAWC,IAAAA,4CAAAA,EACfC,CAAAA,MAAO,AAACA,CAAAA,IAAIL,SAAS,KAAK,UAAUK,IAAIL,SAAS,KAAK,WAAA,KAAgBA,cAAc;IAEtF,MAAMM,mBAAmBF,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,gBAAgB;IAChF,MAAMC,oBAAoBH,IAAAA,4CAAAA,EAA4BC,CAAAA;QACpD,OAAOA,IAAIG,qBAAqB,CAACD,iBAAiB;IACpD;IACA,MAAME,qBAAqBC,IAAAA,+BAAAA,EAAkB;QAAEC,aAAa;IAAqB;IACjF,OAAOC,IAAAA,mCAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACN,GAAId,cAAc,WAAWS,kBAAkB;QAC/CM,UAAUZ,WAAW,IAAIa;QACzB,GAAIV,mBAAmBC,kBAAkBN,YAAY,CAAC,CAAC;QACvD,GAAGH,KAAK;IACV,GACAC;AAEJ"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridCell/useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const { focusMode = 'cell' } = props;\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(\n ctx => (ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none',\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableCellProps;\n });\n const focusableGroupAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n ...(focusMode === 'group' && focusableGroupAttr),\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["useDataGridCell_unstable","props","ref","focusMode","columnId","useColumnIdContext","tabbable","useDataGridContext_unstable","ctx","resizableColumns","getTableCellProps","columnSizing_unstable","focusableGroupAttr","useFocusableGroup","tabBehavior","useTableCell_unstable","as","role","tabIndex","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;8BACW;8BAEI;iCACM;iCACT;AAW5B,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,YAAY,MAAM,EAAE,GAAGF;IAC/B,MAAMG,WAAWC,IAAAA,mCAAAA;IACjB,MAAMC,WAAWC,IAAAA,4CAAAA,EACfC,CAAAA,MAAO,AAACA,CAAAA,IAAIL,SAAS,KAAK,UAAUK,IAAIL,SAAS,KAAK,WAAA,KAAgBA,cAAc;IAEtF,MAAMM,mBAAmBF,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,gBAAgB;IAChF,MAAMC,oBAAoBH,IAAAA,4CAAAA,EAA4BC,CAAAA;QACpD,OAAOA,IAAIG,qBAAqB,CAACD,iBAAiB;IACpD;IACA,MAAME,qBAAqBC,IAAAA,+BAAAA,EAAkB;QAAEC,aAAa;IAAqB;IACjF,OAAOC,IAAAA,mCAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACN,GAAId,cAAc,WAAWS,kBAAkB;QAC/CM,UAAUZ,WAAW,IAAIa;QACzB,GAAIV,mBAAmBC,kBAAkBN,YAAY,CAAC,CAAC;QACvD,GAAGH,KAAK;IACV,GACAC;AAEJ"}
|
|
@@ -26,4 +26,4 @@ const useDataGridCellStyles_unstable = (state)=>{
|
|
|
26
26
|
(0, _useTableCellStylesstyles.useTableCellStyles_unstable)(state);
|
|
27
27
|
state.root.className = (0, _react.mergeClasses)(dataGridCellClassNames.root, state.root.className);
|
|
28
28
|
return state;
|
|
29
|
-
};
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeader_unstable } from './useDataGridHeader';\nimport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nimport { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeader component\n */\nexport const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeader_unstable(props, ref);\n\n useDataGridHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"names":["DataGridHeader","React","forwardRef","props","ref","state","useDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","renderDataGridHeader_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;mCACoB;sCACG;+CACG;qCAGL;AAKrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IAEjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAEhE,OAAOI,IAAAA,mDAAAA,EAA8BJ;AACvC;AAEAL,eAAeU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeader_unstable } from './useDataGridHeader';\nimport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nimport { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeader component\n */\nexport const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeader_unstable(props, ref);\n\n useDataGridHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"names":["DataGridHeader","React","forwardRef","props","ref","state","useDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","renderDataGridHeader_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;mCACoB;sCACG;+CACG;qCAGL;AAKrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IAEjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAEhE,OAAOI,IAAAA,mDAAAA,EAA8BJ;AACvC;AAEAL,eAAeU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridHeader.types.ts"],"sourcesContent":["import { TableHeaderProps, TableHeaderSlots, TableHeaderState } from '../TableHeader/TableHeader.types';\n\nexport type DataGridHeaderSlots = TableHeaderSlots;\n\n/**\n * DataGridHeader Props\n */\nexport type DataGridHeaderProps = TableHeaderProps;\n\n/**\n * State used in rendering DataGridHeader\n */\nexport type DataGridHeaderState = TableHeaderState;\n"],"names":[],"rangeMappings":";;","mappings":"AASA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeader/DataGridHeader.types.ts"],"sourcesContent":["import { TableHeaderProps, TableHeaderSlots, TableHeaderState } from '../TableHeader/TableHeader.types';\n\nexport type DataGridHeaderSlots = TableHeaderSlots;\n\n/**\n * DataGridHeader Props\n */\nexport type DataGridHeaderProps = TableHeaderProps;\n\n/**\n * State used in rendering DataGridHeader\n */\nexport type DataGridHeaderState = TableHeaderState;\n"],"names":[],"rangeMappings":";;","mappings":"AASA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridHeader';\nexport * from './DataGridHeader.types';\nexport * from './renderDataGridHeader';\nexport * from './useDataGridHeader';\nexport * from './useDataGridHeaderStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeader/index.ts"],"sourcesContent":["export * from './DataGridHeader';\nexport * from './DataGridHeader.types';\nexport * from './renderDataGridHeader';\nexport * from './useDataGridHeader';\nexport * from './useDataGridHeaderStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridHeader.tsx"],"sourcesContent":["import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';\nimport type { DataGridHeaderState } from './DataGridHeader.types';\n\n/**\n * Render the final JSX of DataGridHeader\n */\nexport const renderDataGridHeader_unstable = (state: DataGridHeaderState) => {\n return renderTableHeader_unstable(state);\n};\n"],"names":["renderDataGridHeader_unstable","state","renderTableHeader_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;mCAN8B;AAMpC,MAAMA,gCAAgC,CAACC;IAC5C,OAAOC,IAAAA,6CAAAA,EAA2BD;AACpC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeader/renderDataGridHeader.tsx"],"sourcesContent":["import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';\nimport type { DataGridHeaderState } from './DataGridHeader.types';\n\n/**\n * Render the final JSX of DataGridHeader\n */\nexport const renderDataGridHeader_unstable = (state: DataGridHeaderState) => {\n return renderTableHeader_unstable(state);\n};\n"],"names":["renderDataGridHeader_unstable","state","renderTableHeader_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;mCAN8B;AAMpC,MAAMA,gCAAgC,CAACC;IAC5C,OAAOC,IAAAA,6CAAAA,EAA2BD;AACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';\nimport { useTableHeader_unstable } from '../TableHeader/useTableHeader';\n\n/**\n * Create the state required to render DataGridHeader.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,\n * before being passed to renderDataGridHeader_unstable.\n *\n * @param props - props from this instance of DataGridHeader\n * @param ref - reference to root HTMLElement of DataGridHeader\n */\nexport const useDataGridHeader_unstable = (\n props: DataGridHeaderProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderState => {\n return useTableHeader_unstable({ ...props, as: 'div' }, ref);\n};\n"],"names":["useDataGridHeader_unstable","props","ref","useTableHeader_unstable","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCAEiB;AAWjC,MAAMA,6BAA6B,CACxCC,OACAC;IAEA,OAAOC,IAAAA,uCAAAA,EAAwB;QAAE,GAAGF,KAAK;QAAEG,IAAI;IAAM,GAAGF;AAC1D"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeader/useDataGridHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';\nimport { useTableHeader_unstable } from '../TableHeader/useTableHeader';\n\n/**\n * Create the state required to render DataGridHeader.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,\n * before being passed to renderDataGridHeader_unstable.\n *\n * @param props - props from this instance of DataGridHeader\n * @param ref - reference to root HTMLElement of DataGridHeader\n */\nexport const useDataGridHeader_unstable = (\n props: DataGridHeaderProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderState => {\n return useTableHeader_unstable({ ...props, as: 'div' }, ref);\n};\n"],"names":["useDataGridHeader_unstable","props","ref","useTableHeader_unstable","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCAEiB;AAWjC,MAAMA,6BAA6B,CACxCC,OACAC;IAEA,OAAOC,IAAAA,uCAAAA,EAAwB;QAAE,GAAGF,KAAK;QAAEG,IAAI;IAAM,GAAGF;AAC1D"}
|
|
@@ -26,4 +26,4 @@ const useDataGridHeaderStyles_unstable = (state)=>{
|
|
|
26
26
|
(0, _useTableHeaderStylesstyles.useTableHeaderStyles_unstable)(state);
|
|
27
27
|
state.root.className = (0, _react.mergeClasses)(dataGridHeaderClassNames.root, state.root.className);
|
|
28
28
|
return state;
|
|
29
|
-
};
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nimport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nimport { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeaderCell component\n */\nexport const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeaderCell_unstable(props, ref);\n\n useDataGridHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"names":["DataGridHeaderCell","React","forwardRef","props","ref","state","useDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridHeaderCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;uCACwB;0CACG;mDACG;qCAGT;AAKrC,MAAMA,qBAAAA,WAAAA,GAAmEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQC,IAAAA,qDAAAA,EAA+BH,OAAOC;IAEpDG,IAAAA,uEAAAA,EAAqCF;IAErCG,IAAAA,gDAAAA,EAA4B,wCAAwCH;IAEpE,OAAOI,IAAAA,2DAAAA,EAAkCJ;AAC3C;AAEAL,mBAAmBU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeaderCell/DataGridHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nimport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nimport { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeaderCell component\n */\nexport const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeaderCell_unstable(props, ref);\n\n useDataGridHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"names":["DataGridHeaderCell","React","forwardRef","props","ref","state","useDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridHeaderCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;uCACwB;0CACG;mDACG;qCAGT;AAKrC,MAAMA,qBAAAA,WAAAA,GAAmEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQC,IAAAA,qDAAAA,EAA+BH,OAAOC;IAEpDG,IAAAA,uEAAAA,EAAqCF;IAErCG,IAAAA,gDAAAA,EAA4B,wCAAwCH;IAEpE,OAAOI,IAAAA,2DAAAA,EAAkCJ;AAC3C;AAEAL,mBAAmBU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridHeaderCell.types.ts"],"sourcesContent":["import {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from '../TableHeaderCell/TableHeaderCell.types';\n\nexport type DataGridHeaderCellSlots = TableHeaderCellSlots;\n\n/**\n * DataGridHeaderCell Props\n */\nexport type DataGridHeaderCellProps = Omit<TableHeaderCellProps, 'sortable'>;\n\n/**\n * State used in rendering DataGridHeaderCell\n */\nexport type DataGridHeaderCellState = TableHeaderCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeaderCell/DataGridHeaderCell.types.ts"],"sourcesContent":["import {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from '../TableHeaderCell/TableHeaderCell.types';\n\nexport type DataGridHeaderCellSlots = TableHeaderCellSlots;\n\n/**\n * DataGridHeaderCell Props\n */\nexport type DataGridHeaderCellProps = Omit<TableHeaderCellProps, 'sortable'>;\n\n/**\n * State used in rendering DataGridHeaderCell\n */\nexport type DataGridHeaderCellState = TableHeaderCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridHeaderCell';\nexport * from './DataGridHeaderCell.types';\nexport * from './renderDataGridHeaderCell';\nexport * from './useDataGridHeaderCell';\nexport * from './useDataGridHeaderCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeaderCell/index.ts"],"sourcesContent":["export * from './DataGridHeaderCell';\nexport * from './DataGridHeaderCell.types';\nexport * from './renderDataGridHeaderCell';\nexport * from './useDataGridHeaderCell';\nexport * from './useDataGridHeaderCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridHeaderCell.tsx"],"sourcesContent":["import type { DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';\n\n/**\n * Render the final JSX of DataGridHeaderCell\n */\nexport const renderDataGridHeaderCell_unstable = (state: DataGridHeaderCellState) => {\n return renderTableHeaderCell_unstable(state);\n};\n"],"names":["renderDataGridHeaderCell_unstable","state","renderTableHeaderCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;uCALkC;AAKxC,MAAMA,oCAAoC,CAACC;IAChD,OAAOC,IAAAA,qDAAAA,EAA+BD;AACxC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeaderCell/renderDataGridHeaderCell.tsx"],"sourcesContent":["import type { DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';\n\n/**\n * Render the final JSX of DataGridHeaderCell\n */\nexport const renderDataGridHeaderCell_unstable = (state: DataGridHeaderCellState) => {\n return renderTableHeaderCell_unstable(state);\n};\n"],"names":["renderDataGridHeaderCell_unstable","state","renderTableHeaderCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;uCALkC;AAKxC,MAAMA,oCAAoC,CAACC;IAChD,OAAOC,IAAAA,qDAAAA,EAA+BD;AACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { isColumnSortable } from '../../utils/isColumnSortable';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable: gridSortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n\n const sortable = useDataGridContext_unstable(ctx => {\n const columnSortable = !!ctx.columns.find(c => c.columnId === columnId && isColumnSortable(c));\n if (!gridSortable) {\n // if the grid is not sortable - disable sorting on all columns\n return false;\n }\n\n return columnSortable;\n });\n\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableHeaderCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableHeaderCellProps;\n });\n\n // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortable,\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridHeaderCell_unstable","props","ref","columnId","useColumnIdContext","sortable","gridSortable","useTableContext","toggleColumnSort","useDataGridContext_unstable","ctx","sort","columnSortable","columns","find","c","isColumnSortable","sortDirection","getSortDirection","undefined","resizableColumns","getTableHeaderCellProps","columnSizing_unstable","onClick","useEventCallback","e","useTableHeaderCell_unstable","as","tabIndex"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;;iEAlBU;gCACU;oCAEW;iCACA;iCACT;8BACH;kCACC;AAW1B,MAAMA,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,mCAAAA;IACjB,MAAM,EAAEC,UAAUC,YAAY,EAAE,GAAGC,IAAAA,6BAAAA;IACnC,MAAMC,mBAAmBC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACH,gBAAgB;IAErF,MAAMH,WAAWI,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC3C,MAAME,iBAAiB,CAAC,CAACF,IAAIG,OAAO,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEZ,QAAQ,KAAKA,YAAYa,IAAAA,kCAAAA,EAAiBD;QAC3F,IAAI,CAACT,cAAc;YACjB,+DAA+D;YAC/D,OAAO;QACT;QAEA,OAAOM;IACT;IAEA,MAAMK,gBAAgBR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAChDL,WAAWK,IAAIC,IAAI,CAACO,gBAAgB,CAACf,YAAYgB;IAEnD,MAAMC,mBAAmBX,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIU,gBAAgB;IAChF,MAAMC,0BAA0BZ,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1D,OAAOA,IAAIY,qBAAqB,CAACD,uBAAuB;IAC1D;IAEA,kFAAkF;IAClF,MAAME,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAIhCxB;QAHA,IAAII,UAAU;YACZG,iBAAiBiB,GAAGtB;QACtB;QACAF,CAAAA,iBAAAA,MAAMsB,OAAO,AAAPA,MAAO,QAAbtB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBwB;IAClB;IAEA,OAAOC,IAAAA,+CAAAA,EACL;QACErB;QACAY;QACAU,IAAI;QACJC,UAAUvB,WAAWc,YAAY;QACjC,GAAIC,mBAAmBC,wBAAwBlB,YAAY,CAAC,CAAC;QAC7D,GAAGF,KAAK;QACRsB;IACF,GACArB;AAEJ"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridHeaderCell/useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { isColumnSortable } from '../../utils/isColumnSortable';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable: gridSortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n\n const sortable = useDataGridContext_unstable(ctx => {\n const columnSortable = !!ctx.columns.find(c => c.columnId === columnId && isColumnSortable(c));\n if (!gridSortable) {\n // if the grid is not sortable - disable sorting on all columns\n return false;\n }\n\n return columnSortable;\n });\n\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableHeaderCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableHeaderCellProps;\n });\n\n // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortable,\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridHeaderCell_unstable","props","ref","columnId","useColumnIdContext","sortable","gridSortable","useTableContext","toggleColumnSort","useDataGridContext_unstable","ctx","sort","columnSortable","columns","find","c","isColumnSortable","sortDirection","getSortDirection","undefined","resizableColumns","getTableHeaderCellProps","columnSizing_unstable","onClick","useEventCallback","e","useTableHeaderCell_unstable","as","tabIndex"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;;iEAlBU;gCACU;oCAEW;iCACA;iCACT;8BACH;kCACC;AAW1B,MAAMA,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,mCAAAA;IACjB,MAAM,EAAEC,UAAUC,YAAY,EAAE,GAAGC,IAAAA,6BAAAA;IACnC,MAAMC,mBAAmBC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACH,gBAAgB;IAErF,MAAMH,WAAWI,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC3C,MAAME,iBAAiB,CAAC,CAACF,IAAIG,OAAO,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEZ,QAAQ,KAAKA,YAAYa,IAAAA,kCAAAA,EAAiBD;QAC3F,IAAI,CAACT,cAAc;YACjB,+DAA+D;YAC/D,OAAO;QACT;QAEA,OAAOM;IACT;IAEA,MAAMK,gBAAgBR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAChDL,WAAWK,IAAIC,IAAI,CAACO,gBAAgB,CAACf,YAAYgB;IAEnD,MAAMC,mBAAmBX,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIU,gBAAgB;IAChF,MAAMC,0BAA0BZ,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1D,OAAOA,IAAIY,qBAAqB,CAACD,uBAAuB;IAC1D;IAEA,kFAAkF;IAClF,MAAME,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAIhCxB;QAHA,IAAII,UAAU;YACZG,iBAAiBiB,GAAGtB;QACtB;QACAF,CAAAA,iBAAAA,MAAMsB,OAAO,AAAPA,MAAO,QAAbtB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBwB;IAClB;IAEA,OAAOC,IAAAA,+CAAAA,EACL;QACErB;QACAY;QACAU,IAAI;QACJC,UAAUvB,WAAWc,YAAY;QACjC,GAAIC,mBAAmBC,wBAAwBlB,YAAY,CAAC,CAAC;QAC7D,GAAGF,KAAK;QACRsB;IACF,GACArB;AAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridRow_unstable } from './useDataGridRow';\nimport { renderDataGridRow_unstable } from './renderDataGridRow';\nimport { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridRow component\n */\nexport const DataGridRow: ForwardRefComponent<DataGridRowProps> &\n (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridRow_unstable(props, ref);\n\n useDataGridRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"names":["DataGridRow","React","forwardRef","props","ref","state","useDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","renderDataGridRow_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCACiB;mCACG;4CACG;qCAGF;AAKrC,MAAMA,cAAAA,WAAAA,GACgDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridRow/DataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridRow_unstable } from './useDataGridRow';\nimport { renderDataGridRow_unstable } from './renderDataGridRow';\nimport { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridRow component\n */\nexport const DataGridRow: ForwardRefComponent<DataGridRowProps> &\n (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridRow_unstable(props, ref);\n\n useDataGridRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"names":["DataGridRow","React","forwardRef","props","ref","state","useDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","renderDataGridRow_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCACiB;mCACG;4CACG;qCAGF;AAKrC,MAAMA,cAAAA,WAAAA,GACgDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridRow.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TableColumnDefinition } from '../../hooks';\nimport { DataGridContextValue } from '../DataGrid/DataGrid.types';\nimport type { TableRowProps, TableRowSlots, TableRowState } from '../TableRow/TableRow.types';\nimport type { TableSelectionCell } from '../TableSelectionCell/TableSelectionCell';\n\nexport type DataGridRowSlots = TableRowSlots & {\n /**\n * When selection is enabled on the @see DataGrid, all rows\n * will render the selection cell.\n */\n selectionCell?: Slot<typeof TableSelectionCell>;\n};\n\nexport type CellRenderFunction<TItem = unknown> = (\n column: TableColumnDefinition<TItem>,\n dataGridContextValue: DataGridContextValue,\n) => React.ReactNode;\n\n/**\n * DataGridRow Props\n */\nexport type DataGridRowProps<TItem = unknown> = Omit<TableRowProps, 'children'> &\n Omit<ComponentProps<DataGridRowSlots>, 'children'> & {\n children: CellRenderFunction<TItem>;\n };\n\n/**\n * State used in rendering DataGridRow\n */\nexport type DataGridRowState = TableRowState &\n ComponentState<DataGridRowSlots> & {\n renderCell: CellRenderFunction;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n columnDefs: TableColumnDefinition<any>[];\n dataGridContextValue: DataGridContextValue;\n };\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridRow/DataGridRow.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TableColumnDefinition } from '../../hooks';\nimport { DataGridContextValue } from '../DataGrid/DataGrid.types';\nimport type { TableRowProps, TableRowSlots, TableRowState } from '../TableRow/TableRow.types';\nimport type { TableSelectionCell } from '../TableSelectionCell/TableSelectionCell';\n\nexport type DataGridRowSlots = TableRowSlots & {\n /**\n * When selection is enabled on the @see DataGrid, all rows\n * will render the selection cell.\n */\n selectionCell?: Slot<typeof TableSelectionCell>;\n};\n\nexport type CellRenderFunction<TItem = unknown> = (\n column: TableColumnDefinition<TItem>,\n dataGridContextValue: DataGridContextValue,\n) => React.ReactNode;\n\n/**\n * DataGridRow Props\n */\nexport type DataGridRowProps<TItem = unknown> = Omit<TableRowProps, 'children'> &\n Omit<ComponentProps<DataGridRowSlots>, 'children'> & {\n children: CellRenderFunction<TItem>;\n };\n\n/**\n * State used in rendering DataGridRow\n */\nexport type DataGridRowState = TableRowState &\n ComponentState<DataGridRowSlots> & {\n renderCell: CellRenderFunction;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n columnDefs: TableColumnDefinition<any>[];\n dataGridContextValue: DataGridContextValue;\n };\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridRow';\nexport * from './DataGridRow.types';\nexport * from './renderDataGridRow';\nexport * from './useDataGridRow';\nexport * from './useDataGridRowStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridRow/index.ts"],"sourcesContent":["export * from './DataGridRow';\nexport * from './DataGridRow.types';\nexport * from './renderDataGridRow';\nexport * from './useDataGridRow';\nexport * from './useDataGridRowStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridRow_unstable","state","assertSlots","_jsxs","root","selectionCell","_jsx","columnDefs","map","columnDef","ColumnIdContextProvider","value","columnId","renderCell","dataGridContextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;iCAEY;AAKjC,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAE9B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,aAAa,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,aAAa,EAAA,CAAA;YAC3CJ,MAAMM,UAAU,CAACC,GAAG,CAACC,CAAAA,YAAAA,WAAAA,GACpBH,IAAAA,eAAA,EAACI,wCAAAA,EAAAA;oBAAwBC,OAAOF,UAAUG,QAAQ;8BAC/CX,MAAMY,UAAU,CAACJ,WAAWR,MAAMa,oBAAoB;mBADAL,UAAUG,QAAQ;;;AAMnF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridRow/renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridRow_unstable","state","assertSlots","_jsxs","root","selectionCell","_jsx","columnDefs","map","columnDef","ColumnIdContextProvider","value","columnId","renderCell","dataGridContextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;iCAEY;AAKjC,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAE9B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,aAAa,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,aAAa,EAAA,CAAA;YAC3CJ,MAAMM,UAAU,CAACC,GAAG,CAACC,CAAAA,YAAAA,WAAAA,GACpBH,IAAAA,eAAA,EAACI,wCAAAA,EAAAA;oBAAwBC,OAAOF,UAAUG,QAAQ;8BAC/CX,MAAMY,UAAU,CAACJ,WAAWR,MAAMa,oBAAoB;mBADAL,UAAUG,QAAQ;;;AAMnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { dataGridContextDefaultValue, useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const focusMode = useDataGridContext_unstable(ctx => ctx.focusMode);\n const compositeRowTabsterAttribute = useDataGridContext_unstable(ctx => ctx.compositeRowTabsterAttribute);\n\n const tabbable = focusMode === 'row_unstable' || focusMode === 'composite';\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n ...(focusMode === 'composite' && !isHeader && compositeRowTabsterAttribute),\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: slot.optional(props.selectionCell, {\n renderByDefault: selectable,\n elementType: DataGridSelectionCell,\n }),\n renderCell: props.children,\n columnDefs,\n // This context value should not be used internally\n // It's intended to help power user render functions\n dataGridContextValue: useStableDataGridContextValue(),\n };\n};\n\nfunction useStableDataGridContextValue() {\n const ref = React.useRef(dataGridContextDefaultValue);\n\n // Heads up!\n // We will not re-render when the context value changes, but we will have the latest value of the context when we do\n // render for other reasons.\n //\n // This relies on a context selector that always returns the same value:\n // - we will not re-render when the context value changes\n // - we will store the context value in a ref\n useDataGridContext_unstable(ctx => {\n ref.current = ctx;\n return null;\n });\n\n return ref.current!;\n}\n"],"names":["useDataGridRow_unstable","props","ref","rowId","useTableRowIdContext","isHeader","useIsInTableHeader","columnDefs","useDataGridContext_unstable","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","focusMode","compositeRowTabsterAttribute","tabbable","appearance","selectionAppearance","toggleRow","onClick","useEventCallback","e","onKeyDown","key","Space","isInteractiveHTMLElement","target","preventDefault","baseState","useTableRow_unstable","undefined","tabIndex","children","as","components","selectionCell","DataGridSelectionCell","slot","optional","renderByDefault","elementType","renderCell","dataGridContextValue","useStableDataGridContextValue","React","useRef","dataGridContextDefaultValue","current"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBaA;;;eAAAA;;;;iEAnBU;gCAC0C;8BAC3C;6BAEe;iCACoC;uCACnC;8BACD;oCACF;AAW5B,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,aAAaC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,OAAO;IACjE,MAAMC,aAAaH,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,cAAc;IACxE,MAAMC,WAAWL,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIK,SAAS,CAACC,aAAa,CAACZ;IAChF,MAAMa,YAAYR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIO,SAAS;IAClE,MAAMC,+BAA+BT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIQ,4BAA4B;IAExG,MAAMC,WAAWF,cAAc,kBAAkBA,cAAc;IAC/D,MAAMG,aAAaX,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC7C,IAAI,CAACJ,YAAYM,cAAcF,IAAIK,SAAS,CAACC,aAAa,CAACZ,QAAQ;YACjE,OAAOM,IAAIW,mBAAmB;QAChC;QAEA,OAAO;IACT;IACA,MAAMC,YAAYb,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIK,SAAS,CAACO,SAAS;IAE5E,MAAMC,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCvB;QAJA,IAAIU,cAAc,CAACN,UAAU;YAC3BgB,UAAUG,GAAGrB;QACf;QAEAF,CAAAA,iBAAAA,MAAMqB,OAAO,AAAPA,MAAO,QAAbrB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBuB;IAClB;IAEA,MAAMC,YAAYF,IAAAA,gCAAAA,EAAiB,CAACC;YAOlCvB;QANA,IAAIU,cAAc,CAACN,YAAYmB,EAAEE,GAAG,KAAKC,mBAAAA,IAAS,CAACC,IAAAA,wCAAAA,EAAyBJ,EAAEK,MAAM,GAAkB;YACpG,iBAAiB;YACjBL,EAAEM,cAAc;YAChBT,UAAUG,GAAGrB;QACf;QAEAF,CAAAA,mBAAAA,MAAMwB,SAAS,AAATA,MAAS,QAAfxB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAAA,IAAAA,CAAAA,OAAkBuB;IACpB;IAEA,MAAMO,YAAYC,IAAAA,iCAAAA,EAChB;QACEb;QACA,iBAAiBR,aAAaE,WAAWoB;QACzCC,UAAUhB,YAAY,CAACb,WAAW,IAAI4B;QACtC,GAAIjB,cAAc,eAAe,CAACX,YAAYY,4BAA4B;QAC1E,GAAGhB,KAAK;QACRqB;QACAG;QACAU,UAAU;QACVC,IAAI;IACN,GACAlC;IAGF,OAAO;QACL,GAAG6B,SAAS;QACZM,YAAY;YACV,GAAGN,UAAUM,UAAU;YACvBC,eAAeC,4CAAAA;QACjB;QACAD,eAAeE,oBAAAA,CAAKC,QAAQ,CAACxC,MAAMqC,aAAa,EAAE;YAChDI,iBAAiB/B;YACjBgC,aAAaJ,4CAAAA;QACf;QACAK,YAAY3C,MAAMkC,QAAQ;QAC1B5B;QACA,mDAAmD;QACnD,oDAAoD;QACpDsC,sBAAsBC;IACxB;AACF;AAEA,SAASA;IACP,MAAM5C,MAAM6C,OAAMC,MAAM,CAACC,4CAAAA;IAEzB,YAAY;IACZ,oHAAoH;IACpH,4BAA4B;IAC5B,EAAE;IACF,wEAAwE;IACxE,yDAAyD;IACzD,6CAA6C;IAC7CzC,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1BP,IAAIgD,OAAO,GAAGzC;QACd,OAAO;IACT;IAEA,OAAOP,IAAIgD,OAAO;AACpB"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridRow/useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { dataGridContextDefaultValue, useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const focusMode = useDataGridContext_unstable(ctx => ctx.focusMode);\n const compositeRowTabsterAttribute = useDataGridContext_unstable(ctx => ctx.compositeRowTabsterAttribute);\n\n const tabbable = focusMode === 'row_unstable' || focusMode === 'composite';\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n ...(focusMode === 'composite' && !isHeader && compositeRowTabsterAttribute),\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: slot.optional(props.selectionCell, {\n renderByDefault: selectable,\n elementType: DataGridSelectionCell,\n }),\n renderCell: props.children,\n columnDefs,\n // This context value should not be used internally\n // It's intended to help power user render functions\n dataGridContextValue: useStableDataGridContextValue(),\n };\n};\n\nfunction useStableDataGridContextValue() {\n const ref = React.useRef(dataGridContextDefaultValue);\n\n // Heads up!\n // We will not re-render when the context value changes, but we will have the latest value of the context when we do\n // render for other reasons.\n //\n // This relies on a context selector that always returns the same value:\n // - we will not re-render when the context value changes\n // - we will store the context value in a ref\n useDataGridContext_unstable(ctx => {\n ref.current = ctx;\n return null;\n });\n\n return ref.current!;\n}\n"],"names":["useDataGridRow_unstable","props","ref","rowId","useTableRowIdContext","isHeader","useIsInTableHeader","columnDefs","useDataGridContext_unstable","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","focusMode","compositeRowTabsterAttribute","tabbable","appearance","selectionAppearance","toggleRow","onClick","useEventCallback","e","onKeyDown","key","Space","isInteractiveHTMLElement","target","preventDefault","baseState","useTableRow_unstable","undefined","tabIndex","children","as","components","selectionCell","DataGridSelectionCell","slot","optional","renderByDefault","elementType","renderCell","dataGridContextValue","useStableDataGridContextValue","React","useRef","dataGridContextDefaultValue","current"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBaA;;;eAAAA;;;;iEAnBU;gCAC0C;8BAC3C;6BAEe;iCACoC;uCACnC;8BACD;oCACF;AAW5B,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,aAAaC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,OAAO;IACjE,MAAMC,aAAaH,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,cAAc;IACxE,MAAMC,WAAWL,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIK,SAAS,CAACC,aAAa,CAACZ;IAChF,MAAMa,YAAYR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIO,SAAS;IAClE,MAAMC,+BAA+BT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIQ,4BAA4B;IAExG,MAAMC,WAAWF,cAAc,kBAAkBA,cAAc;IAC/D,MAAMG,aAAaX,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC7C,IAAI,CAACJ,YAAYM,cAAcF,IAAIK,SAAS,CAACC,aAAa,CAACZ,QAAQ;YACjE,OAAOM,IAAIW,mBAAmB;QAChC;QAEA,OAAO;IACT;IACA,MAAMC,YAAYb,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIK,SAAS,CAACO,SAAS;IAE5E,MAAMC,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCvB;QAJA,IAAIU,cAAc,CAACN,UAAU;YAC3BgB,UAAUG,GAAGrB;QACf;QAEAF,CAAAA,iBAAAA,MAAMqB,OAAO,AAAPA,MAAO,QAAbrB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBuB;IAClB;IAEA,MAAMC,YAAYF,IAAAA,gCAAAA,EAAiB,CAACC;YAOlCvB;QANA,IAAIU,cAAc,CAACN,YAAYmB,EAAEE,GAAG,KAAKC,mBAAAA,IAAS,CAACC,IAAAA,wCAAAA,EAAyBJ,EAAEK,MAAM,GAAkB;YACpG,iBAAiB;YACjBL,EAAEM,cAAc;YAChBT,UAAUG,GAAGrB;QACf;QAEAF,CAAAA,mBAAAA,MAAMwB,SAAS,AAATA,MAAS,QAAfxB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAAA,IAAAA,CAAAA,OAAkBuB;IACpB;IAEA,MAAMO,YAAYC,IAAAA,iCAAAA,EAChB;QACEb;QACA,iBAAiBR,aAAaE,WAAWoB;QACzCC,UAAUhB,YAAY,CAACb,WAAW,IAAI4B;QACtC,GAAIjB,cAAc,eAAe,CAACX,YAAYY,4BAA4B;QAC1E,GAAGhB,KAAK;QACRqB;QACAG;QACAU,UAAU;QACVC,IAAI;IACN,GACAlC;IAGF,OAAO;QACL,GAAG6B,SAAS;QACZM,YAAY;YACV,GAAGN,UAAUM,UAAU;YACvBC,eAAeC,4CAAAA;QACjB;QACAD,eAAeE,oBAAAA,CAAKC,QAAQ,CAACxC,MAAMqC,aAAa,EAAE;YAChDI,iBAAiB/B;YACjBgC,aAAaJ,4CAAAA;QACf;QACAK,YAAY3C,MAAMkC,QAAQ;QAC1B5B;QACA,mDAAmD;QACnD,oDAAoD;QACpDsC,sBAAsBC;IACxB;AACF;AAEA,SAASA;IACP,MAAM5C,MAAM6C,OAAMC,MAAM,CAACC,4CAAAA;IAEzB,YAAY;IACZ,oHAAoH;IACpH,4BAA4B;IAC5B,EAAE;IACF,wEAAwE;IACxE,yDAAyD;IACzD,6CAA6C;IAC7CzC,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1BP,IAAIgD,OAAO,GAAGzC;QACd,OAAO;IACT;IAEA,OAAOP,IAAIgD,OAAO;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nimport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nimport { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles.styles';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridSelectionCell component\n */\nexport const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridSelectionCell_unstable(props, ref);\n\n useDataGridSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"names":["DataGridSelectionCell","React","forwardRef","props","ref","state","useDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridSelectionCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;0CAC2B;6CACG;sDACG;qCAGZ;AAKrC,MAAMA,wBAAAA,WAAAA,GAAyEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7G,MAAMC,QAAQC,IAAAA,2DAAAA,EAAkCH,OAAOC;IAEvDG,IAAAA,6EAAAA,EAAwCF;IAExCG,IAAAA,gDAAAA,EAA4B,2CAA2CH;IAEvE,OAAOI,IAAAA,iEAAAA,EAAqCJ;AAC9C;AAEAL,sBAAsBU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridSelectionCell/DataGridSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nimport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nimport { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles.styles';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridSelectionCell component\n */\nexport const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridSelectionCell_unstable(props, ref);\n\n useDataGridSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"names":["DataGridSelectionCell","React","forwardRef","props","ref","state","useDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridSelectionCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;0CAC2B;6CACG;sDACG;qCAGZ;AAKrC,MAAMA,wBAAAA,WAAAA,GAAyEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7G,MAAMC,QAAQC,IAAAA,2DAAAA,EAAkCH,OAAOC;IAEvDG,IAAAA,6EAAAA,EAAwCF;IAExCG,IAAAA,gDAAAA,EAA4B,2CAA2CH;IAEvE,OAAOI,IAAAA,iEAAAA,EAAqCJ;AAC9C;AAEAL,sBAAsBU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridSelectionCell.types.ts"],"sourcesContent":["import {\n TableSelectionCellProps,\n TableSelectionCellSlots,\n TableSelectionCellState,\n} from '../TableSelectionCell/TableSelectionCell.types';\n\nexport type DataGridSelectionCellSlots = TableSelectionCellSlots;\n\n/**\n * DataGridSelectionCell Props\n */\nexport type DataGridSelectionCellProps = TableSelectionCellProps;\n\n/**\n * State used in rendering DataGridSelectionCell\n */\nexport type DataGridSelectionCellState = TableSelectionCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridSelectionCell/DataGridSelectionCell.types.ts"],"sourcesContent":["import {\n TableSelectionCellProps,\n TableSelectionCellSlots,\n TableSelectionCellState,\n} from '../TableSelectionCell/TableSelectionCell.types';\n\nexport type DataGridSelectionCellSlots = TableSelectionCellSlots;\n\n/**\n * DataGridSelectionCell Props\n */\nexport type DataGridSelectionCellProps = TableSelectionCellProps;\n\n/**\n * State used in rendering DataGridSelectionCell\n */\nexport type DataGridSelectionCellState = TableSelectionCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridSelectionCell';\nexport * from './DataGridSelectionCell.types';\nexport * from './renderDataGridSelectionCell';\nexport * from './useDataGridSelectionCell';\nexport * from './useDataGridSelectionCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridSelectionCell/index.ts"],"sourcesContent":["export * from './DataGridSelectionCell';\nexport * from './DataGridSelectionCell.types';\nexport * from './renderDataGridSelectionCell';\nexport * from './useDataGridSelectionCell';\nexport * from './useDataGridSelectionCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridSelectionCell.tsx"],"sourcesContent":["import type { DataGridSelectionCellState } from './DataGridSelectionCell.types';\nimport { renderTableSelectionCell_unstable } from '../TableSelectionCell/renderTableSelectionCell';\n\n/**\n * Render the final JSX of DataGridSelectionCell\n */\nexport const renderDataGridSelectionCell_unstable = (state: DataGridSelectionCellState) => {\n return renderTableSelectionCell_unstable(state);\n};\n"],"names":["renderDataGridSelectionCell_unstable","state","renderTableSelectionCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;0CALqC;AAK3C,MAAMA,uCAAuC,CAACC;IACnD,OAAOC,IAAAA,2DAAAA,EAAkCD;AAC3C"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridSelectionCell/renderDataGridSelectionCell.tsx"],"sourcesContent":["import type { DataGridSelectionCellState } from './DataGridSelectionCell.types';\nimport { renderTableSelectionCell_unstable } from '../TableSelectionCell/renderTableSelectionCell';\n\n/**\n * Render the final JSX of DataGridSelectionCell\n */\nexport const renderDataGridSelectionCell_unstable = (state: DataGridSelectionCellState) => {\n return renderTableSelectionCell_unstable(state);\n};\n"],"names":["renderDataGridSelectionCell_unstable","state","renderTableSelectionCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;0CALqC;AAK3C,MAAMA,uCAAuC,CAACC;IACnD,OAAOC,IAAAA,2DAAAA,EAAkCD;AAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridSelectionCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\nimport { useTableSelectionCell_unstable } from '../TableSelectionCell/useTableSelectionCell';\nimport type { DataGridSelectionCellProps, DataGridSelectionCellState } from './DataGridSelectionCell.types';\n\n/**\n * Create the state required to render DataGridSelectionCell.\n *\n * The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,\n * before being passed to renderDataGridSelectionCell_unstable.\n *\n * @param props - props from this instance of DataGridSelectionCell\n * @param ref - reference to root HTMLElement of DataGridSelectionCell\n */\nexport const useDataGridSelectionCell_unstable = (\n props: DataGridSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridSelectionCellState => {\n const isHeader = useIsInTableHeader();\n const rowId = useTableRowIdContext();\n const subtle = useDataGridContext_unstable(ctx => ctx.subtleSelection);\n const checked = useDataGridContext_unstable(ctx => {\n if (isHeader && ctx.selection.selectionMode === 'multiselect') {\n return ctx.selection.allRowsSelected ? true : ctx.selection.someRowsSelected ? 'mixed' : false;\n }\n\n return ctx.selection.isRowSelected(rowId);\n });\n\n const toggleAllRows = useDataGridContext_unstable(ctx => ctx.selection.toggleAllRows);\n const type = useDataGridContext_unstable(ctx =>\n ctx.selection.selectionMode === 'multiselect' ? 'checkbox' : 'radio',\n );\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableCellElement>) => {\n if (isHeader) {\n toggleAllRows(e);\n }\n\n props.onClick?.(e);\n });\n\n return useTableSelectionCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n checked,\n type,\n invisible: isHeader && type === 'radio',\n 'aria-checked': isHeader && type !== 'radio' ? checked : undefined,\n 'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,\n subtle,\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridSelectionCell_unstable","props","ref","isHeader","useIsInTableHeader","rowId","useTableRowIdContext","subtle","useDataGridContext_unstable","ctx","subtleSelection","checked","selection","selectionMode","allRowsSelected","someRowsSelected","isRowSelected","toggleAllRows","type","onClick","useEventCallback","e","useTableSelectionCell_unstable","as","role","invisible","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;gCACU;iCACW;8BACP;oCACF;uCACY;AAYxC,MAAMA,oCAAoC,CAC/CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,SAASC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,eAAe;IACrE,MAAMC,UAAUH,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1C,IAAIN,YAAYM,IAAIG,SAAS,CAACC,aAAa,KAAK,eAAe;YAC7D,OAAOJ,IAAIG,SAAS,CAACE,eAAe,GAAG,OAAOL,IAAIG,SAAS,CAACG,gBAAgB,GAAG,UAAU;QAC3F;QAEA,OAAON,IAAIG,SAAS,CAACI,aAAa,CAACX;IACrC;IAEA,MAAMY,gBAAgBT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,SAAS,CAACK,aAAa;IACpF,MAAMC,OAAOV,IAAAA,4CAAAA,EAA4BC,CAAAA,MACvCA,IAAIG,SAAS,CAACC,aAAa,KAAK,gBAAgB,aAAa;IAG/D,MAAMM,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCpB;QAJA,IAAIE,UAAU;YACZc,cAAcI;QAChB;QAEApB,CAAAA,iBAAAA,MAAMkB,OAAO,AAAPA,MAAO,QAAblB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBoB;IAClB;IAEA,OAAOC,IAAAA,qDAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACNb;QACAO;QACAO,WAAWtB,YAAYe,SAAS;QAChC,gBAAgBf,YAAYe,SAAS,UAAUP,UAAUe;QACzD,iBAAiBvB,YAAYQ,YAAY,UAAUe,YAAYf;QAC/DJ;QACA,GAAGN,KAAK;QACRkB;IACF,GACAjB;AAEJ"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGridSelectionCell/useDataGridSelectionCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\nimport { useTableSelectionCell_unstable } from '../TableSelectionCell/useTableSelectionCell';\nimport type { DataGridSelectionCellProps, DataGridSelectionCellState } from './DataGridSelectionCell.types';\n\n/**\n * Create the state required to render DataGridSelectionCell.\n *\n * The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,\n * before being passed to renderDataGridSelectionCell_unstable.\n *\n * @param props - props from this instance of DataGridSelectionCell\n * @param ref - reference to root HTMLElement of DataGridSelectionCell\n */\nexport const useDataGridSelectionCell_unstable = (\n props: DataGridSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridSelectionCellState => {\n const isHeader = useIsInTableHeader();\n const rowId = useTableRowIdContext();\n const subtle = useDataGridContext_unstable(ctx => ctx.subtleSelection);\n const checked = useDataGridContext_unstable(ctx => {\n if (isHeader && ctx.selection.selectionMode === 'multiselect') {\n return ctx.selection.allRowsSelected ? true : ctx.selection.someRowsSelected ? 'mixed' : false;\n }\n\n return ctx.selection.isRowSelected(rowId);\n });\n\n const toggleAllRows = useDataGridContext_unstable(ctx => ctx.selection.toggleAllRows);\n const type = useDataGridContext_unstable(ctx =>\n ctx.selection.selectionMode === 'multiselect' ? 'checkbox' : 'radio',\n );\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableCellElement>) => {\n if (isHeader) {\n toggleAllRows(e);\n }\n\n props.onClick?.(e);\n });\n\n return useTableSelectionCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n checked,\n type,\n invisible: isHeader && type === 'radio',\n 'aria-checked': isHeader && type !== 'radio' ? checked : undefined,\n 'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,\n subtle,\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridSelectionCell_unstable","props","ref","isHeader","useIsInTableHeader","rowId","useTableRowIdContext","subtle","useDataGridContext_unstable","ctx","subtleSelection","checked","selection","selectionMode","allRowsSelected","someRowsSelected","isRowSelected","toggleAllRows","type","onClick","useEventCallback","e","useTableSelectionCell_unstable","as","role","invisible","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;gCACU;iCACW;8BACP;oCACF;uCACY;AAYxC,MAAMA,oCAAoC,CAC/CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,SAASC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,eAAe;IACrE,MAAMC,UAAUH,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1C,IAAIN,YAAYM,IAAIG,SAAS,CAACC,aAAa,KAAK,eAAe;YAC7D,OAAOJ,IAAIG,SAAS,CAACE,eAAe,GAAG,OAAOL,IAAIG,SAAS,CAACG,gBAAgB,GAAG,UAAU;QAC3F;QAEA,OAAON,IAAIG,SAAS,CAACI,aAAa,CAACX;IACrC;IAEA,MAAMY,gBAAgBT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,SAAS,CAACK,aAAa;IACpF,MAAMC,OAAOV,IAAAA,4CAAAA,EAA4BC,CAAAA,MACvCA,IAAIG,SAAS,CAACC,aAAa,KAAK,gBAAgB,aAAa;IAG/D,MAAMM,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCpB;QAJA,IAAIE,UAAU;YACZc,cAAcI;QAChB;QAEApB,CAAAA,iBAAAA,MAAMkB,OAAO,AAAPA,MAAO,QAAblB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBoB;IAClB;IAEA,OAAOC,IAAAA,qDAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACNb;QACAO;QACAO,WAAWtB,YAAYe,SAAS;QAChC,gBAAgBf,YAAYe,SAAS,UAAUP,UAAUe;QACzD,iBAAiBvB,YAAYQ,YAAY,UAAUe,YAAYf;QAC/DJ;QACA,GAAGN,KAAK;QACRkB;IACF,GACAjB;AAEJ"}
|
package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js
CHANGED
|
@@ -34,4 +34,4 @@ const useDataGridSelectionCellStyles_unstable = (state)=>{
|
|
|
34
34
|
state.radioIndicator.className = (0, _react.mergeClasses)(dataGridSelectionCellClassNames.radioIndicator, state.radioIndicator.className);
|
|
35
35
|
}
|
|
36
36
|
return state;
|
|
37
|
-
};
|
|
37
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles.styles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Table component\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableStyles_unstable')(state);\n\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"names":["Table","React","forwardRef","props","ref","state","useTable_unstable","useTableStyles_unstable","useCustomStyleHook_unstable","renderTable_unstable","useTableContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;0BACW;6BACG;sCACG;uCAGO;qCACH;AAKrC,MAAMA,QAAAA,WAAAA,GAAyCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQC,IAAAA,2BAAAA,EAAkBH,OAAOC;IAEvCG,IAAAA,6CAAAA,EAAwBF;IAExBG,IAAAA,gDAAAA,EAA4B,2BAA2BH;IAEvD,OAAOI,IAAAA,iCAAAA,EAAqBJ,OAAOK,IAAAA,qDAAAA,EAA+BL;AACpE;AAEAL,MAAMW,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/Table/Table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles.styles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Table component\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableStyles_unstable')(state);\n\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"names":["Table","React","forwardRef","props","ref","state","useTable_unstable","useTableStyles_unstable","useCustomStyleHook_unstable","renderTable_unstable","useTableContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;0BACW;6BACG;sCACG;uCAGO;qCACH;AAKrC,MAAMA,QAAAA,WAAAA,GAAyCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQC,IAAAA,2BAAAA,EAAkBH,OAAOC;IAEvCG,IAAAA,6CAAAA,EAAwBF;IAExBG,IAAAA,gDAAAA,EAA4B,2BAA2BH;IAEvD,OAAOI,IAAAA,iCAAAA,EAAqBJ,OAAOK,IAAAA,qDAAAA,EAA+BL;AACpE;AAEAL,MAAMW,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Table.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n /**\n * Affects the sizes of all table subcomponents\n * @default medium\n */\n size: 'extra-small' | 'small' | 'medium';\n\n /**\n * Render all table elements as divs instead of semantic table elements\n * Using divs no longer uses `display: table` layout but `display: flex`\n * @default false\n */\n noNativeElements: boolean;\n\n /**\n * Whether the table is sortable\n * @default false\n */\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"],"names":[],"rangeMappings":";;","mappings":"AAsCA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/Table/Table.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n /**\n * Affects the sizes of all table subcomponents\n * @default medium\n */\n size: 'extra-small' | 'small' | 'medium';\n\n /**\n * Render all table elements as divs instead of semantic table elements\n * Using divs no longer uses `display: table` layout but `display: flex`\n * @default false\n */\n noNativeElements: boolean;\n\n /**\n * Whether the table is sortable\n * @default false\n */\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"],"names":[],"rangeMappings":";;","mappings":"AAsCA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/Table/index.ts"],"sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderTable.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableState, TableSlots, TableContextValues } from './Table.types';\nimport { TableContextProvider } from '../../contexts/tableContext';\n\n/**\n * Render the final JSX of Table\n */\nexport const renderTable_unstable = (state: TableState, contextValues: TableContextValues) => {\n assertSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <state.root />\n </TableContextProvider>\n );\n};\n"],"names":["renderTable_unstable","state","contextValues","assertSlots","_jsx","TableContextProvider","value","table","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAES;AAK9B,MAAMA,uBAAuB,CAACC,OAAmBC;IACtDC,IAAAA,2BAAAA,EAAwBF;IAExB,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,kCAAAA,EAAAA;QAAqBC,OAAOJ,cAAcK,KAAK;kBAC9C,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
|
|
1
|
+
{"version":3,"sources":["../src/components/Table/renderTable.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableState, TableSlots, TableContextValues } from './Table.types';\nimport { TableContextProvider } from '../../contexts/tableContext';\n\n/**\n * Render the final JSX of Table\n */\nexport const renderTable_unstable = (state: TableState, contextValues: TableContextValues) => {\n assertSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <state.root />\n </TableContextProvider>\n );\n};\n"],"names":["renderTable_unstable","state","contextValues","assertSlots","_jsx","TableContextProvider","value","table","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAES;AAK9B,MAAMA,uBAAuB,CAACC,OAAmBC;IACtDC,IAAAA,2BAAAA,EAAwBF;IAExB,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,kCAAAA,EAAAA;QAAqBC,OAAOJ,cAAcK,KAAK;kBAC9C,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"names":["useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType","size","sortable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,oBAAoB,CAACC,OAAmBC;QAC7BD;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,AAAFA,MAAE,QAARH,cAAAA,KAAAA,IAAAA,YAAYA,MAAMI,gBAAgB,AAAhBA,IAAmB,QAAQ;QAiB3DJ,aACYA,yBACRA;IAjBZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBP,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FD,KAAKA;YACLS,MAAMR,kBAAkB,QAAQ,UAAUS;YAC1C,GAAGX,KAAK;QACV,IACA;YAAEY,aAAaV;QAAc;QAE/BW,MAAMb,CAAAA,cAAAA,MAAMa,IAAI,AAAJA,MAAI,QAAVb,gBAAAA,KAAAA,IAAAA,cAAc;QACpBI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,AAAhBA,MAAgB,QAAtBJ,4BAAAA,KAAAA,IAAAA,0BAA0B;QAC5Cc,UAAUd,CAAAA,kBAAAA,MAAMc,QAAQ,AAARA,MAAQ,QAAdd,oBAAAA,KAAAA,IAAAA,kBAAkB;IAC9B;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/Table/useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"names":["useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType","size","sortable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,oBAAoB,CAACC,OAAmBC;QAC7BD;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,AAAFA,MAAE,QAARH,cAAAA,KAAAA,IAAAA,YAAYA,MAAMI,gBAAgB,AAAhBA,IAAmB,QAAQ;QAiB3DJ,aACYA,yBACRA;IAjBZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBP,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FD,KAAKA;YACLS,MAAMR,kBAAkB,QAAQ,UAAUS;YAC1C,GAAGX,KAAK;QACV,IACA;YAAEY,aAAaV;QAAc;QAE/BW,MAAMb,CAAAA,cAAAA,MAAMa,IAAI,AAAJA,MAAI,QAAVb,gBAAAA,KAAAA,IAAAA,cAAc;QACpBI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,AAAhBA,MAAgB,QAAtBJ,4BAAAA,KAAAA,IAAAA,0BAA0B;QAC5Cc,UAAUd,CAAAA,kBAAAA,MAAMc,QAAQ,AAARA,MAAQ,QAAdd,oBAAAA,KAAAA,IAAAA,kBAAkB;IAC9B;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"],"names":["useTableContextValues_unstable","state","size","noNativeElements","sortable","tableContext","React","useMemo","table"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;AAGhB,SAASA,+BAA+BC,KAAiB;IAC9D,MAAM,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,EAAE,GAAGH;IAE7C,MAAMI,eAAeC,OAAMC,OAAO,CAChC,IAAO,CAAA;YACLJ;YACAD;YACAE;QACF,CAAA,GACA;QAACD;QAAkBD;QAAME;KAAS;IAGpC,OAAO;QACLI,OAAOH;IACT;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/Table/useTableContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"],"names":["useTableContextValues_unstable","state","size","noNativeElements","sortable","tableContext","React","useMemo","table"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;AAGhB,SAASA,+BAA+BC,KAAiB;IAC9D,MAAM,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,EAAE,GAAGH;IAE7C,MAAMI,eAAeC,OAAMC,OAAO,CAChC,IAAO,CAAA;YACLJ;YACAD;YACAE;QACF,CAAA,GACA;QAACD;QAAkBD;QAAME;KAAS;IAGpC,OAAO;QACLI,OAAOH;IACT;AACF"}
|
|
@@ -70,4 +70,4 @@ const useTableStyles_unstable = (state)=>{
|
|
|
70
70
|
};
|
|
71
71
|
state.root.className = (0, _react.mergeClasses)(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
72
72
|
return state;
|
|
73
|
-
};
|
|
73
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles.styles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableBody component\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableBodyStyles_unstable')(state);\n\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"names":["TableBody","React","forwardRef","props","ref","state","useTableBody_unstable","useTableBodyStyles_unstable","useCustomStyleHook_unstable","renderTableBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/TableBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles.styles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableBody component\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableBodyStyles_unstable')(state);\n\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"names":["TableBody","React","forwardRef","props","ref","state","useTableBody_unstable","useTableBodyStyles_unstable","useCustomStyleHook_unstable","renderTableBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/TableBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/index.ts"],"sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderTableBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n assertSlots<TableBodySlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderTableBody_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,2BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/renderTableBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n assertSlots<TableBodySlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderTableBody_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,2BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["useTableBody_unstable","props","ref","noNativeElements","useTableContext","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;8BAEf;AAWzB,MAAMA,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,IAAAA,6BAAAA;QACPH;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,AAAFA,MAAE,QAARL,cAAAA,KAAAA,IAAAA,YAAYE,gBAAAA,IAAmB,QAAQ;IAE7D,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKA;YACLU,MAAMP,kBAAkB,QAAQ,aAAaQ;YAC7C,GAAGZ,KAAK;QACV,IACA;YAAEa,aAAaT;QAAc;QAE/BF;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/useTableBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["useTableBody_unstable","props","ref","noNativeElements","useTableContext","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;8BAEf;AAWzB,MAAMA,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,IAAAA,6BAAAA;QACPH;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,AAAFA,MAAE,QAARL,cAAAA,KAAAA,IAAAA,YAAYE,gBAAAA,IAAmB,QAAQ;IAE7D,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKA;YACLU,MAAMP,kBAAkB,QAAQ,aAAaQ;YAC7C,GAAGZ,KAAK;QACV,IACA;YAAEa,aAAaT;QAAc;QAE/BF;IACF;AACF"}
|
|
@@ -50,4 +50,4 @@ const useTableBodyStyles_unstable = (state)=>{
|
|
|
50
50
|
};
|
|
51
51
|
state.root.className = (0, _react.mergeClasses)(tableBodyClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
52
52
|
return state;
|
|
53
|
-
};
|
|
53
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles.styles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableCell component\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableCellStyles_unstable')(state);\n\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"names":["TableCell","React","forwardRef","props","ref","state","useTableCell_unstable","useTableCellStyles_unstable","useCustomStyleHook_unstable","renderTableCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCell/TableCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles.styles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableCell component\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableCellStyles_unstable')(state);\n\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"names":["TableCell","React","forwardRef","props","ref","state","useTableCell_unstable","useTableCellStyles_unstable","useCustomStyleHook_unstable","renderTableCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCell/TableCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|