@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
|
@@ -24,6 +24,7 @@ import { useGridEvents } from '../hooks/features/events/useGridEvents';
|
|
|
24
24
|
import { useGridDimensions } from '../hooks/features/dimensions/useGridDimensions';
|
|
25
25
|
import { rowsMetaStateInitializer, useGridRowsMeta } from '../hooks/features/rows/useGridRowsMeta';
|
|
26
26
|
import { useGridStatePersistence } from '../hooks/features/statePersistence/useGridStatePersistence';
|
|
27
|
+
import { useGridColumnSpanning } from '../hooks/features/columns/useGridColumnSpanning';
|
|
27
28
|
export var useDataGridComponent = function useDataGridComponent(props) {
|
|
28
29
|
var _props$experimentalFe, _props$experimentalFe2;
|
|
29
30
|
|
|
@@ -55,12 +56,13 @@ export var useDataGridComponent = function useDataGridComponent(props) {
|
|
|
55
56
|
useGridColumns(apiRef, props);
|
|
56
57
|
useGridRows(apiRef, props);
|
|
57
58
|
useGridParamsApi(apiRef);
|
|
59
|
+
useGridColumnSpanning(apiRef);
|
|
58
60
|
var useGridEditing = (_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.newEditingApi ? useGridEditing_new : useGridEditing_old;
|
|
59
61
|
useGridEditing(apiRef, props);
|
|
60
62
|
useGridFocus(apiRef, props);
|
|
61
|
-
useGridSorting(apiRef, props);
|
|
62
63
|
useGridPreferencesPanel(apiRef);
|
|
63
64
|
useGridFilter(apiRef, props);
|
|
65
|
+
useGridSorting(apiRef, props);
|
|
64
66
|
useGridDensity(apiRef, props);
|
|
65
67
|
useGridPagination(apiRef, props);
|
|
66
68
|
useGridRowsMeta(apiRef, props);
|
|
@@ -62,7 +62,8 @@ export var DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
62
62
|
sortingMode: GridFeatureModeConstant.client,
|
|
63
63
|
throttleRowsMs: 0,
|
|
64
64
|
disableColumnReorder: false,
|
|
65
|
-
disableColumnResize: false
|
|
65
|
+
disableColumnResize: false,
|
|
66
|
+
keepNonExistentRowsSelected: false
|
|
66
67
|
};
|
|
67
68
|
export var useDataGridProps = function useDataGridProps(inProps) {
|
|
68
69
|
if (inProps.pageSize > MAX_PAGE_SIZE) {
|
|
@@ -19,5 +19,6 @@ export var GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
19
19
|
renderEditCell: renderEditBooleanCell,
|
|
20
20
|
sortComparator: gridNumberComparator,
|
|
21
21
|
valueFormatter: gridBooleanFormatter,
|
|
22
|
-
filterOperators: getGridBooleanOperators()
|
|
22
|
+
filterOperators: getGridBooleanOperators(),
|
|
23
|
+
getApplyQuickFilterFn: undefined
|
|
23
24
|
});
|
|
@@ -15,6 +15,7 @@ export var GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF,
|
|
|
15
15
|
disableColumnMenu: true,
|
|
16
16
|
disableReorder: true,
|
|
17
17
|
disableExport: true,
|
|
18
|
+
getApplyQuickFilterFn: undefined,
|
|
18
19
|
valueGetter: function valueGetter(params) {
|
|
19
20
|
var selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
|
|
20
21
|
return selectionLookup[params.id] !== undefined;
|
|
@@ -26,12 +26,14 @@ export var GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
26
26
|
sortComparator: gridDateComparator,
|
|
27
27
|
valueFormatter: gridDateFormatter,
|
|
28
28
|
filterOperators: getGridDateOperators(),
|
|
29
|
-
renderEditCell: renderEditDateCell
|
|
29
|
+
renderEditCell: renderEditDateCell,
|
|
30
|
+
getApplyQuickFilterFn: undefined
|
|
30
31
|
});
|
|
31
32
|
export var GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
32
33
|
type: 'dateTime',
|
|
33
34
|
sortComparator: gridDateComparator,
|
|
34
35
|
valueFormatter: gridDateTimeFormatter,
|
|
35
36
|
filterOperators: getGridDateOperators(true),
|
|
36
|
-
renderEditCell: renderEditDateCell
|
|
37
|
+
renderEditCell: renderEditDateCell,
|
|
38
|
+
getApplyQuickFilterFn: undefined
|
|
37
39
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { gridNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
3
|
import { isNumber } from '../utils/utils';
|
|
4
|
-
import { getGridNumericOperators } from './gridNumericOperators';
|
|
4
|
+
import { getGridNumericOperators, getGridNumericQuickFilterFn } from './gridNumericOperators';
|
|
5
5
|
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
6
6
|
export var GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
7
7
|
type: 'number',
|
|
@@ -15,5 +15,6 @@ export var GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
15
15
|
var value = _ref.value;
|
|
16
16
|
return value && isNumber(value) && value.toLocaleString() || value;
|
|
17
17
|
},
|
|
18
|
-
filterOperators: getGridNumericOperators()
|
|
18
|
+
filterOperators: getGridNumericOperators(),
|
|
19
|
+
getApplyQuickFilterFn: getGridNumericQuickFilterFn
|
|
19
20
|
});
|
|
@@ -10,6 +10,16 @@ var parseNumericValue = function parseNumericValue(value) {
|
|
|
10
10
|
return Number(value);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
export var getGridNumericQuickFilterFn = function getGridNumericQuickFilterFn(value) {
|
|
14
|
+
if (value == null || Number.isNaN(value) || value === '') {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return function (_ref) {
|
|
19
|
+
var columnValue = _ref.value;
|
|
20
|
+
return parseNumericValue(columnValue) === parseNumericValue(value);
|
|
21
|
+
};
|
|
22
|
+
};
|
|
13
23
|
export var getGridNumericOperators = function getGridNumericOperators() {
|
|
14
24
|
return [{
|
|
15
25
|
label: '=',
|
|
@@ -19,8 +29,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
19
29
|
return null;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
|
-
return function (
|
|
23
|
-
var value =
|
|
32
|
+
return function (_ref2) {
|
|
33
|
+
var value = _ref2.value;
|
|
24
34
|
return parseNumericValue(value) === filterItem.value;
|
|
25
35
|
};
|
|
26
36
|
},
|
|
@@ -36,8 +46,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
36
46
|
return null;
|
|
37
47
|
}
|
|
38
48
|
|
|
39
|
-
return function (
|
|
40
|
-
var value =
|
|
49
|
+
return function (_ref3) {
|
|
50
|
+
var value = _ref3.value;
|
|
41
51
|
return parseNumericValue(value) !== filterItem.value;
|
|
42
52
|
};
|
|
43
53
|
},
|
|
@@ -53,8 +63,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
53
63
|
return null;
|
|
54
64
|
}
|
|
55
65
|
|
|
56
|
-
return function (
|
|
57
|
-
var value =
|
|
66
|
+
return function (_ref4) {
|
|
67
|
+
var value = _ref4.value;
|
|
58
68
|
|
|
59
69
|
if (value == null) {
|
|
60
70
|
return false;
|
|
@@ -75,8 +85,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
75
85
|
return null;
|
|
76
86
|
}
|
|
77
87
|
|
|
78
|
-
return function (
|
|
79
|
-
var value =
|
|
88
|
+
return function (_ref5) {
|
|
89
|
+
var value = _ref5.value;
|
|
80
90
|
|
|
81
91
|
if (value == null) {
|
|
82
92
|
return false;
|
|
@@ -97,8 +107,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
97
107
|
return null;
|
|
98
108
|
}
|
|
99
109
|
|
|
100
|
-
return function (
|
|
101
|
-
var value =
|
|
110
|
+
return function (_ref6) {
|
|
111
|
+
var value = _ref6.value;
|
|
102
112
|
|
|
103
113
|
if (value == null) {
|
|
104
114
|
return false;
|
|
@@ -119,8 +129,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
119
129
|
return null;
|
|
120
130
|
}
|
|
121
131
|
|
|
122
|
-
return function (
|
|
123
|
-
var value =
|
|
132
|
+
return function (_ref7) {
|
|
133
|
+
var value = _ref7.value;
|
|
124
134
|
|
|
125
135
|
if (value == null) {
|
|
126
136
|
return false;
|
|
@@ -136,16 +146,16 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
136
146
|
}, {
|
|
137
147
|
value: 'isEmpty',
|
|
138
148
|
getApplyFilterFn: function getApplyFilterFn() {
|
|
139
|
-
return function (
|
|
140
|
-
var value =
|
|
149
|
+
return function (_ref8) {
|
|
150
|
+
var value = _ref8.value;
|
|
141
151
|
return value == null;
|
|
142
152
|
};
|
|
143
153
|
}
|
|
144
154
|
}, {
|
|
145
155
|
value: 'isNotEmpty',
|
|
146
156
|
getApplyFilterFn: function getApplyFilterFn() {
|
|
147
|
-
return function (
|
|
148
|
-
var value =
|
|
157
|
+
return function (_ref9) {
|
|
158
|
+
var value = _ref9.value;
|
|
149
159
|
return value != null;
|
|
150
160
|
};
|
|
151
161
|
}
|
|
@@ -156,8 +166,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
|
|
|
156
166
|
return null;
|
|
157
167
|
}
|
|
158
168
|
|
|
159
|
-
return function (
|
|
160
|
-
var value =
|
|
169
|
+
return function (_ref10) {
|
|
170
|
+
var value = _ref10.value;
|
|
161
171
|
return value != null && filterItem.value.includes(Number(value));
|
|
162
172
|
};
|
|
163
173
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
3
3
|
import { renderEditSingleSelectCell } from '../components/cell/GridEditSingleSelectCell';
|
|
4
|
-
import { getGridSingleSelectOperators } from './gridSingleSelectOperators';
|
|
4
|
+
import { getGridSingleSelectOperators, getGridSingleSelectQuickFilterFn } from './gridSingleSelectOperators';
|
|
5
5
|
export var GRID_SINGLE_SELECT_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
6
6
|
type: 'singleSelect',
|
|
7
7
|
renderEditCell: renderEditSingleSelectCell,
|
|
8
|
-
filterOperators: getGridSingleSelectOperators()
|
|
8
|
+
filterOperators: getGridSingleSelectOperators(),
|
|
9
|
+
getApplyQuickFilterFn: getGridSingleSelectQuickFilterFn
|
|
9
10
|
});
|
|
@@ -10,6 +10,55 @@ var parseObjectValue = function parseObjectValue(value) {
|
|
|
10
10
|
return value.value;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
export var getGridSingleSelectQuickFilterFn = function getGridSingleSelectQuickFilterFn(value, column, apiRef) {
|
|
14
|
+
if (!value) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var valueOptions = column.valueOptions,
|
|
19
|
+
valueFormatter = column.valueFormatter,
|
|
20
|
+
field = column.field;
|
|
21
|
+
var potentialValues = [parseObjectValue(value).toString()];
|
|
22
|
+
var iterableColumnValues = typeof valueOptions === 'function' ? valueOptions({
|
|
23
|
+
field: field
|
|
24
|
+
}) : valueOptions || [];
|
|
25
|
+
|
|
26
|
+
if (iterableColumnValues) {
|
|
27
|
+
iterableColumnValues.forEach(function (option) {
|
|
28
|
+
// for each valueOption, check if the formatted value
|
|
29
|
+
var optionValue;
|
|
30
|
+
var optionLabel;
|
|
31
|
+
|
|
32
|
+
if (_typeof(option) === 'object') {
|
|
33
|
+
optionValue = option.value;
|
|
34
|
+
optionLabel = option.label;
|
|
35
|
+
} else {
|
|
36
|
+
optionValue = option;
|
|
37
|
+
|
|
38
|
+
if (valueFormatter) {
|
|
39
|
+
optionLabel = valueFormatter({
|
|
40
|
+
value: option,
|
|
41
|
+
field: field,
|
|
42
|
+
api: apiRef.current
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
optionLabel = option;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (optionLabel.slice(0, value.length).toLowerCase() === value.toLowerCase()) {
|
|
50
|
+
if (!potentialValues.includes(optionValue)) {
|
|
51
|
+
potentialValues.push(optionValue.toString());
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return function (_ref) {
|
|
58
|
+
var columnValue = _ref.value;
|
|
59
|
+
return columnValue != null ? potentialValues.includes(parseObjectValue(columnValue).toString()) : false;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
13
62
|
export var getGridSingleSelectOperators = function getGridSingleSelectOperators() {
|
|
14
63
|
return [{
|
|
15
64
|
value: 'is',
|
|
@@ -18,8 +67,8 @@ export var getGridSingleSelectOperators = function getGridSingleSelectOperators(
|
|
|
18
67
|
return null;
|
|
19
68
|
}
|
|
20
69
|
|
|
21
|
-
return function (
|
|
22
|
-
var value =
|
|
70
|
+
return function (_ref2) {
|
|
71
|
+
var value = _ref2.value;
|
|
23
72
|
return parseObjectValue(value) === parseObjectValue(filterItem.value);
|
|
24
73
|
};
|
|
25
74
|
},
|
|
@@ -31,8 +80,8 @@ export var getGridSingleSelectOperators = function getGridSingleSelectOperators(
|
|
|
31
80
|
return null;
|
|
32
81
|
}
|
|
33
82
|
|
|
34
|
-
return function (
|
|
35
|
-
var value =
|
|
83
|
+
return function (_ref3) {
|
|
84
|
+
var value = _ref3.value;
|
|
36
85
|
return parseObjectValue(value) !== parseObjectValue(filterItem.value);
|
|
37
86
|
};
|
|
38
87
|
},
|
|
@@ -45,8 +94,8 @@ export var getGridSingleSelectOperators = function getGridSingleSelectOperators(
|
|
|
45
94
|
}
|
|
46
95
|
|
|
47
96
|
var filterItemValues = filterItem.value.map(parseObjectValue);
|
|
48
|
-
return function (
|
|
49
|
-
var value =
|
|
97
|
+
return function (_ref4) {
|
|
98
|
+
var value = _ref4.value;
|
|
50
99
|
return filterItemValues.includes(parseObjectValue(value));
|
|
51
100
|
};
|
|
52
101
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { renderEditInputCell } from '../components/cell/GridEditInputCell';
|
|
2
2
|
import { gridStringOrNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
|
-
import { getGridStringOperators } from './gridStringOperators';
|
|
3
|
+
import { getGridStringOperators, getGridStringQuickFilterFn } from './gridStringOperators';
|
|
4
4
|
export var GRID_STRING_COL_DEF = {
|
|
5
5
|
width: 100,
|
|
6
6
|
minWidth: 50,
|
|
@@ -17,5 +17,6 @@ export var GRID_STRING_COL_DEF = {
|
|
|
17
17
|
type: 'string',
|
|
18
18
|
align: 'left',
|
|
19
19
|
filterOperators: getGridStringOperators(),
|
|
20
|
-
renderEditCell: renderEditInputCell
|
|
20
|
+
renderEditCell: renderEditInputCell,
|
|
21
|
+
getApplyQuickFilterFn: getGridStringQuickFilterFn
|
|
21
22
|
};
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { GridFilterInputValue } from '../components/panel/filterPanel/GridFilterInputValue';
|
|
2
2
|
import { escapeRegExp } from '../utils/utils';
|
|
3
3
|
import { GridFilterInputMultipleValue } from '../components/panel/filterPanel/GridFilterInputMultipleValue';
|
|
4
|
+
export var getGridStringQuickFilterFn = function getGridStringQuickFilterFn(value) {
|
|
5
|
+
if (!value) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
var filterRegex = new RegExp(escapeRegExp(value), 'i');
|
|
10
|
+
return function (_ref) {
|
|
11
|
+
var columnValue = _ref.value;
|
|
12
|
+
return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
4
15
|
export var getGridStringOperators = function getGridStringOperators() {
|
|
5
16
|
return [{
|
|
6
17
|
value: 'contains',
|
|
@@ -10,8 +21,8 @@ export var getGridStringOperators = function getGridStringOperators() {
|
|
|
10
21
|
}
|
|
11
22
|
|
|
12
23
|
var filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
|
|
13
|
-
return function (
|
|
14
|
-
var value =
|
|
24
|
+
return function (_ref2) {
|
|
25
|
+
var value = _ref2.value;
|
|
15
26
|
return value != null ? filterRegex.test(value.toString()) : false;
|
|
16
27
|
};
|
|
17
28
|
},
|
|
@@ -27,8 +38,8 @@ export var getGridStringOperators = function getGridStringOperators() {
|
|
|
27
38
|
sensitivity: 'base',
|
|
28
39
|
usage: 'search'
|
|
29
40
|
});
|
|
30
|
-
return function (
|
|
31
|
-
var value =
|
|
41
|
+
return function (_ref3) {
|
|
42
|
+
var value = _ref3.value;
|
|
32
43
|
return value != null ? collator.compare(filterItem.value, value.toString()) === 0 : false;
|
|
33
44
|
};
|
|
34
45
|
},
|
|
@@ -41,8 +52,8 @@ export var getGridStringOperators = function getGridStringOperators() {
|
|
|
41
52
|
}
|
|
42
53
|
|
|
43
54
|
var filterRegex = new RegExp("^".concat(escapeRegExp(filterItem.value), ".*$"), 'i');
|
|
44
|
-
return function (
|
|
45
|
-
var value =
|
|
55
|
+
return function (_ref4) {
|
|
56
|
+
var value = _ref4.value;
|
|
46
57
|
return value != null ? filterRegex.test(value.toString()) : false;
|
|
47
58
|
};
|
|
48
59
|
},
|
|
@@ -55,8 +66,8 @@ export var getGridStringOperators = function getGridStringOperators() {
|
|
|
55
66
|
}
|
|
56
67
|
|
|
57
68
|
var filterRegex = new RegExp(".*".concat(escapeRegExp(filterItem.value), "$"), 'i');
|
|
58
|
-
return function (
|
|
59
|
-
var value =
|
|
69
|
+
return function (_ref5) {
|
|
70
|
+
var value = _ref5.value;
|
|
60
71
|
return value != null ? filterRegex.test(value.toString()) : false;
|
|
61
72
|
};
|
|
62
73
|
},
|
|
@@ -64,16 +75,16 @@ export var getGridStringOperators = function getGridStringOperators() {
|
|
|
64
75
|
}, {
|
|
65
76
|
value: 'isEmpty',
|
|
66
77
|
getApplyFilterFn: function getApplyFilterFn() {
|
|
67
|
-
return function (
|
|
68
|
-
var value =
|
|
78
|
+
return function (_ref6) {
|
|
79
|
+
var value = _ref6.value;
|
|
69
80
|
return value === '' || value == null;
|
|
70
81
|
};
|
|
71
82
|
}
|
|
72
83
|
}, {
|
|
73
84
|
value: 'isNotEmpty',
|
|
74
85
|
getApplyFilterFn: function getApplyFilterFn() {
|
|
75
|
-
return function (
|
|
76
|
-
var value =
|
|
86
|
+
return function (_ref7) {
|
|
87
|
+
var value = _ref7.value;
|
|
77
88
|
return value !== '' && value != null;
|
|
78
89
|
};
|
|
79
90
|
}
|
|
@@ -88,8 +99,8 @@ export var getGridStringOperators = function getGridStringOperators() {
|
|
|
88
99
|
sensitivity: 'base',
|
|
89
100
|
usage: 'search'
|
|
90
101
|
});
|
|
91
|
-
return function (
|
|
92
|
-
var value =
|
|
102
|
+
return function (_ref8) {
|
|
103
|
+
var value = _ref8.value;
|
|
93
104
|
return value != null ? filterItem.value.some(function (filterValue) {
|
|
94
105
|
return collator.compare(filterValue, value.toString() || '') === 0;
|
|
95
106
|
}) : false;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
3
4
|
import { useGridSelector } from '../hooks/utils/useGridSelector';
|
|
4
5
|
import { gridTopLevelRowCountSelector } from '../hooks/features/rows/gridRowsSelector';
|
|
5
6
|
import { selectedGridRowsCountSelector } from '../hooks/features/selection/gridSelectionSelector';
|
|
@@ -11,7 +12,7 @@ import { GridFooterContainer } from './containers/GridFooterContainer';
|
|
|
11
12
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
|
|
15
|
+
var GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {
|
|
15
16
|
var _rootProps$components;
|
|
16
17
|
|
|
17
18
|
var apiRef = useGridApiContext();
|
|
@@ -34,4 +35,12 @@ export var GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props,
|
|
|
34
35
|
}, props, {
|
|
35
36
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
36
37
|
}));
|
|
37
|
-
});
|
|
38
|
+
});
|
|
39
|
+
process.env.NODE_ENV !== "production" ? GridFooter.propTypes = {
|
|
40
|
+
// ----------------------------- Warning --------------------------------
|
|
41
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
42
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
43
|
+
// ----------------------------------------------------------------------
|
|
44
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
45
|
+
} : void 0;
|
|
46
|
+
export { GridFooter };
|
|
@@ -9,7 +9,6 @@ import * as React from 'react';
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import clsx from 'clsx';
|
|
11
11
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
12
|
-
import { GridEvents } from '../models/events';
|
|
13
12
|
import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel';
|
|
14
13
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
15
14
|
import { getDataGridUtilityClass, gridClasses } from '../constants/gridClasses';
|
|
@@ -20,6 +19,7 @@ import { useGridVisibleRows } from '../hooks/utils/useGridVisibleRows';
|
|
|
20
19
|
import { findParentElementFromClassName } from '../utils/domUtils';
|
|
21
20
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../colDef/gridCheckboxSelectionColDef';
|
|
22
21
|
import { GRID_ACTIONS_COLUMN_TYPE } from '../colDef/gridActionsColDef';
|
|
22
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '../constants/gridDetailPanelToggleField';
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
|
|
@@ -134,7 +134,12 @@ function GridRow(props) {
|
|
|
134
134
|
} // User opened a detail panel
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
if (field ===
|
|
137
|
+
if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
|
138
|
+
return;
|
|
139
|
+
} // User reorders a row
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
if (field === '__reorder__') {
|
|
138
143
|
return;
|
|
139
144
|
} // User is editing a cell
|
|
140
145
|
|
|
@@ -151,7 +156,7 @@ function GridRow(props) {
|
|
|
151
156
|
}
|
|
152
157
|
}
|
|
153
158
|
|
|
154
|
-
publish(
|
|
159
|
+
publish('rowClick', onClick)(event);
|
|
155
160
|
}, [apiRef, onClick, publish, rowId]);
|
|
156
161
|
|
|
157
162
|
var style = _extends({}, styleProp, {
|
|
@@ -179,7 +184,8 @@ function GridRow(props) {
|
|
|
179
184
|
|
|
180
185
|
var rowParams = _extends({}, apiRef.current.getRowParams(rowId), {
|
|
181
186
|
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
182
|
-
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1
|
|
187
|
+
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
188
|
+
indexRelativeToCurrentPage: indexRelativeToCurrentPage
|
|
183
189
|
});
|
|
184
190
|
|
|
185
191
|
rowClassName = rootProps.getRowClassName(rowParams);
|
|
@@ -188,8 +194,6 @@ function GridRow(props) {
|
|
|
188
194
|
var cells = [];
|
|
189
195
|
|
|
190
196
|
for (var i = 0; i < renderedColumns.length; i += 1) {
|
|
191
|
-
var _rootProps$components;
|
|
192
|
-
|
|
193
197
|
var column = renderedColumns[i];
|
|
194
198
|
var indexRelativeToAllColumns = firstColumnToRender + i;
|
|
195
199
|
var isLastColumn = indexRelativeToAllColumns === visibleColumns.length - 1;
|
|
@@ -218,7 +222,16 @@ function GridRow(props) {
|
|
|
218
222
|
if (editCellState != null && column.renderEditCell) {
|
|
219
223
|
var _rootProps$classes2;
|
|
220
224
|
|
|
221
|
-
var
|
|
225
|
+
var updatedRow = row;
|
|
226
|
+
|
|
227
|
+
if (apiRef.current.unstable_getRowWithUpdatedValues) {
|
|
228
|
+
// Only the new editing API has this method
|
|
229
|
+
updatedRow = apiRef.current.unstable_getRowWithUpdatedValues(rowId, column.field);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
var params = _extends({}, cellParams, {
|
|
233
|
+
row: updatedRow
|
|
234
|
+
}, editCellState, {
|
|
222
235
|
api: apiRef.current
|
|
223
236
|
});
|
|
224
237
|
|
|
@@ -234,24 +247,34 @@ function GridRow(props) {
|
|
|
234
247
|
|
|
235
248
|
var hasFocus = cellFocus !== null && cellFocus.id === rowId && cellFocus.field === column.field;
|
|
236
249
|
var tabIndex = cellTabIndex !== null && cellTabIndex.id === rowId && cellTabIndex.field === column.field && cellParams.cellMode === 'view' ? 0 : -1;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
var cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
251
|
+
|
|
252
|
+
if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {
|
|
253
|
+
var _rootProps$components;
|
|
254
|
+
|
|
255
|
+
var _cellColSpanInfo$cell = cellColSpanInfo.cellProps,
|
|
256
|
+
colSpan = _cellColSpanInfo$cell.colSpan,
|
|
257
|
+
width = _cellColSpanInfo$cell.width;
|
|
258
|
+
cells.push( /*#__PURE__*/_jsx(rootProps.components.Cell, _extends({
|
|
259
|
+
value: cellParams.value,
|
|
260
|
+
field: column.field,
|
|
261
|
+
width: width,
|
|
262
|
+
rowId: rowId,
|
|
263
|
+
height: rowHeight,
|
|
264
|
+
showRightBorder: showRightBorder,
|
|
265
|
+
formattedValue: cellParams.formattedValue,
|
|
266
|
+
align: column.align || 'left',
|
|
267
|
+
cellMode: cellParams.cellMode,
|
|
268
|
+
colIndex: indexRelativeToAllColumns,
|
|
269
|
+
isEditable: cellParams.isEditable,
|
|
270
|
+
hasFocus: hasFocus,
|
|
271
|
+
tabIndex: tabIndex,
|
|
272
|
+
className: clsx(classNames),
|
|
273
|
+
colSpan: colSpan
|
|
274
|
+
}, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.cell, {
|
|
275
|
+
children: content
|
|
276
|
+
}), column.field));
|
|
277
|
+
}
|
|
255
278
|
}
|
|
256
279
|
|
|
257
280
|
var emptyCellWidth = containerWidth - columnsTotalWidth;
|
|
@@ -264,9 +287,9 @@ function GridRow(props) {
|
|
|
264
287
|
"aria-selected": selected,
|
|
265
288
|
style: style,
|
|
266
289
|
onClick: publishClick,
|
|
267
|
-
onDoubleClick: publish(
|
|
268
|
-
onMouseEnter: publish(
|
|
269
|
-
onMouseLeave: publish(
|
|
290
|
+
onDoubleClick: publish('rowDoubleClick', onDoubleClick),
|
|
291
|
+
onMouseEnter: publish('rowMouseEnter', onMouseEnter),
|
|
292
|
+
onMouseLeave: publish('rowMouseLeave', onMouseLeave)
|
|
270
293
|
}, other, {
|
|
271
294
|
children: [cells, emptyCellWidth > 0 && /*#__PURE__*/_jsx(EmptyCell, {
|
|
272
295
|
width: emptyCellWidth,
|
|
@@ -285,6 +308,11 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
285
308
|
containerWidth: PropTypes.number.isRequired,
|
|
286
309
|
editRowsState: PropTypes.object.isRequired,
|
|
287
310
|
firstColumnToRender: PropTypes.number.isRequired,
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Index of the row in the whole sorted and filtered dataset.
|
|
314
|
+
* If some rows above have expanded children, this index also take those children into account.
|
|
315
|
+
*/
|
|
288
316
|
index: PropTypes.number.isRequired,
|
|
289
317
|
isLastVisible: PropTypes.bool,
|
|
290
318
|
lastColumnToRender: PropTypes.number.isRequired,
|
|
@@ -64,6 +64,7 @@ process.env.NODE_ENV !== "production" ? GridRowCount.propTypes = {
|
|
|
64
64
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
rowCount: PropTypes.number.isRequired,
|
|
67
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
67
68
|
visibleRowCount: PropTypes.number.isRequired
|
|
68
69
|
} : void 0;
|
|
69
70
|
export { GridRowCount };
|
|
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
-
import { GridEvents } from '../models/events';
|
|
10
9
|
import { useGridApiEventHandler } from '../hooks/utils/useGridApiEventHandler';
|
|
11
10
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
12
11
|
import { getDataGridUtilityClass, gridClasses } from '../constants/gridClasses';
|
|
@@ -105,9 +104,9 @@ function GridScrollAreaRaw(props) {
|
|
|
105
104
|
return !prevDragging;
|
|
106
105
|
});
|
|
107
106
|
}, []);
|
|
108
|
-
useGridApiEventHandler(apiRef,
|
|
109
|
-
useGridApiEventHandler(apiRef,
|
|
110
|
-
useGridApiEventHandler(apiRef,
|
|
107
|
+
useGridApiEventHandler(apiRef, 'rowsScroll', handleScrolling);
|
|
108
|
+
useGridApiEventHandler(apiRef, 'columnHeaderDragStart', toggleDragging);
|
|
109
|
+
useGridApiEventHandler(apiRef, 'columnHeaderDragEnd', toggleDragging);
|
|
111
110
|
return dragging ? /*#__PURE__*/_jsx(GridScrollAreaRawRoot, {
|
|
112
111
|
ref: rootRef,
|
|
113
112
|
className: clsx(classes.root),
|
|
@@ -65,6 +65,7 @@ process.env.NODE_ENV !== "production" ? GridSelectedRowCount.propTypes = {
|
|
|
65
65
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
66
66
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
67
67
|
// ----------------------------------------------------------------------
|
|
68
|
-
selectedRowCount: PropTypes.number.isRequired
|
|
68
|
+
selectedRowCount: PropTypes.number.isRequired,
|
|
69
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
69
70
|
} : void 0;
|
|
70
71
|
export { GridSelectedRowCount };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { GridEvents } from '../../models/events';
|
|
5
4
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
6
5
|
import { GridMainContainer } from '../containers/GridMainContainer';
|
|
7
6
|
import { GridAutoSizer } from '../GridAutoSizer';
|
|
@@ -50,7 +49,7 @@ function GridBody(props) {
|
|
|
50
49
|
apiRef.current.renderingZoneRef = renderingZoneRef; // TODO remove, nobody should have access to internal parts of the virtualization
|
|
51
50
|
|
|
52
51
|
var handleResize = React.useCallback(function (size) {
|
|
53
|
-
apiRef.current.publishEvent(
|
|
52
|
+
apiRef.current.publishEvent('resize', size);
|
|
54
53
|
}, [apiRef]);
|
|
55
54
|
return /*#__PURE__*/_jsxs(GridMainContainer, {
|
|
56
55
|
children: [/*#__PURE__*/_jsx(GridOverlays, {}), /*#__PURE__*/_jsx(ColumnHeadersComponent, {
|