@mui/x-data-grid-generator 6.0.3 → 6.1.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 +119 -0
- package/hooks/useMovieData.d.ts +1 -1
- package/index.js +1 -1
- package/legacy/hooks/useDemoData.js +77 -81
- package/legacy/hooks/useQuery.js +29 -31
- package/legacy/index.js +1 -1
- package/legacy/renderer/renderEditCountry.js +16 -18
- package/legacy/renderer/renderEditCurrency.js +16 -18
- package/legacy/renderer/renderEditIncoterm.js +16 -18
- package/legacy/renderer/renderEditRating.js +16 -18
- package/legacy/renderer/renderEditStatus.js +17 -19
- package/modern/index.js +1 -1
- package/node/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,125 @@
|
|
|
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.1.0
|
|
7
|
+
|
|
8
|
+
_Apr 7, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Catalan (ca-ES), Kazakh (kz-KZ) and improve Spanish (es-ES), Dutch (nl-NL), Hebrew (he-IL), Hungarian (hu-HU), Japanese (ja-JP), Portuguese (pt-BR), and Russian (ru-RU) locales
|
|
13
|
+
- ✨ Allow to control visibility of columns shown in the columns panel (#8401) @MBilalShafi
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### `@mui/x-data-grid@v6.1.0` / `@mui/x-data-grid-pro@v6.1.0` / `@mui/x-data-grid-premium@v6.1.0`
|
|
18
|
+
|
|
19
|
+
#### Changes
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Allow to control visibility of columns shown in the `ColumnsPanel` component (#8401) @MBilalShafi
|
|
22
|
+
- [DataGrid] Fix filters with empty array value not being removed from the filter model (#8501) @cherniavskii
|
|
23
|
+
- [DataGrid] Fix memory leaks in development (#8301) @cherniavskii
|
|
24
|
+
- [DataGrid] Sync `date` column value when entering edit mode by pressing a digit (#8364) @m4theushw
|
|
25
|
+
- [DataGrid] Wrap column menu button with a tooltip (#7890) @cherniavskii
|
|
26
|
+
- [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
|
|
27
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#8486) @PetakCC
|
|
28
|
+
- [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
|
|
29
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
|
|
30
|
+
- [l10n] Improve Russian (ru-RU) locale (#8510) @alexrapro
|
|
31
|
+
|
|
32
|
+
### `@mui/x-date-pickers@v6.1.0` / `@mui/x-date-pickers-pro@v6.1.0`
|
|
33
|
+
|
|
34
|
+
#### Changes
|
|
35
|
+
|
|
36
|
+
- [fields] Fix RTL navigation (#8490) @alexfauquette
|
|
37
|
+
- [fields] Fix usage of `slotProps.textField.InputProps` (#8428) @flaviendelangle
|
|
38
|
+
- [pickers] Fix `componentsProps.dialog` propagation (#8509) @LukasTy
|
|
39
|
+
- [pickers] Move `hasError` from `fieldValueManager` to `valueManager` (#8453) @flaviendelangle
|
|
40
|
+
- [pickers] Move the adapters interfaces to the X repository (#8412) @flaviendelangle
|
|
41
|
+
- [pickers] Update peer dependency versions (#8531) @LukasTy
|
|
42
|
+
- [pickers] Fix `isValid` regression (#8543) @LukasTy
|
|
43
|
+
- [l10n] Add Catalan (Spain) (ca-ES) and improve Spanish (es-ES) locales (#8498) @makenshikuro
|
|
44
|
+
- [l10n] Add Kazakh (kz-KZ) locale (#8451) @zhunus
|
|
45
|
+
- [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
|
|
46
|
+
- [l10n] Improve Hebrew (he-IL) locale (#8464) @soris1989
|
|
47
|
+
- [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
|
|
48
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
|
|
49
|
+
|
|
50
|
+
### Docs
|
|
51
|
+
|
|
52
|
+
- [docs] Fix 301 redirect (#8524) @alexfauquette
|
|
53
|
+
- [docs] Fix 404 links (#8454) @alexfauquette
|
|
54
|
+
- [docs] Fix broken API reference link (#8460) @oliviertassinari
|
|
55
|
+
|
|
56
|
+
### Core
|
|
57
|
+
|
|
58
|
+
- [core] Avoid 301 links (#8383) @oliviertassinari
|
|
59
|
+
- [core] Fix the l10n helper by using danger instead of actions (#8512) @alexfauquette
|
|
60
|
+
- [core] Help contributors for l10n PRs (#8503) @alexfauquette
|
|
61
|
+
- [core] Remove legacy token (#8457) @oliviertassinari
|
|
62
|
+
- [charts] Add a styling system (#8445) @alexfauquette
|
|
63
|
+
|
|
64
|
+
## 6.0.4
|
|
65
|
+
|
|
66
|
+
_Mar 30, 2023_
|
|
67
|
+
|
|
68
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
69
|
+
|
|
70
|
+
- 🌍 Add Danish (da-DK), and improve Norwegian (nb-NO), Spanish (es-ES), and Swedish (sv-SE) locales
|
|
71
|
+
- 🐞 Bugfixes
|
|
72
|
+
- 📚 Documentation improvements
|
|
73
|
+
|
|
74
|
+
### `@mui/x-data-grid@v6.0.4` / `@mui/x-data-grid-pro@v6.0.4` / `@mui/x-data-grid-premium@v6.0.4`
|
|
75
|
+
|
|
76
|
+
#### Changes
|
|
77
|
+
|
|
78
|
+
- [DataGrid] Fix column header tooltip not showing when the title is truncated (#8433) @rohitnatesh
|
|
79
|
+
- [DataGrid] Fix filter model buttons' display condition (#8415) @MBilalShafi
|
|
80
|
+
- [DataGrid] Fix infinite rerender in a flex parent (#8436) @cherniavskii
|
|
81
|
+
- [DataGrid] Prevent reopening column menu when clicking in the button while it is open (#8286) @tanuj-22
|
|
82
|
+
- [DataGrid] Rename `components` by `slots` in column menu API (#7999) @MBilalShafi
|
|
83
|
+
- [DataGrid] Remove hardcoded CSS classes' usages (#8444) @MBilalShafi
|
|
84
|
+
- [DataGridPremium] Fix aggregation initial state causing issue with quick filter (#8441) @MBilalShafi
|
|
85
|
+
- [l10n] Improve Danish (da-DK) locale (#8368) @BossElijah
|
|
86
|
+
- [l10n] Improve Danish (da-DK) locale (#8378) @BossElijah
|
|
87
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8367) @BossElijah
|
|
88
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8409) @BossElijah
|
|
89
|
+
- [l10n] Improve Spanish (es-ES) locale (#8420) @martjanz
|
|
90
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
91
|
+
|
|
92
|
+
### `@mui/x-date-pickers@v6.0.4` / `@mui/x-date-pickers-pro@v6.0.4`
|
|
93
|
+
|
|
94
|
+
#### Changes
|
|
95
|
+
|
|
96
|
+
- [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
|
|
97
|
+
- [fields] Clean the active date manager (#8370) @flaviendelangle
|
|
98
|
+
- [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
|
|
99
|
+
- [fields] Only add RTL characters when needed (#8325) @flaviendelangle
|
|
100
|
+
- [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
|
|
101
|
+
- [pickers] Allows non token characters in format (#8256) @alexfauquette
|
|
102
|
+
- [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
|
|
103
|
+
- [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
|
|
104
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8382) @BossElijah
|
|
105
|
+
- [l10n] Add Danish (da-DK) locale (#8379) @BossElijah
|
|
106
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
107
|
+
|
|
108
|
+
### `@mui/x-codemod@v6.0.4`
|
|
109
|
+
|
|
110
|
+
#### Changes
|
|
111
|
+
|
|
112
|
+
- [codemod] Fix `remove-stabilized-experimentalFeatures` codemod (#8289) @alexfauquette
|
|
113
|
+
|
|
114
|
+
### Docs
|
|
115
|
+
|
|
116
|
+
- [docs] Fix `GridCellParams` signature in migration guide (#8427) @cherniavskii
|
|
117
|
+
- [docs] Fix "Custom field" demos responsive styles (#8408) @LukasTy
|
|
118
|
+
- [docs] Remove `label` from demos where it reduces clarity (#8416) @LukasTy
|
|
119
|
+
- [docs] Update slots' references in Data Grid migration guide (#8159) @MBilalShafi
|
|
120
|
+
|
|
121
|
+
### Core
|
|
122
|
+
|
|
123
|
+
- [charts] Work on typing (#8421) @flaviendelangle
|
|
124
|
+
|
|
6
125
|
## 6.0.3
|
|
7
126
|
|
|
8
127
|
_Mar 23, 2023_
|
package/hooks/useMovieData.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
7
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import LRUCache from 'lru-cache';
|
|
11
11
|
import { getRealGridData } from '../services/real-data-service';
|
|
@@ -25,43 +25,41 @@ function extrapolateSeed(_x, _x2) {
|
|
|
25
25
|
function _extrapolateSeed() {
|
|
26
26
|
_extrapolateSeed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(rowLength, data) {
|
|
27
27
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
28
|
-
while (1) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
row[column.field] = seed[index][column.field];
|
|
46
|
-
}
|
|
28
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
return _context2.abrupt("return", new Promise(function (resolve) {
|
|
31
|
+
var seed = data.rows;
|
|
32
|
+
var rows = data.rows.slice();
|
|
33
|
+
var tasks = {
|
|
34
|
+
current: rowLength - seed.length
|
|
35
|
+
};
|
|
36
|
+
function work() {
|
|
37
|
+
var row = {};
|
|
38
|
+
for (var j = 0; j < data.columns.length; j += 1) {
|
|
39
|
+
var column = data.columns[j];
|
|
40
|
+
var index = Math.round(Math.random() * (seed.length - 1));
|
|
41
|
+
if (column.field === 'id') {
|
|
42
|
+
row.id = "id-".concat(tasks.current + seed.length);
|
|
43
|
+
} else {
|
|
44
|
+
row[column.field] = seed[index][column.field];
|
|
47
45
|
}
|
|
48
|
-
rows.push(row);
|
|
49
|
-
tasks.current -= 1;
|
|
50
46
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
rows.push(row);
|
|
48
|
+
tasks.current -= 1;
|
|
49
|
+
}
|
|
50
|
+
asyncWorker({
|
|
51
|
+
work: work,
|
|
52
|
+
done: function done() {
|
|
53
|
+
return resolve(_extends({}, data, {
|
|
54
|
+
rows: rows
|
|
55
|
+
}));
|
|
56
|
+
},
|
|
57
|
+
tasks: tasks
|
|
58
|
+
});
|
|
59
|
+
}));
|
|
60
|
+
case 1:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context2.stop();
|
|
65
63
|
}
|
|
66
64
|
}, _callee2);
|
|
67
65
|
}));
|
|
@@ -172,53 +170,51 @@ export var useDemoData = function useDemoData(options) {
|
|
|
172
170
|
var _options$treeData2, _options$treeData3, _options$treeData4;
|
|
173
171
|
var newData;
|
|
174
172
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
175
|
-
while (1) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
_context.next = 10;
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
_context.next = 4;
|
|
184
|
-
return getRealGridData(1000, columns);
|
|
185
|
-
case 4:
|
|
186
|
-
newData = _context.sent;
|
|
187
|
-
_context.next = 7;
|
|
188
|
-
return extrapolateSeed(rowLength, newData);
|
|
189
|
-
case 7:
|
|
190
|
-
newData = _context.sent;
|
|
191
|
-
_context.next = 13;
|
|
173
|
+
while (1) switch (_context.prev = _context.next) {
|
|
174
|
+
case 0:
|
|
175
|
+
setLoading(true);
|
|
176
|
+
if (!(rowLength > 1000)) {
|
|
177
|
+
_context.next = 10;
|
|
192
178
|
break;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
179
|
+
}
|
|
180
|
+
_context.next = 4;
|
|
181
|
+
return getRealGridData(1000, columns);
|
|
182
|
+
case 4:
|
|
183
|
+
newData = _context.sent;
|
|
184
|
+
_context.next = 7;
|
|
185
|
+
return extrapolateSeed(rowLength, newData);
|
|
186
|
+
case 7:
|
|
187
|
+
newData = _context.sent;
|
|
188
|
+
_context.next = 13;
|
|
189
|
+
break;
|
|
190
|
+
case 10:
|
|
191
|
+
_context.next = 12;
|
|
192
|
+
return getRealGridData(rowLength, columns);
|
|
193
|
+
case 12:
|
|
194
|
+
newData = _context.sent;
|
|
195
|
+
case 13:
|
|
196
|
+
if (active) {
|
|
197
|
+
_context.next = 15;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
return _context.abrupt("return");
|
|
201
|
+
case 15:
|
|
202
|
+
newData = addTreeDataOptionsToDemoData(newData, {
|
|
203
|
+
maxDepth: (_options$treeData2 = options.treeData) == null ? void 0 : _options$treeData2.maxDepth,
|
|
204
|
+
groupingField: (_options$treeData3 = options.treeData) == null ? void 0 : _options$treeData3.groupingField,
|
|
205
|
+
averageChildren: (_options$treeData4 = options.treeData) == null ? void 0 : _options$treeData4.averageChildren
|
|
206
|
+
});
|
|
210
207
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
208
|
+
// It's quite slow. No need for it in production.
|
|
209
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
210
|
+
deepFreeze(newData);
|
|
211
|
+
}
|
|
212
|
+
dataCache.set(cacheKey, newData);
|
|
213
|
+
setData(newData);
|
|
214
|
+
setLoading(false);
|
|
215
|
+
case 20:
|
|
216
|
+
case "end":
|
|
217
|
+
return _context.stop();
|
|
222
218
|
}
|
|
223
219
|
}, _callee);
|
|
224
220
|
}))();
|
package/legacy/hooks/useQuery.js
CHANGED
|
@@ -210,38 +210,36 @@ export var createFakeServer = function createFakeServer(dataSetOptions, serverOp
|
|
|
210
210
|
var _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
211
211
|
var _yield$loadServerRows, returnedRows, nextCursor, totalRowCount, newRep;
|
|
212
212
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
213
|
-
while (1) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
213
|
+
while (1) switch (_context.prev = _context.next) {
|
|
214
|
+
case 0:
|
|
215
|
+
_context.next = 2;
|
|
216
|
+
return loadServerRows(rows, queryOptions, serverOptionsWithDefault, columnsWithDefaultColDef);
|
|
217
|
+
case 2:
|
|
218
|
+
_yield$loadServerRows = _context.sent;
|
|
219
|
+
returnedRows = _yield$loadServerRows.returnedRows;
|
|
220
|
+
nextCursor = _yield$loadServerRows.nextCursor;
|
|
221
|
+
totalRowCount = _yield$loadServerRows.totalRowCount;
|
|
222
|
+
if (active) {
|
|
223
|
+
_context.next = 8;
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
return _context.abrupt("return");
|
|
227
|
+
case 8:
|
|
228
|
+
newRep = {
|
|
229
|
+
rows: returnedRows,
|
|
230
|
+
pageInfo: {
|
|
231
|
+
totalRowCount: totalRowCount,
|
|
232
|
+
nextCursor: nextCursor,
|
|
233
|
+
pageSize: returnedRows.length
|
|
226
234
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
newRep
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
setResponse(function (prev) {
|
|
238
|
-
return isDeepEqual(prev, newRep) ? prev : newRep;
|
|
239
|
-
});
|
|
240
|
-
setIsLoading(false);
|
|
241
|
-
case 11:
|
|
242
|
-
case "end":
|
|
243
|
-
return _context.stop();
|
|
244
|
-
}
|
|
235
|
+
};
|
|
236
|
+
setResponse(function (prev) {
|
|
237
|
+
return isDeepEqual(prev, newRep) ? prev : newRep;
|
|
238
|
+
});
|
|
239
|
+
setIsLoading(false);
|
|
240
|
+
case 11:
|
|
241
|
+
case "end":
|
|
242
|
+
return _context.stop();
|
|
245
243
|
}
|
|
246
244
|
}, _callee);
|
|
247
245
|
}));
|
package/legacy/index.js
CHANGED
|
@@ -32,24 +32,22 @@ function EditCountry(props) {
|
|
|
32
32
|
var handleChange = React.useCallback( /*#__PURE__*/function () {
|
|
33
33
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event, newValue) {
|
|
34
34
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
35
|
-
while (1) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return _context.stop();
|
|
52
|
-
}
|
|
35
|
+
while (1) switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
_context.next = 2;
|
|
38
|
+
return apiRef.current.setEditCellValue({
|
|
39
|
+
id: id,
|
|
40
|
+
field: field,
|
|
41
|
+
value: newValue
|
|
42
|
+
}, event);
|
|
43
|
+
case 2:
|
|
44
|
+
apiRef.current.stopCellEditMode({
|
|
45
|
+
id: id,
|
|
46
|
+
field: field
|
|
47
|
+
});
|
|
48
|
+
case 3:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
53
51
|
}
|
|
54
52
|
}, _callee);
|
|
55
53
|
}));
|
|
@@ -32,24 +32,22 @@ function EditCurrency(props) {
|
|
|
32
32
|
var handleChange = React.useCallback( /*#__PURE__*/function () {
|
|
33
33
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event, newValue) {
|
|
34
34
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
35
|
-
while (1) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return _context.stop();
|
|
52
|
-
}
|
|
35
|
+
while (1) switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
_context.next = 2;
|
|
38
|
+
return apiRef.current.setEditCellValue({
|
|
39
|
+
id: id,
|
|
40
|
+
field: field,
|
|
41
|
+
value: newValue.toUpperCase()
|
|
42
|
+
}, event);
|
|
43
|
+
case 2:
|
|
44
|
+
apiRef.current.stopCellEditMode({
|
|
45
|
+
id: id,
|
|
46
|
+
field: field
|
|
47
|
+
});
|
|
48
|
+
case 3:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
53
51
|
}
|
|
54
52
|
}, _callee);
|
|
55
53
|
}));
|
|
@@ -18,24 +18,22 @@ function EditIncoterm(props) {
|
|
|
18
18
|
var handleChange = /*#__PURE__*/function () {
|
|
19
19
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
|
|
20
20
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
21
|
-
while (1) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return _context.stop();
|
|
38
|
-
}
|
|
21
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22
|
+
case 0:
|
|
23
|
+
_context.next = 2;
|
|
24
|
+
return apiRef.current.setEditCellValue({
|
|
25
|
+
id: id,
|
|
26
|
+
field: field,
|
|
27
|
+
value: event.target.value
|
|
28
|
+
}, event);
|
|
29
|
+
case 2:
|
|
30
|
+
apiRef.current.stopCellEditMode({
|
|
31
|
+
id: id,
|
|
32
|
+
field: field
|
|
33
|
+
});
|
|
34
|
+
case 3:
|
|
35
|
+
case "end":
|
|
36
|
+
return _context.stop();
|
|
39
37
|
}
|
|
40
38
|
}, _callee);
|
|
41
39
|
}));
|
|
@@ -15,24 +15,22 @@ function EditRating(props) {
|
|
|
15
15
|
var handleChange = /*#__PURE__*/function () {
|
|
16
16
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
|
|
17
17
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18
|
-
while (1) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return _context.stop();
|
|
35
|
-
}
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
_context.next = 2;
|
|
21
|
+
return apiRef.current.setEditCellValue({
|
|
22
|
+
id: id,
|
|
23
|
+
field: field,
|
|
24
|
+
value: Number(event.target.value)
|
|
25
|
+
}, event);
|
|
26
|
+
case 2:
|
|
27
|
+
apiRef.current.stopCellEditMode({
|
|
28
|
+
id: id,
|
|
29
|
+
field: field
|
|
30
|
+
});
|
|
31
|
+
case 3:
|
|
32
|
+
case "end":
|
|
33
|
+
return _context.stop();
|
|
36
34
|
}
|
|
37
35
|
}, _callee);
|
|
38
36
|
}));
|
|
@@ -24,28 +24,26 @@ function EditStatus(props) {
|
|
|
24
24
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
|
|
25
25
|
var isValid;
|
|
26
26
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
|
-
while (1) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
|
28
|
+
case 0:
|
|
29
|
+
_context.next = 2;
|
|
30
|
+
return apiRef.current.setEditCellValue({
|
|
31
|
+
id: id,
|
|
32
|
+
field: field,
|
|
33
|
+
value: event.target.value
|
|
34
|
+
});
|
|
35
|
+
case 2:
|
|
36
|
+
isValid = _context.sent;
|
|
37
|
+
if (isValid && rootProps.editMode === GridEditModes.Cell) {
|
|
38
|
+
apiRef.current.stopCellEditMode({
|
|
32
39
|
id: id,
|
|
33
40
|
field: field,
|
|
34
|
-
|
|
41
|
+
cellToFocusAfter: 'below'
|
|
35
42
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
id: id,
|
|
41
|
-
field: field,
|
|
42
|
-
cellToFocusAfter: 'below'
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
case 4:
|
|
46
|
-
case "end":
|
|
47
|
-
return _context.stop();
|
|
48
|
-
}
|
|
43
|
+
}
|
|
44
|
+
case 4:
|
|
45
|
+
case "end":
|
|
46
|
+
return _context.stop();
|
|
49
47
|
}
|
|
50
48
|
}, _callee);
|
|
51
49
|
}));
|
package/modern/index.js
CHANGED
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-generator",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Generate fake data for demo purposes only.",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.21.0",
|
|
23
|
-
"@mui/base": "^5.0.0-alpha.
|
|
24
|
-
"@mui/x-data-grid-premium": "6.0
|
|
23
|
+
"@mui/base": "^5.0.0-alpha.123",
|
|
24
|
+
"@mui/x-data-grid-premium": "6.1.0",
|
|
25
25
|
"chance": "^1.1.11",
|
|
26
26
|
"clsx": "^1.2.1",
|
|
27
27
|
"lru-cache": "^7.18.3"
|