@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
|
@@ -30,8 +30,8 @@ function GridEditSingleSelectCell(props) {
|
|
|
30
30
|
} = props,
|
|
31
31
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
32
32
|
const apiRef = useGridApiContext();
|
|
33
|
-
const ref = React.useRef();
|
|
34
|
-
const inputRef = React.useRef();
|
|
33
|
+
const ref = React.useRef(null);
|
|
34
|
+
const inputRef = React.useRef(null);
|
|
35
35
|
const [open, setOpen] = React.useState(initialOpen);
|
|
36
36
|
const baseSelectProps = rootProps.slotProps?.baseSelect || {};
|
|
37
37
|
const isSelectNative = baseSelectProps.native ?? false;
|
|
@@ -4,7 +4,6 @@ const _excluded = ["field", "type", "align", "width", "height", "empty", "style"
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import Skeleton from '@mui/material/Skeleton';
|
|
8
7
|
import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
|
|
9
8
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
10
9
|
import { createRandomNumberGenerator } from "../../utils/utils.js";
|
|
@@ -82,7 +81,7 @@ function GridSkeletonCell(props) {
|
|
|
82
81
|
minWidth: width
|
|
83
82
|
}, style)
|
|
84
83
|
}, other, {
|
|
85
|
-
children: !empty && /*#__PURE__*/_jsx(
|
|
84
|
+
children: !empty && /*#__PURE__*/_jsx(rootProps.slots.baseSkeleton, _extends({}, skeletonProps))
|
|
86
85
|
}));
|
|
87
86
|
}
|
|
88
87
|
process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
|
|
@@ -5,6 +5,6 @@ export interface ColumnHeaderMenuIconProps {
|
|
|
5
5
|
columnMenuId: string;
|
|
6
6
|
columnMenuButtonId: string;
|
|
7
7
|
open: boolean;
|
|
8
|
-
iconButtonRef: React.RefObject<HTMLButtonElement>;
|
|
8
|
+
iconButtonRef: React.RefObject<HTMLButtonElement | null>;
|
|
9
9
|
}
|
|
10
10
|
export declare const ColumnHeaderMenuIcon: React.MemoExoticComponent<(props: ColumnHeaderMenuIconProps) => React.JSX.Element>;
|
|
@@ -3,5 +3,5 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
interface GridBaseColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
}
|
|
6
|
-
export declare const GridBaseColumnHeaders: React.ForwardRefExoticComponent<GridBaseColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const GridBaseColumnHeaders: React.ForwardRefExoticComponent<GridBaseColumnHeadersProps> | React.ForwardRefExoticComponent<GridBaseColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export {};
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -27,7 +28,7 @@ const GridColumnHeadersRoot = styled('div', {
|
|
|
27
28
|
borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
|
|
28
29
|
borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
|
|
29
30
|
});
|
|
30
|
-
export const GridBaseColumnHeaders =
|
|
31
|
+
export const GridBaseColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
|
|
31
32
|
const {
|
|
32
33
|
className
|
|
33
34
|
} = props,
|
|
@@ -35,10 +36,10 @@ export const GridBaseColumnHeaders = /*#__PURE__*/React.forwardRef(function Grid
|
|
|
35
36
|
const rootProps = useGridRootProps();
|
|
36
37
|
const classes = useUtilityClasses(rootProps);
|
|
37
38
|
return /*#__PURE__*/_jsx(GridColumnHeadersRoot, _extends({
|
|
38
|
-
ref: ref,
|
|
39
39
|
className: clsx(classes.root, className),
|
|
40
40
|
ownerState: rootProps
|
|
41
41
|
}, other, {
|
|
42
|
-
role: "presentation"
|
|
42
|
+
role: "presentation",
|
|
43
|
+
ref: ref
|
|
43
44
|
}));
|
|
44
45
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PinnedColumnPosition } from '../../internals/constants';
|
|
3
3
|
interface GridColumnGroupHeaderProps {
|
|
4
4
|
groupId: string | null;
|
|
5
5
|
width: number;
|
|
@@ -11,11 +11,11 @@ interface GridColumnGroupHeaderProps {
|
|
|
11
11
|
height: number;
|
|
12
12
|
hasFocus?: boolean;
|
|
13
13
|
tabIndex: 0 | -1;
|
|
14
|
-
pinnedPosition?: GridPinnedColumnPosition;
|
|
15
14
|
style?: React.CSSProperties;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
showLeftBorder: boolean;
|
|
16
|
+
showRightBorder: boolean;
|
|
17
|
+
pinnedPosition: PinnedColumnPosition | undefined;
|
|
18
|
+
pinnedOffset?: number;
|
|
19
19
|
}
|
|
20
20
|
declare function GridColumnGroupHeader(props: GridColumnGroupHeaderProps): React.JSX.Element;
|
|
21
21
|
export { GridColumnGroupHeader };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { unstable_useId as useId, unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
4
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
4
5
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
5
6
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
6
7
|
import { gridColumnGroupsLookupSelector } from "../../hooks/features/columnGrouping/gridColumnGroupsSelector.js";
|
|
@@ -8,7 +9,8 @@ import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
|
8
9
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
9
10
|
import { GridGenericColumnHeaderItem } from "./GridGenericColumnHeaderItem.js";
|
|
10
11
|
import { isEventTargetInPortal } from "../../utils/domUtils.js";
|
|
11
|
-
import {
|
|
12
|
+
import { PinnedColumnPosition } from "../../internals/constants.js";
|
|
13
|
+
import { attachPinnedStyle } from "../../internals/utils/index.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const useUtilityClasses = ownerState => {
|
|
14
16
|
const {
|
|
@@ -22,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
22
24
|
pinnedPosition
|
|
23
25
|
} = ownerState;
|
|
24
26
|
const slots = {
|
|
25
|
-
root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition ===
|
|
27
|
+
root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition === PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight', isLastColumn && 'columnHeader--last'],
|
|
26
28
|
draggableContainer: ['columnHeaderDraggableContainer'],
|
|
27
29
|
titleContainer: ['columnHeaderTitleContainer', 'withBorderColor'],
|
|
28
30
|
titleContainerContent: ['columnHeaderTitleContainerContent']
|
|
@@ -42,12 +44,10 @@ function GridColumnGroupHeader(props) {
|
|
|
42
44
|
tabIndex,
|
|
43
45
|
isLastColumn,
|
|
44
46
|
pinnedPosition,
|
|
45
|
-
|
|
46
|
-
indexInSection,
|
|
47
|
-
sectionLength,
|
|
48
|
-
gridHasFiller
|
|
47
|
+
pinnedOffset
|
|
49
48
|
} = props;
|
|
50
49
|
const rootProps = useGridRootProps();
|
|
50
|
+
const isRtl = useRtl();
|
|
51
51
|
const headerCellRef = React.useRef(null);
|
|
52
52
|
const apiRef = useGridApiContext();
|
|
53
53
|
const columnGroupsLookup = useGridSelector(apiRef, gridColumnGroupsLookupSelector);
|
|
@@ -72,12 +72,8 @@ function GridColumnGroupHeader(props) {
|
|
|
72
72
|
if (groupId && render) {
|
|
73
73
|
headerComponent = render(renderParams);
|
|
74
74
|
}
|
|
75
|
-
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
76
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);
|
|
77
75
|
const ownerState = _extends({}, props, {
|
|
78
76
|
classes: rootProps.classes,
|
|
79
|
-
showLeftBorder,
|
|
80
|
-
showRightBorder,
|
|
81
77
|
headerAlign,
|
|
82
78
|
depth,
|
|
83
79
|
isDragging: false
|
|
@@ -110,6 +106,7 @@ function GridColumnGroupHeader(props) {
|
|
|
110
106
|
onBlur: publish('columnGroupHeaderBlur')
|
|
111
107
|
}), [publish]);
|
|
112
108
|
const headerClassName = typeof group.headerClassName === 'function' ? group.headerClassName(renderParams) : group.headerClassName;
|
|
109
|
+
const style = React.useMemo(() => attachPinnedStyle(_extends({}, props.style), isRtl, pinnedPosition, pinnedOffset), [pinnedPosition, pinnedOffset, props.style, isRtl]);
|
|
113
110
|
return /*#__PURE__*/_jsx(GridGenericColumnHeaderItem, _extends({
|
|
114
111
|
ref: headerCellRef,
|
|
115
112
|
classes: classes,
|
|
@@ -5,8 +5,8 @@ export interface ColumnHeaderFilterIconButtonProps {
|
|
|
5
5
|
counter?: number;
|
|
6
6
|
onClick?: (params: GridColumnHeaderParams, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
}
|
|
8
|
-
declare function
|
|
9
|
-
declare namespace
|
|
8
|
+
declare function GridColumnHeaderFilterIconButtonWrapped(props: ColumnHeaderFilterIconButtonProps): React.JSX.Element | null;
|
|
9
|
+
declare namespace GridColumnHeaderFilterIconButtonWrapped {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
12
|
-
export { GridColumnHeaderFilterIconButton };
|
|
12
|
+
export { GridColumnHeaderFilterIconButtonWrapped as GridColumnHeaderFilterIconButton };
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
|
|
5
5
|
import { useGridSelector } from "../../hooks/index.js";
|
|
6
|
-
import { gridPreferencePanelStateSelector } from "../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js";
|
|
6
|
+
import { gridPreferencePanelSelectorWithLabel, gridPreferencePanelStateSelector } from "../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js";
|
|
7
7
|
import { GridPreferencePanelsValue } from "../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js";
|
|
8
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
9
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
@@ -19,6 +19,21 @@ const useUtilityClasses = ownerState => {
|
|
|
19
19
|
};
|
|
20
20
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
21
21
|
};
|
|
22
|
+
function GridColumnHeaderFilterIconButtonWrapped(props) {
|
|
23
|
+
if (!props.counter) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/_jsx(GridColumnHeaderFilterIconButton, _extends({}, props));
|
|
27
|
+
}
|
|
28
|
+
process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButtonWrapped.propTypes = {
|
|
29
|
+
// ----------------------------- Warning --------------------------------
|
|
30
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
31
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
32
|
+
// ----------------------------------------------------------------------
|
|
33
|
+
counter: PropTypes.number,
|
|
34
|
+
field: PropTypes.string.isRequired,
|
|
35
|
+
onClick: PropTypes.func
|
|
36
|
+
} : void 0;
|
|
22
37
|
function GridColumnHeaderFilterIconButton(props) {
|
|
23
38
|
const {
|
|
24
39
|
counter,
|
|
@@ -31,8 +46,8 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
31
46
|
classes: rootProps.classes
|
|
32
47
|
});
|
|
33
48
|
const classes = useUtilityClasses(ownerState);
|
|
34
|
-
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
35
49
|
const labelId = useId();
|
|
50
|
+
const isOpen = useGridSelector(apiRef, gridPreferencePanelSelectorWithLabel, labelId);
|
|
36
51
|
const panelId = useId();
|
|
37
52
|
const toggleFilter = React.useCallback(event => {
|
|
38
53
|
event.preventDefault();
|
|
@@ -53,17 +68,15 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
53
68
|
if (!counter) {
|
|
54
69
|
return null;
|
|
55
70
|
}
|
|
56
|
-
const open = preferencePanel.open && preferencePanel.labelId === labelId;
|
|
57
71
|
const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
58
72
|
id: labelId,
|
|
59
73
|
onClick: toggleFilter,
|
|
60
|
-
color: "default",
|
|
61
74
|
"aria-label": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),
|
|
62
75
|
size: "small",
|
|
63
76
|
tabIndex: -1,
|
|
64
77
|
"aria-haspopup": "menu",
|
|
65
|
-
"aria-expanded":
|
|
66
|
-
"aria-controls":
|
|
78
|
+
"aria-expanded": isOpen,
|
|
79
|
+
"aria-controls": isOpen ? panelId : undefined
|
|
67
80
|
}, rootProps.slotProps?.baseIconButton, {
|
|
68
81
|
children: /*#__PURE__*/_jsx(rootProps.slots.columnFilteredIcon, {
|
|
69
82
|
className: classes.icon,
|
|
@@ -92,4 +105,4 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButton.propTyp
|
|
|
92
105
|
field: PropTypes.string.isRequired,
|
|
93
106
|
onClick: PropTypes.func
|
|
94
107
|
} : void 0;
|
|
95
|
-
export { GridColumnHeaderFilterIconButton };
|
|
108
|
+
export { GridColumnHeaderFilterIconButtonWrapped as GridColumnHeaderFilterIconButton };
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { GridStateColDef } from '../../models/colDef/gridColDef';
|
|
3
3
|
import { GridSortDirection } from '../../models/gridSortModel';
|
|
4
4
|
import { GridColumnHeaderSeparatorProps } from './GridColumnHeaderSeparator';
|
|
5
|
-
import {
|
|
5
|
+
import { PinnedColumnPosition } from '../../internals/constants';
|
|
6
6
|
interface GridColumnHeaderItemProps {
|
|
7
7
|
colIndex: number;
|
|
8
8
|
colDef: GridStateColDef;
|
|
@@ -18,13 +18,13 @@ interface GridColumnHeaderItemProps {
|
|
|
18
18
|
tabIndex: 0 | -1;
|
|
19
19
|
disableReorder?: boolean;
|
|
20
20
|
separatorSide?: GridColumnHeaderSeparatorProps['side'];
|
|
21
|
-
pinnedPosition?:
|
|
21
|
+
pinnedPosition?: PinnedColumnPosition;
|
|
22
|
+
pinnedOffset?: number;
|
|
22
23
|
style?: React.CSSProperties;
|
|
23
|
-
indexInSection: number;
|
|
24
|
-
sectionLength: number;
|
|
25
|
-
gridHasFiller: boolean;
|
|
26
24
|
isLastUnpinned: boolean;
|
|
27
25
|
isSiblingFocused: boolean;
|
|
26
|
+
showLeftBorder: boolean;
|
|
27
|
+
showRightBorder: boolean;
|
|
28
28
|
}
|
|
29
29
|
declare function GridColumnHeaderItem(props: GridColumnHeaderItemProps): React.JSX.Element;
|
|
30
30
|
declare namespace GridColumnHeaderItem {
|
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
|
|
6
6
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
7
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
7
8
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
|
|
8
9
|
import { ColumnHeaderMenuIcon } from "./ColumnHeaderMenuIcon.js";
|
|
9
10
|
import { GridColumnHeaderMenu } from "../menu/columnMenu/GridColumnHeaderMenu.js";
|
|
@@ -11,7 +12,8 @@ import { gridClasses, getDataGridUtilityClass } from "../../constants/gridClasse
|
|
|
11
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
12
13
|
import { GridGenericColumnHeaderItem } from "./GridGenericColumnHeaderItem.js";
|
|
13
14
|
import { isEventTargetInPortal } from "../../utils/domUtils.js";
|
|
14
|
-
import {
|
|
15
|
+
import { PinnedColumnPosition } from "../../internals/constants.js";
|
|
16
|
+
import { attachPinnedStyle } from "../../internals/utils/index.js";
|
|
15
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
18
|
const useUtilityClasses = ownerState => {
|
|
17
19
|
const {
|
|
@@ -31,7 +33,7 @@ const useUtilityClasses = ownerState => {
|
|
|
31
33
|
// todo refactor to a prop on col isNumeric or ?? ie: coltype===price wont work
|
|
32
34
|
const isColumnNumeric = colDef.type === 'number';
|
|
33
35
|
const slots = {
|
|
34
|
-
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition ===
|
|
36
|
+
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight',
|
|
35
37
|
// TODO: Remove classes below and restore `:has` selectors when they are supported in jsdom
|
|
36
38
|
// See https://github.com/mui/mui-x/pull/14559
|
|
37
39
|
isLastUnpinned && 'columnHeader--lastUnpinned', isSiblingFocused && 'columnHeader--siblingFocused'],
|
|
@@ -56,14 +58,14 @@ function GridColumnHeaderItem(props) {
|
|
|
56
58
|
tabIndex,
|
|
57
59
|
disableReorder,
|
|
58
60
|
separatorSide,
|
|
59
|
-
|
|
61
|
+
showLeftBorder,
|
|
62
|
+
showRightBorder,
|
|
60
63
|
pinnedPosition,
|
|
61
|
-
|
|
62
|
-
sectionLength,
|
|
63
|
-
gridHasFiller
|
|
64
|
+
pinnedOffset
|
|
64
65
|
} = props;
|
|
65
66
|
const apiRef = useGridPrivateApiContext();
|
|
66
67
|
const rootProps = useGridRootProps();
|
|
68
|
+
const isRtl = useRtl();
|
|
67
69
|
const headerCellRef = React.useRef(null);
|
|
68
70
|
const columnMenuId = useId();
|
|
69
71
|
const columnMenuButtonId = useId();
|
|
@@ -74,8 +76,6 @@ function GridColumnHeaderItem(props) {
|
|
|
74
76
|
if (colDef.renderHeader) {
|
|
75
77
|
headerComponent = colDef.renderHeader(apiRef.current.getColumnHeaderParams(colDef.field));
|
|
76
78
|
}
|
|
77
|
-
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
78
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);
|
|
79
79
|
const ownerState = _extends({}, props, {
|
|
80
80
|
classes: rootProps.classes,
|
|
81
81
|
showRightBorder,
|
|
@@ -171,6 +171,7 @@ function GridColumnHeaderItem(props) {
|
|
|
171
171
|
colDef
|
|
172
172
|
}) : colDef.headerClassName;
|
|
173
173
|
const label = colDef.headerName ?? colDef.field;
|
|
174
|
+
const style = React.useMemo(() => attachPinnedStyle(_extends({}, props.style), isRtl, pinnedPosition, pinnedOffset), [pinnedPosition, pinnedOffset, props.style, isRtl]);
|
|
174
175
|
return /*#__PURE__*/_jsx(GridGenericColumnHeaderItem, _extends({
|
|
175
176
|
ref: headerCellRef,
|
|
176
177
|
classes: classes,
|
|
@@ -209,18 +210,18 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
|
|
|
209
210
|
columnMenuOpen: PropTypes.bool.isRequired,
|
|
210
211
|
disableReorder: PropTypes.bool,
|
|
211
212
|
filterItemsCounter: PropTypes.number,
|
|
212
|
-
gridHasFiller: PropTypes.bool.isRequired,
|
|
213
213
|
hasFocus: PropTypes.bool,
|
|
214
214
|
headerHeight: PropTypes.number.isRequired,
|
|
215
|
-
indexInSection: PropTypes.number.isRequired,
|
|
216
215
|
isDragging: PropTypes.bool.isRequired,
|
|
217
216
|
isLast: PropTypes.bool.isRequired,
|
|
218
217
|
isLastUnpinned: PropTypes.bool.isRequired,
|
|
219
218
|
isResizing: PropTypes.bool.isRequired,
|
|
220
219
|
isSiblingFocused: PropTypes.bool.isRequired,
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
pinnedOffset: PropTypes.number,
|
|
221
|
+
pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]),
|
|
223
222
|
separatorSide: PropTypes.oneOf(['left', 'right']),
|
|
223
|
+
showLeftBorder: PropTypes.bool.isRequired,
|
|
224
|
+
showRightBorder: PropTypes.bool.isRequired,
|
|
224
225
|
sortDirection: PropTypes.oneOf(['asc', 'desc']),
|
|
225
226
|
sortIndex: PropTypes.number,
|
|
226
227
|
style: PropTypes.object,
|
|
@@ -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 { isOverflown } from "../../utils/domUtils.js";
|
|
10
11
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -30,7 +31,7 @@ const GridColumnHeaderTitleRoot = styled('div', {
|
|
|
30
31
|
fontWeight: 'var(--unstable_DataGrid-headWeight)',
|
|
31
32
|
lineHeight: 'normal'
|
|
32
33
|
});
|
|
33
|
-
const ColumnHeaderInnerTitle =
|
|
34
|
+
const ColumnHeaderInnerTitle = forwardRef(function ColumnHeaderInnerTitle(props, ref) {
|
|
34
35
|
// Tooltip adds aria-label to the props, which is not needed since the children prop is a string
|
|
35
36
|
// See https://github.com/mui/mui-x/pull/14482
|
|
36
37
|
const {
|
|
@@ -40,10 +41,11 @@ const ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHead
|
|
|
40
41
|
const rootProps = useGridRootProps();
|
|
41
42
|
const classes = useUtilityClasses(rootProps);
|
|
42
43
|
return /*#__PURE__*/_jsx(GridColumnHeaderTitleRoot, _extends({
|
|
43
|
-
ref: ref,
|
|
44
44
|
className: clsx(classes.root, className),
|
|
45
45
|
ownerState: rootProps
|
|
46
|
-
}, other
|
|
46
|
+
}, other, {
|
|
47
|
+
ref: ref
|
|
48
|
+
}));
|
|
47
49
|
});
|
|
48
50
|
// No React.memo here as if we display the sort icon, we need to recalculate the isOver
|
|
49
51
|
function GridColumnHeaderTitle(props) {
|
|
@@ -28,5 +28,5 @@ interface GridGenericColumnHeaderItemProps extends Pick<GridStateColDef, 'header
|
|
|
28
28
|
columnHeaderSeparatorProps?: Partial<GridColumnHeaderSeparatorProps>;
|
|
29
29
|
style?: React.CSSProperties;
|
|
30
30
|
}
|
|
31
|
-
declare const GridGenericColumnHeaderItem: React.ForwardRefExoticComponent<GridGenericColumnHeaderItemProps & React.RefAttributes<
|
|
31
|
+
declare const GridGenericColumnHeaderItem: React.ForwardRefExoticComponent<GridGenericColumnHeaderItemProps> | React.ForwardRefExoticComponent<GridGenericColumnHeaderItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export { GridGenericColumnHeaderItem };
|
|
@@ -4,12 +4,13 @@ const _excluded = ["classes", "columnMenuOpen", "colIndex", "height", "isResizin
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
|
|
8
9
|
import { GridColumnHeaderTitle } from "./GridColumnHeaderTitle.js";
|
|
9
10
|
import { GridColumnHeaderSeparator } from "./GridColumnHeaderSeparator.js";
|
|
10
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const GridGenericColumnHeaderItem =
|
|
13
|
+
const GridGenericColumnHeaderItem = forwardRef(function GridGenericColumnHeaderItem(props, ref) {
|
|
13
14
|
const {
|
|
14
15
|
classes,
|
|
15
16
|
colIndex,
|
|
@@ -54,7 +55,6 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
|
|
|
54
55
|
}
|
|
55
56
|
}, [apiRef, hasFocus]);
|
|
56
57
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
57
|
-
ref: handleRef,
|
|
58
58
|
className: clsx(classes.root, headerClassName),
|
|
59
59
|
style: _extends({}, style, {
|
|
60
60
|
height,
|
|
@@ -65,6 +65,7 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
|
|
|
65
65
|
"aria-colindex": colIndex + 1,
|
|
66
66
|
"aria-sort": ariaSort
|
|
67
67
|
}, other, {
|
|
68
|
+
ref: handleRef,
|
|
68
69
|
children: [/*#__PURE__*/_jsxs("div", _extends({
|
|
69
70
|
className: classes.draggableContainer,
|
|
70
71
|
draggable: isDraggable,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type GridIconButtonContainerProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare const GridIconButtonContainer: React.ForwardRefExoticComponent<GridIconButtonContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const GridIconButtonContainer: React.ForwardRefExoticComponent<GridIconButtonContainerProps> | React.ForwardRefExoticComponent<GridIconButtonContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +27,7 @@ const GridIconButtonContainerRoot = styled('div', {
|
|
|
26
27
|
visibility: 'hidden',
|
|
27
28
|
width: 0
|
|
28
29
|
}));
|
|
29
|
-
export const GridIconButtonContainer =
|
|
30
|
+
export const GridIconButtonContainer = forwardRef(function GridIconButtonContainer(props, ref) {
|
|
30
31
|
const {
|
|
31
32
|
className
|
|
32
33
|
} = props,
|
|
@@ -34,8 +35,9 @@ export const GridIconButtonContainer = /*#__PURE__*/React.forwardRef(function Gr
|
|
|
34
35
|
const rootProps = useGridRootProps();
|
|
35
36
|
const classes = useUtilityClasses(rootProps);
|
|
36
37
|
return /*#__PURE__*/_jsx(GridIconButtonContainerRoot, _extends({
|
|
37
|
-
ref: ref,
|
|
38
38
|
className: clsx(classes.root, className),
|
|
39
39
|
ownerState: rootProps
|
|
40
|
-
}, other
|
|
40
|
+
}, other, {
|
|
41
|
+
ref: ref
|
|
42
|
+
}));
|
|
41
43
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { GridRenderCellParams } from '../../models/params/gridCellParams';
|
|
3
|
-
declare const GridCellCheckboxForwardRef: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
3
|
+
declare const GridCellCheckboxForwardRef: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender>> | React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export { GridCellCheckboxForwardRef };
|
|
5
|
-
export declare const GridCellCheckboxRenderer: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export declare const GridCellCheckboxRenderer: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender>> | React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,10 +4,11 @@ const _excluded = ["field", "id", "formattedValue", "row", "rowNode", "colDef",
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
8
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
10
|
-
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
11
|
+
import { objectShallowCompare, useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
11
12
|
import { getCheckboxPropsSelector } from "../../hooks/features/rowSelection/utils.js";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
@@ -19,7 +20,7 @@ const useUtilityClasses = ownerState => {
|
|
|
19
20
|
};
|
|
20
21
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
21
22
|
};
|
|
22
|
-
const GridCellCheckboxForwardRef =
|
|
23
|
+
const GridCellCheckboxForwardRef = forwardRef(function GridCellCheckboxRenderer(props, ref) {
|
|
23
24
|
const {
|
|
24
25
|
field,
|
|
25
26
|
id,
|
|
@@ -75,26 +76,27 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
75
76
|
const {
|
|
76
77
|
isIndeterminate,
|
|
77
78
|
isChecked
|
|
78
|
-
} = useGridSelector(apiRef, checkboxPropsSelector);
|
|
79
|
+
} = useGridSelector(apiRef, checkboxPropsSelector, undefined, objectShallowCompare);
|
|
79
80
|
if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {
|
|
80
81
|
return null;
|
|
81
82
|
}
|
|
82
|
-
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
83
|
-
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
83
|
+
const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
84
84
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
85
|
-
ref: handleRef,
|
|
86
85
|
tabIndex: tabIndex,
|
|
87
|
-
checked:
|
|
86
|
+
checked: isChecked && !isIndeterminate,
|
|
88
87
|
onChange: handleChange,
|
|
89
88
|
className: classes.root,
|
|
90
89
|
inputProps: {
|
|
91
|
-
'aria-label': label
|
|
90
|
+
'aria-label': label,
|
|
91
|
+
name: 'select_row'
|
|
92
92
|
},
|
|
93
93
|
onKeyDown: handleKeyDown,
|
|
94
94
|
indeterminate: isIndeterminate,
|
|
95
95
|
disabled: !isSelectable,
|
|
96
96
|
touchRippleRef: rippleRef /* FIXME: typing error */
|
|
97
|
-
}, rootProps.slotProps?.baseCheckbox, other
|
|
97
|
+
}, rootProps.slotProps?.baseCheckbox, other, {
|
|
98
|
+
ref: handleRef
|
|
99
|
+
}));
|
|
98
100
|
});
|
|
99
101
|
process.env.NODE_ENV !== "production" ? GridCellCheckboxForwardRef.propTypes = {
|
|
100
102
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { GridColumnHeaderParams } from '../../models/params/gridColumnHeaderParams';
|
|
3
|
-
declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../..").GridValidRowModel, any, any> & React.RefAttributes<HTMLButtonElement>>;
|
|
3
|
+
declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../..").GridValidRowModel, any, any>> | React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../..").GridValidRowModel, any, any> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export { GridHeaderCheckbox };
|
|
@@ -4,6 +4,7 @@ const _excluded = ["field", "colDef"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { isMultipleRowSelectionEnabled } from "../../hooks/features/rowSelection/utils.js";
|
|
8
9
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
9
10
|
import { gridTabIndexColumnHeaderSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
|
|
@@ -23,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
23
24
|
};
|
|
24
25
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
25
26
|
};
|
|
26
|
-
const GridHeaderCheckbox =
|
|
27
|
+
const GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {
|
|
27
28
|
const other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
28
29
|
const [, forceUpdate] = React.useState(false);
|
|
29
30
|
const apiRef = useGridApiContext();
|
|
@@ -41,13 +42,16 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
41
42
|
return selection;
|
|
42
43
|
}
|
|
43
44
|
return selection.filter(id => {
|
|
45
|
+
if (rootProps.keepNonExistentRowsSelected) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
44
48
|
// The row might have been deleted
|
|
45
49
|
if (!apiRef.current.getRow(id)) {
|
|
46
50
|
return false;
|
|
47
51
|
}
|
|
48
52
|
return rootProps.isRowSelectable(apiRef.current.getRowParams(id));
|
|
49
53
|
});
|
|
50
|
-
}, [apiRef, rootProps.isRowSelectable, selection]);
|
|
54
|
+
}, [apiRef, rootProps.isRowSelectable, selection, rootProps.keepNonExistentRowsSelected]);
|
|
51
55
|
|
|
52
56
|
// All the rows that could be selected / unselected by toggling this checkbox
|
|
53
57
|
const selectionCandidates = React.useMemo(() => {
|
|
@@ -56,10 +60,13 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
56
60
|
// Convert to an object to make O(1) checking if a row exists or not
|
|
57
61
|
// TODO create selector that returns visibleRowIds/paginatedVisibleRowIds as an object
|
|
58
62
|
return rowIds.reduce((acc, id) => {
|
|
63
|
+
if (!apiRef.current.isRowSelectable(id)) {
|
|
64
|
+
return acc;
|
|
65
|
+
}
|
|
59
66
|
acc[id] = true;
|
|
60
67
|
return acc;
|
|
61
68
|
}, {});
|
|
62
|
-
}, [rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
|
|
69
|
+
}, [apiRef, rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
|
|
63
70
|
|
|
64
71
|
// Amount of rows selected and that are visible in the current page
|
|
65
72
|
const currentSelectionSize = React.useMemo(() => filteredSelection.filter(id => selectionCandidates[id]).length, [filteredSelection, selectionCandidates]);
|
|
@@ -92,21 +99,22 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
92
99
|
React.useEffect(() => {
|
|
93
100
|
return apiRef.current.subscribeEvent('rowSelectionChange', handleSelectionChange);
|
|
94
101
|
}, [apiRef, handleSelectionChange]);
|
|
95
|
-
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
96
|
-
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
102
|
+
const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
97
103
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
98
|
-
ref: ref,
|
|
99
104
|
indeterminate: isIndeterminate,
|
|
100
|
-
checked:
|
|
105
|
+
checked: isChecked && !isIndeterminate,
|
|
101
106
|
onChange: handleChange,
|
|
102
107
|
className: classes.root,
|
|
103
108
|
inputProps: {
|
|
104
|
-
'aria-label': label
|
|
109
|
+
'aria-label': label,
|
|
110
|
+
name: 'select_all_rows'
|
|
105
111
|
},
|
|
106
112
|
tabIndex: tabIndex,
|
|
107
113
|
onKeyDown: handleKeyDown,
|
|
108
114
|
disabled: !isMultipleRowSelectionEnabled(rootProps)
|
|
109
|
-
}, rootProps.slotProps?.baseCheckbox, other
|
|
115
|
+
}, rootProps.slotProps?.baseCheckbox, other, {
|
|
116
|
+
ref: ref
|
|
117
|
+
}));
|
|
110
118
|
});
|
|
111
119
|
process.env.NODE_ENV !== "production" ? GridHeaderCheckbox.propTypes = {
|
|
112
120
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TextFieldProps } from '
|
|
2
|
+
import { TextFieldProps } from '../../models/gridBaseSlots';
|
|
3
3
|
import type { GridColDef } from '../../models/colDef/gridColDef';
|
|
4
4
|
export interface GridColumnsManagementProps {
|
|
5
5
|
sort?: 'asc' | 'desc';
|