@mui/x-data-grid 8.0.0-alpha.7 → 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 (322) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/DataGrid/DataGrid.js +4 -5
  3. package/DataGrid/useDataGridComponent.js +1 -1
  4. package/components/GridHeaders.js +2 -2
  5. package/components/GridRow.d.ts +5 -9
  6. package/components/GridRow.js +26 -78
  7. package/components/GridSkeletonLoadingOverlay.js +18 -18
  8. package/components/cell/GridCell.d.ts +9 -16
  9. package/components/cell/GridCell.js +17 -35
  10. package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
  11. package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  12. package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
  13. package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  14. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  15. package/components/containers/GridRoot.d.ts +2 -2
  16. package/components/containers/GridRoot.js +14 -6
  17. package/components/containers/GridRootStyles.js +7 -0
  18. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -0
  19. package/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  20. package/components/panel/filterPanel/GridFilterInputDate.d.ts +2 -1
  21. package/components/panel/filterPanel/GridFilterInputDate.js +32 -29
  22. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  23. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  24. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -0
  25. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  26. package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -0
  27. package/components/panel/filterPanel/GridFilterInputValue.js +34 -28
  28. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +1 -1
  29. package/components/virtualization/GridVirtualScrollbar.js +11 -12
  30. package/components/virtualization/GridVirtualScroller.js +4 -4
  31. package/constants/gridClasses.d.ts +12 -0
  32. package/constants/gridClasses.js +1 -1
  33. package/constants/localeTextConstants.js +1 -0
  34. package/context/GridContextProvider.d.ts +1 -1
  35. package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
  36. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
  37. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
  38. package/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
  39. package/hooks/features/columnMenu/useGridColumnMenu.d.ts +1 -1
  40. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -3
  41. package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
  42. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  43. package/hooks/features/density/useGridDensity.d.ts +1 -1
  44. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  45. package/hooks/features/editing/useGridCellEditing.d.ts +1 -1
  46. package/hooks/features/editing/useGridCellEditing.js +1 -1
  47. package/hooks/features/editing/useGridEditing.d.ts +1 -1
  48. package/hooks/features/editing/useGridRowEditing.d.ts +1 -1
  49. package/hooks/features/editing/useGridRowEditing.js +1 -1
  50. package/hooks/features/events/useGridEvents.d.ts +1 -1
  51. package/hooks/features/export/serializers/csvSerializer.d.ts +1 -1
  52. package/hooks/features/export/useGridCsvExport.d.ts +1 -1
  53. package/hooks/features/export/useGridPrintExport.d.ts +1 -1
  54. package/hooks/features/export/utils.d.ts +1 -1
  55. package/hooks/features/filter/gridFilterSelector.d.ts +1 -1
  56. package/hooks/features/filter/gridFilterSelector.js +6 -1
  57. package/hooks/features/filter/gridFilterUtils.d.ts +6 -6
  58. package/hooks/features/filter/gridFilterUtils.js +3 -3
  59. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  60. package/hooks/features/focus/useGridFocus.d.ts +1 -1
  61. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +1 -1
  62. package/hooks/features/keyboardNavigation/utils.d.ts +2 -2
  63. package/hooks/features/listView/useGridListView.d.ts +1 -1
  64. package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
  65. package/hooks/features/pagination/gridPaginationSelector.d.ts +21 -2
  66. package/hooks/features/pagination/gridPaginationSelector.js +39 -1
  67. package/hooks/features/pagination/useGridPagination.d.ts +2 -2
  68. package/hooks/features/pagination/useGridPagination.js +5 -3
  69. package/hooks/features/pagination/useGridPaginationMeta.d.ts +1 -1
  70. package/hooks/features/pagination/useGridPaginationModel.d.ts +1 -1
  71. package/hooks/features/pagination/useGridPaginationModel.js +23 -1
  72. package/hooks/features/pagination/useGridRowCount.d.ts +1 -1
  73. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
  74. package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  75. package/hooks/features/rowSelection/utils.d.ts +2 -2
  76. package/hooks/features/rows/gridRowSpanningUtils.d.ts +1 -1
  77. package/hooks/features/rows/gridRowsSelector.js +1 -1
  78. package/hooks/features/rows/gridRowsUtils.d.ts +3 -3
  79. package/hooks/features/rows/useGridParamsApi.d.ts +1 -1
  80. package/hooks/features/rows/useGridRowSpanning.d.ts +1 -1
  81. package/hooks/features/rows/useGridRows.d.ts +1 -1
  82. package/hooks/features/rows/useGridRows.js +2 -2
  83. package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
  84. package/hooks/features/scroll/useGridScroll.d.ts +1 -1
  85. package/hooks/features/sorting/gridSortingUtils.d.ts +2 -2
  86. package/hooks/features/sorting/gridSortingUtils.js +2 -2
  87. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  88. package/hooks/features/statePersistence/useGridStatePersistence.d.ts +1 -1
  89. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
  90. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
  91. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +2 -1
  92. package/hooks/features/virtualization/useGridVirtualScroller.js +91 -42
  93. package/hooks/features/virtualization/useGridVirtualization.d.ts +1 -1
  94. package/hooks/utils/useGridApiContext.d.ts +1 -1
  95. package/hooks/utils/useGridApiEventHandler.d.ts +3 -3
  96. package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
  97. package/hooks/utils/useGridPrivateApiContext.d.ts +1 -1
  98. package/hooks/utils/useGridSelector.d.ts +1 -1
  99. package/hooks/utils/useGridVisibleRows.d.ts +7 -5
  100. package/hooks/utils/useGridVisibleRows.js +5 -28
  101. package/index.js +1 -1
  102. package/internals/constants.d.ts +6 -0
  103. package/internals/constants.js +8 -1
  104. package/internals/index.d.ts +1 -0
  105. package/internals/index.js +1 -0
  106. package/internals/utils/attachPinnedStyle.d.ts +2 -0
  107. package/internals/utils/attachPinnedStyle.js +9 -0
  108. package/internals/utils/getPinnedCellOffset.d.ts +3 -3
  109. package/internals/utils/getPinnedCellOffset.js +6 -7
  110. package/internals/utils/index.d.ts +1 -0
  111. package/internals/utils/index.js +2 -1
  112. package/locales/arSD.js +2 -0
  113. package/locales/beBY.js +1 -0
  114. package/locales/bgBG.js +2 -0
  115. package/locales/csCZ.js +2 -0
  116. package/locales/daDK.js +2 -0
  117. package/locales/deDE.js +2 -0
  118. package/locales/elGR.js +2 -0
  119. package/locales/esES.js +2 -0
  120. package/locales/faIR.js +2 -0
  121. package/locales/fiFI.js +2 -0
  122. package/locales/frFR.js +2 -0
  123. package/locales/heIL.js +2 -0
  124. package/locales/hrHR.js +2 -0
  125. package/locales/huHU.js +2 -0
  126. package/locales/isIS.js +2 -0
  127. package/locales/itIT.js +2 -0
  128. package/locales/jaJP.js +2 -0
  129. package/locales/koKR.js +2 -0
  130. package/locales/nbNO.js +2 -0
  131. package/locales/nlNL.js +2 -0
  132. package/locales/nnNO.js +2 -0
  133. package/locales/plPL.js +2 -0
  134. package/locales/ptBR.js +2 -0
  135. package/locales/ptPT.js +2 -0
  136. package/locales/roRO.js +2 -0
  137. package/locales/ruRU.js +2 -0
  138. package/locales/skSK.js +2 -0
  139. package/locales/svSE.js +2 -0
  140. package/locales/trTR.js +2 -0
  141. package/locales/ukUA.js +2 -0
  142. package/locales/urPK.js +2 -0
  143. package/locales/viVN.js +2 -0
  144. package/locales/zhCN.js +2 -0
  145. package/locales/zhHK.js +2 -0
  146. package/locales/zhTW.js +2 -0
  147. package/material/index.js +2 -1
  148. package/models/api/gridLocaleTextApi.d.ts +1 -0
  149. package/models/colDef/gridColDef.d.ts +8 -8
  150. package/models/events/gridEventLookup.d.ts +6 -1
  151. package/models/gridExport.d.ts +1 -1
  152. package/models/gridFilterOperator.d.ts +1 -1
  153. package/models/gridIconSlotsComponent.d.ts +5 -0
  154. package/models/gridStateCommunity.d.ts +4 -0
  155. package/modern/DataGrid/DataGrid.js +4 -5
  156. package/modern/DataGrid/useDataGridComponent.js +1 -1
  157. package/modern/components/GridHeaders.js +2 -2
  158. package/modern/components/GridRow.js +26 -78
  159. package/modern/components/GridSkeletonLoadingOverlay.js +18 -18
  160. package/modern/components/cell/GridCell.js +17 -35
  161. package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  162. package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  163. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  164. package/modern/components/containers/GridRoot.js +14 -6
  165. package/modern/components/containers/GridRootStyles.js +7 -0
  166. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  167. package/modern/components/panel/filterPanel/GridFilterInputDate.js +32 -29
  168. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  169. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  170. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  171. package/modern/components/panel/filterPanel/GridFilterInputValue.js +34 -28
  172. package/modern/components/virtualization/GridVirtualScrollbar.js +11 -12
  173. package/modern/components/virtualization/GridVirtualScroller.js +4 -4
  174. package/modern/constants/gridClasses.js +1 -1
  175. package/modern/constants/localeTextConstants.js +1 -0
  176. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
  177. package/modern/hooks/features/editing/useGridCellEditing.js +1 -1
  178. package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
  179. package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
  180. package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
  181. package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
  182. package/modern/hooks/features/pagination/useGridPagination.js +5 -3
  183. package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
  184. package/modern/hooks/features/rows/gridRowsSelector.js +1 -1
  185. package/modern/hooks/features/rows/useGridRows.js +2 -2
  186. package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
  187. package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
  188. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +91 -42
  189. package/modern/hooks/utils/useGridVisibleRows.js +5 -28
  190. package/modern/index.js +1 -1
  191. package/modern/internals/constants.js +8 -1
  192. package/modern/internals/index.js +1 -0
  193. package/modern/internals/utils/attachPinnedStyle.js +9 -0
  194. package/modern/internals/utils/getPinnedCellOffset.js +6 -7
  195. package/modern/internals/utils/index.js +2 -1
  196. package/modern/locales/arSD.js +2 -0
  197. package/modern/locales/beBY.js +1 -0
  198. package/modern/locales/bgBG.js +2 -0
  199. package/modern/locales/csCZ.js +2 -0
  200. package/modern/locales/daDK.js +2 -0
  201. package/modern/locales/deDE.js +2 -0
  202. package/modern/locales/elGR.js +2 -0
  203. package/modern/locales/esES.js +2 -0
  204. package/modern/locales/faIR.js +2 -0
  205. package/modern/locales/fiFI.js +2 -0
  206. package/modern/locales/frFR.js +2 -0
  207. package/modern/locales/heIL.js +2 -0
  208. package/modern/locales/hrHR.js +2 -0
  209. package/modern/locales/huHU.js +2 -0
  210. package/modern/locales/isIS.js +2 -0
  211. package/modern/locales/itIT.js +2 -0
  212. package/modern/locales/jaJP.js +2 -0
  213. package/modern/locales/koKR.js +2 -0
  214. package/modern/locales/nbNO.js +2 -0
  215. package/modern/locales/nlNL.js +2 -0
  216. package/modern/locales/nnNO.js +2 -0
  217. package/modern/locales/plPL.js +2 -0
  218. package/modern/locales/ptBR.js +2 -0
  219. package/modern/locales/ptPT.js +2 -0
  220. package/modern/locales/roRO.js +2 -0
  221. package/modern/locales/ruRU.js +2 -0
  222. package/modern/locales/skSK.js +2 -0
  223. package/modern/locales/svSE.js +2 -0
  224. package/modern/locales/trTR.js +2 -0
  225. package/modern/locales/ukUA.js +2 -0
  226. package/modern/locales/urPK.js +2 -0
  227. package/modern/locales/viVN.js +2 -0
  228. package/modern/locales/zhCN.js +2 -0
  229. package/modern/locales/zhHK.js +2 -0
  230. package/modern/locales/zhTW.js +2 -0
  231. package/modern/material/index.js +2 -1
  232. package/modern/utils/cellBorderUtils.js +5 -5
  233. package/modern/utils/domUtils.js +7 -2
  234. package/modern/utils/rtlFlipSide.js +22 -0
  235. package/node/DataGrid/DataGrid.js +2 -3
  236. package/node/DataGrid/useDataGridComponent.js +1 -1
  237. package/node/components/GridHeaders.js +2 -2
  238. package/node/components/GridRow.js +25 -77
  239. package/node/components/GridSkeletonLoadingOverlay.js +17 -17
  240. package/node/components/cell/GridCell.js +18 -36
  241. package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  242. package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  243. package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  244. package/node/components/containers/GridRoot.js +14 -6
  245. package/node/components/containers/GridRootStyles.js +7 -0
  246. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  247. package/node/components/panel/filterPanel/GridFilterInputDate.js +31 -28
  248. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  249. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  250. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  251. package/node/components/panel/filterPanel/GridFilterInputValue.js +33 -27
  252. package/node/components/virtualization/GridVirtualScrollbar.js +11 -12
  253. package/node/components/virtualization/GridVirtualScroller.js +4 -4
  254. package/node/constants/gridClasses.js +1 -1
  255. package/node/constants/localeTextConstants.js +1 -0
  256. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -74
  257. package/node/hooks/features/editing/useGridCellEditing.js +1 -1
  258. package/node/hooks/features/editing/useGridRowEditing.js +1 -1
  259. package/node/hooks/features/filter/gridFilterSelector.js +6 -1
  260. package/node/hooks/features/filter/gridFilterUtils.js +3 -3
  261. package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
  262. package/node/hooks/features/pagination/useGridPagination.js +5 -3
  263. package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
  264. package/node/hooks/features/rows/gridRowsSelector.js +1 -1
  265. package/node/hooks/features/rows/useGridRows.js +1 -1
  266. package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
  267. package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +49 -0
  268. package/node/hooks/features/virtualization/useGridVirtualScroller.js +91 -42
  269. package/node/hooks/utils/useGridVisibleRows.js +3 -28
  270. package/node/index.js +1 -1
  271. package/node/internals/constants.js +9 -2
  272. package/node/internals/index.js +12 -0
  273. package/node/internals/utils/attachPinnedStyle.js +15 -0
  274. package/node/internals/utils/getPinnedCellOffset.js +6 -7
  275. package/node/internals/utils/index.js +11 -0
  276. package/node/locales/arSD.js +2 -0
  277. package/node/locales/beBY.js +1 -0
  278. package/node/locales/bgBG.js +2 -0
  279. package/node/locales/csCZ.js +2 -0
  280. package/node/locales/daDK.js +2 -0
  281. package/node/locales/deDE.js +2 -0
  282. package/node/locales/elGR.js +2 -0
  283. package/node/locales/esES.js +2 -0
  284. package/node/locales/faIR.js +2 -0
  285. package/node/locales/fiFI.js +2 -0
  286. package/node/locales/frFR.js +2 -0
  287. package/node/locales/heIL.js +2 -0
  288. package/node/locales/hrHR.js +2 -0
  289. package/node/locales/huHU.js +2 -0
  290. package/node/locales/isIS.js +2 -0
  291. package/node/locales/itIT.js +2 -0
  292. package/node/locales/jaJP.js +2 -0
  293. package/node/locales/koKR.js +2 -0
  294. package/node/locales/nbNO.js +2 -0
  295. package/node/locales/nlNL.js +2 -0
  296. package/node/locales/nnNO.js +2 -0
  297. package/node/locales/plPL.js +2 -0
  298. package/node/locales/ptBR.js +2 -0
  299. package/node/locales/ptPT.js +2 -0
  300. package/node/locales/roRO.js +2 -0
  301. package/node/locales/ruRU.js +2 -0
  302. package/node/locales/skSK.js +2 -0
  303. package/node/locales/svSE.js +2 -0
  304. package/node/locales/trTR.js +2 -0
  305. package/node/locales/ukUA.js +2 -0
  306. package/node/locales/urPK.js +2 -0
  307. package/node/locales/viVN.js +2 -0
  308. package/node/locales/zhCN.js +2 -0
  309. package/node/locales/zhHK.js +2 -0
  310. package/node/locales/zhTW.js +2 -0
  311. package/node/material/index.js +2 -1
  312. package/node/utils/cellBorderUtils.js +5 -5
  313. package/node/utils/domUtils.js +7 -2
  314. package/node/utils/rtlFlipSide.js +29 -0
  315. package/package.json +2 -2
  316. package/utils/cellBorderUtils.d.ts +3 -3
  317. package/utils/cellBorderUtils.js +5 -5
  318. package/utils/createSelector.d.ts +1 -1
  319. package/utils/domUtils.js +7 -2
  320. package/utils/getPublicApiRef.d.ts +1 -1
  321. package/utils/rtlFlipSide.d.ts +2 -0
  322. package/utils/rtlFlipSide.js +22 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,121 @@
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
+
8
123
  ## 8.0.0-alpha.7
