@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (801) hide show
  1. package/CHANGELOG.md +2007 -230
  2. package/DataGrid/DataGrid.js +20 -38
  3. package/DataGrid/useDataGridComponent.d.ts +2 -1
  4. package/DataGrid/useDataGridComponent.js +3 -3
  5. package/DataGrid/useDataGridProps.js +3 -3
  6. package/README.md +1 -1
  7. package/colDef/gridDateOperators.d.ts +2 -1
  8. package/colDef/gridNumericOperators.d.ts +4 -1
  9. package/components/GridApiContext.js +2 -0
  10. package/components/GridColumnHeaders.d.ts +1 -1
  11. package/components/GridColumnHeaders.js +4 -4
  12. package/components/GridConfigurationContext.js +2 -0
  13. package/components/GridFooter.d.ts +2 -1
  14. package/components/GridFooter.js +4 -4
  15. package/components/GridHeaders.js +2 -2
  16. package/components/GridLoadingOverlay.d.ts +1 -1
  17. package/components/GridLoadingOverlay.js +10 -8
  18. package/components/GridNoResultsOverlay.d.ts +2 -1
  19. package/components/GridNoResultsOverlay.js +4 -4
  20. package/components/GridNoRowsOverlay.d.ts +2 -1
  21. package/components/GridNoRowsOverlay.js +4 -4
  22. package/components/GridPagination.d.ts +1 -1
  23. package/components/GridPagination.js +7 -4
  24. package/components/GridRow.d.ts +6 -11
  25. package/components/GridRow.js +60 -88
  26. package/components/GridRowCount.d.ts +1 -1
  27. package/components/GridRowCount.js +3 -2
  28. package/components/GridScrollArea.d.ts +5 -2
  29. package/components/GridScrollArea.js +33 -24
  30. package/components/GridSelectedRowCount.d.ts +4 -1
  31. package/components/GridSelectedRowCount.js +3 -2
  32. package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
  33. package/components/GridSkeletonLoadingOverlay.js +23 -21
  34. package/components/base/GridOverlays.d.ts +4 -3
  35. package/components/base/GridOverlays.js +2 -24
  36. package/components/base/index.d.ts +0 -1
  37. package/components/base/index.js +1 -2
  38. package/components/cell/GridActionsCell.js +8 -1
  39. package/components/cell/GridActionsCellItem.d.ts +17 -10
  40. package/components/cell/GridActionsCellItem.js +9 -8
  41. package/components/cell/GridCell.d.ts +19 -23
  42. package/components/cell/GridCell.js +49 -92
  43. package/components/cell/GridEditDateCell.js +1 -1
  44. package/components/cell/GridEditInputCell.d.ts +1 -1
  45. package/components/cell/GridEditInputCell.js +73 -4
  46. package/components/cell/GridEditSingleSelectCell.js +2 -2
  47. package/components/cell/GridSkeletonCell.js +1 -2
  48. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  49. package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
  50. package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  51. package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
  52. package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  53. package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
  54. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
  55. package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
  56. package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  57. package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  58. package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
  59. package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  60. package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
  61. package/components/columnHeaders/GridIconButtonContainer.js +5 -3
  62. package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
  63. package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
  64. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  65. package/components/columnSelection/GridHeaderCheckbox.js +17 -9
  66. package/components/columnsManagement/GridColumnsManagement.d.ts +1 -1
  67. package/components/columnsManagement/GridColumnsManagement.js +50 -27
  68. package/components/containers/GridFooterContainer.d.ts +1 -1
  69. package/components/containers/GridFooterContainer.js +5 -3
  70. package/components/containers/GridOverlay.d.ts +1 -1
  71. package/components/containers/GridOverlay.js +5 -3
  72. package/components/containers/GridRoot.d.ts +2 -2
  73. package/components/containers/GridRoot.js +29 -17
  74. package/components/containers/GridRootStyles.js +163 -53
  75. package/components/containers/GridToolbarContainer.d.ts +1 -1
  76. package/components/containers/GridToolbarContainer.js +3 -2
  77. package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
  78. package/components/menu/columnMenu/GridColumnMenu.js +5 -5
  79. package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
  80. package/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
  81. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
  82. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
  83. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
  84. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  85. package/components/panel/GridColumnsPanel.js +1 -2
  86. package/components/panel/GridPanel.d.ts +2 -2
  87. package/components/panel/GridPanel.js +5 -3
  88. package/components/panel/GridPanelContent.js +7 -3
  89. package/components/panel/GridPanelFooter.d.ts +1 -1
  90. package/components/panel/GridPanelFooter.js +4 -3
  91. package/components/panel/GridPanelWrapper.d.ts +1 -1
  92. package/components/panel/GridPanelWrapper.js +5 -3
  93. package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
  94. package/components/panel/filterPanel/GridFilterForm.js +22 -18
  95. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +4 -11
  96. package/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
  97. package/components/panel/filterPanel/GridFilterInputDate.d.ts +3 -9
  98. package/components/panel/filterPanel/GridFilterInputDate.js +50 -31
  99. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -3
  100. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
  101. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -3
  102. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
  103. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +3 -9
  104. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
  105. package/components/panel/filterPanel/GridFilterInputValue.d.ts +3 -9
  106. package/components/panel/filterPanel/GridFilterInputValue.js +63 -38
  107. package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
  108. package/components/panel/filterPanel/GridFilterPanel.js +4 -4
  109. package/components/panel/filterPanel/index.d.ts +2 -2
  110. package/components/panel/filterPanel/index.js +1 -2
  111. package/components/toolbar/GridToolbar.d.ts +1 -1
  112. package/components/toolbar/GridToolbar.js +11 -5
  113. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  114. package/components/toolbar/GridToolbarColumnsButton.js +12 -6
  115. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  116. package/components/toolbar/GridToolbarDensitySelector.js +9 -11
  117. package/components/toolbar/GridToolbarExport.d.ts +1 -1
  118. package/components/toolbar/GridToolbarExport.js +2 -1
  119. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  120. package/components/toolbar/GridToolbarExportContainer.js +6 -6
  121. package/components/toolbar/GridToolbarFilterButton.d.ts +3 -1
  122. package/components/toolbar/GridToolbarFilterButton.js +20 -9
  123. package/components/toolbar/GridToolbarQuickFilter.d.ts +6 -2
  124. package/components/toolbar/GridToolbarQuickFilter.js +39 -31
  125. package/components/virtualization/GridMainContainer.d.ts +13 -1
  126. package/components/virtualization/GridMainContainer.js +14 -5
  127. package/components/virtualization/GridVirtualScrollbar.d.ts +5 -1
  128. package/components/virtualization/GridVirtualScrollbar.js +17 -17
  129. package/components/virtualization/GridVirtualScroller.js +43 -21
  130. package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
  131. package/components/virtualization/GridVirtualScrollerContent.js +15 -6
  132. package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
  133. package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  134. package/constants/dataGridPropsDefaultValues.js +2 -4
  135. package/constants/gridClasses.d.ts +12 -12
  136. package/constants/gridClasses.js +1 -1
  137. package/constants/index.d.ts +1 -0
  138. package/constants/index.js +2 -1
  139. package/constants/localeTextConstants.js +1 -1
  140. package/constants/signature.d.ts +9 -0
  141. package/constants/signature.js +10 -0
  142. package/context/GridContextProvider.d.ts +2 -1
  143. package/context/GridRootPropsContext.js +2 -0
  144. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
  145. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
  146. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
  147. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  148. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
  149. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
  150. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
  151. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
  152. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
  153. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +5 -8
  154. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  155. package/hooks/core/useGridApiInitialization.d.ts +2 -2
  156. package/hooks/core/useGridApiInitialization.js +3 -3
  157. package/hooks/core/useGridInitialization.d.ts +2 -2
  158. package/hooks/core/useGridIsRtl.d.ts +2 -2
  159. package/hooks/core/useGridLocaleText.d.ts +2 -2
  160. package/hooks/core/useGridLoggerFactory.d.ts +2 -2
  161. package/hooks/core/useGridRefs.d.ts +2 -2
  162. package/hooks/core/useGridStateInitialization.d.ts +2 -2
  163. package/hooks/core/useGridStateInitialization.js +6 -5
  164. package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
  165. package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
  166. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
  167. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
  168. package/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
  169. package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
  170. package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
  171. package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
  172. package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
  173. package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  174. package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
  175. package/hooks/features/columnResize/useGridColumnResize.js +17 -10
  176. package/hooks/features/columns/gridColumnsSelector.d.ts +11 -16
  177. package/hooks/features/columns/gridColumnsSelector.js +0 -12
  178. package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
  179. package/hooks/features/columns/gridColumnsUtils.js +2 -1
  180. package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
  181. package/hooks/features/columns/useGridColumns.d.ts +2 -2
  182. package/hooks/features/columns/useGridColumns.js +9 -4
  183. package/hooks/features/density/densitySelector.d.ts +1 -1
  184. package/hooks/features/density/useGridDensity.d.ts +2 -2
  185. package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
  186. package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +16 -0
  187. package/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
  188. package/hooks/features/dimensions/index.d.ts +1 -1
  189. package/hooks/features/dimensions/index.js +1 -2
  190. package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
  191. package/hooks/features/dimensions/useGridDimensions.js +104 -98
  192. package/hooks/features/editing/gridEditingSelectors.d.ts +10 -0
  193. package/hooks/features/editing/gridEditingSelectors.js +12 -1
  194. package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
  195. package/hooks/features/editing/useGridCellEditing.js +4 -4
  196. package/hooks/features/editing/useGridEditing.d.ts +2 -2
  197. package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
  198. package/hooks/features/editing/useGridRowEditing.js +10 -11
  199. package/hooks/features/events/useGridEvents.d.ts +2 -2
  200. package/hooks/features/export/serializers/csvSerializer.d.ts +2 -1
  201. package/hooks/features/export/useGridCsvExport.d.ts +2 -2
  202. package/hooks/features/export/useGridPrintExport.d.ts +2 -2
  203. package/hooks/features/export/useGridPrintExport.js +1 -1
  204. package/hooks/features/export/utils.d.ts +2 -2
  205. package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
  206. package/hooks/features/filter/gridFilterSelector.js +8 -2
  207. package/hooks/features/filter/gridFilterState.d.ts +8 -3
  208. package/hooks/features/filter/gridFilterState.js +5 -0
  209. package/hooks/features/filter/gridFilterUtils.d.ts +7 -7
  210. package/hooks/features/filter/gridFilterUtils.js +3 -3
  211. package/hooks/features/filter/useGridFilter.d.ts +2 -2
  212. package/hooks/features/filter/useGridFilter.js +10 -15
  213. package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
  214. package/hooks/features/focus/useGridFocus.d.ts +2 -2
  215. package/hooks/features/focus/useGridFocus.js +3 -2
  216. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
  217. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
  218. package/hooks/features/index.d.ts +1 -0
  219. package/hooks/features/index.js +1 -0
  220. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
  221. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
  222. package/hooks/features/keyboardNavigation/utils.d.ts +3 -4
  223. package/hooks/features/keyboardNavigation/utils.js +0 -5
  224. package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
  225. package/hooks/features/listView/gridListViewSelectors.js +3 -1
  226. package/hooks/features/listView/index.d.ts +1 -0
  227. package/hooks/features/listView/index.js +1 -0
  228. package/hooks/features/listView/useGridListView.d.ts +2 -2
  229. package/hooks/features/listView/useGridListView.js +2 -1
  230. package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
  231. package/hooks/features/overlays/useGridOverlays.js +23 -3
  232. package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
  233. package/hooks/features/pagination/gridPaginationSelector.d.ts +34 -9
  234. package/hooks/features/pagination/gridPaginationSelector.js +39 -1
  235. package/hooks/features/pagination/gridPaginationUtils.js +1 -1
  236. package/hooks/features/pagination/useGridPagination.d.ts +3 -3
  237. package/hooks/features/pagination/useGridPagination.js +6 -4
  238. package/hooks/features/pagination/useGridPaginationMeta.d.ts +2 -2
  239. package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
  240. package/hooks/features/pagination/useGridPaginationModel.js +23 -1
  241. package/hooks/features/pagination/useGridRowCount.d.ts +2 -2
  242. package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +1 -0
  243. package/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
  244. package/hooks/features/preferencesPanel/index.d.ts +1 -1
  245. package/hooks/features/preferencesPanel/index.js +1 -1
  246. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +2 -2
  247. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
  248. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  249. package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
  250. package/hooks/features/rowSelection/useGridRowSelection.js +11 -18
  251. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
  252. package/hooks/features/rowSelection/utils.d.ts +4 -3
  253. package/hooks/features/rowSelection/utils.js +4 -4
  254. package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
  255. package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
  256. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
  257. package/hooks/features/rows/gridRowsMetaState.d.ts +8 -0
  258. package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
  259. package/hooks/features/rows/gridRowsSelector.js +1 -2
  260. package/hooks/features/rows/gridRowsUtils.d.ts +3 -7
  261. package/hooks/features/rows/gridRowsUtils.js +0 -25
  262. package/hooks/features/rows/index.d.ts +1 -1
  263. package/hooks/features/rows/index.js +1 -1
  264. package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
  265. package/hooks/features/rows/useGridParamsApi.js +33 -14
  266. package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
  267. package/hooks/features/rows/useGridRowSpanning.js +97 -86
  268. package/hooks/features/rows/useGridRows.d.ts +2 -2
  269. package/hooks/features/rows/useGridRows.js +27 -29
  270. package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
  271. package/hooks/features/rows/useGridRowsMeta.js +36 -19
  272. package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
  273. package/hooks/features/scroll/useGridScroll.d.ts +2 -2
  274. package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
  275. package/hooks/features/sorting/gridSortingSelector.js +21 -9
  276. package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
  277. package/hooks/features/sorting/gridSortingUtils.js +2 -2
  278. package/hooks/features/sorting/index.d.ts +2 -1
  279. package/hooks/features/sorting/index.js +1 -1
  280. package/hooks/features/sorting/useGridSorting.d.ts +2 -2
  281. package/hooks/features/sorting/useGridSorting.js +1 -1
  282. package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
  283. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
  284. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
  285. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
  286. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +21 -6
  287. package/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
  288. package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
  289. package/hooks/utils/index.d.ts +1 -1
  290. package/hooks/utils/index.js +1 -1
  291. package/hooks/utils/useGridApiContext.d.ts +2 -2
  292. package/hooks/utils/useGridApiEventHandler.d.ts +9 -19
  293. package/hooks/utils/useGridApiEventHandler.js +68 -75
  294. package/hooks/utils/useGridApiMethod.d.ts +2 -2
  295. package/hooks/utils/useGridApiRef.d.ts +2 -2
  296. package/hooks/utils/useGridApiRef.js +1 -1
  297. package/hooks/utils/useGridInitializeState.d.ts +3 -3
  298. package/hooks/utils/useGridLogger.d.ts +2 -2
  299. package/hooks/utils/useGridNativeEventListener.d.ts +2 -1
  300. package/hooks/utils/useGridPrivateApiContext.d.ts +2 -1
  301. package/hooks/utils/useGridSelector.d.ts +5 -7
  302. package/hooks/utils/useGridSelector.js +29 -49
  303. package/hooks/utils/useGridVisibleRows.d.ts +8 -6
  304. package/hooks/utils/useGridVisibleRows.js +5 -28
  305. package/hooks/utils/useIsSSR.d.ts +1 -0
  306. package/hooks/utils/useIsSSR.js +5 -0
  307. package/index.js +1 -1
  308. package/internals/constants.d.ts +6 -0
  309. package/internals/constants.js +8 -1
  310. package/internals/index.d.ts +9 -5
  311. package/internals/index.js +7 -4
  312. package/internals/utils/attachPinnedStyle.d.ts +2 -0
  313. package/internals/utils/attachPinnedStyle.js +9 -0
  314. package/internals/utils/getPinnedCellOffset.d.ts +3 -3
  315. package/internals/utils/getPinnedCellOffset.js +6 -7
  316. package/internals/utils/index.d.ts +1 -1
  317. package/internals/utils/index.js +2 -2
  318. package/internals/utils/propValidation.js +1 -1
  319. package/locales/arSD.js +2 -1
  320. package/locales/beBY.js +1 -1
  321. package/locales/bgBG.js +2 -1
  322. package/locales/csCZ.js +2 -1
  323. package/locales/daDK.js +2 -1
  324. package/locales/deDE.js +12 -13
  325. package/locales/elGR.js +2 -1
  326. package/locales/esES.js +12 -13
  327. package/locales/faIR.js +7 -7
  328. package/locales/fiFI.js +2 -1
  329. package/locales/frFR.js +2 -1
  330. package/locales/heIL.js +16 -17
  331. package/locales/hrHR.js +2 -1
  332. package/locales/huHU.js +2 -1
  333. package/locales/isIS.js +2 -1
  334. package/locales/itIT.js +2 -1
  335. package/locales/jaJP.js +2 -1
  336. package/locales/koKR.js +46 -49
  337. package/locales/nbNO.js +2 -1
  338. package/locales/nlNL.js +7 -7
  339. package/locales/nnNO.js +2 -1
  340. package/locales/plPL.js +2 -1
  341. package/locales/ptBR.js +12 -13
  342. package/locales/ptPT.js +12 -13
  343. package/locales/roRO.js +20 -21
  344. package/locales/ruRU.js +2 -1
  345. package/locales/skSK.js +2 -1
  346. package/locales/svSE.js +2 -1
  347. package/locales/trTR.js +14 -15
  348. package/locales/ukUA.js +2 -1
  349. package/locales/urPK.js +11 -11
  350. package/locales/viVN.js +2 -1
  351. package/locales/zhCN.js +12 -13
  352. package/locales/zhHK.js +2 -1
  353. package/locales/zhTW.js +2 -1
  354. package/material/index.js +58 -7
  355. package/models/api/gridApiCommon.d.ts +2 -2
  356. package/models/api/gridCoreApi.d.ts +7 -7
  357. package/models/api/gridDensityApi.d.ts +1 -1
  358. package/models/api/gridLocaleTextApi.d.ts +1 -1
  359. package/models/api/gridParamsApi.d.ts +29 -2
  360. package/models/api/gridStateApi.d.ts +2 -1
  361. package/models/api/index.d.ts +1 -1
  362. package/models/api/index.js +0 -1
  363. package/models/colDef/gridColDef.d.ts +34 -33
  364. package/models/controlStateItem.d.ts +2 -2
  365. package/models/events/gridEventLookup.d.ts +13 -1
  366. package/models/gridBaseSlots.d.ts +95 -0
  367. package/models/gridDataSource.d.ts +1 -1
  368. package/models/gridExport.d.ts +2 -2
  369. package/models/gridFilterInputComponent.d.ts +32 -0
  370. package/models/gridFilterOperator.d.ts +6 -4
  371. package/models/gridIconSlotsComponent.d.ts +5 -0
  372. package/models/gridSlotsComponent.d.ts +16 -1
  373. package/models/gridSlotsComponentsProps.d.ts +45 -9
  374. package/models/gridStateCommunity.d.ts +4 -0
  375. package/models/index.d.ts +1 -0
  376. package/models/props/DataGridProps.d.ts +12 -24
  377. package/modern/DataGrid/DataGrid.js +20 -38
  378. package/modern/DataGrid/useDataGridComponent.js +3 -3
  379. package/modern/DataGrid/useDataGridProps.js +3 -3
  380. package/modern/components/GridApiContext.js +2 -0
  381. package/modern/components/GridColumnHeaders.js +4 -4
  382. package/modern/components/GridConfigurationContext.js +2 -0
  383. package/modern/components/GridFooter.js +4 -4
  384. package/modern/components/GridHeaders.js +2 -2
  385. package/modern/components/GridLoadingOverlay.js +10 -8
  386. package/modern/components/GridNoResultsOverlay.js +4 -4
  387. package/modern/components/GridNoRowsOverlay.js +4 -4
  388. package/modern/components/GridPagination.js +7 -4
  389. package/modern/components/GridRow.js +60 -88
  390. package/modern/components/GridRowCount.js +3 -2
  391. package/modern/components/GridScrollArea.js +33 -24
  392. package/modern/components/GridSelectedRowCount.js +3 -2
  393. package/modern/components/GridSkeletonLoadingOverlay.js +23 -21
  394. package/modern/components/base/GridOverlays.js +2 -24
  395. package/modern/components/base/index.js +1 -2
  396. package/modern/components/cell/GridActionsCell.js +8 -1
  397. package/modern/components/cell/GridActionsCellItem.js +9 -8
  398. package/modern/components/cell/GridCell.js +49 -92
  399. package/modern/components/cell/GridEditDateCell.js +1 -1
  400. package/modern/components/cell/GridEditInputCell.js +73 -4
  401. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  402. package/modern/components/cell/GridSkeletonCell.js +1 -2
  403. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  404. package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  405. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
  406. package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  407. package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  408. package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  409. package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
  410. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
  411. package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
  412. package/modern/components/columnsManagement/GridColumnsManagement.js +50 -27
  413. package/modern/components/containers/GridFooterContainer.js +5 -3
  414. package/modern/components/containers/GridOverlay.js +5 -3
  415. package/modern/components/containers/GridRoot.js +29 -17
  416. package/modern/components/containers/GridRootStyles.js +163 -53
  417. package/modern/components/containers/GridToolbarContainer.js +3 -2
  418. package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
  419. package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
  420. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
  421. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
  422. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
  423. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  424. package/modern/components/panel/GridColumnsPanel.js +1 -2
  425. package/modern/components/panel/GridPanel.js +5 -3
  426. package/modern/components/panel/GridPanelContent.js +7 -3
  427. package/modern/components/panel/GridPanelFooter.js +4 -3
  428. package/modern/components/panel/GridPanelWrapper.js +5 -3
  429. package/modern/components/panel/filterPanel/GridFilterForm.js +22 -18
  430. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
  431. package/modern/components/panel/filterPanel/GridFilterInputDate.js +50 -31
  432. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
  433. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
  434. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
  435. package/modern/components/panel/filterPanel/GridFilterInputValue.js +63 -38
  436. package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
  437. package/modern/components/panel/filterPanel/index.js +1 -2
  438. package/modern/components/toolbar/GridToolbar.js +11 -5
  439. package/modern/components/toolbar/GridToolbarColumnsButton.js +12 -6
  440. package/modern/components/toolbar/GridToolbarDensitySelector.js +9 -11
  441. package/modern/components/toolbar/GridToolbarExport.js +2 -1
  442. package/modern/components/toolbar/GridToolbarExportContainer.js +6 -6
  443. package/modern/components/toolbar/GridToolbarFilterButton.js +20 -9
  444. package/modern/components/toolbar/GridToolbarQuickFilter.js +39 -31
  445. package/modern/components/virtualization/GridMainContainer.js +14 -5
  446. package/modern/components/virtualization/GridVirtualScrollbar.js +17 -17
  447. package/modern/components/virtualization/GridVirtualScroller.js +43 -21
  448. package/modern/components/virtualization/GridVirtualScrollerContent.js +15 -6
  449. package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  450. package/modern/constants/dataGridPropsDefaultValues.js +2 -4
  451. package/modern/constants/gridClasses.js +1 -1
  452. package/modern/constants/index.js +2 -1
  453. package/modern/constants/localeTextConstants.js +1 -1
  454. package/modern/constants/signature.js +10 -0
  455. package/modern/context/GridRootPropsContext.js +2 -0
  456. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  457. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
  458. package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
  459. package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  460. package/modern/hooks/core/useGridApiInitialization.js +3 -3
  461. package/modern/hooks/core/useGridStateInitialization.js +6 -5
  462. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
  463. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
  464. package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  465. package/modern/hooks/features/columnResize/useGridColumnResize.js +17 -10
  466. package/modern/hooks/features/columns/gridColumnsSelector.js +0 -12
  467. package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
  468. package/modern/hooks/features/columns/useGridColumns.js +9 -4
  469. package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
  470. package/modern/hooks/features/dimensions/index.js +1 -2
  471. package/modern/hooks/features/dimensions/useGridDimensions.js +104 -98
  472. package/modern/hooks/features/editing/gridEditingSelectors.js +12 -1
  473. package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
  474. package/modern/hooks/features/editing/useGridRowEditing.js +10 -11
  475. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  476. package/modern/hooks/features/filter/gridFilterSelector.js +8 -2
  477. package/modern/hooks/features/filter/gridFilterState.js +5 -0
  478. package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
  479. package/modern/hooks/features/filter/useGridFilter.js +10 -15
  480. package/modern/hooks/features/focus/useGridFocus.js +3 -2
  481. package/modern/hooks/features/index.js +1 -0
  482. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
  483. package/modern/hooks/features/keyboardNavigation/utils.js +0 -5
  484. package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
  485. package/modern/hooks/features/listView/index.js +1 -0
  486. package/modern/hooks/features/listView/useGridListView.js +2 -1
  487. package/modern/hooks/features/overlays/useGridOverlays.js +23 -3
  488. package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
  489. package/modern/hooks/features/pagination/gridPaginationUtils.js +1 -1
  490. package/modern/hooks/features/pagination/useGridPagination.js +6 -4
  491. package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
  492. package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
  493. package/modern/hooks/features/preferencesPanel/index.js +1 -1
  494. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
  495. package/modern/hooks/features/rowSelection/useGridRowSelection.js +11 -18
  496. package/modern/hooks/features/rowSelection/utils.js +4 -4
  497. package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
  498. package/modern/hooks/features/rows/gridRowsUtils.js +0 -25
  499. package/modern/hooks/features/rows/index.js +1 -1
  500. package/modern/hooks/features/rows/useGridParamsApi.js +33 -14
  501. package/modern/hooks/features/rows/useGridRowSpanning.js +97 -86
  502. package/modern/hooks/features/rows/useGridRows.js +27 -29
  503. package/modern/hooks/features/rows/useGridRowsMeta.js +36 -19
  504. package/modern/hooks/features/sorting/gridSortingSelector.js +21 -9
  505. package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
  506. package/modern/hooks/features/sorting/index.js +1 -1
  507. package/modern/hooks/features/sorting/useGridSorting.js +1 -1
  508. package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
  509. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
  510. package/modern/hooks/utils/index.js +1 -1
  511. package/modern/hooks/utils/useGridApiEventHandler.js +68 -75
  512. package/modern/hooks/utils/useGridApiRef.js +1 -1
  513. package/modern/hooks/utils/useGridSelector.js +29 -49
  514. package/modern/hooks/utils/useGridVisibleRows.js +5 -28
  515. package/modern/hooks/utils/useIsSSR.js +5 -0
  516. package/modern/index.js +1 -1
  517. package/modern/internals/constants.js +8 -1
  518. package/modern/internals/index.js +7 -4
  519. package/modern/internals/utils/attachPinnedStyle.js +9 -0
  520. package/modern/internals/utils/getPinnedCellOffset.js +6 -7
  521. package/modern/internals/utils/index.js +2 -2
  522. package/modern/internals/utils/propValidation.js +1 -1
  523. package/modern/locales/arSD.js +2 -1
  524. package/modern/locales/beBY.js +1 -1
  525. package/modern/locales/bgBG.js +2 -1
  526. package/modern/locales/csCZ.js +2 -1
  527. package/modern/locales/daDK.js +2 -1
  528. package/modern/locales/deDE.js +12 -13
  529. package/modern/locales/elGR.js +2 -1
  530. package/modern/locales/esES.js +12 -13
  531. package/modern/locales/faIR.js +7 -7
  532. package/modern/locales/fiFI.js +2 -1
  533. package/modern/locales/frFR.js +2 -1
  534. package/modern/locales/heIL.js +16 -17
  535. package/modern/locales/hrHR.js +2 -1
  536. package/modern/locales/huHU.js +2 -1
  537. package/modern/locales/isIS.js +2 -1
  538. package/modern/locales/itIT.js +2 -1
  539. package/modern/locales/jaJP.js +2 -1
  540. package/modern/locales/koKR.js +46 -49
  541. package/modern/locales/nbNO.js +2 -1
  542. package/modern/locales/nlNL.js +7 -7
  543. package/modern/locales/nnNO.js +2 -1
  544. package/modern/locales/plPL.js +2 -1
  545. package/modern/locales/ptBR.js +12 -13
  546. package/modern/locales/ptPT.js +12 -13
  547. package/modern/locales/roRO.js +20 -21
  548. package/modern/locales/ruRU.js +2 -1
  549. package/modern/locales/skSK.js +2 -1
  550. package/modern/locales/svSE.js +2 -1
  551. package/modern/locales/trTR.js +14 -15
  552. package/modern/locales/ukUA.js +2 -1
  553. package/modern/locales/urPK.js +11 -11
  554. package/modern/locales/viVN.js +2 -1
  555. package/modern/locales/zhCN.js +12 -13
  556. package/modern/locales/zhHK.js +2 -1
  557. package/modern/locales/zhTW.js +2 -1
  558. package/modern/material/index.js +58 -7
  559. package/modern/models/api/index.js +0 -1
  560. package/modern/models/gridBaseSlots.js +1 -0
  561. package/modern/models/gridFilterInputComponent.js +1 -0
  562. package/modern/utils/assert.js +3 -0
  563. package/modern/utils/cellBorderUtils.js +5 -5
  564. package/modern/utils/createSelector.js +1 -120
  565. package/modern/utils/domUtils.js +7 -2
  566. package/modern/utils/isJSDOM.js +1 -0
  567. package/modern/utils/roundToDecimalPlaces.js +3 -0
  568. package/modern/utils/rtlFlipSide.js +22 -0
  569. package/modern/utils/utils.js +6 -1
  570. package/node/DataGrid/DataGrid.js +18 -36
  571. package/node/DataGrid/useDataGridComponent.js +3 -3
  572. package/node/DataGrid/useDataGridProps.js +2 -2
  573. package/node/components/GridApiContext.js +1 -0
  574. package/node/components/GridColumnHeaders.js +4 -4
  575. package/node/components/GridConfigurationContext.js +1 -0
  576. package/node/components/GridFooter.js +4 -4
  577. package/node/components/GridHeaders.js +2 -2
  578. package/node/components/GridLoadingOverlay.js +10 -8
  579. package/node/components/GridNoResultsOverlay.js +4 -4
  580. package/node/components/GridNoRowsOverlay.js +4 -4
  581. package/node/components/GridPagination.js +7 -4
  582. package/node/components/GridRow.js +56 -85
  583. package/node/components/GridRowCount.js +3 -2
  584. package/node/components/GridScrollArea.js +32 -24
  585. package/node/components/GridSelectedRowCount.js +3 -2
  586. package/node/components/GridSkeletonLoadingOverlay.js +23 -21
  587. package/node/components/base/GridOverlays.js +2 -24
  588. package/node/components/base/index.js +0 -11
  589. package/node/components/cell/GridActionsCell.js +8 -1
  590. package/node/components/cell/GridActionsCellItem.js +7 -8
  591. package/node/components/cell/GridCell.js +48 -91
  592. package/node/components/cell/GridEditDateCell.js +1 -1
  593. package/node/components/cell/GridEditInputCell.js +73 -4
  594. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  595. package/node/components/cell/GridSkeletonCell.js +1 -2
  596. package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  597. package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  598. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
  599. package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  600. package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  601. package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  602. package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
  603. package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
  604. package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
  605. package/node/components/columnsManagement/GridColumnsManagement.js +50 -27
  606. package/node/components/containers/GridFooterContainer.js +5 -3
  607. package/node/components/containers/GridOverlay.js +5 -3
  608. package/node/components/containers/GridRoot.js +27 -15
  609. package/node/components/containers/GridRootStyles.js +163 -53
  610. package/node/components/containers/GridToolbarContainer.js +3 -2
  611. package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
  612. package/node/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
  613. package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
  614. package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
  615. package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
  616. package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  617. package/node/components/panel/GridColumnsPanel.js +1 -2
  618. package/node/components/panel/GridPanel.js +5 -3
  619. package/node/components/panel/GridPanelContent.js +7 -3
  620. package/node/components/panel/GridPanelFooter.js +5 -4
  621. package/node/components/panel/GridPanelWrapper.js +5 -3
  622. package/node/components/panel/filterPanel/GridFilterForm.js +22 -18
  623. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +42 -33
  624. package/node/components/panel/filterPanel/GridFilterInputDate.js +49 -30
  625. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
  626. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
  627. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
  628. package/node/components/panel/filterPanel/GridFilterInputValue.js +62 -37
  629. package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
  630. package/node/components/panel/filterPanel/index.js +7 -23
  631. package/node/components/toolbar/GridToolbar.js +11 -5
  632. package/node/components/toolbar/GridToolbarColumnsButton.js +12 -6
  633. package/node/components/toolbar/GridToolbarDensitySelector.js +9 -11
  634. package/node/components/toolbar/GridToolbarExport.js +2 -1
  635. package/node/components/toolbar/GridToolbarExportContainer.js +6 -6
  636. package/node/components/toolbar/GridToolbarFilterButton.js +20 -9
  637. package/node/components/toolbar/GridToolbarQuickFilter.js +39 -31
  638. package/node/components/virtualization/GridMainContainer.js +14 -5
  639. package/node/components/virtualization/GridVirtualScrollbar.js +17 -17
  640. package/node/components/virtualization/GridVirtualScroller.js +43 -21
  641. package/node/components/virtualization/GridVirtualScrollerContent.js +15 -6
  642. package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  643. package/node/constants/dataGridPropsDefaultValues.js +2 -4
  644. package/node/constants/gridClasses.js +1 -1
  645. package/node/constants/index.js +11 -0
  646. package/node/constants/localeTextConstants.js +1 -1
  647. package/node/constants/signature.js +16 -0
  648. package/node/context/GridRootPropsContext.js +1 -0
  649. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  650. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
  651. package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
  652. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  653. package/node/hooks/core/useGridApiInitialization.js +4 -4
  654. package/node/hooks/core/useGridStateInitialization.js +6 -5
  655. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +37 -76
  656. package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
  657. package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  658. package/node/hooks/features/columnResize/useGridColumnResize.js +17 -10
  659. package/node/hooks/features/columns/gridColumnsSelector.js +1 -13
  660. package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
  661. package/node/hooks/features/columns/useGridColumns.js +9 -4
  662. package/node/hooks/features/dimensions/gridDimensionsSelectors.js +38 -2
  663. package/node/hooks/features/dimensions/index.js +13 -11
  664. package/node/hooks/features/dimensions/useGridDimensions.js +102 -96
  665. package/node/hooks/features/editing/gridEditingSelectors.js +12 -2
  666. package/node/hooks/features/editing/useGridCellEditing.js +3 -3
  667. package/node/hooks/features/editing/useGridRowEditing.js +8 -9
  668. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  669. package/node/hooks/features/filter/gridFilterSelector.js +8 -2
  670. package/node/hooks/features/filter/gridFilterState.js +6 -1
  671. package/node/hooks/features/filter/gridFilterUtils.js +3 -3
  672. package/node/hooks/features/filter/useGridFilter.js +9 -14
  673. package/node/hooks/features/focus/useGridFocus.js +3 -2
  674. package/node/hooks/features/index.js +11 -0
  675. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -15
  676. package/node/hooks/features/keyboardNavigation/utils.js +0 -6
  677. package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
  678. package/node/hooks/features/listView/index.js +16 -0
  679. package/node/hooks/features/listView/useGridListView.js +2 -1
  680. package/node/hooks/features/overlays/useGridOverlays.js +25 -3
  681. package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
  682. package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
  683. package/node/hooks/features/pagination/useGridPagination.js +6 -4
  684. package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
  685. package/node/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +9 -2
  686. package/node/hooks/features/preferencesPanel/index.js +11 -10
  687. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
  688. package/node/hooks/features/rowSelection/useGridRowSelection.js +12 -19
  689. package/node/hooks/features/rowSelection/utils.js +5 -5
  690. package/node/hooks/features/rows/gridRowsSelector.js +2 -3
  691. package/node/hooks/features/rows/gridRowsUtils.js +0 -26
  692. package/node/hooks/features/rows/index.js +0 -7
  693. package/node/hooks/features/rows/useGridParamsApi.js +33 -14
  694. package/node/hooks/features/rows/useGridRowSpanning.js +95 -84
  695. package/node/hooks/features/rows/useGridRows.js +27 -29
  696. package/node/hooks/features/rows/useGridRowsMeta.js +36 -19
  697. package/node/hooks/features/sorting/gridSortingSelector.js +22 -10
  698. package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
  699. package/node/hooks/features/sorting/index.js +24 -16
  700. package/node/hooks/features/sorting/useGridSorting.js +1 -1
  701. package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +40 -0
  702. package/node/hooks/features/virtualization/useGridVirtualScroller.js +210 -119
  703. package/node/hooks/utils/index.js +21 -11
  704. package/node/hooks/utils/useGridApiEventHandler.js +71 -78
  705. package/node/hooks/utils/useGridApiRef.js +1 -1
  706. package/node/hooks/utils/useGridSelector.js +31 -52
  707. package/node/hooks/utils/useGridVisibleRows.js +3 -28
  708. package/node/hooks/utils/useIsSSR.js +12 -0
  709. package/node/index.js +1 -1
  710. package/node/internals/constants.js +9 -2
  711. package/node/internals/index.js +57 -27
  712. package/node/internals/utils/attachPinnedStyle.js +15 -0
  713. package/node/internals/utils/getPinnedCellOffset.js +6 -7
  714. package/node/internals/utils/index.js +11 -11
  715. package/node/internals/utils/propValidation.js +2 -2
  716. package/node/locales/arSD.js +2 -1
  717. package/node/locales/beBY.js +1 -1
  718. package/node/locales/bgBG.js +2 -1
  719. package/node/locales/csCZ.js +2 -1
  720. package/node/locales/daDK.js +2 -1
  721. package/node/locales/deDE.js +12 -13
  722. package/node/locales/elGR.js +2 -1
  723. package/node/locales/esES.js +12 -13
  724. package/node/locales/faIR.js +7 -7
  725. package/node/locales/fiFI.js +2 -1
  726. package/node/locales/frFR.js +2 -1
  727. package/node/locales/heIL.js +16 -17
  728. package/node/locales/hrHR.js +2 -1
  729. package/node/locales/huHU.js +2 -1
  730. package/node/locales/isIS.js +2 -1
  731. package/node/locales/itIT.js +2 -1
  732. package/node/locales/jaJP.js +2 -1
  733. package/node/locales/koKR.js +46 -49
  734. package/node/locales/nbNO.js +2 -1
  735. package/node/locales/nlNL.js +7 -7
  736. package/node/locales/nnNO.js +2 -1
  737. package/node/locales/plPL.js +2 -1
  738. package/node/locales/ptBR.js +12 -13
  739. package/node/locales/ptPT.js +12 -13
  740. package/node/locales/roRO.js +20 -21
  741. package/node/locales/ruRU.js +2 -1
  742. package/node/locales/skSK.js +2 -1
  743. package/node/locales/svSE.js +2 -1
  744. package/node/locales/trTR.js +14 -15
  745. package/node/locales/ukUA.js +2 -1
  746. package/node/locales/urPK.js +11 -11
  747. package/node/locales/viVN.js +2 -1
  748. package/node/locales/zhCN.js +12 -13
  749. package/node/locales/zhHK.js +2 -1
  750. package/node/locales/zhTW.js +2 -1
  751. package/node/material/index.js +59 -7
  752. package/node/models/api/index.js +0 -11
  753. package/node/models/gridFilterInputComponent.js +5 -0
  754. package/node/utils/assert.js +9 -0
  755. package/node/utils/cellBorderUtils.js +5 -5
  756. package/node/utils/createSelector.js +4 -125
  757. package/node/utils/domUtils.js +7 -2
  758. package/node/utils/isJSDOM.js +7 -0
  759. package/node/utils/roundToDecimalPlaces.js +9 -0
  760. package/node/utils/rtlFlipSide.js +29 -0
  761. package/node/utils/utils.js +8 -1
  762. package/package.json +4 -3
  763. package/themeAugmentation/overrides.d.ts +10 -5
  764. package/utils/assert.d.ts +2 -0
  765. package/utils/assert.js +3 -0
  766. package/utils/cellBorderUtils.d.ts +3 -3
  767. package/utils/cellBorderUtils.js +5 -5
  768. package/utils/createSelector.d.ts +7 -19
  769. package/utils/createSelector.js +1 -120
  770. package/utils/domUtils.js +7 -2
  771. package/utils/getPublicApiRef.d.ts +2 -1
  772. package/utils/isJSDOM.d.ts +1 -0
  773. package/utils/isJSDOM.js +1 -0
  774. package/utils/keyboardUtils.d.ts +1 -1
  775. package/utils/roundToDecimalPlaces.d.ts +1 -0
  776. package/utils/roundToDecimalPlaces.js +3 -0
  777. package/utils/rtlFlipSide.d.ts +2 -0
  778. package/utils/rtlFlipSide.js +22 -0
  779. package/utils/utils.d.ts +1 -0
  780. package/utils/utils.js +6 -1
  781. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
  782. package/internals/utils/useProps.d.ts +0 -1
  783. package/internals/utils/useProps.js +0 -24
  784. package/joy/icons.d.ts +0 -32
  785. package/joy/icons.js +0 -431
  786. package/joy/index.d.ts +0 -2
  787. package/joy/index.js +0 -2
  788. package/joy/joySlots.d.ts +0 -3
  789. package/joy/joySlots.js +0 -389
  790. package/joy/package.json +0 -6
  791. package/modern/internals/utils/useProps.js +0 -24
  792. package/modern/joy/icons.js +0 -431
  793. package/modern/joy/index.js +0 -2
  794. package/modern/joy/joySlots.js +0 -389
  795. package/node/internals/utils/useProps.js +0 -30
  796. package/node/joy/icons.js +0 -439
  797. package/node/joy/index.js +0 -13
  798. package/node/joy/joySlots.js +0 -397
  799. /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
  800. /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
  801. /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
