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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +266 -0
  2. package/DataGridPremium/DataGridPremium.js +1 -11
  3. package/DataGridPremium/useDataGridPremiumProps.js +4 -3
  4. package/components/GridAggregationHeader.js +1 -3
  5. package/components/GridColumnMenuAggregationItem.d.ts +7 -0
  6. package/components/GridColumnMenuAggregationItem.js +110 -0
  7. package/components/GridColumnMenuRowGroupItem.d.ts +7 -0
  8. package/components/{GridRowGroupingColumnMenuItems.js → GridColumnMenuRowGroupItem.js} +23 -14
  9. package/components/GridColumnMenuRowUngroupItem.d.ts +7 -0
  10. package/components/GridColumnMenuRowUngroupItem.js +65 -0
  11. package/components/GridPremiumColumnMenu.d.ts +34 -0
  12. package/components/GridPremiumColumnMenu.js +51 -0
  13. package/components/icons.d.ts +9 -0
  14. package/components/icons.js +14 -0
  15. package/components/index.d.ts +3 -0
  16. package/components/index.js +4 -1
  17. package/components/reexports.d.ts +1 -0
  18. package/components/reexports.js +1 -0
  19. package/constants/dataGridPremiumDefaultSlotsComponents.d.ts +3 -0
  20. package/constants/dataGridPremiumDefaultSlotsComponents.js +12 -0
  21. package/hooks/features/aggregation/gridAggregationUtils.d.ts +4 -4
  22. package/hooks/features/aggregation/gridAggregationUtils.js +8 -8
  23. package/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
  24. package/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -18
  25. package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +7 -7
  26. package/hooks/features/export/serializer/excelSerializer.d.ts +2 -1
  27. package/hooks/features/export/serializer/excelSerializer.js +3 -4
  28. package/hooks/features/rowGrouping/createGroupingColDef.d.ts +2 -2
  29. package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +1 -1
  30. package/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
  31. package/hooks/features/rowGrouping/index.d.ts +1 -1
  32. package/hooks/features/rowGrouping/index.js +1 -1
  33. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
  34. package/hooks/features/rowGrouping/useGridRowGrouping.js +5 -22
  35. package/index.d.ts +1 -0
  36. package/index.js +4 -3
  37. package/legacy/DataGridPremium/DataGridPremium.js +1 -11
  38. package/legacy/DataGridPremium/useDataGridPremiumProps.js +4 -3
  39. package/legacy/components/GridAggregationHeader.js +1 -3
  40. package/legacy/components/GridColumnMenuAggregationItem.js +114 -0
  41. package/legacy/components/{GridRowGroupingColumnMenuItems.js → GridColumnMenuRowGroupItem.js} +23 -14
  42. package/legacy/components/GridColumnMenuRowUngroupItem.js +63 -0
  43. package/legacy/components/GridPremiumColumnMenu.js +49 -0
  44. package/legacy/components/icons.js +14 -0
  45. package/legacy/components/index.js +4 -1
  46. package/legacy/components/reexports.js +1 -0
  47. package/legacy/constants/dataGridPremiumDefaultSlotsComponents.js +12 -0
  48. package/legacy/hooks/features/aggregation/gridAggregationUtils.js +8 -8
  49. package/legacy/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -20
  50. package/legacy/hooks/features/export/serializer/excelSerializer.js +5 -5
  51. package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
  52. package/legacy/hooks/features/rowGrouping/index.js +1 -1
  53. package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +5 -24
  54. package/legacy/index.js +4 -3
  55. package/legacy/models/gridPremiumIconSlotsComponent.js +1 -0
  56. package/legacy/models/gridPremiumSlotsComponent.js +1 -0
  57. package/legacy/models/index.js +3 -1
  58. package/legacy/utils/releaseInfo.js +1 -1
  59. package/models/dataGridPremiumProps.d.ts +13 -3
  60. package/models/gridGroupingValueGetterParams.d.ts +3 -3
  61. package/models/gridPremiumIconSlotsComponent.d.ts +18 -0
  62. package/models/gridPremiumIconSlotsComponent.js +1 -0
  63. package/models/gridPremiumSlotsComponent.d.ts +8 -0
  64. package/models/gridPremiumSlotsComponent.js +1 -0
  65. package/models/index.d.ts +2 -0
  66. package/models/index.js +3 -1
  67. package/modern/DataGridPremium/DataGridPremium.js +1 -11
  68. package/modern/DataGridPremium/useDataGridPremiumProps.js +4 -3
  69. package/modern/components/GridAggregationHeader.js +1 -3
  70. package/modern/components/GridColumnMenuAggregationItem.js +109 -0
  71. package/modern/components/{GridRowGroupingColumnMenuItems.js → GridColumnMenuRowGroupItem.js} +23 -14
  72. package/modern/components/GridColumnMenuRowUngroupItem.js +64 -0
  73. package/modern/components/GridPremiumColumnMenu.js +51 -0
  74. package/modern/components/icons.js +14 -0
  75. package/modern/components/index.js +4 -1
  76. package/modern/components/reexports.js +1 -0
  77. package/modern/constants/dataGridPremiumDefaultSlotsComponents.js +12 -0
  78. package/modern/hooks/features/aggregation/gridAggregationUtils.js +8 -8
  79. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -18
  80. package/modern/hooks/features/export/serializer/excelSerializer.js +2 -4
  81. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
  82. package/modern/hooks/features/rowGrouping/index.js +1 -1
  83. package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +5 -22
  84. package/modern/index.js +4 -3
  85. package/modern/models/gridPremiumIconSlotsComponent.js +1 -0
  86. package/modern/models/gridPremiumSlotsComponent.js +1 -0
  87. package/modern/models/index.js +3 -1
  88. package/modern/utils/releaseInfo.js +1 -1
  89. package/node/DataGridPremium/DataGridPremium.js +1 -11
  90. package/node/DataGridPremium/useDataGridPremiumProps.js +3 -2
  91. package/node/components/GridAggregationHeader.js +0 -2
  92. package/node/components/{GridAggregationColumnMenuItem.js → GridColumnMenuAggregationItem.js} +67 -45
  93. package/node/components/{GridRowGroupingColumnMenuItems.js → GridColumnMenuRowGroupItem.js} +22 -14
  94. package/node/components/{GridRowGroupableColumnMenuItems.js → GridColumnMenuRowUngroupItem.js} +33 -21
  95. package/node/components/GridPremiumColumnMenu.js +64 -0
  96. package/node/components/icons.js +25 -0
  97. package/node/components/index.js +36 -1
  98. package/node/components/reexports.js +24 -0
  99. package/node/constants/dataGridPremiumDefaultSlotsComponents.js +21 -0
  100. package/node/hooks/features/aggregation/gridAggregationUtils.js +8 -8
  101. package/node/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -18
  102. package/node/hooks/features/export/serializer/excelSerializer.js +2 -4
  103. package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
  104. package/node/hooks/features/rowGrouping/index.js +8 -1
  105. package/node/hooks/features/rowGrouping/useGridRowGrouping.js +5 -22
  106. package/node/index.js +26 -4
  107. package/node/models/gridPremiumIconSlotsComponent.js +5 -0
  108. package/node/models/gridPremiumSlotsComponent.js +5 -0
  109. package/node/models/index.js +22 -0
  110. package/node/utils/releaseInfo.js +1 -1
  111. package/package.json +6 -6
  112. package/typeOverloads/modules.d.ts +7 -7
  113. package/utils/releaseInfo.js +1 -1
  114. package/components/GridAggregationColumnMenuItem.d.ts +0 -9
  115. package/components/GridAggregationColumnMenuItem.js +0 -86
  116. package/components/GridRowGroupableColumnMenuItems.d.ts +0 -11
  117. package/components/GridRowGroupableColumnMenuItems.js +0 -52
  118. package/components/GridRowGroupingColumnMenuItems.d.ts +0 -11
  119. package/legacy/components/GridAggregationColumnMenuItem.js +0 -88
  120. package/legacy/components/GridRowGroupableColumnMenuItems.js +0 -50
  121. package/modern/components/GridAggregationColumnMenuItem.js +0 -86
  122. package/modern/components/GridRowGroupableColumnMenuItems.js +0 -51
