@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.
Files changed (383) hide show
  1. package/CHANGELOG.md +261 -0
  2. package/DataGrid/DataGrid.js +75 -14
  3. package/DataGrid/DataGrid.mjs +75 -14
  4. package/colDef/gridDateOperators.d.mts +1 -1
  5. package/colDef/gridDateOperators.d.ts +1 -1
  6. package/components/GridColumnHeaders.d.mts +1 -1
  7. package/components/GridColumnHeaders.d.ts +1 -1
  8. package/components/GridColumnHeaders.js +1 -1
  9. package/components/GridColumnHeaders.mjs +1 -1
  10. package/components/GridColumnUnsortedIcon.js +1 -1
  11. package/components/GridColumnUnsortedIcon.mjs +1 -1
  12. package/components/GridFooter.d.mts +1 -1
  13. package/components/GridFooter.d.ts +1 -1
  14. package/components/GridFooter.js +1 -1
  15. package/components/GridFooter.mjs +1 -1
  16. package/components/GridLoadingOverlay.d.mts +1 -1
  17. package/components/GridLoadingOverlay.d.ts +1 -1
  18. package/components/GridLoadingOverlay.js +1 -1
  19. package/components/GridLoadingOverlay.mjs +1 -1
  20. package/components/GridNoColumnsOverlay.d.mts +1 -1
  21. package/components/GridNoColumnsOverlay.d.ts +1 -1
  22. package/components/GridNoColumnsOverlay.js +1 -1
  23. package/components/GridNoColumnsOverlay.mjs +1 -1
  24. package/components/GridNoResultsOverlay.d.mts +1 -1
  25. package/components/GridNoResultsOverlay.d.ts +1 -1
  26. package/components/GridNoRowsOverlay.d.mts +1 -1
  27. package/components/GridNoRowsOverlay.d.ts +1 -1
  28. package/components/GridNoRowsOverlay.js +1 -1
  29. package/components/GridNoRowsOverlay.mjs +1 -1
  30. package/components/GridRow.js +1 -1
  31. package/components/GridRow.mjs +1 -1
  32. package/components/GridRowCount.d.mts +1 -1
  33. package/components/GridRowCount.d.ts +1 -1
  34. package/components/GridRowCount.js +1 -1
  35. package/components/GridRowCount.mjs +1 -1
  36. package/components/GridRowDragAndDropOverlay.d.mts +1 -1
  37. package/components/GridRowDragAndDropOverlay.d.ts +1 -1
  38. package/components/GridSelectedRowCount.d.mts +1 -1
  39. package/components/GridSelectedRowCount.d.ts +1 -1
  40. package/components/GridSelectedRowCount.js +1 -1
  41. package/components/GridSelectedRowCount.mjs +1 -1
  42. package/components/GridShadowScrollArea.js +1 -1
  43. package/components/GridShadowScrollArea.mjs +1 -1
  44. package/components/cell/GridActionsCell.d.mts +1 -1
  45. package/components/cell/GridActionsCell.d.ts +1 -1
  46. package/components/cell/GridActionsCell.js +83 -3
  47. package/components/cell/GridActionsCell.mjs +83 -3
  48. package/components/cell/GridActionsCellItem.js +75 -1
  49. package/components/cell/GridActionsCellItem.mjs +74 -0
  50. package/components/cell/GridBooleanCell.js +1 -1
  51. package/components/cell/GridBooleanCell.mjs +1 -1
  52. package/components/cell/GridCell.d.mts +1 -1
  53. package/components/cell/GridCell.d.ts +1 -1
  54. package/components/cell/GridCell.js +3 -11
  55. package/components/cell/GridCell.mjs +3 -11
  56. package/components/cell/GridEditBooleanCell.js +1 -1
  57. package/components/cell/GridEditBooleanCell.mjs +1 -1
  58. package/components/cell/GridEditDateCell.js +1 -1
  59. package/components/cell/GridEditDateCell.mjs +1 -1
  60. package/components/cell/GridEditInputCell.js +68 -0
  61. package/components/cell/GridEditInputCell.mjs +68 -0
  62. package/components/cell/GridEditLongTextCell.d.mts +3 -0
  63. package/components/cell/GridEditLongTextCell.d.ts +3 -0
  64. package/components/cell/GridEditLongTextCell.js +141 -0
  65. package/components/cell/GridEditLongTextCell.mjs +141 -0
  66. package/components/cell/GridEditSingleSelectCell.js +1 -1
  67. package/components/cell/GridEditSingleSelectCell.mjs +1 -1
  68. package/components/cell/GridFooterCell.d.mts +1 -1
  69. package/components/cell/GridFooterCell.d.ts +1 -1
  70. package/components/cell/GridLongTextCell.d.mts +3 -0
  71. package/components/cell/GridLongTextCell.d.ts +3 -0
  72. package/components/cell/GridLongTextCell.js +66 -0
  73. package/components/cell/GridLongTextCell.mjs +66 -0
  74. package/components/cell/GridSkeletonCell.js +3 -2
  75. package/components/cell/GridSkeletonCell.mjs +3 -2
  76. package/components/columnHeaders/GridBaseColumnHeaders.d.mts +1 -1
  77. package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
  78. package/components/columnHeaders/GridColumnGroupHeader.js +2 -10
  79. package/components/columnHeaders/GridColumnGroupHeader.mjs +2 -10
  80. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -2
  81. package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +2 -2
  82. package/components/columnHeaders/GridColumnHeaderItem.js +3 -11
  83. package/components/columnHeaders/GridColumnHeaderItem.mjs +3 -11
  84. package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
  85. package/components/columnHeaders/GridColumnHeaderSeparator.mjs +1 -1
  86. package/components/columnHeaders/GridColumnHeaderSortIcon.d.mts +1 -1
  87. package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
  88. package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
  89. package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +1 -1
  90. package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
  91. package/components/columnHeaders/GridColumnHeaderTitle.mjs +1 -1
  92. package/components/columnHeaders/GridGenericColumnHeaderItem.d.mts +1 -1
  93. package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
  94. package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  95. package/components/columnSelection/GridCellCheckboxRenderer.mjs +1 -1
  96. package/components/columnSelection/GridHeaderCheckbox.js +1 -1
  97. package/components/columnSelection/GridHeaderCheckbox.mjs +1 -1
  98. package/components/columnSelection/GridRowCheckbox.js +1 -1
  99. package/components/columnSelection/GridRowCheckbox.mjs +1 -1
  100. package/components/columnsManagement/GridColumnsManagement.js +1 -1
  101. package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
  102. package/components/columnsPanel/ColumnsPanelTrigger.d.mts +1 -1
  103. package/components/columnsPanel/ColumnsPanelTrigger.d.ts +1 -1
  104. package/components/columnsPanel/ColumnsPanelTrigger.js +3 -3
  105. package/components/columnsPanel/ColumnsPanelTrigger.mjs +3 -3
  106. package/components/containers/GridFooterContainer.d.mts +1 -1
  107. package/components/containers/GridFooterContainer.d.ts +1 -1
  108. package/components/containers/GridFooterContainer.js +1 -1
  109. package/components/containers/GridFooterContainer.mjs +1 -1
  110. package/components/containers/GridOverlay.d.mts +1 -1
  111. package/components/containers/GridOverlay.d.ts +1 -1
  112. package/components/containers/GridOverlay.js +1 -1
  113. package/components/containers/GridOverlay.mjs +1 -1
  114. package/components/containers/GridRoot.js +1 -1
  115. package/components/containers/GridRoot.mjs +1 -1
  116. package/components/containers/GridRootStyles.js +3 -2
  117. package/components/containers/GridRootStyles.mjs +3 -2
  118. package/components/containers/GridToolbarContainer.d.mts +1 -1
  119. package/components/containers/GridToolbarContainer.d.ts +1 -1
  120. package/components/containers/GridToolbarContainer.js +1 -1
  121. package/components/containers/GridToolbarContainer.mjs +1 -1
  122. package/components/export/ExportCsv.d.mts +1 -1
  123. package/components/export/ExportCsv.d.ts +1 -1
  124. package/components/export/ExportCsv.js +1 -1
  125. package/components/export/ExportCsv.mjs +1 -1
  126. package/components/export/ExportPrint.d.mts +1 -1
  127. package/components/export/ExportPrint.d.ts +1 -1
  128. package/components/export/ExportPrint.js +1 -1
  129. package/components/export/ExportPrint.mjs +1 -1
  130. package/components/filterPanel/FilterPanelTrigger.d.mts +1 -1
  131. package/components/filterPanel/FilterPanelTrigger.d.ts +1 -1
  132. package/components/filterPanel/FilterPanelTrigger.js +3 -3
  133. package/components/filterPanel/FilterPanelTrigger.mjs +3 -3
  134. package/components/menu/GridMenu.js +1 -1
  135. package/components/menu/GridMenu.mjs +1 -1
  136. package/components/menu/columnMenu/GridColumnHeaderMenu.d.mts +1 -1
  137. package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
  138. package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  139. package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
  140. package/components/menu/columnMenu/GridColumnMenu.js +2 -2
  141. package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
  142. package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
  143. package/components/menu/columnMenu/GridColumnMenuContainer.mjs +1 -1
  144. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
  145. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
  146. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
  147. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.mjs +1 -1
  148. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
  149. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.mjs +1 -1
  150. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
  151. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.mjs +1 -1
  152. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  153. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.mjs +1 -1
  154. package/components/panel/GridColumnsPanel.d.mts +1 -1
  155. package/components/panel/GridColumnsPanel.d.ts +1 -1
  156. package/components/panel/GridPanel.js +1 -1
  157. package/components/panel/GridPanel.mjs +1 -1
  158. package/components/panel/GridPanelContent.d.mts +1 -1
  159. package/components/panel/GridPanelContent.d.ts +1 -1
  160. package/components/panel/GridPanelContent.js +1 -1
  161. package/components/panel/GridPanelContent.mjs +1 -1
  162. package/components/panel/GridPanelContext.d.mts +9 -3
  163. package/components/panel/GridPanelContext.d.ts +9 -3
  164. package/components/panel/GridPanelContext.js +40 -7
  165. package/components/panel/GridPanelContext.mjs +40 -7
  166. package/components/panel/GridPanelFooter.d.mts +1 -1
  167. package/components/panel/GridPanelFooter.d.ts +1 -1
  168. package/components/panel/GridPanelFooter.js +1 -1
  169. package/components/panel/GridPanelFooter.mjs +1 -1
  170. package/components/panel/GridPanelHeader.d.mts +1 -1
  171. package/components/panel/GridPanelHeader.d.ts +1 -1
  172. package/components/panel/GridPanelHeader.js +1 -1
  173. package/components/panel/GridPanelHeader.mjs +1 -1
  174. package/components/panel/GridPanelWrapper.d.mts +1 -1
  175. package/components/panel/GridPanelWrapper.d.ts +1 -1
  176. package/components/panel/GridPreferencesPanel.js +4 -6
  177. package/components/panel/GridPreferencesPanel.mjs +4 -6
  178. package/components/panel/filterPanel/GridFilterForm.d.mts +2 -1
  179. package/components/panel/filterPanel/GridFilterForm.d.ts +2 -1
  180. package/components/panel/filterPanel/GridFilterForm.js +1 -1
  181. package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
  182. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  183. package/components/panel/filterPanel/GridFilterInputBoolean.mjs +1 -1
  184. package/components/panel/filterPanel/GridFilterInputDate.js +1 -1
  185. package/components/panel/filterPanel/GridFilterInputDate.mjs +1 -1
  186. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  187. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +1 -1
  188. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  189. package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +1 -1
  190. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  191. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +1 -1
  192. package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  193. package/components/panel/filterPanel/GridFilterInputValue.mjs +1 -1
  194. package/components/panel/filterPanel/GridFilterPanel.d.mts +2 -2
  195. package/components/panel/filterPanel/GridFilterPanel.d.ts +2 -2
  196. package/components/panel/filterPanel/GridFilterPanel.js +1 -1
  197. package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
  198. package/components/quickFilter/QuickFilter.d.mts +2 -2
  199. package/components/quickFilter/QuickFilter.d.ts +2 -2
  200. package/components/quickFilter/QuickFilter.js +1 -1
  201. package/components/quickFilter/QuickFilter.mjs +1 -1
  202. package/components/quickFilter/QuickFilterClear.d.mts +2 -2
  203. package/components/quickFilter/QuickFilterClear.d.ts +2 -2
  204. package/components/quickFilter/QuickFilterClear.js +1 -1
  205. package/components/quickFilter/QuickFilterClear.mjs +1 -1
  206. package/components/quickFilter/QuickFilterControl.d.mts +2 -2
  207. package/components/quickFilter/QuickFilterControl.d.ts +2 -2
  208. package/components/quickFilter/QuickFilterControl.js +1 -1
  209. package/components/quickFilter/QuickFilterControl.mjs +1 -1
  210. package/components/quickFilter/QuickFilterTrigger.d.mts +2 -2
  211. package/components/quickFilter/QuickFilterTrigger.d.ts +2 -2
  212. package/components/quickFilter/QuickFilterTrigger.js +1 -1
  213. package/components/quickFilter/QuickFilterTrigger.mjs +1 -1
  214. package/components/toolbar/GridToolbar.d.mts +3 -3
  215. package/components/toolbar/GridToolbar.d.ts +3 -3
  216. package/components/toolbar/GridToolbar.js +1 -1
  217. package/components/toolbar/GridToolbar.mjs +1 -1
  218. package/components/toolbar/GridToolbarColumnsButton.js +3 -3
  219. package/components/toolbar/GridToolbarColumnsButton.mjs +3 -3
  220. package/components/toolbar/GridToolbarDensitySelector.js +1 -1
  221. package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
  222. package/components/toolbar/GridToolbarExport.js +3 -3
  223. package/components/toolbar/GridToolbarExport.mjs +3 -3
  224. package/components/toolbar/GridToolbarExportContainer.js +1 -1
  225. package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
  226. package/components/toolbar/GridToolbarFilterButton.js +3 -3
  227. package/components/toolbar/GridToolbarFilterButton.mjs +3 -3
  228. package/components/toolbar/GridToolbarQuickFilter.js +1 -1
  229. package/components/toolbar/GridToolbarQuickFilter.mjs +1 -1
  230. package/components/toolbarV8/GridToolbar.js +8 -3
  231. package/components/toolbarV8/GridToolbar.mjs +8 -3
  232. package/components/toolbarV8/Toolbar.d.mts +1 -1
  233. package/components/toolbarV8/Toolbar.d.ts +1 -1
  234. package/components/toolbarV8/Toolbar.js +1 -1
  235. package/components/toolbarV8/Toolbar.mjs +1 -1
  236. package/components/toolbarV8/ToolbarButton.d.mts +1 -1
  237. package/components/toolbarV8/ToolbarButton.d.ts +1 -1
  238. package/components/toolbarV8/ToolbarButton.js +1 -1
  239. package/components/toolbarV8/ToolbarButton.mjs +1 -1
  240. package/components/virtualization/GridVirtualScrollbar.js +8 -1
  241. package/components/virtualization/GridVirtualScrollbar.mjs +8 -1
  242. package/components/virtualization/GridVirtualScroller.js +12 -0
  243. package/components/virtualization/GridVirtualScroller.mjs +12 -0
  244. package/components/virtualization/GridVirtualScrollerContent.d.mts +1 -1
  245. package/components/virtualization/GridVirtualScrollerContent.d.ts +1 -1
  246. package/components/virtualization/GridVirtualScrollerRenderZone.d.mts +1 -1
  247. package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +1 -1
  248. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +7 -1
  249. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +7 -1
  250. package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.mts +1 -1
  251. package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +1 -1
  252. package/hooks/features/columnHeaders/useGridColumnHeaders.d.mts +2 -1
  253. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -1
  254. package/hooks/features/columnResize/useGridColumnResize.js +56 -2
  255. package/hooks/features/columnResize/useGridColumnResize.mjs +57 -3
  256. package/hooks/features/columns/gridColumnsSelector.d.mts +1 -1
  257. package/hooks/features/columns/gridColumnsSelector.d.ts +1 -1
  258. package/hooks/features/dimensions/useGridDimensions.js +3 -3
  259. package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
  260. package/hooks/features/editing/gridEditingSelectors.d.mts +1 -1
  261. package/hooks/features/editing/gridEditingSelectors.d.ts +1 -1
  262. package/hooks/features/editing/gridEditingSelectors.mjs +0 -1
  263. package/hooks/features/editing/utils.d.mts +1 -1
  264. package/hooks/features/editing/utils.d.ts +1 -1
  265. package/hooks/features/editing/utils.js +1 -1
  266. package/hooks/features/editing/utils.mjs +1 -1
  267. package/hooks/features/filter/gridFilterState.d.mts +1 -1
  268. package/hooks/features/filter/gridFilterState.d.ts +1 -1
  269. package/hooks/features/filter/gridFilterUtils.d.mts +2 -2
  270. package/hooks/features/filter/gridFilterUtils.d.ts +2 -2
  271. package/hooks/features/focus/useGridFocus.js +2 -10
  272. package/hooks/features/focus/useGridFocus.mjs +2 -10
  273. package/hooks/features/rowSelection/useGridRowSelection.js +0 -3
  274. package/hooks/features/rowSelection/useGridRowSelection.mjs +0 -3
  275. package/hooks/features/rows/gridRowSpanningUtils.d.mts +1 -1
  276. package/hooks/features/rows/gridRowSpanningUtils.d.ts +1 -1
  277. package/hooks/features/rows/gridRowSpanningUtils.js +1 -1
  278. package/hooks/features/rows/gridRowSpanningUtils.mjs +1 -1
  279. package/hooks/features/rows/gridRowsUtils.d.mts +1 -1
  280. package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
  281. package/hooks/features/rows/gridRowsUtils.js +5 -3
  282. package/hooks/features/rows/gridRowsUtils.mjs +5 -3
  283. package/hooks/features/virtualization/useGridVirtualization.d.mts +1 -1
  284. package/hooks/features/virtualization/useGridVirtualization.d.ts +1 -1
  285. package/hooks/features/virtualization/useGridVirtualization.js +2 -2
  286. package/hooks/features/virtualization/useGridVirtualization.mjs +2 -2
  287. package/hooks/utils/useGridSelector.js +1 -1
  288. package/hooks/utils/useGridSelector.mjs +1 -1
  289. package/index.js +1 -1
  290. package/index.mjs +1 -1
  291. package/locales/arSD.d.mts +1 -1
  292. package/locales/arSD.d.ts +1 -1
  293. package/locales/beBY.d.mts +1 -1
  294. package/locales/beBY.d.ts +1 -1
  295. package/locales/bgBG.d.mts +1 -1
  296. package/locales/bgBG.d.ts +1 -1
  297. package/locales/bnBD.d.mts +1 -1
  298. package/locales/bnBD.d.ts +1 -1
  299. package/locales/caES.d.mts +1 -1
  300. package/locales/caES.d.ts +1 -1
  301. package/locales/csCZ.d.mts +1 -1
  302. package/locales/csCZ.d.ts +1 -1
  303. package/locales/daDK.d.mts +1 -1
  304. package/locales/daDK.d.ts +1 -1
  305. package/locales/deDE.d.mts +1 -1
  306. package/locales/deDE.d.ts +1 -1
  307. package/locales/elGR.d.mts +1 -1
  308. package/locales/elGR.d.ts +1 -1
  309. package/locales/enUS.d.mts +1 -1
  310. package/locales/enUS.d.ts +1 -1
  311. package/locales/esES.d.mts +1 -1
  312. package/locales/esES.d.ts +1 -1
  313. package/locales/faIR.d.mts +1 -1
  314. package/locales/faIR.d.ts +1 -1
  315. package/locales/fiFI.d.mts +1 -1
  316. package/locales/fiFI.d.ts +1 -1
  317. package/locales/frFR.d.mts +1 -1
  318. package/locales/frFR.d.ts +1 -1
  319. package/locales/heIL.d.mts +1 -1
  320. package/locales/heIL.d.ts +1 -1
  321. package/locales/huHU.d.mts +1 -1
  322. package/locales/huHU.d.ts +1 -1
  323. package/locales/hyAM.d.mts +1 -1
  324. package/locales/hyAM.d.ts +1 -1
  325. package/locales/idID.d.mts +1 -1
  326. package/locales/idID.d.ts +1 -1
  327. package/locales/isIS.d.mts +1 -1
  328. package/locales/isIS.d.ts +1 -1
  329. package/locales/itIT.d.mts +1 -1
  330. package/locales/itIT.d.ts +1 -1
  331. package/locales/jaJP.d.mts +1 -1
  332. package/locales/jaJP.d.ts +1 -1
  333. package/locales/koKR.d.mts +1 -1
  334. package/locales/koKR.d.ts +1 -1
  335. package/locales/nbNO.d.mts +1 -1
  336. package/locales/nbNO.d.ts +1 -1
  337. package/locales/nlNL.d.mts +1 -1
  338. package/locales/nlNL.d.ts +1 -1
  339. package/locales/nnNO.d.mts +1 -1
  340. package/locales/nnNO.d.ts +1 -1
  341. package/locales/plPL.d.mts +1 -1
  342. package/locales/plPL.d.ts +1 -1
  343. package/locales/ptBR.d.mts +1 -1
  344. package/locales/ptBR.d.ts +1 -1
  345. package/locales/ptPT.d.mts +1 -1
  346. package/locales/ptPT.d.ts +1 -1
  347. package/locales/roRO.d.mts +1 -1
  348. package/locales/roRO.d.ts +1 -1
  349. package/locales/ruRU.d.mts +1 -1
  350. package/locales/ruRU.d.ts +1 -1
  351. package/locales/skSK.d.mts +1 -1
  352. package/locales/skSK.d.ts +1 -1
  353. package/locales/svSE.d.mts +1 -1
  354. package/locales/svSE.d.ts +1 -1
  355. package/locales/thTH.d.mts +1 -1
  356. package/locales/thTH.d.ts +1 -1
  357. package/locales/trTR.d.mts +1 -1
  358. package/locales/trTR.d.ts +1 -1
  359. package/locales/ukUA.d.mts +1 -1
  360. package/locales/ukUA.d.ts +1 -1
  361. package/locales/urPK.d.mts +1 -1
  362. package/locales/urPK.d.ts +1 -1
  363. package/locales/viVN.d.mts +1 -1
  364. package/locales/viVN.d.ts +1 -1
  365. package/locales/zhCN.d.mts +1 -1
  366. package/locales/zhCN.d.ts +1 -1
  367. package/locales/zhTW.d.mts +1 -1
  368. package/locales/zhTW.d.ts +1 -1
  369. package/material/index.js +5 -3
  370. package/material/index.mjs +5 -3
  371. package/material/variables.d.mts +1 -1
  372. package/material/variables.d.ts +1 -1
  373. package/package.json +8 -4
  374. package/utils/createSelector.d.mts +1 -1
  375. package/utils/createSelector.d.ts +1 -1
  376. package/utils/focusElement.d.mts +9 -0
  377. package/utils/focusElement.d.ts +9 -0
  378. package/utils/focusElement.js +24 -0
  379. package/utils/focusElement.mjs +19 -0
  380. package/utils/isJSDOM.d.mts +0 -1
  381. package/utils/isJSDOM.d.ts +0 -1
  382. package/utils/isJSDOM.js +0 -7
  383. package/utils/isJSDOM.mjs +0 -1
