@mui/x-data-grid-pro 5.11.0 → 5.12.1

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 (120) hide show
  1. package/CHANGELOG.md +237 -16
  2. package/DataGridPro/DataGridPro.js +26 -27
  3. package/DataGridPro/useDataGridProComponent.js +0 -5
  4. package/DataGridPro/useDataGridProProps.js +6 -27
  5. package/LICENSE +3 -3
  6. package/README.md +3 -4
  7. package/components/DataGridProVirtualScroller.d.ts +1 -1
  8. package/components/DataGridProVirtualScroller.js +6 -3
  9. package/components/GridRowReorderCell.js +6 -6
  10. package/hooks/features/columnPinning/gridColumnPinningInterface.d.ts +6 -0
  11. package/hooks/features/columnPinning/useGridColumnPinning.js +73 -28
  12. package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +67 -4
  13. package/hooks/features/columnResize/useGridColumnResize.js +32 -15
  14. package/hooks/features/detailPanel/useGridDetailPanel.js +1 -1
  15. package/hooks/features/rowReorder/useGridRowReorder.js +5 -1
  16. package/hooks/features/rowReorder/useGridRowReorderPreProcessors.d.ts +2 -2
  17. package/index.d.ts +0 -2
  18. package/index.js +2 -5
  19. package/legacy/DataGridPro/DataGridPro.js +26 -27
  20. package/legacy/DataGridPro/useDataGridProComponent.js +0 -5
  21. package/legacy/DataGridPro/useDataGridProProps.js +1 -20
  22. package/legacy/components/DataGridProVirtualScroller.js +6 -3
  23. package/legacy/components/GridRowReorderCell.js +8 -6
  24. package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +82 -33
  25. package/legacy/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +70 -5
  26. package/legacy/hooks/features/columnResize/useGridColumnResize.js +32 -15
  27. package/legacy/hooks/features/detailPanel/useGridDetailPanel.js +1 -1
  28. package/legacy/hooks/features/rowReorder/useGridRowReorder.js +5 -1
  29. package/legacy/index.js +2 -5
  30. package/legacy/utils/releaseInfo.js +1 -1
  31. package/models/dataGridProProps.d.ts +0 -26
  32. package/models/gridApiPro.d.ts +1 -2
  33. package/models/gridStatePro.d.ts +0 -3
  34. package/modern/DataGridPro/DataGridPro.js +26 -27
  35. package/modern/DataGridPro/useDataGridProComponent.js +0 -5
  36. package/modern/DataGridPro/useDataGridProProps.js +1 -16
  37. package/modern/components/DataGridProVirtualScroller.js +6 -3
  38. package/modern/components/GridRowReorderCell.js +6 -6
  39. package/modern/hooks/features/columnPinning/useGridColumnPinning.js +73 -28
  40. package/modern/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +67 -4
  41. package/modern/hooks/features/columnResize/useGridColumnResize.js +32 -15
  42. package/modern/hooks/features/detailPanel/useGridDetailPanel.js +1 -1
  43. package/modern/hooks/features/rowReorder/useGridRowReorder.js +5 -1
  44. package/modern/index.js +2 -5
  45. package/modern/utils/releaseInfo.js +1 -1
  46. package/node/DataGridPro/DataGridPro.js +26 -27
  47. package/node/DataGridPro/useDataGridProComponent.js +0 -7
  48. package/node/DataGridPro/useDataGridProProps.js +6 -28
  49. package/node/components/DataGridProVirtualScroller.js +6 -3
  50. package/node/components/GridRowReorderCell.js +6 -6
  51. package/node/hooks/features/columnPinning/useGridColumnPinning.js +72 -24
  52. package/node/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +68 -5
  53. package/node/hooks/features/columnResize/useGridColumnResize.js +32 -14
  54. package/node/hooks/features/detailPanel/useGridDetailPanel.js +1 -1
  55. package/node/hooks/features/rowReorder/useGridRowReorder.js +5 -1
  56. package/node/index.js +2 -30
  57. package/node/utils/releaseInfo.js +1 -1
  58. package/package.json +9 -7
  59. package/typeOverloads/modules.d.ts +9 -21
  60. package/utils/releaseInfo.js +1 -1
  61. package/components/GridGroupingColumnLeafCell.d.ts +0 -4
  62. package/components/GridGroupingColumnLeafCell.js +0 -22
  63. package/components/GridGroupingCriteriaCell.d.ts +0 -7
  64. package/components/GridGroupingCriteriaCell.js +0 -78
  65. package/components/GridRowGroupableColumnMenuItems.d.ts +0 -11
  66. package/components/GridRowGroupableColumnMenuItems.js +0 -63
  67. package/components/GridRowGroupingColumnMenuItems.d.ts +0 -11
  68. package/components/GridRowGroupingColumnMenuItems.js +0 -58
  69. package/hooks/features/rowGrouping/createGroupingColDef.d.ts +0 -43
  70. package/hooks/features/rowGrouping/createGroupingColDef.js +0 -318
  71. package/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +0 -37
  72. package/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -1
  73. package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +0 -4
  74. package/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -5
  75. package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +0 -27
  76. package/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -139
  77. package/hooks/features/rowGrouping/index.d.ts +0 -3
  78. package/hooks/features/rowGrouping/index.js +0 -3
  79. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +0 -11
  80. package/hooks/features/rowGrouping/useGridRowGrouping.js +0 -200
  81. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +0 -4
  82. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -203
  83. package/legacy/components/GridGroupingColumnLeafCell.js +0 -20
  84. package/legacy/components/GridGroupingCriteriaCell.js +0 -74
  85. package/legacy/components/GridRowGroupableColumnMenuItems.js +0 -61
  86. package/legacy/components/GridRowGroupingColumnMenuItems.js +0 -56
  87. package/legacy/hooks/features/rowGrouping/createGroupingColDef.js +0 -319
  88. package/legacy/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -1
  89. package/legacy/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -13
  90. package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -147
  91. package/legacy/hooks/features/rowGrouping/index.js +0 -3
  92. package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +0 -206
  93. package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -217
  94. package/legacy/models/gridGroupingValueGetterParams.js +0 -1
  95. package/models/gridGroupingValueGetterParams.d.ts +0 -31
  96. package/models/gridGroupingValueGetterParams.js +0 -1
  97. package/modern/components/GridGroupingColumnLeafCell.js +0 -20
  98. package/modern/components/GridGroupingCriteriaCell.js +0 -76
  99. package/modern/components/GridRowGroupableColumnMenuItems.js +0 -61
  100. package/modern/components/GridRowGroupingColumnMenuItems.js +0 -56
  101. package/modern/hooks/features/rowGrouping/createGroupingColDef.js +0 -302
  102. package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -1
  103. package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -5
  104. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -137
  105. package/modern/hooks/features/rowGrouping/index.js +0 -3
  106. package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +0 -192
  107. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -203
  108. package/modern/models/gridGroupingValueGetterParams.js +0 -1
  109. package/node/components/GridGroupingColumnLeafCell.js +0 -38
  110. package/node/components/GridGroupingCriteriaCell.js +0 -99
  111. package/node/components/GridRowGroupableColumnMenuItems.js +0 -82
  112. package/node/components/GridRowGroupingColumnMenuItems.js +0 -78
  113. package/node/hooks/features/rowGrouping/createGroupingColDef.js +0 -341
  114. package/node/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -5
  115. package/node/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -18
  116. package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -172
  117. package/node/hooks/features/rowGrouping/index.js +0 -51
  118. package/node/hooks/features/rowGrouping/useGridRowGrouping.js +0 -228
  119. package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -227
  120. package/node/models/gridGroupingValueGetterParams.js +0 -5