- import { GridOverlayType } from '../../hooks/features/overlays/useGridOverlays';
3
2
  import { GridLoadingOverlayVariant } from '../GridLoadingOverlay';
3
+ import { GridSlotsComponent } from '../../models';
4
+ export type GridOverlayType = keyof Pick<GridSlotsComponent, 'noRowsOverlay' | 'noResultsOverlay' | 'loadingOverlay'> | null;
4
5
  interface GridOverlaysProps {
5
6
  overlayType: GridOverlayType;
6
7
  loadingOverlayVariant: GridLoadingOverlayVariant | null;
7
8
  }
8
- export declare function GridOverlays(props: GridOverlaysProps): React.JSX.Element | null;
9
- export declare namespace GridOverlays {
9
+ export declare function GridOverlayWrapper(props: React.PropsWithChildren<GridOverlaysProps>): React.JSX.Element;
10
+ export declare namespace GridOverlayWrapper {
10
11
  var propTypes: any;
11
12
  }
12
13
  export {};
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
52
52
  };
53
53
  return composeClasses(slots, getDataGridUtilityClass, classes);
54
54
  };
55
- function GridOverlayWrapper(props) {
55
+ export function GridOverlayWrapper(props) {
56
56
  const apiRef = useGridApiContext();
57
57
  const rootProps = useGridRootProps();
58
58
  const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
@@ -83,26 +83,4 @@ process.env.NODE_ENV !== "production" ? GridOverlayWrapper.propTypes = {
83
83
  // ----------------------------------------------------------------------
84
84
  loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
85
85
  overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay'])
86
- } : void 0;
87
- process.env.NODE_ENV !== "production" ? GridOverlays.propTypes = {
88
- // ----------------------------- Warning --------------------------------
89
- // | These PropTypes are generated from the TypeScript type definitions |
90
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
91
- // ----------------------------------------------------------------------
92
- loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
93
- overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay'])
94
- } : void 0;
95
- export function GridOverlays(props) {
96
- const {
97
- overlayType
98
- } = props;
99
- const rootProps = useGridRootProps();
100
- if (!overlayType) {
101
- return null;
102
- }
103
- const Overlay = rootProps.slots?.[overlayType];
104
- const overlayProps = rootProps.slotProps?.[overlayType];
105
- return /*#__PURE__*/_jsx(GridOverlayWrapper, _extends({}, props, {
106
- children: /*#__PURE__*/_jsx(Overlay, _extends({}, overlayProps))
107
- }));
108
- }
86
+ } : void 0;
@@ -1,3 +1,2 @@
1
1
  export * from './GridBody';
2
2
  export * from './GridFooterPlaceholder';
3
- export * from './GridOverlays';
@@ -1,3 +1,2 @@
1
1
  export * from "./GridBody.js";
2
- export * from "./GridFooterPlaceholder.js";
3
- export * from "./GridOverlays.js";
2
+ export * from "./GridFooterPlaceholder.js";
@@ -89,6 +89,13 @@ function GridActionsCell(props) {
89
89
  const hideMenu = () => {
90
90
  setOpen(false);
91
91
  };
92
+ const toggleMenu = () => {
93
+ if (open) {
94
+ hideMenu();
95
+ } else {
96
+ showMenu();
97
+ }
98
+ };
92
99
  const handleTouchRippleRef = index => instance => {
93
100
  touchRippleRefs.current[index] = instance;
94
101
  };
@@ -159,7 +166,7 @@ function GridActionsCell(props) {
159
166
  "aria-controls": open ? menuId : undefined,
160
167
  role: "menuitem",
161
168
  size: "small",
162
- onClick: showMenu,
169
+ onClick: toggleMenu,
163
170
  touchRippleRef: handleTouchRippleRef(buttonId),
164
171
  tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
165
172
  }, rootProps.slotProps?.baseIconButton, {
@@ -1,16 +1,15 @@
1
1
  import * as React from 'react';
2
- import { IconButtonProps } from '@mui/material/IconButton';
3
- import { MenuItemProps } from '@mui/material/MenuItem';
2
+ import { GridSlotProps } from '../../models/gridSlotsComponentsProps';
4
3
  interface GridActionsCellItemCommonProps {
5
4
  label: string;
6
- icon?: React.ReactElement;
5
+ icon?: React.ReactElement<any>;
7
6
  /** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
8
7
  component?: React.ElementType;
9
8
  }
10
9
  export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
11
10
  showInMenu?: false;
12
- icon: React.ReactElement;
13
- } & Omit<IconButtonProps, 'component'>) | ({
11
+ icon: React.ReactElement<any>;
12
+ } & Omit<GridSlotProps['baseIconButton'], 'component'>) | ({
14
13
  showInMenu: true;
15
14
  /**
16
15
  * If false, the menu will not close when this item is clicked.
@@ -18,11 +17,17 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
18
17
  */
19
18
  closeMenuOnClick?: boolean;
20
19
  closeMenu?: () => void;
21
- } & Omit<MenuItemProps, 'component'>));
22
- declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
20
+ } & Omit<GridSlotProps['baseMenuItem'], 'component'>));
21
+ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
23
22
  showInMenu?: false;
