@fluentui/react-table 9.2.12 → 9.4.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 +193 -1
- package/CHANGELOG.md +51 -2
- package/dist/index.d.ts +15 -1
- package/lib/DataGrid.js +0 -1
- package/lib/DataGrid.js.map +1 -1
- package/lib/DataGridBody.js +0 -1
- package/lib/DataGridBody.js.map +1 -1
- package/lib/DataGridCell.js +0 -1
- package/lib/DataGridCell.js.map +1 -1
- package/lib/DataGridHeader.js +0 -1
- package/lib/DataGridHeader.js.map +1 -1
- package/lib/DataGridHeaderCell.js +0 -1
- package/lib/DataGridHeaderCell.js.map +1 -1
- package/lib/DataGridRow.js +0 -1
- package/lib/DataGridRow.js.map +1 -1
- package/lib/DataGridSelectionCell.js +0 -1
- package/lib/DataGridSelectionCell.js.map +1 -1
- package/lib/Table.js +0 -1
- package/lib/Table.js.map +1 -1
- package/lib/TableBody.js +0 -1
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +0 -1
- package/lib/TableCell.js.map +1 -1
- package/lib/TableCellActions.js +0 -1
- package/lib/TableCellActions.js.map +1 -1
- package/lib/TableCellLayout.js +0 -1
- package/lib/TableCellLayout.js.map +1 -1
- package/lib/TableCellPrimaryLayout.js +0 -1
- package/lib/TableCellPrimaryLayout.js.map +1 -1
- package/lib/TableHeader.js +0 -1
- package/lib/TableHeader.js.map +1 -1
- package/lib/TableHeaderCell.js +0 -1
- package/lib/TableHeaderCell.js.map +1 -1
- package/lib/TableResizeHandle.js +0 -1
- package/lib/TableResizeHandle.js.map +1 -1
- package/lib/TableRow.js +0 -1
- package/lib/TableRow.js.map +1 -1
- package/lib/TableSelectionCell.js +0 -1
- package/lib/TableSelectionCell.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.js +5 -7
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.types.js +0 -1
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib/components/DataGrid/index.js +0 -1
- package/lib/components/DataGrid/index.js.map +1 -1
- package/lib/components/DataGrid/renderDataGrid.js +4 -6
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js +72 -89
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js +12 -13
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.js +5 -7
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.types.js +0 -1
- package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib/components/DataGridBody/index.js +0 -1
- package/lib/components/DataGridBody/index.js.map +1 -1
- package/lib/components/DataGridBody/renderDataGridBody.js +7 -12
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBody.js +15 -19
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.js +5 -7
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.types.js +1 -2
- package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib/components/DataGridCell/index.js +0 -1
- package/lib/components/DataGridCell/index.js.map +1 -1
- package/lib/components/DataGridCell/renderDataGridCell.js +2 -4
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCell.js +18 -14
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.js +5 -7
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.types.js +1 -2
- package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib/components/DataGridHeader/index.js +0 -1
- package/lib/components/DataGridHeader/index.js.map +1 -1
- package/lib/components/DataGridHeader/renderDataGridHeader.js +2 -4
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeader.js +5 -7
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +5 -7
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +1 -2
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib/components/DataGridHeaderCell/index.js +0 -1
- package/lib/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +2 -4
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -26
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.js +5 -7
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.types.js +0 -1
- package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib/components/DataGridRow/index.js +0 -1
- package/lib/components/DataGridRow/index.js.map +1 -1
- package/lib/components/DataGridRow/renderDataGridRow.js +7 -12
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRow.js +54 -56
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +5 -7
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +1 -2
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib/components/DataGridSelectionCell/index.js +0 -1
- package/lib/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +2 -4
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +31 -33
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
- package/lib/components/Table/Table.js +5 -7
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.types.js +1 -2
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/index.js +0 -1
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Table/renderTable.js +6 -11
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTable.js +17 -19
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js +13 -14
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.styles.js.map +1 -1
- package/lib/components/TableBody/TableBody.js +5 -7
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/TableBody.types.js +1 -2
- package/lib/components/TableBody/TableBody.types.js.map +1 -1
- package/lib/components/TableBody/index.js +0 -1
- package/lib/components/TableBody/index.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js +4 -9
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +15 -19
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
- package/lib/components/TableCell/TableCell.js +5 -7
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js +1 -2
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/index.js +0 -1
- package/lib/components/TableCell/index.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js +4 -9
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +16 -21
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +5 -7
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.types.js +1 -2
- package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib/components/TableCellActions/index.js +0 -1
- package/lib/components/TableCellActions/index.js.map +1 -1
- package/lib/components/TableCellActions/renderTableCellActions.js +4 -9
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js +12 -14
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js +5 -7
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js +1 -2
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib/components/TableCellLayout/index.js +0 -1
- package/lib/components/TableCellLayout/index.js.map +1 -1
- package/lib/components/TableCellLayout/renderTableCellLayout.js +6 -11
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +30 -34
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +9 -10
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js +5 -7
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.types.js +1 -2
- package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib/components/TableHeader/index.js +0 -1
- package/lib/components/TableHeader/index.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js +6 -11
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +15 -19
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js +5 -7
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js +1 -2
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/index.js +0 -1
- package/lib/components/TableHeaderCell/index.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js +4 -9
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +45 -52
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +11 -2
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.js +5 -7
- package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js +1 -2
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
- package/lib/components/TableResizeHandle/index.js +0 -1
- package/lib/components/TableResizeHandle/index.js.map +1 -1
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js +4 -9
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandle.js +16 -18
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
- package/lib/components/TableRow/TableRow.js +5 -7
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/TableRow.types.js +1 -2
- package/lib/components/TableRow/TableRow.types.js.map +1 -1
- package/lib/components/TableRow/index.js +0 -1
- package/lib/components/TableRow/index.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js +4 -9
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +22 -27
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.styles.js +6 -8
- package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +5 -7
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js +1 -2
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib/components/TableSelectionCell/index.js +0 -1
- package/lib/components/TableSelectionCell/index.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js +4 -9
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +32 -41
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
- package/lib/contexts/columnIdContext.js +2 -3
- package/lib/contexts/columnIdContext.js.map +1 -1
- package/lib/contexts/dataGridContext.js +7 -8
- package/lib/contexts/dataGridContext.js.map +1 -1
- package/lib/contexts/rowIdContext.js +2 -3
- package/lib/contexts/rowIdContext.js.map +1 -1
- package/lib/contexts/tableContext.js +5 -6
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js +2 -3
- package/lib/contexts/tableHeaderContext.js.map +1 -1
- package/lib/hooks/createColumn.js +21 -28
- package/lib/hooks/createColumn.js.map +1 -1
- package/lib/hooks/index.js +0 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/selectionManager.js +71 -68
- package/lib/hooks/selectionManager.js.map +1 -1
- package/lib/hooks/types.js +0 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/useKeyboardResizing.js +96 -87
- package/lib/hooks/useKeyboardResizing.js.map +1 -1
- package/lib/hooks/useMeasureElement.js +42 -40
- package/lib/hooks/useMeasureElement.js.map +1 -1
- package/lib/hooks/useTableColumnResizeMouseHandler.js +64 -61
- package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib/hooks/useTableColumnResizeState.js +100 -105
- package/lib/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib/hooks/useTableColumnSizing.js +74 -74
- package/lib/hooks/useTableColumnSizing.js.map +1 -1
- package/lib/hooks/useTableFeatures.js +30 -35
- package/lib/hooks/useTableFeatures.js.map +1 -1
- package/lib/hooks/useTableSelection.js +64 -66
- package/lib/hooks/useTableSelection.js.map +1 -1
- package/lib/hooks/useTableSort.js +68 -76
- package/lib/hooks/useTableSort.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/columnResizeUtils.js +104 -108
- package/lib/utils/columnResizeUtils.js.map +1 -1
- package/lib-commonjs/DataGrid.js +0 -3
- package/lib-commonjs/DataGrid.js.map +1 -1
- package/lib-commonjs/DataGridBody.js +0 -3
- package/lib-commonjs/DataGridBody.js.map +1 -1
- package/lib-commonjs/DataGridCell.js +0 -3
- package/lib-commonjs/DataGridCell.js.map +1 -1
- package/lib-commonjs/DataGridHeader.js +0 -3
- package/lib-commonjs/DataGridHeader.js.map +1 -1
- package/lib-commonjs/DataGridHeaderCell.js +0 -3
- package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/DataGridRow.js +0 -3
- package/lib-commonjs/DataGridRow.js.map +1 -1
- package/lib-commonjs/DataGridSelectionCell.js +0 -3
- package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/Table.js +0 -3
- package/lib-commonjs/Table.js.map +1 -1
- package/lib-commonjs/TableBody.js +0 -3
- package/lib-commonjs/TableBody.js.map +1 -1
- package/lib-commonjs/TableCell.js +0 -3
- package/lib-commonjs/TableCell.js.map +1 -1
- package/lib-commonjs/TableCellActions.js +0 -3
- package/lib-commonjs/TableCellActions.js.map +1 -1
- package/lib-commonjs/TableCellLayout.js +0 -3
- package/lib-commonjs/TableCellLayout.js.map +1 -1
- package/lib-commonjs/TableCellPrimaryLayout.js +0 -3
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
- package/lib-commonjs/TableHeader.js +0 -3
- package/lib-commonjs/TableHeader.js.map +1 -1
- package/lib-commonjs/TableHeaderCell.js +0 -3
- package/lib-commonjs/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/TableResizeHandle.js +0 -3
- package/lib-commonjs/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/TableRow.js +0 -3
- package/lib-commonjs/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js +0 -3
- package/lib-commonjs/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.js +1 -3
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.types.js +0 -3
- package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib-commonjs/components/DataGrid/index.js +0 -3
- package/lib-commonjs/components/DataGrid/index.js.map +1 -1
- package/lib-commonjs/components/DataGrid/renderDataGrid.js +1 -3
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGrid.js +4 -5
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +1 -3
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -3
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +0 -3
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/index.js +0 -3
- package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +1 -3
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js +1 -3
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -3
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +0 -3
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/index.js +0 -3
- package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +1 -3
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js +7 -3
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -3
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +0 -3
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/index.js +0 -3
- package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +1 -3
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +1 -3
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -3
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +0 -3
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -3
- package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +1 -3
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +2 -3
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -3
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +0 -3
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/index.js +0 -3
- package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +1 -3
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js +1 -3
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -3
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +0 -3
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -3
- package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +1 -3
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +1 -3
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +0 -2
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Table/Table.js +1 -3
- package/lib-commonjs/components/Table/Table.js.map +1 -1
- package/lib-commonjs/components/Table/Table.types.js +0 -3
- package/lib-commonjs/components/Table/Table.types.js.map +1 -1
- package/lib-commonjs/components/Table/index.js +0 -3
- package/lib-commonjs/components/Table/index.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js +1 -3
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js +1 -3
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js +1 -3
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.styles.js +0 -2
- package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js +1 -3
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.types.js +0 -3
- package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
- package/lib-commonjs/components/TableBody/index.js +0 -3
- package/lib-commonjs/components/TableBody/index.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js +1 -3
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +1 -3
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +0 -2
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js +1 -3
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.types.js +0 -3
- package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
- package/lib-commonjs/components/TableCell/index.js +0 -3
- package/lib-commonjs/components/TableCell/index.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js +1 -3
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +1 -3
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +0 -2
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -3
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +0 -3
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/index.js +0 -3
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +1 -3
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -3
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +0 -2
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -3
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +0 -3
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/index.js +0 -3
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +1 -3
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +1 -3
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +1 -3
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +0 -2
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js +1 -3
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.types.js +0 -3
- package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib-commonjs/components/TableHeader/index.js +0 -3
- package/lib-commonjs/components/TableHeader/index.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js +1 -3
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -3
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +0 -2
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -3
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +0 -3
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/index.js +0 -3
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +1 -3
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +6 -10
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +29 -3
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +1 -3
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +0 -3
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/index.js +0 -3
- package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +1 -3
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +1 -3
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +0 -2
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js +1 -3
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.types.js +0 -3
- package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
- package/lib-commonjs/components/TableRow/index.js +0 -3
- package/lib-commonjs/components/TableRow/index.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js +1 -3
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +1 -3
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +12 -13
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -3
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +0 -3
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/index.js +0 -3
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +1 -3
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +1 -3
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +0 -2
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/columnIdContext.js +1 -3
- package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
- package/lib-commonjs/contexts/dataGridContext.js +2 -4
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
- package/lib-commonjs/contexts/rowIdContext.js +1 -3
- package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
- package/lib-commonjs/contexts/tableContext.js +1 -3
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js +1 -3
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
- package/lib-commonjs/hooks/createColumn.js +1 -3
- package/lib-commonjs/hooks/createColumn.js.map +1 -1
- package/lib-commonjs/hooks/index.js +0 -3
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/selectionManager.js +1 -3
- package/lib-commonjs/hooks/selectionManager.js.map +1 -1
- package/lib-commonjs/hooks/types.js +0 -3
- package/lib-commonjs/hooks/types.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardResizing.js +17 -18
- package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js +1 -3
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +1 -3
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeState.js +1 -3
- package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnSizing.js +10 -7
- package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
- package/lib-commonjs/hooks/useTableFeatures.js +1 -3
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
- package/lib-commonjs/hooks/useTableSelection.js +2 -4
- package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
- package/lib-commonjs/hooks/useTableSort.js +1 -3
- package/lib-commonjs/hooks/useTableSort.js.map +1 -1
- package/lib-commonjs/index.js +1 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/columnResizeUtils.js +1 -3
- package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
- package/package.json +16 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -8,6 +8,3 @@ _exportStar(require("./TableSelectionCell.types"), exports);
|
|
|
8
8
|
_exportStar(require("./renderTableSelectionCell"), exports);
|
|
9
9
|
_exportStar(require("./useTableSelectionCell"), exports);
|
|
10
10
|
_exportStar(require("./useTableSelectionCellStyles.styles"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -11,6 +11,4 @@ const _reactUtilities = require("@fluentui/react-utilities");
|
|
|
11
11
|
const renderTableSelectionCell_unstable = (state)=>{
|
|
12
12
|
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
13
13
|
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, state.type === 'checkbox' && slots.checkboxIndicator && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.checkboxIndicator, slotProps.checkboxIndicator), state.type === 'radio' && slots.radioIndicator && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.radioIndicator, slotProps.radioIndicator));
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=renderTableSelectionCell.js.map
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["renderTableSelectionCell.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of TableSelectionCell\n */ export const renderTableSelectionCell_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, state.type === 'checkbox' && slots.checkboxIndicator && /*#__PURE__*/ createElement(slots.checkboxIndicator, slotProps.checkboxIndicator), state.type === 'radio' && slots.radioIndicator && /*#__PURE__*/ createElement(slots.radioIndicator, slotProps.radioIndicator));\n};\n"],"names":["renderTableSelectionCell_unstable","state","slots","slotProps","getSlotsNext","createElement","root","type","checkboxIndicator","radioIndicator"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,oCAAoC,CAACC,QAAQ;IAC1D,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAEL,MAAMM,IAAI,KAAK,cAAcL,MAAMM,iBAAiB,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMM,iBAAiB,EAAEL,UAAUK,iBAAiB,GAAGP,MAAMM,IAAI,KAAK,WAAWL,MAAMO,cAAc,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMO,cAAc,EAAEN,UAAUM,cAAc;AAC1U"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useTableSelectionCell.js"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */ export const useTableSelectionCell_unstable = (props, ref)=>{\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type ='checkbox' , checked =false , subtle =false , hidden =false } = props;\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio\n },\n checkboxIndicator: resolveShorthand(props.checkboxIndicator, {\n required: type === 'checkbox',\n defaultProps: {\n checked: props.checked\n }\n }),\n radioIndicator: resolveShorthand(props.radioIndicator, {\n required: type === 'radio',\n defaultProps: {\n checked: !!checked,\n input: {\n name: useId('table-selection-radio')\n }\n }\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden\n };\n};\n"],"names":["useTableSelectionCell_unstable","props","ref","tableCellState","useTableCell_unstable","noNativeElements","useTableContext","type","checked","subtle","hidden","components","checkboxIndicator","Checkbox","radioIndicator","Radio","resolveShorthand","required","defaultProps","input","name","useId"],"mappings":";;;;+BAciBA;;aAAAA;;;6DAdM;gCACiB;+BACf;4BACH;8BACgB;8BACN;AASrB,MAAMA,iCAAiC,CAACC,OAAOC,MAAM;IAC5D,MAAMC,iBAAiBC,IAAAA,mCAAqB,EAACH,OAAOC;IACpD,MAAM,EAAEG,iBAAgB,EAAG,GAAGC,IAAAA,6BAAe;IAC7C,MAAM,EAAEC,MAAM,WAAU,EAAGC,SAAS,KAAK,CAAA,EAAGC,QAAQ,KAAK,CAAA,EAAGC,QAAQ,KAAK,CAAA,EAAG,GAAGT;IAC/E,OAAO;QACH,GAAGE,cAAc;QACjBQ,YAAY;YACR,GAAGR,eAAeQ,UAAU;YAC5BC,mBAAmBC,uBAAQ;YAC3BC,gBAAgBC,iBAAK;QACzB;QACAH,mBAAmBI,IAAAA,gCAAgB,EAACf,MAAMW,iBAAiB,EAAE;YACzDK,UAAUV,SAAS;YACnBW,cAAc;gBACVV,SAASP,MAAMO,OAAO;YAC1B;QACJ;QACAM,gBAAgBE,IAAAA,gCAAgB,EAACf,MAAMa,cAAc,EAAE;YACnDG,UAAUV,SAAS;YACnBW,cAAc;gBACVV,SAAS,CAAC,CAACA;gBACXW,OAAO;oBACHC,MAAMC,IAAAA,qBAAK,EAAC;gBAChB;YACJ;QACJ;QACAd;QACAC;QACAH;QACAI;QACAC;IACJ;AACJ"}
|
package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useTableSelectionCellStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const CELL_WIDTH = 44;\nexport const tableSelectionCellClassNames = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator'\n};\nconst useTableLayoutStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f15pt5es\",\n a9b677: \"fksc0bp\"\n }\n}, {\n d: [\".f15pt5es{display:table-cell;}\", \".fksc0bp{width:44px;}\"]\n});\nconst useFlexLayoutStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Bh6795r: \"fqerorx\",\n Bnnss6s: \"f1neuvcm\",\n xawz: \"fkjuxzh\",\n Bf4jedk: \"fvrlu0f\",\n B2u0y6b: \"f1c71y05\",\n Brf1p80: \"f4d9j23\"\n }\n}, {\n d: [\".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}\", \".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}\", \".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}\", \".fvrlu0f{min-width:44px;}\", \".f1c71y05{max-width:44px;}\", \".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}\"]\n});\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n fsow6f: \"f17mccla\",\n Huce71: \"fz5stix\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1cnd47f\", \"fhxju0i\"],\n Bn4voq9: \"fz36nt7\",\n g9k6zt: \"f9znhxp\",\n Bfpq7zp: \"fqrak0z\",\n kdpuga: [\"f1o2ludy\", \"f1kjnpwc\"],\n Bw81rd7: [\"f1kjnpwc\", \"f1o2ludy\"],\n B6xbmo0: [\"fxmnebo\", \"f1witrsb\"],\n dm238s: [\"f1witrsb\", \"fxmnebo\"]\n },\n radioIndicator: {\n mc9l5x: \"f22iagw\",\n Bh6795r: \"fqerorx\",\n Bt984gj: \"f122n59\",\n Brf1p80: \"f4d9j23\"\n },\n subtle: {\n abs64n: \"fk73vx1\",\n B8a84jv: \"f1y7ij6c\"\n },\n hidden: {\n Bcdw1i0: \"fd7fpy0\"\n }\n}, {\n d: [\".f17mccla{text-align:center;}\", \".fz5stix{white-space:nowrap;}\", \".f1g0x7ka{padding-top:0;}\", \".fhxju0i{padding-right:0;}\", \".f1cnd47f{padding-left:0;}\", \".f1qch9an{padding-bottom:0;}\", \".fz36nt7[data-fui-focus-visible]{outline-width:2px;}\", \".f9znhxp[data-fui-focus-visible]{outline-style:solid;}\", \".fqrak0z[data-fui-focus-visible]{outline-color:var(--colorStrokeFocus2);}\", \".f1o2ludy[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f1kjnpwc[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".fxmnebo[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusMedium);}\", \".f1witrsb[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusMedium);}\", \".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}\", \".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}\", \".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}\", \".fk73vx1{opacity:0;}\", \".f1y7ij6c[data-fui-focus-within]:focus-within{opacity:1;}\", \".fd7fpy0{visibility:hidden;}\"]\n});\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */\nexport const useTableSelectionCellStyles_unstable = state => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);\n }\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);\n }\n return state;\n};\n//# sourceMappingURL=useTableSelectionCellStyles.styles.js.map"],"names":["CELL_WIDTH","tableSelectionCellClassNames","useTableSelectionCellStyles_unstable","root","checkboxIndicator","radioIndicator","useTableLayoutStyles","__styles","mc9l5x","a9b677","d","useFlexLayoutStyles","Bh6795r","Bnnss6s","xawz","Bf4jedk","B2u0y6b","Brf1p80","useStyles","fsow6f","Huce71","z8tnut","z189sj","Byoj8tv","uwmqm3","Bn4voq9","g9k6zt","Bfpq7zp","kdpuga","Bw81rd7","B6xbmo0","dm238s","Bt984gj","subtle","abs64n","B8a84jv","hidden","Bcdw1i0","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements","checked"],"mappings":";;;;;;;;;;;IAGaA,UAAU,MAAVA;IACAC,4BAA4B,MAA5BA;IAgEAC,oCAAoC,MAApCA;;uBApEsC;AAG5C,MAAMF,aAAa;AACnB,MAAMC,+BAA+B;IAC1CE,MAAM;IACNC,mBAAmB;IACnBC,gBAAgB;AAClB;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACjDJ,MAAM;QACJK,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAAkC;KAAwB;AAChE;AACA,MAAMC,sBAAsB,WAAW,GAAEJ,IAAAA,kBAAQ,EAAC;IAChDJ,MAAM;QACJK,QAAQ;QACRI,SAAS;QACTC,SAAS;QACTC,MAAM;QACNC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDP,GAAG;QAAC;QAAwF;QAAqF;QAAuE;QAAgF;QAA6B;QAA8B;KAAgH;AACrf;AACA;;CAEC,GACD,MAAMQ,YAAY,WAAW,GAAEX,IAAAA,kBAAQ,EAAC;IACtCJ,MAAM;QACJg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AS;IACpI,CAAC;IACD,IAAIL,MAAMjC,cAAc,EAAE;QACxBiC,MAAMjC,cAAc,CAACsC,SAAS,GAAGC,IAAAA,mBAAY,EAAC3C,6BAA6BI,cAAc,EAAEkC,OAAOlC,cAAc,EAAEiC,MAAMjC,cAAc,CAACsC,SAAS;IAClJ,CAAC;IACD,OAAOL;AACT,GACA,8DAA8D"}
|
|
@@ -19,6 +19,4 @@ const columnIdContext = /*#__PURE__*/ _react.createContext(undefined);
|
|
|
19
19
|
const columnIdContextDefaultValue = '';
|
|
20
20
|
var _React_useContext;
|
|
21
21
|
const useColumnIdContext = ()=>(_React_useContext = _react.useContext(columnIdContext)) !== null && _React_useContext !== void 0 ? _React_useContext : columnIdContextDefaultValue;
|
|
22
|
-
const ColumnIdContextProvider = columnIdContext.Provider;
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=columnIdContext.js.map
|
|
22
|
+
const ColumnIdContextProvider = columnIdContext.Provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["columnIdContext.js"],"sourcesContent":["import * as React from 'react';\nconst columnIdContext = React.createContext(undefined);\nexport const columnIdContextDefaultValue = '';\nvar _React_useContext;\nexport const useColumnIdContext = ()=>(_React_useContext = React.useContext(columnIdContext)) !== null && _React_useContext !== void 0 ? _React_useContext : columnIdContextDefaultValue;\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"],"names":["columnIdContextDefaultValue","useColumnIdContext","ColumnIdContextProvider","columnIdContext","React","createContext","undefined","_React_useContext","useContext","Provider"],"mappings":";;;;;;;;;;;IAEaA,2BAA2B,MAA3BA;IAEAC,kBAAkB,MAAlBA;IACAC,uBAAuB,MAAvBA;;;6DALU;AACvB,MAAMC,gCAAkBC,OAAMC,aAAa,CAACC;AACrC,MAAMN,8BAA8B;AAC3C,IAAIO;AACG,MAAMN,qBAAqB,IAAI,AAACM,CAAAA,oBAAoBH,OAAMI,UAAU,CAACL,gBAAe,MAAO,IAAI,IAAII,sBAAsB,KAAK,IAAIA,oBAAoBP,2BAA2B;AACjL,MAAME,0BAA0BC,gBAAgBM,QAAQ"}
|
|
@@ -14,7 +14,7 @@ _export(exports, {
|
|
|
14
14
|
});
|
|
15
15
|
const _reactContextSelector = require("@fluentui/react-context-selector");
|
|
16
16
|
const _hooks = require("../hooks");
|
|
17
|
-
const dataGridContext =
|
|
17
|
+
const dataGridContext = (0, _reactContextSelector.createContext)(undefined);
|
|
18
18
|
const dataGridContextDefaultValue = {
|
|
19
19
|
..._hooks.defaultTableState,
|
|
20
20
|
subtleSelection: false,
|
|
@@ -23,6 +23,4 @@ const dataGridContextDefaultValue = {
|
|
|
23
23
|
focusMode: 'none'
|
|
24
24
|
};
|
|
25
25
|
const DataGridContextProvider = dataGridContext.Provider;
|
|
26
|
-
const useDataGridContext_unstable = (selector)=>(0, _reactContextSelector.useContextSelector)(dataGridContext, (ctx = dataGridContextDefaultValue)=>selector(ctx));
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=dataGridContext.js.map
|
|
26
|
+
const useDataGridContext_unstable = (selector)=>(0, _reactContextSelector.useContextSelector)(dataGridContext, (ctx = dataGridContextDefaultValue)=>selector(ctx));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["dataGridContext.js"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport { defaultTableState } from '../hooks';\nconst dataGridContext = createContext(undefined);\nconst dataGridContextDefaultValue = {\n ...defaultTableState,\n subtleSelection: false,\n selectableRows: false,\n selectionAppearance: 'brand',\n focusMode: 'none'\n};\nexport const DataGridContextProvider = dataGridContext.Provider;\nexport const useDataGridContext_unstable = (selector)=>useContextSelector(dataGridContext, (ctx = dataGridContextDefaultValue)=>selector(ctx));\n"],"names":["DataGridContextProvider","useDataGridContext_unstable","dataGridContext","createContext","undefined","dataGridContextDefaultValue","defaultTableState","subtleSelection","selectableRows","selectionAppearance","focusMode","Provider","selector","useContextSelector","ctx"],"mappings":";;;;;;;;;;;IAUaA,uBAAuB,MAAvBA;IACAC,2BAA2B,MAA3BA;;sCAXqC;uBAChB;AAClC,MAAMC,kBAAkBC,IAAAA,mCAAa,EAACC;AACtC,MAAMC,8BAA8B;IAChC,GAAGC,wBAAiB;IACpBC,iBAAiB,KAAK;IACtBC,gBAAgB,KAAK;IACrBC,qBAAqB;IACrBC,WAAW;AACf;AACO,MAAMV,0BAA0BE,gBAAgBS,QAAQ;AACxD,MAAMV,8BAA8B,CAACW,WAAWC,IAAAA,wCAAkB,EAACX,iBAAiB,CAACY,MAAMT,2BAA2B,GAAGO,SAASE"}
|
|
@@ -19,6 +19,4 @@ const rowIdContext = /*#__PURE__*/ _react.createContext(undefined);
|
|
|
19
19
|
const tableRowIdContextDefaultValue = '';
|
|
20
20
|
var _React_useContext;
|
|
21
21
|
const useTableRowIdContext = ()=>(_React_useContext = _react.useContext(rowIdContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableRowIdContextDefaultValue;
|
|
22
|
-
const TableRowIdContextProvider = rowIdContext.Provider;
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=rowIdContext.js.map
|
|
22
|
+
const TableRowIdContextProvider = rowIdContext.Provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["rowIdContext.js"],"sourcesContent":["import * as React from 'react';\nconst rowIdContext = React.createContext(undefined);\nexport const tableRowIdContextDefaultValue = '';\nvar _React_useContext;\nexport const useTableRowIdContext = ()=>(_React_useContext = React.useContext(rowIdContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableRowIdContextDefaultValue;\nexport const TableRowIdContextProvider = rowIdContext.Provider;\n"],"names":["tableRowIdContextDefaultValue","useTableRowIdContext","TableRowIdContextProvider","rowIdContext","React","createContext","undefined","_React_useContext","useContext","Provider"],"mappings":";;;;;;;;;;;IAEaA,6BAA6B,MAA7BA;IAEAC,oBAAoB,MAApBA;IACAC,yBAAyB,MAAzBA;;;6DALU;AACvB,MAAMC,6BAAeC,OAAMC,aAAa,CAACC;AAClC,MAAMN,gCAAgC;AAC7C,IAAIO;AACG,MAAMN,uBAAuB,IAAI,AAACM,CAAAA,oBAAoBH,OAAMI,UAAU,CAACL,aAAY,MAAO,IAAI,IAAII,sBAAsB,KAAK,IAAIA,oBAAoBP,6BAA6B;AAClL,MAAME,4BAA4BC,aAAaM,QAAQ"}
|
|
@@ -23,6 +23,4 @@ const tableContextDefaultValue = {
|
|
|
23
23
|
};
|
|
24
24
|
const TableContextProvider = tableContext.Provider;
|
|
25
25
|
var _React_useContext;
|
|
26
|
-
const useTableContext = ()=>(_React_useContext = _react.useContext(tableContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableContextDefaultValue;
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=tableContext.js.map
|
|
26
|
+
const useTableContext = ()=>(_React_useContext = _react.useContext(tableContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableContextDefaultValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["tableContext.js"],"sourcesContent":["import * as React from 'react';\nconst tableContext = React.createContext(undefined);\nexport const tableContextDefaultValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false\n};\nexport const TableContextProvider = tableContext.Provider;\nvar _React_useContext;\nexport const useTableContext = ()=>(_React_useContext = React.useContext(tableContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableContextDefaultValue;\n"],"names":["tableContextDefaultValue","TableContextProvider","useTableContext","tableContext","React","createContext","undefined","size","noNativeElements","sortable","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAEaA,wBAAwB,MAAxBA;IAKAC,oBAAoB,MAApBA;IAEAC,eAAe,MAAfA;;;6DATU;AACvB,MAAMC,6BAAeC,OAAMC,aAAa,CAACC;AAClC,MAAMN,2BAA2B;IACpCO,MAAM;IACNC,kBAAkB,KAAK;IACvBC,UAAU,KAAK;AACnB;AACO,MAAMR,uBAAuBE,aAAaO,QAAQ;AACzD,IAAIC;AACG,MAAMT,kBAAkB,IAAI,AAACS,CAAAA,oBAAoBP,OAAMQ,UAAU,CAACT,aAAY,MAAO,IAAI,IAAIQ,sBAAsB,KAAK,IAAIA,oBAAoBX,wBAAwB"}
|
|
@@ -17,6 +17,4 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
|
17
17
|
const tableHeaderContext = /*#__PURE__*/ _react.createContext(undefined);
|
|
18
18
|
const tableHeaderContextDefaultValue = '';
|
|
19
19
|
const TableHeaderContextProvider = tableHeaderContext.Provider;
|
|
20
|
-
const useIsInTableHeader = ()=>_react.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=tableHeaderContext.js.map
|
|
20
|
+
const useIsInTableHeader = ()=>_react.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["tableHeaderContext.js"],"sourcesContent":["import * as React from 'react';\nconst tableHeaderContext = React.createContext(undefined);\nconst tableHeaderContextDefaultValue = '';\nexport const TableHeaderContextProvider = tableHeaderContext.Provider;\nexport const useIsInTableHeader = ()=>React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;\n"],"names":["TableHeaderContextProvider","useIsInTableHeader","tableHeaderContext","React","createContext","undefined","tableHeaderContextDefaultValue","Provider","useContext"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B,MAA1BA;IACAC,kBAAkB,MAAlBA;;;6DAJU;AACvB,MAAMC,mCAAqBC,OAAMC,aAAa,CAACC;AAC/C,MAAMC,iCAAiC;AAChC,MAAMN,6BAA6BE,mBAAmBK,QAAQ;AAC9D,MAAMN,qBAAqB,IAAIE,OAAMK,UAAU,CAACN,wBAAwBI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["createColumn.js"],"sourcesContent":["const defaultCompare = ()=>0;\nconst defaultRenderCell = ()=>{\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderCell function that renders null');\n }\n return null;\n};\nconst defaultRenderHeaderCell = ()=>{\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderHeaderCell function that renders null');\n }\n return null;\n};\n/**\n * Helper function to create column definition with defaults\n * @param options - column definition options\n * @returns - column definition with defaults\n */ export function createTableColumn(options) {\n const { columnId , renderCell =defaultRenderCell , renderHeaderCell =defaultRenderHeaderCell , compare =defaultCompare } = options;\n return {\n columnId,\n renderCell,\n renderHeaderCell,\n compare\n };\n}\n"],"names":["createTableColumn","defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","options","columnId","renderCell","renderHeaderCell","compare"],"mappings":";;;;+BAmBoBA;;aAAAA;;AAnBpB,MAAMC,iBAAiB,IAAI;AAC3B,MAAMC,oBAAoB,IAAI;IAC1B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACjB,CAAC;IACD,OAAO,IAAI;AACf;AACA,MAAMC,0BAA0B,IAAI;IAChC,IAAIL,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACjB,CAAC;IACD,OAAO,IAAI;AACf;AAKW,SAASP,kBAAkBS,OAAO,EAAE;IAC3C,MAAM,EAAEC,SAAQ,EAAGC,YAAYT,kBAAiB,EAAGU,kBAAkBJ,wBAAuB,EAAGK,SAASZ,eAAc,EAAG,GAAGQ;IAC5H,OAAO;QACHC;QACAC;QACAC;QACAC;IACJ;AACJ"}
|
|
@@ -9,6 +9,3 @@ _exportStar(require("./useTableSort"), exports);
|
|
|
9
9
|
_exportStar(require("./useTableSelection"), exports);
|
|
10
10
|
_exportStar(require("./createColumn"), exports);
|
|
11
11
|
_exportStar(require("./useTableColumnSizing"), exports);
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\nexport * from './useTableColumnSizing';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["selectionManager.js"],"sourcesContent":["import * as React from 'react';\nexport function createSelectionManager(mode, onSelectionChange = ()=>undefined) {\n const managerFactory = mode === 'multiselect' ? createMultipleSelectionManager : createSingleSelectionManager;\n return managerFactory(onSelectionChange);\n}\nfunction createMultipleSelectionManager(onSelectionChange) {\n const toggleAllItems = (e, itemIds, selectedItems)=>{\n const allItemsSelected = itemIds.every((itemId)=>selectedItems.has(itemId));\n if (allItemsSelected) {\n selectedItems.clear();\n } else {\n itemIds.forEach((itemId)=>selectedItems.add(itemId));\n }\n onSelectionChange(e, new Set(selectedItems));\n };\n const toggleItem = (e, itemId, selectedItems)=>{\n if (selectedItems.has(itemId)) {\n selectedItems.delete(itemId);\n } else {\n selectedItems.add(itemId);\n }\n onSelectionChange(e, new Set(selectedItems));\n };\n const selectItem = (e, itemId, selectedItems)=>{\n selectedItems.add(itemId);\n onSelectionChange(e, new Set(selectedItems));\n };\n const deselectItem = (e, itemId, selectedItems)=>{\n selectedItems.delete(itemId);\n onSelectionChange(e, new Set(selectedItems));\n };\n const clearItems = (e)=>{\n onSelectionChange(e, new Set());\n };\n const isSelected = (itemId, selectedItems)=>{\n return selectedItems.has(itemId);\n };\n return {\n toggleItem,\n selectItem,\n deselectItem,\n clearItems,\n isSelected,\n toggleAllItems\n };\n}\nfunction createSingleSelectionManager(onSelectionChange) {\n const toggleItem = (e, itemId)=>{\n onSelectionChange(e, new Set([\n itemId\n ]));\n };\n const clearItems = (e)=>{\n onSelectionChange(e, new Set());\n };\n const isSelected = (itemId, selectedItems)=>{\n return selectedItems.has(itemId);\n };\n const selectItem = (e, itemId)=>{\n onSelectionChange(e, new Set([\n itemId\n ]));\n };\n return {\n deselectItem: clearItems,\n selectItem,\n toggleAllItems: ()=>{\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('[react-table]: `toggleAllItems` should not be used in single selection mode');\n }\n return undefined;\n },\n toggleItem,\n clearItems,\n isSelected\n };\n}\n"],"names":["createSelectionManager","mode","onSelectionChange","undefined","managerFactory","createMultipleSelectionManager","createSingleSelectionManager","toggleAllItems","e","itemIds","selectedItems","allItemsSelected","every","itemId","has","clear","forEach","add","Set","toggleItem","delete","selectItem","deselectItem","clearItems","isSelected","process","env","NODE_ENV","Error"],"mappings":";;;;+BACgBA;;aAAAA;;;6DADO;AAChB,SAASA,uBAAuBC,IAAI,EAAEC,oBAAoB,IAAIC,SAAS,EAAE;IAC5E,MAAMC,iBAAiBH,SAAS,gBAAgBI,iCAAiCC,4BAA4B;IAC7G,OAAOF,eAAeF;AAC1B;AACA,SAASG,+BAA+BH,iBAAiB,EAAE;IACvD,MAAMK,iBAAiB,CAACC,GAAGC,SAASC,gBAAgB;QAChD,MAAMC,mBAAmBF,QAAQG,KAAK,CAAC,CAACC,SAASH,cAAcI,GAAG,CAACD;QACnE,IAAIF,kBAAkB;YAClBD,cAAcK,KAAK;QACvB,OAAO;YACHN,QAAQO,OAAO,CAAC,CAACH,SAASH,cAAcO,GAAG,CAACJ;QAChD,CAAC;QACDX,kBAAkBM,GAAG,IAAIU,IAAIR;IACjC;IACA,MAAMS,aAAa,CAACX,GAAGK,QAAQH,gBAAgB;QAC3C,IAAIA,cAA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|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
6
6
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
7
|
-
//# sourceMappingURL=types.js.map
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
|
|
@@ -15,7 +15,7 @@ const STEP = 20;
|
|
|
15
15
|
const PRECISION_MODIFIER = _keyboardKeys.Shift;
|
|
16
16
|
const PRECISION_FACTOR = 1 / 4;
|
|
17
17
|
function useKeyboardResizing(columnResizeState) {
|
|
18
|
-
const columnId = _react.
|
|
18
|
+
const [columnId, setColumnId] = _react.useState();
|
|
19
19
|
const onChangeRef = _react.useRef();
|
|
20
20
|
const addListenerTimeout = _react.useRef();
|
|
21
21
|
const columnResizeStateRef = _react.useRef(columnResizeState);
|
|
@@ -26,11 +26,10 @@ function useKeyboardResizing(columnResizeState) {
|
|
|
26
26
|
]);
|
|
27
27
|
const { targetDocument } = (0, _reactSharedContexts.useFluent_unstable)();
|
|
28
28
|
const keyboardHandler = (0, _reactUtilities.useEventCallback)((event)=>{
|
|
29
|
-
|
|
30
|
-
if (!colId) {
|
|
29
|
+
if (!columnId) {
|
|
31
30
|
return;
|
|
32
31
|
}
|
|
33
|
-
const width = columnResizeStateRef.current.getColumnWidth(
|
|
32
|
+
const width = columnResizeStateRef.current.getColumnWidth(columnId);
|
|
34
33
|
const precisionModifier = event.getModifierState(PRECISION_MODIFIER);
|
|
35
34
|
const stopEvent = ()=>{
|
|
36
35
|
event.preventDefault();
|
|
@@ -40,14 +39,14 @@ function useKeyboardResizing(columnResizeState) {
|
|
|
40
39
|
case _keyboardKeys.ArrowLeft:
|
|
41
40
|
stopEvent();
|
|
42
41
|
columnResizeStateRef.current.setColumnWidth(event, {
|
|
43
|
-
columnId
|
|
42
|
+
columnId,
|
|
44
43
|
width: width - (precisionModifier ? STEP * PRECISION_FACTOR : STEP)
|
|
45
44
|
});
|
|
46
45
|
return;
|
|
47
46
|
case _keyboardKeys.ArrowRight:
|
|
48
47
|
stopEvent();
|
|
49
48
|
columnResizeStateRef.current.setColumnWidth(event, {
|
|
50
|
-
columnId
|
|
49
|
+
columnId,
|
|
51
50
|
width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP)
|
|
52
51
|
});
|
|
53
52
|
return;
|
|
@@ -72,7 +71,7 @@ function useKeyboardResizing(columnResizeState) {
|
|
|
72
71
|
]);
|
|
73
72
|
const enableInteractiveMode = _react.useCallback((colId)=>{
|
|
74
73
|
var _onChangeRef_current, _targetDocument_defaultView;
|
|
75
|
-
|
|
74
|
+
setColumnId(colId);
|
|
76
75
|
(_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, colId, true);
|
|
77
76
|
// Create the listener in the next tick, because the event that triggered this is still propagating
|
|
78
77
|
// when Enter was pressed and would be caught in the keyboardHandler, disabling the keyboard mode immediately.
|
|
@@ -88,30 +87,30 @@ function useKeyboardResizing(columnResizeState) {
|
|
|
88
87
|
]);
|
|
89
88
|
const disableInteractiveMode = _react.useCallback(()=>{
|
|
90
89
|
var _targetDocument_defaultView;
|
|
91
|
-
if (columnId
|
|
90
|
+
if (columnId) {
|
|
92
91
|
var _onChangeRef_current;
|
|
93
|
-
(_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, columnId
|
|
92
|
+
(_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, columnId, false);
|
|
94
93
|
}
|
|
95
|
-
|
|
94
|
+
setColumnId(undefined);
|
|
96
95
|
targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.removeEventListener('keydown', keyboardHandler);
|
|
97
96
|
}, [
|
|
97
|
+
columnId,
|
|
98
98
|
keyboardHandler,
|
|
99
99
|
targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView
|
|
100
100
|
]);
|
|
101
101
|
const toggleInteractiveMode = (colId, onChange)=>{
|
|
102
102
|
onChangeRef.current = onChange;
|
|
103
|
-
if (!columnId
|
|
103
|
+
if (!columnId) {
|
|
104
104
|
enableInteractiveMode(colId);
|
|
105
|
-
} else if (colId && columnId
|
|
106
|
-
|
|
107
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(columnId
|
|
105
|
+
} else if (colId && columnId !== colId) {
|
|
106
|
+
setColumnId(colId);
|
|
107
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(columnId, true);
|
|
108
108
|
} else {
|
|
109
109
|
disableInteractiveMode();
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
return {
|
|
113
|
-
toggleInteractiveMode
|
|
113
|
+
toggleInteractiveMode,
|
|
114
|
+
columnId
|
|
114
115
|
};
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
//# sourceMappingURL=useKeyboardResizing.js.map
|
|
116
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useKeyboardResizing.js"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, ArrowRight, Enter, Escape, Shift, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nconst STEP = 20;\nconst PRECISION_MODIFIER = Shift;\nconst PRECISION_FACTOR = 1 / 4;\nexport function useKeyboardResizing(columnResizeState) {\n const [columnId, setColumnId] = React.useState();\n const onChangeRef = React.useRef();\n const addListenerTimeout = React.useRef();\n const columnResizeStateRef = React.useRef(columnResizeState);\n React.useEffect(()=>{\n columnResizeStateRef.current = columnResizeState;\n }, [\n columnResizeState\n ]);\n const { targetDocument } = useFluent();\n const keyboardHandler = useEventCallback((event)=>{\n if (!columnId) {\n return;\n }\n const width = columnResizeStateRef.current.getColumnWidth(columnId);\n const precisionModifier = event.getModifierState(PRECISION_MODIFIER);\n const stopEvent = ()=>{\n event.preventDefault();\n event.stopPropagation();\n };\n switch(event.key){\n case ArrowLeft:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event, {\n columnId,\n width: width - (precisionModifier ? STEP * PRECISION_FACTOR : STEP)\n });\n return;\n case ArrowRight:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event, {\n columnId,\n width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP)\n });\n return;\n case Space:\n case Enter:\n case Escape:\n stopEvent();\n disableInteractiveMode();\n break;\n }\n });\n // On component unmout, cancel any timer for adding a listener (if it exists) and remove the listener\n React.useEffect(()=>{\n return ()=>{\n var _targetDocument_defaultView, _targetDocument_defaultView1;\n targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.clearTimeout(addListenerTimeout.current);\n targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView1 = targetDocument.defaultView) === null || _targetDocument_defaultView1 === void 0 ? void 0 : _targetDocument_defaultView1.removeEventListener('keydown', keyboardHandler);\n };\n }, [\n keyboardHandler,\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView\n ]);\n const enableInteractiveMode = React.useCallback((colId)=>{\n var _onChangeRef_current, _targetDocument_defaultView;\n setColumnId(colId);\n (_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, colId, true);\n // Create the listener in the next tick, because the event that triggered this is still propagating\n // when Enter was pressed and would be caught in the keyboardHandler, disabling the keyboard mode immediately.\n // No idea why this is happening, but this is a working workaround.\n // Tracked here: https://github.com/microsoft/fluentui/issues/27177\n addListenerTimeout.current = targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.setTimeout(()=>{\n var _targetDocument_defaultView;\n targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.addEventListener('keydown', keyboardHandler);\n }, 0);\n }, [\n keyboardHandler,\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView\n ]);\n const disableInteractiveMode = React.useCallback(()=>{\n var _targetDocument_defaultView;\n if (columnId) {\n var _onChangeRef_current;\n (_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, columnId, false);\n }\n setColumnId(undefined);\n targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.removeEventListener('keydown', keyboardHandler);\n }, [\n columnId,\n keyboardHandler,\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView\n ]);\n const toggleInteractiveMode = (colId, onChange)=>{\n onChangeRef.current = onChange;\n if (!columnId) {\n enableInteractiveMode(colId);\n } else if (colId && columnId !== colId) {\n setColumnId(colId);\n onChange === null || onChange === void 0 ? void 0 : onChange(columnId, true);\n } else {\n disableInteractiveMode();\n }\n };\n return {\n toggleInteractiveMode,\n columnId\n };\n}\n"],"names":["useKeyboardResizing","STEP","PRECISION_MODIFIER","Shift","PRECISION_FACTOR","columnResizeState","columnId","setColumnId","React","useState","onChangeRef","useRef","addListenerTimeout","columnResizeStateRef","useEffect","current","targetDocument","useFluent","keyboardHandler","useEventCallback","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","ArrowLeft","setColumnWidth","ArrowRight","Space","Enter","Escape","disableInteractiveMode","_targetDocument_defaultView","_targetDocument_defaultView1","defaultView","clearTimeout","removeEventListener","enableInteractiveMode","useCallback","colId","_onChangeRef_current","call","setTimeout","addEventListener","undefined","toggleInteractiveMode","onChange"],"mappings":";;;;+BAOgBA;;aAAAA;;;6DAPO;8BAC4C;gCAClC;qCACe;AAChD,MAAMC,OAAO;AACb,MAAMC,qBAAqBC,mBAAK;AAChC,MAAMC,mBAAmB,IAAI;AACtB,SAASJ,oBAAoBK,iBAAiB,EAAE;IACnD,MAAM,CAACC,UAAUC,YAAY,GAAGC,OAAMC,QAAQ;IAC9C,MAAMC,cAAcF,OAAMG,MAAM;IAChC,MAAMC,qBAAqBJ,OAAMG,MAAM;IACvC,MAAME,uBAAuBL,OAAMG,MAAM,CAACN;IAC1CG,OAAMM,SAAS,CAAC,IAAI;QAChBD,qBAAqBE,OAAO,GAAGV;IACnC,GAAG;QACCA;KACH;IACD,MAAM,EAAEW,eAAc,EAAG,GAAGC,IAAAA,uCAAS;IACrC,MAAMC,kBAAkBC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QAC9C,IAAI,CAACd,UAAU;YACX;QACJ,CAAC;QACD,MAAMe,QAAQR,qBAAqBE,OAAO,CAACO,cAAc,CAAChB;QAC1D,MAAMiB,oBAAoBH,MAAMI,gBAAgB,CAACtB;QACjD,MAAMuB,YAAY,IAAI;YAClBL,MAAMM,cAAc;YACpBN,MAAMO,eAAe;QACzB;QACA,OAAOP,MAAMQ,GAAG;YACZ,KAAKC,uBAAS;gBACVJ;gBACAZ,qBAAqBE,OAAO,CAACe,cAAc,CAACV,OAAO;oBAC/Cd;oBACAe,OAAOA,QAASE,CAAAA,oBAAoBtB,OAAOG,mBAAmBH,IAAI,AAAD;gBACrE;gBACA;YACJ,KAAK8B,wBAAU;gBACXN;gBACAZ,qBAAqBE,OAAO,CAACe,cAAc,CAACV,OAAO;oBAC/Cd;oBACAe,OAAOA,QAASE,CAAAA,oBAAoBtB,OAAOG,mBAA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QACA3C;IACJ;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useMeasureElement.js"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */ export function useMeasureElement() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef(undefined);\n const { targetDocument } = useFluent();\n // the handler for resize observer\n const handleResize = React.useCallback(()=>{\n var _container_current;\n const containerWidth = (_container_current = container.current) === null || _container_current === void 0 ? void 0 : _container_current.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback((el)=>{\n if (!targetDocument || !resizeObserver) {\n return;\n }\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n if (el) {\n container.current = targetDocument.createElement('div');\n el.insertAdjacentElement('beforebegin', container.current);\n resizeObserver.observe(container.current);\n handleResize();\n }\n }, [\n targetDocument,\n resizeObserver,\n handleResize\n ]);\n React.useEffect(()=>{\n return ()=>{\n return resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n };\n }, [\n resizeObserver\n ]);\n return {\n width,\n measureElementRef\n };\n}\n"],"names":["useMeasureElement","width","setWidth","React","useState","container","useRef","undefined","targetDocument","useFluent","handleResize","useCallback","_container_current","containerWidth","current","getBoundingClientRect","resizeObserver","canUseDOM","ResizeObserver","measureElementRef","el","unobserve","remove","createElement","insertAdjacentElement","observe","useEffect","disconnect"],"mappings":";;;;+BAQoBA;;aAAAA;;;gCARM;6DACH;qCACyB;AAMrC,SAASA,oBAAoB;IACpC,M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Handler(columnResizeState) {
|
|
|
77
77
|
return {
|
|
78
78
|
getOnMouseDown: (columnId)=>getOnMouseDown(columnId)
|
|
79
79
|
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=useTableColumnResizeMouseHandler.js.map
|
|
80
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["useTableColumnResizeMouseHandler.js"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { getEventClientCoords, isMouseEvent, isTouchEvent } from '@fluentui/react-utilities';\nexport function useTableColumnResizeMouseHandler(columnResizeState) {\n const mouseX = React.useRef(0);\n const currentWidth = React.useRef(0);\n const colId = React.useRef(undefined);\n const { targetDocument } = useFluent();\n const globalWin = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;\n const recalculatePosition = React.useCallback((e)=>{\n const { clientX } = getEventClientCoords(e);\n const dx = clientX - mouseX.current;\n // Update the local width for the column and set it\n currentWidth.current += dx;\n colId.current && columnResizeState.setColumnWidth(e, {\n columnId: colId.current,\n width: currentWidth.current\n });\n mouseX.current = clientX;\n }, [\n columnResizeState\n ]);\n const onDrag = React.useCallback((e)=>{\n // Using requestAnimationFrame here drastically improves resizing experience on slower CPUs\n if (typeof (globalWin === null || globalWin === void 0 ? void 0 : globalWin.requestAnimationFrame) === 'function') {\n requestAnimationFrame(()=>recalculatePosition(e));\n } else {\n recalculatePosition(e);\n }\n }, [\n globalWin === null || globalWin === void 0 ? void 0 : globalWin.requestAnimationFrame,\n recalculatePosition\n ]);\n const onDragEnd = React.useCallback((event)=>{\n if (isMouseEvent(event)) {\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('mouseup', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('mousemove', onDrag);\n }\n if (isTouchEvent(event)) {\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('touchend', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('touchmove', onDrag);\n }\n }, [\n onDrag,\n targetDocument\n ]);\n const getOnMouseDown = (columnId)=>{\n return (event)=>{\n // Keep the width locally so that we decouple the calculation of the next with from rendering.\n // This makes the whole experience much faster and more precise\n currentWidth.current = columnResizeState.getColumnWidth(columnId);\n mouseX.current = getEventClientCoords(event).clientX;\n colId.current = columnId;\n if (isMouseEvent(event)) {\n // ignore other buttons than primary mouse button\n if (event.target !== event.currentTarget || event.button !== 0) {\n return;\n }\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('mouseup', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('mousemove', onDrag);\n }\n if (isTouchEvent(event)) {\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('touchend', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('touchmove', onDrag);\n }\n };\n };\n return {\n getOnMouseDown: (columnId)=>getOnMouseDown(columnId)\n };\n}\n"],"names":["useTableColumnResizeMouseHandler","columnResizeState","mouseX","React","useRef","currentWidth","colId","undefined","targetDocument","useFluent","globalWin","defaultView","recalculatePosition","useCallback","e","clientX","getEventClientCoords","dx","current","setColumnWidth","columnId","width","onDrag","requestAnimationFrame","onDragEnd","event","isMouseEvent","removeEventListener","isTouchEvent","getOnMouseDown","getColumnWidth","target","currentTarget","button","addEventListener"],"mappings":";;;;+BAGgBA;;aAAAA;;;6DAHO;qCACyB;gCACiB;AAC1D,SAASA,iCAAiCC,iBAAiB,EAAE;IAChE,MAAMC,SAASC,OAAMC,MAAM,CAAC;IAC5B,MAAMC,eAAeF,OAAMC,MAAM,CAAC;IAClC,MAAME,QAAQH,OAAMC,MAAM,CAACG;IAC3B,MAAM,EAAEC,eAAc,EAAG,GAAGC,IAAAA,uCAAS;IACrC,MAAMC,YAAYF,m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;YACzHhB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAemB,mBAAmB,CAAC,aAAaL,OAAO;QAC3H,CAAC;IACL,GAAG;QACCA;QACAd;KACH;IACD,MAAMqB,iBAAiB,CAACT,WAAW;QAC/B,OAAO,CAACK,QAAQ;YACZ,8FAA8F;YAC9F,+DAA+D;YAC/DpB,aAAaa,OAAO,GAAGjB,kBAAkB6B,cAAc,CAACV;YACxDlB,OAAOgB,OAAO,GAAGF,IAAAA,oCAAoB,EAACS,OAAOV,OAAO;YACpDT,MAAMY,OAAO,GAAGE;YAChB,IAAIM,IAAAA,4BAAY,EAACD,QAAQ;gBACrB,iDAAiD;gBACjD,IAAIA,MAAMM,MAAM,KAAKN,MAAMO,aAAa,IAAIP,MAAMQ,MAAM,KAAK,GAAG;oBAC5D;gBACJ,CAAC;gBACDzB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAe0B,gBAAgB,CAAC,WAAWV,UAAU;gBACrHhB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAe0B,gBAAgB,CAAC,aAAaZ,OAAO;YACxH,CAAC;YACD,IAAIM,IAAAA,4BAAY,EAACH,QAAQ;gBACrBjB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAe0B,gBAAgB,CAAC,YAAYV,UAAU;gBACtHhB,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAe0B,gBAAgB,CAAC,aAAaZ,OAAO;YACxH,CAAC;QACL;IACJ;IACA,OAAO;QACHO,gBAAgB,CAACT,WAAWS,eAAeT;IAC/C;AACJ"}
|
|
@@ -113,6 +113,4 @@ function useTableColumnResizeState(columns, containerWidth, params = {}) {
|
|
|
113
113
|
getColumnWidth: (colId)=>(0, _columnResizeUtils.getColumnWidth)(state.columnWidthState, colId),
|
|
114
114
|
setColumnWidth
|
|
115
115
|
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
//# sourceMappingURL=useTableColumnResizeState.js.map
|
|
116
|
+
}
|