package/CHANGELOG.md CHANGED
@@ -3,6 +3,217 @@
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
+ ## 6.0.0-alpha.14
7
+
8
+ _Jan 5, 2023_
9
+
10
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 📆 Add `SingleInputTimeRangeField` and `SingleInputDateTimeRangeField` components (#7186) @alexfauquette
13
+ - 🚀 Use grid for modifying pickers layout (#6900) @alexfauquette
14
+ - ✨ Improve field components editing experience (#7272) @flaviendelangle
15
+ - 💻 Multiple codemods
16
+ - 📚 Many documentation improvements
17
+ - 🐞 Bugfixes
18
+
19
+ ### `@mui/x-data-grid@v6.0.0-alpha.14` / `@mui/x-data-grid-pro@v6.0.0-alpha.14` / `@mui/x-data-grid-premium@v6.0.0-alpha.14`
20
+
21
+ #### Breaking changes
22
+
23
+ - [DataGrid] Set default `GridCellParams['value']` type to `unknown` (#6959) @cherniavskii
24
+
25
+ The default type of `GridCellParams['value']` was changed from `any` to `unknown`.
26
+
27
+ #### Changes
28
+
29
+ - [DataGrid] Fix flickering on mount (#7205) @cherniavskii
30
+ - [DataGrid] Fix selected text in cell input not being copied in Firefox (#6593) @cherniavskii
31
+ - [DataGrid] Invert generic parameters order (#6874) @DanailH
32
+ - [DataGrid] Remove legacy logic for `singleSelect` inside `GridFilterInputValue` (#7386) @m4theushw
33
+ - [DataGrid] Remove remaining props from legacy editing API (#7381) @m4theushw
34
+ - [DataGrid] Set default `GridCellParams['value']` type to `unknown` (#6959) @cherniavskii
35
+
36
+ ### `@mui/x-date-pickers@v6.0.0-alpha.14` / `@mui/x-date-pickers-pro@v6.0.0-alpha.14`
37
+
38
+ #### Breaking changes
39
+
40
+ - [fields] Rename the `input` slot of the fields to `textField` to avoid confusion (#7369) @flaviendelangle
41
+
42
+ #### Changes
43
+
44
+ - [fields] Add `SingleInputTimeRangeField` and `SingleInputDateTimeRangeField` components (#7186) @alexfauquette
45
+ - [fields] Improve editing (automatic section switch, allow letter editing in digit section, allow numeric editing in letter section) (#7272) @flaviendelangle
46
+ - [fields] Rename the `input` slot of the fields to `textField` to avoid confusion (#7369) @flaviendelangle
47
+ - [fields] Prevent date change on `TimeField` arrow edition (#7383) @flaviendelangle
48
+ - [pickers] Clean some JSDoc descriptions (#7384) @flaviendelangle
49
+ - [pickers] Remove redundant `variants` in theme augmentation (#7356) @LukasTy
50
+ - [pickers] Remove the `PaperContent` slot from the new pickers (#7342) @flaviendelangle
51
+ - [pickers] Use grid for modifying the layout (#6900) @alexfauquette
52
+
53
+ ### `@mui/x-codemod@v6.0.0-alpha.14`
54
+
55
+ #### Changes
56
+
57
+ - [codemod] Add new codemod for adapter import (#7348) @flaviendelangle
58
+ - [codemod] Add new codemod for the value prop renaming on the view components (#7338) @flaviendelangle
59
+ - [codemod] Reorganize codemods and add rename column menu components codemod (#7368) @MBilalShafi
60
+
61
+ ### Docs
62
+
63
+ - [docs] Add example to add back the mobile keyboard view (#7347) @flaviendelangle
64
+ - [docs] Cleanup the doc pages of the community pickers (#7339) @flaviendelangle
65
+ - [docs] Drop security fixes support for v4 (#7322) @oliviertassinari
66
+ - [docs] Fix `disablePast` and `disableFuture` definition swap (#7324) @alexfauquette
67
+ - [docs] Hide ad for paid docs pages (#7321) @oliviertassinari
68
+ - [docs] New page for `TimeClock` (#7280) @flaviendelangle
69
+ - [docs] Note the pickers breaking changes supported by the codemod (#7337) @flaviendelangle
70
+ - [docs] Redirect translated pages (#7341) @cherniavskii
71
+ - [docs] Reorganize v6 pickers migration guide (#7257) @flaviendelangle
72
+
73
+ ### Core
74
+
75
+ - [core] Apply eslint rule for React component @oliviertassinari
76
+ - [core] Apply title capitalization convention @oliviertassinari
77
+ - [core] Fix the product license reference name (#7367) @oliviertassinari
78
+ - [core] Order the slots alphabetically in the JSON files (#7349) @flaviendelangle
79
+ - [core] Remove blanklines in `_redirects` @oliviertassinari
80
+ - [core] Remove dead prettier config @oliviertassinari
81
+ - [core] Sync back with the mono repo (#7351) @oliviertassinari
82
+ - [core] Sync monorepo, fix layout scrollbar @oliviertassinari
83
+ - [core] Upgrade monorepo (#7307) @LukasTy
84
+
85
+ ## 6.0.0-alpha.13
86
+
87
+ _Dec 24, 2022_
88
+
89
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
90
+
91
+ - 🚀 New column menu design and API
92
+ - 🌍 Improve Russian (ru-RU) and Korean (ko-KR) locales
93
+ - 📚 Documentation improvements
94
+ - 🐞 Bugfixes
95
+
96
+ ### `@mui/x-data-grid@6.0.0-alpha.13` / `@mui/x-data-grid-pro@6.0.0-alpha.13` / `@mui/x-data-grid-premium@6.0.0-alpha.13`
97
+
98
+ #### Breaking changes
99
+
100
+ - New column menu design and API (#6619) MBilalShafi
101
+
102
+ The `currentColumn` prop passed to `components.ColumnMenu` was renamed to `colDef`.
103
+ The `column` prop passed to the items of the column menu was renamed to `colDef`.
104
+ The `DATA_GRID_DEFAULT_SLOTS_COMPONENTS` export has been removed.
105
+ The following components and interfaces were been renamed for consistency:
106
+
107
+ **Community Package:**
108
+
109
+ ```diff
110
+ -<GridFilterMenuItem />
111
+ +<GridColumnMenuFilterItem />
112
+ ```
113
+
114
+ ```diff
115
+ -<HideGridColMenuItem />
116
+ +<GridColumnMenuHideItem />
117
+ ```
118
+
119
+ ```diff
120
+ -<GridColumnsMenuItem />
121
+ +<GridColumnMenuColumnsItem />
122
+ ```
123
+
124
+ ```diff
125
+ -<SortGridMenuItems />
126
+ +<GridColumnMenuSortItem />
127
+ ```
128
+
129
+ ```diff
130
+ -interface GridFilterItemProps
131
+ +interface GridColumnMenuItemProps
132
+ ```
133
+
134
+ **Pro package:**
135
+
136
+ ```diff
137
+ -<GridColumnPinningMenuItems />
138
+ +<GridColumnMenuPinningItem />
139
+ ```
140
+
141
+ **Premium package:**
142
+
143
+ ```diff
144
+ -<GridAggregationColumnMenuItem />
145
+ +<GridColumnMenuAggregationItem />
146
+ ```
147
+
148
+ ```diff
149
+ -<GridRowGroupingColumnMenuItems />
150
+ -<GridRowGroupableColumnMenuItems />
151
+ +<GridColumnMenuGroupingItem />
152
+ ```
153
+
154
+ - Improve column definition typing (#7224) @cherniavskii
155
+
156
+ The `GridColumns` type was removed. Use `GridColDef[]` instead.
157
+ The `GridActionsColDef` interface was removed. Use `GridColDef` instead.
158
+ The `GridEnrichedColDef` type was removed. Use `GridColDef` instead.
159
+ The `GridStateColDef` type was removed.
160
+
161
+ If you use it to type `searchPredicate`, use `GridColumnsPanelProps['searchPredicate']` instead.
162
+ If you use it to type `getApplyFilterFn`, `GridFilterOperator['getApplyFilterFn']` can be used as replacement.
163
+
164
+ - Remove GridDensityType enum (#7304) @cherniavskii
165
+
166
+ The `GridDensityTypes` enum was removed. Use `GridDensity` type instead.
167
+
168
+ #### Changes
169
+
170
+ - [DataGrid] Allow disabling of buttons in column panel (#6947) @MBilalShafi
171
+ - [DataGrid] Improve column definition typing (#7224) @cherniavskii
172
+ - [DataGrid] Improve column menu design and API (#6619) @MBilalShafi
173
+ - [DataGrid] Remove `GridDensityType` enum (#7304) @cherniavskii
174
+ - [DataGrid] Remove `rowHeight` and `headerHeight` from state (#7199) @DanailH
175
+ - [DataGrid] Remove column separator to match table styles (#7067) @MBilalShafi
176
+ - [DataGrid] Update Russian (ru-RU) locale (#7220) @VeceluXa
177
+ - [DataGridPro] Use row ID as `key` of the detail panels (#7302) @m4theushw
178
+ - [DataGridPremium] Fix `exceljs` import with parcel (#7284) @alexfauquette
179
+
180
+ ### `@mui/x-date-pickers@6.0.0-alpha.13` / `@mui/x-date-pickers-pro@6.0.0-alpha.13`
181
+
182
+ #### Breaking changes
183
+
184
+ - Require Luxon 3.0.2 or higher (#7249) @flaviendelangle
185
+
186
+ `AdapterLuxon` now requires `luxon` in version `3.0.2` or higher in order to work.
187
+
188
+ Take a look at the [Upgrading Luxon](https://moment.github.io/luxon/#/upgrading) guide if you are using an older version.
189
+
190
+ #### Changes
191
+
192
+ - [DateRangePicker] Fix to propagate `disabled` and `readOnly` on multi input picker (#7135) @LukasTy
193
+ - [fields] Fix multi input fields root element props order and types (#7225) @LukasTy
194
+ - [fields] Support escaped characters (#7184) @flaviendelangle
195
+ - [pickers] Allow to define custom view renderers on the pickers (#7176) @flaviendelangle
196
+ - [pickers] Avoid running validation methods several times in `DateCalendar` (#7247) @flaviendelangle
197
+ - [pickers] Improve Korean (ko-KR) locale (#7266) @hanbin9775
198
+ - [pickers] Require Luxon 3.0.2 or higher (#7249) @flaviendelangle
199
+ - [pickers] Rework view internals (#7097) @flaviendelangle
200
+
201
+ ### `@mui/x-codemod@6.0.0-alpha.13`
202
+
203
+ #### Changes
204
+
205
+ - [codemod] New codemod for view component renaming (#7264) @flaviendelangle
206
+
207
+ ### Docs
208
+
209
+ - [docs] Fix some selectors not being documented (#7218) @cherniavskii
210
+ - [docs] New page for `DateCalendar` (#7053) @flaviendelangle
211
+ - [docs] Split selection docs (#7213) @m4theushw
212
+
213
+ ### Core
214
+
215
+ - [core] Fix API demos callout spacing @oliviertassinari
216
+
6
217
  ## 6.0.0-alpha.12
7
218
 
8
219
  _Dec 16, 2022_
@@ -1375,6 +1586,61 @@ You can find more information about the new api, including how to set those tran
1375
1586
  - [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
1376
1587
  - [website] Improve security header @oliviertassinari
1377
1588
 
1589
+ ## 5.17.18
1590
+
1591
+ _Jan 5, 2023_
1592
+
1593
+ We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
1594
+
1595
+ - 🐞 Bugfixes
1596
+
1597
+ ### `@mui/x-data-grid@v5.17.18` / `@mui/x-data-grid-pro@v5.17.18` / `@mui/x-data-grid-premium@v5.17.18`
1598
+
1599
+ #### Changes
1600
+
1601
+ - [DataGrid] Fix rows not rendering properly after height change (#7376) @cherniavskii
1602
+ - [DataGrid] Fix selected text in cell input not being copied in Firefox (#7330) @cherniavskii
1603
+ - [DataGridPremium] Export row grouping column menu components (#7308) @cherniavskii
1604
+
1605
+ ### `@mui/x-date-pickers@v5.0.13` / `@mui/x-date-pickers-pro@v5.0.13`
1606
+
1607
+ #### Changes
1608
+
1609
+ - [pickers] Fix the product license reference name (#7367)
1610
+
1611
+ ### Docs
1612
+
1613
+ - [docs] Redirect translated pages (#7370) @cherniavskii
1614
+
1615
+ ### Core
1616
+
1617
+ - [core] Fix release date (#7314) @DanailH
1618
+ - [core] Fix the product license reference name (#7367) @oliviertassinari
1619
+ - [core] Upgrade monorepo (#7344) @cherniavskii
1620
+
1621
+ ## 5.17.17
1622
+
1623
+ _Dec 24, 2022_
1624
+
1625
+ We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
1626
+
1627
+ - 🌍 Improve Russian (ru-RU) and Korean (ko-KR) locales
1628
+ - 🐞 Bugfixes
1629
+
1630
+ ### `@mui/x-data-grid@v5.17.17` / `@mui/x-data-grid-pro@v5.17.17` / `@mui/x-data-grid-premium@v5.17.17`
1631
+
1632
+ #### Changes
1633
+
1634
+ - [DataGrid] Update Russian (ru-RU) locale (#7291) @VeceluXa
1635
+ - [DataGridPro] Use row ID as `key` of the detail panels (#7311) @m4theushw
1636
+ - [DataGridPremium] Fix `exceljs` import with parcel (#7285) @alexfauquette
1637
+
1638
+ ### `@mui/x-date-pickers@v5.0.12` / `@mui/x-date-pickers-pro@v5.0.12`
1639
+
1640
+ #### Changes
1641
+
1642
+ - [pickers] Improve Korean (ko-KR) locale (#7283) @hanbin9775
1643
+
1378
1644
  ## 5.17.16
1379
1645
 
1380
1646
  _Dec 16, 2022_
@@ -112,7 +112,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
112
112
  columnBuffer: PropTypes.number,
113
113
  columnGroupingModel: PropTypes.arrayOf(PropTypes.object),
114
114
  /**
115
- * Set of columns of type [[GridColumns]].
115
+ * Set of columns of type [[GridColDef[]]].
116
116
  */
117
117
  columns: PropTypes.arrayOf(PropTypes.object).isRequired,
118
118
  /**
@@ -242,10 +242,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
242
242
  * @default "cell"
243
243
  */
244
244
  editMode: PropTypes.oneOf(['cell', 'row']),
245
- /**
246
- * Set the edit rows model of the grid.
247
- */
248
- editRowsModel: PropTypes.object,
249
245
  /**
250
246
  * An error that will turn the grid into its error state and display the error component.
251
247
  */
@@ -578,12 +574,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
578
574
  * @param {GridCallbackDetails} details Additional details for this callback.
579
575
  */
580
576
  onDetailPanelExpandedRowIdsChange: PropTypes.func,
581
- /**
582
- * Callback fired when the `editRowsModel` changes.
583
- * @param {GridEditRowsModel} editRowsModel With all properties from [[GridEditRowsModel]].
584
- * @param {GridCallbackDetails} details Additional details for this callback.
585
- */
586
- onEditRowsModelChange: PropTypes.func,
587
577
  /**
588
578
  * Callback fired when an exception is thrown in the grid.
589
579
  * @param {any} args The arguments passed to the `showError` call.
@@ -1,8 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
- import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, DATA_GRID_DEFAULT_SLOTS_COMPONENTS, GRID_DEFAULT_LOCALE_TEXT } from '@mui/x-data-grid-pro';
4
+ import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT } from '@mui/x-data-grid-pro';
5
5
  import { GRID_AGGREGATION_FUNCTIONS } from '../hooks/features/aggregation';
6
+ import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridPremiumDefaultSlotsComponents';
6
7
 
7
8
  /**
8
9
  * The default values of `DataGridPremiumPropsWithDefaultValue` to inject in the props of DataGridPremium.
@@ -25,10 +26,10 @@ export const useDataGridPremiumProps = inProps => {
25
26
  const components = React.useMemo(() => {
26
27
  const overrides = themedProps.components;
27
28
  if (!overrides) {
28
- return _extends({}, DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
29
+ return _extends({}, DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
29
30
  }
30
31
  const mergedComponents = {};
31
- Object.entries(DATA_GRID_DEFAULT_SLOTS_COMPONENTS).forEach(([key, defaultComponent]) => {
32
+ Object.entries(DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS).forEach(([key, defaultComponent]) => {
32
33
  mergedComponents[key] = overrides[key] === undefined ? defaultComponent : overrides[key];
33
34
  });
34
35
  return mergedComponents;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
3
3
  import Box from '@mui/material/Box';
4
4
  import { styled } from '@mui/material/styles';
5
- import { getDataGridUtilityClass, gridClasses, GridColumnHeaderTitle, gridDensityHeaderHeightSelector, useGridSelector } from '@mui/x-data-grid';
5
+ import { getDataGridUtilityClass, gridClasses, GridColumnHeaderTitle } from '@mui/x-data-grid';
6
6
  import { getAggregationFunctionLabel } from '../hooks/features/aggregation/gridAggregationUtils';
7
7
  import { useGridApiContext } from '../hooks/utils/useGridApiContext';
8
8
  import { useGridRootProps } from '../hooks/utils/useGridRootProps';
@@ -57,10 +57,8 @@ function GridAggregationHeader(props) {
57
57
  } = props;
58
58
  const apiRef = useGridApiContext();
59
59
  const rootProps = useGridRootProps();
60
- const headerHeight = useGridSelector(apiRef, gridDensityHeaderHeightSelector);
61
60
  const ownerState = {
62
61
  classes: rootProps.classes,
63
- headerHeight,
64
62
  colDef
65
63
  };
66
64
  const classes = useUtilityClasses(ownerState);
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
3
+ declare function GridColumnMenuAggregationItem(props: GridColumnMenuItemProps): JSX.Element;
4
+ declare namespace GridColumnMenuAggregationItem {
5
+ var propTypes: any;
6
+ }
7
+ export { GridColumnMenuAggregationItem };
@@ -0,0 +1,110 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
4
+ import * as React from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import { useGridSelector } from '@mui/x-data-grid-pro';
7
+ import MenuItem from '@mui/material/MenuItem';
8
+ import ListItemIcon from '@mui/material/ListItemIcon';
9
+ import ListItemText from '@mui/material/ListItemText';
10
+ import FormControl from '@mui/material/FormControl';
11
+ import InputLabel from '@mui/material/InputLabel';
12
+ import { unstable_useId as useId } from '@mui/utils';
13
+ import Select from '@mui/material/Select';
14
+ import { useGridApiContext } from '../hooks/utils/useGridApiContext';
15
+ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
16
+ import { canColumnHaveAggregationFunction, getAggregationFunctionLabel, getAvailableAggregationFunctions } from '../hooks/features/aggregation/gridAggregationUtils';
17
+ import { gridAggregationModelSelector } from '../hooks/features/aggregation/gridAggregationSelectors';
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ function GridColumnMenuAggregationItem(props) {
21
+ const {
22
+ colDef
23
+ } = props;
24
+ const apiRef = useGridApiContext();
25
+ const rootProps = useGridRootProps();
26
+ const id = useId();
27
+ const aggregationModel = useGridSelector(apiRef, gridAggregationModelSelector);
28
+ const availableAggregationFunctions = React.useMemo(() => getAvailableAggregationFunctions({
29
+ aggregationFunctions: rootProps.aggregationFunctions,
30
+ colDef
31
+ }), [colDef, rootProps.aggregationFunctions]);
32
+ const selectedAggregationRule = React.useMemo(() => {
33
+ if (!colDef || !aggregationModel[colDef.field]) {
34
+ return '';
35
+ }
36
+ const aggregationFunctionName = aggregationModel[colDef.field];
37
+ if (canColumnHaveAggregationFunction({
38
+ colDef,
39
+ aggregationFunctionName,
40
+ aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName]
41
+ })) {
42
+ return aggregationFunctionName;
43
+ }
44
+ return '';
45
+ }, [rootProps.aggregationFunctions, aggregationModel, colDef]);
46
+ const handleAggregationItemChange = event => {
47
+ var _event$target;
48
+ const newAggregationItem = ((_event$target = event.target) == null ? void 0 : _event$target.value) || undefined;
49
+ const currentModel = gridAggregationModelSelector(apiRef);
50
+ const _colDef$field = colDef.field,
51
+ otherColumnItems = _objectWithoutPropertiesLoose(currentModel, [_colDef$field].map(_toPropertyKey));
52
+ const newModel = newAggregationItem == null ? otherColumnItems : _extends({}, otherColumnItems, {
53
+ [colDef == null ? void 0 : colDef.field]: newAggregationItem
54
+ });
55
+ apiRef.current.setAggregationModel(newModel);
56
+ apiRef.current.hideColumnMenu();
57
+ };
58
+ const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
59
+ return /*#__PURE__*/_jsxs(MenuItem, {
60
+ disableRipple: true,
61
+ children: [/*#__PURE__*/_jsx(ListItemIcon, {
62
+ children: /*#__PURE__*/_jsx(rootProps.components.ColumnMenuAggregationIcon, {
63
+ fontSize: "small"
64
+ })
65
+ }), /*#__PURE__*/_jsx(ListItemText, {
66
+ children: /*#__PURE__*/_jsxs(FormControl, {
67
+ size: "small",
68
+ fullWidth: true,
69
+ sx: {
70
+ minWidth: 150
71
+ },
72
+ children: [/*#__PURE__*/_jsx(InputLabel, {
73
+ id: `${id}-label`,
74
+ children: label
75
+ }), /*#__PURE__*/_jsxs(Select, {
76
+ labelId: `${id}-label`,
77
+ id: `${id}-input`,
78
+ value: selectedAggregationRule,
79
+ label: label,
80
+ color: "primary",
81
+ onChange: handleAggregationItemChange,
82
+ onBlur: e => e.stopPropagation(),
83
+ fullWidth: true,
84
+ children: [/*#__PURE__*/_jsx(MenuItem, {
85
+ value: "",
86
+ children: "..."
87
+ }), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_jsx(MenuItem, {
88
+ value: aggFunc,
89
+ children: getAggregationFunctionLabel({
90
+ apiRef,
91
+ aggregationRule: {
92
+ aggregationFunctionName: aggFunc,
93
+ aggregationFunction: rootProps.aggregationFunctions[aggFunc]
94
+ }
95
+ })
96
+ }, aggFunc))]
97
+ })]
98
+ })
99
+ })]
100
+ });
101
+ }
102
+ process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {
103
+ // ----------------------------- Warning --------------------------------
104
+ // | These PropTypes are generated from the TypeScript type definitions |
105
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
106
+ // ----------------------------------------------------------------------
107
+ colDef: PropTypes.object.isRequired,
108
+ onClick: PropTypes.func.isRequired
109
+ } : void 0;
110
+ export { GridColumnMenuAggregationItem };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
3
+ declare function GridColumnMenuRowGroupItem(props: GridColumnMenuItemProps): JSX.Element | null;
4
+ declare namespace GridColumnMenuRowGroupItem {
5
+ var propTypes: any;
6
+ }
7
+ export { GridColumnMenuRowGroupItem };
@@ -1,49 +1,58 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import MenuItem from '@mui/material/MenuItem';
4
+ import ListItemIcon from '@mui/material/ListItemIcon';
5
+ import ListItemText from '@mui/material/ListItemText';
4
6
  import { useGridSelector, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
5
7
  import { useGridApiContext } from '../hooks/utils/useGridApiContext';
6
8
  import { gridRowGroupingSanitizedModelSelector } from '../hooks/features/rowGrouping/gridRowGroupingSelector';
7
9
  import { getRowGroupingCriteriaFromGroupingField, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, isGroupingColumn } from '../hooks/features/rowGrouping/gridRowGroupingUtils';
10
+ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
8
11
  import { jsx as _jsx } from "react/jsx-runtime";
9
- function GridRowGroupingColumnMenuItems(props) {
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ function GridColumnMenuRowGroupItem(props) {
10
14
  const {
11
- column,
15
+ colDef,
12
16
  onClick
13
17
  } = props;
14
18
  const apiRef = useGridApiContext();
15
19
  const rowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
16
20
  const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);
21
+ const rootProps = useGridRootProps();
17
22
  const renderUnGroupingMenuItem = field => {
18
23
  var _columnsLookup$field$;
19
24
  const ungroupColumn = event => {
20
25
  apiRef.current.removeRowGroupingCriteria(field);
21
- if (onClick) {
22
- onClick(event);
23
- }
26
+ onClick(event);
24
27
  };
25
28
  const name = (_columnsLookup$field$ = columnsLookup[field].headerName) != null ? _columnsLookup$field$ : field;
26
- return /*#__PURE__*/_jsx(MenuItem, {
29
+ return /*#__PURE__*/_jsxs(MenuItem, {
27
30
  onClick: ungroupColumn,
28
- children: apiRef.current.getLocaleText('unGroupColumn')(name)
31
+ children: [/*#__PURE__*/_jsx(ListItemIcon, {
32
+ children: /*#__PURE__*/_jsx(rootProps.components.ColumnMenuUngroupIcon, {
33
+ fontSize: "small"
34
+ })
35
+ }), /*#__PURE__*/_jsx(ListItemText, {
36
+ children: apiRef.current.getLocaleText('unGroupColumn')(name)
37
+ })]
29
38
  }, field);
30
39
  };
31
- if (!column || !isGroupingColumn(column.field)) {
40
+ if (!colDef || !isGroupingColumn(colDef.field)) {
32
41
  return null;
33
42
  }
34
- if (column.field === GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD) {
43
+ if (colDef.field === GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD) {
35
44
  return /*#__PURE__*/_jsx(React.Fragment, {
36
45
  children: rowGroupingModel.map(renderUnGroupingMenuItem)
37
46
  });
38
47
  }
39
- return renderUnGroupingMenuItem(getRowGroupingCriteriaFromGroupingField(column.field));
48
+ return renderUnGroupingMenuItem(getRowGroupingCriteriaFromGroupingField(colDef.field));
40
49
  }
41
- process.env.NODE_ENV !== "production" ? GridRowGroupingColumnMenuItems.propTypes = {
50
+ process.env.NODE_ENV !== "production" ? GridColumnMenuRowGroupItem.propTypes = {
42
51
  // ----------------------------- Warning --------------------------------
43
52
  // | These PropTypes are generated from the TypeScript type definitions |
44
53
  // | To update them edit the TypeScript types and run "yarn proptypes" |
45
54
  // ----------------------------------------------------------------------
46
- column: PropTypes.object,
47
- onClick: PropTypes.func
55
+ colDef: PropTypes.object.isRequired,
56
+ onClick: PropTypes.func.isRequired
48
57
  } : void 0;
49
- export { GridRowGroupingColumnMenuItems };
58
+ export { GridColumnMenuRowGroupItem };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
3
+ declare function GridColumnMenuRowUngroupItem(props: GridColumnMenuItemProps): JSX.Element | null;
4
+ declare namespace GridColumnMenuRowUngroupItem {
5
+ var propTypes: any;
6
+ }
7
+ export { GridColumnMenuRowUngroupItem };
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import MenuItem from '@mui/material/MenuItem';
4
+ import ListItemIcon from '@mui/material/ListItemIcon';
5
+ import ListItemText from '@mui/material/ListItemText';
6
+ import { gridColumnLookupSelector, useGridSelector } from '@mui/x-data-grid-pro';
7
+ import { useGridApiContext } from '../hooks/utils/useGridApiContext';
8
+ import { gridRowGroupingSanitizedModelSelector } from '../hooks/features/rowGrouping/gridRowGroupingSelector';
9
+ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ function GridColumnMenuRowUngroupItem(props) {
13
+ var _columnsLookup$colDef;
14
+ const {
15
+ colDef,
16
+ onClick
17
+ } = props;
18
+ const apiRef = useGridApiContext();
19
+ const rowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
20
+ const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);
21
+ const rootProps = useGridRootProps();
22
+ if (!colDef.groupable) {
23
+ return null;
24
+ }
25
+ const ungroupColumn = event => {
26
+ apiRef.current.removeRowGroupingCriteria(colDef.field);
27
+ onClick(event);
28
+ };
29
+ const groupColumn = event => {
30
+ apiRef.current.addRowGroupingCriteria(colDef.field);
31
+ onClick(event);
32
+ };
33
+ const name = (_columnsLookup$colDef = columnsLookup[colDef.field].headerName) != null ? _columnsLookup$colDef : colDef.field;
34
+ if (rowGroupingModel.includes(colDef.field)) {
35
+ return /*#__PURE__*/_jsxs(MenuItem, {
36
+ onClick: ungroupColumn,
37
+ children: [/*#__PURE__*/_jsx(ListItemIcon, {
38
+ children: /*#__PURE__*/_jsx(rootProps.components.ColumnMenuUngroupIcon, {
39
+ fontSize: "small"
40
+ })
41
+ }), /*#__PURE__*/_jsx(ListItemText, {
42
+ children: apiRef.current.getLocaleText('unGroupColumn')(name)
43
+ })]
44
+ });
45
+ }
46
+ return /*#__PURE__*/_jsxs(MenuItem, {
47
+ onClick: groupColumn,
48
+ children: [/*#__PURE__*/_jsx(ListItemIcon, {
49
+ children: /*#__PURE__*/_jsx(rootProps.components.ColumnMenuGroupIcon, {
50
+ fontSize: "small"
51
+ })
52
+ }), /*#__PURE__*/_jsx(ListItemText, {
53
+ children: apiRef.current.getLocaleText('groupColumn')(name)
54
+ })]
55
+ });
56
+ }
57
+ process.env.NODE_ENV !== "production" ? GridColumnMenuRowUngroupItem.propTypes = {
58
+ // ----------------------------- Warning --------------------------------
59
+ // | These PropTypes are generated from the TypeScript type definitions |
60
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
61
+ // ----------------------------------------------------------------------
62
+ colDef: PropTypes.object.isRequired,
63
+ onClick: PropTypes.func.isRequired
64
+ } : void 0;
65
+ export { GridColumnMenuRowUngroupItem };
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import { GridColumnMenuProps, GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
3
+ import { GridColumnMenuAggregationItem } from './GridColumnMenuAggregationItem';
4
+ export declare function GridColumnMenuGroupingItem(props: GridColumnMenuItemProps): JSX.Element | null;
5
+ export declare const GRID_COLUMN_MENU_COMPONENTS_PREMIUM: {
6
+ ColumnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
7
+ ColumnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
8
+ ColumnMenuPinningItem: typeof import("@mui/x-data-grid-pro/components/GridColumnMenuPinningItem").GridColumnMenuPinningItem;
9
+ ColumnMenuSortItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem").GridColumnMenuSortItem;
10
+ ColumnMenuFilterItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem").GridColumnMenuFilterItem;
11
+ ColumnMenuColumnsItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem").GridColumnMenuColumnsItem;
12
+ };
13
+ export declare const GRID_COLUMN_MENU_COMPONENTS_PROPS_PREMIUM: {
14
+ columnMenuAggregationItem: {
15
+ displayOrder: number;
16
+ };
17
+ columnMenuGroupingItem: {
18
+ displayOrder: number;
19
+ };
20
+ columnMenuPinningItem: {
21
+ displayOrder: number;
22
+ };
23
+ columnMenuSortItem: {
24
+ displayOrder: number;
25
+ };
26
+ columnMenuFilterItem: {
27
+ displayOrder: number;
28
+ };
29
+ columnMenuColumnsItem: {
30
+ displayOrder: number;
31
+ };
32
+ };
33
+ declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
34
+ export { GridPremiumColumnMenu };