@mui/x-data-grid 8.0.0-beta.2 → 8.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -0
- package/DataGrid/DataGrid.js +8 -2
- package/DataGrid/useDataGridProps.js +1 -1
- package/components/GridScrollArea.js +4 -4
- package/components/GridSkeletonLoadingOverlay.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +24 -13
- package/components/cell/GridActionsCellItem.js +5 -2
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/components/export/ExportCsv.js +4 -129
- package/components/export/ExportPrint.js +4 -129
- package/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/quickFilter/QuickFilterClear.js +3 -100
- package/components/quickFilter/QuickFilterControl.js +0 -2
- package/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/components/toolbar/GridToolbar.js +4 -1
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/components/toolbarV8/GridToolbar.js +64 -9
- package/components/toolbarV8/Toolbar.js +2 -0
- package/components/toolbarV8/ToolbarButton.js +3 -100
- package/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/constants/cssVariables.d.ts +3 -0
- package/constants/cssVariables.js +2 -1
- package/constants/gridClasses.d.ts +8 -0
- package/constants/gridClasses.js +1 -1
- package/esm/DataGrid/DataGrid.js +8 -2
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/components/GridScrollArea.js +4 -4
- package/esm/components/GridSkeletonLoadingOverlay.js +2 -2
- package/esm/components/cell/GridActionsCellItem.d.ts +24 -13
- package/esm/components/cell/GridActionsCellItem.js +4 -3
- package/esm/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/esm/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/esm/components/export/ExportCsv.js +4 -129
- package/esm/components/export/ExportPrint.js +4 -129
- package/esm/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/esm/components/panel/GridPanel.d.ts +2 -2
- package/esm/components/panel/GridPanel.js +1 -1
- package/esm/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilterClear.js +3 -100
- package/esm/components/quickFilter/QuickFilterControl.js +0 -2
- package/esm/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/esm/components/toolbar/GridToolbar.js +4 -1
- package/esm/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/esm/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/esm/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/esm/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/esm/components/toolbarV8/GridToolbar.js +62 -9
- package/esm/components/toolbarV8/Toolbar.js +2 -0
- package/esm/components/toolbarV8/ToolbarButton.js +3 -100
- package/esm/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +2 -2
- package/esm/constants/cssVariables.d.ts +3 -0
- package/esm/constants/cssVariables.js +2 -1
- package/esm/constants/gridClasses.d.ts +8 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/hooks/core/gridCoreSelector.d.ts +1 -1
- package/esm/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/esm/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/esm/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/esm/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/esm/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/esm/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/esm/hooks/features/columns/useGridColumns.js +2 -2
- package/esm/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/esm/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/esm/hooks/features/density/densitySelector.d.ts +2 -2
- package/esm/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/esm/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/esm/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/esm/hooks/features/editing/useGridCellEditing.js +8 -8
- package/esm/hooks/features/editing/useGridRowEditing.js +9 -9
- package/esm/hooks/features/events/useGridEvents.js +18 -18
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/esm/hooks/features/filter/useGridFilter.js +6 -6
- package/esm/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/esm/hooks/features/focus/useGridFocus.js +10 -10
- package/esm/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/esm/hooks/features/listView/useGridListView.d.ts +4 -4
- package/esm/hooks/features/listView/useGridListView.js +9 -9
- package/esm/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/esm/hooks/features/pagination/useGridPaginationModel.js +6 -6
- package/esm/hooks/features/pagination/useGridRowCount.js +2 -2
- package/esm/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/esm/hooks/features/rowSelection/utils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/esm/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/esm/hooks/features/rows/gridRowsSelector.js +7 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -2
- package/esm/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/esm/hooks/features/rows/useGridRows.js +5 -5
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -2
- package/esm/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/esm/hooks/features/sorting/useGridSorting.js +6 -6
- package/esm/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/index.js +1 -1
- package/esm/hooks/utils/useGridAriaAttributes.js +6 -0
- package/esm/hooks/utils/{useGridApiEventHandler.d.ts → useGridEvent.d.ts} +2 -2
- package/{modern/hooks/utils/useGridApiEventHandler.js → esm/hooks/utils/useGridEvent.js} +3 -3
- package/esm/hooks/utils/useGridNativeEventListener.js +2 -2
- package/esm/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/esm/index.js +1 -1
- package/esm/material/augmentation.d.ts +74 -0
- package/esm/material/augmentation.js +1 -0
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +262 -141
- package/esm/material/variables.js +2 -0
- package/esm/models/colDef/gridColDef.d.ts +1 -1
- package/esm/models/colDef/index.d.ts +1 -1
- package/esm/models/gridBaseSlots.d.ts +25 -36
- package/esm/models/gridSlotsComponentsProps.d.ts +1 -19
- package/esm/models/props/DataGridProps.d.ts +14 -8
- package/hooks/core/gridCoreSelector.d.ts +1 -1
- package/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/hooks/features/columns/useGridColumns.js +2 -2
- package/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/hooks/features/dataSource/useGridDataSource.js +2 -2
- package/hooks/features/density/densitySelector.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/hooks/features/editing/useGridCellEditing.js +8 -8
- package/hooks/features/editing/useGridRowEditing.js +9 -9
- package/hooks/features/events/useGridEvents.js +18 -18
- package/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/hooks/features/filter/useGridFilter.js +6 -6
- package/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/hooks/features/focus/useGridFocus.js +10 -10
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/hooks/features/listView/useGridListView.d.ts +4 -4
- package/hooks/features/listView/useGridListView.js +9 -9
- package/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/hooks/features/pagination/useGridPaginationModel.js +5 -5
- package/hooks/features/pagination/useGridRowCount.js +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/hooks/features/rowSelection/utils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/hooks/features/rows/gridRowsSelector.js +8 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/hooks/features/rows/useGridRows.js +4 -4
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/hooks/features/sorting/useGridSorting.js +6 -6
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +6 -6
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +8 -8
- package/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{modern/hooks/utils/useGridApiEventHandler.d.ts → hooks/utils/useGridEvent.d.ts} +2 -2
- package/hooks/utils/{useGridApiEventHandler.js → useGridEvent.js} +5 -5
- package/hooks/utils/useGridNativeEventListener.js +2 -2
- package/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/index.js +1 -1
- package/material/augmentation.d.ts +74 -0
- package/material/augmentation.js +5 -0
- package/material/index.d.ts +1 -0
- package/material/index.js +261 -141
- package/material/variables.js +2 -0
- package/models/colDef/gridColDef.d.ts +1 -1
- package/models/colDef/index.d.ts +1 -1
- package/models/gridBaseSlots.d.ts +25 -36
- package/models/gridSlotsComponentsProps.d.ts +1 -19
- package/models/props/DataGridProps.d.ts +14 -8
- package/modern/DataGrid/DataGrid.js +8 -2
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/components/GridScrollArea.js +4 -4
- package/modern/components/GridSkeletonLoadingOverlay.js +2 -2
- package/modern/components/cell/GridActionsCellItem.d.ts +24 -13
- package/modern/components/cell/GridActionsCellItem.js +4 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/modern/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/modern/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/modern/components/export/ExportCsv.js +4 -129
- package/modern/components/export/ExportPrint.js +4 -129
- package/modern/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/modern/components/panel/GridPanel.d.ts +2 -2
- package/modern/components/panel/GridPanel.js +1 -1
- package/modern/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/modern/components/quickFilter/QuickFilterClear.js +3 -100
- package/modern/components/quickFilter/QuickFilterControl.js +0 -2
- package/modern/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/modern/components/toolbar/GridToolbar.js +4 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/modern/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/modern/components/toolbarV8/GridToolbar.js +62 -9
- package/modern/components/toolbarV8/Toolbar.js +2 -0
- package/modern/components/toolbarV8/ToolbarButton.js +3 -100
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -2
- package/modern/constants/cssVariables.d.ts +3 -0
- package/modern/constants/cssVariables.js +2 -1
- package/modern/constants/gridClasses.d.ts +8 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/core/gridCoreSelector.d.ts +1 -1
- package/modern/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/modern/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/modern/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/modern/hooks/features/columns/useGridColumns.js +2 -2
- package/modern/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/modern/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/modern/hooks/features/density/densitySelector.d.ts +2 -2
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/modern/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/modern/hooks/features/editing/useGridCellEditing.js +8 -8
- package/modern/hooks/features/editing/useGridRowEditing.js +9 -9
- package/modern/hooks/features/events/useGridEvents.js +18 -18
- package/modern/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/modern/hooks/features/filter/useGridFilter.js +6 -6
- package/modern/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/modern/hooks/features/focus/useGridFocus.js +10 -10
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/modern/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/modern/hooks/features/listView/useGridListView.d.ts +4 -4
- package/modern/hooks/features/listView/useGridListView.js +9 -9
- package/modern/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/modern/hooks/features/pagination/useGridPaginationModel.js +6 -6
- package/modern/hooks/features/pagination/useGridRowCount.js +2 -2
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/modern/hooks/features/rowSelection/utils.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/modern/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/modern/hooks/features/rows/gridRowsSelector.js +7 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -2
- package/modern/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/modern/hooks/features/rows/useGridRows.js +5 -5
- package/modern/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/modern/hooks/features/scroll/useGridScroll.js +2 -2
- package/modern/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/modern/hooks/features/sorting/useGridSorting.js +6 -6
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/modern/hooks/utils/index.d.ts +1 -1
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{hooks/utils/useGridApiEventHandler.d.ts → modern/hooks/utils/useGridEvent.d.ts} +2 -2
- package/{esm/hooks/utils/useGridApiEventHandler.js → modern/hooks/utils/useGridEvent.js} +3 -3
- package/modern/hooks/utils/useGridNativeEventListener.js +2 -2
- package/modern/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/modern/index.js +1 -1
- package/modern/material/augmentation.d.ts +74 -0
- package/modern/material/augmentation.js +1 -0
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +262 -141
- package/modern/material/variables.js +2 -0
- package/modern/models/colDef/gridColDef.d.ts +1 -1
- package/modern/models/colDef/index.d.ts +1 -1
- package/modern/models/gridBaseSlots.d.ts +25 -36
- package/modern/models/gridSlotsComponentsProps.d.ts +1 -19
- package/modern/models/props/DataGridProps.d.ts +14 -8
- package/package.json +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useGridEventPriority } from "../../utils/useGridEvent.js";
|
|
2
2
|
/**
|
|
3
3
|
* @requires useGridFocus (event) - can be after, async only
|
|
4
4
|
* @requires useGridColumns (event) - can be after, async only
|
|
5
5
|
*/
|
|
6
6
|
export function useGridEvents(apiRef, props) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
useGridEventPriority(apiRef, 'columnHeaderClick', props.onColumnHeaderClick);
|
|
8
|
+
useGridEventPriority(apiRef, 'columnHeaderContextMenu', props.onColumnHeaderContextMenu);
|
|
9
|
+
useGridEventPriority(apiRef, 'columnHeaderDoubleClick', props.onColumnHeaderDoubleClick);
|
|
10
|
+
useGridEventPriority(apiRef, 'columnHeaderOver', props.onColumnHeaderOver);
|
|
11
|
+
useGridEventPriority(apiRef, 'columnHeaderOut', props.onColumnHeaderOut);
|
|
12
|
+
useGridEventPriority(apiRef, 'columnHeaderEnter', props.onColumnHeaderEnter);
|
|
13
|
+
useGridEventPriority(apiRef, 'columnHeaderLeave', props.onColumnHeaderLeave);
|
|
14
|
+
useGridEventPriority(apiRef, 'cellClick', props.onCellClick);
|
|
15
|
+
useGridEventPriority(apiRef, 'cellDoubleClick', props.onCellDoubleClick);
|
|
16
|
+
useGridEventPriority(apiRef, 'cellKeyDown', props.onCellKeyDown);
|
|
17
|
+
useGridEventPriority(apiRef, 'preferencePanelClose', props.onPreferencePanelClose);
|
|
18
|
+
useGridEventPriority(apiRef, 'preferencePanelOpen', props.onPreferencePanelOpen);
|
|
19
|
+
useGridEventPriority(apiRef, 'menuOpen', props.onMenuOpen);
|
|
20
|
+
useGridEventPriority(apiRef, 'menuClose', props.onMenuClose);
|
|
21
|
+
useGridEventPriority(apiRef, 'rowDoubleClick', props.onRowDoubleClick);
|
|
22
|
+
useGridEventPriority(apiRef, 'rowClick', props.onRowClick);
|
|
23
|
+
useGridEventPriority(apiRef, 'stateChange', props.onStateChange);
|
|
24
24
|
}
|
|
@@ -5,94 +5,94 @@ import { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
|
5
5
|
* Get the current filter model.
|
|
6
6
|
* @category Filtering
|
|
7
7
|
*/
|
|
8
|
-
export declare const gridFilterModelSelector: import("
|
|
8
|
+
export declare const gridFilterModelSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridFilterState, import("@mui/x-data-grid").GridFilterModel>;
|
|
9
9
|
/**
|
|
10
10
|
* Get the current quick filter values.
|
|
11
11
|
* @category Filtering
|
|
12
12
|
*/
|
|
13
|
-
export declare const gridQuickFilterValuesSelector: import("
|
|
13
|
+
export declare const gridQuickFilterValuesSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridFilterModel, any[] | undefined>;
|
|
14
14
|
/**
|
|
15
15
|
* @category Visible rows
|
|
16
16
|
* @ignore - do not document.
|
|
17
17
|
*/
|
|
18
|
-
export declare const gridVisibleRowsLookupSelector: import("
|
|
18
|
+
export declare const gridVisibleRowsLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("./gridFilterState").GridVisibleRowsLookupState>;
|
|
19
19
|
/**
|
|
20
20
|
* @category Filtering
|
|
21
21
|
* @ignore - do not document.
|
|
22
22
|
*/
|
|
23
|
-
export declare const gridFilteredRowsLookupSelector: import("
|
|
23
|
+
export declare const gridFilteredRowsLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridFilterState, Record<GridRowId, false>>;
|
|
24
24
|
/**
|
|
25
25
|
* @category Filtering
|
|
26
26
|
* @ignore - do not document.
|
|
27
27
|
*/
|
|
28
|
-
export declare const gridFilteredChildrenCountLookupSelector: import("
|
|
28
|
+
export declare const gridFilteredChildrenCountLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridFilterState, Record<GridRowId, number>>;
|
|
29
29
|
/**
|
|
30
30
|
* @category Filtering
|
|
31
31
|
* @ignore - do not document.
|
|
32
32
|
*/
|
|
33
|
-
export declare const gridFilteredDescendantCountLookupSelector: import("
|
|
33
|
+
export declare const gridFilteredDescendantCountLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridFilterState, Record<GridRowId, number>>;
|
|
34
34
|
/**
|
|
35
35
|
* Get the id and the model of the rows accessible after the filtering process.
|
|
36
36
|
* Does not contain the collapsed children.
|
|
37
37
|
* @category Filtering
|
|
38
38
|
*/
|
|
39
|
-
export declare const gridExpandedSortedRowEntriesSelector: import("
|
|
39
|
+
export declare const gridExpandedSortedRowEntriesSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[]>;
|
|
40
40
|
/**
|
|
41
41
|
* Get the id of the rows accessible after the filtering process.
|
|
42
42
|
* Does not contain the collapsed children.
|
|
43
43
|
* @category Filtering
|
|
44
44
|
*/
|
|
45
|
-
export declare const gridExpandedSortedRowIdsSelector: import("
|
|
45
|
+
export declare const gridExpandedSortedRowIdsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], GridRowId[]>;
|
|
46
46
|
/**
|
|
47
47
|
* Get the id and the model of the rows accessible after the filtering process.
|
|
48
48
|
* Contains the collapsed children.
|
|
49
49
|
* @category Filtering
|
|
50
50
|
*/
|
|
51
|
-
export declare const gridFilteredSortedRowEntriesSelector: import("
|
|
51
|
+
export declare const gridFilteredSortedRowEntriesSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[]>;
|
|
52
52
|
/**
|
|
53
53
|
* Get the id of the rows accessible after the filtering process.
|
|
54
54
|
* Contains the collapsed children.
|
|
55
55
|
* @category Filtering
|
|
56
56
|
*/
|
|
57
|
-
export declare const gridFilteredSortedRowIdsSelector: import("
|
|
57
|
+
export declare const gridFilteredSortedRowIdsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], GridRowId[]>;
|
|
58
58
|
/**
|
|
59
59
|
* Get the ids to position in the current tree level lookup of the rows accessible after the filtering process.
|
|
60
60
|
* Does not contain the collapsed children.
|
|
61
61
|
* @category Filtering
|
|
62
62
|
* @ignore - do not document.
|
|
63
63
|
*/
|
|
64
|
-
export declare const gridExpandedSortedRowTreeLevelPositionLookupSelector: import("
|
|
64
|
+
export declare const gridExpandedSortedRowTreeLevelPositionLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowTreeConfig, Record<GridRowId, number>>;
|
|
65
65
|
/**
|
|
66
66
|
* Get the id and the model of the top level rows accessible after the filtering process.
|
|
67
67
|
* @category Filtering
|
|
68
68
|
*/
|
|
69
|
-
export declare const gridFilteredSortedTopLevelRowEntriesSelector: import("
|
|
69
|
+
export declare const gridFilteredSortedTopLevelRowEntriesSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, number, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[]>;
|
|
70
70
|
/**
|
|
71
71
|
* Get the amount of rows accessible after the filtering process.
|
|
72
72
|
* @category Filtering
|
|
73
73
|
*/
|
|
74
|
-
export declare const gridExpandedRowCountSelector: import("
|
|
74
|
+
export declare const gridExpandedRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], number>;
|
|
75
75
|
/**
|
|
76
76
|
* Get the amount of top level rows accessible after the filtering process.
|
|
77
77
|
* @category Filtering
|
|
78
78
|
*/
|
|
79
|
-
export declare const gridFilteredTopLevelRowCountSelector: import("
|
|
79
|
+
export declare const gridFilteredTopLevelRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], number>;
|
|
80
80
|
/**
|
|
81
81
|
* Get the amount of rows accessible after the filtering process.
|
|
82
82
|
* Includes top level and descendant rows.
|
|
83
83
|
* @category Filtering
|
|
84
84
|
*/
|
|
85
|
-
export declare const gridFilteredRowCountSelector: import("
|
|
85
|
+
export declare const gridFilteredRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], number>;
|
|
86
86
|
/**
|
|
87
87
|
* Get the amount of descendant rows accessible after the filtering process.
|
|
88
88
|
* @category Filtering
|
|
89
89
|
*/
|
|
90
|
-
export declare const gridFilteredDescendantRowCountSelector: import("
|
|
90
|
+
export declare const gridFilteredDescendantRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, number, number>;
|
|
91
91
|
/**
|
|
92
92
|
* @category Filtering
|
|
93
93
|
* @ignore - do not document.
|
|
94
94
|
*/
|
|
95
|
-
export declare const gridFilterActiveItemsSelector: import("
|
|
95
|
+
export declare const gridFilterActiveItemsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnLookup, GridFilterItem[]>;
|
|
96
96
|
export type GridFilterActiveItemsLookup = {
|
|
97
97
|
[field: string]: GridFilterItem[];
|
|
98
98
|
};
|
|
@@ -100,4 +100,4 @@ export type GridFilterActiveItemsLookup = {
|
|
|
100
100
|
* @category Filtering
|
|
101
101
|
* @ignore - do not document.
|
|
102
102
|
*/
|
|
103
|
-
export declare const gridFilterActiveItemsLookupSelector: import("
|
|
103
|
+
export declare const gridFilterActiveItemsLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridFilterItem[], GridFilterActiveItemsLookup>;
|
|
@@ -4,7 +4,7 @@ import { lruMemoize } from 'reselect';
|
|
|
4
4
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
5
5
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
6
6
|
import { useLazyRef } from "../../utils/useLazyRef.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
8
8
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
9
9
|
import { useGridLogger } from "../../utils/useGridLogger.js";
|
|
10
10
|
import { gridColumnLookupSelector } from "../columns/gridColumnsSelector.js";
|
|
@@ -336,11 +336,11 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
336
336
|
});
|
|
337
337
|
});
|
|
338
338
|
}, [apiRef]);
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
339
|
+
useGridEvent(apiRef, 'rowsSet', updateFilteredRows);
|
|
340
|
+
useGridEvent(apiRef, 'columnsChange', handleColumnsChange);
|
|
341
|
+
useGridEvent(apiRef, 'activeStrategyProcessorChange', handleStrategyProcessorChange);
|
|
342
|
+
useGridEvent(apiRef, 'rowExpansionChange', updateVisibleRowsLookupState);
|
|
343
|
+
useGridEvent(apiRef, 'columnVisibilityModelChange', () => {
|
|
344
344
|
const filterModel = gridFilterModelSelector(apiRef);
|
|
345
345
|
if (filterModel.quickFilterValues && shouldQuickFilterExcludeHiddenColumns(filterModel)) {
|
|
346
346
|
// re-apply filters because the quick filter results may have changed
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
import { GridFocusState, GridTabIndexState } from "./gridFocusState.js";
|
|
3
|
-
export declare const gridFocusStateSelector: import("
|
|
4
|
-
export declare const gridFocusCellSelector: import("
|
|
5
|
-
export declare const gridFocusColumnHeaderSelector: import("
|
|
6
|
-
export declare const gridFocusColumnHeaderFilterSelector: import("
|
|
7
|
-
export declare const gridFocusColumnGroupHeaderSelector: import("
|
|
8
|
-
export declare const gridTabIndexStateSelector: import("
|
|
9
|
-
export declare const gridTabIndexCellSelector: import("
|
|
10
|
-
export declare const gridTabIndexColumnHeaderSelector: import("
|
|
11
|
-
export declare const gridTabIndexColumnHeaderFilterSelector: import("
|
|
12
|
-
export declare const gridTabIndexColumnGroupHeaderSelector: import("
|
|
3
|
+
export declare const gridFocusStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridFocusState>;
|
|
4
|
+
export declare const gridFocusCellSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridFocusState, import("@mui/x-data-grid").GridCellCoordinates | null>;
|
|
5
|
+
export declare const gridFocusColumnHeaderSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridFocusState, import("@mui/x-data-grid").GridColumnIdentifier | null>;
|
|
6
|
+
export declare const gridFocusColumnHeaderFilterSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridFocusState, import("@mui/x-data-grid").GridColumnIdentifier | null>;
|
|
7
|
+
export declare const gridFocusColumnGroupHeaderSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridFocusState, import("@mui/x-data-grid").GridColumnGroupIdentifier | null>;
|
|
8
|
+
export declare const gridTabIndexStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridTabIndexState>;
|
|
9
|
+
export declare const gridTabIndexCellSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridTabIndexState, import("@mui/x-data-grid").GridCellCoordinates | null>;
|
|
10
|
+
export declare const gridTabIndexColumnHeaderSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridTabIndexState, import("@mui/x-data-grid").GridColumnIdentifier | null>;
|
|
11
|
+
export declare const gridTabIndexColumnHeaderFilterSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridTabIndexState, import("@mui/x-data-grid").GridColumnIdentifier | null>;
|
|
12
|
+
export declare const gridTabIndexColumnGroupHeaderSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridTabIndexState, import("@mui/x-data-grid").GridColumnGroupIdentifier | null>;
|
|
@@ -5,7 +5,7 @@ import ownerDocument from '@mui/utils/ownerDocument';
|
|
|
5
5
|
import { gridClasses } from "../../../constants/gridClasses.js";
|
|
6
6
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
7
7
|
import { useGridLogger } from "../../utils/useGridLogger.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
9
9
|
import { isNavigationKey } from "../../../utils/keyboardUtils.js";
|
|
10
10
|
import { gridFocusCellSelector, gridFocusColumnGroupHeaderSelector } from "./gridFocusStateSelector.js";
|
|
11
11
|
import { gridVisibleColumnDefinitionsSelector } from "../columns/gridColumnsSelector.js";
|
|
@@ -394,13 +394,13 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
394
394
|
doc.removeEventListener('mouseup', handleDocumentClick);
|
|
395
395
|
};
|
|
396
396
|
}, [apiRef, hasRootReference, handleDocumentClick]);
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
397
|
+
useGridEvent(apiRef, 'columnHeaderBlur', handleBlur);
|
|
398
|
+
useGridEvent(apiRef, 'cellDoubleClick', handleCellDoubleClick);
|
|
399
|
+
useGridEvent(apiRef, 'cellMouseDown', handleCellMouseDown);
|
|
400
|
+
useGridEvent(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
401
|
+
useGridEvent(apiRef, 'cellModeChange', handleCellModeChange);
|
|
402
|
+
useGridEvent(apiRef, 'columnHeaderFocus', handleColumnHeaderFocus);
|
|
403
|
+
useGridEvent(apiRef, 'columnGroupHeaderFocus', handleColumnGroupHeaderFocus);
|
|
404
|
+
useGridEvent(apiRef, 'rowsSet', handleRowSet);
|
|
405
|
+
useGridEvent(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
406
406
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridHeaderFilteringStateSelector: import("
|
|
3
|
-
export declare const gridHeaderFilteringEnabledSelector: import("
|
|
4
|
-
export declare const gridHeaderFilteringEditFieldSelector: import("
|
|
5
|
-
export declare const gridHeaderFilteringMenuSelector: import("
|
|
2
|
+
export declare const gridHeaderFilteringStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("../../../models/gridHeaderFilteringModel").GridHeaderFilteringState>;
|
|
3
|
+
export declare const gridHeaderFilteringEnabledSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../models/gridHeaderFilteringModel").GridHeaderFilteringState, boolean>;
|
|
4
|
+
export declare const gridHeaderFilteringEditFieldSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../models/gridHeaderFilteringModel").GridHeaderFilteringState, string | null>;
|
|
5
|
+
export declare const gridHeaderFilteringMenuSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../models/gridHeaderFilteringModel").GridHeaderFilteringState, string | null>;
|
|
@@ -10,4 +10,4 @@ import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
|
10
10
|
* @requires useGridScroll (method) - can be after
|
|
11
11
|
* @requires useGridColumnSpanning (method) - can be after
|
|
12
12
|
*/
|
|
13
|
-
export declare const useGridKeyboardNavigation: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "pagination" | "paginationMode" | "getRowId" | "experimentalFeatures" | "signature" | "headerFilters" | "
|
|
13
|
+
export declare const useGridKeyboardNavigation: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "pagination" | "paginationMode" | "getRowId" | "experimentalFeatures" | "signature" | "headerFilters" | "listView">) => void;
|
|
@@ -4,7 +4,7 @@ import { GRID_TREE_DATA_GROUPING_FIELD, GRID_DETAIL_PANEL_TOGGLE_FIELD } from ".
|
|
|
4
4
|
import { isGroupingColumn } from "../../../internals/utils/gridRowGroupingUtils.js";
|
|
5
5
|
import { gridVisibleColumnDefinitionsSelector, gridVisibleColumnFieldsSelector } from "../columns/gridColumnsSelector.js";
|
|
6
6
|
import { useGridLogger } from "../../utils/useGridLogger.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
8
8
|
import { gridExpandedSortedRowEntriesSelector } from "../filter/gridFilterSelector.js";
|
|
9
9
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from "../../../colDef/gridCheckboxSelectionColDef.js";
|
|
10
10
|
import { gridClasses } from "../../../constants/gridClasses.js";
|
|
@@ -36,7 +36,7 @@ const gridVisibleRowsWithPinnedRowsSelector = createSelectorMemoized(gridVisible
|
|
|
36
36
|
export const useGridKeyboardNavigation = (apiRef, props) => {
|
|
37
37
|
const logger = useGridLogger(apiRef, 'useGridKeyboardNavigation');
|
|
38
38
|
const isRtl = useRtl();
|
|
39
|
-
const listView = props.
|
|
39
|
+
const listView = props.listView;
|
|
40
40
|
const getCurrentPageRows = React.useCallback(() => {
|
|
41
41
|
return gridVisibleRowsWithPinnedRowsSelector(apiRef);
|
|
42
42
|
}, [apiRef]);
|
|
@@ -530,8 +530,8 @@ export const useGridKeyboardNavigation = (apiRef, props) => {
|
|
|
530
530
|
return initialValue;
|
|
531
531
|
}, []);
|
|
532
532
|
useGridRegisterPipeProcessor(apiRef, 'canStartEditing', checkIfCanStartEditing);
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
533
|
+
useGridEvent(apiRef, 'columnHeaderKeyDown', handleColumnHeaderKeyDown);
|
|
534
|
+
useGridEvent(apiRef, 'headerFilterKeyDown', handleHeaderFilterKeyDown);
|
|
535
|
+
useGridEvent(apiRef, 'columnGroupHeaderKeyDown', handleColumnGroupHeaderKeyDown);
|
|
536
|
+
useGridEvent(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
537
537
|
};
|
|
@@ -4,4 +4,4 @@ import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
|
4
4
|
* @category List View
|
|
5
5
|
* @ignore - Do not document
|
|
6
6
|
*/
|
|
7
|
-
export declare const gridListColumnSelector: import("
|
|
7
|
+
export declare const gridListColumnSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("./useGridListView").GridListViewState>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GridListViewColDef } from '../../../models/colDef/gridColDef';
|
|
3
3
|
import { GridStateInitializer } from "../../utils/useGridInitializeState.js";
|
|
4
4
|
import { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
5
5
|
import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
6
|
-
export type GridListViewState = (
|
|
6
|
+
export type GridListViewState = (GridListViewColDef & {
|
|
7
7
|
computedWidth: number;
|
|
8
8
|
}) | undefined;
|
|
9
|
-
export declare const listViewStateInitializer: GridStateInitializer<Pick<DataGridProcessedProps, '
|
|
10
|
-
export declare function useGridListView(apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, '
|
|
9
|
+
export declare const listViewStateInitializer: GridStateInitializer<Pick<DataGridProcessedProps, 'listViewColumn'>>;
|
|
10
|
+
export declare function useGridListView(apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, 'listView' | 'listViewColumn'>): void;
|
|
@@ -3,9 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
4
4
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
5
5
|
import { gridDimensionsSelector } from "../dimensions/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
7
7
|
export const listViewStateInitializer = (state, props, apiRef) => _extends({}, state, {
|
|
8
|
-
listViewColumn: props.
|
|
8
|
+
listViewColumn: props.listViewColumn ? _extends({}, props.listViewColumn, {
|
|
9
9
|
computedWidth: getListColumnWidth(apiRef)
|
|
10
10
|
}) : undefined
|
|
11
11
|
});
|
|
@@ -32,14 +32,14 @@ export function useGridListView(apiRef, props) {
|
|
|
32
32
|
updateListColumnWidth();
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
useGridEvent(apiRef, 'viewportInnerSizeChange', handleGridSizeChange);
|
|
36
|
+
useGridEvent(apiRef, 'columnVisibilityModelChange', updateListColumnWidth);
|
|
37
37
|
|
|
38
38
|
/*
|
|
39
39
|
* EFFECTS
|
|
40
40
|
*/
|
|
41
41
|
useEnhancedEffect(() => {
|
|
42
|
-
const listColumn = props.
|
|
42
|
+
const listColumn = props.listViewColumn;
|
|
43
43
|
if (listColumn) {
|
|
44
44
|
apiRef.current.setState(state => {
|
|
45
45
|
return _extends({}, state, {
|
|
@@ -49,12 +49,12 @@ export function useGridListView(apiRef, props) {
|
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
}, [apiRef, props.
|
|
52
|
+
}, [apiRef, props.listViewColumn]);
|
|
53
53
|
React.useEffect(() => {
|
|
54
|
-
if (props.
|
|
55
|
-
warnOnce(['MUI X: The `
|
|
54
|
+
if (props.listView && !props.listViewColumn) {
|
|
55
|
+
warnOnce(['MUI X: The `listViewColumn` prop must be set if `listView` is enabled.', 'To fix, pass a column definition to the `listViewColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.', 'For more details, see https://mui.com/x/react-data-grid/list-view/']);
|
|
56
56
|
}
|
|
57
|
-
}, [props.
|
|
57
|
+
}, [props.listView, props.listViewColumn]);
|
|
58
58
|
}
|
|
59
59
|
function getListColumnWidth(apiRef) {
|
|
60
60
|
return gridDimensionsSelector(apiRef).viewportInnerSize.width;
|
|
@@ -4,47 +4,47 @@ import { GridRowId } from "../../../models/gridRows.js";
|
|
|
4
4
|
* @category Pagination
|
|
5
5
|
* @ignore - do not document.
|
|
6
6
|
*/
|
|
7
|
-
export declare const gridPaginationSelector: import("
|
|
7
|
+
export declare const gridPaginationSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridPaginationState>;
|
|
8
8
|
/**
|
|
9
9
|
* @category Pagination
|
|
10
10
|
* @ignore - do not document.
|
|
11
11
|
*/
|
|
12
|
-
export declare const gridPaginationEnabledClientSideSelector: import("
|
|
12
|
+
export declare const gridPaginationEnabledClientSideSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridPaginationState, boolean>;
|
|
13
13
|
/**
|
|
14
14
|
* Get the pagination model
|
|
15
15
|
* @category Pagination
|
|
16
16
|
*/
|
|
17
|
-
export declare const gridPaginationModelSelector: import("
|
|
17
|
+
export declare const gridPaginationModelSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridPaginationState, import("@mui/x-data-grid").GridPaginationModel>;
|
|
18
18
|
/**
|
|
19
19
|
* Get the row count
|
|
20
20
|
* @category Pagination
|
|
21
21
|
*/
|
|
22
|
-
export declare const gridPaginationRowCountSelector: import("
|
|
22
|
+
export declare const gridPaginationRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridPaginationState, number>;
|
|
23
23
|
/**
|
|
24
24
|
* Get the pagination meta
|
|
25
25
|
* @category Pagination
|
|
26
26
|
*/
|
|
27
|
-
export declare const gridPaginationMetaSelector: import("
|
|
27
|
+
export declare const gridPaginationMetaSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridPaginationState, import("@mui/x-data-grid").GridPaginationMeta>;
|
|
28
28
|
/**
|
|
29
29
|
* Get the index of the page to render if the pagination is enabled
|
|
30
30
|
* @category Pagination
|
|
31
31
|
*/
|
|
32
|
-
export declare const gridPageSelector: import("
|
|
32
|
+
export declare const gridPageSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridPaginationModel, number>;
|
|
33
33
|
/**
|
|
34
34
|
* Get the maximum amount of rows to display on a single page if the pagination is enabled
|
|
35
35
|
* @category Pagination
|
|
36
36
|
*/
|
|
37
|
-
export declare const gridPageSizeSelector: import("
|
|
37
|
+
export declare const gridPageSizeSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridPaginationModel, number>;
|
|
38
38
|
/**
|
|
39
39
|
* Get the amount of pages needed to display all the rows if the pagination is enabled
|
|
40
40
|
* @category Pagination
|
|
41
41
|
*/
|
|
42
|
-
export declare const gridPageCountSelector: import("
|
|
42
|
+
export declare const gridPageCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, number, number>;
|
|
43
43
|
/**
|
|
44
44
|
* Get the index of the first and the last row to include in the current page if the pagination is enabled.
|
|
45
45
|
* @category Pagination
|
|
46
46
|
*/
|
|
47
|
-
export declare const gridPaginationRowRangeSelector: import("
|
|
47
|
+
export declare const gridPaginationRowRangeSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], {
|
|
48
48
|
firstRowIndex: number;
|
|
49
49
|
lastRowIndex: number;
|
|
50
50
|
} | null>;
|
|
@@ -52,15 +52,15 @@ export declare const gridPaginationRowRangeSelector: import("../../..").OutputSe
|
|
|
52
52
|
* Get the id and the model of each row to include in the current page if the pagination is enabled.
|
|
53
53
|
* @category Pagination
|
|
54
54
|
*/
|
|
55
|
-
export declare const gridPaginatedVisibleSortedGridRowEntriesSelector: import("
|
|
55
|
+
export declare const gridPaginatedVisibleSortedGridRowEntriesSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, {
|
|
56
56
|
firstRowIndex: number;
|
|
57
57
|
lastRowIndex: number;
|
|
58
|
-
} | null, import("
|
|
58
|
+
} | null, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[]>;
|
|
59
59
|
/**
|
|
60
60
|
* Get the id of each row to include in the current page if the pagination is enabled.
|
|
61
61
|
* @category Pagination
|
|
62
62
|
*/
|
|
63
|
-
export declare const gridPaginatedVisibleSortedGridRowIdsSelector: import("
|
|
63
|
+
export declare const gridPaginatedVisibleSortedGridRowIdsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, {
|
|
64
64
|
firstRowIndex: number;
|
|
65
65
|
lastRowIndex: number;
|
|
66
66
|
} | null, GridRowId[]>;
|
|
@@ -69,8 +69,8 @@ export declare const gridPaginatedVisibleSortedGridRowIdsSelector: import("../..
|
|
|
69
69
|
* Does not contain the collapsed children.
|
|
70
70
|
* @category Pagination
|
|
71
71
|
*/
|
|
72
|
-
export declare const gridVisibleRowsSelector: import("
|
|
73
|
-
rows: import("
|
|
72
|
+
export declare const gridVisibleRowsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[], {
|
|
73
|
+
rows: import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[];
|
|
74
74
|
range: {
|
|
75
75
|
firstRowIndex: number;
|
|
76
76
|
lastRowIndex: number;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
4
4
|
import { gridFilterModelSelector, gridFilterActiveItemsSelector } from "../filter/gridFilterSelector.js";
|
|
5
5
|
import { gridDensityFactorSelector } from "../density/index.js";
|
|
6
|
-
import { useGridLogger, useGridSelector, useGridApiMethod,
|
|
6
|
+
import { useGridLogger, useGridSelector, useGridApiMethod, useGridEvent } from "../../utils/index.js";
|
|
7
7
|
import { useGridRegisterPipeProcessor } from "../../core/pipeProcessing/index.js";
|
|
8
8
|
import { gridPageCountSelector, gridPaginationModelSelector } from "./gridPaginationSelector.js";
|
|
9
9
|
import { getPageCount, defaultPageSize, throwIfPageSizeExceedsTheLimit, getDefaultGridPaginationModel, getValidPage } from "./gridPaginationUtils.js";
|
|
@@ -190,11 +190,11 @@ export const useGridPaginationModel = (apiRef, props) => {
|
|
|
190
190
|
previousFilterModel.current = currentActiveFilters;
|
|
191
191
|
navigateToStart();
|
|
192
192
|
}, [apiRef, navigateToStart]);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
useGridEvent(apiRef, 'viewportInnerSizeChange', handleUpdateAutoPageSize);
|
|
194
|
+
useGridEvent(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
195
|
+
useGridEvent(apiRef, 'rowCountChange', handleRowCountChange);
|
|
196
|
+
useGridEvent(apiRef, 'sortModelChange', navigateToStart);
|
|
197
|
+
useGridEvent(apiRef, 'filterModelChange', handleFilterModelChange);
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* EFFECTS
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
4
4
|
import { gridFilteredTopLevelRowCountSelector } from "../filter/index.js";
|
|
5
|
-
import { useGridLogger, useGridSelector, useGridApiMethod,
|
|
5
|
+
import { useGridLogger, useGridSelector, useGridApiMethod, useGridEvent } from "../../utils/index.js";
|
|
6
6
|
import { useGridRegisterPipeProcessor } from "../../core/pipeProcessing/index.js";
|
|
7
7
|
import { gridPaginationRowCountSelector, gridPaginationMetaSelector, gridPaginationModelSelector } from "./gridPaginationSelector.js";
|
|
8
8
|
export const useGridRowCount = (apiRef, props) => {
|
|
@@ -87,7 +87,7 @@ export const useGridRowCount = (apiRef, props) => {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}, [props.paginationMode, previousPageSize, rowCountState, apiRef]);
|
|
90
|
-
|
|
90
|
+
useGridEvent(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* EFFECTS
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridPreferencePanelStateSelector: import("
|
|
3
|
-
export declare const gridPreferencePanelSelectorWithLabel: import("
|
|
2
|
+
export declare const gridPreferencePanelStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridPreferencePanelState>;
|
|
3
|
+
export declare const gridPreferencePanelSelectorWithLabel: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, string, boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
import { GridRowId } from "../../../models/gridRows.js";
|
|
3
|
-
export declare const gridRowSelectionStateSelector: import("
|
|
4
|
-
export declare const gridRowSelectionManagerSelector: import("
|
|
5
|
-
export declare const gridRowSelectionCountSelector: import("
|
|
6
|
-
export declare const gridRowSelectionIdsSelector: import("
|
|
3
|
+
export declare const gridRowSelectionStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridRowSelectionModel>;
|
|
4
|
+
export declare const gridRowSelectionManagerSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowSelectionModel, import("../../../models/gridRowSelectionManager").RowSelectionManager>;
|
|
5
|
+
export declare const gridRowSelectionCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, number, number>;
|
|
6
|
+
export declare const gridRowSelectionIdsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridRowId[], Map<GridRowId, import("@mui/x-data-grid").GridValidRowModel>>;
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
4
|
import { GridSignature } from "../../../constants/signature.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
6
6
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
7
7
|
import { useGridLogger } from "../../utils/useGridLogger.js";
|
|
8
8
|
import { useGridSelector } from "../../utils/useGridSelector.js";
|
|
@@ -524,13 +524,13 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
524
524
|
}
|
|
525
525
|
apiRef.current.setRowSelectionModel(propRowSelectionModel);
|
|
526
526
|
});
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
527
|
+
useGridEvent(apiRef, 'sortedRowsSet', runIfRowSelectionIsEnabled(() => removeOutdatedSelection(true)));
|
|
528
|
+
useGridEvent(apiRef, 'filteredRowsSet', runIfRowSelectionIsEnabled(() => removeOutdatedSelection()));
|
|
529
|
+
useGridEvent(apiRef, 'rowClick', runIfRowSelectionIsEnabled(handleRowClick));
|
|
530
|
+
useGridEvent(apiRef, 'rowSelectionCheckboxChange', runIfRowSelectionIsEnabled(handleRowSelectionCheckboxChange));
|
|
531
|
+
useGridEvent(apiRef, 'headerSelectionCheckboxChange', handleHeaderSelectionCheckboxChange);
|
|
532
|
+
useGridEvent(apiRef, 'cellMouseDown', runIfRowSelectionIsEnabled(preventSelectionOnShift));
|
|
533
|
+
useGridEvent(apiRef, 'cellKeyDown', runIfRowSelectionIsEnabled(handleCellKeyDown));
|
|
534
534
|
|
|
535
535
|
/*
|
|
536
536
|
* EFFECTS
|
|
@@ -5,7 +5,7 @@ import type { GridPrivateApiCommunity } from '../../../models/api/gridApiCommuni
|
|
|
5
5
|
import { type GridRowSelectionPropagation } from "../../../models/gridRowSelectionModel.js";
|
|
6
6
|
import { type RowSelectionManager } from "../../../models/gridRowSelectionManager.js";
|
|
7
7
|
export declare const ROW_SELECTION_PROPAGATION_DEFAULT: GridRowSelectionPropagation;
|
|
8
|
-
export declare function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents: boolean): import("
|
|
8
|
+
export declare function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents: boolean): import("@mui/x-data-grid").OutputSelector<import("../../../models/gridStateCommunity").GridStateCommunity, RowSelectionManager, {
|
|
9
9
|
isIndeterminate: boolean;
|
|
10
10
|
isChecked: boolean;
|
|
11
11
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridRowSpanningHiddenCellsSelector: import("
|
|
3
|
-
export declare const gridRowSpanningSpannedCellsSelector: import("
|
|
4
|
-
export declare const gridRowSpanningHiddenCellsOriginMapSelector: import("
|
|
2
|
+
export declare const gridRowSpanningHiddenCellsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("./useGridRowSpanning").GridRowSpanningState, Record<import("@mui/x-data-grid").GridRowId, Record<string, boolean>>>;
|
|
3
|
+
export declare const gridRowSpanningSpannedCellsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("./useGridRowSpanning").GridRowSpanningState, Record<import("@mui/x-data-grid").GridRowId, Record<string, number>>>;
|
|
4
|
+
export declare const gridRowSpanningHiddenCellsOriginMapSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("./useGridRowSpanning").GridRowSpanningState, Record<number, Record<string, number>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridRowsMetaSelector: import("
|
|
2
|
+
export declare const gridRowsMetaSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridRowsMetaState>;
|