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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/CHANGELOG.md +242 -1
  2. package/DataGrid/DataGrid.js +4 -5
  3. package/DataGrid/useDataGridComponent.d.ts +1 -1
  4. package/DataGrid/useDataGridComponent.js +1 -1
  5. package/components/GridHeaders.js +2 -2
  6. package/components/GridRow.d.ts +5 -9
  7. package/components/GridRow.js +26 -78
  8. package/components/GridSkeletonLoadingOverlay.js +18 -18
  9. package/components/cell/GridActionsCellItem.d.ts +16 -9
  10. package/components/cell/GridActionsCellItem.js +2 -0
  11. package/components/cell/GridCell.d.ts +9 -16
  12. package/components/cell/GridCell.js +17 -35
  13. package/components/cell/GridEditDateCell.js +1 -1
  14. package/components/cell/GridEditInputCell.js +1 -1
  15. package/components/cell/GridEditSingleSelectCell.js +2 -2
  16. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  17. package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
  18. package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  19. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  20. package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
  21. package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  22. package/components/columnSelection/GridCellCheckboxRenderer.js +4 -3
  23. package/components/columnSelection/GridHeaderCheckbox.js +6 -2
  24. package/components/columnsManagement/GridColumnsManagement.js +2 -2
  25. package/components/containers/GridRoot.d.ts +2 -2
  26. package/components/containers/GridRoot.js +14 -6
  27. package/components/containers/GridRootStyles.js +7 -0
  28. package/components/panel/GridPanel.d.ts +1 -1
  29. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -0
  30. package/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  31. package/components/panel/filterPanel/GridFilterInputDate.d.ts +2 -1
  32. package/components/panel/filterPanel/GridFilterInputDate.js +32 -29
  33. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  34. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  35. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -0
  36. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  37. package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -0
  38. package/components/panel/filterPanel/GridFilterInputValue.js +40 -37
  39. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +1 -1
  40. package/components/toolbar/GridToolbarQuickFilter.js +2 -2
  41. package/components/virtualization/GridVirtualScrollbar.js +11 -12
  42. package/components/virtualization/GridVirtualScroller.js +4 -4
  43. package/constants/gridClasses.d.ts +12 -0
  44. package/constants/gridClasses.js +1 -1
  45. package/constants/localeTextConstants.js +1 -0
  46. package/context/GridContextProvider.d.ts +1 -1
  47. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
  48. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +1 -1
  49. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +1 -1
  50. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  51. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +1 -1
  52. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  53. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +1 -1
  54. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +1 -1
  55. package/hooks/core/useGridApiInitialization.d.ts +1 -1
  56. package/hooks/core/useGridApiInitialization.js +2 -2
  57. package/hooks/core/useGridInitialization.d.ts +1 -1
  58. package/hooks/core/useGridIsRtl.d.ts +1 -1
  59. package/hooks/core/useGridLocaleText.d.ts +1 -1
  60. package/hooks/core/useGridLoggerFactory.d.ts +1 -1
  61. package/hooks/core/useGridRefs.d.ts +1 -1
  62. package/hooks/core/useGridStateInitialization.d.ts +1 -1
  63. package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
  64. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
  65. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
  66. package/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
  67. package/hooks/features/columnMenu/useGridColumnMenu.d.ts +1 -1
  68. package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
  69. package/hooks/features/columnResize/useGridColumnResize.js +4 -4
  70. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -3
  71. package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
  72. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  73. package/hooks/features/density/useGridDensity.d.ts +1 -1
  74. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  75. package/hooks/features/editing/useGridCellEditing.d.ts +1 -1
  76. package/hooks/features/editing/useGridCellEditing.js +1 -1
  77. package/hooks/features/editing/useGridEditing.d.ts +1 -1
  78. package/hooks/features/editing/useGridRowEditing.d.ts +1 -1
  79. package/hooks/features/editing/useGridRowEditing.js +2 -2
  80. package/hooks/features/events/useGridEvents.d.ts +1 -1
  81. package/hooks/features/export/serializers/csvSerializer.d.ts +1 -1
  82. package/hooks/features/export/useGridCsvExport.d.ts +1 -1
  83. package/hooks/features/export/useGridPrintExport.d.ts +1 -1
  84. package/hooks/features/export/useGridPrintExport.js +1 -1
  85. package/hooks/features/export/utils.d.ts +1 -1
  86. package/hooks/features/filter/gridFilterSelector.d.ts +1 -1
  87. package/hooks/features/filter/gridFilterSelector.js +6 -1
  88. package/hooks/features/filter/gridFilterUtils.d.ts +6 -6
  89. package/hooks/features/filter/gridFilterUtils.js +3 -3
  90. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  91. package/hooks/features/focus/useGridFocus.d.ts +1 -1
  92. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +1 -1
  93. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
  94. package/hooks/features/keyboardNavigation/utils.d.ts +2 -2
  95. package/hooks/features/listView/useGridListView.d.ts +1 -1
  96. package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
  97. package/hooks/features/pagination/gridPaginationSelector.d.ts +21 -2
  98. package/hooks/features/pagination/gridPaginationSelector.js +39 -1
  99. package/hooks/features/pagination/useGridPagination.d.ts +2 -2
  100. package/hooks/features/pagination/useGridPagination.js +5 -3
  101. package/hooks/features/pagination/useGridPaginationMeta.d.ts +1 -1
  102. package/hooks/features/pagination/useGridPaginationModel.d.ts +1 -1
  103. package/hooks/features/pagination/useGridPaginationModel.js +23 -1
  104. package/hooks/features/pagination/useGridRowCount.d.ts +1 -1
  105. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
  106. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  107. package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  108. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +1 -1
  109. package/hooks/features/rowSelection/utils.d.ts +2 -2
  110. package/hooks/features/rows/gridRowSpanningUtils.d.ts +1 -1
  111. package/hooks/features/rows/gridRowsSelector.js +1 -1
  112. package/hooks/features/rows/gridRowsUtils.d.ts +3 -3
  113. package/hooks/features/rows/useGridParamsApi.d.ts +1 -1
  114. package/hooks/features/rows/useGridRowSpanning.d.ts +1 -1
  115. package/hooks/features/rows/useGridRows.d.ts +1 -1
  116. package/hooks/features/rows/useGridRows.js +2 -2
  117. package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
  118. package/hooks/features/rows/useGridRowsPreProcessors.d.ts +1 -1
  119. package/hooks/features/scroll/useGridScroll.d.ts +1 -1
  120. package/hooks/features/sorting/gridSortingUtils.d.ts +2 -2
  121. package/hooks/features/sorting/gridSortingUtils.js +2 -2
  122. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  123. package/hooks/features/statePersistence/useGridStatePersistence.d.ts +1 -1
  124. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
  125. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
  126. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +5 -4
  127. package/hooks/features/virtualization/useGridVirtualScroller.js +96 -43
  128. package/hooks/features/virtualization/useGridVirtualization.d.ts +1 -1
  129. package/hooks/utils/useGridApiContext.d.ts +1 -1
  130. package/hooks/utils/useGridApiEventHandler.d.ts +3 -3
  131. package/hooks/utils/useGridApiEventHandler.js +1 -1
  132. package/hooks/utils/useGridApiMethod.d.ts +1 -1
  133. package/hooks/utils/useGridApiRef.d.ts +1 -1
  134. package/hooks/utils/useGridInitializeState.d.ts +2 -2
  135. package/hooks/utils/useGridLogger.d.ts +1 -1
  136. package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
  137. package/hooks/utils/useGridPrivateApiContext.d.ts +1 -1
  138. package/hooks/utils/useGridSelector.d.ts +1 -1
  139. package/hooks/utils/useGridVisibleRows.d.ts +7 -5
  140. package/hooks/utils/useGridVisibleRows.js +5 -28
  141. package/index.js +1 -1
  142. package/internals/constants.d.ts +6 -0
  143. package/internals/constants.js +8 -1
  144. package/internals/index.d.ts +2 -1
  145. package/internals/index.js +1 -0
  146. package/internals/utils/attachPinnedStyle.d.ts +2 -0
  147. package/internals/utils/attachPinnedStyle.js +9 -0
  148. package/internals/utils/getPinnedCellOffset.d.ts +3 -3
  149. package/internals/utils/getPinnedCellOffset.js +6 -7
  150. package/internals/utils/index.d.ts +1 -0
  151. package/internals/utils/index.js +2 -1
  152. package/locales/arSD.js +2 -0
  153. package/locales/beBY.js +1 -0
  154. package/locales/bgBG.js +2 -0
  155. package/locales/csCZ.js +2 -0
  156. package/locales/daDK.js +2 -0
  157. package/locales/deDE.js +2 -0
  158. package/locales/elGR.js +2 -0
  159. package/locales/esES.js +2 -0
  160. package/locales/faIR.js +2 -0
  161. package/locales/fiFI.js +2 -0
  162. package/locales/frFR.js +2 -0
  163. package/locales/heIL.js +2 -0
  164. package/locales/hrHR.js +2 -0
  165. package/locales/huHU.js +2 -0
  166. package/locales/isIS.js +2 -0
  167. package/locales/itIT.js +2 -0
  168. package/locales/jaJP.js +2 -0
  169. package/locales/koKR.js +2 -0
  170. package/locales/nbNO.js +2 -0
  171. package/locales/nlNL.js +2 -0
  172. package/locales/nnNO.js +2 -0
  173. package/locales/plPL.js +2 -0
  174. package/locales/ptBR.js +2 -0
  175. package/locales/ptPT.js +2 -0
  176. package/locales/roRO.js +2 -0
  177. package/locales/ruRU.js +2 -0
  178. package/locales/skSK.js +2 -0
  179. package/locales/svSE.js +2 -0
  180. package/locales/trTR.js +2 -0
  181. package/locales/ukUA.js +2 -0
  182. package/locales/urPK.js +2 -0
  183. package/locales/viVN.js +2 -0
  184. package/locales/zhCN.js +2 -0
  185. package/locales/zhHK.js +2 -0
  186. package/locales/zhTW.js +2 -0
  187. package/material/index.js +2 -1
  188. package/models/api/gridCoreApi.d.ts +7 -7
  189. package/models/api/gridDensityApi.d.ts +1 -1
  190. package/models/api/gridLocaleTextApi.d.ts +1 -0
  191. package/models/colDef/gridColDef.d.ts +8 -8
  192. package/models/events/gridEventLookup.d.ts +6 -1
  193. package/models/gridBaseSlots.d.ts +32 -2
  194. package/models/gridExport.d.ts +1 -1
  195. package/models/gridFilterOperator.d.ts +1 -1
  196. package/models/gridIconSlotsComponent.d.ts +5 -0
  197. package/models/gridSlotsComponentsProps.d.ts +12 -8
  198. package/models/gridStateCommunity.d.ts +4 -0
  199. package/models/props/DataGridProps.d.ts +1 -1
  200. package/modern/DataGrid/DataGrid.js +4 -5
  201. package/modern/DataGrid/useDataGridComponent.js +1 -1
  202. package/modern/components/GridHeaders.js +2 -2
  203. package/modern/components/GridRow.js +26 -78
  204. package/modern/components/GridSkeletonLoadingOverlay.js +18 -18
  205. package/modern/components/cell/GridActionsCellItem.js +2 -0
  206. package/modern/components/cell/GridCell.js +17 -35
  207. package/modern/components/cell/GridEditDateCell.js +1 -1
  208. package/modern/components/cell/GridEditInputCell.js +1 -1
  209. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  210. package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  211. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  212. package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  213. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +4 -3
  214. package/modern/components/columnSelection/GridHeaderCheckbox.js +6 -2
  215. package/modern/components/columnsManagement/GridColumnsManagement.js +2 -2
  216. package/modern/components/containers/GridRoot.js +14 -6
  217. package/modern/components/containers/GridRootStyles.js +7 -0
  218. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  219. package/modern/components/panel/filterPanel/GridFilterInputDate.js +32 -29
  220. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  221. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  222. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  223. package/modern/components/panel/filterPanel/GridFilterInputValue.js +40 -37
  224. package/modern/components/toolbar/GridToolbarQuickFilter.js +2 -2
  225. package/modern/components/virtualization/GridVirtualScrollbar.js +11 -12
  226. package/modern/components/virtualization/GridVirtualScroller.js +4 -4
  227. package/modern/constants/gridClasses.js +1 -1
  228. package/modern/constants/localeTextConstants.js +1 -0
  229. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  230. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  231. package/modern/hooks/core/useGridApiInitialization.js +2 -2
  232. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
  233. package/modern/hooks/features/columnResize/useGridColumnResize.js +4 -4
  234. package/modern/hooks/features/editing/useGridCellEditing.js +1 -1
  235. package/modern/hooks/features/editing/useGridRowEditing.js +2 -2
  236. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  237. package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
  238. package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
  239. package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
  240. package/modern/hooks/features/pagination/useGridPagination.js +5 -3
  241. package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
  242. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  243. package/modern/hooks/features/rows/gridRowsSelector.js +1 -1
  244. package/modern/hooks/features/rows/useGridRows.js +2 -2
  245. package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
  246. package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
  247. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +96 -43
  248. package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
  249. package/modern/hooks/utils/useGridVisibleRows.js +5 -28
  250. package/modern/index.js +1 -1
  251. package/modern/internals/constants.js +8 -1
  252. package/modern/internals/index.js +1 -0
  253. package/modern/internals/utils/attachPinnedStyle.js +9 -0
  254. package/modern/internals/utils/getPinnedCellOffset.js +6 -7
  255. package/modern/internals/utils/index.js +2 -1
  256. package/modern/locales/arSD.js +2 -0
  257. package/modern/locales/beBY.js +1 -0
  258. package/modern/locales/bgBG.js +2 -0
  259. package/modern/locales/csCZ.js +2 -0
  260. package/modern/locales/daDK.js +2 -0
  261. package/modern/locales/deDE.js +2 -0
  262. package/modern/locales/elGR.js +2 -0
  263. package/modern/locales/esES.js +2 -0
  264. package/modern/locales/faIR.js +2 -0
  265. package/modern/locales/fiFI.js +2 -0
  266. package/modern/locales/frFR.js +2 -0
  267. package/modern/locales/heIL.js +2 -0
  268. package/modern/locales/hrHR.js +2 -0
  269. package/modern/locales/huHU.js +2 -0
  270. package/modern/locales/isIS.js +2 -0
  271. package/modern/locales/itIT.js +2 -0
  272. package/modern/locales/jaJP.js +2 -0
  273. package/modern/locales/koKR.js +2 -0
  274. package/modern/locales/nbNO.js +2 -0
  275. package/modern/locales/nlNL.js +2 -0
  276. package/modern/locales/nnNO.js +2 -0
  277. package/modern/locales/plPL.js +2 -0
  278. package/modern/locales/ptBR.js +2 -0
  279. package/modern/locales/ptPT.js +2 -0
  280. package/modern/locales/roRO.js +2 -0
  281. package/modern/locales/ruRU.js +2 -0
  282. package/modern/locales/skSK.js +2 -0
  283. package/modern/locales/svSE.js +2 -0
  284. package/modern/locales/trTR.js +2 -0
  285. package/modern/locales/ukUA.js +2 -0
  286. package/modern/locales/urPK.js +2 -0
  287. package/modern/locales/viVN.js +2 -0
  288. package/modern/locales/zhCN.js +2 -0
  289. package/modern/locales/zhHK.js +2 -0
  290. package/modern/locales/zhTW.js +2 -0
  291. package/modern/material/index.js +2 -1
  292. package/modern/utils/cellBorderUtils.js +5 -5
  293. package/modern/utils/domUtils.js +7 -2
  294. package/modern/utils/rtlFlipSide.js +22 -0
  295. package/node/DataGrid/DataGrid.js +2 -3
  296. package/node/DataGrid/useDataGridComponent.js +1 -1
  297. package/node/components/GridHeaders.js +2 -2
  298. package/node/components/GridRow.js +25 -77
  299. package/node/components/GridSkeletonLoadingOverlay.js +17 -17
  300. package/node/components/cell/GridActionsCellItem.js +1 -1
  301. package/node/components/cell/GridCell.js +18 -36
  302. package/node/components/cell/GridEditDateCell.js +1 -1
  303. package/node/components/cell/GridEditInputCell.js +1 -1
  304. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  305. package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  306. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  307. package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  308. package/node/components/columnSelection/GridCellCheckboxRenderer.js +3 -2
  309. package/node/components/columnSelection/GridHeaderCheckbox.js +6 -2
  310. package/node/components/columnsManagement/GridColumnsManagement.js +2 -2
  311. package/node/components/containers/GridRoot.js +14 -6
  312. package/node/components/containers/GridRootStyles.js +7 -0
  313. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
  314. package/node/components/panel/filterPanel/GridFilterInputDate.js +31 -28
  315. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  316. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  317. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
  318. package/node/components/panel/filterPanel/GridFilterInputValue.js +39 -36
  319. package/node/components/toolbar/GridToolbarQuickFilter.js +2 -2
  320. package/node/components/virtualization/GridVirtualScrollbar.js +11 -12
  321. package/node/components/virtualization/GridVirtualScroller.js +4 -4
  322. package/node/constants/gridClasses.js +1 -1
  323. package/node/constants/localeTextConstants.js +1 -0
  324. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  325. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  326. package/node/hooks/core/useGridApiInitialization.js +2 -2
  327. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -74
  328. package/node/hooks/features/columnResize/useGridColumnResize.js +4 -4
  329. package/node/hooks/features/editing/useGridCellEditing.js +1 -1
  330. package/node/hooks/features/editing/useGridRowEditing.js +2 -2
  331. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  332. package/node/hooks/features/filter/gridFilterSelector.js +6 -1
  333. package/node/hooks/features/filter/gridFilterUtils.js +3 -3
  334. package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
  335. package/node/hooks/features/pagination/useGridPagination.js +5 -3
  336. package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
  337. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  338. package/node/hooks/features/rows/gridRowsSelector.js +1 -1
  339. package/node/hooks/features/rows/useGridRows.js +1 -1
  340. package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
  341. package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +49 -0
  342. package/node/hooks/features/virtualization/useGridVirtualScroller.js +96 -43
  343. package/node/hooks/utils/useGridApiEventHandler.js +1 -1
  344. package/node/hooks/utils/useGridVisibleRows.js +3 -28
  345. package/node/index.js +1 -1
  346. package/node/internals/constants.js +9 -2
  347. package/node/internals/index.js +12 -0
  348. package/node/internals/utils/attachPinnedStyle.js +15 -0
  349. package/node/internals/utils/getPinnedCellOffset.js +6 -7
  350. package/node/internals/utils/index.js +11 -0
  351. package/node/locales/arSD.js +2 -0
  352. package/node/locales/beBY.js +1 -0
  353. package/node/locales/bgBG.js +2 -0
  354. package/node/locales/csCZ.js +2 -0
  355. package/node/locales/daDK.js +2 -0
  356. package/node/locales/deDE.js +2 -0
  357. package/node/locales/elGR.js +2 -0
  358. package/node/locales/esES.js +2 -0
  359. package/node/locales/faIR.js +2 -0
  360. package/node/locales/fiFI.js +2 -0
  361. package/node/locales/frFR.js +2 -0
  362. package/node/locales/heIL.js +2 -0
  363. package/node/locales/hrHR.js +2 -0
  364. package/node/locales/huHU.js +2 -0
  365. package/node/locales/isIS.js +2 -0
  366. package/node/locales/itIT.js +2 -0
  367. package/node/locales/jaJP.js +2 -0
  368. package/node/locales/koKR.js +2 -0
  369. package/node/locales/nbNO.js +2 -0
  370. package/node/locales/nlNL.js +2 -0
  371. package/node/locales/nnNO.js +2 -0
  372. package/node/locales/plPL.js +2 -0
  373. package/node/locales/ptBR.js +2 -0
  374. package/node/locales/ptPT.js +2 -0
  375. package/node/locales/roRO.js +2 -0
  376. package/node/locales/ruRU.js +2 -0
  377. package/node/locales/skSK.js +2 -0
  378. package/node/locales/svSE.js +2 -0
  379. package/node/locales/trTR.js +2 -0
  380. package/node/locales/ukUA.js +2 -0
  381. package/node/locales/urPK.js +2 -0
  382. package/node/locales/viVN.js +2 -0
  383. package/node/locales/zhCN.js +2 -0
  384. package/node/locales/zhHK.js +2 -0
  385. package/node/locales/zhTW.js +2 -0
  386. package/node/material/index.js +2 -1
  387. package/node/utils/cellBorderUtils.js +5 -5
  388. package/node/utils/domUtils.js +7 -2
  389. package/node/utils/rtlFlipSide.js +29 -0
  390. package/package.json +2 -2
  391. package/utils/cellBorderUtils.d.ts +3 -3
  392. package/utils/cellBorderUtils.js +5 -5
  393. package/utils/createSelector.d.ts +1 -1
  394. package/utils/domUtils.js +7 -2
  395. package/utils/getPublicApiRef.d.ts +1 -1
  396. package/utils/rtlFlipSide.d.ts +2 -0
  397. package/utils/rtlFlipSide.js +22 -0
