@mui/x-data-grid 7.0.0-alpha.8 → 7.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (566) hide show
  1. package/CHANGELOG.md +508 -30
  2. package/DataGrid/DataGrid.js +6 -6
  3. package/DataGrid/useDataGridComponent.js +2 -1
  4. package/DataGrid/useDataGridProps.js +1 -0
  5. package/README.md +3 -3
  6. package/components/GridColumnHeaders.d.ts +3 -2
  7. package/components/GridColumnHeaders.js +3 -11
  8. package/components/GridDetailPanels.d.ts +5 -0
  9. package/components/GridDetailPanels.js +4 -0
  10. package/components/GridHeaders.d.ts +4 -0
  11. package/components/GridHeaders.js +53 -0
  12. package/components/GridPinnedRows.d.ts +7 -0
  13. package/components/GridPinnedRows.js +4 -0
  14. package/components/GridRow.d.ts +7 -4
  15. package/components/GridRow.js +161 -97
  16. package/components/GridScrollbarFillerCell.d.ts +7 -0
  17. package/components/GridScrollbarFillerCell.js +39 -0
  18. package/components/base/GridBody.d.ts +2 -13
  19. package/components/base/GridBody.js +2 -116
  20. package/components/base/GridOverlays.js +10 -21
  21. package/components/cell/GridActionsCellItem.d.ts +2 -2
  22. package/components/cell/GridCell.d.ts +15 -21
  23. package/components/cell/GridCell.js +67 -372
  24. package/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
  25. package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -1
  26. package/components/columnHeaders/GridColumnHeaderItem.js +7 -3
  27. package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -0
  28. package/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
  29. package/components/columnHeaders/GridColumnHeadersInner.js +1 -2
  30. package/components/columnsManagement/GridColumnsManagement.d.ts +36 -0
  31. package/components/columnsManagement/GridColumnsManagement.js +260 -0
  32. package/components/columnsManagement/index.d.ts +1 -0
  33. package/components/columnsManagement/index.js +1 -0
  34. package/components/columnsManagement/utils.d.ts +4 -0
  35. package/components/columnsManagement/utils.js +16 -0
  36. package/components/containers/GridRoot.js +18 -15
  37. package/components/containers/GridRootStyles.js +307 -204
  38. package/components/index.d.ts +1 -0
  39. package/components/index.js +1 -0
  40. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  41. package/components/panel/GridColumnsPanel.d.ts +0 -28
  42. package/components/panel/GridColumnsPanel.js +5 -213
  43. package/components/panel/GridPanel.js +3 -4
  44. package/components/panel/filterPanel/GridFilterForm.d.ts +6 -4
  45. package/components/panel/filterPanel/GridFilterForm.js +31 -14
  46. package/components/panel/filterPanel/GridFilterPanel.js +46 -20
  47. package/components/toolbar/GridToolbarColumnsButton.d.ts +13 -1
  48. package/components/toolbar/GridToolbarColumnsButton.js +40 -22
  49. package/components/toolbar/GridToolbarDensitySelector.d.ts +13 -1
  50. package/components/toolbar/GridToolbarDensitySelector.js +40 -22
  51. package/components/toolbar/GridToolbarExport.d.ts +10 -1
  52. package/components/toolbar/GridToolbarExport.js +6 -1
  53. package/components/toolbar/GridToolbarExportContainer.d.ts +15 -1
  54. package/components/toolbar/GridToolbarExportContainer.js +41 -23
  55. package/components/toolbar/GridToolbarFilterButton.d.ts +5 -4
  56. package/components/toolbar/GridToolbarFilterButton.js +6 -10
  57. package/components/virtualization/GridBottomContainer.d.ts +2 -0
  58. package/components/virtualization/GridBottomContainer.js +25 -0
  59. package/components/{containers → virtualization}/GridMainContainer.d.ts +2 -0
  60. package/components/virtualization/GridMainContainer.js +20 -0
  61. package/components/virtualization/GridTopContainer.d.ts +2 -0
  62. package/components/virtualization/GridTopContainer.js +35 -0
  63. package/components/virtualization/GridVirtualScrollbar.d.ts +7 -0
  64. package/components/virtualization/GridVirtualScrollbar.js +131 -0
  65. package/components/virtualization/GridVirtualScroller.d.ts +4 -4
  66. package/components/virtualization/GridVirtualScroller.js +69 -16
  67. package/components/virtualization/GridVirtualScrollerFiller.d.ts +4 -0
  68. package/components/virtualization/GridVirtualScrollerFiller.js +71 -0
  69. package/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
  70. package/constants/defaultGridSlotsComponents.js +8 -3
  71. package/constants/gridClasses.d.ts +72 -12
  72. package/constants/gridClasses.js +1 -1
  73. package/constants/localeTextConstants.js +4 -6
  74. package/hooks/core/gridCoreSelector.d.ts +6 -0
  75. package/hooks/core/gridCoreSelector.js +5 -0
  76. package/hooks/core/useGridApiInitialization.js +4 -0
  77. package/hooks/core/useGridInitialization.js +4 -0
  78. package/hooks/core/useGridRefs.d.ts +3 -0
  79. package/hooks/core/useGridRefs.js +13 -0
  80. package/hooks/core/useGridTheme.d.ts +3 -0
  81. package/hooks/core/useGridTheme.js +19 -0
  82. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
  83. package/hooks/features/columnGrouping/useGridColumnGrouping.js +7 -14
  84. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +13 -18
  85. package/hooks/features/columnHeaders/useGridColumnHeaders.js +68 -162
  86. package/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
  87. package/hooks/features/columns/gridColumnsInterfaces.d.ts +17 -0
  88. package/hooks/features/columns/gridColumnsInterfaces.js +9 -1
  89. package/hooks/features/columns/gridColumnsSelector.d.ts +14 -1
  90. package/hooks/features/columns/gridColumnsSelector.js +52 -0
  91. package/hooks/features/columns/gridColumnsUtils.d.ts +1 -5
  92. package/hooks/features/columns/gridColumnsUtils.js +10 -12
  93. package/hooks/features/columns/index.d.ts +2 -2
  94. package/hooks/features/columns/index.js +2 -1
  95. package/hooks/features/columns/useGridColumnSpanning.js +62 -61
  96. package/hooks/features/columns/useGridColumns.js +20 -23
  97. package/hooks/features/dimensions/gridDimensionsApi.d.ts +60 -11
  98. package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +2 -0
  99. package/hooks/features/dimensions/gridDimensionsSelectors.js +1 -0
  100. package/hooks/features/dimensions/index.d.ts +2 -0
  101. package/hooks/features/dimensions/index.js +1 -0
  102. package/hooks/features/dimensions/useGridDimensions.d.ts +7 -1
  103. package/hooks/features/dimensions/useGridDimensions.js +216 -148
  104. package/hooks/features/export/serializers/csvSerializer.js +2 -2
  105. package/hooks/features/filter/useGridFilter.js +3 -3
  106. package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -2
  107. package/hooks/features/focus/gridFocusStateSelector.js +2 -6
  108. package/hooks/features/focus/useGridFocus.js +3 -3
  109. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -16
  110. package/hooks/features/pagination/useGridPagination.js +3 -5
  111. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -0
  112. package/hooks/features/rows/gridRowsSelector.d.ts +2 -2
  113. package/hooks/features/rows/gridRowsSelector.js +5 -5
  114. package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
  115. package/hooks/features/rows/gridRowsUtils.js +8 -5
  116. package/hooks/features/rows/useGridRowsMeta.js +7 -4
  117. package/hooks/features/scroll/useGridScroll.js +8 -10
  118. package/hooks/features/sorting/gridSortingUtils.js +1 -1
  119. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  120. package/hooks/features/sorting/useGridSorting.js +15 -10
  121. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +14 -0
  122. package/hooks/features/virtualization/gridVirtualizationSelectors.js +22 -2
  123. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +27 -42
  124. package/hooks/features/virtualization/useGridVirtualScroller.js +441 -438
  125. package/hooks/features/virtualization/useGridVirtualization.d.ts +8 -0
  126. package/hooks/features/virtualization/useGridVirtualization.js +8 -1
  127. package/hooks/utils/index.d.ts +3 -0
  128. package/hooks/utils/index.js +4 -1
  129. package/hooks/utils/useGridAriaAttributes.js +1 -2
  130. package/hooks/utils/useGridNativeEventListener.js +4 -9
  131. package/hooks/utils/useResizeObserver.d.ts +2 -0
  132. package/hooks/utils/useResizeObserver.js +36 -0
  133. package/hooks/utils/useRunOnce.d.ts +5 -0
  134. package/hooks/utils/useRunOnce.js +18 -0
  135. package/index.js +1 -1
  136. package/internals/index.d.ts +12 -9
  137. package/internals/index.js +9 -7
  138. package/legacy/DataGrid/DataGrid.js +6 -6
  139. package/legacy/DataGrid/useDataGridComponent.js +2 -1
  140. package/legacy/DataGrid/useDataGridProps.js +1 -0
  141. package/legacy/components/GridColumnHeaders.js +3 -11
  142. package/legacy/components/GridDetailPanels.js +4 -0
  143. package/legacy/components/GridHeaders.js +53 -0
  144. package/legacy/components/GridPinnedRows.js +4 -0
  145. package/legacy/components/GridRow.js +159 -98
  146. package/legacy/components/GridScrollbarFillerCell.js +36 -0
  147. package/legacy/components/base/GridBody.js +2 -114
  148. package/legacy/components/base/GridOverlays.js +10 -25
  149. package/legacy/components/cell/GridCell.js +69 -377
  150. package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
  151. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +7 -3
  152. package/legacy/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
  153. package/legacy/components/columnHeaders/GridColumnHeadersInner.js +1 -2
  154. package/legacy/components/columnsManagement/GridColumnsManagement.js +300 -0
  155. package/legacy/components/columnsManagement/index.js +1 -0
  156. package/legacy/components/columnsManagement/utils.js +22 -0
  157. package/legacy/components/containers/GridRoot.js +18 -15
  158. package/legacy/components/containers/GridRootStyles.js +215 -137
  159. package/legacy/components/index.js +1 -0
  160. package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  161. package/legacy/components/panel/GridColumnsPanel.js +5 -233
  162. package/legacy/components/panel/GridPanel.js +3 -4
  163. package/legacy/components/panel/filterPanel/GridFilterForm.js +30 -13
  164. package/legacy/components/panel/filterPanel/GridFilterPanel.js +49 -20
  165. package/legacy/components/toolbar/GridToolbarColumnsButton.js +40 -21
  166. package/legacy/components/toolbar/GridToolbarDensitySelector.js +40 -21
  167. package/legacy/components/toolbar/GridToolbarExport.js +6 -1
  168. package/legacy/components/toolbar/GridToolbarExportContainer.js +40 -21
  169. package/legacy/components/toolbar/GridToolbarFilterButton.js +6 -10
  170. package/legacy/components/virtualization/GridBottomContainer.js +25 -0
  171. package/legacy/components/virtualization/GridMainContainer.js +20 -0
  172. package/legacy/components/virtualization/GridTopContainer.js +35 -0
  173. package/legacy/components/virtualization/GridVirtualScrollbar.js +129 -0
  174. package/legacy/components/virtualization/GridVirtualScroller.js +67 -16
  175. package/legacy/components/virtualization/GridVirtualScrollerFiller.js +70 -0
  176. package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
  177. package/legacy/constants/defaultGridSlotsComponents.js +8 -3
  178. package/legacy/constants/gridClasses.js +1 -1
  179. package/legacy/constants/localeTextConstants.js +4 -6
  180. package/legacy/hooks/core/gridCoreSelector.js +7 -0
  181. package/legacy/hooks/core/useGridApiInitialization.js +4 -0
  182. package/legacy/hooks/core/useGridInitialization.js +4 -0
  183. package/legacy/hooks/core/useGridRefs.js +13 -0
  184. package/legacy/hooks/core/useGridTheme.js +21 -0
  185. package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +7 -14
  186. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +69 -181
  187. package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
  188. package/legacy/hooks/features/columns/gridColumnsInterfaces.js +9 -1
  189. package/legacy/hooks/features/columns/gridColumnsSelector.js +62 -0
  190. package/legacy/hooks/features/columns/gridColumnsUtils.js +10 -16
  191. package/legacy/hooks/features/columns/index.js +2 -1
  192. package/legacy/hooks/features/columns/useGridColumnSpanning.js +60 -59
  193. package/legacy/hooks/features/columns/useGridColumns.js +22 -23
  194. package/legacy/hooks/features/dimensions/gridDimensionsSelectors.js +3 -0
  195. package/legacy/hooks/features/dimensions/index.js +1 -0
  196. package/legacy/hooks/features/dimensions/useGridDimensions.js +226 -151
  197. package/legacy/hooks/features/export/serializers/csvSerializer.js +2 -2
  198. package/legacy/hooks/features/filter/useGridFilter.js +3 -3
  199. package/legacy/hooks/features/focus/gridFocusStateSelector.js +2 -6
  200. package/legacy/hooks/features/focus/useGridFocus.js +3 -3
  201. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -16
  202. package/legacy/hooks/features/pagination/useGridPagination.js +3 -5
  203. package/legacy/hooks/features/rows/gridRowsSelector.js +5 -5
  204. package/legacy/hooks/features/rows/gridRowsUtils.js +8 -5
  205. package/legacy/hooks/features/rows/useGridRowsMeta.js +7 -4
  206. package/legacy/hooks/features/scroll/useGridScroll.js +8 -10
  207. package/legacy/hooks/features/sorting/gridSortingUtils.js +1 -1
  208. package/legacy/hooks/features/sorting/useGridSorting.js +15 -10
  209. package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +29 -1
  210. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +490 -483
  211. package/legacy/hooks/features/virtualization/useGridVirtualization.js +8 -1
  212. package/legacy/hooks/utils/index.js +4 -1
  213. package/legacy/hooks/utils/useGridAriaAttributes.js +1 -2
  214. package/legacy/hooks/utils/useGridNativeEventListener.js +4 -9
  215. package/legacy/hooks/utils/useResizeObserver.js +36 -0
  216. package/legacy/hooks/utils/useRunOnce.js +18 -0
  217. package/legacy/index.js +1 -1
  218. package/legacy/internals/index.js +9 -7
  219. package/legacy/locales/arSD.js +5 -6
  220. package/legacy/locales/beBY.js +5 -6
  221. package/legacy/locales/bgBG.js +5 -6
  222. package/legacy/locales/csCZ.js +5 -6
  223. package/legacy/locales/daDK.js +5 -6
  224. package/legacy/locales/deDE.js +5 -6
  225. package/legacy/locales/elGR.js +5 -6
  226. package/legacy/locales/esES.js +5 -6
  227. package/legacy/locales/faIR.js +5 -6
  228. package/legacy/locales/fiFI.js +5 -6
  229. package/legacy/locales/frFR.js +5 -6
  230. package/legacy/locales/heIL.js +5 -6
  231. package/legacy/locales/hrHR.js +160 -0
  232. package/legacy/locales/huHU.js +5 -6
  233. package/legacy/locales/index.js +4 -1
  234. package/legacy/locales/itIT.js +5 -6
  235. package/legacy/locales/jaJP.js +5 -6
  236. package/legacy/locales/koKR.js +5 -6
  237. package/legacy/locales/nbNO.js +5 -6
  238. package/legacy/locales/nlNL.js +5 -6
  239. package/legacy/locales/plPL.js +5 -6
  240. package/legacy/locales/ptBR.js +5 -6
  241. package/legacy/locales/ptPT.js +160 -0
  242. package/legacy/locales/roRO.js +5 -6
  243. package/legacy/locales/ruRU.js +5 -6
  244. package/legacy/locales/skSK.js +5 -6
  245. package/legacy/locales/svSE.js +5 -6
  246. package/legacy/locales/trTR.js +5 -6
  247. package/legacy/locales/ukUA.js +5 -6
  248. package/legacy/locales/urPK.js +5 -6
  249. package/legacy/locales/viVN.js +5 -6
  250. package/legacy/locales/zhCN.js +5 -6
  251. package/legacy/locales/zhHK.js +160 -0
  252. package/legacy/locales/zhTW.js +5 -6
  253. package/legacy/models/index.js +0 -1
  254. package/legacy/models/params/index.js +1 -2
  255. package/legacy/utils/utils.js +10 -1
  256. package/locales/arSD.js +5 -6
  257. package/locales/beBY.js +5 -6
  258. package/locales/bgBG.js +5 -6
  259. package/locales/csCZ.js +5 -6
  260. package/locales/daDK.js +5 -6
  261. package/locales/deDE.js +5 -6
  262. package/locales/elGR.js +5 -6
  263. package/locales/esES.js +5 -6
  264. package/locales/faIR.js +5 -6
  265. package/locales/fiFI.js +5 -6
  266. package/locales/frFR.js +5 -6
  267. package/locales/heIL.js +5 -6
  268. package/locales/hrHR.d.ts +1 -0
  269. package/locales/hrHR.js +148 -0
  270. package/locales/huHU.js +5 -6
  271. package/locales/index.d.ts +3 -0
  272. package/locales/index.js +4 -1
  273. package/locales/itIT.js +5 -6
  274. package/locales/jaJP.js +5 -6
  275. package/locales/koKR.js +5 -6
  276. package/locales/nbNO.js +5 -6
  277. package/locales/nlNL.js +5 -6
  278. package/locales/plPL.js +5 -6
  279. package/locales/ptBR.js +5 -6
  280. package/locales/ptPT.d.ts +1 -0
  281. package/locales/ptPT.js +148 -0
  282. package/locales/roRO.js +5 -6
  283. package/locales/ruRU.js +5 -6
  284. package/locales/skSK.js +5 -6
  285. package/locales/svSE.js +5 -6
  286. package/locales/trTR.js +5 -6
  287. package/locales/ukUA.js +5 -6
  288. package/locales/urPK.js +5 -6
  289. package/locales/viVN.js +5 -6
  290. package/locales/zhCN.js +5 -6
  291. package/locales/zhHK.d.ts +1 -0
  292. package/locales/zhHK.js +148 -0
  293. package/locales/zhTW.js +5 -6
  294. package/models/api/gridColumnGroupingApi.d.ts +2 -2
  295. package/models/api/gridCoreApi.d.ts +16 -16
  296. package/models/api/gridLocaleTextApi.d.ts +3 -5
  297. package/models/api/gridRowsMetaApi.d.ts +1 -1
  298. package/models/api/gridVirtualizationApi.d.ts +2 -3
  299. package/models/colDef/gridColType.d.ts +11 -2
  300. package/models/events/gridEventLookup.d.ts +3 -3
  301. package/models/gridFilterModel.d.ts +1 -1
  302. package/models/gridSlotsComponent.d.ts +21 -2
  303. package/models/gridSlotsComponentsProps.d.ts +4 -0
  304. package/models/gridStateCommunity.d.ts +5 -1
  305. package/models/index.d.ts +0 -1
  306. package/models/index.js +0 -1
  307. package/models/params/index.d.ts +0 -1
  308. package/models/params/index.js +1 -2
  309. package/models/props/DataGridProps.d.ts +6 -11
  310. package/modern/DataGrid/DataGrid.js +6 -6
  311. package/modern/DataGrid/useDataGridComponent.js +2 -1
  312. package/modern/DataGrid/useDataGridProps.js +1 -0
  313. package/modern/components/GridColumnHeaders.js +3 -11
  314. package/modern/components/GridDetailPanels.js +4 -0
  315. package/modern/components/GridHeaders.js +53 -0
  316. package/modern/components/GridPinnedRows.js +4 -0
  317. package/modern/components/GridRow.js +159 -96
  318. package/modern/components/GridScrollbarFillerCell.js +39 -0
  319. package/modern/components/base/GridBody.js +2 -116
  320. package/modern/components/base/GridOverlays.js +10 -16
  321. package/modern/components/cell/GridCell.js +65 -369
  322. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
  323. package/modern/components/columnHeaders/GridColumnHeaderItem.js +7 -3
  324. package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
  325. package/modern/components/columnHeaders/GridColumnHeadersInner.js +1 -1
  326. package/modern/components/columnsManagement/GridColumnsManagement.js +256 -0
  327. package/modern/components/columnsManagement/index.js +1 -0
  328. package/modern/components/columnsManagement/utils.js +16 -0
  329. package/modern/components/containers/GridRoot.js +18 -14
  330. package/modern/components/containers/GridRootStyles.js +307 -204
  331. package/modern/components/index.js +1 -0
  332. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  333. package/modern/components/panel/GridColumnsPanel.js +4 -209
  334. package/modern/components/panel/GridPanel.js +3 -4
  335. package/modern/components/panel/filterPanel/GridFilterForm.js +30 -13
  336. package/modern/components/panel/filterPanel/GridFilterPanel.js +46 -20
  337. package/modern/components/toolbar/GridToolbarColumnsButton.js +38 -21
  338. package/modern/components/toolbar/GridToolbarDensitySelector.js +38 -21
  339. package/modern/components/toolbar/GridToolbarExport.js +6 -1
  340. package/modern/components/toolbar/GridToolbarExportContainer.js +39 -22
  341. package/modern/components/toolbar/GridToolbarFilterButton.js +6 -10
  342. package/modern/components/virtualization/GridBottomContainer.js +25 -0
  343. package/modern/components/virtualization/GridMainContainer.js +20 -0
  344. package/modern/components/virtualization/GridTopContainer.js +35 -0
  345. package/modern/components/virtualization/GridVirtualScrollbar.js +131 -0
  346. package/modern/components/virtualization/GridVirtualScroller.js +69 -16
  347. package/modern/components/virtualization/GridVirtualScrollerFiller.js +71 -0
  348. package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
  349. package/modern/constants/defaultGridSlotsComponents.js +8 -3
  350. package/modern/constants/gridClasses.js +1 -1
  351. package/modern/constants/localeTextConstants.js +4 -6
  352. package/modern/hooks/core/gridCoreSelector.js +5 -0
  353. package/modern/hooks/core/useGridApiInitialization.js +3 -0
  354. package/modern/hooks/core/useGridInitialization.js +4 -0
  355. package/modern/hooks/core/useGridRefs.js +13 -0
  356. package/modern/hooks/core/useGridTheme.js +19 -0
  357. package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +5 -12
  358. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +67 -160
  359. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
  360. package/modern/hooks/features/columns/gridColumnsInterfaces.js +9 -1
  361. package/modern/hooks/features/columns/gridColumnsSelector.js +51 -0
  362. package/modern/hooks/features/columns/gridColumnsUtils.js +10 -12
  363. package/modern/hooks/features/columns/index.js +2 -1
  364. package/modern/hooks/features/columns/useGridColumnSpanning.js +62 -61
  365. package/modern/hooks/features/columns/useGridColumns.js +19 -21
  366. package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +1 -0
  367. package/modern/hooks/features/dimensions/index.js +1 -0
  368. package/modern/hooks/features/dimensions/useGridDimensions.js +214 -146
  369. package/modern/hooks/features/export/serializers/csvSerializer.js +2 -2
  370. package/modern/hooks/features/filter/useGridFilter.js +3 -3
  371. package/modern/hooks/features/focus/gridFocusStateSelector.js +2 -6
  372. package/modern/hooks/features/focus/useGridFocus.js +3 -3
  373. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -16
  374. package/modern/hooks/features/pagination/useGridPagination.js +3 -5
  375. package/modern/hooks/features/rows/gridRowsSelector.js +2 -2
  376. package/modern/hooks/features/rows/gridRowsUtils.js +8 -5
  377. package/modern/hooks/features/rows/useGridRowsMeta.js +7 -4
  378. package/modern/hooks/features/scroll/useGridScroll.js +8 -9
  379. package/modern/hooks/features/sorting/gridSortingUtils.js +1 -1
  380. package/modern/hooks/features/sorting/useGridSorting.js +15 -10
  381. package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +22 -2
  382. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +435 -432
  383. package/modern/hooks/features/virtualization/useGridVirtualization.js +8 -1
  384. package/modern/hooks/utils/index.js +4 -1
  385. package/modern/hooks/utils/useGridAriaAttributes.js +1 -1
  386. package/modern/hooks/utils/useGridNativeEventListener.js +3 -9
  387. package/modern/hooks/utils/useResizeObserver.js +36 -0
  388. package/modern/hooks/utils/useRunOnce.js +18 -0
  389. package/modern/index.js +1 -1
  390. package/modern/internals/index.js +9 -7
  391. package/modern/locales/arSD.js +5 -6
  392. package/modern/locales/beBY.js +5 -6
  393. package/modern/locales/bgBG.js +5 -6
  394. package/modern/locales/csCZ.js +5 -6
  395. package/modern/locales/daDK.js +5 -6
  396. package/modern/locales/deDE.js +5 -6
  397. package/modern/locales/elGR.js +5 -6
  398. package/modern/locales/esES.js +5 -6
  399. package/modern/locales/faIR.js +5 -6
  400. package/modern/locales/fiFI.js +5 -6
  401. package/modern/locales/frFR.js +5 -6
  402. package/modern/locales/heIL.js +5 -6
  403. package/modern/locales/hrHR.js +148 -0
  404. package/modern/locales/huHU.js +5 -6
  405. package/modern/locales/index.js +4 -1
  406. package/modern/locales/itIT.js +5 -6
  407. package/modern/locales/jaJP.js +5 -6
  408. package/modern/locales/koKR.js +5 -6
  409. package/modern/locales/nbNO.js +5 -6
  410. package/modern/locales/nlNL.js +5 -6
  411. package/modern/locales/plPL.js +5 -6
  412. package/modern/locales/ptBR.js +5 -6
  413. package/modern/locales/ptPT.js +148 -0
  414. package/modern/locales/roRO.js +5 -6
  415. package/modern/locales/ruRU.js +5 -6
  416. package/modern/locales/skSK.js +5 -6
  417. package/modern/locales/svSE.js +5 -6
  418. package/modern/locales/trTR.js +5 -6
  419. package/modern/locales/ukUA.js +5 -6
  420. package/modern/locales/urPK.js +5 -6
  421. package/modern/locales/viVN.js +5 -6
  422. package/modern/locales/zhCN.js +5 -6
  423. package/modern/locales/zhHK.js +148 -0
  424. package/modern/locales/zhTW.js +5 -6
  425. package/modern/models/index.js +0 -1
  426. package/modern/models/params/index.js +1 -2
  427. package/modern/utils/utils.js +10 -1
  428. package/node/DataGrid/DataGrid.js +6 -6
  429. package/node/DataGrid/useDataGridComponent.js +1 -0
  430. package/node/DataGrid/useDataGridProps.js +1 -0
  431. package/node/components/GridColumnHeaders.js +3 -11
  432. package/node/components/GridDetailPanels.js +10 -0
  433. package/node/components/GridHeaders.js +60 -0
  434. package/node/components/GridPinnedRows.js +10 -0
  435. package/node/components/GridRow.js +157 -94
  436. package/node/components/GridScrollbarFillerCell.js +47 -0
  437. package/node/components/base/GridBody.js +7 -118
  438. package/node/components/base/GridOverlays.js +9 -15
  439. package/node/components/cell/GridCell.js +66 -369
  440. package/node/components/columnHeaders/GridBaseColumnHeaders.js +1 -6
  441. package/node/components/columnHeaders/GridColumnHeaderItem.js +8 -4
  442. package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +5 -2
  443. package/node/components/columnHeaders/GridColumnHeadersInner.js +1 -1
  444. package/node/components/columnsManagement/GridColumnsManagement.js +264 -0
  445. package/node/components/columnsManagement/index.js +16 -0
  446. package/node/components/columnsManagement/utils.js +24 -0
  447. package/node/components/containers/GridRoot.js +17 -14
  448. package/node/components/containers/GridRootStyles.js +175 -72
  449. package/node/components/index.js +11 -0
  450. package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  451. package/node/components/panel/GridColumnsPanel.js +4 -208
  452. package/node/components/panel/GridPanel.js +3 -4
  453. package/node/components/panel/filterPanel/GridFilterForm.js +29 -12
  454. package/node/components/panel/filterPanel/GridFilterPanel.js +45 -19
  455. package/node/components/toolbar/GridToolbarColumnsButton.js +36 -20
  456. package/node/components/toolbar/GridToolbarDensitySelector.js +36 -20
  457. package/node/components/toolbar/GridToolbarExport.js +6 -1
  458. package/node/components/toolbar/GridToolbarExportContainer.js +37 -21
  459. package/node/components/toolbar/GridToolbarFilterButton.js +6 -10
  460. package/node/components/virtualization/GridBottomContainer.js +34 -0
  461. package/node/components/{containers → virtualization}/GridMainContainer.js +7 -29
  462. package/node/components/virtualization/GridTopContainer.js +44 -0
  463. package/node/components/virtualization/GridVirtualScrollbar.js +138 -0
  464. package/node/components/virtualization/GridVirtualScroller.js +69 -17
  465. package/node/components/virtualization/GridVirtualScrollerFiller.js +77 -0
  466. package/node/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
  467. package/node/constants/defaultGridSlotsComponents.js +6 -1
  468. package/node/constants/gridClasses.js +1 -1
  469. package/node/constants/localeTextConstants.js +4 -6
  470. package/node/hooks/core/gridCoreSelector.js +12 -0
  471. package/node/hooks/core/useGridApiInitialization.js +3 -0
  472. package/node/hooks/core/useGridInitialization.js +4 -0
  473. package/node/hooks/core/useGridRefs.js +22 -0
  474. package/node/hooks/core/useGridTheme.js +29 -0
  475. package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +5 -12
  476. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +65 -159
  477. package/node/hooks/features/columnMenu/useGridColumnMenu.js +28 -23
  478. package/node/hooks/features/columns/gridColumnsInterfaces.js +11 -1
  479. package/node/hooks/features/columns/gridColumnsSelector.js +52 -1
  480. package/node/hooks/features/columns/gridColumnsUtils.js +10 -13
  481. package/node/hooks/features/columns/index.js +22 -61
  482. package/node/hooks/features/columns/useGridColumnSpanning.js +62 -61
  483. package/node/hooks/features/columns/useGridColumns.js +20 -22
  484. package/node/hooks/features/dimensions/gridDimensionsSelectors.js +8 -0
  485. package/node/hooks/features/dimensions/index.js +11 -0
  486. package/node/hooks/features/dimensions/useGridDimensions.js +215 -144
  487. package/node/hooks/features/export/serializers/csvSerializer.js +2 -2
  488. package/node/hooks/features/filter/useGridFilter.js +2 -2
  489. package/node/hooks/features/focus/gridFocusStateSelector.js +3 -7
  490. package/node/hooks/features/focus/useGridFocus.js +2 -2
  491. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -15
  492. package/node/hooks/features/pagination/useGridPagination.js +3 -5
  493. package/node/hooks/features/rows/gridRowsSelector.js +2 -2
  494. package/node/hooks/features/rows/gridRowsUtils.js +8 -5
  495. package/node/hooks/features/rows/useGridRowsMeta.js +5 -3
  496. package/node/hooks/features/scroll/useGridScroll.js +8 -9
  497. package/node/hooks/features/sorting/gridSortingUtils.js +1 -1
  498. package/node/hooks/features/sorting/useGridSorting.js +15 -10
  499. package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +22 -2
  500. package/node/hooks/features/virtualization/useGridVirtualScroller.js +434 -431
  501. package/node/hooks/features/virtualization/useGridVirtualization.js +9 -1
  502. package/node/hooks/utils/index.js +36 -0
  503. package/node/hooks/utils/useGridAriaAttributes.js +1 -1
  504. package/node/hooks/utils/useGridNativeEventListener.js +3 -9
  505. package/node/hooks/utils/useResizeObserver.js +44 -0
  506. package/node/hooks/utils/useRunOnce.js +27 -0
  507. package/node/index.js +1 -1
  508. package/node/internals/index.js +86 -71
  509. package/node/locales/arSD.js +5 -6
  510. package/node/locales/beBY.js +5 -6
  511. package/node/locales/bgBG.js +5 -6
  512. package/node/locales/csCZ.js +5 -6
  513. package/node/locales/daDK.js +5 -6
  514. package/node/locales/deDE.js +5 -6
  515. package/node/locales/elGR.js +5 -6
  516. package/node/locales/esES.js +5 -6
  517. package/node/locales/faIR.js +5 -6
  518. package/node/locales/fiFI.js +5 -6
  519. package/node/locales/frFR.js +5 -6
  520. package/node/locales/heIL.js +5 -6
  521. package/node/locales/hrHR.js +154 -0
  522. package/node/locales/huHU.js +5 -6
  523. package/node/locales/index.js +33 -0
  524. package/node/locales/itIT.js +5 -6
  525. package/node/locales/jaJP.js +5 -6
  526. package/node/locales/koKR.js +5 -6
  527. package/node/locales/nbNO.js +5 -6
  528. package/node/locales/nlNL.js +5 -6
  529. package/node/locales/plPL.js +5 -6
  530. package/node/locales/ptBR.js +5 -6
  531. package/node/locales/ptPT.js +154 -0
  532. package/node/locales/roRO.js +5 -6
  533. package/node/locales/ruRU.js +5 -6
  534. package/node/locales/skSK.js +5 -6
  535. package/node/locales/svSE.js +5 -6
  536. package/node/locales/trTR.js +5 -6
  537. package/node/locales/ukUA.js +5 -6
  538. package/node/locales/urPK.js +5 -6
  539. package/node/locales/viVN.js +5 -6
  540. package/node/locales/zhCN.js +5 -6
  541. package/node/locales/zhHK.js +154 -0
  542. package/node/locales/zhTW.js +5 -6
  543. package/node/models/index.js +0 -11
  544. package/node/models/params/index.js +0 -11
  545. package/node/utils/utils.js +11 -1
  546. package/package.json +6 -6
  547. package/utils/utils.d.ts +6 -0
  548. package/utils/utils.js +10 -1
  549. package/components/DataGridVirtualScroller.d.ts +0 -3
  550. package/components/DataGridVirtualScroller.js +0 -35
  551. package/components/containers/GridMainContainer.js +0 -43
  552. package/legacy/components/DataGridVirtualScroller.js +0 -32
  553. package/legacy/components/containers/GridMainContainer.js +0 -45
  554. package/legacy/models/gridRootContainerRef.js +0 -1
  555. package/legacy/models/params/gridRenderedRowsIntervalChangeParams.js +0 -1
  556. package/models/gridRootContainerRef.d.ts +0 -5
  557. package/models/gridRootContainerRef.js +0 -1
  558. package/models/params/gridRenderedRowsIntervalChangeParams.d.ts +0 -10
  559. package/models/params/gridRenderedRowsIntervalChangeParams.js +0 -1
  560. package/modern/components/DataGridVirtualScroller.js +0 -35
  561. package/modern/components/containers/GridMainContainer.js +0 -42
  562. package/modern/models/gridRootContainerRef.js +0 -1
  563. package/modern/models/params/gridRenderedRowsIntervalChangeParams.js +0 -1
  564. package/node/components/DataGridVirtualScroller.js +0 -42
  565. package/node/models/gridRootContainerRef.js +0 -5
  566. package/node/models/params/gridRenderedRowsIntervalChangeParams.js +0 -5
