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

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 (504) hide show
  1. package/CHANGELOG.md +430 -0
  2. package/DataGrid/DataGrid.js +31 -22
  3. package/DataGrid/useDataGridProps.js +1 -1
  4. package/colDef/gridActionsColDef.js +1 -1
  5. package/colDef/gridBooleanColDef.js +1 -1
  6. package/colDef/gridCheckboxSelectionColDef.js +2 -4
  7. package/components/GridFooter.js +1 -1
  8. package/components/GridHeader.js +1 -1
  9. package/components/GridPagination.js +5 -6
  10. package/components/GridRowCount.js +4 -5
  11. package/components/GridScrollArea.js +4 -3
  12. package/components/GridSelectedRowCount.js +5 -6
  13. package/components/GridShadowScrollArea.d.ts +8 -0
  14. package/components/GridShadowScrollArea.js +82 -0
  15. package/components/cell/GridEditInputCell.js +2 -3
  16. package/components/columnSelection/GridHeaderCheckbox.js +51 -17
  17. package/components/columnsManagement/GridColumnsManagement.js +60 -61
  18. package/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
  19. package/components/columnsPanel/ColumnsPanelTrigger.js +209 -0
  20. package/components/columnsPanel/index.d.ts +1 -0
  21. package/components/columnsPanel/index.js +16 -0
  22. package/components/containers/GridOverlay.js +6 -8
  23. package/components/containers/GridRoot.js +4 -2
  24. package/components/containers/GridRootStyles.d.ts +1 -2
  25. package/components/containers/GridRootStyles.js +77 -100
  26. package/components/containers/GridToolbarContainer.js +5 -6
  27. package/components/export/ExportCsv.d.ts +30 -0
  28. package/components/export/ExportCsv.js +196 -0
  29. package/components/export/ExportPrint.d.ts +30 -0
  30. package/components/export/ExportPrint.js +196 -0
  31. package/components/export/index.d.ts +2 -0
  32. package/components/export/index.js +27 -0
  33. package/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
  34. package/components/filterPanel/FilterPanelTrigger.js +212 -0
  35. package/components/filterPanel/index.d.ts +1 -0
  36. package/components/filterPanel/index.js +16 -0
  37. package/components/index.d.ts +6 -1
  38. package/components/index.js +60 -0
  39. package/components/menu/GridMenu.js +7 -6
  40. package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
  41. package/components/panel/GridPanel.js +18 -20
  42. package/components/panel/GridPanelContent.js +6 -8
  43. package/components/panel/GridPanelFooter.js +5 -6
  44. package/components/panel/GridPanelHeader.js +4 -5
  45. package/components/panel/filterPanel/GridFilterForm.js +13 -20
  46. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  47. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  48. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  49. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
  50. package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  51. package/components/quickFilter/QuickFilter.d.ts +41 -0
  52. package/components/quickFilter/QuickFilter.js +110 -0
  53. package/components/quickFilter/QuickFilterClear.d.ts +28 -0
  54. package/components/quickFilter/QuickFilterClear.js +161 -0
  55. package/components/quickFilter/QuickFilterContext.d.ts +13 -0
  56. package/components/quickFilter/QuickFilterContext.js +17 -0
  57. package/components/quickFilter/QuickFilterControl.d.ts +28 -0
  58. package/components/quickFilter/QuickFilterControl.js +104 -0
  59. package/components/quickFilter/index.d.ts +3 -0
  60. package/components/quickFilter/index.js +38 -0
  61. package/components/toolbar/GridToolbar.d.ts +1 -1
  62. package/components/toolbar/GridToolbar.js +2 -2
  63. package/components/toolbar/GridToolbarFilterButton.js +5 -6
  64. package/components/toolbar/GridToolbarQuickFilter.js +57 -97
  65. package/components/toolbarV8/GridToolbar.d.ts +11 -0
  66. package/components/toolbarV8/GridToolbar.js +142 -0
  67. package/components/toolbarV8/Toolbar.d.ts +32 -0
  68. package/components/toolbarV8/Toolbar.js +132 -0
  69. package/components/toolbarV8/ToolbarButton.d.ts +23 -0
  70. package/components/toolbarV8/ToolbarButton.js +179 -0
  71. package/components/toolbarV8/ToolbarContext.d.ts +9 -0
  72. package/components/toolbarV8/ToolbarContext.js +17 -0
  73. package/components/toolbarV8/index.d.ts +2 -0
  74. package/components/toolbarV8/index.js +27 -0
  75. package/components/virtualization/GridVirtualScrollbar.js +15 -6
  76. package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  77. package/constants/cssVariables.d.ts +294 -0
  78. package/constants/cssVariables.js +168 -0
  79. package/constants/dataGridPropsDefaultValues.js +1 -0
  80. package/constants/defaultGridSlotsComponents.js +2 -1
  81. package/constants/gridClasses.d.ts +17 -0
  82. package/constants/gridClasses.js +1 -1
  83. package/context/GridContextProvider.js +4 -1
  84. package/esm/DataGrid/DataGrid.js +31 -22
  85. package/esm/DataGrid/useDataGridProps.js +1 -1
  86. package/esm/colDef/gridActionsColDef.js +1 -1
  87. package/esm/colDef/gridBooleanColDef.js +1 -1
  88. package/esm/colDef/gridCheckboxSelectionColDef.js +2 -4
  89. package/esm/components/GridFooter.js +2 -2
  90. package/esm/components/GridHeader.js +1 -1
  91. package/esm/components/GridPagination.js +5 -6
  92. package/esm/components/GridRowCount.js +4 -5
  93. package/esm/components/GridScrollArea.js +2 -1
  94. package/esm/components/GridSelectedRowCount.js +5 -6
  95. package/esm/components/GridShadowScrollArea.d.ts +8 -0
  96. package/esm/components/GridShadowScrollArea.js +74 -0
  97. package/esm/components/cell/GridEditInputCell.js +2 -3
  98. package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
  99. package/esm/components/columnsManagement/GridColumnsManagement.js +61 -62
  100. package/esm/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
  101. package/esm/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
  102. package/esm/components/columnsPanel/index.d.ts +1 -0
  103. package/esm/components/columnsPanel/index.js +1 -0
  104. package/esm/components/containers/GridOverlay.js +6 -8
  105. package/esm/components/containers/GridRoot.js +4 -2
  106. package/esm/components/containers/GridRootStyles.d.ts +1 -2
  107. package/esm/components/containers/GridRootStyles.js +78 -101
  108. package/esm/components/containers/GridToolbarContainer.js +5 -6
  109. package/esm/components/export/ExportCsv.d.ts +30 -0
  110. package/esm/components/export/ExportCsv.js +189 -0
  111. package/esm/components/export/ExportPrint.d.ts +30 -0
  112. package/esm/components/export/ExportPrint.js +189 -0
  113. package/esm/components/export/index.d.ts +2 -0
  114. package/esm/components/export/index.js +2 -0
  115. package/esm/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
  116. package/esm/components/filterPanel/FilterPanelTrigger.js +205 -0
  117. package/esm/components/filterPanel/index.d.ts +1 -0
  118. package/esm/components/filterPanel/index.js +1 -0
  119. package/esm/components/index.d.ts +6 -1
  120. package/esm/components/index.js +6 -1
  121. package/esm/components/menu/GridMenu.js +7 -6
  122. package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
  123. package/esm/components/panel/GridPanel.js +18 -20
  124. package/esm/components/panel/GridPanelContent.js +6 -8
  125. package/esm/components/panel/GridPanelFooter.js +5 -6
  126. package/esm/components/panel/GridPanelHeader.js +4 -5
  127. package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
  128. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  129. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  130. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  131. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
  132. package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  133. package/esm/components/quickFilter/QuickFilter.d.ts +41 -0
  134. package/esm/components/quickFilter/QuickFilter.js +103 -0
  135. package/esm/components/quickFilter/QuickFilterClear.d.ts +28 -0
  136. package/esm/components/quickFilter/QuickFilterClear.js +154 -0
  137. package/esm/components/quickFilter/QuickFilterContext.d.ts +13 -0
  138. package/esm/components/quickFilter/QuickFilterContext.js +9 -0
  139. package/esm/components/quickFilter/QuickFilterControl.d.ts +28 -0
  140. package/esm/components/quickFilter/QuickFilterControl.js +97 -0
  141. package/esm/components/quickFilter/index.d.ts +3 -0
  142. package/esm/components/quickFilter/index.js +3 -0
  143. package/esm/components/toolbar/GridToolbar.d.ts +1 -1
  144. package/esm/components/toolbar/GridToolbar.js +2 -2
  145. package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
  146. package/esm/components/toolbar/GridToolbarQuickFilter.js +59 -97
  147. package/esm/components/toolbarV8/GridToolbar.d.ts +11 -0
  148. package/esm/components/toolbarV8/GridToolbar.js +135 -0
  149. package/esm/components/toolbarV8/Toolbar.d.ts +32 -0
  150. package/esm/components/toolbarV8/Toolbar.js +125 -0
  151. package/esm/components/toolbarV8/ToolbarButton.d.ts +23 -0
  152. package/esm/components/toolbarV8/ToolbarButton.js +172 -0
  153. package/esm/components/toolbarV8/ToolbarContext.d.ts +9 -0
  154. package/esm/components/toolbarV8/ToolbarContext.js +9 -0
  155. package/esm/components/toolbarV8/index.d.ts +2 -0
  156. package/esm/components/toolbarV8/index.js +2 -0
  157. package/esm/components/virtualization/GridVirtualScrollbar.js +10 -2
  158. package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  159. package/esm/constants/cssVariables.d.ts +294 -0
  160. package/esm/constants/cssVariables.js +161 -0
  161. package/esm/constants/dataGridPropsDefaultValues.js +1 -0
  162. package/esm/constants/defaultGridSlotsComponents.js +2 -1
  163. package/esm/constants/gridClasses.d.ts +17 -0
  164. package/esm/constants/gridClasses.js +1 -1
  165. package/esm/context/GridContextProvider.js +4 -1
  166. package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
  167. package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  168. package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
  169. package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  170. package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  171. package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
  172. package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  173. package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
  174. package/esm/hooks/features/columns/index.d.ts +1 -1
  175. package/esm/hooks/features/columns/index.js +1 -1
  176. package/esm/hooks/features/columns/useGridColumns.js +4 -2
  177. package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  178. package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
  179. package/esm/hooks/features/dataSource/index.d.ts +2 -0
  180. package/esm/hooks/features/dataSource/index.js +2 -0
  181. package/esm/hooks/features/dataSource/models.d.ts +1 -1
  182. package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  183. package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  184. package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
  185. package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
  186. package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
  187. package/esm/hooks/features/export/utils.js +4 -2
  188. package/esm/hooks/features/focus/useGridFocus.js +3 -2
  189. package/esm/hooks/features/index.d.ts +1 -1
  190. package/esm/hooks/features/index.js +1 -1
  191. package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  192. package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  193. package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
  194. package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
  195. package/esm/hooks/features/rowSelection/utils.js +11 -11
  196. package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  197. package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  198. package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
  199. package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
  200. package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  201. package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
  202. package/esm/hooks/features/rows/useGridRows.js +7 -7
  203. package/esm/hooks/features/rows/useGridRowsMeta.js +8 -0
  204. package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  205. package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -11
  206. package/esm/hooks/utils/index.d.ts +2 -1
  207. package/esm/hooks/utils/useGridComponentRenderer.d.ts +12 -0
  208. package/esm/hooks/utils/useGridComponentRenderer.js +36 -0
  209. package/esm/hooks/utils/useGridSelector.js +4 -1
  210. package/esm/hooks/utils/useIsSSR.js +4 -1
  211. package/esm/index.js +1 -1
  212. package/esm/internals/demo/TailwindDemoContainer.d.ts +11 -0
  213. package/esm/internals/demo/TailwindDemoContainer.js +55 -0
  214. package/esm/internals/demo/index.d.ts +1 -0
  215. package/esm/internals/demo/index.js +1 -0
  216. package/esm/internals/index.d.ts +6 -1
  217. package/esm/internals/index.js +5 -1
  218. package/esm/internals/utils/propValidation.js +1 -1
  219. package/esm/locales/bnBD.d.ts +2 -0
  220. package/esm/locales/bnBD.js +167 -0
  221. package/esm/locales/deDE.js +3 -5
  222. package/esm/locales/huHU.js +10 -13
  223. package/esm/locales/index.d.ts +1 -0
  224. package/esm/locales/index.js +1 -0
  225. package/esm/locales/ruRU.js +17 -21
  226. package/esm/material/icons/index.d.ts +3 -3
  227. package/esm/material/icons/index.js +6 -6
  228. package/esm/material/index.d.ts +1 -0
  229. package/esm/material/index.js +167 -52
  230. package/esm/material/variables.d.ts +5 -0
  231. package/esm/material/variables.js +89 -0
  232. package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
  233. package/esm/models/api/gridSortApi.d.ts +1 -1
  234. package/esm/models/configuration/gridConfiguration.d.ts +7 -1
  235. package/esm/models/gridBaseSlots.d.ts +61 -7
  236. package/esm/models/gridDataSource.d.ts +9 -4
  237. package/esm/models/gridIconSlotsComponent.d.ts +1 -1
  238. package/esm/models/gridRowSelectionManager.d.ts +9 -0
  239. package/esm/models/gridRowSelectionManager.js +36 -0
  240. package/esm/models/gridRowSelectionModel.d.ts +4 -2
  241. package/esm/models/gridSlotsComponent.d.ts +7 -28
  242. package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
  243. package/esm/models/gridSortModel.d.ts +1 -1
  244. package/esm/models/index.d.ts +2 -1
  245. package/esm/models/index.js +2 -3
  246. package/esm/models/props/DataGridProps.d.ts +22 -17
  247. package/esm/utils/css/context.d.ts +14 -0
  248. package/esm/utils/css/context.js +54 -0
  249. package/esm/utils/index.d.ts +2 -1
  250. package/esm/utils/index.js +1 -1
  251. package/hooks/features/clipboard/useGridClipboard.js +3 -2
  252. package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  253. package/hooks/features/columnResize/useGridColumnResize.js +28 -27
  254. package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  255. package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  256. package/hooks/features/columns/gridColumnsSelector.js +9 -1
  257. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  258. package/hooks/features/columns/gridColumnsUtils.js +6 -3
  259. package/hooks/features/columns/index.d.ts +1 -1
  260. package/hooks/features/columns/index.js +94 -10
  261. package/hooks/features/columns/useGridColumns.js +4 -2
  262. package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  263. package/hooks/features/dataSource/gridDataSourceError.js +40 -0
  264. package/hooks/features/dataSource/index.d.ts +2 -0
  265. package/hooks/features/dataSource/index.js +25 -0
  266. package/hooks/features/dataSource/models.d.ts +1 -1
  267. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  268. package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  269. package/hooks/features/dimensions/useGridDimensions.js +19 -18
  270. package/hooks/features/editing/useGridCellEditing.js +10 -9
  271. package/hooks/features/editing/useGridRowEditing.js +11 -10
  272. package/hooks/features/export/utils.js +4 -2
  273. package/hooks/features/focus/useGridFocus.js +8 -7
  274. package/hooks/features/index.d.ts +1 -1
  275. package/hooks/features/index.js +11 -28
  276. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  277. package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  278. package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
  279. package/hooks/features/rowSelection/utils.d.ts +2 -2
  280. package/hooks/features/rowSelection/utils.js +10 -10
  281. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  282. package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  283. package/hooks/features/rows/gridRowsUtils.js +10 -1
  284. package/hooks/features/rows/useGridParamsApi.js +2 -8
  285. package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  286. package/hooks/features/rows/useGridRows.d.ts +2 -2
  287. package/hooks/features/rows/useGridRows.js +7 -7
  288. package/hooks/features/rows/useGridRowsMeta.js +8 -0
  289. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  290. package/hooks/features/virtualization/useGridVirtualScroller.js +21 -27
  291. package/hooks/utils/index.d.ts +2 -1
  292. package/hooks/utils/useGridComponentRenderer.d.ts +12 -0
  293. package/hooks/utils/useGridComponentRenderer.js +44 -0
  294. package/hooks/utils/useGridSelector.js +6 -2
  295. package/hooks/utils/useIsSSR.js +6 -2
  296. package/index.js +1 -1
  297. package/internals/demo/TailwindDemoContainer.d.ts +11 -0
  298. package/internals/demo/TailwindDemoContainer.js +63 -0
  299. package/internals/demo/index.d.ts +1 -0
  300. package/internals/demo/index.js +12 -0
  301. package/internals/index.d.ts +6 -1
  302. package/internals/index.js +43 -0
  303. package/internals/utils/propValidation.js +1 -1
  304. package/locales/bnBD.d.ts +2 -0
  305. package/locales/bnBD.js +173 -0
  306. package/locales/deDE.js +3 -5
  307. package/locales/huHU.js +10 -13
  308. package/locales/index.d.ts +1 -0
  309. package/locales/index.js +11 -0
  310. package/locales/ruRU.js +17 -21
  311. package/material/icons/index.d.ts +3 -3
  312. package/material/icons/index.js +7 -7
  313. package/material/index.d.ts +1 -0
  314. package/material/index.js +172 -51
  315. package/material/variables.d.ts +5 -0
  316. package/material/variables.js +95 -0
  317. package/models/api/gridRowSelectionApi.d.ts +4 -2
  318. package/models/api/gridSortApi.d.ts +1 -1
  319. package/models/configuration/gridConfiguration.d.ts +7 -1
  320. package/models/gridBaseSlots.d.ts +61 -7
  321. package/models/gridDataSource.d.ts +9 -4
  322. package/models/gridIconSlotsComponent.d.ts +1 -1
  323. package/models/gridRowSelectionManager.d.ts +9 -0
  324. package/models/gridRowSelectionManager.js +43 -0
  325. package/models/gridRowSelectionModel.d.ts +4 -2
  326. package/models/gridSlotsComponent.d.ts +7 -28
  327. package/models/gridSlotsComponentsProps.d.ts +3 -11
  328. package/models/gridSortModel.d.ts +1 -1
  329. package/models/index.d.ts +2 -1
  330. package/models/index.js +34 -11
  331. package/models/props/DataGridProps.d.ts +22 -17
  332. package/modern/DataGrid/DataGrid.js +31 -22
  333. package/modern/DataGrid/useDataGridProps.js +1 -1
  334. package/modern/colDef/gridActionsColDef.js +1 -1
  335. package/modern/colDef/gridBooleanColDef.js +1 -1
  336. package/modern/colDef/gridCheckboxSelectionColDef.js +2 -4
  337. package/modern/components/GridFooter.js +2 -2
  338. package/modern/components/GridHeader.js +1 -1
  339. package/modern/components/GridPagination.js +5 -6
  340. package/modern/components/GridRowCount.js +4 -5
  341. package/modern/components/GridScrollArea.js +2 -1
  342. package/modern/components/GridSelectedRowCount.js +5 -6
  343. package/modern/components/GridShadowScrollArea.d.ts +8 -0
  344. package/modern/components/GridShadowScrollArea.js +74 -0
  345. package/modern/components/cell/GridEditInputCell.js +2 -3
  346. package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
  347. package/modern/components/columnsManagement/GridColumnsManagement.js +61 -62
  348. package/modern/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
  349. package/modern/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
  350. package/modern/components/columnsPanel/index.d.ts +1 -0
  351. package/modern/components/columnsPanel/index.js +1 -0
  352. package/modern/components/containers/GridOverlay.js +6 -8
  353. package/modern/components/containers/GridRoot.js +4 -2
  354. package/modern/components/containers/GridRootStyles.d.ts +1 -2
  355. package/modern/components/containers/GridRootStyles.js +78 -101
  356. package/modern/components/containers/GridToolbarContainer.js +5 -6
  357. package/modern/components/export/ExportCsv.d.ts +30 -0
  358. package/modern/components/export/ExportCsv.js +189 -0
  359. package/modern/components/export/ExportPrint.d.ts +30 -0
  360. package/modern/components/export/ExportPrint.js +189 -0
  361. package/modern/components/export/index.d.ts +2 -0
  362. package/modern/components/export/index.js +2 -0
  363. package/modern/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
  364. package/modern/components/filterPanel/FilterPanelTrigger.js +205 -0
  365. package/modern/components/filterPanel/index.d.ts +1 -0
  366. package/modern/components/filterPanel/index.js +1 -0
  367. package/modern/components/index.d.ts +6 -1
  368. package/modern/components/index.js +6 -1
  369. package/modern/components/menu/GridMenu.js +7 -6
  370. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
  371. package/modern/components/panel/GridPanel.js +18 -20
  372. package/modern/components/panel/GridPanelContent.js +6 -8
  373. package/modern/components/panel/GridPanelFooter.js +5 -6
  374. package/modern/components/panel/GridPanelHeader.js +4 -5
  375. package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
  376. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
  377. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
  378. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
  379. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
  380. package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
  381. package/modern/components/quickFilter/QuickFilter.d.ts +41 -0
  382. package/modern/components/quickFilter/QuickFilter.js +103 -0
  383. package/modern/components/quickFilter/QuickFilterClear.d.ts +28 -0
  384. package/modern/components/quickFilter/QuickFilterClear.js +154 -0
  385. package/modern/components/quickFilter/QuickFilterContext.d.ts +13 -0
  386. package/modern/components/quickFilter/QuickFilterContext.js +9 -0
  387. package/modern/components/quickFilter/QuickFilterControl.d.ts +28 -0
  388. package/modern/components/quickFilter/QuickFilterControl.js +97 -0
  389. package/modern/components/quickFilter/index.d.ts +3 -0
  390. package/modern/components/quickFilter/index.js +3 -0
  391. package/modern/components/toolbar/GridToolbar.d.ts +1 -1
  392. package/modern/components/toolbar/GridToolbar.js +2 -2
  393. package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
  394. package/modern/components/toolbar/GridToolbarQuickFilter.js +59 -97
  395. package/modern/components/toolbarV8/GridToolbar.d.ts +11 -0
  396. package/modern/components/toolbarV8/GridToolbar.js +135 -0
  397. package/modern/components/toolbarV8/Toolbar.d.ts +32 -0
  398. package/modern/components/toolbarV8/Toolbar.js +125 -0
  399. package/modern/components/toolbarV8/ToolbarButton.d.ts +23 -0
  400. package/modern/components/toolbarV8/ToolbarButton.js +172 -0
  401. package/modern/components/toolbarV8/ToolbarContext.d.ts +9 -0
  402. package/modern/components/toolbarV8/ToolbarContext.js +9 -0
  403. package/modern/components/toolbarV8/index.d.ts +2 -0
  404. package/modern/components/toolbarV8/index.js +2 -0
  405. package/modern/components/virtualization/GridVirtualScrollbar.js +10 -2
  406. package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
  407. package/modern/constants/cssVariables.d.ts +294 -0
  408. package/modern/constants/cssVariables.js +161 -0
  409. package/modern/constants/dataGridPropsDefaultValues.js +1 -0
  410. package/modern/constants/defaultGridSlotsComponents.js +2 -1
  411. package/modern/constants/gridClasses.d.ts +17 -0
  412. package/modern/constants/gridClasses.js +1 -1
  413. package/modern/context/GridContextProvider.js +4 -1
  414. package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
  415. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  416. package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
  417. package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
  418. package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
  419. package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
  420. package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
  421. package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
  422. package/modern/hooks/features/columns/index.d.ts +1 -1
  423. package/modern/hooks/features/columns/index.js +1 -1
  424. package/modern/hooks/features/columns/useGridColumns.js +4 -2
  425. package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
  426. package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
  427. package/modern/hooks/features/dataSource/index.d.ts +2 -0
  428. package/modern/hooks/features/dataSource/index.js +2 -0
  429. package/modern/hooks/features/dataSource/models.d.ts +1 -1
  430. package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  431. package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
  432. package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
  433. package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
  434. package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
  435. package/modern/hooks/features/export/utils.js +4 -2
  436. package/modern/hooks/features/focus/useGridFocus.js +3 -2
  437. package/modern/hooks/features/index.d.ts +1 -1
  438. package/modern/hooks/features/index.js +1 -1
  439. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  440. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
  441. package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
  442. package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
  443. package/modern/hooks/features/rowSelection/utils.js +11 -11
  444. package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
  445. package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  446. package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
  447. package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
  448. package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
  449. package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
  450. package/modern/hooks/features/rows/useGridRows.js +7 -7
  451. package/modern/hooks/features/rows/useGridRowsMeta.js +8 -0
  452. package/modern/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  453. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -11
  454. package/modern/hooks/utils/index.d.ts +2 -1
  455. package/modern/hooks/utils/useGridComponentRenderer.d.ts +12 -0
  456. package/modern/hooks/utils/useGridComponentRenderer.js +36 -0
  457. package/modern/hooks/utils/useGridSelector.js +4 -1
  458. package/modern/hooks/utils/useIsSSR.js +4 -1
  459. package/modern/index.js +1 -1
  460. package/modern/internals/demo/TailwindDemoContainer.d.ts +11 -0
  461. package/modern/internals/demo/TailwindDemoContainer.js +55 -0
  462. package/modern/internals/demo/index.d.ts +1 -0
  463. package/modern/internals/demo/index.js +1 -0
  464. package/modern/internals/index.d.ts +6 -1
  465. package/modern/internals/index.js +5 -1
  466. package/modern/internals/utils/propValidation.js +1 -1
  467. package/modern/locales/bnBD.d.ts +2 -0
  468. package/modern/locales/bnBD.js +167 -0
  469. package/modern/locales/deDE.js +3 -5
  470. package/modern/locales/huHU.js +10 -13
  471. package/modern/locales/index.d.ts +1 -0
  472. package/modern/locales/index.js +1 -0
  473. package/modern/locales/ruRU.js +17 -21
  474. package/modern/material/icons/index.d.ts +3 -3
  475. package/modern/material/icons/index.js +6 -6
  476. package/modern/material/index.d.ts +1 -0
  477. package/modern/material/index.js +167 -52
  478. package/modern/material/variables.d.ts +5 -0
  479. package/modern/material/variables.js +89 -0
  480. package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
  481. package/modern/models/api/gridSortApi.d.ts +1 -1
  482. package/modern/models/configuration/gridConfiguration.d.ts +7 -1
  483. package/modern/models/gridBaseSlots.d.ts +61 -7
  484. package/modern/models/gridDataSource.d.ts +9 -4
  485. package/modern/models/gridIconSlotsComponent.d.ts +1 -1
  486. package/modern/models/gridRowSelectionManager.d.ts +9 -0
  487. package/modern/models/gridRowSelectionManager.js +36 -0
  488. package/modern/models/gridRowSelectionModel.d.ts +4 -2
  489. package/modern/models/gridSlotsComponent.d.ts +7 -28
  490. package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
  491. package/modern/models/gridSortModel.d.ts +1 -1
  492. package/modern/models/index.d.ts +2 -1
  493. package/modern/models/index.js +2 -3
  494. package/modern/models/props/DataGridProps.d.ts +22 -17
  495. package/modern/utils/css/context.d.ts +14 -0
  496. package/modern/utils/css/context.js +54 -0
  497. package/modern/utils/index.d.ts +2 -1
  498. package/modern/utils/index.js +1 -1
  499. package/package.json +2 -2
  500. package/tsconfig.build.tsbuildinfo +1 -1
  501. package/utils/css/context.d.ts +14 -0
  502. package/utils/css/context.js +64 -0
  503. package/utils/index.d.ts +2 -1
  504. package/utils/index.js +8 -1
