@mui/x-data-grid 6.0.0-alpha.2 → 6.0.0-alpha.4

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 (293) hide show
  1. package/CHANGELOG.md +493 -141
  2. package/DataGrid/DataGrid.js +14 -34
  3. package/DataGrid/useDataGridComponent.js +8 -14
  4. package/DataGrid/useDataGridProps.js +3 -3
  5. package/colDef/gridCheckboxSelectionColDef.js +1 -1
  6. package/colDef/gridNumericOperators.d.ts +1 -1
  7. package/colDef/gridSingleSelectOperators.d.ts +1 -1
  8. package/colDef/gridStringOperators.d.ts +1 -1
  9. package/components/GridFooter.js +1 -1
  10. package/components/GridRow.js +2 -2
  11. package/components/base/GridBody.js +2 -2
  12. package/components/cell/GridEditInputCell.js +3 -8
  13. package/components/cell/GridEditSingleSelectCell.js +6 -38
  14. package/components/columnHeaders/GridColumnGroupHeader.d.ts +2 -0
  15. package/components/columnHeaders/GridColumnGroupHeader.js +32 -5
  16. package/components/columnSelection/GridHeaderCheckbox.js +3 -3
  17. package/components/containers/GridRoot.js +4 -3
  18. package/components/panel/GridColumnsPanel.d.ts +2 -0
  19. package/components/panel/GridColumnsPanel.js +10 -4
  20. package/components/panel/filterPanel/GridFilterForm.d.ts +12 -0
  21. package/components/panel/filterPanel/GridFilterForm.js +29 -7
  22. package/components/panel/filterPanel/GridFilterPanel.d.ts +12 -0
  23. package/components/panel/filterPanel/GridFilterPanel.js +64 -19
  24. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +1 -1
  25. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +1 -1
  26. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +1 -1
  27. package/hooks/core/useGridInitialization.d.ts +1 -1
  28. package/hooks/core/useGridStateInitialization.d.ts +1 -1
  29. package/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +10 -1
  30. package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +6 -0
  31. package/hooks/features/columnGrouping/gridColumnGroupsSelector.js +34 -1
  32. package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +15 -0
  33. package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +89 -0
  34. package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -15
  35. package/hooks/features/columnGrouping/useGridColumnGrouping.js +66 -66
  36. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
  37. package/hooks/features/columnHeaders/useGridColumnHeaders.js +60 -116
  38. package/hooks/features/density/densitySelector.d.ts +0 -2
  39. package/hooks/features/density/densitySelector.js +1 -3
  40. package/hooks/features/density/densityState.d.ts +0 -1
  41. package/hooks/features/density/useGridDensity.d.ts +1 -1
  42. package/hooks/features/density/useGridDensity.js +9 -45
  43. package/hooks/features/dimensions/useGridDimensions.js +3 -2
  44. package/hooks/features/{editRows/gridEditRowsSelector.d.ts → editing/gridEditingSelectors.d.ts} +0 -0
  45. package/hooks/features/{editRows/gridEditRowsSelector.js → editing/gridEditingSelectors.js} +0 -0
  46. package/hooks/features/editing/index.d.ts +1 -0
  47. package/hooks/features/editing/index.js +1 -0
  48. package/hooks/features/{editRows/useGridCellEditing.new.d.ts → editing/useGridCellEditing.d.ts} +0 -0
  49. package/hooks/features/{editRows/useGridCellEditing.new.js → editing/useGridCellEditing.js} +21 -6
  50. package/hooks/features/{editRows/useGridEditing.new.d.ts → editing/useGridEditing.d.ts} +0 -0
  51. package/hooks/features/{editRows/useGridEditing.new.js → editing/useGridEditing.js} +3 -3
  52. package/hooks/features/{editRows/useGridRowEditing.new.d.ts → editing/useGridRowEditing.d.ts} +0 -0
  53. package/hooks/features/{editRows/useGridRowEditing.new.js → editing/useGridRowEditing.js} +20 -6
  54. package/hooks/features/export/useGridPrintExport.js +2 -2
  55. package/hooks/features/focus/gridFocusState.d.ts +6 -0
  56. package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -0
  57. package/hooks/features/focus/gridFocusStateSelector.js +6 -2
  58. package/hooks/features/focus/useGridFocus.js +69 -11
  59. package/hooks/features/index.d.ts +2 -2
  60. package/hooks/features/index.js +2 -2
  61. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +135 -1
  62. package/hooks/features/{selection/gridSelectionSelector.d.ts → rowSelection/gridRowSelectionSelector.d.ts} +1 -1
  63. package/hooks/features/rowSelection/gridRowSelectionSelector.js +9 -0
  64. package/hooks/features/rowSelection/index.d.ts +1 -0
  65. package/hooks/features/rowSelection/index.js +1 -0
  66. package/hooks/features/rowSelection/useGridRowSelection.d.ts +12 -0
  67. package/hooks/features/{selection/useGridSelection.js → rowSelection/useGridRowSelection.js} +37 -37
  68. package/hooks/features/{selection/useGridSelectionPreProcessors.d.ts → rowSelection/useGridRowSelectionPreProcessors.d.ts} +1 -1
  69. package/hooks/features/{selection/useGridSelectionPreProcessors.js → rowSelection/useGridRowSelectionPreProcessors.js} +1 -1
  70. package/hooks/features/rows/gridRowsInterfaces.d.ts +4 -0
  71. package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
  72. package/hooks/features/rows/gridRowsUtils.js +5 -2
  73. package/hooks/features/rows/useGridRows.js +23 -7
  74. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  75. package/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
  76. package/hooks/utils/useGridApi.d.ts +1 -1
  77. package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
  78. package/hooks/utils/useGridApiRef.d.ts +1 -1
  79. package/hooks/utils/useGridInitializeState.d.ts +1 -1
  80. package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
  81. package/hooks/utils/useGridSelector.d.ts +1 -1
  82. package/hooks/utils/useGridState.d.ts +1 -1
  83. package/hooks/utils/useGridVisibleRows.d.ts +2 -2
  84. package/index.js +1 -1
  85. package/internals/index.d.ts +3 -5
  86. package/internals/index.js +3 -5
  87. package/legacy/DataGrid/DataGrid.js +14 -34
  88. package/legacy/DataGrid/useDataGridComponent.js +8 -14
  89. package/legacy/DataGrid/useDataGridProps.js +3 -3
  90. package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -1
  91. package/legacy/components/GridFooter.js +1 -1
  92. package/legacy/components/GridRow.js +2 -2
  93. package/legacy/components/base/GridBody.js +2 -2
  94. package/legacy/components/cell/GridEditInputCell.js +3 -8
  95. package/legacy/components/cell/GridEditSingleSelectCell.js +6 -52
  96. package/legacy/components/columnHeaders/GridColumnGroupHeader.js +46 -13
  97. package/legacy/components/columnSelection/GridHeaderCheckbox.js +3 -3
  98. package/legacy/components/containers/GridRoot.js +4 -3
  99. package/legacy/components/panel/GridColumnsPanel.js +10 -3
  100. package/legacy/components/panel/filterPanel/GridFilterForm.js +31 -7
  101. package/legacy/components/panel/filterPanel/GridFilterPanel.js +67 -18
  102. package/legacy/hooks/features/columnGrouping/gridColumnGroupsSelector.js +33 -1
  103. package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +96 -0
  104. package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +64 -64
  105. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +70 -122
  106. package/legacy/hooks/features/density/densitySelector.js +0 -6
  107. package/legacy/hooks/features/density/useGridDensity.js +6 -44
  108. package/legacy/hooks/features/dimensions/useGridDimensions.js +3 -2
  109. package/legacy/hooks/features/{editRows/gridEditRowsSelector.js → editing/gridEditingSelectors.js} +0 -0
  110. package/legacy/hooks/features/editing/index.js +1 -0
  111. package/legacy/hooks/features/{editRows/useGridCellEditing.new.js → editing/useGridCellEditing.js} +21 -6
  112. package/legacy/hooks/features/{editRows/useGridEditing.new.js → editing/useGridEditing.js} +3 -3
  113. package/legacy/hooks/features/{editRows/useGridRowEditing.new.js → editing/useGridRowEditing.js} +20 -6
  114. package/legacy/hooks/features/export/useGridPrintExport.js +2 -2
  115. package/legacy/hooks/features/focus/gridFocusStateSelector.js +8 -0
  116. package/legacy/hooks/features/focus/useGridFocus.js +72 -11
  117. package/legacy/hooks/features/index.js +2 -2
  118. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +129 -1
  119. package/legacy/hooks/features/rowSelection/gridRowSelectionSelector.js +19 -0
  120. package/legacy/hooks/features/rowSelection/index.js +1 -0
  121. package/legacy/hooks/features/{selection/useGridSelection.js → rowSelection/useGridRowSelection.js} +37 -37
  122. package/legacy/hooks/features/{selection/useGridSelectionPreProcessors.js → rowSelection/useGridRowSelectionPreProcessors.js} +1 -1
  123. package/legacy/hooks/features/rows/gridRowsUtils.js +5 -2
  124. package/legacy/hooks/features/rows/useGridRows.js +25 -7
  125. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
  126. package/legacy/index.js +1 -1
  127. package/legacy/internals/index.js +3 -5
  128. package/legacy/locales/trTR.js +17 -17
  129. package/legacy/models/api/{gridSelectionApi.js → gridRowSelectionApi.js} +0 -0
  130. package/legacy/models/api/index.js +1 -1
  131. package/legacy/models/{gridSelectionModel.js → gridRowSelectionModel.js} +0 -0
  132. package/legacy/models/index.js +1 -1
  133. package/{models/api/gridSelectionApi.js → legacy/models/params/gridColumnGroupHeaderParams.js} +0 -0
  134. package/legacy/models/params/gridEditCellParams.js +0 -4
  135. package/legacy/models/params/index.js +1 -0
  136. package/locales/trTR.js +17 -17
  137. package/models/api/gridApiCommon.d.ts +3 -6
  138. package/models/api/gridApiCommunity.d.ts +1 -7
  139. package/models/api/gridEditingApi.d.ts +36 -121
  140. package/models/api/gridFocusApi.d.ts +13 -0
  141. package/models/api/{gridSelectionApi.d.ts → gridRowSelectionApi.d.ts} +2 -2
  142. package/models/{gridSelectionModel.js → api/gridRowSelectionApi.js} +0 -0
  143. package/models/api/index.d.ts +2 -2
  144. package/models/api/index.js +1 -1
  145. package/models/colDef/gridColDef.d.ts +0 -8
  146. package/models/events/gridEventLookup.d.ts +30 -19
  147. package/models/gridColumnGrouping.d.ts +1 -26
  148. package/models/gridRowSelectionModel.d.ts +3 -0
  149. package/{modern/models/api/gridSelectionApi.js → models/gridRowSelectionModel.js} +0 -0
  150. package/models/gridStateCommunity.d.ts +2 -2
  151. package/models/index.d.ts +1 -1
  152. package/models/index.js +1 -1
  153. package/models/params/gridColumnGroupHeaderParams.d.ts +30 -0
  154. package/{modern/models/gridSelectionModel.js → models/params/gridColumnGroupHeaderParams.js} +0 -0
  155. package/models/params/gridEditCellParams.d.ts +4 -17
  156. package/models/params/gridEditCellParams.js +0 -4
  157. package/models/params/gridRowParams.d.ts +4 -4
  158. package/models/params/index.d.ts +1 -0
  159. package/models/params/index.js +1 -0
  160. package/models/props/DataGridProps.d.ts +8 -32
  161. package/modern/DataGrid/DataGrid.js +14 -34
  162. package/modern/DataGrid/useDataGridComponent.js +8 -12
  163. package/modern/DataGrid/useDataGridProps.js +3 -3
  164. package/modern/colDef/gridCheckboxSelectionColDef.js +1 -1
  165. package/modern/components/GridFooter.js +1 -1
  166. package/modern/components/GridRow.js +2 -2
  167. package/modern/components/base/GridBody.js +2 -2
  168. package/modern/components/cell/GridEditInputCell.js +3 -4
  169. package/modern/components/cell/GridEditSingleSelectCell.js +6 -34
  170. package/modern/components/columnHeaders/GridColumnGroupHeader.js +32 -5
  171. package/modern/components/columnSelection/GridHeaderCheckbox.js +3 -3
  172. package/modern/components/containers/GridRoot.js +4 -3
  173. package/modern/components/panel/GridColumnsPanel.js +10 -4
  174. package/modern/components/panel/filterPanel/GridFilterForm.js +29 -7
  175. package/modern/components/panel/filterPanel/GridFilterPanel.js +62 -17
  176. package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.js +14 -1
  177. package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +83 -0
  178. package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +50 -62
  179. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +58 -98
  180. package/modern/hooks/features/density/densitySelector.js +1 -3
  181. package/modern/hooks/features/density/useGridDensity.js +9 -37
  182. package/modern/hooks/features/dimensions/useGridDimensions.js +3 -2
  183. package/modern/hooks/features/{editRows/gridEditRowsSelector.js → editing/gridEditingSelectors.js} +0 -0
  184. package/modern/hooks/features/editing/index.js +1 -0
  185. package/modern/hooks/features/{editRows/useGridCellEditing.new.js → editing/useGridCellEditing.js} +21 -6
  186. package/modern/hooks/features/{editRows/useGridEditing.new.js → editing/useGridEditing.js} +3 -3
  187. package/modern/hooks/features/{editRows/useGridRowEditing.new.js → editing/useGridRowEditing.js} +20 -6
  188. package/modern/hooks/features/export/useGridPrintExport.js +2 -2
  189. package/modern/hooks/features/focus/gridFocusStateSelector.js +6 -2
  190. package/modern/hooks/features/focus/useGridFocus.js +69 -11
  191. package/modern/hooks/features/index.js +2 -2
  192. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +135 -1
  193. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +9 -0
  194. package/modern/hooks/features/rowSelection/index.js +1 -0
  195. package/modern/hooks/features/{selection/useGridSelection.js → rowSelection/useGridRowSelection.js} +37 -37
  196. package/modern/hooks/features/{selection/useGridSelectionPreProcessors.js → rowSelection/useGridRowSelectionPreProcessors.js} +1 -1
  197. package/modern/hooks/features/rows/gridRowsUtils.js +5 -2
  198. package/modern/hooks/features/rows/useGridRows.js +23 -7
  199. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
  200. package/modern/index.js +1 -1
  201. package/modern/internals/index.js +3 -5
  202. package/modern/locales/trTR.js +17 -17
  203. package/modern/models/api/gridRowSelectionApi.js +1 -0
  204. package/modern/models/api/index.js +1 -1
  205. package/modern/models/gridRowSelectionModel.js +1 -0
  206. package/modern/models/index.js +1 -1
  207. package/modern/models/params/gridColumnGroupHeaderParams.js +1 -0
  208. package/modern/models/params/gridEditCellParams.js +0 -4
  209. package/modern/models/params/index.js +1 -0
  210. package/node/DataGrid/DataGrid.js +14 -34
  211. package/node/DataGrid/useDataGridComponent.js +9 -17
  212. package/node/DataGrid/useDataGridProps.js +3 -3
  213. package/node/colDef/gridCheckboxSelectionColDef.js +2 -2
  214. package/node/components/GridFooter.js +2 -2
  215. package/node/components/GridRow.js +2 -2
  216. package/node/components/base/GridBody.js +2 -2
  217. package/node/components/cell/GridEditInputCell.js +3 -9
  218. package/node/components/cell/GridEditSingleSelectCell.js +6 -38
  219. package/node/components/columnHeaders/GridColumnGroupHeader.js +32 -5
  220. package/node/components/columnSelection/GridHeaderCheckbox.js +3 -3
  221. package/node/components/containers/GridRoot.js +4 -2
  222. package/node/components/panel/GridColumnsPanel.js +10 -4
  223. package/node/components/panel/filterPanel/GridFilterForm.js +30 -7
  224. package/node/components/panel/filterPanel/GridFilterPanel.js +63 -19
  225. package/node/hooks/features/columnGrouping/gridColumnGroupsSelector.js +40 -3
  226. package/node/hooks/features/columnGrouping/gridColumnGroupsUtils.js +102 -0
  227. package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +68 -71
  228. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +57 -113
  229. package/node/hooks/features/density/densitySelector.js +2 -6
  230. package/node/hooks/features/density/useGridDensity.js +9 -48
  231. package/node/hooks/features/dimensions/useGridDimensions.js +3 -1
  232. package/node/hooks/features/{editRows/gridEditRowsSelector.js → editing/gridEditingSelectors.js} +0 -0
  233. package/node/hooks/features/{editRows → editing}/index.js +4 -4
  234. package/node/hooks/features/{editRows/useGridCellEditing.new.js → editing/useGridCellEditing.js} +28 -13
  235. package/node/hooks/features/{editRows/useGridEditing.new.js → editing/useGridEditing.js} +4 -4
  236. package/node/hooks/features/{editRows/useGridRowEditing.new.js → editing/useGridRowEditing.js} +28 -14
  237. package/node/hooks/features/export/useGridPrintExport.js +2 -2
  238. package/node/hooks/features/focus/gridFocusStateSelector.js +10 -4
  239. package/node/hooks/features/focus/useGridFocus.js +68 -10
  240. package/node/hooks/features/index.js +8 -8
  241. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +138 -1
  242. package/node/hooks/features/{selection/gridSelectionSelector.js → rowSelection/gridRowSelectionSelector.js} +6 -6
  243. package/node/hooks/features/rowSelection/index.js +18 -0
  244. package/node/hooks/features/{selection/useGridSelection.js → rowSelection/useGridRowSelection.js} +43 -43
  245. package/node/hooks/features/{selection/useGridSelectionPreProcessors.js → rowSelection/useGridRowSelectionPreProcessors.js} +3 -3
  246. package/node/hooks/features/rows/gridRowsUtils.js +5 -2
  247. package/node/hooks/features/rows/useGridRows.js +23 -7
  248. package/node/hooks/features/virtualization/useGridVirtualScroller.js +4 -4
  249. package/node/index.js +1 -1
  250. package/node/internals/index.js +23 -45
  251. package/node/locales/trTR.js +17 -17
  252. package/node/models/api/{gridSelectionApi.js → gridRowSelectionApi.js} +0 -0
  253. package/node/models/api/index.js +4 -4
  254. package/node/models/{gridSelectionModel.js → gridRowSelectionModel.js} +0 -0
  255. package/node/models/index.js +4 -4
  256. package/node/models/params/gridColumnGroupHeaderParams.js +5 -0
  257. package/node/models/params/gridEditCellParams.js +0 -3
  258. package/node/models/params/index.js +13 -0
  259. package/package.json +2 -2
  260. package/hooks/features/columnGrouping/useGridColumnGroupingPreProcessors.d.ts +0 -4
  261. package/hooks/features/columnGrouping/useGridColumnGroupingPreProcessors.js +0 -35
  262. package/hooks/features/editRows/index.d.ts +0 -1
  263. package/hooks/features/editRows/index.js +0 -1
  264. package/hooks/features/editRows/useGridCellEditing.old.d.ts +0 -4
  265. package/hooks/features/editRows/useGridCellEditing.old.js +0 -359
  266. package/hooks/features/editRows/useGridEditing.old.d.ts +0 -11
  267. package/hooks/features/editRows/useGridEditing.old.js +0 -167
  268. package/hooks/features/editRows/useGridRowEditing.old.d.ts +0 -4
  269. package/hooks/features/editRows/useGridRowEditing.old.js +0 -334
  270. package/hooks/features/selection/gridSelectionSelector.js +0 -9
  271. package/hooks/features/selection/index.d.ts +0 -1
  272. package/hooks/features/selection/index.js +0 -1
  273. package/hooks/features/selection/useGridSelection.d.ts +0 -12
  274. package/legacy/hooks/features/columnGrouping/useGridColumnGroupingPreProcessors.js +0 -35
  275. package/legacy/hooks/features/editRows/index.js +0 -1
  276. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +0 -411
  277. package/legacy/hooks/features/editRows/useGridEditing.old.js +0 -184
  278. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +0 -505
  279. package/legacy/hooks/features/selection/gridSelectionSelector.js +0 -19
  280. package/legacy/hooks/features/selection/index.js +0 -1
  281. package/models/gridSelectionModel.d.ts +0 -3
  282. package/modern/hooks/features/columnGrouping/useGridColumnGroupingPreProcessors.js +0 -29
  283. package/modern/hooks/features/editRows/index.js +0 -1
  284. package/modern/hooks/features/editRows/useGridCellEditing.old.js +0 -355
  285. package/modern/hooks/features/editRows/useGridEditing.old.js +0 -163
  286. package/modern/hooks/features/editRows/useGridRowEditing.old.js +0 -326
  287. package/modern/hooks/features/selection/gridSelectionSelector.js +0 -9
  288. package/modern/hooks/features/selection/index.js +0 -1
  289. package/node/hooks/features/columnGrouping/useGridColumnGroupingPreProcessors.js +0 -55
  290. package/node/hooks/features/editRows/useGridCellEditing.old.js +0 -380
  291. package/node/hooks/features/editRows/useGridEditing.old.js +0 -193
  292. package/node/hooks/features/editRows/useGridRowEditing.old.js +0 -358
  293. package/node/hooks/features/selection/index.js +0 -18
