@mui/x-data-grid 8.0.0-alpha.6 → 8.0.0-alpha.8

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 (397) hide show
  1. package/CHANGELOG.md +242 -1
  2. package/DataGrid/DataGrid.js +4 -5
  3. package/DataGrid/useDataGridComponent.d.ts +1 -1
  4. package/DataGrid/useDataGridComponent.js +1 -1
  5. package/components/GridHeaders.js +2 -2
  6. package/components/GridRow.d.ts +5 -9
  7. package/components/GridRow.js +26 -78
  8. package/components/GridSkeletonLoadingOverlay.js +18 -18
  9. package/components/cell/GridActionsCellItem.d.ts +16 -9
  10. package/components/cell/GridActionsCellItem.js +2 -0
  11. package/components/cell/GridCell.d.ts +9 -16
  12. package/components/cell/GridCell.js +17 -35
  13. package/components/cell/GridEditDateCell.js +1 -1
  14. package/components/cell/GridEditInputCell.js +1 -1
  15. package/components/cell/GridEditSingleSelectCell.js +2 -2
  16. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  17. package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
  18. package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  19. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  20. package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
  21. package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  22. package/components/columnSelection/GridCellCheckboxRenderer.js +4 -3
  23. package/components/columnSelection/GridHeaderCheckbox.js +6 -2
  24. package/components/columnsManagement/GridColumnsManagement.js +2 -2
  25. package/components/containers/GridRoot.d.ts +2 -2
  26. package/components/containers/GridRoot.js +14 -6
  27. package/components/containers/GridRootStyles.js +7 -0
  28. package/components/panel/GridPanel.d.ts +1 -1
  29. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -0
  30. package/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  31. package/components/panel/filterPanel/GridFilterInputDate.d.ts +2 -1
  32. package/components/panel/filterPanel/GridFilterInputDate.js +32 -29
  33. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  34. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  35. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -0
  36. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  37. package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -0
  38. package/components/panel/filterPanel/GridFilterInputValue.js +40 -37
  39. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +1 -1
  40. package/components/toolbar/GridToolbarQuickFilter.js +2 -2
  41. package/components/virtualization/GridVirtualScrollbar.js +11 -12
  42. package/components/virtualization/GridVirtualScroller.js +4 -4
  43. package/constants/gridClasses.d.ts +12 -0
  44. package/constants/gridClasses.js +1 -1
  45. package/constants/localeTextConstants.js +1 -0
  46. package/context/GridContextProvider.d.ts +1 -1
  47. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
  48. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +1 -1
  49. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +1 -1
  50. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  51. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +1 -1
  52. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  53. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +1 -1
  54. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +1 -1
  55. package/hooks/core/useGridApiInitialization.d.ts +1 -1
  56. package/hooks/core/useGridApiInitialization.js +2 -2
  57. package/hooks/core/useGridInitialization.d.ts +1 -1
  58. package/hooks/core/useGridIsRtl.d.ts +1 -1
  59. package/hooks/core/useGridLocaleText.d.ts +1 -1
  60. package/hooks/core/useGridLoggerFactory.d.ts +1 -1
  61. package/hooks/core/useGridRefs.d.ts +1 -1
  62. package/hooks/core/useGridStateInitialization.d.ts +1 -1
  63. package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
  64. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
  65. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
  66. package/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
  67. package/hooks/features/columnMenu/useGridColumnMenu.d.ts +1 -1
  68. package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
  69. package/hooks/features/columnResize/useGridColumnResize.js +4 -4
  70. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -3
  71. package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
  72. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  73. package/hooks/features/density/useGridDensity.d.ts +1 -1
  74. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  75. package/hooks/features/editing/useGridCellEditing.d.ts +1 -1
  76. package/hooks/features/editing/useGridCellEditing.js +1 -1
  77. package/hooks/features/editing/useGridEditing.d.ts +1 -1
  78. package/hooks/features/editing/useGridRowEditing.d.ts +1 -1
  79. package/hooks/features/editing/useGridRowEditing.js +2 -2
  80. package/hooks/features/events/useGridEvents.d.ts +1 -1
  81. package/hooks/features/export/serializers/csvSerializer.d.ts +1 -1
  82. package/hooks/features/export/useGridCsvExport.d.ts +1 -1
  83. package/hooks/features/export/useGridPrintExport.d.ts +1 -1
  84. package/hooks/features/export/useGridPrintExport.js +1 -1
  85. package/hooks/features/export/utils.d.ts +1 -1
  86. package/hooks/features/filter/gridFilterSelector.d.ts +1 -1
  87. package/hooks/features/filter/gridFilterSelector.js +6 -1
  88. package/hooks/features/filter/gridFilterUtils.d.ts +6 -6
  89. package/hooks/features/filter/gridFilterUtils.js +3 -3
  90. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  91. package/hooks/features/focus/useGridFocus.d.ts +1 -1
  92. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +1 -1
  93. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
  94. package/hooks/features/keyboardNavigation/utils.d.ts +2 -2
  95. package/hooks/features/listView/useGridListView.d.ts +1 -1
  96. package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
  97. package/hooks/features/pagination/gridPaginationSelector.d.ts +21 -2
  98. package/hooks/features/pagination/gridPaginationSelector.js +39 -1
  99. package/hooks/features/pagination/useGridPagination.d.ts +2 -2
  100. package/hooks/features/pagination/useGridPagination.js +5 -3
  101. package/hooks/features/pagination/useGridPaginationMeta.d.ts +1 -1
  102. package/hooks/features/pagination/useGridPaginationModel.d.ts +1 -1
  103. package/hooks/features/pagination/useGridPaginationModel.js +23 -1
  104. package/hooks/features/pagination/useGridRowCount.d.ts +1 -1
  105. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
  106. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  107. package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  108. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +1 -1
  109. package/hooks/features/rowSelection/utils.d.ts +2 -2
  110. package/hooks/features/rows/gridRowSpanningUtils.d.ts +1 -1
  111. package/hooks/features/rows/gridRowsSelector.js +1 -1
  112. package/hooks/features/rows/gridRowsUtils.d.ts +3 -3
  113. package/hooks/features/rows/useGridParamsApi.d.ts +1 -1
  114. package/hooks/features/rows/useGridRowSpanning.d.ts +1 -1
  115. package/hooks/features/rows/useGridRows.d.ts +1 -1
  116. package/hooks/features/rows/useGridRows.js +2 -2
  117. package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
  118. package/hooks/features/rows/useGridRowsPreProcessors.d.ts +1 -1
  119. package/hooks/features/scroll/useGridScroll.d.ts +1 -1
  120. package/hooks/features/sorting/gridSortingUtils.d.ts +2 -2
  121. package/hooks/features/sorting/gridSortingUtils.js +2 -2
  122. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  123. package/hooks/features/statePersistence/useGridStatePersistence.d.ts +1 -1
  124. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
  125. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
  126. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +5 -4
  127. package/hooks/features/virtualization/useGridVirtualScroller.js +96 -43
  128. package/hooks/features/virtualization/useGridVirtualization.d.ts +1 -1
  129. package/hooks/utils/useGridApiContext.d.ts +1 -1
  130. package/hooks/utils/useGridApiEventHandler.d.ts +3 -3
  131. package/hooks/utils/useGridApiEventHandler.js +1 -1
  132. package/hooks/utils/useGridApiMethod.d.ts +1 -1
  133. package/hooks/utils/useGridApiRef.d.ts +1 -1
  134. package/hooks/utils/useGridInitializeState.d.ts +2 -2
  135. package/hooks/utils/useGridLogger.d.ts +1 -1
  136. package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
  137. package/hooks/utils/useGridPrivateApiContext.d.ts +1 -1
  138. package/hooks/utils/useGridSelector.d.ts +1 -1
  139. package/hooks/utils/useGridVisibleRows.d.ts +7 -5
  140. package/hooks/utils/useGridVisibleRows.js +5 -28
  141. package/index.js +1 -1
  142. package/internals/constants.d.ts +6 -0
  143. package/internals/constants.js +8 -1
  144. package/internals/index.d.ts +2 -1
  145. package/internals/index.js +1 -0
  146. package/internals/utils/attachPinnedStyle.d.ts +2 -0
  147. package/internals/utils/attachPinnedStyle.js +9 -0
  148. package/internals/utils/getPinnedCellOffset.d.ts +3 -3
  149. package/internals/utils/getPinnedCellOffset.js +6 -7
  150. package/internals/utils/index.d.ts +1 -0
  151. package/internals/utils/index.js +2 -1
  152. package/locales/arSD.js +2 -0
  153. package/locales/beBY.js +1 -0
  154. package/locales/bgBG.js +2 -0
  155. package/locales/csCZ.js +2 -0
  156. package/locales/daDK.js +2 -0
  157. package/locales/deDE.js +2 -0
  158. package/locales/elGR.js +2 -0
  159. package/locales/esES.js +2 -0
  160. package/locales/faIR.js +2 -0
  161. package/locales/fiFI.js +2 -0
  162. package/locales/frFR.js +2 -0
  163. package/locales/heIL.js +2 -0
  164. package/locales/hrHR.js +2 -0
  165. package/locales/huHU.js +2 -0
  166. package/locales/isIS.js +2 -0
  167. package/locales/itIT.js +2 -0
  168. package/locales/jaJP.js +2 -0
  169. package/locales/koKR.js +2 -0
  170. package/locales/nbNO.js +2 -0
  171. package/locales/nlNL.js +2 -0
  172. package/locales/nnNO.js +2 -0
  173. package/locales/plPL.js +2 -0
  174. package/locales/ptBR.js +2 -0
  175. package/locales/ptPT.js +2 -0
  176. package/locales/roRO.js +2 -0
  177. package/locales/ruRU.js +2 -0
  178. package/locales/skSK.js +2 -0
  179. package/locales/svSE.js +2 -0
  180. package/locales/trTR.js +2 -0
  181. package/locales/ukUA.js +2 -0
  182. package/locales/urPK.js +2 -0
  183. package/locales/viVN.js +2 -0
  184. package/locales/zhCN.js +2 -0
  185. package/locales/zhHK.js +2 -0
  186. package/locales/zhTW.js +2 -0
  187. package/material/index.js +2 -1
  188. package/models/api/gridCoreApi.d.ts +7 -7
  189. package/models/api/gridDensityApi.d.ts +1 -1
  190. package/models/api/gridLocaleTextApi.d.ts +1 -0
  191. package/models/colDef/gridColDef.d.ts +8 -8
  192. package/models/events/gridEventLookup.d.ts +6 -1
  193. package/models/gridBaseSlots.d.ts +32 -2
  194. package/models/gridExport.d.ts +1 -1
  195. package/models/gridFilterOperator.d.ts +1 -1
  196. package/models/gridIconSlotsComponent.d.ts +5 -0
  197. package/models/gridSlotsComponentsProps.d.ts +12 -8
  198. package/models/gridStateCommunity.d.ts +4 -0
  199. package/models/props/DataGridProps.d.ts +1 -1
  200. package/modern/DataGrid/DataGrid.js +4 -5
  201. package/modern/DataGrid/useDataGridComponent.js +1 -1
  202. package/modern/components/GridHeaders.js +2 -2
  203. package/modern/components/GridRow.js +26 -78
  204. package/modern/components/GridSkeletonLoadingOverlay.js +18 -18
  205. package/modern/components/cell/GridActionsCellItem.js +2 -0
  206. package/modern/components/cell/GridCell.js +17 -35
  207. package/modern/components/cell/GridEditDateCell.js +1 -1
  208. package/modern/components/cell/GridEditInputCell.js +1 -1
  209. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  210. package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  211. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  212. package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  213. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +4 -3
  214. package/modern/components/columnSelection/GridHeaderCheckbox.js +6 -2
  215. package/modern/components/columnsManagement/GridColumnsManagement.js +2 -2
  216. package/modern/components/containers/GridRoot.js +14 -6
  217. package/modern/components/containers/GridRootStyles.js +7 -0
  218. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  219. package/modern/components/panel/filterPanel/GridFilterInputDate.js +32 -29
  220. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  221. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  222. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  223. package/modern/components/panel/filterPanel/GridFilterInputValue.js +40 -37
  224. package/modern/components/toolbar/GridToolbarQuickFilter.js +2 -2
  225. package/modern/components/virtualization/GridVirtualScrollbar.js +11 -12
  226. package/modern/components/virtualization/GridVirtualScroller.js +4 -4
  227. package/modern/constants/gridClasses.js +1 -1
  228. package/modern/constants/localeTextConstants.js +1 -0
  229. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  230. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  231. package/modern/hooks/core/useGridApiInitialization.js +2 -2
  232. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
  233. package/modern/hooks/features/columnResize/useGridColumnResize.js +4 -4
  234. package/modern/hooks/features/editing/useGridCellEditing.js +1 -1
  235. package/modern/hooks/features/editing/useGridRowEditing.js +2 -2
  236. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  237. package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
  238. package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
  239. package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
  240. package/modern/hooks/features/pagination/useGridPagination.js +5 -3
  241. package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
  242. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  243. package/modern/hooks/features/rows/gridRowsSelector.js +1 -1
  244. package/modern/hooks/features/rows/useGridRows.js +2 -2
  245. package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
  246. package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
  247. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +96 -43
  248. package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
  249. package/modern/hooks/utils/useGridVisibleRows.js +5 -28
  250. package/modern/index.js +1 -1
  251. package/modern/internals/constants.js +8 -1
  252. package/modern/internals/index.js +1 -0
  253. package/modern/internals/utils/attachPinnedStyle.js +9 -0
  254. package/modern/internals/utils/getPinnedCellOffset.js +6 -7
  255. package/modern/internals/utils/index.js +2 -1
  256. package/modern/locales/arSD.js +2 -0
  257. package/modern/locales/beBY.js +1 -0
  258. package/modern/locales/bgBG.js +2 -0
  259. package/modern/locales/csCZ.js +2 -0
  260. package/modern/locales/daDK.js +2 -0
  261. package/modern/locales/deDE.js +2 -0
  262. package/modern/locales/elGR.js +2 -0
  263. package/modern/locales/esES.js +2 -0
  264. package/modern/locales/faIR.js +2 -0
  265. package/modern/locales/fiFI.js +2 -0
  266. package/modern/locales/frFR.js +2 -0
  267. package/modern/locales/heIL.js +2 -0
  268. package/modern/locales/hrHR.js +2 -0
  269. package/modern/locales/huHU.js +2 -0
  270. package/modern/locales/isIS.js +2 -0
  271. package/modern/locales/itIT.js +2 -0
  272. package/modern/locales/jaJP.js +2 -0
  273. package/modern/locales/koKR.js +2 -0
  274. package/modern/locales/nbNO.js +2 -0
  275. package/modern/locales/nlNL.js +2 -0
  276. package/modern/locales/nnNO.js +2 -0
  277. package/modern/locales/plPL.js +2 -0
  278. package/modern/locales/ptBR.js +2 -0
  279. package/modern/locales/ptPT.js +2 -0
  280. package/modern/locales/roRO.js +2 -0
  281. package/modern/locales/ruRU.js +2 -0
  282. package/modern/locales/skSK.js +2 -0
  283. package/modern/locales/svSE.js +2 -0
  284. package/modern/locales/trTR.js +2 -0
  285. package/modern/locales/ukUA.js +2 -0
  286. package/modern/locales/urPK.js +2 -0
  287. package/modern/locales/viVN.js +2 -0
  288. package/modern/locales/zhCN.js +2 -0
  289. package/modern/locales/zhHK.js +2 -0
  290. package/modern/locales/zhTW.js +2 -0
  291. package/modern/material/index.js +2 -1
  292. package/modern/utils/cellBorderUtils.js +5 -5
  293. package/modern/utils/domUtils.js +7 -2
  294. package/modern/utils/rtlFlipSide.js +22 -0
  295. package/node/DataGrid/DataGrid.js +2 -3
  296. package/node/DataGrid/useDataGridComponent.js +1 -1
  297. package/node/components/GridHeaders.js +2 -2
  298. package/node/components/GridRow.js +25 -77
  299. package/node/components/GridSkeletonLoadingOverlay.js +17 -17
  300. package/node/components/cell/GridActionsCellItem.js +1 -1
  301. package/node/components/cell/GridCell.js +18 -36
  302. package/node/components/cell/GridEditDateCell.js +1 -1
  303. package/node/components/cell/GridEditInputCell.js +1 -1
  304. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  305. package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  306. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  307. package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  308. package/node/components/columnSelection/GridCellCheckboxRenderer.js +3 -2
  309. package/node/components/columnSelection/GridHeaderCheckbox.js +6 -2
  310. package/node/components/columnsManagement/GridColumnsManagement.js +2 -2
  311. package/node/components/containers/GridRoot.js +14 -6
  312. package/node/components/containers/GridRootStyles.js +7 -0
  313. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  314. package/node/components/panel/filterPanel/GridFilterInputDate.js +31 -28
  315. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  316. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  317. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  318. package/node/components/panel/filterPanel/GridFilterInputValue.js +39 -36
  319. package/node/components/toolbar/GridToolbarQuickFilter.js +2 -2
  320. package/node/components/virtualization/GridVirtualScrollbar.js +11 -12
  321. package/node/components/virtualization/GridVirtualScroller.js +4 -4
  322. package/node/constants/gridClasses.js +1 -1
  323. package/node/constants/localeTextConstants.js +1 -0
  324. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  325. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  326. package/node/hooks/core/useGridApiInitialization.js +2 -2
  327. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -74
  328. package/node/hooks/features/columnResize/useGridColumnResize.js +4 -4
  329. package/node/hooks/features/editing/useGridCellEditing.js +1 -1
  330. package/node/hooks/features/editing/useGridRowEditing.js +2 -2
  331. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  332. package/node/hooks/features/filter/gridFilterSelector.js +6 -1
  333. package/node/hooks/features/filter/gridFilterUtils.js +3 -3
  334. package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
  335. package/node/hooks/features/pagination/useGridPagination.js +5 -3
  336. package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
  337. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  338. package/node/hooks/features/rows/gridRowsSelector.js +1 -1
  339. package/node/hooks/features/rows/useGridRows.js +1 -1
  340. package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
  341. package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +49 -0
  342. package/node/hooks/features/virtualization/useGridVirtualScroller.js +96 -43
  343. package/node/hooks/utils/useGridApiEventHandler.js +1 -1
  344. package/node/hooks/utils/useGridVisibleRows.js +3 -28
  345. package/node/index.js +1 -1
  346. package/node/internals/constants.js +9 -2
  347. package/node/internals/index.js +12 -0
  348. package/node/internals/utils/attachPinnedStyle.js +15 -0
  349. package/node/internals/utils/getPinnedCellOffset.js +6 -7
  350. package/node/internals/utils/index.js +11 -0
  351. package/node/locales/arSD.js +2 -0
  352. package/node/locales/beBY.js +1 -0
  353. package/node/locales/bgBG.js +2 -0
  354. package/node/locales/csCZ.js +2 -0
  355. package/node/locales/daDK.js +2 -0
  356. package/node/locales/deDE.js +2 -0
  357. package/node/locales/elGR.js +2 -0
  358. package/node/locales/esES.js +2 -0
  359. package/node/locales/faIR.js +2 -0
  360. package/node/locales/fiFI.js +2 -0
  361. package/node/locales/frFR.js +2 -0
  362. package/node/locales/heIL.js +2 -0
  363. package/node/locales/hrHR.js +2 -0
  364. package/node/locales/huHU.js +2 -0
  365. package/node/locales/isIS.js +2 -0
  366. package/node/locales/itIT.js +2 -0
  367. package/node/locales/jaJP.js +2 -0
  368. package/node/locales/koKR.js +2 -0
  369. package/node/locales/nbNO.js +2 -0
  370. package/node/locales/nlNL.js +2 -0
  371. package/node/locales/nnNO.js +2 -0
  372. package/node/locales/plPL.js +2 -0
  373. package/node/locales/ptBR.js +2 -0
  374. package/node/locales/ptPT.js +2 -0
  375. package/node/locales/roRO.js +2 -0
  376. package/node/locales/ruRU.js +2 -0
  377. package/node/locales/skSK.js +2 -0
  378. package/node/locales/svSE.js +2 -0
  379. package/node/locales/trTR.js +2 -0
  380. package/node/locales/ukUA.js +2 -0
  381. package/node/locales/urPK.js +2 -0
  382. package/node/locales/viVN.js +2 -0
  383. package/node/locales/zhCN.js +2 -0
  384. package/node/locales/zhHK.js +2 -0
  385. package/node/locales/zhTW.js +2 -0
  386. package/node/material/index.js +2 -1
  387. package/node/utils/cellBorderUtils.js +5 -5
  388. package/node/utils/domUtils.js +7 -2
  389. package/node/utils/rtlFlipSide.js +29 -0
  390. package/package.json +2 -2
  391. package/utils/cellBorderUtils.d.ts +3 -3
  392. package/utils/cellBorderUtils.js +5 -5
  393. package/utils/createSelector.d.ts +1 -1
  394. package/utils/domUtils.js +7 -2
  395. package/utils/getPublicApiRef.d.ts +1 -1
  396. package/utils/rtlFlipSide.d.ts +2 -0
  397. package/utils/rtlFlipSide.js +22 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,247 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.0.0-alpha.8
