@mui/x-data-grid-premium 7.18.0 → 7.20.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 (36) hide show
  1. package/CHANGELOG.md +213 -11
  2. package/DataGridPremium/DataGrid.js +2 -2
  3. package/DataGridPremium/DataGridPremium.js +29 -1
  4. package/components/GridPremiumColumnMenu.d.ts +3 -3
  5. package/esm/DataGridPremium/DataGrid.js +2 -2
  6. package/esm/DataGridPremium/DataGridPremium.js +29 -1
  7. package/esm/hooks/features/aggregation/gridAggregationUtils.js +1 -1
  8. package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
  9. package/esm/hooks/features/cellSelection/useGridCellSelection.js +9 -7
  10. package/esm/hooks/features/clipboard/useGridClipboardImport.js +3 -1
  11. package/esm/typeOverloads/reexports.js +2 -2
  12. package/esm/utils/releaseInfo.js +1 -1
  13. package/hooks/features/aggregation/gridAggregationUtils.js +1 -1
  14. package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +22 -22
  15. package/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
  16. package/hooks/features/cellSelection/useGridCellSelection.js +9 -7
  17. package/hooks/features/clipboard/useGridClipboardImport.js +3 -1
  18. package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +2 -2
  19. package/hooks/features/rows/useGridRowAriaAttributes.d.ts +1 -1
  20. package/index.js +1 -1
  21. package/material/index.d.ts +3 -3
  22. package/models/dataGridPremiumProps.d.ts +2 -2
  23. package/models/gridApiPremium.d.ts +1 -1
  24. package/models/gridStatePremium.d.ts +2 -2
  25. package/modern/DataGridPremium/DataGrid.js +2 -2
  26. package/modern/DataGridPremium/DataGridPremium.js +29 -1
  27. package/modern/hooks/features/aggregation/gridAggregationUtils.js +1 -1
  28. package/modern/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
  29. package/modern/hooks/features/cellSelection/useGridCellSelection.js +9 -7
  30. package/modern/hooks/features/clipboard/useGridClipboardImport.js +3 -1
  31. package/modern/index.js +1 -1
  32. package/modern/typeOverloads/reexports.js +2 -2
  33. package/modern/utils/releaseInfo.js +1 -1
  34. package/package.json +7 -7
  35. package/typeOverloads/reexports.d.ts +2 -2
  36. package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,206 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.20.0
