@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
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
6
|
+
import { GridEvents } from '../../../models/events';
|
|
7
|
+
export var GRID_DEFAULT_STRATEGY = 'none';
|
|
8
|
+
export var GRID_STRATEGIES_PROCESSORS = {
|
|
9
|
+
rowTreeCreation: 'rowTree',
|
|
10
|
+
filtering: 'rowTree',
|
|
11
|
+
sorting: 'rowTree'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Implements a variant of the Strategy Pattern (see https://en.wikipedia.org/wiki/Strategy_pattern)
|
|
16
|
+
*
|
|
17
|
+
* Some plugins contain custom logic that must only be run if the right strategy is active.
|
|
18
|
+
* For instance, the tree data plugin has:
|
|
19
|
+
* - custom row tree creation algorithm.
|
|
20
|
+
* - custom sorting algorithm.
|
|
21
|
+
* - custom filtering algorithm.
|
|
22
|
+
*
|
|
23
|
+
* These plugins must use:
|
|
24
|
+
* - `apiRef.current.unstable_registerStrategyProcessor` to register their processors.
|
|
25
|
+
* - `apiRef.current.unstable_setStrategyAvailability` to tell if their strategy can be used.
|
|
26
|
+
*
|
|
27
|
+
* Some hooks need to run the custom logic of the active strategy.
|
|
28
|
+
* For instance, the `useGridFiltering` wants to run:
|
|
29
|
+
* - the tree data filtering if the tree data is the current way of grouping rows.
|
|
30
|
+
* - the row grouping filtering if the row grouping is the current way of grouping rows.
|
|
31
|
+
* - the flat filtering if there is no grouping of the rows (equivalent to the "none" strategy).
|
|
32
|
+
*
|
|
33
|
+
* These hooks must use:
|
|
34
|
+
* - `apiRef.current.unstable_applyStrategyProcessor` to run a processor.
|
|
35
|
+
* - `GridEvents.strategyAvailabilityChange` to update something when the active strategy changes.
|
|
36
|
+
* Warning: Be careful not to apply the processor several times.
|
|
37
|
+
* For instance `GridEvents.rowsSet` is fired by `useGridRows` whenever the active strategy changes.
|
|
38
|
+
* So listening to both would most likely run your logic twice.
|
|
39
|
+
* - `GridEvents.activeStrategyProcessorChange` to update something when the processor of the active strategy changes
|
|
40
|
+
*
|
|
41
|
+
* Each processor name is part of a strategy group which can only have one active strategy at the time.
|
|
42
|
+
*/
|
|
43
|
+
export var useGridStrategyProcessing = function useGridStrategyProcessing(apiRef) {
|
|
44
|
+
var availableStrategies = React.useRef(new Map());
|
|
45
|
+
var strategiesCache = React.useRef({});
|
|
46
|
+
var registerStrategyProcessor = React.useCallback(function (strategyName, processorName, processor) {
|
|
47
|
+
var cleanup = function cleanup() {
|
|
48
|
+
var _ref = strategiesCache.current[processorName],
|
|
49
|
+
removedPreProcessor = _ref[strategyName],
|
|
50
|
+
otherProcessors = _objectWithoutProperties(_ref, [strategyName].map(_toPropertyKey));
|
|
51
|
+
|
|
52
|
+
strategiesCache.current[processorName] = otherProcessors;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
if (!strategiesCache.current[processorName]) {
|
|
56
|
+
strategiesCache.current[processorName] = {};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var groupPreProcessors = strategiesCache.current[processorName];
|
|
60
|
+
var previousProcessor = groupPreProcessors[strategyName];
|
|
61
|
+
groupPreProcessors[strategyName] = processor;
|
|
62
|
+
|
|
63
|
+
if (!previousProcessor || previousProcessor === processor) {
|
|
64
|
+
return cleanup;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (strategyName === apiRef.current.unstable_getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName])) {
|
|
68
|
+
apiRef.current.publishEvent(GridEvents.activeStrategyProcessorChange, processorName);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return cleanup;
|
|
72
|
+
}, [apiRef]);
|
|
73
|
+
var applyStrategyProcessor = React.useCallback(function (processorName, params) {
|
|
74
|
+
var activeStrategy = apiRef.current.unstable_getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName]);
|
|
75
|
+
|
|
76
|
+
if (activeStrategy == null) {
|
|
77
|
+
throw new Error("Can't apply a strategy processor before defining an active strategy");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
var groupCache = strategiesCache.current[processorName];
|
|
81
|
+
|
|
82
|
+
if (!groupCache || !groupCache[activeStrategy]) {
|
|
83
|
+
throw new Error("No processor found for processor \"".concat(processorName, "\" on strategy \"").concat(activeStrategy, "\""));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var processor = groupCache[activeStrategy];
|
|
87
|
+
return processor(params);
|
|
88
|
+
}, [apiRef]);
|
|
89
|
+
var getActiveStrategy = React.useCallback(function (strategyGroup) {
|
|
90
|
+
var _availableStrategyEnt;
|
|
91
|
+
|
|
92
|
+
var strategyEntries = Array.from(availableStrategies.current.entries());
|
|
93
|
+
var availableStrategyEntry = strategyEntries.find(function (_ref2) {
|
|
94
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
95
|
+
strategy = _ref3[1];
|
|
96
|
+
|
|
97
|
+
if (strategy.group !== strategyGroup) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return strategy.isAvailable();
|
|
102
|
+
});
|
|
103
|
+
return (_availableStrategyEnt = availableStrategyEntry == null ? void 0 : availableStrategyEntry[0]) != null ? _availableStrategyEnt : GRID_DEFAULT_STRATEGY;
|
|
104
|
+
}, []);
|
|
105
|
+
var setStrategyAvailability = React.useCallback(function (strategyGroup, strategyName, isAvailable) {
|
|
106
|
+
availableStrategies.current.set(strategyName, {
|
|
107
|
+
group: strategyGroup,
|
|
108
|
+
isAvailable: isAvailable
|
|
109
|
+
});
|
|
110
|
+
apiRef.current.publishEvent(GridEvents.strategyAvailabilityChange);
|
|
111
|
+
}, [apiRef]);
|
|
112
|
+
var strategyProcessingApi = {
|
|
113
|
+
unstable_registerStrategyProcessor: registerStrategyProcessor,
|
|
114
|
+
unstable_applyStrategyProcessor: applyStrategyProcessor,
|
|
115
|
+
unstable_getActiveStrategy: getActiveStrategy,
|
|
116
|
+
unstable_setStrategyAvailability: setStrategyAvailability
|
|
117
|
+
};
|
|
118
|
+
useGridApiMethod(apiRef, strategyProcessingApi, 'GridStrategyProcessing');
|
|
119
|
+
};
|
|
@@ -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 var useGridInitialization = function useGridInitialization(inputApiRef, p
|
|
|
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
|
};
|
|
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import { DEFAULT_GRID_COL_TYPE_KEY, getGridDefaultColumnTypes } from '../../../models';
|
|
5
5
|
import { gridColumnsSelector, gridColumnVisibilityModelSelector } from './gridColumnsSelector';
|
|
6
6
|
import { clamp } from '../../../utils/utils';
|
|
7
|
+
export var COLUMNS_DIMENSION_PROPERTIES = ['maxWidth', 'minWidth', 'width', 'flex'];
|
|
7
8
|
export var computeColumnTypes = function computeColumnTypes() {
|
|
8
9
|
var customColumnTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9
10
|
|
|
@@ -173,6 +174,57 @@ export var hydrateColumnsWidth = function hydrateColumnsWidth(rawState, viewport
|
|
|
173
174
|
});
|
|
174
175
|
};
|
|
175
176
|
var columnTypeWarnedOnce = false;
|
|
177
|
+
/**
|
|
178
|
+
* Apply the order and the dimensions of the initial state.
|
|
179
|
+
* The columns not registered in `orderedFields` will be placed after the imported columns.
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
export var applyInitialState = function applyInitialState(columnsState, initialState) {
|
|
183
|
+
if (!initialState) {
|
|
184
|
+
return columnsState;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
var _initialState$ordered = initialState.orderedFields,
|
|
188
|
+
orderedFields = _initialState$ordered === void 0 ? [] : _initialState$ordered,
|
|
189
|
+
_initialState$dimensi = initialState.dimensions,
|
|
190
|
+
dimensions = _initialState$dimensi === void 0 ? {} : _initialState$dimensi;
|
|
191
|
+
var columnsWithUpdatedDimensions = Object.keys(dimensions);
|
|
192
|
+
|
|
193
|
+
if (columnsWithUpdatedDimensions.length === 0 && orderedFields.length === 0) {
|
|
194
|
+
return columnsState;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var orderedFieldsLookup = {};
|
|
198
|
+
var cleanOrderedFields = [];
|
|
199
|
+
|
|
200
|
+
for (var i = 0; i < orderedFields.length; i += 1) {
|
|
201
|
+
var _field = orderedFields[i]; // Ignores the fields in the initialState that matches no field on the current column state
|
|
202
|
+
|
|
203
|
+
if (columnsState.lookup[_field]) {
|
|
204
|
+
orderedFieldsLookup[_field] = true;
|
|
205
|
+
cleanOrderedFields.push(_field);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
var newOrderedFields = cleanOrderedFields.length === 0 ? columnsState.all : [].concat(cleanOrderedFields, _toConsumableArray(columnsState.all.filter(function (field) {
|
|
210
|
+
return !orderedFieldsLookup[field];
|
|
211
|
+
})));
|
|
212
|
+
|
|
213
|
+
var newColumnLookup = _extends({}, columnsState.lookup);
|
|
214
|
+
|
|
215
|
+
for (var _i = 0; _i < columnsWithUpdatedDimensions.length; _i += 1) {
|
|
216
|
+
var _field2 = columnsWithUpdatedDimensions[_i];
|
|
217
|
+
newColumnLookup[_field2] = _extends({}, newColumnLookup[_field2], dimensions[_field2], {
|
|
218
|
+
hasBeenResized: true
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
var newColumnsState = {
|
|
223
|
+
all: newOrderedFields,
|
|
224
|
+
lookup: newColumnLookup
|
|
225
|
+
};
|
|
226
|
+
return newColumnsState;
|
|
227
|
+
};
|
|
176
228
|
/**
|
|
177
229
|
* @deprecated Should have been internal only, you can inline the logic.
|
|
178
230
|
*/
|
|
@@ -200,14 +252,17 @@ export var createColumnsState = function createColumnsState(_ref5) {
|
|
|
200
252
|
|
|
201
253
|
var apiRef = _ref5.apiRef,
|
|
202
254
|
columnsToUpsert = _ref5.columnsToUpsert,
|
|
255
|
+
initialState = _ref5.initialState,
|
|
203
256
|
columnsTypes = _ref5.columnsTypes,
|
|
204
257
|
_ref5$currentColumnVi = _ref5.currentColumnVisibilityModel,
|
|
205
258
|
currentColumnVisibilityModel = _ref5$currentColumnVi === void 0 ? gridColumnVisibilityModelSelector(apiRef) : _ref5$currentColumnVi,
|
|
206
259
|
shouldRegenColumnVisibilityModelFromColumns = _ref5.shouldRegenColumnVisibilityModelFromColumns,
|
|
207
|
-
|
|
260
|
+
_ref5$keepOnlyColumns = _ref5.keepOnlyColumnsToUpsert,
|
|
261
|
+
keepOnlyColumnsToUpsert = _ref5$keepOnlyColumns === void 0 ? false : _ref5$keepOnlyColumns;
|
|
262
|
+
var isInsideStateInitializer = !apiRef.current.state.columns;
|
|
208
263
|
var columnsStateWithoutColumnVisibilityModel;
|
|
209
264
|
|
|
210
|
-
if (
|
|
265
|
+
if (isInsideStateInitializer || keepOnlyColumnsToUpsert) {
|
|
211
266
|
columnsStateWithoutColumnVisibilityModel = {
|
|
212
267
|
all: [],
|
|
213
268
|
lookup: {}
|
|
@@ -229,7 +284,15 @@ export var createColumnsState = function createColumnsState(_ref5) {
|
|
|
229
284
|
columnsStateWithoutColumnVisibilityModel.lookup[newColumn.field] = _extends({}, getGridColDef(columnsTypes, newColumn.type), newColumn);
|
|
230
285
|
columnsStateWithoutColumnVisibilityModel.all.push(newColumn.field);
|
|
231
286
|
} else {
|
|
232
|
-
|
|
287
|
+
var mergedColumn = _extends({}, columnsStateWithoutColumnVisibilityModel.lookup[newColumn.field], newColumn);
|
|
288
|
+
|
|
289
|
+
if (!mergedColumn.hasBeenResized && COLUMNS_DIMENSION_PROPERTIES.some(function (propertyName) {
|
|
290
|
+
return newColumn[propertyName] !== undefined;
|
|
291
|
+
})) {
|
|
292
|
+
mergedColumn.hasBeenResized = true;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
columnsStateWithoutColumnVisibilityModel.lookup[newColumn.field] = mergedColumn;
|
|
233
296
|
}
|
|
234
297
|
});
|
|
235
298
|
|
|
@@ -240,49 +303,76 @@ export var createColumnsState = function createColumnsState(_ref5) {
|
|
|
240
303
|
var columnVisibilityModel = {};
|
|
241
304
|
|
|
242
305
|
if (shouldRegenColumnVisibilityModelFromColumns) {
|
|
243
|
-
|
|
306
|
+
var hasModelChanged = false;
|
|
307
|
+
|
|
308
|
+
var newColumnVisibilityModel = _extends({}, currentColumnVisibilityModel);
|
|
309
|
+
|
|
310
|
+
if (isInsideStateInitializer) {
|
|
244
311
|
columnsStateWithPreProcessing.all.forEach(function (field) {
|
|
245
|
-
|
|
312
|
+
newColumnVisibilityModel[field] = !columnsStateWithoutColumnVisibilityModel.lookup[field].hide;
|
|
246
313
|
});
|
|
247
|
-
} else {
|
|
248
|
-
|
|
314
|
+
} else if (keepOnlyColumnsToUpsert) {
|
|
315
|
+
// At this point, `keepOnlyColumnsToUpsert` has a new meaning: keep the columns
|
|
316
|
+
// passed via `columnToUpsert` + columns added by the pre-processors. We do the following
|
|
317
|
+
// cleanup because a given column may have been removed from the `columns` prop but it still
|
|
318
|
+
// exists in the state.
|
|
319
|
+
Object.keys(newColumnVisibilityModel).forEach(function (field) {
|
|
320
|
+
if (!columnsStateWithPreProcessing.lookup[field]) {
|
|
321
|
+
delete newColumnVisibilityModel[field];
|
|
322
|
+
hasModelChanged = true;
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
249
326
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
327
|
+
columnsStateWithPreProcessing.all.forEach(function (field) {
|
|
328
|
+
// If neither the `columnsToUpsert` nor the pre-processors updated the column,
|
|
329
|
+
// Then we don't want to update the visibility status of the column in the model.
|
|
330
|
+
if (!columnsToUpsertLookup[field] && columnsLookupBeforePreProcessing[field] === columnsStateWithPreProcessing.lookup[field]) {
|
|
331
|
+
return;
|
|
332
|
+
} // We always assume that a column not in the model is visible by default. However, there's an
|
|
333
|
+
// edge case where the column is not in the model but it also doesn't exist in the `columns`
|
|
334
|
+
// prop, meaning that the column is being added. In that case, we assume that the column was
|
|
335
|
+
// not visible before for it be added to the model.
|
|
253
336
|
|
|
254
|
-
// If neither the `columnsToUpsert` nor the pre-processors updated the column,
|
|
255
|
-
// Then we don't want to update the visibility status of the column in the model.
|
|
256
|
-
if (!columnsToUpsertLookup[field] && columnsLookupBeforePreProcessing[field] === columnsStateWithPreProcessing.lookup[field]) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
337
|
|
|
260
|
-
|
|
261
|
-
var isVisibleAfter = !columnsStateWithPreProcessing.lookup[field].hide;
|
|
338
|
+
var isVisibleBefore = currentColumnVisibilityModel[field];
|
|
262
339
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
340
|
+
if (isVisibleBefore === undefined) {
|
|
341
|
+
if (isInsideStateInitializer) {
|
|
342
|
+
isVisibleBefore = true;
|
|
343
|
+
} else {
|
|
344
|
+
var _currentState = gridColumnsSelector(apiRef.current.state);
|
|
345
|
+
|
|
346
|
+
isVisibleBefore = !!_currentState.lookup[field];
|
|
266
347
|
}
|
|
267
|
-
}
|
|
348
|
+
}
|
|
268
349
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
350
|
+
var isVisibleAfter = !columnsStateWithPreProcessing.lookup[field].hide;
|
|
351
|
+
|
|
352
|
+
if (isVisibleAfter !== isVisibleBefore) {
|
|
353
|
+
hasModelChanged = true;
|
|
354
|
+
newColumnVisibilityModel[field] = isVisibleAfter;
|
|
273
355
|
}
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
if (hasModelChanged || isInsideStateInitializer) {
|
|
359
|
+
columnVisibilityModel = newColumnVisibilityModel;
|
|
360
|
+
} else {
|
|
361
|
+
columnVisibilityModel = currentColumnVisibilityModel;
|
|
274
362
|
}
|
|
275
363
|
} else {
|
|
276
364
|
columnVisibilityModel = currentColumnVisibilityModel;
|
|
277
365
|
}
|
|
278
366
|
|
|
279
|
-
var
|
|
367
|
+
var columnsStateWithPortableColumns = applyInitialState(columnsStateWithPreProcessing, initialState);
|
|
368
|
+
|
|
369
|
+
var columnsState = _extends({}, columnsStateWithPortableColumns, {
|
|
280
370
|
columnVisibilityModel: columnVisibilityModel
|
|
281
371
|
});
|
|
282
372
|
|
|
283
373
|
return hydrateColumnsWidth(columnsState, (_apiRef$current$getRo = (_apiRef$current$getRo2 = (_apiRef$current = apiRef.current).getRootDimensions) == null ? void 0 : (_apiRef$current$getRo3 = _apiRef$current$getRo2.call(_apiRef$current)) == null ? void 0 : _apiRef$current$getRo3.viewportInnerSize.width) != null ? _apiRef$current$getRo : 0);
|
|
284
374
|
};
|
|
285
|
-
export var
|
|
375
|
+
export var mergeColumnsState = function mergeColumnsState(columnsState) {
|
|
286
376
|
return function (state) {
|
|
287
377
|
return _extends({}, state, {
|
|
288
378
|
columns: columnsState
|
|
@@ -8,19 +8,22 @@ import { useGridLogger } from '../../utils/useGridLogger';
|
|
|
8
8
|
import { gridColumnFieldsSelector, gridColumnDefinitionsSelector, gridColumnLookupSelector, gridColumnsMetaSelector, gridColumnsSelector, gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector } from './gridColumnsSelector';
|
|
9
9
|
import { useGridApiEventHandler, useGridApiOptionHandler } from '../../utils/useGridApiEventHandler';
|
|
10
10
|
import { useGridRegisterPreProcessor } from '../../core/preProcessing';
|
|
11
|
-
import { hydrateColumnsWidth, computeColumnTypes, createColumnsState,
|
|
11
|
+
import { hydrateColumnsWidth, computeColumnTypes, createColumnsState, mergeColumnsState, COLUMNS_DIMENSION_PROPERTIES } from './gridColumnsUtils';
|
|
12
|
+
import { GridPreferencePanelsValue } from '../preferencesPanel';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
export var columnsStateInitializer = function columnsStateInitializer(state, props, apiRef) {
|
|
13
|
-
var _props$initialState, _props$initialState$c, _ref, _props$columnVisibili, _props$
|
|
15
|
+
var _props$initialState, _props$initialState$c, _props$initialState2, _ref, _props$columnVisibili, _props$initialState3, _props$initialState3$;
|
|
14
16
|
|
|
15
|
-
var
|
|
17
|
+
var isUsingColumnVisibilityModel = !!props.columnVisibilityModel || !!((_props$initialState = props.initialState) != null && (_props$initialState$c = _props$initialState.columns) != null && _props$initialState$c.columnVisibilityModel);
|
|
16
18
|
var columnsTypes = computeColumnTypes(props.columnTypes);
|
|
17
19
|
var columnsState = createColumnsState({
|
|
18
20
|
apiRef: apiRef,
|
|
19
21
|
columnsTypes: columnsTypes,
|
|
20
22
|
columnsToUpsert: props.columns,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
initialState: (_props$initialState2 = props.initialState) == null ? void 0 : _props$initialState2.columns,
|
|
24
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
25
|
+
currentColumnVisibilityModel: (_ref = (_props$columnVisibili = props.columnVisibilityModel) != null ? _props$columnVisibili : (_props$initialState3 = props.initialState) == null ? void 0 : (_props$initialState3$ = _props$initialState3.columns) == null ? void 0 : _props$initialState3$.columnVisibilityModel) != null ? _ref : {},
|
|
26
|
+
keepOnlyColumnsToUpsert: true
|
|
24
27
|
});
|
|
25
28
|
return _extends({}, state, {
|
|
26
29
|
columns: columnsState
|
|
@@ -33,7 +36,7 @@ export var columnsStateInitializer = function columnsStateInitializer(state, pro
|
|
|
33
36
|
*/
|
|
34
37
|
|
|
35
38
|
export function useGridColumns(apiRef, props) {
|
|
36
|
-
var _props$
|
|
39
|
+
var _props$initialState4, _props$initialState4$, _props$componentsProp2;
|
|
37
40
|
|
|
38
41
|
var logger = useGridLogger(apiRef, 'useGridColumns');
|
|
39
42
|
var columnsTypes = React.useMemo(function () {
|
|
@@ -44,7 +47,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
44
47
|
* 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`
|
|
45
48
|
*/
|
|
46
49
|
|
|
47
|
-
var
|
|
50
|
+
var isUsingColumnVisibilityModel = React.useRef(!!props.columnVisibilityModel || !!((_props$initialState4 = props.initialState) != null && (_props$initialState4$ = _props$initialState4.columns) != null && _props$initialState4$.columnVisibilityModel)).current;
|
|
48
51
|
apiRef.current.unstable_updateControlState({
|
|
49
52
|
stateId: 'visibleColumns',
|
|
50
53
|
propModel: props.columnVisibilityModel,
|
|
@@ -54,7 +57,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
54
57
|
});
|
|
55
58
|
var setGridColumnsState = React.useCallback(function (columnsState) {
|
|
56
59
|
logger.debug('Updating columns state.');
|
|
57
|
-
apiRef.current.setState(
|
|
60
|
+
apiRef.current.setState(mergeColumnsState(columnsState));
|
|
58
61
|
apiRef.current.forceUpdate();
|
|
59
62
|
apiRef.current.publishEvent(GridEvents.columnsChange, columnsState.all);
|
|
60
63
|
}, [logger, apiRef]);
|
|
@@ -95,9 +98,10 @@ export function useGridColumns(apiRef, props) {
|
|
|
95
98
|
apiRef: apiRef,
|
|
96
99
|
columnsTypes: columnsTypes,
|
|
97
100
|
columnsToUpsert: [],
|
|
101
|
+
initialState: undefined,
|
|
98
102
|
shouldRegenColumnVisibilityModelFromColumns: false,
|
|
99
103
|
currentColumnVisibilityModel: model,
|
|
100
|
-
|
|
104
|
+
keepOnlyColumnsToUpsert: false
|
|
101
105
|
})
|
|
102
106
|
});
|
|
103
107
|
});
|
|
@@ -109,8 +113,9 @@ export function useGridColumns(apiRef, props) {
|
|
|
109
113
|
apiRef: apiRef,
|
|
110
114
|
columnsTypes: columnsTypes,
|
|
111
115
|
columnsToUpsert: columns,
|
|
116
|
+
initialState: undefined,
|
|
112
117
|
shouldRegenColumnVisibilityModelFromColumns: true,
|
|
113
|
-
|
|
118
|
+
keepOnlyColumnsToUpsert: false
|
|
114
119
|
});
|
|
115
120
|
setGridColumnsState(columnsState);
|
|
116
121
|
}, [apiRef, setGridColumnsState, columnsTypes]);
|
|
@@ -121,7 +126,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
121
126
|
// We keep updating the `hide` option of `GridColDef` when not controlling the model to avoid any breaking change.
|
|
122
127
|
// `updateColumns` take care of updating the model itself if needs be.
|
|
123
128
|
// TODO v6: stop using the `hide` field even when the model is not defined
|
|
124
|
-
if (
|
|
129
|
+
if (isUsingColumnVisibilityModel) {
|
|
125
130
|
var _columnVisibilityMode;
|
|
126
131
|
|
|
127
132
|
var columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);
|
|
@@ -147,7 +152,7 @@ export function useGridColumns(apiRef, props) {
|
|
|
147
152
|
};
|
|
148
153
|
apiRef.current.publishEvent(GridEvents.columnVisibilityChange, params);
|
|
149
154
|
}
|
|
150
|
-
}, [apiRef,
|
|
155
|
+
}, [apiRef, isUsingColumnVisibilityModel]);
|
|
151
156
|
var setColumnIndex = React.useCallback(function (field, targetIndexPosition) {
|
|
152
157
|
var allColumns = gridColumnFieldsSelector(apiRef);
|
|
153
158
|
var oldIndexPosition = allColumns.findIndex(function (col) {
|
|
@@ -210,50 +215,80 @@ export function useGridColumns(apiRef, props) {
|
|
|
210
215
|
*/
|
|
211
216
|
|
|
212
217
|
var stateExportPreProcessing = React.useCallback(function (prevState) {
|
|
213
|
-
|
|
214
|
-
|
|
218
|
+
var columnsStateToExport = {};
|
|
219
|
+
|
|
220
|
+
if (isUsingColumnVisibilityModel) {
|
|
221
|
+
var columnVisibilityModelToExport = gridColumnVisibilityModelSelector(apiRef);
|
|
222
|
+
var hasHiddenColumns = Object.values(columnVisibilityModelToExport).some(function (value) {
|
|
223
|
+
return value === false;
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
if (hasHiddenColumns) {
|
|
227
|
+
columnsStateToExport.columnVisibilityModel = columnVisibilityModelToExport;
|
|
228
|
+
}
|
|
215
229
|
}
|
|
216
230
|
|
|
217
|
-
|
|
218
|
-
var
|
|
219
|
-
|
|
231
|
+
columnsStateToExport.orderedFields = gridColumnFieldsSelector(apiRef);
|
|
232
|
+
var columns = gridColumnDefinitionsSelector(apiRef);
|
|
233
|
+
var dimensions = {};
|
|
234
|
+
columns.forEach(function (colDef) {
|
|
235
|
+
if (colDef.hasBeenResized) {
|
|
236
|
+
var colDefDimensions = {};
|
|
237
|
+
COLUMNS_DIMENSION_PROPERTIES.forEach(function (propertyName) {
|
|
238
|
+
colDefDimensions[propertyName] = colDef[propertyName];
|
|
239
|
+
});
|
|
240
|
+
dimensions[colDef.field] = colDefDimensions;
|
|
241
|
+
}
|
|
220
242
|
});
|
|
221
243
|
|
|
222
|
-
if (
|
|
223
|
-
|
|
244
|
+
if (Object.keys(dimensions).length > 0) {
|
|
245
|
+
columnsStateToExport.dimensions = dimensions;
|
|
224
246
|
}
|
|
225
247
|
|
|
226
248
|
return _extends({}, prevState, {
|
|
227
|
-
columns:
|
|
228
|
-
columnVisibilityModel: columnVisibilityModelToExport
|
|
229
|
-
}
|
|
249
|
+
columns: columnsStateToExport
|
|
230
250
|
});
|
|
231
|
-
}, [apiRef,
|
|
251
|
+
}, [apiRef, isUsingColumnVisibilityModel]);
|
|
232
252
|
var stateRestorePreProcessing = React.useCallback(function (params, context) {
|
|
233
253
|
var _context$stateToResto;
|
|
234
254
|
|
|
235
|
-
|
|
255
|
+
var columnVisibilityModelToImport = isUsingColumnVisibilityModel ? (_context$stateToResto = context.stateToRestore.columns) == null ? void 0 : _context$stateToResto.columnVisibilityModel : undefined;
|
|
256
|
+
var initialState = context.stateToRestore.columns;
|
|
257
|
+
|
|
258
|
+
if (columnVisibilityModelToImport == null && initialState == null) {
|
|
236
259
|
return params;
|
|
237
260
|
}
|
|
238
261
|
|
|
239
|
-
var
|
|
262
|
+
var columnsState = createColumnsState({
|
|
263
|
+
apiRef: apiRef,
|
|
264
|
+
columnsTypes: columnsTypes,
|
|
265
|
+
columnsToUpsert: [],
|
|
266
|
+
initialState: initialState,
|
|
267
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
268
|
+
currentColumnVisibilityModel: columnVisibilityModelToImport,
|
|
269
|
+
keepOnlyColumnsToUpsert: false
|
|
270
|
+
});
|
|
271
|
+
apiRef.current.setState(mergeColumnsState(columnsState));
|
|
240
272
|
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
apiRef: apiRef,
|
|
244
|
-
columnsTypes: columnsTypes,
|
|
245
|
-
columnsToUpsert: [],
|
|
246
|
-
shouldRegenColumnVisibilityModelFromColumns: false,
|
|
247
|
-
currentColumnVisibilityModel: columnVisibilityModel,
|
|
248
|
-
reset: false
|
|
249
|
-
});
|
|
250
|
-
apiRef.current.setState(setColumnsState(columnsState));
|
|
273
|
+
if (initialState != null) {
|
|
274
|
+
apiRef.current.publishEvent(GridEvents.columnsChange, columnsState.all);
|
|
251
275
|
}
|
|
252
276
|
|
|
253
277
|
return params;
|
|
254
|
-
}, [apiRef,
|
|
278
|
+
}, [apiRef, isUsingColumnVisibilityModel, columnsTypes]);
|
|
279
|
+
var preferencePanelPreProcessing = React.useCallback(function (initialValue, value) {
|
|
280
|
+
if (value === GridPreferencePanelsValue.columns) {
|
|
281
|
+
var _props$componentsProp;
|
|
282
|
+
|
|
283
|
+
var ColumnsPanel = props.components.ColumnsPanel;
|
|
284
|
+
return /*#__PURE__*/_jsx(ColumnsPanel, _extends({}, (_props$componentsProp = props.componentsProps) == null ? void 0 : _props$componentsProp.columnsPanel));
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return initialValue;
|
|
288
|
+
}, [props.components.ColumnsPanel, (_props$componentsProp2 = props.componentsProps) == null ? void 0 : _props$componentsProp2.columnsPanel]);
|
|
255
289
|
useGridRegisterPreProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
256
290
|
useGridRegisterPreProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
291
|
+
useGridRegisterPreProcessor(apiRef, 'preferencePanel', preferencePanelPreProcessing);
|
|
257
292
|
/**
|
|
258
293
|
* EVENTS
|
|
259
294
|
*/
|
|
@@ -268,11 +303,12 @@ export function useGridColumns(apiRef, props) {
|
|
|
268
303
|
apiRef: apiRef,
|
|
269
304
|
columnsTypes: columnsTypes,
|
|
270
305
|
columnsToUpsert: [],
|
|
271
|
-
|
|
272
|
-
|
|
306
|
+
initialState: undefined,
|
|
307
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
308
|
+
keepOnlyColumnsToUpsert: false
|
|
273
309
|
});
|
|
274
310
|
setGridColumnsState(columnsState);
|
|
275
|
-
}, [apiRef, logger, setGridColumnsState, columnsTypes,
|
|
311
|
+
}, [apiRef, logger, setGridColumnsState, columnsTypes, isUsingColumnVisibilityModel]);
|
|
276
312
|
var prevInnerWidth = React.useRef(null);
|
|
277
313
|
|
|
278
314
|
var handleGridSizeChange = function handleGridSizeChange(viewportInnerSize) {
|
|
@@ -302,13 +338,14 @@ export function useGridColumns(apiRef, props) {
|
|
|
302
338
|
var columnsState = createColumnsState({
|
|
303
339
|
apiRef: apiRef,
|
|
304
340
|
columnsTypes: columnsTypes,
|
|
341
|
+
initialState: undefined,
|
|
305
342
|
// 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`
|
|
306
|
-
shouldRegenColumnVisibilityModelFromColumns: !
|
|
343
|
+
shouldRegenColumnVisibilityModelFromColumns: !isUsingColumnVisibilityModel,
|
|
307
344
|
columnsToUpsert: props.columns,
|
|
308
|
-
|
|
345
|
+
keepOnlyColumnsToUpsert: true
|
|
309
346
|
});
|
|
310
347
|
setGridColumnsState(columnsState);
|
|
311
|
-
}, [logger, apiRef, setGridColumnsState, props.columns, columnsTypes,
|
|
348
|
+
}, [logger, apiRef, setGridColumnsState, props.columns, columnsTypes, isUsingColumnVisibilityModel]);
|
|
312
349
|
React.useEffect(function () {
|
|
313
350
|
if (props.columnVisibilityModel !== undefined) {
|
|
314
351
|
apiRef.current.setColumnVisibilityModel(props.columnVisibilityModel);
|