@@ -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 PropTypes from 'prop-types';
5
6
  import clsx from 'clsx';
6
7
  import composeClasses from '@mui/utils/composeClasses';
7
8
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
@@ -163,6 +164,76 @@ function GridEditLongTextCell(props) {
163
164
  }))]
164
165
  }));
165
166
  }
167
+ process.env.NODE_ENV !== "production" ? GridEditLongTextCell.propTypes /* remove-proptypes */ = {
168
+ // ----------------------------- Warning --------------------------------
169
+ // | These PropTypes are generated from the TypeScript type definitions |
170
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
171
+ // ----------------------------------------------------------------------
172
+ /**
173
+ * GridApi that let you manipulate the grid.
174
+ */
175
+ api: PropTypes.object.isRequired,
176
+ /**
177
+ * The mode of the cell.
178
+ */
179
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
180
+ changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
181
+ /**
182
+ * The column of the row that the current cell belongs to.
183
+ */
184
+ colDef: PropTypes.object.isRequired,
185
+ debounceMs: PropTypes.number,
186
+ /**
187
+ * The column field of the cell that triggered the event.
188
+ */
189
+ field: PropTypes.string.isRequired,
190
+ /**
191
+ * The cell value formatted with the column valueFormatter.
192
+ */
193
+ formattedValue: PropTypes.string,
194
+ /**
195
+ * If true, the cell is the active element.
196
+ */
197
+ hasFocus: PropTypes.bool.isRequired,
198
+ /**
199
+ * The grid row id.
200
+ */
201
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
202
+ /**
203
+ * If true, the cell is editable.
204
+ */
205
+ isEditable: PropTypes.bool,
206
+ isProcessingProps: PropTypes.bool,
207
+ isValidating: PropTypes.bool,
208
+ /**
209
+ * Callback called when the value is changed by the user.
210
+ * @param {React.ChangeEvent<HTMLTextAreaElement>} event The event source of the callback.
211
+ * @param {string} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
212
+ * @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
213
+ */
214
+ onValueChange: PropTypes.func,
215
+ /**
216
+ * The row model of the row that the current cell belongs to.
217
+ */
218
+ row: PropTypes.any.isRequired,
219
+ /**
220
+ * The node of the row that the current cell belongs to.
221
+ */
222
+ rowNode: PropTypes.object.isRequired,
223
+ /**
224
+ * Props passed to internal components.
225
+ */
226
+ slotProps: PropTypes.object,
227
+ /**
228
+ * the tabIndex value.
229
+ */
230
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
231
+ /**
232
+ * The cell value.
233
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
234
+ */
235
+ value: PropTypes.string
236
+ } : void 0;
166
237
  function GridEditLongTextarea(props) {
167
238
  const {
168
239
  id,
@@ -235,6 +306,76 @@ function GridEditLongTextarea(props) {
235
306
  className: clsx(classes.textarea, slotProps?.textarea?.className)
236
307
  }));