7
+
8
+ _Oct 11, 2024_
9
+
10
+ We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 📚 Updated ["What's new"](https://mui.com/x/whats-new/) page giving more detailed overview of the latest new features and other highlights
13
+ - 📚 New [collapsible column groups demo](https://mui.com/x/react-data-grid/column-groups/#collapsible-column-groups) for the Data Grid component
14
+ - 📚 New [Tree Item Customization](https://mui.com/x/react-tree-view/tree-item-customization/) documentation to learn how to use the new APIs to create custom Tree Items. The old APIs (`props.ContentComponent` and `props.ContentProps`) have been deprecated and will be removed in the new major version of the Tree View component.
15
+ - 🌍 Improve Japanese (ja-JP) locale on the Data Grid component
16
+ - 🐞 Bugfixes
17
+ - 📚 Other documentation improvements
18
+
19
+ Special thanks go out to the community contributors who have helped make this release possible:
20
+ @k-rajat19, @kalyan90, @uma-neko, @vfbiby.
21
+ Following are all team members who have contributed to this release: @alelthomas, @arminmeh, @arthurbalduini,
22
+ @cherniavskii, @flaviendelangle, @JCQuintas, @MBilalShafi, @noraleonte, @oliviertassinari, @samuelsycamore, @siriwatknp.
23
+
24
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
25
+
26
+ ### Data Grid
27
+
28
+ #### `@mui/x-data-grid@7.20.0`
29
+
30
+ - [DataGrid] Add `onColumnHeaderContextMenu` event (#14734) @vfbiby
31
+ - [DataGrid] Avoid row spanning computation of outdated rows (#14902) @MBilalShafi
32
+ - [DataGrid] Fix scrollbar position not being updated after `scrollToIndexes` (#14888) @arminmeh
33
+ - [DataGrid] Pass `rowId` param to `processRowUpdate` (#14821) @k-rajat19
34
+ - [l10n] Improve Japanese (ja-JP) locale (#14870) @uma-neko
35
+
36
+ #### `@mui/x-data-grid-pro@7.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
37
+
38
+ Same changes as in `@mui/x-data-grid@7.20.0`, plus:
39
+
40
+ - [DataGridPro] Fix wording on the `rowSelectionPropagation` JSDoc and doc section (#14907) @flaviendelangle
41
+
42
+ #### `@mui/x-data-grid-premium@7.20.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
43
+
44
+ Same changes as in `@mui/x-data-grid-pro@7.20.0`.
45
+
46
+ ### Date and Time Pickers
47
+
48
+ #### `@mui/x-date-pickers@7.20.0`
49
+
50
+ - [pickers] Add `PageUp` and `PageDown` support for time components (#14812) @arthurbalduini
51
+ - [pickers] Fix regression on `PickerValidDate` (#14896) @flaviendelangle
52
+ - [pickers] Move the `DateFieldInPickerProps` interface to the `DatePicker` folder and rename it `DatePickerFieldProps` (same for time and date time) (#14828) @flaviendelangle
53
+
54
+ #### `@mui/x-date-pickers-pro@7.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
55
+
56
+ Same changes as in `@mui/x-date-pickers@7.20.0`.
57
+
58
+ ### Charts
59
+
60
+ #### `@mui/x-charts@7.20.0`
61
+
62
+ No changes since `@mui/x-charts@v7.19.0`.
63
+
64
+ #### `@mui/x-charts-pro@7.0.0-beta.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
65
+
66
+ Same changes as in `@mui/x-charts@7.20.0`.
67
+
68
+ ### Tree View
69
+
70
+ #### `@mui/x-tree-view@7.20.0`
71
+
72
+ - [TreeItem] Deprecate the `ContentComponent` and `ContentProps` props (#14908) @flaviendelangle
73
+ - [TreeView] Rework how items are being rendered in Rich Tree View components (#14749) @flaviendelangle
74
+
75
+ ### Docs
76
+
77
+ - [docs] Update "What's new" page (#14858) @cherniavskii
78
+ - [docs] Add collapsible column groups demo (#14818) @cherniavskii
79
+ - [docs] Add custom columns panel demo (#14825) @cherniavskii
80
+ - [docs] Capitalize all instances of "Data Grid" (#14884) @samuelsycamore
81
+ - [docs] Divide charts `tooltip` and `highlighting` pages (#14824) @JCQuintas
82
+ - [docs] Document the `TreeItem2` component and the `useTreeItem2` hook (#14551) @noraleonte
83
+ - [docs] Fix column pinning for "Disable detail panel content scroll" section (#14854 and #14885) @kalyan90
84
+ - [docs] Fix detail panel demo not working well with pinned columns (#14883) @cherniavskii
85
+ - [docs] New recipe of a read-only field (#14606) @flaviendelangle
86
+ - [docs] Change demo name example (#14822) @alelthomas
87
+
88
+ ### Core
89
+
90
+ - [core] Support `@mui/utils` v6 (#14867) @siriwatknp
91
+ - [code-infra] Remove deprecated `data-mui-test` in favour of `data-testid` (#14882) @JCQuintas
92
+ - [code-infra] Update renovate config and add a `vitest` group (#14856) @JCQuintas
93
+ - [test] Replace `waitFor()` with `act()` (#14851) @oliviertassinari
94
+ - [test] Restore "pnpm tc" CLI (#14852) @oliviertassinari
95
+
96
+ ## 7.19.0
97
+
98
+ _Oct 4, 2024_
99
+
100
+ We'd like to offer a big thanks to the 26 contributors who made this release possible. Here are some highlights ✨:
101
+
102
+ - 🔁 Automatic parents and children selection for Data Grid ["tree data"](https://mui.com/x/react-data-grid/tree-data/) and ["row grouping"](https://mui.com/x/react-data-grid/row-grouping/) features
103
+ - 💫 Support `minHeight` and `maxHeight` on flex parent container for the Data Grid component
104
+ - 🎁 Export `publicAPI` from the `useTreeItem2Utils` hook for the Tree View
105
+ - 🌍 Improve Bulgarian (bg-BG), Croatian (hr-HR), French (fr-FR), German (de-DE), Japanese (ja-JP) and Vietnamese (vi-VN) locales and add Portuguese (pt-PT) locale on the Data Grid component
106
+ - 🌏 Improve Czech (cs-CZ) and Portuguese (pt-BR) locales and add Bulgarian (bg-BG), Croatian (hr-HR) and Portuguese (pt-PT) locales on the Pickers components
107
+ - 🐞 Bugfixes
108
+ - 📚 Documentation improvements
109
+
110
+ Special thanks goes out to our community contributors who have helped make this release possible:
111
+ @AWAIS97, @chucamphong, @GMchris, @JakubSveda, @k-rajat19, @k725, @lhilgert9, @ruiaraujo012, @Sanderand, @thomasmoon, @vallereaugabriel.
112
+ Following are all team members who have contributed to this release:
113
+ @alexfauquette, @arminmeh, @arthurbalduini, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @romgrk, @sai6855, @samuelsycamore.
114
+
115
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
116
+
117
+ ### Data Grid
118
+
119
+ #### `@mui/x-data-grid@7.19.0`
120
+
121
+ - [DataGrid] Fix column definition `undefined` value (#14456) @sai6855
122
+ - [DataGrid] Fix `checkboxSelectionVisibleOnly` reset the selection on filtering (#14677) @MBilalShafi
123
+ - [DataGrid] Fix background colors when `CSSVarsProvider` is used (#12901) @cherniavskii
124
+ - [DataGrid] Fix error when initializing aggregation with row spanning (#14710) @MBilalShafi
125
+ - [DataGrid] Fix scroll to cell logic for keyboard navigating cells and drag selection with pinned columns (#14550) @KenanYusuf
126
+ - [DataGrid] Support `minHeight` and `maxHeight` on flex parent container (#14614) @cherniavskii
127
+ - [l10n] Add missing Portuguese (pt-PT) translations (#14707) @ruiaraujo012
128
+ - [l10n] Improve Bulgarian (bg-BG) locale (#14451) @GMchris
129
+ - [l10n] Improve Croatian (hr-HR) locale (#14794) @arminmeh
130
+ - [l10n] Improve French (fr-FR) locale (#14750) @vallereaugabriel
131
+ - [l10n] Improve German (de-DE) locale (#14755) @lhilgert9
132
+ - [l10n] Improve Japanese (ja-JP) locale (#14381) @k725
133
+ - [l10n] Improve Vietnamese (vi-VN) locale (#14769) @chucamphong
134
+
135
+ #### `@mui/x-data-grid-pro@7.19.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
136
+
137
+ Same changes as in `@mui/x-data-grid@7.19.0`, plus:
138
+
139
+ - [DataGridPro] Fix dragging styles removal in column reorder (#14680) @k-rajat19
140
+ - [DataGridPro] Fix row pre-processing running with a stale data source (#14810) @MBilalShafi
141
+ - [DataGridPro] Fix `onRowsScrollEnd` not firing on very fast scrolling (#14171) @arminmeh
142
+
143
+ #### `@mui/x-data-grid-premium@7.19.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
144
+
145
+ Same changes as in `@mui/x-data-grid-pro@7.19.0`, plus:
146
+
147
+ - [DataGridPremium] Automatic parents and children selection (#13757) @MBilalShafi
148
+
149
+ ### Date and Time Pickers
150
+
151
+ #### `@mui/x-date-pickers@7.19.0`
152
+
153
+ - [pickers] Fix left-right keyboard nav with `yearsOrder="desc"` and `direction="rtl"` (#14682) @thomasmoon
154
+ - [pickers] Improve `PickerValidDate` type (#14771) @flaviendelangle
155
+ - [pickers] Improve typing of the range pickers (#14716) @flaviendelangle
156
+ - [l10n] Add Bulgarian (bg-BG) locale (#14469) @GMchris
157
+ - [l10n] Add Croatian (hr-HR) locale (#14795) @arminmeh
158
+ - [l10n] Add Portuguese (pt-PT) locale (#14722) @ruiaraujo012
159
+ - [l10n] Improve Czech (cs-CZ) locale (#14732) @JakubSveda
160
+ - [l10n] Improve Portuguese (pt-BR) locale (#14725) @arthurbalduini
161
+
162
+ #### `@mui/x-date-pickers-pro@7.19.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
163
+
164
+ Same changes as in `@mui/x-date-pickers@7.19.0`.
165
+
166
+ ### Charts
167
+
168
+ #### `@mui/x-charts@7.19.0`
169
+
170
+ - [charts] Fix `LineChart` area animation being stuck when resizing container (#14711) @alexfauquette
171
+ - [charts] Improve types and start using `warnOnce` (#14792) @JCQuintas
172
+
173
+ #### `@mui/x-charts-pro@7.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
174
+
175
+ Same changes as in `@mui/x-charts@7.19.0`.
176
+
177
+ ### Tree View
178
+
179
+ #### `@mui/x-tree-view@7.19.0`
180
+
181
+ - [TreeView] Apply experimental features in `getDefaultizedParams` instead of in the plugin render (#14661) @flaviendelangle
182
+ - [TreeView] Export `publicAPI` form `useTreeItem2Utils` (#14729) @noraleonte
183
+ - [TreeView] Fix cursor navigation interfering with browser shortcut keys (#14798) @sai6855
184
+ - [TreeView] Fix invalid test for items reordering (#14665) @flaviendelangle
185
+ - [TreeView] Remove `instance.getTreeItemIdAttribute` (#14667) @flaviendelangle
186
+
187
+ ### Docs
188
+
189
+ - [docs] Added warning callout for Firefox reordering bug (#14516) @michelengelen
190
+ - [docs] Copyedit `pages.ts` navigation (#14782) @samuelsycamore
191
+ - [docs] Fix typo in row spanning doc (#14770) @flaviendelangle
192
+ - [docs] Fix typo in the Tree View migration guide to v7 (#14727) @Sanderand
193
+ - [docs] Fix typo in usage of Moment guide for UTC and timezones (#14780) @AWAIS97
194
+ - [docs] Fix what's new link to use absolute URL (#14543) @oliviertassinari
195
+
196
+ ### Core
197
+
198
+ - [core] Fix class name composition order (#14775) @oliviertassinari
199
+ - [core] Replace minWidth, maxWidth with width (#14776) @oliviertassinari
200
+ - [code-infra] Remove custom playwright installation steps (#14728) @Janpot
201
+ - [code-infra] Replace or remove all instances of `e` identifier (#14724) @samuelsycamore
202
+ - [infra] Adds community contribution section to the changelog script (#14799) @michelengelen
203
+ - [infra] Fix line break in Stack Overflow message @oliviertassinari
204
+ - [test] Fix `Escape` event firing event (#14797) @oliviertassinari
205
+
6
206
  ## 7.18.0
7
207
 
8
208
  _Sep 20, 2024_
@@ -11,7 +211,7 @@ We'd like to offer a big thanks to the 14 contributors who made this release pos
11
211
 
12
212
  - 💫 Support [Row spanning](https://mui.com/x/react-data-grid/row-spanning/) on the Data Grid that automatically merges the consecutive cells in a column based on the cell value
13
213
 
14
- <img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="data grid row spanning" />
214
+ <img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="Data Grid row spanning" />
15
215
 
16
216
  - ⏰ Support `date-fns` v4 (#14673) @LukasTy
17
217
  - 🎉 Add option for Pickers to change the order of displayed years (#11780) @thomasmoon
@@ -450,7 +650,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
450
650
  #### `@mui/x-data-grid@7.13.0`
451
651
 
452
652
  - [DataGrid] Fix CSV export for `null` and `undefined` values (#14166) @k-rajat19
453
- - [DataGrid] Fix error logged during skeleton loading with nested data grid (#14186) @KenanYusuf
653
+ - [DataGrid] Fix error logged during skeleton loading with nested Data Grid (#14186) @KenanYusuf
454
654
  - [DataGrid] Remove needless check in `useGridStateInitialization` (#14181) @k-rajat19
455
655
  - [DataGrid] Add recipe for persisting filters in local storage (#14208) @cherniavskii
456
656
  - [l10n] Improve Vietnamese (vi-VN) locale (#14216) @hungnd-casso
@@ -568,6 +768,8 @@ Same changes as in `@mui/x-charts@7.12.1`, plus:
568
768
 
569
769
  #### `@mui/x-tree-view@7.12.1`
570
770
 
771
+ No changes since `@mui/x-tree-view@7.12.0`.
772
+
571
773
  ### Docs
572
774
 
573
775
  - [docs] Add a warning to promote the usage of `updateRows` (#14027) @MBilalShafi
@@ -1418,7 +1620,7 @@ Same changes as in `@mui/x-date-pickers@7.6.0`.
1418
1620
  - [docs] Fix a small typo in property comment (#13245) @Janpot
1419
1621
  - [docs] Improve the Data Grid FAQ page (#13258) @MBilalShafi
1420
1622
  - [docs] Removes unused lines in TreeItem2 styling (#13264) @arthurbalduini
1421
- - [docs] Small improvements on accessibility data grid doc (#13233) @arthurbalduini
1623
+ - [docs] Small improvements on accessibility Data Grid doc (#13233) @arthurbalduini
1422
1624
  - [docs] Update Pickers demo configurations (#13303) @LukasTy
1423
1625
 
1424
1626
  ### Core
@@ -1432,7 +1634,7 @@ Same changes as in `@mui/x-date-pickers@7.6.0`.
1432
1634
  - [test] Use test-utils from npm (#12880) @michaldudak
1433
1635
  - [typescript] Remove duplicate `DateRangePosition` type in favor of `RangePosition` (#13288) @LukasTy
1434
1636
 
1435
- ## v7.5.1
1637
+ ## 7.5.1
1436
1638
 
1437
1639
  _May 23, 2024_
1438
1640
 
@@ -1492,7 +1694,7 @@ Same changes as in `@mui/x-date-pickers@7.5.1`.
1492
1694
  - [code-infra] Run corepack enable on all CI jobs (#13205) @Janpot
1493
1695
  - [code-infra] Use `nx` for lerna tasks (#13166) @LukasTy
1494
1696
 
1495
- ## v7.5.0
1697
+ ## 7.5.0
1496
1698
 
1497
1699
  _May 17, 2024_
1498
1700
 
@@ -2017,7 +2219,7 @@ Same changes as in `@mui/x-date-pickers@7.1.1`, plus:
2017
2219
  - [docs] Fix typo in `getItemId` prop description (#12637) @flaviendelangle
2018
2220
  - [docs] Make the Charts `margin` usage more visible (#12591) @alexfauquette
2019
2221
  - [docs] Match IE 11 spacing with Material UI @oliviertassinari
2020
- - [docs] Move data grid interfaces to standard API page layout (#12016) @alexfauquette
2222
+ - [docs] Move Data Grid interfaces to standard API page layout (#12016) @alexfauquette
2021
2223
  - [docs] Remove ` around @default values (#12158) @alexfauquette
2022
2224
  - [docs] Remove `day` from the default `dayOfWeekFormatter` function params (#12644) @LukasTy
2023
2225
  - [docs] Use `TreeItem2` for icon expansion example on `RichTreeView` (#12563) @flaviendelangle
@@ -3458,7 +3660,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
3458
3660
  - [docs] Fix generated tree view API docs (#11737) @LukasTy
3459
3661
  - [docs] Generate docs for Tree View slots (#11730) @flaviendelangle
3460
3662
  - [docs] Improve codemod for v7 (#11650) @oliviertassinari
3461
- - [docs] Improve data grid `pageSizeOptions` prop documentation (#11682) @oliviertassinari
3663
+ - [docs] Improve Data Grid `pageSizeOptions` prop documentation (#11682) @oliviertassinari
3462
3664
  - [docs] Parse markdown on API docs demo titles (#11728) @LukasTy
3463
3665
  - [docs] Remove the description from the `className` prop (#11693) @oliviertassinari
3464
3666
  - [docs] Uplift `SimpleTreeView` customization examples (#11424) @noraleonte
@@ -3546,8 +3748,8 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.8`.
3546
3748
  - [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11628) @LukasTy
3547
3749
  - [docs] Improve `git diff` format @oliviertassinari
3548
3750
  - [docs] Push up the MUI X brand (#11533) @oliviertassinari
3549
- - [docs] Remove old data grid translation files (#11646) @cherniavskii
3550
- - [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
3751
+ - [docs] Remove old Data Grid translation files (#11646) @cherniavskii
3752
+ - [docs] Improve Server-side Data Grid docs (#11589) @oliviertassinari
3551
3753
  - [docs] Improve charts landing page (#11570) @oliviertassinari
3552
3754
 
3553
3755
  ### Core
@@ -4057,7 +4259,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
4057
4259
 
4058
4260
  - The clipboard related exports `ignoreValueFormatterDuringExport` and `splitClipboardPastedText` are no longer prefixed with `unstable_`.
4059
4261
 
4060
- - The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.
4262
+ - The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the Data Grid exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.
4061
4263
 
4062
4264
  - The `slots.preferencesPanel` slot and the `slotProps.preferencesPanel` prop were removed. Use `slots.panel` and `slotProps.panel` instead.
4063
4265
 
@@ -4769,7 +4971,7 @@ A special shoutout to thank the 12 contributors who made this release possible.
4769
4971
  - 🚀 First v7 alpha release
4770
4972
  - ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
4771
4973
  - 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/)
4772
- - 💫 New recipes added for the data grid
4974
+ - 💫 New recipes added for the Data Grid
4773
4975
  - 📈 `<ChartsReferenceLine />` component is now available
4774
4976
  - 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
4775
4977
  - 🐞 Bugfixes
@@ -12,7 +12,7 @@ function DataGrid() {
12
12
  if (process.env.NODE_ENV === 'production') {
13
13
  return null;
14
14
  }
15
- throw new Error(["You try to import `DataGrid` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
15
+ throw new Error(["You try to import Data Grid from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
16
16
  }
17
17
 
18
18
  /**
@@ -22,5 +22,5 @@ function DataGridPro() {
22
22
  if (process.env.NODE_ENV === 'production') {
23
23
  return null;
24
24
  }
25
- throw new Error(["You try to import `DataGridPro` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
25
+ throw new Error(["You try to import Data Grid Pro from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
26
26
  }
@@ -94,6 +94,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
94
94
  /**
95
95
  * If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
96
96
  * @default false
97
+ * @deprecated Use flex parent container instead: https://mui.com/x/react-data-grid/layout/#flex-parent-container
98
+ * @example
99
+ * <div style={{ display: 'flex', flexDirection: 'column' }}>
100
+ * <DataGrid />
101
+ * </div>
97
102
  */
98
103
  autoHeight: _propTypes.default.bool,
99
104
  /**
@@ -414,7 +419,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
414
419
  */
415
420
  headerFilterHeight: _propTypes.default.number,
416
421
  /**
417
- * If `true`, enables the data grid filtering on header feature.
422
+ * If `true`, the header filters feature is enabled.
418
423
  * @default false
419
424
  */
420
425
  headerFilters: _propTypes.default.bool,
@@ -608,6 +613,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
608
613
  * @param {GridCallbackDetails} details Additional details for this callback.
609
614
  */
610
615
  onColumnHeaderClick: _propTypes.default.func,
616
+ /**
617
+ * Callback fired when a contextmenu event comes from a column header element.
618
+ * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
619
+ * @param {MuiEvent<React.MouseEvent>} event The event object.
620
+ */
621
+ onColumnHeaderContextMenu: _propTypes.default.func,
611
622
  /**
612
623
  * Callback fired when a double click event comes from a column header element.
613
624
  * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
@@ -884,6 +895,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
884
895
  * @template R
885
896
  * @param {R} newRow Row object with the new values.
886
897
  * @param {R} oldRow Row object with the old values.
898
+ * @param {{ rowId: GridRowId }} params Additional parameters.
887
899
  * @returns {Promise<R> | R} The final values to update the row.
888
900
  */
889
901
  processRowUpdate: _propTypes.default.func,
@@ -948,6 +960,22 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
948
960
  * Sets the row selection model of the Data Grid.
949
961
  */
950
962
  rowSelectionModel: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired), _propTypes.default.number, _propTypes.default.string]),
963
+ /**
964
+ * When `rowSelectionPropagation.descendants` is set to `true`.
965
+ * - Selecting a parent selects all its filtered descendants automatically.
966
+ * - Deselecting a parent row deselects all its filtered descendants automatically.
967
+ *
968
+ * When `rowSelectionPropagation.parents` is set to `true`
969
+ * - Selecting all the filtered descendants of a parent selects the parent automatically.
970
+ * - Deselecting a descendant of a selected parent deselects the parent automatically.
971
+ *
972
+ * Works with tree data and row grouping on the client-side only.
973
+ * @default { parents: false, descendants: false }
974
+ */
975
+ rowSelectionPropagation: _propTypes.default.shape({
976
+ descendants: _propTypes.default.bool,
977
+ parents: _propTypes.default.bool
978
+ }),
951
979
  /**
952
980
  * Loading rows can be processed on the server or client-side.
953
981
  * Set it to 'client' if you would like enable infnite loading.
@@ -6,9 +6,9 @@ export declare const GRID_COLUMN_MENU_SLOTS_PREMIUM: {
6
6
  columnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
7
7
  columnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
8
8
  columnMenuPinningItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuPinningItem;
9
- columnMenuSortItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuSortItem;
10
- columnMenuFilterItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuFilterItem;
11
- columnMenuColumnsItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuColumnsItem;
9
+ columnMenuSortItem: typeof import("@mui/x-data-grid").GridColumnMenuSortItem;
10
+ columnMenuFilterItem: typeof import("@mui/x-data-grid").GridColumnMenuFilterItem;
11
+ columnMenuColumnsItem: typeof import("@mui/x-data-grid").GridColumnMenuColumnsItem;
12
12
  };
13
13
  export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
14
14
  columnMenuAggregationItem: {
@@ -5,7 +5,7 @@ export function DataGrid() {
5
5
  if (process.env.NODE_ENV === 'production') {
6
6
  return null;
7
7
  }
8
- throw new Error(["You try to import `DataGrid` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
8
+ throw new Error(["You try to import Data Grid from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
9
9
  }
10
10
 
11
11
  /**
@@ -15,5 +15,5 @@ export function DataGridPro() {
15
15
  if (process.env.NODE_ENV === 'production') {
16
16
  return null;
17
17
  }
18
- throw new Error(["You try to import `DataGridPro` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
18
+ throw new Error(["You try to import Data Grid Pro from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
19
19
  }
@@ -87,6 +87,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
87
87
  /**
88
88
  * If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
89
89
  * @default false
90
+ * @deprecated Use flex parent container instead: https://mui.com/x/react-data-grid/layout/#flex-parent-container
91
+ * @example
92
+ * <div style={{ display: 'flex', flexDirection: 'column' }}>
93
+ * <DataGrid />
94
+ * </div>
90
95
  */
91
96
  autoHeight: PropTypes.bool,
92
97
  /**
@@ -407,7 +412,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
407
412
  */
408
413
  headerFilterHeight: PropTypes.number,
409
414
  /**
410
- * If `true`, enables the data grid filtering on header feature.
415
+ * If `true`, the header filters feature is enabled.
411
416
  * @default false
412
417
  */
413
418
  headerFilters: PropTypes.bool,
@@ -601,6 +606,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
601
606
  * @param {GridCallbackDetails} details Additional details for this callback.
602
607
  */
603
608
  onColumnHeaderClick: PropTypes.func,
609
+ /**
610
+ * Callback fired when a contextmenu event comes from a column header element.
611
+ * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
612
+ * @param {MuiEvent<React.MouseEvent>} event The event object.
613
+ */
614
+ onColumnHeaderContextMenu: PropTypes.func,
604
615
  /**
605
616
  * Callback fired when a double click event comes from a column header element.
606
617
  * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
@@ -877,6 +888,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
877
888
  * @template R
878
889
  * @param {R} newRow Row object with the new values.
879
890
  * @param {R} oldRow Row object with the old values.
891
+ * @param {{ rowId: GridRowId }} params Additional parameters.
880
892
  * @returns {Promise<R> | R} The final values to update the row.
881
893
  */
882
894
  processRowUpdate: PropTypes.func,
@@ -941,6 +953,22 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
941
953
  * Sets the row selection model of the Data Grid.
942
954
  */
943
955
  rowSelectionModel: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired), PropTypes.number, PropTypes.string]),
956
+ /**
957
+ * When `rowSelectionPropagation.descendants` is set to `true`.
958
+ * - Selecting a parent selects all its filtered descendants automatically.
959
+ * - Deselecting a parent row deselects all its filtered descendants automatically.
960
+ *
961
+ * When `rowSelectionPropagation.parents` is set to `true`
962
+ * - Selecting all the filtered descendants of a parent selects the parent automatically.
963
+ * - Deselecting a descendant of a selected parent deselects the parent automatically.
964
+ *
965
+ * Works with tree data and row grouping on the client-side only.
966
+ * @default { parents: false, descendants: false }
967
+ */
968
+ rowSelectionPropagation: PropTypes.shape({
969
+ descendants: PropTypes.bool,
970
+ parents: PropTypes.bool
971
+ }),
944
972
  /**
945
973
  * Loading rows can be processed on the server or client-side.
946
974
  * Set it to 'client' if you would like enable infnite loading.
@@ -169,7 +169,7 @@ export const getAggregationFunctionLabel = ({
169
169
  }
170
170
  try {
171
171
  return apiRef.current.getLocaleText(`aggregationFunctionLabel${capitalize(aggregationRule.aggregationFunctionName)}`);
172
- } catch (e) {
172
+ } catch {
173
173
  return aggregationRule.aggregationFunctionName;
174
174
  }
175
175
  };
@@ -12,8 +12,8 @@ const getAggregationValueWrappedValueGetter = ({
12
12
  getCellAggregationResult
13
13
  }) => {
14
14
  const wrappedValueGetter = (value, row, column, apiRef) => {
15
- const rowId = apiRef.current.getRowId(row);
16
- const cellAggregationResult = getCellAggregationResult(rowId, column.field);
15
+ const rowId = apiRef.current.getRowId?.(row);
16
+ const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
17
17
  if (cellAggregationResult != null) {
18
18
  return cellAggregationResult?.value ?? null;
19
19
  }
@@ -191,9 +191,10 @@ export const useGridCellSelection = (apiRef, props) => {
191
191
  y: mouseY
192
192
  } = mousePosition.current;
193
193
  const {
194
- height,
195
- width
196
- } = dimensions.viewportInnerSize;
194
+ width,
195
+ height: viewportOuterHeight
196
+ } = dimensions.viewportOuterSize;
197
+ const height = viewportOuterHeight - totalHeaderHeight;
197
198
  let deltaX = 0;
198
199
  let deltaY = 0;
199
200
  let factor = 0;
@@ -227,7 +228,7 @@ export const useGridCellSelection = (apiRef, props) => {
227
228
  autoScrollRAF.current = requestAnimationFrame(autoScroll);
228
229
  }
229
230
  autoScroll();
230
- }, [apiRef, dimensions]);
231
+ }, [apiRef, dimensions, totalHeaderHeight]);
231
232
  const handleCellMouseOver = React.useCallback((params, event) => {
232
233
  if (!lastMouseDownCell.current) {
233
234
  return;
@@ -249,9 +250,10 @@ export const useGridCellSelection = (apiRef, props) => {
249
250
  y
250
251
  } = virtualScrollerRect;
251
252
  const {
252
- height,
253
- width
254
- } = dimensions.viewportInnerSize;
253
+ width,
254
+ height: viewportOuterHeight
255
+ } = dimensions.viewportOuterSize;
256
+ const height = viewportOuterHeight - totalHeaderHeight;
255
257
  const mouseX = event.clientX - x;
256
258
  const mouseY = event.clientY - y - totalHeaderHeight;
257
259
  mousePosition.current = {
@@ -126,7 +126,9 @@ class CellValueUpdater {
126
126
  };
127
127
  try {
128
128
  const oldRow = apiRef.current.getRow(rowId);
129
- const finalRowUpdate = await processRowUpdate(newRow, oldRow);
129
+ const finalRowUpdate = await processRowUpdate(newRow, oldRow, {
130
+ rowId
131
+ });
130
132
  this.updateRow(finalRowUpdate);
131
133
  } catch (error) {
132
134
  handleError(error);
@@ -7,9 +7,9 @@ export { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
7
7
  */
8
8
 
9
9
  /**
10
- * The state of `DataGridPremium`.
10
+ * The state of Data Grid Premium.
11
11
  */
12
12
 
13
13
  /**
14
- * The initial state of `DataGridPremium`.
14
+ * The initial state of Data Grid Premium.
15
15
  */
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNjc4NjgwMDAwMA==";
3
+ const releaseInfo = "MTcyODU5NzYwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -183,7 +183,7 @@ const getAggregationFunctionLabel = ({
183
183
  }
184
184
  try {
185
185
  return apiRef.current.getLocaleText(`aggregationFunctionLabel${(0, _utils.unstable_capitalize)(aggregationRule.aggregationFunctionName)}`);
186
- } catch (e) {
186
+ } catch {
187
187
  return aggregationRule.aggregationFunctionName;
188
188
  }
189
189
  };
@@ -35,40 +35,40 @@ export declare const unwrapColumnFromAggregation: ({ column, }: {
35
35
  maxWidth?: number;
36
36
  hideable?: boolean;
37
37
  sortable?: boolean;
38
- sortingOrder?: readonly import("@mui/x-data-grid-pro").GridSortDirection[];
38
+ sortingOrder?: readonly import("@mui/x-data-grid").GridSortDirection[];
39
39
  resizable?: boolean;
40
40
  editable?: boolean;
41
41
  groupable?: boolean;
42
42
  pinnable?: boolean;
43
- sortComparator?: import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined;
44
- getSortComparator?: ((sortDirection: import("@mui/x-data-grid-pro").GridSortDirection) => import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined) | undefined;
45
- type?: import("@mui/x-data-grid-pro").GridColType;
46
- align?: import("@mui/x-data-grid-pro").GridAlignment;
47
- valueGetter?: import("@mui/x-data-grid-pro").GridValueGetter<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, never> | undefined;
48
- rowSpanValueGetter?: import("@mui/x-data-grid-pro").GridValueGetter<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, never> | undefined;
49
- valueSetter?: import("@mui/x-data-grid-pro").GridValueSetter<import("@mui/x-data-grid-pro").GridValidRowModel, any, any> | undefined;
50
- valueFormatter?: import("@mui/x-data-grid-pro").GridValueFormatter<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, never> | undefined;
51
- valueParser?: import("@mui/x-data-grid-pro").GridValueParser<import("@mui/x-data-grid-pro").GridValidRowModel, any, any> | undefined;
52
- cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType<import("@mui/x-data-grid-pro").GridValidRowModel, any> | undefined;
43
+ sortComparator?: import("@mui/x-data-grid").GridComparatorFn<any> | undefined;
44
+ getSortComparator?: ((sortDirection: import("@mui/x-data-grid").GridSortDirection) => import("@mui/x-data-grid").GridComparatorFn<any> | undefined) | undefined;
45
+ type?: import("@mui/x-data-grid").GridColType;
46
+ align?: import("@mui/x-data-grid").GridAlignment;
47
+ valueGetter?: import("@mui/x-data-grid").GridValueGetter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
48
+ rowSpanValueGetter?: import("@mui/x-data-grid").GridValueGetter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
49
+ valueSetter?: import("@mui/x-data-grid").GridValueSetter<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
50
+ valueFormatter?: import("@mui/x-data-grid").GridValueFormatter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
51
+ valueParser?: import("@mui/x-data-grid").GridValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
52
+ cellClassName?: import("@mui/x-data-grid").GridCellClassNamePropType<import("@mui/x-data-grid").GridValidRowModel, any> | undefined;
53
53
  display?: "text" | "flex";
54
- renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
55
- renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
56
- preProcessEditCellProps?: ((params: import("@mui/x-data-grid-pro").GridPreProcessEditCellProps) => import("@mui/x-data-grid-pro").GridEditCellProps | Promise<import("@mui/x-data-grid-pro").GridEditCellProps>) | undefined;
57
- headerClassName?: import("@mui/x-data-grid-pro").GridColumnHeaderClassNamePropType;
58
- renderHeader?: ((params: import("@mui/x-data-grid-pro").GridColumnHeaderParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any>) => React.ReactNode) | undefined;
59
- headerAlign?: import("@mui/x-data-grid-pro").GridAlignment;
54
+ renderCell?: ((params: import("@mui/x-data-grid").GridRenderCellParams<import("@mui/x-data-grid").GridValidRowModel, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
55
+ renderEditCell?: ((params: import("@mui/x-data-grid").GridRenderEditCellParams<import("@mui/x-data-grid").GridValidRowModel, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
56
+ preProcessEditCellProps?: ((params: import("@mui/x-data-grid").GridPreProcessEditCellProps) => import("@mui/x-data-grid").GridEditCellProps | Promise<import("@mui/x-data-grid").GridEditCellProps>) | undefined;
57
+ headerClassName?: import("@mui/x-data-grid").GridColumnHeaderClassNamePropType;
58
+ renderHeader?: ((params: import("@mui/x-data-grid").GridColumnHeaderParams<import("@mui/x-data-grid").GridValidRowModel, any, any>) => React.ReactNode) | undefined;
59
+ headerAlign?: import("@mui/x-data-grid").GridAlignment;
60
60
  hideSortIcons?: boolean;
61
61
  disableColumnMenu?: boolean;
62
62
  filterable?: boolean;
63
- filterOperators?: readonly GridFilterOperator<import("@mui/x-data-grid-pro").GridValidRowModel, any, any>[] | undefined;
64
- getApplyQuickFilterFn?: import("@mui/x-data-grid-pro").GetApplyQuickFilterFn<import("@mui/x-data-grid-pro").GridValidRowModel, any> | undefined;
63
+ filterOperators?: readonly GridFilterOperator<import("@mui/x-data-grid").GridValidRowModel, any, any>[] | undefined;
64
+ getApplyQuickFilterFn?: import("@mui/x-data-grid").GetApplyQuickFilterFn<import("@mui/x-data-grid").GridValidRowModel, any> | undefined;
65
65
  disableReorder?: boolean;
66
66
  disableExport?: boolean;
67
- colSpan?: number | import("@mui/x-data-grid-pro").GridColSpanFn<import("@mui/x-data-grid-pro").GridValidRowModel, any, any> | undefined;
67
+ colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
68
68
  renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
69
69
  aggregable?: boolean;
70
70
  availableAggregationFunctions?: string[];
71
- groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid-pro").GridValidRowModel> | undefined;
72
- pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid-pro").GridValidRowModel, any, any> | undefined;
71
+ groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
72
+ pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
73
73
  };
74
74
  export {};
@@ -20,8 +20,8 @@ const getAggregationValueWrappedValueGetter = ({
20
20
  getCellAggregationResult
21
21
  }) => {
22
22
  const wrappedValueGetter = (value, row, column, apiRef) => {
23
- const rowId = apiRef.current.getRowId(row);
24
- const cellAggregationResult = getCellAggregationResult(rowId, column.field);
23
+ const rowId = apiRef.current.getRowId?.(row);
24
+ const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
25
25
  if (cellAggregationResult != null) {
26
26
  return cellAggregationResult?.value ?? null;
27
27
  }
@@ -200,9 +200,10 @@ const useGridCellSelection = (apiRef, props) => {
200
200
  y: mouseY
201
201
  } = mousePosition.current;
202
202
  const {
203
- height,
204
- width
205
- } = dimensions.viewportInnerSize;
203
+ width,
204
+ height: viewportOuterHeight
205
+ } = dimensions.viewportOuterSize;
206
+ const height = viewportOuterHeight - totalHeaderHeight;
206
207
  let deltaX = 0;
207
208
  let deltaY = 0;
208
209
  let factor = 0;
@@ -236,7 +237,7 @@ const useGridCellSelection = (apiRef, props) => {
236
237
  autoScrollRAF.current = requestAnimationFrame(autoScroll);
237
238
  }
238
239
  autoScroll();
239
- }, [apiRef, dimensions]);
240
+ }, [apiRef, dimensions, totalHeaderHeight]);
240
241
  const handleCellMouseOver = React.useCallback((params, event) => {
241
242
  if (!lastMouseDownCell.current) {
242
243
  return;
@@ -258,9 +259,10 @@ const useGridCellSelection = (apiRef, props) => {
258
259
  y
259
260
  } = virtualScrollerRect;
260
261
  const {
261
- height,
262
- width
263
- } = dimensions.viewportInnerSize;
262
+ width,
263
+ height: viewportOuterHeight
264
+ } = dimensions.viewportOuterSize;
265
+ const height = viewportOuterHeight - totalHeaderHeight;
264
266
  const mouseX = event.clientX - x;
265
267
  const mouseY = event.clientY - y - totalHeaderHeight;
266
268
  mousePosition.current = {
@@ -134,7 +134,9 @@ class CellValueUpdater {
134
134
  };
135
135
  try {
136
136
  const oldRow = apiRef.current.getRow(rowId);
137
- const finalRowUpdate = await processRowUpdate(newRow, oldRow);
137
+ const finalRowUpdate = await processRowUpdate(newRow, oldRow, {
138
+ rowId
139
+ });
138
140
  this.updateRow(finalRowUpdate);
139
141
  } catch (error) {
140
142
  handleError(error);
@@ -1,3 +1,3 @@
1
1
  import { GridStatePremium } from '../../../models/gridStatePremium';
2
- export declare const gridRowGroupingModelSelector: import("@mui/x-data-grid-pro").OutputSelector<GridStatePremium, import("./gridRowGroupingInterfaces").GridRowGroupingModel>;
3
- export declare const gridRowGroupingSanitizedModelSelector: import("@mui/x-data-grid-pro").OutputSelector<GridStatePremium, string[]>;
2
+ export declare const gridRowGroupingModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridRowGroupingInterfaces").GridRowGroupingModel>;
3
+ export declare const gridRowGroupingSanitizedModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, string[]>;
@@ -1 +1 @@
1
- export declare const useGridRowAriaAttributes: () => (rowNode: import("@mui/x-data-grid").GridTreeNode, index: number) => import("react").HTMLAttributes<HTMLElement>;
1
+ export declare const useGridRowAriaAttributes: () => (rowNode: import("@mui/x-data-grid").GridTreeNode, index: number) => React.HTMLAttributes<HTMLElement>;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v7.18.0
2
+ * @mui/x-data-grid-premium v7.20.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  declare const materialSlots: {
2
- columnMenuUngroupIcon: import("react").JSXElementConstructor<any>;
3
- columnMenuGroupIcon: import("react").JSXElementConstructor<any>;
4
- columnMenuAggregationIcon: import("react").JSXElementConstructor<any>;
2
+ columnMenuUngroupIcon: React.JSXElementConstructor<any>;
3
+ columnMenuGroupIcon: React.JSXElementConstructor<any>;
4
+ columnMenuAggregationIcon: React.JSXElementConstructor<any>;
5
5
  };
6
6
  export default materialSlots;
@@ -30,13 +30,13 @@ export interface DataGridPremiumPropsWithComplexDefaultValueAfterProcessing exte
30
30
  slots: GridPremiumSlotsComponent;
31
31
  }
32
32
  /**
33
- * The props of the `DataGridPremium` component after the pre-processing phase.
33
+ * The props of the Data Grid Premium component after the pre-processing phase.
34
34
  */
35
35
  export interface DataGridPremiumProcessedProps extends DataGridPremiumPropsWithDefaultValue, DataGridPremiumPropsWithComplexDefaultValueAfterProcessing, DataGridPremiumPropsWithoutDefaultValue {
36
36
  }
37
37
  export type DataGridPremiumForcedPropsKey = 'signature';
38
38
  /**
39
- * The `DataGridPremium` options with a default value overridable through props.
39
+ * The Data Grid Premium options with a default value overridable through props.
40
40
  * None of the entry of this interface should be optional, they all have default values and `DataGridProps` already applies a `Partial<DataGridSimpleOptions>` for the public interface.
41
41
  * The controlled model do not have a default value at the prop processing level, so they must be defined in `DataGridOtherProps`.
42
42
  */
@@ -5,7 +5,7 @@ import type { GridRowGroupingApi, GridExcelExportApi, GridAggregationApi } from
5
5
  import { GridCellSelectionApi } from '../hooks/features/cellSelection/gridCellSelectionInterfaces';
6
6
  import type { DataGridPremiumProcessedProps } from './dataGridPremiumProps';
7
7
  /**
8
- * The api of `DataGridPremium`.
8
+ * The api of Data Grid Premium.
9
9
  * TODO: Do not redefine manually the pro features
10
10
  */
11
11
  export interface GridApiPremium extends GridApiCommon<GridStatePremium, GridInitialStatePremium>, GridRowProApi, GridColumnPinningApi, GridDetailPanelApi, GridRowGroupingApi, GridExcelExportApi, GridAggregationApi, GridRowPinningApi, GridDataSourceApi, GridCellSelectionApi, GridRowMultiSelectionApi, GridColumnReorderApi {
@@ -1,7 +1,7 @@
1
1
  import { GridInitialState as GridInitialStatePro, GridState as GridStatePro } from '@mui/x-data-grid-pro';
2
2
  import type { GridRowGroupingState, GridRowGroupingInitialState, GridAggregationState, GridAggregationInitialState, GridCellSelectionModel } from '../hooks';
3
3
  /**
4
- * The state of `DataGridPremium`.
4
+ * The state of Data Grid Premium.
5
5
  */
6
6
  export interface GridStatePremium extends GridStatePro {
7
7
  rowGrouping: GridRowGroupingState;
@@ -9,7 +9,7 @@ export interface GridStatePremium extends GridStatePro {
9
9
  cellSelection: GridCellSelectionModel;
10
10
  }
11
11
  /**
12
- * The initial state of `DataGridPremium`.
12
+ * The initial state of Data Grid Premium.
13
13
  */
14
14
  export interface GridInitialStatePremium extends GridInitialStatePro {
15
15
  rowGrouping?: GridRowGroupingInitialState;
@@ -5,7 +5,7 @@ export function DataGrid() {
5
5
  if (process.env.NODE_ENV === 'production') {
6
6
  return null;
7
7
  }
8
- throw new Error(["You try to import `DataGrid` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
8
+ throw new Error(["You try to import Data Grid from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
9
9
  }
10
10
 
11
11
  /**
@@ -15,5 +15,5 @@ export function DataGridPro() {
15
15
  if (process.env.NODE_ENV === 'production') {
16
16
  return null;
17
17
  }
18
- throw new Error(["You try to import `DataGridPro` from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
18
+ throw new Error(["You try to import Data Grid Pro from @mui/x-data-grid-premium but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPremium } from '@mui/x-data-grid-premium'`.", ''].join('\n'));
19
19
  }
@@ -87,6 +87,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
87
87
  /**
88
88
  * If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
89
89
  * @default false
90
+ * @deprecated Use flex parent container instead: https://mui.com/x/react-data-grid/layout/#flex-parent-container
91
+ * @example
92
+ * <div style={{ display: 'flex', flexDirection: 'column' }}>
93
+ * <DataGrid />
94
+ * </div>
90
95
  */
91
96
  autoHeight: PropTypes.bool,
92
97
  /**
@@ -407,7 +412,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
407
412
  */
408
413
  headerFilterHeight: PropTypes.number,
409
414
  /**
410
- * If `true`, enables the data grid filtering on header feature.
415
+ * If `true`, the header filters feature is enabled.
411
416
  * @default false
412
417
  */
413
418
  headerFilters: PropTypes.bool,
@@ -601,6 +606,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
601
606
  * @param {GridCallbackDetails} details Additional details for this callback.
602
607
  */
603
608
  onColumnHeaderClick: PropTypes.func,
609
+ /**
610
+ * Callback fired when a contextmenu event comes from a column header element.
611
+ * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
612
+ * @param {MuiEvent<React.MouseEvent>} event The event object.
613
+ */
614
+ onColumnHeaderContextMenu: PropTypes.func,
604
615
  /**
605
616
  * Callback fired when a double click event comes from a column header element.
606
617
  * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
@@ -877,6 +888,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
877
888
  * @template R
878
889
  * @param {R} newRow Row object with the new values.
879
890
  * @param {R} oldRow Row object with the old values.
891
+ * @param {{ rowId: GridRowId }} params Additional parameters.
880
892
  * @returns {Promise<R> | R} The final values to update the row.
881
893
  */
882
894
  processRowUpdate: PropTypes.func,
@@ -941,6 +953,22 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
941
953
  * Sets the row selection model of the Data Grid.
942
954
  */
943
955
  rowSelectionModel: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired), PropTypes.number, PropTypes.string]),
956
+ /**
957
+ * When `rowSelectionPropagation.descendants` is set to `true`.
958
+ * - Selecting a parent selects all its filtered descendants automatically.
959
+ * - Deselecting a parent row deselects all its filtered descendants automatically.
960
+ *
961
+ * When `rowSelectionPropagation.parents` is set to `true`
962
+ * - Selecting all the filtered descendants of a parent selects the parent automatically.
963
+ * - Deselecting a descendant of a selected parent deselects the parent automatically.
964
+ *
965
+ * Works with tree data and row grouping on the client-side only.
966
+ * @default { parents: false, descendants: false }
967
+ */
968
+ rowSelectionPropagation: PropTypes.shape({
969
+ descendants: PropTypes.bool,
970
+ parents: PropTypes.bool
971
+ }),
944
972
  /**
945
973
  * Loading rows can be processed on the server or client-side.
946
974
  * Set it to 'client' if you would like enable infnite loading.
@@ -169,7 +169,7 @@ export const getAggregationFunctionLabel = ({
169
169
  }
170
170
  try {
171
171
  return apiRef.current.getLocaleText(`aggregationFunctionLabel${capitalize(aggregationRule.aggregationFunctionName)}`);
172
- } catch (e) {
172
+ } catch {
173
173
  return aggregationRule.aggregationFunctionName;
174
174
  }
175
175
  };
@@ -12,8 +12,8 @@ const getAggregationValueWrappedValueGetter = ({
12
12
  getCellAggregationResult
13
13
  }) => {
14
14
  const wrappedValueGetter = (value, row, column, apiRef) => {
15
- const rowId = apiRef.current.getRowId(row);
16
- const cellAggregationResult = getCellAggregationResult(rowId, column.field);
15
+ const rowId = apiRef.current.getRowId?.(row);
16
+ const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
17
17
  if (cellAggregationResult != null) {
18
18
  return cellAggregationResult?.value ?? null;
19
19
  }
@@ -191,9 +191,10 @@ export const useGridCellSelection = (apiRef, props) => {
191
191
  y: mouseY
192
192
  } = mousePosition.current;
193
193
  const {
194
- height,
195
- width
196
- } = dimensions.viewportInnerSize;
194
+ width,
195
+ height: viewportOuterHeight
196
+ } = dimensions.viewportOuterSize;
197
+ const height = viewportOuterHeight - totalHeaderHeight;
197
198
  let deltaX = 0;
198
199
  let deltaY = 0;
199
200
  let factor = 0;
@@ -227,7 +228,7 @@ export const useGridCellSelection = (apiRef, props) => {
227
228
  autoScrollRAF.current = requestAnimationFrame(autoScroll);
228
229
  }
229
230
  autoScroll();
230
- }, [apiRef, dimensions]);
231
+ }, [apiRef, dimensions, totalHeaderHeight]);
231
232
  const handleCellMouseOver = React.useCallback((params, event) => {
232
233
  if (!lastMouseDownCell.current) {
233
234
  return;
@@ -249,9 +250,10 @@ export const useGridCellSelection = (apiRef, props) => {
249
250
  y
250
251
  } = virtualScrollerRect;
251
252
  const {
252
- height,
253
- width
254
- } = dimensions.viewportInnerSize;
253
+ width,
254
+ height: viewportOuterHeight
255
+ } = dimensions.viewportOuterSize;
256
+ const height = viewportOuterHeight - totalHeaderHeight;
255
257
  const mouseX = event.clientX - x;
256
258
  const mouseY = event.clientY - y - totalHeaderHeight;
257
259
  mousePosition.current = {
@@ -126,7 +126,9 @@ class CellValueUpdater {
126
126
  };
127
127
  try {
128
128
  const oldRow = apiRef.current.getRow(rowId);
129
- const finalRowUpdate = await processRowUpdate(newRow, oldRow);
129
+ const finalRowUpdate = await processRowUpdate(newRow, oldRow, {
130
+ rowId
131
+ });
130
132
  this.updateRow(finalRowUpdate);
131
133
  } catch (error) {
132
134
  handleError(error);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v7.18.0
2
+ * @mui/x-data-grid-premium v7.20.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -7,9 +7,9 @@ export { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
7
7
  */
8
8
 
9
9
  /**
10
- * The state of `DataGridPremium`.
10
+ * The state of Data Grid Premium.
11
11
  */
12
12
 
13
13
  /**
14
- * The initial state of `DataGridPremium`.
14
+ * The initial state of Data Grid Premium.
15
15
  */
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNjc4NjgwMDAwMA==";
3
+ const releaseInfo = "MTcyODU5NzYwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-premium",
3
- "version": "7.18.0",
3
+ "version": "7.20.0",
4
4
  "description": "The Premium plan edition of the Data Grid Components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -33,17 +33,17 @@
33
33
  "directory": "packages/x-data-grid-premium"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.25.6",
37
- "@mui/utils": "^5.16.6",
36
+ "@babel/runtime": "^7.25.7",
37
+ "@mui/utils": "^5.16.6 || ^6.0.0",
38
38
  "@types/format-util": "^1.0.4",
39
39
  "clsx": "^2.1.1",
40
40
  "exceljs": "^4.4.0",
41
41
  "prop-types": "^15.8.1",
42
42
  "reselect": "^5.1.1",
43
- "@mui/x-data-grid": "7.18.0",
44
- "@mui/x-internals": "7.18.0",
45
- "@mui/x-license": "7.18.0",
46
- "@mui/x-data-grid-pro": "7.18.0"
43
+ "@mui/x-data-grid": "7.20.0",
44
+ "@mui/x-internals": "7.20.0",
45
+ "@mui/x-data-grid-pro": "7.20.0",
46
+ "@mui/x-license": "7.20.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@emotion/react": "^11.9.0",
@@ -8,10 +8,10 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
8
8
  */
9
9
  export type GridApi = GridApiPremium;
10
10
  /**
11
- * The state of `DataGridPremium`.
11
+ * The state of Data Grid Premium.
12
12
  */
13
13
  export type GridState = GridStatePremium;
14
14
  /**
15
- * The initial state of `DataGridPremium`.
15
+ * The initial state of Data Grid Premium.
16
16
  */
17
17
  export type GridInitialState = GridInitialStatePremium;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcyNjc4NjgwMDAwMA==";
9
+ const releaseInfo = "MTcyODU5NzYwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat