@mui/x-data-grid 5.6.1 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +275 -53
- package/DataGrid/DataGrid.d.ts +8 -3
- package/DataGrid/DataGrid.js +35 -2
- package/DataGrid/useDataGridComponent.js +13 -7
- package/DataGrid/useDataGridProps.d.ts +2 -1
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/colDef/gridBooleanColDef.d.ts +1 -1
- package/colDef/gridBooleanOperators.d.ts +1 -1
- package/colDef/gridDateColDef.d.ts +5 -9
- package/colDef/gridDateColDef.js +2 -2
- package/colDef/gridDateOperators.d.ts +1 -1
- package/{models/colDef → colDef}/gridDefaultColumnTypes.d.ts +1 -1
- package/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/colDef/gridNumericColDef.d.ts +1 -1
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridStringColDef.d.ts +1 -1
- package/colDef/gridStringOperators.d.ts +1 -1
- package/colDef/index.d.ts +1 -0
- package/colDef/index.js +2 -1
- package/components/ErrorOverlay.js +8 -1
- package/components/GridLoadingOverlay.d.ts +4 -2
- package/components/GridLoadingOverlay.js +11 -2
- package/components/GridNoResultsOverlay.d.ts +3 -2
- package/components/GridNoRowsOverlay.d.ts +4 -2
- package/components/GridNoRowsOverlay.js +11 -2
- package/components/GridRow.d.ts +4 -0
- package/components/GridRow.js +50 -24
- package/components/base/GridErrorHandler.js +6 -25
- package/components/base/GridOverlays.js +4 -3
- package/components/cell/GridActionsCell.d.ts +5 -1
- package/components/cell/GridActionsCell.js +170 -21
- package/components/cell/GridActionsCellItem.d.ts +66 -4
- package/components/cell/GridActionsCellItem.js +7 -5
- package/components/cell/GridCell.d.ts +5 -4
- package/components/cell/GridCell.js +30 -9
- package/components/cell/GridEditBooleanCell.js +1 -1
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.js +66 -5
- package/components/cell/GridEditSingleSelectCell.js +97 -16
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +12 -0
- package/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/components/columnHeaders/GridColumnHeaderItem.js +9 -12
- package/components/columnHeaders/GridColumnHeaderTitle.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/components/columnHeaders/GridColumnHeaders.d.ts +0 -1
- package/components/columnHeaders/GridColumnHeaders.js +4 -2
- package/components/columnHeaders/index.d.ts +1 -0
- package/components/columnHeaders/index.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +3 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +22 -5
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/containers/GridOverlay.d.ts +9 -2
- package/components/containers/GridOverlay.js +11 -2
- package/components/containers/GridRoot.js +29 -17
- package/components/containers/GridRootStyles.js +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/components/panel/GridColumnsPanel.d.ts +4 -1
- package/components/panel/GridColumnsPanel.js +3 -3
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +1 -0
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +4 -6
- package/components/panel/filterPanel/GridFilterForm.js +14 -10
- package/components/panel/filterPanel/GridFilterInputBoolean.js +13 -8
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +22 -15
- package/components/panel/filterPanel/GridFilterInputValue.js +22 -15
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/gridClasses.d.ts +15 -3
- package/constants/gridDetailPanelToggleField.d.ts +1 -0
- package/constants/gridDetailPanelToggleField.js +2 -0
- package/hooks/core/index.d.ts +1 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +85 -0
- package/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/hooks/core/pipeProcessing/index.d.ts +4 -0
- package/hooks/core/pipeProcessing/index.js +4 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +32 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +108 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +3 -0
- package/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeApplier.js} +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +4 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +27 -0
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +58 -0
- package/hooks/core/{rowGroupsPreProcessing/gridRowGroupsPreProcessingApi.js → strategyProcessing/gridStrategyProcessingApi.js} +0 -0
- package/hooks/core/strategyProcessing/index.d.ts +3 -0
- package/hooks/core/strategyProcessing/index.js +3 -0
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +4 -0
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +18 -0
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +48 -0
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +125 -0
- package/hooks/core/useGridInitialization.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +0 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +77 -11
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +8 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +6 -6
- package/hooks/features/columns/gridColumnsUtils.d.ts +33 -7
- package/hooks/features/columns/gridColumnsUtils.js +210 -41
- package/hooks/features/columns/useGridColumnSpanning.d.ts +7 -0
- package/hooks/features/columns/useGridColumnSpanning.js +109 -0
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +117 -65
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
- package/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +4 -0
- package/hooks/features/editRows/useGridCellEditing.new.js +338 -0
- package/hooks/features/editRows/{useGridCellEditing.d.ts → useGridCellEditing.old.d.ts} +0 -0
- package/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/hooks/features/editRows/useGridEditing.new.d.ts +6 -0
- package/hooks/features/editRows/useGridEditing.new.js +122 -0
- package/hooks/features/editRows/{useGridEditing.d.ts → useGridEditing.old.d.ts} +0 -0
- package/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/hooks/features/editRows/useGridRowEditing.new.d.ts +4 -0
- package/hooks/features/editRows/useGridRowEditing.new.js +509 -0
- package/hooks/features/editRows/{useGridRowEditing.d.ts → useGridRowEditing.old.d.ts} +0 -0
- package/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +7 -7
- package/hooks/features/events/useGridEvents.d.ts +1 -1
- package/hooks/features/events/useGridEvents.js +2 -0
- package/hooks/features/filter/gridFilterSelector.d.ts +3 -9
- package/hooks/features/filter/gridFilterState.d.ts +2 -5
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +38 -39
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.js +47 -1
- package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.d.ts +3 -5
- package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +66 -13
- package/hooks/features/pagination/gridPaginationSelector.d.ts +1 -3
- package/hooks/features/pagination/useGridPage.js +9 -4
- package/hooks/features/pagination/useGridPageSize.js +3 -3
- package/hooks/features/preferencesPanel/gridPreferencePanelState.d.ts +5 -0
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/hooks/features/rows/gridRowsSelector.d.ts +2 -1
- package/hooks/features/rows/gridRowsSelector.js +1 -0
- package/hooks/features/rows/gridRowsState.d.ts +24 -5
- package/hooks/features/rows/gridRowsUtils.d.ts +8 -0
- package/hooks/features/rows/gridRowsUtils.js +11 -0
- package/hooks/features/rows/index.d.ts +1 -0
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridRows.d.ts +2 -5
- package/hooks/features/rows/useGridRows.js +71 -49
- package/hooks/features/rows/useGridRowsMeta.js +7 -14
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +3 -0
- package/hooks/features/rows/useGridRowsPreProcessors.js +37 -0
- package/hooks/features/scroll/useGridScroll.d.ts +2 -0
- package/hooks/features/scroll/useGridScroll.js +27 -14
- package/hooks/features/selection/gridSelectionSelector.d.ts +1 -3
- package/hooks/features/selection/useGridSelection.d.ts +4 -2
- package/hooks/features/selection/useGridSelection.js +79 -27
- package/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +1 -3
- package/hooks/features/sorting/gridSortingState.d.ts +2 -5
- package/hooks/features/sorting/gridSortingUtils.d.ts +1 -2
- package/hooks/features/sorting/useGridSorting.js +18 -37
- package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +7 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +59 -30
- package/hooks/utils/useGridRootProps.d.ts +1 -1
- package/hooks/utils/useGridVisibleRows.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +14 -13
- package/internals/index.js +7 -6
- package/legacy/DataGrid/DataGrid.js +35 -2
- package/legacy/DataGrid/useDataGridComponent.js +13 -7
- package/legacy/colDef/gridDateColDef.js +2 -2
- package/legacy/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/legacy/colDef/index.js +2 -1
- package/legacy/components/ErrorOverlay.js +8 -1
- package/legacy/components/GridLoadingOverlay.js +11 -2
- package/legacy/components/GridNoRowsOverlay.js +11 -2
- package/legacy/components/GridRow.js +48 -24
- package/legacy/components/base/GridErrorHandler.js +3 -24
- package/legacy/components/base/GridOverlays.js +4 -3
- package/legacy/components/cell/GridActionsCell.js +188 -27
- package/legacy/components/cell/GridActionsCellItem.js +7 -5
- package/legacy/components/cell/GridCell.js +31 -9
- package/legacy/components/cell/GridEditBooleanCell.js +2 -1
- package/legacy/components/cell/GridEditDateCell.js +2 -1
- package/legacy/components/cell/GridEditInputCell.js +66 -5
- package/legacy/components/cell/GridEditSingleSelectCell.js +109 -24
- package/legacy/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +9 -12
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/legacy/components/columnHeaders/GridColumnHeaders.js +5 -4
- package/legacy/components/columnHeaders/index.js +1 -0
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +23 -5
- package/legacy/components/containers/GridOverlay.js +11 -2
- package/legacy/components/containers/GridRoot.js +34 -17
- package/legacy/components/containers/GridRootStyles.js +2 -2
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/legacy/components/panel/GridColumnsPanel.js +3 -3
- package/legacy/components/panel/GridPanel.js +1 -0
- package/legacy/components/panel/GridPreferencesPanel.js +4 -6
- package/legacy/components/panel/filterPanel/GridFilterForm.js +14 -10
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +13 -8
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +22 -17
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +22 -17
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/legacy/components/virtualization/GridVirtualScroller.js +2 -0
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/legacy/constants/defaultGridSlotsComponents.js +2 -1
- package/legacy/constants/gridDetailPanelToggleField.js +2 -0
- package/legacy/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/legacy/hooks/core/pipeProcessing/index.js +4 -0
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +119 -0
- package/legacy/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeApplier.js} +2 -2
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +27 -0
- package/legacy/hooks/core/{rowGroupsPreProcessing/gridRowGroupsPreProcessingApi.js → strategyProcessing/gridStrategyProcessingApi.js} +0 -0
- package/legacy/hooks/core/strategyProcessing/index.js +3 -0
- package/legacy/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +18 -0
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +130 -0
- package/legacy/hooks/core/useGridInitialization.js +4 -4
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +90 -11
- package/legacy/hooks/features/columns/gridColumnsUtils.js +222 -44
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +107 -0
- package/legacy/hooks/features/columns/useGridColumns.js +118 -66
- package/legacy/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +350 -0
- package/legacy/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/legacy/hooks/features/editRows/useGridEditing.new.js +156 -0
- package/legacy/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +516 -0
- package/legacy/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +7 -7
- package/legacy/hooks/features/events/useGridEvents.js +2 -0
- package/legacy/hooks/features/filter/useGridFilter.js +38 -39
- package/legacy/hooks/features/focus/useGridFocus.js +47 -1
- package/legacy/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +66 -12
- package/legacy/hooks/features/pagination/useGridPage.js +11 -4
- package/legacy/hooks/features/pagination/useGridPageSize.js +3 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/legacy/hooks/features/rows/gridRowsSelector.js +3 -0
- package/legacy/hooks/features/rows/gridRowsUtils.js +13 -0
- package/legacy/hooks/features/rows/index.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +75 -53
- package/legacy/hooks/features/rows/useGridRowsMeta.js +7 -14
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +36 -0
- package/legacy/hooks/features/scroll/useGridScroll.js +27 -14
- package/legacy/hooks/features/selection/useGridSelection.js +81 -27
- package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/legacy/hooks/features/sorting/useGridSorting.js +14 -35
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +70 -40
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +7 -6
- package/legacy/locales/arSD.js +62 -58
- package/legacy/locales/daDK.js +36 -32
- package/legacy/locales/faIR.js +26 -22
- package/legacy/locales/huHU.js +120 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/koKR.js +1 -1
- package/legacy/locales/plPL.js +30 -26
- package/{modern/hooks/core/preProcessing/gridPreProcessingApi.js → legacy/models/api/gridColumnSpanning.js} +0 -0
- package/legacy/models/colDef/index.js +1 -2
- package/legacy/models/events/gridEvents.js +6 -4
- package/{modern/hooks/core/rowGroupsPreProcessing/gridRowGroupsPreProcessingApi.js → legacy/models/gridColumnSpanning.js} +0 -0
- package/legacy/models/gridEditRowModel.js +1 -0
- package/legacy/models/gridRows.js +1 -33
- package/legacy/models/index.js +2 -2
- package/legacy/models/params/gridEditCellParams.js +34 -1
- package/legacy/models/params/gridPreferencePanelParams.js +1 -0
- package/legacy/models/params/gridRowParams.js +39 -1
- package/legacy/models/params/index.js +2 -1
- package/legacy/utils/cleanupTracking/TimerBasedCleanupTracking.js +5 -1
- package/legacy/utils/utils.js +150 -3
- package/locales/arSD.js +58 -58
- package/locales/daDK.js +32 -32
- package/locales/faIR.js +22 -22
- package/locales/huHU.d.ts +2 -0
- package/locales/huHU.js +108 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/koKR.js +1 -1
- package/locales/plPL.js +26 -26
- package/models/api/gridApiCommon.d.ts +4 -3
- package/models/api/gridColumnSpanning.d.ts +28 -0
- package/models/api/gridColumnSpanning.js +1 -0
- package/models/api/gridEditingApi.d.ts +174 -7
- package/models/api/gridFocusApi.d.ts +9 -0
- package/models/api/gridParamsApi.d.ts +5 -5
- package/models/api/gridRowApi.d.ts +2 -2
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +42 -28
- package/models/colDef/index.d.ts +0 -1
- package/models/colDef/index.js +1 -2
- package/models/events/gridEventLookup.d.ts +20 -13
- package/models/events/gridEvents.d.ts +22 -14
- package/models/events/gridEvents.js +6 -4
- package/models/gridCell.d.ts +1 -0
- package/models/gridColumnSpanning.d.ts +12 -0
- package/models/gridColumnSpanning.js +1 -0
- package/models/gridEditRowModel.d.ts +4 -3
- package/models/gridEditRowModel.js +1 -0
- package/models/gridFilterOperator.d.ts +3 -2
- package/models/gridRows.d.ts +10 -18
- package/models/gridRows.js +1 -31
- package/models/gridSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponentsProps.d.ts +1 -0
- package/models/gridSortModel.d.ts +3 -4
- package/models/index.d.ts +1 -1
- package/models/index.js +2 -2
- package/models/params/gridCellParams.d.ts +34 -15
- package/models/params/gridColumnHeaderParams.d.ts +3 -2
- package/models/params/gridEditCellParams.d.ts +52 -3
- package/models/params/gridEditCellParams.js +34 -1
- package/models/params/gridPreferencePanelParams.d.ts +3 -0
- package/models/params/gridPreferencePanelParams.js +1 -0
- package/models/params/gridRowParams.d.ts +51 -7
- package/models/params/gridRowParams.js +39 -1
- package/models/params/gridValueOptionsParams.d.ts +3 -3
- package/models/params/index.d.ts +1 -0
- package/models/params/index.js +2 -1
- package/models/props/DataGridProps.d.ts +45 -13
- package/modern/DataGrid/DataGrid.js +35 -2
- package/modern/DataGrid/useDataGridComponent.js +11 -7
- package/modern/colDef/gridDateColDef.js +2 -2
- package/modern/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/modern/colDef/index.js +2 -1
- package/modern/components/ErrorOverlay.js +8 -1
- package/modern/components/GridLoadingOverlay.js +11 -2
- package/modern/components/GridNoRowsOverlay.js +11 -2
- package/modern/components/GridRow.js +48 -22
- package/modern/components/base/GridErrorHandler.js +1 -20
- package/modern/components/base/GridOverlays.js +4 -3
- package/modern/components/cell/GridActionsCell.js +168 -21
- package/modern/components/cell/GridActionsCellItem.js +7 -5
- package/modern/components/cell/GridCell.js +30 -9
- package/modern/components/cell/GridEditBooleanCell.js +1 -1
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +64 -5
- package/modern/components/cell/GridEditSingleSelectCell.js +91 -14
- package/modern/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaders.js +4 -2
- package/modern/components/columnHeaders/index.js +1 -0
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +22 -5
- package/modern/components/containers/GridOverlay.js +11 -2
- package/modern/components/containers/GridRoot.js +29 -17
- package/modern/components/containers/GridRootStyles.js +2 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/modern/components/panel/GridColumnsPanel.js +3 -3
- package/modern/components/panel/GridPanel.js +1 -0
- package/modern/components/panel/GridPreferencesPanel.js +3 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +10 -6
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +11 -6
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +20 -13
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +20 -13
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -0
- package/modern/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/gridDetailPanelToggleField.js +2 -0
- package/modern/hooks/core/pipeProcessing/gridPipeProcessingApi.js +1 -0
- package/modern/hooks/core/pipeProcessing/index.js +4 -0
- package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +108 -0
- package/modern/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeApplier.js} +2 -2
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +27 -0
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +1 -0
- package/modern/hooks/core/strategyProcessing/index.js +3 -0
- package/modern/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +18 -0
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +123 -0
- package/modern/hooks/core/useGridInitialization.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +77 -11
- package/modern/hooks/features/columns/gridColumnsUtils.js +210 -39
- package/modern/hooks/features/columns/useGridColumnSpanning.js +107 -0
- package/modern/hooks/features/columns/useGridColumns.js +112 -62
- package/modern/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +338 -0
- package/modern/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/modern/hooks/features/editRows/useGridEditing.new.js +122 -0
- package/modern/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +507 -0
- package/modern/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +7 -7
- package/modern/hooks/features/events/useGridEvents.js +2 -0
- package/modern/hooks/features/filter/useGridFilter.js +34 -39
- package/modern/hooks/features/focus/useGridFocus.js +47 -1
- package/modern/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +64 -13
- package/modern/hooks/features/pagination/useGridPage.js +9 -4
- package/modern/hooks/features/pagination/useGridPageSize.js +3 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +11 -0
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +69 -47
- package/modern/hooks/features/rows/useGridRowsMeta.js +7 -14
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +37 -0
- package/modern/hooks/features/scroll/useGridScroll.js +25 -10
- package/modern/hooks/features/selection/useGridSelection.js +79 -27
- package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/modern/hooks/features/sorting/useGridSorting.js +18 -37
- package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +59 -26
- package/modern/index.js +1 -1
- package/modern/internals/index.js +7 -6
- package/modern/locales/arSD.js +58 -58
- package/modern/locales/daDK.js +32 -32
- package/modern/locales/faIR.js +22 -22
- package/modern/locales/huHU.js +108 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/koKR.js +1 -1
- package/modern/locales/plPL.js +26 -26
- package/modern/models/api/gridColumnSpanning.js +1 -0
- package/modern/models/colDef/index.js +1 -2
- package/modern/models/events/gridEvents.js +6 -4
- package/modern/models/gridColumnSpanning.js +1 -0
- package/modern/models/gridEditRowModel.js +1 -0
- package/modern/models/gridRows.js +1 -31
- package/modern/models/index.js +2 -2
- package/modern/models/params/gridEditCellParams.js +34 -1
- package/modern/models/params/gridPreferencePanelParams.js +1 -0
- package/modern/models/params/gridRowParams.js +39 -1
- package/modern/models/params/index.js +2 -1
- package/modern/utils/cleanupTracking/TimerBasedCleanupTracking.js +4 -2
- package/modern/utils/utils.js +150 -3
- package/node/DataGrid/DataGrid.js +35 -2
- package/node/DataGrid/useDataGridComponent.js +17 -9
- package/node/colDef/gridDateColDef.js +2 -2
- package/node/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/node/colDef/index.js +13 -0
- package/node/components/ErrorOverlay.js +10 -1
- package/node/components/GridLoadingOverlay.js +10 -1
- package/node/components/GridNoRowsOverlay.js +10 -1
- package/node/components/GridRow.js +51 -24
- package/node/components/base/GridErrorHandler.js +7 -30
- package/node/components/base/GridOverlays.js +3 -2
- package/node/components/cell/GridActionsCell.js +172 -21
- package/node/components/cell/GridActionsCellItem.js +7 -4
- package/node/components/cell/GridCell.js +30 -9
- package/node/components/cell/GridEditBooleanCell.js +1 -1
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +66 -5
- package/node/components/cell/GridEditSingleSelectCell.js +98 -16
- package/node/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +23 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +9 -13
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaders.js +4 -2
- package/node/components/columnHeaders/index.js +13 -0
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +22 -5
- package/node/components/containers/GridOverlay.js +10 -1
- package/node/components/containers/GridRoot.js +28 -17
- package/node/components/containers/GridRootStyles.js +2 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/node/components/panel/GridColumnsPanel.js +3 -3
- package/node/components/panel/GridPanel.js +1 -0
- package/node/components/panel/GridPreferencesPanel.js +4 -5
- package/node/components/panel/filterPanel/GridFilterForm.js +15 -10
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +14 -8
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +23 -15
- package/node/components/panel/filterPanel/GridFilterInputValue.js +23 -15
- package/node/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +2 -0
- package/node/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/node/constants/defaultGridSlotsComponents.js +1 -0
- package/node/constants/gridDetailPanelToggleField.js +9 -0
- package/node/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/node/hooks/core/pipeProcessing/index.js +57 -0
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +124 -0
- package/node/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeApplier.js} +4 -4
- package/node/hooks/{features/filter/useGridRegisterFilteringMethod.js → core/pipeProcessing/useGridRegisterPipeProcessor.js} +27 -9
- package/node/hooks/core/{rowGroupsPreProcessing/gridRowGroupsPreProcessingApi.js → strategyProcessing/gridStrategyProcessingApi.js} +0 -0
- package/node/hooks/core/strategyProcessing/index.js +44 -0
- package/node/hooks/{features/sorting/useGridRegisterSortingMethod.js → core/strategyProcessing/useGridRegisterStrategyProcessor.js} +18 -9
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +146 -0
- package/node/hooks/core/useGridInitialization.js +4 -4
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +81 -11
- package/node/hooks/features/columns/gridColumnsUtils.js +222 -46
- package/node/hooks/features/columns/useGridColumnSpanning.js +130 -0
- package/node/hooks/features/columns/useGridColumns.js +120 -64
- package/node/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/node/hooks/features/editRows/useGridCellEditing.new.js +359 -0
- package/node/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/node/hooks/features/editRows/useGridEditing.new.js +146 -0
- package/node/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/node/hooks/features/editRows/useGridRowEditing.new.js +523 -0
- package/node/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +6 -6
- package/node/hooks/features/events/useGridEvents.js +2 -0
- package/node/hooks/features/filter/useGridFilter.js +38 -38
- package/node/hooks/features/focus/useGridFocus.js +50 -1
- package/node/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +69 -13
- package/node/hooks/features/pagination/useGridPage.js +8 -3
- package/node/hooks/features/pagination/useGridPageSize.js +3 -3
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +20 -5
- package/node/hooks/features/rows/gridRowsSelector.js +3 -1
- package/node/hooks/features/rows/gridRowsUtils.js +18 -0
- package/node/hooks/features/rows/index.js +15 -1
- package/node/hooks/features/rows/useGridRows.js +72 -50
- package/node/hooks/features/rows/useGridRowsMeta.js +7 -15
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +46 -0
- package/node/hooks/features/scroll/useGridScroll.js +28 -14
- package/node/hooks/features/selection/useGridSelection.js +79 -26
- package/node/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/node/hooks/features/sorting/useGridSorting.js +18 -37
- package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +64 -30
- package/node/index.js +1 -1
- package/node/internals/index.js +41 -27
- package/node/locales/arSD.js +58 -58
- package/node/locales/daDK.js +32 -32
- package/node/locales/faIR.js +22 -22
- package/node/locales/huHU.js +118 -0
- package/node/locales/index.js +13 -0
- package/node/locales/koKR.js +1 -1
- package/node/locales/plPL.js +26 -26
- package/node/models/api/gridColumnSpanning.js +5 -0
- package/node/models/colDef/index.js +0 -13
- package/node/models/events/gridEvents.js +6 -4
- package/node/models/gridColumnSpanning.js +5 -0
- package/node/models/gridEditRowModel.js +1 -0
- package/node/models/gridRows.js +1 -34
- package/node/models/index.js +13 -13
- package/node/models/params/gridEditCellParams.js +37 -1
- package/node/models/params/gridPreferencePanelParams.js +5 -0
- package/node/models/params/gridRowParams.js +42 -1
- package/node/models/params/index.js +13 -0
- package/node/utils/cleanupTracking/TimerBasedCleanupTracking.js +4 -2
- package/node/utils/utils.js +152 -11
- package/package.json +4 -4
- package/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +2 -0
- package/utils/cleanupTracking/TimerBasedCleanupTracking.js +4 -2
- package/utils/domUtils.d.ts +2 -2
- package/utils/utils.d.ts +27 -2
- package/utils/utils.js +150 -3
- package/components/columnHeaders/ColumnHeaderFilterIcon.d.ts +0 -5
- package/hooks/core/preProcessing/gridPreProcessingApi.d.ts +0 -71
- package/hooks/core/preProcessing/index.d.ts +0 -3
- package/hooks/core/preProcessing/index.js +0 -3
- package/hooks/core/preProcessing/useGridPreProcessing.d.ts +0 -3
- package/hooks/core/preProcessing/useGridPreProcessing.js +0 -49
- package/hooks/core/preProcessing/useGridRegisterPreProcessor.d.ts +0 -4
- package/hooks/core/rowGroupsPreProcessing/gridRowGroupsPreProcessingApi.d.ts +0 -35
- package/hooks/core/rowGroupsPreProcessing/index.d.ts +0 -2
- package/hooks/core/rowGroupsPreProcessing/index.js +0 -2
- package/hooks/core/rowGroupsPreProcessing/useGridRowGroupsPreProcessing.d.ts +0 -3
- package/hooks/core/rowGroupsPreProcessing/useGridRowGroupsPreProcessing.js +0 -72
- package/hooks/features/filter/useGridRegisterFilteringMethod.d.ts +0 -4
- package/hooks/features/filter/useGridRegisterFilteringMethod.js +0 -9
- package/hooks/features/keyboard/useGridKeyboard.d.ts +0 -10
- package/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/hooks/features/sorting/useGridRegisterSortingMethod.d.ts +0 -4
- package/hooks/features/sorting/useGridRegisterSortingMethod.js +0 -9
- package/legacy/hooks/core/preProcessing/index.js +0 -3
- package/legacy/hooks/core/preProcessing/useGridPreProcessing.js +0 -58
- package/legacy/hooks/core/rowGroupsPreProcessing/index.js +0 -2
- package/legacy/hooks/core/rowGroupsPreProcessing/useGridRowGroupsPreProcessing.js +0 -71
- package/legacy/hooks/features/filter/useGridRegisterFilteringMethod.js +0 -9
- package/legacy/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/legacy/hooks/features/sorting/useGridRegisterSortingMethod.js +0 -9
- package/legacy/lib/lodash/_DataView.js +0 -8
- package/legacy/lib/lodash/_Hash.js +0 -33
- package/legacy/lib/lodash/_ListCache.js +0 -33
- package/legacy/lib/lodash/_Map.js +0 -8
- package/legacy/lib/lodash/_MapCache.js +0 -33
- package/legacy/lib/lodash/_Promise.js +0 -8
- package/legacy/lib/lodash/_Set.js +0 -8
- package/legacy/lib/lodash/_SetCache.js +0 -28
- package/legacy/lib/lodash/_Stack.js +0 -28
- package/legacy/lib/lodash/_Symbol.js +0 -7
- package/legacy/lib/lodash/_Uint8Array.js +0 -7
- package/legacy/lib/lodash/_WeakMap.js +0 -8
- package/legacy/lib/lodash/_arrayFilter.js +0 -29
- package/legacy/lib/lodash/_arrayLikeKeys.js +0 -46
- package/legacy/lib/lodash/_arrayPush.js +0 -23
- package/legacy/lib/lodash/_arraySome.js +0 -26
- package/legacy/lib/lodash/_assocIndexOf.js +0 -25
- package/legacy/lib/lodash/_baseGetAllKeys.js +0 -22
- package/legacy/lib/lodash/_baseGetTag.js +0 -29
- package/legacy/lib/lodash/_baseIsArguments.js +0 -20
- package/legacy/lib/lodash/_baseIsEqual.js +0 -32
- package/legacy/lib/lodash/_baseIsEqualDeep.js +0 -85
- package/legacy/lib/lodash/_baseIsNative.js +0 -47
- package/legacy/lib/lodash/_baseIsTypedArray.js +0 -49
- package/legacy/lib/lodash/_baseKeys.js +0 -35
- package/legacy/lib/lodash/_baseTimes.js +0 -23
- package/legacy/lib/lodash/_baseUnary.js +0 -16
- package/legacy/lib/lodash/_cacheHas.js +0 -15
- package/legacy/lib/lodash/_coreJsData.js +0 -7
- package/legacy/lib/lodash/_equalArrays.js +0 -84
- package/legacy/lib/lodash/_equalByTag.js +0 -117
- package/legacy/lib/lodash/_equalObjects.js +0 -92
- package/legacy/lib/lodash/_freeGlobal.js +0 -6
- package/legacy/lib/lodash/_getAllKeys.js +0 -18
- package/legacy/lib/lodash/_getMapData.js +0 -18
- package/legacy/lib/lodash/_getNative.js +0 -19
- package/legacy/lib/lodash/_getRawTag.js +0 -50
- package/legacy/lib/lodash/_getSymbols.js +0 -32
- package/legacy/lib/lodash/_getTag.js +0 -64
- package/legacy/lib/lodash/_getValue.js +0 -15
- package/legacy/lib/lodash/_hashClear.js +0 -17
- package/legacy/lib/lodash/_hashDelete.js +0 -19
- package/legacy/lib/lodash/_hashGet.js +0 -34
- package/legacy/lib/lodash/_hashHas.js +0 -25
- package/legacy/lib/lodash/_hashSet.js +0 -25
- package/legacy/lib/lodash/_isIndex.js +0 -25
- package/legacy/lib/lodash/_isKeyable.js +0 -18
- package/legacy/lib/lodash/_isMasked.js +0 -23
- package/legacy/lib/lodash/_isPrototype.js +0 -19
- package/legacy/lib/lodash/_listCacheClear.js +0 -15
- package/legacy/lib/lodash/_listCacheDelete.js +0 -40
- package/legacy/lib/lodash/_listCacheGet.js +0 -20
- package/legacy/lib/lodash/_listCacheHas.js +0 -18
- package/legacy/lib/lodash/_listCacheSet.js +0 -29
- package/legacy/lib/lodash/_mapCacheClear.js +0 -23
- package/legacy/lib/lodash/_mapCacheDelete.js +0 -20
- package/legacy/lib/lodash/_mapCacheGet.js +0 -18
- package/legacy/lib/lodash/_mapCacheHas.js +0 -18
- package/legacy/lib/lodash/_mapCacheSet.js +0 -23
- package/legacy/lib/lodash/_mapToArray.js +0 -19
- package/legacy/lib/lodash/_nativeCreate.js +0 -7
- package/legacy/lib/lodash/_nativeKeys.js +0 -7
- package/legacy/lib/lodash/_nodeUtil.js +0 -25
- package/legacy/lib/lodash/_objectToString.js +0 -24
- package/legacy/lib/lodash/_overArg.js +0 -17
- package/legacy/lib/lodash/_root.js +0 -11
- package/legacy/lib/lodash/_setCacheAdd.js +0 -22
- package/legacy/lib/lodash/_setCacheHas.js +0 -16
- package/legacy/lib/lodash/_setToArray.js +0 -19
- package/legacy/lib/lodash/_stackClear.js +0 -17
- package/legacy/lib/lodash/_stackDelete.js +0 -19
- package/legacy/lib/lodash/_stackGet.js +0 -16
- package/legacy/lib/lodash/_stackHas.js +0 -16
- package/legacy/lib/lodash/_stackSet.js +0 -40
- package/legacy/lib/lodash/_toSource.js +0 -30
- package/legacy/lib/lodash/date.default.js +0 -4
- package/legacy/lib/lodash/date.js +0 -2
- package/legacy/lib/lodash/eq.js +0 -39
- package/legacy/lib/lodash/function.default.js +0 -4
- package/legacy/lib/lodash/function.js +0 -2
- package/legacy/lib/lodash/isArguments.js +0 -38
- package/legacy/lib/lodash/isArray.js +0 -27
- package/legacy/lib/lodash/isArrayLike.js +0 -35
- package/legacy/lib/lodash/isBuffer.js +0 -40
- package/legacy/lib/lodash/isDeepEqual.js +0 -45
- package/legacy/lib/lodash/isFunction.js +0 -40
- package/legacy/lib/lodash/isLength.js +0 -36
- package/legacy/lib/lodash/isObject.js +0 -36
- package/legacy/lib/lodash/isObjectLike.js +0 -33
- package/legacy/lib/lodash/isSymbol.js +0 -31
- package/legacy/lib/lodash/isTypedArray.js +0 -28
- package/legacy/lib/lodash/keys.js +0 -39
- package/legacy/lib/lodash/lang.default.js +0 -28
- package/legacy/lib/lodash/lang.js +0 -14
- package/legacy/lib/lodash/now.js +0 -25
- package/legacy/lib/lodash/object.default.js +0 -4
- package/legacy/lib/lodash/object.js +0 -2
- package/legacy/lib/lodash/stubArray.js +0 -25
- package/legacy/lib/lodash/stubFalse.js +0 -20
- package/legacy/lib/lodash/toNumber.js +0 -70
- package/legacy/lib/lodash/util.default.js +0 -6
- package/legacy/lib/lodash/util.js +0 -3
- package/lib/lodash/_DataView.d.ts +0 -2
- package/lib/lodash/_DataView.js +0 -8
- package/lib/lodash/_Hash.d.ts +0 -29
- package/lib/lodash/_Hash.js +0 -33
- package/lib/lodash/_ListCache.d.ts +0 -29
- package/lib/lodash/_ListCache.js +0 -33
- package/lib/lodash/_Map.d.ts +0 -2
- package/lib/lodash/_Map.js +0 -8
- package/lib/lodash/_MapCache.d.ts +0 -29
- package/lib/lodash/_MapCache.js +0 -33
- package/lib/lodash/_Promise.d.ts +0 -2
- package/lib/lodash/_Promise.js +0 -8
- package/lib/lodash/_Set.d.ts +0 -2
- package/lib/lodash/_Set.js +0 -8
- package/lib/lodash/_SetCache.d.ts +0 -28
- package/lib/lodash/_SetCache.js +0 -28
- package/lib/lodash/_Stack.d.ts +0 -32
- package/lib/lodash/_Stack.js +0 -28
- package/lib/lodash/_Symbol.d.ts +0 -3
- package/lib/lodash/_Symbol.js +0 -7
- package/lib/lodash/_Uint8Array.d.ts +0 -3
- package/lib/lodash/_Uint8Array.js +0 -7
- package/lib/lodash/_WeakMap.d.ts +0 -2
- package/lib/lodash/_WeakMap.js +0 -8
- package/lib/lodash/_arrayFilter.d.ts +0 -11
- package/lib/lodash/_arrayFilter.js +0 -29
- package/lib/lodash/_arrayLikeKeys.d.ts +0 -10
- package/lib/lodash/_arrayLikeKeys.js +0 -46
- package/lib/lodash/_arrayPush.d.ts +0 -10
- package/lib/lodash/_arrayPush.js +0 -23
- package/lib/lodash/_arraySome.d.ts +0 -12
- package/lib/lodash/_arraySome.js +0 -26
- package/lib/lodash/_assocIndexOf.d.ts +0 -10
- package/lib/lodash/_assocIndexOf.js +0 -25
- package/lib/lodash/_baseGetAllKeys.d.ts +0 -13
- package/lib/lodash/_baseGetAllKeys.js +0 -22
- package/lib/lodash/_baseGetTag.d.ts +0 -9
- package/lib/lodash/_baseGetTag.js +0 -29
- package/lib/lodash/_baseIsArguments.d.ts +0 -9
- package/lib/lodash/_baseIsArguments.js +0 -20
- package/lib/lodash/_baseIsEqual.d.ts +0 -16
- package/lib/lodash/_baseIsEqual.js +0 -32
- package/lib/lodash/_baseIsEqualDeep.d.ts +0 -16
- package/lib/lodash/_baseIsEqualDeep.js +0 -85
- package/lib/lodash/_baseIsNative.d.ts +0 -10
- package/lib/lodash/_baseIsNative.js +0 -47
- package/lib/lodash/_baseIsTypedArray.d.ts +0 -9
- package/lib/lodash/_baseIsTypedArray.js +0 -49
- package/lib/lodash/_baseKeys.d.ts +0 -9
- package/lib/lodash/_baseKeys.js +0 -35
- package/lib/lodash/_baseTimes.d.ts +0 -11
- package/lib/lodash/_baseTimes.js +0 -23
- package/lib/lodash/_baseUnary.d.ts +0 -9
- package/lib/lodash/_baseUnary.js +0 -16
- package/lib/lodash/_cacheHas.d.ts +0 -10
- package/lib/lodash/_cacheHas.js +0 -15
- package/lib/lodash/_coreJsData.d.ts +0 -3
- package/lib/lodash/_coreJsData.js +0 -7
- package/lib/lodash/_equalArrays.d.ts +0 -15
- package/lib/lodash/_equalArrays.js +0 -84
- package/lib/lodash/_equalByTag.d.ts +0 -19
- package/lib/lodash/_equalByTag.js +0 -117
- package/lib/lodash/_equalObjects.d.ts +0 -15
- package/lib/lodash/_equalObjects.js +0 -92
- package/lib/lodash/_freeGlobal.d.ts +0 -3
- package/lib/lodash/_freeGlobal.js +0 -5
- package/lib/lodash/_getAllKeys.d.ts +0 -9
- package/lib/lodash/_getAllKeys.js +0 -18
- package/lib/lodash/_getMapData.d.ts +0 -10
- package/lib/lodash/_getMapData.js +0 -18
- package/lib/lodash/_getNative.d.ts +0 -10
- package/lib/lodash/_getNative.js +0 -19
- package/lib/lodash/_getRawTag.d.ts +0 -9
- package/lib/lodash/_getRawTag.js +0 -50
- package/lib/lodash/_getSymbols.d.ts +0 -2
- package/lib/lodash/_getSymbols.js +0 -32
- package/lib/lodash/_getTag.d.ts +0 -10
- package/lib/lodash/_getTag.js +0 -64
- package/lib/lodash/_getValue.d.ts +0 -10
- package/lib/lodash/_getValue.js +0 -15
- package/lib/lodash/_hashClear.d.ts +0 -13
- package/lib/lodash/_hashClear.js +0 -17
- package/lib/lodash/_hashDelete.d.ts +0 -12
- package/lib/lodash/_hashDelete.js +0 -19
- package/lib/lodash/_hashGet.d.ts +0 -11
- package/lib/lodash/_hashGet.js +0 -34
- package/lib/lodash/_hashHas.d.ts +0 -11
- package/lib/lodash/_hashHas.js +0 -25
- package/lib/lodash/_hashSet.d.ts +0 -12
- package/lib/lodash/_hashSet.js +0 -25
- package/lib/lodash/_isIndex.d.ts +0 -10
- package/lib/lodash/_isIndex.js +0 -23
- package/lib/lodash/_isKeyable.d.ts +0 -9
- package/lib/lodash/_isKeyable.js +0 -15
- package/lib/lodash/_isMasked.d.ts +0 -9
- package/lib/lodash/_isMasked.js +0 -23
- package/lib/lodash/_isPrototype.d.ts +0 -9
- package/lib/lodash/_isPrototype.js +0 -19
- package/lib/lodash/_listCacheClear.d.ts +0 -13
- package/lib/lodash/_listCacheClear.js +0 -15
- package/lib/lodash/_listCacheDelete.d.ts +0 -11
- package/lib/lodash/_listCacheDelete.js +0 -40
- package/lib/lodash/_listCacheGet.d.ts +0 -11
- package/lib/lodash/_listCacheGet.js +0 -20
- package/lib/lodash/_listCacheHas.d.ts +0 -11
- package/lib/lodash/_listCacheHas.js +0 -18
- package/lib/lodash/_listCacheSet.d.ts +0 -12
- package/lib/lodash/_listCacheSet.js +0 -29
- package/lib/lodash/_mapCacheClear.d.ts +0 -18
- package/lib/lodash/_mapCacheClear.js +0 -23
- package/lib/lodash/_mapCacheDelete.d.ts +0 -11
- package/lib/lodash/_mapCacheDelete.js +0 -20
- package/lib/lodash/_mapCacheGet.d.ts +0 -11
- package/lib/lodash/_mapCacheGet.js +0 -18
- package/lib/lodash/_mapCacheHas.d.ts +0 -11
- package/lib/lodash/_mapCacheHas.js +0 -18
- package/lib/lodash/_mapCacheSet.d.ts +0 -12
- package/lib/lodash/_mapCacheSet.js +0 -23
- package/lib/lodash/_mapToArray.d.ts +0 -9
- package/lib/lodash/_mapToArray.js +0 -19
- package/lib/lodash/_nativeCreate.d.ts +0 -2
- package/lib/lodash/_nativeCreate.js +0 -7
- package/lib/lodash/_nativeKeys.d.ts +0 -2
- package/lib/lodash/_nativeKeys.js +0 -7
- package/lib/lodash/_nodeUtil.d.ts +0 -3
- package/lib/lodash/_nodeUtil.js +0 -24
- package/lib/lodash/_objectToString.d.ts +0 -9
- package/lib/lodash/_objectToString.js +0 -24
- package/lib/lodash/_overArg.d.ts +0 -10
- package/lib/lodash/_overArg.js +0 -17
- package/lib/lodash/_root.d.ts +0 -3
- package/lib/lodash/_root.js +0 -10
- package/lib/lodash/_setCacheAdd.d.ts +0 -12
- package/lib/lodash/_setCacheAdd.js +0 -22
- package/lib/lodash/_setCacheHas.d.ts +0 -11
- package/lib/lodash/_setCacheHas.js +0 -16
- package/lib/lodash/_setToArray.d.ts +0 -9
- package/lib/lodash/_setToArray.js +0 -19
- package/lib/lodash/_stackClear.d.ts +0 -14
- package/lib/lodash/_stackClear.js +0 -17
- package/lib/lodash/_stackDelete.d.ts +0 -24
- package/lib/lodash/_stackDelete.js +0 -19
- package/lib/lodash/_stackGet.d.ts +0 -11
- package/lib/lodash/_stackGet.js +0 -16
- package/lib/lodash/_stackHas.d.ts +0 -11
- package/lib/lodash/_stackHas.js +0 -16
- package/lib/lodash/_stackSet.d.ts +0 -28
- package/lib/lodash/_stackSet.js +0 -40
- package/lib/lodash/_toSource.d.ts +0 -9
- package/lib/lodash/_toSource.js +0 -30
- package/lib/lodash/date.d.ts +0 -2
- package/lib/lodash/date.default.d.ts +0 -5
- package/lib/lodash/date.default.js +0 -4
- package/lib/lodash/date.js +0 -2
- package/lib/lodash/eq.d.ts +0 -34
- package/lib/lodash/eq.js +0 -39
- package/lib/lodash/function.d.ts +0 -1
- package/lib/lodash/function.default.d.ts +0 -4
- package/lib/lodash/function.default.js +0 -4
- package/lib/lodash/function.js +0 -2
- package/lib/lodash/isArguments.d.ts +0 -2
- package/lib/lodash/isArguments.js +0 -38
- package/lib/lodash/isArray.d.ts +0 -25
- package/lib/lodash/isArray.js +0 -27
- package/lib/lodash/isArrayLike.d.ts +0 -27
- package/lib/lodash/isArrayLike.js +0 -35
- package/lib/lodash/isBuffer.d.ts +0 -19
- package/lib/lodash/isBuffer.js +0 -39
- package/lib/lodash/isDeepEqual.d.ts +0 -30
- package/lib/lodash/isDeepEqual.js +0 -45
- package/lib/lodash/isFunction.d.ts +0 -19
- package/lib/lodash/isFunction.js +0 -40
- package/lib/lodash/isLength.d.ts +0 -28
- package/lib/lodash/isLength.js +0 -36
- package/lib/lodash/isObject.d.ts +0 -27
- package/lib/lodash/isObject.js +0 -33
- package/lib/lodash/isObjectLike.d.ts +0 -26
- package/lib/lodash/isObjectLike.js +0 -31
- package/lib/lodash/isSymbol.d.ts +0 -19
- package/lib/lodash/isSymbol.js +0 -30
- package/lib/lodash/isTypedArray.d.ts +0 -19
- package/lib/lodash/isTypedArray.js +0 -28
- package/lib/lodash/keys.d.ts +0 -30
- package/lib/lodash/keys.js +0 -39
- package/lib/lodash/lang.d.ts +0 -14
- package/lib/lodash/lang.default.d.ts +0 -29
- package/lib/lodash/lang.default.js +0 -28
- package/lib/lodash/lang.js +0 -14
- package/lib/lodash/now.d.ts +0 -18
- package/lib/lodash/now.js +0 -25
- package/lib/lodash/object.d.ts +0 -2
- package/lib/lodash/object.default.d.ts +0 -5
- package/lib/lodash/object.default.js +0 -4
- package/lib/lodash/object.js +0 -2
- package/lib/lodash/stubArray.d.ts +0 -20
- package/lib/lodash/stubArray.js +0 -25
- package/lib/lodash/stubFalse.d.ts +0 -15
- package/lib/lodash/stubFalse.js +0 -20
- package/lib/lodash/toNumber.d.ts +0 -25
- package/lib/lodash/toNumber.js +0 -70
- package/lib/lodash/util.d.ts +0 -3
- package/lib/lodash/util.default.d.ts +0 -7
- package/lib/lodash/util.default.js +0 -6
- package/lib/lodash/util.js +0 -3
- package/modern/hooks/core/preProcessing/index.js +0 -3
- package/modern/hooks/core/preProcessing/useGridPreProcessing.js +0 -49
- package/modern/hooks/core/rowGroupsPreProcessing/index.js +0 -2
- package/modern/hooks/core/rowGroupsPreProcessing/useGridRowGroupsPreProcessing.js +0 -70
- package/modern/hooks/features/filter/useGridRegisterFilteringMethod.js +0 -9
- package/modern/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/modern/hooks/features/sorting/useGridRegisterSortingMethod.js +0 -9
- package/modern/lib/lodash/_DataView.js +0 -8
- package/modern/lib/lodash/_Hash.js +0 -33
- package/modern/lib/lodash/_ListCache.js +0 -33
- package/modern/lib/lodash/_Map.js +0 -8
- package/modern/lib/lodash/_MapCache.js +0 -33
- package/modern/lib/lodash/_Promise.js +0 -8
- package/modern/lib/lodash/_Set.js +0 -8
- package/modern/lib/lodash/_SetCache.js +0 -28
- package/modern/lib/lodash/_Stack.js +0 -28
- package/modern/lib/lodash/_Symbol.js +0 -7
- package/modern/lib/lodash/_Uint8Array.js +0 -7
- package/modern/lib/lodash/_WeakMap.js +0 -8
- package/modern/lib/lodash/_arrayFilter.js +0 -29
- package/modern/lib/lodash/_arrayLikeKeys.js +0 -46
- package/modern/lib/lodash/_arrayPush.js +0 -23
- package/modern/lib/lodash/_arraySome.js +0 -26
- package/modern/lib/lodash/_assocIndexOf.js +0 -25
- package/modern/lib/lodash/_baseGetAllKeys.js +0 -22
- package/modern/lib/lodash/_baseGetTag.js +0 -29
- package/modern/lib/lodash/_baseIsArguments.js +0 -20
- package/modern/lib/lodash/_baseIsEqual.js +0 -32
- package/modern/lib/lodash/_baseIsEqualDeep.js +0 -85
- package/modern/lib/lodash/_baseIsNative.js +0 -47
- package/modern/lib/lodash/_baseIsTypedArray.js +0 -49
- package/modern/lib/lodash/_baseKeys.js +0 -35
- package/modern/lib/lodash/_baseTimes.js +0 -23
- package/modern/lib/lodash/_baseUnary.js +0 -16
- package/modern/lib/lodash/_cacheHas.js +0 -15
- package/modern/lib/lodash/_coreJsData.js +0 -7
- package/modern/lib/lodash/_equalArrays.js +0 -84
- package/modern/lib/lodash/_equalByTag.js +0 -117
- package/modern/lib/lodash/_equalObjects.js +0 -92
- package/modern/lib/lodash/_freeGlobal.js +0 -5
- package/modern/lib/lodash/_getAllKeys.js +0 -18
- package/modern/lib/lodash/_getMapData.js +0 -18
- package/modern/lib/lodash/_getNative.js +0 -19
- package/modern/lib/lodash/_getRawTag.js +0 -50
- package/modern/lib/lodash/_getSymbols.js +0 -32
- package/modern/lib/lodash/_getTag.js +0 -64
- package/modern/lib/lodash/_getValue.js +0 -15
- package/modern/lib/lodash/_hashClear.js +0 -17
- package/modern/lib/lodash/_hashDelete.js +0 -19
- package/modern/lib/lodash/_hashGet.js +0 -34
- package/modern/lib/lodash/_hashHas.js +0 -25
- package/modern/lib/lodash/_hashSet.js +0 -25
- package/modern/lib/lodash/_isIndex.js +0 -23
- package/modern/lib/lodash/_isKeyable.js +0 -15
- package/modern/lib/lodash/_isMasked.js +0 -23
- package/modern/lib/lodash/_isPrototype.js +0 -19
- package/modern/lib/lodash/_listCacheClear.js +0 -15
- package/modern/lib/lodash/_listCacheDelete.js +0 -40
- package/modern/lib/lodash/_listCacheGet.js +0 -20
- package/modern/lib/lodash/_listCacheHas.js +0 -18
- package/modern/lib/lodash/_listCacheSet.js +0 -29
- package/modern/lib/lodash/_mapCacheClear.js +0 -23
- package/modern/lib/lodash/_mapCacheDelete.js +0 -20
- package/modern/lib/lodash/_mapCacheGet.js +0 -18
- package/modern/lib/lodash/_mapCacheHas.js +0 -18
- package/modern/lib/lodash/_mapCacheSet.js +0 -23
- package/modern/lib/lodash/_mapToArray.js +0 -19
- package/modern/lib/lodash/_nativeCreate.js +0 -7
- package/modern/lib/lodash/_nativeKeys.js +0 -7
- package/modern/lib/lodash/_nodeUtil.js +0 -24
- package/modern/lib/lodash/_objectToString.js +0 -24
- package/modern/lib/lodash/_overArg.js +0 -17
- package/modern/lib/lodash/_root.js +0 -10
- package/modern/lib/lodash/_setCacheAdd.js +0 -22
- package/modern/lib/lodash/_setCacheHas.js +0 -16
- package/modern/lib/lodash/_setToArray.js +0 -19
- package/modern/lib/lodash/_stackClear.js +0 -17
- package/modern/lib/lodash/_stackDelete.js +0 -19
- package/modern/lib/lodash/_stackGet.js +0 -16
- package/modern/lib/lodash/_stackHas.js +0 -16
- package/modern/lib/lodash/_stackSet.js +0 -40
- package/modern/lib/lodash/_toSource.js +0 -30
- package/modern/lib/lodash/date.default.js +0 -4
- package/modern/lib/lodash/date.js +0 -2
- package/modern/lib/lodash/eq.js +0 -39
- package/modern/lib/lodash/function.default.js +0 -4
- package/modern/lib/lodash/function.js +0 -2
- package/modern/lib/lodash/isArguments.js +0 -38
- package/modern/lib/lodash/isArray.js +0 -27
- package/modern/lib/lodash/isArrayLike.js +0 -35
- package/modern/lib/lodash/isBuffer.js +0 -39
- package/modern/lib/lodash/isDeepEqual.js +0 -45
- package/modern/lib/lodash/isFunction.js +0 -40
- package/modern/lib/lodash/isLength.js +0 -36
- package/modern/lib/lodash/isObject.js +0 -33
- package/modern/lib/lodash/isObjectLike.js +0 -31
- package/modern/lib/lodash/isSymbol.js +0 -30
- package/modern/lib/lodash/isTypedArray.js +0 -28
- package/modern/lib/lodash/keys.js +0 -39
- package/modern/lib/lodash/lang.default.js +0 -28
- package/modern/lib/lodash/lang.js +0 -14
- package/modern/lib/lodash/now.js +0 -25
- package/modern/lib/lodash/object.default.js +0 -4
- package/modern/lib/lodash/object.js +0 -2
- package/modern/lib/lodash/stubArray.js +0 -25
- package/modern/lib/lodash/stubFalse.js +0 -20
- package/modern/lib/lodash/toNumber.js +0 -70
- package/modern/lib/lodash/util.default.js +0 -6
- package/modern/lib/lodash/util.js +0 -3
- package/node/hooks/core/preProcessing/index.js +0 -44
- package/node/hooks/core/preProcessing/useGridPreProcessing.js +0 -69
- package/node/hooks/core/rowGroupsPreProcessing/index.js +0 -31
- package/node/hooks/core/rowGroupsPreProcessing/useGridRowGroupsPreProcessing.js +0 -87
- package/node/hooks/features/keyboard/useGridKeyboard.js +0 -91
- package/node/lib/lodash/_DataView.js +0 -20
- package/node/lib/lodash/_Hash.js +0 -48
- package/node/lib/lodash/_ListCache.js +0 -48
- package/node/lib/lodash/_Map.js +0 -20
- package/node/lib/lodash/_MapCache.js +0 -48
- package/node/lib/lodash/_Promise.js +0 -20
- package/node/lib/lodash/_Set.js +0 -20
- package/node/lib/lodash/_SetCache.js +0 -41
- package/node/lib/lodash/_Stack.js +0 -44
- package/node/lib/lodash/_Symbol.js +0 -18
- package/node/lib/lodash/_Uint8Array.js +0 -18
- package/node/lib/lodash/_WeakMap.js +0 -20
- package/node/lib/lodash/_arrayFilter.js +0 -35
- package/node/lib/lodash/_arrayLikeKeys.js +0 -62
- package/node/lib/lodash/_arrayPush.js +0 -29
- package/node/lib/lodash/_arraySome.js +0 -32
- package/node/lib/lodash/_assocIndexOf.js +0 -36
- package/node/lib/lodash/_baseGetAllKeys.js +0 -34
- package/node/lib/lodash/_baseGetTag.js +0 -42
- package/node/lib/lodash/_baseIsArguments.js +0 -32
- package/node/lib/lodash/_baseIsEqual.js +0 -44
- package/node/lib/lodash/_baseIsEqualDeep.js +0 -103
- package/node/lib/lodash/_baseIsNative.js +0 -61
- package/node/lib/lodash/_baseIsTypedArray.js +0 -62
- package/node/lib/lodash/_baseKeys.js +0 -47
- package/node/lib/lodash/_baseTimes.js +0 -29
- package/node/lib/lodash/_baseUnary.js +0 -22
- package/node/lib/lodash/_cacheHas.js +0 -21
- package/node/lib/lodash/_coreJsData.js +0 -18
- package/node/lib/lodash/_equalArrays.js +0 -97
- package/node/lib/lodash/_equalByTag.js +0 -133
- package/node/lib/lodash/_equalObjects.js +0 -103
- package/node/lib/lodash/_freeGlobal.js +0 -10
- package/node/lib/lodash/_getAllKeys.js +0 -31
- package/node/lib/lodash/_getMapData.js +0 -29
- package/node/lib/lodash/_getNative.js +0 -31
- package/node/lib/lodash/_getRawTag.js +0 -61
- package/node/lib/lodash/_getSymbols.js +0 -44
- package/node/lib/lodash/_getTag.js +0 -81
- package/node/lib/lodash/_getValue.js +0 -21
- package/node/lib/lodash/_hashClear.js +0 -28
- package/node/lib/lodash/_hashDelete.js +0 -25
- package/node/lib/lodash/_hashGet.js +0 -45
- package/node/lib/lodash/_hashHas.js +0 -36
- package/node/lib/lodash/_hashSet.js +0 -36
- package/node/lib/lodash/_isIndex.js +0 -28
- package/node/lib/lodash/_isKeyable.js +0 -21
- package/node/lib/lodash/_isMasked.js +0 -34
- package/node/lib/lodash/_isPrototype.js +0 -24
- package/node/lib/lodash/_listCacheClear.js +0 -21
- package/node/lib/lodash/_listCacheDelete.js +0 -51
- package/node/lib/lodash/_listCacheGet.js +0 -31
- package/node/lib/lodash/_listCacheHas.js +0 -29
- package/node/lib/lodash/_listCacheSet.js +0 -40
- package/node/lib/lodash/_mapCacheClear.js +0 -36
- package/node/lib/lodash/_mapCacheDelete.js +0 -31
- package/node/lib/lodash/_mapCacheGet.js +0 -29
- package/node/lib/lodash/_mapCacheHas.js +0 -29
- package/node/lib/lodash/_mapCacheSet.js +0 -34
- package/node/lib/lodash/_mapToArray.js +0 -25
- package/node/lib/lodash/_nativeCreate.js +0 -18
- package/node/lib/lodash/_nativeKeys.js +0 -18
- package/node/lib/lodash/_nodeUtil.js +0 -35
- package/node/lib/lodash/_objectToString.js +0 -29
- package/node/lib/lodash/_overArg.js +0 -23
- package/node/lib/lodash/_root.js +0 -21
- package/node/lib/lodash/_setCacheAdd.js +0 -27
- package/node/lib/lodash/_setCacheHas.js +0 -22
- package/node/lib/lodash/_setToArray.js +0 -25
- package/node/lib/lodash/_stackClear.js +0 -28
- package/node/lib/lodash/_stackDelete.js +0 -25
- package/node/lib/lodash/_stackGet.js +0 -22
- package/node/lib/lodash/_stackHas.js +0 -22
- package/node/lib/lodash/_stackSet.js +0 -53
- package/node/lib/lodash/_toSource.js +0 -35
- package/node/lib/lodash/date.default.js +0 -15
- package/node/lib/lodash/date.js +0 -23
- package/node/lib/lodash/eq.js +0 -45
- package/node/lib/lodash/function.default.js +0 -15
- package/node/lib/lodash/function.js +0 -23
- package/node/lib/lodash/isArguments.js +0 -50
- package/node/lib/lodash/isArray.js +0 -32
- package/node/lib/lodash/isArrayLike.js +0 -47
- package/node/lib/lodash/isBuffer.js +0 -51
- package/node/lib/lodash/isDeepEqual.js +0 -56
- package/node/lib/lodash/isFunction.js +0 -52
- package/node/lib/lodash/isLength.js +0 -41
- package/node/lib/lodash/isObject.js +0 -39
- package/node/lib/lodash/isObjectLike.js +0 -37
- package/node/lib/lodash/isSymbol.js +0 -42
- package/node/lib/lodash/isTypedArray.js +0 -41
- package/node/lib/lodash/keys.js +0 -52
- package/node/lib/lodash/lang.default.js +0 -51
- package/node/lib/lodash/lang.js +0 -119
- package/node/lib/lodash/now.js +0 -36
- package/node/lib/lodash/object.default.js +0 -15
- package/node/lib/lodash/object.js +0 -23
- package/node/lib/lodash/stubArray.js +0 -31
- package/node/lib/lodash/stubFalse.js +0 -26
- package/node/lib/lodash/toNumber.js +0 -82
- package/node/lib/lodash/util.default.js +0 -18
- package/node/lib/lodash/util.js +0 -31
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { GridEvents } from '../../../models/events';
|
|
4
|
-
import { checkGridRowIdIsValid } from '../../../models/gridRows';
|
|
5
4
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
6
5
|
import { useGridLogger } from '../../utils/useGridLogger';
|
|
7
|
-
import { gridRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowIdsSelector } from './gridRowsSelector';
|
|
6
|
+
import { gridRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowIdsSelector, gridRowGroupingNameSelector } from './gridRowsSelector';
|
|
8
7
|
import { GridSignature, useGridApiEventHandler } from '../../utils/useGridApiEventHandler';
|
|
9
8
|
import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
9
|
+
import { checkGridRowIdIsValid } from './gridRowsUtils';
|
|
10
10
|
|
|
11
11
|
function getGridRowId(rowModel, getRowId, detailErrorMessage) {
|
|
12
12
|
const id = getRowId ? getRowId(rowModel) : rowModel.id;
|
|
@@ -43,16 +43,17 @@ const convertGridRowsPropToState = ({
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
const getRowsStateFromCache = (rowsCache, previousTree, apiRef, rowCountProp) => {
|
|
46
|
+
const getRowsStateFromCache = (rowsCache, previousTree, apiRef, rowCountProp, loadingProp) => {
|
|
47
47
|
const {
|
|
48
48
|
value
|
|
49
49
|
} = rowsCache.state;
|
|
50
50
|
const rowCount = rowCountProp ?? 0;
|
|
51
|
-
const groupingResponse = apiRef.current.
|
|
51
|
+
const groupingResponse = apiRef.current.unstable_applyStrategyProcessor('rowTreeCreation', _extends({}, value, {
|
|
52
52
|
previousTree
|
|
53
53
|
}));
|
|
54
54
|
const dataTopLevelRowCount = groupingResponse.treeDepth === 1 ? groupingResponse.ids.length : Object.values(groupingResponse.tree).filter(node => node.parent == null).length;
|
|
55
55
|
return _extends({}, groupingResponse, {
|
|
56
|
+
loading: loadingProp,
|
|
56
57
|
totalRowCount: Math.max(rowCount, groupingResponse.ids.length),
|
|
57
58
|
totalTopLevelRowCount: Math.max(rowCount, dataTopLevelRowCount)
|
|
58
59
|
});
|
|
@@ -75,15 +76,11 @@ export const rowsStateInitializer = (state, props, apiRef) => {
|
|
|
75
76
|
lastUpdateMs: Date.now()
|
|
76
77
|
};
|
|
77
78
|
return _extends({}, state, {
|
|
78
|
-
rows: getRowsStateFromCache(rowsCache, null, apiRef, props.rowCount),
|
|
79
|
+
rows: getRowsStateFromCache(rowsCache, null, apiRef, props.rowCount, props.loading),
|
|
79
80
|
rowsCache // TODO remove from state
|
|
80
81
|
|
|
81
82
|
});
|
|
82
83
|
};
|
|
83
|
-
/**
|
|
84
|
-
* @requires useGridRowGroupsPreProcessing (method)
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
84
|
export const useGridRows = (apiRef, props) => {
|
|
88
85
|
if (process.env.NODE_ENV !== 'production') {
|
|
89
86
|
// Freeze rows for immutability
|
|
@@ -101,13 +98,12 @@ export const useGridRows = (apiRef, props) => {
|
|
|
101
98
|
acc[id] = index;
|
|
102
99
|
return acc;
|
|
103
100
|
}, {}), [currentPage.rows]);
|
|
104
|
-
const getRowIndexRelativeToVisibleRows = React.useCallback(id => lookup[id], [lookup]);
|
|
105
101
|
const throttledRowsChange = React.useCallback((newState, throttle) => {
|
|
106
102
|
const run = () => {
|
|
107
103
|
rowsCache.current.timeout = null;
|
|
108
104
|
rowsCache.current.lastUpdateMs = Date.now();
|
|
109
105
|
apiRef.current.setState(state => _extends({}, state, {
|
|
110
|
-
rows: getRowsStateFromCache(rowsCache.current, gridRowTreeSelector(apiRef), apiRef, props.rowCount)
|
|
106
|
+
rows: getRowsStateFromCache(rowsCache.current, gridRowTreeSelector(apiRef), apiRef, props.rowCount, props.loading)
|
|
111
107
|
}));
|
|
112
108
|
apiRef.current.publishEvent(GridEvents.rowsSet);
|
|
113
109
|
apiRef.current.forceUpdate();
|
|
@@ -133,7 +129,11 @@ export const useGridRows = (apiRef, props) => {
|
|
|
133
129
|
}
|
|
134
130
|
|
|
135
131
|
run();
|
|
136
|
-
}, [props.throttleRowsMs, props.rowCount, apiRef]);
|
|
132
|
+
}, [props.throttleRowsMs, props.rowCount, props.loading, apiRef]);
|
|
133
|
+
/**
|
|
134
|
+
* API METHODS
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
137
|
const setRows = React.useCallback(rows => {
|
|
138
138
|
logger.debug(`Updating all rows, new length ${rows.length}`);
|
|
139
139
|
throttledRowsChange(convertGridRowsPropToState({
|
|
@@ -146,7 +146,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
146
146
|
if (props.signature === GridSignature.DataGrid && updates.length > 1) {
|
|
147
147
|
// TODO: Add test with direct call to `apiRef.current.updateRows` in DataGrid after enabling the `apiRef` on the free plan.
|
|
148
148
|
throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", 'You need to upgrade to the DataGridPro component to unlock this feature.'].join('\n'));
|
|
149
|
-
} // we
|
|
149
|
+
} // we remove duplicate updates. A server can batch updates, and send several updates for the same row in one fn call.
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
const uniqUpdates = new Map();
|
|
@@ -200,6 +200,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
200
200
|
}, [apiRef]);
|
|
201
201
|
const getRowsCount = React.useCallback(() => gridRowCountSelector(apiRef), [apiRef]);
|
|
202
202
|
const getAllRowIds = React.useCallback(() => gridRowIdsSelector(apiRef), [apiRef]);
|
|
203
|
+
const getRowIndexRelativeToVisibleRows = React.useCallback(id => lookup[id], [lookup]);
|
|
203
204
|
const setRowChildrenExpansion = React.useCallback((id, isExpanded) => {
|
|
204
205
|
const currentNode = apiRef.current.getRowNode(id);
|
|
205
206
|
|
|
@@ -224,6 +225,61 @@ export const useGridRows = (apiRef, props) => {
|
|
|
224
225
|
apiRef.current.publishEvent(GridEvents.rowExpansionChange, newNode);
|
|
225
226
|
}, [apiRef]);
|
|
226
227
|
const getRowNode = React.useCallback(id => gridRowTreeSelector(apiRef)[id] ?? null, [apiRef]);
|
|
228
|
+
const rowApi = {
|
|
229
|
+
getRow,
|
|
230
|
+
getRowModels,
|
|
231
|
+
getRowsCount,
|
|
232
|
+
getAllRowIds,
|
|
233
|
+
setRows,
|
|
234
|
+
updateRows,
|
|
235
|
+
setRowChildrenExpansion,
|
|
236
|
+
getRowNode,
|
|
237
|
+
getRowIndexRelativeToVisibleRows
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* EVENTS
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
const groupRows = React.useCallback(() => {
|
|
244
|
+
logger.info(`Row grouping pre-processing have changed, regenerating the row tree`);
|
|
245
|
+
let rows;
|
|
246
|
+
|
|
247
|
+
if (rowsCache.current.state.rowsBeforePartialUpdates === props.rows) {
|
|
248
|
+
// The `props.rows` has not changed since the last row grouping
|
|
249
|
+
// We can keep the potential updates stored in `inputRowsAfterUpdates` on the new grouping
|
|
250
|
+
rows = undefined;
|
|
251
|
+
} else {
|
|
252
|
+
// The `props.rows` has changed since the last row grouping
|
|
253
|
+
// We must use the new `props.rows` on the new grouping
|
|
254
|
+
// This occurs because this event is triggered before the `useEffect` on the rows when both the grouping pre-processing and the rows changes on the same render
|
|
255
|
+
rows = props.rows;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
throttledRowsChange(convertGridRowsPropToState({
|
|
259
|
+
rows,
|
|
260
|
+
getRowId: props.getRowId,
|
|
261
|
+
prevState: rowsCache.current.state
|
|
262
|
+
}), false);
|
|
263
|
+
}, [logger, throttledRowsChange, props.getRowId, props.rows]);
|
|
264
|
+
const handleStrategyProcessorChange = React.useCallback(methodName => {
|
|
265
|
+
if (methodName === 'rowTreeCreation') {
|
|
266
|
+
groupRows();
|
|
267
|
+
}
|
|
268
|
+
}, [groupRows]);
|
|
269
|
+
const handleStrategyActivityChange = React.useCallback(() => {
|
|
270
|
+
// `rowTreeCreation` is the only processor ran when `strategyAvailabilityChange` is fired.
|
|
271
|
+
// All the other processors listen to `rowsSet` which will be published by the `groupRows` method below.
|
|
272
|
+
if (apiRef.current.unstable_getActiveStrategy('rowTree') !== gridRowGroupingNameSelector(apiRef)) {
|
|
273
|
+
groupRows();
|
|
274
|
+
}
|
|
275
|
+
}, [apiRef, groupRows]);
|
|
276
|
+
useGridApiEventHandler(apiRef, GridEvents.activeStrategyProcessorChange, handleStrategyProcessorChange);
|
|
277
|
+
useGridApiEventHandler(apiRef, GridEvents.strategyAvailabilityChange, handleStrategyActivityChange);
|
|
278
|
+
useGridApiMethod(apiRef, rowApi, 'GridRowApi');
|
|
279
|
+
/**
|
|
280
|
+
* EFFECTS
|
|
281
|
+
*/
|
|
282
|
+
|
|
227
283
|
React.useEffect(() => {
|
|
228
284
|
return () => {
|
|
229
285
|
if (rowsCache.current.timeout !== null) {
|
|
@@ -253,38 +309,4 @@ export const useGridRows = (apiRef, props) => {
|
|
|
253
309
|
prevState: rowsCache.current.state
|
|
254
310
|
}), false);
|
|
255
311
|
}, [props.rows, props.rowCount, props.getRowId, logger, throttledRowsChange]);
|
|
256
|
-
const handleGroupRows = React.useCallback(() => {
|
|
257
|
-
logger.info(`Row grouping pre-processing have changed, regenerating the row tree`);
|
|
258
|
-
let rows;
|
|
259
|
-
|
|
260
|
-
if (rowsCache.current.state.rowsBeforePartialUpdates === props.rows) {
|
|
261
|
-
// The `props.rows` has not changed since the last row grouping
|
|
262
|
-
// We can keep the potential updates stored in `inputRowsAfterUpdates` on the new grouping
|
|
263
|
-
rows = undefined;
|
|
264
|
-
} else {
|
|
265
|
-
// The `props.rows` has changed since the last row grouping
|
|
266
|
-
// We must use the new `props.rows` on the new grouping
|
|
267
|
-
// This occurs because this event is triggered before the `useEffect` on the rows when both the grouping pre-processing and the rows changes on the same render
|
|
268
|
-
rows = props.rows;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
throttledRowsChange(convertGridRowsPropToState({
|
|
272
|
-
rows,
|
|
273
|
-
getRowId: props.getRowId,
|
|
274
|
-
prevState: rowsCache.current.state
|
|
275
|
-
}), false);
|
|
276
|
-
}, [logger, throttledRowsChange, props.getRowId, props.rows]);
|
|
277
|
-
useGridApiEventHandler(apiRef, GridEvents.rowGroupsPreProcessingChange, handleGroupRows);
|
|
278
|
-
const rowApi = {
|
|
279
|
-
getRow,
|
|
280
|
-
getRowModels,
|
|
281
|
-
getRowsCount,
|
|
282
|
-
getAllRowIds,
|
|
283
|
-
setRows,
|
|
284
|
-
updateRows,
|
|
285
|
-
setRowChildrenExpansion,
|
|
286
|
-
getRowNode,
|
|
287
|
-
getRowIndexRelativeToVisibleRows
|
|
288
|
-
};
|
|
289
|
-
useGridApiMethod(apiRef, rowApi, 'GridRowApi');
|
|
290
312
|
};
|
|
@@ -7,8 +7,7 @@ import { gridDensityRowHeightSelector, gridDensityFactorSelector } from '../dens
|
|
|
7
7
|
import { gridFilterStateSelector } from '../filter/gridFilterSelector';
|
|
8
8
|
import { gridPaginationSelector } from '../pagination/gridPaginationSelector';
|
|
9
9
|
import { gridSortingStateSelector } from '../sorting/gridSortingSelector';
|
|
10
|
-
import {
|
|
11
|
-
import { useGridApiEventHandler } from '../../utils/useGridApiEventHandler';
|
|
10
|
+
import { useGridRegisterPipeApplier } from '../../core/pipeProcessing';
|
|
12
11
|
export const rowsMetaStateInitializer = state => _extends({}, state, {
|
|
13
12
|
rowsMeta: {
|
|
14
13
|
currentPageTotalHeight: 0,
|
|
@@ -61,16 +60,17 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
61
60
|
};
|
|
62
61
|
|
|
63
62
|
if (getRowSpacing) {
|
|
64
|
-
const
|
|
63
|
+
const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);
|
|
65
64
|
const spacing = getRowSpacing(_extends({}, row, {
|
|
66
|
-
isFirstVisible:
|
|
67
|
-
isLastVisible:
|
|
65
|
+
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
66
|
+
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
67
|
+
indexRelativeToCurrentPage
|
|
68
68
|
}));
|
|
69
69
|
initialHeights.spacingTop = spacing.top ?? 0;
|
|
70
70
|
initialHeights.spacingBottom = spacing.bottom ?? 0;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
const sizes = apiRef.current.
|
|
73
|
+
const sizes = apiRef.current.unstable_applyPipeProcessors('rowHeight', initialHeights, row);
|
|
74
74
|
const finalRowHeight = Object.values(sizes).reduce((acc2, value) => acc2 + value, 0);
|
|
75
75
|
rowsHeightLookup.current[row.id] = {
|
|
76
76
|
value: baseRowHeight,
|
|
@@ -108,14 +108,7 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
108
108
|
React.useEffect(() => {
|
|
109
109
|
hydrateRowsMeta();
|
|
110
110
|
}, [rowHeight, filterState, paginationState, sortingState, hydrateRowsMeta]);
|
|
111
|
-
|
|
112
|
-
if (name !== 'rowHeight') {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
hydrateRowsMeta();
|
|
117
|
-
}, [hydrateRowsMeta]);
|
|
118
|
-
useGridApiEventHandler(apiRef, GridEvents.preProcessorRegister, handlePreProcessorRegister);
|
|
111
|
+
useGridRegisterPipeApplier(apiRef, 'rowHeight', hydrateRowsMeta);
|
|
119
112
|
const rowsMetaApi = {
|
|
120
113
|
unstable_getRowHeight: getTargetRowHeight,
|
|
121
114
|
unstable_getRowInternalSizes: getRowInternalSizes,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { GRID_DEFAULT_STRATEGY, useGridRegisterStrategyProcessor } from '../../core/strategyProcessing';
|
|
2
|
+
|
|
3
|
+
const flatRowTreeCreationMethod = ({
|
|
4
|
+
ids,
|
|
5
|
+
idRowsLookup,
|
|
6
|
+
previousTree
|
|
7
|
+
}) => {
|
|
8
|
+
const tree = {};
|
|
9
|
+
|
|
10
|
+
for (let i = 0; i < ids.length; i += 1) {
|
|
11
|
+
const rowId = ids[i];
|
|
12
|
+
|
|
13
|
+
if (previousTree && previousTree[rowId]) {
|
|
14
|
+
tree[rowId] = previousTree[rowId];
|
|
15
|
+
} else {
|
|
16
|
+
tree[rowId] = {
|
|
17
|
+
id: rowId,
|
|
18
|
+
depth: 0,
|
|
19
|
+
parent: null,
|
|
20
|
+
groupingKey: '',
|
|
21
|
+
groupingField: null
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
groupingName: GRID_DEFAULT_STRATEGY,
|
|
28
|
+
tree,
|
|
29
|
+
treeDepth: 1,
|
|
30
|
+
idRowsLookup,
|
|
31
|
+
ids
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const useGridRowsPreProcessors = apiRef => {
|
|
36
|
+
useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, 'rowTreeCreation', flatRowTreeCreationMethod);
|
|
37
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useGridLogger } from '../../utils/useGridLogger';
|
|
3
3
|
import { gridColumnPositionsSelector, gridVisibleColumnDefinitionsSelector } from '../columns/gridColumnsSelector';
|
|
4
|
+
import { useGridSelector } from '../../utils/useGridSelector';
|
|
4
5
|
import { gridPageSelector, gridPageSizeSelector } from '../pagination/gridPaginationSelector';
|
|
5
6
|
import { gridRowCountSelector } from '../rows/gridRowsSelector';
|
|
6
7
|
import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
|
|
7
8
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
8
|
-
import {
|
|
9
|
+
import { gridVisibleSortedRowEntriesSelector } from '../filter/gridFilterSelector'; // Logic copied from https://www.w3.org/TR/wai-aria-practices/examples/listbox/js/listbox.js
|
|
9
10
|
// Similar to https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
|
10
11
|
|
|
11
12
|
function scrollIntoView(dimensions) {
|
|
@@ -32,6 +33,8 @@ function scrollIntoView(dimensions) {
|
|
|
32
33
|
* @requires useGridColumns (state) - can be after, async only
|
|
33
34
|
* @requires useGridRows (state) - can be after, async only
|
|
34
35
|
* @requires useGridRowsMeta (state) - can be after, async only
|
|
36
|
+
* @requires useGridFilter (state)
|
|
37
|
+
* @requires useGridColumnSpanning (method)
|
|
35
38
|
*/
|
|
36
39
|
|
|
37
40
|
|
|
@@ -39,11 +42,13 @@ export const useGridScroll = (apiRef, props) => {
|
|
|
39
42
|
const logger = useGridLogger(apiRef, 'useGridScroll');
|
|
40
43
|
const colRef = apiRef.current.columnHeadersElementRef;
|
|
41
44
|
const windowRef = apiRef.current.windowRef;
|
|
45
|
+
const visibleSortedRows = useGridSelector(apiRef, gridVisibleSortedRowEntriesSelector);
|
|
42
46
|
const scrollToIndexes = React.useCallback(params => {
|
|
43
47
|
const totalRowCount = gridRowCountSelector(apiRef);
|
|
44
48
|
const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);
|
|
49
|
+
const scrollToHeader = params.rowIndex == null;
|
|
45
50
|
|
|
46
|
-
if (totalRowCount === 0 || visibleColumns.length === 0) {
|
|
51
|
+
if (!scrollToHeader && totalRowCount === 0 || visibleColumns.length === 0) {
|
|
47
52
|
return false;
|
|
48
53
|
}
|
|
49
54
|
|
|
@@ -52,10 +57,25 @@ export const useGridScroll = (apiRef, props) => {
|
|
|
52
57
|
|
|
53
58
|
if (params.colIndex != null) {
|
|
54
59
|
const columnPositions = gridColumnPositionsSelector(apiRef);
|
|
60
|
+
let cellWidth;
|
|
61
|
+
|
|
62
|
+
if (typeof params.rowIndex !== 'undefined') {
|
|
63
|
+
const rowId = visibleSortedRows[params.rowIndex]?.id;
|
|
64
|
+
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, params.colIndex);
|
|
65
|
+
|
|
66
|
+
if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {
|
|
67
|
+
cellWidth = cellColSpanInfo.cellProps.width;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (typeof cellWidth === 'undefined') {
|
|
72
|
+
cellWidth = visibleColumns[params.colIndex].computedWidth;
|
|
73
|
+
}
|
|
74
|
+
|
|
55
75
|
scrollCoordinates.left = scrollIntoView({
|
|
56
76
|
clientHeight: windowRef.current.clientWidth,
|
|
57
77
|
scrollTop: windowRef.current.scrollLeft,
|
|
58
|
-
offsetHeight:
|
|
78
|
+
offsetHeight: cellWidth,
|
|
59
79
|
offsetTop: columnPositions[params.colIndex]
|
|
60
80
|
});
|
|
61
81
|
}
|
|
@@ -74,7 +94,7 @@ export const useGridScroll = (apiRef, props) => {
|
|
|
74
94
|
});
|
|
75
95
|
}
|
|
76
96
|
|
|
77
|
-
scrollCoordinates = apiRef.current.
|
|
97
|
+
scrollCoordinates = apiRef.current.unstable_applyPipeProcessors('scrollToIndexes', scrollCoordinates, params);
|
|
78
98
|
|
|
79
99
|
if (typeof scrollCoordinates.left !== undefined || typeof scrollCoordinates.top !== undefined) {
|
|
80
100
|
apiRef.current.scroll(scrollCoordinates);
|
|
@@ -82,7 +102,7 @@ export const useGridScroll = (apiRef, props) => {
|
|
|
82
102
|
}
|
|
83
103
|
|
|
84
104
|
return false;
|
|
85
|
-
}, [logger, apiRef, windowRef, props.pagination]);
|
|
105
|
+
}, [logger, apiRef, windowRef, props.pagination, visibleSortedRows]);
|
|
86
106
|
const scroll = React.useCallback(params => {
|
|
87
107
|
if (windowRef.current && params.left != null && colRef.current) {
|
|
88
108
|
colRef.current.scrollLeft = params.left;
|
|
@@ -116,9 +136,4 @@ export const useGridScroll = (apiRef, props) => {
|
|
|
116
136
|
getScrollPosition
|
|
117
137
|
};
|
|
118
138
|
useGridApiMethod(apiRef, scrollApi, 'GridScrollApi');
|
|
119
|
-
const preventScroll = React.useCallback(event => {
|
|
120
|
-
event.target.scrollLeft = 0;
|
|
121
|
-
event.target.scrollTop = 0;
|
|
122
|
-
}, []);
|
|
123
|
-
useGridNativeEventListener(apiRef, () => apiRef.current?.renderingZoneRef?.current?.parentElement, 'scroll', preventScroll);
|
|
124
139
|
};
|
|
@@ -5,14 +5,15 @@ import { useGridApiEventHandler } from '../../utils/useGridApiEventHandler';
|
|
|
5
5
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
6
6
|
import { useGridLogger } from '../../utils/useGridLogger';
|
|
7
7
|
import { gridRowsLookupSelector } from '../rows/gridRowsSelector';
|
|
8
|
-
import { isGridCellRoot } from '../../../utils/domUtils';
|
|
9
8
|
import { gridSelectionStateSelector, selectedGridRowsSelector, selectedIdsLookupSelector } from './gridSelectionSelector';
|
|
10
9
|
import { gridPaginatedVisibleSortedGridRowIdsSelector } from '../pagination';
|
|
10
|
+
import { gridFocusCellSelector } from '../focus/gridFocusStateSelector';
|
|
11
11
|
import { gridVisibleSortedRowIdsSelector } from '../filter/gridFilterSelector';
|
|
12
12
|
import { GRID_CHECKBOX_SELECTION_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from '../../../colDef';
|
|
13
13
|
import { GridCellModes } from '../../../models/gridEditRowModel';
|
|
14
|
-
import { isKeyboardEvent } from '../../../utils/keyboardUtils';
|
|
15
|
-
import { getVisibleRows } from '../../utils/useGridVisibleRows';
|
|
14
|
+
import { isKeyboardEvent, isNavigationKey } from '../../../utils/keyboardUtils';
|
|
15
|
+
import { getVisibleRows, useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
16
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '../../../constants/gridDetailPanelToggleField';
|
|
16
17
|
|
|
17
18
|
const getSelectionModelPropValue = (selectionModelProp, prevSelectionModel) => {
|
|
18
19
|
if (selectionModelProp == null) {
|
|
@@ -34,8 +35,10 @@ export const selectionStateInitializer = (state, props) => _extends({}, state, {
|
|
|
34
35
|
selection: getSelectionModelPropValue(props.selectionModel) ?? []
|
|
35
36
|
});
|
|
36
37
|
/**
|
|
37
|
-
* @requires useGridRows (state, method)
|
|
38
|
-
* @requires useGridParamsApi (method)
|
|
38
|
+
* @requires useGridRows (state, method) - can be after
|
|
39
|
+
* @requires useGridParamsApi (method) - can be after
|
|
40
|
+
* @requires useGridFocus (state) - can be after
|
|
41
|
+
* @requires useGridKeyboardNavigation (`cellKeyDown` event must first be consumed by it)
|
|
39
42
|
*/
|
|
40
43
|
|
|
41
44
|
export const useGridSelection = (apiRef, props) => {
|
|
@@ -60,7 +63,8 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
60
63
|
paginationMode
|
|
61
64
|
} = props;
|
|
62
65
|
const canHaveMultipleSelection = !disableMultipleSelection || checkboxSelection;
|
|
63
|
-
const
|
|
66
|
+
const visibleRows = useGridVisibleRows(apiRef, props);
|
|
67
|
+
const expandMouseRowRangeSelection = React.useCallback(id => {
|
|
64
68
|
let endId = id;
|
|
65
69
|
const startId = lastRowToggled.current ?? id;
|
|
66
70
|
const isSelected = apiRef.current.isRowSelected(id);
|
|
@@ -70,6 +74,10 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
70
74
|
const startIndex = visibleRowIds.findIndex(rowId => rowId === startId);
|
|
71
75
|
const endIndex = visibleRowIds.findIndex(rowId => rowId === endId);
|
|
72
76
|
|
|
77
|
+
if (startIndex === endIndex) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
if (startIndex > endIndex) {
|
|
74
82
|
endId = visibleRowIds[endIndex + 1];
|
|
75
83
|
} else {
|
|
@@ -161,12 +169,13 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
161
169
|
return;
|
|
162
170
|
}
|
|
163
171
|
|
|
164
|
-
logger.debug(`Expanding selection from row ${startId} to row ${endId}`);
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
const
|
|
172
|
+
logger.debug(`Expanding selection from row ${startId} to row ${endId}`); // Using rows from all pages allow to select a range across several pages
|
|
173
|
+
|
|
174
|
+
const allPagesRowIds = gridVisibleSortedRowIdsSelector(apiRef);
|
|
175
|
+
const startIndex = allPagesRowIds.indexOf(startId);
|
|
176
|
+
const endIndex = allPagesRowIds.indexOf(endId);
|
|
168
177
|
const [start, end] = startIndex > endIndex ? [endIndex, startIndex] : [startIndex, endIndex];
|
|
169
|
-
const rowsBetweenStartAndEnd =
|
|
178
|
+
const rowsBetweenStartAndEnd = allPagesRowIds.slice(start, end + 1);
|
|
170
179
|
apiRef.current.selectRows(rowsBetweenStartAndEnd, isSelected, resetSelection);
|
|
171
180
|
}, [apiRef, logger]);
|
|
172
181
|
const selectionApi = {
|
|
@@ -226,7 +235,7 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
226
235
|
return;
|
|
227
236
|
}
|
|
228
237
|
|
|
229
|
-
if (params.field ===
|
|
238
|
+
if (params.field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
|
230
239
|
// click to open the detail panel should not select the row
|
|
231
240
|
return;
|
|
232
241
|
}
|
|
@@ -240,11 +249,11 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
240
249
|
}
|
|
241
250
|
|
|
242
251
|
if (event.shiftKey && (canHaveMultipleSelection || checkboxSelection)) {
|
|
243
|
-
|
|
252
|
+
expandMouseRowRangeSelection(params.id);
|
|
244
253
|
} else {
|
|
245
254
|
handleSingleRowSelection(params.id, event);
|
|
246
255
|
}
|
|
247
|
-
}, [disableSelectionOnClick, canHaveMultipleSelection, checkboxSelection, apiRef,
|
|
256
|
+
}, [disableSelectionOnClick, canHaveMultipleSelection, checkboxSelection, apiRef, expandMouseRowRangeSelection, handleSingleRowSelection]);
|
|
248
257
|
const preventSelectionOnShift = React.useCallback((params, event) => {
|
|
249
258
|
if (canHaveMultipleSelection && event.shiftKey) {
|
|
250
259
|
window.getSelection()?.removeAllRanges();
|
|
@@ -252,35 +261,78 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
252
261
|
}, [canHaveMultipleSelection]);
|
|
253
262
|
const handleRowSelectionCheckboxChange = React.useCallback((params, event) => {
|
|
254
263
|
if (event.nativeEvent.shiftKey) {
|
|
255
|
-
|
|
264
|
+
expandMouseRowRangeSelection(params.id);
|
|
256
265
|
} else {
|
|
257
266
|
apiRef.current.selectRow(params.id, params.value);
|
|
258
267
|
}
|
|
259
|
-
}, [apiRef,
|
|
268
|
+
}, [apiRef, expandMouseRowRangeSelection]);
|
|
260
269
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
261
270
|
const shouldLimitSelectionToCurrentPage = props.checkboxSelectionVisibleOnly && props.pagination;
|
|
262
271
|
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridVisibleSortedRowIdsSelector(apiRef);
|
|
263
272
|
apiRef.current.selectRows(rowsToBeSelected, params.value);
|
|
264
273
|
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
|
265
274
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
266
|
-
//
|
|
275
|
+
// Get the most recent cell mode because it may have been changed by another listener
|
|
276
|
+
if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {
|
|
277
|
+
return;
|
|
278
|
+
} // Ignore portal
|
|
267
279
|
// Do not apply shortcuts if the focus is not on the cell root component
|
|
268
|
-
|
|
269
|
-
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
if (!event.currentTarget.contains(event.target)) {
|
|
270
283
|
return;
|
|
271
|
-
}
|
|
284
|
+
}
|
|
272
285
|
|
|
286
|
+
if (isNavigationKey(event.key) && event.shiftKey) {
|
|
287
|
+
// The cell that has focus after the keyboard navigation
|
|
288
|
+
const focusCell = gridFocusCellSelector(apiRef);
|
|
273
289
|
|
|
274
|
-
|
|
275
|
-
|
|
290
|
+
if (focusCell && focusCell.id !== params.id) {
|
|
291
|
+
event.preventDefault();
|
|
292
|
+
const isNextRowSelected = apiRef.current.isRowSelected(focusCell.id);
|
|
276
293
|
|
|
277
|
-
|
|
278
|
-
|
|
294
|
+
if (!canHaveMultipleSelection) {
|
|
295
|
+
apiRef.current.selectRow(focusCell.id, !isNextRowSelected, true);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const newRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(focusCell.id);
|
|
300
|
+
const previousRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
301
|
+
let start;
|
|
302
|
+
let end;
|
|
303
|
+
|
|
304
|
+
if (newRowIndex > previousRowIndex) {
|
|
305
|
+
if (isNextRowSelected) {
|
|
306
|
+
// We are navigating to the bottom of the page and adding selected rows
|
|
307
|
+
start = previousRowIndex;
|
|
308
|
+
end = newRowIndex - 1;
|
|
309
|
+
} else {
|
|
310
|
+
// We are navigating to the bottom of the page and removing selected rows
|
|
311
|
+
start = previousRowIndex;
|
|
312
|
+
end = newRowIndex;
|
|
313
|
+
}
|
|
314
|
+
} else {
|
|
315
|
+
// eslint-disable-next-line no-lonely-if
|
|
316
|
+
if (isNextRowSelected) {
|
|
317
|
+
// We are navigating to the top of the page and removing selected rows
|
|
318
|
+
start = newRowIndex + 1;
|
|
319
|
+
end = previousRowIndex;
|
|
320
|
+
} else {
|
|
321
|
+
// We are navigating to the top of the page and adding selected rows
|
|
322
|
+
start = newRowIndex;
|
|
323
|
+
end = previousRowIndex;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const rowsBetweenStartAndEnd = visibleRows.rows.slice(start, end + 1).map(row => row.id);
|
|
328
|
+
apiRef.current.selectRows(rowsBetweenStartAndEnd, !isNextRowSelected);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
279
331
|
}
|
|
280
332
|
|
|
281
333
|
if (event.key === ' ' && event.shiftKey) {
|
|
282
334
|
event.preventDefault();
|
|
283
|
-
handleSingleRowSelection(
|
|
335
|
+
handleSingleRowSelection(params.id, event);
|
|
284
336
|
return;
|
|
285
337
|
}
|
|
286
338
|
|
|
@@ -288,8 +340,8 @@ export const useGridSelection = (apiRef, props) => {
|
|
|
288
340
|
event.preventDefault();
|
|
289
341
|
selectRows(apiRef.current.getAllRowIds(), true);
|
|
290
342
|
}
|
|
291
|
-
}, [apiRef, handleSingleRowSelection, selectRows]);
|
|
292
|
-
useGridApiEventHandler(apiRef, GridEvents.
|
|
343
|
+
}, [apiRef, handleSingleRowSelection, selectRows, visibleRows.rows, canHaveMultipleSelection]);
|
|
344
|
+
useGridApiEventHandler(apiRef, GridEvents.sortedRowsSet, removeOutdatedSelection);
|
|
293
345
|
useGridApiEventHandler(apiRef, GridEvents.cellClick, handleCellClick);
|
|
294
346
|
useGridApiEventHandler(apiRef, GridEvents.rowSelectionCheckboxChange, handleRowSelectionCheckboxChange);
|
|
295
347
|
useGridApiEventHandler(apiRef, GridEvents.headerSelectionCheckboxChange, handleHeaderSelectionCheckboxChange);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
4
|
-
import {
|
|
4
|
+
import { useGridRegisterPipeProcessor } from '../../core/pipeProcessing';
|
|
5
5
|
import { getDataGridUtilityClass } from '../../../constants';
|
|
6
6
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../../../colDef';
|
|
7
7
|
|
|
@@ -43,5 +43,5 @@ export const useGridSelectionPreProcessors = (apiRef, props) => {
|
|
|
43
43
|
|
|
44
44
|
return columnsState;
|
|
45
45
|
}, [apiRef, classes, props.checkboxSelection]);
|
|
46
|
-
|
|
46
|
+
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateSelectionColumn);
|
|
47
47
|
};
|