@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
|
@@ -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;
|
|
@@ -199,11 +199,11 @@ const useGridPaginationModel = (apiRef, props) => {
|
|
|
199
199
|
previousFilterModel.current = currentActiveFilters;
|
|
200
200
|
navigateToStart();
|
|
201
201
|
}, [apiRef, navigateToStart]);
|
|
202
|
-
(0, _utils.
|
|
203
|
-
(0, _utils.
|
|
204
|
-
(0, _utils.
|
|
205
|
-
(0, _utils.
|
|
206
|
-
(0, _utils.
|
|
202
|
+
(0, _utils.useGridEvent)(apiRef, 'viewportInnerSizeChange', handleUpdateAutoPageSize);
|
|
203
|
+
(0, _utils.useGridEvent)(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
204
|
+
(0, _utils.useGridEvent)(apiRef, 'rowCountChange', handleRowCountChange);
|
|
205
|
+
(0, _utils.useGridEvent)(apiRef, 'sortModelChange', navigateToStart);
|
|
206
|
+
(0, _utils.useGridEvent)(apiRef, 'filterModelChange', handleFilterModelChange);
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* EFFECTS
|
|
@@ -95,7 +95,7 @@ const useGridRowCount = (apiRef, props) => {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}, [props.paginationMode, previousPageSize, rowCountState, apiRef]);
|
|
98
|
-
(0, _utils.
|
|
98
|
+
(0, _utils.useGridEvent)(apiRef, 'paginationModelChange', handlePaginationModelChange);
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* 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>>;
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
12
12
|
var _signature = require("../../../constants/signature");
|
|
13
|
-
var
|
|
13
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
14
14
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
15
15
|
var _useGridLogger = require("../../utils/useGridLogger");
|
|
16
16
|
var _useGridSelector = require("../../utils/useGridSelector");
|
|
@@ -533,13 +533,13 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
533
533
|
}
|
|
534
534
|
apiRef.current.setRowSelectionModel(propRowSelectionModel);
|
|
535
535
|
});
|
|
536
|
-
(0,
|
|
537
|
-
(0,
|
|
538
|
-
(0,
|
|
539
|
-
(0,
|
|
540
|
-
(0,
|
|
541
|
-
(0,
|
|
542
|
-
(0,
|
|
536
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'sortedRowsSet', runIfRowSelectionIsEnabled(() => removeOutdatedSelection(true)));
|
|
537
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'filteredRowsSet', runIfRowSelectionIsEnabled(() => removeOutdatedSelection()));
|
|
538
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'rowClick', runIfRowSelectionIsEnabled(handleRowClick));
|
|
539
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'rowSelectionCheckboxChange', runIfRowSelectionIsEnabled(handleRowSelectionCheckboxChange));
|
|
540
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'headerSelectionCheckboxChange', handleHeaderSelectionCheckboxChange);
|
|
541
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'cellMouseDown', runIfRowSelectionIsEnabled(preventSelectionOnShift));
|
|
542
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'cellKeyDown', runIfRowSelectionIsEnabled(handleCellKeyDown));
|
|
543
543
|
|
|
544
544
|
/*
|
|
545
545
|
* 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>;
|
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import { GridRowId } from "../../../models/gridRows.js";
|
|
2
2
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
3
|
-
export declare const gridRowsStateSelector: import("
|
|
4
|
-
export declare const gridRowCountSelector: import("
|
|
5
|
-
export declare const gridRowsLoadingSelector: import("
|
|
6
|
-
export declare const gridTopLevelRowCountSelector: import("
|
|
7
|
-
export declare const gridRowsLookupSelector: import("
|
|
8
|
-
export declare const gridRowSelector: import("
|
|
9
|
-
export declare const gridRowTreeSelector: import("
|
|
10
|
-
export declare const gridRowNodeSelector: import("
|
|
11
|
-
export declare const gridRowGroupsToFetchSelector: import("
|
|
12
|
-
export declare const gridRowGroupingNameSelector: import("
|
|
13
|
-
export declare const gridRowTreeDepthsSelector: import("
|
|
14
|
-
export declare const gridRowMaximumTreeDepthSelector: import("
|
|
15
|
-
export declare const gridDataRowIdsSelector: import("
|
|
3
|
+
export declare const gridRowsStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridRowsState>;
|
|
4
|
+
export declare const gridRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, number>;
|
|
5
|
+
export declare const gridRowsLoadingSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, boolean | undefined>;
|
|
6
|
+
export declare const gridTopLevelRowCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, number>;
|
|
7
|
+
export declare const gridRowsLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, import("@mui/x-data-grid").GridRowIdToModelLookup<import("@mui/x-data-grid").GridValidRowModel>>;
|
|
8
|
+
export declare const gridRowSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridRowId, import("@mui/x-data-grid").GridValidRowModel>;
|
|
9
|
+
export declare const gridRowTreeSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, import("@mui/x-data-grid").GridRowTreeConfig>;
|
|
10
|
+
export declare const gridRowNodeSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridRowId, import("@mui/x-data-grid").GridTreeNode>;
|
|
11
|
+
export declare const gridRowGroupsToFetchSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, GridRowId[] | undefined>;
|
|
12
|
+
export declare const gridRowGroupingNameSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, string>;
|
|
13
|
+
export declare const gridRowTreeDepthsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, import("./gridRowsInterfaces").GridTreeDepths>;
|
|
14
|
+
export declare const gridRowMaximumTreeDepthSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, number>;
|
|
15
|
+
export declare const gridDataRowIdsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, GridRowId[]>;
|
|
16
|
+
export declare const gridDataRowsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowIdToModelLookup<import("@mui/x-data-grid").GridValidRowModel>, import("@mui/x-data-grid").GridValidRowModel[]>;
|
|
16
17
|
/**
|
|
17
18
|
* @ignore - do not document.
|
|
18
19
|
*/
|
|
19
|
-
export declare const gridAdditionalRowGroupsSelector: import("
|
|
20
|
+
export declare const gridAdditionalRowGroupsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowsState, {
|
|
20
21
|
pinnedRows?: import("./gridRowsInterfaces").GridPinnedRowsState;
|
|
21
22
|
} | undefined>;
|
|
22
23
|
/**
|
|
23
24
|
* @ignore - do not document.
|
|
24
25
|
*/
|
|
25
|
-
export declare const gridPinnedRowsSelector: import("
|
|
26
|
+
export declare const gridPinnedRowsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, {
|
|
26
27
|
pinnedRows?: import("./gridRowsInterfaces").GridPinnedRowsState;
|
|
27
28
|
} | undefined, {
|
|
28
29
|
bottom: {
|
|
29
30
|
id: GridRowId;
|
|
30
|
-
model: import("
|
|
31
|
+
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
31
32
|
}[];
|
|
32
33
|
top: {
|
|
33
34
|
id: GridRowId;
|
|
34
|
-
model: import("
|
|
35
|
+
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
35
36
|
}[];
|
|
36
37
|
}>;
|
|
37
38
|
/**
|
|
38
39
|
* @ignore - do not document.
|
|
39
40
|
*/
|
|
40
|
-
export declare const gridPinnedRowsCountSelector: import("
|
|
41
|
+
export declare const gridPinnedRowsCountSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, {
|
|
41
42
|
bottom: {
|
|
42
43
|
id: GridRowId;
|
|
43
|
-
model: import("
|
|
44
|
+
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
44
45
|
}[];
|
|
45
46
|
top: {
|
|
46
47
|
id: GridRowId;
|
|
47
|
-
model: import("
|
|
48
|
+
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
48
49
|
}[];
|
|
49
50
|
}, number>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.gridTopLevelRowCountSelector = exports.gridRowsStateSelector = exports.gridRowsLookupSelector = exports.gridRowsLoadingSelector = exports.gridRowTreeSelector = exports.gridRowTreeDepthsSelector = exports.gridRowSelector = exports.gridRowNodeSelector = exports.gridRowMaximumTreeDepthSelector = exports.gridRowGroupsToFetchSelector = exports.gridRowGroupingNameSelector = exports.gridRowCountSelector = exports.gridPinnedRowsSelector = exports.gridPinnedRowsCountSelector = exports.gridDataRowIdsSelector = exports.gridAdditionalRowGroupsSelector = void 0;
|
|
6
|
+
exports.gridTopLevelRowCountSelector = exports.gridRowsStateSelector = exports.gridRowsLookupSelector = exports.gridRowsLoadingSelector = exports.gridRowTreeSelector = exports.gridRowTreeDepthsSelector = exports.gridRowSelector = exports.gridRowNodeSelector = exports.gridRowMaximumTreeDepthSelector = exports.gridRowGroupsToFetchSelector = exports.gridRowGroupingNameSelector = exports.gridRowCountSelector = exports.gridPinnedRowsSelector = exports.gridPinnedRowsCountSelector = exports.gridDataRowsSelector = exports.gridDataRowIdsSelector = exports.gridAdditionalRowGroupsSelector = void 0;
|
|
7
7
|
var _createSelector = require("../../../utils/createSelector");
|
|
8
8
|
const gridRowsStateSelector = exports.gridRowsStateSelector = (0, _createSelector.createRootSelector)(state => state.rows);
|
|
9
9
|
const gridRowCountSelector = exports.gridRowCountSelector = (0, _createSelector.createSelector)(gridRowsStateSelector, rows => rows.totalRowCount);
|
|
@@ -26,6 +26,13 @@ const gridRowMaximumTreeDepthSelector = exports.gridRowMaximumTreeDepthSelector
|
|
|
26
26
|
return (entries.filter(([, nodeCount]) => nodeCount > 0).map(([depth]) => Number(depth)).sort((a, b) => b - a)[0] ?? 0) + 1;
|
|
27
27
|
});
|
|
28
28
|
const gridDataRowIdsSelector = exports.gridDataRowIdsSelector = (0, _createSelector.createSelector)(gridRowsStateSelector, rows => rows.dataRowIds);
|
|
29
|
+
const gridDataRowsSelector = exports.gridDataRowsSelector = (0, _createSelector.createSelectorMemoized)(gridDataRowIdsSelector, gridRowsLookupSelector, (dataRowIds, rowsLookup) => dataRowIds.reduce((acc, id) => {
|
|
30
|
+
if (!rowsLookup[id]) {
|
|
31
|
+
return acc;
|
|
32
|
+
}
|
|
33
|
+
acc.push(rowsLookup[id]);
|
|
34
|
+
return acc;
|
|
35
|
+
}, []));
|
|
29
36
|
|
|
30
37
|
/**
|
|
31
38
|
* @ignore - do not document.
|
|
@@ -80,13 +80,13 @@ function useGridParamsApi(apiRef, props) {
|
|
|
80
80
|
const cellTabIndex = (0, _gridFocusStateSelector.gridTabIndexCellSelector)(apiRef);
|
|
81
81
|
const cellMode = apiRef.current.getCellMode(id, field);
|
|
82
82
|
return apiRef.current.getCellParamsForRow(id, field, row, {
|
|
83
|
-
colDef: props.
|
|
83
|
+
colDef: props.listView && props.listViewColumn?.field === field ? (0, _gridListViewSelectors.gridListColumnSelector)(apiRef) : apiRef.current.getColumn(field),
|
|
84
84
|
rowNode,
|
|
85
85
|
hasFocus: cellFocus !== null && cellFocus.field === field && cellFocus.id === id,
|
|
86
86
|
tabIndex: cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === id ? 0 : -1,
|
|
87
87
|
cellMode
|
|
88
88
|
});
|
|
89
|
-
}, [apiRef, props.
|
|
89
|
+
}, [apiRef, props.listView, props.listViewColumn?.field]);
|
|
90
90
|
const getCellValue = React.useCallback((id, field) => {
|
|
91
91
|
const colDef = apiRef.current.getColumn(field);
|
|
92
92
|
const row = apiRef.current.getRow(id);
|
|
@@ -15,7 +15,7 @@ var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
|
15
15
|
var _gridVirtualizationSelectors = require("../virtualization/gridVirtualizationSelectors");
|
|
16
16
|
var _gridRowSpanningUtils = require("./gridRowSpanningUtils");
|
|
17
17
|
var _gridCheckboxSelectionColDef = require("../../../colDef/gridCheckboxSelectionColDef");
|
|
18
|
-
var
|
|
18
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
19
19
|
var _utils = require("../../../utils/utils");
|
|
20
20
|
var _pagination = require("../pagination");
|
|
21
21
|
var _gridRowsSelector = require("./gridRowsSelector");
|
|
@@ -260,11 +260,11 @@ const useGridRowSpanning = (apiRef, props) => {
|
|
|
260
260
|
}
|
|
261
261
|
updateRowSpanningState(renderContext, true);
|
|
262
262
|
}, [apiRef, updateRowSpanningState]);
|
|
263
|
-
(0,
|
|
264
|
-
(0,
|
|
265
|
-
(0,
|
|
266
|
-
(0,
|
|
267
|
-
(0,
|
|
263
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'renderedRowsIntervalChange', (0, _utils.runIf)(props.rowSpanning, updateRowSpanningState));
|
|
264
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'sortedRowsSet', (0, _utils.runIf)(props.rowSpanning, resetRowSpanningState));
|
|
265
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'paginationModelChange', (0, _utils.runIf)(props.rowSpanning, resetRowSpanningState));
|
|
266
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'filteredRowsSet', (0, _utils.runIf)(props.rowSpanning, resetRowSpanningState));
|
|
267
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnsChange', (0, _utils.runIf)(props.rowSpanning, resetRowSpanningState));
|
|
268
268
|
React.useEffect(() => {
|
|
269
269
|
if (!props.rowSpanning) {
|
|
270
270
|
if (apiRef.current.state.rowSpanning !== EMPTY_STATE) {
|
|
@@ -16,7 +16,7 @@ var _gridRowsSelector = require("./gridRowsSelector");
|
|
|
16
16
|
var _gridPropsSelectors = require("../../core/gridPropsSelectors");
|
|
17
17
|
var _useTimeout = require("../../utils/useTimeout");
|
|
18
18
|
var _signature = require("../../../constants/signature");
|
|
19
|
-
var
|
|
19
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
20
20
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
21
21
|
var _gridSortingSelector = require("../sorting/gridSortingSelector");
|
|
22
22
|
var _gridFilterSelector = require("../filter/gridFilterSelector");
|
|
@@ -382,8 +382,8 @@ const useGridRows = (apiRef, props) => {
|
|
|
382
382
|
groupRows();
|
|
383
383
|
}
|
|
384
384
|
}, [apiRef, groupRows]);
|
|
385
|
-
(0,
|
|
386
|
-
(0,
|
|
385
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'activeStrategyProcessorChange', handleStrategyProcessorChange);
|
|
386
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'strategyAvailabilityChange', handleStrategyActivityChange);
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
389
|
* APPLIERS
|
|
@@ -425,7 +425,7 @@ const useGridRows = (apiRef, props) => {
|
|
|
425
425
|
isRowCountPropUpdated = true;
|
|
426
426
|
lastRowCount.current = props.rowCount;
|
|
427
427
|
}
|
|
428
|
-
const currentRows = props.dataSource ?
|
|
428
|
+
const currentRows = props.dataSource ? (0, _gridRowsSelector.gridDataRowsSelector)(apiRef) : props.rows;
|
|
429
429
|
const areNewRowsAlreadyInState = apiRef.current.caches.rows.rowsBeforePartialUpdates === currentRows;
|
|
430
430
|
const isNewLoadingAlreadyInState = apiRef.current.caches.rows.loadingPropBeforePartialUpdates === props.loading;
|
|
431
431
|
const isNewRowCountAlreadyInState = apiRef.current.caches.rows.rowCountPropBeforePartialUpdates === props.rowCount;
|
|
@@ -9,4 +9,4 @@ import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
|
9
9
|
* @requires useGridFilter (state)
|
|
10
10
|
* @requires useGridColumnSpanning (method)
|
|
11
11
|
*/
|
|
12
|
-
export declare const useGridScroll: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "pagination" | "
|
|
12
|
+
export declare const useGridScroll: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "pagination" | "listView">) => void;
|
|
@@ -58,7 +58,7 @@ const useGridScroll = (apiRef, props) => {
|
|
|
58
58
|
const scrollToIndexes = React.useCallback(params => {
|
|
59
59
|
const dimensions = (0, _dimensions.gridDimensionsSelector)(apiRef);
|
|
60
60
|
const totalRowCount = (0, _gridRowsSelector.gridRowCountSelector)(apiRef);
|
|
61
|
-
const visibleColumns = props.
|
|
61
|
+
const visibleColumns = props.listView ? [(0, _gridListViewSelectors.gridListColumnSelector)(apiRef)] : (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef);
|
|
62
62
|
const scrollToHeader = params.rowIndex == null;
|
|
63
63
|
if (!scrollToHeader && totalRowCount === 0 || visibleColumns.length === 0) {
|
|
64
64
|
return false;
|
|
@@ -105,7 +105,7 @@ const useGridScroll = (apiRef, props) => {
|
|
|
105
105
|
return true;
|
|
106
106
|
}
|
|
107
107
|
return false;
|
|
108
|
-
}, [logger, apiRef, virtualScrollerRef, props.pagination, visibleSortedRows, props.
|
|
108
|
+
}, [logger, apiRef, virtualScrollerRef, props.pagination, visibleSortedRows, props.listView]);
|
|
109
109
|
const scroll = React.useCallback(params => {
|
|
110
110
|
if (virtualScrollerRef.current && params.left !== undefined && colRef.current) {
|
|
111
111
|
const direction = isRtl ? -1 : 1;
|
|
@@ -5,17 +5,17 @@ import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
|
5
5
|
* Get the id of the rows after the sorting process.
|
|
6
6
|
* @category Sorting
|
|
7
7
|
*/
|
|
8
|
-
export declare const gridSortedRowIdsSelector: import("
|
|
8
|
+
export declare const gridSortedRowIdsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridSortingState, GridRowId[]>;
|
|
9
9
|
/**
|
|
10
10
|
* Get the id and the model of the rows after the sorting process.
|
|
11
11
|
* @category Sorting
|
|
12
12
|
*/
|
|
13
|
-
export declare const gridSortedRowEntriesSelector: import("
|
|
13
|
+
export declare const gridSortedRowEntriesSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridRowTreeConfig, GridRowEntry<GridValidRowModel>[]>;
|
|
14
14
|
/**
|
|
15
15
|
* Get the current sorting model.
|
|
16
16
|
* @category Sorting
|
|
17
17
|
*/
|
|
18
|
-
export declare const gridSortModelSelector: import("
|
|
18
|
+
export declare const gridSortModelSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridSortingState, GridSortModel>;
|
|
19
19
|
export type GridSortColumnLookup = Record<string, {
|
|
20
20
|
sortDirection: GridSortDirection;
|
|
21
21
|
sortIndex?: number;
|
|
@@ -24,9 +24,9 @@ export type GridSortColumnLookup = Record<string, {
|
|
|
24
24
|
* @category Sorting
|
|
25
25
|
* @ignore - do not document.
|
|
26
26
|
*/
|
|
27
|
-
export declare const gridSortColumnLookupSelector: import("
|
|
27
|
+
export declare const gridSortColumnLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridSortModel, GridSortColumnLookup>;
|
|
28
28
|
/**
|
|
29
29
|
* @category Sorting
|
|
30
30
|
* @ignore - do not document.
|
|
31
31
|
*/
|
|
32
|
-
export declare const gridSortedRowIndexLookupSelector: import("
|
|
32
|
+
export declare const gridSortedRowIndexLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridRowId[], Record<GridRowId, number>>;
|
|
@@ -9,7 +9,7 @@ exports.useGridSorting = exports.sortingStateInitializer = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _utils = require("@mui/utils");
|
|
12
|
-
var
|
|
12
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
13
13
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
14
14
|
var _useGridLogger = require("../../utils/useGridLogger");
|
|
15
15
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
@@ -235,11 +235,11 @@ const useGridSorting = (apiRef, props) => {
|
|
|
235
235
|
}
|
|
236
236
|
}, [apiRef]);
|
|
237
237
|
(0, _pipeProcessing.useGridRegisterPipeProcessor)(apiRef, 'columnMenu', addColumnMenuItem);
|
|
238
|
-
(0,
|
|
239
|
-
(0,
|
|
240
|
-
(0,
|
|
241
|
-
(0,
|
|
242
|
-
(0,
|
|
238
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderClick', handleColumnHeaderClick);
|
|
239
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderKeyDown', handleColumnHeaderKeyDown);
|
|
240
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'rowsSet', apiRef.current.applySorting);
|
|
241
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnsChange', handleColumnsChange);
|
|
242
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'activeStrategyProcessorChange', handleStrategyProcessorChange);
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
245
|
* 1ST RENDER
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const gridFocusedVirtualCellSelector: import("
|
|
1
|
+
export declare const gridFocusedVirtualCellSelector: import("@mui/x-data-grid").OutputSelector<import("../../../models/gridStateCommunity").GridStateCommunity, import("@mui/x-data-grid").GridCellCoordinates | null, {
|
|
2
2
|
rowIndex: number;
|
|
3
3
|
columnIndex: number;
|
|
4
|
-
id?: import("
|
|
4
|
+
id?: import("@mui/x-data-grid").GridRowId | undefined;
|
|
5
5
|
field?: string | undefined;
|
|
6
6
|
} | null>;
|
|
@@ -4,33 +4,33 @@ import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
|
4
4
|
* Get the columns state
|
|
5
5
|
* @category Virtualization
|
|
6
6
|
*/
|
|
7
|
-
export declare const gridVirtualizationSelector: import("
|
|
7
|
+
export declare const gridVirtualizationSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridVirtualizationState>;
|
|
8
8
|
/**
|
|
9
9
|
* Get the enabled state for virtualization
|
|
10
10
|
* @category Virtualization
|
|
11
11
|
* @deprecated Use `gridVirtualizationColumnEnabledSelector` and `gridVirtualizationRowEnabledSelector`
|
|
12
12
|
*/
|
|
13
|
-
export declare const gridVirtualizationEnabledSelector: import("
|
|
13
|
+
export declare const gridVirtualizationEnabledSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridVirtualizationState, boolean>;
|
|
14
14
|
/**
|
|
15
15
|
* Get the enabled state for column virtualization
|
|
16
16
|
* @category Virtualization
|
|
17
17
|
*/
|
|
18
|
-
export declare const gridVirtualizationColumnEnabledSelector: import("
|
|
18
|
+
export declare const gridVirtualizationColumnEnabledSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridVirtualizationState, boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* Get the enabled state for row virtualization
|
|
21
21
|
* @category Virtualization
|
|
22
22
|
*/
|
|
23
|
-
export declare const gridVirtualizationRowEnabledSelector: import("
|
|
23
|
+
export declare const gridVirtualizationRowEnabledSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridVirtualizationState, boolean>;
|
|
24
24
|
/**
|
|
25
25
|
* Get the render context
|
|
26
26
|
* @category Virtualization
|
|
27
27
|
* @ignore - do not document.
|
|
28
28
|
*/
|
|
29
|
-
export declare const gridRenderContextSelector: import("
|
|
29
|
+
export declare const gridRenderContextSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridVirtualizationState, import("@mui/x-data-grid").GridRenderContext>;
|
|
30
30
|
/**
|
|
31
31
|
* Get the render context, with only columns filled in.
|
|
32
32
|
* This is cached, so it can be used to only re-render when the column interval changes.
|
|
33
33
|
* @category Virtualization
|
|
34
34
|
* @ignore - do not document.
|
|
35
35
|
*/
|
|
36
|
-
export declare const gridRenderContextColumnsSelector: import("
|
|
36
|
+
export declare const gridRenderContextColumnsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, number, GridColumnsRenderContext>;
|
|
@@ -64,7 +64,7 @@ const useGridVirtualScroller = () => {
|
|
|
64
64
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
65
65
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
66
66
|
const {
|
|
67
|
-
|
|
67
|
+
listView
|
|
68
68
|
} = rootProps;
|
|
69
69
|
const visibleColumns = (0, _useGridSelector.useGridSelector)(apiRef, () => listView ? [(0, _gridListViewSelectors.gridListColumnSelector)(apiRef)] : (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef));
|
|
70
70
|
const enabledForRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationRowEnabledSelector) && !_isJSDOM.isJSDOM;
|
|
@@ -511,9 +511,9 @@ const useGridVirtualScroller = () => {
|
|
|
511
511
|
apiRef.current.register('private', {
|
|
512
512
|
updateRenderContext: forceUpdateRenderContext
|
|
513
513
|
});
|
|
514
|
-
(0, _utils.
|
|
515
|
-
(0, _utils.
|
|
516
|
-
(0, _utils.
|
|
514
|
+
(0, _utils.useGridEventPriority)(apiRef, 'sortedRowsSet', forceUpdateRenderContext);
|
|
515
|
+
(0, _utils.useGridEventPriority)(apiRef, 'paginationModelChange', forceUpdateRenderContext);
|
|
516
|
+
(0, _utils.useGridEventPriority)(apiRef, 'columnsChange', forceUpdateRenderContext);
|
|
517
517
|
return {
|
|
518
518
|
renderContext,
|
|
519
519
|
setPanels,
|
|
@@ -561,7 +561,7 @@ function needsHorizontalScrollbarSelector(apiRef) {
|
|
|
561
561
|
function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
562
562
|
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef);
|
|
563
563
|
const currentPage = (0, _useGridVisibleRows.getVisibleRows)(apiRef, rootProps);
|
|
564
|
-
const visibleColumns = rootProps.
|
|
564
|
+
const visibleColumns = rootProps.listView ? [(0, _gridListViewSelectors.gridListColumnSelector)(apiRef)] : (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef);
|
|
565
565
|
const hiddenCellsOriginMap = (0, _gridRowSpanningSelectors.gridRowSpanningHiddenCellsOriginMapSelector)(apiRef);
|
|
566
566
|
const lastRowId = apiRef.current.state.rows.dataRowIds.at(-1);
|
|
567
567
|
const lastColumn = visibleColumns.at(-1);
|
|
@@ -585,7 +585,7 @@ function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
|
585
585
|
pinnedColumns: (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef),
|
|
586
586
|
visibleColumns,
|
|
587
587
|
hiddenCellsOriginMap,
|
|
588
|
-
listView: rootProps.
|
|
588
|
+
listView: rootProps.listView ?? false,
|
|
589
589
|
virtualizeColumnsWithAutoRowHeight: rootProps.virtualizeColumnsWithAutoRowHeight
|
|
590
590
|
};
|
|
591
591
|
}
|
package/hooks/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { useGridEvent, useGridEventPriority, unstable_resetCleanupTracking } from "./useGridEvent.js";
|
|
2
2
|
export * from "./useGridApiMethod.js";
|
|
3
3
|
export * from "./useGridLogger.js";
|
|
4
4
|
export { useGridSelector } from "./useGridSelector.js";
|