9
124
 
10
125
  _Jan 9, 2025_
@@ -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
  });
@@ -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);
@@ -4,15 +4,19 @@ import clsx from 'clsx';
4
4
  import { styled } from '@mui/system';
5
5
  import useForkRef from '@mui/utils/useForkRef';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
+ import { useRtl } from '@mui/system/RtlProvider';
7
8
  import { forwardRef } from '@mui/x-internals/forwardRef';
8
9
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
9
10
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
10
- import { GridPinnedColumnPosition, gridColumnPositionsSelector, gridColumnsTotalWidthSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from "../hooks/index.js";
11
+ import { gridColumnPositionsSelector, gridColumnsTotalWidthSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from "../hooks/index.js";
12
+ import { PinnedColumnPosition } from "../internals/constants.js";
11
13
  import { getDataGridUtilityClass, gridClasses } from "../constants/gridClasses.js";
12
14
  import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
13
15
  import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../utils/cellBorderUtils.js";
14
16
  import { escapeOperandAttributeSelector } from "../utils/domUtils.js";
15
17
  import { GridScrollbarFillerCell } from "./GridScrollbarFillerCell.js";
18
+ import { rtlFlipSide } from "../utils/rtlFlipSide.js";
19
+ import { attachPinnedStyle } from "../internals/utils/index.js";
16
20
  import { jsx as _jsx } from "react/jsx-runtime";
17
21
  const SkeletonOverlay = styled('div', {
18
22
  name: 'MuiDataGrid',
@@ -40,6 +44,7 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
40
44
  const {
41
45
  slots
42
46
  } = rootProps;
47
+ const isRtl = useRtl();
43
48
  const classes = useUtilityClasses({
44
49
  classes: rootProps.classes
45
50
  });
@@ -55,18 +60,12 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
55
60
  const allVisibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
56
61
  const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);
57
62
  const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);
58
- const getPinnedStyle = React.useCallback((computedWidth, index, position) => {
59
- const pinnedOffset = getPinnedCellOffset(position, computedWidth, index, positions, dimensions);
60
- return {
61
- [position]: pinnedOffset
62
- };
63
- }, [dimensions, positions]);
64
63
  const getPinnedPosition = React.useCallback(field => {
65
64
  if (pinnedColumns.left.findIndex(col => col.field === field) !== -1) {
66
- return GridPinnedColumnPosition.LEFT;
65
+ return PinnedColumnPosition.LEFT;
67
66
  }
68
67
  if (pinnedColumns.right.findIndex(col => col.field === field) !== -1) {
69
- return GridPinnedColumnPosition.RIGHT;
68
+ return PinnedColumnPosition.RIGHT;
70
69
  }
71
70
  return undefined;
72
71
  }, [pinnedColumns.left, pinnedColumns.right]);
@@ -77,13 +76,15 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
77
76
  for (let colIndex = 0; colIndex < columns.length; colIndex += 1) {
78
77
  const column = columns[colIndex];
79
78
  const pinnedPosition = getPinnedPosition(column.field);
80
- const isPinnedLeft = pinnedPosition === GridPinnedColumnPosition.LEFT;
81
- const isPinnedRight = pinnedPosition === GridPinnedColumnPosition.RIGHT;
82
- const sectionLength = pinnedPosition ? pinnedColumns[pinnedPosition].length // pinned section
79
+ const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;
80
+ const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;
81
+ const pinnedSide = rtlFlipSide(pinnedPosition, isRtl);
82
+ const sectionLength = pinnedSide ? pinnedColumns[pinnedSide].length // pinned section
83
83
  : columns.length - pinnedColumns.left.length - pinnedColumns.right.length; // middle section
84
- const sectionIndex = pinnedPosition ? pinnedColumns[pinnedPosition].findIndex(col => col.field === column.field) // pinned section
84
+ const sectionIndex = pinnedSide ? pinnedColumns[pinnedSide].findIndex(col => col.field === column.field) // pinned section
85
85
  : colIndex - pinnedColumns.left.length; // middle section
86
- const pinnedStyle = pinnedPosition && getPinnedStyle(column.computedWidth, colIndex, pinnedPosition);
86
+ const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
87
+ const pinnedStyle = attachPinnedStyle({}, isRtl, pinnedPosition, getPinnedCellOffset(pinnedPosition, column.computedWidth, colIndex, positions, dimensions.columnsTotalWidth, scrollbarWidth));
87
88
  const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
88
89
  const showRightBorder = shouldCellShowRightBorder(pinnedPosition, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
89
90
  const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, sectionIndex);
@@ -97,7 +98,6 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
97
98
  width: emptyCellWidth,
98
99
  empty: true
99
100
  }, `skeleton-filler-column-${i}`);
100
- const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
101
101
  const hasScrollbarFiller = isLastColumn && scrollbarWidth !== 0;
102
102
  if (hasFillerBefore) {
103
103
  rowCells.push(emptyCell);
@@ -129,7 +129,7 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
129
129
  }, `skeleton-row-${i}`));