237
308
  }
309
+ process.env.NODE_ENV !== "production" ? GridEditLongTextarea.propTypes /* remove-proptypes */ = {
310
+ // ----------------------------- Warning --------------------------------
311
+ // | These PropTypes are generated from the TypeScript type definitions |
312
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
313
+ // ----------------------------------------------------------------------
314
+ /**
315
+ * GridApi that let you manipulate the grid.
316
+ */
317
+ api: PropTypes.object.isRequired,
318
+ /**
319
+ * The mode of the cell.
320
+ */
321
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
322
+ changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
323
+ /**
324
+ * The column of the row that the current cell belongs to.
325
+ */
326
+ colDef: PropTypes.object.isRequired,
327
+ debounceMs: PropTypes.number,
328
+ /**
329
+ * The column field of the cell that triggered the event.
330
+ */
331
+ field: PropTypes.string.isRequired,
332
+ /**
333
+ * The cell value formatted with the column valueFormatter.
334
+ */
335
+ formattedValue: PropTypes.string,
336
+ /**
337
+ * If true, the cell is the active element.
338
+ */
339
+ hasFocus: PropTypes.bool.isRequired,
340
+ /**
341
+ * The grid row id.
342
+ */
343
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
344
+ /**
345
+ * If true, the cell is editable.
346
+ */
347
+ isEditable: PropTypes.bool,
348
+ isProcessingProps: PropTypes.bool,
349
+ isValidating: PropTypes.bool,
350
+ /**
351
+ * Callback called when the value is changed by the user.
352
+ * @param {React.ChangeEvent<HTMLTextAreaElement>} event The event source of the callback.
353
+ * @param {string} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
354
+ * @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
355
+ */
356
+ onValueChange: PropTypes.func,
357
+ /**
358
+ * The row model of the row that the current cell belongs to.
359
+ */
360
+ row: PropTypes.any.isRequired,
361
+ /**
362
+ * The node of the row that the current cell belongs to.
363
+ */
364
+ rowNode: PropTypes.object.isRequired,
365
+ /**
366
+ * Props passed to internal components.
367
+ */
368
+ slotProps: PropTypes.object,
369
+ /**
370
+ * the tabIndex value.
371
+ */
372
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
373
+ /**
374
+ * The cell value.
375
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
376
+ */
377
+ value: PropTypes.string
378
+ } : void 0;
238
379
  export { GridEditLongTextCell };