@@ -1,10 +1,9 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "placeholder", "tabIndex", "label", "variant", "isFilterActive", "clearButton", "InputLabelProps"];
3
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "placeholder", "tabIndex", "label", "variant", "isFilterActive", "clearButton", "headerFilterMenu", "InputProps", "InputLabelProps", "sx"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { unstable_useId as useId } from '@mui/utils';
7
- import { styled } from '@mui/material/styles';
8
7
  import { useGridRootProps } from "../../../hooks/utils/useGridRootProps.js";
9
8
  import { getValueFromValueOptions, getValueOptions, isSingleSelectColDef } from "./filterPanelUtils.js";
10
9
  import { createElement as _createElement } from "react";
@@ -31,14 +30,6 @@ const renderSingleSelectOptions = ({
31
30
  }), label);
32
31
  });
33
32
  };
34
- const SingleSelectOperatorContainer = styled('div')({
35
- display: 'flex',
36
- alignItems: 'flex-end',
37
- width: '100%',
38
- [`& button`]: {
39
- margin: 'auto 0px 5px 5px'
40
- }
41
- });
42
33
  function GridFilterInputSingleSelect(props) {
43
34
  const {
44
35
  item,
@@ -49,8 +40,11 @@ function GridFilterInputSingleSelect(props) {
49
40
  placeholder,
50
41
  tabIndex,
51
42
  label: labelProp,
52
- variant = 'standard',
53
- clearButton
43
+ variant = 'outlined',
44
+ clearButton,
45
+ headerFilterMenu,
46
+ InputProps,
47
+ sx
54
48
  } = props,
55
49
  others = _objectWithoutPropertiesLoose(props, _excluded);
56
50
  const filterValue = item.value ?? '';
@@ -83,9 +77,10 @@ function GridFilterInputSingleSelect(props) {
83
77
  return null;
84
78
  }
85
79
  const label = labelProp ?? apiRef.current.getLocaleText('filterPanelInputLabel');
86
- return /*#__PURE__*/_jsxs(SingleSelectOperatorContainer, {
80
+ return /*#__PURE__*/_jsxs(React.Fragment, {
87
81
  children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
88
82
  fullWidth: true,
83
+ sx: sx,
89
84
  children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, rootProps.slotProps?.baseInputLabel, {
90
85
  id: labelId,
91
86
  htmlFor: id,
@@ -100,14 +95,14 @@ function GridFilterInputSingleSelect(props) {
100
95
  onChange: onFilterChange,
101
96
  variant: variant,
102
97
  type: type || 'text',
103
- inputProps: {
98
+ inputProps: _extends({
104
99
  tabIndex,
105
100
  ref: focusElementRef,
106
101
  placeholder: placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder')
107
- },
102
+ }, InputProps?.inputProps),
108
103
  native: isSelectNative,
109
104
  notched: variant === 'outlined' ? true : undefined
110
- }, others /* FIXME: typing error */, rootProps.slotProps?.baseSelect, {
105
+ }, rootProps.slotProps?.baseSelect, others /* FIXME: typing error */, {
111
106
  children: renderSingleSelectOptions({
112
107
  column: resolvedColumn,
113
108
  OptionComponent: rootProps.slots.baseSelectOption,
@@ -117,7 +112,7 @@ function GridFilterInputSingleSelect(props) {
117
112
  baseSelectOptionProps: rootProps.slotProps?.baseSelectOption
118
113
  })
119
114
  }))]
120
- }), clearButton]
115
+ }), headerFilterMenu, clearButton]
121
116
  });
