@mui/x-data-grid 8.0.0-alpha.0 → 8.0.0-alpha.10

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 (762) hide show
  1. package/CHANGELOG.md +2215 -119
  2. package/DataGrid/DataGrid.js +20 -38
  3. package/DataGrid/useDataGridComponent.d.ts +2 -1
  4. package/DataGrid/useDataGridComponent.js +1 -1
  5. package/DataGrid/useDataGridProps.js +3 -3
  6. package/README.md +3 -3
  7. package/colDef/gridDateOperators.d.ts +2 -1
  8. package/colDef/gridNumericOperators.d.ts +4 -1
  9. package/components/GridApiContext.js +2 -0
  10. package/components/GridColumnHeaders.d.ts +1 -1
  11. package/components/GridColumnHeaders.js +4 -4
  12. package/components/GridConfigurationContext.js +2 -0
  13. package/components/GridFooter.d.ts +2 -1
  14. package/components/GridFooter.js +4 -4
  15. package/components/GridHeaders.js +2 -2
  16. package/components/GridLoadingOverlay.d.ts +3 -3
  17. package/components/GridLoadingOverlay.js +14 -12
  18. package/components/GridNoResultsOverlay.d.ts +2 -1
  19. package/components/GridNoResultsOverlay.js +4 -4
  20. package/components/GridNoRowsOverlay.d.ts +2 -1
  21. package/components/GridNoRowsOverlay.js +4 -4
  22. package/components/GridPagination.d.ts +1 -1
  23. package/components/GridPagination.js +7 -4
  24. package/components/GridRow.d.ts +6 -11
  25. package/components/GridRow.js +55 -87
  26. package/components/GridRowCount.d.ts +1 -1
  27. package/components/GridRowCount.js +3 -2
  28. package/components/GridScrollArea.js +2 -0
  29. package/components/GridSelectedRowCount.d.ts +4 -1
  30. package/components/GridSelectedRowCount.js +3 -2
  31. package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
  32. package/components/GridSkeletonLoadingOverlay.js +22 -21
  33. package/components/base/GridOverlays.d.ts +4 -3
  34. package/components/base/GridOverlays.js +2 -24
  35. package/components/base/index.d.ts +0 -1
  36. package/components/base/index.js +1 -2
  37. package/components/cell/GridActionsCell.js +8 -1
  38. package/components/cell/GridActionsCellItem.d.ts +17 -10
  39. package/components/cell/GridActionsCellItem.js +9 -8
  40. package/components/cell/GridCell.d.ts +19 -23
  41. package/components/cell/GridCell.js +52 -92
  42. package/components/cell/GridEditDateCell.js +1 -1
  43. package/components/cell/GridEditInputCell.d.ts +1 -1
  44. package/components/cell/GridEditInputCell.js +73 -4
  45. package/components/cell/GridEditSingleSelectCell.js +2 -2
  46. package/components/cell/GridSkeletonCell.js +1 -2
  47. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  48. package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
  49. package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  50. package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
  51. package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  52. package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
  53. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
  54. package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
  55. package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  56. package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  57. package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
  58. package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  59. package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
  60. package/components/columnHeaders/GridIconButtonContainer.js +5 -3
  61. package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
  62. package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
  63. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  64. package/components/columnSelection/GridHeaderCheckbox.js +17 -9
  65. package/components/columnsManagement/GridColumnsManagement.d.ts +2 -0
  66. package/components/columnsManagement/GridColumnsManagement.js +81 -11
  67. package/components/containers/GridFooterContainer.d.ts +1 -1
  68. package/components/containers/GridFooterContainer.js +5 -3
  69. package/components/containers/GridOverlay.d.ts +1 -1
  70. package/components/containers/GridOverlay.js +5 -3
  71. package/components/containers/GridRoot.d.ts +2 -2
  72. package/components/containers/GridRoot.js +18 -8
  73. package/components/containers/GridRootStyles.js +160 -50
  74. package/components/containers/GridToolbarContainer.d.ts +1 -1
  75. package/components/containers/GridToolbarContainer.js +3 -2
  76. package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
  77. package/components/menu/columnMenu/GridColumnMenu.js +5 -5
  78. package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
  79. package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
  80. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
  81. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
  82. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
  83. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  84. package/components/panel/GridColumnsPanel.js +1 -2
  85. package/components/panel/GridPanel.d.ts +2 -2
  86. package/components/panel/GridPanel.js +5 -3
  87. package/components/panel/GridPanelContent.js +7 -3
  88. package/components/panel/GridPanelFooter.d.ts +1 -1
  89. package/components/panel/GridPanelFooter.js +4 -3
  90. package/components/panel/GridPanelWrapper.d.ts +1 -1
  91. package/components/panel/GridPanelWrapper.js +5 -3
  92. package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
  93. package/components/panel/filterPanel/GridFilterForm.js +22 -18
  94. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +4 -11
  95. package/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
  96. package/components/panel/filterPanel/GridFilterInputDate.d.ts +3 -9
  97. package/components/panel/filterPanel/GridFilterInputDate.js +50 -31
  98. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -3
  99. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
  100. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -3
  101. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
  102. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +3 -9
  103. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
  104. package/components/panel/filterPanel/GridFilterInputValue.d.ts +3 -9
  105. package/components/panel/filterPanel/GridFilterInputValue.js +63 -38
  106. package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
  107. package/components/panel/filterPanel/GridFilterPanel.js +4 -4
  108. package/components/panel/filterPanel/index.d.ts +2 -2
  109. package/components/panel/filterPanel/index.js +1 -2
  110. package/components/toolbar/GridToolbar.d.ts +1 -1
  111. package/components/toolbar/GridToolbar.js +11 -5
  112. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  113. package/components/toolbar/GridToolbarColumnsButton.js +12 -6
  114. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  115. package/components/toolbar/GridToolbarDensitySelector.js +9 -11
  116. package/components/toolbar/GridToolbarExport.d.ts +1 -1
  117. package/components/toolbar/GridToolbarExport.js +2 -1
  118. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  119. package/components/toolbar/GridToolbarExportContainer.js +6 -6
  120. package/components/toolbar/GridToolbarFilterButton.d.ts +3 -1
  121. package/components/toolbar/GridToolbarFilterButton.js +20 -9
  122. package/components/toolbar/GridToolbarQuickFilter.d.ts +6 -2
  123. package/components/toolbar/GridToolbarQuickFilter.js +39 -31
  124. package/components/virtualization/GridMainContainer.d.ts +13 -1
  125. package/components/virtualization/GridMainContainer.js +14 -5
  126. package/components/virtualization/GridVirtualScrollbar.d.ts +5 -1
  127. package/components/virtualization/GridVirtualScrollbar.js +17 -17
  128. package/components/virtualization/GridVirtualScroller.js +27 -12
  129. package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
  130. package/components/virtualization/GridVirtualScrollerContent.js +15 -6
  131. package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
  132. package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  133. package/constants/dataGridPropsDefaultValues.js +2 -4
  134. package/constants/gridClasses.d.ts +36 -12
  135. package/constants/gridClasses.js +1 -1
  136. package/constants/localeTextConstants.js +12 -0
  137. package/context/GridContextProvider.d.ts +2 -1
  138. package/context/GridRootPropsContext.js +2 -0
  139. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
  140. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
  141. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
  142. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  143. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
  144. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  145. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
  146. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
  147. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
  148. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +5 -8
  149. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  150. package/hooks/core/useGridApiInitialization.d.ts +2 -2
  151. package/hooks/core/useGridApiInitialization.js +2 -2
  152. package/hooks/core/useGridInitialization.d.ts +2 -2
  153. package/hooks/core/useGridIsRtl.d.ts +2 -2
  154. package/hooks/core/useGridLocaleText.d.ts +2 -2
  155. package/hooks/core/useGridLoggerFactory.d.ts +2 -2
  156. package/hooks/core/useGridRefs.d.ts +2 -2
  157. package/hooks/core/useGridStateInitialization.d.ts +2 -2
  158. package/hooks/core/useGridStateInitialization.js +3 -3
  159. package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
  160. package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
  161. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
  162. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
  163. package/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -69
  164. package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
  165. package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
  166. package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
  167. package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
  168. package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  169. package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
  170. package/hooks/features/columnResize/useGridColumnResize.js +17 -10
  171. package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
  172. package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
  173. package/hooks/features/columns/gridColumnsUtils.js +2 -1
  174. package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
  175. package/hooks/features/columns/useGridColumns.d.ts +2 -2
  176. package/hooks/features/columns/useGridColumns.js +7 -3
  177. package/hooks/features/density/densitySelector.d.ts +1 -1
  178. package/hooks/features/density/useGridDensity.d.ts +2 -2
  179. package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
  180. package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
  181. package/hooks/features/dimensions/useGridDimensions.js +11 -32
  182. package/hooks/features/editing/gridEditingSelectors.d.ts +6 -0
  183. package/hooks/features/editing/gridEditingSelectors.js +7 -1
  184. package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
  185. package/hooks/features/editing/useGridCellEditing.js +4 -4
  186. package/hooks/features/editing/useGridEditing.d.ts +2 -2
  187. package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
  188. package/hooks/features/editing/useGridRowEditing.js +7 -8
  189. package/hooks/features/events/useGridEvents.d.ts +2 -2
  190. package/hooks/features/export/serializers/csvSerializer.d.ts +2 -1
  191. package/hooks/features/export/useGridCsvExport.d.ts +2 -2
  192. package/hooks/features/export/useGridPrintExport.d.ts +2 -2
  193. package/hooks/features/export/useGridPrintExport.js +1 -1
  194. package/hooks/features/export/utils.d.ts +2 -2
  195. package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
  196. package/hooks/features/filter/gridFilterSelector.js +6 -1
  197. package/hooks/features/filter/gridFilterUtils.d.ts +7 -7
  198. package/hooks/features/filter/gridFilterUtils.js +3 -3
  199. package/hooks/features/filter/useGridFilter.d.ts +2 -2
  200. package/hooks/features/filter/useGridFilter.js +1 -1
  201. package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
  202. package/hooks/features/focus/useGridFocus.d.ts +2 -2
  203. package/hooks/features/focus/useGridFocus.js +3 -2
  204. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
  205. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
  206. package/hooks/features/index.d.ts +1 -0
  207. package/hooks/features/index.js +1 -0
  208. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
  209. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
  210. package/hooks/features/keyboardNavigation/utils.d.ts +3 -4
  211. package/hooks/features/keyboardNavigation/utils.js +0 -5
  212. package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
  213. package/hooks/features/listView/gridListViewSelectors.js +3 -1
  214. package/hooks/features/listView/index.d.ts +1 -0
  215. package/hooks/features/listView/index.js +1 -0
  216. package/hooks/features/listView/useGridListView.d.ts +2 -2
  217. package/hooks/features/listView/useGridListView.js +2 -1
  218. package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
  219. package/hooks/features/overlays/useGridOverlays.js +22 -2
  220. package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
  221. package/hooks/features/pagination/gridPaginationSelector.d.ts +34 -9
  222. package/hooks/features/pagination/gridPaginationSelector.js +39 -1
  223. package/hooks/features/pagination/useGridPagination.d.ts +3 -3
  224. package/hooks/features/pagination/useGridPagination.js +5 -3
  225. package/hooks/features/pagination/useGridPaginationMeta.d.ts +2 -2
  226. package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
  227. package/hooks/features/pagination/useGridPaginationModel.js +23 -1
  228. package/hooks/features/pagination/useGridRowCount.d.ts +2 -2
  229. package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +1 -0
  230. package/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
  231. package/hooks/features/preferencesPanel/index.d.ts +1 -1
  232. package/hooks/features/preferencesPanel/index.js +1 -1
  233. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +2 -2
  234. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
  235. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  236. package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
  237. package/hooks/features/rowSelection/useGridRowSelection.js +8 -16
  238. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
  239. package/hooks/features/rowSelection/utils.d.ts +4 -3
  240. package/hooks/features/rowSelection/utils.js +2 -2
  241. package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
  242. package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
  243. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
  244. package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
  245. package/hooks/features/rows/gridRowsSelector.js +1 -2
  246. package/hooks/features/rows/gridRowsUtils.d.ts +4 -4
  247. package/hooks/features/rows/gridRowsUtils.js +0 -9
  248. package/hooks/features/rows/index.d.ts +1 -1
  249. package/hooks/features/rows/index.js +1 -1
  250. package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
  251. package/hooks/features/rows/useGridParamsApi.js +33 -14
  252. package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
  253. package/hooks/features/rows/useGridRowSpanning.js +97 -86
  254. package/hooks/features/rows/useGridRows.d.ts +2 -2
  255. package/hooks/features/rows/useGridRows.js +23 -27
  256. package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
  257. package/hooks/features/rows/useGridRowsMeta.js +3 -2
  258. package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
  259. package/hooks/features/scroll/useGridScroll.d.ts +2 -2
  260. package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
  261. package/hooks/features/sorting/gridSortingSelector.js +11 -0
  262. package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
  263. package/hooks/features/sorting/gridSortingUtils.js +2 -2
  264. package/hooks/features/sorting/index.d.ts +2 -1
  265. package/hooks/features/sorting/index.js +1 -1
  266. package/hooks/features/sorting/useGridSorting.d.ts +2 -2
  267. package/hooks/features/sorting/useGridSorting.js +1 -1
  268. package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
  269. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
  270. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
  271. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
  272. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +15 -6
  273. package/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
  274. package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
  275. package/hooks/utils/useGridApiContext.d.ts +2 -2
  276. package/hooks/utils/useGridApiEventHandler.d.ts +4 -4
  277. package/hooks/utils/useGridApiEventHandler.js +1 -1
  278. package/hooks/utils/useGridApiMethod.d.ts +2 -2
  279. package/hooks/utils/useGridApiRef.d.ts +2 -2
  280. package/hooks/utils/useGridApiRef.js +1 -1
  281. package/hooks/utils/useGridInitializeState.d.ts +3 -3
  282. package/hooks/utils/useGridLogger.d.ts +2 -2
  283. package/hooks/utils/useGridNativeEventListener.d.ts +2 -1
  284. package/hooks/utils/useGridPrivateApiContext.d.ts +2 -1
  285. package/hooks/utils/useGridSelector.d.ts +5 -7
  286. package/hooks/utils/useGridSelector.js +6 -44
  287. package/hooks/utils/useGridVisibleRows.d.ts +8 -6
  288. package/hooks/utils/useGridVisibleRows.js +5 -28
  289. package/index.js +1 -1
  290. package/internals/constants.d.ts +6 -0
  291. package/internals/constants.js +8 -1
  292. package/internals/index.d.ts +7 -4
  293. package/internals/index.js +5 -3
  294. package/internals/utils/attachPinnedStyle.d.ts +2 -0
  295. package/internals/utils/attachPinnedStyle.js +9 -0
  296. package/internals/utils/getPinnedCellOffset.d.ts +3 -3
  297. package/internals/utils/getPinnedCellOffset.js +6 -7
  298. package/internals/utils/index.d.ts +1 -1
  299. package/internals/utils/index.js +2 -2
  300. package/locales/arSD.js +14 -0
  301. package/locales/beBY.js +13 -0
  302. package/locales/bgBG.js +15 -0
  303. package/locales/csCZ.js +15 -0
  304. package/locales/daDK.js +15 -0
  305. package/locales/deDE.js +13 -0
  306. package/locales/elGR.js +14 -0
  307. package/locales/esES.js +17 -4
  308. package/locales/faIR.js +18 -4
  309. package/locales/fiFI.js +15 -0
  310. package/locales/frFR.js +15 -0
  311. package/locales/heIL.js +17 -4
  312. package/locales/hrHR.js +15 -0
  313. package/locales/huHU.js +15 -0
  314. package/locales/isIS.js +14 -0
  315. package/locales/itIT.js +15 -0
  316. package/locales/jaJP.js +15 -0
  317. package/locales/koKR.js +47 -37
  318. package/locales/nbNO.js +15 -0
  319. package/locales/nlNL.js +18 -4
  320. package/locales/nnNO.js +15 -0
  321. package/locales/plPL.js +15 -0
  322. package/locales/ptBR.js +13 -0
  323. package/locales/ptPT.js +13 -0
  324. package/locales/roRO.js +21 -9
  325. package/locales/ruRU.js +15 -0
  326. package/locales/skSK.js +14 -0
  327. package/locales/svSE.js +19 -5
  328. package/locales/trTR.js +15 -2
  329. package/locales/ukUA.js +14 -0
  330. package/locales/urPK.js +22 -9
  331. package/locales/viVN.js +15 -0
  332. package/locales/zhCN.js +17 -4
  333. package/locales/zhHK.js +14 -0
  334. package/locales/zhTW.js +14 -0
  335. package/material/index.js +58 -7
  336. package/models/api/gridApiCommon.d.ts +2 -2
  337. package/models/api/gridCoreApi.d.ts +7 -7
  338. package/models/api/gridDensityApi.d.ts +1 -1
  339. package/models/api/gridLocaleTextApi.d.ts +11 -0
  340. package/models/api/gridParamsApi.d.ts +29 -2
  341. package/models/api/gridStateApi.d.ts +1 -1
  342. package/models/api/index.d.ts +1 -1
  343. package/models/api/index.js +0 -1
  344. package/models/colDef/gridColDef.d.ts +38 -33
  345. package/models/controlStateItem.d.ts +2 -2
  346. package/models/events/gridEventLookup.d.ts +7 -1
  347. package/models/gridBaseSlots.d.ts +95 -0
  348. package/models/gridDataSource.d.ts +13 -13
  349. package/models/gridExport.d.ts +2 -2
  350. package/models/gridFilterInputComponent.d.ts +32 -0
  351. package/models/gridFilterOperator.d.ts +6 -4
  352. package/models/gridIconSlotsComponent.d.ts +5 -0
  353. package/models/gridSlotsComponent.d.ts +16 -1
  354. package/models/gridSlotsComponentsProps.d.ts +45 -9
  355. package/models/gridStateCommunity.d.ts +4 -0
  356. package/models/index.d.ts +1 -0
  357. package/models/props/DataGridProps.d.ts +12 -24
  358. package/modern/DataGrid/DataGrid.js +20 -38
  359. package/modern/DataGrid/useDataGridComponent.js +1 -1
  360. package/modern/DataGrid/useDataGridProps.js +3 -3
  361. package/modern/components/GridApiContext.js +2 -0
  362. package/modern/components/GridColumnHeaders.js +4 -4
  363. package/modern/components/GridConfigurationContext.js +2 -0
  364. package/modern/components/GridFooter.js +4 -4
  365. package/modern/components/GridHeaders.js +2 -2
  366. package/modern/components/GridLoadingOverlay.js +14 -12
  367. package/modern/components/GridNoResultsOverlay.js +4 -4
  368. package/modern/components/GridNoRowsOverlay.js +4 -4
  369. package/modern/components/GridPagination.js +7 -4
  370. package/modern/components/GridRow.js +55 -87
  371. package/modern/components/GridRowCount.js +3 -2
  372. package/modern/components/GridScrollArea.js +2 -0
  373. package/modern/components/GridSelectedRowCount.js +3 -2
  374. package/modern/components/GridSkeletonLoadingOverlay.js +22 -21
  375. package/modern/components/base/GridOverlays.js +2 -24
  376. package/modern/components/base/index.js +1 -2
  377. package/modern/components/cell/GridActionsCell.js +8 -1
  378. package/modern/components/cell/GridActionsCellItem.js +9 -8
  379. package/modern/components/cell/GridCell.js +52 -92
  380. package/modern/components/cell/GridEditDateCell.js +1 -1
  381. package/modern/components/cell/GridEditInputCell.js +73 -4
  382. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  383. package/modern/components/cell/GridSkeletonCell.js +1 -2
  384. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  385. package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  386. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
  387. package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  388. package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  389. package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  390. package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
  391. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
  392. package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
  393. package/modern/components/columnsManagement/GridColumnsManagement.js +81 -11
  394. package/modern/components/containers/GridFooterContainer.js +5 -3
  395. package/modern/components/containers/GridOverlay.js +5 -3
  396. package/modern/components/containers/GridRoot.js +18 -8
  397. package/modern/components/containers/GridRootStyles.js +160 -50
  398. package/modern/components/containers/GridToolbarContainer.js +3 -2
  399. package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
  400. package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
  401. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
  402. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
  403. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
  404. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  405. package/modern/components/panel/GridColumnsPanel.js +1 -2
  406. package/modern/components/panel/GridPanel.js +5 -3
  407. package/modern/components/panel/GridPanelContent.js +7 -3
  408. package/modern/components/panel/GridPanelFooter.js +4 -3
  409. package/modern/components/panel/GridPanelWrapper.js +5 -3
  410. package/modern/components/panel/filterPanel/GridFilterForm.js +22 -18
  411. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
  412. package/modern/components/panel/filterPanel/GridFilterInputDate.js +50 -31
  413. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
  414. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
  415. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
  416. package/modern/components/panel/filterPanel/GridFilterInputValue.js +63 -38
  417. package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
  418. package/modern/components/panel/filterPanel/index.js +1 -2
  419. package/modern/components/toolbar/GridToolbar.js +11 -5
  420. package/modern/components/toolbar/GridToolbarColumnsButton.js +12 -6
  421. package/modern/components/toolbar/GridToolbarDensitySelector.js +9 -11
  422. package/modern/components/toolbar/GridToolbarExport.js +2 -1
  423. package/modern/components/toolbar/GridToolbarExportContainer.js +6 -6
  424. package/modern/components/toolbar/GridToolbarFilterButton.js +20 -9
  425. package/modern/components/toolbar/GridToolbarQuickFilter.js +39 -31
  426. package/modern/components/virtualization/GridMainContainer.js +14 -5
  427. package/modern/components/virtualization/GridVirtualScrollbar.js +17 -17
  428. package/modern/components/virtualization/GridVirtualScroller.js +27 -12
  429. package/modern/components/virtualization/GridVirtualScrollerContent.js +15 -6
  430. package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  431. package/modern/constants/dataGridPropsDefaultValues.js +2 -4
  432. package/modern/constants/gridClasses.js +1 -1
  433. package/modern/constants/localeTextConstants.js +12 -0
  434. package/modern/context/GridRootPropsContext.js +2 -0
  435. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  436. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  437. package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
  438. package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  439. package/modern/hooks/core/useGridApiInitialization.js +2 -2
  440. package/modern/hooks/core/useGridStateInitialization.js +3 -3
  441. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -69
  442. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
  443. package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  444. package/modern/hooks/features/columnResize/useGridColumnResize.js +17 -10
  445. package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
  446. package/modern/hooks/features/columns/useGridColumns.js +7 -3
  447. package/modern/hooks/features/dimensions/useGridDimensions.js +11 -32
  448. package/modern/hooks/features/editing/gridEditingSelectors.js +7 -1
  449. package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
  450. package/modern/hooks/features/editing/useGridRowEditing.js +7 -8
  451. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  452. package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
  453. package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
  454. package/modern/hooks/features/filter/useGridFilter.js +1 -1
  455. package/modern/hooks/features/focus/useGridFocus.js +3 -2
  456. package/modern/hooks/features/index.js +1 -0
  457. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
  458. package/modern/hooks/features/keyboardNavigation/utils.js +0 -5
  459. package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
  460. package/modern/hooks/features/listView/index.js +1 -0
  461. package/modern/hooks/features/listView/useGridListView.js +2 -1
  462. package/modern/hooks/features/overlays/useGridOverlays.js +22 -2
  463. package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
  464. package/modern/hooks/features/pagination/useGridPagination.js +5 -3
  465. package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
  466. package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
  467. package/modern/hooks/features/preferencesPanel/index.js +1 -1
  468. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
  469. package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -16
  470. package/modern/hooks/features/rowSelection/utils.js +2 -2
  471. package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
  472. package/modern/hooks/features/rows/gridRowsUtils.js +0 -9
  473. package/modern/hooks/features/rows/index.js +1 -1
  474. package/modern/hooks/features/rows/useGridParamsApi.js +33 -14
  475. package/modern/hooks/features/rows/useGridRowSpanning.js +97 -86
  476. package/modern/hooks/features/rows/useGridRows.js +23 -27
  477. package/modern/hooks/features/rows/useGridRowsMeta.js +3 -2
  478. package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
  479. package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
  480. package/modern/hooks/features/sorting/index.js +1 -1
  481. package/modern/hooks/features/sorting/useGridSorting.js +1 -1
  482. package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
  483. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +169 -94
  484. package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
  485. package/modern/hooks/utils/useGridApiRef.js +1 -1
  486. package/modern/hooks/utils/useGridSelector.js +6 -44
  487. package/modern/hooks/utils/useGridVisibleRows.js +5 -28
  488. package/modern/index.js +1 -1
  489. package/modern/internals/constants.js +8 -1
  490. package/modern/internals/index.js +5 -3
  491. package/modern/internals/utils/attachPinnedStyle.js +9 -0
  492. package/modern/internals/utils/getPinnedCellOffset.js +6 -7
  493. package/modern/internals/utils/index.js +2 -2
  494. package/modern/locales/arSD.js +14 -0
  495. package/modern/locales/beBY.js +13 -0
  496. package/modern/locales/bgBG.js +15 -0
  497. package/modern/locales/csCZ.js +15 -0
  498. package/modern/locales/daDK.js +15 -0
  499. package/modern/locales/deDE.js +13 -0
  500. package/modern/locales/elGR.js +14 -0
  501. package/modern/locales/esES.js +17 -4
  502. package/modern/locales/faIR.js +18 -4
  503. package/modern/locales/fiFI.js +15 -0
  504. package/modern/locales/frFR.js +15 -0
  505. package/modern/locales/heIL.js +17 -4
  506. package/modern/locales/hrHR.js +15 -0
  507. package/modern/locales/huHU.js +15 -0
  508. package/modern/locales/isIS.js +14 -0
  509. package/modern/locales/itIT.js +15 -0
  510. package/modern/locales/jaJP.js +15 -0
  511. package/modern/locales/koKR.js +47 -37
  512. package/modern/locales/nbNO.js +15 -0
  513. package/modern/locales/nlNL.js +18 -4
  514. package/modern/locales/nnNO.js +15 -0
  515. package/modern/locales/plPL.js +15 -0
  516. package/modern/locales/ptBR.js +13 -0
  517. package/modern/locales/ptPT.js +13 -0
  518. package/modern/locales/roRO.js +21 -9
  519. package/modern/locales/ruRU.js +15 -0
  520. package/modern/locales/skSK.js +14 -0
  521. package/modern/locales/svSE.js +19 -5
  522. package/modern/locales/trTR.js +15 -2
  523. package/modern/locales/ukUA.js +14 -0
  524. package/modern/locales/urPK.js +22 -9
  525. package/modern/locales/viVN.js +15 -0
  526. package/modern/locales/zhCN.js +17 -4
  527. package/modern/locales/zhHK.js +14 -0
  528. package/modern/locales/zhTW.js +14 -0
  529. package/modern/material/index.js +58 -7
  530. package/modern/models/api/index.js +0 -1
  531. package/modern/models/gridBaseSlots.js +1 -0
  532. package/modern/models/gridFilterInputComponent.js +1 -0
  533. package/modern/utils/assert.js +3 -0
  534. package/modern/utils/cellBorderUtils.js +5 -5
  535. package/modern/utils/createSelector.js +1 -120
  536. package/modern/utils/domUtils.js +7 -2
  537. package/modern/utils/isJSDOM.js +1 -0
  538. package/modern/utils/roundToDecimalPlaces.js +3 -0
  539. package/modern/utils/rtlFlipSide.js +22 -0
  540. package/modern/utils/utils.js +6 -1
  541. package/node/DataGrid/DataGrid.js +18 -36
  542. package/node/DataGrid/useDataGridComponent.js +1 -1
  543. package/node/DataGrid/useDataGridProps.js +2 -2
  544. package/node/components/GridApiContext.js +1 -0
  545. package/node/components/GridColumnHeaders.js +4 -4
  546. package/node/components/GridConfigurationContext.js +1 -0
  547. package/node/components/GridFooter.js +4 -4
  548. package/node/components/GridHeaders.js +2 -2
  549. package/node/components/GridLoadingOverlay.js +14 -12
  550. package/node/components/GridNoResultsOverlay.js +4 -4
  551. package/node/components/GridNoRowsOverlay.js +4 -4
  552. package/node/components/GridPagination.js +7 -4
  553. package/node/components/GridRow.js +51 -84
  554. package/node/components/GridRowCount.js +3 -2
  555. package/node/components/GridScrollArea.js +1 -0
  556. package/node/components/GridSelectedRowCount.js +3 -2
  557. package/node/components/GridSkeletonLoadingOverlay.js +21 -20
  558. package/node/components/base/GridOverlays.js +2 -24
  559. package/node/components/base/index.js +0 -11
  560. package/node/components/cell/GridActionsCell.js +8 -1
  561. package/node/components/cell/GridActionsCellItem.js +7 -8
  562. package/node/components/cell/GridCell.js +51 -91
  563. package/node/components/cell/GridEditDateCell.js +1 -1
  564. package/node/components/cell/GridEditInputCell.js +73 -4
  565. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  566. package/node/components/cell/GridSkeletonCell.js +1 -2
  567. package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  568. package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
  569. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
  570. package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
  571. package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  572. package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  573. package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
  574. package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
  575. package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
  576. package/node/components/columnsManagement/GridColumnsManagement.js +81 -11
  577. package/node/components/containers/GridFooterContainer.js +5 -3
  578. package/node/components/containers/GridOverlay.js +5 -3
  579. package/node/components/containers/GridRoot.js +17 -7
  580. package/node/components/containers/GridRootStyles.js +160 -50
  581. package/node/components/containers/GridToolbarContainer.js +3 -2
  582. package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
  583. package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
  584. package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
  585. package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
  586. package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
  587. package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  588. package/node/components/panel/GridColumnsPanel.js +1 -2
  589. package/node/components/panel/GridPanel.js +5 -3
  590. package/node/components/panel/GridPanelContent.js +7 -3
  591. package/node/components/panel/GridPanelFooter.js +5 -4
  592. package/node/components/panel/GridPanelWrapper.js +5 -3
  593. package/node/components/panel/filterPanel/GridFilterForm.js +22 -18
  594. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +42 -33
  595. package/node/components/panel/filterPanel/GridFilterInputDate.js +49 -30
  596. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
  597. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
  598. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
  599. package/node/components/panel/filterPanel/GridFilterInputValue.js +62 -37
  600. package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
  601. package/node/components/panel/filterPanel/index.js +7 -23
  602. package/node/components/toolbar/GridToolbar.js +11 -5
  603. package/node/components/toolbar/GridToolbarColumnsButton.js +12 -6
  604. package/node/components/toolbar/GridToolbarDensitySelector.js +9 -11
  605. package/node/components/toolbar/GridToolbarExport.js +2 -1
  606. package/node/components/toolbar/GridToolbarExportContainer.js +6 -6
  607. package/node/components/toolbar/GridToolbarFilterButton.js +20 -9
  608. package/node/components/toolbar/GridToolbarQuickFilter.js +39 -31
  609. package/node/components/virtualization/GridMainContainer.js +14 -5
  610. package/node/components/virtualization/GridVirtualScrollbar.js +17 -17
  611. package/node/components/virtualization/GridVirtualScroller.js +27 -12
  612. package/node/components/virtualization/GridVirtualScrollerContent.js +15 -6
  613. package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  614. package/node/constants/dataGridPropsDefaultValues.js +2 -4
  615. package/node/constants/gridClasses.js +1 -1
  616. package/node/constants/localeTextConstants.js +12 -0
  617. package/node/context/GridRootPropsContext.js +1 -0
  618. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  619. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  620. package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
  621. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  622. package/node/hooks/core/useGridApiInitialization.js +2 -2
  623. package/node/hooks/core/useGridStateInitialization.js +3 -3
  624. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -67
  625. package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
  626. package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  627. package/node/hooks/features/columnResize/useGridColumnResize.js +17 -10
  628. package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
  629. package/node/hooks/features/columns/useGridColumns.js +7 -3
  630. package/node/hooks/features/dimensions/useGridDimensions.js +12 -33
  631. package/node/hooks/features/editing/gridEditingSelectors.js +8 -2
  632. package/node/hooks/features/editing/useGridCellEditing.js +3 -3
  633. package/node/hooks/features/editing/useGridRowEditing.js +5 -6
  634. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  635. package/node/hooks/features/filter/gridFilterSelector.js +6 -1
  636. package/node/hooks/features/filter/gridFilterUtils.js +3 -3
  637. package/node/hooks/features/filter/useGridFilter.js +1 -1
  638. package/node/hooks/features/focus/useGridFocus.js +3 -2
  639. package/node/hooks/features/index.js +11 -0
  640. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -15
  641. package/node/hooks/features/keyboardNavigation/utils.js +0 -6
  642. package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
  643. package/node/hooks/features/listView/index.js +16 -0
  644. package/node/hooks/features/listView/useGridListView.js +2 -1
  645. package/node/hooks/features/overlays/useGridOverlays.js +24 -2
  646. package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
  647. package/node/hooks/features/pagination/useGridPagination.js +5 -3
  648. package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
  649. package/node/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +9 -2
  650. package/node/hooks/features/preferencesPanel/index.js +11 -10
  651. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
  652. package/node/hooks/features/rowSelection/useGridRowSelection.js +7 -15
  653. package/node/hooks/features/rowSelection/utils.js +2 -2
  654. package/node/hooks/features/rows/gridRowsSelector.js +2 -3
  655. package/node/hooks/features/rows/gridRowsUtils.js +0 -9
  656. package/node/hooks/features/rows/index.js +0 -7
  657. package/node/hooks/features/rows/useGridParamsApi.js +33 -14
  658. package/node/hooks/features/rows/useGridRowSpanning.js +95 -84
  659. package/node/hooks/features/rows/useGridRows.js +21 -25
  660. package/node/hooks/features/rows/useGridRowsMeta.js +5 -4
  661. package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
  662. package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
  663. package/node/hooks/features/sorting/index.js +24 -16
  664. package/node/hooks/features/sorting/useGridSorting.js +1 -1
  665. package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +40 -0
  666. package/node/hooks/features/virtualization/useGridVirtualScroller.js +171 -96
  667. package/node/hooks/utils/useGridApiEventHandler.js +1 -1
  668. package/node/hooks/utils/useGridApiRef.js +1 -1
  669. package/node/hooks/utils/useGridSelector.js +8 -47
  670. package/node/hooks/utils/useGridVisibleRows.js +3 -28
  671. package/node/index.js +1 -1
  672. package/node/internals/constants.js +9 -2
  673. package/node/internals/index.js +36 -24
  674. package/node/internals/utils/attachPinnedStyle.js +15 -0
  675. package/node/internals/utils/getPinnedCellOffset.js +6 -7
  676. package/node/internals/utils/index.js +11 -11
  677. package/node/locales/arSD.js +14 -0
  678. package/node/locales/beBY.js +13 -0
  679. package/node/locales/bgBG.js +15 -0
  680. package/node/locales/csCZ.js +15 -0
  681. package/node/locales/daDK.js +15 -0
  682. package/node/locales/deDE.js +13 -0
  683. package/node/locales/elGR.js +14 -0
  684. package/node/locales/esES.js +17 -4
  685. package/node/locales/faIR.js +18 -4
  686. package/node/locales/fiFI.js +15 -0
  687. package/node/locales/frFR.js +15 -0
  688. package/node/locales/heIL.js +17 -4
  689. package/node/locales/hrHR.js +15 -0
  690. package/node/locales/huHU.js +15 -0
  691. package/node/locales/isIS.js +14 -0
  692. package/node/locales/itIT.js +15 -0
  693. package/node/locales/jaJP.js +15 -0
  694. package/node/locales/koKR.js +47 -37
  695. package/node/locales/nbNO.js +15 -0
  696. package/node/locales/nlNL.js +18 -4
  697. package/node/locales/nnNO.js +15 -0
  698. package/node/locales/plPL.js +15 -0
  699. package/node/locales/ptBR.js +13 -0
  700. package/node/locales/ptPT.js +13 -0
  701. package/node/locales/roRO.js +21 -9
  702. package/node/locales/ruRU.js +15 -0
  703. package/node/locales/skSK.js +14 -0
  704. package/node/locales/svSE.js +19 -5
  705. package/node/locales/trTR.js +15 -2
  706. package/node/locales/ukUA.js +14 -0
  707. package/node/locales/urPK.js +22 -9
  708. package/node/locales/viVN.js +15 -0
  709. package/node/locales/zhCN.js +17 -4
  710. package/node/locales/zhHK.js +14 -0
  711. package/node/locales/zhTW.js +14 -0
  712. package/node/material/index.js +59 -7
  713. package/node/models/api/index.js +0 -11
  714. package/node/models/gridFilterInputComponent.js +5 -0
  715. package/node/utils/assert.js +9 -0
  716. package/node/utils/cellBorderUtils.js +5 -5
  717. package/node/utils/createSelector.js +4 -125
  718. package/node/utils/domUtils.js +7 -2
  719. package/node/utils/isJSDOM.js +7 -0
  720. package/node/utils/roundToDecimalPlaces.js +9 -0
  721. package/node/utils/rtlFlipSide.js +29 -0
  722. package/node/utils/utils.js +8 -1
  723. package/package.json +5 -5
  724. package/themeAugmentation/overrides.d.ts +10 -5
  725. package/utils/assert.d.ts +2 -0
  726. package/utils/assert.js +3 -0
  727. package/utils/cellBorderUtils.d.ts +3 -3
  728. package/utils/cellBorderUtils.js +5 -5
  729. package/utils/createSelector.d.ts +7 -19
  730. package/utils/createSelector.js +1 -120
  731. package/utils/domUtils.js +7 -2
  732. package/utils/getPublicApiRef.d.ts +2 -1
  733. package/utils/isJSDOM.d.ts +1 -0
  734. package/utils/isJSDOM.js +1 -0
  735. package/utils/keyboardUtils.d.ts +1 -1
  736. package/utils/roundToDecimalPlaces.d.ts +1 -0
  737. package/utils/roundToDecimalPlaces.js +3 -0
  738. package/utils/rtlFlipSide.d.ts +2 -0
  739. package/utils/rtlFlipSide.js +22 -0
  740. package/utils/utils.d.ts +1 -0
  741. package/utils/utils.js +6 -1
  742. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
  743. package/internals/utils/useProps.d.ts +0 -1
  744. package/internals/utils/useProps.js +0 -24
  745. package/joy/icons.d.ts +0 -32
  746. package/joy/icons.js +0 -431
  747. package/joy/index.d.ts +0 -2
  748. package/joy/index.js +0 -2
  749. package/joy/joySlots.d.ts +0 -3
  750. package/joy/joySlots.js +0 -384
  751. package/joy/package.json +0 -6
  752. package/modern/internals/utils/useProps.js +0 -24
  753. package/modern/joy/icons.js +0 -431
  754. package/modern/joy/index.js +0 -2
  755. package/modern/joy/joySlots.js +0 -384
  756. package/node/internals/utils/useProps.js +0 -30
  757. package/node/joy/icons.js +0 -439
  758. package/node/joy/index.js +0 -13
  759. package/node/joy/joySlots.js +0 -392
  760. /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
  761. /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
  762. /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
