@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
package/components/GridRow.js
CHANGED
|
@@ -1,32 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "
|
|
5
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetLeft", "columnsTotalWidth", "firstColumnIndex", "lastColumnIndex", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "scrollbarWidth", "gridHasFiller", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import clsx from 'clsx';
|
|
7
9
|
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
10
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
9
|
-
import {
|
|
11
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
12
|
+
import { isObjectEmpty } from '@mui/x-internals/isObjectEmpty';
|
|
13
|
+
import { GridEditModes, GridCellModes } from "../models/gridEditRowModel.js";
|
|
10
14
|
import { gridClasses } from "../constants/gridClasses.js";
|
|
11
15
|
import { composeGridClasses } from "../utils/composeGridClasses.js";
|
|
12
16
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
17
|
+
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../utils/cellBorderUtils.js";
|
|
13
18
|
import { gridColumnPositionsSelector } from "../hooks/features/columns/gridColumnsSelector.js";
|
|
14
19
|
import { useGridSelector, objectShallowCompare } from "../hooks/utils/useGridSelector.js";
|
|
15
20
|
import { useGridVisibleRows } from "../hooks/utils/useGridVisibleRows.js";
|
|
16
21
|
import { findParentElementFromClassName, isEventTargetInPortal } from "../utils/domUtils.js";
|
|
17
22
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from "../colDef/gridCheckboxSelectionColDef.js";
|
|
18
23
|
import { GRID_ACTIONS_COLUMN_TYPE } from "../colDef/gridActionsColDef.js";
|
|
19
|
-
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from "../internals/constants.js";
|
|
24
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, PinnedColumnPosition } from "../internals/constants.js";
|
|
20
25
|
import { gridSortModelSelector } from "../hooks/features/sorting/gridSortingSelector.js";
|
|
21
26
|
import { gridRowMaximumTreeDepthSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
22
|
-
import { gridEditRowsStateSelector } from "../hooks/features/editing/gridEditingSelectors.js";
|
|
23
|
-
import { PinnedPosition, gridPinnedColumnPositionLookup } from "./cell/GridCell.js";
|
|
27
|
+
import { gridEditRowsStateSelector, gridRowIsEditingSelector } from "../hooks/features/editing/gridEditingSelectors.js";
|
|
24
28
|
import { GridScrollbarFillerCell as ScrollbarFiller } from "./GridScrollbarFillerCell.js";
|
|
25
29
|
import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
|
|
26
30
|
import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
|
|
27
31
|
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
32
|
+
import { createSelector } from "../utils/createSelector.js";
|
|
28
33
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
const
|
|
34
|
+
const isRowReorderingEnabledSelector = createSelector(gridEditRowsStateSelector, (editRows, rowReordering) => {
|
|
35
|
+
if (!rowReordering) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
const isEditingRows = !isObjectEmpty(editRows);
|
|
39
|
+
return !isEditingRows;
|
|
40
|
+
});
|
|
41
|
+
const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
30
42
|
const {
|
|
31
43
|
selected,
|
|
32
44
|
rowId,
|
|
@@ -38,13 +50,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
38
50
|
visibleColumns,
|
|
39
51
|
pinnedColumns,
|
|
40
52
|
offsetLeft,
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
columnsTotalWidth,
|
|
54
|
+
firstColumnIndex,
|
|
55
|
+
lastColumnIndex,
|
|
43
56
|
focusedColumnIndex,
|
|
44
57
|
isFirstVisible,
|
|
45
58
|
isLastVisible,
|
|
46
59
|
isNotVisible,
|
|
47
60
|
showBottomBorder,
|
|
61
|
+
scrollbarWidth,
|
|
62
|
+
gridHasFiller,
|
|
48
63
|
onClick,
|
|
49
64
|
onDoubleClick,
|
|
50
65
|
onMouseEnter,
|
|
@@ -61,16 +76,18 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
61
76
|
const sortModel = useGridSelector(apiRef, gridSortModelSelector);
|
|
62
77
|
const treeDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);
|
|
63
78
|
const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
|
|
64
|
-
const
|
|
79
|
+
const rowReordering = rootProps.rowReordering;
|
|
80
|
+
const isRowReorderingEnabled = useGridSelector(apiRef, isRowReorderingEnabledSelector, rowReordering);
|
|
65
81
|
const handleRef = useForkRef(ref, refProp);
|
|
66
82
|
const rowNode = apiRef.current.getRowNode(rowId);
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
const editing = useGridSelector(apiRef, gridRowIsEditingSelector, {
|
|
84
|
+
rowId,
|
|
85
|
+
editMode: rootProps.editMode
|
|
86
|
+
});
|
|
70
87
|
const editable = rootProps.editMode === GridEditModes.Row;
|
|
71
88
|
const hasFocusCell = focusedColumnIndex !== undefined;
|
|
72
|
-
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex <
|
|
73
|
-
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >=
|
|
89
|
+
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < firstColumnIndex;
|
|
90
|
+
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= lastColumnIndex;
|
|
74
91
|
const classes = composeGridClasses(rootProps.classes, {
|
|
75
92
|
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', showBottomBorder && 'row--borderBottom', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
76
93
|
});
|
|
@@ -143,8 +160,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
143
160
|
slotProps,
|
|
144
161
|
disableColumnReorder
|
|
145
162
|
} = rootProps;
|
|
146
|
-
const
|
|
147
|
-
const heightEntry = useGridSelector(apiRef, () => _extends({}, apiRef.current.getRowHeightEntry(rowId)), objectShallowCompare);
|
|
163
|
+
const heightEntry = useGridSelector(apiRef, () => _extends({}, apiRef.current.getRowHeightEntry(rowId)), undefined, objectShallowCompare);
|
|
148
164
|
const style = React.useMemo(() => {
|
|
149
165
|
if (isNotVisible) {
|
|
150
166
|
return {
|
|
@@ -186,14 +202,19 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
186
202
|
});
|
|
187
203
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
188
204
|
}
|
|
189
|
-
|
|
205
|
+
|
|
206
|
+
/* Start of rendering */
|
|
207
|
+
if (!rowNode) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedColumnPosition.NONE) => {
|
|
190
211
|
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
191
212
|
if (cellColSpanInfo?.spannedByColSpan) {
|
|
192
213
|
return null;
|
|
193
214
|
}
|
|
194
215
|
const width = cellColSpanInfo?.cellProps.width ?? column.computedWidth;
|
|
195
216
|
const colSpan = cellColSpanInfo?.cellProps.colSpan ?? 1;
|
|
196
|
-
const pinnedOffset = getPinnedCellOffset(
|
|
217
|
+
const pinnedOffset = getPinnedCellOffset(pinnedPosition, column.computedWidth, indexRelativeToAllColumns, columnPositions, columnsTotalWidth, scrollbarWidth);
|
|
197
218
|
if (rowNode?.type === 'skeletonRow') {
|
|
198
219
|
return /*#__PURE__*/_jsx(slots.skeletonCell, {
|
|
199
220
|
type: column.type,
|
|
@@ -203,16 +224,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
203
224
|
align: column.align
|
|
204
225
|
}, column.field);
|
|
205
226
|
}
|
|
206
|
-
const editCellState = editRowsState[rowId]?.[column.field] ?? null;
|
|
207
227
|
|
|
208
228
|
// when the cell is a reorder cell we are not allowing to reorder the col
|
|
209
229
|
// fixes https://github.com/mui/mui-x/issues/11126
|
|
210
230
|
const isReorderCell = column.field === '__reorder__';
|
|
211
|
-
const isEditingRows = Object.keys(editRowsState).length > 0;
|
|
212
231
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
213
|
-
const canReorderRow =
|
|
232
|
+
const canReorderRow = isRowReorderingEnabled && !sortModel.length && treeDepth <= 1;
|
|
214
233
|
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
215
|
-
const cellIsNotVisible = pinnedPosition ===
|
|
234
|
+
const cellIsNotVisible = pinnedPosition === PinnedColumnPosition.VIRTUAL;
|
|
235
|
+
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
236
|
+
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
216
237
|
return /*#__PURE__*/_jsx(slots.cell, _extends({
|
|
217
238
|
column: column,
|
|
218
239
|
width: width,
|
|
@@ -221,35 +242,29 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
221
242
|
colIndex: indexRelativeToAllColumns,
|
|
222
243
|
colSpan: colSpan,
|
|
223
244
|
disableDragEvents: disableDragEvents,
|
|
224
|
-
editCellState: editCellState,
|
|
225
245
|
isNotVisible: cellIsNotVisible,
|
|
226
246
|
pinnedOffset: pinnedOffset,
|
|
227
247
|
pinnedPosition: pinnedPosition,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
248
|
+
showLeftBorder: showLeftBorder,
|
|
249
|
+
showRightBorder: showRightBorder,
|
|
250
|
+
row: row,
|
|
251
|
+
rowNode: rowNode
|
|
231
252
|
}, slotProps?.cell), column.field);
|
|
232
253
|
};
|
|
233
|
-
|
|
234
|
-
/* Start of rendering */
|
|
235
|
-
|
|
236
|
-
if (!rowNode) {
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
254
|
const leftCells = pinnedColumns.left.map((column, i) => {
|
|
240
255
|
const indexRelativeToAllColumns = i;
|
|
241
|
-
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length,
|
|
256
|
+
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length, PinnedColumnPosition.LEFT);
|
|
242
257
|
});
|
|
243
258
|
const rightCells = pinnedColumns.right.map((column, i) => {
|
|
244
259
|
const indexRelativeToAllColumns = visibleColumns.length - pinnedColumns.right.length + i;
|
|
245
|
-
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length,
|
|
260
|
+
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length, PinnedColumnPosition.RIGHT);
|
|
246
261
|
});
|
|
247
262
|
const middleColumnsLength = visibleColumns.length - pinnedColumns.left.length - pinnedColumns.right.length;
|
|
248
263
|
const cells = [];
|
|
249
264
|
if (hasVirtualFocusCellLeft) {
|
|
250
|
-
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength,
|
|
265
|
+
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));
|
|
251
266
|
}
|
|
252
|
-
for (let i =
|
|
267
|
+
for (let i = firstColumnIndex; i < lastColumnIndex; i += 1) {
|
|
253
268
|
const column = visibleColumns[i];
|
|
254
269
|
const indexInSection = i - pinnedColumns.left.length;
|
|
255
270
|
if (!column) {
|
|
@@ -258,7 +273,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
258
273
|
cells.push(getCell(column, indexInSection, i, middleColumnsLength));
|
|
259
274
|
}
|
|
260
275
|
if (hasVirtualFocusCellRight) {
|
|
261
|
-
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength,
|
|
276
|
+
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));
|
|
262
277
|
}
|
|
263
278
|
const eventHandlers = row ? {
|
|
264
279
|
onClick: publishClick,
|
|
@@ -269,13 +284,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
269
284
|
onMouseOver: publish('rowMouseOver', onMouseOver)
|
|
270
285
|
} : null;
|
|
271
286
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
272
|
-
ref: handleRef,
|
|
273
287
|
"data-id": rowId,
|
|
274
288
|
"data-rowindex": index,
|
|
275
289
|
role: "row",
|
|
276
290
|
className: clsx(...rowClassNames, classes.root, className),
|
|
277
291
|
style: style
|
|
278
292
|
}, ariaAttributes, eventHandlers, other, {
|
|
293
|
+
ref: handleRef,
|
|
279
294
|
children: [leftCells, /*#__PURE__*/_jsx("div", {
|
|
280
295
|
role: "presentation",
|
|
281
296
|
className: gridClasses.cellOffsetLeft,
|
|
@@ -286,7 +301,8 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
286
301
|
role: "presentation",
|
|
287
302
|
className: clsx(gridClasses.cell, gridClasses.cellEmpty)
|
|
288
303
|
}), rightCells, scrollbarWidth !== 0 && /*#__PURE__*/_jsx(ScrollbarFiller, {
|
|
289
|
-
pinnedRight: pinnedColumns.right.length > 0
|
|
304
|
+
pinnedRight: pinnedColumns.right.length > 0,
|
|
305
|
+
borderTop: !isFirstVisible
|
|
290
306
|
})]
|
|
291
307
|
}));
|
|
292
308
|
});
|
|
@@ -295,48 +311,14 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
295
311
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
296
312
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
297
313
|
// ----------------------------------------------------------------------
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
columnsTotalWidth: PropTypes.number.isRequired,
|
|
301
|
-
contentSize: PropTypes.shape({
|
|
302
|
-
height: PropTypes.number.isRequired,
|
|
303
|
-
width: PropTypes.number.isRequired
|
|
304
|
-
}).isRequired,
|
|
305
|
-
groupHeaderHeight: PropTypes.number.isRequired,
|
|
306
|
-
hasScrollX: PropTypes.bool.isRequired,
|
|
307
|
-
hasScrollY: PropTypes.bool.isRequired,
|
|
308
|
-
headerFilterHeight: PropTypes.number.isRequired,
|
|
309
|
-
headerHeight: PropTypes.number.isRequired,
|
|
310
|
-
headersTotalHeight: PropTypes.number.isRequired,
|
|
311
|
-
isReady: PropTypes.bool.isRequired,
|
|
312
|
-
leftPinnedWidth: PropTypes.number.isRequired,
|
|
313
|
-
minimumSize: PropTypes.shape({
|
|
314
|
-
height: PropTypes.number.isRequired,
|
|
315
|
-
width: PropTypes.number.isRequired
|
|
316
|
-
}).isRequired,
|
|
317
|
-
rightPinnedWidth: PropTypes.number.isRequired,
|
|
318
|
-
root: PropTypes.shape({
|
|
319
|
-
height: PropTypes.number.isRequired,
|
|
320
|
-
width: PropTypes.number.isRequired
|
|
321
|
-
}).isRequired,
|
|
322
|
-
rowHeight: PropTypes.number.isRequired,
|
|
323
|
-
rowWidth: PropTypes.number.isRequired,
|
|
324
|
-
scrollbarSize: PropTypes.number.isRequired,
|
|
325
|
-
topContainerHeight: PropTypes.number.isRequired,
|
|
326
|
-
viewportInnerSize: PropTypes.shape({
|
|
327
|
-
height: PropTypes.number.isRequired,
|
|
328
|
-
width: PropTypes.number.isRequired
|
|
329
|
-
}).isRequired,
|
|
330
|
-
viewportOuterSize: PropTypes.shape({
|
|
331
|
-
height: PropTypes.number.isRequired,
|
|
332
|
-
width: PropTypes.number.isRequired
|
|
333
|
-
}).isRequired
|
|
334
|
-
}).isRequired,
|
|
314
|
+
columnsTotalWidth: PropTypes.number.isRequired,
|
|
315
|
+
firstColumnIndex: PropTypes.number.isRequired,
|
|
335
316
|
/**
|
|
336
317
|
* Determines which cell has focus.
|
|
337
318
|
* If `null`, no cell in this row has focus.
|
|
338
319
|
*/
|
|
339
320
|
focusedColumnIndex: PropTypes.number,
|
|
321
|
+
gridHasFiller: PropTypes.bool.isRequired,
|
|
340
322
|
/**
|
|
341
323
|
* Index of the row in the whole sorted and filtered dataset.
|
|
342
324
|
* If some rows above have expanded children, this index also take those children into account.
|
|
@@ -345,29 +327,19 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
345
327
|
isFirstVisible: PropTypes.bool.isRequired,
|
|
346
328
|
isLastVisible: PropTypes.bool.isRequired,
|
|
347
329
|
isNotVisible: PropTypes.bool.isRequired,
|
|
330
|
+
lastColumnIndex: PropTypes.number.isRequired,
|
|
348
331
|
offsetLeft: PropTypes.number.isRequired,
|
|
349
|
-
offsetTop: PropTypes.number,
|
|
350
332
|
onClick: PropTypes.func,
|
|
351
333
|
onDoubleClick: PropTypes.func,
|
|
352
334
|
onMouseEnter: PropTypes.func,
|
|
353
335
|
onMouseLeave: PropTypes.func,
|
|
354
336
|
pinnedColumns: PropTypes.object.isRequired,
|
|
355
|
-
renderContext: PropTypes.shape({
|
|
356
|
-
firstColumnIndex: PropTypes.number.isRequired,
|
|
357
|
-
firstRowIndex: PropTypes.number.isRequired,
|
|
358
|
-
lastColumnIndex: PropTypes.number.isRequired,
|
|
359
|
-
lastRowIndex: PropTypes.number.isRequired
|
|
360
|
-
}).isRequired,
|
|
361
337
|
row: PropTypes.object.isRequired,
|
|
362
338
|
rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,
|
|
363
339
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
340
|
+
scrollbarWidth: PropTypes.number.isRequired,
|
|
364
341
|
selected: PropTypes.bool.isRequired,
|
|
365
342
|
showBottomBorder: PropTypes.bool.isRequired,
|
|
366
|
-
/**
|
|
367
|
-
* Determines which cell should be tabbable by having tabIndex=0.
|
|
368
|
-
* If `null`, no cell in this row is in the tab sequence.
|
|
369
|
-
*/
|
|
370
|
-
tabbableCell: PropTypes.string,
|
|
371
343
|
visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
372
344
|
} : void 0;
|
|
373
345
|
const MemoizedGridRow = fastMemo(GridRow);
|
|
@@ -7,7 +7,7 @@ interface RowCountProps {
|
|
|
7
7
|
export type GridRowCountProps = React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
|
|
8
8
|
sx?: SxProps<Theme>;
|
|
9
9
|
};
|
|
10
|
-
declare const GridRowCount: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
|
|
10
|
+
declare const GridRowCount: React.ForwardRefExoticComponent<GridRowCountProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
|
|
11
11
|
sx?: SxProps<Theme>;
|
|
12
12
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export { GridRowCount };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
11
|
import { getDataGridUtilityClass } from "../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
@@ -30,7 +31,7 @@ const GridRowCountRoot = styled('div', {
|
|
|
30
31
|
display: 'flex',
|
|
31
32
|
margin: theme.spacing(0, 2)
|
|
32
33
|
}));
|
|
33
|
-
const GridRowCount =
|
|
34
|
+
const GridRowCount = forwardRef(function GridRowCount(props, ref) {
|
|
34
35
|
const {
|
|
35
36
|
className,
|
|
36
37
|
rowCount,
|
|
@@ -45,10 +46,10 @@ const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props,
|
|
|
45
46
|
}
|
|
46
47
|
const text = visibleRowCount < rowCount ? apiRef.current.getLocaleText('footerTotalVisibleRows')(visibleRowCount, rowCount) : rowCount.toLocaleString();
|
|
47
48
|
return /*#__PURE__*/_jsxs(GridRowCountRoot, _extends({
|
|
48
|
-
ref: ref,
|
|
49
49
|
className: clsx(classes.root, className),
|
|
50
50
|
ownerState: ownerState
|
|
51
51
|
}, other, {
|
|
52
|
+
ref: ref,
|
|
52
53
|
children: [apiRef.current.getLocaleText('footerTotalRows'), " ", text]
|
|
53
54
|
}));
|
|
54
55
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
3
|
+
import { GridScrollParams } from '../models/params/gridScrollParams';
|
|
2
4
|
interface ScrollAreaProps {
|
|
3
5
|
scrollDirection: 'left' | 'right';
|
|
6
|
+
scrollPosition: RefObject<GridScrollParams>;
|
|
4
7
|
}
|
|
5
|
-
declare function
|
|
6
|
-
export declare const GridScrollArea: typeof
|
|
8
|
+
declare function GridScrollAreaWrapper(props: ScrollAreaProps): React.JSX.Element | null;
|
|
9
|
+
export declare const GridScrollArea: typeof GridScrollAreaWrapper;
|
|
7
10
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import clsx from 'clsx';
|
|
@@ -9,11 +11,11 @@ import { getDataGridUtilityClass, gridClasses } from "../constants/index.js";
|
|
|
9
11
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
12
|
import { useGridApiEventHandler } from "../hooks/utils/useGridApiEventHandler.js";
|
|
11
13
|
import { useGridSelector } from "../hooks/utils/useGridSelector.js";
|
|
12
|
-
import { gridDimensionsSelector } from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
14
|
+
import { gridDimensionsSelector, gridColumnsTotalWidthSelector } from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
13
15
|
import { gridDensityFactorSelector } from "../hooks/features/density/densitySelector.js";
|
|
14
|
-
import { gridColumnsTotalWidthSelector } from "../hooks/features/columns/gridColumnsSelector.js";
|
|
15
16
|
import { useTimeout } from "../hooks/utils/useTimeout.js";
|
|
16
17
|
import { getTotalHeaderHeight } from "../hooks/features/columns/gridColumnsUtils.js";
|
|
18
|
+
import { createSelector } from "../utils/createSelector.js";
|
|
17
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
20
|
const CLIFF = 1;
|
|
19
21
|
const SLOP = 1.5;
|
|
@@ -48,21 +50,38 @@ const GridScrollAreaRawRoot = styled('div', {
|
|
|
48
50
|
right: 0
|
|
49
51
|
}
|
|
50
52
|
}));
|
|
51
|
-
|
|
53
|
+
const offsetSelector = createSelector(gridDimensionsSelector, (dimensions, direction) => {
|
|
54
|
+
if (direction === 'left') {
|
|
55
|
+
return dimensions.leftPinnedWidth;
|
|
56
|
+
}
|
|
57
|
+
if (direction === 'right') {
|
|
58
|
+
return dimensions.rightPinnedWidth + (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);
|
|
59
|
+
}
|
|
60
|
+
return 0;
|
|
61
|
+
});
|
|
62
|
+
function GridScrollAreaWrapper(props) {
|
|
63
|
+
const apiRef = useGridApiContext();
|
|
64
|
+
const [dragging, setDragging] = React.useState(false);
|
|
65
|
+
useGridApiEventHandler(apiRef, 'columnHeaderDragStart', () => setDragging(true));
|
|
66
|
+
useGridApiEventHandler(apiRef, 'columnHeaderDragEnd', () => setDragging(false));
|
|
67
|
+
if (!dragging) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return /*#__PURE__*/_jsx(GridScrollAreaContent, _extends({}, props));
|
|
71
|
+
}
|
|
72
|
+
function GridScrollAreaContent(props) {
|
|
52
73
|
const {
|
|
53
|
-
scrollDirection
|
|
74
|
+
scrollDirection,
|
|
75
|
+
scrollPosition
|
|
54
76
|
} = props;
|
|
55
77
|
const rootRef = React.useRef(null);
|
|
56
78
|
const apiRef = useGridApiContext();
|
|
57
79
|
const timeout = useTimeout();
|
|
58
80
|
const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);
|
|
59
81
|
const columnsTotalWidth = useGridSelector(apiRef, gridColumnsTotalWidthSelector);
|
|
60
|
-
const
|
|
61
|
-
const scrollPosition = React.useRef({
|
|
62
|
-
left: 0,
|
|
63
|
-
top: 0
|
|
64
|
-
});
|
|
82
|
+
const sideOffset = useGridSelector(apiRef, offsetSelector, scrollDirection);
|
|
65
83
|
const getCanScrollMore = () => {
|
|
84
|
+
const dimensions = gridDimensionsSelector(apiRef.current.state);
|
|
66
85
|
if (scrollDirection === 'left') {
|
|
67
86
|
// Only render if the user has not reached yet the start of the list
|
|
68
87
|
return scrollPosition.current.left > 0;
|
|
@@ -74,7 +93,6 @@ function GridScrollAreaRaw(props) {
|
|
|
74
93
|
}
|
|
75
94
|
return false;
|
|
76
95
|
};
|
|
77
|
-
const [dragging, setDragging] = React.useState(false);
|
|
78
96
|
const [canScrollMore, setCanScrollMore] = React.useState(getCanScrollMore);
|
|
79
97
|
const rootProps = useGridRootProps();
|
|
80
98
|
const ownerState = _extends({}, rootProps, {
|
|
@@ -88,12 +106,11 @@ function GridScrollAreaRaw(props) {
|
|
|
88
106
|
top: totalHeaderHeight - headerHeight
|
|
89
107
|
};
|
|
90
108
|
if (scrollDirection === 'left') {
|
|
91
|
-
style.left =
|
|
109
|
+
style.left = sideOffset;
|
|
92
110
|
} else if (scrollDirection === 'right') {
|
|
93
|
-
style.right =
|
|
111
|
+
style.right = sideOffset;
|
|
94
112
|
}
|
|
95
|
-
const handleScrolling =
|
|
96
|
-
scrollPosition.current = newScrollPosition;
|
|
113
|
+
const handleScrolling = () => {
|
|
97
114
|
setCanScrollMore(getCanScrollMore);
|
|
98
115
|
};
|
|
99
116
|
const handleDragOver = useEventCallback(event => {
|
|
@@ -118,16 +135,8 @@ function GridScrollAreaRaw(props) {
|
|
|
118
135
|
});
|
|
119
136
|
});
|
|
120
137
|
});
|
|
121
|
-
const handleColumnHeaderDragStart = useEventCallback(() => {
|
|
122
|
-
setDragging(true);
|
|
123
|
-
});
|
|
124
|
-
const handleColumnHeaderDragEnd = useEventCallback(() => {
|
|
125
|
-
setDragging(false);
|
|
126
|
-
});
|
|
127
138
|
useGridApiEventHandler(apiRef, 'scrollPositionChange', handleScrolling);
|
|
128
|
-
|
|
129
|
-
useGridApiEventHandler(apiRef, 'columnHeaderDragEnd', handleColumnHeaderDragEnd);
|
|
130
|
-
if (!dragging || !canScrollMore) {
|
|
139
|
+
if (!canScrollMore) {
|
|
131
140
|
return null;
|
|
132
141
|
}
|
|
133
142
|
return /*#__PURE__*/_jsx(GridScrollAreaRawRoot, {
|
|
@@ -138,4 +147,4 @@ function GridScrollAreaRaw(props) {
|
|
|
138
147
|
style: style
|
|
139
148
|
});
|
|
140
149
|
}
|
|
141
|
-
export const GridScrollArea = fastMemo(
|
|
150
|
+
export const GridScrollArea = fastMemo(GridScrollAreaWrapper);
|
|
@@ -3,7 +3,10 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
interface SelectedRowCountProps {
|
|
4
4
|
selectedRowCount: number;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type GridSelectedRowCountProps = React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
};
|
|
9
|
+
declare const GridSelectedRowCount: React.ForwardRefExoticComponent<GridSelectedRowCountProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
|
|
7
10
|
sx?: SxProps<Theme>;
|
|
8
11
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
12
|
export { GridSelectedRowCount };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
11
|
import { getDataGridUtilityClass } from "../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
@@ -38,7 +39,7 @@ const GridSelectedRowCountRoot = styled('div', {
|
|
|
38
39
|
height: 'auto'
|
|
39
40
|
}
|
|
40
41
|
}));
|
|
41
|
-
const GridSelectedRowCount =
|
|
42
|
+
const GridSelectedRowCount = forwardRef(function GridSelectedRowCount(props, ref) {
|
|
42
43
|
const {
|
|
43
44
|
className,
|
|
44
45
|
selectedRowCount
|
|
@@ -49,10 +50,10 @@ const GridSelectedRowCount = /*#__PURE__*/React.forwardRef(function GridSelected
|
|
|
49
50
|
const classes = useUtilityClasses(ownerState);
|
|
50
51
|
const rowSelectedText = apiRef.current.getLocaleText('footerRowSelected')(selectedRowCount);
|
|
51
52
|
return /*#__PURE__*/_jsx(GridSelectedRowCountRoot, _extends({
|
|
52
|
-
ref: ref,
|
|
53
53
|
className: clsx(classes.root, className),
|
|
54
54
|
ownerState: ownerState
|
|
55
55
|
}, other, {
|
|
56
|
+
ref: ref,
|
|
56
57
|
children: rowSelectedText
|
|
57
58
|
}));
|
|
58
59
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const GridSkeletonLoadingOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
2
|
+
declare const GridSkeletonLoadingOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement>> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { GridSkeletonLoadingOverlay };
|
|
@@ -4,14 +4,20 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
5
|
import useForkRef from '@mui/utils/useForkRef';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
9
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
8
10
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
|
-
import {
|
|
11
|
+
import { gridColumnPositionsSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from "../hooks/index.js";
|
|
12
|
+
import { PinnedColumnPosition } from "../internals/constants.js";
|
|
13
|
+
import { gridColumnsTotalWidthSelector } from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
10
14
|
import { getDataGridUtilityClass, gridClasses } from "../constants/gridClasses.js";
|
|
11
15
|
import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
|
|
12
16
|
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../utils/cellBorderUtils.js";
|
|
13
17
|
import { escapeOperandAttributeSelector } from "../utils/domUtils.js";
|
|
14
18
|
import { GridScrollbarFillerCell } from "./GridScrollbarFillerCell.js";
|
|
19
|
+
import { rtlFlipSide } from "../utils/rtlFlipSide.js";
|
|
20
|
+
import { attachPinnedStyle } from "../internals/utils/index.js";
|
|
15
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
22
|
const SkeletonOverlay = styled('div', {
|
|
17
23
|
name: 'MuiDataGrid',
|
|
@@ -34,11 +40,12 @@ const useUtilityClasses = ownerState => {
|
|
|
34
40
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
35
41
|
};
|
|
36
42
|
const getColIndex = el => parseInt(el.getAttribute('data-colindex'), 10);
|
|
37
|
-
const GridSkeletonLoadingOverlay =
|
|
43
|
+
const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverlay(props, forwardedRef) {
|
|
38
44
|
const rootProps = useGridRootProps();
|
|
39
45
|
const {
|
|
40
46
|
slots
|
|
41
47
|
} = rootProps;
|
|
48
|
+
const isRtl = useRtl();
|
|
42
49
|
const classes = useUtilityClasses({
|
|
43
50
|
classes: rootProps.classes
|
|
44
51
|
});
|
|
@@ -54,18 +61,12 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
54
61
|
const allVisibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
|
|
55
62
|
const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);
|
|
56
63
|
const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);
|
|
57
|
-
const getPinnedStyle = React.useCallback((computedWidth, index, position) => {
|
|
58
|
-
const pinnedOffset = getPinnedCellOffset(position, computedWidth, index, positions, dimensions);
|
|
59
|
-
return {
|
|
60
|
-
[position]: pinnedOffset
|
|
61
|
-
};
|
|
62
|
-
}, [dimensions, positions]);
|
|
63
64
|
const getPinnedPosition = React.useCallback(field => {
|
|
64
65
|
if (pinnedColumns.left.findIndex(col => col.field === field) !== -1) {
|
|
65
|
-
return
|
|
66
|
+
return PinnedColumnPosition.LEFT;
|
|
66
67
|
}
|
|
67
68
|
if (pinnedColumns.right.findIndex(col => col.field === field) !== -1) {
|
|
68
|
-
return
|
|
69
|
+
return PinnedColumnPosition.RIGHT;
|
|
69
70
|
}
|
|
70
71
|
return undefined;
|
|
71
72
|
}, [pinnedColumns.left, pinnedColumns.right]);
|
|
@@ -76,13 +77,15 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
76
77
|
for (let colIndex = 0; colIndex < columns.length; colIndex += 1) {
|
|
77
78
|
const column = columns[colIndex];
|
|
78
79
|
const pinnedPosition = getPinnedPosition(column.field);
|
|
79
|
-
const isPinnedLeft = pinnedPosition ===
|
|
80
|
-
const isPinnedRight = pinnedPosition ===
|
|
81
|
-
const
|
|
80
|
+
const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;
|
|
81
|
+
const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;
|
|
82
|
+
const pinnedSide = rtlFlipSide(pinnedPosition, isRtl);
|
|
83
|
+
const sectionLength = pinnedSide ? pinnedColumns[pinnedSide].length // pinned section
|
|
82
84
|
: columns.length - pinnedColumns.left.length - pinnedColumns.right.length; // middle section
|
|
83
|
-
const sectionIndex =
|
|
85
|
+
const sectionIndex = pinnedSide ? pinnedColumns[pinnedSide].findIndex(col => col.field === column.field) // pinned section
|
|
84
86
|
: colIndex - pinnedColumns.left.length; // middle section
|
|
85
|
-
const
|
|
87
|
+
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
88
|
+
const pinnedStyle = attachPinnedStyle({}, isRtl, pinnedPosition, getPinnedCellOffset(pinnedPosition, column.computedWidth, colIndex, positions, dimensions.columnsTotalWidth, scrollbarWidth));
|
|
86
89
|
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
87
90
|
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
88
91
|
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, sectionIndex);
|
|
@@ -96,7 +99,6 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
96
99
|
width: emptyCellWidth,
|
|
97
100
|
empty: true
|
|
98
101
|
}, `skeleton-filler-column-${i}`);
|
|
99
|
-
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
100
102
|
const hasScrollbarFiller = isLastColumn && scrollbarWidth !== 0;
|
|
101
103
|
if (hasFillerBefore) {
|
|
102
104
|
rowCells.push(emptyCell);
|
|
@@ -128,7 +130,7 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
128
130
|
}, `skeleton-row-${i}`));
|
|
129
131
|
}
|
|
130
132
|
return array;
|
|
131
|
-
}, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions
|
|
133
|
+
}, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions, positions, getPinnedPosition, isRtl]);
|
|
132
134
|
|
|
133
135
|
// Sync the column resize of the overlay columns with the grid
|
|
134
136
|
const handleColumnResize = params => {
|
|
@@ -142,8 +144,8 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
142
144
|
}
|
|
143
145
|
const resizedColIndex = columns.findIndex(col => col.field === colDef.field);
|
|
144
146
|
const pinnedPosition = getPinnedPosition(colDef.field);
|
|
145
|
-
const isPinnedLeft = pinnedPosition ===
|
|
146
|
-
const isPinnedRight = pinnedPosition ===
|
|
147
|
+
const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;
|
|
148
|
+
const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;
|
|
147
149
|
const currentWidth = getComputedStyle(cells[0]).getPropertyValue('--width');
|
|
148
150
|
const delta = parseInt(currentWidth, 10) - width;
|
|
149
151
|
if (cells) {
|
|
@@ -172,9 +174,9 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
172
174
|
};
|
|
173
175
|
useGridApiEventHandler(apiRef, 'columnResize', handleColumnResize);
|
|
174
176
|
return /*#__PURE__*/_jsx(SkeletonOverlay, _extends({
|
|
175
|
-
className: classes.root
|
|
176
|
-
ref: handleRef
|
|
177
|
+
className: classes.root
|
|
177
178
|
}, props, {
|
|
179
|
+
ref: handleRef,
|
|
178
180
|
children: children
|
|
179
181
|
}));
|
|
180
182
|
});
|