@fluentui/react-table 9.0.0-alpha.8 → 9.0.0-rc.1
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 +836 -1
- package/CHANGELOG.md +212 -2
- package/dist/index.d.ts +489 -101
- package/lib/DataGrid.js +2 -0
- package/lib/DataGrid.js.map +1 -0
- package/lib/DataGridBody.js +2 -0
- package/lib/DataGridBody.js.map +1 -0
- package/lib/DataGridCell.js +2 -0
- package/lib/DataGridCell.js.map +1 -0
- package/lib/DataGridHeader.js +2 -0
- package/lib/DataGridHeader.js.map +1 -0
- package/lib/DataGridHeaderCell.js +2 -0
- package/lib/DataGridHeaderCell.js.map +1 -0
- package/lib/DataGridRow.js +2 -0
- package/lib/DataGridRow.js.map +1 -0
- package/lib/DataGridSelectionCell.js +2 -0
- package/lib/DataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGrid/DataGrid.js +15 -0
- package/lib/components/DataGrid/DataGrid.js.map +1 -0
- package/lib/components/DataGrid/DataGrid.types.js +2 -0
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -0
- package/lib/components/DataGrid/index.js +6 -0
- package/lib/components/DataGrid/index.js.map +1 -0
- package/lib/components/DataGrid/renderDataGrid.js +12 -0
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib/components/DataGrid/useDataGrid.js +63 -0
- package/lib/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib/components/DataGrid/useDataGridContextValues.js +15 -0
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -0
- package/lib/components/DataGrid/useDataGridStyles.js +14 -0
- package/lib/components/DataGrid/useDataGridStyles.js.map +1 -0
- package/lib/components/DataGridBody/DataGridBody.js +14 -0
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -0
- package/lib/components/DataGridBody/DataGridBody.types.js +2 -0
- package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -0
- package/lib/components/DataGridBody/index.js +6 -0
- package/lib/components/DataGridBody/index.js.map +1 -0
- package/lib/components/DataGridBody/renderDataGridBody.js +19 -0
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -0
- package/lib/components/DataGridBody/useDataGridBody.js +31 -0
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -0
- package/lib/components/DataGridBody/useDataGridBodyStyles.js +14 -0
- package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
- package/lib/components/DataGridCell/DataGridCell.js +14 -0
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -0
- package/lib/components/DataGridCell/DataGridCell.types.js +2 -0
- package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -0
- package/lib/components/DataGridCell/index.js +6 -0
- package/lib/components/DataGridCell/index.js.map +1 -0
- package/lib/components/DataGridCell/renderDataGridCell.js +8 -0
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -0
- package/lib/components/DataGridCell/useDataGridCell.js +21 -0
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -0
- package/lib/components/DataGridCell/useDataGridCellStyles.js +14 -0
- package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
- package/lib/components/DataGridHeader/DataGridHeader.js +14 -0
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -0
- package/lib/components/DataGridHeader/DataGridHeader.types.js +2 -0
- package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
- package/lib/components/DataGridHeader/index.js +6 -0
- package/lib/components/DataGridHeader/index.js.map +1 -0
- package/lib/components/DataGridHeader/renderDataGridHeader.js +8 -0
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
- package/lib/components/DataGridHeader/useDataGridHeader.js +17 -0
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -0
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +14 -0
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +14 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +2 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
- package/lib/components/DataGridHeaderCell/index.js +6 -0
- package/lib/components/DataGridHeaderCell/index.js.map +1 -0
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +8 -0
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +37 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +22 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
- package/lib/components/DataGridRow/DataGridRow.js +14 -0
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -0
- package/lib/components/DataGridRow/DataGridRow.types.js +2 -0
- package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -0
- package/lib/components/DataGridRow/index.js +6 -0
- package/lib/components/DataGridRow/index.js.map +1 -0
- package/lib/components/DataGridRow/renderDataGridRow.js +21 -0
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -0
- package/lib/components/DataGridRow/useDataGridRow.js +70 -0
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -0
- package/lib/components/DataGridRow/useDataGridRowStyles.js +18 -0
- package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +14 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +2 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
- package/lib/components/DataGridSelectionCell/index.js +6 -0
- package/lib/components/DataGridSelectionCell/index.js.map +1 -0
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +8 -0
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +47 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +22 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
- package/lib/components/Table/Table.js +1 -2
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/renderTable.js +2 -2
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTable.js +0 -2
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.js +13 -19
- package/lib/components/Table/useTableStyles.js.map +1 -1
- package/lib/components/TableBody/TableBody.js +1 -2
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js +3 -4
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +0 -2
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.js +6 -10
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib/components/TableCell/TableCell.js +1 -2
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js +2 -2
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +4 -4
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.js +47 -26
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +1 -2
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js +2 -5
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +11 -19
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js +1 -2
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +5 -5
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js +1 -2
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js +2 -2
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +1 -10
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.js +6 -16
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +11 -8
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -67
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableRow/TableRow.js +1 -2
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/TableRow.types.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js +3 -4
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +7 -5
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.js +137 -162
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +9 -5
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -46
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib/contexts/columnIdContext.js +9 -0
- package/lib/contexts/columnIdContext.js.map +1 -0
- package/lib/contexts/dataGridContext.js +13 -0
- package/lib/contexts/dataGridContext.js.map +1 -0
- package/lib/contexts/rowIdContext.js +9 -0
- package/lib/contexts/rowIdContext.js.map +1 -0
- package/lib/contexts/tableContext.js +0 -1
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js.map +1 -1
- package/lib/hooks/createColumn.js +35 -0
- package/lib/hooks/createColumn.js.map +1 -0
- package/lib/hooks/index.js +4 -3
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/selectionManager.js +16 -32
- package/lib/hooks/selectionManager.js.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/{useTable.js → useTableFeatures.js} +12 -9
- package/lib/hooks/useTableFeatures.js.map +1 -0
- package/lib/hooks/{useSelection.js → useTableSelection.js} +18 -18
- package/lib/hooks/useTableSelection.js.map +1 -0
- package/lib/hooks/{useSort.js → useTableSort.js} +12 -21
- package/lib/hooks/useTableSort.js.map +1 -0
- package/lib/index.js +9 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/DataGrid.js +8 -0
- package/lib-commonjs/DataGrid.js.map +1 -0
- package/lib-commonjs/DataGridBody.js +8 -0
- package/lib-commonjs/DataGridBody.js.map +1 -0
- package/lib-commonjs/DataGridCell.js +8 -0
- package/lib-commonjs/DataGridCell.js.map +1 -0
- package/lib-commonjs/DataGridHeader.js +8 -0
- package/lib-commonjs/DataGridHeader.js.map +1 -0
- package/lib-commonjs/DataGridHeaderCell.js +8 -0
- package/lib-commonjs/DataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/DataGridRow.js +8 -0
- package/lib-commonjs/DataGridRow.js.map +1 -0
- package/lib-commonjs/DataGridSelectionCell.js +8 -0
- package/lib-commonjs/DataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/Table.js +0 -2
- package/lib-commonjs/Table.js.map +1 -1
- package/lib-commonjs/TableBody.js +0 -2
- package/lib-commonjs/TableBody.js.map +1 -1
- package/lib-commonjs/TableCell.js +0 -2
- package/lib-commonjs/TableCell.js.map +1 -1
- package/lib-commonjs/TableCellActions.js +0 -2
- package/lib-commonjs/TableCellActions.js.map +1 -1
- package/lib-commonjs/TableCellLayout.js +0 -2
- package/lib-commonjs/TableCellLayout.js.map +1 -1
- package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
- package/lib-commonjs/TableHeader.js +0 -2
- package/lib-commonjs/TableHeader.js.map +1 -1
- package/lib-commonjs/TableHeaderCell.js +0 -2
- package/lib-commonjs/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/TableRow.js +0 -2
- package/lib-commonjs/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js +0 -2
- package/lib-commonjs/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.js +21 -0
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/DataGrid.types.js +6 -0
- package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -0
- package/lib-commonjs/components/DataGrid/index.js +12 -0
- package/lib-commonjs/components/DataGrid/index.js.map +1 -0
- package/lib-commonjs/components/DataGrid/renderDataGrid.js +19 -0
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js +70 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +22 -0
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridStyles.js +21 -0
- package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.js +20 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +6 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/index.js +12 -0
- package/lib-commonjs/components/DataGridBody/index.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +26 -0
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js +38 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +21 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.js +20 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +6 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/index.js +12 -0
- package/lib-commonjs/components/DataGridCell/index.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +15 -0
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js +28 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +21 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +20 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +6 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/index.js +12 -0
- package/lib-commonjs/components/DataGridHeader/index.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +15 -0
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +24 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +21 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +20 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +6 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/index.js +12 -0
- package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +15 -0
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +44 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +29 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.js +20 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +6 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/index.js +12 -0
- package/lib-commonjs/components/DataGridRow/index.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +28 -0
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js +77 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +25 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +20 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +6 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/index.js +12 -0
- package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +15 -0
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +54 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +29 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/components/Table/Table.js +1 -8
- 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 +0 -6
- package/lib-commonjs/components/Table/index.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js +2 -7
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js +0 -5
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.js +13 -23
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableBody/index.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableCell/index.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +4 -8
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +47 -30
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -8
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +11 -23
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -8
- 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 +0 -6
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -9
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableHeader/index.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -15
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +6 -19
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +10 -14
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -71
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableRow/index.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +7 -10
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +137 -170
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
- 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 +0 -6
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +8 -11
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -50
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib-commonjs/contexts/columnIdContext.js +16 -0
- package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
- package/lib-commonjs/contexts/dataGridContext.js +20 -0
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
- package/lib-commonjs/contexts/rowIdContext.js +16 -0
- package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +0 -5
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
- package/lib-commonjs/hooks/createColumn.js +42 -0
- package/lib-commonjs/hooks/createColumn.js.map +1 -0
- package/lib-commonjs/hooks/index.js +4 -8
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/selectionManager.js +16 -34
- package/lib-commonjs/hooks/selectionManager.js.map +1 -1
- package/lib-commonjs/hooks/types.js.map +1 -1
- package/lib-commonjs/hooks/useTableFeatures.js +42 -0
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
- package/lib-commonjs/hooks/{useSelection.js → useTableSelection.js} +21 -28
- package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
- package/lib-commonjs/hooks/{useSort.js → useTableSort.js} +15 -29
- package/lib-commonjs/hooks/useTableSort.js.map +1 -0
- package/lib-commonjs/index.js +244 -30
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +24 -12
- package/lib/hooks/useSelection.js.map +0 -1
- package/lib/hooks/useSort.js.map +0 -1
- package/lib/hooks/useTable.js.map +0 -1
- package/lib-commonjs/hooks/useSelection.js.map +0 -1
- package/lib-commonjs/hooks/useSort.js.map +0 -1
- package/lib-commonjs/hooks/useTable.js +0 -42
- package/lib-commonjs/hooks/useTable.js.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDataGridHeaderCell_unstable = void 0;
|
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
8
|
+
const useTableHeaderCell_1 = /*#__PURE__*/require("../TableHeaderCell/useTableHeaderCell");
|
|
9
|
+
const dataGridContext_1 = /*#__PURE__*/require("../../contexts/dataGridContext");
|
|
10
|
+
const columnIdContext_1 = /*#__PURE__*/require("../../contexts/columnIdContext");
|
|
11
|
+
const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
|
|
12
|
+
/**
|
|
13
|
+
* Create the state required to render DataGridHeaderCell.
|
|
14
|
+
*
|
|
15
|
+
* The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,
|
|
16
|
+
* before being passed to renderDataGridHeaderCell_unstable.
|
|
17
|
+
*
|
|
18
|
+
* @param props - props from this instance of DataGridHeaderCell
|
|
19
|
+
* @param ref - reference to root HTMLElement of DataGridHeaderCell
|
|
20
|
+
*/
|
|
21
|
+
const useDataGridHeaderCell_unstable = (props, ref) => {
|
|
22
|
+
const columnId = columnIdContext_1.useColumnIdContext();
|
|
23
|
+
const {
|
|
24
|
+
sortable
|
|
25
|
+
} = tableContext_1.useTableContext();
|
|
26
|
+
const toggleColumnSort = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);
|
|
27
|
+
const sortDirection = dataGridContext_1.useDataGridContext_unstable(ctx => sortable ? ctx.sort.getSortDirection(columnId) : undefined);
|
|
28
|
+
const onClick = react_utilities_1.useEventCallback(e => {
|
|
29
|
+
var _a;
|
|
30
|
+
if (sortable) {
|
|
31
|
+
toggleColumnSort(e, columnId);
|
|
32
|
+
}
|
|
33
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
34
|
+
});
|
|
35
|
+
return useTableHeaderCell_1.useTableHeaderCell_unstable({
|
|
36
|
+
sortDirection,
|
|
37
|
+
as: 'div',
|
|
38
|
+
tabIndex: sortable ? undefined : 0,
|
|
39
|
+
...props,
|
|
40
|
+
onClick
|
|
41
|
+
}, ref);
|
|
42
|
+
};
|
|
43
|
+
exports.useDataGridHeaderCell_unstable = useDataGridHeaderCell_unstable;
|
|
44
|
+
//# sourceMappingURL=useDataGridHeaderCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;AASO,MAAMA,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAA2B,KACA;EAC3B,MAAMC,QAAQ,GAAGC,oCAAkB,EAAE;EACrC,MAAM;IAAEC;EAAQ,CAAE,GAAGC,8BAAe,EAAE;EACtC,MAAMC,gBAAgB,GAAGC,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACC,IAAI,CAACH,gBAAgB,CAAC;EACtF,MAAMI,aAAa,GAAGH,6CAA2B,CAACC,GAAG,IACnDJ,QAAQ,GAAGI,GAAG,CAACC,IAAI,CAACE,gBAAgB,CAACT,QAAQ,CAAC,GAAGU,SAAS,CAC3D;EACD,MAAMC,OAAO,GAAGC,kCAAgB,CAAEC,CAA+C,IAAI;;IACnF,IAAIX,QAAQ,EAAE;MACZE,gBAAgB,CAACS,CAAC,EAAEb,QAAQ,CAAC;;IAE/B,WAAK,CAACW,OAAO,+CAAbb,KAAK,EAAWe,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOC,gDAA2B,CAChC;IAAEN,aAAa;IAAEO,EAAE,EAAE,KAAK;IAAEC,QAAQ,EAAEd,QAAQ,GAAGQ,SAAS,GAAG,CAAC;IAAE,GAAGZ,KAAK;IAAEa;EAAO,CAAE,EACnFZ,GAAG,CACJ;AACH,CAAC;AArBYkB,sCAA8B","names":["useDataGridHeaderCell_unstable","props","ref","columnId","columnIdContext_1","sortable","tableContext_1","toggleColumnSort","dataGridContext_1","ctx","sort","sortDirection","getSortDirection","undefined","onClick","react_utilities_1","e","useTableHeaderCell_1","as","tabIndex","exports"],"sourceRoot":"../src/","sources":["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 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 { sortDirection, as: 'div', tabIndex: sortable ? undefined : 0, ...props, onClick },\n ref,\n );\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDataGridHeaderCellStyles_unstable = exports.dataGridHeaderCellClassNames = void 0;
|
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
8
|
+
const useTableHeaderCellStyles_1 = /*#__PURE__*/require("../TableHeaderCell/useTableHeaderCellStyles");
|
|
9
|
+
exports.dataGridHeaderCellClassNames = {
|
|
10
|
+
root: 'fui-DataGridHeaderCell',
|
|
11
|
+
button: 'fui-DataGridHeaderCell__button',
|
|
12
|
+
sortIcon: 'fui-DataGridHeaderCell__sortIcon'
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Apply styling to the DataGridHeaderCell slots based on the state
|
|
16
|
+
*/
|
|
17
|
+
const useDataGridHeaderCellStyles_unstable = state => {
|
|
18
|
+
useTableHeaderCellStyles_1.useTableHeaderCellStyles_unstable(state);
|
|
19
|
+
state.root.className = react_1.mergeClasses(exports.dataGridHeaderCellClassNames.root, state.root.className);
|
|
20
|
+
if (state.button) {
|
|
21
|
+
state.button.className = react_1.mergeClasses(exports.dataGridHeaderCellClassNames.button, state.button.className);
|
|
22
|
+
}
|
|
23
|
+
if (state.sortIcon) {
|
|
24
|
+
state.sortIcon.className = react_1.mergeClasses(exports.dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);
|
|
25
|
+
}
|
|
26
|
+
return state;
|
|
27
|
+
};
|
|
28
|
+
exports.useDataGridHeaderCellStyles_unstable = useDataGridHeaderCellStyles_unstable;
|
|
29
|
+
//# sourceMappingURL=useDataGridHeaderCellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAGA;AAEaA,oCAA4B,GAA4C;EACnFC,IAAI,EAAE,wBAAwB;EAC9BC,MAAM,EAAE,gCAAgC;EACxCC,QAAQ,EAAE;CACX;AAED;;;AAGO,MAAMC,oCAAoC,GAAIC,KAA8B,IAA6B;EAC9GC,4DAAiC,CAACD,KAAK,CAAC;EACxCA,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGC,oBAAY,CAACR,oCAA4B,CAACC,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAE5F,IAAIF,KAAK,CAACH,MAAM,EAAE;IAChBG,KAAK,CAACH,MAAM,CAACK,SAAS,GAAGC,oBAAY,CAACR,oCAA4B,CAACE,MAAM,EAAEG,KAAK,CAACH,MAAM,CAACK,SAAS,CAAC;;EAGpG,IAAIF,KAAK,CAACF,QAAQ,EAAE;IAClBE,KAAK,CAACF,QAAQ,CAACI,SAAS,GAAGC,oBAAY,CAACR,oCAA4B,CAACG,QAAQ,EAAEE,KAAK,CAACF,QAAQ,CAACI,SAAS,CAAC;;EAG1G,OAAOF,KAAK;AACd,CAAC;AAbYL,4CAAoC","names":["exports","root","button","sortIcon","useDataGridHeaderCellStyles_unstable","state","useTableHeaderCellStyles_1","className","react_1"],"sourceRoot":"../src/","sources":["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};\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 return state;\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DataGridRow = void 0;
|
|
7
|
+
const React = /*#__PURE__*/require("react");
|
|
8
|
+
const useDataGridRow_1 = /*#__PURE__*/require("./useDataGridRow");
|
|
9
|
+
const renderDataGridRow_1 = /*#__PURE__*/require("./renderDataGridRow");
|
|
10
|
+
const useDataGridRowStyles_1 = /*#__PURE__*/require("./useDataGridRowStyles");
|
|
11
|
+
/**
|
|
12
|
+
* DataGridRow component
|
|
13
|
+
*/
|
|
14
|
+
exports.DataGridRow = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
15
|
+
const state = useDataGridRow_1.useDataGridRow_unstable(props, ref);
|
|
16
|
+
useDataGridRowStyles_1.useDataGridRowStyles_unstable(state);
|
|
17
|
+
return renderDataGridRow_1.renderDataGridRow_unstable(state);
|
|
18
|
+
});
|
|
19
|
+
exports.DataGridRow.displayName = 'DataGridRow';
|
|
20
|
+
//# sourceMappingURL=DataGridRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,mBAAW,gBACqCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC3F,MAAMC,KAAK,GAAGC,wCAAuB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEjDG,oDAA6B,CAACF,KAAK,CAAC;EACpC,OAAOG,8CAA0B,CAACH,KAAK,CAAC;AAC1C,CAAC,CAAqG;AAEtGL,mBAAW,CAACS,WAAW,GAAG,aAAa","names":["exports","React","forwardRef","props","ref","state","useDataGridRow_1","useDataGridRowStyles_1","renderDataGridRow_1","displayName"],"sourceRoot":"../src/","sources":["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';\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 return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
7
|
+
tslib_1.__exportStar(require("./DataGridRow"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./DataGridRow.types"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./renderDataGridRow"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./useDataGridRow"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./useDataGridRowStyles"), exports);
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridRow/index.ts"],"sourcesContent":["export * from './DataGridRow';\nexport * from './DataGridRow.types';\nexport * from './renderDataGridRow';\nexport * from './useDataGridRow';\nexport * from './useDataGridRowStyles';\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.renderDataGridRow_unstable = void 0;
|
|
7
|
+
const React = /*#__PURE__*/require("react");
|
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
9
|
+
const columnIdContext_1 = /*#__PURE__*/require("../../contexts/columnIdContext");
|
|
10
|
+
/**
|
|
11
|
+
* Render the final JSX of DataGridRow
|
|
12
|
+
*/
|
|
13
|
+
const renderDataGridRow_unstable = state => {
|
|
14
|
+
const {
|
|
15
|
+
slots,
|
|
16
|
+
slotProps
|
|
17
|
+
} = react_utilities_1.getSlots(state);
|
|
18
|
+
return React.createElement(slots.root, {
|
|
19
|
+
...slotProps.root
|
|
20
|
+
}, slots.selectionCell && React.createElement(slots.selectionCell, {
|
|
21
|
+
...slotProps.selectionCell
|
|
22
|
+
}), state.columnDefs.map(columnDef => React.createElement(columnIdContext_1.ColumnIdContextProvider, {
|
|
23
|
+
value: columnDef.columnId,
|
|
24
|
+
key: columnDef.columnId
|
|
25
|
+
}, state.renderCell(columnDef))));
|
|
26
|
+
};
|
|
27
|
+
exports.renderDataGridRow_unstable = renderDataGridRow_unstable;
|
|
28
|
+
//# sourceMappingURL=renderDataGridRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAEA;;;AAGO,MAAMA,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAmBH,KAAK,CAAC;EAE9D,OACEI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BJ,KAAK,CAACK,aAAa,IAAIF,oBAACH,KAAK,CAACK,aAAa;IAAA,GAAKJ,SAAS,CAACI;EAAa,EAAI,EAC3EN,KAAK,CAACO,UAAU,CAACC,GAAG,CAACC,SAAS,IAC7BL,oBAACM,yCAAuB;IAACC,KAAK,EAAEF,SAAS,CAACG,QAAQ;IAAEC,GAAG,EAAEJ,SAAS,CAACG;EAAQ,GACxEZ,KAAK,CAACc,UAAU,CAACL,SAAS,CAAC,CAE/B,CAAC,CACS;AAEjB,CAAC;AAbYM,kCAA0B","names":["renderDataGridRow_unstable","state","slots","slotProps","react_utilities_1","React","root","selectionCell","columnDefs","map","columnDef","columnIdContext_1","value","columnId","key","renderCell","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDataGridRow_unstable = void 0;
|
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
8
|
+
const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
|
|
9
|
+
const useTableRow_1 = /*#__PURE__*/require("../TableRow/useTableRow");
|
|
10
|
+
const dataGridContext_1 = /*#__PURE__*/require("../../contexts/dataGridContext");
|
|
11
|
+
const DataGridSelectionCell_1 = /*#__PURE__*/require("../DataGridSelectionCell/DataGridSelectionCell");
|
|
12
|
+
const rowIdContext_1 = /*#__PURE__*/require("../../contexts/rowIdContext");
|
|
13
|
+
const tableHeaderContext_1 = /*#__PURE__*/require("../../contexts/tableHeaderContext");
|
|
14
|
+
/**
|
|
15
|
+
* Create the state required to render DataGridRow.
|
|
16
|
+
*
|
|
17
|
+
* The returned state can be modified with hooks such as useDataGridRowStyles_unstable,
|
|
18
|
+
* before being passed to renderDataGridRow_unstable.
|
|
19
|
+
*
|
|
20
|
+
* @param props - props from this instance of DataGridRow
|
|
21
|
+
* @param ref - reference to root HTMLElement of DataGridRow
|
|
22
|
+
*/
|
|
23
|
+
const useDataGridRow_unstable = (props, ref) => {
|
|
24
|
+
const rowId = rowIdContext_1.useTableRowIdContext();
|
|
25
|
+
const isHeader = tableHeaderContext_1.useIsInTableHeader();
|
|
26
|
+
const columnDefs = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.columns);
|
|
27
|
+
const selectable = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.selectableRows);
|
|
28
|
+
const selected = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));
|
|
29
|
+
const tabbable = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.focusMode === 'row_unstable');
|
|
30
|
+
const appearance = dataGridContext_1.useDataGridContext_unstable(ctx => {
|
|
31
|
+
if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {
|
|
32
|
+
return ctx.selectionAppearance;
|
|
33
|
+
}
|
|
34
|
+
return 'none';
|
|
35
|
+
});
|
|
36
|
+
const toggleRow = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.selection.toggleRow);
|
|
37
|
+
const onClick = react_utilities_1.useEventCallback(e => {
|
|
38
|
+
var _a;
|
|
39
|
+
if (selectable && !isHeader) {
|
|
40
|
+
toggleRow(e, rowId);
|
|
41
|
+
}
|
|
42
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
43
|
+
});
|
|
44
|
+
const onKeyDown = react_utilities_1.useEventCallback(e => {
|
|
45
|
+
var _a;
|
|
46
|
+
if (selectable && !isHeader && e.key === keyboard_keys_1.Space && !react_utilities_1.isInteractiveHTMLElement(e.target)) {
|
|
47
|
+
// stop scrolling
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
toggleRow(e, rowId);
|
|
50
|
+
}
|
|
51
|
+
(_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
52
|
+
});
|
|
53
|
+
const baseState = useTableRow_1.useTableRow_unstable({
|
|
54
|
+
appearance,
|
|
55
|
+
'aria-selected': selectable ? selected : undefined,
|
|
56
|
+
...props,
|
|
57
|
+
onClick,
|
|
58
|
+
onKeyDown,
|
|
59
|
+
children: null,
|
|
60
|
+
as: 'div',
|
|
61
|
+
tabIndex: tabbable && !isHeader ? 0 : undefined
|
|
62
|
+
}, ref);
|
|
63
|
+
return {
|
|
64
|
+
...baseState,
|
|
65
|
+
components: {
|
|
66
|
+
...baseState.components,
|
|
67
|
+
selectionCell: DataGridSelectionCell_1.DataGridSelectionCell
|
|
68
|
+
},
|
|
69
|
+
selectionCell: react_utilities_1.resolveShorthand(props.selectionCell, {
|
|
70
|
+
required: selectable
|
|
71
|
+
}),
|
|
72
|
+
renderCell: props.children,
|
|
73
|
+
columnDefs
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
exports.useDataGridRow_unstable = useDataGridRow_unstable;
|
|
77
|
+
//# sourceMappingURL=useDataGridRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;AASO,MAAMA,uBAAuB,GAAG,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;EAChH,MAAMC,KAAK,GAAGC,mCAAoB,EAAE;EACpC,MAAMC,QAAQ,GAAGC,uCAAkB,EAAE;EACrC,MAAMC,UAAU,GAAGC,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACC,OAAO,CAAC;EAClE,MAAMC,UAAU,GAAGH,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACG,cAAc,CAAC;EACzE,MAAMC,QAAQ,GAAGL,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACK,SAAS,CAACC,aAAa,CAACZ,KAAK,CAAC,CAAC;EACvF,MAAMa,QAAQ,GAAGR,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACQ,SAAS,KAAK,cAAc,CAAC;EACrF,MAAMC,UAAU,GAAGV,6CAA2B,CAACC,GAAG,IAAG;IACnD,IAAI,CAACJ,QAAQ,IAAIM,UAAU,IAAIF,GAAG,CAACK,SAAS,CAACC,aAAa,CAACZ,KAAK,CAAC,EAAE;MACjE,OAAOM,GAAG,CAACU,mBAAmB;;IAGhC,OAAO,MAAM;EACf,CAAC,CAAC;EACF,MAAMC,SAAS,GAAGZ,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACK,SAAS,CAACM,SAAS,CAAC;EAE7E,MAAMC,OAAO,GAAGC,kCAAgB,CAAEC,CAAwC,IAAI;;IAC5E,IAAIZ,UAAU,IAAI,CAACN,QAAQ,EAAE;MAC3Be,SAAS,CAACG,CAAC,EAAEpB,KAAK,CAAC;;IAGrB,WAAK,CAACkB,OAAO,+CAAbpB,KAAK,EAAWsB,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,MAAMC,SAAS,GAAGF,kCAAgB,CAAEC,CAA2C,IAAI;;IACjF,IAAIZ,UAAU,IAAI,CAACN,QAAQ,IAAIkB,CAAC,CAACE,GAAG,KAAKC,qBAAK,IAAI,CAACJ,0CAAwB,CAACC,CAAC,CAACI,MAAqB,CAAC,EAAE;MACpG;MACAJ,CAAC,CAACK,cAAc,EAAE;MAClBR,SAAS,CAACG,CAAC,EAAEpB,KAAK,CAAC;;IAGrB,WAAK,CAACqB,SAAS,+CAAfvB,KAAK,EAAasB,CAAC,CAAC;EACtB,CAAC,CAAC;EAEF,MAAMM,SAAS,GAAGC,kCAAoB,CACpC;IACEZ,UAAU;IACV,eAAe,EAAEP,UAAU,GAAGE,QAAQ,GAAGkB,SAAS;IAClD,GAAG9B,KAAK;IACRoB,OAAO;IACPG,SAAS;IACTQ,QAAQ,EAAE,IAAI;IACdC,EAAE,EAAE,KAAK;IACTC,QAAQ,EAAElB,QAAQ,IAAI,CAACX,QAAQ,GAAG,CAAC,GAAG0B;GACvC,EACD7B,GAAG,CACJ;EAED,OAAO;IACL,GAAG2B,SAAS;IACZM,UAAU,EAAE;MACV,GAAGN,SAAS,CAACM,UAAU;MACvBC,aAAa,EAAEC;KAChB;IACDD,aAAa,EAAEd,kCAAgB,CAACrB,KAAK,CAACmC,aAAa,EAAE;MAAEE,QAAQ,EAAE3B;IAAU,CAAE,CAAC;IAC9E4B,UAAU,EAAEtC,KAAK,CAAC+B,QAAQ;IAC1BzB;GACD;AACH,CAAC;AA1DYiC,+BAAuB","names":["useDataGridRow_unstable","props","ref","rowId","rowIdContext_1","isHeader","tableHeaderContext_1","columnDefs","dataGridContext_1","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","tabbable","focusMode","appearance","selectionAppearance","toggleRow","onClick","react_utilities_1","e","onKeyDown","key","keyboard_keys_1","target","preventDefault","baseState","useTableRow_1","undefined","children","as","tabIndex","components","selectionCell","DataGridSelectionCell_1","required","renderCell","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDataGridRowStyles_unstable = exports.dataGridRowClassNames = void 0;
|
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
8
|
+
const useTableRowStyles_1 = /*#__PURE__*/require("../TableRow/useTableRowStyles");
|
|
9
|
+
exports.dataGridRowClassNames = {
|
|
10
|
+
root: 'fui-DataGridRow',
|
|
11
|
+
selectionCell: 'fui-DataGridRow__selectionCell'
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Apply styling to the DataGridRow slots based on the state
|
|
15
|
+
*/
|
|
16
|
+
const useDataGridRowStyles_unstable = state => {
|
|
17
|
+
useTableRowStyles_1.useTableRowStyles_unstable(state);
|
|
18
|
+
state.root.className = react_1.mergeClasses(exports.dataGridRowClassNames.root, state.root.className);
|
|
19
|
+
if (state.selectionCell) {
|
|
20
|
+
state.selectionCell.className = react_1.mergeClasses(exports.dataGridRowClassNames.selectionCell, state.selectionCell.className);
|
|
21
|
+
}
|
|
22
|
+
return state;
|
|
23
|
+
};
|
|
24
|
+
exports.useDataGridRowStyles_unstable = useDataGridRowStyles_unstable;
|
|
25
|
+
//# sourceMappingURL=useDataGridRowStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAGA;AAEaA,6BAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,aAAa,EAAE;CAChB;AAED;;;AAGO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzFC,8CAA0B,CAACD,KAAK,CAAC;EACjCA,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGC,oBAAY,CAACP,6BAAqB,CAACC,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EACrF,IAAIF,KAAK,CAACF,aAAa,EAAE;IACvBE,KAAK,CAACF,aAAa,CAACI,SAAS,GAAGC,oBAAY,CAACP,6BAAqB,CAACE,aAAa,EAAEE,KAAK,CAACF,aAAa,CAACI,SAAS,CAAC;;EAGlH,OAAOF,KAAK;AACd,CAAC;AARYJ,qCAA6B","names":["exports","root","selectionCell","useDataGridRowStyles_unstable","state","useTableRowStyles_1","className","react_1"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DataGridSelectionCell = void 0;
|
|
7
|
+
const React = /*#__PURE__*/require("react");
|
|
8
|
+
const useDataGridSelectionCell_1 = /*#__PURE__*/require("./useDataGridSelectionCell");
|
|
9
|
+
const renderDataGridSelectionCell_1 = /*#__PURE__*/require("./renderDataGridSelectionCell");
|
|
10
|
+
const useDataGridSelectionCellStyles_1 = /*#__PURE__*/require("./useDataGridSelectionCellStyles");
|
|
11
|
+
/**
|
|
12
|
+
* DataGridSelectionCell component
|
|
13
|
+
*/
|
|
14
|
+
exports.DataGridSelectionCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
15
|
+
const state = useDataGridSelectionCell_1.useDataGridSelectionCell_unstable(props, ref);
|
|
16
|
+
useDataGridSelectionCellStyles_1.useDataGridSelectionCellStyles_unstable(state);
|
|
17
|
+
return renderDataGridSelectionCell_1.renderDataGridSelectionCell_unstable(state);
|
|
18
|
+
});
|
|
19
|
+
exports.DataGridSelectionCell.displayName = 'DataGridSelectionCell';
|
|
20
|
+
//# sourceMappingURL=DataGridSelectionCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,6BAAqB,gBAAoDC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpH,MAAMC,KAAK,GAAGC,4DAAiC,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE3DG,wEAAuC,CAACF,KAAK,CAAC;EAC9C,OAAOG,kEAAoC,CAACH,KAAK,CAAC;AACpD,CAAC,CAAC;AAEFL,6BAAqB,CAACS,WAAW,GAAG,uBAAuB","names":["exports","React","forwardRef","props","ref","state","useDataGridSelectionCell_1","useDataGridSelectionCellStyles_1","renderDataGridSelectionCell_1","displayName"],"sourceRoot":"../src/","sources":["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';\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 return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
7
|
+
tslib_1.__exportStar(require("./DataGridSelectionCell"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./DataGridSelectionCell.types"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./renderDataGridSelectionCell"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./useDataGridSelectionCell"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./useDataGridSelectionCellStyles"), exports);
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridSelectionCell/index.ts"],"sourcesContent":["export * from './DataGridSelectionCell';\nexport * from './DataGridSelectionCell.types';\nexport * from './renderDataGridSelectionCell';\nexport * from './useDataGridSelectionCell';\nexport * from './useDataGridSelectionCellStyles';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.renderDataGridSelectionCell_unstable = void 0;
|
|
7
|
+
const renderTableSelectionCell_1 = /*#__PURE__*/require("../TableSelectionCell/renderTableSelectionCell");
|
|
8
|
+
/**
|
|
9
|
+
* Render the final JSX of DataGridSelectionCell
|
|
10
|
+
*/
|
|
11
|
+
const renderDataGridSelectionCell_unstable = state => {
|
|
12
|
+
return renderTableSelectionCell_1.renderTableSelectionCell_unstable(state);
|
|
13
|
+
};
|
|
14
|
+
exports.renderDataGridSelectionCell_unstable = renderDataGridSelectionCell_unstable;
|
|
15
|
+
//# sourceMappingURL=renderDataGridSelectionCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AAEA;;;AAGO,MAAMA,oCAAoC,GAAIC,KAAiC,IAAI;EACxF,OAAOC,4DAAiC,CAACD,KAAK,CAAC;AACjD,CAAC;AAFYE,4CAAoC","names":["renderDataGridSelectionCell_unstable","state","renderTableSelectionCell_1","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDataGridSelectionCell_unstable = void 0;
|
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
8
|
+
const dataGridContext_1 = /*#__PURE__*/require("../../contexts/dataGridContext");
|
|
9
|
+
const rowIdContext_1 = /*#__PURE__*/require("../../contexts/rowIdContext");
|
|
10
|
+
const tableHeaderContext_1 = /*#__PURE__*/require("../../contexts/tableHeaderContext");
|
|
11
|
+
const useTableSelectionCell_1 = /*#__PURE__*/require("../TableSelectionCell/useTableSelectionCell");
|
|
12
|
+
/**
|
|
13
|
+
* Create the state required to render DataGridSelectionCell.
|
|
14
|
+
*
|
|
15
|
+
* The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,
|
|
16
|
+
* before being passed to renderDataGridSelectionCell_unstable.
|
|
17
|
+
*
|
|
18
|
+
* @param props - props from this instance of DataGridSelectionCell
|
|
19
|
+
* @param ref - reference to root HTMLElement of DataGridSelectionCell
|
|
20
|
+
*/
|
|
21
|
+
const useDataGridSelectionCell_unstable = (props, ref) => {
|
|
22
|
+
const isHeader = tableHeaderContext_1.useIsInTableHeader();
|
|
23
|
+
const rowId = rowIdContext_1.useTableRowIdContext();
|
|
24
|
+
const subtle = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.subtleSelection);
|
|
25
|
+
const checked = dataGridContext_1.useDataGridContext_unstable(ctx => {
|
|
26
|
+
if (isHeader && ctx.selection.selectionMode === 'multiselect') {
|
|
27
|
+
return ctx.selection.allRowsSelected ? true : ctx.selection.someRowsSelected ? 'mixed' : false;
|
|
28
|
+
}
|
|
29
|
+
return ctx.selection.isRowSelected(rowId);
|
|
30
|
+
});
|
|
31
|
+
const toggleAllRows = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.selection.toggleAllRows);
|
|
32
|
+
const type = dataGridContext_1.useDataGridContext_unstable(ctx => ctx.selection.selectionMode === 'multiselect' ? 'checkbox' : 'radio');
|
|
33
|
+
const onClick = react_utilities_1.useEventCallback(e => {
|
|
34
|
+
var _a;
|
|
35
|
+
if (isHeader) {
|
|
36
|
+
toggleAllRows(e);
|
|
37
|
+
}
|
|
38
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
39
|
+
});
|
|
40
|
+
return useTableSelectionCell_1.useTableSelectionCell_unstable({
|
|
41
|
+
as: 'div',
|
|
42
|
+
role: 'gridcell',
|
|
43
|
+
checked,
|
|
44
|
+
type,
|
|
45
|
+
hidden: isHeader && type === 'radio',
|
|
46
|
+
'aria-checked': isHeader ? checked : undefined,
|
|
47
|
+
'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,
|
|
48
|
+
subtle,
|
|
49
|
+
...props,
|
|
50
|
+
onClick
|
|
51
|
+
}, ref);
|
|
52
|
+
};
|
|
53
|
+
exports.useDataGridSelectionCell_unstable = useDataGridSelectionCell_unstable;
|
|
54
|
+
//# sourceMappingURL=useDataGridSelectionCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;;AASO,MAAMA,iCAAiC,GAAG,CAC/CC,KAAiC,EACjCC,GAA2B,KACG;EAC9B,MAAMC,QAAQ,GAAGC,uCAAkB,EAAE;EACrC,MAAMC,KAAK,GAAGC,mCAAoB,EAAE;EACpC,MAAMC,MAAM,GAAGC,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACC,eAAe,CAAC;EACtE,MAAMC,OAAO,GAAGH,6CAA2B,CAACC,GAAG,IAAG;IAChD,IAAIN,QAAQ,IAAIM,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,CAACX,KAAK,CAAC;EAC3C,CAAC,CAAC;EAEF,MAAMY,aAAa,GAAGT,6CAA2B,CAACC,GAAG,IAAIA,GAAG,CAACG,SAAS,CAACK,aAAa,CAAC;EACrF,MAAMC,IAAI,GAAGV,6CAA2B,CAACC,GAAG,IAC1CA,GAAG,CAACG,SAAS,CAACC,aAAa,KAAK,aAAa,GAAG,UAAU,GAAG,OAAO,CACrE;EAED,MAAMM,OAAO,GAAGC,kCAAgB,CAAEC,CAAyC,IAAI;;IAC7E,IAAIlB,QAAQ,EAAE;MACZc,aAAa,CAACI,CAAC,CAAC;;IAGlB,WAAK,CAACF,OAAO,+CAAblB,KAAK,EAAWoB,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOC,sDAA8B,CACnC;IACEC,EAAE,EAAE,KAAK;IACTC,IAAI,EAAE,UAAU;IAChBb,OAAO;IACPO,IAAI;IACJO,MAAM,EAAEtB,QAAQ,IAAIe,IAAI,KAAK,OAAO;IACpC,cAAc,EAAEf,QAAQ,GAAGQ,OAAO,GAAGe,SAAS;IAC9C,eAAe,EAAEvB,QAAQ,IAAIQ,OAAO,KAAK,OAAO,GAAGe,SAAS,GAAGf,OAAO;IACtEJ,MAAM;IACN,GAAGN,KAAK;IACRkB;GACD,EACDjB,GAAG,CACJ;AACH,CAAC;AA3CYyB,yCAAiC","names":["useDataGridSelectionCell_unstable","props","ref","isHeader","tableHeaderContext_1","rowId","rowIdContext_1","subtle","dataGridContext_1","ctx","subtleSelection","checked","selection","selectionMode","allRowsSelected","someRowsSelected","isRowSelected","toggleAllRows","type","onClick","react_utilities_1","e","useTableSelectionCell_1","as","role","hidden","undefined","exports"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDataGridSelectionCellStyles_unstable = exports.dataGridSelectionCellClassNames = void 0;
|
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
8
|
+
const useTableSelectionCellStyles_1 = /*#__PURE__*/require("../TableSelectionCell/useTableSelectionCellStyles");
|
|
9
|
+
exports.dataGridSelectionCellClassNames = {
|
|
10
|
+
root: 'fui-DataGridSelectionCell',
|
|
11
|
+
checkboxIndicator: 'fui-DataGridSelectionCell__checkboxIndicator',
|
|
12
|
+
radioIndicator: 'fui-DataGridSelectionCell__radioIndicator'
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Apply styling to the DataGridSelectionCell slots based on the state
|
|
16
|
+
*/
|
|
17
|
+
const useDataGridSelectionCellStyles_unstable = state => {
|
|
18
|
+
useTableSelectionCellStyles_1.useTableSelectionCellStyles_unstable(state);
|
|
19
|
+
state.root.className = react_1.mergeClasses(exports.dataGridSelectionCellClassNames.root, state.root.className);
|
|
20
|
+
if (state.checkboxIndicator) {
|
|
21
|
+
state.checkboxIndicator.className = react_1.mergeClasses(exports.dataGridSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);
|
|
22
|
+
}
|
|
23
|
+
if (state.radioIndicator) {
|
|
24
|
+
state.radioIndicator.className = react_1.mergeClasses(exports.dataGridSelectionCellClassNames.radioIndicator, state.radioIndicator.className);
|
|
25
|
+
}
|
|
26
|
+
return state;
|
|
27
|
+
};
|
|
28
|
+
exports.useDataGridSelectionCellStyles_unstable = useDataGridSelectionCellStyles_unstable;
|
|
29
|
+
//# sourceMappingURL=useDataGridSelectionCellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAGA;AAEaA,uCAA+B,GAA+C;EACzFC,IAAI,EAAE,2BAA2B;EACjCC,iBAAiB,EAAE,8CAA8C;EACjEC,cAAc,EAAE;CACjB;AAED;;;AAGO,MAAMC,uCAAuC,GAClDC,KAAiC,IACH;EAC9BC,kEAAoC,CAACD,KAAK,CAAC;EAC3CA,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGC,oBAAY,CAACR,uCAA+B,CAACC,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EAE/F,IAAIF,KAAK,CAACH,iBAAiB,EAAE;IAC3BG,KAAK,CAACH,iBAAiB,CAACK,SAAS,GAAGC,oBAAY,CAC9CR,uCAA+B,CAACE,iBAAiB,EACjDG,KAAK,CAACH,iBAAiB,CAACK,SAAS,CAClC;;EAGH,IAAIF,KAAK,CAACF,cAAc,EAAE;IACxBE,KAAK,CAACF,cAAc,CAACI,SAAS,GAAGC,oBAAY,CAC3CR,uCAA+B,CAACG,cAAc,EAC9CE,KAAK,CAACF,cAAc,CAACI,SAAS,CAC/B;;EAGH,OAAOF,KAAK;AACd,CAAC;AArBYL,+CAAuC","names":["exports","root","checkboxIndicator","radioIndicator","useDataGridSelectionCellStyles_unstable","state","useTableSelectionCellStyles_1","className","react_1"],"sourceRoot":"../src/","sources":["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"]}
|
|
@@ -4,21 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Table = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const useTable_1 = /*#__PURE__*/require("./useTable");
|
|
11
|
-
|
|
12
9
|
const renderTable_1 = /*#__PURE__*/require("./renderTable");
|
|
13
|
-
|
|
14
10
|
const useTableStyles_1 = /*#__PURE__*/require("./useTableStyles");
|
|
15
|
-
|
|
16
11
|
const useTableContextValues_1 = /*#__PURE__*/require("./useTableContextValues");
|
|
17
12
|
/**
|
|
18
|
-
* Table component
|
|
13
|
+
* Table component
|
|
19
14
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
15
|
exports.Table = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
23
16
|
const state = useTable_1.useTable_unstable(props, ref);
|
|
24
17
|
useTableStyles_1.useTableStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAGA;AAEA;;;AAGaA,aAAK,gBAAoCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGC,4BAAiB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE3CG,wCAAuB,CAACF,KAAK,CAAC;EAC9B,OAAOG,kCAAoB,CAACH,KAAK,EAAEI,sDAA8B,CAACJ,KAAK,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEFL,aAAK,CAACU,WAAW,GAAG,OAAO","names":["exports","React","forwardRef","props","ref","state","useTable_1","useTableStyles_1","renderTable_1","useTableContextValues_1","displayName"],"sourceRoot":"../src/","sources":["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';\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 return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
7
|
tslib_1.__exportStar(require("./Table"), exports);
|
|
10
|
-
|
|
11
8
|
tslib_1.__exportStar(require("./Table.types"), exports);
|
|
12
|
-
|
|
13
9
|
tslib_1.__exportStar(require("./renderTable"), exports);
|
|
14
|
-
|
|
15
10
|
tslib_1.__exportStar(require("./useTable"), exports);
|
|
16
|
-
|
|
17
11
|
tslib_1.__exportStar(require("./useTableStyles"), exports);
|
|
18
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/index.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/Table/index.ts"],"sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles';\n"]}
|
|
@@ -4,17 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderTable_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
|
-
|
|
12
9
|
const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
|
|
13
10
|
/**
|
|
14
11
|
* Render the final JSX of Table
|
|
15
12
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
13
|
const renderTable_unstable = (state, contextValues) => {
|
|
19
14
|
const {
|
|
20
15
|
slots,
|
|
@@ -22,9 +17,9 @@ const renderTable_unstable = (state, contextValues) => {
|
|
|
22
17
|
} = react_utilities_1.getSlots(state);
|
|
23
18
|
return React.createElement(tableContext_1.TableContextProvider, {
|
|
24
19
|
value: contextValues.table
|
|
25
|
-
}, React.createElement(slots.root, {
|
|
20
|
+
}, React.createElement(slots.root, {
|
|
21
|
+
...slotProps.root
|
|
26
22
|
}));
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
exports.renderTable_unstable = renderTable_unstable;
|
|
30
25
|
//# sourceMappingURL=renderTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAEA;;;AAGO,MAAMA,oBAAoB,GAAG,CAACC,KAAiB,EAAEC,aAAiC,KAAI;EAC3F,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAaJ,KAAK,CAAC;EAExD,OACEK,oBAACC,mCAAoB;IAACC,KAAK,EAAEN,aAAa,CAACO;EAAK,GAC9CH,oBAACH,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,CACb;AAE3B,CAAC;AARYC,4BAAoB","names":["renderTable_unstable","state","contextValues","slots","slotProps","react_utilities_1","React","tableContext_1","value","table","root","exports"],"sourceRoot":"../src/","sources":["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"]}
|