@mui/x-data-grid-premium 8.10.1 → 8.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +221 -8
  2. package/DataGridPremium/DataGridPremium.js +6 -4
  3. package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -1
  4. package/DataGridPremium/useDataGridPremiumComponent.js +2 -2
  5. package/esm/DataGridPremium/DataGridPremium.js +6 -4
  6. package/esm/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -1
  7. package/esm/DataGridPremium/useDataGridPremiumComponent.js +2 -2
  8. package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +1 -0
  9. package/esm/hooks/features/clipboard/useGridClipboardImport.js +1 -1
  10. package/esm/hooks/features/export/serializer/setupExcelExportWebWorker.js +1 -2
  11. package/esm/hooks/features/rowGrouping/createGroupingColDef.d.ts +2 -1
  12. package/esm/hooks/features/rowGrouping/createGroupingColDef.js +31 -7
  13. package/esm/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +1 -0
  14. package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +5 -1
  15. package/esm/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
  16. package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +48 -2
  17. package/esm/hooks/features/rowReorder/operations.d.ts +40 -0
  18. package/esm/hooks/features/rowReorder/operations.js +535 -0
  19. package/esm/hooks/features/rowReorder/reorderExecutor.d.ts +15 -0
  20. package/esm/hooks/features/rowReorder/reorderExecutor.js +25 -0
  21. package/esm/hooks/features/rowReorder/reorderValidator.d.ts +16 -0
  22. package/esm/hooks/features/rowReorder/reorderValidator.js +116 -0
  23. package/esm/hooks/features/rowReorder/types.d.ts +42 -0
  24. package/esm/hooks/features/rowReorder/types.js +1 -0
  25. package/esm/hooks/features/rowReorder/utils.d.ts +127 -0
  26. package/esm/hooks/features/rowReorder/utils.js +343 -0
  27. package/esm/hooks/features/rows/useGridRowsOverridableMethods.d.ts +7 -0
  28. package/esm/hooks/features/rows/useGridRowsOverridableMethods.js +52 -0
  29. package/esm/index.js +1 -1
  30. package/esm/models/gridGroupingValueSetter.d.ts +14 -0
  31. package/esm/models/gridGroupingValueSetter.js +1 -0
  32. package/esm/models/index.d.ts +1 -0
  33. package/esm/models/index.js +1 -0
  34. package/esm/typeOverloads/modules.d.ts +7 -1
  35. package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +1 -0
  36. package/hooks/features/clipboard/useGridClipboardImport.js +1 -1
  37. package/hooks/features/export/serializer/setupExcelExportWebWorker.js +1 -2
  38. package/hooks/features/rowGrouping/createGroupingColDef.d.ts +2 -1
  39. package/hooks/features/rowGrouping/createGroupingColDef.js +31 -7
  40. package/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +1 -0
  41. package/hooks/features/rowGrouping/gridRowGroupingUtils.js +5 -1
  42. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
  43. package/hooks/features/rowGrouping/useGridRowGrouping.js +46 -0
  44. package/hooks/features/rowReorder/operations.d.ts +40 -0
  45. package/hooks/features/rowReorder/operations.js +546 -0
  46. package/hooks/features/rowReorder/reorderExecutor.d.ts +15 -0
  47. package/hooks/features/rowReorder/reorderExecutor.js +31 -0
  48. package/hooks/features/rowReorder/reorderValidator.d.ts +16 -0
  49. package/hooks/features/rowReorder/reorderValidator.js +122 -0
  50. package/hooks/features/rowReorder/types.d.ts +42 -0
  51. package/hooks/features/rowReorder/types.js +5 -0
  52. package/hooks/features/rowReorder/utils.d.ts +127 -0
  53. package/hooks/features/rowReorder/utils.js +360 -0
  54. package/hooks/features/rows/useGridRowsOverridableMethods.d.ts +7 -0
  55. package/hooks/features/rows/useGridRowsOverridableMethods.js +60 -0
  56. package/index.js +1 -1
  57. package/models/gridGroupingValueSetter.d.ts +14 -0
  58. package/models/gridGroupingValueSetter.js +5 -0
  59. package/models/index.d.ts +1 -0
  60. package/models/index.js +11 -0
  61. package/package.json +5 -5
  62. package/typeOverloads/modules.d.ts +7 -1