239
380
  export const renderEditLongTextCell = params => /*#__PURE__*/_jsx(GridEditLongTextCell, _extends({}, params));
240
381
  if (process.env.NODE_ENV !== "production") renderEditLongTextCell.displayName = "renderEditLongTextCell";
@@ -126,7 +126,7 @@ function GridEditSingleSelectCell(props) {
126
126
  })
127
127
  }));
128
128
  }
129
- process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes = {
129
+ process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes /* remove-proptypes */ = {
130
130
  // ----------------------------- Warning --------------------------------
131
131
  // | These PropTypes are generated from the TypeScript type definitions |
132
132
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -118,7 +118,7 @@ function GridEditSingleSelectCell(props) {
118
118
  })
119
119
  }));
120
120
  }
121
- process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes = {
121
+ process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes /* remove-proptypes */ = {
122
122
  // ----------------------------- Warning --------------------------------
123
123
  // | These PropTypes are generated from the TypeScript type definitions |
124
124
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type SxProps, type Theme } from '@mui/material/styles';
2
+ import type { SxProps, Theme } from '@mui/material/styles';
3
3
  import type { GridRenderCellParams } from "../../models/params/gridCellParams.mjs";
4
4
  interface GridFooterCellProps extends GridRenderCellParams {
5
5
  sx?: SxProps<Theme>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type SxProps, type Theme } from '@mui/material/styles';
2
+ import type { SxProps, Theme } from '@mui/material/styles';
3
3
  import type { GridRenderCellParams } from "../../models/params/gridCellParams.js";
4
4
  interface GridFooterCellProps extends GridRenderCellParams {
5
5
  sx?: SxProps<Theme>;
@@ -39,5 +39,8 @@ export interface GridLongTextCellProps extends GridRenderCellParams<any, string
39
39
  };
40
40
  }