@@ -13,7 +13,8 @@ export const rowsStateInitializer = (state, props, apiRef) => {
13
13
  apiRef.current.unstable_caches.rows = createRowsInternalCache({
14
14
  rows: props.rows,
15
15
  getRowId: props.getRowId,
16
- loading: props.loading
16
+ loading: props.loading,
17
+ rowCount: props.rowCount
17
18
  });
18
19
  return _extends({}, state, {
19
20
  rows: getRowsStateFromCache({
@@ -111,11 +112,12 @@ export const useGridRows = (apiRef, props) => {
111
112
  cache: createRowsInternalCache({
112
113
  rows,
113
114
  getRowId: props.getRowId,
114
- loading: props.loading
115
+ loading: props.loading,
116
+ rowCount: props.rowCount
115
117
  }),
116
118
  throttle: true
117
119
  });
118
- }, [logger, props.getRowId, props.loading, throttledRowsChange]);
120
+ }, [logger, props.getRowId, props.loading, props.rowCount, throttledRowsChange]);
119
121
  const updateRows = React.useCallback(updates => {
120
122
  if (props.signature === GridSignature.DataGrid && updates.length > 1) {
121
123
  // TODO: Add test with direct call to `apiRef.current.updateRows` in DataGrid after enabling the `apiRef` on the free plan.
@@ -341,7 +343,8 @@ export const useGridRows = (apiRef, props) => {
341
343
  cache = createRowsInternalCache({
342
344
  rows: props.rows,
343
345
  getRowId: props.getRowId,
344
- loading: props.loading
346
+ loading: props.loading,
347
+ rowCount: props.rowCount
345
348
  });
346
349
  }
347
350
 
@@ -349,7 +352,7 @@ export const useGridRows = (apiRef, props) => {
349
352
  cache,
350
353
  throttle: false
351
354
  });
352
- }, [logger, apiRef, props.rows, props.getRowId, props.loading, throttledRowsChange]);
355
+ }, [logger, apiRef, props.rows, props.getRowId, props.loading, props.rowCount, throttledRowsChange]);
353
356
  const handleStrategyProcessorChange = React.useCallback(methodName => {
354
357
  if (methodName === 'rowTreeCreation') {
355
358
  groupRows();
@@ -412,7 +415,8 @@ export const useGridRows = (apiRef, props) => {
412
415
  }
413
416
 
414
417
  const areNewRowsAlreadyInState = apiRef.current.unstable_caches.rows.rowsBeforePartialUpdates === props.rows;
415
- const isNewLoadingAlreadyInState = apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates === props.loading; // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)
418
+ const isNewLoadingAlreadyInState = apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates === props.loading;
419
+ const isNewRowCountAlreadyInState = apiRef.current.unstable_caches.rows.rowCountPropBeforePartialUpdates === props.rowCount; // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)
416
420
 
417
421
  if (areNewRowsAlreadyInState) {
418
422
  // If the loading prop has changed, we need to update its value in the state because it won't be done by `throttledRowsChange`
@@ -426,6 +430,17 @@ export const useGridRows = (apiRef, props) => {
426
430
  apiRef.current.forceUpdate();
427
431
  }
428
432
 
433
+ if (!isNewRowCountAlreadyInState) {
434
+ apiRef.current.setState(state => _extends({}, state, {
435
+ rows: _extends({}, state.rows, {
436
+ totalRowCount: Math.max(props.rowCount || 0, state.rows.totalRowCount),
437
+ totalTopLevelRowCount: Math.max(props.rowCount || 0, state.rows.totalTopLevelRowCount)
438
+ })
439
+ }));
440
+ apiRef.current.unstable_caches.rows.rowCountPropBeforePartialUpdates = props.rowCount;
441
+ apiRef.current.forceUpdate();
442
+ }
443
+
429
444
  return;
430
445
  }
431
446
 
@@ -434,7 +449,8 @@ export const useGridRows = (apiRef, props) => {
434
449
  cache: createRowsInternalCache({
435
450
  rows: props.rows,
436
451
  getRowId: props.getRowId,
437
- loading: props.loading
452
+ loading: props.loading,
453
+ rowCount: props.rowCount
438
454
  }),
439
455
  throttle: false
440
456
  });
@@ -9,11 +9,11 @@ import { useGridRootProps } from '../../utils/useGridRootProps';
9
9
  import { useGridSelector } from '../../utils/useGridSelector';
10
10
  import { gridVisibleColumnDefinitionsSelector, gridColumnsTotalWidthSelector, gridColumnPositionsSelector } from '../columns/gridColumnsSelector';
11
11
  import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector';
12
- import { gridEditRowsStateSelector } from '../editRows/gridEditRowsSelector';
12
+ import { gridEditRowsStateSelector } from '../editing/gridEditingSelectors';
13
13
  import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
14
14
  import { useGridApiEventHandler } from '../../utils/useGridApiEventHandler';
15
15
  import { clamp } from '../../../utils/utils';
16
- import { selectedIdsLookupSelector } from '../selection/gridSelectionSelector';
16
+ import { selectedIdsLookupSelector } from '../rowSelection/gridRowSelectionSelector';
17
17
  import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
18
18
  import { getFirstNonSpannedColumnToRender } from '../columns/gridColumnsUtils';
19
19
  import { getMinimalContentHeight } from '../rows/gridRowsUtils'; // Uses binary search to avoid looping through all possible positions
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v6.0.0-alpha.2
1
+ /** @license MUI v6.0.0-alpha.4
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -12,7 +12,6 @@ export { useGridColumnMenu, columnMenuStateInitializer } from '../hooks/features
12
12
  export { useGridColumns, columnsStateInitializer } from '../hooks/features/columns/useGridColumns';
13
13
  export { useGridColumnSpanning } from '../hooks/features/columns/useGridColumnSpanning';
14
14
  export { useGridColumnGrouping, columnGroupsStateInitializer } from '../hooks/features/columnGrouping/useGridColumnGrouping';
15
- export { useGridColumnGroupingPreProcessors } from '../hooks/features/columnGrouping/useGridColumnGroupingPreProcessors';
16
15
  export { useGridDensity, densityStateInitializer } from '../hooks/features/density/useGridDensity';
17
16
  export { useGridCsvExport } from '../hooks/features/export/useGridCsvExport';
18
17
  export { useGridPrintExport } from '../hooks/features/export/useGridPrintExport';
@@ -22,8 +21,7 @@ export { useGridFocus, focusStateInitializer } from '../hooks/features/focus/use
22
21
  export { useGridKeyboardNavigation } from '../hooks/features/keyboardNavigation/useGridKeyboardNavigation';
23
22
  export { useGridPagination, paginationStateInitializer } from '../hooks/features/pagination/useGridPagination';
24
23
  export { useGridPreferencesPanel, preferencePanelStateInitializer } from '../hooks/features/preferencesPanel/useGridPreferencesPanel';
25
- export { useGridEditing as useGridEditing_new, editingStateInitializer as editingStateInitializer_new } from '../hooks/features/editRows/useGridEditing.new';
26
- export { useGridEditing as useGridEditing_old, editingStateInitializer as editingStateInitializer_old } from '../hooks/features/editRows/useGridEditing.old';
24
+ export { useGridEditing, editingStateInitializer } from '../hooks/features/editing/useGridEditing';
27
25
  export { useGridRows, rowsStateInitializer } from '../hooks/features/rows/useGridRows';
28
26
  export { useGridRowsPreProcessors } from '../hooks/features/rows/useGridRowsPreProcessors';
29
27
  export { getTreeNodeDescendants, buildRootGroup } from '../hooks/features/rows/gridRowsUtils';
@@ -32,8 +30,8 @@ export { useGridParamsApi } from '../hooks/features/rows/useGridParamsApi';
32
30
  export { getRowIdFromRowModel } from '../hooks/features/rows/gridRowsUtils';
33
31
  export { gridAdditionalRowGroupsSelector, gridPinnedRowsSelector } from '../hooks/features/rows/gridRowsSelector';
34
32
  export { calculatePinnedRowsHeight } from '../hooks/features/rows/gridRowsUtils';
35
- export { useGridSelection, selectionStateInitializer } from '../hooks/features/selection/useGridSelection';
36
- export { useGridSelectionPreProcessors } from '../hooks/features/selection/useGridSelectionPreProcessors';
33
+ export { useGridRowSelection, rowSelectionStateInitializer } from '../hooks/features/rowSelection/useGridRowSelection';
34
+ export { useGridRowSelectionPreProcessors } from '../hooks/features/rowSelection/useGridRowSelectionPreProcessors';
37
35
  export { useGridSorting, sortingStateInitializer } from '../hooks/features/sorting/useGridSorting';
38
36
  export { useGridScroll } from '../hooks/features/scroll/useGridScroll';
39
37
  export { useGridEvents } from '../hooks/features/events/useGridEvents';
@@ -39,7 +39,7 @@ const trTRGrid = {
39
39
  // Filter panel text
40
40
  filterPanelAddFilter: 'Filtre Ekle',
41
41
  filterPanelDeleteIconLabel: 'Kaldır',
42
- // filterPanelLinkOperator: 'Logic operator',
42
+ filterPanelLinkOperator: 'Mantıksal operatörler',
43
43
  filterPanelOperators: 'Operatör',
44
44
  // TODO v6: rename to filterPanelOperator
45
45
  filterPanelOperatorAnd: 'Ve',
@@ -85,13 +85,13 @@ const trTRGrid = {
85
85
  footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
86
86
  // Checkbox selection text
87
87
  checkboxSelectionHeaderName: 'Seçim',
88
- // checkboxSelectionSelectAllRows: 'Select all rows',
89
- // checkboxSelectionUnselectAllRows: 'Unselect all rows',
90
- // checkboxSelectionSelectRow: 'Select row',
91
- // checkboxSelectionUnselectRow: 'Unselect row',
88
+ checkboxSelectionSelectAllRows: 'Tüm satırları seç',
89
+ checkboxSelectionUnselectAllRows: 'Tüm satırların seçimini kaldır',
90
+ checkboxSelectionSelectRow: 'Satırı seç',
91
+ checkboxSelectionUnselectRow: 'Satır seçimini bırak',
92
92
  // Boolean cell text
93
- // booleanCellTrueLabel: 'yes',
94
- // booleanCellFalseLabel: 'no',
93
+ booleanCellTrueLabel: 'Evet',
94
+ booleanCellFalseLabel: 'Hayır',
95
95
  // Actions cell more text
96
96
  actionsCellMore: 'daha fazla',
97
97
  // Column pinning text
@@ -107,17 +107,17 @@ const trTRGrid = {
107
107
  groupColumn: name => `${name} için grupla`,
108
108
  unGroupColumn: name => `${name} için gruplamayı kaldır`,
109
109
  // Master/detail
110
- // detailPanelToggle: 'Detail panel toggle',
110
+ detailPanelToggle: 'Detay görünümüne geçiş',
111
111
  expandDetailPanel: 'Genişlet',
112
- collapseDetailPanel: 'Gizle' // Row reordering text
113
- // rowReorderingHeaderName: 'Row reordering',
112
+ collapseDetailPanel: 'Gizle',
113
+ // Row reordering text
114
+ rowReorderingHeaderName: 'Satırı yeniden sırala',
114
115
  // Aggregation
115
- // aggregationMenuItemHeader: 'Aggregation',
116
- // aggregationFunctionLabelSum: 'sum',
117
- // aggregationFunctionLabelAvg: 'avg',
118
- // aggregationFunctionLabelMin: 'min',
119
- // aggregationFunctionLabelMax: 'max',
120
- // aggregationFunctionLabelSize: 'size',
121
-
116
+ aggregationMenuItemHeader: 'Toplama',
117
+ aggregationFunctionLabelSum: 'top',
118
+ aggregationFunctionLabelAvg: 'ort',
119
+ aggregationFunctionLabelMin: 'min',
120
+ aggregationFunctionLabelMax: 'maks',
121
+ aggregationFunctionLabelSize: 'boyut'
122
122
  };
123
123
  export const trTR = getGridLocalization(trTRGrid, trTRCore);
@@ -0,0 +1 @@
1
+ export {};
@@ -4,7 +4,7 @@ export * from './gridColumnApi';
4
4
  export * from './gridDensityApi';
5
5
  export * from './gridRowApi';
6
6
  export * from './gridRowsMetaApi';
7
- export * from './gridSelectionApi';
7
+ export * from './gridRowSelectionApi';
8
8
  export * from './gridSortApi';
9
9
  export * from './gridStateApi';
10
10
  export * from './gridLocaleTextApi';
@@ -0,0 +1 @@
1
+ export {};
@@ -8,7 +8,7 @@ export * from './gridFilterModel';
8
8
  export * from './gridRootContainerRef';
9
9
  export * from './gridRenderContextProps';
10
10
  export * from './gridRows';
11
- export * from './gridSelectionModel';
11
+ export * from './gridRowSelectionModel';
12
12
  export * from './params';
13
13
  export * from './gridCellClass';
14
14
  export * from './gridCell';
@@ -1,10 +1,6 @@
1
- // TODO v6 - remove
2
-
3
1
  /**
4
2
  * Params passed to `apiRef.current.setEditCellValue`.
5
3
  */
6
- // TODO v6 - remove
7
- // TODO v6 - remove
8
4
  var GridCellEditStartReasons;
9
5
  /**
10
6
  * Params passed to the `cellEditStart` event.
@@ -1,4 +1,5 @@
1
1
  export * from './gridColumnHeaderParams';
2
+ export * from './gridColumnGroupHeaderParams';
2
3
  export * from './gridColumnOrderChangeParams';
3
4
  export * from './gridColumnResizeParams';
4
5
  export * from './gridEditCellParams';
@@ -189,7 +189,7 @@ DataGridRaw.propTypes = {
189
189
  * If `true`, the selection on click on a row or cell is disabled.
190
190
  * @default false
191
191
  */
192
- disableSelectionOnClick: _propTypes.default.bool,
192
+ disableRowSelectionOnClick: _propTypes.default.bool,
193
193
 
194
194
  /**
195
195
  * If `true`, the virtualization is disabled.
@@ -219,8 +219,6 @@ DataGridRaw.propTypes = {
219
219
  */
220
220
  experimentalFeatures: _propTypes.default.shape({
221
221
  columnGrouping: _propTypes.default.bool,
222
- newEditingApi: _propTypes.default.bool,
223
- preventCommitWhileValidating: _propTypes.default.bool,
224
222
  warnIfFocusStateIsNotSynced: _propTypes.default.bool
225
223
  }),
226
224
 
@@ -397,14 +395,6 @@ DataGridRaw.propTypes = {
397
395
  */
398
396
  onCellDoubleClick: _propTypes.default.func,
399
397
 
400
- /**
401
- * Callback fired when the cell changes are committed.
402
- * @param {GridCellEditCommitParams} params With all properties from [[GridCellEditCommitParams]].
403
- * @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
404
- * @param {GridCallbackDetails} details Additional details for this callback.
405
- */
406
- onCellEditCommit: _propTypes.default.func,
407
-
408
398
  /**
409
399
  * Callback fired when the cell turns to edit mode.
410
400
  * @param {GridCellParams} params With all properties from [[GridCellParams]].
@@ -505,15 +495,6 @@ DataGridRaw.propTypes = {
505
495
  */
506
496
  onColumnVisibilityModelChange: _propTypes.default.func,
507
497
 
508
- /**
509
- * Callback fired when the edit cell value changes.
510
- * @param {GridEditCellPropsParams} params With all properties from [[GridEditCellPropsParams]].
511
- * @param {MuiEvent<React.SyntheticEvent>} event The event that caused this prop to be called.
512
- * @param {GridCallbackDetails} details Additional details for this callback.
513
- * @deprecated use `preProcessEditCellProps` from the [`GridColDef`](/x/api/data-grid/grid-col-def/)
514
- */
515
- onEditCellPropsChange: _propTypes.default.func,
516
-
517
498
  /**
518
499
  * Callback fired when the `editRowsModel` changes.
519
500
  * @param {GridEditRowsModel} editRowsModel With all properties from [[GridEditRowsModel]].
@@ -643,10 +624,10 @@ DataGridRaw.propTypes = {
643
624
 
644
625
  /**
645
626
  * Callback fired when the selection state of one or multiple rows changes.
646
- * @param {GridSelectionModel} selectionModel With all the row ids [[GridSelectionModel]].
627
+ * @param {GridRowSelectionModel} rowSelectionModel With all the row ids [[GridSelectionModel]].
647
628
  * @param {GridCallbackDetails} details Additional details for this callback.
648
629
  */
649
- onSelectionModelChange: _propTypes.default.func,
630
+ onRowSelectionModelChange: _propTypes.default.func,
650
631
 
651
632
  /**
652
633
  * Callback fired when the sort model changes before a column is sorted.
@@ -700,7 +681,6 @@ DataGridRaw.propTypes = {
700
681
 
701
682
  /**
702
683
  * Callback called before updating a row with new values in the row and cell editing.
703
- * Only applied if `props.experimentalFeatures.newEditingApi: true`.
704
684
  * @template R
705
685
  * @param {R} newRow Row object with the new values.
706
686
  * @param {R} oldRow Row object with the old values.
@@ -736,6 +716,17 @@ DataGridRaw.propTypes = {
736
716
  */
737
717
  rows: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
738
718
 
719
+ /**
720
+ * Sets the row selection model of the grid.
721
+ */
722
+ rowSelectionModel: (0, _utils.chainPropTypes)(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.array]), props => {
723
+ if (!props.checkboxSelection && Array.isArray(props.rowSelectionModel) && props.rowSelectionModel.length > 1) {
724
+ return new Error([`MUI: \`<DataGrid rowSelectionModel={${JSON.stringify(props.rowSelectionModel)}} />\` is not a valid prop.`, 'rowSelectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
725
+ }
726
+
727
+ return null;
728
+ }),
729
+
739
730
  /**
740
731
  * Sets the type of space between rows added by `getRowSpacing`.
741
732
  * @default "margin"
@@ -759,17 +750,6 @@ DataGridRaw.propTypes = {
759
750
  */
760
751
  scrollbarSize: _propTypes.default.number,
761
752
 
762
- /**
763
- * Set the selection model of the grid.
764
- */
765
- selectionModel: (0, _utils.chainPropTypes)(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.array]), props => {
766
- if (!props.checkboxSelection && Array.isArray(props.selectionModel) && props.selectionModel.length > 1) {
767
- return new Error([`MUI: \`<DataGrid selectionModel={${JSON.stringify(props.selectionModel)}} />\` is not a valid prop.`, 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
768
- }
769
-
770
- return null;
771
- }),
772
-
773
753
  /**
774
754
  * If `true`, the right border of the cells are displayed.
775
755
  * @default false
@@ -31,9 +31,7 @@ var _useGridPagination = require("../hooks/features/pagination/useGridPagination
31
31
 
32
32
  var _useGridPreferencesPanel = require("../hooks/features/preferencesPanel/useGridPreferencesPanel");
33
33
 
34
- var _useGridEditing = require("../hooks/features/editRows/useGridEditing.old");
35
-
36
- var _useGridEditing2 = require("../hooks/features/editRows/useGridEditing.new");
34
+ var _useGridEditing = require("../hooks/features/editing/useGridEditing");
37
35
 
38
36
  var _useGridRows = require("../hooks/features/rows/useGridRows");
39
37
 
@@ -41,9 +39,9 @@ var _useGridRowsPreProcessors = require("../hooks/features/rows/useGridRowsPrePr
41
39
 
42
40
  var _useGridParamsApi = require("../hooks/features/rows/useGridParamsApi");
43
41
 
44
- var _useGridSelection = require("../hooks/features/selection/useGridSelection");
42
+ var _useGridRowSelection = require("../hooks/features/rowSelection/useGridRowSelection");
45
43
 
46
- var _useGridSelectionPreProcessors = require("../hooks/features/selection/useGridSelectionPreProcessors");
44
+ var _useGridRowSelectionPreProcessors = require("../hooks/features/rowSelection/useGridRowSelectionPreProcessors");
47
45
 
48
46
  var _useGridSorting = require("../hooks/features/sorting/useGridSorting");
49
47
 
@@ -61,28 +59,22 @@ var _useGridColumnSpanning = require("../hooks/features/columns/useGridColumnSpa
61
59
 
62
60
  var _useGridColumnGrouping = require("../hooks/features/columnGrouping/useGridColumnGrouping");
63
61
 
64
- var _useGridColumnGroupingPreProcessors = require("../hooks/features/columnGrouping/useGridColumnGroupingPreProcessors");
65
-
66
62
  const useDataGridComponent = props => {
67
- var _props$experimentalFe, _props$experimentalFe2;
68
-
69
63
  const apiRef = (0, _useGridInitialization.useGridInitialization)(undefined, props);
70
64
  /**
71
65
  * Register all pre-processors called during state initialization here.
72
66
  */
73
67
 
74
- (0, _useGridColumnGroupingPreProcessors.useGridColumnGroupingPreProcessors)(apiRef, props);
75
- (0, _useGridSelectionPreProcessors.useGridSelectionPreProcessors)(apiRef, props);
68
+ (0, _useGridRowSelectionPreProcessors.useGridRowSelectionPreProcessors)(apiRef, props);
76
69
  (0, _useGridRowsPreProcessors.useGridRowsPreProcessors)(apiRef);
77
70
  /**
78
71
  * Register all state initializers here.
79
72
  */
80
73
 
81
- (0, _useGridInitializeState.useGridInitializeState)(_useGridSelection.selectionStateInitializer, apiRef, props);
74
+ (0, _useGridInitializeState.useGridInitializeState)(_useGridRowSelection.rowSelectionStateInitializer, apiRef, props);
82
75
  (0, _useGridInitializeState.useGridInitializeState)(_useGridColumns.columnsStateInitializer, apiRef, props);
83
- (0, _useGridInitializeState.useGridInitializeState)(_useGridColumnGrouping.columnGroupsStateInitializer, apiRef, props);
84
76
  (0, _useGridInitializeState.useGridInitializeState)(_useGridRows.rowsStateInitializer, apiRef, props);
85
- (0, _useGridInitializeState.useGridInitializeState)((_props$experimentalFe = props.experimentalFeatures) != null && _props$experimentalFe.newEditingApi ? _useGridEditing2.editingStateInitializer : _useGridEditing.editingStateInitializer, apiRef, props);
77
+ (0, _useGridInitializeState.useGridInitializeState)(_useGridEditing.editingStateInitializer, apiRef, props);
86
78
  (0, _useGridInitializeState.useGridInitializeState)(_useGridFocus.focusStateInitializer, apiRef, props);
87
79
  (0, _useGridInitializeState.useGridInitializeState)(_useGridSorting.sortingStateInitializer, apiRef, props);
88
80
  (0, _useGridInitializeState.useGridInitializeState)(_useGridPreferencesPanel.preferencePanelStateInitializer, apiRef, props);
@@ -91,15 +83,15 @@ const useDataGridComponent = props => {
91
83
  (0, _useGridInitializeState.useGridInitializeState)(_useGridPagination.paginationStateInitializer, apiRef, props);
92
84
  (0, _useGridInitializeState.useGridInitializeState)(_useGridRowsMeta.rowsMetaStateInitializer, apiRef, props);
93
85
  (0, _useGridInitializeState.useGridInitializeState)(_useGridColumnMenu.columnMenuStateInitializer, apiRef, props);
86
+ (0, _useGridInitializeState.useGridInitializeState)(_useGridColumnGrouping.columnGroupsStateInitializer, apiRef, props);
94
87
  (0, _useGridKeyboardNavigation.useGridKeyboardNavigation)(apiRef, props);
95
- (0, _useGridSelection.useGridSelection)(apiRef, props);
88
+ (0, _useGridRowSelection.useGridRowSelection)(apiRef, props);
96
89
  (0, _useGridColumns.useGridColumns)(apiRef, props);
97
90
  (0, _useGridRows.useGridRows)(apiRef, props);
98
91
  (0, _useGridParamsApi.useGridParamsApi)(apiRef);
99
92
  (0, _useGridColumnSpanning.useGridColumnSpanning)(apiRef);
100
93
  (0, _useGridColumnGrouping.useGridColumnGrouping)(apiRef, props);
101
- const useGridEditing = (_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.newEditingApi ? _useGridEditing2.useGridEditing : _useGridEditing.useGridEditing;
102
- useGridEditing(apiRef, props);
94
+ (0, _useGridEditing.useGridEditing)(apiRef, props);
103
95
  (0, _useGridFocus.useGridFocus)(apiRef, props);
104
96
  (0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef, props);
105
97
  (0, _useGridFilter.useGridFilter)(apiRef, props);
@@ -25,7 +25,7 @@ const DATA_GRID_FORCED_PROPS = {
25
25
  apiRef: undefined,
26
26
  disableMultipleColumnsFiltering: true,
27
27
  disableMultipleColumnsSorting: true,
28
- disableMultipleSelection: true,
28
+ disableMultipleRowSelection: true,
29
29
  throttleRowsMs: undefined,
30
30
  hideFooterRowCount: false,
31
31
  pagination: true,
@@ -56,9 +56,9 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = {
56
56
  disableColumnSelector: false,
57
57
  disableDensitySelector: false,
58
58
  disableMultipleColumnsFiltering: false,
59
- disableMultipleSelection: false,
59
+ disableMultipleRowSelection: false,
60
60
  disableMultipleColumnsSorting: false,
61
- disableSelectionOnClick: false,
61
+ disableRowSelectionOnClick: false,
62
62
  disableVirtualization: false,
63
63
  disableIgnoreModificationsIfProcessingProps: false,
64
64
  editMode: _models.GridEditModes.Cell,
@@ -15,7 +15,7 @@ var _GridCellCheckboxRenderer = require("../components/columnSelection/GridCellC
15
15
 
16
16
  var _GridHeaderCheckbox = require("../components/columnSelection/GridHeaderCheckbox");
17
17
 
18
- var _gridSelectionSelector = require("../hooks/features/selection/gridSelectionSelector");
18
+ var _gridRowSelectionSelector = require("../hooks/features/rowSelection/gridRowSelectionSelector");
19
19
 
20
20
  var _gridBooleanColDef = require("./gridBooleanColDef");
21
21
 
@@ -41,7 +41,7 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanC
41
41
  disableExport: true,
42
42
  getApplyQuickFilterFn: undefined,
43
43
  valueGetter: params => {
44
- const selectionLookup = (0, _gridSelectionSelector.selectedIdsLookupSelector)(params.api.state, params.api.instanceId);
44
+ const selectionLookup = (0, _gridRowSelectionSelector.selectedIdsLookupSelector)(params.api.state, params.api.instanceId);
45
45
  return selectionLookup[params.id] !== undefined;
46
46
  },
47
47
  renderHeader: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderCheckbox.GridHeaderCheckbox, (0, _extends2.default)({}, params)),
@@ -17,7 +17,7 @@ var _useGridSelector = require("../hooks/utils/useGridSelector");
17
17
 
18
18
  var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
19
19
 
20
- var _gridSelectionSelector = require("../hooks/features/selection/gridSelectionSelector");
20
+ var _gridRowSelectionSelector = require("../hooks/features/rowSelection/gridRowSelectionSelector");
21
21
 
22
22
  var _gridFilterSelector = require("../hooks/features/filter/gridFilterSelector");
23
23
 
@@ -43,7 +43,7 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
43
43
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
44
44
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
45
45
  const totalTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridTopLevelRowCountSelector);
46
- const selectedRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridSelectionSelector.selectedGridRowsCountSelector);
46
+ const selectedRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSelectionSelector.selectedGridRowsCountSelector);
47
47
  const visibleTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridFilterSelector.gridVisibleTopLevelRowCountSelector);
48
48
  const selectedRowCountElement = !rootProps.hideFooterSelectedRowCount && selectedRowCount > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridSelectedRowCount.GridSelectedRowCount, {
49
49
  selectedRowCount: selectedRowCount
@@ -45,7 +45,7 @@ var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelecto
45
45
 
46
46
  var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
47
47
 
48
- var _densitySelector = require("../hooks/features/density/densitySelector");
48
+ var _gridColumnGroupsSelector = require("../hooks/features/columnGrouping/gridColumnGroupsSelector");
49
49
 
50
50
  var _utils = require("../utils/utils");
51
51
 
@@ -122,7 +122,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
122
122
  const columnsTotalWidth = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnsTotalWidthSelector);
123
123
  const sortModel = (0, _useGridSelector.useGridSelector)(apiRef, _gridSortingSelector.gridSortModelSelector);
124
124
  const treeDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridRowMaximumTreeDepthSelector);
125
- const headerGroupingMaxDepth = (0, _useGridSelector.useGridSelector)(apiRef, _densitySelector.gridDensityHeaderGroupingMaxDepthSelector);
125
+ const headerGroupingMaxDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridColumnGroupsHeaderMaxDepthSelector);
126
126
  const handleRef = (0, _material.useForkRef)(ref, refProp);
127
127
  const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
128
128
 
@@ -21,7 +21,7 @@ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
21
21
 
22
22
  var _useGridSelector = require("../../hooks/utils/useGridSelector");
23
23
 
24
- var _densitySelector = require("../../hooks/features/density/densitySelector");
24
+ var _gridColumnGroupsSelector = require("../../hooks/features/columnGrouping/gridColumnGroupsSelector");
25
25
 
26
26
  var _jsxRuntime = require("react/jsx-runtime");
27
27
 
@@ -37,7 +37,7 @@ function GridBody(props) {
37
37
  } = props;
38
38
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
39
39
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
40
- const totalHeaderHeight = (0, _useGridSelector.useGridSelector)(apiRef, _densitySelector.gridDensityTotalHeaderHeightSelector);
40
+ const totalHeaderHeight = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridTotalHeaderHeightSelector);
41
41
  const [isVirtualizationDisabled, setIsVirtualizationDisabled] = React.useState(rootProps.disableVirtualization);
