@mui/x-data-grid 5.8.0 → 5.11.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 +333 -66
- package/DataGrid/DataGrid.js +36 -2
- package/DataGrid/useDataGridComponent.js +3 -1
- package/DataGrid/useDataGridProps.js +2 -1
- package/LICENSE +21 -0
- package/README.md +7 -5
- package/colDef/gridActionsColDef.js +2 -1
- package/colDef/gridBooleanColDef.js +2 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/colDef/gridDateColDef.js +4 -2
- package/colDef/gridNumericColDef.js +3 -2
- package/colDef/gridNumericOperators.d.ts +2 -0
- package/colDef/gridNumericOperators.js +11 -0
- package/colDef/gridSingleSelectColDef.js +3 -2
- package/colDef/gridSingleSelectOperators.d.ts +3 -0
- package/colDef/gridSingleSelectOperators.js +52 -0
- package/colDef/gridStringColDef.js +3 -2
- package/colDef/gridStringOperators.d.ts +2 -0
- package/colDef/gridStringOperators.js +12 -0
- package/components/GridFooter.d.ts +4 -2
- package/components/GridFooter.js +11 -2
- package/components/GridRow.d.ts +4 -0
- package/components/GridRow.js +58 -28
- package/components/GridRowCount.d.ts +4 -1
- package/components/GridRowCount.js +1 -0
- package/components/GridScrollArea.js +3 -4
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +2 -1
- package/components/base/GridBody.js +1 -2
- package/components/base/GridOverlays.js +5 -5
- package/components/cell/GridActionsCell.d.ts +5 -1
- package/components/cell/GridActionsCell.js +179 -21
- package/components/cell/GridActionsCellItem.d.ts +66 -4
- package/components/cell/GridActionsCellItem.js +7 -5
- package/components/cell/GridCell.d.ts +1 -0
- package/components/cell/GridCell.js +36 -15
- package/components/cell/GridEditBooleanCell.d.ts +15 -3
- package/components/cell/GridEditBooleanCell.js +101 -6
- package/components/cell/GridEditDateCell.d.ts +16 -4
- package/components/cell/GridEditDateCell.js +99 -5
- package/components/cell/GridEditInputCell.d.ts +11 -5
- package/components/cell/GridEditInputCell.js +30 -6
- package/components/cell/GridEditSingleSelectCell.d.ts +12 -4
- package/components/cell/GridEditSingleSelectCell.js +50 -18
- package/components/cell/index.d.ts +2 -0
- package/components/cell/index.js +2 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +19 -23
- package/components/columnHeaders/GridColumnHeaders.d.ts +2 -1
- package/components/columnHeaders/GridColumnHeaders.js +1 -1
- package/components/columnHeaders/GridColumnHeadersInner.d.ts +2 -0
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +3 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +22 -6
- package/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/components/containers/GridFooterContainer.d.ts +8 -2
- package/components/containers/GridFooterContainer.js +11 -2
- package/components/containers/GridRootStyles.js +36 -1
- package/components/containers/GridToolbarContainer.d.ts +8 -2
- package/components/containers/GridToolbarContainer.js +12 -2
- package/components/menu/GridMenu.js +1 -0
- package/components/panel/GridPanel.js +1 -0
- package/components/panel/GridPanelContent.d.ts +8 -1
- package/components/panel/GridPanelContent.js +13 -2
- package/components/panel/GridPanelFooter.d.ts +8 -1
- package/components/panel/GridPanelFooter.js +13 -2
- package/components/panel/GridPanelHeader.d.ts +8 -1
- package/components/panel/GridPanelHeader.js +13 -2
- package/components/panel/filterPanel/GridFilterForm.js +14 -10
- package/components/panel/filterPanel/GridFilterInputBoolean.js +13 -8
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +22 -15
- package/components/panel/filterPanel/GridFilterInputValue.js +22 -15
- package/components/toolbar/GridToolbar.d.ts +12 -2
- package/components/toolbar/GridToolbar.js +30 -7
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExport.d.ts +5 -4
- package/components/toolbar/GridToolbarExport.js +15 -20
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +20 -0
- package/components/toolbar/GridToolbarQuickFilter.js +88 -0
- package/components/toolbar/index.d.ts +3 -1
- package/components/toolbar/index.js +3 -2
- package/components/virtualization/GridVirtualScroller.d.ts +4 -1
- package/components/virtualization/GridVirtualScroller.js +2 -0
- package/components/virtualization/GridVirtualScrollerContent.d.ts +4 -1
- package/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +4 -1
- package/constants/defaultGridSlotsComponents.js +3 -2
- package/constants/gridClasses.d.ts +20 -0
- package/constants/gridClasses.js +1 -1
- package/constants/gridDetailPanelToggleField.d.ts +1 -0
- package/constants/gridDetailPanelToggleField.js +2 -0
- package/constants/localeTextConstants.js +8 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +39 -15
- package/hooks/core/pipeProcessing/index.d.ts +1 -0
- package/hooks/core/pipeProcessing/index.js +2 -1
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +8 -3
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +53 -19
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +3 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +27 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +0 -3
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +0 -4
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +4 -4
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
- package/hooks/core/useGridApiInitialization.js +3 -3
- package/hooks/core/useGridErrorHandler.js +1 -2
- package/hooks/core/useGridStateInitialization.js +1 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +0 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +81 -16
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +19 -1
- package/hooks/features/columns/gridColumnsUtils.js +61 -8
- package/hooks/features/columns/useGridColumnSpanning.d.ts +7 -0
- package/hooks/features/columns/useGridColumnSpanning.js +108 -0
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +30 -25
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +10 -11
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridCellEditing.new.js +151 -42
- package/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/hooks/features/editRows/useGridEditing.new.js +7 -3
- package/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridRowEditing.new.js +145 -57
- package/hooks/features/editRows/useGridRowEditing.old.js +21 -22
- package/hooks/features/events/useGridEvents.js +17 -18
- package/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/hooks/features/export/useGridCsvExport.js +23 -16
- package/hooks/features/export/useGridPrintExport.js +22 -0
- package/hooks/features/export/utils.d.ts +3 -1
- package/hooks/features/export/utils.js +13 -0
- package/hooks/features/filter/gridFilterState.d.ts +1 -2
- package/hooks/features/filter/gridFilterState.js +3 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +8 -0
- package/hooks/features/filter/gridFilterUtils.js +84 -2
- package/hooks/features/filter/useGridFilter.js +32 -15
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.js +48 -42
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -0
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +43 -12
- package/hooks/features/pagination/useGridPage.js +3 -4
- package/hooks/features/pagination/useGridPageSize.js +2 -3
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
- package/hooks/features/rows/gridRowsSelector.d.ts +2 -0
- package/hooks/features/rows/gridRowsSelector.js +2 -0
- package/hooks/features/rows/gridRowsState.d.ts +7 -7
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +25 -1
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +121 -61
- package/hooks/features/rows/useGridRowsMeta.js +6 -13
- package/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/hooks/features/scroll/useGridScroll.d.ts +2 -0
- package/hooks/features/scroll/useGridScroll.js +31 -4
- package/hooks/features/selection/useGridSelection.d.ts +1 -1
- package/hooks/features/selection/useGridSelection.js +15 -11
- package/hooks/features/sorting/useGridSorting.js +17 -18
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +9 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +68 -32
- package/hooks/utils/useGridApiEventHandler.d.ts +4 -1
- package/hooks/utils/useGridApiEventHandler.js +22 -9
- package/hooks/utils/useGridNativeEventListener.js +1 -2
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/internals/index.d.ts +5 -1
- package/internals/index.js +6 -2
- package/legacy/DataGrid/DataGrid.js +36 -2
- package/legacy/DataGrid/useDataGridComponent.js +3 -1
- package/legacy/DataGrid/useDataGridProps.js +2 -1
- package/legacy/colDef/gridActionsColDef.js +2 -1
- package/legacy/colDef/gridBooleanColDef.js +2 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/legacy/colDef/gridDateColDef.js +4 -2
- package/legacy/colDef/gridNumericColDef.js +3 -2
- package/legacy/colDef/gridNumericOperators.js +28 -18
- package/legacy/colDef/gridSingleSelectColDef.js +3 -2
- package/legacy/colDef/gridSingleSelectOperators.js +55 -6
- package/legacy/colDef/gridStringColDef.js +3 -2
- package/legacy/colDef/gridStringOperators.js +25 -14
- package/legacy/components/GridFooter.js +11 -2
- package/legacy/components/GridRow.js +56 -28
- package/legacy/components/GridRowCount.js +1 -0
- package/legacy/components/GridScrollArea.js +3 -4
- package/legacy/components/GridSelectedRowCount.js +2 -1
- package/legacy/components/base/GridBody.js +1 -2
- package/legacy/components/base/GridOverlays.js +5 -5
- package/legacy/components/cell/GridActionsCell.js +197 -27
- package/legacy/components/cell/GridActionsCellItem.js +7 -5
- package/legacy/components/cell/GridCell.js +37 -15
- package/legacy/components/cell/GridEditBooleanCell.js +132 -11
- package/legacy/components/cell/GridEditDateCell.js +148 -42
- package/legacy/components/cell/GridEditInputCell.js +62 -13
- package/legacy/components/cell/GridEditSingleSelectCell.js +65 -28
- package/legacy/components/cell/index.js +2 -0
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +19 -23
- package/legacy/components/columnHeaders/GridColumnHeaders.js +2 -3
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +23 -6
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/legacy/components/containers/GridFooterContainer.js +11 -2
- package/legacy/components/containers/GridRootStyles.js +26 -5
- package/legacy/components/containers/GridToolbarContainer.js +12 -2
- package/legacy/components/menu/GridMenu.js +1 -0
- package/legacy/components/panel/GridPanel.js +1 -0
- package/legacy/components/panel/GridPanelContent.js +13 -2
- package/legacy/components/panel/GridPanelFooter.js +13 -2
- package/legacy/components/panel/GridPanelHeader.js +13 -2
- package/legacy/components/panel/filterPanel/GridFilterForm.js +14 -10
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +13 -8
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +22 -17
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +22 -17
- package/legacy/components/toolbar/GridToolbar.js +31 -6
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/legacy/components/toolbar/GridToolbarExport.js +18 -19
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +103 -0
- package/legacy/components/toolbar/index.js +3 -2
- package/legacy/components/virtualization/GridVirtualScroller.js +2 -0
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/legacy/constants/defaultGridSlotsComponents.js +3 -2
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/gridDetailPanelToggleField.js +2 -0
- package/legacy/constants/localeTextConstants.js +8 -1
- package/legacy/hooks/core/pipeProcessing/index.js +2 -1
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +60 -24
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +27 -0
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +0 -4
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
- package/legacy/hooks/core/useGridApiInitialization.js +3 -3
- package/legacy/hooks/core/useGridErrorHandler.js +1 -2
- package/legacy/hooks/core/useGridStateInitialization.js +1 -2
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +94 -16
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/legacy/hooks/features/columns/gridColumnsUtils.js +79 -22
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +106 -0
- package/legacy/hooks/features/columns/useGridColumns.js +30 -25
- package/legacy/hooks/features/dimensions/useGridDimensions.js +10 -11
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +225 -89
- package/legacy/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/legacy/hooks/features/editRows/useGridEditing.new.js +7 -3
- package/legacy/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +157 -65
- package/legacy/hooks/features/editRows/useGridRowEditing.old.js +20 -21
- package/legacy/hooks/features/events/useGridEvents.js +17 -18
- package/legacy/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/legacy/hooks/features/export/useGridCsvExport.js +24 -17
- package/legacy/hooks/features/export/useGridPrintExport.js +22 -0
- package/legacy/hooks/features/export/utils.js +14 -0
- package/legacy/hooks/features/filter/gridFilterState.js +3 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +96 -2
- package/legacy/hooks/features/filter/useGridFilter.js +32 -15
- package/legacy/hooks/features/focus/useGridFocus.js +50 -44
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +43 -11
- package/legacy/hooks/features/pagination/useGridPage.js +3 -4
- package/legacy/hooks/features/pagination/useGridPageSize.js +2 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
- package/legacy/hooks/features/rows/gridRowsSelector.js +6 -0
- package/legacy/hooks/features/rows/gridRowsUtils.js +27 -1
- package/legacy/hooks/features/rows/useGridRows.js +131 -61
- package/legacy/hooks/features/rows/useGridRowsMeta.js +6 -13
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/legacy/hooks/features/scroll/useGridScroll.js +31 -4
- package/legacy/hooks/features/selection/useGridSelection.js +15 -11
- package/legacy/hooks/features/sorting/useGridSorting.js +12 -15
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +79 -42
- package/legacy/hooks/utils/useGridApiEventHandler.js +20 -9
- package/legacy/hooks/utils/useGridNativeEventListener.js +1 -2
- package/legacy/hooks/utils/useGridSelector.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +6 -2
- package/legacy/locales/arSD.js +8 -1
- package/legacy/locales/bgBG.js +8 -1
- package/legacy/locales/csCZ.js +7 -0
- package/legacy/locales/daDK.js +8 -1
- package/legacy/locales/deDE.js +10 -3
- package/legacy/locales/elGR.js +7 -0
- package/legacy/locales/esES.js +7 -0
- package/legacy/locales/faIR.js +8 -1
- package/legacy/locales/fiFI.js +7 -0
- package/legacy/locales/frFR.js +7 -0
- package/legacy/locales/heIL.js +8 -1
- package/legacy/locales/huHU.js +127 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/itIT.js +7 -0
- package/legacy/locales/jaJP.js +7 -0
- package/legacy/locales/koKR.js +7 -0
- package/legacy/locales/nlNL.js +7 -0
- package/legacy/locales/plPL.js +8 -1
- package/legacy/locales/ptBR.js +8 -1
- package/legacy/locales/ruRU.js +7 -0
- package/legacy/locales/skSK.js +7 -0
- package/legacy/locales/trTR.js +8 -1
- package/legacy/locales/ukUA.js +7 -0
- package/legacy/locales/viVN.js +7 -0
- package/legacy/locales/zhCN.js +7 -0
- package/legacy/models/api/gridColumnSpanning.js +1 -0
- package/legacy/models/events/gridEvents.js +10 -3
- package/legacy/models/gridColumnSpanning.js +1 -0
- package/legacy/models/index.js +4 -3
- package/legacy/utils/createSelector.js +18 -2
- package/legacy/utils/exportAs.js +1 -1
- package/locales/arSD.js +8 -1
- package/locales/bgBG.js +8 -1
- package/locales/csCZ.js +7 -0
- package/locales/daDK.js +8 -1
- package/locales/deDE.js +10 -3
- package/locales/elGR.js +7 -0
- package/locales/esES.js +7 -0
- package/locales/faIR.js +8 -1
- package/locales/fiFI.js +7 -0
- package/locales/frFR.js +7 -0
- package/locales/heIL.js +8 -1
- package/locales/huHU.d.ts +2 -0
- package/locales/huHU.js +115 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/itIT.js +7 -0
- package/locales/jaJP.js +7 -0
- package/locales/koKR.js +7 -0
- package/locales/nlNL.js +7 -0
- package/locales/plPL.js +8 -1
- package/locales/ptBR.js +8 -1
- package/locales/ruRU.js +7 -0
- package/locales/skSK.js +7 -0
- package/locales/trTR.js +8 -1
- package/locales/ukUA.js +7 -0
- package/locales/viVN.js +7 -0
- package/locales/zhCN.js +7 -0
- package/models/api/gridApiCommon.d.ts +2 -1
- package/models/api/gridColumnSpanning.d.ts +28 -0
- package/models/api/gridColumnSpanning.js +1 -0
- package/models/api/gridCoreApi.d.ts +10 -0
- package/models/api/gridEditingApi.d.ts +72 -7
- package/models/api/gridFilterApi.d.ts +5 -0
- package/models/api/gridFocusApi.d.ts +1 -0
- package/models/api/gridLocaleTextApi.d.ts +5 -0
- package/models/api/gridRowApi.d.ts +34 -0
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +18 -0
- package/models/events/gridEventLookup.d.ts +296 -11
- package/models/events/gridEvents.d.ts +10 -258
- package/models/events/gridEvents.js +10 -3
- package/models/gridColumnSpanning.d.ts +12 -0
- package/models/gridColumnSpanning.js +1 -0
- package/models/gridEditRowModel.d.ts +1 -1
- package/models/gridExport.d.ts +29 -2
- package/models/gridFilterModel.d.ts +11 -0
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridStateCommunity.d.ts +0 -2
- package/models/index.d.ts +1 -1
- package/models/index.js +4 -3
- package/models/params/gridCellParams.d.ts +12 -2
- package/models/params/gridRowParams.d.ts +5 -0
- package/models/props/DataGridProps.d.ts +57 -29
- package/modern/DataGrid/DataGrid.js +36 -2
- package/modern/DataGrid/useDataGridComponent.js +3 -1
- package/modern/DataGrid/useDataGridProps.js +2 -1
- package/modern/colDef/gridActionsColDef.js +2 -1
- package/modern/colDef/gridBooleanColDef.js +2 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/modern/colDef/gridDateColDef.js +4 -2
- package/modern/colDef/gridNumericColDef.js +3 -2
- package/modern/colDef/gridNumericOperators.js +11 -0
- package/modern/colDef/gridSingleSelectColDef.js +3 -2
- package/modern/colDef/gridSingleSelectOperators.js +52 -0
- package/modern/colDef/gridStringColDef.js +3 -2
- package/modern/colDef/gridStringOperators.js +12 -0
- package/modern/components/GridFooter.js +11 -2
- package/modern/components/GridRow.js +56 -26
- package/modern/components/GridRowCount.js +1 -0
- package/modern/components/GridScrollArea.js +3 -4
- package/modern/components/GridSelectedRowCount.js +2 -1
- package/modern/components/base/GridBody.js +1 -2
- package/modern/components/base/GridOverlays.js +5 -5
- package/modern/components/cell/GridActionsCell.js +179 -21
- package/modern/components/cell/GridActionsCellItem.js +7 -5
- package/modern/components/cell/GridCell.js +36 -15
- package/modern/components/cell/GridEditBooleanCell.js +101 -6
- package/modern/components/cell/GridEditDateCell.js +99 -5
- package/modern/components/cell/GridEditInputCell.js +30 -6
- package/modern/components/cell/GridEditSingleSelectCell.js +48 -16
- package/modern/components/cell/index.js +2 -0
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +19 -23
- package/modern/components/columnHeaders/GridColumnHeaders.js +1 -1
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +22 -6
- package/modern/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/modern/components/containers/GridFooterContainer.js +11 -2
- package/modern/components/containers/GridRootStyles.js +36 -1
- package/modern/components/containers/GridToolbarContainer.js +12 -2
- package/modern/components/menu/GridMenu.js +1 -0
- package/modern/components/panel/GridPanel.js +1 -0
- package/modern/components/panel/GridPanelContent.js +13 -2
- package/modern/components/panel/GridPanelFooter.js +13 -2
- package/modern/components/panel/GridPanelHeader.js +13 -2
- package/modern/components/panel/filterPanel/GridFilterForm.js +10 -6
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +11 -6
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +20 -13
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +20 -13
- package/modern/components/toolbar/GridToolbar.js +30 -7
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/toolbar/GridToolbarExport.js +15 -20
- package/modern/components/toolbar/GridToolbarQuickFilter.js +86 -0
- package/modern/components/toolbar/index.js +3 -2
- package/modern/components/virtualization/GridVirtualScroller.js +2 -0
- package/modern/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/modern/constants/defaultGridSlotsComponents.js +3 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/gridDetailPanelToggleField.js +2 -0
- package/modern/constants/localeTextConstants.js +8 -1
- package/modern/hooks/core/pipeProcessing/index.js +2 -1
- package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +53 -19
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +27 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +0 -4
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
- package/modern/hooks/core/useGridApiInitialization.js +3 -3
- package/modern/hooks/core/useGridErrorHandler.js +1 -2
- package/modern/hooks/core/useGridStateInitialization.js +1 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +81 -16
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/modern/hooks/features/columns/gridColumnsUtils.js +61 -8
- package/modern/hooks/features/columns/useGridColumnSpanning.js +106 -0
- package/modern/hooks/features/columns/useGridColumns.js +30 -25
- package/modern/hooks/features/dimensions/useGridDimensions.js +10 -11
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +149 -42
- package/modern/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/modern/hooks/features/editRows/useGridEditing.new.js +7 -3
- package/modern/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +143 -57
- package/modern/hooks/features/editRows/useGridRowEditing.old.js +21 -22
- package/modern/hooks/features/events/useGridEvents.js +17 -18
- package/modern/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/modern/hooks/features/export/useGridCsvExport.js +21 -16
- package/modern/hooks/features/export/useGridPrintExport.js +20 -0
- package/modern/hooks/features/export/utils.js +13 -0
- package/modern/hooks/features/filter/gridFilterState.js +3 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +80 -2
- package/modern/hooks/features/filter/useGridFilter.js +32 -15
- package/modern/hooks/features/focus/useGridFocus.js +48 -42
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +41 -12
- package/modern/hooks/features/pagination/useGridPage.js +3 -4
- package/modern/hooks/features/pagination/useGridPageSize.js +2 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
- package/modern/hooks/features/rows/gridRowsSelector.js +2 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +23 -1
- package/modern/hooks/features/rows/useGridRows.js +121 -61
- package/modern/hooks/features/rows/useGridRowsMeta.js +6 -13
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/modern/hooks/features/scroll/useGridScroll.js +29 -4
- package/modern/hooks/features/selection/useGridSelection.js +15 -11
- package/modern/hooks/features/sorting/useGridSorting.js +17 -18
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +68 -28
- package/modern/hooks/utils/useGridApiEventHandler.js +20 -9
- package/modern/hooks/utils/useGridNativeEventListener.js +1 -2
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +6 -2
- package/modern/locales/arSD.js +8 -1
- package/modern/locales/bgBG.js +8 -1
- package/modern/locales/csCZ.js +7 -0
- package/modern/locales/daDK.js +8 -1
- package/modern/locales/deDE.js +10 -3
- package/modern/locales/elGR.js +7 -0
- package/modern/locales/esES.js +7 -0
- package/modern/locales/faIR.js +8 -1
- package/modern/locales/fiFI.js +7 -0
- package/modern/locales/frFR.js +7 -0
- package/modern/locales/heIL.js +8 -1
- package/modern/locales/huHU.js +115 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/itIT.js +7 -0
- package/modern/locales/jaJP.js +7 -0
- package/modern/locales/koKR.js +7 -0
- package/modern/locales/nlNL.js +7 -0
- package/modern/locales/plPL.js +8 -1
- package/modern/locales/ptBR.js +8 -1
- package/modern/locales/ruRU.js +7 -0
- package/modern/locales/skSK.js +7 -0
- package/modern/locales/trTR.js +8 -1
- package/modern/locales/ukUA.js +7 -0
- package/modern/locales/viVN.js +7 -0
- package/modern/locales/zhCN.js +7 -0
- package/modern/models/api/gridColumnSpanning.js +1 -0
- package/modern/models/events/gridEvents.js +10 -3
- package/modern/models/gridColumnSpanning.js +1 -0
- package/modern/models/index.js +4 -3
- package/modern/utils/createSelector.js +20 -2
- package/modern/utils/exportAs.js +1 -1
- package/node/DataGrid/DataGrid.js +36 -2
- package/node/DataGrid/useDataGridComponent.js +4 -1
- package/node/DataGrid/useDataGridProps.js +2 -1
- package/node/colDef/gridActionsColDef.js +2 -1
- package/node/colDef/gridBooleanColDef.js +2 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/node/colDef/gridDateColDef.js +4 -2
- package/node/colDef/gridNumericColDef.js +2 -1
- package/node/colDef/gridNumericOperators.js +15 -1
- package/node/colDef/gridSingleSelectColDef.js +2 -1
- package/node/colDef/gridSingleSelectOperators.js +56 -1
- package/node/colDef/gridStringColDef.js +2 -1
- package/node/colDef/gridStringOperators.js +16 -1
- package/node/components/GridFooter.js +10 -1
- package/node/components/GridRow.js +59 -29
- package/node/components/GridRowCount.js +1 -0
- package/node/components/GridScrollArea.js +3 -5
- package/node/components/GridSelectedRowCount.js +2 -1
- package/node/components/base/GridBody.js +1 -3
- package/node/components/base/GridOverlays.js +4 -5
- package/node/components/cell/GridActionsCell.js +181 -21
- package/node/components/cell/GridActionsCellItem.js +7 -4
- package/node/components/cell/GridCell.js +35 -14
- package/node/components/cell/GridEditBooleanCell.js +100 -5
- package/node/components/cell/GridEditDateCell.js +98 -4
- package/node/components/cell/GridEditInputCell.js +30 -6
- package/node/components/cell/GridEditSingleSelectCell.js +50 -18
- package/node/components/cell/index.js +26 -0
- package/node/components/columnHeaders/GridColumnHeaderItem.js +19 -24
- package/node/components/columnHeaders/GridColumnHeaders.js +1 -1
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +22 -7
- package/node/components/columnSelection/GridHeaderCheckbox.js +4 -6
- package/node/components/containers/GridFooterContainer.js +10 -1
- package/node/components/containers/GridRootStyles.js +36 -1
- package/node/components/containers/GridToolbarContainer.js +11 -1
- package/node/components/menu/GridMenu.js +1 -0
- package/node/components/panel/GridPanel.js +1 -0
- package/node/components/panel/GridPanelContent.js +11 -1
- package/node/components/panel/GridPanelFooter.js +11 -1
- package/node/components/panel/GridPanelHeader.js +11 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +15 -10
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +14 -8
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +23 -15
- package/node/components/panel/filterPanel/GridFilterInputValue.js +23 -15
- package/node/components/toolbar/GridToolbar.js +32 -7
- package/node/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/node/components/toolbar/GridToolbarExport.js +14 -19
- package/node/components/toolbar/GridToolbarQuickFilter.js +111 -0
- package/node/components/toolbar/index.js +42 -11
- package/node/components/virtualization/GridVirtualScroller.js +2 -0
- package/node/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/node/constants/defaultGridSlotsComponents.js +2 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/gridDetailPanelToggleField.js +9 -0
- package/node/constants/localeTextConstants.js +8 -1
- package/node/hooks/core/pipeProcessing/index.js +13 -0
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +51 -20
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +42 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +0 -3
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -8
- package/node/hooks/core/useGridApiInitialization.js +3 -4
- package/node/hooks/core/useGridErrorHandler.js +1 -3
- package/node/hooks/core/useGridStateInitialization.js +1 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +85 -17
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/node/hooks/features/columns/gridColumnsUtils.js +65 -9
- package/node/hooks/features/columns/useGridColumnSpanning.js +128 -0
- package/node/hooks/features/columns/useGridColumns.js +29 -25
- package/node/hooks/features/dimensions/useGridDimensions.js +10 -12
- package/node/hooks/features/editRows/useGridCellEditing.new.js +151 -42
- package/node/hooks/features/editRows/useGridCellEditing.old.js +20 -22
- package/node/hooks/features/editRows/useGridEditing.new.js +6 -2
- package/node/hooks/features/editRows/useGridEditing.old.js +4 -6
- package/node/hooks/features/editRows/useGridRowEditing.new.js +143 -57
- package/node/hooks/features/editRows/useGridRowEditing.old.js +21 -23
- package/node/hooks/features/events/useGridEvents.js +17 -19
- package/node/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/node/hooks/features/export/useGridCsvExport.js +26 -17
- package/node/hooks/features/export/useGridPrintExport.js +25 -0
- package/node/hooks/features/export/utils.js +19 -2
- package/node/hooks/features/filter/gridFilterState.js +3 -1
- package/node/hooks/features/filter/gridFilterUtils.js +92 -3
- package/node/hooks/features/filter/useGridFilter.js +33 -16
- package/node/hooks/features/focus/useGridFocus.js +48 -43
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +44 -13
- package/node/hooks/features/pagination/useGridPage.js +3 -5
- package/node/hooks/features/pagination/useGridPageSize.js +2 -4
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -8
- package/node/hooks/features/rows/gridRowsSelector.js +5 -1
- package/node/hooks/features/rows/gridRowsUtils.js +29 -1
- package/node/hooks/features/rows/useGridRows.js +122 -61
- package/node/hooks/features/rows/useGridRowsMeta.js +6 -14
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/node/hooks/features/scroll/useGridScroll.js +32 -3
- package/node/hooks/features/selection/useGridSelection.js +16 -12
- package/node/hooks/features/sorting/useGridSorting.js +17 -19
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +73 -33
- package/node/hooks/utils/useGridApiEventHandler.js +22 -10
- package/node/hooks/utils/useGridNativeEventListener.js +1 -3
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +47 -3
- package/node/locales/arSD.js +8 -1
- package/node/locales/bgBG.js +8 -1
- package/node/locales/csCZ.js +7 -0
- package/node/locales/daDK.js +8 -1
- package/node/locales/deDE.js +10 -3
- package/node/locales/elGR.js +7 -0
- package/node/locales/esES.js +7 -0
- package/node/locales/faIR.js +8 -1
- package/node/locales/fiFI.js +7 -0
- package/node/locales/frFR.js +7 -0
- package/node/locales/heIL.js +8 -1
- package/node/locales/huHU.js +125 -0
- package/node/locales/index.js +13 -0
- package/node/locales/itIT.js +7 -0
- package/node/locales/jaJP.js +7 -0
- package/node/locales/koKR.js +7 -0
- package/node/locales/nlNL.js +7 -0
- package/node/locales/plPL.js +8 -1
- package/node/locales/ptBR.js +8 -1
- package/node/locales/ruRU.js +7 -0
- package/node/locales/skSK.js +7 -0
- package/node/locales/trTR.js +8 -1
- package/node/locales/ukUA.js +7 -0
- package/node/locales/viVN.js +7 -0
- package/node/locales/zhCN.js +7 -0
- package/node/models/api/gridColumnSpanning.js +5 -0
- package/node/models/events/gridEvents.js +10 -3
- package/node/models/gridColumnSpanning.js +5 -0
- package/node/models/index.js +0 -13
- package/node/utils/createSelector.js +25 -4
- package/node/utils/exportAs.js +1 -1
- package/package.json +4 -4
- package/utils/createSelector.d.ts +2 -1
- package/utils/createSelector.js +20 -2
- package/utils/domUtils.d.ts +2 -2
- package/utils/exportAs.d.ts +2 -2
- package/utils/exportAs.js +1 -1
|
@@ -1,9 +1,52 @@
|
|
|
1
1
|
import { GridCellMode, GridRowMode } from '../gridCell';
|
|
2
|
-
import { GridEditRowsModel, GridEditCellProps } from '../gridEditRowModel';
|
|
3
|
-
import { GridRowId } from '../gridRows';
|
|
2
|
+
import { GridEditRowsModel, GridEditCellProps, GridCellModes, GridRowModes } from '../gridEditRowModel';
|
|
3
|
+
import { GridRowId, GridRowModel } from '../gridRows';
|
|
4
4
|
import { GridCellParams } from '../params/gridCellParams';
|
|
5
5
|
import { GridCommitCellChangeParams, GridEditCellValueParams, GridEditCellPropsParams } from '../params/gridEditCellParams';
|
|
6
6
|
import { MuiBaseEvent } from '../muiEvent';
|
|
7
|
+
export declare type GridCellModesModelProps = ({
|
|
8
|
+
mode: GridCellModes.View;
|
|
9
|
+
} & Omit<GridStopCellEditModeParams, 'id' | 'field'>) | ({
|
|
10
|
+
mode: GridCellModes.Edit;
|
|
11
|
+
} & Omit<GridStartCellEditModeParams, 'id' | 'field'>);
|
|
12
|
+
export declare type GridCellModesModel = Record<GridRowId, Record<string, GridCellModesModelProps>>;
|
|
13
|
+
export declare type GridRowModesModelProps = ({
|
|
14
|
+
mode: GridRowModes.View;
|
|
15
|
+
} & Omit<GridStopRowEditModeParams, 'id' | 'field'>) | ({
|
|
16
|
+
mode: GridRowModes.Edit;
|
|
17
|
+
} & Omit<GridStartRowEditModeParams, 'id' | 'field'>);
|
|
18
|
+
export declare type GridRowModesModel = Record<GridRowId, GridRowModesModelProps>;
|
|
19
|
+
export interface GridNewEditingSharedApi {
|
|
20
|
+
/**
|
|
21
|
+
* Controls if a cell is editable.
|
|
22
|
+
* @param {GridCellParams} params The cell params.
|
|
23
|
+
* @returns {boolean} A boolean value determining if the cell is editable.
|
|
24
|
+
*/
|
|
25
|
+
isCellEditable: (params: GridCellParams) => boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the value of the edit cell.
|
|
28
|
+
* Commonly used inside the edit cell component.
|
|
29
|
+
* @param {GridEditCellValueParams} params Contains the id, field and value to set.
|
|
30
|
+
* @param {React.SyntheticEvent} event The event to pass forward.
|
|
31
|
+
* @returns {Promise<boolean> | void} A promise with the validation status if `preventCommitWhileValidating` is `true`. Otherwise, void.
|
|
32
|
+
*/
|
|
33
|
+
setEditCellValue: (params: GridEditCellValueParams, event?: MuiBaseEvent) => Promise<boolean> | void;
|
|
34
|
+
/**
|
|
35
|
+
* Immediatelly updates the value of the cell, without waiting for the debounce.
|
|
36
|
+
* @param {GridRowId} id The row id.
|
|
37
|
+
* @param {string} field The field to update. If not passed, updates all fields in the given row id.
|
|
38
|
+
* @ignore - do not document.
|
|
39
|
+
*/
|
|
40
|
+
unstable_runPendingEditCellValueMutation: (id: GridRowId, field?: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row with the values that were set by editing the cells.
|
|
43
|
+
* In row editing, `field` is ignored and all fields are considered.
|
|
44
|
+
* @param {GridRowId} id The row id being edited.
|
|
45
|
+
* @param {string} field The field being edited.
|
|
46
|
+
* @ignore - do not document.
|
|
47
|
+
*/
|
|
48
|
+
unstable_getRowWithUpdatedValues: (id: GridRowId, field: string) => GridRowModel;
|
|
49
|
+
}
|
|
7
50
|
/**
|
|
8
51
|
* The shared methods used by the cell and row editing API.
|
|
9
52
|
*/
|
|
@@ -11,11 +54,13 @@ export interface GridEditingSharedApi {
|
|
|
11
54
|
/**
|
|
12
55
|
* Set the edit rows model of the grid.
|
|
13
56
|
* @param {GridEditRowsModel} model The new edit rows model.
|
|
57
|
+
* @deprecated Prefer the new editing API.
|
|
14
58
|
*/
|
|
15
59
|
setEditRowsModel: (model: GridEditRowsModel) => void;
|
|
16
60
|
/**
|
|
17
61
|
* Gets the edit rows model of the grid.
|
|
18
62
|
* @returns {GridEditRowsModel} The edit rows model.
|
|
63
|
+
* @deprecated Prefer the new editing API.
|
|
19
64
|
*/
|
|
20
65
|
getEditRowsModel: () => GridEditRowsModel;
|
|
21
66
|
/**
|
|
@@ -115,7 +160,7 @@ export interface GridCellEditingApi extends GridEditingSharedApi {
|
|
|
115
160
|
/**
|
|
116
161
|
* Params passed to `apiRef.current.startCellEditMode`.
|
|
117
162
|
*/
|
|
118
|
-
interface GridStartCellEditModeParams {
|
|
163
|
+
export interface GridStartCellEditModeParams {
|
|
119
164
|
/**
|
|
120
165
|
* The row id.
|
|
121
166
|
*/
|
|
@@ -124,6 +169,10 @@ interface GridStartCellEditModeParams {
|
|
|
124
169
|
* The field.
|
|
125
170
|
*/
|
|
126
171
|
field: string;
|
|
172
|
+
/**
|
|
173
|
+
* If `true`, the value will be deleted before entering the edit mode.
|
|
174
|
+
*/
|
|
175
|
+
deleteValue?: boolean;
|
|
127
176
|
}
|
|
128
177
|
/**
|
|
129
178
|
* Params passed to `apiRef.current.stopCellEditMode`.
|
|
@@ -151,7 +200,7 @@ export interface GridStopCellEditModeParams {
|
|
|
151
200
|
/**
|
|
152
201
|
* Params passed to `apiRef.current.startRowEditMode`.
|
|
153
202
|
*/
|
|
154
|
-
interface GridStartRowEditModeParams {
|
|
203
|
+
export interface GridStartRowEditModeParams {
|
|
155
204
|
/**
|
|
156
205
|
* The row id.
|
|
157
206
|
*/
|
|
@@ -160,6 +209,10 @@ interface GridStartRowEditModeParams {
|
|
|
160
209
|
* The field to put focus.
|
|
161
210
|
*/
|
|
162
211
|
fieldToFocus?: string;
|
|
212
|
+
/**
|
|
213
|
+
* If `true`, the value in `fieldToFocus` will be deleted before entering the edit mode.
|
|
214
|
+
*/
|
|
215
|
+
deleteValue?: boolean;
|
|
163
216
|
}
|
|
164
217
|
/**
|
|
165
218
|
* Params passed to `apiRef.current.stopRowEditMode`.
|
|
@@ -186,7 +239,7 @@ export interface GridStopRowEditModeParams {
|
|
|
186
239
|
*/
|
|
187
240
|
cellToFocusAfter?: 'none' | 'below' | 'right' | 'left';
|
|
188
241
|
}
|
|
189
|
-
export interface GridNewCellEditingApi extends
|
|
242
|
+
export interface GridNewCellEditingApi extends GridNewEditingSharedApi, Pick<GridCellEditingApi, 'getCellMode'> {
|
|
190
243
|
/**
|
|
191
244
|
* Puts the cell corresponding to the given row id and field into edit mode.
|
|
192
245
|
* @param {GridStartCellEditModeParams} params The row id and field of the cell to edit.
|
|
@@ -206,8 +259,15 @@ export interface GridNewCellEditingApi extends Omit<GridEditingSharedApi, 'getEd
|
|
|
206
259
|
* @ignore - do not document.
|
|
207
260
|
*/
|
|
208
261
|
unstable_setCellEditingEditCellValue: (params: GridEditCellValueParams) => Promise<boolean>;
|
|
262
|
+
/**
|
|
263
|
+
* Returns the row with the new value that was set by editing the cell.
|
|
264
|
+
* @param {GridRowId} id The row id being edited.
|
|
265
|
+
* @param {string} field The field being edited.
|
|
266
|
+
* @ignore - do not document.
|
|
267
|
+
*/
|
|
268
|
+
unstable_getRowWithUpdatedValuesFromCellEditing: (id: GridRowId, field: string) => GridRowModel;
|
|
209
269
|
}
|
|
210
|
-
export interface GridNewRowEditingApi extends
|
|
270
|
+
export interface GridNewRowEditingApi extends GridNewEditingSharedApi, Pick<GridRowEditingApi, 'getRowMode'> {
|
|
211
271
|
/**
|
|
212
272
|
* Puts the row corresponding to the given id into edit mode.
|
|
213
273
|
* @param {GridStartCellEditModeParams} params The row id edit.
|
|
@@ -227,6 +287,12 @@ export interface GridNewRowEditingApi extends Omit<GridEditingSharedApi, 'getEdi
|
|
|
227
287
|
* @ignore - do not document.
|
|
228
288
|
*/
|
|
229
289
|
unstable_setRowEditingEditCellValue: (params: GridEditCellValueParams) => Promise<boolean>;
|
|
290
|
+
/**
|
|
291
|
+
* Returns the row with the values that were set by editing all cells.
|
|
292
|
+
* @param {GridRowId} id The row id being edited.
|
|
293
|
+
* @ignore - do not document.
|
|
294
|
+
*/
|
|
295
|
+
unstable_getRowWithUpdatedValuesFromRowEditing: (id: GridRowId) => GridRowModel;
|
|
230
296
|
}
|
|
231
297
|
/**
|
|
232
298
|
* The editing API interface that is available in the grid `apiRef`.
|
|
@@ -237,4 +303,3 @@ export interface GridOldEditingApi extends GridCellEditingApi, GridRowEditingApi
|
|
|
237
303
|
}
|
|
238
304
|
export interface GridNewEditingApi extends GridNewCellEditingApi, GridNewRowEditingApi {
|
|
239
305
|
}
|
|
240
|
-
export {};
|
|
@@ -44,4 +44,9 @@ export interface GridFilterApi {
|
|
|
44
44
|
* @returns {Map<GridRowId, GridRowModel>} The sorted `Map`.
|
|
45
45
|
*/
|
|
46
46
|
getVisibleRowModels: () => Map<GridRowId, GridRowModel>;
|
|
47
|
+
/**
|
|
48
|
+
* Set the quick filter values ot the one given by `values`
|
|
49
|
+
* @param {any[]} values The list of element to quick filter
|
|
50
|
+
*/
|
|
51
|
+
setQuickFilterValues: (values: any[]) => void;
|
|
47
52
|
}
|
|
@@ -20,6 +20,7 @@ export interface GridFocusApi {
|
|
|
20
20
|
* @param {GridRowId} id The base row id.
|
|
21
21
|
* @param {string} field The base column field.
|
|
22
22
|
* @param {'below' | 'right' | 'left'} direction Which direction is the next cell to focus.
|
|
23
|
+
* @ignore - do not document.
|
|
23
24
|
*/
|
|
24
25
|
unstable_moveFocusToRelativeCell: (id: GridRowId, field: string, direction: 'below' | 'right' | 'left') => void;
|
|
25
26
|
}
|
|
@@ -19,10 +19,14 @@ export interface GridLocaleText {
|
|
|
19
19
|
toolbarFiltersTooltipHide: React.ReactNode;
|
|
20
20
|
toolbarFiltersTooltipShow: React.ReactNode;
|
|
21
21
|
toolbarFiltersTooltipActive: (count: number) => React.ReactNode;
|
|
22
|
+
toolbarQuickFilterPlaceholder: string;
|
|
23
|
+
toolbarQuickFilterLabel: string;
|
|
24
|
+
toolbarQuickFilterDeleteIconLabel: string;
|
|
22
25
|
toolbarExport: React.ReactNode;
|
|
23
26
|
toolbarExportLabel: string;
|
|
24
27
|
toolbarExportCSV: React.ReactNode;
|
|
25
28
|
toolbarExportPrint: React.ReactNode;
|
|
29
|
+
toolbarExportExcel: string;
|
|
26
30
|
columnsPanelTextFieldLabel: string;
|
|
27
31
|
columnsPanelTextFieldPlaceholder: string;
|
|
28
32
|
columnsPanelDragIconLabel: string;
|
|
@@ -86,6 +90,7 @@ export interface GridLocaleText {
|
|
|
86
90
|
expandDetailPanel: string;
|
|
87
91
|
collapseDetailPanel: string;
|
|
88
92
|
MuiTablePagination: Omit<ComponentsPropsList['MuiTablePagination'], 'page' | 'count' | 'onChangePage' | 'rowsPerPage' | 'onPageChange'>;
|
|
93
|
+
rowReorderingHeaderName: string;
|
|
89
94
|
}
|
|
90
95
|
export declare type GridTranslationKeys = keyof GridLocaleText;
|
|
91
96
|
/**
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { GridRowModel, GridRowId, GridRowModelUpdate, GridRowTreeNodeConfig, GridValidRowModel } from '../gridRows';
|
|
2
|
+
export interface GridRowGroupChildrenGetterParams {
|
|
3
|
+
/**
|
|
4
|
+
* The row id of the group
|
|
5
|
+
*/
|
|
6
|
+
groupId: GridRowId;
|
|
7
|
+
/**
|
|
8
|
+
* If `true`, the method will not return the generated rows generated by the grid (aggregation footers, groups, ...)
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
skipAutoGeneratedRows?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, the method will only return the rows that are matching the current filters
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
applyFiltering?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* If `true`, the method will order the returned rows according to the current sorting rules
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
applySorting?: boolean;
|
|
22
|
+
}
|
|
2
23
|
/**
|
|
3
24
|
* The Row API interface that is available in the grid `apiRef`.
|
|
4
25
|
*/
|
|
@@ -23,6 +44,12 @@ export interface GridRowApi {
|
|
|
23
44
|
* @param {GridRowModel[]} rows The new rows.
|
|
24
45
|
*/
|
|
25
46
|
setRows: (rows: GridRowModel[]) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Moves a row from its original position to the position given by `targetIndex`.
|
|
49
|
+
* @param {GridRowId} rowId The row id
|
|
50
|
+
* @param {number} targetIndex The new position (0-based).
|
|
51
|
+
*/
|
|
52
|
+
setRowIndex: (rowId: GridRowId, targetIndex: number) => void;
|
|
26
53
|
/**
|
|
27
54
|
* Allows to updates, insert and delete rows in a single call.
|
|
28
55
|
* @param {GridRowModelUpdate[]} updates An array of rows with an `action` specifying what to do.
|
|
@@ -52,4 +79,11 @@ export interface GridRowApi {
|
|
|
52
79
|
* @returns {number} The index of the row.
|
|
53
80
|
*/
|
|
54
81
|
getRowIndexRelativeToVisibleRows: (id: GridRowId) => number;
|
|
82
|
+
/**
|
|
83
|
+
* Gets the rows of a grouping criteria.
|
|
84
|
+
* Only contains the rows provided to the grid, not the rows automatically generated by it.
|
|
85
|
+
* @param {GridRowGroupChildrenParams} params Object containing parameters for the getter.
|
|
86
|
+
* @returns {GridRowId[]} The id of each row in the grouping criteria.
|
|
87
|
+
*/
|
|
88
|
+
getRowGroupChildren: (params: GridRowGroupChildrenGetterParams) => GridRowId[];
|
|
55
89
|
}
|
package/models/api/index.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export * from './gridCallbackDetails';
|
|
|
21
21
|
export * from './gridScrollApi';
|
|
22
22
|
export * from './gridVirtualScrollerApi';
|
|
23
23
|
export * from './gridApiCommon';
|
|
24
|
-
export type { GridEditingApi, GridOldEditingApi, GridNewEditingApi } from './gridEditingApi';
|
|
24
|
+
export type { GridEditingApi, GridOldEditingApi, GridNewEditingApi, GridCellModesModel, GridRowModesModel, } from './gridEditingApi';
|
|
25
25
|
export declare type GridEditRowApi = GridEditingApi;
|
|
@@ -11,6 +11,7 @@ import { GridValueOptionsParams } from '../params/gridValueOptionsParams';
|
|
|
11
11
|
import { GridActionsCellItemProps } from '../../components/cell/GridActionsCellItem';
|
|
12
12
|
import { GridEditCellProps } from '../gridEditRowModel';
|
|
13
13
|
import type { GridValidRowModel } from '../gridRows';
|
|
14
|
+
import { GridApiCommunity } from '../api/gridApiCommunity';
|
|
14
15
|
/**
|
|
15
16
|
* Alignment used in position elements in Cells.
|
|
16
17
|
*/
|
|
@@ -90,12 +91,15 @@ export interface GridColDef<R extends GridValidRowModel = any, V = any, F = V> {
|
|
|
90
91
|
editable?: boolean;
|
|
91
92
|
/**
|
|
92
93
|
* If `true`, the rows can be grouped based on this column values (pro-plan only).
|
|
94
|
+
* Only available in DataGridPremium.
|
|
95
|
+
* TODO: Use module augmentation to move it to `@mui/x-data-grid-premium` (need to modify how we handle column types default values).
|
|
93
96
|
* @default true
|
|
94
97
|
*/
|
|
95
98
|
groupable?: boolean;
|
|
96
99
|
/**
|
|
97
100
|
* If `false`, the menu items for column pinning menu will not be rendered.
|
|
98
101
|
* Only available in DataGridPro.
|
|
102
|
+
* TODO: Use module augmentation to move it to `@mui/x-data-grid-pro` (need to modify how we handle column types default values).
|
|
99
103
|
* @default true
|
|
100
104
|
*/
|
|
101
105
|
pinnable?: boolean;
|
|
@@ -204,6 +208,15 @@ export interface GridColDef<R extends GridValidRowModel = any, V = any, F = V> {
|
|
|
204
208
|
* Allows setting the filter operators for this column.
|
|
205
209
|
*/
|
|
206
210
|
filterOperators?: GridFilterOperator<R, V, F>[];
|
|
211
|
+
/**
|
|
212
|
+
* The callback that generates a filtering function for a given quick filter value.
|
|
213
|
+
* This function can return `null` to skip filtering for this value and column.
|
|
214
|
+
* @param {any} value The value with which we want to filter the column.
|
|
215
|
+
* @param {GridStateColDef} colDef The column from which we want to filter the rows.
|
|
216
|
+
* @param {React.MutableRefObject<GridApiCommunity>} apiRef Deprecated: The API of the grid.
|
|
217
|
+
* @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row pass this filter value or not.
|
|
218
|
+
*/
|
|
219
|
+
getApplyQuickFilterFn?: (value: any, colDef: GridStateColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => null | ((params: GridCellParams<V, R, F>) => boolean);
|
|
207
220
|
/**
|
|
208
221
|
* If `true`, this column cannot be reordered.
|
|
209
222
|
* @default false
|
|
@@ -214,6 +227,11 @@ export interface GridColDef<R extends GridValidRowModel = any, V = any, F = V> {
|
|
|
214
227
|
* @default false
|
|
215
228
|
*/
|
|
216
229
|
disableExport?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Number of columns a cell should span.
|
|
232
|
+
* @default 1
|
|
233
|
+
*/
|
|
234
|
+
colSpan?: number | ((params: GridCellParams<V, R, F>) => number | undefined);
|
|
217
235
|
}
|
|
218
236
|
export interface GridActionsColDef extends GridColDef {
|
|
219
237
|
/**
|