@@ -4,17 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.shouldCellShowRightBorder = exports.shouldCellShowLeftBorder = void 0;
7
- var _gridColumnsInterfaces = require("../hooks/features/columns/gridColumnsInterfaces");
7
+ var _constants = require("../internals/constants");
8
8
  const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength, showCellVerticalBorderRootProp, gridHasFiller) => {
9
9
  const isSectionLastCell = indexInSection === sectionLength - 1;
10
- if (pinnedPosition === _gridColumnsInterfaces.GridPinnedColumnPosition.LEFT && isSectionLastCell) {
10
+ if (pinnedPosition === _constants.PinnedColumnPosition.LEFT && isSectionLastCell) {
11
11
  return true;
12
12
  }
13
13
  if (showCellVerticalBorderRootProp) {
14
- if (pinnedPosition === _gridColumnsInterfaces.GridPinnedColumnPosition.LEFT) {
14
+ if (pinnedPosition === _constants.PinnedColumnPosition.LEFT) {
15
15
  return true;
16
16
  }
17
- if (pinnedPosition === _gridColumnsInterfaces.GridPinnedColumnPosition.RIGHT) {
17
+ if (pinnedPosition === _constants.PinnedColumnPosition.RIGHT) {
18
18
  return !isSectionLastCell;
19
19
  }
20
20
  // pinnedPosition === undefined, middle section
@@ -24,6 +24,6 @@ const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength
24
24
  };
25
25
  exports.shouldCellShowRightBorder = shouldCellShowRightBorder;
26
26
  const shouldCellShowLeftBorder = (pinnedPosition, indexInSection) => {
27
- return pinnedPosition === _gridColumnsInterfaces.GridPinnedColumnPosition.RIGHT && indexInSection === 0;
27
+ return pinnedPosition === _constants.PinnedColumnPosition.RIGHT && indexInSection === 0;
28
28
  };
29
29
  exports.shouldCellShowLeftBorder = shouldCellShowLeftBorder;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createSelectorV8 = exports.createSelectorMemoizedV8 = exports.createSelectorMemoized = exports.createSelector = void 0;
6
+ exports.createSelectorMemoized = exports.createSelector = void 0;
7
7
  var _reselect = require("reselect");
8
8
  var _warning = require("@mui/x-internals/warning");
9
9
  var _useGridSelector = require("../hooks/utils/useGridSelector");
@@ -14,19 +14,6 @@ const reselectCreateSelector = (0, _reselect.createSelectorCreator)({
14
14
  equalityCheck: Object.is
15
15
  }
16
16
  });
17
-
18
- // TODO v8: Remove this type
19
-
20
- // TODO v8: Rename this type to `OutputSelector`
21
-
22
- // TODO v8: Remove this type
23
-
24
- // TODO v8: Rename this type to `SelectorArgs`
25
-
26
- // TODO v8: Remove this type
27
-
28
- // TODO v8: Rename this type to `CreateSelectorFunction`
29
-
30
17
  const cache = new WeakMap();
31
18
  function checkIsAPIRef(value) {
32
19
  return 'current' in value && 'instanceId' in value.current;
@@ -34,84 +21,12 @@ function checkIsAPIRef(value) {
34
21
  const DEFAULT_INSTANCE_ID = {
35
22
  id: 'default'
36
23
  };
37
-
38
- // TODO v8: Remove this function
39
24
  const createSelector = (a, b, c, d, e, f, ...other) => {
40
25
  if (other.length > 0) {
41
26
  throw new Error('Unsupported number of selectors');
42
27
  }
43
28
  let selector;
44
29
 
45
- // eslint-disable-next-line id-denylist
46
- if (a && b && c && d && e && f) {
47
- selector = (stateOrApiRef, instanceIdParam) => {
48
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
49
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
50
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
51
- const va = a(state, instanceId);
52
- const vb = b(state, instanceId);
53
- const vc = c(state, instanceId);
54
- const vd = d(state, instanceId);
55
- const ve = e(state, instanceId);
56
- return f(va, vb, vc, vd, ve);
57
- };
58
- // eslint-disable-next-line id-denylist
59
- } else if (a && b && c && d && e) {
60
- selector = (stateOrApiRef, instanceIdParam) => {
61
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
62
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
63
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
64
- const va = a(state, instanceId);
65
- const vb = b(state, instanceId);
66
- const vc = c(state, instanceId);
67
- const vd = d(state, instanceId);
68
- return e(va, vb, vc, vd);
69
- };
70
- } else if (a && b && c && d) {
71
- selector = (stateOrApiRef, instanceIdParam) => {
72
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
73
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
74
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
75
- const va = a(state, instanceId);
76
- const vb = b(state, instanceId);
77
- const vc = c(state, instanceId);
78
- return d(va, vb, vc);
79
- };
80
- } else if (a && b && c) {
81
- selector = (stateOrApiRef, instanceIdParam) => {
82
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
83
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
84
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
85
- const va = a(state, instanceId);
86
- const vb = b(state, instanceId);
87
- return c(va, vb);
88
- };
89
- } else if (a && b) {
90
- selector = (stateOrApiRef, instanceIdParam) => {
91
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
92
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
93
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
94
- const va = a(state, instanceId);
95
- return b(va);
96
- };
97
- } else {
98
- throw new Error('Missing arguments');
99
- }
100
-
101
- // We use this property to detect if the selector was created with createSelector
102
- // or it's only a simple function the receives the state and returns part of it.
103
- selector.acceptsApiRef = true;
104
- return selector;
105
- };
106
-
107
- // TODO v8: Rename this function to `createSelector`
108
- exports.createSelector = createSelector;
109
- const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
110
- if (other.length > 0) {
111
- throw new Error('Unsupported number of selectors');
112
- }
113
- let selector;
114
-
115
30
  // eslint-disable-next-line id-denylist
116
31
  if (a && b && c && d && e && f) {
117
32
  selector = (stateOrApiRef, args, instanceIdParam) => {
@@ -173,51 +88,15 @@ const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
173
88
  selector.acceptsApiRef = true;
174
89
  return selector;
175
90
  };
176
-
177
- // TODO v8: Remove this function
178
- exports.createSelectorV8 = createSelectorV8;
91
+ exports.createSelector = createSelector;
179
92
  const createSelectorMemoized = (...args) => {
180
- const selector = (stateOrApiRef, instanceId) => {
181
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
182
- const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
183
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
184
- if (process.env.NODE_ENV !== 'production') {
185
- if (cacheKey.id === 'default') {
186
- (0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
187
- }
188
- }
189
- const cacheArgsInit = cache.get(cacheKey);
190
- const cacheArgs = cacheArgsInit ?? new Map();
191
- const cacheFn = cacheArgs?.get(args);
192
- if (cacheArgs && cacheFn) {
193
- // We pass the cache key because the called selector might have as
194
- // dependency another selector created with this `createSelector`.
195
- return cacheFn(state, cacheKey);
196
- }
197
- const fn = reselectCreateSelector(...args);
198
- if (!cacheArgsInit) {
199
- cache.set(cacheKey, cacheArgs);
200
- }
201
- cacheArgs.set(args, fn);
202
- return fn(state, cacheKey);
203
- };
204
-
205
- // We use this property to detect if the selector was created with createSelector
206
- // or it's only a simple function the receives the state and returns part of it.
207
- selector.acceptsApiRef = true;
208
- return selector;
209
- };
210
-
211
- // TODO v8: Rename this function to `createSelectorMemoized`
212
- exports.createSelectorMemoized = createSelectorMemoized;
213
- const createSelectorMemoizedV8 = (...args) => {
214
93
  const selector = (stateOrApiRef, selectorArgs, instanceId) => {
215
94
  const isAPIRef = checkIsAPIRef(stateOrApiRef);
216
95
  const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
217
96
  const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
218
97
  if (process.env.NODE_ENV !== 'production') {
219
98
  if (cacheKey.id === 'default') {
220
- (0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
99
+ (0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, args, apiRef.current.instanceId)`.']);
221
100
  }
222
101
  }
223
102
  const cacheArgsInit = cache.get(cacheKey);
@@ -250,4 +129,4 @@ const createSelectorMemoizedV8 = (...args) => {
250
129
  selector.acceptsApiRef = true;
251
130
  return selector;
252
131
  };
253
- exports.createSelectorMemoizedV8 = createSelectorMemoizedV8;
132
+ exports.createSelectorMemoized = createSelectorMemoized;
@@ -179,7 +179,7 @@ const findPinnedHeaders = ({
179
179
  const elements = [];
180
180
  api.columnHeadersContainerRef.current.querySelectorAll(`.${_gridClasses.gridClasses[position === 'left' ? 'columnHeader--pinnedLeft' : 'columnHeader--pinnedRight']}`).forEach(element => {
181
181
  const currentColIndex = parseCellColIndex(element);
182
- if (currentColIndex !== null && filterFn(currentColIndex)) {
182
+ if (currentColIndex !== null && filterFn(currentColIndex, element)) {
183
183
  elements.push(element);
184
184
  }
185
185
  });
@@ -200,7 +200,12 @@ function findRightPinnedHeadersBeforeCol(api, col, isRtl) {
200
200
  api,
201
201
  position: isRtl ? 'left' : 'right',
202
202
  colIndex,
203
- filterFn: index => isRtl ? index > colIndex : index < colIndex
203
+ filterFn: (index, element) => {
204
+ if (element.classList.contains(_gridClasses.gridClasses['columnHeader--last'])) {
205
+ return false;
206
+ }
207
+ return isRtl ? index > colIndex : index < colIndex;
208
+ }
204
209
  });
205
210
  }
206
211
  function findGridHeader(api, field) {
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isJSDOM = void 0;
7
+ const isJSDOM = exports.isJSDOM = typeof window !== 'undefined' && /jsdom|HappyDOM/.test(window.navigator.userAgent);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.roundToDecimalPlaces = roundToDecimalPlaces;
7
+ function roundToDecimalPlaces(value, decimals) {
8
+ return Math.round(value * 10 ** decimals) / 10 ** decimals;
9
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.rtlFlipSide = void 0;
7
+ var _constants = require("../internals/constants");
8
+ const rtlFlipSide = (position, isRtl) => {
9
+ if (!position) {
10
+ return undefined;
11
+ }
12
+ if (!isRtl) {
13
+ if (position === _constants.PinnedColumnPosition.LEFT) {
14
+ return 'left';
15
+ }
16
+ if (position === _constants.PinnedColumnPosition.RIGHT) {
17
+ return 'right';
18
+ }
19
+ } else {
20
+ if (position === _constants.PinnedColumnPosition.LEFT) {
21
+ return 'right';
22
+ }
23
+ if (position === _constants.PinnedColumnPosition.RIGHT) {
24
+ return 'left';
25
+ }
26
+ }
27
+ return undefined;
28
+ };
29
+ exports.rtlFlipSide = rtlFlipSide;
@@ -14,6 +14,7 @@ exports.isNumber = isNumber;
14
14
  exports.isObject = isObject;
15
15
  exports.localStorageAvailable = localStorageAvailable;
16
16
  exports.range = range;
17
+ exports.runIf = void 0;
17
18
  function isNumber(value) {
18
19
  return typeof value === 'number' && !Number.isNaN(value);
19
20
  }
@@ -213,4 +214,10 @@ function deepClone(obj) {
213
214
  * of a `eslint-disable-next-line react-hooks/exhaustive-deps` because
214
215
  * that hint disables checks on all values instead of just one.
215
216
  */
216
- function eslintUseValue(_) {}
217
+ function eslintUseValue(_) {}
218
+ const runIf = (condition, fn) => params => {
219
+ if (condition) {
220
+ fn(params);
221
+ }
222
+ };
223
+ exports.runIf = runIf;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "8.0.0-alpha.0",
3
+ "version": "8.0.0-alpha.10",
4
4
  "description": "The Community plan edition of the Data Grid components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -37,20 +37,20 @@
37
37
  "directory": "packages/x-data-grid"
38
38
  },
39
39
  "dependencies": {
40
- "@babel/runtime": "^7.26.0",
40
+ "@babel/runtime": "^7.26.7",
41
41
  "@mui/utils": "^5.16.6 || ^6.0.0",
42
42
  "clsx": "^2.1.1",
43
43
  "prop-types": "^15.8.1",
44
44
  "reselect": "^5.1.1",
45
- "@mui/x-internals": "8.0.0-alpha.0"
45
+ "@mui/x-internals": "8.0.0-alpha.10"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@emotion/react": "^11.9.0",
49
49
  "@emotion/styled": "^11.8.1",
50
50
  "@mui/material": "^5.15.14 || ^6.0.0",
51
51
  "@mui/system": "^5.15.14 || ^6.0.0",
52
- "react": "^17.0.0 || ^18.0.0",
53
- "react-dom": "^17.0.0 || ^18.0.0"
52
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
53
+ "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@emotion/react": {
@@ -5,10 +5,15 @@ export interface DataGridComponentNameToClassKey {
5
5
  declare module '@mui/material/styles' {
6
6
  interface ComponentNameToClassKey extends DataGridComponentNameToClassKey {
7
7
  }
8
- interface Mixins {
9
- MuiDataGrid?: {
10
- containerBackground?: string;
11
- pinnedBackground?: string;
12
- };
8
+ interface PaletteDataGrid {
9
+ bg?: string;
10
+ headerBg?: string;
11
+ pinnedBg?: string;
12
+ }
13
+ interface CssVarsPalette {
14
+ DataGrid: PaletteDataGrid;
15
+ }
16
+ interface PaletteOptions {
17
+ DataGrid?: Partial<PaletteDataGrid>;
13
18
  }
14
19
  }
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare function NotRendered<T>(_props: T): React.ReactNode;
@@ -0,0 +1,3 @@
1
+ export function NotRendered(_props) {
2
+ throw new Error('Failed assertion: should not be rendered');
3
+ }
@@ -1,3 +1,3 @@
1
- import { GridPinnedColumnPosition } from '../hooks/features/columns/gridColumnsInterfaces';
2
- export declare const shouldCellShowRightBorder: (pinnedPosition: GridPinnedColumnPosition | undefined, indexInSection: number, sectionLength: number, showCellVerticalBorderRootProp: boolean, gridHasFiller: boolean) => boolean;
3
- export declare const shouldCellShowLeftBorder: (pinnedPosition: GridPinnedColumnPosition | undefined, indexInSection: number) => boolean;
1
+ import { PinnedColumnPosition } from '../internals/constants';
2
+ export declare const shouldCellShowRightBorder: (pinnedPosition: PinnedColumnPosition | undefined, indexInSection: number, sectionLength: number, showCellVerticalBorderRootProp: boolean, gridHasFiller: boolean) => boolean;
3
+ export declare const shouldCellShowLeftBorder: (pinnedPosition: PinnedColumnPosition | undefined, indexInSection: number) => boolean;
@@ -1,14 +1,14 @@
1
- import { GridPinnedColumnPosition } from "../hooks/features/columns/gridColumnsInterfaces.js";
1
+ import { PinnedColumnPosition } from "../internals/constants.js";
2
2
  export const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength, showCellVerticalBorderRootProp, gridHasFiller) => {
3
3
  const isSectionLastCell = indexInSection === sectionLength - 1;
4
- if (pinnedPosition === GridPinnedColumnPosition.LEFT && isSectionLastCell) {
4
+ if (pinnedPosition === PinnedColumnPosition.LEFT && isSectionLastCell) {
5
5
  return true;
6
6
  }
7
7
  if (showCellVerticalBorderRootProp) {
8
- if (pinnedPosition === GridPinnedColumnPosition.LEFT) {
8
+ if (pinnedPosition === PinnedColumnPosition.LEFT) {
9
9
  return true;
10
10
  }
11
- if (pinnedPosition === GridPinnedColumnPosition.RIGHT) {
11
+ if (pinnedPosition === PinnedColumnPosition.RIGHT) {
12
12
  return !isSectionLastCell;
13
13
  }
14
14
  // pinnedPosition === undefined, middle section
@@ -17,5 +17,5 @@ export const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectio
17
17
  return false;
18
18
  };
19
19
  export const shouldCellShowLeftBorder = (pinnedPosition, indexInSection) => {
20
- return pinnedPosition === GridPinnedColumnPosition.RIGHT && indexInSection === 0;
20
+ return pinnedPosition === PinnedColumnPosition.RIGHT && indexInSection === 0;
21
21
  };
@@ -1,20 +1,12 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { Selector, SelectorResultArray } from 'reselect';
3
3
  import type { GridCoreApi } from '../models/api/gridCoreApi';
4
- export interface OutputSelector<State, Result> {
5
- (apiRef: React.MutableRefObject<{
4
+ export interface OutputSelector<State, Args, Result> {
5
+ (apiRef: RefObject<{
6
6
  state: State;
7
7
  instanceId: GridCoreApi['instanceId'];
8
- }>): Result;
9
- (state: State, instanceId: GridCoreApi['instanceId']): Result;
10
- acceptsApiRef: boolean;
11
- }
12
- export interface OutputSelectorV8<State, Args, Result> {
13
- (apiRef: React.MutableRefObject<{
14
- state: State;
15
- instanceId: GridCoreApi['instanceId'];
16
- }>, args?: Args): Result;
17
- (state: State, instanceId: GridCoreApi['instanceId']): Result;
8
+ } | null>, args?: Args): Result;
9
+ (state: State, args?: Args, instanceId?: GridCoreApi['instanceId']): Result;
18
10
  acceptsApiRef: boolean;
19
11
  }
20
12
  type StateFromSelector<T> = T extends (first: infer F, ...args: any[]) => any ? F extends {
@@ -24,19 +16,15 @@ type StateFromSelectorList<Selectors extends readonly any[]> = Selectors extends
24
16
  f: infer F,
25
17
  ...other: infer R
26
18
  ] ? StateFromSelector<F> extends StateFromSelectorList<R> ? StateFromSelector<F> : StateFromSelectorList<R> : {};
27
- type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Result> = [selectors: [...Selectors], combiner: (...args: SelectorResultArray<Selectors>) => Result] | [...Selectors, (...args: SelectorResultArray<Selectors>) => Result];
28
19
  type SelectorResultArrayWithArgs<Selectors extends ReadonlyArray<Selector<any>>, Args> = [
29
20
  ...SelectorResultArray<Selectors>,
30
21
  Args
31
22
  ];
32
- type SelectorArgsV8<Selectors extends ReadonlyArray<Selector<any>>, Args, Result> = [
23
+ type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Args, Result> = [
33
24
  selectors: [...Selectors],
34
25
  combiner: (...args: SelectorResultArrayWithArgs<Selectors, Args>) => Result
35
26
  ] | [...Selectors, (...args: SelectorResultArrayWithArgs<Selectors, Args>) => Result];
36
- type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Result>(...items: SelectorArgs<Selectors, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Result>;
37
- type CreateSelectorFunctionV8 = <Selectors extends ReadonlyArray<Selector<any>>, Args, Result>(...items: SelectorArgsV8<Selectors, Args, Result>) => OutputSelectorV8<StateFromSelectorList<Selectors>, Args, Result>;
27
+ type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Args, Result>(...items: SelectorArgs<Selectors, Args, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Args, Result>;
38
28
  export declare const createSelector: CreateSelectorFunction;
39
- export declare const createSelectorV8: CreateSelectorFunctionV8;
40
29
  export declare const createSelectorMemoized: CreateSelectorFunction;
41
- export declare const createSelectorMemoizedV8: CreateSelectorFunctionV8;
42
30
  export {};
@@ -8,19 +8,6 @@ const reselectCreateSelector = createSelectorCreator({
8
8
  equalityCheck: Object.is
9
9
  }
10
10
  });
11
-
12
- // TODO v8: Remove this type
13
-
14
- // TODO v8: Rename this type to `OutputSelector`
15
-
16
- // TODO v8: Remove this type
17
-
18
- // TODO v8: Rename this type to `SelectorArgs`
19
-
20
- // TODO v8: Remove this type
21
-
22
- // TODO v8: Rename this type to `CreateSelectorFunction`
23
-
24
11
  const cache = new WeakMap();
25
12
  function checkIsAPIRef(value) {
26
13
  return 'current' in value && 'instanceId' in value.current;
@@ -28,83 +15,12 @@ function checkIsAPIRef(value) {
28
15
  const DEFAULT_INSTANCE_ID = {
29
16
  id: 'default'
30
17
  };
31
-
32
- // TODO v8: Remove this function
33
18
  export const createSelector = (a, b, c, d, e, f, ...other) => {
34
19
  if (other.length > 0) {
35
20
  throw new Error('Unsupported number of selectors');
36
21
  }
37
22
  let selector;
38
23
 
39
- // eslint-disable-next-line id-denylist
40
- if (a && b && c && d && e && f) {
41
- selector = (stateOrApiRef, instanceIdParam) => {
42
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
43
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
44
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
45
- const va = a(state, instanceId);
46
- const vb = b(state, instanceId);
47
- const vc = c(state, instanceId);
48
- const vd = d(state, instanceId);
49
- const ve = e(state, instanceId);
50
- return f(va, vb, vc, vd, ve);
51
- };
52
- // eslint-disable-next-line id-denylist
53
- } else if (a && b && c && d && e) {
54
- selector = (stateOrApiRef, instanceIdParam) => {
55
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
56
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
57
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
58
- const va = a(state, instanceId);
59
- const vb = b(state, instanceId);
60
- const vc = c(state, instanceId);
61
- const vd = d(state, instanceId);
62
- return e(va, vb, vc, vd);
63
- };
64
- } else if (a && b && c && d) {
65
- selector = (stateOrApiRef, instanceIdParam) => {
66
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
67
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
68
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
69
- const va = a(state, instanceId);
70
- const vb = b(state, instanceId);
71
- const vc = c(state, instanceId);
72
- return d(va, vb, vc);
73
- };
74
- } else if (a && b && c) {
75
- selector = (stateOrApiRef, instanceIdParam) => {
76
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
77
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
78
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
79
- const va = a(state, instanceId);
80
- const vb = b(state, instanceId);
81
- return c(va, vb);
82
- };
83
- } else if (a && b) {
84
- selector = (stateOrApiRef, instanceIdParam) => {
85
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
86
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
87
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
88
- const va = a(state, instanceId);
89
- return b(va);
90
- };
91
- } else {
92
- throw new Error('Missing arguments');
93
- }
94
-
95
- // We use this property to detect if the selector was created with createSelector
96
- // or it's only a simple function the receives the state and returns part of it.
97
- selector.acceptsApiRef = true;
98
- return selector;
99
- };
100
-
101
- // TODO v8: Rename this function to `createSelector`
102
- export const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
103
- if (other.length > 0) {
104
- throw new Error('Unsupported number of selectors');
105
- }
106
- let selector;
107
-
108
24
  // eslint-disable-next-line id-denylist
109
25
  if (a && b && c && d && e && f) {
110
26
  selector = (stateOrApiRef, args, instanceIdParam) => {
@@ -166,49 +82,14 @@ export const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
166
82
  selector.acceptsApiRef = true;
167
83
  return selector;
168
84
  };
169
-
170
- // TODO v8: Remove this function
171
85
  export const createSelectorMemoized = (...args) => {
172
- const selector = (stateOrApiRef, instanceId) => {
173
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
174
- const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
175
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
176
- if (process.env.NODE_ENV !== 'production') {
177
- if (cacheKey.id === 'default') {
178
- warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
179
- }
180
- }
181
- const cacheArgsInit = cache.get(cacheKey);
182
- const cacheArgs = cacheArgsInit ?? new Map();
183
- const cacheFn = cacheArgs?.get(args);
184
- if (cacheArgs && cacheFn) {
185
- // We pass the cache key because the called selector might have as
186
- // dependency another selector created with this `createSelector`.
187
- return cacheFn(state, cacheKey);
188
- }
189
- const fn = reselectCreateSelector(...args);
190
- if (!cacheArgsInit) {
191
- cache.set(cacheKey, cacheArgs);
192
- }
193
- cacheArgs.set(args, fn);
194
- return fn(state, cacheKey);
195
- };
196
-
197
- // We use this property to detect if the selector was created with createSelector
198
- // or it's only a simple function the receives the state and returns part of it.
199
- selector.acceptsApiRef = true;
200
- return selector;
201
- };
202
-
203
- // TODO v8: Rename this function to `createSelectorMemoized`
204
- export const createSelectorMemoizedV8 = (...args) => {
205
86
  const selector = (stateOrApiRef, selectorArgs, instanceId) => {
206
87
  const isAPIRef = checkIsAPIRef(stateOrApiRef);
207
88
  const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
208
89
  const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
209
90
  if (process.env.NODE_ENV !== 'production') {
210
91
  if (cacheKey.id === 'default') {
211
- warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
92
+ warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, args, apiRef.current.instanceId)`.']);
212
93
  }
213
94
  }
214
95
  const cacheArgsInit = cache.get(cacheKey);
package/utils/domUtils.js CHANGED
@@ -153,7 +153,7 @@ const findPinnedHeaders = ({
153
153
  const elements = [];
154
154
  api.columnHeadersContainerRef.current.querySelectorAll(`.${gridClasses[position === 'left' ? 'columnHeader--pinnedLeft' : 'columnHeader--pinnedRight']}`).forEach(element => {
155
155
  const currentColIndex = parseCellColIndex(element);
156
- if (currentColIndex !== null && filterFn(currentColIndex)) {
156
+ if (currentColIndex !== null && filterFn(currentColIndex, element)) {
157
157
  elements.push(element);
158
158
  }
159
159
  });
@@ -174,7 +174,12 @@ export function findRightPinnedHeadersBeforeCol(api, col, isRtl) {
174
174
  api,
175
175
  position: isRtl ? 'left' : 'right',
176
176
  colIndex,
177
- filterFn: index => isRtl ? index > colIndex : index < colIndex
177
+ filterFn: (index, element) => {
178
+ if (element.classList.contains(gridClasses['columnHeader--last'])) {
179
+ return false;
180
+ }
181
+ return isRtl ? index > colIndex : index < colIndex;
182
+ }
178
183
  });
179
184
  }
180
185
  export function findGridHeader(api, field) {
@@ -1,2 +1,3 @@
1
+ import { RefObject } from '@mui/x-internals/types';
1
2
  import type { GridPrivateApiCommunity } from '../models/api/gridApiCommunity';
2
- export declare function getPublicApiRef<PrivateApi extends GridPrivateApiCommunity>(apiRef: React.MutableRefObject<PrivateApi>): React.MutableRefObject<ReturnType<PrivateApi["getPublicApi"]>>;
3
+ export declare function getPublicApiRef<PrivateApi extends GridPrivateApiCommunity>(apiRef: RefObject<PrivateApi>): RefObject<ReturnType<PrivateApi["getPublicApi"]>>;
@@ -0,0 +1 @@
1
+ export declare const isJSDOM: boolean;
@@ -0,0 +1 @@
1
+ export const isJSDOM = typeof window !== 'undefined' && /jsdom|HappyDOM/.test(window.navigator.userAgent);
@@ -9,6 +9,6 @@ export declare const isCellExitEditModeKeys: (key: string) => boolean;
9
9
  export declare const isCellEditCommitKeys: (key: string) => boolean;
10
10
  export declare const isNavigationKey: (key: string) => boolean;
11
11
  export declare const isKeyboardEvent: (event: any) => event is React.KeyboardEvent<HTMLElement>;
12
- export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is "Tab" | "Escape";
12
+ export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is "Escape" | "Tab";
13
13
  export declare function isPasteShortcut(event: React.KeyboardEvent): boolean;
14
14
  export declare function isCopyShortcut(event: KeyboardEvent): boolean;
@@ -0,0 +1 @@
1
+ export declare function roundToDecimalPlaces(value: number, decimals: number): number;
@@ -0,0 +1,3 @@
1
+ export function roundToDecimalPlaces(value, decimals) {
2
+ return Math.round(value * 10 ** decimals) / 10 ** decimals;
3
+ }
@@ -0,0 +1,2 @@
1
+ import { PinnedColumnPosition } from '../internals/constants';
2
+ export declare const rtlFlipSide: (position: PinnedColumnPosition | undefined, isRtl: boolean) => "left" | "right" | undefined;