package/CHANGELOG.md CHANGED
@@ -3,21 +3,247 @@
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
+ ## v5.12.1
7
+
8
+ _Jun 9, 2022_
9
+
10
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Add `reason` to `onFilterModelChange` (#4938) @m4theushw
13
+ - 🔎 Control quick filter input value via model prop (#5013) @alexfauquette
14
+ - 📚 Documentation improvements
15
+ - 🐞 Bugfixes
16
+
17
+ ### `@mui/x-data-grid@v5.12.1` / `@mui/x-data-grid-pro@v5.12.1` / `@mui/x-data-grid-premium@v5.12.1`
18
+
19
+ #### Changes
20
+
21
+ - [DataGrid] Add `reason` to `onFilterModelChange` (#4938) @m4theushw
22
+ - [DataGrid] Restore focus after dismissing the column menu (#5027) @m4theushw
23
+ - [DataGrid] Update quick filter input when model is modified (#5013) @alexfauquette
24
+ - [DataGrid] Fix implicit dependency on react-dom (#5121) @oliviertassinari
25
+ - [DataGrid] Support `getRowId` in row reordering (#5093) @flaviendelangle
26
+ - [DataGridPro] Fix column resizing in RTL mode (#4989) @cherniavskii
27
+ - [DataGridPro] Fix column resizing on touchscreen (#5056) @cherniavskii
28
+ - [l10n] Update Japanese (ja-JP) locale (#5122) @hikotq
29
+ - [l10n] Update Russian (ru-RU) locale (#5069) @Artboomy
30
+
31
+ ### `@mui/x-date-pickers@5.0.0-alpha.6` / `@mui/x-date-pickers-pro@5.0.0-alpha.6`
32
+
33
+ #### Changes
34
+
35
+ - [pickers] Fix usage of `maxDate` / `minDate` / `disableFuture` and `disablePast` (#5081) @flaviendelangle
36
+ - [pickers] Infer mask from `inputFormat` (#5060) @alexfauquette
37
+ - [pickers] Manage input value without using the focus (#4486) @alexfauquette
38
+ - [pickers] Use new localization for doc examples (#5097) @flaviendelangle
39
+ - [pickers] Fix `shouldDisableDate` in range pickers (#5123) @flaviendelangle
40
+ - [l10n] Add Brazilian Portuguese (pt-BR) locale (#5100) @jardelnovaes
41
+ - [l10n] Use `localText` for remaining texts (#4986) @alexfauquette
42
+
43
+ ### Docs
44
+
45
+ - [docs] Implement the focus management on data grid demo links (#5070) @alexfauquette
46
+ - [docs] Fix `301` link to render cell (#5106) @oliviertassinari
47
+ - [docs] Fix broken anchor link @oliviertassinari
48
+ - [docs] Improve movie dataset (#5142) @flaviendelangle
49
+ - [docs] Move all localization documentation in a unique page (#5072) @alexfauquette
50
+ - [docs] Section for overwriting core components i18n keys (#4998) @DanailH
51
+ - [docs] Small grammar and format fixes for Dynamic Row Height section (#5098) @samuelsycamore
52
+
53
+ ### Core
54
+
55
+ - [core] Allows to run tests with different date adapters (#5055) @alexfauquette
56
+ - [core] Prettify the l10n issue (#4928) @alexfauquette
57
+ - [core] Set correct `apiRef` type in row reorder pre processors #5125 @DanailH
58
+ - [core] Stop using `GridEvents` in technical doc (#5157) @flaviendelangle
59
+ - [core] Upgrade monorepo (#5101) @oliviertassinari
60
+ - [test] Fix dynamic row height test failing on Chrome (#5147) @m4theushw
61
+ - [test] Remove delay on server demo for regression tests (#5131) @alexfauquette
62
+
63
+ ## v5.12.0
64
+
65
+ _May 31, 2022_
66
+
67
+ We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
68
+
69
+ - 🎁 Introduce support for [dynamic row height](https://mui.com/x/react-data-grid/rows/#dynamic-row-height) (#4859) @m4theushw
70
+
71
+ <img src="https://user-images.githubusercontent.com/42154031/171183167-718d7bcd-ec0f-459e-97fe-0f650abb4a99.gif" width="800">
72
+
73
+ - ⚠️ Remove deprecated row grouping feature from `@mui/x-data-grid-pro`
74
+
75
+ Row grouping is available through the `@mui/x-data-grid-premium` package - see [Premium plan release blogpost](https://mui.com/blog/premium-plan-release/).
76
+
77
+ - 🐞 Bug fixes and improvements
78
+
79
+ ### `@mui/x-data-grid@v5.12.0` / `@mui/x-data-grid-pro@v5.12.0` / `@mui/x-data-grid-premium@v5.12.0`
80
+
81
+ #### Changes
82
+
83
+ - [DataGrid] Support dynamic row height (#4859) @m4theushw
84
+ - [DataGrid] Add `onMenuOpen` and `onMenuClose` props (#4825) @DanailH
85
+ - [DataGrid] Add generics to `GridActionsColDef` to match `GridColDef` (#4982) @subvertallchris
86
+ - [DataGrid] Disable drag event handlers when row or column reorder are disabled (#4857) @DanailH
87
+ - [DataGrid] Allow other attempts to stop edit mode if the first failed (#5016) @m4theushw
88
+ - [DataGrid] Better reflect the dependency on Material UI (#4795) @oliviertassinari
89
+ - [DataGrid] Add an id to the filter item created when opening the filter panel (#5014) @flaviendelangle
90
+ - [DataGrid] Use column visibility model on Hide All / Show All when enabled (#5050) @flaviendelangle
91
+ - [DataGridPro] Unpin columns back to original position (#4512) @m4theushw
92
+ - [DataGridPro] Remove experimental row grouping from Pro plan (#4949) @flaviendelangle
93
+ - [DataGridPro] Allow to scroll detail panel content if it overflows the panel (#4979) @cherniavskii
94
+ - [DataGridPro] Do not call `setRowIndex` when dragging a column over a row (#4987) @flaviendelangle
95
+ - [l10n] Add Norwegian (Bokmål) (nb-NO) locale (#5001) @spiftire
96
+ - [l10n] Add Turkish (tr-TR) locale (#5026) @Rassilion
97
+
98
+ ### `@mui/x-date-pickers@5.0.0-alpha.5` / `@mui/x-date-pickers-pro@5.0.0-alpha.5`
99
+
100
+ #### Breaking changes
101
+
102
+ - [pickers] Restructure props in `MonthPicker` / `YearPicker` and `DayPicker` (#4814) @flaviendelangle
103
+
104
+ The props of `MonthPicker` / `YearPicker` and `DayPicker` have been reworked to make them more consistent for a standalone usage (#4814) @flaviendelangle
105
+
106
+ **MonthPicker**: The prop `onMonthChange` has been removed, you can use `onChange` instead since every change is a month change
107
+
108
+ **YearPicker**: The prop `onYearPicker` has been removed, you can use `onChange` instead since every change is a year change
109
+
110
+ **DayPicker**: The prop `isDateDisabled` has been removed, you can now use the same validation props as for the other components (`maxDate`, `minDate`, `shouldDisableDate`, `disableFuture` and `disablePast`)
111
+
112
+ #### Changes
113
+
114
+ - [pickers] Add German (de-DE) translations (#4974) @felixh10r
115
+ - [pickers] Support action bar on static pickers and improve typing (#5015) @flaviendelangle
116
+
117
+ ### Docs
118
+
119
+ - [docs] Add docs sections / pages for upcoming features on pickers (#4603) @flaviendelangle
120
+ - [docs] Add docs for filter panel components (#4919) @m4theushw
121
+ - [docs] Explain how to manage focus with `renderCell` (#4254) @alexfauquette
122
+ - [docs] Fix broken links to GitHub source (#5003) @Edwardveb
123
+ - [docs] Fix navigation links (#4956) @oliviertassinari
124
+ - [docs] Fix typo on rows docs (#4952) @jamesRadicl
125
+ - [docs] New WAI-ARIA guidelines location (#4957) @oliviertassinari
126
+ - [docs] Add "Slots" section to the right nav in the API pages (#4993) @DanailH
127
+ - [docs] Fix docs feedback widget not working (#4905) @cherniavskii
128
+ - [docs] Replace custom notes and warning with callouts (#5008) @flaviendelangle
129
+
130
+ ### Core
131
+
132
+ - [core] Avoid Order ID to refer to GitHub issues/PRs (#5005) @oliviertassinari
133
+ - [core] Improve the workflow for incomplete issues (#5012) @mnajdova
134
+ - [core] Remove dead code on row grouping tree creation (#4945) @flaviendelangle
135
+ - [core] Use new cache api for the row grouping last model tracking (#4980) @flaviendelangle
136
+ - [core] Ensure that PRs have atleast 1 label (#5011) @DanailH
137
+ - [core] Fix trailing-space @oliviertassinari
138
+ - [core] Stop Renovate PR updates when PR is on hold (#5020) @cherniavskii
139
+ - [license] Remove support for UTF-8 (#4893) @oliviertassinari
140
+ - [license] Tweak error messages (#4907) @mbrookes
141
+ - [test] Skip Safari and Firefox on broken tests (#4994) @alexfauquette
142
+ - [test] Make argos screenshots stable (#5061) @m4theushw
143
+
144
+ ## v5.11.1
145
+
146
+ _May 20, 2022_
147
+
148
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
149
+
150
+ - 🌍 Support localization on the date and time picker components (#4517) @alexfauquette
151
+
152
+ Texts can be translated in the pickers components, similar to what can be done in the data grid component. Check the [documentation](https://mui.com/x/react-date-pickers/localization/) for more information.
153
+
154
+ - 📃 Add support for column spanning when exporting to Excel (#4830) @cherniavskii
155
+
156
+ <img src="https://user-images.githubusercontent.com/13808724/167691417-bf6baeb9-d409-4134-acb6-aadaf6434de9.png" width="800">
157
+
158
+ - 🐞 Bugs fixes
159
+
160
+ ### `@mui/x-data-grid@v5.11.1` / `@mui/x-data-grid-pro@v5.11.1` / `@mui/x-data-grid-premium@v5.11.1`
161
+
162
+ #### Changes
163
+
164
+ - [DataGrid] Add a CSS class corresponding to current density (#4858) @m4theushw
165
+ - [DataGrid] Execute the pipe-processors in their initialization order (#4913) @flaviendelangle
166
+ - [DataGrid] Fix rendering of the no rows overlay when the `loading` prop is changed (#4910) @m4theushw
167
+ - [DataGridPremium] Add `exceljs` to the dependencies (#4939) @alexfauquette
168
+ - [DataGridPremium] Support column spanning in the Excel export (#4830) @cherniavskii
169
+ - [l10n] Improve Russian (ru-RU) locale (#4864) @arvkonstantin
170
+
171
+ ### `@mui/x-date-pickers@5.0.0-alpha.4` / `@mui/x-date-pickers-pro@5.0.0-alpha.4`
172
+
173
+ #### Breaking changes
174
+
175
+ - The props related to the action bar buttons have been removed (`clearable`, `showTodayButton`, `cancelText`, `okText`)
176
+
177
+ To decide which button must be displayed and in which order, you can now use the `actions` prop of the `actionBar` component slot props.
178
+
179
+ ```jsx
180
+ <DatePicker
181
+ componentsProps={{
182
+ actionBar: {
183
+ // The actions will be the same between desktop and mobile
184
+ actions: ['clear'],
185
+
186
+ // The actions will be different between desktop and mobile
187
+ actions: (variant) => (variant === 'desktop' ? [] : ['clear']),
188
+ },
189
+ }}
190
+ />
191
+ ```
192
+
193
+ The build-in `ActionBar` component supports 4 different actions: `'clear'`, `'cancel'`, `'accept'`, and `'today'`.
194
+ By default, the pickers will render the cancel and accept button on mobile and no action on desktop.
195
+
196
+ If you need other actions, you can provide your own component to the `ActionBar` component slot
197
+
198
+ ```jsx
199
+ <DatePicker components={{ ActionBar: CustomActionBar }} />
200
+ ```
201
+
202
+ #### Changes
203
+
204
+ - [DatePicker] Fix keyboard accessibility for first and last year (#4807) @alexfauquette
205
+ - [pickers] Add component slot for action bar (#4778) @alexfauquette
206
+ - [pickers] Add l10n support (#4517) @alexfauquette
207
+ - [pickers] Close Popper when pressing <kbd>Esc</kbd> inside a modal (#4499) @alexfauquette
208
+ - [pickers] Support class slots on toolbar components (#4855) @flaviendelangle
209
+ - [TimePicker] Fix time validation when current date is `null` (#4867) @flaviendelangle
210
+
211
+ ### Docs
212
+
213
+ - [docs] Add 301 redirect for columns page (#4940) @alexfauquette
214
+ - [docs] Avoid confusion with license key installation (#4891) @oliviertassinari
215
+ - [docs] Complete the instructions for pickers installation in readme (#4852) @alexfauquette
216
+ - [docs] Disable ads on paid-only pages (#4842) @flaviendelangle
217
+ - [docs] Don't redirect to localized doc on deploy preview (#4818) @m4theushw
218
+ - [docs] Limit `LICENSE` file to 80 char per line (#4873) @oliviertassinari
219
+ - [docs] Typo on OrderId @oliviertassinari
220
+ - [docs] Update feature comparison table (#4918) @cherniavskii
221
+
222
+ ### Core
223
+
224
+ - [core] Add new script to generate tree data rows from file tree (#4902) @flaviendelangle
225
+ - [core] Fix code style (#4874) @oliviertassinari
226
+ - [core] Fix React 18 peer dependency (#4908) @oliviertassinari
227
+ - [core] Fix link to the LICENSE file (#4875) @oliviertassinari
228
+ - [core] Fix transitive babel dependency (#4793) @oliviertassinari
229
+ - [core] New pipe processing `rowHydration` (#4896) @flaviendelangle
230
+ - [core] Remove dead code for the docs (#4791) @oliviertassinari
231
+ - [core] Run `yarn prettier` @oliviertassinari
232
+ - [core] Polishes on `CHANGELOG.md` (#4876) @oliviertassinari
233
+ - [core] Simplify rows cache management (#4933) @flaviendelangle
234
+ - [core] Use internal icons for quick filter (#4912) @alexfauquette
235
+
6
236
  ## v5.11.0
7
237
 
8
238
  _May 13, 2022_
9
239
 
10
240
  We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
241
 
12
- - 🚀 Premium plan release
13
-
14
- We’re happy to announce that the Premium plan is [finally out](https://mui.com/blog/premium-plan-release/)!
15
- With it, MUI X officially steps up to the next level, supporting the most advanced use cases for UI components.
242
+ - 🚀 **Premium plan release**. We're happy to announce that the Premium plan is [finally out](https://mui.com/blog/premium-plan-release/)! With it, MUI X officially steps up to the next level, supporting the most advanced use cases for UI components.
16
243
 
17
244
  This plan is available through the new `@mui/x-data-grid-premium` package, which contains the row grouping and the Excel export features.
18
245
 
19
- If you were already using the row grouping feature, you can upgrade by [installing](https://mui.com/x/react-data-grid/getting-started/#installation) `@mui/x-data-grid-premium` and replace `DataGridPro` with `DataGridPremium`, as follows.
20
- Note that the experimental flag is not required anymore to use the row grouping.
246
+ If you were already using the row grouping feature, you can upgrade by [installing](https://mui.com/x/react-data-grid/getting-started/#installation) `@mui/x-data-grid-premium` and replace `DataGridPro` with `DataGridPremium`, as follows. Note that the experimental flag is not required anymore to use the row grouping.
21
247
 
22
248
  ```diff
23
249
  -import { DataGridPro } from '@mui/x-data-grid-pro';
@@ -29,16 +255,11 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
29
255
 
30
256
  For more information about the revised pricing model please have a look at the [blog post](https://mui.com/blog/premium-plan-release/#the-new-licensing-model).
31
257
 
32
- - 👔 Add Excel export
33
-
34
- - 🔎 Quick filtering
35
-
36
- You can now add a quick filtering search bar to your grid.
37
- To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar.
258
+ - 👔 **Excel export**. You can find this new Premium feature at: https://mui.com/x/react-data-grid/export/#excel-export.
38
259
 
39
- More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering/#quick-filter)
260
+ - 🔎 **Quick filtering**. You can now add a quick filtering search bar to your grid. To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar. More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering/#quick-filter).
40
261
 
41
- ![image](https://user-images.githubusercontent.com/13808724/167700105-5a5acc7c-5463-4871-8514-3d09e2f365ae.png)
262
+ <img src="https://user-images.githubusercontent.com/13808724/167700105-5a5acc7c-5463-4871-8514-3d09e2f365ae.png" width="724">
42
263
 
43
264
  - 🐞 Bugs fixes
44
265
 
@@ -46,7 +267,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
46
267
 
47
268
  #### Breaking changes
48
269
 
49
- - Moving row grouping to premium package
270
+ - Move row grouping to the premium package (#4223) @flaviendelangle
50
271
 
51
272
  The use of `rowGrouping` in the `@mui/x-data-grid-pro` package is deprecated. The experimental flag will be removed in an upcoming release.
52
273
 
@@ -76,7 +297,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
76
297
 
77
298
  #### Breaking changes
78
299
 
79
- - Rework the auto-closing behavior of the pickers.
300
+ - Rework the auto-closing behavior of the pickers (#4408) @flaviendelangle
80
301
 
81
302
  The `disableCloseOnSelect` prop has been replaced by a new `closeOnSelect` prop which has the opposite behavior.
82
303
  The default behavior remains the same (close after the last step on desktop but not on mobile).
@@ -235,12 +235,6 @@ DataGridProRaw.propTypes = {
235
235
  */
236
236
  disableMultipleSelection: PropTypes.bool,
237
237
 
238
- /**
239
- * If `true`, the row grouping is disabled.
240
- * @default false
241
- */
242
- disableRowGrouping: PropTypes.bool,
243
-
244
238
  /**
245
239
  * If `true`, the selection on click on a row or cell is disabled.
246
240
  * @default false
@@ -276,7 +270,6 @@ DataGridProRaw.propTypes = {
276
270
  experimentalFeatures: PropTypes.shape({
277
271
  newEditingApi: PropTypes.bool,
278
272
  preventCommitWhileValidating: PropTypes.bool,
279
- rowGrouping: PropTypes.bool,
280
273
  warnIfFocusStateIsNotSynced: PropTypes.bool
281
274
  }),
282
275
 
@@ -330,6 +323,15 @@ DataGridProRaw.propTypes = {
330
323
  */
331
324
  getDetailPanelHeight: PropTypes.func,
332
325
 
326
+ /**
327
+ * Function that returns the estimated height for a row.
328
+ * Only works if dynamic row height is used.
329
+ * Once the row height is measured this value is discarded.
330
+ * @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
331
+ * @returns {number | null} The estimated row height value. If `null` or `undefined` then the default row height, based on the density, is applied.
332
+ */
333
+ getEstimatedRowHeight: PropTypes.func,
334
+
333
335
  /**
334
336
  * Function that applies CSS classes dynamically on rows.
335
337
  * @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].
@@ -340,7 +342,7 @@ DataGridProRaw.propTypes = {
340
342
  /**
341
343
  * Function that sets the row height per row.
342
344
  * @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
343
- * @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied.
345
+ * @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied. If "auto" then the row height is calculated based on the content.
344
346
  */
345
347
  getRowHeight: PropTypes.func,
346
348
 
@@ -666,6 +668,22 @@ DataGridProRaw.propTypes = {
666
668
  */
667
669
  onFilterModelChange: PropTypes.func,
668
670
 
671
+ /**
672
+ * Callback fired when the menu is closed.
673
+ * @param {GridMenuParams} params With all properties from [[GridMenuParams]].
674
+ * @param {MuiEvent<{}>} event The event object.
675
+ * @param {GridCallbackDetails} details Additional details for this callback.
676
+ */
677
+ onMenuClose: PropTypes.func,
678
+
679
+ /**
680
+ * Callback fired when the menu is opened.
681
+ * @param {GridMenuParams} params With all properties from [[GridMenuParams]].
682
+ * @param {MuiEvent<{}>} event The event object.
683
+ * @param {GridCallbackDetails} details Additional details for this callback.
684
+ */
685
+ onMenuOpen: PropTypes.func,
686
+
669
687
  /**
670
688
  * Callback fired when the current page has changed.
671
689
  * @param {number} page Index of the page displayed on the Grid.
@@ -755,13 +773,6 @@ DataGridProRaw.propTypes = {
755
773
  */
756
774
  onRowEditStop: PropTypes.func,
757
775
 
758
- /**
759
- * Callback fired when the row grouping model changes.
760
- * @param {GridRowGroupingModel} model Columns used as grouping criteria.
761
- * @param {GridCallbackDetails} details Additional details for this callback.
762
- */
763
- onRowGroupingModelChange: PropTypes.func,
764
-
765
776
  /**
766
777
  * Callback fired when the `rowModesModel` prop changes.
767
778
  * @param {GridRowModesModel} rowModesModel Object containig which rows are in "edit" mode.
@@ -865,18 +876,6 @@ DataGridProRaw.propTypes = {
865
876
  */
866
877
  rowCount: PropTypes.number,
867
878
 
868
- /**
869
- * If `single`, all column we are grouping by will be represented in the same grouping the same column.
870
- * If `multiple`, each column we are grouping by will be represented in its own column.
871
- * @default 'single'
872
- */
873
- rowGroupingColumnMode: PropTypes.oneOf(['multiple', 'single']),
874
-
875
- /**
876
- * Set the row grouping model of the grid.
877
- */
878
- rowGroupingModel: PropTypes.arrayOf(PropTypes.string),
879
-
880
879
  /**
881
880
  * Set the height in pixel of a row in the grid.
882
881
  * @default 52
@@ -12,8 +12,6 @@ import { useGridDetailPanelCache } from '../hooks/features/detailPanel/useGridDe
12
12
  import { useGridDetailPanelPreProcessors } from '../hooks/features/detailPanel/useGridDetailPanelPreProcessors';
13
13
  import { useGridRowReorder } from '../hooks/features/rowReorder/useGridRowReorder';
14
14
  import { useGridRowReorderPreProcessors } from '../hooks/features/rowReorder/useGridRowReorderPreProcessors';
15
- import { useGridRowGrouping, rowGroupingStateInitializer } from '../hooks/features/rowGrouping/useGridRowGrouping';
16
- import { useGridRowGroupingPreProcessors } from '../hooks/features/rowGrouping/useGridRowGroupingPreProcessors';
17
15
  export const useDataGridProComponent = (inputApiRef, props) => {
18
16
  var _props$experimentalFe, _props$experimentalFe2;
19
17
 
@@ -24,7 +22,6 @@ export const useDataGridProComponent = (inputApiRef, props) => {
24
22
 
25
23
  useGridSelectionPreProcessors(apiRef, props);
26
24
  useGridRowReorderPreProcessors(apiRef, props);
27
- useGridRowGroupingPreProcessors(apiRef, props);
28
25
  useGridTreeDataPreProcessors(apiRef, props);
29
26
  useGridDetailPanelPreProcessors(apiRef, props); // The column pinning `hydrateColumns` pre-processor must be after every other `hydrateColumns` pre-processors
30
27
  // Because it changes the order of the columns.
@@ -35,7 +32,6 @@ export const useDataGridProComponent = (inputApiRef, props) => {
35
32
  * Register all state initializers here.
36
33
  */
37
34
 
38
- useGridInitializeState(rowGroupingStateInitializer, apiRef, props);
39
35
  useGridInitializeState(selectionStateInitializer, apiRef, props);
40
36
  useGridInitializeState(detailPanelStateInitializer, apiRef, props);
41
37
  useGridInitializeState(columnPinningStateInitializer, apiRef, props);
@@ -52,7 +48,6 @@ export const useDataGridProComponent = (inputApiRef, props) => {
52
48
  useGridInitializeState(paginationStateInitializer, apiRef, props);
53
49
  useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
54
50
  useGridInitializeState(columnMenuStateInitializer, apiRef, props);
55
- useGridRowGrouping(apiRef, props);
56
51
  useGridTreeData(apiRef);
57
52
  useGridKeyboardNavigation(apiRef, props);
58
53
  useGridSelection(apiRef, props);
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS, GRID_DEFAULT_LOCALE_TEXT, DATA_GRID_PROPS_DEFAULT_VALUES } from '@mui/x-data-grid';
5
- import { buildWarning } from '@mui/x-data-grid/internals';
6
5
 
7
6
  /**
8
7
  * The default values of `DataGridProPropsWithDefaultValue` to inject in the props of DataGridPro.
@@ -15,11 +14,8 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
15
14
  disableChildrenFiltering: false,
16
15
  disableChildrenSorting: false,
17
16
  rowReordering: false,
18
- getDetailPanelHeight: () => 500,
19
- disableRowGrouping: false,
20
- rowGroupingColumnMode: 'single'
17
+ getDetailPanelHeight: () => 500
21
18
  });
22
- const rowGroupingWarning = buildWarning(['MUI: The row grouping has been moved to the new `@mui/x-data-grid-premium` package.', 'The feature is deprecated in `@mui/x-data-grid-pro`, and it will soon be removed from this package.'], 'error');
23
19
  export const useDataGridProProps = inProps => {
24
20
  const themedProps = useThemeProps({
25
21
  props: inProps,
@@ -39,26 +35,9 @@ export const useDataGridProProps = inProps => {
39
35
  });
40
36
  return mergedComponents;
41
37
  }, [themedProps.components]);
42
-
43
- if (process.env.NODE_ENV !== 'production') {
44
- // eslint-disable-next-line react-hooks/rules-of-hooks
45
- React.useEffect(() => {
46
- var _themedProps$experime;
47
-
48
- if ((_themedProps$experime = themedProps.experimentalFeatures) != null && _themedProps$experime.rowGrouping) {
49
- rowGroupingWarning();
50
- }
51
- }, [themedProps.experimentalFeatures]);
52
- }
53
-
54
- return React.useMemo(() => {
55
- var _themedProps$experime2;
56
-
57
- return _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
58
- disableRowGrouping: themedProps.disableRowGrouping || !((_themedProps$experime2 = themedProps.experimentalFeatures) != null && _themedProps$experime2.rowGrouping),
59
- localeText,
60
- components,
61
- signature: 'DataGridPro'
62
- });
63
- }, [themedProps, localeText, components]);
38
+ return React.useMemo(() => _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
39
+ localeText,
40
+ components,
41
+ signature: 'DataGridPro'
42
+ }), [themedProps, localeText, components]);
64
43
  };
package/LICENSE CHANGED
@@ -2,9 +2,9 @@ Commercial License
2
2
 
3
3
  Copyright (c) 2020 Material-UI SAS
4
4
 
5
- MUI X Pro (https://mui.com/pricing/) is commercial software. You must purchase
6
- a license and agree to the End User License Agreement (EULA: https://mui.com/r/x-license-eula)
7
- to be able to use the software.
5
+ MUI X Pro (https://mui.com/pricing/) is commercial software.
6
+ You must purchase a license and agree to the End User License Agreement
7
+ (EULA: https://mui.com/r/x-license-eula) to be able to use the software.
8
8
 
9
9
  Commercial licenses can be obtained at https://mui.com/r/x-get-license?scope=pro.
10
10
  You are free to install and try the software without a license key as long as it
package/README.md CHANGED
@@ -19,10 +19,9 @@ This component has the following peer dependencies that you will need to install
19
19
 
20
20
  ```json
21
21
  "peerDependencies": {
22
- "@mui/material": "^5.2.8",
23
- "@mui/system": "^5.2.8",
24
- "react": "^17.0.2 || ^18.0.0",
25
- "react-dom": "^17.0.2 || ^18.0.0"
22
+ "@mui/material": "^5.4.1",
23
+ "@mui/system": "^5.4.1",
24
+ "react": "^17.0.2 || ^18.0.0"
26
25
  },
27
26
  ```
28
27
 
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { GridPinnedColumns } from '../hooks/features/columnPinning';
3
- export declare const filterColumns: (pinnedColumns: GridPinnedColumns, columns: string[]) => any[][];
3
+ export declare const filterColumns: (pinnedColumns: GridPinnedColumns, columns: string[]) => [string[], string[]];
4
4
  interface DataGridProVirtualScrollerProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  disableVirtualization?: boolean;
6
6
  }
@@ -84,7 +84,8 @@ const VirtualScrollerDetailPanel = styled(Box, {
84
84
  zIndex: 2,
85
85
  width: '100%',
86
86
  position: 'absolute',
87
- backgroundColor: theme.palette.background.default
87
+ backgroundColor: theme.palette.background.default,
88
+ overflow: 'auto'
88
89
  }));
89
90
  const VirtualScrollerPinnedColumns = styled('div', {
90
91
  name: 'MuiDataGrid',
@@ -241,7 +242,8 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
241
242
  renderContext: leftRenderContext,
242
243
  minFirstColumn: leftRenderContext.firstColumnIndex,
243
244
  maxLastColumn: leftRenderContext.lastColumnIndex,
244
- availableSpace: 0
245
+ availableSpace: 0,
246
+ ignoreAutoHeight: true
245
247
  })
246
248
  }), /*#__PURE__*/_jsx(GridVirtualScrollerRenderZone, _extends({}, getRenderZoneProps(), {
247
249
  children: getRows({
@@ -258,7 +260,8 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
258
260
  renderContext: rightRenderContext,
259
261
  minFirstColumn: rightRenderContext.firstColumnIndex,
260
262
  maxLastColumn: rightRenderContext.lastColumnIndex,
261
- availableSpace: 0
263
+ availableSpace: 0,
264
+ ignoreAutoHeight: true
262
265
  })
263
266
  }), detailPanels.length > 0 && /*#__PURE__*/_jsx(VirtualScrollerDetailPanels, {
264
267
  className: classes.detailPanels,
@@ -27,7 +27,7 @@ const GridRowReorderCell = params => {
27
27
 
28
28
  const cellValue = params.row.__reorder__ || params.id; // TODO: remove sortModel and treeDepth checks once row reorder is compatible
29
29
 
30
- const isDraggable = !!rootProps.rowReordering && !sortModel.length && treeDepth === 1 && Object.keys(editRowsState).length === 0;
30
+ const isDraggable = React.useMemo(() => !!rootProps.rowReordering && !sortModel.length && treeDepth === 1 && Object.keys(editRowsState).length === 0, [rootProps.rowReordering, sortModel, treeDepth, editRowsState]);
31
31
  const ownerState = {
32
32
  isDraggable,
33
33
  classes: rootProps.classes
@@ -42,21 +42,21 @@ const GridRowReorderCell = params => {
42
42
  } // The row might have been deleted
43
43
 
44
44
 
45
- if (!apiRef.current.getRow(params.row.id)) {
45
+ if (!apiRef.current.getRow(params.id)) {
46
46
  return;
47
47
  }
48
48
 
49
- apiRef.current.publishEvent(eventName, apiRef.current.getRowParams(params.row.id), event);
49
+ apiRef.current.publishEvent(eventName, apiRef.current.getRowParams(params.id), event);
50
50
 
51
51
  if (propHandler) {
52
52
  propHandler(event);
53
53
  }
54
- }, [apiRef, params.row.id]);
55
- const draggableEventHandlers = {
54
+ }, [apiRef, params.id]);
55
+ const draggableEventHandlers = isDraggable ? {
56
56
  onDragStart: publish('rowDragStart'),
57
57
  onDragOver: publish('rowDragOver'),
58
58
  onDragEnd: publish('rowDragEnd')
59
- };
59
+ } : null;
60
60
  return /*#__PURE__*/_jsxs("div", _extends({
61
61
  className: classes.root,
62
62
  draggable: isDraggable
@@ -39,4 +39,10 @@ export interface GridColumnPinningApi {
39
39
  */
40
40
  isColumnPinned: (field: string) => GridPinnedPosition | false;
41
41
  }
42
+ export interface GridColumnPinningInternalCache {
43
+ /**
44
+ * Stores the fields in their original position, before being pinned.
45
+ */
46
+ orderedFieldsBeforePinningColumns: string[] | null;
47
+ }
42
48
  export { GridPinnedPosition };