@mui/x-data-grid 8.0.0-alpha.0 → 8.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2215 -119
- package/DataGrid/DataGrid.js +20 -38
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +3 -3
- package/colDef/gridDateOperators.d.ts +2 -1
- package/colDef/gridNumericOperators.d.ts +4 -1
- package/components/GridApiContext.js +2 -0
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridConfigurationContext.js +2 -0
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridHeaders.js +2 -2
- package/components/GridLoadingOverlay.d.ts +3 -3
- package/components/GridLoadingOverlay.js +14 -12
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +7 -4
- package/components/GridRow.d.ts +6 -11
- package/components/GridRow.js +55 -87
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridScrollArea.js +2 -0
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +22 -21
- package/components/base/GridOverlays.d.ts +4 -3
- package/components/base/GridOverlays.js +2 -24
- package/components/base/index.d.ts +0 -1
- package/components/base/index.js +1 -2
- package/components/cell/GridActionsCell.js +8 -1
- package/components/cell/GridActionsCellItem.d.ts +17 -10
- package/components/cell/GridActionsCellItem.js +9 -8
- package/components/cell/GridCell.d.ts +19 -23
- package/components/cell/GridCell.js +52 -92
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +73 -4
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/cell/GridSkeletonCell.js +1 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
- package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/components/columnsManagement/GridColumnsManagement.d.ts +2 -0
- package/components/columnsManagement/GridColumnsManagement.js +81 -11
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +2 -2
- package/components/containers/GridRoot.js +18 -8
- package/components/containers/GridRootStyles.js +160 -50
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +3 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/components/panel/GridColumnsPanel.js +1 -2
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +5 -3
- package/components/panel/GridPanelContent.js +7 -3
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +4 -3
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +5 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +4 -11
- package/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/components/panel/filterPanel/index.d.ts +2 -2
- package/components/panel/filterPanel/index.js +1 -2
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +11 -5
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/components/toolbar/GridToolbarExport.d.ts +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/components/toolbar/GridToolbarFilterButton.d.ts +3 -1
- package/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/components/toolbar/GridToolbarQuickFilter.d.ts +6 -2
- package/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/components/virtualization/GridMainContainer.d.ts +13 -1
- package/components/virtualization/GridMainContainer.js +14 -5
- package/components/virtualization/GridVirtualScrollbar.d.ts +5 -1
- package/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/components/virtualization/GridVirtualScroller.js +27 -12
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/constants/dataGridPropsDefaultValues.js +2 -4
- package/constants/gridClasses.d.ts +36 -12
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +12 -0
- package/context/GridContextProvider.d.ts +2 -1
- package/context/GridRootPropsContext.js +2 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +5 -8
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/hooks/core/useGridApiInitialization.d.ts +2 -2
- package/hooks/core/useGridApiInitialization.js +2 -2
- package/hooks/core/useGridInitialization.d.ts +2 -2
- package/hooks/core/useGridIsRtl.d.ts +2 -2
- package/hooks/core/useGridLocaleText.d.ts +2 -2
- package/hooks/core/useGridLoggerFactory.d.ts +2 -2
- package/hooks/core/useGridRefs.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.js +3 -3
- package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -69
- package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
- package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
- package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
- package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
- package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.js +7 -3
- package/hooks/features/density/densitySelector.d.ts +1 -1
- package/hooks/features/density/useGridDensity.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
- package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +11 -32
- package/hooks/features/editing/gridEditingSelectors.d.ts +6 -0
- package/hooks/features/editing/gridEditingSelectors.js +7 -1
- package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
- package/hooks/features/editing/useGridCellEditing.js +4 -4
- package/hooks/features/editing/useGridEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.js +7 -8
- package/hooks/features/events/useGridEvents.d.ts +2 -2
- package/hooks/features/export/serializers/csvSerializer.d.ts +2 -1
- package/hooks/features/export/useGridCsvExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.js +1 -1
- package/hooks/features/export/utils.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
- package/hooks/features/filter/gridFilterSelector.js +6 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +7 -7
- package/hooks/features/filter/gridFilterUtils.js +3 -3
- package/hooks/features/filter/useGridFilter.d.ts +2 -2
- package/hooks/features/filter/useGridFilter.js +1 -1
- package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
- package/hooks/features/focus/useGridFocus.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.js +3 -2
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -4
- package/hooks/features/keyboardNavigation/utils.js +0 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
- package/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/hooks/features/listView/index.d.ts +1 -0
- package/hooks/features/listView/index.js +1 -0
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/listView/useGridListView.js +2 -1
- package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
- package/hooks/features/overlays/useGridOverlays.js +22 -2
- package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
- package/hooks/features/pagination/gridPaginationSelector.d.ts +34 -9
- package/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/hooks/features/pagination/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +5 -3
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/hooks/features/pagination/useGridRowCount.d.ts +2 -2
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +1 -0
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/hooks/features/preferencesPanel/index.d.ts +1 -1
- package/hooks/features/preferencesPanel/index.js +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +2 -2
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +8 -16
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +4 -3
- package/hooks/features/rowSelection/utils.js +2 -2
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
- package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
- package/hooks/features/rows/gridRowsSelector.js +1 -2
- package/hooks/features/rows/gridRowsUtils.d.ts +4 -4
- package/hooks/features/rows/gridRowsUtils.js +0 -9
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
- package/hooks/features/rows/useGridParamsApi.js +33 -14
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +23 -27
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +3 -2
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
- package/hooks/features/scroll/useGridScroll.d.ts +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
- package/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
- package/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/hooks/features/sorting/index.d.ts +2 -1
- package/hooks/features/sorting/index.js +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +2 -2
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +15 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +4 -4
- package/hooks/utils/useGridApiEventHandler.js +1 -1
- package/hooks/utils/useGridApiMethod.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +2 -2
- package/hooks/utils/useGridApiRef.js +1 -1
- package/hooks/utils/useGridInitializeState.d.ts +3 -3
- package/hooks/utils/useGridLogger.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +2 -1
- package/hooks/utils/useGridPrivateApiContext.d.ts +2 -1
- package/hooks/utils/useGridSelector.d.ts +5 -7
- package/hooks/utils/useGridSelector.js +6 -44
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +7 -4
- package/internals/index.js +5 -3
- package/internals/utils/attachPinnedStyle.d.ts +2 -0
- package/internals/utils/attachPinnedStyle.js +9 -0
- package/internals/utils/getPinnedCellOffset.d.ts +3 -3
- package/internals/utils/getPinnedCellOffset.js +6 -7
- package/internals/utils/index.d.ts +1 -1
- package/internals/utils/index.js +2 -2
- package/locales/arSD.js +14 -0
- package/locales/beBY.js +13 -0
- package/locales/bgBG.js +15 -0
- package/locales/csCZ.js +15 -0
- package/locales/daDK.js +15 -0
- package/locales/deDE.js +13 -0
- package/locales/elGR.js +14 -0
- package/locales/esES.js +17 -4
- package/locales/faIR.js +18 -4
- package/locales/fiFI.js +15 -0
- package/locales/frFR.js +15 -0
- package/locales/heIL.js +17 -4
- package/locales/hrHR.js +15 -0
- package/locales/huHU.js +15 -0
- package/locales/isIS.js +14 -0
- package/locales/itIT.js +15 -0
- package/locales/jaJP.js +15 -0
- package/locales/koKR.js +47 -37
- package/locales/nbNO.js +15 -0
- package/locales/nlNL.js +18 -4
- package/locales/nnNO.js +15 -0
- package/locales/plPL.js +15 -0
- package/locales/ptBR.js +13 -0
- package/locales/ptPT.js +13 -0
- package/locales/roRO.js +21 -9
- package/locales/ruRU.js +15 -0
- package/locales/skSK.js +14 -0
- package/locales/svSE.js +19 -5
- package/locales/trTR.js +15 -2
- package/locales/ukUA.js +14 -0
- package/locales/urPK.js +22 -9
- package/locales/viVN.js +15 -0
- package/locales/zhCN.js +17 -4
- package/locales/zhHK.js +14 -0
- package/locales/zhTW.js +14 -0
- package/material/index.js +58 -7
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCoreApi.d.ts +7 -7
- package/models/api/gridDensityApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +11 -0
- package/models/api/gridParamsApi.d.ts +29 -2
- package/models/api/gridStateApi.d.ts +1 -1
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/colDef/gridColDef.d.ts +38 -33
- package/models/controlStateItem.d.ts +2 -2
- package/models/events/gridEventLookup.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +95 -0
- package/models/gridDataSource.d.ts +13 -13
- package/models/gridExport.d.ts +2 -2
- package/models/gridFilterInputComponent.d.ts +32 -0
- package/models/gridFilterOperator.d.ts +6 -4
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponent.d.ts +16 -1
- package/models/gridSlotsComponentsProps.d.ts +45 -9
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/index.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +12 -24
- package/modern/DataGrid/DataGrid.js +20 -38
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/DataGrid/useDataGridProps.js +3 -3
- package/modern/components/GridApiContext.js +2 -0
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridConfigurationContext.js +2 -0
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridHeaders.js +2 -2
- package/modern/components/GridLoadingOverlay.js +14 -12
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +7 -4
- package/modern/components/GridRow.js +55 -87
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridScrollArea.js +2 -0
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +22 -21
- package/modern/components/base/GridOverlays.js +2 -24
- package/modern/components/base/index.js +1 -2
- package/modern/components/cell/GridActionsCell.js +8 -1
- package/modern/components/cell/GridActionsCellItem.js +9 -8
- package/modern/components/cell/GridCell.js +52 -92
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +73 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
- package/modern/components/cell/GridSkeletonCell.js +1 -2
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/modern/components/columnsManagement/GridColumnsManagement.js +81 -11
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +18 -8
- package/modern/components/containers/GridRootStyles.js +160 -50
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/modern/components/panel/GridColumnsPanel.js +1 -2
- package/modern/components/panel/GridPanel.js +5 -3
- package/modern/components/panel/GridPanelContent.js +7 -3
- package/modern/components/panel/GridPanelFooter.js +4 -3
- package/modern/components/panel/GridPanelWrapper.js +5 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/modern/components/panel/filterPanel/index.js +1 -2
- package/modern/components/toolbar/GridToolbar.js +11 -5
- package/modern/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/modern/components/toolbar/GridToolbarExport.js +2 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/modern/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/modern/components/virtualization/GridMainContainer.js +14 -5
- package/modern/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/modern/components/virtualization/GridVirtualScroller.js +27 -12
- package/modern/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/modern/constants/dataGridPropsDefaultValues.js +2 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +12 -0
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/core/useGridApiInitialization.js +2 -2
- package/modern/hooks/core/useGridStateInitialization.js +3 -3
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -69
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/modern/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/columns/useGridColumns.js +7 -3
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -32
- package/modern/hooks/features/editing/gridEditingSelectors.js +7 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -8
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +1 -1
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.js +1 -0
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/modern/hooks/features/keyboardNavigation/utils.js +0 -5
- package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/modern/hooks/features/listView/index.js +1 -0
- package/modern/hooks/features/listView/useGridListView.js +2 -1
- package/modern/hooks/features/overlays/useGridOverlays.js +22 -2
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/useGridPagination.js +5 -3
- package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/modern/hooks/features/preferencesPanel/index.js +1 -1
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -16
- package/modern/hooks/features/rowSelection/utils.js +2 -2
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -9
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridParamsApi.js +33 -14
- package/modern/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/modern/hooks/features/rows/useGridRows.js +23 -27
- package/modern/hooks/features/rows/useGridRowsMeta.js +3 -2
- package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/modern/hooks/features/sorting/index.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
- package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
- package/modern/hooks/utils/useGridApiRef.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +6 -44
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +5 -3
- package/modern/internals/utils/attachPinnedStyle.js +9 -0
- package/modern/internals/utils/getPinnedCellOffset.js +6 -7
- package/modern/internals/utils/index.js +2 -2
- package/modern/locales/arSD.js +14 -0
- package/modern/locales/beBY.js +13 -0
- package/modern/locales/bgBG.js +15 -0
- package/modern/locales/csCZ.js +15 -0
- package/modern/locales/daDK.js +15 -0
- package/modern/locales/deDE.js +13 -0
- package/modern/locales/elGR.js +14 -0
- package/modern/locales/esES.js +17 -4
- package/modern/locales/faIR.js +18 -4
- package/modern/locales/fiFI.js +15 -0
- package/modern/locales/frFR.js +15 -0
- package/modern/locales/heIL.js +17 -4
- package/modern/locales/hrHR.js +15 -0
- package/modern/locales/huHU.js +15 -0
- package/modern/locales/isIS.js +14 -0
- package/modern/locales/itIT.js +15 -0
- package/modern/locales/jaJP.js +15 -0
- package/modern/locales/koKR.js +47 -37
- package/modern/locales/nbNO.js +15 -0
- package/modern/locales/nlNL.js +18 -4
- package/modern/locales/nnNO.js +15 -0
- package/modern/locales/plPL.js +15 -0
- package/modern/locales/ptBR.js +13 -0
- package/modern/locales/ptPT.js +13 -0
- package/modern/locales/roRO.js +21 -9
- package/modern/locales/ruRU.js +15 -0
- package/modern/locales/skSK.js +14 -0
- package/modern/locales/svSE.js +19 -5
- package/modern/locales/trTR.js +15 -2
- package/modern/locales/ukUA.js +14 -0
- package/modern/locales/urPK.js +22 -9
- package/modern/locales/viVN.js +15 -0
- package/modern/locales/zhCN.js +17 -4
- package/modern/locales/zhHK.js +14 -0
- package/modern/locales/zhTW.js +14 -0
- package/modern/material/index.js +58 -7
- package/modern/models/api/index.js +0 -1
- package/modern/models/gridBaseSlots.js +1 -0
- package/modern/models/gridFilterInputComponent.js +1 -0
- package/modern/utils/assert.js +3 -0
- package/modern/utils/cellBorderUtils.js +5 -5
- package/modern/utils/createSelector.js +1 -120
- package/modern/utils/domUtils.js +7 -2
- package/modern/utils/isJSDOM.js +1 -0
- package/modern/utils/roundToDecimalPlaces.js +3 -0
- package/modern/utils/rtlFlipSide.js +22 -0
- package/modern/utils/utils.js +6 -1
- package/node/DataGrid/DataGrid.js +18 -36
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/DataGrid/useDataGridProps.js +2 -2
- package/node/components/GridApiContext.js +1 -0
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridConfigurationContext.js +1 -0
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridHeaders.js +2 -2
- package/node/components/GridLoadingOverlay.js +14 -12
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +7 -4
- package/node/components/GridRow.js +51 -84
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridScrollArea.js +1 -0
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +21 -20
- package/node/components/base/GridOverlays.js +2 -24
- package/node/components/base/index.js +0 -11
- package/node/components/cell/GridActionsCell.js +8 -1
- package/node/components/cell/GridActionsCellItem.js +7 -8
- package/node/components/cell/GridCell.js +51 -91
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +73 -4
- package/node/components/cell/GridEditSingleSelectCell.js +2 -2
- package/node/components/cell/GridSkeletonCell.js +1 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
- package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
- package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/node/components/columnsManagement/GridColumnsManagement.js +81 -11
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +17 -7
- package/node/components/containers/GridRootStyles.js +160 -50
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/node/components/panel/GridColumnsPanel.js +1 -2
- package/node/components/panel/GridPanel.js +5 -3
- package/node/components/panel/GridPanelContent.js +7 -3
- package/node/components/panel/GridPanelFooter.js +5 -4
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +42 -33
- package/node/components/panel/filterPanel/GridFilterInputDate.js +49 -30
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/node/components/panel/filterPanel/GridFilterInputValue.js +62 -37
- package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/node/components/panel/filterPanel/index.js +7 -23
- package/node/components/toolbar/GridToolbar.js +11 -5
- package/node/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/node/components/toolbar/GridToolbarExport.js +2 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/node/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/node/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/node/components/virtualization/GridMainContainer.js +14 -5
- package/node/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/node/components/virtualization/GridVirtualScroller.js +27 -12
- package/node/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/node/constants/dataGridPropsDefaultValues.js +2 -4
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +12 -0
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/core/useGridApiInitialization.js +2 -2
- package/node/hooks/core/useGridStateInitialization.js +3 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -67
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/columns/useGridColumns.js +7 -3
- package/node/hooks/features/dimensions/useGridDimensions.js +12 -33
- package/node/hooks/features/editing/gridEditingSelectors.js +8 -2
- package/node/hooks/features/editing/useGridCellEditing.js +3 -3
- package/node/hooks/features/editing/useGridRowEditing.js +5 -6
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/focus/useGridFocus.js +3 -2
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -15
- package/node/hooks/features/keyboardNavigation/utils.js +0 -6
- package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/node/hooks/features/listView/index.js +16 -0
- package/node/hooks/features/listView/useGridListView.js +2 -1
- package/node/hooks/features/overlays/useGridOverlays.js +24 -2
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/useGridPagination.js +5 -3
- package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/node/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +9 -2
- package/node/hooks/features/preferencesPanel/index.js +11 -10
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/node/hooks/features/rowSelection/useGridRowSelection.js +7 -15
- package/node/hooks/features/rowSelection/utils.js +2 -2
- package/node/hooks/features/rows/gridRowsSelector.js +2 -3
- package/node/hooks/features/rows/gridRowsUtils.js +0 -9
- package/node/hooks/features/rows/index.js +0 -7
- package/node/hooks/features/rows/useGridParamsApi.js +33 -14
- package/node/hooks/features/rows/useGridRowSpanning.js +95 -84
- package/node/hooks/features/rows/useGridRows.js +21 -25
- package/node/hooks/features/rows/useGridRowsMeta.js +5 -4
- package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
- package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/node/hooks/features/sorting/index.js +24 -16
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +40 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +171 -96
- package/node/hooks/utils/useGridApiEventHandler.js +1 -1
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridSelector.js +8 -47
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +36 -24
- package/node/internals/utils/attachPinnedStyle.js +15 -0
- package/node/internals/utils/getPinnedCellOffset.js +6 -7
- package/node/internals/utils/index.js +11 -11
- package/node/locales/arSD.js +14 -0
- package/node/locales/beBY.js +13 -0
- package/node/locales/bgBG.js +15 -0
- package/node/locales/csCZ.js +15 -0
- package/node/locales/daDK.js +15 -0
- package/node/locales/deDE.js +13 -0
- package/node/locales/elGR.js +14 -0
- package/node/locales/esES.js +17 -4
- package/node/locales/faIR.js +18 -4
- package/node/locales/fiFI.js +15 -0
- package/node/locales/frFR.js +15 -0
- package/node/locales/heIL.js +17 -4
- package/node/locales/hrHR.js +15 -0
- package/node/locales/huHU.js +15 -0
- package/node/locales/isIS.js +14 -0
- package/node/locales/itIT.js +15 -0
- package/node/locales/jaJP.js +15 -0
- package/node/locales/koKR.js +47 -37
- package/node/locales/nbNO.js +15 -0
- package/node/locales/nlNL.js +18 -4
- package/node/locales/nnNO.js +15 -0
- package/node/locales/plPL.js +15 -0
- package/node/locales/ptBR.js +13 -0
- package/node/locales/ptPT.js +13 -0
- package/node/locales/roRO.js +21 -9
- package/node/locales/ruRU.js +15 -0
- package/node/locales/skSK.js +14 -0
- package/node/locales/svSE.js +19 -5
- package/node/locales/trTR.js +15 -2
- package/node/locales/ukUA.js +14 -0
- package/node/locales/urPK.js +22 -9
- package/node/locales/viVN.js +15 -0
- package/node/locales/zhCN.js +17 -4
- package/node/locales/zhHK.js +14 -0
- package/node/locales/zhTW.js +14 -0
- package/node/material/index.js +59 -7
- package/node/models/api/index.js +0 -11
- package/node/models/gridFilterInputComponent.js +5 -0
- package/node/utils/assert.js +9 -0
- package/node/utils/cellBorderUtils.js +5 -5
- package/node/utils/createSelector.js +4 -125
- package/node/utils/domUtils.js +7 -2
- package/node/utils/isJSDOM.js +7 -0
- package/node/utils/roundToDecimalPlaces.js +9 -0
- package/node/utils/rtlFlipSide.js +29 -0
- package/node/utils/utils.js +8 -1
- package/package.json +5 -5
- package/themeAugmentation/overrides.d.ts +10 -5
- package/utils/assert.d.ts +2 -0
- package/utils/assert.js +3 -0
- package/utils/cellBorderUtils.d.ts +3 -3
- package/utils/cellBorderUtils.js +5 -5
- package/utils/createSelector.d.ts +7 -19
- package/utils/createSelector.js +1 -120
- package/utils/domUtils.js +7 -2
- package/utils/getPublicApiRef.d.ts +2 -1
- package/utils/isJSDOM.d.ts +1 -0
- package/utils/isJSDOM.js +1 -0
- package/utils/keyboardUtils.d.ts +1 -1
- package/utils/roundToDecimalPlaces.d.ts +1 -0
- package/utils/roundToDecimalPlaces.js +3 -0
- package/utils/rtlFlipSide.d.ts +2 -0
- package/utils/rtlFlipSide.js +22 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +6 -1
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
- package/internals/utils/useProps.d.ts +0 -1
- package/internals/utils/useProps.js +0 -24
- package/joy/icons.d.ts +0 -32
- package/joy/icons.js +0 -431
- package/joy/index.d.ts +0 -2
- package/joy/index.js +0 -2
- package/joy/joySlots.d.ts +0 -3
- package/joy/joySlots.js +0 -384
- package/joy/package.json +0 -6
- package/modern/internals/utils/useProps.js +0 -24
- package/modern/joy/icons.js +0 -431
- package/modern/joy/index.js +0 -2
- package/modern/joy/joySlots.js +0 -384
- package/node/internals/utils/useProps.js +0 -30
- package/node/joy/icons.js +0 -439
- package/node/joy/index.js +0 -13
- package/node/joy/joySlots.js +0 -392
- /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
- /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
- /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MenuItemProps } from '@mui/material/MenuItem';
|
|
2
|
+
import { GridSlotProps } from '../../models/gridSlotsComponentsProps';
|
|
4
3
|
interface GridActionsCellItemCommonProps {
|
|
5
4
|
label: string;
|
|
6
|
-
icon?: React.ReactElement
|
|
5
|
+
icon?: React.ReactElement<any>;
|
|
7
6
|
/** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
|
|
8
7
|
component?: React.ElementType;
|
|
9
8
|
}
|
|
10
9
|
export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
|
|
11
10
|
showInMenu?: false;
|
|
12
|
-
icon: React.ReactElement
|
|
13
|
-
} & Omit<
|
|
11
|
+
icon: React.ReactElement<any>;
|
|
12
|
+
} & Omit<GridSlotProps['baseIconButton'], 'component'>) | ({
|
|
14
13
|
showInMenu: true;
|
|
15
14
|
/**
|
|
16
15
|
* If false, the menu will not close when this item is clicked.
|
|
@@ -18,11 +17,17 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
|
|
|
18
17
|
*/
|
|
19
18
|
closeMenuOnClick?: boolean;
|
|
20
19
|
closeMenu?: () => void;
|
|
21
|
-
} & Omit<
|
|
22
|
-
declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
|
|
20
|
+
} & Omit<GridSlotProps['baseMenuItem'], 'component'>));
|
|
21
|
+
declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
|
|
23
22
|
showInMenu?: false;
|
|
24
|
-
icon: React.ReactElement
|
|
25
|
-
} & Omit<
|
|
23
|
+
icon: React.ReactElement<any>;
|
|
24
|
+
} & Omit<Omit<import("../../models/gridBaseSlots").ButtonProps, "startIcon"> & {
|
|
25
|
+
label?: string;
|
|
26
|
+
color?: "default" | "inherit" | "primary";
|
|
27
|
+
edge?: "start" | "end" | false;
|
|
28
|
+
} & import("../..").BaseIconButtonPropsOverrides & import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "tabIndex" | "color" | "style" | "className" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & {
|
|
29
|
+
component?: React.ElementType;
|
|
30
|
+
}, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
|
|
26
31
|
showInMenu: true;
|
|
27
32
|
/**
|
|
28
33
|
* If false, the menu will not close when this item is clicked.
|
|
@@ -30,5 +35,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridAct
|
|
|
30
35
|
*/
|
|
31
36
|
closeMenuOnClick?: boolean;
|
|
32
37
|
closeMenu?: () => void;
|
|
33
|
-
} & Omit<MenuItemProps, "
|
|
38
|
+
} & Omit<import("../../models/gridBaseSlots").MenuItemProps & import("../..").BaseMenuItemPropsOverrides & import("@mui/material").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children" | "tabIndex" | "style" | "autoFocus" | "className" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters" | "divider" | "selected"> & {
|
|
39
|
+
component?: React.ElementType;
|
|
40
|
+
}, "component">, "ref">) & React.RefAttributes<HTMLElement>>;
|
|
34
41
|
export { GridActionsCellItem };
|
|
@@ -4,10 +4,12 @@ const _excluded = ["label", "icon", "showInMenu", "onClick"],
|
|
|
4
4
|
_excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
8
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
// FIXME(v8:romgrk): Make parametric
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
const GridActionsCellItem = forwardRef((props, ref) => {
|
|
11
13
|
const rootProps = useGridRootProps();
|
|
12
14
|
if (!props.showInMenu) {
|
|
13
15
|
const {
|
|
@@ -20,13 +22,13 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
20
22
|
onClick?.(event);
|
|
21
23
|
};
|
|
22
24
|
return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
23
|
-
ref: ref,
|
|
24
25
|
size: "small",
|
|
25
26
|
role: "menuitem",
|
|
26
27
|
"aria-label": label
|
|
27
28
|
}, other, {
|
|
28
29
|
onClick: handleClick
|
|
29
30
|
}, rootProps.slotProps?.baseIconButton, {
|
|
31
|
+
ref: ref,
|
|
30
32
|
children: /*#__PURE__*/React.cloneElement(icon, {
|
|
31
33
|
fontSize: 'small'
|
|
32
34
|
})
|
|
@@ -46,13 +48,12 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
46
48
|
closeMenu?.();
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
|
-
return /*#__PURE__*/
|
|
51
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({
|
|
50
52
|
ref: ref
|
|
51
53
|
}, other, {
|
|
52
54
|
onClick: handleClick,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}), label]
|
|
55
|
+
iconStart: icon,
|
|
56
|
+
children: label
|
|
56
57
|
}));
|
|
57
58
|
});
|
|
58
59
|
process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { GridRowId
|
|
3
|
-
import {
|
|
2
|
+
import { GridRowId } from '../../models';
|
|
3
|
+
import { GridAlignment, GridStateColDef } from '../../models/colDef/gridColDef';
|
|
4
|
+
import { GridRowModel, GridTreeNode } from '../../models/gridRows';
|
|
4
5
|
import { GridPinnedColumnPosition } from '../../hooks/features/columns/gridColumnsInterfaces';
|
|
5
|
-
|
|
6
|
-
NONE = 0,
|
|
7
|
-
LEFT = 1,
|
|
8
|
-
RIGHT = 2,
|
|
9
|
-
VIRTUAL = 3
|
|
10
|
-
}
|
|
6
|
+
import { PinnedColumnPosition } from '../../internals/constants';
|
|
11
7
|
export declare const gridPinnedColumnPositionLookup: {
|
|
12
8
|
1: GridPinnedColumnPosition;
|
|
13
9
|
2: GridPinnedColumnPosition;
|
|
@@ -18,18 +14,18 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
18
14
|
align: GridAlignment;
|
|
19
15
|
className?: string;
|
|
20
16
|
colIndex: number;
|
|
21
|
-
column:
|
|
17
|
+
column: GridStateColDef;
|
|
18
|
+
row: GridRowModel;
|
|
22
19
|
rowId: GridRowId;
|
|
20
|
+
rowNode: GridTreeNode;
|
|
23
21
|
width: number;
|
|
24
22
|
colSpan?: number;
|
|
25
23
|
disableDragEvents?: boolean;
|
|
26
24
|
isNotVisible: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
sectionLength: number;
|
|
32
|
-
gridHasFiller: boolean;
|
|
25
|
+
pinnedOffset?: number;
|
|
26
|
+
pinnedPosition: PinnedColumnPosition;
|
|
27
|
+
showRightBorder: boolean;
|
|
28
|
+
showLeftBorder: boolean;
|
|
33
29
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
34
30
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
31
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
@@ -46,23 +42,23 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
46
42
|
style?: React.CSSProperties;
|
|
47
43
|
[x: `data-${string}`]: string;
|
|
48
44
|
};
|
|
49
|
-
declare const MemoizedGridCell: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
45
|
+
declare const MemoizedGridCell: React.ForwardRefExoticComponent<GridCellProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
50
46
|
[x: `data-${string}`]: string;
|
|
51
47
|
align: GridAlignment;
|
|
52
48
|
className?: string;
|
|
53
49
|
colIndex: number;
|
|
54
|
-
column:
|
|
50
|
+
column: GridStateColDef;
|
|
51
|
+
row: GridRowModel;
|
|
55
52
|
rowId: GridRowId;
|
|
53
|
+
rowNode: GridTreeNode;
|
|
56
54
|
width: number;
|
|
57
55
|
colSpan?: number;
|
|
58
56
|
disableDragEvents?: boolean;
|
|
59
57
|
isNotVisible: boolean;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
sectionLength: number;
|
|
65
|
-
gridHasFiller: boolean;
|
|
58
|
+
pinnedOffset?: number;
|
|
59
|
+
pinnedPosition: PinnedColumnPosition;
|
|
60
|
+
showRightBorder: boolean;
|
|
61
|
+
showLeftBorder: boolean;
|
|
66
62
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
67
63
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
68
64
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["column", "rowId", "
|
|
3
|
+
const _excluded = ["column", "row", "rowId", "rowNode", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "showRightBorder", "showLeftBorder", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
|
|
4
4
|
_excluded2 = ["changeReason", "unstable_updateValueOnRender"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -8,54 +8,25 @@ import clsx from 'clsx';
|
|
|
8
8
|
import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';
|
|
9
9
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
10
10
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
11
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
11
12
|
import { doesSupportPreventScroll } from "../../utils/doesSupportPreventScroll.js";
|
|
12
13
|
import { getDataGridUtilityClass, gridClasses } from "../../constants/gridClasses.js";
|
|
13
14
|
import { GridCellModes } from "../../models/index.js";
|
|
14
|
-
import { useGridSelector
|
|
15
|
-
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
15
|
+
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
16
16
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
17
|
-
import { gridFocusCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
|
|
18
|
-
import { MissingRowIdError } from "../../hooks/features/rows/useGridParamsApi.js";
|
|
19
|
-
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../utils/cellBorderUtils.js";
|
|
17
|
+
import { gridFocusCellSelector, gridTabIndexCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
|
|
20
18
|
import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
|
|
19
|
+
import { PinnedColumnPosition } from "../../internals/constants.js";
|
|
21
20
|
import { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from "../../hooks/features/rows/gridRowSpanningSelectors.js";
|
|
21
|
+
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
|
|
22
|
+
import { gridEditCellStateSelector } from "../../hooks/features/editing/gridEditingSelectors.js";
|
|
23
|
+
import { attachPinnedStyle } from "../../internals/utils/index.js";
|
|
22
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
export let PinnedPosition = /*#__PURE__*/function (PinnedPosition) {
|
|
24
|
-
PinnedPosition[PinnedPosition["NONE"] = 0] = "NONE";
|
|
25
|
-
PinnedPosition[PinnedPosition["LEFT"] = 1] = "LEFT";
|
|
26
|
-
PinnedPosition[PinnedPosition["RIGHT"] = 2] = "RIGHT";
|
|
27
|
-
PinnedPosition[PinnedPosition["VIRTUAL"] = 3] = "VIRTUAL";
|
|
28
|
-
return PinnedPosition;
|
|
29
|
-
}({});
|
|
30
25
|
export const gridPinnedColumnPositionLookup = {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
};
|
|
36
|
-
const EMPTY_CELL_PARAMS = {
|
|
37
|
-
id: -1,
|
|
38
|
-
field: '__unset__',
|
|
39
|
-
row: {},
|
|
40
|
-
rowNode: {
|
|
41
|
-
id: -1,
|
|
42
|
-
depth: 0,
|
|
43
|
-
type: 'leaf',
|
|
44
|
-
parent: -1,
|
|
45
|
-
groupingKey: null
|
|
46
|
-
},
|
|
47
|
-
colDef: {
|
|
48
|
-
type: 'string',
|
|
49
|
-
field: '__unset__',
|
|
50
|
-
computedWidth: 0
|
|
51
|
-
},
|
|
52
|
-
cellMode: GridCellModes.View,
|
|
53
|
-
hasFocus: false,
|
|
54
|
-
tabIndex: -1,
|
|
55
|
-
value: null,
|
|
56
|
-
formattedValue: '__unset__',
|
|
57
|
-
isEditable: false,
|
|
58
|
-
api: {}
|
|
26
|
+
[PinnedColumnPosition.LEFT]: GridPinnedColumnPosition.LEFT,
|
|
27
|
+
[PinnedColumnPosition.RIGHT]: GridPinnedColumnPosition.RIGHT,
|
|
28
|
+
[PinnedColumnPosition.NONE]: undefined,
|
|
29
|
+
[PinnedColumnPosition.VIRTUAL]: undefined
|
|
59
30
|
};
|
|
60
31
|
const useUtilityClasses = ownerState => {
|
|
61
32
|
const {
|
|
@@ -69,7 +40,7 @@ const useUtilityClasses = ownerState => {
|
|
|
69
40
|
classes
|
|
70
41
|
} = ownerState;
|
|
71
42
|
const slots = {
|
|
72
|
-
root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition ===
|
|
43
|
+
root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
|
|
73
44
|
};
|
|
74
45
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
75
46
|
};
|
|
@@ -77,11 +48,12 @@ let warnedOnce = false;
|
|
|
77
48
|
|
|
78
49
|
// TODO(v7): Removing the wrapper will break the docs performance visualization demo.
|
|
79
50
|
|
|
80
|
-
const GridCell =
|
|
51
|
+
const GridCell = forwardRef(function GridCell(props, ref) {
|
|
81
52
|
const {
|
|
82
53
|
column,
|
|
54
|
+
row,
|
|
83
55
|
rowId,
|
|
84
|
-
|
|
56
|
+
rowNode,
|
|
85
57
|
align,
|
|
86
58
|
colIndex,
|
|
87
59
|
width,
|
|
@@ -92,9 +64,8 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
92
64
|
isNotVisible,
|
|
93
65
|
pinnedOffset,
|
|
94
66
|
pinnedPosition,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
gridHasFiller,
|
|
67
|
+
showRightBorder,
|
|
68
|
+
showLeftBorder,
|
|
98
69
|
onClick,
|
|
99
70
|
onDoubleClick,
|
|
100
71
|
onMouseDown,
|
|
@@ -106,25 +77,29 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
106
77
|
onDragOver
|
|
107
78
|
} = props,
|
|
108
79
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
109
|
-
const apiRef =
|
|
80
|
+
const apiRef = useGridPrivateApiContext();
|
|
110
81
|
const rootProps = useGridRootProps();
|
|
111
82
|
const isRtl = useRtl();
|
|
112
83
|
const field = column.field;
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
84
|
+
const editCellState = useGridSelector(apiRef, gridEditCellStateSelector, {
|
|
85
|
+
rowId,
|
|
86
|
+
field
|
|
87
|
+
});
|
|
88
|
+
const cellMode = editCellState ? GridCellModes.Edit : GridCellModes.View;
|
|
89
|
+
const cellParams = apiRef.current.getCellParamsForRow(rowId, field, row, {
|
|
90
|
+
colDef: column,
|
|
91
|
+
cellMode,
|
|
92
|
+
rowNode: rowNode,
|
|
93
|
+
tabIndex: useGridSelector(apiRef, () => {
|
|
94
|
+
const cellTabIndex = gridTabIndexCellSelector(apiRef);
|
|
95
|
+
return cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === rowId ? 0 : -1;
|
|
96
|
+
}),
|
|
97
|
+
hasFocus: useGridSelector(apiRef, () => {
|
|
98
|
+
const focus = gridFocusCellSelector(apiRef);
|
|
99
|
+
return focus?.id === rowId && focus.field === field;
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
cellParams.api = apiRef.current;
|
|
128
103
|
const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
|
|
129
104
|
id: rowId,
|
|
130
105
|
field
|
|
@@ -132,7 +107,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
132
107
|
const hiddenCells = useGridSelector(apiRef, gridRowSpanningHiddenCellsSelector);
|
|
133
108
|
const spannedCells = useGridSelector(apiRef, gridRowSpanningSpannedCellsSelector);
|
|
134
109
|
const {
|
|
135
|
-
cellMode,
|
|
136
110
|
hasFocus,
|
|
137
111
|
isEditable = false,
|
|
138
112
|
value
|
|
@@ -164,9 +138,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
164
138
|
const handleRef = useForkRef(ref, cellRef);
|
|
165
139
|
const focusElementRef = React.useRef(null);
|
|
166
140
|
const isSelectionMode = rootProps.cellSelection ?? false;
|
|
167
|
-
const position = gridPinnedColumnPositionLookup[pinnedPosition];
|
|
168
|
-
const showLeftBorder = shouldCellShowLeftBorder(position, sectionIndex);
|
|
169
|
-
const showRightBorder = shouldCellShowRightBorder(position, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
170
141
|
const ownerState = {
|
|
171
142
|
align,
|
|
172
143
|
showLeftBorder,
|
|
@@ -211,24 +182,21 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
211
182
|
padding: 0,
|
|
212
183
|
opacity: 0,
|
|
213
184
|
width: 0,
|
|
185
|
+
height: 0,
|
|
214
186
|
border: 0
|
|
215
187
|
};
|
|
216
188
|
}
|
|
217
|
-
const cellStyle = _extends({
|
|
189
|
+
const cellStyle = attachPinnedStyle(_extends({
|
|
218
190
|
'--width': `${width}px`
|
|
219
|
-
}, styleProp);
|
|
220
|
-
const isLeftPinned = pinnedPosition ===
|
|
221
|
-
const isRightPinned = pinnedPosition ===
|
|
222
|
-
if (isLeftPinned || isRightPinned) {
|
|
223
|
-
let side = isLeftPinned ? 'left' : 'right';
|
|
224
|
-
if (isRtl) {
|
|
225
|
-
side = isLeftPinned ? 'right' : 'left';
|
|
226
|
-
}
|
|
227
|
-
cellStyle[side] = pinnedOffset;
|
|
228
|
-
}
|
|
191
|
+
}, styleProp), isRtl, pinnedPosition, pinnedOffset);
|
|
192
|
+
const isLeftPinned = pinnedPosition === PinnedColumnPosition.LEFT;
|
|
193
|
+
const isRightPinned = pinnedPosition === PinnedColumnPosition.RIGHT;
|
|
229
194
|
if (rowSpan > 1) {
|
|
230
195
|
cellStyle.height = `calc(var(--height) * ${rowSpan})`;
|
|
231
196
|
cellStyle.zIndex = 5;
|
|
197
|
+
if (isLeftPinned || isRightPinned) {
|
|
198
|
+
cellStyle.zIndex = 6;
|
|
199
|
+
}
|
|
232
200
|
}
|
|
233
201
|
return cellStyle;
|
|
234
202
|
}, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, isRtl, rowSpan]);
|
|
@@ -260,9 +228,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
260
228
|
}, style)
|
|
261
229
|
});
|
|
262
230
|
}
|
|
263
|
-
if (cellParams === EMPTY_CELL_PARAMS) {
|
|
264
|
-
return null;
|
|
265
|
-
}
|
|
266
231
|
let handleFocus = other.onFocus;
|
|
267
232
|
if (process.env.NODE_ENV === 'test' && rootProps.experimentalFeatures?.warnIfFocusStateIsNotSynced) {
|
|
268
233
|
handleFocus = event => {
|
|
@@ -313,7 +278,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
313
278
|
onDragOver: publish('cellDragOver', onDragOver)
|
|
314
279
|
};
|
|
315
280
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
316
|
-
ref: handleRef,
|
|
317
281
|
className: clsx(classes.root, classNames, className),
|
|
318
282
|
role: "gridcell",
|
|
319
283
|
"data-field": field,
|
|
@@ -333,6 +297,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
333
297
|
onKeyUp: publish('cellKeyUp', onKeyUp)
|
|
334
298
|
}, draggableEventHandlers, other, {
|
|
335
299
|
onFocus: handleFocus,
|
|
300
|
+
ref: handleRef,
|
|
336
301
|
children: children
|
|
337
302
|
}));
|
|
338
303
|
});
|
|
@@ -346,19 +311,14 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
|
346
311
|
colSpan: PropTypes.number,
|
|
347
312
|
column: PropTypes.object.isRequired,
|
|
348
313
|
disableDragEvents: PropTypes.bool,
|
|
349
|
-
editCellState: PropTypes.shape({
|
|
350
|
-
changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
|
|
351
|
-
isProcessingProps: PropTypes.bool,
|
|
352
|
-
isValidating: PropTypes.bool,
|
|
353
|
-
value: PropTypes.any
|
|
354
|
-
}),
|
|
355
|
-
gridHasFiller: PropTypes.bool.isRequired,
|
|
356
314
|
isNotVisible: PropTypes.bool.isRequired,
|
|
357
|
-
pinnedOffset: PropTypes.number
|
|
315
|
+
pinnedOffset: PropTypes.number,
|
|
358
316
|
pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]).isRequired,
|
|
317
|
+
row: PropTypes.object.isRequired,
|
|
359
318
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
360
|
-
|
|
361
|
-
|
|
319
|
+
rowNode: PropTypes.object.isRequired,
|
|
320
|
+
showLeftBorder: PropTypes.bool.isRequired,
|
|
321
|
+
showRightBorder: PropTypes.bool.isRequired,
|
|
362
322
|
width: PropTypes.number.isRequired
|
|
363
323
|
} : void 0;
|
|
364
324
|
const MemoizedGridCell = fastMemo(GridCell);
|
|
@@ -35,7 +35,7 @@ function GridEditDateCell(props) {
|
|
|
35
35
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
36
36
|
const isDateTime = colDef.type === 'dateTime';
|
|
37
37
|
const apiRef = useGridApiContext();
|
|
38
|
-
const inputRef = React.useRef();
|
|
38
|
+
const inputRef = React.useRef(null);
|
|
39
39
|
const valueTransformed = React.useMemo(() => {
|
|
40
40
|
let parsedDate;
|
|
41
41
|
if (valueProp == null) {
|
|
@@ -11,6 +11,6 @@ export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<I
|
|
|
11
11
|
*/
|
|
12
12
|
onValueChange?: (event: React.ChangeEvent<HTMLInputElement>, newValue: string) => Promise<void> | void;
|
|
13
13
|
}
|
|
14
|
-
declare const GridEditInputCell: React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
declare const GridEditInputCell: React.ForwardRefExoticComponent<GridEditInputCellProps> | React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
15
15
|
export { GridEditInputCell };
|
|
16
16
|
export declare const renderEditInputCell: (params: GridEditInputCellProps) => React.JSX.Element;
|
|
@@ -2,9 +2,11 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "isValidating", "debounceMs", "isProcessingProps", "onValueChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
6
7
|
import { styled } from '@mui/material/styles';
|
|
7
8
|
import InputBase from '@mui/material/InputBase';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
9
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
12
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -31,7 +33,7 @@ const GridEditInputCellRoot = styled(InputBase, {
|
|
|
31
33
|
height: '100%'
|
|
32
34
|
}
|
|
33
35
|
}));
|
|
34
|
-
const GridEditInputCell =
|
|
36
|
+
const GridEditInputCell = forwardRef((props, ref) => {
|
|
35
37
|
const rootProps = useGridRootProps();
|
|
36
38
|
const {
|
|
37
39
|
id,
|
|
@@ -45,7 +47,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
45
47
|
} = props,
|
|
46
48
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
47
49
|
const apiRef = useGridApiContext();
|
|
48
|
-
const inputRef = React.useRef();
|
|
50
|
+
const inputRef = React.useRef(null);
|
|
49
51
|
const [valueState, setValueState] = React.useState(value);
|
|
50
52
|
const classes = useUtilityClasses(rootProps);
|
|
51
53
|
const handleChange = React.useCallback(async event => {
|
|
@@ -79,7 +81,6 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
79
81
|
}
|
|
80
82
|
}, [hasFocus]);
|
|
81
83
|
return /*#__PURE__*/_jsx(GridEditInputCellRoot, _extends({
|
|
82
|
-
ref: ref,
|
|
83
84
|
inputRef: inputRef,
|
|
84
85
|
className: classes.root,
|
|
85
86
|
ownerState: rootProps,
|
|
@@ -91,7 +92,75 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
91
92
|
fontSize: "small",
|
|
92
93
|
color: "action"
|
|
93
94
|
}) : undefined
|
|
94
|
-
}, other
|
|
95
|
+
}, other, {
|
|
96
|
+
ref: ref
|
|
97
|
+
}));
|
|
95
98
|
});
|
|
99
|
+
process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
100
|
+
// ----------------------------- Warning --------------------------------
|
|
101
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
102
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
103
|
+
// ----------------------------------------------------------------------
|
|
104
|
+
/**
|
|
105
|
+
* GridApi that let you manipulate the grid.
|
|
106
|
+
*/
|
|
107
|
+
api: PropTypes.object.isRequired,
|
|
108
|
+
/**
|
|
109
|
+
* The mode of the cell.
|
|
110
|
+
*/
|
|
111
|
+
cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
|
|
112
|
+
changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
|
|
113
|
+
/**
|
|
114
|
+
* The column of the row that the current cell belongs to.
|
|
115
|
+
*/
|
|
116
|
+
colDef: PropTypes.object.isRequired,
|
|
117
|
+
debounceMs: PropTypes.number,
|
|
118
|
+
/**
|
|
119
|
+
* The column field of the cell that triggered the event.
|
|
120
|
+
*/
|
|
121
|
+
field: PropTypes.string.isRequired,
|
|
122
|
+
/**
|
|
123
|
+
* The cell value formatted with the column valueFormatter.
|
|
124
|
+
*/
|
|
125
|
+
formattedValue: PropTypes.any,
|
|
126
|
+
/**
|
|
127
|
+
* If true, the cell is the active element.
|
|
128
|
+
*/
|
|
129
|
+
hasFocus: PropTypes.bool.isRequired,
|
|
130
|
+
/**
|
|
131
|
+
* The grid row id.
|
|
132
|
+
*/
|
|
133
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
134
|
+
/**
|
|
135
|
+
* If true, the cell is editable.
|
|
136
|
+
*/
|
|
137
|
+
isEditable: PropTypes.bool,
|
|
138
|
+
isProcessingProps: PropTypes.bool,
|
|
139
|
+
isValidating: PropTypes.bool,
|
|
140
|
+
/**
|
|
141
|
+
* Callback called when the value is changed by the user.
|
|
142
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
143
|
+
* @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
|
|
144
|
+
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
|
145
|
+
*/
|
|
146
|
+
onValueChange: PropTypes.func,
|
|
147
|
+
/**
|
|
148
|
+
* The row model of the row that the current cell belongs to.
|
|
149
|
+
*/
|
|
150
|
+
row: PropTypes.any.isRequired,
|
|
151
|
+
/**
|
|
152
|
+
* The node of the row that the current cell belongs to.
|
|
153
|
+
*/
|
|
154
|
+
rowNode: PropTypes.object.isRequired,
|
|
155
|
+
/**
|
|
156
|
+
* the tabIndex value.
|
|
157
|
+
*/
|
|
158
|
+
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
159
|
+
/**
|
|
160
|
+
* The cell value.
|
|
161
|
+
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
|
162
|
+
*/
|
|
163
|
+
value: PropTypes.any
|
|
164
|
+
} : void 0;
|
|
96
165
|
export { GridEditInputCell };
|
|
97
166
|
export const renderEditInputCell = params => /*#__PURE__*/_jsx(GridEditInputCell, _extends({}, params));
|
|
@@ -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
|
});
|