@mui/x-data-grid 9.13.0 → 9.15.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.
Files changed (292) hide show
  1. package/CHANGELOG.md +325 -0
  2. package/DataGrid/DataGrid.js +8 -0
  3. package/DataGrid/DataGrid.mjs +9 -1
  4. package/DataGrid/useDataGridComponent.js +2 -2
  5. package/DataGrid/useDataGridComponent.mjs +2 -2
  6. package/DataGrid/useDataGridProps.mjs +1 -1
  7. package/colDef/gridActionsColDef.mjs +1 -1
  8. package/colDef/gridBooleanColDef.mjs +1 -1
  9. package/colDef/gridCheckboxSelectionColDef.mjs +1 -1
  10. package/colDef/gridDateColDef.mjs +1 -1
  11. package/colDef/gridDefaultColumnTypes.mjs +1 -1
  12. package/colDef/gridLongTextColDef.mjs +1 -1
  13. package/colDef/gridNumericColDef.mjs +1 -1
  14. package/colDef/gridSingleSelectColDef.mjs +1 -1
  15. package/components/GridColumnHeaders.mjs +2 -2
  16. package/components/GridColumnSortButton.mjs +2 -2
  17. package/components/GridColumnUnsortedIcon.mjs +2 -2
  18. package/components/GridFooter.mjs +1 -1
  19. package/components/GridHeader.mjs +1 -1
  20. package/components/GridHeaders.mjs +1 -1
  21. package/components/GridLoadingOverlay.mjs +2 -2
  22. package/components/GridNoColumnsOverlay.mjs +1 -1
  23. package/components/GridNoResultsOverlay.mjs +1 -1
  24. package/components/GridNoRowsOverlay.mjs +1 -1
  25. package/components/GridPagination.js +9 -1
  26. package/components/GridPagination.mjs +10 -2
  27. package/components/GridRow.mjs +2 -2
  28. package/components/GridRowCount.mjs +2 -2
  29. package/components/GridRowDragAndDropOverlay.mjs +1 -1
  30. package/components/GridScrollArea.js +20 -7
  31. package/components/GridScrollArea.mjs +22 -9
  32. package/components/GridSelectedRowCount.mjs +2 -2
  33. package/components/GridShadowScrollArea.mjs +2 -2
  34. package/components/GridSkeletonLoadingOverlay.mjs +2 -2
  35. package/components/base/GridFooterPlaceholder.mjs +1 -1
  36. package/components/base/GridOverlays.js +6 -5
  37. package/components/base/GridOverlays.mjs +7 -6
  38. package/components/cell/GridActionsCell.js +55 -52
  39. package/components/cell/GridActionsCell.mjs +58 -55
  40. package/components/cell/GridActionsCellItem.d.mts +20 -6
  41. package/components/cell/GridActionsCellItem.d.ts +20 -6
  42. package/components/cell/GridActionsCellItem.js +30 -8
  43. package/components/cell/GridActionsCellItem.mjs +32 -10
  44. package/components/cell/GridBooleanCell.mjs +2 -2
  45. package/components/cell/GridCell.js +9 -1
  46. package/components/cell/GridCell.mjs +11 -3
  47. package/components/cell/GridEditBooleanCell.mjs +2 -2
  48. package/components/cell/GridEditDateCell.mjs +2 -2
  49. package/components/cell/GridEditInputCell.mjs +2 -2
  50. package/components/cell/GridEditLongTextCell.mjs +1 -1
  51. package/components/cell/GridEditSingleSelectCell.mjs +2 -2
  52. package/components/cell/GridFooterCell.mjs +2 -2
  53. package/components/cell/GridLongTextCell.mjs +1 -1
  54. package/components/cell/GridSkeletonCell.mjs +2 -2
  55. package/components/columnHeaders/ColumnHeaderMenuIcon.mjs +1 -1
  56. package/components/columnHeaders/GridBaseColumnHeaders.mjs +2 -2
  57. package/components/columnHeaders/GridColumnGroupHeader.mjs +1 -1
  58. package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +1 -1
  59. package/components/columnHeaders/GridColumnHeaderItem.mjs +1 -1
  60. package/components/columnHeaders/GridColumnHeaderSeparator.d.mts +1 -1
  61. package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
  62. package/components/columnHeaders/GridColumnHeaderSeparator.mjs +2 -2
  63. package/components/columnHeaders/GridColumnHeaderSortIcon.js +17 -0
  64. package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +18 -1
  65. package/components/columnHeaders/GridColumnHeaderTitle.mjs +2 -2
  66. package/components/columnHeaders/GridGenericColumnHeaderItem.mjs +2 -2
  67. package/components/columnHeaders/GridIconButtonContainer.mjs +2 -2
  68. package/components/columnSelection/GridCellCheckboxRenderer.mjs +2 -2
  69. package/components/columnSelection/GridHeaderCheckbox.mjs +2 -2
  70. package/components/columnSelection/GridRowCheckbox.js +1 -3
  71. package/components/columnSelection/GridRowCheckbox.mjs +3 -5
  72. package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
  73. package/components/columnsPanel/ColumnsPanelTrigger.mjs +2 -2
  74. package/components/containers/GridFooterContainer.mjs +2 -2
  75. package/components/containers/GridOverlay.mjs +2 -2
  76. package/components/containers/GridRoot.mjs +2 -2
  77. package/components/containers/GridRootStyles.js +22 -10
  78. package/components/containers/GridRootStyles.mjs +22 -10
  79. package/components/containers/GridToolbarContainer.mjs +2 -2
  80. package/components/export/ExportCsv.mjs +2 -2
  81. package/components/export/ExportPrint.js +4 -1
  82. package/components/export/ExportPrint.mjs +6 -3
  83. package/components/filterPanel/FilterPanelTrigger.mjs +2 -2
  84. package/components/menu/GridMenu.mjs +2 -2
  85. package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
  86. package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
  87. package/components/menu/columnMenu/GridColumnMenuContainer.mjs +2 -2
  88. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
  89. package/components/panel/GridColumnsPanel.mjs +1 -1
  90. package/components/panel/GridPanel.mjs +2 -2
  91. package/components/panel/GridPanelContent.mjs +2 -2
  92. package/components/panel/GridPanelContext.mjs +1 -1
  93. package/components/panel/GridPanelFooter.mjs +2 -2
  94. package/components/panel/GridPanelHeader.mjs +2 -2
  95. package/components/panel/GridPanelWrapper.mjs +2 -2
  96. package/components/panel/GridPreferencesPanel.mjs +1 -1
  97. package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
  98. package/components/panel/filterPanel/GridFilterFormBase.mjs +2 -2
  99. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -12
  100. package/components/panel/filterPanel/GridFilterInputBoolean.mjs +3 -14
  101. package/components/panel/filterPanel/GridFilterInputDate.mjs +2 -2
  102. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +2 -2
  103. package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +2 -2
  104. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -12
  105. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +3 -14
  106. package/components/panel/filterPanel/GridFilterInputValue.mjs +2 -2
  107. package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
  108. package/components/panel/filterPanel/GridFilterPanelBase.mjs +2 -2
  109. package/components/panel/filterPanel/filterPanelUtils.mjs +1 -1
  110. package/components/quickFilter/QuickFilter.js +7 -2
  111. package/components/quickFilter/QuickFilter.mjs +9 -4
  112. package/components/quickFilter/QuickFilterClear.js +17 -0
  113. package/components/quickFilter/QuickFilterClear.mjs +19 -2
  114. package/components/quickFilter/QuickFilterControl.mjs +2 -2
  115. package/components/quickFilter/QuickFilterTrigger.mjs +2 -2
  116. package/components/toolbar/GridToolbar.mjs +2 -2
  117. package/components/toolbar/GridToolbarColumnsButton.mjs +1 -1
  118. package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
  119. package/components/toolbar/GridToolbarExport.js +4 -1
  120. package/components/toolbar/GridToolbarExport.mjs +6 -3
  121. package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
  122. package/components/toolbar/GridToolbarFilterButton.mjs +1 -1
  123. package/components/toolbar/GridToolbarQuickFilter.mjs +2 -2
  124. package/components/toolbarV8/GridToolbar.mjs +2 -2
  125. package/components/toolbarV8/Toolbar.mjs +2 -2
  126. package/components/toolbarV8/ToolbarButton.js +17 -0
  127. package/components/toolbarV8/ToolbarButton.mjs +19 -2
  128. package/components/virtualization/GridBottomContainer.mjs +1 -1
  129. package/components/virtualization/GridMainContainer.mjs +1 -1
  130. package/components/virtualization/GridTopContainer.mjs +1 -1
  131. package/components/virtualization/GridVirtualScrollbar.js +2 -2
  132. package/components/virtualization/GridVirtualScrollbar.mjs +2 -2
  133. package/components/virtualization/GridVirtualScroller.js +5 -2
  134. package/components/virtualization/GridVirtualScroller.mjs +6 -3
  135. package/components/virtualization/GridVirtualScrollerContent.mjs +1 -1
  136. package/components/virtualization/GridVirtualScrollerRenderZone.mjs +1 -1
  137. package/constants/cssVariables.mjs +1 -1
  138. package/constants/defaultGridSlotsComponents.mjs +1 -1
  139. package/constants/signature.d.mts +1 -1
  140. package/constants/signature.d.ts +1 -1
  141. package/hooks/core/pipeProcessing/useGridPipeProcessing.mjs +2 -2
  142. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -2
  143. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.mjs +2 -2
  144. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -2
  145. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.mjs +2 -2
  146. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.mts +1 -1
  147. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +1 -1
  148. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -2
  149. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +2 -2
  150. package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +2 -2
  151. package/hooks/core/useGridApiInitialization.js +1 -1
  152. package/hooks/core/useGridApiInitialization.mjs +1 -1
  153. package/hooks/core/useGridIsRtl.mjs +1 -1
  154. package/hooks/core/useGridProps.mjs +1 -1
  155. package/hooks/core/useGridStateInitialization.mjs +1 -1
  156. package/hooks/core/useGridVirtualizer.d.mts +2 -2
  157. package/hooks/core/useGridVirtualizer.d.ts +2 -2
  158. package/hooks/core/useGridVirtualizer.js +6 -6
  159. package/hooks/core/useGridVirtualizer.mjs +4 -4
  160. package/hooks/features/columnGrouping/gridColumnGroupsUtils.mjs +2 -2
  161. package/hooks/features/columnGrouping/useGridColumnGrouping.mjs +1 -1
  162. package/hooks/features/columnHeaders/useGridColumnHeaders.mjs +1 -1
  163. package/hooks/features/columnMenu/getColumnMenuItemKeys.mjs +1 -1
  164. package/hooks/features/columnMenu/useGridColumnMenu.mjs +1 -1
  165. package/hooks/features/columnMenu/useGridColumnMenuSlots.mjs +2 -2
  166. package/hooks/features/columnResize/useGridColumnResize.js +4 -1
  167. package/hooks/features/columnResize/useGridColumnResize.mjs +5 -2
  168. package/hooks/features/columns/gridColumnsInterfaces.d.mts +1 -1
  169. package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -1
  170. package/hooks/features/columns/gridColumnsUtils.d.mts +1 -1
  171. package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
  172. package/hooks/features/columns/gridColumnsUtils.mjs +1 -1
  173. package/hooks/features/columns/useGridColumns.js +1 -1
  174. package/hooks/features/columns/useGridColumns.mjs +2 -2
  175. package/hooks/features/dataSource/cache.js +1 -1
  176. package/hooks/features/dataSource/cache.mjs +1 -1
  177. package/hooks/features/dataSource/useGridDataSourceBase.js +14 -29
  178. package/hooks/features/dataSource/useGridDataSourceBase.mjs +17 -32
  179. package/hooks/features/dataSource/useGridDataSourcePolling.d.mts +29 -0
  180. package/hooks/features/dataSource/useGridDataSourcePolling.d.ts +29 -0
  181. package/hooks/features/dataSource/useGridDataSourcePolling.js +62 -0
  182. package/hooks/features/dataSource/useGridDataSourcePolling.mjs +54 -0
  183. package/hooks/features/dataSource/utils.d.mts +1 -1
  184. package/hooks/features/dataSource/utils.d.ts +1 -1
  185. package/hooks/features/dataSource/utils.mjs +1 -1
  186. package/hooks/features/density/useGridDensity.mjs +1 -1
  187. package/hooks/features/dimensions/useGridDimensions.d.mts +1 -1
  188. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  189. package/hooks/features/dimensions/useGridDimensions.js +3 -3
  190. package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
  191. package/hooks/features/editing/useGridCellEditing.js +1 -1
  192. package/hooks/features/editing/useGridCellEditing.mjs +5 -5
  193. package/hooks/features/editing/useGridEditing.mjs +1 -1
  194. package/hooks/features/editing/useGridRowEditing.js +1 -1
  195. package/hooks/features/editing/useGridRowEditing.mjs +5 -5
  196. package/hooks/features/export/serializers/csvSerializer.js +5 -5
  197. package/hooks/features/export/serializers/csvSerializer.mjs +5 -5
  198. package/hooks/features/export/useGridPrintExport.js +44 -20
  199. package/hooks/features/export/useGridPrintExport.mjs +45 -21
  200. package/hooks/features/filter/gridFilterUtils.js +3 -3
  201. package/hooks/features/filter/gridFilterUtils.mjs +5 -5
  202. package/hooks/features/filter/useGridFilter.js +2 -2
  203. package/hooks/features/filter/useGridFilter.mjs +3 -3
  204. package/hooks/features/focus/useGridFocus.mjs +1 -1
  205. package/hooks/features/headerFiltering/useGridHeaderFiltering.mjs +1 -1
  206. package/hooks/features/listView/useGridListView.d.mts +2 -2
  207. package/hooks/features/listView/useGridListView.d.ts +2 -2
  208. package/hooks/features/listView/useGridListView.js +1 -1
  209. package/hooks/features/listView/useGridListView.mjs +2 -2
  210. package/hooks/features/pagination/useGridPagination.mjs +1 -1
  211. package/hooks/features/pagination/useGridPaginationMeta.mjs +1 -1
  212. package/hooks/features/pagination/useGridPaginationModel.mjs +1 -1
  213. package/hooks/features/pagination/useGridRowCount.js +2 -2
  214. package/hooks/features/pagination/useGridRowCount.mjs +2 -2
  215. package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.mts +1 -1
  216. package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.ts +1 -1
  217. package/hooks/features/preferencesPanel/useGridPreferencesPanel.mjs +1 -1
  218. package/hooks/features/rowSelection/useGridRowSelection.d.mts +1 -1
  219. package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  220. package/hooks/features/rowSelection/useGridRowSelection.js +50 -9
  221. package/hooks/features/rowSelection/useGridRowSelection.mjs +52 -11
  222. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.mjs +1 -1
  223. package/hooks/features/rowSelection/utils.js +5 -0
  224. package/hooks/features/rowSelection/utils.mjs +5 -0
  225. package/hooks/features/rows/gridRowsUtils.js +2 -2
  226. package/hooks/features/rows/gridRowsUtils.mjs +3 -3
  227. package/hooks/features/rows/useGridRowSpanning.mjs +1 -1
  228. package/hooks/features/rows/useGridRows.mjs +1 -1
  229. package/hooks/features/rows/useGridRowsMeta.mjs +1 -1
  230. package/hooks/features/rows/useGridRowsOverridableMethods.mjs +1 -1
  231. package/hooks/features/rows/useGridRowsPreProcessors.mjs +1 -1
  232. package/hooks/features/sorting/gridSortingUtils.js +1 -1
  233. package/hooks/features/sorting/gridSortingUtils.mjs +3 -3
  234. package/hooks/features/sorting/useGridSorting.js +2 -2
  235. package/hooks/features/sorting/useGridSorting.mjs +3 -3
  236. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.mjs +1 -1
  237. package/hooks/features/virtualization/useGridVirtualization.mjs +1 -1
  238. package/hooks/utils/index.d.mts +1 -1
  239. package/hooks/utils/index.d.ts +1 -1
  240. package/hooks/utils/index.js +8 -12
  241. package/hooks/utils/index.mjs +2 -1
  242. package/hooks/utils/useGridSelector.js +2 -2
  243. package/hooks/utils/useGridSelector.mjs +2 -2
  244. package/index.js +1 -1
  245. package/index.mjs +1 -1
  246. package/internals/constants.d.mts +1 -1
  247. package/internals/constants.d.ts +1 -1
  248. package/internals/index.d.mts +1 -0
  249. package/internals/index.d.ts +1 -0
  250. package/internals/index.js +8 -0
  251. package/internals/index.mjs +1 -0
  252. package/internals/utils/cache.d.mts +0 -1
  253. package/internals/utils/cache.d.ts +0 -1
  254. package/internals/utils/cache.js +1 -3
  255. package/internals/utils/cache.mjs +1 -3
  256. package/internals/utils/computeSlots.mjs +1 -1
  257. package/internals/utils/propValidation.js +2 -2
  258. package/internals/utils/propValidation.mjs +3 -3
  259. package/material/index.mjs +2 -2
  260. package/models/api/gridCoreApi.d.mts +1 -1
  261. package/models/api/gridCoreApi.d.ts +1 -1
  262. package/models/api/gridEditingApi.d.mts +6 -6
  263. package/models/api/gridEditingApi.d.ts +6 -6
  264. package/models/api/gridPrintExportApi.d.mts +2 -1
  265. package/models/api/gridPrintExportApi.d.ts +2 -1
  266. package/models/events/gridEventLookup.d.mts +5 -5
  267. package/models/events/gridEventLookup.d.ts +5 -5
  268. package/models/gridBaseSlots.d.mts +18 -1
  269. package/models/gridBaseSlots.d.ts +18 -1
  270. package/models/gridEditRowModel.d.mts +3 -3
  271. package/models/gridEditRowModel.d.ts +3 -3
  272. package/models/gridExport.d.mts +13 -0
  273. package/models/gridExport.d.ts +13 -0
  274. package/models/gridFilterItem.d.mts +2 -2
  275. package/models/gridFilterItem.d.ts +2 -2
  276. package/models/index.d.mts +2 -1
  277. package/models/index.d.ts +2 -1
  278. package/models/params/gridEditCellParams.d.mts +2 -2
  279. package/models/params/gridEditCellParams.d.ts +2 -2
  280. package/models/params/gridRowParams.d.mts +2 -2
  281. package/models/params/gridRowParams.d.ts +2 -2
  282. package/models/props/DataGridProps.d.mts +8 -0
  283. package/models/props/DataGridProps.d.ts +8 -0
  284. package/package.json +6 -6
  285. package/utils/createSelector.d.mts +1 -1
  286. package/utils/createSelector.d.ts +1 -1
  287. package/utils/createSelector.js +1 -1
  288. package/utils/createSelector.mjs +1 -1
  289. package/hooks/utils/useFirstRender.d.mts +0 -1
  290. package/hooks/utils/useFirstRender.d.ts +0 -1
  291. package/hooks/utils/useFirstRender.js +0 -16
  292. package/hooks/utils/useFirstRender.mjs +0 -1
