@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,486 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useGridApiEventHandler, useGridApiOptionHandler } from '../../utils/useGridApiEventHandler';
|
|
6
|
+
import { GridEvents } from '../../../models/events/gridEvents';
|
|
7
|
+
import { GridEditModes, GridRowModes } from '../../../models/gridEditRowModel';
|
|
8
|
+
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
9
|
+
import { gridEditRowsStateSelector } from './gridEditRowsSelector';
|
|
10
|
+
import { isPrintableKey } from '../../../utils/keyboardUtils';
|
|
11
|
+
import { gridColumnFieldsSelector } from '../columns/gridColumnsSelector';
|
|
12
|
+
import { GridRowEditStopReasons, GridRowEditStartReasons } from '../../../models/params/gridRowParams';
|
|
13
|
+
export const useGridRowEditing = (apiRef, props) => {
|
|
14
|
+
const focusTimeout = React.useRef(null);
|
|
15
|
+
const nextFocusedCell = React.useRef(null);
|
|
16
|
+
const {
|
|
17
|
+
processRowUpdate
|
|
18
|
+
} = props;
|
|
19
|
+
|
|
20
|
+
const runIfEditModeIsRow = callback => (...args) => {
|
|
21
|
+
if (props.editMode === GridEditModes.Row) {
|
|
22
|
+
callback(...args);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const throwIfNotEditable = React.useCallback((id, field) => {
|
|
27
|
+
const params = apiRef.current.getCellParams(id, field);
|
|
28
|
+
|
|
29
|
+
if (!apiRef.current.isCellEditable(params)) {
|
|
30
|
+
throw new Error(`MUI: The cell with id=${id} and field=${field} is not editable.`);
|
|
31
|
+
}
|
|
32
|
+
}, [apiRef]);
|
|
33
|
+
const throwIfNotInMode = React.useCallback((id, mode) => {
|
|
34
|
+
if (apiRef.current.getRowMode(id) !== mode) {
|
|
35
|
+
throw new Error(`MUI: The row with id=${id} is not in ${mode} mode.`);
|
|
36
|
+
}
|
|
37
|
+
}, [apiRef]);
|
|
38
|
+
const handleCellDoubleClick = React.useCallback((params, event) => {
|
|
39
|
+
if (!params.isEditable) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (apiRef.current.getRowMode(params.id) === GridRowModes.Edit) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const rowParams = apiRef.current.getRowParams(params.id);
|
|
48
|
+
|
|
49
|
+
const newParams = _extends({}, rowParams, {
|
|
50
|
+
field: params.field,
|
|
51
|
+
reason: GridRowEditStartReasons.cellDoubleClick
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
apiRef.current.publishEvent(GridEvents.rowEditStart, newParams, event);
|
|
55
|
+
}, [apiRef]);
|
|
56
|
+
const handleCellFocusIn = React.useCallback(params => {
|
|
57
|
+
nextFocusedCell.current = params;
|
|
58
|
+
}, []);
|
|
59
|
+
const handleCellFocusOut = React.useCallback((params, event) => {
|
|
60
|
+
if (!params.isEditable) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (apiRef.current.getRowMode(params.id) === GridRowModes.View) {
|
|
65
|
+
return;
|
|
66
|
+
} // The mechanism to detect if we can stop editing a row is different from
|
|
67
|
+
// the cell editing. Instead of triggering it when clicking outside a cell,
|
|
68
|
+
// we must check if another cell in the same row was not clicked. To achieve
|
|
69
|
+
// that, first we keep track of all cells that gained focus. When a cell loses
|
|
70
|
+
// focus we check if the next cell that received focus is from a different row.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
nextFocusedCell.current = null;
|
|
74
|
+
focusTimeout.current = setTimeout(() => {
|
|
75
|
+
var _nextFocusedCell$curr;
|
|
76
|
+
|
|
77
|
+
focusTimeout.current = null;
|
|
78
|
+
|
|
79
|
+
if (((_nextFocusedCell$curr = nextFocusedCell.current) == null ? void 0 : _nextFocusedCell$curr.id) !== params.id) {
|
|
80
|
+
const rowParams = apiRef.current.getRowParams(params.id);
|
|
81
|
+
|
|
82
|
+
const newParams = _extends({}, rowParams, {
|
|
83
|
+
field: params.field,
|
|
84
|
+
reason: GridRowEditStopReasons.rowFocusOut
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
apiRef.current.publishEvent(GridEvents.rowEditStop, newParams, event);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}, [apiRef]);
|
|
91
|
+
React.useEffect(() => {
|
|
92
|
+
return () => {
|
|
93
|
+
clearTimeout(focusTimeout.current);
|
|
94
|
+
};
|
|
95
|
+
}, []);
|
|
96
|
+
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
97
|
+
if (params.cellMode === GridRowModes.Edit) {
|
|
98
|
+
let reason;
|
|
99
|
+
|
|
100
|
+
if (event.key === 'Escape') {
|
|
101
|
+
reason = GridRowEditStopReasons.escapeKeyDown;
|
|
102
|
+
} else if (event.key === 'Enter') {
|
|
103
|
+
reason = GridRowEditStopReasons.enterKeyDown;
|
|
104
|
+
} else if (event.key === 'Tab') {
|
|
105
|
+
const columnFields = gridColumnFieldsSelector(apiRef).filter(field => apiRef.current.isCellEditable(apiRef.current.getCellParams(params.id, field)));
|
|
106
|
+
|
|
107
|
+
if (event.shiftKey) {
|
|
108
|
+
if (params.field === columnFields[0]) {
|
|
109
|
+
// Exit if user pressed Shift+Tab on the first field
|
|
110
|
+
reason = GridRowEditStopReasons.shiftTabKeyDown;
|
|
111
|
+
}
|
|
112
|
+
} else if (params.field === columnFields[columnFields.length - 1]) {
|
|
113
|
+
// Exit if user pressed Tab on the last field
|
|
114
|
+
reason = GridRowEditStopReasons.tabKeyDown;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (reason) {
|
|
118
|
+
event.preventDefault(); // Prevent going to the next element in the tab sequence
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (reason) {
|
|
123
|
+
const rowParams = apiRef.current.getRowParams(params.id);
|
|
124
|
+
|
|
125
|
+
const newParams = _extends({}, rowParams, {
|
|
126
|
+
reason,
|
|
127
|
+
field: params.field
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
apiRef.current.publishEvent(GridEvents.rowEditStop, newParams, event);
|
|
131
|
+
}
|
|
132
|
+
} else if (params.isEditable) {
|
|
133
|
+
let reason;
|
|
134
|
+
|
|
135
|
+
if (isPrintableKey(event.key)) {
|
|
136
|
+
if (event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
reason = GridRowEditStartReasons.printableKeyDown;
|
|
141
|
+
} else if (event.key === 'Enter') {
|
|
142
|
+
reason = GridRowEditStartReasons.enterKeyDown;
|
|
143
|
+
} else if (event.key === 'Delete') {
|
|
144
|
+
reason = GridRowEditStartReasons.deleteKeyDown;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (reason) {
|
|
148
|
+
const rowParams = apiRef.current.getRowParams(params.id);
|
|
149
|
+
|
|
150
|
+
const newParams = _extends({}, rowParams, {
|
|
151
|
+
field: params.field,
|
|
152
|
+
reason
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
apiRef.current.publishEvent(GridEvents.rowEditStart, newParams, event);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}, [apiRef]);
|
|
159
|
+
const handleRowEditStart = React.useCallback((params, event) => {
|
|
160
|
+
const {
|
|
161
|
+
id,
|
|
162
|
+
field,
|
|
163
|
+
reason
|
|
164
|
+
} = params;
|
|
165
|
+
apiRef.current.startRowEditMode({
|
|
166
|
+
id,
|
|
167
|
+
fieldToFocus: field
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
if (reason === GridRowEditStartReasons.deleteKeyDown || reason === GridRowEditStartReasons.printableKeyDown) {
|
|
171
|
+
apiRef.current.setEditCellValue({
|
|
172
|
+
id,
|
|
173
|
+
field: field,
|
|
174
|
+
value: ''
|
|
175
|
+
}, event);
|
|
176
|
+
}
|
|
177
|
+
}, [apiRef]);
|
|
178
|
+
const handleRowEditStop = React.useCallback(params => {
|
|
179
|
+
const {
|
|
180
|
+
id,
|
|
181
|
+
reason,
|
|
182
|
+
field
|
|
183
|
+
} = params;
|
|
184
|
+
apiRef.current.unstable_runPendingEditCellValueMutation(id);
|
|
185
|
+
let cellToFocusAfter;
|
|
186
|
+
|
|
187
|
+
if (reason === GridRowEditStopReasons.enterKeyDown) {
|
|
188
|
+
cellToFocusAfter = 'below';
|
|
189
|
+
} else if (reason === GridRowEditStopReasons.tabKeyDown) {
|
|
190
|
+
cellToFocusAfter = 'right';
|
|
191
|
+
} else if (reason === GridRowEditStopReasons.shiftTabKeyDown) {
|
|
192
|
+
cellToFocusAfter = 'left';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
let ignoreModifications = reason === 'escapeKeyDown';
|
|
196
|
+
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
197
|
+
|
|
198
|
+
if (!ignoreModifications) {
|
|
199
|
+
// The user wants to stop editing the cell but we can't wait for the props to be processed.
|
|
200
|
+
// In this case, discard the modifications if any field is processing its props.
|
|
201
|
+
ignoreModifications = Object.values(editingState[id]).some(fieldProps => {
|
|
202
|
+
return fieldProps.isProcessingProps;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
apiRef.current.stopRowEditMode({
|
|
207
|
+
id,
|
|
208
|
+
ignoreModifications,
|
|
209
|
+
field,
|
|
210
|
+
cellToFocusAfter
|
|
211
|
+
});
|
|
212
|
+
}, [apiRef]);
|
|
213
|
+
useGridApiEventHandler(apiRef, GridEvents.cellDoubleClick, runIfEditModeIsRow(handleCellDoubleClick));
|
|
214
|
+
useGridApiEventHandler(apiRef, GridEvents.cellFocusIn, runIfEditModeIsRow(handleCellFocusIn));
|
|
215
|
+
useGridApiEventHandler(apiRef, GridEvents.cellFocusOut, runIfEditModeIsRow(handleCellFocusOut));
|
|
216
|
+
useGridApiEventHandler(apiRef, GridEvents.cellKeyDown, runIfEditModeIsRow(handleCellKeyDown));
|
|
217
|
+
useGridApiEventHandler(apiRef, GridEvents.rowEditStart, runIfEditModeIsRow(handleRowEditStart));
|
|
218
|
+
useGridApiEventHandler(apiRef, GridEvents.rowEditStop, runIfEditModeIsRow(handleRowEditStop));
|
|
219
|
+
useGridApiOptionHandler(apiRef, GridEvents.rowEditStart, props.onRowEditStart);
|
|
220
|
+
useGridApiOptionHandler(apiRef, GridEvents.rowEditStop, props.onRowEditStop);
|
|
221
|
+
const getRowMode = React.useCallback(id => {
|
|
222
|
+
if (props.editMode === GridEditModes.Cell) {
|
|
223
|
+
return GridRowModes.View;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
227
|
+
const isEditing = editingState[id] && Object.keys(editingState[id]).length > 0;
|
|
228
|
+
return isEditing ? GridRowModes.Edit : GridRowModes.View;
|
|
229
|
+
}, [apiRef, props.editMode]);
|
|
230
|
+
const updateOrDeleteRowState = React.useCallback((id, newProps) => {
|
|
231
|
+
apiRef.current.setState(state => {
|
|
232
|
+
const newEditingState = _extends({}, state.editRows);
|
|
233
|
+
|
|
234
|
+
if (newProps !== null) {
|
|
235
|
+
newEditingState[id] = newProps;
|
|
236
|
+
} else {
|
|
237
|
+
delete newEditingState[id];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return _extends({}, state, {
|
|
241
|
+
editRows: newEditingState
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
apiRef.current.forceUpdate();
|
|
245
|
+
}, [apiRef]);
|
|
246
|
+
const updateOrDeleteFieldState = React.useCallback((id, field, newProps) => {
|
|
247
|
+
apiRef.current.setState(state => {
|
|
248
|
+
const newEditingState = _extends({}, state.editRows);
|
|
249
|
+
|
|
250
|
+
if (newProps !== null) {
|
|
251
|
+
newEditingState[id] = _extends({}, newEditingState[id], {
|
|
252
|
+
[field]: _extends({}, newProps)
|
|
253
|
+
});
|
|
254
|
+
} else {
|
|
255
|
+
delete newEditingState[id][field];
|
|
256
|
+
|
|
257
|
+
if (Object.keys(newEditingState[id]).length === 0) {
|
|
258
|
+
delete newEditingState[id];
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return _extends({}, state, {
|
|
263
|
+
editRows: newEditingState
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
apiRef.current.forceUpdate();
|
|
267
|
+
}, [apiRef]);
|
|
268
|
+
const startRowEditMode = React.useCallback(params => {
|
|
269
|
+
const {
|
|
270
|
+
id,
|
|
271
|
+
fieldToFocus
|
|
272
|
+
} = params;
|
|
273
|
+
throwIfNotInMode(id, GridRowModes.View);
|
|
274
|
+
|
|
275
|
+
if (apiRef.current.getRowMode(id) === GridRowModes.Edit) {
|
|
276
|
+
throw new Error(`MUI: The cell with id=${id} is already in edit mode.`);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const columnFields = gridColumnFieldsSelector(apiRef);
|
|
280
|
+
const newProps = columnFields.reduce((acc, field) => {
|
|
281
|
+
const cellParams = apiRef.current.getCellParams(id, field);
|
|
282
|
+
|
|
283
|
+
if (!cellParams.isEditable) {
|
|
284
|
+
return acc;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
acc[field] = {
|
|
288
|
+
value: apiRef.current.getCellValue(id, field),
|
|
289
|
+
error: false,
|
|
290
|
+
isProcessingProps: false
|
|
291
|
+
};
|
|
292
|
+
return acc;
|
|
293
|
+
}, {});
|
|
294
|
+
updateOrDeleteRowState(id, newProps);
|
|
295
|
+
|
|
296
|
+
if (fieldToFocus) {
|
|
297
|
+
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
298
|
+
}
|
|
299
|
+
}, [apiRef, throwIfNotInMode, updateOrDeleteRowState]);
|
|
300
|
+
const stopRowEditMode = React.useCallback(params => {
|
|
301
|
+
const {
|
|
302
|
+
id,
|
|
303
|
+
ignoreModifications,
|
|
304
|
+
field: focusedField,
|
|
305
|
+
cellToFocusAfter = 'none'
|
|
306
|
+
} = params;
|
|
307
|
+
throwIfNotInMode(id, GridRowModes.Edit);
|
|
308
|
+
apiRef.current.unstable_runPendingEditCellValueMutation(id);
|
|
309
|
+
|
|
310
|
+
const updateFocusedCellIfNeeded = () => {
|
|
311
|
+
if (cellToFocusAfter !== 'none' && focusedField) {
|
|
312
|
+
apiRef.current.unstable_moveFocusToRelativeCell(id, focusedField, cellToFocusAfter);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
if (ignoreModifications) {
|
|
317
|
+
updateFocusedCellIfNeeded();
|
|
318
|
+
updateOrDeleteRowState(id, null);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
323
|
+
const row = apiRef.current.getRow(id);
|
|
324
|
+
const isSomeFieldProcessingProps = Object.values(editingState[id]).some(fieldProps => fieldProps.isProcessingProps);
|
|
325
|
+
|
|
326
|
+
if (isSomeFieldProcessingProps) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const hasSomeFieldWithError = Object.values(editingState[id]).some(fieldProps => fieldProps.error);
|
|
331
|
+
|
|
332
|
+
if (hasSomeFieldWithError) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
let rowUpdate = _extends({}, row);
|
|
337
|
+
|
|
338
|
+
Object.entries(editingState[id]).forEach(([field, fieldProps]) => {
|
|
339
|
+
const column = apiRef.current.getColumn(field);
|
|
340
|
+
|
|
341
|
+
if (column.valueSetter) {
|
|
342
|
+
rowUpdate = column.valueSetter({
|
|
343
|
+
value: fieldProps.value,
|
|
344
|
+
row: rowUpdate
|
|
345
|
+
});
|
|
346
|
+
} else {
|
|
347
|
+
rowUpdate[field] = fieldProps.value;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
if (processRowUpdate) {
|
|
352
|
+
Promise.resolve(processRowUpdate(rowUpdate, row)).then(finalRowUpdate => {
|
|
353
|
+
apiRef.current.updateRows([finalRowUpdate]);
|
|
354
|
+
updateFocusedCellIfNeeded();
|
|
355
|
+
updateOrDeleteRowState(id, null);
|
|
356
|
+
});
|
|
357
|
+
} else {
|
|
358
|
+
apiRef.current.updateRows([rowUpdate]);
|
|
359
|
+
updateFocusedCellIfNeeded();
|
|
360
|
+
updateOrDeleteRowState(id, null);
|
|
361
|
+
}
|
|
362
|
+
}, [apiRef, processRowUpdate, throwIfNotInMode, updateOrDeleteRowState]);
|
|
363
|
+
const setRowEditingEditCellValue = React.useCallback(params => {
|
|
364
|
+
const {
|
|
365
|
+
id,
|
|
366
|
+
field,
|
|
367
|
+
value
|
|
368
|
+
} = params;
|
|
369
|
+
throwIfNotEditable(id, field);
|
|
370
|
+
const column = apiRef.current.getColumn(field);
|
|
371
|
+
const row = apiRef.current.getRow(id);
|
|
372
|
+
let parsedValue = value;
|
|
373
|
+
|
|
374
|
+
if (column.valueParser) {
|
|
375
|
+
parsedValue = column.valueParser(value, apiRef.current.getCellParams(id, field));
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
let editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
379
|
+
|
|
380
|
+
let newProps = _extends({}, editingState[id][field], {
|
|
381
|
+
value: parsedValue
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
if (!column.preProcessEditCellProps) {
|
|
385
|
+
updateOrDeleteFieldState(id, field, newProps);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
return new Promise(resolve => {
|
|
389
|
+
const promises = [];
|
|
390
|
+
|
|
391
|
+
if (column.preProcessEditCellProps) {
|
|
392
|
+
const hasChanged = newProps.value !== editingState[id][field].value;
|
|
393
|
+
newProps = _extends({}, newProps, {
|
|
394
|
+
isProcessingProps: true
|
|
395
|
+
});
|
|
396
|
+
updateOrDeleteFieldState(id, field, newProps);
|
|
397
|
+
|
|
398
|
+
const _editingState$id = editingState[id],
|
|
399
|
+
otherFieldsProps = _objectWithoutPropertiesLoose(_editingState$id, [field].map(_toPropertyKey));
|
|
400
|
+
|
|
401
|
+
const promise = Promise.resolve(column.preProcessEditCellProps({
|
|
402
|
+
id,
|
|
403
|
+
row,
|
|
404
|
+
props: newProps,
|
|
405
|
+
hasChanged,
|
|
406
|
+
otherFieldsProps
|
|
407
|
+
})).then(processedProps => {
|
|
408
|
+
// Check again if the row is in edit mode because the user may have
|
|
409
|
+
// discarded the changes while the props were being processed.
|
|
410
|
+
if (apiRef.current.getRowMode(id) === GridRowModes.View) {
|
|
411
|
+
resolve(false);
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
416
|
+
processedProps = _extends({}, processedProps, {
|
|
417
|
+
isProcessingProps: false
|
|
418
|
+
}); // We don't reuse the value from the props pre-processing because when the
|
|
419
|
+
// promise resolves it may be already outdated. The only exception to this rule
|
|
420
|
+
// is when there's no pre-processing.
|
|
421
|
+
|
|
422
|
+
processedProps.value = column.preProcessEditCellProps ? editingState[id][field].value : parsedValue;
|
|
423
|
+
updateOrDeleteFieldState(id, field, processedProps);
|
|
424
|
+
});
|
|
425
|
+
promises.push(promise);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
Object.entries(editingState[id]).forEach(([thisField, fieldProps]) => {
|
|
429
|
+
if (thisField === field) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
const fieldColumn = apiRef.current.getColumn(thisField);
|
|
434
|
+
|
|
435
|
+
if (!fieldColumn.preProcessEditCellProps) {
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
fieldProps = _extends({}, fieldProps, {
|
|
440
|
+
isProcessingProps: true
|
|
441
|
+
});
|
|
442
|
+
updateOrDeleteFieldState(id, thisField, fieldProps);
|
|
443
|
+
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
444
|
+
|
|
445
|
+
const _editingState$id2 = editingState[id],
|
|
446
|
+
otherFieldsProps = _objectWithoutPropertiesLoose(_editingState$id2, [thisField].map(_toPropertyKey));
|
|
447
|
+
|
|
448
|
+
const promise = Promise.resolve(fieldColumn.preProcessEditCellProps({
|
|
449
|
+
id,
|
|
450
|
+
row,
|
|
451
|
+
props: fieldProps,
|
|
452
|
+
hasChanged: false,
|
|
453
|
+
otherFieldsProps
|
|
454
|
+
})).then(processedProps => {
|
|
455
|
+
// Check again if the row is in edit mode because the user may have
|
|
456
|
+
// discarded the changes while the props were being processed.
|
|
457
|
+
if (apiRef.current.getRowMode(id) === GridRowModes.View) {
|
|
458
|
+
resolve(false);
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
processedProps = _extends({}, processedProps, {
|
|
463
|
+
isProcessingProps: false
|
|
464
|
+
});
|
|
465
|
+
updateOrDeleteFieldState(id, thisField, processedProps);
|
|
466
|
+
});
|
|
467
|
+
promises.push(promise);
|
|
468
|
+
});
|
|
469
|
+
Promise.all(promises).then(() => {
|
|
470
|
+
if (apiRef.current.getRowMode(id) === GridRowModes.Edit) {
|
|
471
|
+
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
472
|
+
resolve(!editingState[id][field].error);
|
|
473
|
+
} else {
|
|
474
|
+
resolve(false);
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
}, [apiRef, throwIfNotEditable, updateOrDeleteFieldState]);
|
|
479
|
+
const editingApi = {
|
|
480
|
+
getRowMode,
|
|
481
|
+
startRowEditMode,
|
|
482
|
+
stopRowEditMode,
|
|
483
|
+
unstable_setRowEditingEditCellValue: setRowEditingEditCellValue
|
|
484
|
+
};
|
|
485
|
+
useGridApiMethod(apiRef, editingApi, 'EditingApi');
|
|
486
|
+
};
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ import { useEventCallback } from '@mui/material/utils';
|
|
|
4
4
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
5
5
|
import { GridRowModes, GridEditModes, GridCellModes } from '../../../models/gridEditRowModel';
|
|
6
6
|
import { useGridSelector } from '../../utils/useGridSelector';
|
|
7
|
-
import {
|
|
7
|
+
import { gridColumnDefinitionsSelector } from '../columns/gridColumnsSelector';
|
|
8
8
|
import { gridEditRowsStateSelector } from './gridEditRowsSelector';
|
|
9
9
|
import { GridEvents } from '../../../models/events/gridEvents';
|
|
10
10
|
import { gridFocusCellSelector } from '../focus/gridFocusStateSelector';
|
|
@@ -14,7 +14,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
14
14
|
|
|
15
15
|
const focusTimeout = React.useRef(null);
|
|
16
16
|
const nextFocusedCell = React.useRef(null);
|
|
17
|
-
const
|
|
17
|
+
const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);
|
|
18
18
|
|
|
19
19
|
const buildCallback = callback => (...args) => {
|
|
20
20
|
if (props.editMode === GridEditModes.Row) {
|
|
@@ -32,11 +32,11 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
32
32
|
|
|
33
33
|
if (mode === GridRowModes.Edit) {
|
|
34
34
|
newEditRowsState[id] = {};
|
|
35
|
-
|
|
36
|
-
const cellParams = apiRef.current.getCellParams(id, field);
|
|
35
|
+
columns.forEach(column => {
|
|
36
|
+
const cellParams = apiRef.current.getCellParams(id, column.field);
|
|
37
37
|
|
|
38
38
|
if (cellParams.isEditable) {
|
|
39
|
-
newEditRowsState[id][field] = {
|
|
39
|
+
newEditRowsState[id][column.field] = {
|
|
40
40
|
value: cellParams.value
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -50,7 +50,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
apiRef.current.forceUpdate();
|
|
53
|
-
}, [apiRef,
|
|
53
|
+
}, [apiRef, columns]);
|
|
54
54
|
const getRowMode = React.useCallback(id => {
|
|
55
55
|
if (props.editMode === GridEditModes.Cell) {
|
|
56
56
|
return GridRowModes.View;
|
|
@@ -66,7 +66,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
66
66
|
throw new Error(`MUI: You can't commit changes when the edit mode is 'cell'.`);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
apiRef.current.
|
|
69
|
+
apiRef.current.unstable_runPendingEditCellValueMutation(id);
|
|
70
70
|
const model = apiRef.current.getEditRowsModel();
|
|
71
71
|
const editRowProps = model[id];
|
|
72
72
|
|
|
@@ -33,10 +33,7 @@ export interface GridFilterInitialState {
|
|
|
33
33
|
* @param {(filterItem: GridFilterItem) => boolean} shouldApplyItem An optional callback to allow the filtering engine to only apply some items.
|
|
34
34
|
*/
|
|
35
35
|
export declare type GridAggregatedFilterItemApplier = (rowId: GridRowId, shouldApplyItem?: (filterItem: GridFilterItem) => boolean) => boolean;
|
|
36
|
-
export interface
|
|
36
|
+
export interface GridFilteringMethodParams {
|
|
37
37
|
isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
|
|
38
38
|
}
|
|
39
|
-
export declare type
|
|
40
|
-
export declare type GridFilteringMethodCollection = {
|
|
41
|
-
[methodName: string]: GridFilteringMethod;
|
|
42
|
-
};
|
|
39
|
+
export declare type GridFilteringMethodValue = Omit<GridFilterState, 'filterModel'>;
|
|
@@ -8,4 +8,4 @@ export declare const filterStateInitializer: GridStateInitializer<Pick<DataGridP
|
|
|
8
8
|
* @requires useGridParamsApi (method)
|
|
9
9
|
* @requires useGridRows (event)
|
|
10
10
|
*/
|
|
11
|
-
export declare const useGridFilter: (apiRef: React.MutableRefObject<GridApiCommunity>, props: Pick<DataGridProcessedProps, 'initialState' | 'filterModel' | 'onFilterModelChange' | 'filterMode' | 'disableMultipleColumnsFiltering'>) => void;
|
|
11
|
+
export declare const useGridFilter: (apiRef: React.MutableRefObject<GridApiCommunity>, props: Pick<DataGridProcessedProps, 'initialState' | 'filterModel' | 'onFilterModelChange' | 'filterMode' | 'disableMultipleColumnsFiltering' | 'components' | 'componentsProps'>) => void;
|
|
@@ -10,10 +10,11 @@ import { GridPreferencePanelsValue } from '../preferencesPanel/gridPreferencePan
|
|
|
10
10
|
import { getDefaultGridFilterModel } from './gridFilterState';
|
|
11
11
|
import { gridFilterModelSelector, gridVisibleSortedRowEntriesSelector } from './gridFilterSelector';
|
|
12
12
|
import { useFirstRender } from '../../utils/useFirstRender';
|
|
13
|
-
import { gridRowIdsSelector
|
|
13
|
+
import { gridRowIdsSelector } from '../rows';
|
|
14
14
|
import { useGridRegisterPreProcessor } from '../../core/preProcessing';
|
|
15
|
-
import {
|
|
15
|
+
import { GRID_DEFAULT_STRATEGY, useGridRegisterStrategyProcessor } from '../../core/strategyProcessing';
|
|
16
16
|
import { buildAggregatedFilterApplier, sanitizeFilterModel, mergeStateWithFilterModel } from './gridFilterUtils';
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
18
|
export const filterStateInitializer = (state, props, apiRef) => {
|
|
18
19
|
var _ref, _props$filterModel, _props$initialState, _props$initialState$f;
|
|
19
20
|
|
|
@@ -33,9 +34,9 @@ export const filterStateInitializer = (state, props, apiRef) => {
|
|
|
33
34
|
*/
|
|
34
35
|
|
|
35
36
|
export const useGridFilter = (apiRef, props) => {
|
|
37
|
+
var _props$componentsProp2;
|
|
38
|
+
|
|
36
39
|
const logger = useGridLogger(apiRef, 'useGridFilter');
|
|
37
|
-
const filteringMethodCollectionRef = React.useRef({});
|
|
38
|
-
const lastFilteringMethodApplied = React.useRef(null);
|
|
39
40
|
apiRef.current.unstable_updateControlState({
|
|
40
41
|
stateId: 'filter',
|
|
41
42
|
propModel: props.filterModel,
|
|
@@ -49,17 +50,9 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
49
50
|
|
|
50
51
|
const applyFilters = React.useCallback(() => {
|
|
51
52
|
apiRef.current.setState(state => {
|
|
52
|
-
const rowGroupingName = gridRowGroupingNameSelector(state, apiRef.current.instanceId);
|
|
53
|
-
const filteringMethod = filteringMethodCollectionRef.current[rowGroupingName];
|
|
54
|
-
|
|
55
|
-
if (!filteringMethod) {
|
|
56
|
-
throw new Error('MUI: Invalid filtering method.');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
53
|
const filterModel = gridFilterModelSelector(state, apiRef.current.instanceId);
|
|
60
54
|
const isRowMatchingFilters = props.filterMode === GridFeatureModeConstant.client ? buildAggregatedFilterApplier(filterModel, apiRef) : null;
|
|
61
|
-
|
|
62
|
-
const filteringResult = filteringMethod({
|
|
55
|
+
const filteringResult = apiRef.current.unstable_applyStrategyProcessor('filtering', {
|
|
63
56
|
isRowMatchingFilters
|
|
64
57
|
});
|
|
65
58
|
return _extends({}, state, {
|
|
@@ -194,6 +187,16 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
194
187
|
callbacks: [...params.callbacks, apiRef.current.unstable_applyFilters]
|
|
195
188
|
});
|
|
196
189
|
}, [apiRef, props.disableMultipleColumnsFiltering]);
|
|
190
|
+
const preferencePanelPreProcessing = React.useCallback((initialValue, value) => {
|
|
191
|
+
if (value === GridPreferencePanelsValue.filters) {
|
|
192
|
+
var _props$componentsProp;
|
|
193
|
+
|
|
194
|
+
const FilterPanel = props.components.FilterPanel;
|
|
195
|
+
return /*#__PURE__*/_jsx(FilterPanel, _extends({}, (_props$componentsProp = props.componentsProps) == null ? void 0 : _props$componentsProp.filterPanel));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return initialValue;
|
|
199
|
+
}, [props.components.FilterPanel, (_props$componentsProp2 = props.componentsProps) == null ? void 0 : _props$componentsProp2.filterPanel]);
|
|
197
200
|
const flatFilteringMethod = React.useCallback(params => {
|
|
198
201
|
if (props.filterMode === GridFeatureModeConstant.client && params.isRowMatchingFilters) {
|
|
199
202
|
const rowIds = gridRowIdsSelector(apiRef);
|
|
@@ -220,7 +223,8 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
220
223
|
}, [apiRef, props.filterMode]);
|
|
221
224
|
useGridRegisterPreProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
222
225
|
useGridRegisterPreProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
223
|
-
|
|
226
|
+
useGridRegisterPreProcessor(apiRef, 'preferencePanel', preferencePanelPreProcessing);
|
|
227
|
+
useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, 'filtering', flatFilteringMethod);
|
|
224
228
|
/**
|
|
225
229
|
* EVENTS
|
|
226
230
|
*/
|
|
@@ -237,30 +241,20 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
237
241
|
}));
|
|
238
242
|
}
|
|
239
243
|
}, [apiRef, logger]);
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
filteringMethodCollectionRef.current = apiRef.current.unstable_applyPreProcessors('filteringMethod', {});
|
|
246
|
-
const rowGroupingName = gridRowGroupingNameSelector(apiRef);
|
|
247
|
-
|
|
248
|
-
if (lastFilteringMethodApplied.current !== filteringMethodCollectionRef.current[rowGroupingName]) {
|
|
244
|
+
const handleStrategyProcessorChange = React.useCallback(methodName => {
|
|
245
|
+
if (methodName === 'filtering') {
|
|
249
246
|
apiRef.current.unstable_applyFilters();
|
|
250
247
|
}
|
|
251
248
|
}, [apiRef]);
|
|
252
249
|
useGridApiEventHandler(apiRef, GridEvents.rowsSet, apiRef.current.unstable_applyFilters);
|
|
253
250
|
useGridApiEventHandler(apiRef, GridEvents.rowExpansionChange, apiRef.current.unstable_applyFilters);
|
|
254
251
|
useGridApiEventHandler(apiRef, GridEvents.columnsChange, handleColumnsChange);
|
|
255
|
-
useGridApiEventHandler(apiRef, GridEvents.
|
|
252
|
+
useGridApiEventHandler(apiRef, GridEvents.activeStrategyProcessorChange, handleStrategyProcessorChange);
|
|
256
253
|
/**
|
|
257
254
|
* 1ST RENDER
|
|
258
255
|
*/
|
|
259
256
|
|
|
260
257
|
useFirstRender(() => {
|
|
261
|
-
// This line of pre-processor initialization should always come after the registration of `flatFilteringMethod`
|
|
262
|
-
// Otherwise on the 1st render there would be no filtering method registered
|
|
263
|
-
filteringMethodCollectionRef.current = apiRef.current.unstable_applyPreProcessors('filteringMethod', {});
|
|
264
258
|
apiRef.current.unstable_applyFilters();
|
|
265
259
|
});
|
|
266
260
|
/**
|
|
@@ -8,4 +8,4 @@ export declare const focusStateInitializer: GridStateInitializer;
|
|
|
8
8
|
* @requires useGridRows (method)
|
|
9
9
|
* @requires useGridEditing (event)
|
|
10
10
|
*/
|
|
11
|
-
export declare const useGridFocus: (apiRef: React.MutableRefObject<GridApiCommunity>, props: Pick<DataGridProcessedProps, 'rows'>) => void;
|
|
11
|
+
export declare const useGridFocus: (apiRef: React.MutableRefObject<GridApiCommunity>, props: Pick<DataGridProcessedProps, 'rows' | 'pagination' | 'paginationMode'>) => void;
|