41
41
  declare function GridLongTextCell(props: GridLongTextCellProps): import("react/jsx-runtime").JSX.Element;
42
+ declare namespace GridLongTextCell {
43
+ var propTypes: any;
44
+ }
42
45
  export { GridLongTextCell };
43
46
  export declare const renderLongTextCell: (params: GridLongTextCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -39,5 +39,8 @@ export interface GridLongTextCellProps extends GridRenderCellParams<any, string
39
39
  };
40
40
  }
41
41
  declare function GridLongTextCell(props: GridLongTextCellProps): import("react/jsx-runtime").JSX.Element;
42
+ declare namespace GridLongTextCell {
43
+ var propTypes: any;
44
+ }
42
45
  export { GridLongTextCell };
43
46
  export declare const renderLongTextCell: (params: GridLongTextCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,7 @@ exports.GridLongTextCell = GridLongTextCell;
10
10
  exports.renderLongTextCell = void 0;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _clsx = _interopRequireDefault(require("clsx"));
14
15
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
16
  var _styles = require("@mui/material/styles");
@@ -251,6 +252,71 @@ function GridLongTextCell(props) {
251
252
  }))]
252
253
  }));
253
254
  }
255
+ process.env.NODE_ENV !== "production" ? GridLongTextCell.propTypes /* remove-proptypes */ = {
256
+ // ----------------------------- Warning --------------------------------
257
+ // | These PropTypes are generated from the TypeScript type definitions |
258
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
259
+ // ----------------------------------------------------------------------
260
+ /**
261
+ * GridApi that let you manipulate the grid.
262
+ */
263
+ api: _propTypes.default.object.isRequired,
264
+ /**
265
+ * The mode of the cell.
266
+ */
267
+ cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
268
+ /**
269
+ * The column of the row that the current cell belongs to.
270
+ */
271
+ colDef: _propTypes.default.object.isRequired,
272
+ /**
273
+ * The column field of the cell that triggered the event.
274
+ */
275
+ field: _propTypes.default.string.isRequired,
276
+ /**
277
+ * The cell value formatted with the column valueFormatter.
278
+ */
279
+ formattedValue: _propTypes.default.string,
280
+ /**
281
+ * If true, the cell is the active element.
282
+ */
283
+ hasFocus: _propTypes.default.bool.isRequired,
284
+ /**
285
+ * The grid row id.
286
+ */
287
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
288
+ /**
289
+ * If true, the cell is editable.
290
+ */
291
+ isEditable: _propTypes.default.bool,
292
+ /**
293
+ * A function to customize the content rendered in the popup.
294
+ * @param {string | null} value The cell value.
295
+ * @returns {React.ReactNode} The content to render in the popup.
296
+ */
297
+ renderContent: _propTypes.default.func,
298
+ /**
299
+ * The row model of the row that the current cell belongs to.
300
+ */
301
+ row: _propTypes.default.any.isRequired,
302
+ /**
303
+ * The node of the row that the current cell belongs to.
304
+ */
305
+ rowNode: _propTypes.default.object.isRequired,
306
+ /**
307
+ * Props passed to internal components.
308
+ */
309
+ slotProps: _propTypes.default.object,
310
+ /**
311
+ * the tabIndex value.
312
+ */
313
+ tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
314
+ /**
315
+ * The cell value.
316
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
317
+ */
318
+ value: _propTypes.default.string
319
+ } : void 0;
254
320
  const renderLongTextCell = params => /*#__PURE__*/(0, _jsxRuntime.jsx)(GridLongTextCell, (0, _extends2.default)({}, params));
