@fluentui/react-table 9.0.3 → 9.1.0
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.json +111 -1
- package/CHANGELOG.md +30 -2
- package/README.md +552 -2
- package/Spec.md +475 -33
- package/dist/index.d.ts +3 -3
- package/lib/components/DataGrid/DataGrid.js +5 -0
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js +32 -4
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGrid/useDataGridStyles.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.js +5 -0
- package/lib/components/DataGridBody/DataGridBody.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.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.js +5 -0
- package/lib/components/DataGridCell/DataGridCell.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.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.js +5 -0
- package/lib/components/DataGridHeader/DataGridHeader.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.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +5 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.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.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.js +5 -0
- package/lib/components/DataGridRow/DataGridRow.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.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +5 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.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.js.map +1 -1
- package/lib/components/Table/Table.js +5 -0
- package/lib/components/Table/Table.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.js.map +1 -1
- package/lib/components/TableBody/TableBody.js +5 -0
- package/lib/components/TableBody/TableBody.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.js.map +1 -1
- package/lib/components/TableCell/TableCell.js +5 -0
- package/lib/components/TableCell/TableCell.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.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +5 -0
- package/lib/components/TableCellActions/TableCellActions.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.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js +5 -0
- package/lib/components/TableCellLayout/TableCellLayout.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.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js +5 -0
- package/lib/components/TableHeader/TableHeader.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.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js +5 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.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.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.js +5 -0
- package/lib/components/TableResizeHandle/TableResizeHandle.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.js.map +1 -1
- package/lib/components/TableRow/TableRow.js +5 -0
- package/lib/components/TableRow/TableRow.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.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +5 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- 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/selectionManager.js.map +1 -1
- package/lib/hooks/types.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/useTableFeatures.js.map +1 -1
- package/lib/hooks/useTableSelection.js +8 -2
- 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-amd/components/DataGrid/DataGrid.js +3 -1
- package/lib-amd/components/DataGrid/DataGrid.js.map +1 -1
- package/lib-amd/components/DataGrid/useDataGrid.js +24 -2
- package/lib-amd/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-amd/components/DataGridBody/DataGridBody.js +3 -1
- package/lib-amd/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib-amd/components/DataGridCell/DataGridCell.js +3 -1
- package/lib-amd/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib-amd/components/DataGridHeader/DataGridHeader.js +3 -1
- package/lib-amd/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js +3 -1
- package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib-amd/components/DataGridRow/DataGridRow.js +3 -1
- package/lib-amd/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js +3 -1
- package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib-amd/components/Table/Table.js +3 -1
- package/lib-amd/components/Table/Table.js.map +1 -1
- package/lib-amd/components/TableBody/TableBody.js +3 -1
- package/lib-amd/components/TableBody/TableBody.js.map +1 -1
- package/lib-amd/components/TableCell/TableCell.js +3 -1
- package/lib-amd/components/TableCell/TableCell.js.map +1 -1
- package/lib-amd/components/TableCellActions/TableCellActions.js +3 -1
- package/lib-amd/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib-amd/components/TableCellLayout/TableCellLayout.js +3 -1
- package/lib-amd/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-amd/components/TableHeader/TableHeader.js +3 -1
- package/lib-amd/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-amd/components/TableHeaderCell/TableHeaderCell.js +3 -1
- package/lib-amd/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-amd/components/TableResizeHandle/TableResizeHandle.js +3 -1
- package/lib-amd/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib-amd/components/TableRow/TableRow.js +3 -1
- package/lib-amd/components/TableRow/TableRow.js.map +1 -1
- package/lib-amd/components/TableSelectionCell/TableSelectionCell.js +3 -1
- package/lib-amd/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib-amd/hooks/types.js.map +1 -1
- package/lib-amd/hooks/useTableColumnResizeState.js +29 -27
- package/lib-amd/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib-amd/hooks/useTableSelection.js +8 -2
- package/lib-amd/hooks/useTableSelection.js.map +1 -1
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/utils/columnResizeUtils.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 +5 -0
- 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 +30 -2
- 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.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/Table/Table.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js +5 -0
- 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.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +5 -0
- 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.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +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/selectionManager.js.map +1 -1
- package/lib-commonjs/hooks/types.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/useTableFeatures.js.map +1 -1
- package/lib-commonjs/hooks/useTableSelection.js +8 -2
- 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/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useArrowNavigationGroup","useFocusFinders","useTable_unstable","useTableFeatures","useTableSort","useTableSelection","useTableColumnSizing_unstable","CELL_WIDTH","useEventCallback","useMergedRefs","End","Home","useDataGrid_unstable","props","ref","items","columns","focusMode","selectionMode","onSortChange","onSelectionChange","defaultSortState","sortState","selectedItems","defaultSelectedItems","subtleSelection","selectionAppearance","getRowId","resizableColumns","columnSizingOptions","onColumnResize","navigable","keyboardNavAttr","axis","tableState","containerWidthOffset","innerRef","useRef","findFirstFocusable","findLastFocusable","onKeyDown","e","_a","call","current","ctrlKey","defaultPrevented","key","firstRow","querySelector","_b","focus","rows","querySelectorAll","length","lastRow","item","_c","baseTableState","role","as","noNativeElements","tableRef","selectableRows"],"sources":["../src/packages/react-components/react-table/src/components/DataGrid/useDataGrid.ts"],"sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useTableFeatures, useTableSort, useTableSelection, useTableColumnSizing_unstable } from '../../hooks';\nimport { CELL_WIDTH } from '../TableSelectionCell';\nimport { useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { End, Home } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render DataGrid.\n *\n * The returned state can be modified with hooks such as useDataGridStyles_unstable,\n * before being passed to renderDataGrid_unstable.\n *\n * @param props - props from this instance of DataGrid\n * @param ref - reference to root HTMLElement of DataGrid\n */\nexport const useDataGrid_unstable = (props: DataGridProps, ref: React.Ref<HTMLElement>): DataGridState => {\n const {\n items,\n columns,\n focusMode = 'cell',\n selectionMode,\n onSortChange,\n onSelectionChange,\n defaultSortState,\n sortState,\n selectedItems,\n defaultSelectedItems,\n subtleSelection = false,\n selectionAppearance = 'brand',\n getRowId,\n resizableColumns,\n columnSizingOptions,\n onColumnResize,\n } = props;\n\n const navigable = focusMode !== 'none';\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'grid' });\n\n const tableState = useTableFeatures({ items, columns, getRowId }, [\n useTableSort({\n defaultSortState,\n sortState,\n onSortChange,\n }),\n useTableSelection({\n defaultSelectedItems,\n selectedItems,\n onSelectionChange,\n selectionMode: selectionMode ?? 'multiselect',\n }),\n useTableColumnSizing_unstable({\n onColumnResize,\n columnSizingOptions,\n // The selection cell is not part of the columns, therefore its width needs to be subtracted\n // from the container to make sure the columns don't overflow the table.\n containerWidthOffset: selectionMode ? -CELL_WIDTH : 0,\n }),\n ]);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableElement>) => {\n props.onKeyDown?.(e);\n if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {\n return;\n }\n\n if (e.key === Home) {\n const firstRow = innerRef.current.querySelector('[role=\"row\"]') as HTMLElement | null;\n if (firstRow) {\n findFirstFocusable(firstRow)?.focus();\n }\n }\n\n if (e.key === End) {\n const rows = innerRef.current.querySelectorAll('[role=\"row\"]');\n if (rows.length) {\n const lastRow = rows.item(rows.length - 1);\n findLastFocusable(lastRow as HTMLElement)?.focus();\n }\n }\n });\n\n const baseTableState = useTable_unstable(\n {\n role: 'grid',\n as: 'div',\n noNativeElements: true,\n ...(navigable && keyboardNavAttr),\n ...props,\n onKeyDown,\n },\n useMergedRefs(ref, tableState.tableRef, innerRef),\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n };\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","dataGrid","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns"],"sources":["../src/packages/react-components/react-table/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 return {\n ...tableContextValues,\n dataGrid: {\n ...state.tableState,\n focusMode: state.focusMode,\n selectableRows: state.selectableRows,\n subtleSelection: state.subtleSelection,\n selectionAppearance: state.selectionAppearance,\n resizableColumns: state.resizableColumns,\n },\n };\n}\n"],"mappings":"AAAA,SAASA,8BAA8B,QAAQ,gCAAgC;AAG/E,OAAM,SAAUC,iCAAiCA,CAACC,KAAoB;EACpE,MAAMC,kBAAkB,GAAGH,8BAA8B,CAACE,KAAK,CAAC;EAChE,OAAO;IACL,GAAGC,kBAAkB;IACrBC,QAAQ,EAAE;MACR,GAAGF,KAAK,CAACG,UAAU;MACnBC,SAAS,EAAEJ,KAAK,CAACI,SAAS;MAC1BC,cAAc,EAAEL,KAAK,CAACK,cAAc;MACpCC,eAAe,EAAEN,KAAK,CAACM,eAAe;MACtCC,mBAAmB,EAAEP,KAAK,CAACO,mBAAmB;MAC9CC,gBAAgB,EAAER,KAAK,CAACQ;;GAE3B;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableStyles_unstable","dataGridClassNames","root","useDataGridStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGrid/useDataGridStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridSlots, DataGridState } from './DataGrid.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableStyles_unstable } from '../Table/useTableStyles';\n\nexport const dataGridClassNames: SlotClassNames<DataGridSlots> = {\n root: 'fui-DataGrid',\n};\n\n/**\n * Apply styling to the DataGrid slots based on the state\n */\nexport const useDataGridStyles_unstable = (state: DataGridState): DataGridState => {\n useTableStyles_unstable(state);\n state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,uBAAuB,QAAQ,yBAAyB;AAEjE,OAAO,MAAMC,kBAAkB,GAAkC;EAC/DC,IAAI,EAAE;CACP;AAED;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAoB,IAAmB;EAChFJ,uBAAuB,CAACI,KAAK,CAAC;EAC9BA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,kBAAkB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAElF,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -2,12 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { useDataGridBody_unstable } from './useDataGridBody';
|
|
3
3
|
import { renderDataGridBody_unstable } from './renderDataGridBody';
|
|
4
4
|
import { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
5
6
|
/**
|
|
6
7
|
* DataGridBody component
|
|
7
8
|
*/
|
|
8
9
|
export const DataGridBody = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
10
|
const state = useDataGridBody_unstable(props, ref);
|
|
10
11
|
useDataGridBodyStyles_unstable(state);
|
|
12
|
+
const {
|
|
13
|
+
useDataGridBodyStyles_unstable: useCustomStyles
|
|
14
|
+
} = useCustomStyleHooks_unstable();
|
|
15
|
+
useCustomStyles(state);
|
|
11
16
|
return renderDataGridBody_unstable(state);
|
|
12
17
|
});
|
|
13
18
|
DataGridBody.displayName = 'DataGridBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHooks_unstable","DataGridBody","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useDataGridBodyStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,8BAA8B,QAAQ,yBAAyB;AAGxE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,YAAY,gBACqCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC5F,MAAMC,KAAK,GAAGR,wBAAwB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAElDL,8BAA8B,CAACM,KAAK,CAAC;EAErC,MAAM;IAAEN,8BAA8B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EAC1FM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,2BAA2B,CAACO,KAAK,CAAC;AAC3C,CAAC,CAAuG;AAExGJ,YAAY,CAACM,WAAW,GAAG,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","getSlots","TableRowIdContextProvider","renderDataGridBody_unstable","state","slots","slotProps","createElement","root","rows","map","row","key","rowId","value","renderRow"],"sources":["../src/packages/react-components/react-table/src/components/DataGridBody/renderDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<DataGridBodySlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,yBAAyB,QAAQ,6BAA6B;AAEvE;;;AAGA,OAAO,MAAMC,2BAA2B,GAAIC,KAAwB,IAAI;EACtE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGL,QAAQ,CAAoBG,KAAK,CAAC;EAE/D,oBACEJ,KAAA,CAAAO,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAC3BJ,KAAK,CAACK,IAAI,CAACC,GAAG,CAACC,GAAG,iBACjBX,KAAA,CAAAO,aAAA,CAACL,yBAAyB;IAACU,GAAG,EAAED,GAAG,CAACE,KAAK;IAAEC,KAAK,EAAEH,GAAG,CAACE;EAAK,GACxDT,KAAK,CAACW,SAAS,CAACJ,GAAG,CAAC,CAExB,CAAC,CACS;AAEjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useTableBody_unstable","useDataGridContext_unstable","useTableContext","useDataGridBody_unstable","props","ref","sortable","getRows","ctx","sort","rows","baseState","children","as","renderRow"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AAEA,SAASA,qBAAqB,QAAQ,2BAA2B;AACjE,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,wBAAwB,GAAGA,CAACC,KAAwB,EAAEC,GAA2B,KAAuB;EACnH,MAAM;IAAEC;EAAQ,CAAE,GAAGJ,eAAe,EAAE;EACtC,MAAMK,OAAO,GAAGN,2BAA2B,CAACO,GAAG,IAAIA,GAAG,CAACD,OAAO,CAAC;EAC/D,MAAME,IAAI,GAAGR,2BAA2B,CAACO,GAAG,IAAIA,GAAG,CAACC,IAAI,CAACA,IAAI,CAAC;EAC9D,MAAMC,IAAI,GAAGJ,QAAQ,GAAGG,IAAI,CAACF,OAAO,EAAE,CAAC,GAAGA,OAAO,EAAE;EAEnD,MAAMI,SAAS,GAAGX,qBAAqB,CAAC;IAAE,GAAGI,KAAK;IAAEQ,QAAQ,EAAE,IAAI;IAAEC,EAAE,EAAE;EAAK,CAAE,EAAER,GAAG,CAAC;EACrF,OAAO;IACL,GAAGM,SAAS;IACZD,IAAI;IACJI,SAAS,EAAEV,KAAK,CAACQ;GAClB;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableBodyStyles_unstable","dataGridBodyClassNames","root","useDataGridBodyStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGridBody/useDataGridBodyStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridBodySlots, DataGridBodyState } from './DataGridBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableBodyStyles_unstable } from '../TableBody/useTableBodyStyles';\n\nexport const dataGridBodyClassNames: SlotClassNames<DataGridBodySlots> = {\n root: 'fui-DataGridBody',\n};\n\n/**\n * Apply styling to the DataGridBody slots based on the state\n */\nexport const useDataGridBodyStyles_unstable = (state: DataGridBodyState): DataGridBodyState => {\n useTableBodyStyles_unstable(state);\n state.root.className = mergeClasses(dataGridBodyClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,2BAA2B,QAAQ,iCAAiC;AAE7E,OAAO,MAAMC,sBAAsB,GAAsC;EACvEC,IAAI,EAAE;CACP;AAED;;;AAGA,OAAO,MAAMC,8BAA8B,GAAIC,KAAwB,IAAuB;EAC5FJ,2BAA2B,CAACI,KAAK,CAAC;EAClCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAEtF,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -2,12 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { useDataGridCell_unstable } from './useDataGridCell';
|
|
3
3
|
import { renderDataGridCell_unstable } from './renderDataGridCell';
|
|
4
4
|
import { useDataGridCellStyles_unstable } from './useDataGridCellStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
5
6
|
/**
|
|
6
7
|
* DataGridCell component
|
|
7
8
|
*/
|
|
8
9
|
export const DataGridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
10
|
const state = useDataGridCell_unstable(props, ref);
|
|
10
11
|
useDataGridCellStyles_unstable(state);
|
|
12
|
+
const {
|
|
13
|
+
useDataGridCellStyles_unstable: useCustomStyles
|
|
14
|
+
} = useCustomStyleHooks_unstable();
|
|
15
|
+
useCustomStyles(state);
|
|
11
16
|
return renderDataGridCell_unstable(state);
|
|
12
17
|
});
|
|
13
18
|
DataGridCell.displayName = 'DataGridCell';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useDataGridCell_unstable","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHooks_unstable","DataGridCell","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useDataGridCellStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,8BAA8B,QAAQ,yBAAyB;AAGxE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,YAAY,gBAA2CL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClG,MAAMC,KAAK,GAAGR,wBAAwB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAElDL,8BAA8B,CAACM,KAAK,CAAC;EAErC,MAAM;IAAEN,8BAA8B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EAC1FM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,2BAA2B,CAACO,KAAK,CAAC;AAC3C,CAAC,CAAC;AAEFJ,YAAY,CAACM,WAAW,GAAG,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["renderTableCell_unstable","renderDataGridCell_unstable","state"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AACA,SAASA,wBAAwB,QAAQ,8BAA8B;AAEvE;;;AAGA,OAAO,MAAMC,2BAA2B,GAAIC,KAAwB,IAAI;EACtE,OAAOF,wBAAwB,CAACE,KAAK,CAAC;AACxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useTableCell_unstable","useDataGridContext_unstable","useColumnIdContext","useDataGridCell_unstable","props","ref","columnId","tabbable","ctx","focusMode","resizableColumns","columnSizing","columnSizing_unstable","as","role","tabIndex","undefined","getTableCellProps"],"sources":["../src/packages/react-components/react-table/src/components/DataGridCell/useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\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 columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'cell');\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? columnSizing.getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"mappings":"AAEA,SAASA,qBAAqB,QAAQ,2BAA2B;AACjE,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,kBAAkB,QAAQ,gCAAgC;AAEnE;;;;;;;;;AASA,OAAO,MAAMC,wBAAwB,GAAGA,CAACC,KAAwB,EAAEC,GAA2B,KAAuB;EACnH,MAAMC,QAAQ,GAAGJ,kBAAkB,EAAE;EACrC,MAAMK,QAAQ,GAAGN,2BAA2B,CAACO,GAAG,IAAIA,GAAG,CAACC,SAAS,KAAK,MAAM,CAAC;EAC7E,MAAMC,gBAAgB,GAAGT,2BAA2B,CAACO,GAAG,IAAIA,GAAG,CAACE,gBAAgB,CAAC;EACjF,MAAMC,YAAY,GAAGV,2BAA2B,CAACO,GAAG,IAAIA,GAAG,CAACI,qBAAqB,CAAC;EAClF,OAAOZ,qBAAqB,CAC1B;IACEa,EAAE,EAAE,KAAK;IACTC,IAAI,EAAE,UAAU;IAChBC,QAAQ,EAAER,QAAQ,GAAG,CAAC,GAAGS,SAAS;IAClC,IAAIN,gBAAgB,GAAGC,YAAY,CAACM,iBAAiB,CAACX,QAAQ,CAAC,GAAG,EAAE,CAAC;IACrE,GAAGF;GACJ,EACDC,GAAG,CACJ;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableCellStyles_unstable","dataGridCellClassNames","root","useDataGridCellStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGridCell/useDataGridCellStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridCellSlots, DataGridCellState } from './DataGridCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableCellStyles_unstable } from '../TableCell/useTableCellStyles';\n\nexport const dataGridCellClassNames: SlotClassNames<DataGridCellSlots> = {\n root: 'fui-DataGridCell',\n};\n\n/**\n * Apply styling to the DataGridCell slots based on the state\n */\nexport const useDataGridCellStyles_unstable = (state: DataGridCellState): DataGridCellState => {\n useTableCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridCellClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,2BAA2B,QAAQ,iCAAiC;AAE7E,OAAO,MAAMC,sBAAsB,GAAsC;EACvEC,IAAI,EAAE;CACP;AAED;;;AAGA,OAAO,MAAMC,8BAA8B,GAAIC,KAAwB,IAAuB;EAC5FJ,2BAA2B,CAACI,KAAK,CAAC;EAClCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAEtF,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -2,12 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { useDataGridHeader_unstable } from './useDataGridHeader';
|
|
3
3
|
import { renderDataGridHeader_unstable } from './renderDataGridHeader';
|
|
4
4
|
import { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
5
6
|
/**
|
|
6
7
|
* DataGridHeader component
|
|
7
8
|
*/
|
|
8
9
|
export const DataGridHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
10
|
const state = useDataGridHeader_unstable(props, ref);
|
|
10
11
|
useDataGridHeaderStyles_unstable(state);
|
|
12
|
+
const {
|
|
13
|
+
useDataGridHeaderStyles_unstable: useCustomStyles
|
|
14
|
+
} = useCustomStyleHooks_unstable();
|
|
15
|
+
useCustomStyles(state);
|
|
11
16
|
return renderDataGridHeader_unstable(state);
|
|
12
17
|
});
|
|
13
18
|
DataGridHeader.displayName = 'DataGridHeader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useDataGridHeader_unstable","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHooks_unstable","DataGridHeader","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useDataGridHeaderStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,gCAAgC,QAAQ,2BAA2B;AAG5E,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,cAAc,gBAA6CL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtG,MAAMC,KAAK,GAAGR,0BAA0B,CAACM,KAAK,EAAEC,GAAG,CAAC;EAEpDL,gCAAgC,CAACM,KAAK,CAAC;EAEvC,MAAM;IAAEN,gCAAgC,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EAC5FM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,6BAA6B,CAACO,KAAK,CAAC;AAC7C,CAAC,CAAC;AAEFJ,cAAc,CAACM,WAAW,GAAG,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["renderTableHeader_unstable","renderDataGridHeader_unstable","state"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AAAA,SAASA,0BAA0B,QAAQ,kCAAkC;AAG7E;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAA0B,IAAI;EAC1E,OAAOF,0BAA0B,CAACE,KAAK,CAAC;AAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useTableHeader_unstable","useDataGridHeader_unstable","props","ref","as"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AAEA,SAASA,uBAAuB,QAAQ,+BAA+B;AAEvE;;;;;;;;;AASA,OAAO,MAAMC,0BAA0B,GAAGA,CACxCC,KAA0B,EAC1BC,GAA2B,KACJ;EACvB,OAAOH,uBAAuB,CAAC;IAAE,GAAGE,KAAK;IAAEE,EAAE,EAAE;EAAK,CAAE,EAAED,GAAG,CAAC;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableHeaderStyles_unstable","dataGridHeaderClassNames","root","useDataGridHeaderStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGridHeader/useDataGridHeaderStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridHeaderSlots, DataGridHeaderState } from './DataGridHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableHeaderStyles_unstable } from '../TableHeader/useTableHeaderStyles';\n\nexport const dataGridHeaderClassNames: SlotClassNames<DataGridHeaderSlots> = {\n root: 'fui-DataGridHeader',\n};\n\n/**\n * Apply styling to the DataGridHeader slots based on the state\n */\nexport const useDataGridHeaderStyles_unstable = (state: DataGridHeaderState): DataGridHeaderState => {\n useTableHeaderStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,6BAA6B,QAAQ,qCAAqC;AAEnF,OAAO,MAAMC,wBAAwB,GAAwC;EAC3EC,IAAI,EAAE;CACP;AAED;;;AAGA,OAAO,MAAMC,gCAAgC,GAAIC,KAA0B,IAAyB;EAClGJ,6BAA6B,CAACI,KAAK,CAAC;EACpCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,wBAAwB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAExF,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -2,12 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';
|
|
3
3
|
import { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';
|
|
4
4
|
import { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
5
6
|
/**
|
|
6
7
|
* DataGridHeaderCell component
|
|
7
8
|
*/
|
|
8
9
|
export const DataGridHeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
10
|
const state = useDataGridHeaderCell_unstable(props, ref);
|
|
10
11
|
useDataGridHeaderCellStyles_unstable(state);
|
|
12
|
+
const {
|
|
13
|
+
useDataGridHeaderCellStyles_unstable: useCustomStyles
|
|
14
|
+
} = useCustomStyleHooks_unstable();
|
|
15
|
+
useCustomStyles(state);
|
|
11
16
|
return renderDataGridHeaderCell_unstable(state);
|
|
12
17
|
});
|
|
13
18
|
DataGridHeaderCell.displayName = 'DataGridHeaderCell';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useDataGridHeaderCell_unstable","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHooks_unstable","DataGridHeaderCell","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useDataGridHeaderCellStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,oCAAoC,QAAQ,+BAA+B;AAGpF,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,kBAAkB,gBAAiDL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9G,MAAMC,KAAK,GAAGR,8BAA8B,CAACM,KAAK,EAAEC,GAAG,CAAC;EAExDL,oCAAoC,CAACM,KAAK,CAAC;EAE3C,MAAM;IAAEN,oCAAoC,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EAChGM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,iCAAiC,CAACO,KAAK,CAAC;AACjD,CAAC,CAAC;AAEFJ,kBAAkB,CAACM,WAAW,GAAG,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["renderTableHeaderCell_unstable","renderDataGridHeaderCell_unstable","state"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AACA,SAASA,8BAA8B,QAAQ,0CAA0C;AAEzF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA8B,IAAI;EAClF,OAAOF,8BAA8B,CAACE,KAAK,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useEventCallback","useTableHeaderCell_unstable","useDataGridContext_unstable","useColumnIdContext","useTableContext","useDataGridHeaderCell_unstable","props","ref","columnId","sortable","toggleColumnSort","ctx","sort","sortDirection","getSortDirection","undefined","resizableColumns","columnSizing","columnSizing_unstable","onClick","e","_a","call","as","tabIndex","getTableHeaderCellProps"],"sources":["../src/packages/react-components/react-table/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';\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 } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n\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 sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,QAAQ,uCAAuC;AACnF,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,8BAA8B,GAAGA,CAC5CC,KAA8B,EAC9BC,GAA2B,KACA;EAC3B,MAAMC,QAAQ,GAAGL,kBAAkB,EAAE;EACrC,MAAM;IAAEM;EAAQ,CAAE,GAAGL,eAAe,EAAE;EACtC,MAAMM,gBAAgB,GAAGR,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACC,IAAI,CAACF,gBAAgB,CAAC;EACtF,MAAMG,aAAa,GAAGX,2BAA2B,CAACS,GAAG,IACnDF,QAAQ,GAAGE,GAAG,CAACC,IAAI,CAACE,gBAAgB,CAACN,QAAQ,CAAC,GAAGO,SAAS,CAC3D;EAED,MAAMC,gBAAgB,GAAGd,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACK,gBAAgB,CAAC;EACjF,MAAMC,YAAY,GAAGf,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACO,qBAAqB,CAAC;EAElF,MAAMC,OAAO,GAAGnB,gBAAgB,CAAEoB,CAA+C,IAAI;;IACnF,IAAIX,QAAQ,EAAE;MACZC,gBAAgB,CAACU,CAAC,EAAEZ,QAAQ,CAAC;;IAE/B,CAAAa,EAAA,GAAAf,KAAK,CAACa,OAAO,cAAAE,EAAA,uBAAAA,EAAA,CAAAC,IAAA,CAAbhB,KAAK,EAAWc,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOnB,2BAA2B,CAChC;IACEY,aAAa;IACbU,EAAE,EAAE,KAAK;IACTC,QAAQ,EAAEf,QAAQ,GAAGM,SAAS,GAAG,CAAC;IAClC,IAAIC,gBAAgB,GAAGC,YAAY,CAACQ,uBAAuB,CAACjB,QAAQ,CAAC,GAAG,EAAE,CAAC;IAC3E,GAAGF,KAAK;IACRa;GACD,EACDZ,GAAG,CACJ;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableHeaderCellStyles_unstable","dataGridHeaderCellClassNames","root","button","sortIcon","aside","useDataGridHeaderCellStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGridHeaderCell/useDataGridHeaderCellStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridHeaderCellSlots, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles';\n\nexport const dataGridHeaderCellClassNames: SlotClassNames<DataGridHeaderCellSlots> = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n aside: 'fui-DataGridHeaderCell__aside',\n};\n\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */\nexport const useDataGridHeaderCellStyles_unstable = (state: DataGridHeaderCellState): DataGridHeaderCellState => {\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n\n if (state.aside) {\n state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,iCAAiC,QAAQ,6CAA6C;AAE/F,OAAO,MAAMC,4BAA4B,GAA4C;EACnFC,IAAI,EAAE,wBAAwB;EAC9BC,MAAM,EAAE,gCAAgC;EACxCC,QAAQ,EAAE,kCAAkC;EAC5CC,KAAK,EAAE;CACR;AAED;;;AAGA,OAAO,MAAMC,oCAAoC,GAAIC,KAA8B,IAA6B;EAC9GP,iCAAiC,CAACO,KAAK,CAAC;EACxCA,KAAK,CAACL,IAAI,CAACM,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACC,IAAI,EAAEK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC;EAE5F,IAAID,KAAK,CAACJ,MAAM,EAAE;IAChBI,KAAK,CAACJ,MAAM,CAACK,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACE,MAAM,EAAEI,KAAK,CAACJ,MAAM,CAACK,SAAS,CAAC;;EAGpG,IAAID,KAAK,CAACH,QAAQ,EAAE;IAClBG,KAAK,CAACH,QAAQ,CAACI,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACG,QAAQ,EAAEG,KAAK,CAACH,QAAQ,CAACI,SAAS,CAAC;;EAG1G,IAAID,KAAK,CAACF,KAAK,EAAE;IACfE,KAAK,CAACF,KAAK,CAACG,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACI,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACG,SAAS,CAAC;;EAGjG,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -2,12 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { useDataGridRow_unstable } from './useDataGridRow';
|
|
3
3
|
import { renderDataGridRow_unstable } from './renderDataGridRow';
|
|
4
4
|
import { useDataGridRowStyles_unstable } from './useDataGridRowStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
5
6
|
/**
|
|
6
7
|
* DataGridRow component
|
|
7
8
|
*/
|
|
8
9
|
export const DataGridRow = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
10
|
const state = useDataGridRow_unstable(props, ref);
|
|
10
11
|
useDataGridRowStyles_unstable(state);
|
|
12
|
+
const {
|
|
13
|
+
useDataGridRowStyles_unstable: useCustomStyles
|
|
14
|
+
} = useCustomStyleHooks_unstable();
|
|
15
|
+
useCustomStyles(state);
|
|
11
16
|
return renderDataGridRow_unstable(state);
|
|
12
17
|
});
|
|
13
18
|
DataGridRow.displayName = 'DataGridRow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useDataGridRow_unstable","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHooks_unstable","DataGridRow","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useDataGridRowStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AAGtE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,WAAW,gBACqCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC3F,MAAMC,KAAK,GAAGR,uBAAuB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAEjDL,6BAA6B,CAACM,KAAK,CAAC;EAEpC,MAAM;IAAEN,6BAA6B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACzFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,0BAA0B,CAACO,KAAK,CAAC;AAC1C,CAAC,CAAqG;AAEtGJ,WAAW,CAACM,WAAW,GAAG,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","getSlots","ColumnIdContextProvider","renderDataGridRow_unstable","state","slots","slotProps","createElement","root","selectionCell","columnDefs","map","columnDef","value","columnId","key","renderCell"],"sources":["../src/packages/react-components/react-table/src/components/DataGridRow/renderDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<DataGridRowSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.selectionCell && <slots.selectionCell {...slotProps.selectionCell} />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef)}\n </ColumnIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,uBAAuB,QAAQ,gCAAgC;AAExE;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGL,QAAQ,CAAmBG,KAAK,CAAC;EAE9D,oBACEJ,KAAA,CAAAO,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAC3BH,KAAK,CAACI,aAAa,iBAAIT,KAAA,CAAAO,aAAA,CAACF,KAAK,CAACI,aAAa;IAAA,GAAKH,SAAS,CAACG;EAAa,EAAI,EAC3EL,KAAK,CAACM,UAAU,CAACC,GAAG,CAACC,SAAS,iBAC7BZ,KAAA,CAAAO,aAAA,CAACL,uBAAuB;IAACW,KAAK,EAAED,SAAS,CAACE,QAAQ;IAAEC,GAAG,EAAEH,SAAS,CAACE;EAAQ,GACxEV,KAAK,CAACY,UAAU,CAACJ,SAAS,CAAC,CAE/B,CAAC,CACS;AAEjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["isInteractiveHTMLElement","useEventCallback","resolveShorthand","Space","useTableRow_unstable","useDataGridContext_unstable","DataGridSelectionCell","useTableRowIdContext","useIsInTableHeader","useDataGridRow_unstable","props","ref","rowId","isHeader","columnDefs","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","tabbable","focusMode","appearance","selectionAppearance","toggleRow","onClick","e","_a","call","onKeyDown","key","target","preventDefault","baseState","undefined","children","as","tabIndex","components","selectionCell","required","renderCell"],"sources":["../src/packages/react-components/react-table/src/components/DataGridRow/useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, resolveShorthand } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { 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 tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'row_unstable');\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 ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: resolveShorthand(props.selectionCell, { required: selectable }),\n renderCell: props.children,\n columnDefs,\n };\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableRowStyles_unstable","dataGridRowClassNames","root","selectionCell","useDataGridRowStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGridRow/useDataGridRowStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridRowSlots, DataGridRowState } from './DataGridRow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableRowStyles_unstable } from '../TableRow/useTableRowStyles';\n\nexport const dataGridRowClassNames: SlotClassNames<DataGridRowSlots> = {\n root: 'fui-DataGridRow',\n selectionCell: 'fui-DataGridRow__selectionCell',\n};\n\n/**\n * Apply styling to the DataGridRow slots based on the state\n */\nexport const useDataGridRowStyles_unstable = (state: DataGridRowState): DataGridRowState => {\n useTableRowStyles_unstable(state);\n state.root.className = mergeClasses(dataGridRowClassNames.root, state.root.className);\n if (state.selectionCell) {\n state.selectionCell.className = mergeClasses(dataGridRowClassNames.selectionCell, state.selectionCell.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,0BAA0B,QAAQ,+BAA+B;AAE1E,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,aAAa,EAAE;CAChB;AAED;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzFL,0BAA0B,CAACK,KAAK,CAAC;EACjCA,KAAK,CAACH,IAAI,CAACI,SAAS,GAAGP,YAAY,CAACE,qBAAqB,CAACC,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACI,SAAS,CAAC;EACrF,IAAID,KAAK,CAACF,aAAa,EAAE;IACvBE,KAAK,CAACF,aAAa,CAACG,SAAS,GAAGP,YAAY,CAACE,qBAAqB,CAACE,aAAa,EAAEE,KAAK,CAACF,aAAa,CAACG,SAAS,CAAC;;EAGlH,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -2,12 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';
|
|
3
3
|
import { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';
|
|
4
4
|
import { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles';
|
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
5
6
|
/**
|
|
6
7
|
* DataGridSelectionCell component
|
|
7
8
|
*/
|
|
8
9
|
export const DataGridSelectionCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
10
|
const state = useDataGridSelectionCell_unstable(props, ref);
|
|
10
11
|
useDataGridSelectionCellStyles_unstable(state);
|
|
12
|
+
const {
|
|
13
|
+
useDataGridSelectionCellStyles_unstable: useCustomStyles
|
|
14
|
+
} = useCustomStyleHooks_unstable();
|
|
15
|
+
useCustomStyles(state);
|
|
11
16
|
return renderDataGridSelectionCell_unstable(state);
|
|
12
17
|
});
|
|
13
18
|
DataGridSelectionCell.displayName = 'DataGridSelectionCell';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useDataGridSelectionCell_unstable","renderDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHooks_unstable","DataGridSelectionCell","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useDataGridSelectionCellStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,oCAAoC,QAAQ,+BAA+B;AACpF,SAASC,uCAAuC,QAAQ,kCAAkC;AAG1F,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,qBAAqB,gBAAoDL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpH,MAAMC,KAAK,GAAGR,iCAAiC,CAACM,KAAK,EAAEC,GAAG,CAAC;EAE3DL,uCAAuC,CAACM,KAAK,CAAC;EAE9C,MAAM;IAAEN,uCAAuC,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACnGM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,oCAAoC,CAACO,KAAK,CAAC;AACpD,CAAC,CAAC;AAEFJ,qBAAqB,CAACM,WAAW,GAAG,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["renderTableSelectionCell_unstable","renderDataGridSelectionCell_unstable","state"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AACA,SAASA,iCAAiC,QAAQ,gDAAgD;AAElG;;;AAGA,OAAO,MAAMC,oCAAoC,GAAIC,KAAiC,IAAI;EACxF,OAAOF,iCAAiC,CAACE,KAAK,CAAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useEventCallback","useDataGridContext_unstable","useTableRowIdContext","useIsInTableHeader","useTableSelectionCell_unstable","useDataGridSelectionCell_unstable","props","ref","isHeader","rowId","subtle","ctx","subtleSelection","checked","selection","selectionMode","allRowsSelected","someRowsSelected","isRowSelected","toggleAllRows","type","onClick","e","_a","call","as","role","hidden","undefined"],"sources":["../src/packages/react-components/react-table/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 hidden: isHeader && type === 'radio',\n 'aria-checked': isHeader ? checked : undefined,\n 'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,\n subtle,\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,oBAAoB,QAAQ,6BAA6B;AAClE,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,8BAA8B,QAAQ,6CAA6C;AAG5F;;;;;;;;;AASA,OAAO,MAAMC,iCAAiC,GAAGA,CAC/CC,KAAiC,EACjCC,GAA2B,KACG;EAC9B,MAAMC,QAAQ,GAAGL,kBAAkB,EAAE;EACrC,MAAMM,KAAK,GAAGP,oBAAoB,EAAE;EACpC,MAAMQ,MAAM,GAAGT,2BAA2B,CAACU,GAAG,IAAIA,GAAG,CAACC,eAAe,CAAC;EACtE,MAAMC,OAAO,GAAGZ,2BAA2B,CAACU,GAAG,IAAG;IAChD,IAAIH,QAAQ,IAAIG,GAAG,CAACG,SAAS,CAACC,aAAa,KAAK,aAAa,EAAE;MAC7D,OAAOJ,GAAG,CAACG,SAAS,CAACE,eAAe,GAAG,IAAI,GAAGL,GAAG,CAACG,SAAS,CAACG,gBAAgB,GAAG,OAAO,GAAG,KAAK;;IAGhG,OAAON,GAAG,CAACG,SAAS,CAACI,aAAa,CAACT,KAAK,CAAC;EAC3C,CAAC,CAAC;EAEF,MAAMU,aAAa,GAAGlB,2BAA2B,CAACU,GAAG,IAAIA,GAAG,CAACG,SAAS,CAACK,aAAa,CAAC;EACrF,MAAMC,IAAI,GAAGnB,2BAA2B,CAACU,GAAG,IAC1CA,GAAG,CAACG,SAAS,CAACC,aAAa,KAAK,aAAa,GAAG,UAAU,GAAG,OAAO,CACrE;EAED,MAAMM,OAAO,GAAGrB,gBAAgB,CAAEsB,CAAyC,IAAI;;IAC7E,IAAId,QAAQ,EAAE;MACZW,aAAa,CAACG,CAAC,CAAC;;IAGlB,CAAAC,EAAA,GAAAjB,KAAK,CAACe,OAAO,cAAAE,EAAA,uBAAAA,EAAA,CAAAC,IAAA,CAAblB,KAAK,EAAWgB,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOlB,8BAA8B,CACnC;IACEqB,EAAE,EAAE,KAAK;IACTC,IAAI,EAAE,UAAU;IAChBb,OAAO;IACPO,IAAI;IACJO,MAAM,EAAEnB,QAAQ,IAAIY,IAAI,KAAK,OAAO;IACpC,cAAc,EAAEZ,QAAQ,GAAGK,OAAO,GAAGe,SAAS;IAC9C,eAAe,EAAEpB,QAAQ,IAAIK,OAAO,KAAK,OAAO,GAAGe,SAAS,GAAGf,OAAO;IACtEH,MAAM;IACN,GAAGJ,KAAK;IACRe;GACD,EACDd,GAAG,CACJ;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["mergeClasses","useTableSelectionCellStyles_unstable","dataGridSelectionCellClassNames","root","checkboxIndicator","radioIndicator","useDataGridSelectionCellStyles_unstable","state","className"],"sources":["../src/packages/react-components/react-table/src/components/DataGridSelectionCell/useDataGridSelectionCellStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridSelectionCellSlots, DataGridSelectionCellState } from './DataGridSelectionCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableSelectionCellStyles_unstable } from '../TableSelectionCell/useTableSelectionCellStyles';\n\nexport const dataGridSelectionCellClassNames: SlotClassNames<DataGridSelectionCellSlots> = {\n root: 'fui-DataGridSelectionCell',\n checkboxIndicator: 'fui-DataGridSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-DataGridSelectionCell__radioIndicator',\n};\n\n/**\n * Apply styling to the DataGridSelectionCell slots based on the state\n */\nexport const useDataGridSelectionCellStyles_unstable = (\n state: DataGridSelectionCellState,\n): DataGridSelectionCellState => {\n useTableSelectionCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridSelectionCellClassNames.root, state.root.className);\n\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(\n dataGridSelectionCellClassNames.checkboxIndicator,\n state.checkboxIndicator.className,\n );\n }\n\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(\n dataGridSelectionCellClassNames.radioIndicator,\n state.radioIndicator.className,\n );\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,oCAAoC,QAAQ,mDAAmD;AAExG,OAAO,MAAMC,+BAA+B,GAA+C;EACzFC,IAAI,EAAE,2BAA2B;EACjCC,iBAAiB,EAAE,8CAA8C;EACjEC,cAAc,EAAE;CACjB;AAED;;;AAGA,OAAO,MAAMC,uCAAuC,GAClDC,KAAiC,IACH;EAC9BN,oCAAoC,CAACM,KAAK,CAAC;EAC3CA,KAAK,CAACJ,IAAI,CAACK,SAAS,GAAGR,YAAY,CAACE,+BAA+B,CAACC,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACK,SAAS,CAAC;EAE/F,IAAID,KAAK,CAACH,iBAAiB,EAAE;IAC3BG,KAAK,CAACH,iBAAiB,CAACI,SAAS,GAAGR,YAAY,CAC9CE,+BAA+B,CAACE,iBAAiB,EACjDG,KAAK,CAACH,iBAAiB,CAACI,SAAS,CAClC;;EAGH,IAAID,KAAK,CAACF,cAAc,EAAE;IACxBE,KAAK,CAACF,cAAc,CAACG,SAAS,GAAGR,YAAY,CAC3CE,+BAA+B,CAACG,cAAc,EAC9CE,KAAK,CAACF,cAAc,CAACG,SAAS,CAC/B;;EAGH,OAAOD,KAAK;AACd,CAAC"}
|
|
@@ -3,12 +3,17 @@ import { useTable_unstable } from './useTable';
|
|
|
3
3
|
import { renderTable_unstable } from './renderTable';
|
|
4
4
|
import { useTableStyles_unstable } from './useTableStyles';
|
|
5
5
|
import { useTableContextValues_unstable } from './useTableContextValues';
|
|
6
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
6
7
|
/**
|
|
7
8
|
* Table component
|
|
8
9
|
*/
|
|
9
10
|
export const Table = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
11
|
const state = useTable_unstable(props, ref);
|
|
11
12
|
useTableStyles_unstable(state);
|
|
13
|
+
const {
|
|
14
|
+
useTableStyles_unstable: useCustomStyles
|
|
15
|
+
} = useCustomStyleHooks_unstable();
|
|
16
|
+
useCustomStyles(state);
|
|
12
17
|
return renderTable_unstable(state, useTableContextValues_unstable(state));
|
|
13
18
|
});
|
|
14
19
|
Table.displayName = 'Table';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useTable_unstable","renderTable_unstable","useTableStyles_unstable","useTableContextValues_unstable","useCustomStyleHooks_unstable","Table","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-table/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';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\nimport { useCustomStyleHooks_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 const { useTableStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,uBAAuB,QAAQ,kBAAkB;AAG1D,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCN,KAAK,CAACO,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGT,iBAAiB,CAACO,KAAK,EAAEC,GAAG,CAAC;EAE3CN,uBAAuB,CAACO,KAAK,CAAC;EAE9B,MAAM;IAAEP,uBAAuB,EAAEQ;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACnFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,oBAAoB,CAACQ,KAAK,EAAEN,8BAA8B,CAACM,KAAK,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEFJ,KAAK,CAACM,WAAW,GAAG,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","getSlots","TableContextProvider","renderTable_unstable","state","contextValues","slots","slotProps","createElement","value","table","root"],"sources":["../src/packages/react-components/react-table/src/components/Table/renderTable.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <slots.root {...slotProps.root} />\n </TableContextProvider>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,oBAAoB,QAAQ,6BAA6B;AAElE;;;AAGA,OAAO,MAAMC,oBAAoB,GAAGA,CAACC,KAAiB,EAAEC,aAAiC,KAAI;EAC3F,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,QAAQ,CAAaG,KAAK,CAAC;EAExD,oBACEJ,KAAA,CAAAQ,aAAA,CAACN,oBAAoB;IAACO,KAAK,EAAEJ,aAAa,CAACK;EAAK,gBAC9CV,KAAA,CAAAQ,aAAA,CAACF,KAAK,CAACK,IAAI;IAAA,GAAKJ,SAAS,CAACI;EAAI,EAAI,CACb;AAE3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["getNativeElementProps","useTable_unstable","props","ref","rootComponent","_a","as","noNativeElements","components","root","role","undefined","size","_b","_c","sortable","_d"],"sources":["../src/packages/react-components/react-table/src/components/Table/useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } 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: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAGjE;;;;;;;;;AASA,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,KAAiB,EAAEC,GAA2B,KAAgB;;EAC9F,MAAMC,aAAa,GAAG,EAAAC,EAAA,GAAAH,KAAK,CAACI,EAAE,cAAAD,EAAA,cAAAA,EAAA,GAAIH,KAAK,CAACK,gBAAgB,IAAG,KAAK,GAAG,OAAO;EAE1E,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAEL;KACP;IACDK,IAAI,EAAET,qBAAqB,CAACI,aAAa,EAAE;MACzCD,GAAG;MACHO,IAAI,EAAEN,aAAa,KAAK,KAAK,GAAG,OAAO,GAAGO,SAAS;MACnD,GAAGT;KACJ,CAAC;IACFU,IAAI,EAAE,CAAAC,EAAA,GAAAX,KAAK,CAACU,IAAI,cAAAC,EAAA,cAAAA,EAAA,GAAI,QAAQ;IAC5BN,gBAAgB,EAAE,CAAAO,EAAA,GAAAZ,KAAK,CAACK,gBAAgB,cAAAO,EAAA,cAAAA,EAAA,GAAI,KAAK;IACjDC,QAAQ,EAAE,CAAAC,EAAA,GAAAd,KAAK,CAACa,QAAQ,cAAAC,EAAA,cAAAA,EAAA,GAAI;GAC7B;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","useTableContextValues_unstable","state","size","noNativeElements","sortable","tableContext","useMemo","table"],"sources":["../src/packages/react-components/react-table/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"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAM,SAAUC,8BAA8BA,CAACC,KAAiB;EAC9D,MAAM;IAAEC,IAAI;IAAEC,gBAAgB;IAAEC;EAAQ,CAAE,GAAGH,KAAK;EAElD,MAAMI,YAAY,GAAGN,KAAK,CAACO,OAAO,CAChC,OAAO;IACLH,gBAAgB;IAChBD,IAAI;IACJE;GACD,CAAC,EACF,CAACD,gBAAgB,EAAED,IAAI,EAAEE,QAAQ,CAAC,CACnC;EAED,OAAO;IACLG,KAAK,EAAEF;GACR;AACH"}
|