@@ -1,9 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["changeReason", "unstable_updateValueOnRender"],
4
- _excluded2 = ["align", "children", "editCellState", "colIndex", "column", "cellMode", "field", "formattedValue", "hasFocus", "height", "isEditable", "isSelected", "rowId", "tabIndex", "value", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "disableDragEvents", "isNotVisible", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
5
- _excluded3 = ["column", "rowId", "editCellState", "align", "children", "colIndex", "height", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "disableDragEvents", "isNotVisible", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
6
- _excluded4 = ["changeReason", "unstable_updateValueOnRender"];
3
+ var _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "height", "width", "className", "style", "gridHasScrollX", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "sectionIndex", "sectionLength", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
4
+ _excluded2 = ["changeReason", "unstable_updateValueOnRender"];
7
5
  import * as React from 'react';
8
6
  import PropTypes from 'prop-types';
9
7
  import clsx from 'clsx';
@@ -18,6 +16,12 @@ import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
18
16
  import { gridFocusCellSelector } from '../../hooks/features/focus/gridFocusStateSelector';
19
17
  import { MissingRowIdError } from '../../hooks/features/rows/useGridParamsApi';
20
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
+ export var PinnedPosition = /*#__PURE__*/function (PinnedPosition) {
20
+ PinnedPosition[PinnedPosition["NONE"] = 0] = "NONE";
21
+ PinnedPosition[PinnedPosition["LEFT"] = 1] = "LEFT";
22
+ PinnedPosition[PinnedPosition["RIGHT"] = 2] = "RIGHT";
23
+ return PinnedPosition;
24
+ }({});
21
25
  var EMPTY_CELL_PARAMS = {
22
26
  id: -1,
23
27
  field: '__unset__',
@@ -44,349 +48,25 @@ var EMPTY_CELL_PARAMS = {
44
48
  };
45
49
  var useUtilityClasses = function useUtilityClasses(ownerState) {
46
50
  var align = ownerState.align,
51
+ showLeftBorder = ownerState.showLeftBorder,
47
52
  showRightBorder = ownerState.showRightBorder,
53
+ pinnedPosition = ownerState.pinnedPosition,
48
54
  isEditable = ownerState.isEditable,
49
55
  isSelected = ownerState.isSelected,
50
56
  isSelectionMode = ownerState.isSelectionMode,
51
57
  classes = ownerState.classes;
52
58
  var slots = {
53
- root: ['cell', "cell--text".concat(capitalize(align)), isEditable && 'cell--editable', isSelected && 'selected', showRightBorder && 'cell--withRightBorder', isSelectionMode && !isEditable && 'cell--selectionMode', 'withBorderColor'],
59
+ root: ['cell', "cell--text".concat(capitalize(align)), isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode'],
54
60
  content: ['cellContent']
55
61
  };
56
62
  return composeClasses(slots, getDataGridUtilityClass, classes);
57
63
  };
58
64
  var warnedOnce = false;
59
65
 
60
- // GridCellWrapper is a compatibility layer for the V6 cell slot. If we can use the more efficient
61
- // `GridCellV7`, we should. That component is a merge of `GridCellWrapper` and `GridCell`.
62
- // TODO(v7): Remove the wrapper & cellV6 and use the cellV7 exclusively.
63
66
  // TODO(v7): Removing the wrapper will break the docs performance visualization demo.
64
- var GridCellWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {
65
- var column = props.column,
66
- rowId = props.rowId,
67
- editCellState = props.editCellState;
68
- var apiRef = useGridApiContext();
69
- var rootProps = useGridRootProps();
70
- var field = column.field;
71
- var cellParamsWithAPI = useGridSelector(apiRef, function () {
72
- // This is required because `.getCellParams` tries to get the `state.rows.tree` entry
73
- // associated with `rowId`/`fieldId`, but this selector runs after the state has been
74
- // updated, while `rowId`/`fieldId` reference an entry in the old state.
75
- try {
76
- var cellParams = apiRef.current.getCellParams(rowId, field);
77
- var result = cellParams;
78
- result.api = apiRef.current;
79
- return result;
80
- } catch (e) {
81
- if (e instanceof MissingRowIdError) {
82
- return EMPTY_CELL_PARAMS;
83
- }
84
- throw e;
85
- }
86
- }, objectShallowCompare);
87
- var isSelected = useGridSelector(apiRef, function () {
88
- return apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
89
- id: rowId,
90
- field: field
91
- });
92
- });
93
- if (cellParamsWithAPI === EMPTY_CELL_PARAMS) {
94
- return null;
95
- }
96
- var cellMode = cellParamsWithAPI.cellMode,
97
- hasFocus = cellParamsWithAPI.hasFocus,
98
- isEditable = cellParamsWithAPI.isEditable,
99
- value = cellParamsWithAPI.value,
100
- formattedValue = cellParamsWithAPI.formattedValue;
101
- var managesOwnFocus = column.type === 'actions';
102
- var tabIndex = (cellMode === 'view' || !isEditable) && !managesOwnFocus ? cellParamsWithAPI.tabIndex : -1;
103
- var rootClasses = rootProps.classes,
104
- getCellClassName = rootProps.getCellClassName;
105
- var classNames = apiRef.current.unstable_applyPipeProcessors('cellClassName', [], {
106
- id: rowId,
107
- field: field
108
- });
109
- if (column.cellClassName) {
110
- classNames.push(typeof column.cellClassName === 'function' ? column.cellClassName(cellParamsWithAPI) : column.cellClassName);
111
- }
112
- if (getCellClassName) {
113
- classNames.push(getCellClassName(cellParamsWithAPI));
114
- }
115
- var children;
116
- if (editCellState == null && column.renderCell) {
117
- children = column.renderCell(cellParamsWithAPI);
118
- classNames.push(gridClasses['cell--withRenderer']);
119
- classNames.push(rootClasses == null ? void 0 : rootClasses['cell--withRenderer']);
120
- }
121
- if (editCellState != null && column.renderEditCell) {
122
- var updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);
123
67
 
124
- // eslint-disable-next-line @typescript-eslint/naming-convention
125
- var changeReason = editCellState.changeReason,
126
- unstable_updateValueOnRender = editCellState.unstable_updateValueOnRender,
127
- editCellStateRest = _objectWithoutProperties(editCellState, _excluded);
128
- var params = _extends({}, cellParamsWithAPI, {
129
- row: updatedRow
130
- }, editCellStateRest);
131
- children = column.renderEditCell(params);
132
- classNames.push(gridClasses['cell--editing']);
133
- classNames.push(rootClasses == null ? void 0 : rootClasses['cell--editing']);
134
- }
135
- var slots = rootProps.slots;
136
- var CellComponent = slots.cell;
137
- var cellProps = _extends({}, props, {
138
- ref: ref,
139
- field: field,
140
- formattedValue: formattedValue,
141
- hasFocus: hasFocus,
142
- isEditable: isEditable,
143
- isSelected: isSelected,
144
- value: value,
145
- cellMode: cellMode,
146
- children: children,
147
- tabIndex: tabIndex,
148
- className: clsx(classNames)
149
- });
150
- return /*#__PURE__*/React.createElement(CellComponent, cellProps);
151
- });
152
68
  var GridCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