24
- icon: React.ReactElement;
25
- } & Omit<IconButtonProps, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
23
+ icon: React.ReactElement<any>;
24
+ } & Omit<Omit<import("../../models/gridBaseSlots").ButtonProps, "startIcon"> & {
25
+ label?: string;
26
+ color?: "default" | "inherit" | "primary";
27
+ edge?: "start" | "end" | false;
28
+ } & import("../..").BaseIconButtonPropsOverrides & import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "tabIndex" | "color" | "style" | "className" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & {
29
+ component?: React.ElementType;
30
+ }, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
26
31
  showInMenu: true;
27
32
  /**
28
33
  * If false, the menu will not close when this item is clicked.
@@ -30,5 +35,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridAct
30
35
  */
31
36
  closeMenuOnClick?: boolean;
32
37
  closeMenu?: () => void;
33
- } & Omit<MenuItemProps, "component">, "ref">) & React.RefAttributes<HTMLElement>>;
38
+ } & Omit<import("../../models/gridBaseSlots").MenuItemProps & import("../..").BaseMenuItemPropsOverrides & import("@mui/material").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children" | "tabIndex" | "style" | "autoFocus" | "className" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters" | "divider" | "selected"> & {
39
+ component?: React.ElementType;
40
+ }, "component">, "ref">) & React.RefAttributes<HTMLElement>>;
34
41
  export { GridActionsCellItem };