122
117
  }
123
118
  process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes = {
@@ -131,6 +126,7 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
131
126
  applyValue: PropTypes.func.isRequired,
132
127
  clearButton: PropTypes.node,
133
128
  focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
129
+ headerFilterMenu: PropTypes.node,
134
130
  /**
135
131
  * It is `true` if the filter either has a value or an operator with no value
136
132
  * required is selected (for example `isEmpty`)
@@ -1,12 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "isFilterActive", "clearButton", "InputProps", "variant"];
3
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "isFilterActive", "clearButton", "headerFilterMenu", "InputProps", "variant"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { unstable_useId as useId } from '@mui/utils';
7
7
  import { useTimeout } from "../../../hooks/utils/useTimeout.js";
8
8
  import { useGridRootProps } from "../../../hooks/utils/useGridRootProps.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  function GridFilterInputValue(props) {
11
11
  const {
12
12
  item,
@@ -17,22 +17,23 @@ function GridFilterInputValue(props) {
17
17
  tabIndex,
18
18
  disabled,
19
19
  clearButton,
20
+ headerFilterMenu,
20
21
  InputProps,
21
- variant = 'standard'
22
+ variant = 'outlined'
22
23
  } = props,
23
24
  others = _objectWithoutPropertiesLoose(props, _excluded);
24
25
  const filterTimeout = useTimeout();
25
- const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value, type));
26
+ const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
26
27
  const [applying, setIsApplying] = React.useState(false);
27
28
  const id = useId();
28
29
  const rootProps = useGridRootProps();
29
30
  const onFilterChange = React.useCallback(event => {
30
- const value = sanitizeFilterItemValue(event.target.value, type);
31
+ const value = sanitizeFilterItemValue(event.target.value);
31
32
  setFilterValueState(value);
32
33
  setIsApplying(true);
33
34
  filterTimeout.start(rootProps.filterDebounceMs, () => {
34
35
  const newItem = _extends({}, item, {
35
- value,
36
+ value: type === 'number' && !Number.isNaN(Number(value)) ? Number(value) : value,
36
37
  fromInput: id
37
38
  });
38
39
  applyValue(newItem);
@@ -42,42 +43,43 @@ function GridFilterInputValue(props) {
42
43
  React.useEffect(() => {
43
44
  const itemPlusTag = item;
44
45
  if (itemPlusTag.fromInput !== id || item.value == null) {
45
- setFilterValueState(sanitizeFilterItemValue(item.value, type));
46
+ setFilterValueState(sanitizeFilterItemValue(item.value));
46
47
  }
47
- }, [id, item, type]);
48
- return /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
49
- id: id,
50
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
51
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
52
- value: filterValueState === undefined ? '' : String(filterValueState),
53
- onChange: onFilterChange,
54
- variant: variant,
55
- type: type || 'text',
56
- InputProps: _extends({}, applying || clearButton ? {
57
- endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
58
- fontSize: "small",
59
- color: "action"
60
- }) : clearButton
61
- } : {}, {
62
- disabled
63
- }, InputProps, {
64
- inputProps: _extends({
65
- tabIndex
66
- }, InputProps?.inputProps)
67
- }),
68
- InputLabelProps: {
69
- shrink: true
70
- },
71
- inputRef: focusElementRef
72
- }, others, rootProps.slotProps?.baseTextField));
48
+ }, [id, item]);
49
+ return /*#__PURE__*/_jsxs(React.Fragment, {
50
+ children: [/*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
51
+ id: id,
52
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
53
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
54
+ value: filterValueState ?? '',
55
+ onChange: onFilterChange,
56
+ variant: variant,
57
+ type: type || 'text',
58
+ disabled: disabled,
59
+ InputProps: _extends({
60
+ endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
61
+ position: "end",
62
+ children: /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
63
+ fontSize: "small",
64
+ color: "action"
65
+ })
66
+ }) : null
67
+ }, InputProps, {
68
+ inputProps: _extends({
69
+ tabIndex
70
+ }, InputProps?.inputProps)
71
+ }),
72
+ InputLabelProps: {
73
+ shrink: true
74
+ },
75
+ inputRef: focusElementRef
76
+ }, rootProps.slotProps?.baseTextField, others)), headerFilterMenu, clearButton]
77
+ });
73
78
  }
74
- function sanitizeFilterItemValue(value, type) {
79
+ function sanitizeFilterItemValue(value) {
75
80
  if (value == null || value === '') {
76
81
  return undefined;
77
82
  }
78
- if (type === 'number') {
79
- return Number(value);
80
- }
81
83
  return String(value);
82
84
  }
83
85
  process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
@@ -91,6 +93,7 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
91
93
  applyValue: PropTypes.func.isRequired,
92
94
  clearButton: PropTypes.node,
93
95
  focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
96
+ headerFilterMenu: PropTypes.node,
94
97
  /**
95
98
  * It is `true` if the filter either has a value or an operator with no value
96
99
  * required is selected (for example `isEmpty`)
@@ -109,11 +109,11 @@ function GridToolbarQuickFilter(props) {
109
109
  "aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
110
110
  size: "small",
111
111
  edge: "end",
112
- sx: [searchValue ? {
112
+ style: searchValue ? {
113
113
  visibility: 'visible'
114
114
  } : {
115
115
  visibility: 'hidden'
116
- }],
116
+ },
117
117
  onClick: handleSearchReset
118
118
  }, rootProps.slotProps?.baseIconButton, {
119
119
  children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {
@@ -22,6 +22,9 @@ const Scrollbar = styled('div')({
22
22
  position: 'absolute',
23
23
  display: 'inline-block',
24
24
  zIndex: 6,
25
+ '&:hover': {
26
+ zIndex: 7
27
+ },
25
28
  // In macOS Safari and Gnome Web, scrollbars are overlaid and don't affect the layout. So we consider
26
29
  // their size to be 0px throughout all the calculations, but the floating scrollbar container does need
27
30
  // to appear and have a real size. We set it to 14px because it seems like an acceptable value and we
@@ -103,19 +106,15 @@ const GridVirtualScrollbar = forwardRef(function GridVirtualScrollbar(props, ref
103
106
  useOnMount(() => {
104
107
  const scroller = apiRef.current.virtualScrollerRef.current;
105
108
  const scrollbar = scrollbarRef.current;
106
- scroller.addEventListener('scroll', onScrollerScroll, {
107
- capture: true
108
- });
109
- scrollbar.addEventListener('scroll', onScrollbarScroll, {
110
- capture: true
111
- });
109
+ const options = {
110
+ capture: true,
111
+ passive: true
112
+ };
113
+ scroller.addEventListener('scroll', onScrollerScroll, options);
114
+ scrollbar.addEventListener('scroll', onScrollbarScroll, options);
112
115
  return () => {
113
- scroller.removeEventListener('scroll', onScrollerScroll, {
114
- capture: true
115
- });
116
- scrollbar.removeEventListener('scroll', onScrollbarScroll, {
117
- capture: true
118
- });
116
+ scroller.removeEventListener('scroll', onScrollerScroll, options);
117
+ scrollbar.removeEventListener('scroll', onScrollbarScroll, options);
119
118
  };
120
119
  });
121
120
  React.useEffect(() => {
@@ -100,11 +100,11 @@ function GridVirtualScroller(props) {
100
100
  virtualScroller: virtualScroller
101
101
  })
102
102
  })]
103
- })), dimensions.hasScrollY && /*#__PURE__*/_jsx(Scrollbar, _extends({
104
- position: "vertical"
105
- }, getScrollbarVerticalProps())), dimensions.hasScrollX && !rootProps.unstable_listView && /*#__PURE__*/_jsx(Scrollbar, _extends({
103
+ })), dimensions.hasScrollX && !rootProps.unstable_listView && /*#__PURE__*/_jsx(Scrollbar, _extends({
106
104
  position: "horizontal"
107
- }, getScrollbarHorizontalProps())), props.children]
105
+ }, getScrollbarHorizontalProps())), dimensions.hasScrollY && /*#__PURE__*/_jsx(Scrollbar, _extends({
106
+ position: "vertical"
107
+ }, getScrollbarVerticalProps())), props.children]
108
108
  }));