153
- var _rootProps$experiment, _rootProps$experiment2;
154
- var align = props.align,
155
- childrenProp = props.children,
156
- editCellState = props.editCellState,
157
- colIndex = props.colIndex,
158
- column = props.column,
159
- cellMode = props.cellMode,
160
- field = props.field,
161
- formattedValue = props.formattedValue,
162
- hasFocus = props.hasFocus,
163
- height = props.height,
164
- isEditable = props.isEditable,
165
- isSelected = props.isSelected,
166
- rowId = props.rowId,
167
- tabIndex = props.tabIndex,
168
- value = props.value,
169
- width = props.width,
170
- className = props.className,
171
- showRightBorder = props.showRightBorder,
172
- extendRowFullWidth = props.extendRowFullWidth,
173
- row = props.row,
174
- colSpan = props.colSpan,
175
- disableDragEvents = props.disableDragEvents,
176
- isNotVisible = props.isNotVisible,
177
- onClick = props.onClick,
178
- onDoubleClick = props.onDoubleClick,
179
- onMouseDown = props.onMouseDown,
180
- onMouseUp = props.onMouseUp,
181
- onMouseOver = props.onMouseOver,
182
- onKeyDown = props.onKeyDown,
183
- onKeyUp = props.onKeyUp,
184
- onDragEnter = props.onDragEnter,
185
- onDragOver = props.onDragOver,
186
- other = _objectWithoutProperties(props, _excluded2);
187
- var valueToRender = formattedValue == null ? value : formattedValue;
188
- var cellRef = React.useRef(null);
189
- var handleRef = useForkRef(ref, cellRef);
190
- var focusElementRef = React.useRef(null);
191
- var apiRef = useGridApiContext();
192
- var rootProps = useGridRootProps();
193
- var ownerState = {
194
- align: align,
195
- showRightBorder: showRightBorder,
196
- isEditable: isEditable,
197
- classes: rootProps.classes,
198
- isSelected: isSelected
199
- };
200
- var classes = useUtilityClasses(ownerState);
201
- var publishMouseUp = React.useCallback(function (eventName) {
202
- return function (event) {
203
- var params = apiRef.current.getCellParams(rowId, field || '');
204
- apiRef.current.publishEvent(eventName, params, event);
205
- if (onMouseUp) {
206
- onMouseUp(event);
207
- }
208
- };
209
- }, [apiRef, field, onMouseUp, rowId]);
210
- var publishMouseDown = React.useCallback(function (eventName) {
211
- return function (event) {
212
- var params = apiRef.current.getCellParams(rowId, field || '');
213
- apiRef.current.publishEvent(eventName, params, event);
214
- if (onMouseDown) {
215
- onMouseDown(event);
216
- }
217
- };
218
- }, [apiRef, field, onMouseDown, rowId]);
219
- var publish = React.useCallback(function (eventName, propHandler) {
220
- return function (event) {
221
- // The row might have been deleted during the click
222
- if (!apiRef.current.getRow(rowId)) {
223
- return;
224
- }
225
- var params = apiRef.current.getCellParams(rowId, field || '');
226
- apiRef.current.publishEvent(eventName, params, event);
227
- if (propHandler) {
228
- propHandler(event);
229
- }
230
- };
231
- }, [apiRef, field, rowId]);
232
- var style = React.useMemo(function () {
233
- if (isNotVisible) {
234
- return {
235
- padding: 0,
236
- opacity: 0,
237
- width: 0,
238
- border: 0
239
- };
240
- }
241
- var cellStyle = {
242
- minWidth: width,
243
- maxWidth: width,
244
- minHeight: height,
245
- maxHeight: height === 'auto' ? 'none' : height // max-height doesn't support "auto"
246
- };
247
- return cellStyle;
248
- }, [width, height, isNotVisible]);
249
- React.useEffect(function () {
250
- if (!hasFocus || cellMode === GridCellModes.Edit) {
251
- return;
252
- }
253
- var doc = ownerDocument(apiRef.current.rootElementRef.current);
254
- if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
255
- var focusableElement = cellRef.current.querySelector('[tabindex="0"]');
256
- var elementToFocus = focusElementRef.current || focusableElement || cellRef.current;
257
- if (doesSupportPreventScroll()) {
258
- elementToFocus.focus({
259
- preventScroll: true
260
- });
261
- } else {
262
- var scrollPosition = apiRef.current.getScrollPosition();
263
- elementToFocus.focus();
264
- apiRef.current.scroll(scrollPosition);
265
- }
266
- }
267
- }, [hasFocus, cellMode, apiRef]);
268
- var handleFocus = other.onFocus;
269
- if (process.env.NODE_ENV === 'test' && (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.warnIfFocusStateIsNotSynced) {
270
- handleFocus = function handleFocus(event) {
271
- var focusedCell = gridFocusCellSelector(apiRef);
272
- if ((focusedCell == null ? void 0 : focusedCell.id) === rowId && focusedCell.field === field) {
273
- if (typeof other.onFocus === 'function') {
274
- other.onFocus(event);
275
- }
276
- return;
277
- }
278
- if (!warnedOnce) {
279
- console.warn(["MUI X: The cell with id=".concat(rowId, " and field=").concat(field, " received focus."), "According to the state, the focus should be at id=".concat(focusedCell == null ? void 0 : focusedCell.id, ", field=").concat(focusedCell == null ? void 0 : focusedCell.field, "."), "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
280
- warnedOnce = true;
281
- }
282
- };
283
- }
284
- var managesOwnFocus = column.type === 'actions';
285
- var children = childrenProp;
286
- if (children === undefined) {
287
- var valueString = valueToRender == null ? void 0 : valueToRender.toString();
288
- children = /*#__PURE__*/_jsx("div", {
289
- className: classes.content,
290
- title: valueString,
291
- role: "presentation",
292
- children: valueString
293
- });
294
- }
295
- if ( /*#__PURE__*/React.isValidElement(children) && managesOwnFocus) {
296
- children = /*#__PURE__*/React.cloneElement(children, {
297
- focusElementRef: focusElementRef
298
- });
299
- }
300
- var draggableEventHandlers = disableDragEvents ? null : {
301
- onDragEnter: publish('cellDragEnter', onDragEnter),
302
- onDragOver: publish('cellDragOver', onDragOver)
303
- };
304
- var ariaV7 = (_rootProps$experiment2 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment2.ariaV7;
305
- return (
306
- /*#__PURE__*/
307
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
308
- _jsx("div", _extends({
309
- ref: handleRef,
310
- className: clsx(className, classes.root),
311
- role: ariaV7 ? 'gridcell' : 'cell',
312
- "data-field": field,
313
- "data-colindex": colIndex,
314
- "aria-colindex": colIndex + 1,
315
- "aria-colspan": colSpan,
316
- style: style,
317
- tabIndex: tabIndex,
318
- onClick: publish('cellClick', onClick),
319
- onDoubleClick: publish('cellDoubleClick', onDoubleClick),
320
- onMouseOver: publish('cellMouseOver', onMouseOver),
321
- onMouseDown: publishMouseDown('cellMouseDown'),
322
- onMouseUp: publishMouseUp('cellMouseUp'),
323
- onKeyDown: publish('cellKeyDown', onKeyDown),
324
- onKeyUp: publish('cellKeyUp', onKeyUp)
325
- }, draggableEventHandlers, other, {
326
- onFocus: handleFocus,
327
- children: children
328
- }))
329
- );
330
- });
331
- var MemoizedCellWrapper = fastMemo(GridCellWrapper);
332
- process.env.NODE_ENV !== "production" ? GridCellWrapper.propTypes = {
333
- // ----------------------------- Warning --------------------------------
334
- // | These PropTypes are generated from the TypeScript type definitions |
335
- // | To update them edit the TypeScript types and run "yarn proptypes" |
336
- // ----------------------------------------------------------------------
337
- align: PropTypes.oneOf(['center', 'left', 'right']),
338
- className: PropTypes.string,
339
- colIndex: PropTypes.number,
340
- colSpan: PropTypes.number,
341
- column: PropTypes.object,
342
- disableDragEvents: PropTypes.bool,
343
- height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
344
- onClick: PropTypes.func,
345
- onDoubleClick: PropTypes.func,
346
- onDragEnter: PropTypes.func,
347
- onDragOver: PropTypes.func,
348
- onKeyDown: PropTypes.func,
349
- onMouseDown: PropTypes.func,
350
- onMouseUp: PropTypes.func,
351
- rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
352
- showRightBorder: PropTypes.bool,
353
- width: PropTypes.number
354
- } : void 0;
355
- process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
356
- // ----------------------------- Warning --------------------------------
357
- // | These PropTypes are generated from the TypeScript type definitions |
358
- // | To update them edit the TypeScript types and run "yarn proptypes" |
359
- // ----------------------------------------------------------------------
360
- align: PropTypes.oneOf(['center', 'left', 'right']),
361
- cellMode: PropTypes.oneOf(['edit', 'view']),
362
- children: PropTypes.node,
363
- className: PropTypes.string,
364
- colIndex: PropTypes.number,
365
- colSpan: PropTypes.number,
366
- column: PropTypes.object,
367
- disableDragEvents: PropTypes.bool,
368
- editCellState: PropTypes.shape({
369
- changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
370
- isProcessingProps: PropTypes.bool,
371
- isValidating: PropTypes.bool,
372
- value: PropTypes.any
373
- }),
374
- isNotVisible: PropTypes.bool,
375
- height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
376
- onClick: PropTypes.func,
377
- onDoubleClick: PropTypes.func,
378
- onDragEnter: PropTypes.func,
379
- onDragOver: PropTypes.func,
380
- onKeyDown: PropTypes.func,
381
- onMouseDown: PropTypes.func,
382
- onMouseUp: PropTypes.func,
383
- rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
384
- showRightBorder: PropTypes.bool,
385
- width: PropTypes.number
386
- } : void 0;
387
- export { MemoizedCellWrapper as GridCellWrapper, GridCell };
388
- var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
389
- var _getActions, _ref, _rootProps$cellSelect, _rootProps$experiment3, _rootProps$experiment4;
69
+ var _getActions, _ref, _rootProps$cellSelect, _rootProps$experiment;
390
70
  var column = props.column,
391
71
  rowId = props.rowId,
392
72
  editCellState = props.editCellState,
@@ -396,12 +76,15 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
396
76
  height = props.height,
397
77
  width = props.width,
398
78
  className = props.className,
399
- showRightBorder = props.showRightBorder,
400
- extendRowFullWidth = props.extendRowFullWidth,
401
- row = props.row,
79
+ styleProp = props.style,
80
+ gridHasScrollX = props.gridHasScrollX,
402
81
  colSpan = props.colSpan,
403
82
  disableDragEvents = props.disableDragEvents,
404
83
  isNotVisible = props.isNotVisible,
84
+ pinnedOffset = props.pinnedOffset,
85
+ pinnedPosition = props.pinnedPosition,
86
+ sectionIndex = props.sectionIndex,
87
+ sectionLength = props.sectionLength,
405
88
  onClick = props.onClick,
406
89
  onDoubleClick = props.onDoubleClick,
407
90
  onMouseDown = props.onMouseDown,
@@ -411,7 +94,7 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
411
94
  onKeyUp = props.onKeyUp,
412
95
  onDragEnter = props.onDragEnter,
413
96
  onDragOver = props.onDragOver,
414
- other = _objectWithoutProperties(props, _excluded3);
97
+ other = _objectWithoutProperties(props, _excluded);
415
98
  var apiRef = useGridApiContext();
416
99
  var rootProps = useGridRootProps();
417
100
  var field = column.field;
@@ -439,7 +122,8 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
439
122
  });
