@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.11
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 +2007 -230
- package/DataGrid/DataGrid.js +20 -38
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +3 -3
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +1 -1
- package/colDef/gridDateOperators.d.ts +2 -1
- package/colDef/gridNumericOperators.d.ts +4 -1
- package/components/GridApiContext.js +2 -0
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridConfigurationContext.js +2 -0
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridHeaders.js +2 -2
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +10 -8
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +7 -4
- package/components/GridRow.d.ts +6 -11
- package/components/GridRow.js +60 -88
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridScrollArea.d.ts +5 -2
- package/components/GridScrollArea.js +33 -24
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +23 -21
- package/components/base/GridOverlays.d.ts +4 -3
- package/components/base/GridOverlays.js +2 -24
- package/components/base/index.d.ts +0 -1
- package/components/base/index.js +1 -2
- package/components/cell/GridActionsCell.js +8 -1
- package/components/cell/GridActionsCellItem.d.ts +17 -10
- package/components/cell/GridActionsCellItem.js +9 -8
- package/components/cell/GridCell.d.ts +19 -23
- package/components/cell/GridCell.js +49 -92
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +73 -4
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/cell/GridSkeletonCell.js +1 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
- package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/components/columnsManagement/GridColumnsManagement.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +2 -2
- package/components/containers/GridRoot.js +29 -17
- package/components/containers/GridRootStyles.js +163 -53
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +3 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/components/panel/GridColumnsPanel.js +1 -2
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +5 -3
- package/components/panel/GridPanelContent.js +7 -3
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +4 -3
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +5 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +4 -11
- package/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/components/panel/filterPanel/index.d.ts +2 -2
- package/components/panel/filterPanel/index.js +1 -2
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +11 -5
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/components/toolbar/GridToolbarExport.d.ts +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/components/toolbar/GridToolbarFilterButton.d.ts +3 -1
- package/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/components/toolbar/GridToolbarQuickFilter.d.ts +6 -2
- package/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/components/virtualization/GridMainContainer.d.ts +13 -1
- package/components/virtualization/GridMainContainer.js +14 -5
- package/components/virtualization/GridVirtualScrollbar.d.ts +5 -1
- package/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/components/virtualization/GridVirtualScroller.js +43 -21
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/constants/dataGridPropsDefaultValues.js +2 -4
- package/constants/gridClasses.d.ts +12 -12
- package/constants/gridClasses.js +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.js +2 -1
- package/constants/localeTextConstants.js +1 -1
- package/constants/signature.d.ts +9 -0
- package/constants/signature.js +10 -0
- package/context/GridContextProvider.d.ts +2 -1
- package/context/GridRootPropsContext.js +2 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +5 -8
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/hooks/core/useGridApiInitialization.d.ts +2 -2
- package/hooks/core/useGridApiInitialization.js +3 -3
- package/hooks/core/useGridInitialization.d.ts +2 -2
- package/hooks/core/useGridIsRtl.d.ts +2 -2
- package/hooks/core/useGridLocaleText.d.ts +2 -2
- package/hooks/core/useGridLoggerFactory.d.ts +2 -2
- package/hooks/core/useGridRefs.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.js +6 -5
- package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
- package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
- package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
- package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
- package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/hooks/features/columns/gridColumnsSelector.d.ts +11 -16
- package/hooks/features/columns/gridColumnsSelector.js +0 -12
- package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.js +9 -4
- package/hooks/features/density/densitySelector.d.ts +1 -1
- package/hooks/features/density/useGridDensity.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +16 -0
- package/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/hooks/features/dimensions/index.d.ts +1 -1
- package/hooks/features/dimensions/index.js +1 -2
- package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +104 -98
- package/hooks/features/editing/gridEditingSelectors.d.ts +10 -0
- package/hooks/features/editing/gridEditingSelectors.js +12 -1
- package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
- package/hooks/features/editing/useGridCellEditing.js +4 -4
- package/hooks/features/editing/useGridEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.js +10 -11
- package/hooks/features/events/useGridEvents.d.ts +2 -2
- package/hooks/features/export/serializers/csvSerializer.d.ts +2 -1
- package/hooks/features/export/useGridCsvExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.js +1 -1
- package/hooks/features/export/utils.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
- package/hooks/features/filter/gridFilterSelector.js +8 -2
- package/hooks/features/filter/gridFilterState.d.ts +8 -3
- package/hooks/features/filter/gridFilterState.js +5 -0
- package/hooks/features/filter/gridFilterUtils.d.ts +7 -7
- package/hooks/features/filter/gridFilterUtils.js +3 -3
- package/hooks/features/filter/useGridFilter.d.ts +2 -2
- package/hooks/features/filter/useGridFilter.js +10 -15
- package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
- package/hooks/features/focus/useGridFocus.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.js +3 -2
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -4
- package/hooks/features/keyboardNavigation/utils.js +0 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
- package/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/hooks/features/listView/index.d.ts +1 -0
- package/hooks/features/listView/index.js +1 -0
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/listView/useGridListView.js +2 -1
- package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
- package/hooks/features/overlays/useGridOverlays.js +23 -3
- package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
- package/hooks/features/pagination/gridPaginationSelector.d.ts +34 -9
- package/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/hooks/features/pagination/gridPaginationUtils.js +1 -1
- package/hooks/features/pagination/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +6 -4
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/hooks/features/pagination/useGridRowCount.d.ts +2 -2
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +1 -0
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/hooks/features/preferencesPanel/index.d.ts +1 -1
- package/hooks/features/preferencesPanel/index.js +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +2 -2
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +11 -18
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +4 -3
- package/hooks/features/rowSelection/utils.js +4 -4
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
- package/hooks/features/rows/gridRowsMetaState.d.ts +8 -0
- package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
- package/hooks/features/rows/gridRowsSelector.js +1 -2
- package/hooks/features/rows/gridRowsUtils.d.ts +3 -7
- package/hooks/features/rows/gridRowsUtils.js +0 -25
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
- package/hooks/features/rows/useGridParamsApi.js +33 -14
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +27 -29
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
- package/hooks/features/scroll/useGridScroll.d.ts +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
- package/hooks/features/sorting/gridSortingSelector.js +21 -9
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
- package/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/hooks/features/sorting/index.d.ts +2 -1
- package/hooks/features/sorting/index.js +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +2 -2
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +21 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +9 -19
- package/hooks/utils/useGridApiEventHandler.js +68 -75
- package/hooks/utils/useGridApiMethod.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +2 -2
- package/hooks/utils/useGridApiRef.js +1 -1
- package/hooks/utils/useGridInitializeState.d.ts +3 -3
- package/hooks/utils/useGridLogger.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +2 -1
- package/hooks/utils/useGridPrivateApiContext.d.ts +2 -1
- package/hooks/utils/useGridSelector.d.ts +5 -7
- package/hooks/utils/useGridSelector.js +29 -49
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/hooks/utils/useIsSSR.d.ts +1 -0
- package/hooks/utils/useIsSSR.js +5 -0
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +9 -5
- package/internals/index.js +7 -4
- package/internals/utils/attachPinnedStyle.d.ts +2 -0
- package/internals/utils/attachPinnedStyle.js +9 -0
- package/internals/utils/getPinnedCellOffset.d.ts +3 -3
- package/internals/utils/getPinnedCellOffset.js +6 -7
- package/internals/utils/index.d.ts +1 -1
- package/internals/utils/index.js +2 -2
- package/internals/utils/propValidation.js +1 -1
- package/locales/arSD.js +2 -1
- package/locales/beBY.js +1 -1
- package/locales/bgBG.js +2 -1
- package/locales/csCZ.js +2 -1
- package/locales/daDK.js +2 -1
- package/locales/deDE.js +12 -13
- package/locales/elGR.js +2 -1
- package/locales/esES.js +12 -13
- package/locales/faIR.js +7 -7
- package/locales/fiFI.js +2 -1
- package/locales/frFR.js +2 -1
- package/locales/heIL.js +16 -17
- package/locales/hrHR.js +2 -1
- package/locales/huHU.js +2 -1
- package/locales/isIS.js +2 -1
- package/locales/itIT.js +2 -1
- package/locales/jaJP.js +2 -1
- package/locales/koKR.js +46 -49
- package/locales/nbNO.js +2 -1
- package/locales/nlNL.js +7 -7
- package/locales/nnNO.js +2 -1
- package/locales/plPL.js +2 -1
- package/locales/ptBR.js +12 -13
- package/locales/ptPT.js +12 -13
- package/locales/roRO.js +20 -21
- package/locales/ruRU.js +2 -1
- package/locales/skSK.js +2 -1
- package/locales/svSE.js +2 -1
- package/locales/trTR.js +14 -15
- package/locales/ukUA.js +2 -1
- package/locales/urPK.js +11 -11
- package/locales/viVN.js +2 -1
- package/locales/zhCN.js +12 -13
- package/locales/zhHK.js +2 -1
- package/locales/zhTW.js +2 -1
- package/material/index.js +58 -7
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCoreApi.d.ts +7 -7
- package/models/api/gridDensityApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -1
- package/models/api/gridParamsApi.d.ts +29 -2
- package/models/api/gridStateApi.d.ts +2 -1
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/colDef/gridColDef.d.ts +34 -33
- package/models/controlStateItem.d.ts +2 -2
- package/models/events/gridEventLookup.d.ts +13 -1
- package/models/gridBaseSlots.d.ts +95 -0
- package/models/gridDataSource.d.ts +1 -1
- package/models/gridExport.d.ts +2 -2
- package/models/gridFilterInputComponent.d.ts +32 -0
- package/models/gridFilterOperator.d.ts +6 -4
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponent.d.ts +16 -1
- package/models/gridSlotsComponentsProps.d.ts +45 -9
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/index.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +12 -24
- package/modern/DataGrid/DataGrid.js +20 -38
- package/modern/DataGrid/useDataGridComponent.js +3 -3
- package/modern/DataGrid/useDataGridProps.js +3 -3
- package/modern/components/GridApiContext.js +2 -0
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridConfigurationContext.js +2 -0
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridHeaders.js +2 -2
- package/modern/components/GridLoadingOverlay.js +10 -8
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +7 -4
- package/modern/components/GridRow.js +60 -88
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridScrollArea.js +33 -24
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +23 -21
- package/modern/components/base/GridOverlays.js +2 -24
- package/modern/components/base/index.js +1 -2
- package/modern/components/cell/GridActionsCell.js +8 -1
- package/modern/components/cell/GridActionsCellItem.js +9 -8
- package/modern/components/cell/GridCell.js +49 -92
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +73 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
- package/modern/components/cell/GridSkeletonCell.js +1 -2
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/modern/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +29 -17
- package/modern/components/containers/GridRootStyles.js +163 -53
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/modern/components/panel/GridColumnsPanel.js +1 -2
- package/modern/components/panel/GridPanel.js +5 -3
- package/modern/components/panel/GridPanelContent.js +7 -3
- package/modern/components/panel/GridPanelFooter.js +4 -3
- package/modern/components/panel/GridPanelWrapper.js +5 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/modern/components/panel/filterPanel/index.js +1 -2
- package/modern/components/toolbar/GridToolbar.js +11 -5
- package/modern/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/modern/components/toolbar/GridToolbarExport.js +2 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/modern/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/modern/components/virtualization/GridMainContainer.js +14 -5
- package/modern/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/modern/components/virtualization/GridVirtualScroller.js +43 -21
- package/modern/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/modern/constants/dataGridPropsDefaultValues.js +2 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/index.js +2 -1
- package/modern/constants/localeTextConstants.js +1 -1
- package/modern/constants/signature.js +10 -0
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/core/useGridApiInitialization.js +3 -3
- package/modern/hooks/core/useGridStateInitialization.js +6 -5
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/modern/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/modern/hooks/features/columns/gridColumnsSelector.js +0 -12
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/columns/useGridColumns.js +9 -4
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/modern/hooks/features/dimensions/index.js +1 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +104 -98
- package/modern/hooks/features/editing/gridEditingSelectors.js +12 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +10 -11
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +8 -2
- package/modern/hooks/features/filter/gridFilterState.js +5 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +10 -15
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.js +1 -0
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/modern/hooks/features/keyboardNavigation/utils.js +0 -5
- package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/modern/hooks/features/listView/index.js +1 -0
- package/modern/hooks/features/listView/useGridListView.js +2 -1
- package/modern/hooks/features/overlays/useGridOverlays.js +23 -3
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/gridPaginationUtils.js +1 -1
- package/modern/hooks/features/pagination/useGridPagination.js +6 -4
- package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/modern/hooks/features/preferencesPanel/index.js +1 -1
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +11 -18
- package/modern/hooks/features/rowSelection/utils.js +4 -4
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -25
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridParamsApi.js +33 -14
- package/modern/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/modern/hooks/features/rows/useGridRows.js +27 -29
- package/modern/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/modern/hooks/features/sorting/gridSortingSelector.js +21 -9
- package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/modern/hooks/features/sorting/index.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridApiEventHandler.js +68 -75
- package/modern/hooks/utils/useGridApiRef.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +29 -49
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/hooks/utils/useIsSSR.js +5 -0
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +7 -4
- package/modern/internals/utils/attachPinnedStyle.js +9 -0
- package/modern/internals/utils/getPinnedCellOffset.js +6 -7
- package/modern/internals/utils/index.js +2 -2
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/arSD.js +2 -1
- package/modern/locales/beBY.js +1 -1
- package/modern/locales/bgBG.js +2 -1
- package/modern/locales/csCZ.js +2 -1
- package/modern/locales/daDK.js +2 -1
- package/modern/locales/deDE.js +12 -13
- package/modern/locales/elGR.js +2 -1
- package/modern/locales/esES.js +12 -13
- package/modern/locales/faIR.js +7 -7
- package/modern/locales/fiFI.js +2 -1
- package/modern/locales/frFR.js +2 -1
- package/modern/locales/heIL.js +16 -17
- package/modern/locales/hrHR.js +2 -1
- package/modern/locales/huHU.js +2 -1
- package/modern/locales/isIS.js +2 -1
- package/modern/locales/itIT.js +2 -1
- package/modern/locales/jaJP.js +2 -1
- package/modern/locales/koKR.js +46 -49
- package/modern/locales/nbNO.js +2 -1
- package/modern/locales/nlNL.js +7 -7
- package/modern/locales/nnNO.js +2 -1
- package/modern/locales/plPL.js +2 -1
- package/modern/locales/ptBR.js +12 -13
- package/modern/locales/ptPT.js +12 -13
- package/modern/locales/roRO.js +20 -21
- package/modern/locales/ruRU.js +2 -1
- package/modern/locales/skSK.js +2 -1
- package/modern/locales/svSE.js +2 -1
- package/modern/locales/trTR.js +14 -15
- package/modern/locales/ukUA.js +2 -1
- package/modern/locales/urPK.js +11 -11
- package/modern/locales/viVN.js +2 -1
- package/modern/locales/zhCN.js +12 -13
- package/modern/locales/zhHK.js +2 -1
- package/modern/locales/zhTW.js +2 -1
- package/modern/material/index.js +58 -7
- package/modern/models/api/index.js +0 -1
- package/modern/models/gridBaseSlots.js +1 -0
- package/modern/models/gridFilterInputComponent.js +1 -0
- package/modern/utils/assert.js +3 -0
- package/modern/utils/cellBorderUtils.js +5 -5
- package/modern/utils/createSelector.js +1 -120
- package/modern/utils/domUtils.js +7 -2
- package/modern/utils/isJSDOM.js +1 -0
- package/modern/utils/roundToDecimalPlaces.js +3 -0
- package/modern/utils/rtlFlipSide.js +22 -0
- package/modern/utils/utils.js +6 -1
- package/node/DataGrid/DataGrid.js +18 -36
- package/node/DataGrid/useDataGridComponent.js +3 -3
- package/node/DataGrid/useDataGridProps.js +2 -2
- package/node/components/GridApiContext.js +1 -0
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridConfigurationContext.js +1 -0
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridHeaders.js +2 -2
- package/node/components/GridLoadingOverlay.js +10 -8
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +7 -4
- package/node/components/GridRow.js +56 -85
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridScrollArea.js +32 -24
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +23 -21
- package/node/components/base/GridOverlays.js +2 -24
- package/node/components/base/index.js +0 -11
- package/node/components/cell/GridActionsCell.js +8 -1
- package/node/components/cell/GridActionsCellItem.js +7 -8
- package/node/components/cell/GridCell.js +48 -91
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +73 -4
- package/node/components/cell/GridEditSingleSelectCell.js +2 -2
- package/node/components/cell/GridSkeletonCell.js +1 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
- package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
- package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/node/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +27 -15
- package/node/components/containers/GridRootStyles.js +163 -53
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/node/components/panel/GridColumnsPanel.js +1 -2
- package/node/components/panel/GridPanel.js +5 -3
- package/node/components/panel/GridPanelContent.js +7 -3
- package/node/components/panel/GridPanelFooter.js +5 -4
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +42 -33
- package/node/components/panel/filterPanel/GridFilterInputDate.js +49 -30
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/node/components/panel/filterPanel/GridFilterInputValue.js +62 -37
- package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/node/components/panel/filterPanel/index.js +7 -23
- package/node/components/toolbar/GridToolbar.js +11 -5
- package/node/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/node/components/toolbar/GridToolbarExport.js +2 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/node/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/node/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/node/components/virtualization/GridMainContainer.js +14 -5
- package/node/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/node/components/virtualization/GridVirtualScroller.js +43 -21
- package/node/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/node/constants/dataGridPropsDefaultValues.js +2 -4
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/index.js +11 -0
- package/node/constants/localeTextConstants.js +1 -1
- package/node/constants/signature.js +16 -0
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/core/useGridApiInitialization.js +4 -4
- package/node/hooks/core/useGridStateInitialization.js +6 -5
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +37 -76
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/node/hooks/features/columns/gridColumnsSelector.js +1 -13
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/columns/useGridColumns.js +9 -4
- package/node/hooks/features/dimensions/gridDimensionsSelectors.js +38 -2
- package/node/hooks/features/dimensions/index.js +13 -11
- package/node/hooks/features/dimensions/useGridDimensions.js +102 -96
- package/node/hooks/features/editing/gridEditingSelectors.js +12 -2
- package/node/hooks/features/editing/useGridCellEditing.js +3 -3
- package/node/hooks/features/editing/useGridRowEditing.js +8 -9
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +8 -2
- package/node/hooks/features/filter/gridFilterState.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +9 -14
- package/node/hooks/features/focus/useGridFocus.js +3 -2
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -15
- package/node/hooks/features/keyboardNavigation/utils.js +0 -6
- package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/node/hooks/features/listView/index.js +16 -0
- package/node/hooks/features/listView/useGridListView.js +2 -1
- package/node/hooks/features/overlays/useGridOverlays.js +25 -3
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/node/hooks/features/pagination/useGridPagination.js +6 -4
- package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/node/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +9 -2
- package/node/hooks/features/preferencesPanel/index.js +11 -10
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/node/hooks/features/rowSelection/useGridRowSelection.js +12 -19
- package/node/hooks/features/rowSelection/utils.js +5 -5
- package/node/hooks/features/rows/gridRowsSelector.js +2 -3
- package/node/hooks/features/rows/gridRowsUtils.js +0 -26
- package/node/hooks/features/rows/index.js +0 -7
- package/node/hooks/features/rows/useGridParamsApi.js +33 -14
- package/node/hooks/features/rows/useGridRowSpanning.js +95 -84
- package/node/hooks/features/rows/useGridRows.js +27 -29
- package/node/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/node/hooks/features/sorting/gridSortingSelector.js +22 -10
- package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/node/hooks/features/sorting/index.js +24 -16
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +40 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +210 -119
- package/node/hooks/utils/index.js +21 -11
- package/node/hooks/utils/useGridApiEventHandler.js +71 -78
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridSelector.js +31 -52
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/hooks/utils/useIsSSR.js +12 -0
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +57 -27
- package/node/internals/utils/attachPinnedStyle.js +15 -0
- package/node/internals/utils/getPinnedCellOffset.js +6 -7
- package/node/internals/utils/index.js +11 -11
- package/node/internals/utils/propValidation.js +2 -2
- package/node/locales/arSD.js +2 -1
- package/node/locales/beBY.js +1 -1
- package/node/locales/bgBG.js +2 -1
- package/node/locales/csCZ.js +2 -1
- package/node/locales/daDK.js +2 -1
- package/node/locales/deDE.js +12 -13
- package/node/locales/elGR.js +2 -1
- package/node/locales/esES.js +12 -13
- package/node/locales/faIR.js +7 -7
- package/node/locales/fiFI.js +2 -1
- package/node/locales/frFR.js +2 -1
- package/node/locales/heIL.js +16 -17
- package/node/locales/hrHR.js +2 -1
- package/node/locales/huHU.js +2 -1
- package/node/locales/isIS.js +2 -1
- package/node/locales/itIT.js +2 -1
- package/node/locales/jaJP.js +2 -1
- package/node/locales/koKR.js +46 -49
- package/node/locales/nbNO.js +2 -1
- package/node/locales/nlNL.js +7 -7
- package/node/locales/nnNO.js +2 -1
- package/node/locales/plPL.js +2 -1
- package/node/locales/ptBR.js +12 -13
- package/node/locales/ptPT.js +12 -13
- package/node/locales/roRO.js +20 -21
- package/node/locales/ruRU.js +2 -1
- package/node/locales/skSK.js +2 -1
- package/node/locales/svSE.js +2 -1
- package/node/locales/trTR.js +14 -15
- package/node/locales/ukUA.js +2 -1
- package/node/locales/urPK.js +11 -11
- package/node/locales/viVN.js +2 -1
- package/node/locales/zhCN.js +12 -13
- package/node/locales/zhHK.js +2 -1
- package/node/locales/zhTW.js +2 -1
- package/node/material/index.js +59 -7
- package/node/models/api/index.js +0 -11
- package/node/models/gridFilterInputComponent.js +5 -0
- package/node/utils/assert.js +9 -0
- package/node/utils/cellBorderUtils.js +5 -5
- package/node/utils/createSelector.js +4 -125
- package/node/utils/domUtils.js +7 -2
- package/node/utils/isJSDOM.js +7 -0
- package/node/utils/roundToDecimalPlaces.js +9 -0
- package/node/utils/rtlFlipSide.js +29 -0
- package/node/utils/utils.js +8 -1
- package/package.json +4 -3
- package/themeAugmentation/overrides.d.ts +10 -5
- package/utils/assert.d.ts +2 -0
- package/utils/assert.js +3 -0
- package/utils/cellBorderUtils.d.ts +3 -3
- package/utils/cellBorderUtils.js +5 -5
- package/utils/createSelector.d.ts +7 -19
- package/utils/createSelector.js +1 -120
- package/utils/domUtils.js +7 -2
- package/utils/getPublicApiRef.d.ts +2 -1
- package/utils/isJSDOM.d.ts +1 -0
- package/utils/isJSDOM.js +1 -0
- package/utils/keyboardUtils.d.ts +1 -1
- package/utils/roundToDecimalPlaces.d.ts +1 -0
- package/utils/roundToDecimalPlaces.js +3 -0
- package/utils/rtlFlipSide.d.ts +2 -0
- package/utils/rtlFlipSide.js +22 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +6 -1
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
- package/internals/utils/useProps.d.ts +0 -1
- package/internals/utils/useProps.js +0 -24
- package/joy/icons.d.ts +0 -32
- package/joy/icons.js +0 -431
- package/joy/index.d.ts +0 -2
- package/joy/index.js +0 -2
- package/joy/joySlots.d.ts +0 -3
- package/joy/joySlots.js +0 -389
- package/joy/package.json +0 -6
- package/modern/internals/utils/useProps.js +0 -24
- package/modern/joy/icons.js +0 -431
- package/modern/joy/index.js +0 -2
- package/modern/joy/joySlots.js +0 -389
- package/node/internals/utils/useProps.js +0 -30
- package/node/joy/icons.js +0 -439
- package/node/joy/index.js +0 -13
- package/node/joy/joySlots.js +0 -397
- /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
- /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
- /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
3
|
+
import { GridFilterItem } from './gridFilterItem';
|
|
4
|
+
import type { GridApiCommon } from './api/gridApiCommon';
|
|
5
|
+
import type { GridApiCommunity } from './api/gridApiCommunity';
|
|
6
|
+
export type GridFilterInputSlotProps = {
|
|
7
|
+
size?: 'small' | 'medium';
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
};
|
|
11
|
+
export type GridFilterInputValueProps<T extends GridFilterInputSlotProps = GridFilterInputSlotProps, Api extends GridApiCommon = GridApiCommunity> = {
|
|
12
|
+
item: GridFilterItem;
|
|
13
|
+
applyValue: (value: GridFilterItem) => void;
|
|
14
|
+
apiRef: RefObject<Api>;
|
|
15
|
+
inputRef?: React.Ref<HTMLElement | null>;
|
|
16
|
+
focusElementRef?: React.Ref<any>;
|
|
17
|
+
headerFilterMenu?: React.ReactNode;
|
|
18
|
+
clearButton?: React.ReactNode | null;
|
|
19
|
+
/**
|
|
20
|
+
* It is `true` if the filter either has a value or an operator with no value
|
|
21
|
+
* required is selected (for example `isEmpty`)
|
|
22
|
+
*/
|
|
23
|
+
isFilterActive?: boolean;
|
|
24
|
+
onFocus?: React.FocusEventHandler;
|
|
25
|
+
onBlur?: React.FocusEventHandler;
|
|
26
|
+
tabIndex?: number;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
slotProps?: {
|
|
30
|
+
root: T;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
2
3
|
import { GridFilterItem } from './gridFilterItem';
|
|
3
4
|
import type { GridColDef } from './colDef/gridColDef';
|
|
4
5
|
import type { GridValidRowModel } from './gridRows';
|
|
5
6
|
import type { GridApiCommunity } from './api/gridApiCommunity';
|
|
6
|
-
type
|
|
7
|
+
import type { GridFilterInputValueProps } from './gridFilterInputComponent';
|
|
8
|
+
type ApplyFilterFn<R extends GridValidRowModel = any, V = any, F = V> = (value: V, row: R, column: GridColDef<R, V, F>, apiRef: RefObject<GridApiCommunity>) => boolean;
|
|
7
9
|
export type GetApplyFilterFn<R extends GridValidRowModel = any, V = any, F = V> = (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ApplyFilterFn<R, V, F>;
|
|
8
10
|
/**
|
|
9
11
|
* Filter operator definition interface.
|
|
10
12
|
* @demos
|
|
11
13
|
* - [Custom filter operator](/x/react-data-grid/filtering/customization/#create-a-custom-operator)
|
|
12
14
|
*/
|
|
13
|
-
export interface GridFilterOperator<R extends GridValidRowModel = any, V = any, F = V> {
|
|
15
|
+
export interface GridFilterOperator<R extends GridValidRowModel = any, V = any, F = V, I extends GridFilterInputValueProps<any> = GridFilterInputValueProps> {
|
|
14
16
|
/**
|
|
15
17
|
* The label of the filter operator.
|
|
16
18
|
*/
|
|
@@ -35,11 +37,11 @@ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any,
|
|
|
35
37
|
/**
|
|
36
38
|
* The input component to render in the filter panel for this filter operator.
|
|
37
39
|
*/
|
|
38
|
-
InputComponent?: React.JSXElementConstructor<
|
|
40
|
+
InputComponent?: React.JSXElementConstructor<I>;
|
|
39
41
|
/**
|
|
40
42
|
* The props to pass to the input component in the filter panel for this filter operator.
|
|
41
43
|
*/
|
|
42
|
-
InputComponentProps?:
|
|
44
|
+
InputComponentProps?: Partial<I>;
|
|
43
45
|
/**
|
|
44
46
|
* Converts the value of a filter item to a human-readable form.
|
|
45
47
|
* @param {GridFilterItem['value']} value The filter item value.
|
|
@@ -178,4 +178,9 @@ export interface GridIconSlotsComponent {
|
|
|
178
178
|
* @default GridDragIcon
|
|
179
179
|
*/
|
|
180
180
|
columnReorderIcon: React.JSXElementConstructor<any>;
|
|
181
|
+
/**
|
|
182
|
+
* Icon displayed to indicate that a menu item is selected.
|
|
183
|
+
* @default GridCheckIcon
|
|
184
|
+
*/
|
|
185
|
+
menuItemCheckIcon: React.JSXElementConstructor<any>;
|
|
181
186
|
}
|
|
@@ -13,6 +13,11 @@ export interface GridBaseSlots {
|
|
|
13
13
|
* @default Checkbox
|
|
14
14
|
*/
|
|
15
15
|
baseCheckbox: React.JSXElementConstructor<GridSlotProps['baseCheckbox']>;
|
|
16
|
+
/**
|
|
17
|
+
* The custom CircularProgress component used in the grid.
|
|
18
|
+
* @default CircularProgress
|
|
19
|
+
*/
|
|
20
|
+
baseCircularProgress: React.JSXElementConstructor<GridSlotProps['baseCircularProgress']>;
|
|
16
21
|
/**
|
|
17
22
|
* The custom Chip component used in the grid.
|
|
18
23
|
* @default Chip
|
|
@@ -23,6 +28,11 @@ export interface GridBaseSlots {
|
|
|
23
28
|
* @default Divider
|
|
24
29
|
*/
|
|
25
30
|
baseDivider: React.JSXElementConstructor<GridSlotProps['baseDivider']>;
|
|
31
|
+
/**
|
|
32
|
+
* The custom LinearProgress component used in the grid.
|
|
33
|
+
* @default LinearProgress
|
|
34
|
+
*/
|
|
35
|
+
baseLinearProgress: React.JSXElementConstructor<GridSlotProps['baseLinearProgress']>;
|
|
26
36
|
/**
|
|
27
37
|
* The custom MenuList component used in the grid.
|
|
28
38
|
* @default MenuList
|
|
@@ -80,9 +90,14 @@ export interface GridBaseSlots {
|
|
|
80
90
|
baseInputLabel: React.JSXElementConstructor<GridSlotProps['baseInputLabel']>;
|
|
81
91
|
/**
|
|
82
92
|
* The custom SelectOption component used in the grid.
|
|
83
|
-
* @default
|
|
93
|
+
* @default SelectOption
|
|
84
94
|
*/
|
|
85
95
|
baseSelectOption: React.JSXElementConstructor<GridSlotProps['baseSelectOption']>;
|
|
96
|
+
/**
|
|
97
|
+
* The custom Skeleton component used in the grid.
|
|
98
|
+
* @default Skeleton
|
|
99
|
+
*/
|
|
100
|
+
baseSkeleton: React.JSXElementConstructor<GridSlotProps['baseSkeleton']>;
|
|
86
101
|
}
|
|
87
102
|
/**
|
|
88
103
|
* Grid components React prop interface containing all the overridable components.
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { BadgeProps } from '@mui/material/Badge';
|
|
2
|
+
import type { BadgeProps as MUIBadgeProps } from '@mui/material/Badge';
|
|
3
|
+
import type { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
3
4
|
import type { CheckboxProps } from '@mui/material/Checkbox';
|
|
5
|
+
import type { CircularProgressProps as MUICircularProgressProps } from '@mui/material/CircularProgress';
|
|
6
|
+
import type { LinearProgressProps as MUILinearProgressProps } from '@mui/material/LinearProgress';
|
|
4
7
|
import type { MenuListProps } from '@mui/material/MenuList';
|
|
5
|
-
import type { MenuItemProps } from '@mui/material/MenuItem';
|
|
6
|
-
import type { TextFieldProps } from '@mui/material/TextField';
|
|
8
|
+
import type { MenuItemProps as MUIMenuItemProps } from '@mui/material/MenuItem';
|
|
7
9
|
import type { FormControlProps } from '@mui/material/FormControl';
|
|
8
10
|
import type { SelectProps } from '@mui/material/Select';
|
|
9
11
|
import type { SwitchProps } from '@mui/material/Switch';
|
|
10
|
-
import type {
|
|
11
|
-
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
12
|
+
import type { IconButtonProps as MUIIconButtonProps } from '@mui/material/IconButton';
|
|
12
13
|
import type { InputAdornmentProps } from '@mui/material/InputAdornment';
|
|
13
|
-
import type { TooltipProps } from '@mui/material/Tooltip';
|
|
14
|
+
import type { TooltipProps as MUITooltipProps } from '@mui/material/Tooltip';
|
|
14
15
|
import type { InputLabelProps } from '@mui/material/InputLabel';
|
|
15
16
|
import type { PopperProps } from '@mui/material/Popper';
|
|
16
17
|
import type { TablePaginationProps } from '@mui/material/TablePagination';
|
|
@@ -33,13 +34,19 @@ import type { GridColumnsManagementProps } from '../components/columnsManagement
|
|
|
33
34
|
import type { GridLoadingOverlayProps } from '../components/GridLoadingOverlay';
|
|
34
35
|
import type { GridRowCountProps } from '../components/GridRowCount';
|
|
35
36
|
import type { GridColumnHeaderSortIconProps } from '../components/columnHeaders/GridColumnHeaderSortIcon';
|
|
36
|
-
type DividerProps
|
|
37
|
+
import type { BadgeProps, ButtonProps, CircularProgressProps, DividerProps, IconButtonProps, LinearProgressProps, MenuItemProps, SkeletonProps, TooltipProps, TextFieldProps } from './gridBaseSlots';
|
|
38
|
+
type RootProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
|
|
39
|
+
type MainProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
|
|
37
40
|
export interface BaseBadgePropsOverrides {
|
|
38
41
|
}
|
|
39
42
|
export interface BaseCheckboxPropsOverrides {
|
|
40
43
|
}
|
|
44
|
+
export interface BaseCircularProgressPropsOverrides {
|
|
45
|
+
}
|
|
41
46
|
export interface BaseDividerPropsOverrides {
|
|
42
47
|
}
|
|
48
|
+
export interface BaseLinearProgressPropsOverrides {
|
|
49
|
+
}
|
|
43
50
|
export interface BaseMenuListPropsOverrides {
|
|
44
51
|
}
|
|
45
52
|
export interface BaseMenuItemPropsOverrides {
|
|
@@ -66,6 +73,8 @@ export interface BaseInputLabelPropsOverrides {
|
|
|
66
73
|
}
|
|
67
74
|
export interface BaseSelectOptionPropsOverrides {
|
|
68
75
|
}
|
|
76
|
+
export interface BaseSkeletonPropsOverrides {
|
|
77
|
+
}
|
|
69
78
|
export interface BaseChipPropsOverrides {
|
|
70
79
|
}
|
|
71
80
|
export interface CellPropsOverrides {
|
|
@@ -106,10 +115,12 @@ export interface SkeletonCellPropsOverrides {
|
|
|
106
115
|
}
|
|
107
116
|
export interface RowPropsOverrides {
|
|
108
117
|
}
|
|
109
|
-
|
|
118
|
+
interface BaseSlotProps {
|
|
110
119
|
baseBadge: BadgeProps & BaseBadgePropsOverrides;
|
|
111
120
|
baseCheckbox: CheckboxProps & BaseCheckboxPropsOverrides;
|
|
121
|
+
baseCircularProgress: CircularProgressProps & BaseCircularProgressPropsOverrides;
|
|
112
122
|
baseDivider: DividerProps & BaseDividerPropsOverrides;
|
|
123
|
+
baseLinearProgress: LinearProgressProps & BaseLinearProgressPropsOverrides;
|
|
113
124
|
baseMenuList: MenuListProps & BaseMenuListPropsOverrides;
|
|
114
125
|
baseMenuItem: MenuItemProps & BaseMenuItemPropsOverrides;
|
|
115
126
|
baseTextField: TextFieldProps & BaseTextFieldPropsOverrides;
|
|
@@ -127,7 +138,19 @@ export interface GridSlotProps {
|
|
|
127
138
|
value: any;
|
|
128
139
|
children?: React.ReactNode;
|
|
129
140
|
} & BaseSelectOptionPropsOverrides;
|
|
141
|
+
baseSkeleton: SkeletonProps & BaseSkeletonPropsOverrides;
|
|
130
142
|
baseChip: ChipProps & BaseChipPropsOverrides;
|
|
143
|
+
}
|
|
144
|
+
interface MaterialSlotProps {
|
|
145
|
+
baseBadge: MUIBadgeProps;
|
|
146
|
+
baseButton: MUIButtonProps;
|
|
147
|
+
baseIconButton: MUIIconButtonProps;
|
|
148
|
+
baseLinearProgress: MUILinearProgressProps;
|
|
149
|
+
baseCircularProgress: MUICircularProgressProps;
|
|
150
|
+
baseMenuItem: MUIMenuItemProps;
|
|
151
|
+
baseTooltip: MUITooltipProps;
|
|
152
|
+
}
|
|
153
|
+
interface ElementSlotProps {
|
|
131
154
|
cell: GridCellProps & CellPropsOverrides;
|
|
132
155
|
columnHeaders: GridColumnHeadersProps;
|
|
133
156
|
columnHeaderFilterIconButton: ColumnHeaderFilterIconButtonProps & ColumnHeaderFilterIconButtonPropsOverrides;
|
|
@@ -148,7 +171,20 @@ export interface GridSlotProps {
|
|
|
148
171
|
row: GridRowProps & RowPropsOverrides;
|
|
149
172
|
skeletonCell: GridSkeletonCellProps & SkeletonCellPropsOverrides;
|
|
150
173
|
toolbar: GridToolbarProps & ToolbarPropsOverrides;
|
|
151
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Props passed to the `.main` (role="grid") element.
|
|
176
|
+
*/
|
|
177
|
+
main: MainProps;
|
|
178
|
+
/**
|
|
179
|
+
* Props passed to the `.root` element.
|
|
180
|
+
*/
|
|
181
|
+
root: RootProps;
|
|
182
|
+
}
|
|
183
|
+
type Select<A, B, K> = K extends keyof A ? A[K] : K extends keyof B ? B[K] : never;
|
|
184
|
+
type Merge<A, B> = {
|
|
185
|
+
[K in keyof A | keyof B]: K extends 'ref' ? Select<A, B, 'ref'> : K extends keyof A & keyof B ? A[K] & B[K] : K extends keyof B ? B[K] : K extends keyof A ? A[K] : never;
|
|
186
|
+
};
|
|
187
|
+
export type GridSlotProps = Merge<BaseSlotProps, MaterialSlotProps> & ElementSlotProps;
|
|
152
188
|
/**
|
|
153
189
|
* Overridable components props dynamically passed to the component at rendering.
|
|
154
190
|
*/
|
package/models/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './gridEditRowModel';
|
|
|
5
5
|
export * from './gridFeatureMode';
|
|
6
6
|
export * from './gridFilterItem';
|
|
7
7
|
export * from './gridFilterModel';
|
|
8
|
+
export type { GridFilterInputValueProps } from './gridFilterInputComponent';
|
|
8
9
|
export * from './gridPaginationProps';
|
|
9
10
|
export * from './gridRenderContextProps';
|
|
10
11
|
export * from './gridRows';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
2
3
|
import { SxProps } from '@mui/system';
|
|
3
4
|
import { Theme } from '@mui/material/styles';
|
|
4
5
|
import { CommonProps } from '@mui/material/OverridableComponent';
|
|
@@ -223,14 +224,6 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
223
224
|
* @default false
|
|
224
225
|
*/
|
|
225
226
|
ignoreDiacritics: boolean;
|
|
226
|
-
/**
|
|
227
|
-
* If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
|
|
228
|
-
* will select all the rows under it.
|
|
229
|
-
* If `deselect`, it will deselect all the rows under it.
|
|
230
|
-
* Works only if `checkboxSelection` is enabled.
|
|
231
|
-
* @default "deselect"
|
|
232
|
-
*/
|
|
233
|
-
indeterminateCheckboxAction: 'select' | 'deselect';
|
|
234
227
|
/**
|
|
235
228
|
* If `true`, the selection model will retain selected rows that do not exist.
|
|
236
229
|
* Useful when using server side pagination and row selections need to be retained
|
|
@@ -346,14 +339,6 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
346
339
|
* @default '\t'
|
|
347
340
|
*/
|
|
348
341
|
clipboardCopyCellDelimiter: string;
|
|
349
|
-
/**
|
|
350
|
-
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
351
|
-
* Setting it to a lower value could be useful when using dynamic row height,
|
|
352
|
-
* but might reduce performance when displaying a large number of rows.
|
|
353
|
-
* @default 166
|
|
354
|
-
* @deprecated
|
|
355
|
-
*/
|
|
356
|
-
rowPositionsDebounceMs: number;
|
|
357
342
|
/**
|
|
358
343
|
* If `true`, columns are autosized after the datagrid is mounted.
|
|
359
344
|
* @default false
|
|
@@ -368,7 +353,15 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
368
353
|
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
369
354
|
* @default false
|
|
370
355
|
*/
|
|
371
|
-
|
|
356
|
+
rowSpanning: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
359
|
+
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
360
|
+
* For datasets with a large number of columns, this can cause performance issues.
|
|
361
|
+
* The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
|
|
362
|
+
* @default false
|
|
363
|
+
*/
|
|
364
|
+
virtualizeColumnsWithAutoRowHeight: boolean;
|
|
372
365
|
}
|
|
373
366
|
/**
|
|
374
367
|
* The Data Grid props with no default value.
|
|
@@ -377,12 +370,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
377
370
|
/**
|
|
378
371
|
* The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
379
372
|
*/
|
|
380
|
-
apiRef?:
|
|
381
|
-
/**
|
|
382
|
-
* Forwarded props for the Data Grid root element.
|
|
383
|
-
* @ignore - do not document.
|
|
384
|
-
*/
|
|
385
|
-
forwardedProps?: Record<string, unknown>;
|
|
373
|
+
apiRef?: RefObject<GridApiCommunity | null>;
|
|
386
374
|
/**
|
|
387
375
|
* Signal to the underlying logic what version of the public component API
|
|
388
376
|
* of the Data Grid is exposed [[GridSignature]].
|
|
@@ -814,7 +802,7 @@ export interface DataGridProSharedPropsWithDefaultValue {
|
|
|
814
802
|
* - Deselecting a descendant of a selected parent deselects the parent automatically.
|
|
815
803
|
*
|
|
816
804
|
* Works with tree data and row grouping on the client-side only.
|
|
817
|
-
* @default { parents:
|
|
805
|
+
* @default { parents: true, descendants: true }
|
|
818
806
|
*/
|
|
819
807
|
rowSelectionPropagation: GridRowSelectionPropagation;
|
|
820
808
|
/**
|
|
@@ -3,43 +3,37 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
+
import { GridRoot } from "../components/index.js";
|
|
7
8
|
import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
8
9
|
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
9
10
|
import { GridContextProvider } from "../context/GridContextProvider.js";
|
|
10
11
|
import { useDataGridComponent } from "./useDataGridComponent.js";
|
|
11
12
|
import { useDataGridProps } from "./useDataGridProps.js";
|
|
12
13
|
import { propValidatorsDataGrid, validateProps } from "../internals/utils/propValidation.js";
|
|
13
|
-
import { jsx as _jsx
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
const configuration = {
|
|
15
16
|
hooks: {
|
|
16
17
|
useGridAriaAttributes,
|
|
17
18
|
useGridRowAriaAttributes
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
|
-
|
|
21
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
22
|
-
propValidators = [...propValidatorsDataGrid,
|
|
23
|
-
// Only validate in MIT version
|
|
24
|
-
props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
|
|
25
|
-
}
|
|
26
|
-
const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {
|
|
21
|
+
const DataGridRaw = forwardRef(function DataGrid(inProps, ref) {
|
|
27
22
|
const props = useDataGridProps(inProps);
|
|
28
23
|
const privateApiRef = useDataGridComponent(props.apiRef, props);
|
|
29
24
|
if (process.env.NODE_ENV !== 'production') {
|
|
30
|
-
validateProps(props,
|
|
25
|
+
validateProps(props, propValidatorsDataGrid);
|
|
31
26
|
}
|
|
32
27
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
33
28
|
privateApiRef: privateApiRef,
|
|
34
29
|
configuration: configuration,
|
|
35
30
|
props: props,
|
|
36
|
-
children: /*#__PURE__*/
|
|
31
|
+
children: /*#__PURE__*/_jsx(GridRoot, _extends({
|
|
37
32
|
className: props.className,
|
|
38
33
|
style: props.style,
|
|
39
|
-
sx: props.sx
|
|
34
|
+
sx: props.sx
|
|
35
|
+
}, props.slotProps?.root, {
|
|
40
36
|
ref: ref
|
|
41
|
-
}, props.forwardedProps, {
|
|
42
|
-
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
43
37
|
}))
|
|
44
38
|
});
|
|
45
39
|
});
|
|
@@ -60,7 +54,7 @@ DataGridRaw.propTypes = {
|
|
|
60
54
|
* The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
61
55
|
*/
|
|
62
56
|
apiRef: PropTypes.shape({
|
|
63
|
-
current: PropTypes.object
|
|
57
|
+
current: PropTypes.object
|
|
64
58
|
}),
|
|
65
59
|
/**
|
|
66
60
|
* The label of the Data Grid.
|
|
@@ -95,6 +89,7 @@ DataGridRaw.propTypes = {
|
|
|
95
89
|
*/
|
|
96
90
|
autosizeOptions: PropTypes.shape({
|
|
97
91
|
columns: PropTypes.arrayOf(PropTypes.string),
|
|
92
|
+
disableColumnVirtualization: PropTypes.bool,
|
|
98
93
|
expand: PropTypes.bool,
|
|
99
94
|
includeHeaders: PropTypes.bool,
|
|
100
95
|
includeOutliers: PropTypes.bool,
|
|
@@ -248,11 +243,6 @@ DataGridRaw.propTypes = {
|
|
|
248
243
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
249
244
|
quickFilterValues: PropTypes.array
|
|
250
245
|
}),
|
|
251
|
-
/**
|
|
252
|
-
* Forwarded props for the Data Grid root element.
|
|
253
|
-
* @ignore - do not document.
|
|
254
|
-
*/
|
|
255
|
-
forwardedProps: PropTypes.object,
|
|
256
246
|
/**
|
|
257
247
|
* Function that applies CSS classes dynamically on cells.
|
|
258
248
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
@@ -325,14 +315,6 @@ DataGridRaw.propTypes = {
|
|
|
325
315
|
clipboardExport: PropTypes.bool,
|
|
326
316
|
csvExport: PropTypes.bool
|
|
327
317
|
}), PropTypes.bool]),
|
|
328
|
-
/**
|
|
329
|
-
* If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
|
|
330
|
-
* will select all the rows under it.
|
|
331
|
-
* If `deselect`, it will deselect all the rows under it.
|
|
332
|
-
* Works only if `checkboxSelection` is enabled.
|
|
333
|
-
* @default "deselect"
|
|
334
|
-
*/
|
|
335
|
-
indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
|
|
336
318
|
/**
|
|
337
319
|
* The initial state of the DataGrid.
|
|
338
320
|
* The data in it will be set in the state on initialization but will not be controlled.
|
|
@@ -690,14 +672,6 @@ DataGridRaw.propTypes = {
|
|
|
690
672
|
* Controls the modes of the rows.
|
|
691
673
|
*/
|
|
692
674
|
rowModesModel: PropTypes.object,
|
|
693
|
-
/**
|
|
694
|
-
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
695
|
-
* Setting it to a lower value could be useful when using dynamic row height,
|
|
696
|
-
* but might reduce performance when displaying a large number of rows.
|
|
697
|
-
* @default 166
|
|
698
|
-
* @deprecated
|
|
699
|
-
*/
|
|
700
|
-
rowPositionsDebounceMs: PropTypes.number,
|
|
701
675
|
/**
|
|
702
676
|
* Set of rows of type [[GridRowsProp]].
|
|
703
677
|
* @default []
|
|
@@ -717,6 +691,11 @@ DataGridRaw.propTypes = {
|
|
|
717
691
|
* @default "margin"
|
|
718
692
|
*/
|
|
719
693
|
rowSpacingType: PropTypes.oneOf(['border', 'margin']),
|
|
694
|
+
/**
|
|
695
|
+
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
696
|
+
* @default false
|
|
697
|
+
*/
|
|
698
|
+
rowSpanning: PropTypes.bool,
|
|
720
699
|
/**
|
|
721
700
|
* Override the height/width of the Data Grid inner scrollbar.
|
|
722
701
|
*/
|
|
@@ -763,8 +742,11 @@ DataGridRaw.propTypes = {
|
|
|
763
742
|
*/
|
|
764
743
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
765
744
|
/**
|
|
766
|
-
* If `true`, the Data Grid
|
|
745
|
+
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
746
|
+
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
747
|
+
* For datasets with a large number of columns, this can cause performance issues.
|
|
748
|
+
* The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
|
|
767
749
|
* @default false
|
|
768
750
|
*/
|
|
769
|
-
|
|
751
|
+
virtualizeColumnsWithAutoRowHeight: PropTypes.bool
|
|
770
752
|
};
|
|
@@ -41,9 +41,9 @@ export const useDataGridComponent = (inputApiRef, props) => {
|
|
|
41
41
|
/**
|
|
42
42
|
* Register all state initializers here.
|
|
43
43
|
*/
|
|
44
|
-
useGridInitializeState(dimensionsStateInitializer, apiRef, props);
|
|
45
44
|
useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
|
|
46
45
|
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
46
|
+
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
47
47
|
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
48
48
|
useGridInitializeState(editingStateInitializer, apiRef, props);
|
|
49
49
|
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
@@ -53,11 +53,11 @@ export const useDataGridComponent = (inputApiRef, props) => {
|
|
|
53
53
|
useGridInitializeState(rowSpanningStateInitializer, apiRef, props);
|
|
54
54
|
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
55
55
|
useGridInitializeState(columnResizeStateInitializer, apiRef, props);
|
|
56
|
-
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
57
|
-
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
58
56
|
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
59
57
|
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
|
60
58
|
useGridInitializeState(virtualizationStateInitializer, apiRef, props);
|
|
59
|
+
useGridInitializeState(dimensionsStateInitializer, apiRef, props);
|
|
60
|
+
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
61
61
|
useGridInitializeState(listViewStateInitializer, apiRef, props);
|
|
62
62
|
useGridKeyboardNavigation(apiRef, props);
|
|
63
63
|
useGridRowSelection(apiRef, props);
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
4
|
import { GRID_DEFAULT_LOCALE_TEXT } from "../constants/index.js";
|
|
5
5
|
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
|
|
6
|
-
import { computeSlots
|
|
6
|
+
import { computeSlots } from "../internals/utils/index.js";
|
|
7
7
|
import { DATA_GRID_PROPS_DEFAULT_VALUES } from "../constants/dataGridPropsDefaultValues.js";
|
|
8
8
|
const DATA_GRID_FORCED_PROPS = {
|
|
9
9
|
disableMultipleColumnsFiltering: true,
|
|
@@ -19,12 +19,12 @@ const DATA_GRID_FORCED_PROPS = {
|
|
|
19
19
|
};
|
|
20
20
|
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
21
21
|
export const useDataGridProps = inProps => {
|
|
22
|
-
const themedProps =
|
|
22
|
+
const themedProps =
|
|
23
23
|
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
24
24
|
useThemeProps({
|
|
25
25
|
props: inProps,
|
|
26
26
|
name: 'MuiDataGrid'
|
|
27
|
-
})
|
|
27
|
+
});
|
|
28
28
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
29
29
|
const slots = React.useMemo(() => computeSlots({
|
|
30
30
|
defaultSlots,
|
|
@@ -4,10 +4,11 @@ const _excluded = ["className", "visibleColumns", "sortColumnLookup", "filterCol
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
|
|
8
9
|
import { GridBaseColumnHeaders } from "./columnHeaders/GridBaseColumnHeaders.js";
|
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
const GridColumnHeaders =
|
|
11
|
+
const GridColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
|
|
11
12
|
const {
|
|
12
13
|
visibleColumns,
|
|
13
14
|
sortColumnLookup,
|
|
@@ -41,9 +42,8 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
|
|
|
41
42
|
columnGroupsHeaderStructure,
|
|
42
43
|
hasOtherElementInTabSequence
|
|
43
44
|
});
|
|
44
|
-
return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({
|
|
45
|
-
ref: ref
|
|
46
|
-
}, other, getInnerProps(), {
|
|
45
|
+
return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({}, other, getInnerProps(), {
|
|
46
|
+
ref: ref,
|
|
47
47
|
children: [getColumnGroupHeadersRows(), getColumnHeadersRow()]
|
|
48
48
|
}));
|
|
49
49
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
4
5
|
import { useGridSelector } from "../hooks/utils/useGridSelector.js";
|
|
5
6
|
import { gridTopLevelRowCountSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
6
7
|
import { selectedGridRowsCountSelector } from "../hooks/features/rowSelection/gridRowSelectionSelector.js";
|
|
@@ -10,7 +11,7 @@ import { GridSelectedRowCount } from "./GridSelectedRowCount.js";
|
|
|
10
11
|
import { GridFooterContainer } from "./containers/GridFooterContainer.js";
|
|
11
12
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const GridFooter =
|
|
14
|
+
const GridFooter = forwardRef(function GridFooter(props, ref) {
|
|
14
15
|
const apiRef = useGridApiContext();
|
|
15
16
|
const rootProps = useGridRootProps();
|
|
16
17
|
const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);
|
|
@@ -24,9 +25,8 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
|
|
|
24
25
|
visibleRowCount: visibleTopLevelRowCount
|
|
25
26
|
})) : null;
|
|
26
27
|
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, rootProps.slotProps?.pagination));
|
|
27
|
-
return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({
|
|
28
|
-
ref: ref
|
|
29
|
-
}, props, {
|
|
28
|
+
return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({}, props, {
|
|
29
|
+
ref: ref,
|
|
30
30
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
31
31
|
}));
|
|
32
32
|
});
|
|
@@ -18,7 +18,7 @@ function GridHeaders() {
|
|
|
18
18
|
const filterColumnLookup = useGridSelector(apiRef, gridFilterActiveItemsLookupSelector);
|
|
19
19
|
const sortColumnLookup = useGridSelector(apiRef, gridSortColumnLookupSelector);
|
|
20
20
|
const columnHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnHeaderSelector);
|
|
21
|
-
const
|
|
21
|
+
const hasNoCellTabIndexState = useGridSelector(apiRef, () => gridTabIndexCellSelector(apiRef) === null);
|
|
22
22
|
const columnGroupHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnGroupHeaderSelector);
|
|
23
23
|
const columnHeaderFocus = useGridSelector(apiRef, gridFocusColumnHeaderSelector);
|
|
24
24
|
const columnGroupHeaderFocus = useGridSelector(apiRef, gridFocusColumnGroupHeaderSelector);
|
|
@@ -26,7 +26,7 @@ function GridHeaders() {
|
|
|
26
26
|
const columnMenuState = useGridSelector(apiRef, gridColumnMenuSelector);
|
|
27
27
|
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
28
28
|
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
|
29
|
-
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null &&
|
|
29
|
+
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && hasNoCellTabIndexState);
|
|
30
30
|
const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
|
|
31
31
|
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
|
|
32
32
|
ref: columnsContainerRef,
|
|
@@ -3,8 +3,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["variant", "noRowsVariant", "style"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
8
8
|
import { GridOverlay } from "./containers/GridOverlay.js";
|
|
9
9
|
import { GridSkeletonLoadingOverlay } from "./GridSkeletonLoadingOverlay.js";
|
|
10
10
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
@@ -12,23 +12,23 @@ import { gridRowCountSelector, useGridSelector } from "../hooks/index.js";
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
const LOADING_VARIANTS = {
|
|
14
14
|
'circular-progress': {
|
|
15
|
-
component:
|
|
15
|
+
component: rootProps => rootProps.slots.baseCircularProgress,
|
|
16
16
|
style: {}
|
|
17
17
|
},
|
|
18
18
|
'linear-progress': {
|
|
19
|
-
component:
|
|
19
|
+
component: rootProps => rootProps.slots.baseLinearProgress,
|
|
20
20
|
style: {
|
|
21
21
|
display: 'block'
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
skeleton: {
|
|
25
|
-
component: GridSkeletonLoadingOverlay,
|
|
25
|
+
component: () => GridSkeletonLoadingOverlay,
|
|
26
26
|
style: {
|
|
27
27
|
display: 'block'
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
const GridLoadingOverlay =
|
|
31
|
+
const GridLoadingOverlay = forwardRef(function GridLoadingOverlay(props, ref) {
|
|
32
32
|
const {
|
|
33
33
|
variant = 'linear-progress',
|
|
34
34
|
noRowsVariant = 'skeleton',
|
|
@@ -36,13 +36,15 @@ const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOve
|
|
|
36
36
|
} = props,
|
|
37
37
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
38
38
|
const apiRef = useGridApiContext();
|
|
39
|
+
const rootProps = useGridRootProps();
|
|
39
40
|
const rowsCount = useGridSelector(apiRef, gridRowCountSelector);
|
|
40
41
|
const activeVariant = LOADING_VARIANTS[rowsCount === 0 ? noRowsVariant : variant];
|
|
42
|
+
const Component = activeVariant.component(rootProps);
|
|
41
43
|
return /*#__PURE__*/_jsx(GridOverlay, _extends({
|
|
42
|
-
ref: ref,
|
|
43
44
|
style: _extends({}, activeVariant.style, style)
|
|
44
45
|
}, other, {
|
|
45
|
-
|
|
46
|
+
ref: ref,
|
|
47
|
+
children: /*#__PURE__*/_jsx(Component, {})
|
|
46
48
|
}));
|
|
47
49
|
});
|
|
48
50
|
process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|