@mui/x-data-grid 8.0.0-alpha.0 → 8.0.0-alpha.10
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 +2215 -119
- package/DataGrid/DataGrid.js +20 -38
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +3 -3
- 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 +3 -3
- package/components/GridLoadingOverlay.js +14 -12
- 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 +55 -87
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridScrollArea.js +2 -0
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +22 -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 +52 -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 +2 -0
- package/components/columnsManagement/GridColumnsManagement.js +81 -11
- 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 +18 -8
- package/components/containers/GridRootStyles.js +160 -50
- 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 +3 -2
- 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 +27 -12
- 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 +36 -12
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +12 -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 +1 -1
- 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 +2 -2
- 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 +3 -3
- 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 +34 -69
- 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 +12 -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 +7 -3
- 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/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +11 -32
- package/hooks/features/editing/gridEditingSelectors.d.ts +6 -0
- package/hooks/features/editing/gridEditingSelectors.js +7 -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 +7 -8
- 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 +6 -1
- 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 +1 -1
- 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 +22 -2
- 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/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +5 -3
- 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 +8 -16
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +4 -3
- package/hooks/features/rowSelection/utils.js +2 -2
- 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/gridRowsSelector.d.ts +23 -13
- package/hooks/features/rows/gridRowsSelector.js +1 -2
- package/hooks/features/rows/gridRowsUtils.d.ts +4 -4
- package/hooks/features/rows/gridRowsUtils.js +0 -9
- 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 +23 -27
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +3 -2
- 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 +11 -0
- 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 +15 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +4 -4
- package/hooks/utils/useGridApiEventHandler.js +1 -1
- 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 +6 -44
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +7 -4
- package/internals/index.js +5 -3
- 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/locales/arSD.js +14 -0
- package/locales/beBY.js +13 -0
- package/locales/bgBG.js +15 -0
- package/locales/csCZ.js +15 -0
- package/locales/daDK.js +15 -0
- package/locales/deDE.js +13 -0
- package/locales/elGR.js +14 -0
- package/locales/esES.js +17 -4
- package/locales/faIR.js +18 -4
- package/locales/fiFI.js +15 -0
- package/locales/frFR.js +15 -0
- package/locales/heIL.js +17 -4
- package/locales/hrHR.js +15 -0
- package/locales/huHU.js +15 -0
- package/locales/isIS.js +14 -0
- package/locales/itIT.js +15 -0
- package/locales/jaJP.js +15 -0
- package/locales/koKR.js +47 -37
- package/locales/nbNO.js +15 -0
- package/locales/nlNL.js +18 -4
- package/locales/nnNO.js +15 -0
- package/locales/plPL.js +15 -0
- package/locales/ptBR.js +13 -0
- package/locales/ptPT.js +13 -0
- package/locales/roRO.js +21 -9
- package/locales/ruRU.js +15 -0
- package/locales/skSK.js +14 -0
- package/locales/svSE.js +19 -5
- package/locales/trTR.js +15 -2
- package/locales/ukUA.js +14 -0
- package/locales/urPK.js +22 -9
- package/locales/viVN.js +15 -0
- package/locales/zhCN.js +17 -4
- package/locales/zhHK.js +14 -0
- package/locales/zhTW.js +14 -0
- 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 +11 -0
- package/models/api/gridParamsApi.d.ts +29 -2
- package/models/api/gridStateApi.d.ts +1 -1
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/colDef/gridColDef.d.ts +38 -33
- package/models/controlStateItem.d.ts +2 -2
- package/models/events/gridEventLookup.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +95 -0
- package/models/gridDataSource.d.ts +13 -13
- 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 +1 -1
- 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 +14 -12
- 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 +55 -87
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridScrollArea.js +2 -0
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +22 -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 +52 -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 +81 -11
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +18 -8
- package/modern/components/containers/GridRootStyles.js +160 -50
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- 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 +27 -12
- 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/localeTextConstants.js +12 -0
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/core/useGridApiInitialization.js +2 -2
- package/modern/hooks/core/useGridStateInitialization.js +3 -3
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -69
- 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/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/columns/useGridColumns.js +7 -3
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -32
- package/modern/hooks/features/editing/gridEditingSelectors.js +7 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -8
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +1 -1
- 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 +22 -2
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/useGridPagination.js +5 -3
- 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 +8 -16
- package/modern/hooks/features/rowSelection/utils.js +2 -2
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -9
- 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 +23 -27
- package/modern/hooks/features/rows/useGridRowsMeta.js +3 -2
- package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
- 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 +169 -94
- package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
- package/modern/hooks/utils/useGridApiRef.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +6 -44
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +5 -3
- 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/locales/arSD.js +14 -0
- package/modern/locales/beBY.js +13 -0
- package/modern/locales/bgBG.js +15 -0
- package/modern/locales/csCZ.js +15 -0
- package/modern/locales/daDK.js +15 -0
- package/modern/locales/deDE.js +13 -0
- package/modern/locales/elGR.js +14 -0
- package/modern/locales/esES.js +17 -4
- package/modern/locales/faIR.js +18 -4
- package/modern/locales/fiFI.js +15 -0
- package/modern/locales/frFR.js +15 -0
- package/modern/locales/heIL.js +17 -4
- package/modern/locales/hrHR.js +15 -0
- package/modern/locales/huHU.js +15 -0
- package/modern/locales/isIS.js +14 -0
- package/modern/locales/itIT.js +15 -0
- package/modern/locales/jaJP.js +15 -0
- package/modern/locales/koKR.js +47 -37
- package/modern/locales/nbNO.js +15 -0
- package/modern/locales/nlNL.js +18 -4
- package/modern/locales/nnNO.js +15 -0
- package/modern/locales/plPL.js +15 -0
- package/modern/locales/ptBR.js +13 -0
- package/modern/locales/ptPT.js +13 -0
- package/modern/locales/roRO.js +21 -9
- package/modern/locales/ruRU.js +15 -0
- package/modern/locales/skSK.js +14 -0
- package/modern/locales/svSE.js +19 -5
- package/modern/locales/trTR.js +15 -2
- package/modern/locales/ukUA.js +14 -0
- package/modern/locales/urPK.js +22 -9
- package/modern/locales/viVN.js +15 -0
- package/modern/locales/zhCN.js +17 -4
- package/modern/locales/zhHK.js +14 -0
- package/modern/locales/zhTW.js +14 -0
- 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 +1 -1
- 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 +14 -12
- 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 +51 -84
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridScrollArea.js +1 -0
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +21 -20
- 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 +51 -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 +81 -11
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +17 -7
- package/node/components/containers/GridRootStyles.js +160 -50
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- 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 +27 -12
- 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/localeTextConstants.js +12 -0
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/core/useGridApiInitialization.js +2 -2
- package/node/hooks/core/useGridStateInitialization.js +3 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -67
- 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/gridColumnsUtils.js +2 -1
- package/node/hooks/features/columns/useGridColumns.js +7 -3
- package/node/hooks/features/dimensions/useGridDimensions.js +12 -33
- package/node/hooks/features/editing/gridEditingSelectors.js +8 -2
- package/node/hooks/features/editing/useGridCellEditing.js +3 -3
- package/node/hooks/features/editing/useGridRowEditing.js +5 -6
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- 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 +24 -2
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/useGridPagination.js +5 -3
- 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 +7 -15
- package/node/hooks/features/rowSelection/utils.js +2 -2
- package/node/hooks/features/rows/gridRowsSelector.js +2 -3
- package/node/hooks/features/rows/gridRowsUtils.js +0 -9
- 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 +21 -25
- package/node/hooks/features/rows/useGridRowsMeta.js +5 -4
- package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
- 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 +171 -96
- package/node/hooks/utils/useGridApiEventHandler.js +1 -1
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridSelector.js +8 -47
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +36 -24
- 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/locales/arSD.js +14 -0
- package/node/locales/beBY.js +13 -0
- package/node/locales/bgBG.js +15 -0
- package/node/locales/csCZ.js +15 -0
- package/node/locales/daDK.js +15 -0
- package/node/locales/deDE.js +13 -0
- package/node/locales/elGR.js +14 -0
- package/node/locales/esES.js +17 -4
- package/node/locales/faIR.js +18 -4
- package/node/locales/fiFI.js +15 -0
- package/node/locales/frFR.js +15 -0
- package/node/locales/heIL.js +17 -4
- package/node/locales/hrHR.js +15 -0
- package/node/locales/huHU.js +15 -0
- package/node/locales/isIS.js +14 -0
- package/node/locales/itIT.js +15 -0
- package/node/locales/jaJP.js +15 -0
- package/node/locales/koKR.js +47 -37
- package/node/locales/nbNO.js +15 -0
- package/node/locales/nlNL.js +18 -4
- package/node/locales/nnNO.js +15 -0
- package/node/locales/plPL.js +15 -0
- package/node/locales/ptBR.js +13 -0
- package/node/locales/ptPT.js +13 -0
- package/node/locales/roRO.js +21 -9
- package/node/locales/ruRU.js +15 -0
- package/node/locales/skSK.js +14 -0
- package/node/locales/svSE.js +19 -5
- package/node/locales/trTR.js +15 -2
- package/node/locales/ukUA.js +14 -0
- package/node/locales/urPK.js +22 -9
- package/node/locales/viVN.js +15 -0
- package/node/locales/zhCN.js +17 -4
- package/node/locales/zhHK.js +14 -0
- package/node/locales/zhTW.js +14 -0
- 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 +5 -5
- 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 -384
- 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 -384
- 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 -392
- /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
|
@@ -8,7 +8,7 @@ exports.useGridRegisterPipeApplier = void 0;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _useFirstRender = require("../../utils/useFirstRender");
|
|
10
10
|
const useGridRegisterPipeApplier = (apiRef, group, callback) => {
|
|
11
|
-
const cleanup = React.useRef();
|
|
11
|
+
const cleanup = React.useRef(null);
|
|
12
12
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
13
13
|
const registerPreProcessor = React.useCallback(() => {
|
|
14
14
|
cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
|
|
@@ -8,7 +8,7 @@ exports.useGridRegisterPipeProcessor = void 0;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _useFirstRender = require("../../utils/useFirstRender");
|
|
10
10
|
const useGridRegisterPipeProcessor = (apiRef, group, callback) => {
|
|
11
|
-
const cleanup = React.useRef();
|
|
11
|
+
const cleanup = React.useRef(null);
|
|
12
12
|
const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
|
13
13
|
const registerPreProcessor = React.useCallback(() => {
|
|
14
14
|
cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
|
|
@@ -2,4 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
5
|
+
});
|
|
6
|
+
exports.GridStrategyGroup = void 0;
|
|
7
|
+
let GridStrategyGroup = exports.GridStrategyGroup = /*#__PURE__*/function (GridStrategyGroup) {
|
|
8
|
+
GridStrategyGroup["DataSource"] = "dataSource";
|
|
9
|
+
GridStrategyGroup["RowTree"] = "rowTree";
|
|
10
|
+
return GridStrategyGroup;
|
|
11
|
+
}({});
|
|
@@ -9,13 +9,15 @@ exports.useGridStrategyProcessing = exports.GRID_STRATEGIES_PROCESSORS = exports
|
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var _toPropertyKey2 = _interopRequireDefault(require("@babel/runtime/helpers/toPropertyKey"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _gridStrategyProcessingApi = require("./gridStrategyProcessingApi");
|
|
12
13
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
13
14
|
const GRID_DEFAULT_STRATEGY = exports.GRID_DEFAULT_STRATEGY = 'none';
|
|
14
15
|
const GRID_STRATEGIES_PROCESSORS = exports.GRID_STRATEGIES_PROCESSORS = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
dataSourceRowsUpdate: _gridStrategyProcessingApi.GridStrategyGroup.DataSource,
|
|
17
|
+
rowTreeCreation: _gridStrategyProcessingApi.GridStrategyGroup.RowTree,
|
|
18
|
+
filtering: _gridStrategyProcessingApi.GridStrategyGroup.RowTree,
|
|
19
|
+
sorting: _gridStrategyProcessingApi.GridStrategyGroup.RowTree,
|
|
20
|
+
visibleRowsLookupCreation: _gridStrategyProcessingApi.GridStrategyGroup.RowTree
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* Implements a variant of the Strategy Pattern (see https://en.wikipedia.org/wiki/Strategy_pattern)
|
|
@@ -52,10 +54,7 @@ const GRID_STRATEGIES_PROCESSORS = exports.GRID_STRATEGIES_PROCESSORS = {
|
|
|
52
54
|
* =====================================================================================================================
|
|
53
55
|
*
|
|
54
56
|
* Each processor name is part of a strategy group which can only have one active strategy at the time.
|
|
55
|
-
*
|
|
56
|
-
* - row tree creation algorithm.
|
|
57
|
-
* - sorting algorithm.
|
|
58
|
-
* - filtering algorithm.
|
|
57
|
+
* There are two active groups named `rowTree` and `dataSource`.
|
|
59
58
|
*/
|
|
60
59
|
const useGridStrategyProcessing = apiRef => {
|
|
61
60
|
const availableStrategies = React.useRef(new Map());
|
|
@@ -76,8 +76,8 @@ function createPublicAPI(privateApiRef) {
|
|
|
76
76
|
return publicApi;
|
|
77
77
|
}
|
|
78
78
|
function useGridApiInitialization(inputApiRef, props) {
|
|
79
|
-
const publicApiRef = React.useRef();
|
|
80
|
-
const privateApiRef = React.useRef();
|
|
79
|
+
const publicApiRef = React.useRef(null);
|
|
80
|
+
const privateApiRef = React.useRef(null);
|
|
81
81
|
if (!privateApiRef.current) {
|
|
82
82
|
privateApiRef.current = createPrivateAPI(publicApiRef);
|
|
83
83
|
}
|
|
@@ -32,8 +32,8 @@ const useGridStateInitialization = apiRef => {
|
|
|
32
32
|
const updatedControlStateIds = [];
|
|
33
33
|
Object.keys(controlStateMapRef.current).forEach(stateId => {
|
|
34
34
|
const controlState = controlStateMapRef.current[stateId];
|
|
35
|
-
const oldSubState = controlState.stateSelector(apiRef.current.state, apiRef.current.instanceId);
|
|
36
|
-
const newSubState = controlState.stateSelector(newState, apiRef.current.instanceId);
|
|
35
|
+
const oldSubState = controlState.stateSelector(apiRef.current.state, undefined, apiRef.current.instanceId);
|
|
36
|
+
const newSubState = controlState.stateSelector(newState, undefined, apiRef.current.instanceId);
|
|
37
37
|
if (newSubState === oldSubState) {
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
@@ -65,7 +65,7 @@ const useGridStateInitialization = apiRef => {
|
|
|
65
65
|
hasPropChanged
|
|
66
66
|
} = updatedControlStateIds[0];
|
|
67
67
|
const controlState = controlStateMapRef.current[stateId];
|
|
68
|
-
const model = controlState.stateSelector(newState, apiRef.current.instanceId);
|
|
68
|
+
const model = controlState.stateSelector(newState, undefined, apiRef.current.instanceId);
|
|
69
69
|
if (controlState.propOnChange && hasPropChanged) {
|
|
70
70
|
controlState.propOnChange(model, {
|
|
71
71
|
reason,
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
12
|
var _styles = require("@mui/material/styles");
|
|
13
|
-
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
14
13
|
var _utils = require("../../utils");
|
|
15
14
|
var _useGridRootProps = require("../../utils/useGridRootProps");
|
|
16
15
|
var _useGridPrivateApiContext = require("../../utils/useGridPrivateApiContext");
|
|
@@ -26,6 +25,8 @@ var _GridScrollbarFillerCell = require("../../../components/GridScrollbarFillerC
|
|
|
26
25
|
var _getPinnedCellOffset = require("../../../internals/utils/getPinnedCellOffset");
|
|
27
26
|
var _GridColumnHeaderSeparator = require("../../../components/columnHeaders/GridColumnHeaderSeparator");
|
|
28
27
|
var _gridClasses = require("../../../constants/gridClasses");
|
|
28
|
+
var _cellBorderUtils = require("../../../utils/cellBorderUtils");
|
|
29
|
+
var _constants = require("../../../internals/constants");
|
|
29
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
31
|
const GridColumnHeaderRow = exports.GridColumnHeaderRow = (0, _styles.styled)('div', {
|
|
31
32
|
name: 'MuiDataGrid',
|
|
@@ -52,10 +53,8 @@ const useGridColumnHeaders = props => {
|
|
|
52
53
|
const [dragCol, setDragCol] = React.useState('');
|
|
53
54
|
const [resizeCol, setResizeCol] = React.useState('');
|
|
54
55
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
55
|
-
const isRtl = (0, _RtlProvider.useRtl)();
|
|
56
56
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
57
57
|
const dimensions = (0, _utils.useGridSelector)(apiRef, _dimensions.gridDimensionsSelector);
|
|
58
|
-
const hasVirtualization = (0, _utils.useGridSelector)(apiRef, _virtualization.gridVirtualizationColumnEnabledSelector);
|
|
59
58
|
const columnGroupsModel = (0, _utils.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridColumnGroupsUnwrappedModelSelector);
|
|
60
59
|
const columnPositions = (0, _utils.useGridSelector)(apiRef, _columns.gridColumnPositionsSelector);
|
|
61
60
|
const renderContext = (0, _utils.useGridSelector)(apiRef, _virtualization.gridRenderContextColumnsSelector);
|
|
@@ -92,11 +91,10 @@ const useGridColumnHeaders = props => {
|
|
|
92
91
|
// Helper for computation common between getColumnHeaders and getColumnGroupHeaders
|
|
93
92
|
const getColumnsToRender = params => {
|
|
94
93
|
const {
|
|
95
|
-
renderContext: currentContext = renderContext
|
|
96
|
-
maxLastColumn = visibleColumns.length
|
|
94
|
+
renderContext: currentContext = renderContext
|
|
97
95
|
} = params || {};
|
|
98
96
|
const firstColumnToRender = currentContext.firstColumnIndex;
|
|
99
|
-
const lastColumnToRender =
|
|
97
|
+
const lastColumnToRender = currentContext.lastColumnIndex;
|
|
100
98
|
const renderedColumns = visibleColumns.slice(firstColumnToRender, lastColumnToRender);
|
|
101
99
|
return {
|
|
102
100
|
renderedColumns,
|
|
@@ -105,7 +103,7 @@ const useGridColumnHeaders = props => {
|
|
|
105
103
|
};
|
|
106
104
|
};
|
|
107
105
|
const getFillers = (params, children, leftOverflow, borderBottom = false) => {
|
|
108
|
-
const isPinnedRight = params?.position ===
|
|
106
|
+
const isPinnedRight = params?.position === _constants.PinnedColumnPosition.RIGHT;
|
|
109
107
|
const isNotPinned = params?.position === undefined;
|
|
110
108
|
const hasScrollbarFiller = pinnedColumns.right.length > 0 && isPinnedRight || pinnedColumns.right.length === 0 && isNotPinned;
|
|
111
109
|
const leftOffsetWidth = offsetLeft - leftOverflow;
|
|
@@ -126,33 +124,6 @@ const useGridColumnHeaders = props => {
|
|
|
126
124
|
})]
|
|
127
125
|
});
|
|
128
126
|
};
|
|
129
|
-
const getCellOffsetStyle = ({
|
|
130
|
-
pinnedPosition,
|
|
131
|
-
columnIndex,
|
|
132
|
-
computedWidth
|
|
133
|
-
}) => {
|
|
134
|
-
let style;
|
|
135
|
-
const isLeftPinned = pinnedPosition === _columns.GridPinnedColumnPosition.LEFT;
|
|
136
|
-
const isRightPinned = pinnedPosition === _columns.GridPinnedColumnPosition.RIGHT;
|
|
137
|
-
if (isLeftPinned || isRightPinned) {
|
|
138
|
-
const pinnedOffset = (0, _getPinnedCellOffset.getPinnedCellOffset)(pinnedPosition, computedWidth, columnIndex, columnPositions, dimensions);
|
|
139
|
-
let side = isLeftPinned ? 'left' : 'right';
|
|
140
|
-
if (isRtl) {
|
|
141
|
-
side = isLeftPinned ? 'right' : 'left';
|
|
142
|
-
}
|
|
143
|
-
if (pinnedPosition === 'left') {
|
|
144
|
-
style = {
|
|
145
|
-
[side]: pinnedOffset
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
if (pinnedPosition === 'right') {
|
|
149
|
-
style = {
|
|
150
|
-
[side]: pinnedOffset
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return style;
|
|
155
|
-
};
|
|
156
127
|
const getColumnHeaders = (params, other = {}) => {
|
|
157
128
|
const {
|
|
158
129
|
renderedColumns,
|
|
@@ -167,14 +138,15 @@ const useGridColumnHeaders = props => {
|
|
|
167
138
|
const hasFocus = columnHeaderFocus !== null && columnHeaderFocus.field === colDef.field;
|
|
168
139
|
const open = columnMenuState.open && columnMenuState.field === colDef.field;
|
|
169
140
|
const pinnedPosition = params?.position;
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
computedWidth: colDef.computedWidth
|
|
174
|
-
});
|
|
175
|
-
const siblingWithBorderingSeparator = pinnedPosition === _columns.GridPinnedColumnPosition.RIGHT ? renderedColumns[i - 1] : renderedColumns[i + 1];
|
|
141
|
+
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
142
|
+
const pinnedOffset = (0, _getPinnedCellOffset.getPinnedCellOffset)(pinnedPosition, colDef.computedWidth, columnIndex, columnPositions, dimensions.columnsTotalWidth, scrollbarWidth);
|
|
143
|
+
const siblingWithBorderingSeparator = pinnedPosition === _constants.PinnedColumnPosition.RIGHT ? renderedColumns[i - 1] : renderedColumns[i + 1];
|
|
176
144
|
const isSiblingFocused = siblingWithBorderingSeparator ? columnHeaderFocus !== null && columnHeaderFocus.field === siblingWithBorderingSeparator.field : false;
|
|
177
145
|
const isLastUnpinned = columnIndex + 1 === columnPositions.length - pinnedColumns.right.length;
|
|
146
|
+
const indexInSection = i;
|
|
147
|
+
const sectionLength = renderedColumns.length;
|
|
148
|
+
const showLeftBorder = (0, _cellBorderUtils.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
149
|
+
const showRightBorder = (0, _cellBorderUtils.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
178
150
|
columns.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnHeaderItem.GridColumnHeaderItem, (0, _extends2.default)({}, sortColumnLookup[colDef.field], {
|
|
179
151
|
columnMenuOpen: open,
|
|
180
152
|
filterItemsCounter: filterColumnLookup[colDef.field] && filterColumnLookup[colDef.field].length,
|
|
@@ -187,12 +159,11 @@ const useGridColumnHeaders = props => {
|
|
|
187
159
|
hasFocus: hasFocus,
|
|
188
160
|
tabIndex: tabIndex,
|
|
189
161
|
pinnedPosition: pinnedPosition,
|
|
190
|
-
|
|
191
|
-
indexInSection: i,
|
|
192
|
-
sectionLength: renderedColumns.length,
|
|
193
|
-
gridHasFiller: gridHasFiller,
|
|
162
|
+
pinnedOffset: pinnedOffset,
|
|
194
163
|
isLastUnpinned: isLastUnpinned,
|
|
195
|
-
isSiblingFocused: isSiblingFocused
|
|
164
|
+
isSiblingFocused: isSiblingFocused,
|
|
165
|
+
showLeftBorder: showLeftBorder,
|
|
166
|
+
showRightBorder: showRightBorder
|
|
196
167
|
}, other), colDef.field));
|
|
197
168
|
}
|
|
198
169
|
return getFillers(params, columns, 0);
|
|
@@ -204,18 +175,15 @@ const useGridColumnHeaders = props => {
|
|
|
204
175
|
ownerState: rootProps,
|
|
205
176
|
className: _gridClasses.gridClasses['row--borderBottom'],
|
|
206
177
|
children: [leftRenderContext && getColumnHeaders({
|
|
207
|
-
position:
|
|
208
|
-
renderContext: leftRenderContext
|
|
209
|
-
maxLastColumn: leftRenderContext.lastColumnIndex
|
|
178
|
+
position: _constants.PinnedColumnPosition.LEFT,
|
|
179
|
+
renderContext: leftRenderContext
|
|
210
180
|
}, {
|
|
211
181
|
disableReorder: true
|
|
212
182
|
}), getColumnHeaders({
|
|
213
|
-
renderContext
|
|
214
|
-
maxLastColumn: visibleColumns.length - pinnedColumns.right.length
|
|
183
|
+
renderContext
|
|
215
184
|
}), rightRenderContext && getColumnHeaders({
|
|
216
|
-
position:
|
|
217
|
-
renderContext: rightRenderContext
|
|
218
|
-
maxLastColumn: rightRenderContext.lastColumnIndex
|
|
185
|
+
position: _constants.PinnedColumnPosition.RIGHT,
|
|
186
|
+
renderContext: rightRenderContext
|
|
219
187
|
}, {
|
|
220
188
|
disableReorder: true,
|
|
221
189
|
separatorSide: _GridColumnHeaderSeparator.GridColumnHeaderSeparatorSides.Left
|
|
@@ -274,14 +242,11 @@ const useGridColumnHeaders = props => {
|
|
|
274
242
|
tabIndex
|
|
275
243
|
};
|
|
276
244
|
const pinnedPosition = params.position;
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
columnIndex,
|
|
280
|
-
computedWidth: headerInfo.width
|
|
281
|
-
});
|
|
245
|
+
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
246
|
+
const pinnedOffset = (0, _getPinnedCellOffset.getPinnedCellOffset)(pinnedPosition, headerInfo.width, columnIndex, columnPositions, dimensions.columnsTotalWidth, scrollbarWidth);
|
|
282
247
|
columnIndex += columnFields.length;
|
|
283
248
|
let indexInSection = index;
|
|
284
|
-
if (pinnedPosition ===
|
|
249
|
+
if (pinnedPosition === _constants.PinnedColumnPosition.LEFT) {
|
|
285
250
|
// Group headers can expand to multiple columns, we need to adjust the index
|
|
286
251
|
indexInSection = columnIndex - 1;
|
|
287
252
|
}
|
|
@@ -291,16 +256,15 @@ const useGridColumnHeaders = props => {
|
|
|
291
256
|
fields: headerInfo.fields,
|
|
292
257
|
colIndex: headerInfo.colIndex,
|
|
293
258
|
depth: depth,
|
|
294
|
-
isLastColumn:
|
|
259
|
+
isLastColumn: index === visibleColumnGroupHeader.length - 1,
|
|
295
260
|
maxDepth: headerGroupingMaxDepth,
|
|
296
261
|
height: dimensions.groupHeaderHeight,
|
|
297
262
|
hasFocus: hasFocus,
|
|
298
263
|
tabIndex: tabIndex,
|
|
299
264
|
pinnedPosition: pinnedPosition,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
gridHasFiller: gridHasFiller
|
|
265
|
+
pinnedOffset: pinnedOffset,
|
|
266
|
+
showLeftBorder: (0, _cellBorderUtils.shouldCellShowLeftBorder)(pinnedPosition, indexInSection),
|
|
267
|
+
showRightBorder: (0, _cellBorderUtils.shouldCellShowRightBorder)(pinnedPosition, indexInSection, visibleColumnGroupHeader.length, rootProps.showCellVerticalBorder, gridHasFiller)
|
|
304
268
|
}, index);
|
|
305
269
|
});
|
|
306
270
|
return getFillers(params, children, leftOverflow);
|
|
@@ -318,7 +282,7 @@ const useGridColumnHeaders = props => {
|
|
|
318
282
|
children: [leftRenderContext && getColumnGroupHeaders({
|
|
319
283
|
depth,
|
|
320
284
|
params: {
|
|
321
|
-
position:
|
|
285
|
+
position: _constants.PinnedColumnPosition.LEFT,
|
|
322
286
|
renderContext: leftRenderContext,
|
|
323
287
|
maxLastColumn: leftRenderContext.lastColumnIndex
|
|
324
288
|
}
|
|
@@ -330,7 +294,7 @@ const useGridColumnHeaders = props => {
|
|
|
330
294
|
}), rightRenderContext && getColumnGroupHeaders({
|
|
331
295
|
depth,
|
|
332
296
|
params: {
|
|
333
|
-
position:
|
|
297
|
+
position: _constants.PinnedColumnPosition.RIGHT,
|
|
334
298
|
renderContext: rightRenderContext,
|
|
335
299
|
maxLastColumn: rightRenderContext.lastColumnIndex
|
|
336
300
|
}
|
|
@@ -345,11 +309,12 @@ const useGridColumnHeaders = props => {
|
|
|
345
309
|
rightRenderContext,
|
|
346
310
|
pinnedColumns,
|
|
347
311
|
visibleColumns,
|
|
348
|
-
|
|
312
|
+
columnPositions,
|
|
349
313
|
getFillers,
|
|
350
314
|
getColumnHeadersRow,
|
|
351
315
|
getColumnsToRender,
|
|
352
316
|
getColumnGroupHeadersRows,
|
|
317
|
+
getPinnedCellOffset: _getPinnedCellOffset.getPinnedCellOffset,
|
|
353
318
|
isDragging: !!dragCol,
|
|
354
319
|
getInnerProps: () => ({
|
|
355
320
|
role: 'rowgroup'
|
|
@@ -49,7 +49,6 @@ const useGridColumnMenu = apiRef => {
|
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
apiRef.current.hidePreferences();
|
|
52
|
-
apiRef.current.forceUpdate();
|
|
53
52
|
}
|
|
54
53
|
}, [apiRef, logger]);
|
|
55
54
|
const hideColumnMenu = React.useCallback(() => {
|
|
@@ -91,7 +90,6 @@ const useGridColumnMenu = apiRef => {
|
|
|
91
90
|
columnMenu: newState
|
|
92
91
|
});
|
|
93
92
|
});
|
|
94
|
-
apiRef.current.forceUpdate();
|
|
95
93
|
}
|
|
96
94
|
}, [apiRef, logger]);
|
|
97
95
|
const toggleColumnMenu = React.useCallback(field => {
|
|
@@ -78,7 +78,7 @@ function preventClick(event) {
|
|
|
78
78
|
* is disabled.
|
|
79
79
|
*/
|
|
80
80
|
function useColumnVirtualizationDisabled(apiRef) {
|
|
81
|
-
const promise = React.useRef();
|
|
81
|
+
const promise = React.useRef(undefined);
|
|
82
82
|
const selector = () => (0, _virtualization.gridVirtualizationColumnEnabledSelector)(apiRef);
|
|
83
83
|
const value = (0, _utils2.useGridSelector)(apiRef, selector);
|
|
84
84
|
React.useEffect(() => {
|
|
@@ -193,10 +193,10 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
193
193
|
// To improve accessibility, the separator has padding on both sides.
|
|
194
194
|
// Clicking inside the padding area should be treated as a click in the separator.
|
|
195
195
|
// This ref stores the offset between the click and the separator.
|
|
196
|
-
const initialOffsetToSeparator = React.useRef();
|
|
197
|
-
const resizeDirection = React.useRef();
|
|
196
|
+
const initialOffsetToSeparator = React.useRef(null);
|
|
197
|
+
const resizeDirection = React.useRef(null);
|
|
198
198
|
const stopResizeEventTimeout = (0, _useTimeout.useTimeout)();
|
|
199
|
-
const touchId = React.useRef();
|
|
199
|
+
const touchId = React.useRef(undefined);
|
|
200
200
|
const updateWidth = newWidth => {
|
|
201
201
|
logger.debug(`Updating width to ${newWidth} for col ${refs.colDef.field}`);
|
|
202
202
|
const prevWidth = refs.columnHeaderElement.offsetWidth;
|
|
@@ -469,6 +469,7 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
apiRef.current.autosizeColumns((0, _extends2.default)({}, props.autosizeOptions, {
|
|
472
|
+
disableColumnVirtualization: false,
|
|
472
473
|
columns: [column.field]
|
|
473
474
|
}));
|
|
474
475
|
});
|
|
@@ -495,17 +496,21 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
495
496
|
options.columns = options.columns.filter(c => state.columnVisibilityModel[c] !== false);
|
|
496
497
|
const columns = options.columns.map(c => apiRef.current.state.columns.lookup[c]);
|
|
497
498
|
try {
|
|
498
|
-
|
|
499
|
-
|
|
499
|
+
if (!props.disableVirtualization && options.disableColumnVirtualization) {
|
|
500
|
+
apiRef.current.unstable_setColumnVirtualization(false);
|
|
501
|
+
await columnVirtualizationDisabled();
|
|
502
|
+
}
|
|
500
503
|
const widthByField = extractColumnWidths(apiRef, options, columns);
|
|
501
504
|
const newColumns = columns.map(column => (0, _extends2.default)({}, column, {
|
|
502
505
|
width: widthByField[column.field],
|
|
503
|
-
computedWidth: widthByField[column.field]
|
|
506
|
+
computedWidth: widthByField[column.field],
|
|
507
|
+
flex: 0
|
|
504
508
|
}));
|
|
505
509
|
if (options.expand) {
|
|
506
510
|
const visibleColumns = state.orderedFields.map(field => state.lookup[field]).filter(c => state.columnVisibilityModel[c.field] !== false);
|
|
507
511
|
const totalWidth = visibleColumns.reduce((total, column) => total + (widthByField[column.field] ?? column.computedWidth ?? column.width), 0);
|
|
508
|
-
const
|
|
512
|
+
const dimensions = apiRef.current.getRootDimensions();
|
|
513
|
+
const availableWidth = dimensions.viewportInnerSize.width;
|
|
509
514
|
const remainingWidth = availableWidth - totalWidth;
|
|
510
515
|
if (remainingWidth > 0) {
|
|
511
516
|
const widthPerColumn = remainingWidth / (newColumns.length || 1);
|
|
@@ -527,10 +532,12 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
527
532
|
}
|
|
528
533
|
});
|
|
529
534
|
} finally {
|
|
530
|
-
|
|
535
|
+
if (!props.disableVirtualization) {
|
|
536
|
+
apiRef.current.unstable_setColumnVirtualization(true);
|
|
537
|
+
}
|
|
531
538
|
isAutosizingRef.current = false;
|
|
532
539
|
}
|
|
533
|
-
}, [apiRef, columnVirtualizationDisabled]);
|
|
540
|
+
}, [apiRef, columnVirtualizationDisabled, props.disableVirtualization]);
|
|
534
541
|
|
|
535
542
|
/**
|
|
536
543
|
* EFFECTS
|
|
@@ -334,6 +334,7 @@ function getTotalHeaderHeight(apiRef, props) {
|
|
|
334
334
|
const maxDepth = (0, _gridColumnGroupsSelector.gridColumnGroupsHeaderMaxDepthSelector)(apiRef);
|
|
335
335
|
const isHeaderFilteringEnabled = (0, _gridHeaderFilteringSelectors.gridHeaderFilteringEnabledSelector)(apiRef);
|
|
336
336
|
const columnHeadersHeight = Math.floor(props.columnHeaderHeight * densityFactor);
|
|
337
|
+
const columnGroupHeadersHeight = Math.floor((props.columnGroupHeaderHeight ?? props.columnHeaderHeight) * densityFactor);
|
|
337
338
|
const filterHeadersHeight = isHeaderFilteringEnabled ? Math.floor((props.headerFilterHeight ?? props.columnHeaderHeight) * densityFactor) : 0;
|
|
338
|
-
return columnHeadersHeight
|
|
339
|
+
return columnHeadersHeight + columnGroupHeadersHeight * maxDepth + filterHeadersHeight;
|
|
339
340
|
}
|
|
@@ -252,9 +252,13 @@ function useGridColumns(apiRef, props) {
|
|
|
252
252
|
*/
|
|
253
253
|
|
|
254
254
|
const prevInnerWidth = React.useRef(null);
|
|
255
|
-
const handleGridSizeChange =
|
|
256
|
-
if (prevInnerWidth.current !==
|
|
257
|
-
prevInnerWidth.current =
|
|
255
|
+
const handleGridSizeChange = size => {
|
|
256
|
+
if (prevInnerWidth.current !== size.width) {
|
|
257
|
+
prevInnerWidth.current = size.width;
|
|
258
|
+
const hasFlexColumns = (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef).some(col => col.flex && col.flex > 0);
|
|
259
|
+
if (!hasFlexColumns) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
258
262
|
setGridColumnsState((0, _gridColumnsUtils.hydrateColumnsWidth)((0, _gridColumnsSelector.gridColumnsStateSelector)(apiRef.current.state), apiRef.current.getRootDimensions()));
|
|
259
263
|
}
|
|
260
264
|
};
|
|
@@ -24,6 +24,8 @@ var _gridRowsMetaSelector = require("../rows/gridRowsMetaSelector");
|
|
|
24
24
|
var _gridRowsUtils = require("../rows/gridRowsUtils");
|
|
25
25
|
var _gridColumnsUtils = require("../columns/gridColumnsUtils");
|
|
26
26
|
var _dataGridPropsDefaultValues = require("../../../constants/dataGridPropsDefaultValues");
|
|
27
|
+
var _roundToDecimalPlaces = require("../../../utils/roundToDecimalPlaces");
|
|
28
|
+
var _isJSDOM = require("../../../utils/isJSDOM");
|
|
27
29
|
const EMPTY_SIZE = {
|
|
28
30
|
width: 0,
|
|
29
31
|
height: 0
|
|
@@ -70,34 +72,19 @@ function useGridDimensions(apiRef, props) {
|
|
|
70
72
|
const headerHeight = Math.floor(props.columnHeaderHeight * densityFactor);
|
|
71
73
|
const groupHeaderHeight = Math.floor((props.columnGroupHeaderHeight ?? props.columnHeaderHeight) * densityFactor);
|
|
72
74
|
const headerFilterHeight = Math.floor((props.headerFilterHeight ?? props.columnHeaderHeight) * densityFactor);
|
|
73
|
-
const columnsTotalWidth = roundToDecimalPlaces((0, _columns.gridColumnsTotalWidthSelector)(apiRef),
|
|
75
|
+
const columnsTotalWidth = (0, _roundToDecimalPlaces.roundToDecimalPlaces)((0, _columns.gridColumnsTotalWidthSelector)(apiRef), 1);
|
|
74
76
|
const headersTotalHeight = (0, _gridColumnsUtils.getTotalHeaderHeight)(apiRef, props);
|
|
75
77
|
const leftPinnedWidth = pinnedColumns.left.reduce((w, col) => w + col.computedWidth, 0);
|
|
76
78
|
const rightPinnedWidth = pinnedColumns.right.reduce((w, col) => w + col.computedWidth, 0);
|
|
77
79
|
const [savedSize, setSavedSize] = React.useState();
|
|
78
80
|
const debouncedSetSavedSize = React.useMemo(() => (0, _throttle.throttle)(setSavedSize, props.resizeThrottleMs), [props.resizeThrottleMs]);
|
|
79
|
-
|
|
81
|
+
React.useEffect(() => debouncedSetSavedSize.clear, [debouncedSetSavedSize]);
|
|
80
82
|
const getRootDimensions = () => apiRef.current.state.dimensions;
|
|
81
83
|
const setDimensions = (0, _utils.unstable_useEventCallback)(dimensions => {
|
|
82
84
|
apiRef.current.setState(state => (0, _extends2.default)({}, state, {
|
|
83
85
|
dimensions
|
|
84
86
|
}));
|
|
85
87
|
});
|
|
86
|
-
const resize = React.useCallback(() => {
|
|
87
|
-
const element = apiRef.current.mainElementRef.current;
|
|
88
|
-
if (!element) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const computedStyle = (0, _utils.unstable_ownerWindow)(element).getComputedStyle(element);
|
|
92
|
-
const newSize = {
|
|
93
|
-
width: parseFloat(computedStyle.width) || 0,
|
|
94
|
-
height: parseFloat(computedStyle.height) || 0
|
|
95
|
-
};
|
|
96
|
-
if (!previousSize.current || !areElementSizesEqual(previousSize.current, newSize)) {
|
|
97
|
-
apiRef.current.publishEvent('resize', newSize);
|
|
98
|
-
previousSize.current = newSize;
|
|
99
|
-
}
|
|
100
|
-
}, [apiRef]);
|
|
101
88
|
const getViewportPageSize = React.useCallback(() => {
|
|
102
89
|
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
|
|
103
90
|
if (!dimensions.isReady) {
|
|
@@ -119,15 +106,17 @@ function useGridDimensions(apiRef, props) {
|
|
|
119
106
|
return Math.min(maximumPageSizeWithoutScrollBar, currentPage.rows.length);
|
|
120
107
|
}, [apiRef, props.pagination, props.paginationMode, props.getRowHeight, rowHeight]);
|
|
121
108
|
const updateDimensions = React.useCallback(() => {
|
|
109
|
+
// All the floating point dimensions should be rounded to .1 decimal places to avoid subpixel rendering issues
|
|
110
|
+
// https://github.com/mui/mui-x/issues/9550#issuecomment-1619020477
|
|
111
|
+
// https://github.com/mui/mui-x/issues/15721
|
|
122
112
|
const rootElement = apiRef.current.rootElementRef.current;
|
|
123
113
|
const pinnedRowsHeight = (0, _gridRowsUtils.calculatePinnedRowsHeight)(apiRef);
|
|
124
114
|
const scrollbarSize = measureScrollbarSize(rootElement, columnsTotalWidth, props.scrollbarSize);
|
|
125
115
|
const topContainerHeight = headersTotalHeight + pinnedRowsHeight.top;
|
|
126
116
|
const bottomContainerHeight = pinnedRowsHeight.bottom;
|
|
127
|
-
const nonPinnedColumnsTotalWidth = columnsTotalWidth - leftPinnedWidth - rightPinnedWidth;
|
|
128
117
|
const contentSize = {
|
|
129
|
-
width:
|
|
130
|
-
height: rowsMeta.currentPageTotalHeight
|
|
118
|
+
width: columnsTotalWidth,
|
|
119
|
+
height: (0, _roundToDecimalPlaces.roundToDecimalPlaces)(rowsMeta.currentPageTotalHeight, 1)
|
|
131
120
|
};
|
|
132
121
|
let viewportOuterSize;
|
|
133
122
|
let viewportInnerSize;
|
|
@@ -150,7 +139,7 @@ function useGridDimensions(apiRef, props) {
|
|
|
150
139
|
height: rootDimensionsRef.current.height
|
|
151
140
|
};
|
|
152
141
|
viewportInnerSize = {
|
|
153
|
-
width: Math.max(0, viewportOuterSize.width
|
|
142
|
+
width: Math.max(0, viewportOuterSize.width),
|
|
154
143
|
height: Math.max(0, viewportOuterSize.height - topContainerHeight - bottomContainerHeight)
|
|
155
144
|
};
|
|
156
145
|
const content = contentSize;
|
|
@@ -208,7 +197,6 @@ function useGridDimensions(apiRef, props) {
|
|
|
208
197
|
apiRef.current.updateRenderContext?.();
|
|
209
198
|
}, [apiRef, setDimensions, props.scrollbarSize, props.autoHeight, rowsMeta.currentPageTotalHeight, rowHeight, headerHeight, groupHeaderHeight, headerFilterHeight, columnsTotalWidth, headersTotalHeight, leftPinnedWidth, rightPinnedWidth]);
|
|
210
199
|
const apiPublic = {
|
|
211
|
-
resize,
|
|
212
200
|
getRootDimensions
|
|
213
201
|
};
|
|
214
202
|
const apiPrivate = {
|
|
@@ -246,14 +234,11 @@ function useGridDimensions(apiRef, props) {
|
|
|
246
234
|
const isFirstSizing = React.useRef(true);
|
|
247
235
|
const handleResize = React.useCallback(size => {
|
|
248
236
|
rootDimensionsRef.current = size;
|
|
249
|
-
|
|
250
|
-
// jsdom has no layout capabilities
|
|
251
|
-
const isJSDOM = /jsdom/.test(window.navigator.userAgent);
|
|
252
|
-
if (size.height === 0 && !errorShown.current && !props.autoHeight && !isJSDOM) {
|
|
237
|
+
if (size.height === 0 && !errorShown.current && !props.autoHeight && !_isJSDOM.isJSDOM) {
|
|
253
238
|
logger.error(['The parent DOM element of the Data Grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
254
239
|
errorShown.current = true;
|
|
255
240
|
}
|
|
256
|
-
if (size.width === 0 && !errorShown.current && !isJSDOM) {
|
|
241
|
+
if (size.width === 0 && !errorShown.current && !_isJSDOM.isJSDOM) {
|
|
257
242
|
logger.error(['The parent DOM element of the Data Grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
258
243
|
errorShown.current = true;
|
|
259
244
|
}
|
|
@@ -291,12 +276,6 @@ function measureScrollbarSize(rootElement, columnsTotalWidth, scrollbarSize) {
|
|
|
291
276
|
rootElement.removeChild(scrollDiv);
|
|
292
277
|
return size;
|
|
293
278
|
}
|
|
294
|
-
|
|
295
|
-
// Get rid of floating point imprecision errors
|
|
296
|
-
// https://github.com/mui/mui-x/issues/9550#issuecomment-1619020477
|
|
297
|
-
function roundToDecimalPlaces(value, decimals) {
|
|
298
|
-
return Math.round(value * 10 ** decimals) / 10 ** decimals;
|
|
299
|
-
}
|
|
300
279
|
function areElementSizesEqual(a, b) {
|
|
301
280
|
return a.width === b.width && a.height === b.height;
|
|
302
281
|
}
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.gridEditRowsStateSelector = void 0;
|
|
6
|
+
exports.gridRowIsEditingSelector = exports.gridEditRowsStateSelector = exports.gridEditCellStateSelector = void 0;
|
|
7
|
+
var _createSelector = require("../../../utils/createSelector");
|
|
7
8
|
/**
|
|
8
9
|
* Select the row editing state.
|
|
9
10
|
*/
|
|
10
11
|
const gridEditRowsStateSelector = state => state.editRows;
|
|
11
|
-
exports.gridEditRowsStateSelector = gridEditRowsStateSelector;
|
|
12
|
+
exports.gridEditRowsStateSelector = gridEditRowsStateSelector;
|
|
13
|
+
const gridRowIsEditingSelector = exports.gridRowIsEditingSelector = (0, _createSelector.createSelector)(gridEditRowsStateSelector, (editRows, rowId) => Boolean(editRows[rowId]));
|
|
14
|
+
const gridEditCellStateSelector = exports.gridEditCellStateSelector = (0, _createSelector.createSelector)(gridEditRowsStateSelector, (editRows, {
|
|
15
|
+
rowId,
|
|
16
|
+
field
|
|
17
|
+
}) => editRows[rowId]?.[field] ?? null);
|
|
@@ -346,7 +346,7 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
346
346
|
if (onProcessRowUpdateError) {
|
|
347
347
|
onProcessRowUpdateError(errorThrown);
|
|
348
348
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
349
|
-
(0, _warning.warnOnce)(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing
|
|
349
|
+
(0, _warning.warnOnce)(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
352
|
try {
|
|
@@ -450,7 +450,7 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
450
450
|
|
|
451
451
|
// Run this effect synchronously so that the keyboard event can impact the yet-to-be-rendered input.
|
|
452
452
|
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
453
|
-
const
|
|
453
|
+
const rowsLookup = (0, _gridRowsSelector.gridRowsLookupSelector)(apiRef);
|
|
454
454
|
|
|
455
455
|
// Update the ref here because updateStateToStopCellEditMode may change it later
|
|
456
456
|
const copyOfPrevCellModes = prevCellModesModel.current;
|
|
@@ -459,7 +459,7 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
459
459
|
Object.entries(cellModesModel).forEach(([id, fields]) => {
|
|
460
460
|
Object.entries(fields).forEach(([field, params]) => {
|
|
461
461
|
const prevMode = copyOfPrevCellModes[id]?.[field]?.mode || _gridEditRowModel.GridCellModes.View;
|
|
462
|
-
const originalId =
|
|
462
|
+
const originalId = rowsLookup[id] ? apiRef.current.getRowId(rowsLookup[id]) : id;
|
|
463
463
|
if (params.mode === _gridEditRowModel.GridCellModes.Edit && prevMode === _gridEditRowModel.GridCellModes.View) {
|
|
464
464
|
updateStateToStartCellEditMode((0, _extends2.default)({
|
|
465
465
|
id: originalId,
|