@@ -4,10 +4,12 @@ const _excluded = ["label", "icon", "showInMenu", "onClick"],
4
4
  _excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import ListItemIcon from '@mui/material/ListItemIcon';
7
+ import { forwardRef } from '@mui/x-internals/forwardRef';
8
8
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
- const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
9
+
10
+ // FIXME(v8:romgrk): Make parametric
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ const GridActionsCellItem = forwardRef((props, ref) => {
11
13
  const rootProps = useGridRootProps();
12
14
  if (!props.showInMenu) {
13
15
  const {
@@ -20,13 +22,13 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
20
22
  onClick?.(event);
21
23
  };
22
24
  return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
23
- ref: ref,
24
25
  size: "small",
25
26
  role: "menuitem",
26
27
  "aria-label": label
27
28
  }, other, {
28
29
  onClick: handleClick
29
30
  }, rootProps.slotProps?.baseIconButton, {
31
+ ref: ref,
30
32
  children: /*#__PURE__*/React.cloneElement(icon, {
31
33
  fontSize: 'small'
32
34
  })
@@ -46,13 +48,12 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
46
48
  closeMenu?.();
47
49
  }
48
50
  };
49
- return /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, _extends({
51
+ return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({
50
52
  ref: ref
51
53
  }, other, {
52
54
  onClick: handleClick,
53
- children: [icon && /*#__PURE__*/_jsx(ListItemIcon, {
54
- children: icon
55
- }), label]
55
+ iconStart: icon,
56
+ children: label
56
57
  }));
57
58
  });