109
109
  }
110
110
  export { GridVirtualScroller };
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
2
2
  export function getDataGridUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiDataGrid', slot);
4
4
  }
5
- export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'toolbarPromptControl', 'toolbarPromptControl--recording', 'toolbarPromptControlRecordingIndicator', 'toolbarPromptControlRecordButton', 'toolbarPromptControlSendButton', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
5
+ export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'toolbarPromptControl', 'toolbarPromptControl--recording', 'toolbarPromptControlRecordingIndicator', 'toolbarPromptControlRecordButton', 'toolbarPromptControlSendButton', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
@@ -98,6 +98,7 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
98
98
  'headerFilterOperator>=': 'Greater than or equal to',
99
99
  'headerFilterOperator<': 'Less than',
100
100
  'headerFilterOperator<=': 'Less than or equal to',
101
+ headerFilterClear: 'Clear filter',
101
102
  // Filter values text
102
103
  filterValueAny: 'any',
103
104
  filterValueTrue: 'true',
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useFirstRender } from "../../utils/useFirstRender.js";
3
3
  export const useGridRegisterPipeApplier = (apiRef, group, callback) => {
4
- const cleanup = React.useRef();
4
+ const cleanup = React.useRef(null);
5
5
  const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
6
6
  const registerPreProcessor = React.useCallback(() => {
7
7
  cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useFirstRender } from "../../utils/useFirstRender.js";
3
3
  export const useGridRegisterPipeProcessor = (apiRef, group, callback) => {
4
- const cleanup = React.useRef();
4
+ const cleanup = React.useRef(null);
5
5
  const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
6
6
  const registerPreProcessor = React.useCallback(() => {
7
7
  cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
@@ -68,8 +68,8 @@ function createPublicAPI(privateApiRef) {
68
68
  return publicApi;
69
69
  }
70
70
  export function useGridApiInitialization(inputApiRef, props) {
71
- const publicApiRef = React.useRef();
72
- const privateApiRef = React.useRef();
71
+ const publicApiRef = React.useRef(null);
72
+ const privateApiRef = React.useRef(null);
73
73
  if (!privateApiRef.current) {
74
74
  privateApiRef.current = createPrivateAPI(publicApiRef);
75
75
  }
@@ -2,22 +2,23 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { styled } from '@mui/material/styles';
5
- import { useRtl } from '@mui/system/RtlProvider';
6
5
  import { useGridSelector } from "../../utils/index.js";
7
6
  import { useGridRootProps } from "../../utils/useGridRootProps.js";
8
7
  import { useGridPrivateApiContext } from "../../utils/useGridPrivateApiContext.js";
9
8
  import { useGridApiEventHandler } from "../../utils/useGridApiEventHandler.js";
10
9
  import { GridColumnHeaderItem } from "../../../components/columnHeaders/GridColumnHeaderItem.js";
11
10
  import { gridDimensionsSelector } from "../dimensions/index.js";
12
- import { gridRenderContextColumnsSelector, gridVirtualizationColumnEnabledSelector } from "../virtualization/index.js";
11
+ import { gridRenderContextColumnsSelector } from "../virtualization/index.js";
13
12
  import { computeOffsetLeft } from "../virtualization/useGridVirtualScroller.js";
14
13
  import { GridColumnGroupHeader } from "../../../components/columnHeaders/GridColumnGroupHeader.js";
15
- import { GridPinnedColumnPosition, gridColumnPositionsSelector, gridVisiblePinnedColumnDefinitionsSelector, gridColumnLookupSelector } from "../columns/index.js";
14
+ import { gridColumnPositionsSelector, gridVisiblePinnedColumnDefinitionsSelector, gridColumnLookupSelector } from "../columns/index.js";
16
15
  import { gridColumnGroupsUnwrappedModelSelector } from "../columnGrouping/gridColumnGroupsSelector.js";
17
16
  import { GridScrollbarFillerCell as ScrollbarFiller } from "../../../components/GridScrollbarFillerCell.js";
18
17
  import { getPinnedCellOffset } from "../../../internals/utils/getPinnedCellOffset.js";
19
18
  import { GridColumnHeaderSeparatorSides } from "../../../components/columnHeaders/GridColumnHeaderSeparator.js";
20
19
  import { gridClasses } from "../../../constants/gridClasses.js";
20
+ import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../../utils/cellBorderUtils.js";
21
+ import { PinnedColumnPosition } from "../../../internals/constants.js";
21
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
23
  export const GridColumnHeaderRow = styled('div', {
23
24
  name: 'MuiDataGrid',
@@ -44,10 +45,8 @@ export const useGridColumnHeaders = props => {
44
45
  const [dragCol, setDragCol] = React.useState('');
45
46
  const [resizeCol, setResizeCol] = React.useState('');
46
47
  const apiRef = useGridPrivateApiContext();
47
- const isRtl = useRtl();
48
48
  const rootProps = useGridRootProps();
49
49
  const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
50
- const hasColumnVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
51
50
  const columnGroupsModel = useGridSelector(apiRef, gridColumnGroupsUnwrappedModelSelector);
52
51
  const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
53
52
  const renderContext = useGridSelector(apiRef, gridRenderContextColumnsSelector);
@@ -84,18 +83,10 @@ export const useGridColumnHeaders = props => {
84
83
  // Helper for computation common between getColumnHeaders and getColumnGroupHeaders
85
84
  const getColumnsToRender = params => {
86
85
  const {
87
- renderContext: currentContext = renderContext,
88
- maxLastColumn = visibleColumns.length
86
+ renderContext: currentContext = renderContext
89
87
  } = params || {};
90
- let firstColumnToRender;
91
- let lastColumnToRender;
92
- if (!rootProps.disableVirtualization && !hasColumnVirtualization) {
93
- firstColumnToRender = 0;
94
- lastColumnToRender = maxLastColumn;
95
- } else {
96
- firstColumnToRender = currentContext.firstColumnIndex;
97
- lastColumnToRender = currentContext.lastColumnIndex;
98
- }
88
+ const firstColumnToRender = currentContext.firstColumnIndex;
89
+ const lastColumnToRender = currentContext.lastColumnIndex;
99
90
  const renderedColumns = visibleColumns.slice(firstColumnToRender, lastColumnToRender);
100
91
  return {
101
92
  renderedColumns,
@@ -104,7 +95,7 @@ export const useGridColumnHeaders = props => {
104
95
  };
105
96
  };
106
97
  const getFillers = (params, children, leftOverflow, borderBottom = false) => {
107
- const isPinnedRight = params?.position === GridPinnedColumnPosition.RIGHT;
98
+ const isPinnedRight = params?.position === PinnedColumnPosition.RIGHT;
108
99
  const isNotPinned = params?.position === undefined;
109
100
  const hasScrollbarFiller = pinnedColumns.right.length > 0 && isPinnedRight || pinnedColumns.right.length === 0 && isNotPinned;
110
101
  const leftOffsetWidth = offsetLeft - leftOverflow;
@@ -125,33 +116,6 @@ export const useGridColumnHeaders = props => {
125
116
  })]
126
117
  });
127
118
  };
128
- const getCellOffsetStyle = ({
129
- pinnedPosition,
130
- columnIndex,
131
- computedWidth
132
- }) => {
133
- let style;
134
- const isLeftPinned = pinnedPosition === GridPinnedColumnPosition.LEFT;
135
- const isRightPinned = pinnedPosition === GridPinnedColumnPosition.RIGHT;
136
- if (isLeftPinned || isRightPinned) {
137
- const pinnedOffset = getPinnedCellOffset(pinnedPosition, computedWidth, columnIndex, columnPositions, dimensions);
138
- let side = isLeftPinned ? 'left' : 'right';
139
- if (isRtl) {
140
- side = isLeftPinned ? 'right' : 'left';
141
- }
142
- if (pinnedPosition === 'left') {
143
- style = {
144
- [side]: pinnedOffset
145
- };
146
- }
147
- if (pinnedPosition === 'right') {
148
- style = {
149
- [side]: pinnedOffset
150
- };
151
- }
152
- }
153
- return style;
154
- };
155
119
  const getColumnHeaders = (params, other = {}) => {
156
120
  const {
157
121
  renderedColumns,
@@ -166,14 +130,15 @@ export const useGridColumnHeaders = props => {
166
130
  const hasFocus = columnHeaderFocus !== null && columnHeaderFocus.field === colDef.field;
167
131
  const open = columnMenuState.open && columnMenuState.field === colDef.field;
168
132
  const pinnedPosition = params?.position;
169
- const style = getCellOffsetStyle({
170
- pinnedPosition,
171
- columnIndex,
172
- computedWidth: colDef.computedWidth
173
- });
174
- const siblingWithBorderingSeparator = pinnedPosition === GridPinnedColumnPosition.RIGHT ? renderedColumns[i - 1] : renderedColumns[i + 1];
133
+ const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
134
+ const pinnedOffset = getPinnedCellOffset(pinnedPosition, colDef.computedWidth, columnIndex, columnPositions, dimensions.columnsTotalWidth, scrollbarWidth);
135
+ const siblingWithBorderingSeparator = pinnedPosition === PinnedColumnPosition.RIGHT ? renderedColumns[i - 1] : renderedColumns[i + 1];
175
136
  const isSiblingFocused = siblingWithBorderingSeparator ? columnHeaderFocus !== null && columnHeaderFocus.field === siblingWithBorderingSeparator.field : false;
176
137
  const isLastUnpinned = columnIndex + 1 === columnPositions.length - pinnedColumns.right.length;
138
+ const indexInSection = i;
139
+ const sectionLength = renderedColumns.length;
140
+ const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
141
+ const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
177
142
  columns.push(/*#__PURE__*/_jsx(GridColumnHeaderItem, _extends({}, sortColumnLookup[colDef.field], {
178
143
  columnMenuOpen: open,
179
144
  filterItemsCounter: filterColumnLookup[colDef.field] && filterColumnLookup[colDef.field].length,
@@ -186,12 +151,11 @@ export const useGridColumnHeaders = props => {
186
151
  hasFocus: hasFocus,
187
152
  tabIndex: tabIndex,
188
153
  pinnedPosition: pinnedPosition,
189
- style: style,
190
- indexInSection: i,
191
- sectionLength: renderedColumns.length,
192
- gridHasFiller: gridHasFiller,
154
+ pinnedOffset: pinnedOffset,
193
155
  isLastUnpinned: isLastUnpinned,
194
- isSiblingFocused: isSiblingFocused
156
+ isSiblingFocused: isSiblingFocused,
157
+ showLeftBorder: showLeftBorder,
158
+ showRightBorder: showRightBorder
195
159
  }, other), colDef.field));
196
160
  }
197
161
  return getFillers(params, columns, 0);
@@ -203,18 +167,15 @@ export const useGridColumnHeaders = props => {
203
167
  ownerState: rootProps,
204
168
  className: gridClasses['row--borderBottom'],
205
169
  children: [leftRenderContext && getColumnHeaders({
206
- position: GridPinnedColumnPosition.LEFT,
207
- renderContext: leftRenderContext,
208
- maxLastColumn: leftRenderContext.lastColumnIndex
170
+ position: PinnedColumnPosition.LEFT,
171
+ renderContext: leftRenderContext
209
172
  }, {
210
173
  disableReorder: true
211
174
  }), getColumnHeaders({
212
- renderContext,
213
- maxLastColumn: visibleColumns.length - pinnedColumns.right.length
175
+ renderContext
214
176
  }), rightRenderContext && getColumnHeaders({
215
- position: GridPinnedColumnPosition.RIGHT,
216
- renderContext: rightRenderContext,
217
- maxLastColumn: rightRenderContext.lastColumnIndex
177
+ position: PinnedColumnPosition.RIGHT,
178
+ renderContext: rightRenderContext
218
179
  }, {
219
180
  disableReorder: true,
220
181
  separatorSide: GridColumnHeaderSeparatorSides.Left
@@ -273,14 +234,11 @@ export const useGridColumnHeaders = props => {
273
234
  tabIndex
274
235
  };
275
236
  const pinnedPosition = params.position;
276
- const style = getCellOffsetStyle({
277
- pinnedPosition,
278
- columnIndex,
279
- computedWidth: headerInfo.width
280
- });
237
+ const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
238
+ const pinnedOffset = getPinnedCellOffset(pinnedPosition, headerInfo.width, columnIndex, columnPositions, dimensions.columnsTotalWidth, scrollbarWidth);
281
239
  columnIndex += columnFields.length;
282
240
  let indexInSection = index;
283
- if (pinnedPosition === 'left') {
241
+ if (pinnedPosition === PinnedColumnPosition.LEFT) {
284
242
  // Group headers can expand to multiple columns, we need to adjust the index
285
243
  indexInSection = columnIndex - 1;
286
244
  }
@@ -296,10 +254,9 @@ export const useGridColumnHeaders = props => {
296
254
  hasFocus: hasFocus,
297
255
  tabIndex: tabIndex,
298
256
  pinnedPosition: pinnedPosition,
299
- style: style,
300
- indexInSection: indexInSection,
301
- sectionLength: visibleColumnGroupHeader.length,
302
- gridHasFiller: gridHasFiller
257
+ pinnedOffset: pinnedOffset,
258
+ showLeftBorder: shouldCellShowLeftBorder(pinnedPosition, indexInSection),
259
+ showRightBorder: shouldCellShowRightBorder(pinnedPosition, indexInSection, visibleColumnGroupHeader.length, rootProps.showCellVerticalBorder, gridHasFiller)
303
260
  }, index);
304
261
  });
305
262
  return getFillers(params, children, leftOverflow);
@@ -317,7 +274,7 @@ export const useGridColumnHeaders = props => {
317
274
  children: [leftRenderContext && getColumnGroupHeaders({
318
275
  depth,
319
276
  params: {
320
- position: GridPinnedColumnPosition.LEFT,
277
+ position: PinnedColumnPosition.LEFT,
321
278
  renderContext: leftRenderContext,
322
279
  maxLastColumn: leftRenderContext.lastColumnIndex
323
280
  }
@@ -329,7 +286,7 @@ export const useGridColumnHeaders = props => {
329
286
  }), rightRenderContext && getColumnGroupHeaders({
330
287
  depth,
331
288
  params: {
332
- position: GridPinnedColumnPosition.RIGHT,
289
+ position: PinnedColumnPosition.RIGHT,
333
290
  renderContext: rightRenderContext,
334
291
  maxLastColumn: rightRenderContext.lastColumnIndex
335
292
  }
@@ -344,11 +301,12 @@ export const useGridColumnHeaders = props => {
344
301
  rightRenderContext,
345
302
  pinnedColumns,
346
303
  visibleColumns,
347
- getCellOffsetStyle,
304
+ columnPositions,
348
305
  getFillers,
349
306
  getColumnHeadersRow,
350
307
  getColumnsToRender,
351
308
  getColumnGroupHeadersRows,
309
+ getPinnedCellOffset,
352
310
  isDragging: !!dragCol,
353
311
  getInnerProps: () => ({
354
312
  role: 'rowgroup'
@@ -70,7 +70,7 @@ function preventClick(event) {
70
70
  * is disabled.
71
71
  */
72
72
  function useColumnVirtualizationDisabled(apiRef) {
73
- const promise = React.useRef();
73
+ const promise = React.useRef(undefined);
74
74
  const selector = () => gridVirtualizationColumnEnabledSelector(apiRef);
75
75
  const value = useGridSelector(apiRef, selector);
76
76
  React.useEffect(() => {
@@ -184,10 +184,10 @@ export const useGridColumnResize = (apiRef, props) => {
184
184
  // To improve accessibility, the separator has padding on both sides.
185
185
  // Clicking inside the padding area should be treated as a click in the separator.
186
186
  // This ref stores the offset between the click and the separator.
187
- const initialOffsetToSeparator = React.useRef();
188
- const resizeDirection = React.useRef();
187
+ const initialOffsetToSeparator = React.useRef(null);
188
+ const resizeDirection = React.useRef(null);
189
189
  const stopResizeEventTimeout = useTimeout();
190
- const touchId = React.useRef();
190
+ const touchId = React.useRef(undefined);
191
191
  const updateWidth = newWidth => {
192
192
  logger.debug(`Updating width to ${newWidth} for col ${refs.colDef.field}`);
193
193
  const prevWidth = refs.columnHeaderElement.offsetWidth;
@@ -338,7 +338,7 @@ export const useGridCellEditing = (apiRef, props) => {
338
338
  if (onProcessRowUpdateError) {
339
339
  onProcessRowUpdateError(errorThrown);
340
340
  } else if (process.env.NODE_ENV !== 'production') {
341
- warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
341
+ warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
342
342
  }
343
343
  };
344
344
  try {
@@ -21,7 +21,7 @@ export const useGridRowEditing = (apiRef, props) => {
21
21
  const [rowModesModel, setRowModesModel] = React.useState({});
22
22
  const rowModesModelRef = React.useRef(rowModesModel);
23
23
  const prevRowModesModel = React.useRef({});
24
- const focusTimeout = React.useRef();
24
+ const focusTimeout = React.useRef(undefined);
25
25
  const nextFocusedCell = React.useRef(null);
26
26
  const {
27
27
  processRowUpdate,
@@ -414,7 +414,7 @@ export const useGridRowEditing = (apiRef, props) => {
414
414
  if (onProcessRowUpdateError) {
415
415
  onProcessRowUpdateError(errorThrown);
416
416
  } else if (process.env.NODE_ENV !== 'production') {
417
- warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
417
+ warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
418
418
  }
419
419
  };
420
420
  try {
@@ -44,7 +44,7 @@ export const useGridPrintExport = (apiRef, props) => {
44
44
  const previousGridState = React.useRef(null);
45
45
  const previousColumnVisibility = React.useRef({});
46
46
  const previousRows = React.useRef([]);
47
- const previousVirtualizationState = React.useRef();
47
+ const previousVirtualizationState = React.useRef(null);
48
48
  React.useEffect(() => {
49
49
  doc.current = ownerDocument(apiRef.current.rootElementRef.current);
50
50
  }, [apiRef, hasRootReference]);