@mui/x-data-grid 5.10.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 +163 -10
- package/DataGrid/DataGrid.js +35 -1
- package/DataGrid/useDataGridProps.js +2 -1
- package/README.md +1 -1
- 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.js +4 -5
- 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 +1 -2
- package/components/cell/GridActionsCell.js +13 -4
- package/components/cell/GridCell.js +8 -8
- 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 +29 -5
- package/components/cell/GridEditSingleSelectCell.d.ts +12 -4
- package/components/cell/GridEditSingleSelectCell.js +28 -5
- package/components/cell/index.d.ts +2 -0
- package/components/cell/index.js +2 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +15 -16
- package/components/columnHeaders/GridColumnHeaders.d.ts +2 -0
- package/components/columnHeaders/GridColumnHeadersInner.d.ts +2 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- 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/GridToolbarContainer.d.ts +8 -2
- package/components/containers/GridToolbarContainer.js +12 -2
- 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/toolbar/GridToolbar.d.ts +12 -2
- package/components/toolbar/GridToolbar.js +30 -7
- package/components/toolbar/GridToolbarExport.d.ts +5 -4
- package/components/toolbar/GridToolbarExport.js +15 -20
- 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/GridVirtualScrollerContent.d.ts +4 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +4 -1
- package/constants/localeTextConstants.js +5 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +7 -0
- 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.js +5 -6
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/hooks/features/columns/useGridColumns.js +8 -9
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridCellEditing.new.js +133 -32
- package/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- 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 +122 -42
- 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 +20 -8
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.js +29 -33
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- 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 +1 -0
- package/hooks/features/rows/gridRowsSelector.js +1 -0
- package/hooks/features/rows/gridRowsState.d.ts +3 -7
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +25 -1
- package/hooks/features/rows/useGridRows.js +100 -60
- package/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/hooks/features/scroll/useGridScroll.js +6 -1
- package/hooks/features/selection/useGridSelection.d.ts +1 -1
- package/hooks/features/selection/useGridSelection.js +13 -10
- package/hooks/features/sorting/useGridSorting.js +8 -9
- package/hooks/features/virtualization/useGridVirtualScroller.js +6 -7
- 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 +4 -1
- package/internals/index.js +5 -2
- package/legacy/DataGrid/DataGrid.js +35 -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 +4 -5
- 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 +1 -2
- package/legacy/components/cell/GridActionsCell.js +13 -4
- package/legacy/components/cell/GridCell.js +8 -8
- package/legacy/components/cell/GridEditBooleanCell.js +132 -11
- package/legacy/components/cell/GridEditDateCell.js +148 -42
- package/legacy/components/cell/GridEditInputCell.js +61 -12
- package/legacy/components/cell/GridEditSingleSelectCell.js +41 -13
- package/legacy/components/cell/index.js +2 -0
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +15 -16
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/legacy/components/containers/GridFooterContainer.js +11 -2
- package/legacy/components/containers/GridToolbarContainer.js +12 -2
- 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/toolbar/GridToolbar.js +31 -6
- 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/constants/localeTextConstants.js +5 -0
- 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 +5 -6
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/legacy/hooks/features/columns/useGridColumns.js +8 -9
- package/legacy/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +213 -83
- package/legacy/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/legacy/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +126 -42
- 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 +20 -8
- package/legacy/hooks/features/focus/useGridFocus.js +31 -35
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- 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 +3 -0
- package/legacy/hooks/features/rows/gridRowsUtils.js +27 -1
- package/legacy/hooks/features/rows/useGridRows.js +104 -60
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/legacy/hooks/features/scroll/useGridScroll.js +6 -1
- package/legacy/hooks/features/selection/useGridSelection.js +13 -10
- package/legacy/hooks/features/sorting/useGridSorting.js +8 -9
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +6 -7
- 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 +5 -2
- package/legacy/locales/arSD.js +5 -0
- package/legacy/locales/bgBG.js +5 -0
- package/legacy/locales/csCZ.js +5 -0
- package/legacy/locales/daDK.js +5 -0
- package/legacy/locales/deDE.js +10 -5
- package/legacy/locales/elGR.js +5 -0
- package/legacy/locales/esES.js +5 -0
- package/legacy/locales/faIR.js +5 -0
- package/legacy/locales/fiFI.js +5 -0
- package/legacy/locales/frFR.js +5 -0
- package/legacy/locales/heIL.js +5 -0
- package/legacy/locales/huHU.js +5 -0
- package/legacy/locales/itIT.js +5 -0
- package/legacy/locales/jaJP.js +5 -0
- package/legacy/locales/koKR.js +5 -0
- package/legacy/locales/nlNL.js +5 -0
- package/legacy/locales/plPL.js +5 -0
- package/legacy/locales/ptBR.js +5 -0
- package/legacy/locales/ruRU.js +5 -0
- package/legacy/locales/skSK.js +5 -0
- package/legacy/locales/trTR.js +5 -0
- package/legacy/locales/ukUA.js +5 -0
- package/legacy/locales/viVN.js +5 -0
- package/legacy/locales/zhCN.js +5 -0
- package/legacy/models/events/gridEvents.js +2 -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 +5 -0
- package/locales/bgBG.js +5 -0
- package/locales/csCZ.js +5 -0
- package/locales/daDK.js +5 -0
- package/locales/deDE.js +10 -5
- package/locales/elGR.js +5 -0
- package/locales/esES.js +5 -0
- package/locales/faIR.js +5 -0
- package/locales/fiFI.js +5 -0
- package/locales/frFR.js +5 -0
- package/locales/heIL.js +5 -0
- package/locales/huHU.js +5 -0
- package/locales/itIT.js +5 -0
- package/locales/jaJP.js +5 -0
- package/locales/koKR.js +5 -0
- package/locales/nlNL.js +5 -0
- package/locales/plPL.js +5 -0
- package/locales/ptBR.js +5 -0
- package/locales/ruRU.js +5 -0
- package/locales/skSK.js +5 -0
- package/locales/trTR.js +5 -0
- package/locales/ukUA.js +5 -0
- package/locales/viVN.js +5 -0
- package/locales/zhCN.js +5 -0
- package/models/api/gridCoreApi.d.ts +10 -0
- package/models/api/gridEditingApi.d.ts +23 -4
- package/models/api/gridFilterApi.d.ts +5 -0
- package/models/api/gridFocusApi.d.ts +1 -0
- package/models/api/gridLocaleTextApi.d.ts +4 -0
- package/models/api/gridRowApi.d.ts +28 -0
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +13 -0
- package/models/events/gridEventLookup.d.ts +273 -3
- package/models/events/gridEvents.d.ts +2 -277
- package/models/events/gridEvents.js +2 -0
- package/models/gridExport.d.ts +29 -2
- package/models/gridFilterModel.d.ts +11 -0
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/gridStateCommunity.d.ts +0 -2
- package/models/index.d.ts +1 -1
- package/models/index.js +4 -3
- package/models/props/DataGridProps.d.ts +56 -28
- package/modern/DataGrid/DataGrid.js +35 -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 +4 -5
- 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 +1 -2
- package/modern/components/cell/GridActionsCell.js +14 -3
- package/modern/components/cell/GridCell.js +8 -8
- package/modern/components/cell/GridEditBooleanCell.js +101 -6
- package/modern/components/cell/GridEditDateCell.js +99 -5
- package/modern/components/cell/GridEditInputCell.js +29 -5
- package/modern/components/cell/GridEditSingleSelectCell.js +28 -5
- package/modern/components/cell/index.js +2 -0
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +15 -16
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/modern/components/containers/GridFooterContainer.js +11 -2
- package/modern/components/containers/GridToolbarContainer.js +12 -2
- 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/toolbar/GridToolbar.js +30 -7
- 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/constants/localeTextConstants.js +5 -0
- 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 +5 -6
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/modern/hooks/features/columns/useGridColumns.js +8 -9
- package/modern/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +131 -32
- package/modern/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/modern/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +120 -42
- 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 +20 -8
- package/modern/hooks/features/focus/useGridFocus.js +29 -33
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- 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 +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +23 -1
- package/modern/hooks/features/rows/useGridRows.js +100 -60
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/modern/hooks/features/scroll/useGridScroll.js +6 -1
- package/modern/hooks/features/selection/useGridSelection.js +13 -10
- package/modern/hooks/features/sorting/useGridSorting.js +8 -9
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +6 -7
- 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 +5 -2
- package/modern/locales/arSD.js +5 -0
- package/modern/locales/bgBG.js +5 -0
- package/modern/locales/csCZ.js +5 -0
- package/modern/locales/daDK.js +5 -0
- package/modern/locales/deDE.js +10 -5
- package/modern/locales/elGR.js +5 -0
- package/modern/locales/esES.js +5 -0
- package/modern/locales/faIR.js +5 -0
- package/modern/locales/fiFI.js +5 -0
- package/modern/locales/frFR.js +5 -0
- package/modern/locales/heIL.js +5 -0
- package/modern/locales/huHU.js +5 -0
- package/modern/locales/itIT.js +5 -0
- package/modern/locales/jaJP.js +5 -0
- package/modern/locales/koKR.js +5 -0
- package/modern/locales/nlNL.js +5 -0
- package/modern/locales/plPL.js +5 -0
- package/modern/locales/ptBR.js +5 -0
- package/modern/locales/ruRU.js +5 -0
- package/modern/locales/skSK.js +5 -0
- package/modern/locales/trTR.js +5 -0
- package/modern/locales/ukUA.js +5 -0
- package/modern/locales/viVN.js +5 -0
- package/modern/locales/zhCN.js +5 -0
- package/modern/models/events/gridEvents.js +2 -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 +35 -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 +4 -6
- 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 +1 -3
- package/node/components/cell/GridActionsCell.js +13 -4
- package/node/components/cell/GridCell.js +7 -7
- package/node/components/cell/GridEditBooleanCell.js +100 -5
- package/node/components/cell/GridEditDateCell.js +98 -4
- package/node/components/cell/GridEditInputCell.js +29 -5
- package/node/components/cell/GridEditSingleSelectCell.js +28 -6
- package/node/components/cell/index.js +26 -0
- package/node/components/columnHeaders/GridColumnHeaderItem.js +15 -17
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -4
- package/node/components/columnSelection/GridHeaderCheckbox.js +4 -6
- package/node/components/containers/GridFooterContainer.js +10 -1
- package/node/components/containers/GridToolbarContainer.js +11 -1
- 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/toolbar/GridToolbar.js +32 -7
- 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/constants/localeTextConstants.js +5 -0
- 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 +5 -7
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +3 -5
- package/node/hooks/features/columns/useGridColumnSpanning.js +1 -3
- package/node/hooks/features/columns/useGridColumns.js +8 -10
- package/node/hooks/features/dimensions/useGridDimensions.js +8 -10
- package/node/hooks/features/editRows/useGridCellEditing.new.js +133 -32
- package/node/hooks/features/editRows/useGridCellEditing.old.js +20 -22
- package/node/hooks/features/editRows/useGridEditing.old.js +4 -6
- package/node/hooks/features/editRows/useGridRowEditing.new.js +122 -43
- 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 +21 -9
- package/node/hooks/features/focus/useGridFocus.js +29 -34
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -6
- 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 +3 -1
- package/node/hooks/features/rows/gridRowsUtils.js +29 -1
- package/node/hooks/features/rows/useGridRows.js +101 -60
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/node/hooks/features/scroll/useGridScroll.js +6 -1
- package/node/hooks/features/selection/useGridSelection.js +13 -11
- package/node/hooks/features/sorting/useGridSorting.js +8 -10
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +6 -8
- 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 +39 -3
- package/node/locales/arSD.js +5 -0
- package/node/locales/bgBG.js +5 -0
- package/node/locales/csCZ.js +5 -0
- package/node/locales/daDK.js +5 -0
- package/node/locales/deDE.js +10 -5
- package/node/locales/elGR.js +5 -0
- package/node/locales/esES.js +5 -0
- package/node/locales/faIR.js +5 -0
- package/node/locales/fiFI.js +5 -0
- package/node/locales/frFR.js +5 -0
- package/node/locales/heIL.js +5 -0
- package/node/locales/huHU.js +5 -0
- package/node/locales/itIT.js +5 -0
- package/node/locales/jaJP.js +5 -0
- package/node/locales/koKR.js +5 -0
- package/node/locales/nlNL.js +5 -0
- package/node/locales/plPL.js +5 -0
- package/node/locales/ptBR.js +5 -0
- package/node/locales/ruRU.js +5 -0
- package/node/locales/skSK.js +5 -0
- package/node/locales/trTR.js +5 -0
- package/node/locales/ukUA.js +5 -0
- package/node/locales/viVN.js +5 -0
- package/node/locales/zhCN.js +5 -0
- package/node/models/events/gridEvents.js +2 -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 +1 -1
- package/utils/createSelector.d.ts +2 -1
- package/utils/createSelector.js +20 -2
- package/utils/exportAs.d.ts +2 -2
- package/utils/exportAs.js +1 -1
|
@@ -1,360 +1,85 @@
|
|
|
1
1
|
import { GridEventLookup } from './gridEventLookup';
|
|
2
2
|
declare enum GridEvents {
|
|
3
|
-
/**
|
|
4
|
-
* Fired when the grid is resized.
|
|
5
|
-
*/
|
|
6
3
|
resize = "resize",
|
|
7
|
-
/**
|
|
8
|
-
* Fired when the grid is resized with a debounced time of 60ms.
|
|
9
|
-
*/
|
|
10
4
|
debouncedResize = "debouncedResize",
|
|
11
|
-
/**
|
|
12
|
-
* Fired when the inner size of the viewport changes. Called with an [[ElementSize]] object.
|
|
13
|
-
*/
|
|
14
5
|
viewportInnerSizeChange = "viewportInnerSizeChange",
|
|
15
|
-
/**
|
|
16
|
-
* Fired when an exception is thrown in the grid.
|
|
17
|
-
*/
|
|
18
6
|
componentError = "componentError",
|
|
19
|
-
/**
|
|
20
|
-
* Fired when the grid is unmounted.
|
|
21
|
-
*/
|
|
22
7
|
unmount = "unmount",
|
|
23
|
-
/**
|
|
24
|
-
* Fired when the mode of a cell changes.
|
|
25
|
-
* @ignore - do not document
|
|
26
|
-
*/
|
|
27
8
|
cellModeChange = "cellModeChange",
|
|
28
|
-
/**
|
|
29
|
-
* Fired when a cell is clicked.
|
|
30
|
-
*/
|
|
31
9
|
cellClick = "cellClick",
|
|
32
|
-
/**
|
|
33
|
-
* Fired when a cell is double-clicked.
|
|
34
|
-
*/
|
|
35
10
|
cellDoubleClick = "cellDoubleClick",
|
|
36
|
-
/**
|
|
37
|
-
* Fired when a `mousedown` event happens in a cell.
|
|
38
|
-
*/
|
|
39
11
|
cellMouseDown = "cellMouseDown",
|
|
40
|
-
/**
|
|
41
|
-
* Fired when a `mouseup` event happens in a cell.
|
|
42
|
-
*/
|
|
43
12
|
cellMouseUp = "cellMouseUp",
|
|
44
|
-
/**
|
|
45
|
-
* Fired when a `keydown` event happens in a cell.
|
|
46
|
-
*/
|
|
47
13
|
cellKeyDown = "cellKeyDown",
|
|
48
|
-
/**
|
|
49
|
-
* Fired when a cell gains focus.
|
|
50
|
-
*/
|
|
51
14
|
cellFocusIn = "cellFocusIn",
|
|
52
|
-
/**
|
|
53
|
-
* Fired when a cell loses focus.
|
|
54
|
-
*/
|
|
55
15
|
cellFocusOut = "cellFocusOut",
|
|
56
|
-
/**
|
|
57
|
-
* Fired when the dragged cell enters a valid drop target. It's mapped to the `dragend` DOM event.
|
|
58
|
-
* @ignore - do not document.
|
|
59
|
-
*/
|
|
60
16
|
cellDragEnter = "cellDragEnter",
|
|
61
|
-
/**
|
|
62
|
-
* Fired while an element or text selection is dragged over the cell.
|
|
63
|
-
* It's mapped to the `dragover` DOM event.
|
|
64
|
-
* @ignore - do not document.
|
|
65
|
-
*/
|
|
66
17
|
cellDragOver = "cellDragOver",
|
|
67
|
-
/**
|
|
68
|
-
* Fired when the props of the edit cell changes.
|
|
69
|
-
*/
|
|
70
18
|
editCellPropsChange = "editCellPropsChange",
|
|
71
|
-
/**
|
|
72
|
-
* Fired when the props of the edit input are committed.
|
|
73
|
-
*/
|
|
74
19
|
cellEditCommit = "cellEditCommit",
|
|
75
|
-
/**
|
|
76
|
-
* Fired when the cell turns to edit mode.
|
|
77
|
-
*/
|
|
78
20
|
cellEditStart = "cellEditStart",
|
|
79
|
-
/**
|
|
80
|
-
* Fired when the cell turns back to view mode.
|
|
81
|
-
*/
|
|
82
21
|
cellEditStop = "cellEditStop",
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
*/
|
|
22
|
+
cellModesModelChange = "cellModesModelChange",
|
|
23
|
+
rowModesModelChange = "rowModesModelChange",
|
|
86
24
|
rowEditStart = "rowEditStart",
|
|
87
|
-
/**
|
|
88
|
-
* Fired when the row turns back to view mode.
|
|
89
|
-
*/
|
|
90
25
|
rowEditStop = "rowEditStop",
|
|
91
|
-
/**
|
|
92
|
-
* Fired when the props of the edit input are committed.
|
|
93
|
-
*/
|
|
94
26
|
rowEditCommit = "rowEditCommit",
|
|
95
|
-
/**
|
|
96
|
-
* Fired when a [navigation key](/x/react-data-grid/accessibility#keyboard-navigation) is pressed in a cell.
|
|
97
|
-
* @ignore - do not document.
|
|
98
|
-
*/
|
|
99
27
|
cellNavigationKeyDown = "cellNavigationKeyDown",
|
|
100
|
-
/**
|
|
101
|
-
* Fired when a row is clicked.
|
|
102
|
-
* Not fired if the cell clicked is from an interactive column (actions, checkbox, etc).
|
|
103
|
-
*/
|
|
104
28
|
rowClick = "rowClick",
|
|
105
|
-
/**
|
|
106
|
-
* Fired when a row is double-clicked.
|
|
107
|
-
*/
|
|
108
29
|
rowDoubleClick = "rowDoubleClick",
|
|
109
|
-
/**
|
|
110
|
-
* Fired when the mouse enters the row. Called with a [[GridRowParams]] object.
|
|
111
|
-
*/
|
|
112
30
|
rowMouseEnter = "rowMouseEnter",
|
|
113
|
-
/**
|
|
114
|
-
* Fired when the mouse leaves the row. Called with a [[GridRowParams]] object.
|
|
115
|
-
*/
|
|
116
31
|
rowMouseLeave = "rowMouseLeave",
|
|
117
|
-
/**
|
|
118
|
-
* Fired when the row editing model changes.
|
|
119
|
-
*/
|
|
120
32
|
editRowsModelChange = "editRowsModelChange",
|
|
121
|
-
/**
|
|
122
|
-
* Fired when the user starts dragging a row. It's mapped to the `dragstart` DOM event.
|
|
123
|
-
* @ignore - do not document.
|
|
124
|
-
*/
|
|
125
33
|
rowDragStart = "rowDragStart",
|
|
126
|
-
/**
|
|
127
|
-
* Fired while an element or text selection is dragged over the row.
|
|
128
|
-
* It's mapped to the `dragover` DOM event.
|
|
129
|
-
* @ignore - do not document.
|
|
130
|
-
*/
|
|
131
34
|
rowDragOver = "rowDragOver",
|
|
132
|
-
/**
|
|
133
|
-
* Fired when the dragging of a row ends.
|
|
134
|
-
* @ignore - do not document.
|
|
135
|
-
*/
|
|
136
35
|
rowDragEnd = "rowDragEnd",
|
|
137
|
-
/**
|
|
138
|
-
* Fired when a column header loses focus.
|
|
139
|
-
* @ignore - do not document.
|
|
140
|
-
*/
|
|
141
36
|
columnHeaderBlur = "columnHeaderBlur",
|
|
142
|
-
/**
|
|
143
|
-
* Fired when a column header gains focus.
|
|
144
|
-
* @ignore - do not document.
|
|
145
|
-
*/
|
|
146
37
|
columnHeaderFocus = "columnHeaderFocus",
|
|
147
|
-
/**
|
|
148
|
-
* Fired when a [navigation key](/x/react-data-grid/accessibility#keyboard-navigation) is pressed in a column header.
|
|
149
|
-
* @ignore - do not document.
|
|
150
|
-
*/
|
|
151
38
|
columnHeaderNavigationKeyDown = "columnHeaderNavigationKeyDown",
|
|
152
|
-
/**
|
|
153
|
-
* Fired when a key is pressed in a column header. It's mapped do the `keydown` DOM event.
|
|
154
|
-
*/
|
|
155
39
|
columnHeaderKeyDown = "columnHeaderKeyDown",
|
|
156
|
-
/**
|
|
157
|
-
* Fired when a column header is clicked
|
|
158
|
-
*/
|
|
159
40
|
columnHeaderClick = "columnHeaderClick",
|
|
160
|
-
/**
|
|
161
|
-
* Fired when a column header is double-clicked.
|
|
162
|
-
*/
|
|
163
41
|
columnHeaderDoubleClick = "columnHeaderDoubleClick",
|
|
164
|
-
/**
|
|
165
|
-
* Fired when a `mouseover` event happens in a column header.
|
|
166
|
-
* @ignore - do not document.
|
|
167
|
-
*/
|
|
168
42
|
columnHeaderOver = "columnHeaderOver",
|
|
169
|
-
/**
|
|
170
|
-
* Fired when a `mouseout` event happens in a column header.
|
|
171
|
-
* @ignore - do not document.
|
|
172
|
-
*/
|
|
173
43
|
columnHeaderOut = "columnHeaderOut",
|
|
174
|
-
/**
|
|
175
|
-
* Fired when a `mouseenter` event happens in a column header.
|
|
176
|
-
* @ignore - do not document.
|
|
177
|
-
*/
|
|
178
44
|
columnHeaderEnter = "columnHeaderEnter",
|
|
179
|
-
/**
|
|
180
|
-
* Fired when a `mouseleave` event happens in a column header.
|
|
181
|
-
* @ignore - do not document.*
|
|
182
|
-
*/
|
|
183
45
|
columnHeaderLeave = "columnHeaderLeave",
|
|
184
|
-
/**
|
|
185
|
-
* Fired when the user starts dragging a column header. It's mapped to the `dragstart` DOM event.
|
|
186
|
-
* @ignore - do not document.
|
|
187
|
-
*/
|
|
188
46
|
columnHeaderDragStart = "columnHeaderDragStart",
|
|
189
|
-
/**
|
|
190
|
-
* Fired while an element or text selection is dragged over the column header.
|
|
191
|
-
* It's mapped to the `dragover` DOM event.
|
|
192
|
-
* @ignore - do not document.
|
|
193
|
-
*/
|
|
194
47
|
columnHeaderDragOver = "columnHeaderDragOver",
|
|
195
|
-
/**
|
|
196
|
-
* Fired when the dragged column header enters a valid drop target.
|
|
197
|
-
* It's mapped to the `dragend` DOM event.
|
|
198
|
-
* @ignore - do not document.
|
|
199
|
-
*/
|
|
200
48
|
columnHeaderDragEnter = "columnHeaderDragEnter",
|
|
201
|
-
/**
|
|
202
|
-
* Fired when the dragging of a column header ends.
|
|
203
|
-
* @ignore - do not document.
|
|
204
|
-
*/
|
|
205
49
|
columnHeaderDragEnd = "columnHeaderDragEnd",
|
|
206
|
-
/**
|
|
207
|
-
* Fired when the selection state of one or multiple rows changes.
|
|
208
|
-
*/
|
|
209
50
|
selectionChange = "selectionChange",
|
|
210
|
-
/**
|
|
211
|
-
* Fired when the value of the selection checkbox of the header is changed
|
|
212
|
-
*/
|
|
213
51
|
headerSelectionCheckboxChange = "headerSelectionCheckboxChange",
|
|
214
|
-
/**
|
|
215
|
-
* Fired when the value of the selection checkbox of a row is changed
|
|
216
|
-
*/
|
|
217
52
|
rowSelectionCheckboxChange = "rowSelectionCheckboxChange",
|
|
218
|
-
/**
|
|
219
|
-
* Fired when the page changes.
|
|
220
|
-
*/
|
|
221
53
|
pageChange = "pageChange",
|
|
222
|
-
/**
|
|
223
|
-
* Fired when the page size changes.
|
|
224
|
-
*/
|
|
225
54
|
pageSizeChange = "pageSizeChange",
|
|
226
|
-
/**
|
|
227
|
-
* Fired when the row grouping model changes.
|
|
228
|
-
*/
|
|
229
55
|
rowGroupingModelChange = "rowGroupingModelChange",
|
|
230
|
-
/**
|
|
231
|
-
* Fired during the scroll of the grid viewport.
|
|
232
|
-
*/
|
|
233
56
|
rowsScroll = "rowsScroll",
|
|
234
|
-
/**
|
|
235
|
-
* Fired when scrolling to the bottom of the grid viewport.
|
|
236
|
-
*/
|
|
237
57
|
rowsScrollEnd = "rowsScrollEnd",
|
|
238
|
-
/**
|
|
239
|
-
* Fired when a `mousedown` DOM event happens in the column header separator.
|
|
240
|
-
* @ignore - do not document.
|
|
241
|
-
*/
|
|
242
58
|
columnSeparatorMouseDown = "columnSeparatorMouseDown",
|
|
243
|
-
/**
|
|
244
|
-
* Fired during the resizing of a column.
|
|
245
|
-
*/
|
|
246
59
|
columnResize = "columnResize",
|
|
247
|
-
/**
|
|
248
|
-
* Fired when the width of a column is changed.
|
|
249
|
-
*/
|
|
250
60
|
columnWidthChange = "columnWidthChange",
|
|
251
|
-
/**
|
|
252
|
-
* Fired when the user starts resizing a column.
|
|
253
|
-
*/
|
|
254
61
|
columnResizeStart = "columnResizeStart",
|
|
255
|
-
/**
|
|
256
|
-
* Fired when the user stops resizing a column.
|
|
257
|
-
*/
|
|
258
62
|
columnResizeStop = "columnResizeStop",
|
|
259
|
-
/**
|
|
260
|
-
* Fired when the user ends reordering a column.
|
|
261
|
-
*/
|
|
262
63
|
columnOrderChange = "columnOrderChange",
|
|
263
|
-
/**
|
|
264
|
-
* Fired when the user ends reordering a row.
|
|
265
|
-
*/
|
|
266
64
|
rowOrderChange = "rowOrderChange",
|
|
267
|
-
/**
|
|
268
|
-
* Fired when the rows are updated.
|
|
269
|
-
* @ignore - do not document.
|
|
270
|
-
*/
|
|
271
65
|
rowsSet = "rowsSet",
|
|
272
|
-
/**
|
|
273
|
-
* Fired when the expansion of a row is changed. Called with a [[GridRowTreeNodeConfig]] object.
|
|
274
|
-
* @ignore - do not document.
|
|
275
|
-
*/
|
|
276
66
|
rowExpansionChange = "rowExpansionChange",
|
|
277
|
-
/**
|
|
278
|
-
* Fired when the sorted rows are updated
|
|
279
|
-
* @ignore - do not document
|
|
280
|
-
*/
|
|
281
67
|
sortedRowsSet = "sortedRowsSet",
|
|
282
|
-
/**
|
|
283
|
-
* Fired when the filtered rows are updated
|
|
284
|
-
* @ignore - do not document.
|
|
285
|
-
*/
|
|
286
68
|
filteredRowsSet = "filteredRowsSet",
|
|
287
|
-
/**
|
|
288
|
-
* Fired when the columns state is changed.
|
|
289
|
-
*/
|
|
290
69
|
columnsChange = "columnsChange",
|
|
291
|
-
/**
|
|
292
|
-
* Fired when the open detail panels are changed.
|
|
293
|
-
* @ignore - do not document.
|
|
294
|
-
*/
|
|
295
70
|
detailPanelsExpandedRowIdsChange = "detailPanelsExpandedRowIdsChange",
|
|
296
|
-
/**
|
|
297
|
-
* Fired when the pinned columns is changed.
|
|
298
|
-
* @ignore - do not document.
|
|
299
|
-
*/
|
|
300
71
|
pinnedColumnsChange = "pinnedColumnsChange",
|
|
301
|
-
/**
|
|
302
|
-
* Fired when a processor of the active strategy changes.
|
|
303
|
-
* @ignore - do not document.
|
|
304
|
-
*/
|
|
305
72
|
activeStrategyProcessorChange = "activeStrategyProcessorChange",
|
|
306
|
-
/**
|
|
307
|
-
* Fired when the callback to decide if a strategy is available or not changes.
|
|
308
|
-
* @ignore - do not document.
|
|
309
|
-
*/
|
|
310
73
|
strategyAvailabilityChange = "strategyAvailabilityChange",
|
|
311
|
-
/**
|
|
312
|
-
* Fired when the sort model changes.
|
|
313
|
-
*/
|
|
314
74
|
sortModelChange = "sortModelChange",
|
|
315
|
-
/**
|
|
316
|
-
* Fired when the filter model changes.
|
|
317
|
-
*/
|
|
318
75
|
filterModelChange = "filterModelChange",
|
|
319
|
-
/**
|
|
320
|
-
* Fired when the column visibility model changes.
|
|
321
|
-
*/
|
|
322
76
|
columnVisibilityModelChange = "columnVisibilityModelChange",
|
|
323
|
-
/**
|
|
324
|
-
* Fired when the state of the grid is updated.
|
|
325
|
-
*/
|
|
326
77
|
stateChange = "stateChange",
|
|
327
|
-
/**
|
|
328
|
-
* Fired when a column visibility changes.
|
|
329
|
-
* It is not fired when the `columnVisibilityModel` is controlled or initialized.
|
|
330
|
-
* It is not fired when toggling all column's visibility at once.
|
|
331
|
-
* @deprecated Use `GridEvents.columnVisibilityModelChange` instead.
|
|
332
|
-
*/
|
|
333
78
|
columnVisibilityChange = "columnVisibilityChange",
|
|
334
|
-
/**
|
|
335
|
-
* Fired when the content size used by the `GridVirtualScroller` changes.
|
|
336
|
-
* @ignore - do not document.
|
|
337
|
-
*/
|
|
338
79
|
virtualScrollerContentSizeChange = "virtualScrollerContentSizeChange",
|
|
339
|
-
/**
|
|
340
|
-
* Fired when the content is scrolled by the mouse wheel.
|
|
341
|
-
* It's attached to the "mousewheel" event.
|
|
342
|
-
* @ignore - do not document.
|
|
343
|
-
*/
|
|
344
80
|
virtualScrollerWheel = "virtualScrollerWheel",
|
|
345
|
-
/**
|
|
346
|
-
* Fired when the content is moved using a touch device.
|
|
347
|
-
* It's attached to the "touchmove" event.
|
|
348
|
-
* @ignore - do not document.
|
|
349
|
-
*/
|
|
350
81
|
virtualScrollerTouchMove = "virtualScrollerTouchMove",
|
|
351
|
-
/**
|
|
352
|
-
* Fired when the preferences panel is closed.
|
|
353
|
-
*/
|
|
354
82
|
preferencePanelClose = "preferencePanelClose",
|
|
355
|
-
/**
|
|
356
|
-
* Fired when the preferences panel is opened.
|
|
357
|
-
*/
|
|
358
83
|
preferencePanelOpen = "preferencePanelOpen"
|
|
359
84
|
}
|
|
360
85
|
export declare type GridEventsStr = keyof GridEventLookup;
|
|
@@ -20,6 +20,8 @@ var GridEvents;
|
|
|
20
20
|
GridEvents["cellEditCommit"] = "cellEditCommit";
|
|
21
21
|
GridEvents["cellEditStart"] = "cellEditStart";
|
|
22
22
|
GridEvents["cellEditStop"] = "cellEditStop";
|
|
23
|
+
GridEvents["cellModesModelChange"] = "cellModesModelChange";
|
|
24
|
+
GridEvents["rowModesModelChange"] = "rowModesModelChange";
|
|
23
25
|
GridEvents["rowEditStart"] = "rowEditStart";
|
|
24
26
|
GridEvents["rowEditStop"] = "rowEditStop";
|
|
25
27
|
GridEvents["rowEditCommit"] = "rowEditCommit";
|
package/models/gridExport.d.ts
CHANGED
|
@@ -17,16 +17,39 @@ export interface GridExportOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
allColumns?: boolean;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The options applicable to any document export format (CSV and Excel).
|
|
22
|
+
*/
|
|
23
|
+
export interface GridFileExportOptions<Api extends GridApiCommon = GridApiCommunity> extends GridExportOptions {
|
|
24
|
+
/**
|
|
25
|
+
* The string used as the file name.
|
|
26
|
+
* @default `document.title`
|
|
27
|
+
*/
|
|
28
|
+
fileName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* If `true`, the first row of the file will include the headers of the grid.
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
includeHeaders?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Function that returns the id of the rows to export on the order they should be exported.
|
|
36
|
+
* @param {GridGetRowsToExportParams} params With all properties from [[GridGetRowsToExportParams]].
|
|
37
|
+
* @returns {GridRowId[]} The id of the rows to export.
|
|
38
|
+
*/
|
|
39
|
+
getRowsToExport?: (params: GridGetRowsToExportParams<Api>) => GridRowId[];
|
|
40
|
+
}
|
|
41
|
+
export interface GridGetRowsToExportParams<Api extends GridApiCommon = GridApiCommunity> {
|
|
21
42
|
/**
|
|
22
43
|
* The API of the grid.
|
|
23
44
|
*/
|
|
24
45
|
apiRef: React.MutableRefObject<Api>;
|
|
25
46
|
}
|
|
47
|
+
export interface GridCsvGetRowsToExportParams<Api extends GridApiCommon = GridApiCommunity> extends GridGetRowsToExportParams<Api> {
|
|
48
|
+
}
|
|
26
49
|
/**
|
|
27
50
|
* The options to apply on the CSV export.
|
|
28
51
|
*/
|
|
29
|
-
export interface GridCsvExportOptions extends
|
|
52
|
+
export interface GridCsvExportOptions extends GridFileExportOptions {
|
|
30
53
|
/**
|
|
31
54
|
* The character used to separate fields.
|
|
32
55
|
* @default ','
|
|
@@ -93,3 +116,7 @@ export interface GridPrintExportOptions extends GridExportOptions {
|
|
|
93
116
|
* Available export formats.
|
|
94
117
|
*/
|
|
95
118
|
export declare type GridExportFormat = 'csv' | 'print';
|
|
119
|
+
/**
|
|
120
|
+
* Available export extensions.
|
|
121
|
+
*/
|
|
122
|
+
export declare type GridExportExtension = 'csv';
|
|
@@ -13,4 +13,15 @@ export interface GridFilterModel {
|
|
|
13
13
|
* @default `GridLinkOperator.Or`
|
|
14
14
|
*/
|
|
15
15
|
linkOperator?: GridLinkOperator;
|
|
16
|
+
/**
|
|
17
|
+
* values used to quick filter rows
|
|
18
|
+
* @default `[]`
|
|
19
|
+
*/
|
|
20
|
+
quickFilterValues?: any[];
|
|
21
|
+
/**
|
|
22
|
+
* - `GridLinkOperator.And`: the row must pass all the values.
|
|
23
|
+
* - `GridLinkOperator.Or`: the row must pass at least one value.
|
|
24
|
+
* @default `GridLinkOperator.And`
|
|
25
|
+
*/
|
|
26
|
+
quickFilterLogicOperator?: GridLinkOperator;
|
|
16
27
|
}
|
|
@@ -24,7 +24,7 @@ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any,
|
|
|
24
24
|
* This function can return `null` to skip filtering for this item and column.
|
|
25
25
|
* @param {GridFilterItem} filterItem The filter item with which we want to filter the column.
|
|
26
26
|
* @param {GridStateColDef} column The column from which we want to filter the rows.
|
|
27
|
-
* @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row
|
|
27
|
+
* @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row pass this filter item or not.
|
|
28
28
|
*/
|
|
29
29
|
getApplyFilterFn: (filterItem: GridFilterItem, column: GridStateColDef<R, V, F>) => null | ((params: GridCellParams<V, R, F>) => boolean);
|
|
30
30
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { GridColumnMenuState, GridColumnsInitialState, GridColumnsState, GridDensityState, GridFilterInitialState, GridFilterState, GridFocusState, GridPaginationInitialState, GridPaginationState, GridPreferencePanelInitialState, GridPreferencePanelState, GridRowsState, GridSortingInitialState, GridSortingState, GridTabIndexState } from '../hooks';
|
|
2
2
|
import type { GridRowsMetaState } from '../hooks/features/rows/gridRowsMetaState';
|
|
3
|
-
import type { GridRowsInternalCache } from '../hooks/features/rows/gridRowsState';
|
|
4
3
|
import type { GridEditRowsModel } from './gridEditRowModel';
|
|
5
4
|
import type { GridSelectionModel } from './gridSelectionModel';
|
|
6
5
|
/**
|
|
@@ -8,7 +7,6 @@ import type { GridSelectionModel } from './gridSelectionModel';
|
|
|
8
7
|
*/
|
|
9
8
|
export interface GridStateCommunity {
|
|
10
9
|
rows: GridRowsState;
|
|
11
|
-
rowsCache: GridRowsInternalCache;
|
|
12
10
|
rowsMeta: GridRowsMetaState;
|
|
13
11
|
editRows: GridEditRowsModel;
|
|
14
12
|
pagination: GridPaginationState;
|
package/models/index.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ export * from './gridIconSlotsComponent';
|
|
|
18
18
|
export * from './gridSlotsComponent';
|
|
19
19
|
export * from './gridSlotsComponentsProps';
|
|
20
20
|
export * from './gridDensity';
|
|
21
|
-
export * from './gridExport';
|
|
22
21
|
export * from './logger';
|
|
23
22
|
export * from './muiEvent';
|
|
24
23
|
export * from './events';
|
|
25
24
|
export * from './gridSortModel';
|
|
25
|
+
export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions, } from './gridExport';
|
|
26
26
|
export * from './gridFilterOperator';
|
package/models/index.js
CHANGED
|
@@ -18,9 +18,10 @@ export * from './gridIconSlotsComponent';
|
|
|
18
18
|
export * from './gridSlotsComponent';
|
|
19
19
|
export * from './gridSlotsComponentsProps';
|
|
20
20
|
export * from './gridDensity';
|
|
21
|
-
export * from './gridExport';
|
|
22
21
|
export * from './logger';
|
|
23
22
|
export * from './muiEvent';
|
|
24
23
|
export * from './events';
|
|
25
|
-
export * from './gridSortModel';
|
|
26
|
-
|
|
24
|
+
export * from './gridSortModel'; // Do not export GridExportFormat and GridExportExtension which are override in pro package
|
|
25
|
+
|
|
26
|
+
export * from './gridFilterOperator';
|
|
27
|
+
export {};
|