42
42
  const disableVirtualization = React.useCallback(() => {
43
43
  setIsVirtualizationDisabled(true);
@@ -29,8 +29,6 @@ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
29
29
 
30
30
  var _index = require("../icons/index");
31
31
 
32
- var _GridFilterInputValue = require("../panel/filterPanel/GridFilterInputValue");
33
-
34
32
  var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
35
33
 
36
34
  var _jsxRuntime = require("react/jsx-runtime");
@@ -65,8 +63,6 @@ const GridEditInputCellRoot = (0, _styles.styled)(_InputBase.default, {
65
63
  }
66
64
  }));
67
65
  const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
68
- var _rootProps$experiment, _rootProps$experiment3;
69
-
70
66
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
71
67
  const {
72
68
  id,
@@ -74,7 +70,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
74
70
  field,
75
71
  colDef,
76
72
  hasFocus,
77
- debounceMs = (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.newEditingApi ? 200 : _GridFilterInputValue.SUBMIT_FILTER_STROKE_TIME,
73
+ debounceMs = 200,
78
74
  isProcessingProps,
79
75
  onValueChange
80
76
  } = props,
@@ -87,8 +83,6 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
87
83
  };
88
84
  const classes = useUtilityClasses(ownerState);
89
85
  const handleChange = React.useCallback(async event => {
90
- var _rootProps$experiment2;
91
-
92
86
  const newValue = event.target.value;
93
87
 
94
88
  if (onValueChange) {
@@ -98,7 +92,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
98
92
  const column = apiRef.current.getColumn(field);
99
93
  let parsedValue = newValue;
100
94
 
101
- if (column.valueParser && (_rootProps$experiment2 = rootProps.experimentalFeatures) != null && _rootProps$experiment2.newEditingApi) {
95
+ if (column.valueParser) {
102
96
  parsedValue = column.valueParser(newValue, apiRef.current.getCellParams(id, field));
103
97
  }
104
98
 
@@ -110,7 +104,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
110
104
  debounceMs,
111
105
  unstable_skipValueParser: true
112
106
  }, event);
113
- }, [apiRef, debounceMs, field, id, onValueChange, (_rootProps$experiment3 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment3.newEditingApi]);
107
+ }, [apiRef, debounceMs, field, id, onValueChange]);
114
108
  const meta = apiRef.current.unstable_getEditCellMeta ? apiRef.current.unstable_getEditCellMeta(id, field) : {};