@@ -27,6 +27,7 @@ var _useTimeout = require("../hooks/utils/useTimeout");
27
27
  var _gridColumnsUtils = require("../hooks/features/columns/gridColumnsUtils");
28
28
  var _createSelector = require("../utils/createSelector");
29
29
  var _gridRowsMetaSelector = require("../hooks/features/rows/gridRowsMetaSelector");
30
+ var _gridRowReorderSelector = require("../hooks/features/rowReorder/gridRowReorderSelector");
30
31
  var _jsxRuntime = require("react/jsx-runtime");
31
32
  const CLIFF = 1;
32
33
  const SLOP = 1.5;
@@ -89,15 +90,27 @@ const offsetSelector = (0, _createSelector.createSelector)(_gridDimensionsSelect
89
90
  // For vertical scroll areas, we don't need horizontal offset
90
91
  return 0;
91
92
  });
93
+
94
+ // The `columnReorder` state is only initialized by the Pro package,
95
+ // so it is read defensively here.
96
+ const gridColumnReorderDragColSelector = (0, _createSelector.createRootSelector)(state => state.columnReorder?.dragCol);
97
+
98
+ // The drag direction is derived from the reorder state instead of the drag events.
99
+ // An event handler subscribed during render can fire for a render pass that never mounts.
100
+ // A `setState` call from such a handler triggers a React warning.
101
+ // See https://github.com/mui/mui-x/issues/23469.
102
+ const gridDragDirectionSelector = (0, _createSelector.createSelector)(gridColumnReorderDragColSelector, _gridRowReorderSelector.gridIsRowDragActiveSelector, (dragCol, isRowDragActive) => {
103
+ if (dragCol) {
104
+ return 'horizontal';
105
+ }
106
+ if (isRowDragActive) {
107
+ return 'vertical';
108
+ }
109
+ return 'none';
110
+ });
92
111
  function GridScrollAreaWrapper(props) {
93
112
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
94
- const [dragDirection, setDragDirection] = React.useState('none');
95
-
96
- // Listen for both column and row drag events
97
- (0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderDragStart', () => setDragDirection('horizontal'));
98
- (0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderDragEnd', () => setDragDirection('none'));
99
- (0, _useGridEvent.useGridEvent)(apiRef, 'rowDragStart', () => setDragDirection('vertical'));
100
- (0, _useGridEvent.useGridEvent)(apiRef, 'rowDragEnd', () => setDragDirection('none'));
113
+ const dragDirection = (0, _useGridSelector.useGridSelector)(apiRef, gridDragDirectionSelector);
101
114
  if (dragDirection === 'none') {
102
115
  return null;
103
116
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  /* eslint-disable @typescript-eslint/no-use-before-define */
4
4
  import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
5
- import _extends from "@babel/runtime/helpers/esm/extends";
5
+ import _extends from "@babel/runtime/helpers/extends";
6
6
  import * as React from 'react';
7
7
  import useEventCallback from '@mui/utils/useEventCallback';
8
8
  import composeClasses from '@mui/utils/composeClasses';
@@ -18,8 +18,9 @@ import { gridDimensionsSelector, gridColumnsTotalWidthSelector } from "../hooks/
18
18
  import { gridDensityFactorSelector } from "../hooks/features/density/densitySelector.mjs";
19
19
  import { useTimeout } from "../hooks/utils/useTimeout.mjs";
20
20
  import { getTotalHeaderHeight } from "../hooks/features/columns/gridColumnsUtils.mjs";
21
- import { createSelector } from "../utils/createSelector.mjs";
21
+ import { createRootSelector, createSelector } from "../utils/createSelector.mjs";
22
22
  import { gridRowsMetaSelector } from "../hooks/features/rows/gridRowsMetaSelector.mjs";
23
+ import { gridIsRowDragActiveSelector } from "../hooks/features/rowReorder/gridRowReorderSelector.mjs";
23
24
  import { jsx as _jsx } from "react/jsx-runtime";
24
25
  const CLIFF = 1;
25
26
  const SLOP = 1.5;
@@ -82,15 +83,27 @@ const offsetSelector = createSelector(gridDimensionsSelector, (dimensions, direc
82
83
  // For vertical scroll areas, we don't need horizontal offset
83
84
  return 0;
84
85
  });
86
+
87
+ // The `columnReorder` state is only initialized by the Pro package,
88
+ // so it is read defensively here.
89
+ const gridColumnReorderDragColSelector = createRootSelector(state => state.columnReorder?.dragCol);
90
+
91
+ // The drag direction is derived from the reorder state instead of the drag events.
92
+ // An event handler subscribed during render can fire for a render pass that never mounts.
93
+ // A `setState` call from such a handler triggers a React warning.
94
+ // See https://github.com/mui/mui-x/issues/23469.
95
+ const gridDragDirectionSelector = createSelector(gridColumnReorderDragColSelector, gridIsRowDragActiveSelector, (dragCol, isRowDragActive) => {
96
+ if (dragCol) {
97
+ return 'horizontal';
98
+ }
99
+ if (isRowDragActive) {
100
+ return 'vertical';
101
+ }
102
+ return 'none';
103
+ });
85
104
  function GridScrollAreaWrapper(props) {
86
105
  const apiRef = useGridApiContext();
87
- const [dragDirection, setDragDirection] = React.useState('none');
88
-
89
- // Listen for both column and row drag events
90
- useGridEvent(apiRef, 'columnHeaderDragStart', () => setDragDirection('horizontal'));
91
- useGridEvent(apiRef, 'columnHeaderDragEnd', () => setDragDirection('none'));
92
- useGridEvent(apiRef, 'rowDragStart', () => setDragDirection('vertical'));
93
- useGridEvent(apiRef, 'rowDragEnd', () => setDragDirection('none'));
106
+ const dragDirection = useGridSelector(apiRef, gridDragDirectionSelector);
94
107
  if (dragDirection === 'none') {
95
108
  return null;
96
109
  }
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _extends from "@babel/runtime/helpers/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["className", "selectedRowCount"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _extends from "@babel/runtime/helpers/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["children"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
+ import _extends from "@babel/runtime/helpers/extends";
5
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
6
6
  const _excluded = ["skeletonRowsCount", "visibleColumns", "showFirstRowBorder"];
7
7
  import * as React from 'react';
8
8
  import clsx from 'clsx';
@@ -1,4 +1,4 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
2
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  export function GridFooterPlaceholder() {
@@ -21,19 +21,21 @@ var _jsxRuntime = require("react/jsx-runtime");
21
21
  const GridOverlayWrapperRoot = (0, _styles.styled)('div', {
22
22
  name: 'MuiDataGrid',
23
23
  slot: 'OverlayWrapper',
24
- shouldForwardProp: prop => prop !== 'overlayType' && prop !== 'loadingOverlayVariant' && prop !== 'right'
24
+ shouldForwardProp: prop => prop !== 'overlayType' && prop !== 'loadingOverlayVariant'
25
25
  })(({
26
26
  overlayType,
27
- loadingOverlayVariant,
28
- right
27
+ loadingOverlayVariant
29
28
  }) =>
30
29
  // Skeleton overlay should flow with the scroll container and not be sticky
31
30
  loadingOverlayVariant !== 'skeleton' ? {
32
31
  position: 'sticky',
33
32
  // To stay in place while scrolling
34
33
  top: 'var(--DataGrid-topContainerHeight)',
34
+ // Both 0-insets keep the overlay in the viewport in LTR and RTL alike. Sticky insets
35
+ // are independent constraints, and a width: 0 box satisfies both at once, so it
36
+ // clamps at whichever edge the scroll pushes it past.
35
37
  left: 0,
36
- right: `${right}px`,
38
+ right: 0,
37
39
  width: 0,
38
40
  // To stay above the content instead of shifting it down
39
41
  height: 0,
@@ -70,7 +72,6 @@ function GridOverlayWrapper(props) {
70
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridOverlayWrapperRoot, (0, _extends2.default)({
71
73
  className: classes.root
72
74
  }, props, {
73
- right: dimensions.columnsTotalWidth - dimensions.viewportOuterSize.width,
74
75
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(GridOverlayWrapperInner, (0, _extends2.default)({
75
76
  className: classes.inner,
76
77
  style: {
@@ -1,4 +1,4 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { styled } from '@mui/material/styles';
@@ -13,19 +13,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  const GridOverlayWrapperRoot = styled('div', {
14
14
  name: 'MuiDataGrid',
15
15
  slot: 'OverlayWrapper',
16
- shouldForwardProp: prop => prop !== 'overlayType' && prop !== 'loadingOverlayVariant' && prop !== 'right'
16
+ shouldForwardProp: prop => prop !== 'overlayType' && prop !== 'loadingOverlayVariant'
17
17
  })(({
18
18
  overlayType,
19
- loadingOverlayVariant,
20
- right
19
+ loadingOverlayVariant
21
20
  }) =>
22
21
  // Skeleton overlay should flow with the scroll container and not be sticky
23
22
  loadingOverlayVariant !== 'skeleton' ? {
24
23
  position: 'sticky',
25
24
  // To stay in place while scrolling
26
25
  top: 'var(--DataGrid-topContainerHeight)',
26
+ // Both 0-insets keep the overlay in the viewport in LTR and RTL alike. Sticky insets
27
+ // are independent constraints, and a width: 0 box satisfies both at once, so it
28
+ // clamps at whichever edge the scroll pushes it past.
27
29
  left: 0,
28
- right: `${right}px`,
30
+ right: 0,
29
31
  width: 0,
30
32
  // To stay above the content instead of shifting it down
31
33
  height: 0,
@@ -62,7 +64,6 @@ export function GridOverlayWrapper(props) {
62
64
  return /*#__PURE__*/_jsx(GridOverlayWrapperRoot, _extends({
63
65
  className: classes.root
64
66
  }, props, {
65
- right: dimensions.columnsTotalWidth - dimensions.viewportOuterSize.width,
66
67
  children: /*#__PURE__*/_jsx(GridOverlayWrapperInner, _extends({
67
68
  className: classes.inner,
68
69
  style: {
@@ -20,6 +20,7 @@ var _gridClasses = require("../../constants/gridClasses");
20
20
  var _GridMenu = require("../menu/GridMenu");
21
21
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
22
22
  var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
23
+ var _domUtils = require("../../utils/domUtils");
23
24
  var _GridActionsCellItem = require("./GridActionsCellItem");
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  const _excluded = ["api", "colDef", "id", "hasFocus", "isEditable", "field", "value", "formattedValue", "row", "rowNode", "cellMode", "tabIndex", "position", "onMenuOpen", "onMenuClose", "children", "suppressChildrenValidation"];
@@ -62,8 +63,8 @@ function GridActionsCell(props) {
62
63
  actions.push(child);
63
64
  } else if (process.env.NODE_ENV !== 'production') {
64
65
  const childType = typeof child.type === 'function' ? child.type.name : child.type;
65
- (0, _warning.warnOnce)(`MUI X: Invalid child type in \`GridActionsCell\`. Expected \`GridActionsCellItem\` or \`React.Fragment\`, got \`${childType}\`.
66
- If this is intentional, you can suppress this warning by passing the \`suppressChildrenValidation\` prop to \`GridActionsCell\`.`, 'error');
66
+ (0, _warning.errorOnce)(`MUI X: Invalid child type in \`GridActionsCell\`. Expected \`GridActionsCellItem\` or \`React.Fragment\`, got \`${childType}\`.
67
+ If this is intentional, you can suppress this warning by passing the \`suppressChildrenValidation\` prop to \`GridActionsCell\`.`);
67
68
  }
68
69
  }
69
70
  });
@@ -140,7 +141,9 @@ If this is intentional, you can suppress this warning by passing the \`suppressC
140
141
  }
141
142
  };
142
143
  const handleRootKeyDown = event => {
143
- if (numberOfButtons <= 1) {
144
+ // The menu renders in a portal, but its key events still bubble through the React tree.
145
+ // They must not move the roving focus between the buttons behind the open menu.
146
+ if (numberOfButtons <= 1 || (0, _domUtils.isEventTargetInPortal)(event)) {
144
147
  return;
145
148
  }
146
149
  const getNewIndex = (index, direction) => {
@@ -170,55 +173,55 @@ If this is intentional, you can suppress this warning by passing the \`suppressC
170
173
  setFocusedButtonIndex(newIndex);
171
174
  }
172
175
  };
173
-
174
- // role="menu" requires at least one child element
175
- const attributes = numberOfButtons > 0 ? {
176
- role: 'menu',
177
- onKeyDown: handleRootKeyDown
178
- } : undefined;
179
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
180
- ref: rootRef,
181
- tabIndex: -1,
182
- className: _gridClasses.gridClasses.actionsCell
183
- }, attributes, other, {
184
- children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
185
- key: index,
186
- touchRippleRef: handleTouchRippleRef(index),
187
- onClick: handleButtonClick(index, button.props.onClick),
188
- tabIndex: focusedButtonIndex === index ? tabIndex : -1
189
- })), menuButtons.length > 0 && buttonId && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
190
- ref: buttonRef,
191
- id: buttonId,
192
- "aria-label": apiRef.current.getLocaleText('actionsCellMore'),
193
- "aria-haspopup": "menu",
194
- "aria-expanded": open,
195
- "aria-controls": open ? menuId : undefined,
196
- role: "menuitem",
197
- size: "small",
198
- onClick: toggleMenu,
199
- touchRippleRef: handleTouchRippleRef(buttonId),
200
- tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
201
- }, rootProps.slotProps?.baseIconButton, {
202
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.moreActionsIcon, {
203
- fontSize: "small"
204
- })
205
- })), menuButtons.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridMenu.GridMenu, {
206
- open: open,
207
- target: buttonRef.current,
208
- position: position,
209
- onClose: hideMenu,
210
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuList, {
211
- id: menuId,
212
- className: _gridClasses.gridClasses.menuList,
213
- "aria-labelledby": buttonId,
214
- autoFocusItem: true,
215
- children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
216
- key: index,
217
- closeMenu: hideMenu
218
- }))
219
- })
220
- })]
221
- }));
176
+ return (
177
+ /*#__PURE__*/
178
+ // The wrapper carries no role on purpose: the buttons are plain buttons inside the
179
+ // `gridcell`. It only relays the key events bubbling from them.
180
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
181
+ (0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
182
+ ref: rootRef,
183
+ tabIndex: -1,
184
+ className: _gridClasses.gridClasses.actionsCell,
185
+ onKeyDown: handleRootKeyDown
186
+ }, other, {
187
+ children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
188
+ key: index,
189
+ touchRippleRef: handleTouchRippleRef(index),
190
+ onClick: handleButtonClick(index, button.props.onClick),
191
+ tabIndex: focusedButtonIndex === index ? tabIndex : -1
192
+ })), menuButtons.length > 0 && buttonId && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
193
+ ref: buttonRef,
194
+ id: buttonId,
195
+ "aria-label": apiRef.current.getLocaleText('actionsCellMore'),
196
+ "aria-haspopup": "menu",
197
+ "aria-expanded": open,
198
+ "aria-controls": open ? menuId : undefined,
199
+ size: "small",
200
+ onClick: toggleMenu,
201
+ touchRippleRef: handleTouchRippleRef(buttonId),
202
+ tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
203
+ }, rootProps.slotProps?.baseIconButton, {
204
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.moreActionsIcon, {
205
+ fontSize: "small"
206
+ })
207
+ })), menuButtons.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridMenu.GridMenu, {
208
+ open: open,
209
+ target: buttonRef.current,
210
+ position: position,
211
+ onClose: hideMenu,
212
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuList, {
213
+ id: menuId,
214
+ className: _gridClasses.gridClasses.menuList,
215
+ "aria-labelledby": buttonId,
216
+ autoFocusItem: true,
217
+ children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
218
+ key: index,
219
+ closeMenu: hideMenu
220
+ }))
221
+ })
222
+ })]
223
+ }))
224
+ );
222
225
  }
223
226
  process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes /* remove-proptypes */ = {
224
227
  // ----------------------------- Warning --------------------------------
@@ -1,18 +1,19 @@
1
1
  'use client';
2
2
 
3
3
  import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
+ import _extends from "@babel/runtime/helpers/extends";
5
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
6
6
  const _excluded = ["api", "colDef", "id", "hasFocus", "isEditable", "field", "value", "formattedValue", "row", "rowNode", "cellMode", "tabIndex", "position", "onMenuOpen", "onMenuClose", "children", "suppressChildrenValidation"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { useRtl } from '@mui/system/RtlProvider';
10
10
  import useId from '@mui/utils/useId';
11
- import { warnOnce } from '@mui/x-internals/warning';
11
+ import { errorOnce } from '@mui/x-internals/warning';
12
12
  import { gridClasses } from "../../constants/gridClasses.mjs";
13
13
  import { GridMenu } from "../menu/GridMenu.mjs";
14
14
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
15
15
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.mjs";
16
+ import { isEventTargetInPortal } from "../../utils/domUtils.mjs";
16
17
  import { GridActionsCellItem } from "./GridActionsCellItem.mjs";
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
19
  const hasActions = colDef => typeof colDef.getActions === 'function';
@@ -54,8 +55,8 @@ function GridActionsCell(props) {
54
55
  actions.push(child);
55
56
  } else if (process.env.NODE_ENV !== 'production') {
56
57
  const childType = typeof child.type === 'function' ? child.type.name : child.type;
57
- warnOnce(`MUI X: Invalid child type in \`GridActionsCell\`. Expected \`GridActionsCellItem\` or \`React.Fragment\`, got \`${childType}\`.
58
- If this is intentional, you can suppress this warning by passing the \`suppressChildrenValidation\` prop to \`GridActionsCell\`.`, 'error');
58
+ errorOnce(`MUI X: Invalid child type in \`GridActionsCell\`. Expected \`GridActionsCellItem\` or \`React.Fragment\`, got \`${childType}\`.
59
+ If this is intentional, you can suppress this warning by passing the \`suppressChildrenValidation\` prop to \`GridActionsCell\`.`);
59
60
  }
60
61
  }
61
62
  });
@@ -132,7 +133,9 @@ If this is intentional, you can suppress this warning by passing the \`suppressC
132
133
  }
133
134
  };
134
135
  const handleRootKeyDown = event => {
135
- if (numberOfButtons <= 1) {
136
+ // The menu renders in a portal, but its key events still bubble through the React tree.
137
+ // They must not move the roving focus between the buttons behind the open menu.
138
+ if (numberOfButtons <= 1 || isEventTargetInPortal(event)) {
136
139
  return;
137
140
  }
138
141
  const getNewIndex = (index, direction) => {
@@ -162,55 +165,55 @@ If this is intentional, you can suppress this warning by passing the \`suppressC
162
165
  setFocusedButtonIndex(newIndex);
163
166
  }
164
167
  };
165
-
166
- // role="menu" requires at least one child element
167
- const attributes = numberOfButtons > 0 ? {
168
- role: 'menu',
169
- onKeyDown: handleRootKeyDown
170
- } : undefined;
171
- return /*#__PURE__*/_jsxs("div", _extends({
172
- ref: rootRef,
173
- tabIndex: -1,
174
- className: gridClasses.actionsCell
175
- }, attributes, other, {
176
- children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
177
- key: index,
178
- touchRippleRef: handleTouchRippleRef(index),
179
- onClick: handleButtonClick(index, button.props.onClick),
180
- tabIndex: focusedButtonIndex === index ? tabIndex : -1
181
- })), menuButtons.length > 0 && buttonId && /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
182
- ref: buttonRef,
183
- id: buttonId,
184
- "aria-label": apiRef.current.getLocaleText('actionsCellMore'),
185
- "aria-haspopup": "menu",
186
- "aria-expanded": open,
187
- "aria-controls": open ? menuId : undefined,
188
- role: "menuitem",
189
- size: "small",
190
- onClick: toggleMenu,
191
- touchRippleRef: handleTouchRippleRef(buttonId),
192
- tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
193
- }, rootProps.slotProps?.baseIconButton, {
194
- children: /*#__PURE__*/_jsx(rootProps.slots.moreActionsIcon, {
195
- fontSize: "small"
196
- })
197
- })), menuButtons.length > 0 && /*#__PURE__*/_jsx(GridMenu, {
198
- open: open,
199
- target: buttonRef.current,
200
- position: position,
201
- onClose: hideMenu,
202
- children: /*#__PURE__*/_jsx(rootProps.slots.baseMenuList, {
203
- id: menuId,
204
- className: gridClasses.menuList,
205
- "aria-labelledby": buttonId,
206
- autoFocusItem: true,
207
- children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
208
- key: index,
209
- closeMenu: hideMenu
210
- }))
211
- })
212
- })]
213
- }));
168
+ return (
169
+ /*#__PURE__*/
170
+ // The wrapper carries no role on purpose: the buttons are plain buttons inside the
171
+ // `gridcell`. It only relays the key events bubbling from them.
172
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
173
+ _jsxs("div", _extends({
174
+ ref: rootRef,
175
+ tabIndex: -1,
176
+ className: gridClasses.actionsCell,
177
+ onKeyDown: handleRootKeyDown
178
+ }, other, {
179
+ children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
180
+ key: index,
181
+ touchRippleRef: handleTouchRippleRef(index),
182
+ onClick: handleButtonClick(index, button.props.onClick),
183
+ tabIndex: focusedButtonIndex === index ? tabIndex : -1
184
+ })), menuButtons.length > 0 && buttonId && /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
185
+ ref: buttonRef,
186
+ id: buttonId,
187
+ "aria-label": apiRef.current.getLocaleText('actionsCellMore'),
188
+ "aria-haspopup": "menu",
189
+ "aria-expanded": open,
190
+ "aria-controls": open ? menuId : undefined,
191
+ size: "small",
192
+ onClick: toggleMenu,
193
+ touchRippleRef: handleTouchRippleRef(buttonId),
194
+ tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
195
+ }, rootProps.slotProps?.baseIconButton, {
196
+ children: /*#__PURE__*/_jsx(rootProps.slots.moreActionsIcon, {
197
+ fontSize: "small"
198
+ })
199
+ })), menuButtons.length > 0 && /*#__PURE__*/_jsx(GridMenu, {
200
+ open: open,
201
+ target: buttonRef.current,
202
+ position: position,
203
+ onClose: hideMenu,
204
+ children: /*#__PURE__*/_jsx(rootProps.slots.baseMenuList, {
205
+ id: menuId,
206
+ className: gridClasses.menuList,
207
+ "aria-labelledby": buttonId,
208
+ autoFocusItem: true,
209
+ children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
210
+ key: index,
211
+ closeMenu: hideMenu
212
+ }))
213
+ })
214
+ })]
215
+ }))
216
+ );
214
217
  }
215
218
  process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes /* remove-proptypes */ = {
216
219
  // ----------------------------- Warning --------------------------------
@@ -2,14 +2,18 @@ import * as React from 'react';
2
2
  import type { GridSlotProps, GridBaseIconProps } from "../../models/gridSlotsComponentsProps.mjs";
3
3
  interface GridActionsCellItemCommonProps {
4
4
  icon?: React.JSXElementConstructor<GridBaseIconProps> | React.ReactNode;
5
- /** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
5
+ /**
6
+ * The component used for the root node.
7
+ * If not set, and `href` is set, the item renders as an anchor tag.
8
+ * from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
9
+ */
6
10
  component?: React.ElementType;
7
11
  }
8
- export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
12
+ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & ({
9
13
  showInMenu?: false;
10
14
  icon: React.ReactElement<any>;
11
15
  label: string;
12
- } & Omit<GridSlotProps['baseIconButton'], 'component'>) | ({
16
+ } & Omit<GridSlotProps['baseIconButton'], 'component'> | {
13
17
  showInMenu: true;
14
18
  /**
15
19
  * If false, the menu will not close when this item is clicked.
@@ -18,7 +22,7 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
18
22
  closeMenuOnClick?: boolean;
19
23
  closeMenu?: () => void;
20
24
  label: React.ReactNode;
21
- } & Omit<GridSlotProps['baseMenuItem'], 'component'>));
25
+ } & Omit<GridSlotProps['baseMenuItem'], 'component'>);
22
26
  declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
23
27
  showInMenu?: false;
24
28
  icon: React.ReactElement<any>;
@@ -27,7 +31,12 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCe
27
31
  label?: string;
28
32
  color?: 'default' | 'inherit' | 'primary';
29
33
  edge?: 'start' | 'end' | false;
30
- } & import("@mui/x-data-grid").BaseIconButtonPropsOverrides, "component">, "ref"> | (GridActionsCellItemCommonProps & {
34
+ } & {
35
+ component?: React.ElementType;
36
+ href?: string;
37
+ target?: React.HTMLAttributeAnchorTarget;
38
+ rel?: string;
39
+ } & import("@mui/x-data-grid").BaseIconButtonPropsOverrides, "component">, "ref"> | GridActionsCellItemCommonProps & {
31
40
  showInMenu: true;
32
41
  /**
33
42
  * If false, the menu will not close when this item is clicked.
@@ -51,5 +60,10 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCe
51
60
  selected?: boolean;
52
61
  value?: number | string | readonly string[];
53
62
  style?: React.CSSProperties;
54
- } & import("@mui/x-data-grid").BaseMenuItemPropsOverrides, "component">)) & React.RefAttributes<HTMLElement>>;
63
+ } & {
64
+ component?: React.ElementType;
65
+ href?: string;
66
+ target?: React.HTMLAttributeAnchorTarget;
67
+ rel?: string;
68
+ } & import("@mui/x-data-grid").BaseMenuItemPropsOverrides, "component">) & React.RefAttributes<HTMLElement>>;
55
69
  export { GridActionsCellItem };
@@ -2,14 +2,18 @@ import * as React from 'react';
2
2
  import type { GridSlotProps, GridBaseIconProps } from "../../models/gridSlotsComponentsProps.js";
3
3
  interface GridActionsCellItemCommonProps {
4
4
  icon?: React.JSXElementConstructor<GridBaseIconProps> | React.ReactNode;
5
- /** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
5
+ /**
6
+ * The component used for the root node.
7
+ * If not set, and `href` is set, the item renders as an anchor tag.
8
+ * from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
9
+ */
6
10
  component?: React.ElementType;
7
11
  }
8
- export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
12
+ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & ({
9
13
  showInMenu?: false;
10
14
  icon: React.ReactElement<any>;
11
15
  label: string;
12
- } & Omit<GridSlotProps['baseIconButton'], 'component'>) | ({
16
+ } & Omit<GridSlotProps['baseIconButton'], 'component'> | {
13
17
  showInMenu: true;
14
18
  /**
15
19
  * If false, the menu will not close when this item is clicked.
@@ -18,7 +22,7 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
18
22
  closeMenuOnClick?: boolean;
19
23
  closeMenu?: () => void;
20
24
  label: React.ReactNode;
21
- } & Omit<GridSlotProps['baseMenuItem'], 'component'>));
25
+ } & Omit<GridSlotProps['baseMenuItem'], 'component'>);
22
26
  declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
23
27
  showInMenu?: false;
24
28
  icon: React.ReactElement<any>;
@@ -27,7 +31,12 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCe
27
31
  label?: string;
28
32
  color?: 'default' | 'inherit' | 'primary';
29
33
  edge?: 'start' | 'end' | false;
30
- } & import("@mui/x-data-grid").BaseIconButtonPropsOverrides, "component">, "ref"> | (GridActionsCellItemCommonProps & {
34
+ } & {
35
+ component?: React.ElementType;
36
+ href?: string;
37
+ target?: React.HTMLAttributeAnchorTarget;
38
+ rel?: string;
39
+ } & import("@mui/x-data-grid").BaseIconButtonPropsOverrides, "component">, "ref"> | GridActionsCellItemCommonProps & {
31
40
  showInMenu: true;
32
41
  /**
33
42
  * If false, the menu will not close when this item is clicked.
@@ -51,5 +60,10 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCe
51
60
  selected?: boolean;
52
61
  value?: number | string | readonly string[];
53
62
  style?: React.CSSProperties;
54
- } & import("@mui/x-data-grid").BaseMenuItemPropsOverrides, "component">)) & React.RefAttributes<HTMLElement>>;
63
+ } & {
64
+ component?: React.ElementType;
65
+ href?: string;
66
+ target?: React.HTMLAttributeAnchorTarget;
67
+ rel?: string;
68
+ } & import("@mui/x-data-grid").BaseMenuItemPropsOverrides, "component">) & React.RefAttributes<HTMLElement>>;
55
69
  export { GridActionsCellItem };