130
130
  }
131
131
  return array;
132
- }, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions.columnsTotalWidth, dimensions.viewportOuterSize.width, dimensions.rowHeight, dimensions.hasScrollY, dimensions.scrollbarSize, getPinnedPosition, getPinnedStyle]);
132
+ }, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions, positions, getPinnedPosition, isRtl]);
133
133
 
134
134
  // Sync the column resize of the overlay columns with the grid
135
135
  const handleColumnResize = params => {
@@ -143,8 +143,8 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
143
143
  }
144
144
  const resizedColIndex = columns.findIndex(col => col.field === colDef.field);
145
145
  const pinnedPosition = getPinnedPosition(colDef.field);
146
- const isPinnedLeft = pinnedPosition === GridPinnedColumnPosition.LEFT;
147
- const isPinnedRight = pinnedPosition === GridPinnedColumnPosition.RIGHT;
146
+ const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;
147
+ const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;
148
148
  const currentWidth = getComputedStyle(cells[0]).getPropertyValue('--width');
149
149
  const delta = parseInt(currentWidth, 10) - width;
150
150
  if (cells) {
@@ -2,12 +2,7 @@ import * as React from 'react';
2
2
  import { GridRowId, GridEditCellProps } from '../../models';
3
3
  import { GridColDef, GridAlignment } from '../../models/colDef/gridColDef';
4
4
  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
- }
5
+ import { PinnedColumnPosition } from '../../internals/constants';
11
6
  export declare const gridPinnedColumnPositionLookup: {
12
7
  1: GridPinnedColumnPosition;
13
8
  2: GridPinnedColumnPosition;
@@ -25,11 +20,10 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
25
20
  disableDragEvents?: boolean;
26
21
  isNotVisible: boolean;
27
22
  editCellState: GridEditCellProps<any> | null;
28
- pinnedOffset: number;
29
- pinnedPosition: PinnedPosition;
30
- sectionIndex: number;
31
- sectionLength: number;
32
- gridHasFiller: boolean;
23
+ pinnedOffset?: number;
24
+ pinnedPosition: PinnedColumnPosition;
25
+ showRightBorder: boolean;
26
+ showLeftBorder: boolean;
33
27
  onClick?: React.MouseEventHandler<HTMLDivElement>;
34
28
  onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
35
29
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
@@ -58,11 +52,10 @@ declare const MemoizedGridCell: React.ForwardRefExoticComponent<GridCellProps> |
58
52
  disableDragEvents?: boolean;
59
53
  isNotVisible: boolean;
60
54
  editCellState: GridEditCellProps<any> | null;
61
- pinnedOffset: number;
62
- pinnedPosition: PinnedPosition;
63
- sectionIndex: number;
64
- sectionLength: number;
65
- gridHasFiller: boolean;
55
+ pinnedOffset?: number;
56
+ pinnedPosition: PinnedColumnPosition;
57
+ showRightBorder: boolean;
58
+ showLeftBorder: boolean;
66
59
  onClick?: React.MouseEventHandler<HTMLDivElement>;
67
60
  onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
68
61
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;