255
321
  exports.renderLongTextCell = renderLongTextCell;
256
322
  if (process.env.NODE_ENV !== "production") renderLongTextCell.displayName = "renderLongTextCell";
@@ -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 PropTypes from 'prop-types';
5
6
  import clsx from 'clsx';
6
7
  import composeClasses from '@mui/utils/composeClasses';
7
8
  import { styled } from '@mui/material/styles';
@@ -243,6 +244,71 @@ function GridLongTextCell(props) {
243
244
  }))]
244
245
  }));
245
246
  }
247
+ process.env.NODE_ENV !== "production" ? GridLongTextCell.propTypes /* remove-proptypes */ = {
248
+ // ----------------------------- Warning --------------------------------
249
+ // | These PropTypes are generated from the TypeScript type definitions |
250
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
251
+ // ----------------------------------------------------------------------
252
+ /**
253
+ * GridApi that let you manipulate the grid.
254
+ */
255
+ api: PropTypes.object.isRequired,
256
+ /**
257
+ * The mode of the cell.
258
+ */
259
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
260
+ /**
261
+ * The column of the row that the current cell belongs to.
262
+ */
263
+ colDef: PropTypes.object.isRequired,
264
+ /**
265
+ * The column field of the cell that triggered the event.
266
+ */
267
+ field: PropTypes.string.isRequired,
268
+ /**
269
+ * The cell value formatted with the column valueFormatter.
270
+ */
271
+ formattedValue: PropTypes.string,
272
+ /**
273
+ * If true, the cell is the active element.
274
+ */
275
+ hasFocus: PropTypes.bool.isRequired,
276
+ /**
277
+ * The grid row id.
278
+ */
279
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
280
+ /**
281
+ * If true, the cell is editable.
282
+ */
283
+ isEditable: PropTypes.bool,
284
+ /**
285
+ * A function to customize the content rendered in the popup.
286
+ * @param {string | null} value The cell value.
287
+ * @returns {React.ReactNode} The content to render in the popup.
288
+ */
289
+ renderContent: PropTypes.func,
290
+ /**
291
+ * The row model of the row that the current cell belongs to.
292
+ */
293
+ row: PropTypes.any.isRequired,
294
+ /**
295
+ * The node of the row that the current cell belongs to.
296
+ */
297
+ rowNode: PropTypes.object.isRequired,
298
+ /**
299
+ * Props passed to internal components.
300
+ */
301
+ slotProps: PropTypes.object,
302
+ /**
303
+ * the tabIndex value.
304
+ */
305
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
306
+ /**
307
+ * The cell value.
308
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
309
+ */
310
+ value: PropTypes.string
311
+ } : void 0;
246
312
  export { GridLongTextCell };
247
313
  export const renderLongTextCell = params => /*#__PURE__*/_jsx(GridLongTextCell, _extends({}, params));
248
314
  if (process.env.NODE_ENV !== "production") renderLongTextCell.displayName = "renderLongTextCell";
@@ -98,7 +98,7 @@ function GridSkeletonCell(props) {
98
98
  children: !empty && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseSkeleton, (0, _extends2.default)({}, skeletonProps))
99
99
  }));
100
100
  }
101
- process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
101
+ process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes /* remove-proptypes */ = {
102
102
  // ----------------------------- Warning --------------------------------
103
103
  // | These PropTypes are generated from the TypeScript type definitions |
104
104
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -111,7 +111,8 @@ process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
111
111
  empty: _propTypes.default.bool,
112
112
  field: _propTypes.default.string,
113
113
  height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
114
- type: _propTypes.default.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'number', 'singleSelect', 'string']),
114
+ skeletonProps: _propTypes.default.object,
115
+ type: _propTypes.default.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'longText', 'multiSelect', 'number', 'singleSelect', 'string']),
115
116
  width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
116
117
  } : void 0;
117
118
  const Memoized = exports.GridSkeletonCell = (0, _fastMemo.fastMemo)(GridSkeletonCell);
@@ -90,7 +90,7 @@ function GridSkeletonCell(props) {
90
90
  children: !empty && /*#__PURE__*/_jsx(rootProps.slots.baseSkeleton, _extends({}, skeletonProps))
91
91
  }));