58
59
  process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
@@ -1,13 +1,9 @@
1
1
  import * as React from 'react';
2
- import { GridRowId, GridEditCellProps } from '../../models';
3
- import { GridColDef, GridAlignment } from '../../models/colDef/gridColDef';
2
+ import { GridRowId } from '../../models';
3
+ import { GridAlignment, GridStateColDef } from '../../models/colDef/gridColDef';
4
+ import { GridRowModel, GridTreeNode } from '../../models/gridRows';
4
5
  import { GridPinnedColumnPosition } from '../../hooks/features/columns/gridColumnsInterfaces';
5
- export declare enum PinnedPosition {
6
- NONE = 0,
7
- LEFT = 1,
8
- RIGHT = 2,
9
- VIRTUAL = 3
10
- }
6
+ import { PinnedColumnPosition } from '../../internals/constants';
11
7
  export declare const gridPinnedColumnPositionLookup: {
12
8
  1: GridPinnedColumnPosition;
13
9
  2: GridPinnedColumnPosition;
@@ -18,18 +14,18 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
18
14
  align: GridAlignment;
19
15
  className?: string;
20
16
  colIndex: number;
21
- column: GridColDef;
17
+ column: GridStateColDef;
18
+ row: GridRowModel;
22
19
  rowId: GridRowId;
20
+ rowNode: GridTreeNode;
23
21
  width: number;
24
22
  colSpan?: number;
25
23
  disableDragEvents?: boolean;
26
24
  isNotVisible: boolean;
27
- editCellState: GridEditCellProps<any> | null;
28
- pinnedOffset: number;
29
- pinnedPosition: PinnedPosition;
30
- sectionIndex: number;
31
- sectionLength: number;
32
- gridHasFiller: boolean;
25
+ pinnedOffset?: number;
26
+ pinnedPosition: PinnedColumnPosition;
27
+ showRightBorder: boolean;
28
+ showLeftBorder: boolean;
33
29
  onClick?: React.MouseEventHandler<HTMLDivElement>;
34
30
  onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
35
31
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
@@ -46,23 +42,23 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
46
42
  style?: React.CSSProperties;
47
43
  [x: `data-${string}`]: string;
48
44
  };