@@ -1,15 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import useEventCallback from '@mui/utils/useEventCallback';
3
4
  import { GridSignature } from "../../../constants/signature.js";
4
5
  import { useGridApiEventHandler } from "../../utils/useGridApiEventHandler.js";
5
6
  import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
6
7
  import { useGridLogger } from "../../utils/useGridLogger.js";
7
8
  import { useGridSelector } from "../../utils/useGridSelector.js";
8
9
  import { gridRowsLookupSelector, gridRowMaximumTreeDepthSelector, gridRowNodeSelector, gridRowTreeSelector } from "../rows/gridRowsSelector.js";
9
- import { gridRowSelectionStateSelector, selectedGridRowsSelector, selectedIdsLookupSelector } from "./gridRowSelectionSelector.js";
10
- import { gridPaginatedVisibleSortedGridRowIdsSelector } from "../pagination/index.js";
10
+ import { gridRowSelectionManagerSelector, gridRowSelectionStateSelector, gridRowSelectionCountSelector, gridRowSelectionIdsSelector } from "./gridRowSelectionSelector.js";
11
11
  import { gridFocusCellSelector } from "../focus/gridFocusStateSelector.js";
12
- import { gridExpandedSortedRowIdsSelector, gridFilteredRowsLookupSelector } from "../filter/gridFilterSelector.js";
12
+ import { gridExpandedSortedRowIdsSelector, gridFilteredRowsLookupSelector, gridFilterModelSelector, gridQuickFilterValuesSelector } from "../filter/gridFilterSelector.js";
13
13
  import { GRID_CHECKBOX_SELECTION_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from "../../../colDef/index.js";
14
14
  import { GridCellModes } from "../../../models/gridEditRowModel.js";
15
15
  import { isKeyboardEvent, isNavigationKey } from "../../../utils/keyboardUtils.js";
@@ -18,20 +18,14 @@ import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from "../../../internals/constants.js"
18
18
  import { gridClasses } from "../../../constants/gridClasses.js";
19
19
  import { isEventTargetInPortal } from "../../../utils/domUtils.js";
20
20
  import { isMultipleRowSelectionEnabled, findRowsToSelect, findRowsToDeselect } from "./utils.js";
21
- const getSelectionModelPropValue = (selectionModelProp, prevSelectionModel) => {
22
- if (selectionModelProp == null) {
23
- return selectionModelProp;
24
- }
25
- if (Array.isArray(selectionModelProp)) {
26
- return selectionModelProp;
27
- }
28
- if (prevSelectionModel && prevSelectionModel[0] === selectionModelProp) {
29
- return prevSelectionModel;
30
- }
31
- return [selectionModelProp];
21
+ import { createRowSelectionManager } from "../../../models/gridRowSelectionManager.js";
22
+ import { gridPaginatedVisibleSortedGridRowIdsSelector } from "../pagination/index.js";
23
+ const emptyModel = {
24
+ type: 'include',
25
+ ids: new Set()
32
26
  };
33
27
  export const rowSelectionStateInitializer = (state, props) => _extends({}, state, {
34
- rowSelection: props.rowSelection ? getSelectionModelPropValue(props.rowSelectionModel) ?? [] : []
28
+ rowSelection: props.rowSelection ? props.rowSelectionModel ?? emptyModel : emptyModel
35
29
  });
36
30
 
37
31
  /**
@@ -49,8 +43,8 @@ export const useGridRowSelection = (apiRef, props) => {
49
43
  }, [props.rowSelection]);
50
44
  const applyAutoSelection = props.signature !== GridSignature.DataGrid && (props.rowSelectionPropagation?.parents || props.rowSelectionPropagation?.descendants);
51
45
  const propRowSelectionModel = React.useMemo(() => {
52
- return getSelectionModelPropValue(props.rowSelectionModel, gridRowSelectionStateSelector(apiRef));
53
- }, [apiRef, props.rowSelectionModel]);
46
+ return props.rowSelectionModel;
47
+ }, [props.rowSelectionModel]);
54
48
  const lastRowToggled = React.useRef(null);
55
49
  apiRef.current.registerControlState({
56
50
  stateId: 'rowSelection',
@@ -90,23 +84,30 @@ export const useGridRowSelection = (apiRef, props) => {
90
84
  endId
91
85
  }, !isSelected);
92
86
  }, [apiRef]);
87
+ const getRowsToBeSelected = useEventCallback(() => {
88
+ const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
89
+ return rowsToBeSelected;
90
+ });
93
91
 
94
92
  /*
95
93
  * API METHODS
96
94
  */
97
95
  const setRowSelectionModel = React.useCallback(model => {
98
- if (props.signature === GridSignature.DataGrid && !canHaveMultipleSelection && Array.isArray(model) && model.length > 1) {
96
+ if (props.signature === GridSignature.DataGrid && !canHaveMultipleSelection && (model.type !== 'include' || model.ids.size > 1)) {
99
97
  throw new Error(['MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
100
98
  }
101
99
  const currentModel = gridRowSelectionStateSelector(apiRef);
102
100
  if (currentModel !== model) {
103
101
  logger.debug(`Setting selection model`);
104
102
  apiRef.current.setState(state => _extends({}, state, {
105
- rowSelection: props.rowSelection ? model : []
103
+ rowSelection: props.rowSelection ? model : emptyModel
106
104
  }));
107
105
  }
108
106
  }, [apiRef, logger, props.rowSelection, props.signature, canHaveMultipleSelection]);
109
- const isRowSelected = React.useCallback(id => gridRowSelectionStateSelector(apiRef).includes(id), [apiRef]);
107
+ const isRowSelected = React.useCallback(id => {
108
+ const selectionManager = gridRowSelectionManagerSelector(apiRef);
109
+ return selectionManager.has(id);
110
+ }, [apiRef]);
110
111
  const isRowSelectable = React.useCallback(id => {
111
112
  if (props.rowSelection === false) {
112
113
  return false;
@@ -120,7 +121,7 @@ export const useGridRowSelection = (apiRef, props) => {
120
121
  }
121
122
  return true;
122
123
  }, [apiRef, props.rowSelection, propIsRowSelectable]);
123
- const getSelectedRows = React.useCallback(() => selectedGridRowsSelector(apiRef), [apiRef]);
124
+ const getSelectedRows = React.useCallback(() => gridRowSelectionIdsSelector(apiRef), [apiRef]);
124
125
  const selectRow = React.useCallback((id, isSelected = true, resetSelection = false) => {
125
126
  if (!apiRef.current.isRowSelectable(id)) {
126
127
  return;
@@ -128,9 +129,12 @@ export const useGridRowSelection = (apiRef, props) => {
128
129
  lastRowToggled.current = id;
129
130
  if (resetSelection) {
130
131
  logger.debug(`Setting selection for row ${id}`);
131
- const newSelection = [];
132
+ const newSelectionModel = {
133
+ type: 'include',
134
+ ids: new Set()
135
+ };
132
136
  const addRow = rowId => {
133
- newSelection.push(rowId);
137
+ newSelectionModel.ids.add(rowId);
134
138
  };
135
139
  if (isSelected) {
136
140
  addRow(id);
@@ -138,17 +142,21 @@ export const useGridRowSelection = (apiRef, props) => {
138
142
  findRowsToSelect(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, addRow);
139
143
  }
140
144
  }
141
- apiRef.current.setRowSelectionModel(newSelection);
145
+ apiRef.current.setRowSelectionModel(newSelectionModel);
142
146
  } else {
143
147
  logger.debug(`Toggling selection for row ${id}`);
144
- const selection = gridRowSelectionStateSelector(apiRef);
145
- const newSelection = new Set(selection);
146
- newSelection.delete(id);
148
+ const selectionModel = gridRowSelectionStateSelector(apiRef);
149
+ const newSelectionModel = {
150
+ type: selectionModel.type,
151
+ ids: new Set(selectionModel.ids)
152
+ };
153
+ const selectionManager = createRowSelectionManager(newSelectionModel);
154
+ selectionManager.unselect(id);
147
155
  const addRow = rowId => {
148
- newSelection.add(rowId);
156
+ selectionManager.select(rowId);
149
157
  };
150
158
  const removeRow = rowId => {
151
- newSelection.delete(rowId);
159
+ selectionManager.unselect(rowId);
152
160
  };
153
161
  if (isSelected) {
154
162
  addRow(id);
@@ -158,45 +166,62 @@ export const useGridRowSelection = (apiRef, props) => {
158
166
  } else if (applyAutoSelection) {
159
167
  findRowsToDeselect(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, removeRow);
160
168
  }
161
- const isSelectionValid = newSelection.size < 2 || canHaveMultipleSelection;
169
+ const isSelectionValid = newSelectionModel.type === 'include' && newSelectionModel.ids.size < 2 || canHaveMultipleSelection;
162
170
  if (isSelectionValid) {
163
- apiRef.current.setRowSelectionModel(Array.from(newSelection));
171
+ apiRef.current.setRowSelectionModel(newSelectionModel);
164
172
  }
165
173
  }
166
174
  }, [apiRef, logger, applyAutoSelection, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, canHaveMultipleSelection]);
167
175
  const selectRows = React.useCallback((ids, isSelected = true, resetSelection = false) => {
168
176
  logger.debug(`Setting selection for several rows`);
169
- const selectableIds = ids.filter(id => apiRef.current.isRowSelectable(id));
170
- let newSelection;
177
+ if (props.rowSelection === false) {
178
+ return;
179
+ }
180
+ const selectableIds = new Set();
181
+ for (let i = 0; i < ids.length; i += 1) {
182
+ const id = ids[i];
183
+ if (apiRef.current.isRowSelectable(id)) {
184
+ selectableIds.add(id);
185
+ }
186
+ }
187
+ const currentSelectionModel = gridRowSelectionStateSelector(apiRef);
188
+ let newSelectionModel;
171
189
  if (resetSelection) {
190
+ newSelectionModel = {
191
+ type: 'include',
192
+ ids: selectableIds
193
+ };
172
194
  if (isSelected) {
173
- newSelection = new Set(selectableIds);
195
+ const selectionManager = createRowSelectionManager(newSelectionModel);
174
196
  if (applyAutoSelection) {
175
197
  const addRow = rowId => {
176
- newSelection.add(rowId);
198
+ selectionManager.select(rowId);
177
199
  };
178
- selectableIds.forEach(id => {
200
+ for (const id of selectableIds) {
179
201
  findRowsToSelect(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, addRow);
180
- });
202
+ }
181
203
  }
182
204
  } else {
183
- newSelection = new Set();
205
+ newSelectionModel.ids = new Set();
184
206
  }
185
- const currentLookup = selectedIdsLookupSelector(apiRef);
186
- if (newSelection.size === Object.keys(currentLookup).length && Array.from(newSelection).every(id => currentLookup[id] === id)) {
207
+ if (currentSelectionModel.type === newSelectionModel.type && newSelectionModel.ids.size === currentSelectionModel.ids.size && Array.from(newSelectionModel.ids).every(id => currentSelectionModel.ids.has(id))) {
187
208
  return;
188
209
  }
189
210
  } else {
190
- newSelection = new Set(Object.values(selectedIdsLookupSelector(apiRef)));
211
+ newSelectionModel = {
212
+ type: currentSelectionModel.type,
213
+ ids: new Set(currentSelectionModel.ids)
214
+ };
215
+ const selectionManager = createRowSelectionManager(newSelectionModel);
191
216
  const addRow = rowId => {
192
- newSelection.add(rowId);
217
+ selectionManager.select(rowId);
193
218
  };
194
219
  const removeRow = rowId => {
195
- newSelection.delete(rowId);
220
+ selectionManager.unselect(rowId);
196
221
  };
197
- selectableIds.forEach(id => {
222
+ for (const id of selectableIds) {
198
223
  if (isSelected) {
199
- newSelection.add(id);
224
+ selectionManager.select(id);
200
225
  if (applyAutoSelection) {
201
226
  findRowsToSelect(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, addRow);
202
227
  }
@@ -206,13 +231,13 @@ export const useGridRowSelection = (apiRef, props) => {
206
231
  findRowsToDeselect(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, removeRow);
207
232
  }
208
233
  }
209
- });
234
+ }
210
235
  }
211
- const isSelectionValid = newSelection.size < 2 || canHaveMultipleSelection;
236
+ const isSelectionValid = newSelectionModel.type === 'include' && newSelectionModel.ids.size < 2 || canHaveMultipleSelection;
212
237
  if (isSelectionValid) {
213
- apiRef.current.setRowSelectionModel(Array.from(newSelection));
238
+ apiRef.current.setRowSelectionModel(newSelectionModel);
214
239
  }
215
- }, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents]);
240
+ }, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, props.rowSelection]);
216
241
  const selectRowRange = React.useCallback(({
217
242
  startId,
218
243
  endId
@@ -251,57 +276,72 @@ export const useGridRowSelection = (apiRef, props) => {
251
276
  const currentSelection = gridRowSelectionStateSelector(apiRef);
252
277
  const rowsLookup = gridRowsLookupSelector(apiRef);
253
278
  const filteredRowsLookup = gridFilteredRowsLookupSelector(apiRef);
254
-
255
- // We clone the existing object to avoid mutating the same object returned by the selector to others part of the project
256
- const selectionLookup = _extends({}, selectedIdsLookupSelector(apiRef));
257
279
  const isNonExistent = id => {
258
280
  if (props.filterMode === 'server') {
259
281
  return !rowsLookup[id];
260
282
  }
261
283
  return !rowsLookup[id] || filteredRowsLookup[id] === false;
262
284
  };
285
+ const newSelectionModel = {
286
+ type: currentSelection.type,
287
+ ids: new Set(currentSelection.ids)
288
+ };
289
+ const selectionManager = createRowSelectionManager(newSelectionModel);
263
290
  let hasChanged = false;
264
- currentSelection.forEach(id => {
291
+ for (const id of currentSelection.ids) {
265
292
  if (isNonExistent(id)) {
266
293
  if (props.keepNonExistentRowsSelected) {
267
- return;
294
+ continue;
268
295
  }
269
- delete selectionLookup[id];
296
+ selectionManager.unselect(id);
270
297
  hasChanged = true;
271
- return;
298
+ continue;
272
299
  }
273
300
  if (!props.rowSelectionPropagation?.parents) {
274
- return;
301
+ continue;
275
302
  }
276
303
  const node = tree[id];
277
- if (node.type === 'group') {
304
+ if (node?.type === 'group') {
278
305
  const isAutoGenerated = node.isAutoGenerated;
279
306
  if (isAutoGenerated) {
280
- delete selectionLookup[id];
307
+ selectionManager.unselect(id);
281
308
  hasChanged = true;
282
- return;
309
+ continue;
283
310
  }
284
311
  // Keep previously selected tree data parents selected if all their children are filtered out
285
312
  if (!node.children.every(childId => filteredRowsLookup[childId] === false)) {
286
- delete selectionLookup[id];
313
+ selectionManager.unselect(id);
287
314
  hasChanged = true;
288
315
  }
289
316
  }
290
- });
317
+ }
291
318
 
292
319
  // For nested data, on row tree updation (filtering, adding rows, etc.) when the selection is
293
320
  // not empty, we need to re-run scanning of the tree to propagate the selection changes
294
321
  // Example: A parent whose de-selected children are filtered out should now be selected
295
- const shouldReapplyPropagation = isNestedData && props.rowSelectionPropagation?.parents && Object.keys(selectionLookup).length > 0;
322
+ const shouldReapplyPropagation = isNestedData && props.rowSelectionPropagation?.parents && (newSelectionModel.ids.size > 0 ||
323
+ // In case of exclude selection, newSelectionModel.ids.size === 0 means all rows are selected
324
+ newSelectionModel.type === 'exclude');
296
325
  if (hasChanged || shouldReapplyPropagation && !sortModelUpdated) {
297
- const newSelection = Object.values(selectionLookup);
298
326
  if (shouldReapplyPropagation) {
299
- apiRef.current.selectRows(newSelection, true, true);
327
+ if (newSelectionModel.type === 'exclude') {
328
+ const unfilteredSelectedRowIds = getRowsToBeSelected();
329
+ const selectedRowIds = [];
330
+ for (let i = 0; i < unfilteredSelectedRowIds.length; i += 1) {
331
+ const rowId = unfilteredSelectedRowIds[i];
332
+ if ((props.keepNonExistentRowsSelected || !isNonExistent(rowId)) && selectionManager.has(rowId)) {
333
+ selectedRowIds.push(rowId);
334
+ }
335
+ }
336
+ apiRef.current.selectRows(selectedRowIds, true, true);
337
+ } else {
338
+ apiRef.current.selectRows(Array.from(newSelectionModel.ids), true, true);
339
+ }
300
340
  } else {
301
- apiRef.current.setRowSelectionModel(newSelection);
341
+ apiRef.current.setRowSelectionModel(newSelectionModel);
302
342
  }
303
343
  }
304
- }, [apiRef, isNestedData, props.rowSelectionPropagation?.parents, props.keepNonExistentRowsSelected, props.filterMode, tree]);
344
+ }, [apiRef, isNestedData, props.rowSelectionPropagation?.parents, props.keepNonExistentRowsSelected, props.filterMode, tree, getRowsToBeSelected]);
305
345
  const handleSingleRowSelection = React.useCallback((id, event) => {
306
346
  const hasCtrlKey = event.metaKey || event.ctrlKey;
307
347
 
@@ -312,7 +352,7 @@ export const useGridRowSelection = (apiRef, props) => {
312
352
 
313
353
  const isMultipleSelectionDisabled = !checkboxSelection && !hasCtrlKey && !isKeyboardEvent(event);
314
354
  const resetSelection = !canHaveMultipleSelection || isMultipleSelectionDisabled;
315
- const selectedRowsCount = apiRef.current.getSelectedRows().size;
355
+ const selectedRowsCount = gridRowSelectionCountSelector(apiRef);
316
356
  if (canHaveMultipleSelection && selectedRowsCount > 1 && !hasCtrlKey) {
317
357
  apiRef.current.selectRow(id, true, resetSelection);
318
358
  } else {
@@ -361,10 +401,22 @@ export const useGridRowSelection = (apiRef, props) => {
361
401
  apiRef.current.selectRow(params.id, params.value, !canHaveMultipleSelection);
362
402
  }
363
403
  }, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);
404
+ const toggleAllRows = React.useCallback(value => {
405
+ const filterModel = gridFilterModelSelector(apiRef);
406
+ const quickFilterModel = gridQuickFilterValuesSelector(apiRef);
407
+ const hasFilters = filterModel.items.length > 0 || (quickFilterModel?.length || 0) > 0;
408
+ if (!props.isRowSelectable && !props.checkboxSelectionVisibleOnly && applyAutoSelection && !hasFilters) {
409
+ apiRef.current.setRowSelectionModel({
410
+ type: value ? 'exclude' : 'include',
411
+ ids: new Set()
412
+ });
413
+ } else {
414
+ apiRef.current.selectRows(getRowsToBeSelected(), value);
415
+ }
416
+ }, [apiRef, applyAutoSelection, getRowsToBeSelected, props.checkboxSelectionVisibleOnly, props.isRowSelectable]);
364
417
  const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
365
- const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
366
- apiRef.current.selectRows(rowsToBeSelected, params.value);
367
- }, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);
418
+ toggleAllRows(params.value);
419
+ }, [toggleAllRows]);
368
420
  const handleCellKeyDown = React.useCallback((params, event) => {
369
421
  // Get the most recent cell mode because it may have been changed by another listener
370
422
  if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {
@@ -413,7 +465,10 @@ export const useGridRowSelection = (apiRef, props) => {
413
465
  }
414
466
  }
415
467
  const visibleRows = getVisibleRows(apiRef);
416
- const rowsBetweenStartAndEnd = visibleRows.rows.slice(start, end + 1).map(row => row.id);
468
+ const rowsBetweenStartAndEnd = [];
469
+ for (let i = start; i <= end; i += 1) {
470
+ rowsBetweenStartAndEnd.push(visibleRows.rows[i].id);
471
+ }
417
472
  apiRef.current.selectRows(rowsBetweenStartAndEnd, !isNextRowSelected);
418
473
  return;
419
474
  }
@@ -425,9 +480,9 @@ export const useGridRowSelection = (apiRef, props) => {
425
480
  }
426
481
  if (String.fromCharCode(event.keyCode) === 'A' && (event.ctrlKey || event.metaKey)) {
427
482
  event.preventDefault();
428
- selectRows(apiRef.current.getAllRowIds(), true);
483
+ toggleAllRows(true);
429
484
  }
430
- }, [apiRef, handleSingleRowSelection, selectRows, canHaveMultipleSelection]);
485
+ }, [apiRef, canHaveMultipleSelection, handleSingleRowSelection, toggleAllRows]);
431
486
  useGridApiEventHandler(apiRef, 'sortedRowsSet', runIfRowSelectionIsEnabled(() => removeOutdatedSelection(true)));
432
487
  useGridApiEventHandler(apiRef, 'filteredRowsSet', runIfRowSelectionIsEnabled(removeOutdatedSelection));
433
488
  useGridApiEventHandler(apiRef, 'rowClick', runIfRowSelectionIsEnabled(handleRowClick));
@@ -446,7 +501,7 @@ export const useGridRowSelection = (apiRef, props) => {
446
501
  }, [apiRef, propRowSelectionModel, props.rowSelection]);
447
502
  React.useEffect(() => {
448
503
  if (!props.rowSelection) {
449
- apiRef.current.setRowSelectionModel([]);
504
+ apiRef.current.setRowSelectionModel(emptyModel);
450
505
  }
451
506
  }, [apiRef, props.rowSelection]);
452
507
  const isStateControlled = propRowSelectionModel != null;
@@ -457,10 +512,22 @@ export const useGridRowSelection = (apiRef, props) => {
457
512
 
458
513
  // props.isRowSelectable changed
459
514
  const currentSelection = gridRowSelectionStateSelector(apiRef);
460
- if (isRowSelectable) {
461
- const newSelection = currentSelection.filter(id => isRowSelectable(id));
462
- if (newSelection.length < currentSelection.length) {
463
- apiRef.current.setRowSelectionModel(newSelection);
515
+ if (typeof isRowSelectable === 'function') {
516
+ let selectableIds = new Set();
517
+ if (currentSelection.type === 'include') {
518
+ for (const id of currentSelection.ids) {
519
+ if (isRowSelectable(id)) {
520
+ selectableIds.add(id);
521
+ }
522
+ }
523
+ } else {
524
+ selectableIds = new Set(currentSelection.ids);
525
+ }
526
+ if (currentSelection.type === 'include' && selectableIds.size < currentSelection.ids.size) {
527
+ apiRef.current.setRowSelectionModel({
528
+ type: currentSelection.type,
529
+ ids: selectableIds
530
+ });
464
531
  }
465
532
  }
466
533
  }, [apiRef, isRowSelectable, isStateControlled, props.rowSelection]);
@@ -469,9 +536,9 @@ export const useGridRowSelection = (apiRef, props) => {
469
536
  return;
470
537
  }
471
538
  const currentSelection = gridRowSelectionStateSelector(apiRef);
472
- if (!canHaveMultipleSelection && currentSelection.length > 1) {
539
+ if (!canHaveMultipleSelection && (currentSelection.type === 'include' && currentSelection.ids.size > 1 || currentSelection.type === 'exclude')) {
473
540
  // See https://github.com/mui/mui-x/issues/8455
474
- apiRef.current.setRowSelectionModel([]);
541
+ apiRef.current.setRowSelectionModel(emptyModel);
475
542
  }
476
543
  }, [apiRef, canHaveMultipleSelection, checkboxSelection, isStateControlled, props.rowSelection]);
477
544
  React.useEffect(() => {
@@ -2,9 +2,9 @@ import { RefObject } from '@mui/x-internals/types';
2
2
  import type { GridRowId, GridRowTreeConfig } from '../../../models/gridRows';
3
3
  import type { DataGridProcessedProps } from '../../../models/props/DataGridProps';
4
4
  import type { GridPrivateApiCommunity } from '../../../models/api/gridApiCommunity';
5
- import type { GridRowSelectionPropagation } from '../../../models/gridRowSelectionModel';
5
+ import { type GridRowSelectionPropagation } from "../../../models/gridRowSelectionModel.js";
6
6
  export declare const ROW_SELECTION_PROPAGATION_DEFAULT: GridRowSelectionPropagation;
7
- export declare function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents: boolean): import("../../..").OutputSelector<import("../../../models/gridStateCommunity").GridStateCommunity, Record<GridRowId, GridRowId>, {
7
+ export declare function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents: boolean): import("../../..").OutputSelector<import("../../../models/gridStateCommunity").GridStateCommunity, import("../../../models/gridRowSelectionManager").RowSelectionManager, {
8
8
  isIndeterminate: boolean;
9
9
  isChecked: boolean;
10
10
  }>;
@@ -2,7 +2,7 @@ import { GridSignature } from "../../../constants/signature.js";
2
2
  import { GRID_ROOT_GROUP_ID } from "../rows/gridRowsUtils.js";
3
3
  import { gridFilteredRowsLookupSelector } from "../filter/gridFilterSelector.js";
4
4
  import { gridSortedRowIdsSelector } from "../sorting/gridSortingSelector.js";
5
- import { selectedIdsLookupSelector } from "./gridRowSelectionSelector.js";
5
+ import { gridRowSelectionManagerSelector } from "./gridRowSelectionSelector.js";
6
6
  import { gridRowTreeSelector } from "../rows/gridRowsSelector.js";
7
7
  import { createSelector } from "../../../utils/createSelector.js";
8
8
  export const ROW_SELECTION_PROPAGATION_DEFAULT = {
@@ -30,15 +30,15 @@ function getGridRowGroupSelectableDescendants(apiRef, groupId) {
30
30
 
31
31
  // TODO v8: Use `createSelectorV8`
32
32
  export function getCheckboxPropsSelector(groupId, autoSelectParents) {
33
- return createSelector(gridRowTreeSelector, gridSortedRowIdsSelector, gridFilteredRowsLookupSelector, selectedIdsLookupSelector, (rowTree, sortedRowIds, filteredRowsLookup, rowSelectionLookup) => {
33
+ return createSelector(gridRowTreeSelector, gridSortedRowIdsSelector, gridFilteredRowsLookupSelector, gridRowSelectionManagerSelector, (rowTree, sortedRowIds, filteredRowsLookup, rowSelectionManager) => {
34
34
  const groupNode = rowTree[groupId];
35
35
  if (!groupNode || groupNode.type !== 'group') {
36
36
  return {
37
37
  isIndeterminate: false,
38
- isChecked: rowSelectionLookup[groupId] === groupId
38
+ isChecked: rowSelectionManager.has(groupId)
39
39
  };
40
40
  }
41
- if (rowSelectionLookup[groupId] === groupId) {
41
+ if (rowSelectionManager.has(groupId)) {
42
42
  return {
43
43
  isIndeterminate: false,
44
44
  isChecked: true
@@ -51,14 +51,14 @@ export function getCheckboxPropsSelector(groupId, autoSelectParents) {
51
51
  const id = sortedRowIds[index];
52
52
  if (filteredRowsLookup[id] !== false) {
53
53
  selectableDescendantsCount += 1;
54
- if (rowSelectionLookup[id] !== undefined) {
54
+ if (rowSelectionManager.has(id)) {
55
55
  selectedDescendantsCount += 1;
56
56
  }
57
57
  }
58
58
  }
59
59
  return {
60
- isIndeterminate: selectedDescendantsCount > 0 && (selectedDescendantsCount < selectableDescendantsCount || rowSelectionLookup[groupId] === undefined),
61
- isChecked: autoSelectParents ? selectedDescendantsCount > 0 : rowSelectionLookup[groupId] === groupId
60
+ isIndeterminate: selectedDescendantsCount > 0 && (selectedDescendantsCount < selectableDescendantsCount || !rowSelectionManager.has(groupId)),
61
+ isChecked: autoSelectParents ? selectedDescendantsCount > 0 : rowSelectionManager.has(groupId)
62
62
  };
63
63
  });
64
64
  }
@@ -96,7 +96,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
96
96
  };
97
97
  export const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow) => {
98
98
  const filteredRows = gridFilteredRowsLookupSelector(apiRef);
99
- const selectedIdsLookup = selectedIdsLookupSelector(apiRef);
99
+ const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
100
100
  const selectedDescendants = new Set([]);
101
101
  if (!autoSelectDescendants && !autoSelectParents) {
102
102
  return;
@@ -113,7 +113,7 @@ export const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendant
113
113
  }
114
114
  if (autoSelectParents) {
115
115
  const checkAllDescendantsSelected = rowId => {
116
- if (selectedIdsLookup[rowId] !== rowId && !selectedDescendants.has(rowId)) {
116
+ if (!rowSelectionManager.has(rowId) && !selectedDescendants.has(rowId)) {
117
117
  return false;
118
118
  }
119
119
  const node = tree[rowId];
@@ -138,14 +138,14 @@ export const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendant
138
138
  }
139
139
  };
140
140
  export const findRowsToDeselect = (apiRef, tree, deselectedRow, autoSelectDescendants, autoSelectParents, removeRow) => {
141
- const selectedIdsLookup = selectedIdsLookupSelector(apiRef);
141
+ const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
142
142
  if (!autoSelectParents && !autoSelectDescendants) {
143
143
  return;
144
144
  }
145
145
  if (autoSelectParents) {
146
146
  const allParents = getRowNodeParents(tree, deselectedRow);
147
147
  allParents.forEach(parent => {
148
- const isSelected = selectedIdsLookup[parent] === parent;
148
+ const isSelected = rowSelectionManager.has(parent);
149
149
  if (isSelected) {
150
150
  removeRow(parent);
151
151
  }
@@ -61,7 +61,7 @@ export interface GridRowsState {
61
61
  /**
62
62
  * Contains some values of type `GridRowId` that have been requested to be fetched
63
63
  * either by `defaultGroupingExpansionDepth` or `isGroupExpandedByDefault` props.
64
- * Applicable with server-side grouped data and `unstable_dataSource` only.
64
+ * Applicable with server-side grouped data and `dataSource` only.
65
65
  */
66
66
  groupsToFetch?: GridRowId[];
67
67
  }
@@ -1,5 +1,5 @@
1
1
  import { RefObject } from '@mui/x-internals/types';
2
- import { GridAutoGeneratedGroupNode, GridAutoGeneratedPinnedRowNode, GridFooterNode, GridGroupNode, GridRowId, GridRowIdGetter, GridRowModel, GridRowModelUpdate, GridRowTreeConfig, GridSkeletonRowNode, GridTreeNode } from "../../../models/index.js";
2
+ import { GridAutoGeneratedGroupNode, GridAutoGeneratedPinnedRowNode, GridColDef, GridFooterNode, GridGroupNode, GridRowId, GridRowIdGetter, GridRowModel, GridRowModelUpdate, GridRowTreeConfig, GridSkeletonRowNode, GridTreeNode, GridValidRowModel } from "../../../models/index.js";
3
3
  import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
4
4
  import { GridApiCommunity, GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
5
5
  import { GridRowsInternalCache, GridRowsState, GridRowTreeCreationParams } from "./gridRowsInterfaces.js";
@@ -14,6 +14,7 @@ export declare const buildRootGroup: () => GridGroupNode;
14
14
  */
15
15
  export declare function checkGridRowIdIsValid(id: GridRowId, row: GridRowModel | Partial<GridRowModel>, detailErrorMessage?: string): void;
16
16
  export declare const getRowIdFromRowModel: (rowModel: GridRowModel, getRowId?: GridRowIdGetter, detailErrorMessage?: string) => GridRowId;
17
+ export declare const getRowValue: (row: GridValidRowModel, colDef: GridColDef, apiRef: RefObject<GridApiCommunity>) => any;
17
18
  export declare const createRowsInternalCache: ({
18
19
  rows,
19
20
  getRowId,
@@ -31,6 +31,14 @@ export const getRowIdFromRowModel = (rowModel, getRowId, detailErrorMessage) =>
31
31
  checkGridRowIdIsValid(id, rowModel, detailErrorMessage);
32
32
  return id;
33
33
  };
34
+ export const getRowValue = (row, colDef, apiRef) => {
35
+ const field = colDef.field;
36
+ if (!colDef || !colDef.valueGetter) {
37
+ return row[field];
38
+ }
39
+ const value = row[colDef.field];
40
+ return colDef.valueGetter(value, row, colDef, apiRef);
41
+ };
34
42
  export const createRowsInternalCache = ({
35
43
  rows,
36
44
  getRowId,
@@ -4,6 +4,7 @@ import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
4
4
  import { gridFocusCellSelector, gridTabIndexCellSelector } from "../focus/gridFocusStateSelector.js";
5
5
  import { gridListColumnSelector } from "../listView/gridListViewSelectors.js";
6
6
  import { gridRowNodeSelector } from "./gridRowsSelector.js";
7
+ import { getRowValue as getRowValueFn } from "./gridRowsUtils.js";
7
8
  export class MissingRowIdError extends Error {}
8
9
 
9
10
  /**
@@ -88,14 +89,7 @@ export function useGridParamsApi(apiRef, props) {
88
89
  }
89
90
  return colDef.valueGetter(row[colDef.field], row, colDef, apiRef);
90
91
  }, [apiRef]);
91
- const getRowValue = React.useCallback((row, colDef) => {
92
- const field = colDef.field;
93
- if (!colDef || !colDef.valueGetter) {
94
- return row[field];
95
- }
96
- const value = row[colDef.field];
97
- return colDef.valueGetter(value, row, colDef, apiRef);
98
- }, [apiRef]);
92
+ const getRowValue = React.useCallback((row, colDef) => getRowValueFn(row, colDef, apiRef), [apiRef]);
99
93
  const getRowFormattedValue = React.useCallback((row, colDef) => {
100
94
  const value = getRowValue(row, colDef);
101
95
  if (!colDef || !colDef.valueFormatter) {
@@ -1,19 +1,17 @@
1
1
  import * as React from 'react';
2
- import { selectedIdsLookupSelector } from "../rowSelection/index.js";
3
2
  import { useGridSelector } from "../../utils/useGridSelector.js";
4
3
  import { gridColumnGroupsHeaderMaxDepthSelector } from "../columnGrouping/gridColumnGroupsSelector.js";
5
4
  import { useGridPrivateApiContext } from "../../utils/useGridPrivateApiContext.js";
6
5
  export const useGridRowAriaAttributes = () => {
7
6
  const apiRef = useGridPrivateApiContext();
8
- const selectedIdsLookup = useGridSelector(apiRef, selectedIdsLookupSelector);
9
7
  const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
10
8
  return React.useCallback((rowNode, index) => {
11
9
  const ariaAttributes = {};
12
10
  const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
13
11
  ariaAttributes['aria-rowindex'] = ariaRowIndex;
14
12
  if (apiRef.current.isRowSelectable(rowNode.id)) {
15
- ariaAttributes['aria-selected'] = selectedIdsLookup[rowNode.id] !== undefined;
13
+ ariaAttributes['aria-selected'] = apiRef.current.isRowSelected(rowNode.id);
16
14
  }
17
15
  return ariaAttributes;
18
- }, [apiRef, selectedIdsLookup, headerGroupingMaxDepth]);
16
+ }, [apiRef, headerGroupingMaxDepth]);
19
17
  };
@@ -2,5 +2,5 @@ import { RefObject } from '@mui/x-internals/types';
2
2
  import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
3
3
  import { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
4
4
  import { GridStateInitializer } from "../../utils/useGridInitializeState.js";
5
- export declare const rowsStateInitializer: GridStateInitializer<Pick<DataGridProcessedProps, 'unstable_dataSource' | 'rows' | 'rowCount' | 'getRowId' | 'loading'>>;
6
- export declare const useGridRows: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "rows" | "getRowId" | "rowCount" | "throttleRowsMs" | "signature" | "pagination" | "paginationMode" | "loading" | "unstable_dataSource">) => void;
5
+ export declare const rowsStateInitializer: GridStateInitializer<Pick<DataGridProcessedProps, 'dataSource' | 'rows' | 'rowCount' | 'getRowId' | 'loading'>>;
6
+ export declare const useGridRows: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "rows" | "getRowId" | "rowCount" | "throttleRowsMs" | "signature" | "pagination" | "paginationMode" | "loading" | "dataSource">) => void;