92
92
  }
93
- process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
93
+ process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes /* remove-proptypes */ = {
94
94
  // ----------------------------- Warning --------------------------------
95
95
  // | These PropTypes are generated from the TypeScript type definitions |
96
96
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -103,7 +103,8 @@ process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
103
103
  empty: PropTypes.bool,
104
104
  field: PropTypes.string,
105
105
  height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
106
- type: PropTypes.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'number', 'singleSelect', 'string']),
106
+ skeletonProps: PropTypes.object,
107
+ type: PropTypes.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'longText', 'multiSelect', 'number', 'singleSelect', 'string']),
107
108
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
108
109
  } : void 0;
109
110
  const Memoized = fastMemo(GridSkeletonCell);
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type SxProps, type Theme } from '@mui/system';
2
+ import type { SxProps, Theme } from '@mui/system';
3
3
  interface GridBaseColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  sx?: SxProps<Theme>;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type SxProps, type Theme } from '@mui/system';
2
+ import type { SxProps, Theme } from '@mui/system';
3
3
  interface GridBaseColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  sx?: SxProps<Theme>;
5
5
  }
@@ -14,7 +14,7 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
14
14
  var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
15
15
  var _RtlProvider = require("@mui/system/RtlProvider");
16
16
  var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
17
- var _doesSupportPreventScroll = require("../../utils/doesSupportPreventScroll");
17
+ var _focusElement = require("../../utils/focusElement");
18
18
  var _gridClasses = require("../../constants/gridClasses");
19
19
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
20
20
  var _gridColumnGroupsSelector = require("../../hooks/features/columnGrouping/gridColumnGroupsSelector");
@@ -102,15 +102,7 @@ function GridColumnGroupHeader(props) {
102
102
  if (!elementToFocus) {
103
103
  return;
104
104
  }
105
- if ((0, _doesSupportPreventScroll.doesSupportPreventScroll)()) {
106
- elementToFocus.focus({
107
- preventScroll: true
108
- });
109
- } else {
110
- const scrollPosition = apiRef.current.getScrollPosition();
111
- elementToFocus.focus();
112
- apiRef.current.scroll(scrollPosition);
113
- }
105
+ (0, _focusElement.focusElement)(elementToFocus, apiRef);
114
106
  }
115
107
  }, [apiRef, hasFocus]);
116
108
  const publish = React.useCallback(eventName => event => {
@@ -7,7 +7,7 @@ import composeClasses from '@mui/utils/composeClasses';
7
7
  import capitalize from '@mui/utils/capitalize';
8
8
  import { useRtl } from '@mui/system/RtlProvider';
9
9
  import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.mjs";
10
- import { doesSupportPreventScroll } from "../../utils/doesSupportPreventScroll.mjs";
10
+ import { focusElement } from "../../utils/focusElement.mjs";
11
11
  import { getDataGridUtilityClass } from "../../constants/gridClasses.mjs";
12
12
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
13
13
  import { gridColumnGroupsLookupSelector } from "../../hooks/features/columnGrouping/gridColumnGroupsSelector.mjs";
@@ -95,15 +95,7 @@ function GridColumnGroupHeader(props) {
95
95
  if (!elementToFocus) {
96
96
  return;
97
97
  }
98
- if (doesSupportPreventScroll()) {
99
- elementToFocus.focus({
100
- preventScroll: true
101
- });
102
- } else {
103
- const scrollPosition = apiRef.current.getScrollPosition();
104
- elementToFocus.focus();
105
- apiRef.current.scroll(scrollPosition);
106
- }
98
+ focusElement(elementToFocus, apiRef);
107
99
  }
108
100
  }, [apiRef, hasFocus]);
109
101
  const publish = React.useCallback(eventName => event => {
@@ -34,7 +34,7 @@ function GridColumnHeaderFilterIconButtonWrapped(props) {
34
34
  }
35
35
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridColumnHeaderFilterIconButton, (0, _extends2.default)({}, props));
36
36
  }
37
- process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButtonWrapped.propTypes = {
37
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButtonWrapped.propTypes /* remove-proptypes */ = {
38
38
  // ----------------------------- Warning --------------------------------
39
39
  // | These PropTypes are generated from the TypeScript type definitions |
40
40
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -105,7 +105,7 @@ function GridColumnHeaderFilterIconButton(props) {
105
105
  })
106
106
  }));
107
107
  }
108
- process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButton.propTypes = {
108
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButton.propTypes /* remove-proptypes */ = {
109
109
  // ----------------------------- Warning --------------------------------
110
110
  // | These PropTypes are generated from the TypeScript type definitions |
111
111
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -26,7 +26,7 @@ function GridColumnHeaderFilterIconButtonWrapped(props) {
26
26
  }
27
27
  return /*#__PURE__*/_jsx(GridColumnHeaderFilterIconButton, _extends({}, props));
28
28
  }
29
- process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButtonWrapped.propTypes = {
29
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButtonWrapped.propTypes /* remove-proptypes */ = {
30
30
  // ----------------------------- Warning --------------------------------
31
31
  // | These PropTypes are generated from the TypeScript type definitions |
32
32
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -97,7 +97,7 @@ function GridColumnHeaderFilterIconButton(props) {
97
97
  })
98
98
  }));
99
99
  }
100
- process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButton.propTypes = {
100
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderFilterIconButton.propTypes /* remove-proptypes */ = {
101
101
  // ----------------------------- Warning --------------------------------
102
102
  // | These PropTypes are generated from the TypeScript type definitions |
103
103
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -16,7 +16,7 @@ var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
16
16
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
17
17
  var _fastMemo = require("@mui/x-internals/fastMemo");
18
18
  var _RtlProvider = require("@mui/system/RtlProvider");
19
- var _doesSupportPreventScroll = require("../../utils/doesSupportPreventScroll");
19
+ var _focusElement = require("../../utils/focusElement");
20
20
  var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
21
21
  var _getColumnMenuItemKeys = require("../../hooks/features/columnMenu/getColumnMenuItemKeys");
22
22
  var _ColumnHeaderMenuIcon = require("./ColumnHeaderMenuIcon");
@@ -209,15 +209,7 @@ function GridColumnHeaderItem(props) {
209
209
  if (!elementToFocus) {
210
210
  return;
211
211
  }
212
- if ((0, _doesSupportPreventScroll.doesSupportPreventScroll)()) {
213
- elementToFocus.focus({
214
- preventScroll: true
215
- });
216
- } else {
217
- const scrollPosition = apiRef.current.getScrollPosition();
218
- elementToFocus.focus();
219
- apiRef.current.scroll(scrollPosition);
220
- }
212
+ (0, _focusElement.focusElement)(elementToFocus, apiRef);
221
213
  }
222
214
  }, [apiRef, hasFocus]);
