@mui/x-data-grid-generator 7.0.0-alpha.4 → 7.0.0-alpha.5

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,86 @@
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.0.0-alpha.5
7
+
8
+ _Dec 14, 2023_
9
+
10
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 💫 New recipe added for the Data Grid
13
+ - 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
14
+ - 🐞 Bugfixes
15
+
16
+ ### Data Grid
17
+
18
+ #### Breaking changes
19
+
20
+ - The `instanceId` prop is now required for state selectors.
21
+ This prop is used to distinguish between multiple Data Grid instances on the same page.
22
+ See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#instanceid-prop-is-required-for-state-selectors) for more details.
23
+
24
+ #### `@mui/x-data-grid@7.0.0-alpha.5`
25
+
26
+ - [DataGrid] Make `instanceId` required for state selectors (#11395) @cherniavskii
27
+ - [DataGrid] Recipe for grouped rows autosizing (#11401) @michelengelen
28
+ - [l10n] Improve Swedish (sv-SE) locale (#11373) @fredrikcarlbom
29
+ - [l10n] Improve Urdu (ur-PK) locale (#11400) @MBilalShafi
30
+
31
+ #### `@mui/x-data-grid-pro@7.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
32
+
33
+ Same changes as in `@mui/x-data-grid@7.0.0-alpha.5`.
34
+
35
+ #### `@mui/x-data-grid-premium@7.0.0-alpha.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
36
+
37
+ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
38
+
39
+ ### Date Pickers
40
+
41
+ #### Breaking changes
42
+
43
+ - The slot interfaces got renamed to match with `@mui/base` naming.
44
+ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
45
+
46
+ ```diff
47
+ - DateCalendarSlotsComponent
48
+ + DateCalendarSlots
49
+ - DateCalendarSlotsComponentsProps
50
+ + DateCalendarSlotProps
51
+ ```
52
+
53
+ #### `@mui/x-date-pickers@7.0.0-alpha.5`
54
+
55
+ - [fields] Support empty sections (#10307) @flaviendelangle
56
+ - [pickers] Fix field types to avoid error on latest `@types/react` version (#11397) @LukasTy
57
+ - [pickers] Remove all relative imports to the internals index file (#11375) @flaviendelangle
58
+ - [pickers] Rename slots interfaces (#11339) @alexfauquette
59
+ - [pickers] Simplify the API of the field hooks (#11371) @flaviendelangle
60
+ - [pickers] Support name prop (#11025) @gitstart
61
+
62
+ #### `@mui/x-date-pickers-pro@7.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
63
+
64
+ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
65
+
66
+ - [DateRangePicker] Fix `autoFocus` behavior (#11273) @kealjones-wk
67
+
68
+ ### Charts / `@mui/x-charts@7.0.0-alpha.5`
69
+
70
+ - [charts] Fix size overflow (#11385) @alexfauquette
71
+
72
+ ### `@mui/x-codemod@7.0.0-alpha.5`
73
+
74
+ - [codemod] Add `cellSelection` codemod and update migration guide (#11353) @MBilalShafi
75
+
76
+ ### Docs
77
+
78
+ - [docs] Respect GoT books (@janoma) (#11387) @alexfauquette
79
+
80
+ ### Core
81
+
82
+ - [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
83
+ - [github] Update `no-response` workflow (#11369) @MBilalShafi
84
+ - [test] Fix flaky screenshots (#11388) @cherniavskii
85
+
6
86
  ## 7.0.0-alpha.4
7
87
 
8
88
  _Dec 8, 2023_
@@ -949,6 +1029,48 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
949
1029
  - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
950
1030
  - [license] Correctly throw errors (#10924) @oliviertassinari
951
1031
 
1032
+ ## 6.18.5
1033
+
1034
+ _Dec 14, 2023_
1035
+
1036
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
1037
+
1038
+ - 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
1039
+ - 🐞 Bugfixes
1040
+
1041
+ ### Data Grid
1042
+
1043
+ #### `@mui/x-data-grid@6.18.5`
1044
+
1045
+ - [l10n] Improve Swedish (sv-SE) locale (#11379) @fredrikcarlbom
1046
+ - [l10n] Improve Urdu (ur-PK) locale for data grid (#11409) @MBilalShafi
1047
+
1048
+ #### `@mui/x-data-grid-pro@6.18.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
1049
+
1050
+ Same changes as in `@mui/x-data-grid@6.18.5`.
1051
+
1052
+ #### `@mui/x-data-grid-premium@6.18.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
1053
+
1054
+ Same changes as in `@mui/x-data-grid-pro@6.18.5`.
1055
+
1056
+ ### Date Pickers
1057
+
1058
+ #### `@mui/x-date-pickers@6.18.5`
1059
+
1060
+ - [pickers] Fix field types to avoid error on latest `@types/react` version (#11398) @LukasTy
1061
+ - [pickers] Support name prop (#11380) @gitstart
1062
+
1063
+ #### `@mui/x-date-pickers-pro@6.18.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
1064
+
1065
+ Same changes as in `@mui/x-date-pickers@6.18.5`, plus:
1066
+
1067
+ - [DateRangePicker] Fix `autoFocus` behavior (#11376) @kealjones-wk
1068
+
1069
+ ### Docs
1070
+
1071
+ - [docs] Respect GoT books (#11294) @janoma
1072
+ - [test] Fix flaky screenshots (#11391) @cherniavskii
1073
+
952
1074
  ## 6.18.4
953
1075
 
954
1076
  _Dec 8, 2023_
package/hooks/useQuery.js CHANGED
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-pro';
4
4
  import { isDeepEqual } from '@mui/x-data-grid/internals';
5
5
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
6
+ import { randomInt } from '../services/random-generator';
6
7
  const simplifiedValueGetter = (field, colDef) => row => {
7
8
  var _colDef$valueGetter;
8
9
  const params = {
@@ -98,7 +99,7 @@ export const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDef
98
99
  if (maxDelay < minDelay) {
99
100
  throw new Error('serverOptions.minDelay is larger than serverOptions.maxDelay ');
100
101
  }
101
- const delay = Math.random() * (maxDelay - minDelay) + minDelay;
102
+ const delay = randomInt(minDelay, maxDelay);
102
103
  const {
103
104
  cursor,
104
105
  page = 0,
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.4
2
+ * @mui/x-data-grid-generator v7.0.0-alpha.5
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -7,6 +7,7 @@ import * as React from 'react';
7
7
  import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-pro';
8
8
  import { isDeepEqual } from '@mui/x-data-grid/internals';
9
9
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
10
+ import { randomInt } from '../services/random-generator';
10
11
  var simplifiedValueGetter = function simplifiedValueGetter(field, colDef) {
11
12
  return function (row) {
12
13
  var _colDef$valueGetter;
@@ -118,7 +119,7 @@ export var loadServerRows = function loadServerRows(rows, queryOptions, serverOp
118
119
  if (maxDelay < minDelay) {
119
120
  throw new Error('serverOptions.minDelay is larger than serverOptions.maxDelay ');
120
121
  }
121
- var delay = Math.random() * (maxDelay - minDelay) + minDelay;
122
+ var delay = randomInt(minDelay, maxDelay);
122
123
  var cursor = queryOptions.cursor,
123
124
  _queryOptions$page = queryOptions.page,
124
125
  page = _queryOptions$page === void 0 ? 0 : _queryOptions$page,
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.4
2
+ * @mui/x-data-grid-generator v7.0.0-alpha.5
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-pro';
4
4
  import { isDeepEqual } from '@mui/x-data-grid/internals';
5
5
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
6
+ import { randomInt } from '../services/random-generator';
6
7
  const simplifiedValueGetter = (field, colDef) => row => {
7
8
  const params = {
8
9
  id: row.id,
@@ -96,7 +97,7 @@ export const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDef
96
97
  if (maxDelay < minDelay) {
97
98
  throw new Error('serverOptions.minDelay is larger than serverOptions.maxDelay ');
98
99
  }
99
- const delay = Math.random() * (maxDelay - minDelay) + minDelay;
100
+ const delay = randomInt(minDelay, maxDelay);
100
101
  const {
101
102
  cursor,
102
103
  page = 0,
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.4
2
+ * @mui/x-data-grid-generator v7.0.0-alpha.5
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -10,6 +10,7 @@ var React = _interopRequireWildcard(require("react"));
10
10
  var _xDataGridPro = require("@mui/x-data-grid-pro");
11
11
  var _internals = require("@mui/x-data-grid/internals");
12
12
  var _useDemoData = require("./useDemoData");
13
+ var _randomGenerator = require("../services/random-generator");
13
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
16
  const simplifiedValueGetter = (field, colDef) => row => {
@@ -105,7 +106,7 @@ const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultCol
105
106
  if (maxDelay < minDelay) {
106
107
  throw new Error('serverOptions.minDelay is larger than serverOptions.maxDelay ');
107
108
  }
108
- const delay = Math.random() * (maxDelay - minDelay) + minDelay;
109
+ const delay = (0, _randomGenerator.randomInt)(minDelay, maxDelay);
109
110
  const {
110
111
  cursor,
111
112
  page = 0,
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.4
2
+ * @mui/x-data-grid-generator v7.0.0-alpha.5
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "7.0.0-alpha.4",
3
+ "version": "7.0.0-alpha.5",
4
4
  "description": "Generate fake data for demo purposes only.",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@babel/runtime": "^7.23.5",
26
26
  "@mui/base": "^5.0.0-beta.26",
27
- "@mui/x-data-grid-premium": "7.0.0-alpha.4",
27
+ "@mui/x-data-grid-premium": "7.0.0-alpha.5",
28
28
  "chance": "^1.1.11",
29
29
  "clsx": "^2.0.0",
30
30
  "lru-cache": "^7.18.3"