115
109
  React.useEffect(() => {
116
110
  if (meta.changeReason !== 'debouncedSetEditCellValue') {
@@ -107,8 +107,6 @@ function GridEditSingleSelectCell(props) {
107
107
  }
108
108
 
109
109
  const handleChange = async event => {
110
- var _rootProps$experiment;
111
-
112
110
  setOpen(false);
113
111
  const target = event.target; // NativeSelect casts the value to a string.
114
112
 
@@ -118,35 +116,11 @@ function GridEditSingleSelectCell(props) {
118
116
  await onValueChange(event, formattedTargetValue);
119
117
  }
120
118
 
121
- const isValid = await apiRef.current.setEditCellValue({
119
+ await apiRef.current.setEditCellValue({
122
120
  id,
123
121
  field,
124
122
  value: formattedTargetValue
125
123
  }, event);
126
-
127
- if ((_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.newEditingApi) {
128
- return;
129
- } // We use isValid === false because the default return is undefined which evaluates to true with !isValid
130
-
131
-
132
- if (rootProps.editMode === _gridEditRowModel.GridEditModes.Row || isValid === false) {
133
- return;
134
- }
135
-
136
- const canCommit = await Promise.resolve(apiRef.current.commitCellChange({
137
- id,
138
- field
139
- }, event));
140
-
141
- if (canCommit) {
142
- apiRef.current.setCellMode(id, field, 'view');
143
-
144
- if (event.key) {
145
- // TODO v6: remove once we stop ignoring events fired from portals
146
- const params = apiRef.current.getCellParams(id, field);
147
- apiRef.current.publishEvent('cellNavigationKeyDown', params, event);
148
- }
149
- }
150
124
  };
151
125
 
152
126
  const handleClose = (event, reason) => {
@@ -156,17 +130,11 @@ function GridEditSingleSelectCell(props) {
156
130
  }
157
131
 
158
132
  if (reason === 'backdropClick' || (0, _keyboardUtils.isEscapeKey)(event.key)) {
159
- var _rootProps$experiment2;
160
-
161
- if ((_rootProps$experiment2 = rootProps.experimentalFeatures) != null && _rootProps$experiment2.newEditingApi) {
162
- apiRef.current.stopCellEditMode({
163
- id,
164
- field,
165
- ignoreModifications: true
166
- });
167
- } else {
168
- apiRef.current.setCellMode(id, field, 'view');
169
- }
133
+ apiRef.current.stopCellEditMode({
134
+ id,
135
+ field,
136
+ ignoreModifications: true
137
+ });
170
138
  }
171
139
  };
172
140