49
- declare const MemoizedGridCell: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
45
+ declare const MemoizedGridCell: React.ForwardRefExoticComponent<GridCellProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
50
46
  [x: `data-${string}`]: string;
51
47
  align: GridAlignment;
52
48
  className?: string;
53
49
  colIndex: number;
54
- column: GridColDef;
50
+ column: GridStateColDef;
51
+ row: GridRowModel;
55
52
  rowId: GridRowId;
53
+ rowNode: GridTreeNode;
56
54
  width: number;
57
55
  colSpan?: number;
58
56
  disableDragEvents?: boolean;
59
57
  isNotVisible: boolean;
60
- editCellState: GridEditCellProps<any> | null;
61
- pinnedOffset: number;
62
- pinnedPosition: PinnedPosition;
63
- sectionIndex: number;
64
- sectionLength: number;
65
- gridHasFiller: boolean;
58
+ pinnedOffset?: number;
59
+ pinnedPosition: PinnedColumnPosition;
60
+ showRightBorder: boolean;
61
+ showLeftBorder: boolean;
66
62
  onClick?: React.MouseEventHandler<HTMLDivElement>;
67
63
  onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
68
64
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "sectionIndex", "sectionLength", "gridHasFiller", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
3
+ const _excluded = ["column", "row", "rowId", "rowNode", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "showRightBorder", "showLeftBorder", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
4
4
  _excluded2 = ["changeReason", "unstable_updateValueOnRender"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
@@ -8,54 +8,25 @@ import clsx from 'clsx';
8
8
  import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';
9
9
  import { fastMemo } from '@mui/x-internals/fastMemo';
10
10
  import { useRtl } from '@mui/system/RtlProvider';
11
+ import { forwardRef } from '@mui/x-internals/forwardRef';
11
12
  import { doesSupportPreventScroll } from "../../utils/doesSupportPreventScroll.js";
12
13
  import { getDataGridUtilityClass, gridClasses } from "../../constants/gridClasses.js";
13
14
  import { GridCellModes } from "../../models/index.js";
14
- import { useGridSelector, objectShallowCompare } from "../../hooks/utils/useGridSelector.js";
15
- import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
15
+ import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
16
16
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
17
- import { gridFocusCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
18
- import { MissingRowIdError } from "../../hooks/features/rows/useGridParamsApi.js";
19
- import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../utils/cellBorderUtils.js";
17
+ import { gridFocusCellSelector, gridTabIndexCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
20
18
  import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
19
+ import { PinnedColumnPosition } from "../../internals/constants.js";
21
20
  import { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from "../../hooks/features/rows/gridRowSpanningSelectors.js";
21
+ import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
22
+ import { gridEditCellStateSelector } from "../../hooks/features/editing/gridEditingSelectors.js";
23
+ import { attachPinnedStyle } from "../../internals/utils/index.js";
22
24
  import { jsx as _jsx } from "react/jsx-runtime";
23
- export let PinnedPosition = /*#__PURE__*/function (PinnedPosition) {
24
- PinnedPosition[PinnedPosition["NONE"] = 0] = "NONE";
25
- PinnedPosition[PinnedPosition["LEFT"] = 1] = "LEFT";
26
- PinnedPosition[PinnedPosition["RIGHT"] = 2] = "RIGHT";
27
- PinnedPosition[PinnedPosition["VIRTUAL"] = 3] = "VIRTUAL";
28
- return PinnedPosition;
29
- }({});
30
25
  export const gridPinnedColumnPositionLookup = {
31
- [PinnedPosition.LEFT]: GridPinnedColumnPosition.LEFT,
32
- [PinnedPosition.RIGHT]: GridPinnedColumnPosition.RIGHT,
33
- [PinnedPosition.NONE]: undefined,
34
- [PinnedPosition.VIRTUAL]: undefined
35
- };
36
- const EMPTY_CELL_PARAMS = {
37
- id: -1,
38
- field: '__unset__',
39
- row: {},
40
- rowNode: {
41
- id: -1,
42
- depth: 0,
43
- type: 'leaf',
44
- parent: -1,
45
- groupingKey: null
46
- },
47
- colDef: {
48
- type: 'string',
49
- field: '__unset__',
50
- computedWidth: 0
51
- },
52
- cellMode: GridCellModes.View,
53
- hasFocus: false,
54
- tabIndex: -1,
55
- value: null,
56
- formattedValue: '__unset__',
57
- isEditable: false,
58
- api: {}
26
+ [PinnedColumnPosition.LEFT]: GridPinnedColumnPosition.LEFT,
27
+ [PinnedColumnPosition.RIGHT]: GridPinnedColumnPosition.RIGHT,
28
+ [PinnedColumnPosition.NONE]: undefined,
29
+ [PinnedColumnPosition.VIRTUAL]: undefined
59
30
  };
60
31
  const useUtilityClasses = ownerState => {
61
32
  const {
@@ -69,7 +40,7 @@ const useUtilityClasses = ownerState => {
69
40
  classes
70
41
  } = ownerState;
71
42
  const slots = {
72
- root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
43
+ root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
73
44
  };
74
45
  return composeClasses(slots, getDataGridUtilityClass, classes);
75
46
  };
@@ -77,11 +48,12 @@ let warnedOnce = false;
77
48
 
78
49
  // TODO(v7): Removing the wrapper will break the docs performance visualization demo.
79
50
 
80
- const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
51
+ const GridCell = forwardRef(function GridCell(props, ref) {
81
52
  const {
82
53
  column,
54
+ row,
83
55
  rowId,
84
- editCellState,
56
+ rowNode,
85
57
  align,
86
58
  colIndex,
87
59
  width,
@@ -92,9 +64,8 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
92
64
  isNotVisible,
93
65
  pinnedOffset,
94
66
  pinnedPosition,
95
- sectionIndex,
96
- sectionLength,
97
- gridHasFiller,
67
+ showRightBorder,
68
+ showLeftBorder,
98
69
  onClick,
99
70
  onDoubleClick,
100
71
  onMouseDown,
@@ -106,25 +77,29 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
106
77
  onDragOver
107
78
  } = props,
108
79
  other = _objectWithoutPropertiesLoose(props, _excluded);
109
- const apiRef = useGridApiContext();
80
+ const apiRef = useGridPrivateApiContext();
110
81
  const rootProps = useGridRootProps();
111
82
  const isRtl = useRtl();
112
83
  const field = column.field;
113
- const cellParams = useGridSelector(apiRef, () => {
114
- // This is required because `.getCellParams` tries to get the `state.rows.tree` entry
115
- // associated with `rowId`/`fieldId`, but this selector runs after the state has been
116
- // updated, while `rowId`/`fieldId` reference an entry in the old state.
117
- try {
118
- const result = apiRef.current.getCellParams(rowId, field);
119
- result.api = apiRef.current;
120
- return result;
121
- } catch (error) {
122
- if (error instanceof MissingRowIdError) {
123
- return EMPTY_CELL_PARAMS;
124
- }
125
- throw error;
126
- }
127
- }, objectShallowCompare);
84
+ const editCellState = useGridSelector(apiRef, gridEditCellStateSelector, {
85
+ rowId,
86
+ field
87
+ });
88
+ const cellMode = editCellState ? GridCellModes.Edit : GridCellModes.View;
89
+ const cellParams = apiRef.current.getCellParamsForRow(rowId, field, row, {
90
+ colDef: column,
91
+ cellMode,
92
+ rowNode: rowNode,
93
+ tabIndex: useGridSelector(apiRef, () => {
94
+ const cellTabIndex = gridTabIndexCellSelector(apiRef);
95
+ return cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === rowId ? 0 : -1;
96
+ }),
97
+ hasFocus: useGridSelector(apiRef, () => {
98
+ const focus = gridFocusCellSelector(apiRef);
99
+ return focus?.id === rowId && focus.field === field;
100
+ })
101
+ });
102
+ cellParams.api = apiRef.current;
128
103
  const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
129
104
  id: rowId,
130
105
  field
@@ -132,7 +107,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
132
107
  const hiddenCells = useGridSelector(apiRef, gridRowSpanningHiddenCellsSelector);
133
108
  const spannedCells = useGridSelector(apiRef, gridRowSpanningSpannedCellsSelector);
134
109
  const {
135
- cellMode,
136
110
  hasFocus,
137
111
  isEditable = false,
138
112
  value
@@ -164,9 +138,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
164
138
  const handleRef = useForkRef(ref, cellRef);
165
139
  const focusElementRef = React.useRef(null);
166
140
  const isSelectionMode = rootProps.cellSelection ?? false;
167
- const position = gridPinnedColumnPositionLookup[pinnedPosition];
168
- const showLeftBorder = shouldCellShowLeftBorder(position, sectionIndex);
169
- const showRightBorder = shouldCellShowRightBorder(position, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
170
141
  const ownerState = {
171
142
  align,
172
143
  showLeftBorder,
@@ -211,21 +182,15 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
211
182
  padding: 0,
212
183
  opacity: 0,
213
184
  width: 0,
185
+ height: 0,
214
186
  border: 0
215
187
  };
216
188
  }
217
- const cellStyle = _extends({
189
+ const cellStyle = attachPinnedStyle(_extends({
218
190
  '--width': `${width}px`
219
- }, styleProp);
220
- const isLeftPinned = pinnedPosition === PinnedPosition.LEFT;
221
- const isRightPinned = pinnedPosition === PinnedPosition.RIGHT;
222
- if (isLeftPinned || isRightPinned) {
223
- let side = isLeftPinned ? 'left' : 'right';
224
- if (isRtl) {
225
- side = isLeftPinned ? 'right' : 'left';
226
- }
227
- cellStyle[side] = pinnedOffset;
228
- }
191
+ }, styleProp), isRtl, pinnedPosition, pinnedOffset);
192
+ const isLeftPinned = pinnedPosition === PinnedColumnPosition.LEFT;
193
+ const isRightPinned = pinnedPosition === PinnedColumnPosition.RIGHT;
229
194
  if (rowSpan > 1) {
230
195
  cellStyle.height = `calc(var(--height) * ${rowSpan})`;
231
196
  cellStyle.zIndex = 5;
@@ -263,9 +228,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
263
228
  }, style)
264
229
  });
265
230
  }
266
- if (cellParams === EMPTY_CELL_PARAMS) {
267
- return null;
268
- }
269
231
  let handleFocus = other.onFocus;
270
232
  if (process.env.NODE_ENV === 'test' && rootProps.experimentalFeatures?.warnIfFocusStateIsNotSynced) {
271
233
  handleFocus = event => {
@@ -316,7 +278,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
316
278
  onDragOver: publish('cellDragOver', onDragOver)
317
279
  };
318
280
  return /*#__PURE__*/_jsx("div", _extends({
319
- ref: handleRef,
320
281
  className: clsx(classes.root, classNames, className),
321
282
  role: "gridcell",
322
283
  "data-field": field,
@@ -336,6 +297,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
336
297
  onKeyUp: publish('cellKeyUp', onKeyUp)
337
298
  }, draggableEventHandlers, other, {
338
299
  onFocus: handleFocus,
300
+ ref: handleRef,
339
301
  children: children
340
302
  }));
341
303
  });
@@ -349,19 +311,14 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
349
311
  colSpan: PropTypes.number,
350
312
  column: PropTypes.object.isRequired,
351
313
  disableDragEvents: PropTypes.bool,
352
- editCellState: PropTypes.shape({
353
- changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
354
- isProcessingProps: PropTypes.bool,
355
- isValidating: PropTypes.bool,
356
- value: PropTypes.any
357
- }),
358
- gridHasFiller: PropTypes.bool.isRequired,
359
314
  isNotVisible: PropTypes.bool.isRequired,
360
- pinnedOffset: PropTypes.number.isRequired,
315
+ pinnedOffset: PropTypes.number,
361
316
  pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]).isRequired,
317
+ row: PropTypes.object.isRequired,
362
318
  rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
363
- sectionIndex: PropTypes.number.isRequired,
364
- sectionLength: PropTypes.number.isRequired,
319
+ rowNode: PropTypes.object.isRequired,
320
+ showLeftBorder: PropTypes.bool.isRequired,
321
+ showRightBorder: PropTypes.bool.isRequired,
365
322
  width: PropTypes.number.isRequired
366
323
  } : void 0;
367
324
  const MemoizedGridCell = fastMemo(GridCell);
@@ -35,7 +35,7 @@ function GridEditDateCell(props) {
35
35
  other = _objectWithoutPropertiesLoose(props, _excluded);
36
36
  const isDateTime = colDef.type === 'dateTime';
37
37
  const apiRef = useGridApiContext();
38
- const inputRef = React.useRef();
38
+ const inputRef = React.useRef(null);
39
39
  const valueTransformed = React.useMemo(() => {
40
40
  let parsedDate;
41
41
  if (valueProp == null) {
@@ -11,6 +11,6 @@ export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<I
11
11
  */
12
12
  onValueChange?: (event: React.ChangeEvent<HTMLInputElement>, newValue: string) => Promise<void> | void;
13
13
  }
14
- declare const GridEditInputCell: React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
14
+ declare const GridEditInputCell: React.ForwardRefExoticComponent<GridEditInputCellProps> | React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
15
15
  export { GridEditInputCell };
16
16
  export declare const renderEditInputCell: (params: GridEditInputCellProps) => React.JSX.Element;
@@ -2,9 +2,11 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "isValidating", "debounceMs", "isProcessingProps", "onValueChange"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import InputBase from '@mui/material/InputBase';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
8
10
  import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
9
11
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
10
12
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
@@ -31,7 +33,7 @@ const GridEditInputCellRoot = styled(InputBase, {
31
33
  height: '100%'
32
34
  }
33
35
  }));
34
- const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
36
+ const GridEditInputCell = forwardRef((props, ref) => {
35
37
  const rootProps = useGridRootProps();
36
38
  const {
37
39
  id,
@@ -45,7 +47,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
45
47
  } = props,
46
48
  other = _objectWithoutPropertiesLoose(props, _excluded);
47
49
  const apiRef = useGridApiContext();
48
- const inputRef = React.useRef();
50
+ const inputRef = React.useRef(null);
49
51
  const [valueState, setValueState] = React.useState(value);
50
52
  const classes = useUtilityClasses(rootProps);
51
53
  const handleChange = React.useCallback(async event => {
@@ -79,7 +81,6 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
79
81
  }
80
82
  }, [hasFocus]);
81
83
  return /*#__PURE__*/_jsx(GridEditInputCellRoot, _extends({
82
- ref: ref,
83
84
  inputRef: inputRef,
84
85
  className: classes.root,
85
86
  ownerState: rootProps,
@@ -91,7 +92,75 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
91
92
  fontSize: "small",
92
93
  color: "action"
93
94
  }) : undefined
94
- }, other));
95
+ }, other, {
96
+ ref: ref
97
+ }));
95
98
  });
