@mui/x-data-grid-generator 5.15.3 → 5.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,62 @@
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
+ ## 5.16.0
7
+
8
+ _Aug 25, 2022_
9
+
10
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Introduce column grouping for data grid (#5133) @alexfauquette
13
+
14
+ You can now group columns using the `columnGroupingModel` prop. This lets you to display more structured data.
15
+
16
+ <img src="https://user-images.githubusercontent.com/45398769/186178366-4fba66b2-bf90-4c7a-9d83-940a7fc78704.png" width="800" />
17
+
18
+ To enable this feature, add `experimentalFeatures={{ columnGrouping: true }}`.
19
+ The grouping header can be fully customized.
20
+ See the [documentation](https://mui.com/x/react-data-grid/column-groups/) to explore everything it has to offer.
21
+
22
+ - 🐞 Bugfixes
23
+ - 🌏 New locales for pickers thanks to @tesseractjh and @drastus
24
+
25
+ ### `@mui/x-data-grid@v5.16.0` / `@mui/x-data-grid-pro@v5.16.0` / `@mui/x-data-grid-premium@v5.16.0`
26
+
27
+ #### Changes
28
+
29
+ - [DataGrid] Implement column grouping (#5133) @alexfauquette
30
+ - [DataGrid] Handle `disableVirtualization` prop change (#5889) @cherniavskii
31
+ - [DataGrid] Improve `GridRowModel` typing (#5734) @cherniavskii
32
+ - [DataGrid] Update deprecation note for `GridColDef` `hide` property (#5886) @cherniavskii
33
+
34
+ ### `@mui/x-date-pickers@v5.0.0-beta.7` / `@mui/x-date-pickers-pro@v5.0.0-beta.7`
35
+
36
+ #### Changes
37
+
38
+ - [DatePicker] Fix to pass down `className` prop provided on DatePicker to `renderInput` (#5471) @CruseCtrl
39
+ - [DatePicker] Improve `a11y` support (#5809) @LukasTy
40
+ - [pickers] Add `PaperContent` component slot (#5801) @LukasTy
41
+ - [pickers] Add a breaking change section in the migration guide (#5805) @alexfauquette
42
+ - [pickers] Add new translations to `localeText` (#5143) @alexfauquette
43
+ - [pickers] Document components slots (#4657) @flaviendelangle
44
+ - [pickers] Add new unstable field components (#5504) @flaviendelangle
45
+ - [pickers] Fallback to default `minDate` / `maxDate` when `null` value is passed (#5397) @flaviendelangle
46
+ - [l10n] Add Korean (ko-KR) locale (#5854) @tesseractjh
47
+ - [l10n] Add Polish (pl-PL) locale (#5833) @drastus
48
+
49
+ ### Docs
50
+
51
+ - [docs] Fix typo in `migration from lab` (#5277) @chuckwired
52
+ - [docs] Use `dayjs` instead of `date-fns` in doc examples (#5481) @flaviendelangle
53
+
54
+ ### Core
55
+
56
+ - [core] Clarify the scope of the license key used for tests and documentation (#5824) @oliviertassinari
57
+ - [core] Fix Typescript error on field hooks (#5892) @flaviendelangle
58
+ - [core] Memoize `columns` in `useDemoData` hook (#5848) @cherniavskii
59
+ - [core] Remove Firefox from the BrowserStack list (#5874) @DanailH
60
+ - [core] Small changes to the release script (#5840) @m4theushw
61
+
6
62
  ## 5.15.3
7
63
 
8
64
  _Aug 18, 2022_
@@ -113,7 +113,7 @@ export const useDemoData = options => {
113
113
  const [rowLength, setRowLength] = React.useState(options.rowLength);
114
114
  const [index, setIndex] = React.useState(0);
115
115
  const [loading, setLoading] = React.useState(true);
116
- const getColumns = React.useCallback(() => {
116
+ const columns = React.useMemo(() => {
117
117
  return getColumnsFromOptions({
118
118
  dataSet: options.dataSet,
119
119
  editable: options.editable,
@@ -122,7 +122,6 @@ export const useDemoData = options => {
122
122
  });
123
123
  }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields]);
124
124
  const [data, setData] = React.useState(() => {
125
- const columns = getColumns();
126
125
  return addTreeDataOptionsToDemoData({
127
126
  columns,
128
127
  rows: [],
@@ -149,10 +148,10 @@ export const useDemoData = options => {
149
148
  let newData;
150
149
 
151
150
  if (rowLength > 1000) {
152
- newData = await getRealGridData(1000, getColumns());
151
+ newData = await getRealGridData(1000, columns);
153
152
  newData = await extrapolateSeed(rowLength, newData);
154
153
  } else {
155
- newData = await getRealGridData(rowLength, getColumns());
154
+ newData = await getRealGridData(rowLength, columns);
156
155
  }
157
156
 
158
157
  if (!active) {
@@ -177,7 +176,7 @@ export const useDemoData = options => {
177
176
  return () => {
178
177
  active = false;
179
178
  };
180
- }, [rowLength, options.dataSet, options.maxColumns, (_options$treeData5 = options.treeData) == null ? void 0 : _options$treeData5.maxDepth, (_options$treeData6 = options.treeData) == null ? void 0 : _options$treeData6.groupingField, (_options$treeData7 = options.treeData) == null ? void 0 : _options$treeData7.averageChildren, index, getColumns]);
179
+ }, [rowLength, options.dataSet, options.maxColumns, (_options$treeData5 = options.treeData) == null ? void 0 : _options$treeData5.maxDepth, (_options$treeData6 = options.treeData) == null ? void 0 : _options$treeData6.groupingField, (_options$treeData7 = options.treeData) == null ? void 0 : _options$treeData7.averageChildren, index, columns]);
181
180
  return {
182
181
  data,
183
182
  loading,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.3
1
+ /** @license MUI v5.16.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -166,7 +166,7 @@ export var useDemoData = function useDemoData(options) {
166
166
  loading = _React$useState6[0],
167
167
  setLoading = _React$useState6[1];
168
168
 
169
- var getColumns = React.useCallback(function () {
169
+ var columns = React.useMemo(function () {
170
170
  return getColumnsFromOptions({
171
171
  dataSet: options.dataSet,
172
172
  editable: options.editable,
@@ -176,7 +176,6 @@ export var useDemoData = function useDemoData(options) {
176
176
  }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields]);
177
177
 
178
178
  var _React$useState7 = React.useState(function () {
179
- var columns = getColumns();
180
179
  return addTreeDataOptionsToDemoData({
181
180
  columns: columns,
182
181
  rows: [],
@@ -216,7 +215,7 @@ export var useDemoData = function useDemoData(options) {
216
215
  }
217
216
 
218
217
  _context.next = 4;
219
- return getRealGridData(1000, getColumns());
218
+ return getRealGridData(1000, columns);
220
219
 
221
220
  case 4:
222
221
  newData = _context.sent;
@@ -230,7 +229,7 @@ export var useDemoData = function useDemoData(options) {
230
229
 
231
230
  case 10:
232
231
  _context.next = 12;
233
- return getRealGridData(rowLength, getColumns());
232
+ return getRealGridData(rowLength, columns);
234
233
 
235
234
  case 12:
236
235
  newData = _context.sent;
@@ -269,7 +268,7 @@ export var useDemoData = function useDemoData(options) {
269
268
  return function () {
270
269
  active = false;
271
270
  };
272
- }, [rowLength, options.dataSet, options.maxColumns, (_options$treeData5 = options.treeData) == null ? void 0 : _options$treeData5.maxDepth, (_options$treeData6 = options.treeData) == null ? void 0 : _options$treeData6.groupingField, (_options$treeData7 = options.treeData) == null ? void 0 : _options$treeData7.averageChildren, index, getColumns]);
271
+ }, [rowLength, options.dataSet, options.maxColumns, (_options$treeData5 = options.treeData) == null ? void 0 : _options$treeData5.maxDepth, (_options$treeData6 = options.treeData) == null ? void 0 : _options$treeData6.groupingField, (_options$treeData7 = options.treeData) == null ? void 0 : _options$treeData7.averageChildren, index, columns]);
273
272
  return {
274
273
  data: data,
275
274
  loading: loading,
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.3
1
+ /** @license MUI v5.16.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -105,7 +105,7 @@ export const useDemoData = options => {
105
105
  const [rowLength, setRowLength] = React.useState(options.rowLength);
106
106
  const [index, setIndex] = React.useState(0);
107
107
  const [loading, setLoading] = React.useState(true);
108
- const getColumns = React.useCallback(() => {
108
+ const columns = React.useMemo(() => {
109
109
  return getColumnsFromOptions({
110
110
  dataSet: options.dataSet,
111
111
  editable: options.editable,
@@ -114,7 +114,6 @@ export const useDemoData = options => {
114
114
  });
115
115
  }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields]);
116
116
  const [data, setData] = React.useState(() => {
117
- const columns = getColumns();
118
117
  return addTreeDataOptionsToDemoData({
119
118
  columns,
120
119
  rows: [],
@@ -139,10 +138,10 @@ export const useDemoData = options => {
139
138
  let newData;
140
139
 
141
140
  if (rowLength > 1000) {
142
- newData = await getRealGridData(1000, getColumns());
141
+ newData = await getRealGridData(1000, columns);
143
142
  newData = await extrapolateSeed(rowLength, newData);
144
143
  } else {
145
- newData = await getRealGridData(rowLength, getColumns());
144
+ newData = await getRealGridData(rowLength, columns);
146
145
  }
147
146
 
148
147
  if (!active) {
@@ -167,7 +166,7 @@ export const useDemoData = options => {
167
166
  return () => {
168
167
  active = false;
169
168
  };
170
- }, [rowLength, options.dataSet, options.maxColumns, options.treeData?.maxDepth, options.treeData?.groupingField, options.treeData?.averageChildren, index, getColumns]);
169
+ }, [rowLength, options.dataSet, options.maxColumns, options.treeData?.maxDepth, options.treeData?.groupingField, options.treeData?.averageChildren, index, columns]);
171
170
  return {
172
171
  data,
173
172
  loading,
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.3
1
+ /** @license MUI v5.16.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -140,7 +140,7 @@ const useDemoData = options => {
140
140
  const [rowLength, setRowLength] = React.useState(options.rowLength);
141
141
  const [index, setIndex] = React.useState(0);
142
142
  const [loading, setLoading] = React.useState(true);
143
- const getColumns = React.useCallback(() => {
143
+ const columns = React.useMemo(() => {
144
144
  return getColumnsFromOptions({
145
145
  dataSet: options.dataSet,
146
146
  editable: options.editable,
@@ -149,7 +149,6 @@ const useDemoData = options => {
149
149
  });
150
150
  }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields]);
151
151
  const [data, setData] = React.useState(() => {
152
- const columns = getColumns();
153
152
  return (0, _treeDataGenerator.addTreeDataOptionsToDemoData)({
154
153
  columns,
155
154
  rows: [],
@@ -176,10 +175,10 @@ const useDemoData = options => {
176
175
  let newData;
177
176
 
178
177
  if (rowLength > 1000) {
179
- newData = await (0, _realDataService.getRealGridData)(1000, getColumns());
178
+ newData = await (0, _realDataService.getRealGridData)(1000, columns);
180
179
  newData = await extrapolateSeed(rowLength, newData);
181
180
  } else {
182
- newData = await (0, _realDataService.getRealGridData)(rowLength, getColumns());
181
+ newData = await (0, _realDataService.getRealGridData)(rowLength, columns);
183
182
  }
184
183
 
185
184
  if (!active) {
@@ -204,7 +203,7 @@ const useDemoData = options => {
204
203
  return () => {
205
204
  active = false;
206
205
  };
207
- }, [rowLength, options.dataSet, options.maxColumns, (_options$treeData5 = options.treeData) == null ? void 0 : _options$treeData5.maxDepth, (_options$treeData6 = options.treeData) == null ? void 0 : _options$treeData6.groupingField, (_options$treeData7 = options.treeData) == null ? void 0 : _options$treeData7.averageChildren, index, getColumns]);
206
+ }, [rowLength, options.dataSet, options.maxColumns, (_options$treeData5 = options.treeData) == null ? void 0 : _options$treeData5.maxDepth, (_options$treeData6 = options.treeData) == null ? void 0 : _options$treeData6.groupingField, (_options$treeData7 = options.treeData) == null ? void 0 : _options$treeData7.averageChildren, index, columns]);
208
207
  return {
209
208
  data,
210
209
  loading,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.3
1
+ /** @license MUI v5.16.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "5.15.3",
3
+ "version": "5.16.0",
4
4
  "description": "Generate fake data for demo purposes only.",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -19,12 +19,12 @@
19
19
  "directory": "packages/grid/x-data-grid-generator"
20
20
  },
21
21
  "dependencies": {
22
- "@babel/runtime": "^7.18.6",
23
- "@mui/base": "^5.0.0-alpha.80",
24
- "@mui/x-data-grid-premium": "5.15.3",
22
+ "@babel/runtime": "^7.18.9",
23
+ "@mui/base": "^5.0.0-alpha.94",
24
+ "@mui/x-data-grid-premium": "5.16.0",
25
25
  "chance": "^1.1.8",
26
26
  "clsx": "^1.2.1",
27
- "lru-cache": "^7.13.2"
27
+ "lru-cache": "^7.14.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@mui/icons-material": "^5.4.1",