440
123
  var cellMode = cellParamsWithAPI.cellMode,
441
124
  hasFocus = cellParamsWithAPI.hasFocus,
442
- isEditable = cellParamsWithAPI.isEditable,
125
+ _cellParamsWithAPI$is = cellParamsWithAPI.isEditable,
126
+ isEditable = _cellParamsWithAPI$is === void 0 ? false : _cellParamsWithAPI$is,
443
127
  value = cellParamsWithAPI.value,
444
128
  formattedValue = cellParamsWithAPI.formattedValue;
445
129
  var canManageOwnFocus = column.type === 'actions' && ((_getActions = (_ref = column).getActions) == null ? void 0 : _getActions.call(_ref, apiRef.current.getRowParams(rowId)).some(function (action) {
@@ -464,11 +148,16 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
464
148
  var focusElementRef = React.useRef(null);
465
149
  // @ts-expect-error To access `cellSelection` flag as it's a `premium` feature
466
150
  var isSelectionMode = (_rootProps$cellSelect = rootProps.cellSelection) != null ? _rootProps$cellSelect : false;
151
+ var isSectionLastCell = sectionIndex === sectionLength - 1;
152
+ var showLeftBorder = pinnedPosition === PinnedPosition.RIGHT && sectionIndex === 0;
153
+ var showRightBorder = rootProps.showCellVerticalBorder && (pinnedPosition !== PinnedPosition.LEFT ? !isSectionLastCell : true) || pinnedPosition === PinnedPosition.LEFT && isSectionLastCell;
467
154
  var ownerState = {
468
155
  align: align,
156
+ showLeftBorder: showLeftBorder,
469
157
  showRightBorder: showRightBorder,
470
158
  isEditable: isEditable,
471
159
  classes: rootProps.classes,
160
+ pinnedPosition: pinnedPosition,
472
161
  isSelected: isSelected,
473
162
  isSelectionMode: isSelectionMode
474
163
  };
@@ -513,14 +202,18 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
513
202
  border: 0
514
203
  };
515
204
  }
516
- var cellStyle = {
517
- minWidth: width,
518
- maxWidth: width,
519
- minHeight: height,
520
- maxHeight: height === 'auto' ? 'none' : height // max-height doesn't support "auto"
521
- };
205
+ var cellStyle = _extends({
206
+ '--width': "".concat(width, "px"),
207
+ '--height': typeof height === 'number' ? "".concat(height, "px") : height
208
+ }, styleProp);
209
+ if (pinnedPosition === PinnedPosition.LEFT) {
210
+ cellStyle.left = pinnedOffset;
211
+ }
212
+ if (pinnedPosition === PinnedPosition.RIGHT) {
213
+ cellStyle.right = pinnedOffset;
214
+ }
522
215
  return cellStyle;
523
- }, [width, height, isNotVisible]);
216
+ }, [width, height, isNotVisible, styleProp, pinnedOffset, pinnedPosition]);
524
217
  React.useEffect(function () {
525
218
  if (!hasFocus || cellMode === GridCellModes.Edit) {
526
219
  return;
@@ -544,7 +237,7 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
544
237
  return null;
545
238
  }
546
239
  var handleFocus = other.onFocus;
547
- if (process.env.NODE_ENV === 'test' && (_rootProps$experiment3 = rootProps.experimentalFeatures) != null && _rootProps$experiment3.warnIfFocusStateIsNotSynced) {
240
+ if (process.env.NODE_ENV === 'test' && (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.warnIfFocusStateIsNotSynced) {
548
241
  handleFocus = function handleFocus(event) {
549
242
  var focusedCell = gridFocusCellSelector(apiRef);
550
243
  if ((focusedCell == null ? void 0 : focusedCell.id) === rowId && focusedCell.field === field) {
@@ -571,7 +264,7 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
571
264
  // eslint-disable-next-line @typescript-eslint/naming-convention
572
265
  var changeReason = editCellState.changeReason,
573
266
  unstable_updateValueOnRender = editCellState.unstable_updateValueOnRender,
574
- editCellStateRest = _objectWithoutProperties(editCellState, _excluded4);
267
+ editCellStateRest = _objectWithoutProperties(editCellState, _excluded2);
575
268
  var params = _extends({}, cellParamsWithAPI, {
576
269
  row: updatedRow
577
270
  }, editCellStateRest);
@@ -597,34 +290,29 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
597
290
  onDragEnter: publish('cellDragEnter', onDragEnter),
598
291
  onDragOver: publish('cellDragOver', onDragOver)
599
292
  };
600
- var ariaV7 = (_rootProps$experiment4 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment4.ariaV7;
601
- return (
602
- /*#__PURE__*/
603
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
604
- _jsx("div", _extends({
605
- ref: handleRef,
606
- className: clsx(className, classNames, classes.root),
607
- role: ariaV7 ? 'gridcell' : 'cell',
608
- "data-field": field,
609
- "data-colindex": colIndex,
610
- "aria-colindex": colIndex + 1,
611
- "aria-colspan": colSpan,
612
- style: style,
613
- tabIndex: tabIndex,
614
- onClick: publish('cellClick', onClick),
615
- onDoubleClick: publish('cellDoubleClick', onDoubleClick),
616
- onMouseOver: publish('cellMouseOver', onMouseOver),
617
- onMouseDown: publishMouseDown('cellMouseDown'),
618
- onMouseUp: publishMouseUp('cellMouseUp'),
619
- onKeyDown: publish('cellKeyDown', onKeyDown),
620
- onKeyUp: publish('cellKeyUp', onKeyUp)
621
- }, draggableEventHandlers, other, {
622
- onFocus: handleFocus,
623
- children: children
624
- }))
625
- );
293
+ return /*#__PURE__*/_jsx("div", _extends({
294
+ ref: handleRef,
295
+ className: clsx(className, classNames, classes.root),
296
+ role: "gridcell",
297
+ "data-field": field,
298
+ "data-colindex": colIndex,
299
+ "aria-colindex": colIndex + 1,
300
+ "aria-colspan": colSpan,
301
+ style: style,
302
+ tabIndex: tabIndex,
303
+ onClick: publish('cellClick', onClick),
304
+ onDoubleClick: publish('cellDoubleClick', onDoubleClick),
305
+ onMouseOver: publish('cellMouseOver', onMouseOver),
306
+ onMouseDown: publishMouseDown('cellMouseDown'),
307
+ onMouseUp: publishMouseUp('cellMouseUp'),
308
+ onKeyDown: publish('cellKeyDown', onKeyDown),
309
+ onKeyUp: publish('cellKeyUp', onKeyUp)
310
+ }, draggableEventHandlers, other, {
311
+ onFocus: handleFocus,
312
+ children: children
313
+ }));
626
314
  });
627
- process.env.NODE_ENV !== "production" ? GridCellV7.propTypes = {
315
+ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
628
316
  // ----------------------------- Warning --------------------------------
629
317
  // | These PropTypes are generated from the TypeScript type definitions |
630
318
  // | To update them edit the TypeScript types and run "yarn proptypes" |
@@ -641,8 +329,9 @@ process.env.NODE_ENV !== "production" ? GridCellV7.propTypes = {
641
329
  isValidating: PropTypes.bool,
642
330
  value: PropTypes.any
643
331
  }),
332
+ gridHasScrollX: PropTypes.bool.isRequired,
644
333
  height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,
645
- isNotVisible: PropTypes.bool,
334
+ isNotVisible: PropTypes.bool.isRequired,
646
335
  onClick: PropTypes.func,
647
336
  onDoubleClick: PropTypes.func,
648
337
  onDragEnter: PropTypes.func,
@@ -650,9 +339,12 @@ process.env.NODE_ENV !== "production" ? GridCellV7.propTypes = {
650
339
  onKeyDown: PropTypes.func,
651
340
  onMouseDown: PropTypes.func,
652
341
  onMouseUp: PropTypes.func,
342
+ pinnedOffset: PropTypes.number.isRequired,
343
+ pinnedPosition: PropTypes.oneOf([0, 1, 2]).isRequired,
653
344
  rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
654
- showRightBorder: PropTypes.bool,
345
+ sectionIndex: PropTypes.number.isRequired,
346
+ sectionLength: PropTypes.number.isRequired,
655
347
  width: PropTypes.number.isRequired
656
348
  } : void 0;
657
- var MemoizedGridCellV7 = fastMemo(GridCellV7);
658
- export { MemoizedGridCellV7 as GridCellV7 };
349
+ var MemoizedGridCell = fastMemo(GridCell);
350
+ export { MemoizedGridCell as GridCell };
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  var useUtilityClasses = function useUtilityClasses(ownerState) {
12
12
  var classes = ownerState.classes;
13
13
  var slots = {
14
- root: ['columnHeaders', 'withBorderColor']
14
+ root: ['columnHeaders']
15
15
  };
16
16
  return composeClasses(slots, getDataGridUtilityClass, classes);
17
17
  };
@@ -22,12 +22,7 @@ var GridColumnHeadersRoot = styled('div', {
22
22
  return styles.columnHeaders;
23
23
  }
24
24
  })({
25
- position: 'relative',
26
- overflow: 'hidden',
27
25
  display: 'flex',
28
- alignItems: 'center',
29
- boxSizing: 'border-box',
30
- borderBottom: '1px solid',
31
26
  borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
32
27
  borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
33
28
  });
@@ -3,6 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
6
+ import { fastMemo } from '../../utils/fastMemo';
6
7
  import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
7
8
  import { GridColumnHeaderSortIcon } from './GridColumnHeaderSortIcon';
8
9
  import { ColumnHeaderMenuIcon } from './ColumnHeaderMenuIcon';
@@ -135,14 +136,16 @@ function GridColumnHeaderItem(props) {
135
136
  onExited: handleExited
136
137
  });
137
138
  var sortingOrder = (_colDef$sortingOrder = colDef.sortingOrder) != null ? _colDef$sortingOrder : rootProps.sortingOrder;
139
+ var showSortIcon = (colDef.sortable || sortDirection != null) && !colDef.hideSortIcons && !rootProps.disableColumnSorting;
138
140
  var columnTitleIconButtons = /*#__PURE__*/_jsxs(React.Fragment, {
139
141
  children: [!rootProps.disableColumnFilter && /*#__PURE__*/_jsx(rootProps.slots.columnHeaderFilterIconButton, _extends({
140
142
  field: colDef.field,
141
143
  counter: filterItemsCounter
142
- }, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.columnHeaderFilterIconButton)), colDef.sortable && !colDef.hideSortIcons && /*#__PURE__*/_jsx(GridColumnHeaderSortIcon, {
144
+ }, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.columnHeaderFilterIconButton)), showSortIcon && /*#__PURE__*/_jsx(GridColumnHeaderSortIcon, {
143
145
  direction: sortDirection,
144
146
  index: sortIndex,
145
- sortingOrder: sortingOrder
147
+ sortingOrder: sortingOrder,
148
+ disabled: !colDef.sortable
146
149
  })]
147
150
  });
148
151
  React.useLayoutEffect(function () {
@@ -205,4 +208,5 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
205
208
  sortIndex: PropTypes.number,
206
209
  tabIndex: PropTypes.oneOf([-1, 0]).isRequired
207
210
  } : void 0;
208
- export { GridColumnHeaderItem };
211
+ var Memoized = fastMemo(GridColumnHeaderItem);
212
+ export { Memoized as GridColumnHeaderItem };
@@ -36,7 +36,8 @@ function GridColumnHeaderSortIconRaw(props) {
36
36
  var _rootProps$slotProps;
37
37
  var direction = props.direction,
38
38
  index = props.index,
39
- sortingOrder = props.sortingOrder;
39
+ sortingOrder = props.sortingOrder,
40
+ disabled = props.disabled;
40
41
  var apiRef = useGridApiContext();
41
42
  var rootProps = useGridRootProps();
42
43
  var ownerState = _extends({}, props, {
@@ -51,7 +52,8 @@ function GridColumnHeaderSortIconRaw(props) {
51
52
  tabIndex: -1,
52
53
  "aria-label": apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
53
54
  title: apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
54
- size: "small"
55
+ size: "small",
56
+ disabled: disabled
55
57
  }, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
56
58
  children: iconElement
57
59
  }));
@@ -70,6 +72,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes =
70
72
  // | To update them edit the TypeScript types and run "yarn proptypes" |
71
73
  // ----------------------------------------------------------------------
72
74
  direction: PropTypes.oneOf(['asc', 'desc']),
75
+ disabled: PropTypes.bool,
73
76
  index: PropTypes.number,
74
77
  sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])).isRequired
75
78
  } : void 0;
@@ -37,7 +37,6 @@ var GridColumnHeadersInnerRoot = styled('div', {
37
37
  });
38
38
  });
39
39
  export var GridColumnHeadersInner = /*#__PURE__*/React.forwardRef(function GridColumnHeadersInner(props, ref) {
40
- var _apiRef$current$getRo, _apiRef$current$getRo2;
41
40
  var isDragging = props.isDragging,
42
41
  className = props.className,
43
42
  other = _objectWithoutProperties(props, _excluded);
@@ -45,7 +44,7 @@ export var GridColumnHeadersInner = /*#__PURE__*/React.forwardRef(function GridC
45
44
  var rootProps = useGridRootProps();
46
45
  var ownerState = _extends({}, rootProps, {
47
46
  isDragging: isDragging,
48
- hasScrollX: (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.hasScrollX) != null ? _apiRef$current$getRo : false
47
+ hasScrollX: apiRef.current.getRootDimensions().hasScrollX
49
48
  });
50
49
  var classes = useUtilityClasses(ownerState);
51
50
  return /*#__PURE__*/_jsx(GridColumnHeadersInnerRoot, _extends({