99
+ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
100
+ // ----------------------------- Warning --------------------------------
101
+ // | These PropTypes are generated from the TypeScript type definitions |
102
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
103
+ // ----------------------------------------------------------------------
104
+ /**
105
+ * GridApi that let you manipulate the grid.
106
+ */
107
+ api: PropTypes.object.isRequired,
108
+ /**
109
+ * The mode of the cell.
110
+ */
111
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
112
+ changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
113
+ /**
114
+ * The column of the row that the current cell belongs to.
115
+ */
116
+ colDef: PropTypes.object.isRequired,
117
+ debounceMs: PropTypes.number,
118
+ /**
119
+ * The column field of the cell that triggered the event.
120
+ */
121
+ field: PropTypes.string.isRequired,
122
+ /**
123
+ * The cell value formatted with the column valueFormatter.
124
+ */
125
+ formattedValue: PropTypes.any,
126
+ /**
127
+ * If true, the cell is the active element.
128
+ */
129
+ hasFocus: PropTypes.bool.isRequired,
130
+ /**
131
+ * The grid row id.
132
+ */
133
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
134
+ /**
135
+ * If true, the cell is editable.
136
+ */
137
+ isEditable: PropTypes.bool,
138
+ isProcessingProps: PropTypes.bool,
139
+ isValidating: PropTypes.bool,
140
+ /**
141
+ * Callback called when the value is changed by the user.
142
+ * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
143
+ * @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
144
+ * @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
145
+ */
146
+ onValueChange: PropTypes.func,
147
+ /**
148
+ * The row model of the row that the current cell belongs to.
149
+ */
150
+ row: PropTypes.any.isRequired,
151
+ /**
152
+ * The node of the row that the current cell belongs to.
153
+ */
154
+ rowNode: PropTypes.object.isRequired,
155
+ /**
156
+ * the tabIndex value.
157
+ */
158
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
159
+ /**
160
+ * The cell value.
161
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
162
+ */
163
+ value: PropTypes.any
164
+ } : void 0;
96
165
  export { GridEditInputCell };
97
166
  export const renderEditInputCell = params => /*#__PURE__*/_jsx(GridEditInputCell, _extends({}, params));