223
215
  const headerClassName = typeof colDef.headerClassName === 'function' ? colDef.headerClassName({
@@ -255,7 +247,7 @@ function GridColumnHeaderItem(props) {
255
247
  style: style
256
248
  }, mouseEventsHandlers));
257
249
  }
258
- process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
250
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes /* remove-proptypes */ = {
259
251
  // ----------------------------- Warning --------------------------------
260
252
  // | These PropTypes are generated from the TypeScript type definitions |
261
253
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -9,7 +9,7 @@ import capitalize from '@mui/utils/capitalize';
9
9
  import useId from '@mui/utils/useId';
10
10
  import { fastMemo } from '@mui/x-internals/fastMemo';
11
11
  import { useRtl } from '@mui/system/RtlProvider';
12
- import { doesSupportPreventScroll } from "../../utils/doesSupportPreventScroll.mjs";
12
+ import { focusElement } from "../../utils/focusElement.mjs";
13
13
  import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.mjs";
14
14
  import { getColumnMenuItemKeys } from "../../hooks/features/columnMenu/getColumnMenuItemKeys.mjs";
15
15
  import { ColumnHeaderMenuIcon } from "./ColumnHeaderMenuIcon.mjs";
@@ -202,15 +202,7 @@ function GridColumnHeaderItem(props) {
202
202
  if (!elementToFocus) {
203
203
  return;
204
204
  }
205
- if (doesSupportPreventScroll()) {
206
- elementToFocus.focus({
207
- preventScroll: true
208
- });
209
- } else {
210
- const scrollPosition = apiRef.current.getScrollPosition();
211
- elementToFocus.focus();
212
- apiRef.current.scroll(scrollPosition);
213
- }
205
+ focusElement(elementToFocus, apiRef);
214
206
  }
215
207
  }, [apiRef, hasFocus]);
216
208
  const headerClassName = typeof colDef.headerClassName === 'function' ? colDef.headerClassName({
@@ -248,7 +240,7 @@ function GridColumnHeaderItem(props) {
248
240
  style: style
249
241
  }, mouseEventsHandlers));
250
242
  }
251
- process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
243
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes /* remove-proptypes */ = {
252
244
  // ----------------------------- Warning --------------------------------
253
245
  // | These PropTypes are generated from the TypeScript type definitions |
254
246
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -68,7 +68,7 @@ function GridColumnHeaderSeparatorRaw(props) {
68
68
  }
69
69
  const GridColumnHeaderSeparator = exports.GridColumnHeaderSeparator = /*#__PURE__*/React.memo(GridColumnHeaderSeparatorRaw);
70
70
  if (process.env.NODE_ENV !== "production") GridColumnHeaderSeparator.displayName = "GridColumnHeaderSeparator";
71
- process.env.NODE_ENV !== "production" ? GridColumnHeaderSeparatorRaw.propTypes = {
71
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderSeparatorRaw.propTypes /* remove-proptypes */ = {
72
72
  // ----------------------------- Warning --------------------------------
73
73
  // | These PropTypes are generated from the TypeScript type definitions |
74
74
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -60,7 +60,7 @@ function GridColumnHeaderSeparatorRaw(props) {
60
60
  }
61
61
  const GridColumnHeaderSeparator = /*#__PURE__*/React.memo(GridColumnHeaderSeparatorRaw);
62
62
  if (process.env.NODE_ENV !== "production") GridColumnHeaderSeparator.displayName = "GridColumnHeaderSeparator";
63
- process.env.NODE_ENV !== "production" ? GridColumnHeaderSeparatorRaw.propTypes = {
63
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderSeparatorRaw.propTypes /* remove-proptypes */ = {
64
64
  // ----------------------------- Warning --------------------------------
65
65
  // | These PropTypes are generated from the TypeScript type definitions |
66
66
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type GridColumnSortButtonProps } from "../GridColumnSortButton.mjs";
2
+ import type { GridColumnSortButtonProps } from "../GridColumnSortButton.mjs";
3
3
  export interface GridColumnHeaderSortIconProps extends GridColumnSortButtonProps {}
4
4
  declare function GridColumnHeaderSortIconRaw(props: GridColumnHeaderSortIconProps): import("react/jsx-runtime").JSX.Element;
5
5
  declare namespace GridColumnHeaderSortIconRaw {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type GridColumnSortButtonProps } from "../GridColumnSortButton.js";
2
+ import type { GridColumnSortButtonProps } from "../GridColumnSortButton.js";
3
3
  export interface GridColumnHeaderSortIconProps extends GridColumnSortButtonProps {}
4
4
  declare function GridColumnHeaderSortIconRaw(props: GridColumnHeaderSortIconProps): import("react/jsx-runtime").JSX.Element;
5
5
  declare namespace GridColumnHeaderSortIconRaw {
@@ -21,7 +21,7 @@ function GridColumnHeaderSortIconRaw(props) {
21
21
  }
22
22
  const GridColumnHeaderSortIcon = exports.GridColumnHeaderSortIcon = /*#__PURE__*/React.memo(GridColumnHeaderSortIconRaw);
23
23
  if (process.env.NODE_ENV !== "production") GridColumnHeaderSortIcon.displayName = "GridColumnHeaderSortIcon";
24
- process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes = {
24
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes /* remove-proptypes */ = {
25
25
  // ----------------------------- Warning --------------------------------
26
26
  // | These PropTypes are generated from the TypeScript type definitions |
27
27
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -13,7 +13,7 @@ function GridColumnHeaderSortIconRaw(props) {
13
13
  }
14
14
  const GridColumnHeaderSortIcon = /*#__PURE__*/React.memo(GridColumnHeaderSortIconRaw);
15
15
  if (process.env.NODE_ENV !== "production") GridColumnHeaderSortIcon.displayName = "GridColumnHeaderSortIcon";
16
- process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes = {
16
+ process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes /* remove-proptypes */ = {
17
17
  // ----------------------------- Warning --------------------------------
18
18
  // | These PropTypes are generated from the TypeScript type definitions |
19
19
  // | To update them edit the TypeScript types and run "pnpm proptypes" |