package/CHANGELOG.md CHANGED
@@ -5,17 +5,224 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.11.0
9
+
10
+ _Aug 29, 2025_
11
+
12
+ We'd like to extend a big thank you to the 19 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Add new `SankeyChart`
15
+
16
+ <img height="300" alt="Screenshot 2025-07-24 at 12 54 33" src="https://github.com/user-attachments/assets/d77bcec1-044b-48c6-b37d-d7b74793b91c" />
17
+
18
+ - 🚀 Data Grid row grouping now supports row reordering
19
+
20
+ See the [Drag-and-drop group reordering](https://mui.com/x/react-data-grid/row-grouping/#drag-and-drop-group-reordering) section for more details.
21
+
22
+ - 📚 Documentation improvements
23
+
24
+ Special thanks go out to the community members for their valuable contributions:
25
+ @dwrth, @lauri865, @Webini
26
+
27
+ The following are all team members who have contributed to this release:
28
+ @alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
29
+
30
+ ### Data Grid
31
+
32
+ #### `@mui/x-data-grid@8.11.0`
33
+
34
+ - [DataGrid] Fix focused column header scroll jump (#19323) @lauri865
35
+ - [DataGrid] Bring `columnUnsortedIcon` slot back (#19268) @arminmeh
36
+ - [DataGrid] Do not add `menu` role to the empty actions menu (#19338) @arminmeh
37
+ - [DataGrid] Fix `columnsManagementRow` style override slot not working (#19097) @dwrth
38
+ - [DataGrid] Fix pagination state synchronization issue (#19290) @MBilalShafi
39
+ - [DataGrid] Fix scroll issue in R17 (#19265) @romgrk
40
+ - [DataGrid] Hide column separator of non-resizable pinned column (#19277) @arminmeh
41
+
42
+ #### `@mui/x-data-grid-pro@8.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
43
+
44
+ Same changes as in `@mui/x-data-grid@8.11.0`, plus:
45
+
46
+ - [DataGridPro] Fix column menu sort when `multipleColumnsSortingMode="always"` (#19099) @MBilalShafi
47
+ - [DataGridPro] Keep the drop effect if `keepColumnPositionIfDraggedOutside` is enabled (#19372) @arminmeh
48
+
49
+ #### `@mui/x-data-grid-premium@8.11.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
50
+
51
+ Same changes as in `@mui/x-data-grid-pro@8.11.0`, plus:
52
+
53
+ - [DataGridPremium] Fix `valueFormatter` issues when `rowGroupingColumnMode="single"` (#18967) @cherniavskii
54
+ - [DataGridPremium] Reordering support for row grouping (#18251) @MBilalShafi
55
+
56
+ ### Date and Time Pickers
57
+
58
+ #### `@mui/x-date-pickers@8.11.0`
59
+
60
+ - [pickers] Fix Firefox bug causing crash when `startContainer` is a restricted object (#18772) @Webini
61
+ - [pickers] RTL not applied correctly for Calendar Systems examples (works in v7.x but broken in latest version) (#19287) @rita-codes
62
+ - [pickers] Use the locale week day on the Luxon adapter (#19230) @flaviendelangle
63
+ - [pickers] Fix display of placeholder when label is shrunk (#19318) @sai6855
64
+
65
+ #### `@mui/x-date-pickers-pro@8.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
66
+
67
+ Same changes as in `@mui/x-date-pickers@8.11.0`.
68
+
69
+ ### Charts
70
+
71
+ #### `@mui/x-charts@8.11.0`
72
+
73
+ - [charts] Add `RadarAxis` component to render labels (#19240) @alexfauquette
74
+ - [charts] Handle item identifier with data (#19295) @JCQuintas
75
+ - [charts] Refactor optional chaining for props in PieChart, PieChartPro, and ScatterChartPro components (#19292) @sai6855
76
+ - [charts] Remove unused `fill` and `stroke` properties (#19316) @sai6855
77
+ - [charts] Correct `hideLegend` prop description in docs (#19371) @sai6855
78
+
79
+ #### `@mui/x-charts-pro@8.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
80
+
81
+ Same changes as in `@mui/x-charts@8.11.0`, plus:
82
+
83
+ - [charts-pro] Add new `SankeyChart` (#18895) @JCQuintas
84
+
85
+ ### Tree View
86
+
87
+ #### `@mui/x-tree-view@8.11.0`
88
+
89
+ - [tree view] Improve the typing of the item's checkbox `slotProps` (#19247) @flaviendelangle
90
+
91
+ #### `@mui/x-tree-view-pro@8.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
92
+
93
+ Same changes as in `@mui/x-tree-view@8.11.0`.
94
+
95
+ ### Codemod
96
+
97
+ #### `@mui/x-codemod@8.11.0`
98
+
99
+ Internal changes.
100
+
101
+ ### Docs
102
+
103
+ - [docs][TreeView] Fix grammar and spelling mistakes (#19299) @mapache-salvaje
104
+ - [docs][DataGrid] Add pagination number formatting doc with a demo (#19221) @siriwatknp
105
+ - [docs][Charts] Correct some small grammar mistakes (#19297) @mapache-salvaje
106
+ - [docs][DataGrid] Correct grammar mistakes (#19298) @mapache-salvaje
107
+ - [docs][DataGrid] Make it clear that the API key for AI Assistant must be private (#19244) @oliviertassinari
108
+
109
+ ### Core
110
+
111
+ - [code-infra] Remove unnecessary triggers from publish workflow (#19348) @Janpot
112
+ - [code-infra] Set up publishing from GitHub actions (#19264) @Janpot
113
+ - [code-infra] Update renovate, exclude infra packages from MUI group (#19288) @Janpot
114
+ - [internal] Add comment for Codspeed triggers (#19302) @oliviertassinari
115
+ - [internal] Fix changelog generation for infra tags (#19266) @oliviertassinari
116
+ - [internal] Remove dead repository field (#19301) @oliviertassinari
117
+ - [internal] Sentence case @oliviertassinari
118
+ - [internal] Update 8.10.1 changelog with missing changes (#19345) @cherniavskii
119
+ - [support-infra] Improve GitHub Action that check PRs labels (#19303) @oliviertassinari
120
+
121
+ ### Miscellaneous
122
+
123
+ - [infra] Add `synchronize` to workflow triggers (#19342) @michelengelen
124
+ - [infra] Add charts docs folder in codowner (#19317) @alexfauquette
125
+ - [infra] Fix publish workflow complaint (#19346) @JCQuintas
126
+ - [infra] Migrate to use eslint without airbnb config (#19269) @brijeshb42
127
+ - [infra] Simplify release preparation script (#19351) @michelengelen
128
+
129
+ ## 8.10.2
130
+
131
+ _Aug 20, 2025_
132
+
133
+ We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
134
+
135
+ - 🌎 Improve Finnish (fi-FI) locale on the Data Grid
136
+
137
+ Special thanks go out to the community members for their valuable contributions:
138
+ @lauri-heinonen-2025-04, @Methuselah96, @sai6855, @wilcoschoneveld
139
+
140
+ The following are all team members who have contributed to this release:
141
+ @alexfauquette, @cherniavskii, @flaviendelangle, @Janpot, @oliviertassinari, @rita-codes
142
+
143
+ ### Data Grid
144
+
145
+ #### `@mui/x-data-grid@8.10.2`
146
+
147
+ - [DataGrid] Fix display for `<GridEditSingleSelect />` when `density='compact'` (#19249) @sai6855
148
+ - [DataGrid] Fix column header sortable classname when using `disableColumnSorting` (#19222) @wilcoschoneveld
149
+ - [l10n] Improve finnish (fi-FI) locale (#19163) @lauri-heinonen-2025-04
150
+
151
+ #### `@mui/x-data-grid-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
152
+
153
+ Same changes as in `@mui/x-data-grid@8.10.2`, plus:
154
+
155
+ - [DataGridPro] Fix quick filter not working in List View mode (#19254) @cherniavskii
156
+
157
+ #### `@mui/x-data-grid-premium@8.10.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
158
+
159
+ Same changes as in `@mui/x-data-grid-pro@8.10.2`.
160
+
161
+ ### Date and Time Pickers
162
+
163
+ #### `@mui/x-date-pickers@8.10.2`
164
+
165
+ Internal changes.
166
+
167
+ #### `@mui/x-date-pickers-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
168
+
169
+ Same changes as in `@mui/x-date-pickers@8.10.2`.
170
+
171
+ ### Charts
172
+
173
+ #### `@mui/x-charts@8.10.2`
174
+
175
+ Internal changes.
176
+
177
+ #### `@mui/x-charts-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
178
+
179
+ Same changes as in `@mui/x-charts@8.10.2`.
180
+
181
+ ### Tree View
182
+
183
+ #### `@mui/x-tree-view@8.10.2`
184
+
185
+ - [tree view] Add `aria-hidden` to the Tree Item Checkbox (#19246) @flaviendelangle
186
+
187
+ #### `@mui/x-tree-view-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
188
+
189
+ Same changes as in `@mui/x-tree-view@8.10.2`.
190
+
191
+ ### Codemod
192
+
193
+ #### `@mui/x-codemod@8.10.2`
194
+
195
+ Internal changes.
196
+
197
+ ### Docs
198
+
199
+ - [docs] Fix links to the pyramid chart (#19250) @alexfauquette
200
+
201
+ ### Core
202
+
203
+ - [internal] Avoid script for CI only @oliviertassinari
204
+ - [internal] Fix `renovate.json` @oliviertassinari
205
+ - [internal] Polish renovate config @oliviertassinari
206
+ - [internal] Rename core to internal (#19203) @oliviertassinari
207
+ - [internal] Update link to GitHub labels @oliviertassinari
208
+
209
+ ### Miscellaneous
210
+
211
+ - [code-infra] Prepare for incoming `execa` update (#19229) @Janpot
212
+ - [virtualizer] Fix type import (#19192) @Methuselah96
213
+ - [virtualizer] Improve type export (#19192) @Methuselah96
214
+
8
215
  ## 8.10.1
9
216
 
10
217
  _Aug 15, 2025_
11
218
 
12
- We'd like to extend a big thank you to the 8 contributors who made this release possible. Here are some highlights ✨:
219
+ We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
13
220
 
14
221
  - 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
15
222
  - 📚 Documentation improvements
16
223
 
17
224
  The following are all team members who have contributed to this release:
18
- @alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk
225
+ @alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk, @brijeshb42, @noraleonte, @rita-codes
19
226
 
20
227
  ### Data Grid
21
228
 
@@ -24,12 +231,14 @@ The following are all team members who have contributed to this release:
24
231
  - [DataGrid] Fix scroll jumping (#19156) @romgrk
25
232
  - [DataGrid] Fix scroll restoration (#19182) @romgrk
26
233
  - [DataGrid] Fix "no row with id" error (#19193) @romgrk
234
+ - [DataGrid] Fix missing rows in the print export window (#19159) @cherniavskii
235
+ - [DataGrid] Fix broken scroll (#19178) @romgrk
27
236
 
28
- #### `@mui/x-data-grid-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
237
+ #### `@mui/x-data-grid-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
29
238
 
30
239
  Same changes as in `@mui/x-data-grid@8.10.1`.
31
240
 
32
- #### `@mui/x-data-grid-premium@8.10.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
241
+ #### `@mui/x-data-grid-premium@8.10.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
33
242
 
34
243
  Same changes as in `@mui/x-data-grid-pro@8.10.1`.
35
244
 
@@ -39,7 +248,7 @@ Same changes as in `@mui/x-data-grid-pro@8.10.1`.
39
248
 
40
249
  Internal changes.
41
250
 
42
- #### `@mui/x-date-pickers-pro@8.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
251
+ #### `@mui/x-date-pickers-pro@8.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
43
252
 
44
253
  Same changes as in `@mui/x-date-pickers@8.10.0`.
45
254
 
@@ -55,8 +264,10 @@ Same changes as in `@mui/x-date-pickers@8.10.0`.
55
264
  - [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
56
265
  - [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
57
266
  - [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
267
+ - [charts] Add demo for log-scale ticks without labels (#19152) @bernardobelchior
268
+ - [charts] Update animation customization docs (#19185) @bernardobelchior
58
269
 
59
- #### `@mui/x-charts-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
270
+ #### `@mui/x-charts-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
60
271
 
61
272
  Same changes as in `@mui/x-charts@8.10.1`.
62
273
 
@@ -64,9 +275,10 @@ Same changes as in `@mui/x-charts@8.10.1`.
64
275
 
65
276
  #### `@mui/x-tree-view@8.10.1`
66
277
 
67
- Internal changes.
278
+ - [tree view] Fix root not loading from cache on remount (#19088) @noraleonte
279
+ - [tree view] Don't overwrite childrenIds when collapsed to preserve indeterminate state of the parent (#19196) @rita-codes
68
280
 
69
- #### `@mui/x-tree-view-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
281
+ #### `@mui/x-tree-view-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
70
282
 
71
283
  Same changes as in `@mui/x-tree-view@8.10.1`.
72
284
 
@@ -96,6 +308,7 @@ Internal changes.
96
308
  - [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
97
309
  - [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
98
310
  - [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
311
+ - [code-infra] Migrate build command to code-infra (#19006) @brijeshb42
99
312
  - [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
100
313
  - [internal] Fix writing style action name @oliviertassinari
101
314
  - [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
@@ -22,6 +22,7 @@ var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
22
22
  var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
23
23
  var _gridAggregationSelectors = require("../hooks/features/aggregation/gridAggregationSelectors");
24
24
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
25
+ var _useGridRowsOverridableMethods = require("../hooks/features/rows/useGridRowsOverridableMethods");
25
26
  var _sidebar2 = require("../hooks/features/sidebar");
26
27
  var _jsxRuntime = require("react/jsx-runtime");
27
28
  const configuration = {
@@ -35,10 +36,11 @@ const configuration = {
35
36
  id,
36
37
  field
37
38
  });
38
- }
39
+ },
40
+ useGridRowsOverridableMethods: _useGridRowsOverridableMethods.useGridRowsOverridableMethods
39
41
  }
40
42
  };
41
- const releaseInfo = "MTc1NTIzMDQwMDAwMA==";
43
+ const releaseInfo = "MTc1NjQxNDgwMDAwMA==";
42
44
  const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
43
45
  packageName: "x-data-grid-premium",
44
46
  releaseInfo: releaseInfo
@@ -50,7 +52,7 @@ if (process.env.NODE_ENV !== 'production') {
50
52
  const DataGridPremiumRaw = (0, _forwardRef.forwardRef)(function DataGridPremium(inProps, ref) {
51
53
  const initialProps = (0, _useDataGridPremiumProps.useDataGridPremiumProps)(inProps);
52
54
  const privateApiRef = (0, _internals.useGridApiInitialization)(initialProps.apiRef, initialProps);
53
- const props = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(privateApiRef, initialProps);
55
+ const props = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(privateApiRef, initialProps, configuration);
54
56
  (0, _xLicense.useLicenseVerifier)('x-data-grid-premium', releaseInfo);
55
57
  if (process.env.NODE_ENV !== 'production') {
56
58
  (0, _internals.validateProps)(props, dataGridPremiumPropValidators);
@@ -914,7 +916,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
914
916
  */
915
917
  onPreferencePanelOpen: _propTypes.default.func,
916
918
  /**
917
- * Callback called when `processRowUpdate` throws an error or rejects.
919
+ * Callback called when `processRowUpdate()` throws an error or rejects.
918
920
  * @param {any} error The error thrown.
919
921
  */
920
922
  onProcessRowUpdateError: _propTypes.default.func,
@@ -1,4 +1,5 @@
1
1
  import { RefObject } from '@mui/x-internals/types';
2
+ import { type GridConfiguration } from '@mui/x-data-grid-pro/internals';
2
3
  import { GridPrivateApiPremium } from "../models/gridApiPremium.js";
3
4
  import { DataGridPremiumProcessedProps } from "../models/dataGridPremiumProps.js";
4
- export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps) => DataGridPremiumProcessedProps;
5
+ export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps, configuration: GridConfiguration<GridPrivateApiPremium>) => DataGridPremiumProcessedProps;
@@ -26,7 +26,7 @@ var _useGridAiAssistant = require("../hooks/features/aiAssistant/useGridAiAssist
26
26
  var _useGridSidebar = require("../hooks/features/sidebar/useGridSidebar");
27
27
  // Premium-only features
28
28
 
29
- const useDataGridPremiumComponent = (apiRef, inProps) => {
29
+ const useDataGridPremiumComponent = (apiRef, inProps, configuration) => {
30
30
  const pivotPropsOverrides = (0, _xDataGridPro.useGridSelector)(apiRef, _gridPivotingSelectors.gridPivotPropsOverridesSelector);
31
31
  const props = React.useMemo(() => {
32
32
  if (pivotPropsOverrides) {
@@ -111,7 +111,7 @@ const useDataGridPremiumComponent = (apiRef, inProps) => {
111
111
  (0, _internals.useGridColumnPinning)(apiRef, props);
112
112
  (0, _internals.useGridRowPinning)(apiRef, props);
113
113
  (0, _internals.useGridColumns)(apiRef, props);
114
- (0, _internals.useGridRows)(apiRef, props);
114
+ (0, _internals.useGridRows)(apiRef, props, configuration);
115
115
  (0, _internals.useGridRowSpanning)(apiRef, props);
116
116
  (0, _internals.useGridParamsApi)(apiRef, props);
117
117
  (0, _internals.useGridDetailPanel)(apiRef, props);
@@ -15,6 +15,7 @@ import { useGridAriaAttributesPremium } from "../hooks/utils/useGridAriaAttribut
15
15
  import { useGridRowAriaAttributesPremium } from "../hooks/features/rows/useGridRowAriaAttributes.js";
16
16
  import { gridCellAggregationResultSelector } from "../hooks/features/aggregation/gridAggregationSelectors.js";
17
17
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
18
+ import { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
18
19
  import { gridSidebarOpenSelector } from "../hooks/features/sidebar/index.js";
19
20
  import { jsx as _jsx } from "react/jsx-runtime";
20
21
  const configuration = {
@@ -28,10 +29,11 @@ const configuration = {
28
29
  id,
29
30
  field
30
31
  });
31
- }
32
+ },
33
+ useGridRowsOverridableMethods
32
34
  }
33
35
  };
34
- const releaseInfo = "MTc1NTIzMDQwMDAwMA==";
36
+ const releaseInfo = "MTc1NjQxNDgwMDAwMA==";
35
37
  const watermark = /*#__PURE__*/_jsx(Watermark, {
36
38
  packageName: "x-data-grid-premium",
37
39
  releaseInfo: releaseInfo
@@ -43,7 +45,7 @@ if (process.env.NODE_ENV !== 'production') {
43
45
  const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
44
46
  const initialProps = useDataGridPremiumProps(inProps);
45
47
  const privateApiRef = useGridApiInitialization(initialProps.apiRef, initialProps);
46
- const props = useDataGridPremiumComponent(privateApiRef, initialProps);
48
+ const props = useDataGridPremiumComponent(privateApiRef, initialProps, configuration);
47
49
  useLicenseVerifier('x-data-grid-premium', releaseInfo);
48
50
  if (process.env.NODE_ENV !== 'production') {
49
51
  validateProps(props, dataGridPremiumPropValidators);
@@ -907,7 +909,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
907
909
  */
908
910
  onPreferencePanelOpen: PropTypes.func,
909
911
  /**
910
- * Callback called when `processRowUpdate` throws an error or rejects.
912
+ * Callback called when `processRowUpdate()` throws an error or rejects.
911
913
  * @param {any} error The error thrown.
912
914
  */
913
915
  onProcessRowUpdateError: PropTypes.func,
@@ -1,4 +1,5 @@
1
1
  import { RefObject } from '@mui/x-internals/types';
2
+ import { type GridConfiguration } from '@mui/x-data-grid-pro/internals';
2
3
  import { GridPrivateApiPremium } from "../models/gridApiPremium.js";
3
4
  import { DataGridPremiumProcessedProps } from "../models/dataGridPremiumProps.js";
4
- export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps) => DataGridPremiumProcessedProps;
5
+ export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps, configuration: GridConfiguration<GridPrivateApiPremium>) => DataGridPremiumProcessedProps;
@@ -18,7 +18,7 @@ import { pivotingStateInitializer, useGridPivoting, useGridPivotingExportState }
18
18
  import { gridPivotPropsOverridesSelector } from "../hooks/features/pivoting/gridPivotingSelectors.js";
19
19
  import { useGridAiAssistant, aiAssistantStateInitializer } from "../hooks/features/aiAssistant/useGridAiAssistant.js";
20
20
  import { useGridSidebar, sidebarStateInitializer } from "../hooks/features/sidebar/useGridSidebar.js";
21
- export const useDataGridPremiumComponent = (apiRef, inProps) => {
21
+ export const useDataGridPremiumComponent = (apiRef, inProps, configuration) => {
22
22
  const pivotPropsOverrides = useGridSelector(apiRef, gridPivotPropsOverridesSelector);
23
23
  const props = React.useMemo(() => {
24
24
  if (pivotPropsOverrides) {
@@ -103,7 +103,7 @@ export const useDataGridPremiumComponent = (apiRef, inProps) => {
103
103
  useGridColumnPinning(apiRef, props);
104
104
  useGridRowPinning(apiRef, props);
105
105
  useGridColumns(apiRef, props);
106
- useGridRows(apiRef, props);
106
+ useGridRows(apiRef, props, configuration);
107
107
  useGridRowSpanning(apiRef, props);
108
108
  useGridParamsApi(apiRef, props);
109
109
  useGridDetailPanel(apiRef, props);
@@ -56,6 +56,7 @@ export declare const unwrapColumnFromAggregation: (column: GridColDef) => GridBa
56
56
  aggregable?: boolean;
57
57
  availableAggregationFunctions?: string[];
58
58
  groupingValueGetter?: import("../../../index.js").GridGroupingValueGetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
59
+ groupingValueSetter?: import("../../../index.js").GridGroupingValueSetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
59
60
  pastedValueParser?: import("../../../index.js").GridPastedValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
60
61
  pivotable?: boolean;
61
62
  };
@@ -119,7 +119,7 @@ class CellValueUpdater {
119
119
  if (onProcessRowUpdateError) {
120
120
  onProcessRowUpdateError(errorThrown);
121
121
  } else if (process.env.NODE_ENV !== 'production') {
122
- warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
122
+ warnOnce(['MUI X: A call to `processRowUpdate()` threw an error which was not handled because `onProcessRowUpdateError()` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError()` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
123
123
  }
124
124
  };
125
125
  try {
@@ -1,7 +1,6 @@
1
1
  import { addColumnGroupingHeaders, addSerializedRowToWorksheet, createValueOptionsSheetIfNeeded, getExcelJs } from "./utils.js";
2
2
  export function setupExcelExportWebWorker(workerOptions = {}) {
3
- // eslint-disable-next-line no-restricted-globals
4
- addEventListener('message', async event => {
3
+ globalThis.addEventListener('message', async event => {
5
4
  const {
6
5
  namespace,
7
6
  serializedColumns,
@@ -2,6 +2,7 @@ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridColDef, GridGroupingColDefOverride } from '@mui/x-data-grid-pro';
3
3
  import { GridColumnRawLookup, RowGroupingStrategy } from '@mui/x-data-grid-pro/internals';
4
4
  import { GridApiPremium } from "../../../models/gridApiPremium.js";
5
+ import type { GridRowGroupingModel } from "./gridRowGroupingInterfaces.js";
5
6
  interface CreateGroupingColDefMonoCriteriaParams {
6
7
  columnsLookup: GridColumnRawLookup;
7
8
  /**
@@ -35,7 +36,7 @@ interface CreateGroupingColDefSeveralCriteriaParams {
35
36
  /**
36
37
  * The fields from which we are grouping the rows.
37
38
  */
38
- rowGroupingModel: string[];
39
+ rowGroupingModel: GridRowGroupingModel;
39
40
  /**
40
41
  * The col def properties the user wants to override.
41
42
  * This value comes `prop.groupingColDef`.
@@ -73,11 +73,34 @@ const groupedByColValueFormatter = groupedByColDef => (value, row, _, apiRef) =>
73
73
  }
74
74
  return value;
75
75
  };
76
- const getGroupingCriteriaProperties = (groupedByColDef, applyHeaderName) => {
76
+ function getGroupingCriteriaProperties(groupedByColDef, rowGroupingColumnMode, rowGroupingModel = [], columnsLookup = {}) {
77
+ let valueFormatter;
78
+ if (rowGroupingColumnMode === 'single' && rowGroupingModel.length > 1) {
79
+ // In single column grouping mode, the `valueFormatter` of the grouping column uses
80
+ // value formatters from original columns for each of the grouping criteria
81
+ valueFormatter = (value, row, column, apiRef) => {
82
+ const rowId = gridRowIdSelector(apiRef, row);
83
+ const rowNode = gridRowNodeSelector(apiRef, rowId);
84
+ if (rowNode.type === 'group') {
85
+ const originalColDef = columnsLookup[rowNode.groupingField];
86
+ if (originalColDef.type === 'singleSelect') {
87
+ // the default valueFormatter of a singleSelect colDef won't work with the grouping column values
88
+ return value;
89
+ }
90
+ const columnValueFormatter = originalColDef.valueFormatter;
91
+ if (typeof columnValueFormatter === 'function') {
92
+ return columnValueFormatter(value, row, column, apiRef);
93
+ }
94
+ }
95
+ return value;
96
+ };
97
+ } else {
98
+ valueFormatter = groupedByColDef.valueFormatter ? groupedByColValueFormatter(groupedByColDef) : undefined;
99
+ }
77
100
  const properties = {
78
101
  sortable: groupedByColDef.sortable,
79
102
  filterable: groupedByColDef.filterable,
80
- valueFormatter: groupedByColDef.valueFormatter ? groupedByColValueFormatter(groupedByColDef) : undefined,
103
+ valueFormatter,
81
104
  valueOptions: isSingleSelectColDef(groupedByColDef) ? groupedByColDef.valueOptions : undefined,
82
105
  sortComparator: (v1, v2, cellParams1, cellParams2) => {
83
106
  // We only want to sort the groups of the current grouping criteria
@@ -89,11 +112,12 @@ const getGroupingCriteriaProperties = (groupedByColDef, applyHeaderName) => {
89
112
  },
90
113
  filterOperators: groupedByColDef.filterOperators
91
114
  };
115
+ const applyHeaderName = !(rowGroupingColumnMode === 'single' && rowGroupingModel.length > 1);
92
116
  if (applyHeaderName) {
93
117
  properties.headerName = groupedByColDef.headerName ?? groupedByColDef.field;
94
118
  }
95
119
  return properties;
96
- };
120
+ }
97
121
  /**
98
122
  * Creates the `GridColDef` for a grouping column that only takes care of a single grouping criteria
99
123
  */
@@ -175,11 +199,11 @@ export const createGroupingColDefForOneGroupingCriteria = ({
175
199
  // By default, we apply the sorting / filtering on the groups of this column's grouping criteria based on the properties of `groupedColDef`.
176
200
  let sourceProperties;
177
201
  if (mainGroupingCriteria && mainGroupingCriteria === groupingCriteria) {
178
- sourceProperties = getGroupingCriteriaProperties(groupedByColDef, true);
202
+ sourceProperties = getGroupingCriteriaProperties(groupedByColDef, 'multiple');
179
203
  } else if (leafColDef) {
180
204
  sourceProperties = getLeafProperties(leafColDef);
181
205
  } else {
182
- sourceProperties = getGroupingCriteriaProperties(groupedByColDef, true);
206
+ sourceProperties = getGroupingCriteriaProperties(groupedByColDef, 'multiple');
183
207
  }
184
208
 
185
209
  // The properties that can't be overridden with `colDefOverride`
@@ -265,11 +289,11 @@ export const createGroupingColDefForAllGroupingCriteria = ({
265
289
  if (process.env.NODE_ENV !== "production") commonProperties.renderCell.displayName = "commonProperties.renderCell";
266
290
  let sourceProperties;
267
291
  if (mainGroupingCriteria && rowGroupingModel.includes(mainGroupingCriteria)) {
268
- sourceProperties = getGroupingCriteriaProperties(columnsLookup[mainGroupingCriteria], true);
292
+ sourceProperties = getGroupingCriteriaProperties(columnsLookup[mainGroupingCriteria], 'single', rowGroupingModel, columnsLookup);
269
293
  } else if (leafColDef) {
270
294
  sourceProperties = getLeafProperties(leafColDef);
271
295
  } else {
272
- sourceProperties = getGroupingCriteriaProperties(columnsLookup[rowGroupingModel[0]], rowGroupingModel.length === 1);
296
+ sourceProperties = getGroupingCriteriaProperties(columnsLookup[rowGroupingModel[0]], 'single', rowGroupingModel, columnsLookup);
273
297
  }
274
298
 
275
299
  // The properties that can't be overridden with `colDefOverride`
@@ -40,5 +40,6 @@ export interface GridRowGroupingApi {
40
40
  export interface GridGroupingRule<R extends GridValidRowModel = GridValidRowModel, V = any> {
41
41
  field: string;
42
42
  groupingValueGetter?: GridColDef<R, V>['groupingValueGetter'];
43
+ groupingValueSetter?: GridColDef<R, V>['groupingValueSetter'];
43
44
  }
44
45
  export type GridGroupingRules<R extends GridValidRowModel = GridValidRowModel> = GridGroupingRule<R>[];
@@ -149,7 +149,8 @@ export const getGroupingRules = ({
149
149
  columnsLookup
150
150
  }) => sanitizedRowGroupingModel.map(field => ({
151
151
  field,
152
- groupingValueGetter: columnsLookup[field]?.groupingValueGetter
152
+ groupingValueGetter: columnsLookup[field]?.groupingValueGetter,
153
+ groupingValueSetter: columnsLookup[field]?.groupingValueSetter
153
154
  }));
154
155
 
155
156
  /**
@@ -164,6 +165,9 @@ export const areGroupingRulesEqual = (newValue, previousValue) => {
164
165
  if (previousRule.groupingValueGetter !== newRule.groupingValueGetter) {
165
166
  return false;
166
167
  }
168
+ if (previousRule.groupingValueSetter !== newRule.groupingValueSetter) {
169
+ return false;
170
+ }
167
171
  if (previousRule.field !== newRule.field) {
168
172
  return false;
169
173
  }
@@ -8,4 +8,4 @@ export declare const rowGroupingStateInitializer: GridStateInitializer<Pick<Data
8
8
  * @requires useGridRows (state, method) - can be after, async only
9
9
  * @requires useGridParamsApi (method) - can be after, async only
10
10
  */
11
- export declare const useGridRowGrouping: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "dataSource">) => void;
11
+ export declare const useGridRowGrouping: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "dataSource" | "treeData">) => void;
@@ -2,10 +2,11 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
- import { useGridEvent, useGridApiMethod, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
6
- import { useGridRegisterPipeProcessor, GridStrategyGroup, RowGroupingStrategy } from '@mui/x-data-grid-pro/internals';
5
+ import { useGridEvent, useGridApiMethod, gridColumnLookupSelector, gridRowMaximumTreeDepthSelector, gridRowTreeSelector, gridExpandedSortedRowIdsSelector } from '@mui/x-data-grid-pro';
6
+ import { useGridRegisterPipeProcessor, GridStrategyGroup, gridExpandedSortedRowIndexLookupSelector, RowGroupingStrategy } from '@mui/x-data-grid-pro/internals';
7
7
  import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
8
8
  import { getRowGroupingFieldFromGroupingCriteria, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from "./gridRowGroupingUtils.js";
9
+ import { rowGroupingReorderValidator } from "../rowReorder/reorderValidator.js";
9
10
  export const rowGroupingStateInitializer = (state, props, apiRef) => {
10
11
  apiRef.current.caches.rowGrouping = {
11
12
  rulesOnLastRowTreeCreation: []
@@ -168,6 +169,51 @@ export const useGridRowGrouping = (apiRef, props) => {
168
169
  }
169
170
  }
170
171
  }, [apiRef, props.disableRowGrouping]);
172
+ const getRowReorderTargetIndex = React.useCallback((initialValue, {
173
+ sourceRowId,
174
+ targetRowId,
175
+ dropPosition,
176
+ dragDirection
177
+ }) => {
178
+ if (gridRowMaximumTreeDepthSelector(apiRef) === 1 || props.treeData) {
179
+ return initialValue;
180
+ }
181
+ const expandedSortedRowIndexLookup = gridExpandedSortedRowIndexLookupSelector(apiRef);
182
+ const expandedSortedRowIds = gridExpandedSortedRowIdsSelector(apiRef);
183
+ const rowTree = gridRowTreeSelector(apiRef);
184
+ const sourceRowIndex = expandedSortedRowIndexLookup[sourceRowId];
185
+ const targetRowIndex = expandedSortedRowIndexLookup[targetRowId];
186
+ const sourceNode = rowTree[sourceRowId];
187
+ const targetNode = rowTree[targetRowId];
188
+ const prevNode = targetRowIndex > 0 ? rowTree[expandedSortedRowIds[targetRowIndex - 1]] : null;
189
+ const nextNode = targetRowIndex < expandedSortedRowIds.length - 1 ? rowTree[expandedSortedRowIds[targetRowIndex + 1]] : null;
190
+
191
+ // Basic validity checks
192
+ if (!sourceNode || !targetNode) {
193
+ return -1;
194
+ }
195
+
196
+ // Create context object
197
+ const context = {
198
+ sourceNode,
199
+ targetNode,
200
+ prevNode,
201
+ nextNode,
202
+ rowTree,
203
+ dropPosition,
204
+ dragDirection,
205
+ targetRowIndex,
206
+ sourceRowIndex,
207
+ expandedSortedRowIndexLookup
208
+ };
209
+
210
+ // Check if the reorder is valid
211
+ if (rowGroupingReorderValidator.validate(context)) {
212
+ return dropPosition === 'below' ? targetRowIndex + 1 : targetRowIndex;
213
+ }
214
+ return -1;
215
+ }, [apiRef, props.treeData]);
216
+ useGridRegisterPipeProcessor(apiRef, 'getRowReorderTargetIndex', getRowReorderTargetIndex);
171
217
  useGridEvent(apiRef, 'cellKeyDown', handleCellKeyDown);
172
218
  useGridEvent(apiRef, 'columnsChange', checkGroupingColumnsModelDiff);
173
219
  useGridEvent(apiRef, 'rowGroupingModelChange', checkGroupingColumnsModelDiff);