9
+
10
+ _Jan 16, 2025_
11
+
12
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🍬 Improved design for Data Grid [Header filters](https://next.mui.com/x/react-data-grid/filtering/header-filters/)
15
+
16
+ <img width="100%" alt="Data Grid Header filters" src="https://github.com/user-attachments/assets/74a50cd9-7a55-41fc-a2b8-f8a0d5b9120e" />
17
+
18
+ - 🔄 Data Grid [Scroll restoration](https://next.mui.com/x/react-data-grid/scrolling/#scroll-restoration)
19
+ - 📊 Charts support server-side rendering under [some conditions](https://next.mui.com/x/react-charts/getting-started/#server-side-rendering)
20
+ - 🐞 Bugfixes
21
+
22
+ Special thanks go out to the community contributors who have helped make this release possible:
23
+ @lauri865.
24
+ Following are all team members who have contributed to this release:
25
+ @arminmeh, @romgrk, @samuelsycamore, @alexfauquette, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen.
26
+
27
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
28
+
29
+ ### Data Grid
30
+
31
+ #### Breaking changes
32
+
33
+ - The clear button in header filter cells has been moved to the header filter menu. Use `slotProps={{ headerFilterCell: { showClearIcon: true } }}` to restore the clear button in the cell.
34
+
35
+ #### `@mui/x-data-grid@8.0.0-alpha.8`
36
+
37
+ - [DataGrid] Improve scrollbar deadzone with overlay scrollbars (#15961) @lauri865
38
+ - [DataGrid] Header filter design improvements (#15991) @KenanYusuf
39
+ - [DataGrid] Scroll restoration (#15623) @lauri865
40
+ - [DataGrid] Fix row, cell and header memoizations (#15666) @lauri865
41
+
42
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.8` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
43
+
44
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.8`, plus:
45
+
46
+ - [DataGridPro] Add test for column pinning with disabled column virtualization (#16176) @cherniavskii
47
+ - [DataGridPro] Fix width of right-pinned column group during resize (#16199) @cherniavskii
48
+
49
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.8` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
50
+
51
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.8`.
52
+
53
+ ### Date and Time Pickers
54
+
55
+ #### Breaking changes
56
+
57
+ - The field is now editable if rendered inside a mobile Picker — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#field-editing-on-mobile-pickers)
58
+ - The `useMultiInputDateRangeField`, `useMultiInputTimeRangeField`, and `useMultiInputDateTimeRangeField` hooks have been removed in favor of the new `useMultiInputRangeField` hook — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usemultiinputdaterangefield)
59
+ - The component passed to the `field` slot no longer receives the `value`, `onChange`, `timezone`, `format`, `disabled`, `formatDensity`, `enableAccessibleFieldDOMStructure`, `selectedSections` and `onSelectedSectionsChange` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-field)
60
+
61
+ #### `@mui/x-date-pickers@8.0.0-alpha.8`
62
+
63
+ - [pickers] Let the field components handle their opening UI, and allow field editing on mobile pickers (#15671) @flaviendelangle
64
+ - [pickers] Remove code duplication for the multi input range fields (#15505) @flaviendelangle
65
+ - [pickers] Rename `onRangePositionChange` into `setRangePosition` in `usePickerRangePositionContext` (#16189) @flaviendelangle
66
+ - [pickers] Use context to pass props from the picker to the field (#16042) @flaviendelangle
67
+
68
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.8` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
69
+
70
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.8`.
71
+
72
+ ### Charts
73
+
74
+ #### Breaking changes
75
+
76
+ - Charts tooltip markers now have different styles for each chart type. The tooltip and legend marks are now the same.
77
+ - Duplicate axis id's across `x` and `y` axis now log a warning in dev mode. Axis ids should be unique to prevent internal issues.
78
+
79
+ #### `@mui/x-charts@8.0.0-alpha.8`
80
+
81
+ - [charts] Fix flaky charts tests (#16180) @JCQuintas
82
+ - [charts] Handle case where gradient stop `offset` could be `Infinite` (#16131) @JCQuintas
83
+ - [charts] Make `useChartGradientId` public (#16106) @JCQuintas
84
+ - [charts] Move z-axis to plugin (#16130) @alexfauquette
85
+ - [charts] Plot data at first render if `skipAnimation` is set to `true` (#16166) @alexfauquette
86
+ - [charts] Replace tooltip mark with style (#16117) @JCQuintas
87
+ - [charts] Support `rtl` for gradient legend (#16115) @JCQuintas
88
+ - [charts] Use plugin system for series and axes (#15865) @alexfauquette
89
+
90
+ #### `@mui/x-charts-pro@8.0.0-alpha.8` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
91
+
92
+ Same changes as in `@mui/x-charts@8.0.0-alpha.8`.
93
+
94
+ ### Tree View
95
+
96
+ #### `@mui/x-tree-view@8.0.0-alpha.8`
97
+
98
+ No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.7`.
99
+
100
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.8` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
101
+
102
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.8`.
103
+
104
+ ### Docs
105
+
106
+ - [docs] Add example for custom legend (#16169) @alexfauquette
107
+ - [docs] Add full custom field creation example (#15194) @flaviendelangle
108
+ - [docs] Copyedit the Data Grid cell selection page (#16099) @samuelsycamore
109
+ - [docs] Fix demo rendering issue on Codesandbox (#16118) @arminmeh
110
+ - [docs] Remove broken links (#16167) @alexfauquette
111
+ - [docs] Split the Data Grid editing page (#14931) @MBilalShafi
112
+ - [docs] Fix wrong props warnings (#16119) @JCQuintas
113
+
114
+ ### Core
115
+
116
+ - [core] Type all references as `RefObject` (#16124) @arminmeh
117
+ - [code-infra] Refactor `react` and `react-dom` definitions to simplify dep resolving (#16160) @LukasTy
118
+ - [code-infra] Stop renovate from updating `date-fns-v2` (#16158) @LukasTy
119
+ - [infra] Improve cherry-pick action target list (#16184) @michelengelen
120
+ - [test] Fix flaky column pinning unit test (#16202) @cherniavskii
121
+ - [test] Fix flaky screenshot (#16182) @cherniavskii
122
+
123
+ ## 8.0.0-alpha.7
124
+
125
+ _Jan 9, 2025_
126
+
127
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
128
+
129
+ - 📊 Charts legend is now an HTML element which can be styled more easily
130
+ - 💫 Support [aggregation with server-side data](/x/react-data-grid/server-side-data/aggregation/)
131
+ - 🏎️ Improve Data Grid aggregation performance
132
+ - 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
133
+ - 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
134
+ - 🐞 Bugfixes
135
+
136
+ Special thanks go out to the community contributors who have helped make this release possible:
137
+ @derek-0000, @josteinjhauge, @k-rajat19, @nusr, @tomashauser.
138
+ Following are all team members who have contributed to this release:
139
+ @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @oliviertassinari.
140
+
141
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
142
+
143
+ ### Data Grid
144
+
145
+ #### `@mui/x-data-grid@8.0.0-alpha.7`
146
+
147
+ - [DataGrid] Improve React 19 support (#15769) @LukasTy
148
+ - [DataGrid] Add `name` attribute to the checkbox selection column (#15178) @derek-0000
149
+ - [DataGrid] Fix number filter field formatting values while typing (#16062) @arminmeh
150
+ - [DataGrid] Fix select all checkbox state reset with server side data (#16034) @MBilalShafi
151
+ - [DataGrid] Refactor: create base button props (#15930) @romgrk
152
+ - [DataGrid] Refactor: create tooltip props (#16086) @romgrk
153
+ - [DataGrid] Fix TS error (#16046) @cherniavskii
154
+
155
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
156
+
157
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.7`.
158
+
159
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.7` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
160
+
161
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.7`, plus:
162
+
163
+ - [DataGridPremium] Improve aggregation performance for multiple columns (#16097) @cherniavskii
164
+ - [DataGridPremium] Make Aggregation keyboard accessible in the column menu (#15934) @k-rajat19
165
+ - [DataGridPremium] Server-side aggregation with data source (#15741) @MBilalShafi
166
+
167
+ ### Date and Time Pickers
168
+
169
+ #### Breaking changes
170
+
171
+ - The `date-fns` and `date-fns-jalali` date library adapters have been renamed to better align with the current stable major versions — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#✅-rename-date-fns-adapter-imports)
172
+ - Update default `closeOnSelect` and Action Bar `actions` values - [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#update-default-closeonselect-and-action-bar-actions-values)
173
+ - The component passed to the `layout` slot no longer receives the `value`, `onChange` and `onSelectShortcut` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
174
+ - The component passed to the `toolbar` slot no longer receives the `value`, `onChange` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
175
+ - The component passed to the `shortcuts` slot no longer receives the `onChange`, `isValid` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-shortcuts).
176
+ - The `PickerShortcutChangeImportance` type has been renamed `PickerChangeImportance` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables-and-types).
177
+ - The component passed to the `layout` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
178
+ - The component passed to the `toolbar` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
179
+ - The component passed to the `tabs` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-tabs).
180
+
181
+ #### `@mui/x-date-pickers@8.0.0-alpha.7`
182
+
183
+ - [fields] Handle focusing container with `inputRef.current.focus` on `accessibleFieldDOMStructure` (#15985) @LukasTy
184
+ - [pickers] Always use `setValue` internally to update the picker value (#16056) @flaviendelangle
185
+ - [pickers] Create a new context to pass the range position props to the layout components and to the views (#15846) @flaviendelangle
186
+ - [pickers] Introduce a new concept of `manager` (#15339) @flaviendelangle
187
+ - [pickers] Improve React 19 support (#15769) @LukasTy
188
+ - [pickers] Memoize `<PickersActionBar />` (#16071) @LukasTy
189
+ - [pickers] Remove `NonEmptyDateRange` type (#16035) @flaviendelangle
190
+ - [pickers] Rename `AdapterDateFns` into `AdapterDateFnsV2` and `AdapterDateFnsV3` into `AdapterDateFns` (#16082) @LukasTy
191
+ - [pickers] Rename `ctx.onViewChange` to `ctx.setView` and add it to the actions context (#16044) @flaviendelangle
192
+ - [pickers] Support `date-fns-jalali` v4 (#16011) @LukasTy
193
+ - [pickers] Update `closeOnSelect` and `actionBar.actions` default values (#15944) @LukasTy
194
+ - [pickers] Use `usePickerContext()` and `usePickerActionsContext()` instead of passing props to the `shortcuts` and `toolbar` slots (#15948) @flaviendelangle
195
+ - [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16033) @nusr
196
+ - [l10n] Improve Norwegian (nb-NO) locale (#16089) @josteinjhauge
197
+
198
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
199
+
200
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.7`.
201
+
202
+ ### Charts
203
+
204
+ #### Breaking changes
205
+
206
+ - Removed `DefaultChartsLegend` component, since it is now easier to create custom legends — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
207
+ - The default legend is now an HTML element and can be styled more easily.
208
+ - The `width` and `height` properties of the charts now only apply to the `svg` element, and not their wrappers, this might cause some layout shifts.
209
+ - `slotProps.legend.direction` now accepts `'horizontal' | 'vertical'` instead of `'row' | 'column'` — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-direction-value-change-✅).
210
+ - The `getSeriesToDisplay` function was removed in favor of the `useLegend` hook. — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#the-getseriestodisplay-function-was-removed).
211
+
212
+ #### `@mui/x-charts@8.0.0-alpha.7`
213
+
214
+ - [charts] New HTML legend & styles (#15733) @JCQuintas
215
+ - [charts] Improve React 19 support (#15769) @LukasTy
216
+ - [charts] Fix 301 redirection in the API documentation @oliviertassinari
217
+
218
+ #### `@mui/x-charts-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
219
+
220
+ Same changes as in `@mui/x-charts@8.0.0-alpha.7`.
221
+
222
+ ### Tree View
223
+
224
+ #### `@mui/x-tree-view@8.0.0-alpha.7`
225
+
226
+ - [TreeView] Improve React 19 support (#15769) @LukasTy
227
+
228
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
229
+
230
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.7`.
231
+
232
+ ### Docs
233
+
234
+ - [docs] Fix `EditingWithDatePickers` demo (#15967) @k-rajat19
235
+ - [docs] Fix inconsistent multi input range field separators (#16043) @flaviendelangle
236
+ - [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16084) @tomashauser
237
+ - [docs] Refactor Data Grid with Date Pickers example (#15992) @LukasTy
238
+ - [docs] Unify the wording of the pickers slots breaking changes (#16036) @flaviendelangle
239
+
240
+ ### Core
241
+
242
+ - [core] Clarify the release strategy (#16014) @MBilalShafi
243
+ - [core] Small fixes on docs @oliviertassinari
244
+ - [core] Sync with other repos @oliviertassinari
245
+ - [core] Update the `release:version` docs (#16038) @cherniavskii
246
+ - [code-infra] Add `testSkipIf` and `describeSkipIf` (#16049) @JCQuintas
247
+ - [test] Stabilize flaky Data Grid tests (#16053) @LukasTy
248
+
8
249
  ## 8.0.0-alpha.6
9
250
 
10
251
  _Dec 26, 2024_
@@ -104,7 +345,7 @@ Following are all team members who have contributed to this release:
104
345
 
105
346
  #### Breaking changes
106
347
 
107
- - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
348
+ - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`:
108
349
 
109
350
  - For `.root` element, use `slotProps.root`.
110
351
  - For `.main` element (the one with `role="grid"`), use `slotProps.main`.
@@ -4,14 +4,14 @@ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { forwardRef } from '@mui/x-internals/forwardRef';
7
- import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from "../components/index.js";
7
+ import { GridRoot } from "../components/index.js";
8
8
  import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
9
9
  import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
10
10
  import { GridContextProvider } from "../context/GridContextProvider.js";
11
11
  import { useDataGridComponent } from "./useDataGridComponent.js";
12
12
  import { useDataGridProps } from "./useDataGridProps.js";
13
13
  import { propValidatorsDataGrid, validateProps } from "../internals/utils/propValidation.js";
14
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
15
  const configuration = {
16
16
  hooks: {
17
17
  useGridAriaAttributes,
@@ -34,13 +34,12 @@ const DataGridRaw = forwardRef(function DataGrid(inProps, ref) {
34
34
  privateApiRef: privateApiRef,
35
35
  configuration: configuration,
36
36
  props: props,
37
- children: /*#__PURE__*/_jsxs(GridRoot, _extends({
37
+ children: /*#__PURE__*/_jsx(GridRoot, _extends({
38
38
  className: props.className,
39
39
  style: props.style,
40
40
  sx: props.sx
41
41
  }, props.slotProps?.root, {
42
- ref: ref,
43
- children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
42
+ ref: ref
44
43
  }))
45
44
  });
46
45
  });
@@ -1,3 +1,3 @@
1
1
  import { DataGridProcessedProps } from '../models/props/DataGridProps';
2
2
  import { GridApiCommunity, GridPrivateApiCommunity } from '../models/api/gridApiCommunity';
3
- export declare const useDataGridComponent: (inputApiRef: React.MutableRefObject<GridApiCommunity> | undefined, props: DataGridProcessedProps) => import("react").MutableRefObject<GridPrivateApiCommunity>;
3
+ export declare const useDataGridComponent: (inputApiRef: React.RefObject<GridApiCommunity> | undefined, props: DataGridProcessedProps) => import("react").RefObject<GridPrivateApiCommunity>;
@@ -44,6 +44,7 @@ export const useDataGridComponent = (inputApiRef, props) => {
44
44
  useGridInitializeState(dimensionsStateInitializer, apiRef, props);
45
45
  useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
46
46
  useGridInitializeState(columnsStateInitializer, apiRef, props);
47
+ useGridInitializeState(paginationStateInitializer, apiRef, props);
47
48
  useGridInitializeState(rowsStateInitializer, apiRef, props);
48
49
  useGridInitializeState(editingStateInitializer, apiRef, props);
49
50
  useGridInitializeState(focusStateInitializer, apiRef, props);
@@ -53,7 +54,6 @@ export const useDataGridComponent = (inputApiRef, props) => {
53
54
  useGridInitializeState(rowSpanningStateInitializer, apiRef, props);
54
55
  useGridInitializeState(densityStateInitializer, apiRef, props);
55
56
  useGridInitializeState(columnResizeStateInitializer, apiRef, props);
56
- useGridInitializeState(paginationStateInitializer, apiRef, props);
57
57
  useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
58
58
  useGridInitializeState(columnMenuStateInitializer, apiRef, props);
59
59
  useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
@@ -18,7 +18,7 @@ function GridHeaders() {
18
18
  const filterColumnLookup = useGridSelector(apiRef, gridFilterActiveItemsLookupSelector);
19
19
  const sortColumnLookup = useGridSelector(apiRef, gridSortColumnLookupSelector);
20
20
  const columnHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnHeaderSelector);
21
- const cellTabIndexState = useGridSelector(apiRef, gridTabIndexCellSelector);
21
+ const hasNoCellTabIndexState = useGridSelector(apiRef, () => gridTabIndexCellSelector(apiRef) === null);
22
22
  const columnGroupHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnGroupHeaderSelector);
23
23
  const columnHeaderFocus = useGridSelector(apiRef, gridFocusColumnHeaderSelector);
24
24
  const columnGroupHeaderFocus = useGridSelector(apiRef, gridFocusColumnGroupHeaderSelector);
@@ -26,7 +26,7 @@ function GridHeaders() {
26
26
  const columnMenuState = useGridSelector(apiRef, gridColumnMenuSelector);
27
27
  const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
28
28
  const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
29
- const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
29
+ const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && hasNoCellTabIndexState);
30
30
  const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
31
31
  return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
32
32
  ref: columnsContainerRef,
@@ -2,8 +2,6 @@ import * as React from 'react';
2
2
  import { GridRowId, GridRowModel } from '../models/gridRows';
3
3
  import { GridPinnedColumns } from '../hooks/features/columns';
4
4
  import type { GridStateColDef } from '../models/colDef/gridColDef';
5
- import type { GridRenderContext } from '../models/params/gridScrollParams';
6
- import type { GridDimensions } from '../hooks/features/dimensions';
7
5
  export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
8
6
  row: GridRowModel;
9
7
  rowId: GridRowId;
@@ -16,8 +14,9 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
16
14
  rowHeight: number | 'auto';
17
15
  offsetTop: number | undefined;
18
16
  offsetLeft: number;
19
- dimensions: GridDimensions;
20
- renderContext: GridRenderContext;
17
+ columnsTotalWidth: number;
18
+ firstColumnIndex: number;
19
+ lastColumnIndex: number;
21
20
  visibleColumns: GridStateColDef[];
22
21
  pinnedColumns: GridPinnedColumns;
23
22
  /**
@@ -25,15 +24,12 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
25
24
  * If `null`, no cell in this row has focus.
26
25
  */
27
26
  focusedColumnIndex: number | undefined;
28
- /**
29
- * Determines which cell should be tabbable by having tabIndex=0.
30
- * If `null`, no cell in this row is in the tab sequence.
31
- */
32
- tabbableCell: string | null;
33
27
  isFirstVisible: boolean;
34
28
  isLastVisible: boolean;
35
29
  isNotVisible: boolean;
36
30
  showBottomBorder: boolean;
31
+ scrollbarWidth: number;
32
+ gridHasFiller: boolean;
37
33
  onClick?: React.MouseEventHandler<HTMLDivElement>;
38
34
  onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
39
35
  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 = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "dimensions", "renderContext", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
3
+ const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "columnsTotalWidth", "firstColumnIndex", "lastColumnIndex", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "scrollbarWidth", "gridHasFiller", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -11,22 +11,21 @@ import { GridEditModes, GridRowModes, GridCellModes } from "../models/gridEditRo
11
11
  import { gridClasses } from "../constants/gridClasses.js";
12
12
  import { composeGridClasses } from "../utils/composeGridClasses.js";
13
13
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
14
+ import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../utils/cellBorderUtils.js";
14
15
  import { gridColumnPositionsSelector } from "../hooks/features/columns/gridColumnsSelector.js";
15
16
  import { useGridSelector, objectShallowCompare } from "../hooks/utils/useGridSelector.js";
16
17
  import { useGridVisibleRows } from "../hooks/utils/useGridVisibleRows.js";
17
18
  import { findParentElementFromClassName, isEventTargetInPortal } from "../utils/domUtils.js";
18
19
  import { GRID_CHECKBOX_SELECTION_COL_DEF } from "../colDef/gridCheckboxSelectionColDef.js";
19
20
  import { GRID_ACTIONS_COLUMN_TYPE } from "../colDef/gridActionsColDef.js";
20
- import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from "../internals/constants.js";
21
+ import { GRID_DETAIL_PANEL_TOGGLE_FIELD, PinnedColumnPosition } from "../internals/constants.js";
21
22
  import { gridSortModelSelector } from "../hooks/features/sorting/gridSortingSelector.js";
22
23
  import { gridRowMaximumTreeDepthSelector } from "../hooks/features/rows/gridRowsSelector.js";
23
24
  import { gridEditRowsStateSelector } from "../hooks/features/editing/gridEditingSelectors.js";
24
- import { PinnedPosition, gridPinnedColumnPositionLookup } from "./cell/GridCell.js";
25
25
  import { GridScrollbarFillerCell as ScrollbarFiller } from "./GridScrollbarFillerCell.js";
26
26
  import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
27
27
  import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
28
28
  import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
29
- import { gridVirtualizationColumnEnabledSelector } from "../hooks/index.js";
30
29
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
30
  const GridRow = forwardRef(function GridRow(props, refProp) {
32
31
  const {
@@ -40,13 +39,16 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
40
39
  visibleColumns,
41
40
  pinnedColumns,
42
41
  offsetLeft,
43
- dimensions,
44
- renderContext,
42
+ columnsTotalWidth,
43
+ firstColumnIndex,
44
+ lastColumnIndex,
45
45
  focusedColumnIndex,
46
46
  isFirstVisible,
47
47
  isLastVisible,
48
48
  isNotVisible,
49
49
  showBottomBorder,
50
+ scrollbarWidth,
51
+ gridHasFiller,
50
52
  onClick,
51
53
  onDoubleClick,
52
54
  onMouseEnter,
@@ -66,14 +68,11 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
66
68
  const editRowsState = useGridSelector(apiRef, gridEditRowsStateSelector);
67
69
  const handleRef = useForkRef(ref, refProp);
68
70
  const rowNode = apiRef.current.getRowNode(rowId);
69
- const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
70
- const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
71
71
  const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;
72
72
  const editable = rootProps.editMode === GridEditModes.Row;
73
- const hasColumnVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
74
73
  const hasFocusCell = focusedColumnIndex !== undefined;
75
- const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
76
- const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
74
+ const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < firstColumnIndex;
75
+ const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= lastColumnIndex;
77
76
  const classes = composeGridClasses(rootProps.classes, {
78
77
  root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', showBottomBorder && 'row--borderBottom', rowHeight === 'auto' && 'row--dynamicHeight']
79
78
  });
@@ -189,14 +188,14 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
189
188
  });
190
189
  rowClassNames.push(rootProps.getRowClassName(rowParams));
191
190
  }
192
- const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedPosition.NONE) => {
191
+ const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedColumnPosition.NONE) => {
193
192
  const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
194
193
  if (cellColSpanInfo?.spannedByColSpan) {
195
194
  return null;
196
195
  }
197
196
  const width = cellColSpanInfo?.cellProps.width ?? column.computedWidth;
198
197
  const colSpan = cellColSpanInfo?.cellProps.colSpan ?? 1;
199
- const pinnedOffset = getPinnedCellOffset(gridPinnedColumnPositionLookup[pinnedPosition], column.computedWidth, indexRelativeToAllColumns, columnPositions, dimensions);
198
+ const pinnedOffset = getPinnedCellOffset(pinnedPosition, column.computedWidth, indexRelativeToAllColumns, columnPositions, columnsTotalWidth, scrollbarWidth);
200
199
  if (rowNode?.type === 'skeletonRow') {
201
200
  return /*#__PURE__*/_jsx(slots.skeletonCell, {
202
201
  type: column.type,
@@ -215,7 +214,9 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
215
214
  const canReorderColumn = !(disableColumnReorder || column.disableReorder);
216
215
  const canReorderRow = rowReordering && !sortModel.length && treeDepth <= 1 && !isEditingRows;
217
216
  const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
218
- const cellIsNotVisible = pinnedPosition === PinnedPosition.VIRTUAL;
217
+ const cellIsNotVisible = pinnedPosition === PinnedColumnPosition.VIRTUAL;
218
+ const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
219
+ const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
219
220
  return /*#__PURE__*/_jsx(slots.cell, _extends({
220
221
  column: column,
221
222
  width: width,
@@ -228,9 +229,8 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
228
229
  isNotVisible: cellIsNotVisible,
229
230
  pinnedOffset: pinnedOffset,
230
231
  pinnedPosition: pinnedPosition,
231
- sectionIndex: indexInSection,
232
- sectionLength: sectionLength,
233
- gridHasFiller: gridHasFiller
232
+ showLeftBorder: showLeftBorder,
233
+ showRightBorder: showRightBorder
234
234
  }, slotProps?.cell), column.field);
235
235
  };
236
236
 
@@ -241,25 +241,16 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
241
241
  }
242
242
  const leftCells = pinnedColumns.left.map((column, i) => {
243
243
  const indexRelativeToAllColumns = i;
244
- return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length, PinnedPosition.LEFT);
244
+ return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length, PinnedColumnPosition.LEFT);
245
245
  });
246
246
  const rightCells = pinnedColumns.right.map((column, i) => {
247
247
  const indexRelativeToAllColumns = visibleColumns.length - pinnedColumns.right.length + i;
248
- return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length, PinnedPosition.RIGHT);
248
+ return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length, PinnedColumnPosition.RIGHT);
249
249
  });
250
250
  const middleColumnsLength = visibleColumns.length - pinnedColumns.left.length - pinnedColumns.right.length;
251
251
  const cells = [];
252
252
  if (hasVirtualFocusCellLeft) {
253
- cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedPosition.VIRTUAL));
254
- }
255
- let firstColumnIndex;
256
- let lastColumnIndex;
257
- if (!rootProps.disableVirtualization && !hasColumnVirtualization) {
258
- firstColumnIndex = 0;
259
- lastColumnIndex = visibleColumns.length;
260
- } else {
261
- firstColumnIndex = renderContext.firstColumnIndex;
262
- lastColumnIndex = renderContext.lastColumnIndex;
253
+ cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));
263
254
  }
264
255
  for (let i = firstColumnIndex; i < lastColumnIndex; i += 1) {
265
256
  const column = visibleColumns[i];
@@ -270,7 +261,7 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
270
261
  cells.push(getCell(column, indexInSection, i, middleColumnsLength));
271
262
  }
272
263
  if (hasVirtualFocusCellRight) {
273
- cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedPosition.VIRTUAL));
264
+ cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));
274
265
  }
275
266
  const eventHandlers = row ? {
276
267
  onClick: publishClick,
@@ -307,48 +298,14 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
307
298
  // | These PropTypes are generated from the TypeScript type definitions |
308
299
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
309
300
  // ----------------------------------------------------------------------
310
- dimensions: PropTypes.shape({
311
- bottomContainerHeight: PropTypes.number.isRequired,
312
- columnsTotalWidth: PropTypes.number.isRequired,
313
- contentSize: PropTypes.shape({
314
- height: PropTypes.number.isRequired,
315
- width: PropTypes.number.isRequired
316
- }).isRequired,
317
- groupHeaderHeight: PropTypes.number.isRequired,
318
- hasScrollX: PropTypes.bool.isRequired,
319
- hasScrollY: PropTypes.bool.isRequired,
320
- headerFilterHeight: PropTypes.number.isRequired,
321
- headerHeight: PropTypes.number.isRequired,
322
- headersTotalHeight: PropTypes.number.isRequired,
323
- isReady: PropTypes.bool.isRequired,
324
- leftPinnedWidth: PropTypes.number.isRequired,
325
- minimumSize: PropTypes.shape({
326
- height: PropTypes.number.isRequired,
327
- width: PropTypes.number.isRequired
328
- }).isRequired,
329
- rightPinnedWidth: PropTypes.number.isRequired,
330
- root: PropTypes.shape({
331
- height: PropTypes.number.isRequired,
332
- width: PropTypes.number.isRequired
333
- }).isRequired,
334
- rowHeight: PropTypes.number.isRequired,
335
- rowWidth: PropTypes.number.isRequired,
336
- scrollbarSize: PropTypes.number.isRequired,
337
- topContainerHeight: PropTypes.number.isRequired,
338
- viewportInnerSize: PropTypes.shape({
339
- height: PropTypes.number.isRequired,
340
- width: PropTypes.number.isRequired
341
- }).isRequired,
342
- viewportOuterSize: PropTypes.shape({
343
- height: PropTypes.number.isRequired,
344
- width: PropTypes.number.isRequired
345
- }).isRequired
346
- }).isRequired,
301
+ columnsTotalWidth: PropTypes.number.isRequired,
302
+ firstColumnIndex: PropTypes.number.isRequired,
347
303
  /**
348
304
  * Determines which cell has focus.
349
305
  * If `null`, no cell in this row has focus.
350
306
  */
351
307
  focusedColumnIndex: PropTypes.number,
308
+ gridHasFiller: PropTypes.bool.isRequired,
352
309
  /**
353
310
  * Index of the row in the whole sorted and filtered dataset.
354
311
  * If some rows above have expanded children, this index also take those children into account.
@@ -357,6 +314,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
357
314
  isFirstVisible: PropTypes.bool.isRequired,
358
315
  isLastVisible: PropTypes.bool.isRequired,
359
316
  isNotVisible: PropTypes.bool.isRequired,
317
+ lastColumnIndex: PropTypes.number.isRequired,
360
318
  offsetLeft: PropTypes.number.isRequired,
361
319
  offsetTop: PropTypes.number,
362
320
  onClick: PropTypes.func,
@@ -364,22 +322,12 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
364
322
  onMouseEnter: PropTypes.func,
365
323
  onMouseLeave: PropTypes.func,
366
324
  pinnedColumns: PropTypes.object.isRequired,
367
- renderContext: PropTypes.shape({
368
- firstColumnIndex: PropTypes.number.isRequired,
369
- firstRowIndex: PropTypes.number.isRequired,
370
- lastColumnIndex: PropTypes.number.isRequired,
371
- lastRowIndex: PropTypes.number.isRequired
372
- }).isRequired,
373
325
  row: PropTypes.object.isRequired,
374
326
  rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,
375
327
  rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
328
+ scrollbarWidth: PropTypes.number.isRequired,
376
329
  selected: PropTypes.bool.isRequired,
377
330
  showBottomBorder: PropTypes.bool.isRequired,
378
- /**
379
- * Determines which cell should be tabbable by having tabIndex=0.
380
- * If `null`, no cell in this row is in the tab sequence.
381
- */
382
- tabbableCell: PropTypes.string,
383
331
  visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
384
332
  } : void 0;
385
333
  const MemoizedGridRow = fastMemo(GridRow);