@mui/x-data-grid 9.5.0 → 9.7.0
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 +261 -0
- package/DataGrid/DataGrid.js +75 -14
- package/DataGrid/DataGrid.mjs +75 -14
- package/colDef/gridDateOperators.d.mts +1 -1
- package/colDef/gridDateOperators.d.ts +1 -1
- package/components/GridColumnHeaders.d.mts +1 -1
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +1 -1
- package/components/GridColumnHeaders.mjs +1 -1
- package/components/GridColumnUnsortedIcon.js +1 -1
- package/components/GridColumnUnsortedIcon.mjs +1 -1
- package/components/GridFooter.d.mts +1 -1
- package/components/GridFooter.d.ts +1 -1
- package/components/GridFooter.js +1 -1
- package/components/GridFooter.mjs +1 -1
- package/components/GridLoadingOverlay.d.mts +1 -1
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +1 -1
- package/components/GridLoadingOverlay.mjs +1 -1
- package/components/GridNoColumnsOverlay.d.mts +1 -1
- package/components/GridNoColumnsOverlay.d.ts +1 -1
- package/components/GridNoColumnsOverlay.js +1 -1
- package/components/GridNoColumnsOverlay.mjs +1 -1
- package/components/GridNoResultsOverlay.d.mts +1 -1
- package/components/GridNoResultsOverlay.d.ts +1 -1
- package/components/GridNoRowsOverlay.d.mts +1 -1
- package/components/GridNoRowsOverlay.d.ts +1 -1
- package/components/GridNoRowsOverlay.js +1 -1
- package/components/GridNoRowsOverlay.mjs +1 -1
- package/components/GridRow.js +1 -1
- package/components/GridRow.mjs +1 -1
- package/components/GridRowCount.d.mts +1 -1
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +1 -1
- package/components/GridRowCount.mjs +1 -1
- package/components/GridRowDragAndDropOverlay.d.mts +1 -1
- package/components/GridRowDragAndDropOverlay.d.ts +1 -1
- package/components/GridSelectedRowCount.d.mts +1 -1
- package/components/GridSelectedRowCount.d.ts +1 -1
- package/components/GridSelectedRowCount.js +1 -1
- package/components/GridSelectedRowCount.mjs +1 -1
- package/components/GridShadowScrollArea.js +1 -1
- package/components/GridShadowScrollArea.mjs +1 -1
- package/components/cell/GridActionsCell.d.mts +1 -1
- package/components/cell/GridActionsCell.d.ts +1 -1
- package/components/cell/GridActionsCell.js +83 -3
- package/components/cell/GridActionsCell.mjs +83 -3
- package/components/cell/GridActionsCellItem.js +75 -1
- package/components/cell/GridActionsCellItem.mjs +74 -0
- package/components/cell/GridBooleanCell.js +1 -1
- package/components/cell/GridBooleanCell.mjs +1 -1
- package/components/cell/GridCell.d.mts +1 -1
- package/components/cell/GridCell.d.ts +1 -1
- package/components/cell/GridCell.js +3 -11
- package/components/cell/GridCell.mjs +3 -11
- package/components/cell/GridEditBooleanCell.js +1 -1
- package/components/cell/GridEditBooleanCell.mjs +1 -1
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditDateCell.mjs +1 -1
- package/components/cell/GridEditInputCell.js +68 -0
- package/components/cell/GridEditInputCell.mjs +68 -0
- package/components/cell/GridEditLongTextCell.d.mts +3 -0
- package/components/cell/GridEditLongTextCell.d.ts +3 -0
- package/components/cell/GridEditLongTextCell.js +141 -0
- package/components/cell/GridEditLongTextCell.mjs +141 -0
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/cell/GridEditSingleSelectCell.mjs +1 -1
- package/components/cell/GridFooterCell.d.mts +1 -1
- package/components/cell/GridFooterCell.d.ts +1 -1
- package/components/cell/GridLongTextCell.d.mts +3 -0
- package/components/cell/GridLongTextCell.d.ts +3 -0
- package/components/cell/GridLongTextCell.js +66 -0
- package/components/cell/GridLongTextCell.mjs +66 -0
- package/components/cell/GridSkeletonCell.js +3 -2
- package/components/cell/GridSkeletonCell.mjs +3 -2
- package/components/columnHeaders/GridBaseColumnHeaders.d.mts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -10
- package/components/columnHeaders/GridColumnGroupHeader.mjs +2 -10
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +2 -2
- package/components/columnHeaders/GridColumnHeaderItem.js +3 -11
- package/components/columnHeaders/GridColumnHeaderItem.mjs +3 -11
- package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.mts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.mjs +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.mts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/components/columnSelection/GridCellCheckboxRenderer.mjs +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/components/columnSelection/GridHeaderCheckbox.mjs +1 -1
- package/components/columnSelection/GridRowCheckbox.js +1 -1
- package/components/columnSelection/GridRowCheckbox.mjs +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.d.mts +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.d.ts +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.js +3 -3
- package/components/columnsPanel/ColumnsPanelTrigger.mjs +3 -3
- package/components/containers/GridFooterContainer.d.mts +1 -1
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +1 -1
- package/components/containers/GridFooterContainer.mjs +1 -1
- package/components/containers/GridOverlay.d.mts +1 -1
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +1 -1
- package/components/containers/GridOverlay.mjs +1 -1
- package/components/containers/GridRoot.js +1 -1
- package/components/containers/GridRoot.mjs +1 -1
- package/components/containers/GridRootStyles.js +3 -2
- package/components/containers/GridRootStyles.mjs +3 -2
- package/components/containers/GridToolbarContainer.d.mts +1 -1
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +1 -1
- package/components/containers/GridToolbarContainer.mjs +1 -1
- package/components/export/ExportCsv.d.mts +1 -1
- package/components/export/ExportCsv.d.ts +1 -1
- package/components/export/ExportCsv.js +1 -1
- package/components/export/ExportCsv.mjs +1 -1
- package/components/export/ExportPrint.d.mts +1 -1
- package/components/export/ExportPrint.d.ts +1 -1
- package/components/export/ExportPrint.js +1 -1
- package/components/export/ExportPrint.mjs +1 -1
- package/components/filterPanel/FilterPanelTrigger.d.mts +1 -1
- package/components/filterPanel/FilterPanelTrigger.d.ts +1 -1
- package/components/filterPanel/FilterPanelTrigger.js +3 -3
- package/components/filterPanel/FilterPanelTrigger.mjs +3 -3
- package/components/menu/GridMenu.js +1 -1
- package/components/menu/GridMenu.mjs +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.mts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
- package/components/menu/columnMenu/GridColumnMenu.js +2 -2
- package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
- package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.mjs +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.mjs +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.mjs +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.mjs +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.mjs +1 -1
- package/components/panel/GridColumnsPanel.d.mts +1 -1
- package/components/panel/GridColumnsPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/GridPanel.mjs +1 -1
- package/components/panel/GridPanelContent.d.mts +1 -1
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelContent.js +1 -1
- package/components/panel/GridPanelContent.mjs +1 -1
- package/components/panel/GridPanelContext.d.mts +9 -3
- package/components/panel/GridPanelContext.d.ts +9 -3
- package/components/panel/GridPanelContext.js +40 -7
- package/components/panel/GridPanelContext.mjs +40 -7
- package/components/panel/GridPanelFooter.d.mts +1 -1
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +1 -1
- package/components/panel/GridPanelFooter.mjs +1 -1
- package/components/panel/GridPanelHeader.d.mts +1 -1
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPanelHeader.js +1 -1
- package/components/panel/GridPanelHeader.mjs +1 -1
- package/components/panel/GridPanelWrapper.d.mts +1 -1
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +4 -6
- package/components/panel/GridPreferencesPanel.mjs +4 -6
- package/components/panel/filterPanel/GridFilterForm.d.mts +2 -1
- package/components/panel/filterPanel/GridFilterForm.d.ts +2 -1
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.mjs +1 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -1
- package/components/panel/filterPanel/GridFilterInputDate.mjs +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +1 -1
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +1 -1
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/components/panel/filterPanel/GridFilterInputValue.mjs +1 -1
- package/components/panel/filterPanel/GridFilterPanel.d.mts +2 -2
- package/components/panel/filterPanel/GridFilterPanel.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
- package/components/quickFilter/QuickFilter.d.mts +2 -2
- package/components/quickFilter/QuickFilter.d.ts +2 -2
- package/components/quickFilter/QuickFilter.js +1 -1
- package/components/quickFilter/QuickFilter.mjs +1 -1
- package/components/quickFilter/QuickFilterClear.d.mts +2 -2
- package/components/quickFilter/QuickFilterClear.d.ts +2 -2
- package/components/quickFilter/QuickFilterClear.js +1 -1
- package/components/quickFilter/QuickFilterClear.mjs +1 -1
- package/components/quickFilter/QuickFilterControl.d.mts +2 -2
- package/components/quickFilter/QuickFilterControl.d.ts +2 -2
- package/components/quickFilter/QuickFilterControl.js +1 -1
- package/components/quickFilter/QuickFilterControl.mjs +1 -1
- package/components/quickFilter/QuickFilterTrigger.d.mts +2 -2
- package/components/quickFilter/QuickFilterTrigger.d.ts +2 -2
- package/components/quickFilter/QuickFilterTrigger.js +1 -1
- package/components/quickFilter/QuickFilterTrigger.mjs +1 -1
- package/components/toolbar/GridToolbar.d.mts +3 -3
- package/components/toolbar/GridToolbar.d.ts +3 -3
- package/components/toolbar/GridToolbar.js +1 -1
- package/components/toolbar/GridToolbar.mjs +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +3 -3
- package/components/toolbar/GridToolbarColumnsButton.mjs +3 -3
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
- package/components/toolbar/GridToolbarExport.js +3 -3
- package/components/toolbar/GridToolbarExport.mjs +3 -3
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +3 -3
- package/components/toolbar/GridToolbarFilterButton.mjs +3 -3
- package/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.mjs +1 -1
- package/components/toolbarV8/GridToolbar.js +8 -3
- package/components/toolbarV8/GridToolbar.mjs +8 -3
- package/components/toolbarV8/Toolbar.d.mts +1 -1
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/toolbarV8/Toolbar.js +1 -1
- package/components/toolbarV8/Toolbar.mjs +1 -1
- package/components/toolbarV8/ToolbarButton.d.mts +1 -1
- package/components/toolbarV8/ToolbarButton.d.ts +1 -1
- package/components/toolbarV8/ToolbarButton.js +1 -1
- package/components/toolbarV8/ToolbarButton.mjs +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +8 -1
- package/components/virtualization/GridVirtualScrollbar.mjs +8 -1
- package/components/virtualization/GridVirtualScroller.js +12 -0
- package/components/virtualization/GridVirtualScroller.mjs +12 -0
- package/components/virtualization/GridVirtualScrollerContent.d.mts +1 -1
- package/components/virtualization/GridVirtualScrollerContent.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.mts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +1 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +7 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +7 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.mts +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.mts +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -1
- package/hooks/features/columnResize/useGridColumnResize.js +56 -2
- package/hooks/features/columnResize/useGridColumnResize.mjs +57 -3
- package/hooks/features/columns/gridColumnsSelector.d.mts +1 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +3 -3
- package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
- package/hooks/features/editing/gridEditingSelectors.d.mts +1 -1
- package/hooks/features/editing/gridEditingSelectors.d.ts +1 -1
- package/hooks/features/editing/gridEditingSelectors.mjs +0 -1
- package/hooks/features/editing/utils.d.mts +1 -1
- package/hooks/features/editing/utils.d.ts +1 -1
- package/hooks/features/editing/utils.js +1 -1
- package/hooks/features/editing/utils.mjs +1 -1
- package/hooks/features/filter/gridFilterState.d.mts +1 -1
- package/hooks/features/filter/gridFilterState.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.d.mts +2 -2
- package/hooks/features/filter/gridFilterUtils.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.js +2 -10
- package/hooks/features/focus/useGridFocus.mjs +2 -10
- package/hooks/features/rowSelection/useGridRowSelection.js +0 -3
- package/hooks/features/rowSelection/useGridRowSelection.mjs +0 -3
- package/hooks/features/rows/gridRowSpanningUtils.d.mts +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.js +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.mjs +1 -1
- package/hooks/features/rows/gridRowsUtils.d.mts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.js +5 -3
- package/hooks/features/rows/gridRowsUtils.mjs +5 -3
- package/hooks/features/virtualization/useGridVirtualization.d.mts +1 -1
- package/hooks/features/virtualization/useGridVirtualization.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualization.js +2 -2
- package/hooks/features/virtualization/useGridVirtualization.mjs +2 -2
- package/hooks/utils/useGridSelector.js +1 -1
- package/hooks/utils/useGridSelector.mjs +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/locales/arSD.d.mts +1 -1
- package/locales/arSD.d.ts +1 -1
- package/locales/beBY.d.mts +1 -1
- package/locales/beBY.d.ts +1 -1
- package/locales/bgBG.d.mts +1 -1
- package/locales/bgBG.d.ts +1 -1
- package/locales/bnBD.d.mts +1 -1
- package/locales/bnBD.d.ts +1 -1
- package/locales/caES.d.mts +1 -1
- package/locales/caES.d.ts +1 -1
- package/locales/csCZ.d.mts +1 -1
- package/locales/csCZ.d.ts +1 -1
- package/locales/daDK.d.mts +1 -1
- package/locales/daDK.d.ts +1 -1
- package/locales/deDE.d.mts +1 -1
- package/locales/deDE.d.ts +1 -1
- package/locales/elGR.d.mts +1 -1
- package/locales/elGR.d.ts +1 -1
- package/locales/enUS.d.mts +1 -1
- package/locales/enUS.d.ts +1 -1
- package/locales/esES.d.mts +1 -1
- package/locales/esES.d.ts +1 -1
- package/locales/faIR.d.mts +1 -1
- package/locales/faIR.d.ts +1 -1
- package/locales/fiFI.d.mts +1 -1
- package/locales/fiFI.d.ts +1 -1
- package/locales/frFR.d.mts +1 -1
- package/locales/frFR.d.ts +1 -1
- package/locales/heIL.d.mts +1 -1
- package/locales/heIL.d.ts +1 -1
- package/locales/huHU.d.mts +1 -1
- package/locales/huHU.d.ts +1 -1
- package/locales/hyAM.d.mts +1 -1
- package/locales/hyAM.d.ts +1 -1
- package/locales/idID.d.mts +1 -1
- package/locales/idID.d.ts +1 -1
- package/locales/isIS.d.mts +1 -1
- package/locales/isIS.d.ts +1 -1
- package/locales/itIT.d.mts +1 -1
- package/locales/itIT.d.ts +1 -1
- package/locales/jaJP.d.mts +1 -1
- package/locales/jaJP.d.ts +1 -1
- package/locales/koKR.d.mts +1 -1
- package/locales/koKR.d.ts +1 -1
- package/locales/nbNO.d.mts +1 -1
- package/locales/nbNO.d.ts +1 -1
- package/locales/nlNL.d.mts +1 -1
- package/locales/nlNL.d.ts +1 -1
- package/locales/nnNO.d.mts +1 -1
- package/locales/nnNO.d.ts +1 -1
- package/locales/plPL.d.mts +1 -1
- package/locales/plPL.d.ts +1 -1
- package/locales/ptBR.d.mts +1 -1
- package/locales/ptBR.d.ts +1 -1
- package/locales/ptPT.d.mts +1 -1
- package/locales/ptPT.d.ts +1 -1
- package/locales/roRO.d.mts +1 -1
- package/locales/roRO.d.ts +1 -1
- package/locales/ruRU.d.mts +1 -1
- package/locales/ruRU.d.ts +1 -1
- package/locales/skSK.d.mts +1 -1
- package/locales/skSK.d.ts +1 -1
- package/locales/svSE.d.mts +1 -1
- package/locales/svSE.d.ts +1 -1
- package/locales/thTH.d.mts +1 -1
- package/locales/thTH.d.ts +1 -1
- package/locales/trTR.d.mts +1 -1
- package/locales/trTR.d.ts +1 -1
- package/locales/ukUA.d.mts +1 -1
- package/locales/ukUA.d.ts +1 -1
- package/locales/urPK.d.mts +1 -1
- package/locales/urPK.d.ts +1 -1
- package/locales/viVN.d.mts +1 -1
- package/locales/viVN.d.ts +1 -1
- package/locales/zhCN.d.mts +1 -1
- package/locales/zhCN.d.ts +1 -1
- package/locales/zhTW.d.mts +1 -1
- package/locales/zhTW.d.ts +1 -1
- package/material/index.js +5 -3
- package/material/index.mjs +5 -3
- package/material/variables.d.mts +1 -1
- package/material/variables.d.ts +1 -1
- package/package.json +8 -4
- package/utils/createSelector.d.mts +1 -1
- package/utils/createSelector.d.ts +1 -1
- package/utils/focusElement.d.mts +9 -0
- package/utils/focusElement.d.ts +9 -0
- package/utils/focusElement.js +24 -0
- package/utils/focusElement.mjs +19 -0
- package/utils/isJSDOM.d.mts +0 -1
- package/utils/isJSDOM.d.ts +0 -1
- package/utils/isJSDOM.js +0 -7
- package/utils/isJSDOM.mjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { RenderProp } from '@mui/x-internals/useComponentRenderer';
|
|
3
3
|
import type { GridSlotProps } from "../../models/index.mjs";
|
|
4
4
|
export type ToolbarButtonProps = GridSlotProps['baseIconButton'] & {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { RenderProp } from '@mui/x-internals/useComponentRenderer';
|
|
3
3
|
import type { GridSlotProps } from "../../models/index.js";
|
|
4
4
|
export type ToolbarButtonProps = GridSlotProps['baseIconButton'] & {
|
|
5
5
|
/**
|
|
@@ -93,7 +93,7 @@ const ToolbarButton = exports.ToolbarButton = (0, _forwardRef.forwardRef)(functi
|
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
95
|
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
|
|
96
|
-
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
96
|
+
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-proptypes */ = {
|
|
97
97
|
// ----------------------------- Warning --------------------------------
|
|
98
98
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
99
99
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -86,7 +86,7 @@ const ToolbarButton = forwardRef(function ToolbarButton(props, ref) {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
|
|
89
|
-
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
89
|
+
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-proptypes */ = {
|
|
90
90
|
// ----------------------------- Warning --------------------------------
|
|
91
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
92
92
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -11,6 +11,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
13
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
14
|
+
var _platform = require("@mui/x-internals/platform");
|
|
14
15
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
15
16
|
var _hooks = require("../../hooks");
|
|
16
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -42,7 +43,13 @@ const Scrollbar = (0, _styles.styled)('div', {
|
|
|
42
43
|
'&:hover': {
|
|
43
44
|
zIndex: 70
|
|
44
45
|
},
|
|
45
|
-
'--size': scrollbarSizeCssExpression
|
|
46
|
+
'--size': scrollbarSizeCssExpression,
|
|
47
|
+
// [iOS-scrollbar-swap]
|
|
48
|
+
// On iOS, native scrollbars of the `GridVirtualScroller` are shown instead,
|
|
49
|
+
// so hide these to avoid a duplicate thumb.
|
|
50
|
+
[_platform.iOSMediaQuery]: {
|
|
51
|
+
display: 'none'
|
|
52
|
+
}
|
|
46
53
|
});
|
|
47
54
|
const ScrollbarVertical = (0, _styles.styled)(Scrollbar, {
|
|
48
55
|
slot: 'internal'
|
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
+
import { iOSMediaQuery } from '@mui/x-internals/platform';
|
|
7
8
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.mjs";
|
|
8
9
|
import { gridDimensionsSelector, useGridSelector } from "../../hooks/index.mjs";
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
|
|
@@ -35,7 +36,13 @@ const Scrollbar = styled('div', {
|
|
|
35
36
|
'&:hover': {
|
|
36
37
|
zIndex: 70
|
|
37
38
|
},
|
|
38
|
-
'--size': scrollbarSizeCssExpression
|
|
39
|
+
'--size': scrollbarSizeCssExpression,
|
|
40
|
+
// [iOS-scrollbar-swap]
|
|
41
|
+
// On iOS, native scrollbars of the `GridVirtualScroller` are shown instead,
|
|
42
|
+
// so hide these to avoid a duplicate thumb.
|
|
43
|
+
[iOSMediaQuery]: {
|
|
44
|
+
display: 'none'
|
|
45
|
+
}
|
|
39
46
|
});
|
|
40
47
|
const ScrollbarVertical = styled(Scrollbar, {
|
|
41
48
|
slot: 'internal'
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
|
+
var _platform = require("@mui/x-internals/platform");
|
|
13
14
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
15
|
var _xVirtualizer = require("@mui/x-virtualizer");
|
|
15
16
|
var _gridDimensionsSelectors = require("../../hooks/features/dimensions/gridDimensionsSelectors");
|
|
@@ -66,6 +67,17 @@ const Scroller = (0, _styles.styled)('div', {
|
|
|
66
67
|
'&::-webkit-scrollbar': {
|
|
67
68
|
display: 'none' /* Safari and Chrome */
|
|
68
69
|
},
|
|
70
|
+
// [iOS-scrollbar-swap]
|
|
71
|
+
// On iOS, virtual scrollbars do not show a thumb unless the user scrolls the element directly:
|
|
72
|
+
// https://github.com/mui/mui-x/issues/22386
|
|
73
|
+
// So keep this scroller's own native scrollbars and hide the ones in `GridVirtualScrollbar`
|
|
74
|
+
// instead to avoid a duplicate thumb.
|
|
75
|
+
[_platform.iOSMediaQuery]: {
|
|
76
|
+
scrollbarWidth: 'auto',
|
|
77
|
+
'&::-webkit-scrollbar': {
|
|
78
|
+
display: 'block'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
69
81
|
'@media print': {
|
|
70
82
|
overflow: 'hidden'
|
|
71
83
|
},
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
|
+
import { iOSMediaQuery } from '@mui/x-internals/platform';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
import { LayoutDataGrid, Virtualization } from '@mui/x-virtualizer';
|
|
7
8
|
import { gridHasBottomFillerSelector, gridHasScrollXSelector, gridHasScrollYSelector } from "../../hooks/features/dimensions/gridDimensionsSelectors.mjs";
|
|
@@ -58,6 +59,17 @@ const Scroller = styled('div', {
|
|
|
58
59
|
'&::-webkit-scrollbar': {
|
|
59
60
|
display: 'none' /* Safari and Chrome */
|
|
60
61
|
},
|
|
62
|
+
// [iOS-scrollbar-swap]
|
|
63
|
+
// On iOS, virtual scrollbars do not show a thumb unless the user scrolls the element directly:
|
|
64
|
+
// https://github.com/mui/mui-x/issues/22386
|
|
65
|
+
// So keep this scroller's own native scrollbars and hide the ones in `GridVirtualScrollbar`
|
|
66
|
+
// instead to avoid a duplicate thumb.
|
|
67
|
+
[iOSMediaQuery]: {
|
|
68
|
+
scrollbarWidth: 'auto',
|
|
69
|
+
'&::-webkit-scrollbar': {
|
|
70
|
+
display: 'block'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
61
73
|
'@media print': {
|
|
62
74
|
overflow: 'hidden'
|
|
63
75
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare const GridVirtualScrollerContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
}> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare const GridVirtualScrollerContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
}> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare const GridVirtualScrollerRenderZone: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
}> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare const GridVirtualScrollerRenderZone: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
}> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -10,7 +10,13 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _useFirstRender = require("../../utils/useFirstRender");
|
|
11
11
|
const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {
|
|
12
12
|
const registerPreProcessor = React.useCallback(() => {
|
|
13
|
-
|
|
13
|
+
// NOTE: the unregister fn is intentionally discarded. Unlike pipe processors
|
|
14
|
+
// (which are additive), a strategy processor is required for as long as its
|
|
15
|
+
// strategy is active — `applyStrategyProcessor` throws if the active strategy's
|
|
16
|
+
// processor is missing — so it must outlive the registering component. The cache
|
|
17
|
+
// keeps a single entry per (processor, strategy) and is reclaimed with the grid
|
|
18
|
+
// api, so nothing leaks; `void` documents the deliberate discard.
|
|
19
|
+
void apiRef.current.registerStrategyProcessor(strategyName, group, processor);
|
|
14
20
|
}, [apiRef, processor, group, strategyName]);
|
|
15
21
|
(0, _useFirstRender.useFirstRender)(() => {
|
|
16
22
|
registerPreProcessor();
|
|
@@ -4,7 +4,13 @@ import * as React from 'react';
|
|
|
4
4
|
import { useFirstRender } from "../../utils/useFirstRender.mjs";
|
|
5
5
|
export const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {
|
|
6
6
|
const registerPreProcessor = React.useCallback(() => {
|
|
7
|
-
|
|
7
|
+
// NOTE: the unregister fn is intentionally discarded. Unlike pipe processors
|
|
8
|
+
// (which are additive), a strategy processor is required for as long as its
|
|
9
|
+
// strategy is active — `applyStrategyProcessor` throws if the active strategy's
|
|
10
|
+
// processor is missing — so it must outlive the registering component. The cache
|
|
11
|
+
// keeps a single entry per (processor, strategy) and is reclaimed with the grid
|
|
12
|
+
// api, so nothing leaks; `void` documents the deliberate discard.
|
|
13
|
+
void apiRef.current.registerStrategyProcessor(strategyName, group, processor);
|
|
8
14
|
}, [apiRef, processor, group, strategyName]);
|
|
9
15
|
useFirstRender(() => {
|
|
10
16
|
registerPreProcessor();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridColumnGroupingModel, GridColumnNode, GridColumnGroup } from "../../../models/gridColumnGrouping.mjs";
|
|
2
2
|
import type { GridColDef } from "../../../models/colDef/index.mjs";
|
|
3
3
|
import type { GridColumnGroupLookup, GridGroupingStructure } from "./gridColumnGroupsInterfaces.mjs";
|
|
4
4
|
type UnwrappedGroupingModel = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridColumnGroupingModel, GridColumnNode, GridColumnGroup } from "../../../models/gridColumnGrouping.js";
|
|
2
2
|
import type { GridColDef } from "../../../models/colDef/index.js";
|
|
3
3
|
import type { GridColumnGroupLookup, GridGroupingStructure } from "./gridColumnGroupsInterfaces.js";
|
|
4
4
|
type UnwrappedGroupingModel = {
|
|
@@ -6,7 +6,8 @@ import type { GridSortColumnLookup } from "../sorting/index.mjs";
|
|
|
6
6
|
import type { GridFilterActiveItemsLookup } from "../filter/index.mjs";
|
|
7
7
|
import type { GridColumnGroupIdentifier, GridColumnIdentifier } from "../focus/index.mjs";
|
|
8
8
|
import type { GridColumnMenuState } from "../columnMenu/index.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { gridColumnPositionsSelector } from "../columns/index.mjs";
|
|
10
|
+
import type { GridColumnVisibilityModel } from "../columns/index.mjs";
|
|
10
11
|
import type { GridGroupingStructure } from "../columnGrouping/gridColumnGroupsInterfaces.mjs";
|
|
11
12
|
import { PinnedColumnPosition } from "../../../internals/constants.mjs";
|
|
12
13
|
export interface UseGridColumnHeadersProps {
|
|
@@ -6,7 +6,8 @@ import type { GridSortColumnLookup } from "../sorting/index.js";
|
|
|
6
6
|
import type { GridFilterActiveItemsLookup } from "../filter/index.js";
|
|
7
7
|
import type { GridColumnGroupIdentifier, GridColumnIdentifier } from "../focus/index.js";
|
|
8
8
|
import type { GridColumnMenuState } from "../columnMenu/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { gridColumnPositionsSelector } from "../columns/index.js";
|
|
10
|
+
import type { GridColumnVisibilityModel } from "../columns/index.js";
|
|
10
11
|
import type { GridGroupingStructure } from "../columnGrouping/gridColumnGroupsInterfaces.js";
|
|
11
12
|
import { PinnedColumnPosition } from "../../../internals/constants.js";
|
|
12
13
|
export interface UseGridColumnHeadersProps {
|
|
@@ -25,7 +25,30 @@ var _gridColumnsInterfaces = require("../columns/gridColumnsInterfaces");
|
|
|
25
25
|
var _columns = require("../columns");
|
|
26
26
|
var _dimensions = require("../dimensions");
|
|
27
27
|
var _headerFiltering = require("../headerFiltering");
|
|
28
|
+
var _pagination = require("../pagination");
|
|
28
29
|
var _columnResizeSelector = require("./columnResizeSelector");
|
|
30
|
+
function isRenderContextReadyForAutosizeOnMount(apiRef) {
|
|
31
|
+
const dimensions = (0, _dimensions.gridDimensionsSelector)(apiRef);
|
|
32
|
+
if (!dimensions.isReady) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const {
|
|
36
|
+
rows
|
|
37
|
+
} = (0, _pagination.gridVisibleRowsSelector)(apiRef);
|
|
38
|
+
if (rows.length === 0) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
const renderContext = (0, _virtualization.gridRenderContextSelector)(apiRef);
|
|
42
|
+
if (renderContext.lastRowIndex <= renderContext.firstRowIndex) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// If all rows fit in the viewport, wait for them all; otherwise we can only measure the rendered rows.
|
|
47
|
+
if (!dimensions.hasScrollY) {
|
|
48
|
+
return renderContext.firstRowIndex === 0 && renderContext.lastRowIndex >= rows.length;
|
|
49
|
+
}
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
29
52
|
function trackFinger(event, currentTouchId) {
|
|
30
53
|
if (currentTouchId !== undefined && event.changedTouches) {
|
|
31
54
|
for (let i = 0; i < event.changedTouches.length; i += 1) {
|
|
@@ -589,10 +612,41 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
589
612
|
React.useEffect(() => stopListening, [stopListening]);
|
|
590
613
|
(0, _utils.useOnMount)(() => {
|
|
591
614
|
if (props.autosizeOnMount) {
|
|
592
|
-
|
|
615
|
+
let frameHandle;
|
|
616
|
+
let unsubscribeStateChange;
|
|
617
|
+
let unsubscribeRenderedRowsIntervalChange;
|
|
618
|
+
const cleanupListeners = () => {
|
|
619
|
+
unsubscribeStateChange?.();
|
|
620
|
+
unsubscribeRenderedRowsIntervalChange?.();
|
|
621
|
+
unsubscribeStateChange = undefined;
|
|
622
|
+
unsubscribeRenderedRowsIntervalChange = undefined;
|
|
623
|
+
};
|
|
624
|
+
const runAutosize = () => {
|
|
625
|
+
frameHandle = undefined;
|
|
626
|
+
cleanupListeners();
|
|
593
627
|
apiRef.current.autosizeColumns(props.autosizeOptions);
|
|
594
|
-
}
|
|
628
|
+
};
|
|
629
|
+
const scheduleAutosize = () => {
|
|
630
|
+
if (frameHandle === undefined) {
|
|
631
|
+
frameHandle = requestAnimationFrame(runAutosize);
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
const checkRenderContext = () => {
|
|
635
|
+
if (isRenderContextReadyForAutosizeOnMount(apiRef)) {
|
|
636
|
+
scheduleAutosize();
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
unsubscribeStateChange = apiRef.current.subscribeEvent('stateChange', checkRenderContext);
|
|
640
|
+
unsubscribeRenderedRowsIntervalChange = apiRef.current.subscribeEvent('renderedRowsIntervalChange', checkRenderContext);
|
|
641
|
+
checkRenderContext();
|
|
642
|
+
return () => {
|
|
643
|
+
cleanupListeners();
|
|
644
|
+
if (frameHandle !== undefined) {
|
|
645
|
+
cancelAnimationFrame(frameHandle);
|
|
646
|
+
}
|
|
647
|
+
};
|
|
595
648
|
}
|
|
649
|
+
return undefined;
|
|
596
650
|
});
|
|
597
651
|
(0, _utils.useGridNativeEventListener)(apiRef, () => apiRef.current.columnHeadersContainerRef?.current, 'touchstart', handleTouchStart, {
|
|
598
652
|
passive: true
|
|
@@ -10,7 +10,7 @@ import { findGridCellElementsFromCol, findGridElement, findLeftPinnedCellsAfterC
|
|
|
10
10
|
import { DEFAULT_GRID_AUTOSIZE_OPTIONS } from "./gridColumnResizeApi.mjs";
|
|
11
11
|
import { gridClasses } from "../../../constants/gridClasses.mjs";
|
|
12
12
|
import { useGridEvent, useGridApiMethod, useGridEventPriority, useGridLogger, useGridNativeEventListener, useGridSelector, useOnMount } from "../../utils/index.mjs";
|
|
13
|
-
import { gridVirtualizationColumnEnabledSelector } from "../virtualization/index.mjs";
|
|
13
|
+
import { gridRenderContextSelector, gridVirtualizationColumnEnabledSelector } from "../virtualization/index.mjs";
|
|
14
14
|
import { createControllablePromise } from "../../../utils/createControllablePromise.mjs";
|
|
15
15
|
import { clamp } from "../../../utils/utils.mjs";
|
|
16
16
|
import { useTimeout } from "../../utils/useTimeout.mjs";
|
|
@@ -18,7 +18,30 @@ import { GridPinnedColumnPosition } from "../columns/gridColumnsInterfaces.mjs";
|
|
|
18
18
|
import { gridColumnsStateSelector } from "../columns/index.mjs";
|
|
19
19
|
import { gridDimensionsSelector } from "../dimensions/index.mjs";
|
|
20
20
|
import { gridHeaderFilteringEnabledSelector } from "../headerFiltering/index.mjs";
|
|
21
|
+
import { gridVisibleRowsSelector } from "../pagination/index.mjs";
|
|
21
22
|
import { gridResizingColumnFieldSelector } from "./columnResizeSelector.mjs";
|
|
23
|
+
function isRenderContextReadyForAutosizeOnMount(apiRef) {
|
|
24
|
+
const dimensions = gridDimensionsSelector(apiRef);
|
|
25
|
+
if (!dimensions.isReady) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const {
|
|
29
|
+
rows
|
|
30
|
+
} = gridVisibleRowsSelector(apiRef);
|
|
31
|
+
if (rows.length === 0) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
const renderContext = gridRenderContextSelector(apiRef);
|
|
35
|
+
if (renderContext.lastRowIndex <= renderContext.firstRowIndex) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// If all rows fit in the viewport, wait for them all; otherwise we can only measure the rendered rows.
|
|
40
|
+
if (!dimensions.hasScrollY) {
|
|
41
|
+
return renderContext.firstRowIndex === 0 && renderContext.lastRowIndex >= rows.length;
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
22
45
|
function trackFinger(event, currentTouchId) {
|
|
23
46
|
if (currentTouchId !== undefined && event.changedTouches) {
|
|
24
47
|
for (let i = 0; i < event.changedTouches.length; i += 1) {
|
|
@@ -581,10 +604,41 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
581
604
|
React.useEffect(() => stopListening, [stopListening]);
|
|
582
605
|
useOnMount(() => {
|
|
583
606
|
if (props.autosizeOnMount) {
|
|
584
|
-
|
|
607
|
+
let frameHandle;
|
|
608
|
+
let unsubscribeStateChange;
|
|
609
|
+
let unsubscribeRenderedRowsIntervalChange;
|
|
610
|
+
const cleanupListeners = () => {
|
|
611
|
+
unsubscribeStateChange?.();
|
|
612
|
+
unsubscribeRenderedRowsIntervalChange?.();
|
|
613
|
+
unsubscribeStateChange = undefined;
|
|
614
|
+
unsubscribeRenderedRowsIntervalChange = undefined;
|
|
615
|
+
};
|
|
616
|
+
const runAutosize = () => {
|
|
617
|
+
frameHandle = undefined;
|
|
618
|
+
cleanupListeners();
|
|
585
619
|
apiRef.current.autosizeColumns(props.autosizeOptions);
|
|
586
|
-
}
|
|
620
|
+
};
|
|
621
|
+
const scheduleAutosize = () => {
|
|
622
|
+
if (frameHandle === undefined) {
|
|
623
|
+
frameHandle = requestAnimationFrame(runAutosize);
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
const checkRenderContext = () => {
|
|
627
|
+
if (isRenderContextReadyForAutosizeOnMount(apiRef)) {
|
|
628
|
+
scheduleAutosize();
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
unsubscribeStateChange = apiRef.current.subscribeEvent('stateChange', checkRenderContext);
|
|
632
|
+
unsubscribeRenderedRowsIntervalChange = apiRef.current.subscribeEvent('renderedRowsIntervalChange', checkRenderContext);
|
|
633
|
+
checkRenderContext();
|
|
634
|
+
return () => {
|
|
635
|
+
cleanupListeners();
|
|
636
|
+
if (frameHandle !== undefined) {
|
|
637
|
+
cancelAnimationFrame(frameHandle);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
587
640
|
}
|
|
641
|
+
return undefined;
|
|
588
642
|
});
|
|
589
643
|
useGridNativeEventListener(apiRef, () => apiRef.current.columnHeadersContainerRef?.current, 'touchstart', handleTouchStart, {
|
|
590
644
|
passive: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import type { GridColumnLookup, GridPinnedColumnFields } from "./gridColumnsInterfaces.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Get the columns state
|
|
5
5
|
* @category Columns
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
import {
|
|
2
|
+
import type { GridColumnLookup, GridPinnedColumnFields } from "./gridColumnsInterfaces.js";
|
|
3
3
|
/**
|
|
4
4
|
* Get the columns state
|
|
5
5
|
* @category Columns
|
|
@@ -10,6 +10,7 @@ exports.dimensionsStateInitializer = void 0;
|
|
|
10
10
|
exports.useGridDimensions = useGridDimensions;
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _platform = require("@base-ui/utils/platform");
|
|
13
14
|
var _store = require("@mui/x-internals/store");
|
|
14
15
|
var _useGridEvent = require("../../utils/useGridEvent");
|
|
15
16
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
@@ -22,7 +23,6 @@ var _gridRowsUtils = require("../rows/gridRowsUtils");
|
|
|
22
23
|
var _gridColumnsUtils = require("../columns/gridColumnsUtils");
|
|
23
24
|
var _dataGridPropsDefaultValues = require("../../../constants/dataGridPropsDefaultValues");
|
|
24
25
|
var _roundToDecimalPlaces = require("../../../utils/roundToDecimalPlaces");
|
|
25
|
-
var _isJSDOM = require("../../../utils/isJSDOM");
|
|
26
26
|
const EMPTY_SIZE = {
|
|
27
27
|
width: 0,
|
|
28
28
|
height: 0
|
|
@@ -96,11 +96,11 @@ function useGridDimensions(apiRef, props) {
|
|
|
96
96
|
if (!getRootDimensions().isReady) {
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
if (size.height === 0 && !errorShown.current && !props.autoHeight && !
|
|
99
|
+
if (size.height === 0 && !errorShown.current && !props.autoHeight && !_platform.platform.env.jsdom) {
|
|
100
100
|
logger.error(['The parent DOM element of the Data Grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
101
101
|
errorShown.current = true;
|
|
102
102
|
}
|
|
103
|
-
if (size.width === 0 && !errorShown.current && !
|
|
103
|
+
if (size.width === 0 && !errorShown.current && !_platform.platform.env.jsdom) {
|
|
104
104
|
logger.error(['The parent DOM element of the Data Grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
105
105
|
errorShown.current = true;
|
|
106
106
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import { platform } from '@base-ui/utils/platform';
|
|
5
6
|
import { useStoreEffect } from '@mui/x-internals/store';
|
|
6
7
|
import { useGridEventPriority } from "../../utils/useGridEvent.mjs";
|
|
7
8
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.mjs";
|
|
@@ -14,7 +15,6 @@ import { getValidRowHeight, rowHeightWarning } from "../rows/gridRowsUtils.mjs";
|
|
|
14
15
|
import { getTotalHeaderHeight } from "../columns/gridColumnsUtils.mjs";
|
|
15
16
|
import { DATA_GRID_PROPS_DEFAULT_VALUES } from "../../../constants/dataGridPropsDefaultValues.mjs";
|
|
16
17
|
import { roundToDecimalPlaces } from "../../../utils/roundToDecimalPlaces.mjs";
|
|
17
|
-
import { isJSDOM } from "../../../utils/isJSDOM.mjs";
|
|
18
18
|
const EMPTY_SIZE = {
|
|
19
19
|
width: 0,
|
|
20
20
|
height: 0
|
|
@@ -87,11 +87,11 @@ export function useGridDimensions(apiRef, props) {
|
|
|
87
87
|
if (!getRootDimensions().isReady) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
if (size.height === 0 && !errorShown.current && !props.autoHeight && !
|
|
90
|
+
if (size.height === 0 && !errorShown.current && !props.autoHeight && !platform.env.jsdom) {
|
|
91
91
|
logger.error(['The parent DOM element of the Data Grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
92
92
|
errorShown.current = true;
|
|
93
93
|
}
|
|
94
|
-
if (size.width === 0 && !errorShown.current && !
|
|
94
|
+
if (size.width === 0 && !errorShown.current && !platform.env.jsdom) {
|
|
95
95
|
logger.error(['The parent DOM element of the Data Grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
96
96
|
errorShown.current = true;
|
|
97
97
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.mjs";
|
|
2
2
|
import type { GridRowId } from "../../../models/gridRows.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import type { GridEditMode } from "../../../models/gridEditRowModel.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Select the row editing state.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
import type { GridRowId } from "../../../models/gridRows.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { GridEditMode } from "../../../models/gridEditRowModel.js";
|
|
4
4
|
/**
|
|
5
5
|
* Select the row editing state.
|
|
6
6
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { GridColDef } from "../../../models/colDef/gridColDef.mjs";
|
|
2
|
-
export declare const getDefaultCellValue: (colDef: GridColDef) => false | "" |
|
|
2
|
+
export declare const getDefaultCellValue: (colDef: GridColDef) => false | "" | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { GridColDef } from "../../../models/colDef/gridColDef.js";
|
|
2
|
-
export declare const getDefaultCellValue: (colDef: GridColDef) => false | "" |
|
|
2
|
+
export declare const getDefaultCellValue: (colDef: GridColDef) => false | "" | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridFilterItem } from "../../../models/gridFilterItem.mjs";
|
|
2
2
|
import type { GridFilterModel } from "../../../models/gridFilterModel.mjs";
|
|
3
3
|
import type { GridRowId, GridRowModel, GridValidRowModel } from "../../../models/gridRows.mjs";
|
|
4
4
|
import type { GridColDef } from "../../../models/colDef/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
2
2
|
import type { GridFilterModel } from "../../../models/gridFilterModel.js";
|
|
3
3
|
import type { GridRowId, GridRowModel, GridValidRowModel } from "../../../models/gridRows.js";
|
|
4
4
|
import type { GridColDef } from "../../../models/colDef/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { GridColDef, GridFilterItem, GridFilterModel, GridRowModel } from "../../../models/index.mjs";
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.mjs";
|
|
4
4
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import type { GridAggregatedFilterItemApplier, GridFilterItemResult, GridQuickFilterValueResult } from "./gridFilterState.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* Adds default values to the optional fields of a filter items.
|
|
8
8
|
* @param {GridFilterItem} item The raw filter item.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { GridColDef, GridFilterItem, GridFilterModel, GridRowModel } from "../../../models/index.js";
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
4
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
5
|
-
import {
|
|
5
|
+
import type { GridAggregatedFilterItemApplier, GridFilterItemResult, GridQuickFilterValueResult } from "./gridFilterState.js";
|
|
6
6
|
/**
|
|
7
7
|
* Adds default values to the optional fields of a filter items.
|
|
8
8
|
* @param {GridFilterItem} item The raw filter item.
|
|
@@ -18,7 +18,7 @@ var _useGridLogger = require("../../utils/useGridLogger");
|
|
|
18
18
|
var _useGridEvent = require("../../utils/useGridEvent");
|
|
19
19
|
var _keyboardUtils = require("../../../utils/keyboardUtils");
|
|
20
20
|
var _gridFocusStateSelector = require("./gridFocusStateSelector");
|
|
21
|
-
var
|
|
21
|
+
var _focusElement = require("../../../utils/focusElement");
|
|
22
22
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
23
23
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
24
24
|
var _utils = require("../../../utils/utils");
|
|
@@ -87,15 +87,7 @@ const useGridFocus = (apiRef, props) => {
|
|
|
87
87
|
if (cellElement.contains(doc.activeElement)) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
cellElement.focus({
|
|
92
|
-
preventScroll: true
|
|
93
|
-
});
|
|
94
|
-
} else {
|
|
95
|
-
const scrollPosition = apiRef.current.getScrollPosition();
|
|
96
|
-
cellElement.focus();
|
|
97
|
-
apiRef.current.scroll(scrollPosition);
|
|
98
|
-
}
|
|
90
|
+
(0, _focusElement.focusElement)(cellElement, apiRef);
|
|
99
91
|
return;
|
|
100
92
|
}
|
|
101
93
|
apiRef.current.setState(state => {
|
|
@@ -11,7 +11,7 @@ import { useGridLogger } from "../../utils/useGridLogger.mjs";
|
|
|
11
11
|
import { useGridEvent } from "../../utils/useGridEvent.mjs";
|
|
12
12
|
import { isNavigationKey, isPasteShortcut } from "../../../utils/keyboardUtils.mjs";
|
|
13
13
|
import { gridFocusCellSelector, gridFocusColumnGroupHeaderSelector } from "./gridFocusStateSelector.mjs";
|
|
14
|
-
import {
|
|
14
|
+
import { focusElement } from "../../../utils/focusElement.mjs";
|
|
15
15
|
import { gridVisibleColumnDefinitionsSelector } from "../columns/gridColumnsSelector.mjs";
|
|
16
16
|
import { getVisibleRows } from "../../utils/useGridVisibleRows.mjs";
|
|
17
17
|
import { clamp } from "../../../utils/utils.mjs";
|
|
@@ -79,15 +79,7 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
79
79
|
if (cellElement.contains(doc.activeElement)) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
cellElement.focus({
|
|
84
|
-
preventScroll: true
|
|
85
|
-
});
|
|
86
|
-
} else {
|
|
87
|
-
const scrollPosition = apiRef.current.getScrollPosition();
|
|
88
|
-
cellElement.focus();
|
|
89
|
-
apiRef.current.scroll(scrollPosition);
|
|
90
|
-
}
|
|
82
|
+
focusElement(cellElement, apiRef);
|
|
91
83
|
return;
|
|
92
84
|
}
|
|
93
85
|
apiRef.current.setState(state => {
|