@mui/x-data-grid 5.6.1 → 5.7.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 +71 -1
- package/DataGrid/DataGrid.js +10 -0
- package/DataGrid/useDataGridComponent.js +8 -2
- 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/base/GridErrorHandler.js +6 -25
- 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 +76 -4
- package/components/columnHeaders/GridColumnHeaderTitle.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/components/columnHeaders/GridColumnHeaders.js +3 -1
- package/components/containers/GridOverlay.d.ts +9 -2
- package/components/containers/GridOverlay.js +11 -2
- package/components/containers/GridRootStyles.js +2 -2
- package/components/panel/GridColumnsPanel.d.ts +4 -1
- package/components/panel/GridColumnsPanel.js +3 -3
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +4 -6
- package/hooks/core/preProcessing/gridPreProcessingApi.d.ts +11 -15
- package/hooks/core/preProcessing/useGridPreProcessing.d.ts +3 -0
- package/hooks/core/preProcessing/useGridPreProcessing.js +5 -1
- package/hooks/core/preProcessing/useGridRegisterPreProcessor.d.ts +5 -2
- package/hooks/core/preProcessing/useGridRegisterPreProcessor.js +4 -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 +37 -0
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +114 -0
- package/hooks/core/useGridInitialization.js +2 -2
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +6 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +12 -4
- package/hooks/features/columns/gridColumnsUtils.js +113 -29
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +79 -42
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +4 -0
- package/hooks/features/editRows/useGridCellEditing.new.js +315 -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 +118 -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 +486 -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/filter/gridFilterState.d.ts +2 -5
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +21 -27
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.js +37 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelState.d.ts +5 -0
- package/hooks/features/rows/gridRowsState.d.ts +20 -5
- package/hooks/features/rows/useGridRows.d.ts +0 -3
- package/hooks/features/rows/useGridRows.js +63 -42
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +3 -0
- package/hooks/features/rows/useGridRowsPreProcessors.js +37 -0
- package/hooks/features/selection/useGridSelection.js +4 -0
- package/hooks/features/sorting/gridSortingState.d.ts +2 -5
- package/hooks/features/sorting/useGridSorting.js +7 -26
- package/hooks/features/virtualization/useGridVirtualScroller.js +5 -3
- package/index.js +1 -1
- package/internals/index.d.ts +10 -7
- package/internals/index.js +4 -3
- package/legacy/DataGrid/DataGrid.js +10 -0
- package/legacy/DataGrid/useDataGridComponent.js +8 -2
- package/legacy/components/ErrorOverlay.js +8 -1
- package/legacy/components/GridLoadingOverlay.js +11 -2
- package/legacy/components/GridNoRowsOverlay.js +11 -2
- package/legacy/components/base/GridErrorHandler.js +3 -24
- 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 +83 -7
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/legacy/components/columnHeaders/GridColumnHeaders.js +3 -1
- package/legacy/components/containers/GridOverlay.js +11 -2
- package/legacy/components/containers/GridRootStyles.js +2 -2
- package/legacy/components/panel/GridColumnsPanel.js +3 -3
- package/legacy/components/panel/GridPreferencesPanel.js +4 -6
- package/legacy/hooks/core/preProcessing/useGridPreProcessing.js +5 -1
- package/legacy/hooks/core/preProcessing/useGridRegisterPreProcessor.js +4 -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 +119 -0
- package/legacy/hooks/core/useGridInitialization.js +2 -2
- package/legacy/hooks/features/columns/gridColumnsUtils.js +117 -27
- package/legacy/hooks/features/columns/useGridColumns.js +80 -43
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +329 -0
- package/legacy/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/legacy/hooks/features/editRows/useGridEditing.new.js +152 -0
- package/legacy/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +493 -0
- package/legacy/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +7 -7
- package/legacy/hooks/features/filter/useGridFilter.js +21 -27
- package/legacy/hooks/features/focus/useGridFocus.js +37 -1
- package/legacy/hooks/features/rows/useGridRows.js +65 -44
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +36 -0
- package/legacy/hooks/features/selection/useGridSelection.js +4 -0
- package/legacy/hooks/features/sorting/useGridSorting.js +7 -26
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +5 -3
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +4 -3
- package/legacy/locales/arSD.js +62 -58
- package/legacy/locales/faIR.js +26 -22
- package/legacy/locales/koKR.js +1 -1
- package/legacy/locales/plPL.js +30 -26
- package/legacy/models/events/gridEvents.js +2 -1
- package/legacy/models/gridEditRowModel.js +1 -0
- package/legacy/models/params/gridEditCellParams.js +34 -1
- package/legacy/models/params/gridRowParams.js +39 -1
- package/legacy/utils/cleanupTracking/TimerBasedCleanupTracking.js +5 -1
- package/legacy/utils/utils.js +150 -3
- package/locales/arSD.js +58 -58
- package/locales/faIR.js +22 -22
- package/locales/koKR.js +1 -1
- package/locales/plPL.js +26 -26
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridEditingApi.d.ts +125 -4
- package/models/api/gridFocusApi.d.ts +9 -0
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +4 -0
- package/models/events/gridEventLookup.d.ts +11 -5
- package/models/events/gridEvents.d.ts +9 -2
- package/models/events/gridEvents.js +2 -1
- package/models/gridEditRowModel.d.ts +4 -3
- package/models/gridEditRowModel.js +1 -0
- package/models/params/gridCellParams.d.ts +10 -1
- package/models/params/gridEditCellParams.d.ts +50 -0
- package/models/params/gridEditCellParams.js +34 -1
- package/models/params/gridRowParams.d.ts +41 -1
- package/models/params/gridRowParams.js +39 -1
- package/models/props/DataGridProps.d.ts +13 -1
- package/modern/DataGrid/DataGrid.js +10 -0
- package/modern/DataGrid/useDataGridComponent.js +6 -2
- package/modern/components/ErrorOverlay.js +8 -1
- package/modern/components/GridLoadingOverlay.js +11 -2
- package/modern/components/GridNoRowsOverlay.js +11 -2
- package/modern/components/base/GridErrorHandler.js +1 -20
- 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 +72 -4
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaders.js +3 -1
- package/modern/components/containers/GridOverlay.js +11 -2
- package/modern/components/containers/GridRootStyles.js +2 -2
- package/modern/components/panel/GridColumnsPanel.js +3 -3
- package/modern/components/panel/GridPreferencesPanel.js +3 -5
- package/modern/hooks/core/preProcessing/useGridPreProcessing.js +5 -1
- package/modern/hooks/core/preProcessing/useGridRegisterPreProcessor.js +4 -0
- package/modern/hooks/core/{rowGroupsPreProcessing/gridRowGroupsPreProcessingApi.js → strategyProcessing/gridStrategyProcessingApi.js} +0 -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 +112 -0
- package/modern/hooks/core/useGridInitialization.js +2 -2
- package/modern/hooks/features/columns/gridColumnsUtils.js +113 -27
- package/modern/hooks/features/columns/useGridColumns.js +74 -39
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +315 -0
- package/modern/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/modern/hooks/features/editRows/useGridEditing.new.js +118 -0
- package/modern/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +484 -0
- package/modern/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +7 -7
- package/modern/hooks/features/filter/useGridFilter.js +17 -27
- package/modern/hooks/features/focus/useGridFocus.js +37 -1
- package/modern/hooks/features/rows/useGridRows.js +63 -42
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +37 -0
- package/modern/hooks/features/selection/useGridSelection.js +4 -0
- package/modern/hooks/features/sorting/useGridSorting.js +7 -26
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -3
- package/modern/index.js +1 -1
- package/modern/internals/index.js +4 -3
- package/modern/locales/arSD.js +58 -58
- package/modern/locales/faIR.js +22 -22
- package/modern/locales/koKR.js +1 -1
- package/modern/locales/plPL.js +26 -26
- package/modern/models/events/gridEvents.js +2 -1
- package/modern/models/gridEditRowModel.js +1 -0
- package/modern/models/params/gridEditCellParams.js +34 -1
- package/modern/models/params/gridRowParams.js +39 -1
- package/modern/utils/cleanupTracking/TimerBasedCleanupTracking.js +4 -2
- package/modern/utils/utils.js +150 -3
- package/node/DataGrid/DataGrid.js +10 -0
- package/node/DataGrid/useDataGridComponent.js +11 -3
- package/node/components/ErrorOverlay.js +10 -1
- package/node/components/GridLoadingOverlay.js +10 -1
- package/node/components/GridNoRowsOverlay.js +10 -1
- package/node/components/base/GridErrorHandler.js +7 -30
- 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 +76 -4
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaders.js +3 -1
- package/node/components/containers/GridOverlay.js +10 -1
- package/node/components/containers/GridRootStyles.js +2 -2
- package/node/components/panel/GridColumnsPanel.js +3 -3
- package/node/components/panel/GridPreferencesPanel.js +4 -5
- package/node/hooks/core/preProcessing/useGridPreProcessing.js +4 -1
- package/node/hooks/core/preProcessing/useGridRegisterPreProcessor.js +3 -0
- 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 +135 -0
- package/node/hooks/core/useGridInitialization.js +2 -2
- package/node/hooks/features/columns/gridColumnsUtils.js +118 -31
- package/node/hooks/features/columns/useGridColumns.js +82 -41
- package/node/hooks/features/editRows/useGridCellEditing.new.js +334 -0
- package/node/hooks/features/editRows/{useGridCellEditing.js → useGridCellEditing.old.js} +1 -1
- package/node/hooks/features/editRows/useGridEditing.new.js +142 -0
- package/node/hooks/features/editRows/{useGridEditing.js → useGridEditing.old.js} +4 -4
- package/node/hooks/features/editRows/useGridRowEditing.new.js +499 -0
- package/node/hooks/features/editRows/{useGridRowEditing.js → useGridRowEditing.old.js} +6 -6
- package/node/hooks/features/filter/useGridFilter.js +21 -26
- package/node/hooks/features/focus/useGridFocus.js +40 -1
- package/node/hooks/features/rows/useGridRows.js +62 -41
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +46 -0
- package/node/hooks/features/selection/useGridSelection.js +4 -0
- package/node/hooks/features/sorting/useGridSorting.js +7 -26
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +5 -3
- package/node/index.js +1 -1
- package/node/internals/index.js +29 -15
- package/node/locales/arSD.js +58 -58
- package/node/locales/faIR.js +22 -22
- package/node/locales/koKR.js +1 -1
- package/node/locales/plPL.js +26 -26
- package/node/models/events/gridEvents.js +2 -1
- package/node/models/gridEditRowModel.js +1 -0
- package/node/models/params/gridEditCellParams.js +37 -1
- package/node/models/params/gridRowParams.js +42 -1
- package/node/utils/cleanupTracking/TimerBasedCleanupTracking.js +4 -2
- package/node/utils/utils.js +152 -11
- package/package.json +1 -1
- package/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +2 -0
- package/utils/cleanupTracking/TimerBasedCleanupTracking.js +4 -2
- package/utils/utils.d.ts +27 -2
- package/utils/utils.js +150 -3
- 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/sorting/useGridRegisterSortingMethod.d.ts +0 -4
- package/hooks/features/sorting/useGridRegisterSortingMethod.js +0 -9
- 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/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/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/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/rowGroupsPreProcessing/index.js +0 -31
- package/node/hooks/core/rowGroupsPreProcessing/useGridRowGroupsPreProcessing.js +0 -87
- package/node/hooks/features/filter/useGridRegisterFilteringMethod.js +0 -24
- 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
|
@@ -7,19 +7,17 @@ import { GridPreferencePanelsValue } from '../../hooks/features/preferencesPanel
|
|
|
7
7
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
8
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
export const GridPreferencesPanel = /*#__PURE__*/React.forwardRef(function GridPreferencesPanel(props, ref) {
|
|
12
11
|
const apiRef = useGridApiContext();
|
|
13
12
|
const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);
|
|
14
13
|
const rootProps = useGridRootProps();
|
|
15
14
|
const preferencePanelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
return /*#__PURE__*/_jsxs(rootProps.components.Panel, _extends({
|
|
15
|
+
const panelContent = apiRef.current.unstable_applyPreProcessors('preferencePanel', null, preferencePanelState.openedPanelValue ?? GridPreferencePanelsValue.filters);
|
|
16
|
+
return /*#__PURE__*/_jsx(rootProps.components.Panel, _extends({
|
|
19
17
|
ref: ref,
|
|
20
18
|
as: rootProps.components.BasePopper,
|
|
21
19
|
open: columns.length > 0 && preferencePanelState.open
|
|
22
20
|
}, rootProps.componentsProps?.panel, props, rootProps.componentsProps?.basePopper, {
|
|
23
|
-
children:
|
|
21
|
+
children: panelContent
|
|
24
22
|
}));
|
|
25
23
|
});
|
|
@@ -4,6 +4,10 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
6
6
|
import { GridEvents } from '../../../models/events';
|
|
7
|
+
/**
|
|
8
|
+
* TODO: Rename `useGridPipProcessing`
|
|
9
|
+
*/
|
|
10
|
+
|
|
7
11
|
export const useGridPreProcessing = apiRef => {
|
|
8
12
|
const preProcessorsRef = React.useRef({});
|
|
9
13
|
const registerPreProcessor = React.useCallback((group, id, callback) => {
|
|
@@ -14,7 +18,7 @@ export const useGridPreProcessing = apiRef => {
|
|
|
14
18
|
const preProcessors = preProcessorsRef.current[group];
|
|
15
19
|
const oldCallback = preProcessors[id];
|
|
16
20
|
|
|
17
|
-
if (
|
|
21
|
+
if (oldCallback !== callback) {
|
|
18
22
|
preProcessorsRef.current[group] = _extends({}, preProcessors, {
|
|
19
23
|
[id]: callback
|
|
20
24
|
});
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useFirstRender } from '../../utils/useFirstRender';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TODO: Rename `useGridRegisterPipeProcessor`
|
|
6
|
+
*/
|
|
3
7
|
export const useGridRegisterPreProcessor = (apiRef, group, callback) => {
|
|
4
8
|
const cleanup = React.useRef();
|
|
5
9
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useFirstRender } from '../../utils/useFirstRender';
|
|
3
|
+
export const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {
|
|
4
|
+
const registerPreProcessor = React.useCallback(() => {
|
|
5
|
+
apiRef.current.unstable_registerStrategyProcessor(strategyName, group, processor);
|
|
6
|
+
}, [apiRef, processor, group, strategyName]);
|
|
7
|
+
useFirstRender(() => {
|
|
8
|
+
registerPreProcessor();
|
|
9
|
+
});
|
|
10
|
+
const isFirstRender = React.useRef(true);
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (isFirstRender.current) {
|
|
13
|
+
isFirstRender.current = false;
|
|
14
|
+
} else {
|
|
15
|
+
registerPreProcessor();
|
|
16
|
+
}
|
|
17
|
+
}, [registerPreProcessor]);
|
|
18
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
5
|
+
import { GridEvents } from '../../../models/events';
|
|
6
|
+
export const GRID_DEFAULT_STRATEGY = 'none';
|
|
7
|
+
export const GRID_STRATEGIES_PROCESSORS = {
|
|
8
|
+
rowTreeCreation: 'rowTree',
|
|
9
|
+
filtering: 'rowTree',
|
|
10
|
+
sorting: 'rowTree'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Implements a variant of the Strategy Pattern (see https://en.wikipedia.org/wiki/Strategy_pattern)
|
|
15
|
+
*
|
|
16
|
+
* Some plugins contain custom logic that must only be run if the right strategy is active.
|
|
17
|
+
* For instance, the tree data plugin has:
|
|
18
|
+
* - custom row tree creation algorithm.
|
|
19
|
+
* - custom sorting algorithm.
|
|
20
|
+
* - custom filtering algorithm.
|
|
21
|
+
*
|
|
22
|
+
* These plugins must use:
|
|
23
|
+
* - `apiRef.current.unstable_registerStrategyProcessor` to register their processors.
|
|
24
|
+
* - `apiRef.current.unstable_setStrategyAvailability` to tell if their strategy can be used.
|
|
25
|
+
*
|
|
26
|
+
* Some hooks need to run the custom logic of the active strategy.
|
|
27
|
+
* For instance, the `useGridFiltering` wants to run:
|
|
28
|
+
* - the tree data filtering if the tree data is the current way of grouping rows.
|
|
29
|
+
* - the row grouping filtering if the row grouping is the current way of grouping rows.
|
|
30
|
+
* - the flat filtering if there is no grouping of the rows (equivalent to the "none" strategy).
|
|
31
|
+
*
|
|
32
|
+
* These hooks must use:
|
|
33
|
+
* - `apiRef.current.unstable_applyStrategyProcessor` to run a processor.
|
|
34
|
+
* - `GridEvents.strategyAvailabilityChange` to update something when the active strategy changes.
|
|
35
|
+
* Warning: Be careful not to apply the processor several times.
|
|
36
|
+
* For instance `GridEvents.rowsSet` is fired by `useGridRows` whenever the active strategy changes.
|
|
37
|
+
* So listening to both would most likely run your logic twice.
|
|
38
|
+
* - `GridEvents.activeStrategyProcessorChange` to update something when the processor of the active strategy changes
|
|
39
|
+
*
|
|
40
|
+
* Each processor name is part of a strategy group which can only have one active strategy at the time.
|
|
41
|
+
*/
|
|
42
|
+
export const useGridStrategyProcessing = apiRef => {
|
|
43
|
+
const availableStrategies = React.useRef(new Map());
|
|
44
|
+
const strategiesCache = React.useRef({});
|
|
45
|
+
const registerStrategyProcessor = React.useCallback((strategyName, processorName, processor) => {
|
|
46
|
+
const cleanup = () => {
|
|
47
|
+
const _ref = strategiesCache.current[processorName],
|
|
48
|
+
otherProcessors = _objectWithoutPropertiesLoose(_ref, [strategyName].map(_toPropertyKey));
|
|
49
|
+
|
|
50
|
+
strategiesCache.current[processorName] = otherProcessors;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
if (!strategiesCache.current[processorName]) {
|
|
54
|
+
strategiesCache.current[processorName] = {};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const groupPreProcessors = strategiesCache.current[processorName];
|
|
58
|
+
const previousProcessor = groupPreProcessors[strategyName];
|
|
59
|
+
groupPreProcessors[strategyName] = processor;
|
|
60
|
+
|
|
61
|
+
if (!previousProcessor || previousProcessor === processor) {
|
|
62
|
+
return cleanup;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (strategyName === apiRef.current.unstable_getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName])) {
|
|
66
|
+
apiRef.current.publishEvent(GridEvents.activeStrategyProcessorChange, processorName);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return cleanup;
|
|
70
|
+
}, [apiRef]);
|
|
71
|
+
const applyStrategyProcessor = React.useCallback((processorName, params) => {
|
|
72
|
+
const activeStrategy = apiRef.current.unstable_getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName]);
|
|
73
|
+
|
|
74
|
+
if (activeStrategy == null) {
|
|
75
|
+
throw new Error("Can't apply a strategy processor before defining an active strategy");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const groupCache = strategiesCache.current[processorName];
|
|
79
|
+
|
|
80
|
+
if (!groupCache || !groupCache[activeStrategy]) {
|
|
81
|
+
throw new Error(`No processor found for processor "${processorName}" on strategy "${activeStrategy}"`);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const processor = groupCache[activeStrategy];
|
|
85
|
+
return processor(params);
|
|
86
|
+
}, [apiRef]);
|
|
87
|
+
const getActiveStrategy = React.useCallback(strategyGroup => {
|
|
88
|
+
const strategyEntries = Array.from(availableStrategies.current.entries());
|
|
89
|
+
const availableStrategyEntry = strategyEntries.find(([, strategy]) => {
|
|
90
|
+
if (strategy.group !== strategyGroup) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return strategy.isAvailable();
|
|
95
|
+
});
|
|
96
|
+
return availableStrategyEntry?.[0] ?? GRID_DEFAULT_STRATEGY;
|
|
97
|
+
}, []);
|
|
98
|
+
const setStrategyAvailability = React.useCallback((strategyGroup, strategyName, isAvailable) => {
|
|
99
|
+
availableStrategies.current.set(strategyName, {
|
|
100
|
+
group: strategyGroup,
|
|
101
|
+
isAvailable
|
|
102
|
+
});
|
|
103
|
+
apiRef.current.publishEvent(GridEvents.strategyAvailabilityChange);
|
|
104
|
+
}, [apiRef]);
|
|
105
|
+
const strategyProcessingApi = {
|
|
106
|
+
unstable_registerStrategyProcessor: registerStrategyProcessor,
|
|
107
|
+
unstable_applyStrategyProcessor: applyStrategyProcessor,
|
|
108
|
+
unstable_getActiveStrategy: getActiveStrategy,
|
|
109
|
+
unstable_setStrategyAvailability: setStrategyAvailability
|
|
110
|
+
};
|
|
111
|
+
useGridApiMethod(apiRef, strategyProcessingApi, 'GridStrategyProcessing');
|
|
112
|
+
};
|
|
@@ -3,7 +3,7 @@ import { useGridApiInitialization } from './useGridApiInitialization';
|
|
|
3
3
|
import { useGridErrorHandler } from './useGridErrorHandler';
|
|
4
4
|
import { useGridLocaleText } from './useGridLocaleText';
|
|
5
5
|
import { useGridPreProcessing } from './preProcessing';
|
|
6
|
-
import {
|
|
6
|
+
import { useGridStrategyProcessing } from './strategyProcessing';
|
|
7
7
|
import { useGridStateInitialization } from './useGridStateInitialization';
|
|
8
8
|
/**
|
|
9
9
|
* Initialize the technical pieces of the DataGrid (logger, state, ...) that any DataGrid implementation needs
|
|
@@ -15,7 +15,7 @@ export const useGridInitialization = (inputApiRef, props) => {
|
|
|
15
15
|
useGridErrorHandler(apiRef, props);
|
|
16
16
|
useGridStateInitialization(apiRef, props);
|
|
17
17
|
useGridPreProcessing(apiRef);
|
|
18
|
-
|
|
18
|
+
useGridStrategyProcessing(apiRef);
|
|
19
19
|
useGridLocaleText(apiRef, props);
|
|
20
20
|
return apiRef;
|
|
21
21
|
};
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import { DEFAULT_GRID_COL_TYPE_KEY, getGridDefaultColumnTypes } from '../../../models';
|
|
3
3
|
import { gridColumnsSelector, gridColumnVisibilityModelSelector } from './gridColumnsSelector';
|
|
4
4
|
import { clamp } from '../../../utils/utils';
|
|
5
|
+
export const COLUMNS_DIMENSION_PROPERTIES = ['maxWidth', 'minWidth', 'width', 'flex'];
|
|
5
6
|
export const computeColumnTypes = (customColumnTypes = {}) => {
|
|
6
7
|
const mergedColumnTypes = _extends({}, getGridDefaultColumnTypes());
|
|
7
8
|
|
|
@@ -167,6 +168,55 @@ export const hydrateColumnsWidth = (rawState, viewportInnerWidth) => {
|
|
|
167
168
|
});
|
|
168
169
|
};
|
|
169
170
|
let columnTypeWarnedOnce = false;
|
|
171
|
+
/**
|
|
172
|
+
* Apply the order and the dimensions of the initial state.
|
|
173
|
+
* The columns not registered in `orderedFields` will be placed after the imported columns.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
export const applyInitialState = (columnsState, initialState) => {
|
|
177
|
+
if (!initialState) {
|
|
178
|
+
return columnsState;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const {
|
|
182
|
+
orderedFields = [],
|
|
183
|
+
dimensions = {}
|
|
184
|
+
} = initialState;
|
|
185
|
+
const columnsWithUpdatedDimensions = Object.keys(dimensions);
|
|
186
|
+
|
|
187
|
+
if (columnsWithUpdatedDimensions.length === 0 && orderedFields.length === 0) {
|
|
188
|
+
return columnsState;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const orderedFieldsLookup = {};
|
|
192
|
+
const cleanOrderedFields = [];
|
|
193
|
+
|
|
194
|
+
for (let i = 0; i < orderedFields.length; i += 1) {
|
|
195
|
+
const field = orderedFields[i]; // Ignores the fields in the initialState that matches no field on the current column state
|
|
196
|
+
|
|
197
|
+
if (columnsState.lookup[field]) {
|
|
198
|
+
orderedFieldsLookup[field] = true;
|
|
199
|
+
cleanOrderedFields.push(field);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const newOrderedFields = cleanOrderedFields.length === 0 ? columnsState.all : [...cleanOrderedFields, ...columnsState.all.filter(field => !orderedFieldsLookup[field])];
|
|
204
|
+
|
|
205
|
+
const newColumnLookup = _extends({}, columnsState.lookup);
|
|
206
|
+
|
|
207
|
+
for (let i = 0; i < columnsWithUpdatedDimensions.length; i += 1) {
|
|
208
|
+
const field = columnsWithUpdatedDimensions[i];
|
|
209
|
+
newColumnLookup[field] = _extends({}, newColumnLookup[field], dimensions[field], {
|
|
210
|
+
hasBeenResized: true
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const newColumnsState = {
|
|
215
|
+
all: newOrderedFields,
|
|
216
|
+
lookup: newColumnLookup
|
|
217
|
+
};
|
|
218
|
+
return newColumnsState;
|
|
219
|
+
};
|
|
170
220
|
/**
|
|
171
221
|
* @deprecated Should have been internal only, you can inline the logic.
|
|
172
222
|
*/
|
|
@@ -192,14 +242,16 @@ export const getGridColDef = (columnTypes, type) => {
|
|
|
192
242
|
export const createColumnsState = ({
|
|
193
243
|
apiRef,
|
|
194
244
|
columnsToUpsert,
|
|
245
|
+
initialState,
|
|
195
246
|
columnsTypes,
|
|
196
247
|
currentColumnVisibilityModel = gridColumnVisibilityModelSelector(apiRef),
|
|
197
248
|
shouldRegenColumnVisibilityModelFromColumns,
|
|
198
|
-
|
|
249
|
+
keepOnlyColumnsToUpsert = false
|
|
199
250
|
}) => {
|
|
251
|
+
const isInsideStateInitializer = !apiRef.current.state.columns;
|
|
200
252
|
let columnsStateWithoutColumnVisibilityModel;
|
|
201
253
|
|
|
202
|
-
if (
|
|
254
|
+
if (isInsideStateInitializer || keepOnlyColumnsToUpsert) {
|
|
203
255
|
columnsStateWithoutColumnVisibilityModel = {
|
|
204
256
|
all: [],
|
|
205
257
|
lookup: {}
|
|
@@ -221,7 +273,13 @@ export const createColumnsState = ({
|
|
|
221
273
|
columnsStateWithoutColumnVisibilityModel.lookup[newColumn.field] = _extends({}, getGridColDef(columnsTypes, newColumn.type), newColumn);
|
|
222
274
|
columnsStateWithoutColumnVisibilityModel.all.push(newColumn.field);
|
|
223
275
|
} else {
|
|
224
|
-
|
|
276
|
+
const mergedColumn = _extends({}, columnsStateWithoutColumnVisibilityModel.lookup[newColumn.field], newColumn);
|
|
277
|
+
|
|
278
|
+
if (!mergedColumn.hasBeenResized && COLUMNS_DIMENSION_PROPERTIES.some(propertyName => newColumn[propertyName] !== undefined)) {
|
|
279
|
+
mergedColumn.hasBeenResized = true;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
columnsStateWithoutColumnVisibilityModel.lookup[newColumn.field] = mergedColumn;
|
|
225
283
|
}
|
|
226
284
|
});
|
|
227
285
|
|
|
@@ -232,46 +290,74 @@ export const createColumnsState = ({
|
|
|
232
290
|
let columnVisibilityModel = {};
|
|
233
291
|
|
|
234
292
|
if (shouldRegenColumnVisibilityModelFromColumns) {
|
|
235
|
-
|
|
236
|
-
columnsStateWithPreProcessing.all.forEach(field => {
|
|
237
|
-
columnVisibilityModel[field] = !columnsStateWithoutColumnVisibilityModel.lookup[field].hide;
|
|
238
|
-
});
|
|
239
|
-
} else {
|
|
240
|
-
const newColumnVisibilityModel = _extends({}, currentColumnVisibilityModel);
|
|
293
|
+
let hasModelChanged = false;
|
|
241
294
|
|
|
242
|
-
|
|
243
|
-
columnsStateWithPreProcessing.all.forEach(field => {
|
|
244
|
-
// If neither the `columnsToUpsert` nor the pre-processors updated the column,
|
|
245
|
-
// Then we don't want to update the visibility status of the column in the model.
|
|
246
|
-
if (!columnsToUpsertLookup[field] && columnsLookupBeforePreProcessing[field] === columnsStateWithPreProcessing.lookup[field]) {
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
const isVisibleBefore = currentColumnVisibilityModel[field] ?? true;
|
|
251
|
-
const isVisibleAfter = !columnsStateWithPreProcessing.lookup[field].hide;
|
|
295
|
+
const newColumnVisibilityModel = _extends({}, currentColumnVisibilityModel);
|
|
252
296
|
|
|
253
|
-
|
|
297
|
+
if (isInsideStateInitializer) {
|
|
298
|
+
columnsStateWithPreProcessing.all.forEach(field => {
|
|
299
|
+
newColumnVisibilityModel[field] = !columnsStateWithoutColumnVisibilityModel.lookup[field].hide;
|
|
300
|
+
});
|
|
301
|
+
} else if (keepOnlyColumnsToUpsert) {
|
|
302
|
+
// At this point, `keepOnlyColumnsToUpsert` has a new meaning: keep the columns
|
|
303
|
+
// passed via `columnToUpsert` + columns added by the pre-processors. We do the following
|
|
304
|
+
// cleanup because a given column may have been removed from the `columns` prop but it still
|
|
305
|
+
// exists in the state.
|
|
306
|
+
Object.keys(newColumnVisibilityModel).forEach(field => {
|
|
307
|
+
if (!columnsStateWithPreProcessing.lookup[field]) {
|
|
308
|
+
delete newColumnVisibilityModel[field];
|
|
254
309
|
hasModelChanged = true;
|
|
255
|
-
newColumnVisibilityModel[field] = isVisibleAfter;
|
|
256
310
|
}
|
|
257
311
|
});
|
|
312
|
+
}
|
|
258
313
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
314
|
+
columnsStateWithPreProcessing.all.forEach(field => {
|
|
315
|
+
// If neither the `columnsToUpsert` nor the pre-processors updated the column,
|
|
316
|
+
// Then we don't want to update the visibility status of the column in the model.
|
|
317
|
+
if (!columnsToUpsertLookup[field] && columnsLookupBeforePreProcessing[field] === columnsStateWithPreProcessing.lookup[field]) {
|
|
318
|
+
return;
|
|
319
|
+
} // We always assume that a column not in the model is visible by default. However, there's an
|
|
320
|
+
// edge case where the column is not in the model but it also doesn't exist in the `columns`
|
|
321
|
+
// prop, meaning that the column is being added. In that case, we assume that the column was
|
|
322
|
+
// not visible before for it be added to the model.
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
let isVisibleBefore = currentColumnVisibilityModel[field];
|
|
326
|
+
|
|
327
|
+
if (isVisibleBefore === undefined) {
|
|
328
|
+
if (isInsideStateInitializer) {
|
|
329
|
+
isVisibleBefore = true;
|
|
330
|
+
} else {
|
|
331
|
+
const currentState = gridColumnsSelector(apiRef.current.state);
|
|
332
|
+
isVisibleBefore = !!currentState.lookup[field];
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const isVisibleAfter = !columnsStateWithPreProcessing.lookup[field].hide;
|
|
337
|
+
|
|
338
|
+
if (isVisibleAfter !== isVisibleBefore) {
|
|
339
|
+
hasModelChanged = true;
|
|
340
|
+
newColumnVisibilityModel[field] = isVisibleAfter;
|
|
263
341
|
}
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
if (hasModelChanged || isInsideStateInitializer) {
|
|
345
|
+
columnVisibilityModel = newColumnVisibilityModel;
|
|
346
|
+
} else {
|
|
347
|
+
columnVisibilityModel = currentColumnVisibilityModel;
|
|
264
348
|
}
|
|
265
349
|
} else {
|
|
266
350
|
columnVisibilityModel = currentColumnVisibilityModel;
|
|
267
351
|
}
|
|
268
352
|
|
|
269
|
-
const
|
|
353
|
+
const columnsStateWithPortableColumns = applyInitialState(columnsStateWithPreProcessing, initialState);
|
|
354
|
+
|
|
355
|
+
const columnsState = _extends({}, columnsStateWithPortableColumns, {
|
|
270
356
|
columnVisibilityModel
|
|
271
357
|
});
|
|
272
358
|
|
|
273
359
|
return hydrateColumnsWidth(columnsState, apiRef.current.getRootDimensions?.()?.viewportInnerSize.width ?? 0);
|
|
274
360
|
};
|
|
275
|
-
export const
|
|
361
|
+
export const mergeColumnsState = columnsState => state => _extends({}, state, {
|
|
276
362
|
columns: columnsState
|
|
277
363
|
});
|
|
@@ -6,17 +6,20 @@ import { useGridLogger } from '../../utils/useGridLogger';
|
|
|
6
6
|
import { gridColumnFieldsSelector, gridColumnDefinitionsSelector, gridColumnLookupSelector, gridColumnsMetaSelector, gridColumnsSelector, gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector } from './gridColumnsSelector';
|
|
7
7
|
import { useGridApiEventHandler, useGridApiOptionHandler } from '../../utils/useGridApiEventHandler';
|
|
8
8
|
import { useGridRegisterPreProcessor } from '../../core/preProcessing';
|
|
9
|
-
import { hydrateColumnsWidth, computeColumnTypes, createColumnsState,
|
|
9
|
+
import { hydrateColumnsWidth, computeColumnTypes, createColumnsState, mergeColumnsState, COLUMNS_DIMENSION_PROPERTIES } from './gridColumnsUtils';
|
|
10
|
+
import { GridPreferencePanelsValue } from '../preferencesPanel';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
12
|
export const columnsStateInitializer = (state, props, apiRef) => {
|
|
11
|
-
const
|
|
13
|
+
const isUsingColumnVisibilityModel = !!props.columnVisibilityModel || !!props.initialState?.columns?.columnVisibilityModel;
|
|
12
14
|
const columnsTypes = computeColumnTypes(props.columnTypes);
|
|
13
15
|
const columnsState = createColumnsState({
|
|
14
16
|
apiRef,
|
|
15
17
|
columnsTypes,
|
|
16
18
|
columnsToUpsert: props.columns,
|
|
17
|
-
|
|
19
|
+
initialState: props.initialState?.columns,
|
|
20
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
18
21
|
currentColumnVisibilityModel: props.columnVisibilityModel ?? props.initialState?.columns?.columnVisibilityModel ?? {},
|
|
19
|
-
|
|
22
|
+
keepOnlyColumnsToUpsert: true
|
|
20
23
|
});
|
|
21
24
|
return _extends({}, state, {
|
|
22
25
|
columns: columnsState
|
|
@@ -36,7 +39,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
36
39
|
* If not, we keep the old behavior and update the `GridColDef.hide` option (which will update the state model through the `GridColDef.hide` => `columnVisibilityModel` sync in `createColumnsState`
|
|
37
40
|
*/
|
|
38
41
|
|
|
39
|
-
const
|
|
42
|
+
const isUsingColumnVisibilityModel = React.useRef(!!props.columnVisibilityModel || !!props.initialState?.columns?.columnVisibilityModel).current;
|
|
40
43
|
apiRef.current.unstable_updateControlState({
|
|
41
44
|
stateId: 'visibleColumns',
|
|
42
45
|
propModel: props.columnVisibilityModel,
|
|
@@ -46,7 +49,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
46
49
|
});
|
|
47
50
|
const setGridColumnsState = React.useCallback(columnsState => {
|
|
48
51
|
logger.debug('Updating columns state.');
|
|
49
|
-
apiRef.current.setState(
|
|
52
|
+
apiRef.current.setState(mergeColumnsState(columnsState));
|
|
50
53
|
apiRef.current.forceUpdate();
|
|
51
54
|
apiRef.current.publishEvent(GridEvents.columnsChange, columnsState.all);
|
|
52
55
|
}, [logger, apiRef]);
|
|
@@ -75,9 +78,10 @@ export function useGridColumns(apiRef, props) {
|
|
|
75
78
|
apiRef,
|
|
76
79
|
columnsTypes,
|
|
77
80
|
columnsToUpsert: [],
|
|
81
|
+
initialState: undefined,
|
|
78
82
|
shouldRegenColumnVisibilityModelFromColumns: false,
|
|
79
83
|
currentColumnVisibilityModel: model,
|
|
80
|
-
|
|
84
|
+
keepOnlyColumnsToUpsert: false
|
|
81
85
|
})
|
|
82
86
|
}));
|
|
83
87
|
apiRef.current.forceUpdate();
|
|
@@ -88,8 +92,9 @@ export function useGridColumns(apiRef, props) {
|
|
|
88
92
|
apiRef,
|
|
89
93
|
columnsTypes,
|
|
90
94
|
columnsToUpsert: columns,
|
|
95
|
+
initialState: undefined,
|
|
91
96
|
shouldRegenColumnVisibilityModelFromColumns: true,
|
|
92
|
-
|
|
97
|
+
keepOnlyColumnsToUpsert: false
|
|
93
98
|
});
|
|
94
99
|
setGridColumnsState(columnsState);
|
|
95
100
|
}, [apiRef, setGridColumnsState, columnsTypes]);
|
|
@@ -98,7 +103,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
98
103
|
// We keep updating the `hide` option of `GridColDef` when not controlling the model to avoid any breaking change.
|
|
99
104
|
// `updateColumns` take care of updating the model itself if needs be.
|
|
100
105
|
// TODO v6: stop using the `hide` field even when the model is not defined
|
|
101
|
-
if (
|
|
106
|
+
if (isUsingColumnVisibilityModel) {
|
|
102
107
|
const columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);
|
|
103
108
|
const isCurrentlyVisible = columnVisibilityModel[field] ?? true;
|
|
104
109
|
|
|
@@ -124,7 +129,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
124
129
|
};
|
|
125
130
|
apiRef.current.publishEvent(GridEvents.columnVisibilityChange, params);
|
|
126
131
|
}
|
|
127
|
-
}, [apiRef,
|
|
132
|
+
}, [apiRef, isUsingColumnVisibilityModel]);
|
|
128
133
|
const setColumnIndex = React.useCallback((field, targetIndexPosition) => {
|
|
129
134
|
const allColumns = gridColumnFieldsSelector(apiRef);
|
|
130
135
|
const oldIndexPosition = allColumns.findIndex(col => col === field);
|
|
@@ -183,46 +188,74 @@ export function useGridColumns(apiRef, props) {
|
|
|
183
188
|
*/
|
|
184
189
|
|
|
185
190
|
const stateExportPreProcessing = React.useCallback(prevState => {
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
const columnsStateToExport = {};
|
|
192
|
+
|
|
193
|
+
if (isUsingColumnVisibilityModel) {
|
|
194
|
+
const columnVisibilityModelToExport = gridColumnVisibilityModelSelector(apiRef);
|
|
195
|
+
const hasHiddenColumns = Object.values(columnVisibilityModelToExport).some(value => value === false);
|
|
196
|
+
|
|
197
|
+
if (hasHiddenColumns) {
|
|
198
|
+
columnsStateToExport.columnVisibilityModel = columnVisibilityModelToExport;
|
|
199
|
+
}
|
|
188
200
|
}
|
|
189
201
|
|
|
190
|
-
|
|
191
|
-
const
|
|
202
|
+
columnsStateToExport.orderedFields = gridColumnFieldsSelector(apiRef);
|
|
203
|
+
const columns = gridColumnDefinitionsSelector(apiRef);
|
|
204
|
+
const dimensions = {};
|
|
205
|
+
columns.forEach(colDef => {
|
|
206
|
+
if (colDef.hasBeenResized) {
|
|
207
|
+
const colDefDimensions = {};
|
|
208
|
+
COLUMNS_DIMENSION_PROPERTIES.forEach(propertyName => {
|
|
209
|
+
colDefDimensions[propertyName] = colDef[propertyName];
|
|
210
|
+
});
|
|
211
|
+
dimensions[colDef.field] = colDefDimensions;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
192
214
|
|
|
193
|
-
if (
|
|
194
|
-
|
|
215
|
+
if (Object.keys(dimensions).length > 0) {
|
|
216
|
+
columnsStateToExport.dimensions = dimensions;
|
|
195
217
|
}
|
|
196
218
|
|
|
197
219
|
return _extends({}, prevState, {
|
|
198
|
-
columns:
|
|
199
|
-
columnVisibilityModel: columnVisibilityModelToExport
|
|
200
|
-
}
|
|
220
|
+
columns: columnsStateToExport
|
|
201
221
|
});
|
|
202
|
-
}, [apiRef,
|
|
222
|
+
}, [apiRef, isUsingColumnVisibilityModel]);
|
|
203
223
|
const stateRestorePreProcessing = React.useCallback((params, context) => {
|
|
204
|
-
|
|
224
|
+
const columnVisibilityModelToImport = isUsingColumnVisibilityModel ? context.stateToRestore.columns?.columnVisibilityModel : undefined;
|
|
225
|
+
const initialState = context.stateToRestore.columns;
|
|
226
|
+
|
|
227
|
+
if (columnVisibilityModelToImport == null && initialState == null) {
|
|
205
228
|
return params;
|
|
206
229
|
}
|
|
207
230
|
|
|
208
|
-
const
|
|
231
|
+
const columnsState = createColumnsState({
|
|
232
|
+
apiRef,
|
|
233
|
+
columnsTypes,
|
|
234
|
+
columnsToUpsert: [],
|
|
235
|
+
initialState,
|
|
236
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
237
|
+
currentColumnVisibilityModel: columnVisibilityModelToImport,
|
|
238
|
+
keepOnlyColumnsToUpsert: false
|
|
239
|
+
});
|
|
240
|
+
apiRef.current.setState(mergeColumnsState(columnsState));
|
|
209
241
|
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
apiRef,
|
|
213
|
-
columnsTypes,
|
|
214
|
-
columnsToUpsert: [],
|
|
215
|
-
shouldRegenColumnVisibilityModelFromColumns: false,
|
|
216
|
-
currentColumnVisibilityModel: columnVisibilityModel,
|
|
217
|
-
reset: false
|
|
218
|
-
});
|
|
219
|
-
apiRef.current.setState(setColumnsState(columnsState));
|
|
242
|
+
if (initialState != null) {
|
|
243
|
+
apiRef.current.publishEvent(GridEvents.columnsChange, columnsState.all);
|
|
220
244
|
}
|
|
221
245
|
|
|
222
246
|
return params;
|
|
223
|
-
}, [apiRef,
|
|
247
|
+
}, [apiRef, isUsingColumnVisibilityModel, columnsTypes]);
|
|
248
|
+
const preferencePanelPreProcessing = React.useCallback((initialValue, value) => {
|
|
249
|
+
if (value === GridPreferencePanelsValue.columns) {
|
|
250
|
+
const ColumnsPanel = props.components.ColumnsPanel;
|
|
251
|
+
return /*#__PURE__*/_jsx(ColumnsPanel, _extends({}, props.componentsProps?.columnsPanel));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return initialValue;
|
|
255
|
+
}, [props.components.ColumnsPanel, props.componentsProps?.columnsPanel]);
|
|
224
256
|
useGridRegisterPreProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
225
257
|
useGridRegisterPreProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
258
|
+
useGridRegisterPreProcessor(apiRef, 'preferencePanel', preferencePanelPreProcessing);
|
|
226
259
|
/**
|
|
227
260
|
* EVENTS
|
|
228
261
|
*/
|
|
@@ -237,11 +270,12 @@ export function useGridColumns(apiRef, props) {
|
|
|
237
270
|
apiRef,
|
|
238
271
|
columnsTypes,
|
|
239
272
|
columnsToUpsert: [],
|
|
240
|
-
|
|
241
|
-
|
|
273
|
+
initialState: undefined,
|
|
274
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
275
|
+
keepOnlyColumnsToUpsert: false
|
|
242
276
|
});
|
|
243
277
|
setGridColumnsState(columnsState);
|
|
244
|
-
}, [apiRef, logger, setGridColumnsState, columnsTypes,
|
|
278
|
+
}, [apiRef, logger, setGridColumnsState, columnsTypes, isUsingColumnVisibilityModel]);
|
|
245
279
|
const prevInnerWidth = React.useRef(null);
|
|
246
280
|
|
|
247
281
|
const handleGridSizeChange = viewportInnerSize => {
|
|
@@ -271,13 +305,14 @@ export function useGridColumns(apiRef, props) {
|
|
|
271
305
|
const columnsState = createColumnsState({
|
|
272
306
|
apiRef,
|
|
273
307
|
columnsTypes,
|
|
308
|
+
initialState: undefined,
|
|
274
309
|
// If the user provides a model, we don't want to set it in the state here because it has it's dedicated `useEffect` which calls `setColumnVisibilityModel`
|
|
275
|
-
shouldRegenColumnVisibilityModelFromColumns: !
|
|
310
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
276
311
|
columnsToUpsert: props.columns,
|
|
277
|
-
|
|
312
|
+
keepOnlyColumnsToUpsert: true
|
|
278
313
|
});
|
|
279
314
|
setGridColumnsState(columnsState);
|
|
280
|
-
}, [logger, apiRef, setGridColumnsState, props.columns, columnsTypes,
|
|
315
|
+
}, [logger, apiRef, setGridColumnsState, props.columns, columnsTypes, isUsingColumnVisibilityModel]);
|
|
281
316
|
React.useEffect(() => {
|
|
282
317
|
if (props.columnVisibilityModel !== undefined) {
|
|
283
318
|
apiRef.current.setColumnVisibilityModel(props.columnVisibilityModel);
|