@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.13

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 (348) hide show
  1. package/CHANGELOG.md +299 -0
  2. package/DataGrid/DataGrid.js +31 -22
  3. package/DataGrid/useDataGridProps.js +1 -1
  4. package/colDef/gridCheckboxSelectionColDef.js +1 -3
  5. package/components/GridFooter.js +1 -1
  6. package/components/GridHeader.js +1 -1
  7. package/components/GridPagination.js +5 -6
  8. package/components/GridRowCount.js +4 -5
  9. package/components/GridScrollArea.js +4 -3
  10. package/components/GridSelectedRowCount.js +5 -6
  11. package/components/GridShadowScrollArea.d.ts +8 -0
  12. package/components/GridShadowScrollArea.js +82 -0
  13. package/components/cell/GridEditInputCell.js +2 -3
  14. package/components/columnSelection/GridHeaderCheckbox.js +51 -17
  15. package/components/columnsManagement/GridColumnsManagement.js +59 -61
  16. package/components/containers/GridOverlay.js +6 -8
  17. package/components/containers/GridRoot.js +4 -2
  18. package/components/containers/GridRootStyles.d.ts +1 -2
  19. package/components/containers/GridRootStyles.js +77 -100
  20. package/components/containers/GridToolbarContainer.js +5 -6
  21. package/components/menu/GridMenu.js +7 -6
  22. package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
  23. package/components/panel/GridPanel.js +18 -20
  24. package/components/panel/GridPanelContent.js +6 -8
  25. package/components/panel/GridPanelFooter.js +5 -6
  26. package/components/panel/GridPanelHeader.js +4 -5
  27. package/components/panel/filterPanel/GridFilterForm.js +13 -20
  28. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  29. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  30. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  31. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
  32. package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  33. package/components/toolbar/GridToolbarFilterButton.js +5 -6
  34. package/components/toolbar/GridToolbarQuickFilter.js +23 -30
  35. package/components/virtualization/GridVirtualScrollbar.js +8 -5
  36. package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  37. package/constants/cssVariables.d.ts +294 -0
  38. package/constants/cssVariables.js +168 -0
  39. package/constants/dataGridPropsDefaultValues.js +1 -0
  40. package/constants/defaultGridSlotsComponents.js +1 -1
  41. package/constants/gridClasses.d.ts +13 -0
  42. package/constants/gridClasses.js +1 -1
  43. package/context/GridContextProvider.js +4 -1
  44. package/esm/DataGrid/DataGrid.js +31 -22
  45. package/esm/DataGrid/useDataGridProps.js +1 -1
  46. package/esm/colDef/gridCheckboxSelectionColDef.js +1 -3
  47. package/esm/components/GridFooter.js +2 -2
  48. package/esm/components/GridHeader.js +1 -1
  49. package/esm/components/GridPagination.js +5 -6
  50. package/esm/components/GridRowCount.js +4 -5
  51. package/esm/components/GridScrollArea.js +2 -1
  52. package/esm/components/GridSelectedRowCount.js +5 -6
  53. package/esm/components/GridShadowScrollArea.d.ts +8 -0
  54. package/esm/components/GridShadowScrollArea.js +74 -0
  55. package/esm/components/cell/GridEditInputCell.js +2 -3
  56. package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
  57. package/esm/components/columnsManagement/GridColumnsManagement.js +60 -62
  58. package/esm/components/containers/GridOverlay.js +6 -8
  59. package/esm/components/containers/GridRoot.js +4 -2
  60. package/esm/components/containers/GridRootStyles.d.ts +1 -2
  61. package/esm/components/containers/GridRootStyles.js +78 -101
  62. package/esm/components/containers/GridToolbarContainer.js +5 -6
  63. package/esm/components/menu/GridMenu.js +7 -6
  64. package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
  65. package/esm/components/panel/GridPanel.js +18 -20
  66. package/esm/components/panel/GridPanelContent.js +6 -8
  67. package/esm/components/panel/GridPanelFooter.js +5 -6
  68. package/esm/components/panel/GridPanelHeader.js +4 -5
  69. package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
  70. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  71. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  72. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  73. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
  74. package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  75. package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
  76. package/esm/components/toolbar/GridToolbarQuickFilter.js +23 -30
  77. package/esm/components/virtualization/GridVirtualScrollbar.js +3 -1
  78. package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  79. package/esm/constants/cssVariables.d.ts +294 -0
  80. package/esm/constants/cssVariables.js +161 -0
  81. package/esm/constants/dataGridPropsDefaultValues.js +1 -0
  82. package/esm/constants/defaultGridSlotsComponents.js +2 -2
  83. package/esm/constants/gridClasses.d.ts +13 -0
  84. package/esm/constants/gridClasses.js +1 -1
  85. package/esm/context/GridContextProvider.js +4 -1
  86. package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
  87. package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  88. package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
  89. package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  90. package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  91. package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
  92. package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  93. package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
  94. package/esm/hooks/features/columns/index.d.ts +1 -1
  95. package/esm/hooks/features/columns/index.js +1 -1
  96. package/esm/hooks/features/columns/useGridColumns.js +4 -2
  97. package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  98. package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
  99. package/esm/hooks/features/dataSource/index.d.ts +2 -0
  100. package/esm/hooks/features/dataSource/index.js +2 -0
  101. package/esm/hooks/features/dataSource/models.d.ts +1 -1
  102. package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  103. package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  104. package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
  105. package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
  106. package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
  107. package/esm/hooks/features/export/utils.js +4 -2
  108. package/esm/hooks/features/focus/useGridFocus.js +3 -2
  109. package/esm/hooks/features/index.d.ts +1 -1
  110. package/esm/hooks/features/index.js +1 -1
  111. package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  112. package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  113. package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
  114. package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
  115. package/esm/hooks/features/rowSelection/utils.js +11 -11
  116. package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  117. package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  118. package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
  119. package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
  120. package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  121. package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
  122. package/esm/hooks/features/rows/useGridRows.js +7 -7
  123. package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
  124. package/esm/hooks/utils/useGridSelector.js +4 -1
  125. package/esm/hooks/utils/useIsSSR.js +4 -1
  126. package/esm/index.js +1 -1
  127. package/esm/internals/index.d.ts +2 -1
  128. package/esm/internals/index.js +2 -1
  129. package/esm/internals/utils/propValidation.js +1 -1
  130. package/esm/locales/bnBD.d.ts +2 -0
  131. package/esm/locales/bnBD.js +167 -0
  132. package/esm/locales/deDE.js +3 -5
  133. package/esm/locales/huHU.js +10 -13
  134. package/esm/locales/index.d.ts +1 -0
  135. package/esm/locales/index.js +1 -0
  136. package/esm/locales/ruRU.js +17 -21
  137. package/esm/material/index.d.ts +1 -0
  138. package/esm/material/index.js +164 -49
  139. package/esm/material/variables.d.ts +5 -0
  140. package/esm/material/variables.js +89 -0
  141. package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
  142. package/esm/models/api/gridSortApi.d.ts +1 -1
  143. package/esm/models/configuration/gridConfiguration.d.ts +7 -1
  144. package/esm/models/gridBaseSlots.d.ts +56 -6
  145. package/esm/models/gridDataSource.d.ts +9 -4
  146. package/esm/models/gridRowSelectionManager.d.ts +9 -0
  147. package/esm/models/gridRowSelectionManager.js +36 -0
  148. package/esm/models/gridRowSelectionModel.d.ts +4 -2
  149. package/esm/models/gridSlotsComponent.d.ts +7 -27
  150. package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
  151. package/esm/models/gridSortModel.d.ts +1 -1
  152. package/esm/models/index.d.ts +2 -1
  153. package/esm/models/index.js +2 -3
  154. package/esm/models/props/DataGridProps.d.ts +22 -17
  155. package/esm/utils/css/context.d.ts +14 -0
  156. package/esm/utils/css/context.js +54 -0
  157. package/esm/utils/index.d.ts +2 -1
  158. package/esm/utils/index.js +1 -1
  159. package/hooks/features/clipboard/useGridClipboard.js +3 -2
  160. package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  161. package/hooks/features/columnResize/useGridColumnResize.js +28 -27
  162. package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  163. package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  164. package/hooks/features/columns/gridColumnsSelector.js +9 -1
  165. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  166. package/hooks/features/columns/gridColumnsUtils.js +6 -3
  167. package/hooks/features/columns/index.d.ts +1 -1
  168. package/hooks/features/columns/index.js +94 -10
  169. package/hooks/features/columns/useGridColumns.js +4 -2
  170. package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  171. package/hooks/features/dataSource/gridDataSourceError.js +40 -0
  172. package/hooks/features/dataSource/index.d.ts +2 -0
  173. package/hooks/features/dataSource/index.js +25 -0
  174. package/hooks/features/dataSource/models.d.ts +1 -1
  175. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  176. package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  177. package/hooks/features/dimensions/useGridDimensions.js +19 -18
  178. package/hooks/features/editing/useGridCellEditing.js +10 -9
  179. package/hooks/features/editing/useGridRowEditing.js +11 -10
  180. package/hooks/features/export/utils.js +4 -2
  181. package/hooks/features/focus/useGridFocus.js +8 -7
  182. package/hooks/features/index.d.ts +1 -1
  183. package/hooks/features/index.js +11 -28
  184. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  185. package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  186. package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
  187. package/hooks/features/rowSelection/utils.d.ts +2 -2
  188. package/hooks/features/rowSelection/utils.js +10 -10
  189. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  190. package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  191. package/hooks/features/rows/gridRowsUtils.js +10 -1
  192. package/hooks/features/rows/useGridParamsApi.js +2 -8
  193. package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  194. package/hooks/features/rows/useGridRows.d.ts +2 -2
  195. package/hooks/features/rows/useGridRows.js +7 -7
  196. package/hooks/features/virtualization/useGridVirtualScroller.js +21 -25
  197. package/hooks/utils/useGridSelector.js +6 -2
  198. package/hooks/utils/useIsSSR.js +6 -2
  199. package/index.js +1 -1
  200. package/internals/index.d.ts +2 -1
  201. package/internals/index.js +15 -0
  202. package/internals/utils/propValidation.js +1 -1
  203. package/locales/bnBD.d.ts +2 -0
  204. package/locales/bnBD.js +173 -0
  205. package/locales/deDE.js +3 -5
  206. package/locales/huHU.js +10 -13
  207. package/locales/index.d.ts +1 -0
  208. package/locales/index.js +11 -0
  209. package/locales/ruRU.js +17 -21
  210. package/material/index.d.ts +1 -0
  211. package/material/index.js +170 -49
  212. package/material/variables.d.ts +5 -0
  213. package/material/variables.js +95 -0
  214. package/models/api/gridRowSelectionApi.d.ts +4 -2
  215. package/models/api/gridSortApi.d.ts +1 -1
  216. package/models/configuration/gridConfiguration.d.ts +7 -1
  217. package/models/gridBaseSlots.d.ts +56 -6
  218. package/models/gridDataSource.d.ts +9 -4
  219. package/models/gridRowSelectionManager.d.ts +9 -0
  220. package/models/gridRowSelectionManager.js +43 -0
  221. package/models/gridRowSelectionModel.d.ts +4 -2
  222. package/models/gridSlotsComponent.d.ts +7 -27
  223. package/models/gridSlotsComponentsProps.d.ts +3 -11
  224. package/models/gridSortModel.d.ts +1 -1
  225. package/models/index.d.ts +2 -1
  226. package/models/index.js +34 -11
  227. package/models/props/DataGridProps.d.ts +22 -17
  228. package/modern/DataGrid/DataGrid.js +31 -22
  229. package/modern/DataGrid/useDataGridProps.js +1 -1
  230. package/modern/colDef/gridCheckboxSelectionColDef.js +1 -3
  231. package/modern/components/GridFooter.js +2 -2
  232. package/modern/components/GridHeader.js +1 -1
  233. package/modern/components/GridPagination.js +5 -6
  234. package/modern/components/GridRowCount.js +4 -5
  235. package/modern/components/GridScrollArea.js +2 -1
  236. package/modern/components/GridSelectedRowCount.js +5 -6
  237. package/modern/components/GridShadowScrollArea.d.ts +8 -0
  238. package/modern/components/GridShadowScrollArea.js +74 -0
  239. package/modern/components/cell/GridEditInputCell.js +2 -3
  240. package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
  241. package/modern/components/columnsManagement/GridColumnsManagement.js +60 -62
  242. package/modern/components/containers/GridOverlay.js +6 -8
  243. package/modern/components/containers/GridRoot.js +4 -2
  244. package/modern/components/containers/GridRootStyles.d.ts +1 -2
  245. package/modern/components/containers/GridRootStyles.js +78 -101
  246. package/modern/components/containers/GridToolbarContainer.js +5 -6
  247. package/modern/components/menu/GridMenu.js +7 -6
  248. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
  249. package/modern/components/panel/GridPanel.js +18 -20
  250. package/modern/components/panel/GridPanelContent.js +6 -8
  251. package/modern/components/panel/GridPanelFooter.js +5 -6
  252. package/modern/components/panel/GridPanelHeader.js +4 -5
  253. package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
  254. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  255. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  256. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  257. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
  258. package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  259. package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
  260. package/modern/components/toolbar/GridToolbarQuickFilter.js +23 -30
  261. package/modern/components/virtualization/GridVirtualScrollbar.js +3 -1
  262. package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  263. package/modern/constants/cssVariables.d.ts +294 -0
  264. package/modern/constants/cssVariables.js +161 -0
  265. package/modern/constants/dataGridPropsDefaultValues.js +1 -0
  266. package/modern/constants/defaultGridSlotsComponents.js +2 -2
  267. package/modern/constants/gridClasses.d.ts +13 -0
  268. package/modern/constants/gridClasses.js +1 -1
  269. package/modern/context/GridContextProvider.js +4 -1
  270. package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
  271. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  272. package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
  273. package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  274. package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  275. package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
  276. package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  277. package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
  278. package/modern/hooks/features/columns/index.d.ts +1 -1
  279. package/modern/hooks/features/columns/index.js +1 -1
  280. package/modern/hooks/features/columns/useGridColumns.js +4 -2
  281. package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  282. package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
  283. package/modern/hooks/features/dataSource/index.d.ts +2 -0
  284. package/modern/hooks/features/dataSource/index.js +2 -0
  285. package/modern/hooks/features/dataSource/models.d.ts +1 -1
  286. package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  287. package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  288. package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
  289. package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
  290. package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
  291. package/modern/hooks/features/export/utils.js +4 -2
  292. package/modern/hooks/features/focus/useGridFocus.js +3 -2
  293. package/modern/hooks/features/index.d.ts +1 -1
  294. package/modern/hooks/features/index.js +1 -1
  295. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  296. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  297. package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
  298. package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
  299. package/modern/hooks/features/rowSelection/utils.js +11 -11
  300. package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  301. package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  302. package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
  303. package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
  304. package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  305. package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
  306. package/modern/hooks/features/rows/useGridRows.js +7 -7
  307. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
  308. package/modern/hooks/utils/useGridSelector.js +4 -1
  309. package/modern/hooks/utils/useIsSSR.js +4 -1
  310. package/modern/index.js +1 -1
  311. package/modern/internals/index.d.ts +2 -1
  312. package/modern/internals/index.js +2 -1
  313. package/modern/internals/utils/propValidation.js +1 -1
  314. package/modern/locales/bnBD.d.ts +2 -0
  315. package/modern/locales/bnBD.js +167 -0
  316. package/modern/locales/deDE.js +3 -5
  317. package/modern/locales/huHU.js +10 -13
  318. package/modern/locales/index.d.ts +1 -0
  319. package/modern/locales/index.js +1 -0
  320. package/modern/locales/ruRU.js +17 -21
  321. package/modern/material/index.d.ts +1 -0
  322. package/modern/material/index.js +164 -49
  323. package/modern/material/variables.d.ts +5 -0
  324. package/modern/material/variables.js +89 -0
  325. package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
  326. package/modern/models/api/gridSortApi.d.ts +1 -1
  327. package/modern/models/configuration/gridConfiguration.d.ts +7 -1
  328. package/modern/models/gridBaseSlots.d.ts +56 -6
  329. package/modern/models/gridDataSource.d.ts +9 -4
  330. package/modern/models/gridRowSelectionManager.d.ts +9 -0
  331. package/modern/models/gridRowSelectionManager.js +36 -0
  332. package/modern/models/gridRowSelectionModel.d.ts +4 -2
  333. package/modern/models/gridSlotsComponent.d.ts +7 -27
  334. package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
  335. package/modern/models/gridSortModel.d.ts +1 -1
  336. package/modern/models/index.d.ts +2 -1
  337. package/modern/models/index.js +2 -3
  338. package/modern/models/props/DataGridProps.d.ts +22 -17
  339. package/modern/utils/css/context.d.ts +14 -0
  340. package/modern/utils/css/context.js +54 -0
  341. package/modern/utils/index.d.ts +2 -1
  342. package/modern/utils/index.js +1 -1
  343. package/package.json +2 -2
  344. package/tsconfig.build.tsbuildinfo +1 -1
  345. package/utils/css/context.d.ts +14 -0
  346. package/utils/css/context.js +64 -0
  347. package/utils/index.d.ts +2 -1
  348. package/utils/index.js +8 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,305 @@
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.13
9
+
10
+ _Feb 28, 2025_
11
+
12
+ We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Decouple `margin` and `axis-size`. A new API to support multiple axes (#16418) @JCQuintas
15
+ - 🗺️ Added Bangla (bn-BD) locale
16
+ - 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
17
+
18
+ Special thanks go out to the community members for their contributions:
19
+ @denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
20
+ Following are all team members who have contributed to this release:
21
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
22
+
23
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
24
+
25
+ ### Data Grid
26
+
27
+ #### Breaking changes
28
+
29
+ - The `slots.baseFormControl` component was removed.
30
+
31
+ - The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
32
+
33
+ 1. If an initial `columnVisibilityModel` is provided, it resets to that model.
34
+ 2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
35
+ 3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
36
+
37
+ To revert to the previous behavior, provide a custom component to the `slots.columnsManagement`.
38
+
39
+ - The deprecated `LicenseInfo` export has been removed from the `@mui/x-data-grid-pro` and `@mui/x-data-grid-premium` packages.
40
+ You have to import it from `@mui/x-license` instead:
41
+
42
+ ```diff
43
+ - import { LicenseInfo } from '@mui/x-data-grid-pro';
44
+ - import { LicenseInfo } from '@mui/x-data-grid-premium';
45
+ + import { LicenseInfo } from '@mui/x-license';
46
+
47
+ LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
48
+ ```
49
+
50
+ - The row selection model has been changed from `GridRowId[]` to `{ type: 'include' | 'exclude'; ids: Set<GridRowId> }`.
51
+ Using `Set` allows for a more efficient row selection management.
52
+ The `exclude` selection type allows to select all rows except the ones in the `ids` set.
53
+
54
+ This change impacts the following props:
55
+
56
+ - `rowSelectionModel`
57
+ - `onRowSelectionModelChange`
58
+ - `initialState.rowSelectionModel`
59
+
60
+ ```diff
61
+ - const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]);
62
+ + const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
63
+ ```
64
+
65
+ This change also impacts the `gridRowSelectionStateSelector` selector.
66
+ For convenience, use the `gridRowSelectionManagerSelector` selector to handle both selection types:
67
+
68
+ ```diff
69
+ - const rowSelection = gridRowSelectionStateSelector(apiRef);
70
+ - const isRowSelected = rowSelection.includes(rowId);
71
+ + const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
72
+ + const isRowSelected = rowSelectionManager.has(rowId);
73
+ ```
74
+
75
+ There is also a `createRowSelectionManager` utility function that can be used to manage the row selection:
76
+
77
+ ```ts
78
+ const rowSelectionManager = createRowSelectionManager({
79
+ type: 'include',
80
+ ids: new Set(),
81
+ });
82
+ rowSelectionManager.select(rowId);
83
+ rowSelectionManager.unselect(rowId);
84
+ rowSelectionManager.has(rowId);
85
+ ```
86
+
87
+ - The `selectedIdsLookupSelector` selector has been removed. Use the `gridRowSelectionManagerSelector` or `gridRowSelectionStateSelector` selectors instead.
88
+ - The `selectedGridRowsSelector` has been renamed to `gridRowSelectionIdsSelector`.
89
+ - The `selectedGridRowsCountSelector` has been renamed to `gridRowSelectionCountSelector`.
90
+
91
+ - The data source feature and its related props are now stable.
92
+
93
+ ```diff
94
+ <DataGridPro
95
+ - unstable_dataSource={dataSource}
96
+ - unstable_dataSourceCache={cache}
97
+ - unstable_lazyLoading
98
+ - unstable_lazyLoadingRequestThrottleMs={100}
99
+ + dataSource={dataSource}
100
+ + dataSourceCache={cache}
101
+ + lazyLoading
102
+ + lazyLoadingRequestThrottleMs={100}
103
+ />
104
+ ```
105
+
106
+ - The data source API is now stable.
107
+
108
+ ```diff
109
+ - apiRef.current.unstable_dataSource.getRows()
110
+ + apiRef.current.dataSource.getRows()
111
+ ```
112
+
113
+ - The signature of `unstable_onDataSourceError()` has been updated to support future use-cases.
114
+
115
+ ```diff
116
+ <DataGrid
117
+ - unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => {
118
+ - if (params.filterModel) {
119
+ - // do something
120
+ - }
121
+ - }}
122
+ + unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => {
123
+ + if (error instanceof GridGetRowsError && error.params.filterModel) {
124
+ + // do something
125
+ + }
126
+ + }}
127
+ />
128
+ ```
129
+
130
+ - Fix the type of the `GridSortModel` to allow readonly arrays.
131
+
132
+ - `GridSortItem` interface is not exported anymore.
133
+
134
+ - The `showToolbar` prop is now required to display the toolbar.
135
+
136
+ It is no longer necessary to pass `GridToolbar` as a slot to display the default toolbar.
137
+
138
+ ```diff
139
+ <DataGrid
140
+ + showToolbar
141
+ - slots={{
142
+ - toolbar: GridToolbar,
143
+ - }}
144
+ />
145
+ ```
146
+
147
+ #### `@mui/x-data-grid@8.0.0-alpha.13`
148
+
149
+ - [DataGrid] Add `showToolbar` prop to enable default toolbar (#16687) @KenanYusuf
150
+ - [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
151
+ - [DataGrid] Column management design updates (#16630) @KenanYusuf
152
+ - [DataGrid] Fix `showColumnVerticalBorder` prop (#16715) @KenanYusuf
153
+ - [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
154
+ - [DataGrid] Fix: base `Select` menuprops `onClose()` (#16643) @romgrk
155
+ - [DataGrid] Make `GridSortItem` internal (#16732) @arminmeh
156
+ - [DataGrid] Make data source stable (#16710) @MBilalShafi
157
+ - [DataGrid] Reshape row selection model (#15651) @cherniavskii
158
+ - [DataGrid] Replace `sx` prop usage with `styled()` components (#16665) @KenanYusuf
159
+ - [DataGrid] Refactor: create base `Autocomplete` (#16390) @romgrk
160
+ - [DataGrid] Refactor: remove base form control (#16634) @romgrk
161
+ - [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
162
+ - [DataGrid] Refactor: remove material containers (#16633) @romgrk
163
+ - [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
164
+ - [DataGrid] Update the signature of the `onDataSourceError()` callback (#16718) @MBilalShafi
165
+ - [DataGrid] Use readonly array for the `GridSortModel` (#16627) @pcorpet
166
+ - [DataGrid] Fix the popper focus trap (#16736) @romgrk
167
+ - [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
168
+ - [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
169
+ - [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
170
+
171
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
172
+
173
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.13`, plus:
174
+
175
+ - [DataGridPro] Remove `LicenseInfo` reexports (#16671) @cherniavskii
176
+
177
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.13` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
178
+
179
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.13`, plus:
180
+
181
+ - [DataGridPremium] Use `valueGetter` to get row group keys (#16016) @cherniavskii
182
+
183
+ ### Date and Time Pickers
184
+
185
+ #### Breaking changes
186
+
187
+ - The `<DateRangePicker />` now uses a `dialog` instead of a `tooltip` to render their view when used with a single input range field.
188
+
189
+ #### `@mui/x-date-pickers@8.0.0-alpha.13`
190
+
191
+ - [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
192
+ - [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
193
+ - [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
194
+ - [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
195
+ - [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
196
+
197
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
198
+
199
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.13`.
200
+
201
+ ### Charts
202
+
203
+ #### Breaking changes
204
+
205
+ - Charts array inputs are now `readonly`. Allowing externally defined `as const` to be used as a prop value of the React component.
206
+
207
+ ```tsx
208
+ const xAxis = [{ position: 'bottom' }] as const
209
+ <BarChart xAxis={xAxis} />
210
+ ```
211
+
212
+ - Replace `topAxis`, `rightAxis`, `bottomAxis` and `leftAxis` props by the `position` property in the axis config.
213
+ If you were using them to place axis, set the `position` property to the corresponding value `'top' | 'right' | 'bottom' | 'left'`.
214
+ If you were disabling an axis by setting it to `null`, set its `position` to `'none'`.
215
+
216
+ ```diff
217
+ <LineChart
218
+ yAxis={[
219
+ {
220
+ scaleType: 'linear',
221
+ + position: 'right',
222
+ },
223
+ ]}
224
+ series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]}
225
+ height={400}
226
+ - rightAxis={{}}
227
+ />
228
+ ```
229
+
230
+ - Remove `position` prop from `ChartsXAxis` and `ChartsYAxis`.
231
+ The `position` prop has been removed from the `ChartsXAxis` and `ChartsYAxis` components. Configure it directly in the axis config.
232
+
233
+ ```diff
234
+ <ChartContainer
235
+ yAxis={[
236
+ {
237
+ id: 'my-axis',
238
+ + position: 'right',
239
+ },
240
+ ]}
241
+ >
242
+ - <ChartsYAxis axisId="my-axis" position="right" />
243
+ + <ChartsYAxis axisId="my-axis" />
244
+ </ChartContainer>
245
+ ```
246
+
247
+ - Add `minTickLabelGap` to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
248
+
249
+ #### `@mui/x-charts@8.0.0-alpha.13`
250
+
251
+ - [charts] Accept component in `labelMarkType` (#16739) @bernardobelchior
252
+ - [charts] Add `minTickLabelGap` to x-axis (#16548) @bernardobelchior
253
+ - [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
254
+ - [charts] Decouple `margin` and `axis-size` (#16418) @JCQuintas
255
+ - [charts] Display slider tooltip on demos (#16723) @JCQuintas
256
+ - [charts] Fix composition docs link (#16761) @bernardobelchior
257
+ - [charts] Fix default label measurement being off (#16635) @bernardobelchior
258
+ - [charts] Fix is highlighted memoization (#16592) @alexfauquette
259
+ - [charts] Fix missing `theme.shape` error in the tooltip (#16748) @alexfauquette
260
+ - [charts] Fix typo in error message (#16641) @JCQuintas
261
+ - [charts] Improve axis size docs (#16673) @JCQuintas
262
+ - [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
263
+ - [charts] Make `defaultizeAxis` function type-safe (#16642) @JCQuintas
264
+ - [charts] Make `series.data` readonly (#16645) @JCQuintas
265
+ - [charts] Migrate `ChartsUsageDemo` to TSX and removed NoSnap (#16686) @JCQuintas
266
+ - [charts] Prevent `position='none'` axes from rendering (#16727) @JCQuintas
267
+ - [charts] Make array inputs readonly (#16632) @JCQuintas
268
+ - [charts] Remove state initialization hack (#16520) @alexfauquette
269
+ - [charts] Remove redundant default axis (#16734) @bernardobelchior
270
+
271
+ #### `@mui/x-charts-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
272
+
273
+ Same changes as in `@mui/x-charts@8.0.0-alpha.13`, plus:
274
+
275
+ - [charts-pro] Add back zoom control (#16550) @alexfauquette
276
+
277
+ ### Tree View
278
+
279
+ #### `@mui/x-tree-view@8.0.0-alpha.13`
280
+
281
+ Internal changes.
282
+
283
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
284
+
285
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.13`.
286
+
287
+ ### `@mui/x-codemod@8.0.0-alpha.13`
288
+
289
+ - [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
290
+ - [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
291
+
292
+ ### Docs
293
+
294
+ - [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
295
+ - [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
296
+ - [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
297
+ - [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
298
+ - [docs] Improve Pickers migration page (#16682) @LukasTy
299
+ - [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
300
+ - [code-infra] Charts changes for `vitest` (#16755) @JCQuintas
301
+ - [code-infra] General packages changes for `vitest` (#16757) @JCQuintas
302
+ - [code-infra] Native Node.js ESM (#16603) @Janpot
303
+ - [infra] Update contributor acknowledgment wording (#16751) @michelengelen
304
+ - [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
305
+ - [x-license] Introduce usage telemetry (#13530) @hasdfa
306
+
8
307
  ## 8.0.0-alpha.12
9
308
 
10
309
  _Feb 17, 2025_
@@ -18,9 +18,11 @@ var _GridContextProvider = require("../context/GridContextProvider");
18
18
  var _useDataGridComponent = require("./useDataGridComponent");
19
19
  var _useDataGridProps = require("./useDataGridProps");
20
20
  var _propValidation = require("../internals/utils/propValidation");
21
+ var _variables = require("../material/variables");
21
22
  var _jsxRuntime = require("react/jsx-runtime");
22
23
  const configuration = {
23
24
  hooks: {
25
+ useCSSVariables: _variables.useMaterialCSSVariables,
24
26
  useGridAriaAttributes: _useGridAriaAttributes.useGridAriaAttributes,
25
27
  useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributes
26
28
  }
@@ -145,6 +147,21 @@ DataGridRaw.propTypes = {
145
147
  * If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
146
148
  */
147
149
  columnVisibilityModel: _propTypes.default.object,
150
+ /**
151
+ * The data source object.
152
+ */
153
+ dataSource: _propTypes.default.shape({
154
+ getRows: _propTypes.default.func.isRequired,
155
+ updateRow: _propTypes.default.func
156
+ }),
157
+ /**
158
+ * Data source cache object.
159
+ */
160
+ dataSourceCache: _propTypes.default.shape({
161
+ clear: _propTypes.default.func.isRequired,
162
+ get: _propTypes.default.func.isRequired,
163
+ set: _propTypes.default.func.isRequired
164
+ }),
148
165
  /**
149
166
  * Set the density of the Data Grid.
150
167
  * @default "standard"
@@ -497,6 +514,11 @@ DataGridRaw.propTypes = {
497
514
  * @param {GridCallbackDetails} details Additional details for this callback.
498
515
  */
499
516
  onColumnWidthChange: _propTypes.default.func,
517
+ /**
518
+ * Callback fired when a data source request fails.
519
+ * @param {GridGetRowsError | GridUpdateRowError} error The data source error object.
520
+ */
521
+ onDataSourceError: _propTypes.default.func,
500
522
  /**
501
523
  * Callback fired when the density changes.
502
524
  * @param {GridDensity} density New density value.
@@ -694,7 +716,10 @@ DataGridRaw.propTypes = {
694
716
  /**
695
717
  * Sets the row selection model of the Data Grid.
696
718
  */
697
- rowSelectionModel: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired), _propTypes.default.number, _propTypes.default.string]),
719
+ rowSelectionModel: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
720
+ ids: _propTypes.default.instanceOf(Set).isRequired,
721
+ type: _propTypes.default.oneOf(['exclude', 'include']).isRequired
722
+ }),
698
723
  /**
699
724
  * Sets the type of space between rows added by `getRowSpacing`.
700
725
  * @default "margin"
@@ -719,6 +744,11 @@ DataGridRaw.propTypes = {
719
744
  * @default false
720
745
  */
721
746
  showColumnVerticalBorder: _propTypes.default.bool,
747
+ /**
748
+ * If `true`, the toolbar is displayed.
749
+ * @default false
750
+ */
751
+ showToolbar: _propTypes.default.bool,
722
752
  /**
723
753
  * Overridable components props dynamically passed to the component at rendering.
724
754
  */
@@ -750,27 +780,6 @@ DataGridRaw.propTypes = {
750
780
  * The system prop that allows defining system overrides as well as additional CSS styles.
751
781
  */
752
782
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
753
- /**
754
- * The data source object.
755
- */
756
- unstable_dataSource: _propTypes.default.shape({
757
- getRows: _propTypes.default.func.isRequired,
758
- updateRow: _propTypes.default.func
759
- }),
760
- /**
761
- * Data source cache object.
762
- */
763
- unstable_dataSourceCache: _propTypes.default.shape({
764
- clear: _propTypes.default.func.isRequired,
765
- get: _propTypes.default.func.isRequired,
766
- set: _propTypes.default.func.isRequired
767
- }),
768
- /**
769
- * Callback fired when the data source request fails.
770
- * @param {Error} error The error object.
771
- * @param {GridGetRowsParams} params With all properties from [[GridGetRowsParams]].
772
- */
773
- unstable_onDataSourceError: _propTypes.default.func,
774
783
  /**
775
784
  * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
776
785
  * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
@@ -25,7 +25,7 @@ const DATA_GRID_FORCED_PROPS = {
25
25
  signature: 'DataGrid',
26
26
  unstable_listView: false
27
27
  };
28
- const getDataGridForcedProps = themedProps => (0, _extends2.default)({}, DATA_GRID_FORCED_PROPS, themedProps.unstable_dataSource ? {
28
+ const getDataGridForcedProps = themedProps => (0, _extends2.default)({}, DATA_GRID_FORCED_PROPS, themedProps.dataSource ? {
29
29
  filterMode: 'server',
30
30
  sortingMode: 'server',
31
31
  paginationMode: 'server'
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _GridCellCheckboxRenderer = require("../components/columnSelection/GridCellCheckboxRenderer");
12
12
  var _GridHeaderCheckbox = require("../components/columnSelection/GridHeaderCheckbox");
13
- var _gridRowSelectionSelector = require("../hooks/features/rowSelection/gridRowSelectionSelector");
14
13
  var _gridBooleanColDef = require("./gridBooleanColDef");
15
14
  var _gridPropsSelectors = require("../hooks/core/gridPropsSelectors");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
@@ -30,9 +29,8 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = exports.GRID_CHECKBOX_SELECTION_COL_DEF
30
29
  getApplyQuickFilterFn: undefined,
31
30
  display: 'flex',
32
31
  valueGetter: (value, row, column, apiRef) => {
33
- const selectionLookup = (0, _gridRowSelectionSelector.selectedIdsLookupSelector)(apiRef);
34
32
  const rowId = (0, _gridPropsSelectors.gridRowIdSelector)(apiRef, row);
35
- return selectionLookup[rowId] !== undefined;
33
+ return apiRef.current.isRowSelected(rowId);
36
34
  },
37
35
  renderHeader: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderCheckbox.GridHeaderCheckbox, (0, _extends2.default)({}, params)),
38
36
  renderCell: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridCellCheckboxRenderer.GridCellCheckboxRenderer, (0, _extends2.default)({}, params))
@@ -23,7 +23,7 @@ const GridFooter = exports.GridFooter = (0, _forwardRef.forwardRef)(function Gri
23
23
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
24
24
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
25
25
  const totalTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridTopLevelRowCountSelector);
26
- const selectedRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSelectionSelector.selectedGridRowsCountSelector);
26
+ const selectedRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSelectionSelector.gridRowSelectionCountSelector);
27
27
  const visibleTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridFilterSelector.gridFilteredTopLevelRowCountSelector);
28
28
  const selectedRowCountElement = !rootProps.hideFooterSelectedRowCount && selectedRowCount > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridSelectedRowCount.GridSelectedRowCount, {
29
29
  selectedRowCount: selectedRowCount
@@ -14,6 +14,6 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
  function GridHeader() {
15
15
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
16
16
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
17
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPreferencesPanel.GridPreferencesPanel, {}), rootProps.slots.toolbar && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.toolbar, (0, _extends2.default)({}, rootProps.slotProps?.toolbar))]
17
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPreferencesPanel.GridPreferencesPanel, {}), rootProps.showToolbar && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.toolbar, (0, _extends2.default)({}, rootProps.slotProps?.toolbar))]
18
18
  });
19
19
  }
@@ -12,30 +12,29 @@ var _styles = require("@mui/material/styles");
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _TablePagination = _interopRequireWildcard(require("@mui/material/TablePagination"));
14
14
  var _forwardRef = require("@mui/x-internals/forwardRef");
15
+ var _cssVariables = require("../constants/cssVariables");
15
16
  var _useGridSelector = require("../hooks/utils/useGridSelector");
16
17
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
17
18
  var _useGridRootProps = require("../hooks/utils/useGridRootProps");
18
19
  var _gridPaginationSelector = require("../hooks/features/pagination/gridPaginationSelector");
19
20
  var _jsxRuntime = require("react/jsx-runtime");
20
- const GridPaginationRoot = (0, _styles.styled)(_TablePagination.default)(({
21
- theme
22
- }) => ({
21
+ const GridPaginationRoot = (0, _styles.styled)(_TablePagination.default)({
23
22
  maxHeight: 'calc(100% + 1px)',
24
23
  // border width
25
24
  flexGrow: 1,
26
25
  [`& .${_TablePagination.tablePaginationClasses.selectLabel}`]: {
27
26
  display: 'none',
28
- [theme.breakpoints.up('sm')]: {
27
+ [_cssVariables.vars.breakpoints.up('sm')]: {
29
28
  display: 'block'
30
29
  }
31
30
  },
32
31
  [`& .${_TablePagination.tablePaginationClasses.input}`]: {
33
32
  display: 'none',
34
- [theme.breakpoints.up('sm')]: {
33
+ [_cssVariables.vars.breakpoints.up('sm')]: {
35
34
  display: 'inline-flex'
36
35
  }
37
36
  }
38
- }));
37
+ });
39
38
  const wrapLabelDisplayedRows = (labelDisplayedRows, estimated) => {
40
39
  return ({
41
40
  from,
@@ -14,6 +14,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
15
  var _system = require("@mui/system");
16
16
  var _forwardRef = require("@mui/x-internals/forwardRef");
17
+ var _cssVariables = require("../constants/cssVariables");
17
18
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
18
19
  var _gridClasses = require("../constants/gridClasses");
19
20
  var _useGridRootProps = require("../hooks/utils/useGridRootProps");
@@ -32,13 +33,11 @@ const GridRowCountRoot = (0, _system.styled)('div', {
32
33
  name: 'MuiDataGrid',
33
34
  slot: 'RowCount',
34
35
  overridesResolver: (props, styles) => styles.rowCount
35
- })(({
36
- theme
37
- }) => ({
36
+ })({
38
37
  alignItems: 'center',
39
38
  display: 'flex',
40
- margin: theme.spacing(0, 2)
41
- }));
39
+ margin: _cssVariables.vars.spacing(0, 2)
40
+ });
42
41
  const GridRowCount = exports.GridRowCount = (0, _forwardRef.forwardRef)(function GridRowCount(props, ref) {
43
42
  const {
44
43
  className,
@@ -10,7 +10,8 @@ exports.GridScrollArea = void 0;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _clsx = _interopRequireDefault(require("clsx"));
13
- var _utils = require("@mui/utils");
13
+ var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
14
+ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
15
  var _system = require("@mui/system");
15
16
  var _fastMemo = require("@mui/x-internals/fastMemo");
16
17
  var _useGridRootProps = require("../hooks/utils/useGridRootProps");
@@ -34,7 +35,7 @@ const useUtilityClasses = ownerState => {
34
35
  const slots = {
35
36
  root: ['scrollArea', `scrollArea--${scrollDirection}`]
36
37
  };
37
- return (0, _utils.unstable_composeClasses)(slots, _constants.getDataGridUtilityClass, classes);
38
+ return (0, _composeClasses.default)(slots, _constants.getDataGridUtilityClass, classes);
38
39
  };
39
40
  const GridScrollAreaRawRoot = (0, _system.styled)('div', {
40
41
  name: 'MuiDataGrid',
@@ -120,7 +121,7 @@ function GridScrollAreaContent(props) {
120
121
  const handleScrolling = () => {
121
122
  setCanScrollMore(getCanScrollMore);
122
123
  };
123
- const handleDragOver = (0, _utils.unstable_useEventCallback)(event => {
124
+ const handleDragOver = (0, _useEventCallback.default)(event => {
124
125
  let offset;
125
126
 
126
127
  // Prevents showing the forbidden cursor
@@ -14,6 +14,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
15
  var _system = require("@mui/system");
16
16
  var _forwardRef = require("@mui/x-internals/forwardRef");
17
+ var _cssVariables = require("../constants/cssVariables");
17
18
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
18
19
  var _gridClasses = require("../constants/gridClasses");
19
20
  var _useGridRootProps = require("../hooks/utils/useGridRootProps");
@@ -32,21 +33,19 @@ const GridSelectedRowCountRoot = (0, _system.styled)('div', {
32
33
  name: 'MuiDataGrid',
33
34
  slot: 'SelectedRowCount',
34
35
  overridesResolver: (props, styles) => styles.selectedRowCount
35
- })(({
36
- theme
37
- }) => ({
36
+ })({
38
37
  alignItems: 'center',
39
38
  display: 'flex',
40
- margin: theme.spacing(0, 2),
39
+ margin: _cssVariables.vars.spacing(0, 2),
41
40
  visibility: 'hidden',
42
41
  width: 0,
43
42
  height: 0,
44
- [theme.breakpoints.up('sm')]: {
43
+ [_cssVariables.vars.breakpoints.up('sm')]: {
45
44
  visibility: 'visible',
46
45
  width: 'auto',
47
46
  height: 'auto'
48
47
  }
49
- }));
48
+ });
50
49
  const GridSelectedRowCount = exports.GridSelectedRowCount = (0, _forwardRef.forwardRef)(function GridSelectedRowCount(props, ref) {
51
50
  const {
52
51
  className,
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export interface GridShadowScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children: React.ReactNode;
4
+ }
5
+ /**
6
+ * Adds scroll shadows above and below content in a scrollable container.
7
+ */
8
+ export declare function GridShadowScrollArea(props: GridShadowScrollAreaProps): React.JSX.Element;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.GridShadowScrollArea = GridShadowScrollArea;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _system = require("@mui/system");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ const _excluded = ["children"];
15
+ const reveal = (0, _system.keyframes)({
16
+ from: {
17
+ opacity: 0
18
+ },
19
+ to: {
20
+ opacity: 1
21
+ }
22
+ });
23
+ const detectScroll = (0, _system.keyframes)({
24
+ 'from, to': {
25
+ '--scrollable': '" "'
26
+ }
27
+ });
28
+ const ShadowScrollArea = (0, _system.styled)('div', {
29
+ name: 'MuiDataGrid',
30
+ slot: 'ShadowScrollArea'
31
+ })({
32
+ flex: 1,
33
+ display: 'flex',
34
+ flexDirection: 'column',
35
+ animation: detectScroll,
36
+ animationTimeline: '--scroll-timeline',
37
+ animationFillMode: 'none',
38
+ boxSizing: 'border-box',
39
+ overflow: 'auto',
40
+ scrollTimeline: '--scroll-timeline block',
41
+ '&::before, &::after': {
42
+ content: '""',
43
+ flexShrink: 0,
44
+ display: 'block',
45
+ position: 'sticky',
46
+ left: 0,
47
+ width: '100%',
48
+ height: '4px',
49
+ animation: `${reveal} linear both`,
50
+ animationTimeline: '--scroll-timeline',
51
+ // Custom property toggle trick:
52
+ // - Detects if the element is scrollable
53
+ // - https://css-tricks.com/the-css-custom-property-toggle-trick/
54
+ '--visibility-scrollable': 'var(--scrollable) visible',
55
+ '--visibility-not-scrollable': 'hidden',
56
+ visibility: 'var(--visibility-scrollable, var(--visibility-not-scrollable))'
57
+ },
58
+ '&::before': {
59
+ top: 0,
60
+ background: 'linear-gradient(to bottom, rgba(0,0,0,0.05) 0, transparent 100%)',
61
+ animationRange: '0 4px'
62
+ },
63
+ '&::after': {
64
+ bottom: 0,
65
+ background: 'linear-gradient(to top, rgba(0,0,0,0.05) 0, transparent 100%)',
66
+ animationDirection: 'reverse',
67
+ animationRange: 'calc(100% - 4px) 100%'
68
+ }
69
+ });
70
+
71
+ /**
72
+ * Adds scroll shadows above and below content in a scrollable container.
73
+ */
74
+ function GridShadowScrollArea(props) {
75
+ const {
76
+ children
77
+ } = props,
78
+ rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
79
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShadowScrollArea, (0, _extends2.default)({}, rest, {
80
+ children: children
81
+ }));
82
+ }