@mui/x-data-grid-generator 7.28.3 → 7.29.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,161 @@
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.29.1
7
+
8
+ _Apr 23, 2025_
9
+
10
+ We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🐞 Bugfixes
13
+
14
+ Special thanks go out to the community contributors who have helped make this release possible:
15
+ @lhilgert9
16
+
17
+ Following are all team members who have contributed to this release:
18
+ @arminmeh, @cherniavskii, @flaviendelangle, @LukasTy, @romgrk.
19
+
20
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
21
+
22
+ ### Data Grid
23
+
24
+ #### `@mui/x-data-grid@7.29.1`
25
+
26
+ - [DataGrid] Prevent scrollbars from showing on top (#17410) @romgrk
27
+
28
+ #### `@mui/x-data-grid-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
29
+
30
+ Same changes as in `@mui/x-data-grid@7.29.1`, plus:
31
+
32
+ - [DataGridPro] Avoid proptypes warnings with header filters in React 17 (#17492) @cherniavskii
33
+ - [DataGridPro] Fix expandable rows detail content height updates (#17509) @arminmeh
34
+ - [DataGridPro] Fix row virtualization not working in list view (#17404) @cherniavskii
35
+ - [DataGridPro] Move locales re-export to allow proper tree shaking (#17438) @lhilgert9
36
+
37
+ #### `@mui/x-data-grid-premium@7.29.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
38
+
39
+ Same changes as in `@mui/x-data-grid-pro@7.29.1`, plus:
40
+
41
+ - [DataGridPremium] Use `groupingValueGetter` for row grouping on the server (#17423) @cherniavskii
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@7.29.1`
46
+
47
+ Internal changes.
48
+
49
+ #### `@mui/x-date-pickers-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-date-pickers@7.29.1`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@7.29.1`
56
+
57
+ Internal changes.
58
+
59
+ #### `@mui/x-charts-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
60
+
61
+ Same changes as in `@mui/x-charts@7.29.1`.
62
+
63
+ ### Tree View
64
+
65
+ #### `@mui/x-tree-view@7.29.1`
66
+
67
+ Internal changes.
68
+
69
+ #### `@mui/x-tree-view-pro@7.29.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
70
+
71
+ Same changes as in `@mui/x-tree-view@7.29.1`, plus:
72
+
73
+ - [RichTreeViewPro] Fix drag and drop issue with label editing (#17415) @flaviendelangle
74
+
75
+ ### Docs
76
+
77
+ - [docs] Use MUI X v7 packages in CodeSandbox and StackBlitz (#17516) @cherniavskii
78
+
79
+ ### Core
80
+
81
+ - [core] Bump monorepo (#17437) @LukasTy
82
+
83
+ ## 7.29.0
84
+
85
+ _Apr 16, 2025_
86
+
87
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
88
+
89
+ - 🐞 Bugfixes
90
+ - 🌍 Improve Hebrew (he-IL), Polish (pl-PL), and Swedish (sv-SE) locales on the Data Grid
91
+ - 🌍 Improve Czech (cs-CZ) and Slovak (sk-SK) locales on the Date and Time Pickers
92
+
93
+ Special thanks go out to the community contributors who have helped make this release possible:
94
+ @lubka272, @ptuukkan, @iddan, @sofortdagmbh
95
+
96
+ Following are all team members who have contributed to this release:
97
+ @michelengelen, @oliviertassinari, @michelengelen, @LukasTy.
98
+
99
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
100
+
101
+ ### Data Grid
102
+
103
+ #### `@mui/x-data-grid@7.29.0`
104
+
105
+ - [l10n] Improve Swedish (sv-SE) locale (#17306) @ptuukkan
106
+ - [l10n] Improve Hebrew (he-IL) locale (#16516) @iddan
107
+ - [l10n] Improve Polish (pl-PL) locale (#17306) @sofortdagmbh
108
+
109
+ #### `@mui/x-data-grid-pro@7.29.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
110
+
111
+ Same changes as in `@mui/x-data-grid@7.29.0`.
112
+
113
+ #### `@mui/x-data-grid-premium@7.29.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
114
+
115
+ Same changes as in `@mui/x-data-grid-pro@7.29.0`, plus:
116
+
117
+ - [DataGridPremium] Fix stale aggregation results after filtering (#17303) @cherniavskii
118
+ - [DataGridPremium] Fix aggregated values sorting (#17382) @cherniavskii
119
+
120
+ ### Date and Time Pickers
121
+
122
+ #### `@mui/x-date-pickers@7.29.0`
123
+
124
+ - [l10n] Improve Slovak (sk-SK) locale (#17204) @lubka272
125
+ - [l10n] Improve Czech (cs-CZ) locale (#17205) @lubka272
126
+
127
+ #### `@mui/x-date-pickers-pro@7.29.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
128
+
129
+ Same changes as in `@mui/x-date-pickers@7.29.0`.
130
+
131
+ ### Charts
132
+
133
+ #### `@mui/x-charts@7.29.0`
134
+
135
+ Internal changes.
136
+
137
+ #### `@mui/x-charts-pro@7.29.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
138
+
139
+ Same changes as in `@mui/x-charts@7.29.0`.
140
+
141
+ ### Tree View
142
+
143
+ #### `@mui/x-tree-view@7.29.0`
144
+
145
+ Internal changes.
146
+
147
+ #### `@mui/x-tree-view-pro@7.29.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
148
+
149
+ Same changes as in `@mui/x-tree-view@7.29.0`.
150
+
151
+ ### Core
152
+
153
+ - [core] Cleanup `@mui` dependency versions (#17390) @LukasTy
154
+
155
+ ### Docs
156
+
157
+ - [docs] Fix 404 link on the marketing page (#17276) @oliviertassinari
158
+ - [docs] Fix country columns throwing on grouping (#17317) @cherniavskii
159
+ - [release] Changes to v7 for major release (#17320) @michelengelen
160
+
6
161
  ## 7.28.3
7
162
 
8
163
  _Apr 3, 2025_
@@ -169,7 +169,7 @@ export const getCommodityColumns = (editable = false) => [{
169
169
  return value;
170
170
  },
171
171
  valueFormatter: value => value?.label,
172
- groupingValueGetter: value => value.code,
172
+ groupingValueGetter: value => value.label,
173
173
  sortComparator: (v1, v2, param1, param2) => gridStringOrNumberComparator(v1.label, v2.label, param1, param2),
174
174
  editable,
175
175
  width: 120
@@ -83,6 +83,7 @@ export const getEmployeeColumns = () => [{
83
83
  generateData: randomCountry,
84
84
  renderCell: renderCountry,
85
85
  renderEditCell: renderEditCountry,
86
+ groupingValueGetter: value => value.label,
86
87
  sortComparator: (v1, v2, param1, param2) => gridStringOrNumberComparator(v1.label, v2.label, param1, param2),
87
88
  width: 150,
88
89
  editable: true
@@ -367,7 +367,15 @@ export const processRowGroupingRows = (rows, queryOptions, serverOptions, column
367
367
  const groupFields = queryOptions.groupFields;
368
368
  if (groupFields.length > 0) {
369
369
  rowsWithPaths = rows.reduce((acc, row) => {
370
- const partialPath = groupFields.map(field => String(row[field]));
370
+ const partialPath = groupFields.map(field => {
371
+ const colDef = columnsWithDefaultColDef.find(({
372
+ field: f
373
+ }) => f === field);
374
+ if (colDef?.groupingValueGetter) {
375
+ return colDef.groupingValueGetter(row[field], row, colDef, apiRef);
376
+ }
377
+ return String(row[field]);
378
+ });
371
379
  for (let index = 0; index < partialPath.length; index += 1) {
372
380
  const value = partialPath[index];
373
381
  if (value === undefined) {
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { LRUCache } from 'lru-cache';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { LRUCache } from 'lru-cache';
package/hooks/useQuery.js CHANGED
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { getGridDefaultColumnTypes } from '@mui/x-data-grid-pro';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.28.3
2
+ * @mui/x-data-grid-generator v7.29.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -169,7 +169,7 @@ export const getCommodityColumns = (editable = false) => [{
169
169
  return value;
170
170
  },
171
171
  valueFormatter: value => value?.label,
172
- groupingValueGetter: value => value.code,
172
+ groupingValueGetter: value => value.label,
173
173
  sortComparator: (v1, v2, param1, param2) => gridStringOrNumberComparator(v1.label, v2.label, param1, param2),
174
174
  editable,
175
175
  width: 120
@@ -83,6 +83,7 @@ export const getEmployeeColumns = () => [{
83
83
  generateData: randomCountry,
84
84
  renderCell: renderCountry,
85
85
  renderEditCell: renderEditCountry,
86
+ groupingValueGetter: value => value.label,
86
87
  sortComparator: (v1, v2, param1, param2) => gridStringOrNumberComparator(v1.label, v2.label, param1, param2),
87
88
  width: 150,
88
89
  editable: true
@@ -367,7 +367,15 @@ export const processRowGroupingRows = (rows, queryOptions, serverOptions, column
367
367
  const groupFields = queryOptions.groupFields;
368
368
  if (groupFields.length > 0) {
369
369
  rowsWithPaths = rows.reduce((acc, row) => {
370
- const partialPath = groupFields.map(field => String(row[field]));
370
+ const partialPath = groupFields.map(field => {
371
+ const colDef = columnsWithDefaultColDef.find(({
372
+ field: f
373
+ }) => f === field);
374
+ if (colDef?.groupingValueGetter) {
375
+ return colDef.groupingValueGetter(row[field], row, colDef, apiRef);
376
+ }
377
+ return String(row[field]);
378
+ });
371
379
  for (let index = 0; index < partialPath.length; index += 1) {
372
380
  const value = partialPath[index];
373
381
  if (value === undefined) {
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { LRUCache } from 'lru-cache';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { LRUCache } from 'lru-cache';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { getGridDefaultColumnTypes } from '@mui/x-data-grid-pro';
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.28.3
2
+ * @mui/x-data-grid-generator v7.29.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -42,6 +42,9 @@ export function renderCountry(params) {
42
42
  if (params.aggregation && !params.aggregation.hasCellUnit) {
43
43
  return null;
44
44
  }
45
+ if (params.rowNode.type === 'group') {
46
+ return params.value;
47
+ }
45
48
  return /*#__PURE__*/_jsx(Country, {
46
49
  value: params.value
47
50
  });
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import clsx from 'clsx';
@@ -175,7 +175,7 @@ const getCommodityColumns = (editable = false) => [{
175
175
  return value;
176
176
  },
177
177
  valueFormatter: value => value?.label,
178
- groupingValueGetter: value => value.code,
178
+ groupingValueGetter: value => value.label,
179
179
  sortComparator: (v1, v2, param1, param2) => (0, _xDataGridPremium.gridStringOrNumberComparator)(v1.label, v2.label, param1, param2),
180
180
  editable,
181
181
  width: 120
@@ -89,6 +89,7 @@ const getEmployeeColumns = () => [{
89
89
  generateData: _services.randomCountry,
90
90
  renderCell: _renderer.renderCountry,
91
91
  renderEditCell: _renderer.renderEditCountry,
92
+ groupingValueGetter: value => value.label,
92
93
  sortComparator: (v1, v2, param1, param2) => (0, _xDataGridPremium.gridStringOrNumberComparator)(v1.label, v2.label, param1, param2),
93
94
  width: 150,
94
95
  editable: true
@@ -376,7 +376,15 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
376
376
  const groupFields = queryOptions.groupFields;
377
377
  if (groupFields.length > 0) {
378
378
  rowsWithPaths = rows.reduce((acc, row) => {
379
- const partialPath = groupFields.map(field => String(row[field]));
379
+ const partialPath = groupFields.map(field => {
380
+ const colDef = columnsWithDefaultColDef.find(({
381
+ field: f
382
+ }) => f === field);
383
+ if (colDef?.groupingValueGetter) {
384
+ return colDef.groupingValueGetter(row[field], row, colDef, apiRef);
385
+ }
386
+ return String(row[field]);
387
+ });
380
388
  for (let index = 0; index < partialPath.length; index += 1) {
381
389
  const value = partialPath[index];
382
390
  if (value === undefined) {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.28.3
2
+ * @mui/x-data-grid-generator v7.29.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -50,6 +50,9 @@ function renderCountry(params) {
50
50
  if (params.aggregation && !params.aggregation.hasCellUnit) {
51
51
  return null;
52
52
  }
53
+ if (params.rowNode.type === 'group') {
54
+ return params.value;
55
+ }
53
56
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Country, {
54
57
  value: params.value
55
58
  });
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "7.28.3",
3
+ "version": "7.29.1",
4
4
  "description": "Generate fake data for demo purposes only.",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -27,13 +27,13 @@
27
27
  "chance": "^1.1.12",
28
28
  "clsx": "^2.1.1",
29
29
  "lru-cache": "^11.0.1",
30
- "@mui/x-data-grid-premium": "7.28.3"
30
+ "@mui/x-data-grid-premium": "7.29.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@emotion/react": "^11.9.0",
34
34
  "@emotion/styled": "^11.8.1",
35
- "@mui/icons-material": "^5.4.1 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
36
- "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
35
+ "@mui/icons-material": "^5.4.1 || ^6.0.0 || ^7.0.0",
36
+ "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
37
37
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { GridRenderCellParams } from '@mui/x-data-grid-premium';
3
2
  import { CountryIsoOption } from '../services/static-data';
4
- export declare function renderCountry(params: GridRenderCellParams<CountryIsoOption, any, any>): "" | React.JSX.Element | null;
3
+ export declare function renderCountry(params: GridRenderCellParams<CountryIsoOption, any, any>): any;
@@ -42,6 +42,9 @@ export function renderCountry(params) {
42
42
  if (params.aggregation && !params.aggregation.hasCellUnit) {
43
43
  return null;
44
44
  }
45
+ if (params.rowNode.type === 'group') {
46
+ return params.value;
47
+ }
45
48
  return /*#__PURE__*/_jsx(Country, {
46
49
  value: params.value
47
50
  });
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import clsx from 'clsx';