@mui/x-data-grid-generator 5.15.0 → 5.15.3
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 +128 -1
- package/README.md +1 -1
- package/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/renderer/renderEditStatus.js +45 -19
- package/modern/index.js +1 -1
- package/modern/renderer/renderEditStatus.js +15 -13
- package/node/index.js +1 -1
- package/node/renderer/renderEditStatus.js +14 -12
- package/package.json +3 -3
- package/renderer/renderEditStatus.js +15 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,133 @@
|
|
|
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.15.3
|
|
7
|
+
|
|
8
|
+
_Aug 18, 2022_
|
|
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
|
+
- 📚 Documentation improvements
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
|
|
15
|
+
### `@mui/x-data-grid@v5.15.3` / `@mui/x-data-grid-pro@v5.15.3` / `@mui/x-data-grid-premium@v5.15.3`
|
|
16
|
+
|
|
17
|
+
#### Changes
|
|
18
|
+
|
|
19
|
+
- [DataGrid] Fix <kbd>Enter</kbd> causing Select to re-open when commiting value (#5756) @m4theushw
|
|
20
|
+
- [DataGrid] Fix `GridOverlays` bypassing pointer events (#5674) @philjones88
|
|
21
|
+
|
|
22
|
+
### `@mui/x-date-pickers@v5.0.0-beta.6` / `@mui/x-date-picker-pro@v5.0.0-beta.6`
|
|
23
|
+
|
|
24
|
+
#### Changes
|
|
25
|
+
|
|
26
|
+
- [DatePicker] Support click on day outside of current month (#5768) @alexfauquette
|
|
27
|
+
- [pickers] Extend `PickersActionBarProps` with `DialogActionProps` (#5798) @LukasTy
|
|
28
|
+
|
|
29
|
+
### Docs
|
|
30
|
+
|
|
31
|
+
- [docs] Fix API anchor link scroll top (#5795) @oliviertassinari
|
|
32
|
+
- [docs] Fix contradiction in the free trial clause (#5732) @oliviertassinari
|
|
33
|
+
- [docs] Fix default value of the DataGrid `logLevel` prop to false (#5784) @HwangTaehyun
|
|
34
|
+
- [docs] Fix typo on the row height page (#5772) @flaviendelangle
|
|
35
|
+
- [docs] Improve "upgrading plans" documentation. (#5683) @joserodolfofreitas
|
|
36
|
+
- [docs] Link the license docs before pricing (#5726) @oliviertassinari
|
|
37
|
+
- [docs] Update packages README files (#5835) @cherniavskii
|
|
38
|
+
- [docs] Use `InputBase` for pickers inputs (#5597) @cherniavskii
|
|
39
|
+
|
|
40
|
+
### Core
|
|
41
|
+
|
|
42
|
+
- [core] Upgrade monorepo (#5771, #5797) @cherniavskii
|
|
43
|
+
- [core] Various TS improvements (#5556) @flaviendelangle
|
|
44
|
+
- [license] Give more context in the missing license (#5731) @oliviertassinari
|
|
45
|
+
- [license] Only log an error type once (#5730) @oliviertassinari
|
|
46
|
+
- [test] Increase timeout to take print screenshot (#5799) @m4theushw
|
|
47
|
+
|
|
48
|
+
## 5.15.2
|
|
49
|
+
|
|
50
|
+
_Aug 11, 2022_
|
|
51
|
+
|
|
52
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
53
|
+
|
|
54
|
+
- ✨ Improve quick filtering with row grouping (#5701) @alexfauquette
|
|
55
|
+
- 📚 Documentation improvements
|
|
56
|
+
- 🐞 Bugfixes
|
|
57
|
+
|
|
58
|
+
### `@mui/x-data-grid@v5.15.2` / `@mui/x-data-grid-pro@v5.15.2` / `@mui/x-data-grid-premium@v5.15.2`
|
|
59
|
+
|
|
60
|
+
#### Changes
|
|
61
|
+
|
|
62
|
+
- [DataGrid] Catch errors if rows freezing is not supported (#5711) @cherniavskii
|
|
63
|
+
- [DataGrid] Preserve cell mode when entering edit mode while commiting (#5686) @m4theushw
|
|
64
|
+
- [DataGridPremium] Let quick filter search in row grouping children (#5701) @alexfauquette
|
|
65
|
+
|
|
66
|
+
### `@mui/x-date-pickers@v5.0.0-beta.5` / `@mui/x-date-picker-pro@5.0.0-beta.5`
|
|
67
|
+
|
|
68
|
+
#### Changes
|
|
69
|
+
|
|
70
|
+
- [pickers] Add `react-dom` to peerDependencies (#5752) @cherniavskii
|
|
71
|
+
- [TimePicker] Set clock focus outline to `none` (#5758) @LukasTy
|
|
72
|
+
- [pickers] Fix theme augmentation with TypeScript (#5596) @alexfauquette
|
|
73
|
+
- [pickers] Reset input value when locale is modified (#5310) @alexfauquette
|
|
74
|
+
- [pickers] Support `disableHighlightToday` on `MonthPicker` and `YearPicker` (#5562) @flaviendelangle
|
|
75
|
+
- [pickers] Fallback to desktop mode when `matchMedia` is unavailable (#5684) @LukasTy
|
|
76
|
+
- [pickers] Trigger `onChange` when clearing or accepting `Invalid date` (#5740) @LukasTy
|
|
77
|
+
|
|
78
|
+
### Docs
|
|
79
|
+
|
|
80
|
+
- [docs] Add RFC GH issue template (#5739) @bytasv
|
|
81
|
+
- [docs] Add description to the `GridExportStateParams` page (#5654) @oliviertassinari
|
|
82
|
+
- [docs] Improve the Events page (#5413) @flaviendelangle
|
|
83
|
+
- [docs] Use new editing API in the introduction demos (#5728) @oliviertassinari
|
|
84
|
+
|
|
85
|
+
### Core
|
|
86
|
+
|
|
87
|
+
- [core] Remove duplicated `FUNDING.yml` file (#5656) @oliviertassinari
|
|
88
|
+
- [core] Remove outdated Next.js options (#5727) @oliviertassinari
|
|
89
|
+
- [core] Update tooling to run with React 18 (#4155) @m4theushw
|
|
90
|
+
- [test] Fix failing dynamic row height tests on Edge (#5707) @m4theushw
|
|
91
|
+
|
|
92
|
+
## 5.15.1
|
|
93
|
+
|
|
94
|
+
_Aug 4, 2022_
|
|
95
|
+
|
|
96
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
97
|
+
|
|
98
|
+
- 📚 New [page presenting the `apiRef`](https://mui.com/x/react-data-grid/api-object/) (#5273) @flaviendelangle
|
|
99
|
+
- ✨ Better keyboard support for start editing cells (#5511) @oliviertassinari
|
|
100
|
+
- 🌍 Improvements to different locales
|
|
101
|
+
- 🐞 Bugfixes
|
|
102
|
+
|
|
103
|
+
### `@mui/x-data-grid@v5.15.1` / `@mui/x-data-grid-pro@v5.15.1` / `@mui/x-data-grid-premium@v5.15.1`
|
|
104
|
+
|
|
105
|
+
#### Changes
|
|
106
|
+
|
|
107
|
+
- [DataGrid] Improve start edit UX (#5511) @oliviertassinari
|
|
108
|
+
- [DataGrid] Add `initialOpen` prop to `GridEditSingleSelectCell` to allow overriding initial open state (#5645) @shapaaa
|
|
109
|
+
- [DataGrid] Forward `ref` to root element in `GridEditInputCell` (#5631) @Zenoo
|
|
110
|
+
- [DataGrid] Toggle open state when clicking on buttons in the `GridToolbar` (#5503) @cherniavskii
|
|
111
|
+
- [DataGrid] Improve German (de-DE) locale (#5586) @sebastianfrey
|
|
112
|
+
- [DataGrid] Improve Korean (ko-KR) locale (#5668) @Einere
|
|
113
|
+
- [DataGrid] Complete Italian (it-IT) locale (#5487) @mamodev
|
|
114
|
+
|
|
115
|
+
### `@mui/x-date-pickers@v5.0.0-beta.4` / `@mui/x-date-picker-pro@5.0.0-beta.4`
|
|
116
|
+
|
|
117
|
+
#### Changes
|
|
118
|
+
|
|
119
|
+
- [DatePicker] Customize day formatter in the calendar (#5373) @alexfauquette
|
|
120
|
+
|
|
121
|
+
### Docs
|
|
122
|
+
|
|
123
|
+
- [docs] New location for the legal content (#5595) @oliviertassinari
|
|
124
|
+
- [docs] Update description of `maxDateTime` prop (#5639) @jurecuhalev
|
|
125
|
+
- [docs] Add missing `date-fns` dependency when opening Codesandbox demo (#5692) @cherniavskii
|
|
126
|
+
|
|
127
|
+
### Core
|
|
128
|
+
|
|
129
|
+
- [core] Drop usage of `GRID_EXPERIMENTAL_ENABLED` env variable (#5669) @ar7casper
|
|
130
|
+
- [core] Isolate asset loading under /x/ (#5594) @oliviertassinari
|
|
131
|
+
- [core] Upgrade node to v14 (#4999) @cherniavskii
|
|
132
|
+
|
|
6
133
|
## 5.15.0
|
|
7
134
|
|
|
8
135
|
_Jul 29, 2022_
|
|
@@ -13,7 +140,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
13
140
|
|
|
14
141
|
Premium users can now aggregate data in the grid.
|
|
15
142
|
Extract information like sum, average, count, and others with a couple of clicks.
|
|
16
|
-
|
|
143
|
+
|
|
17
144
|
https://user-images.githubusercontent.com/45398769/181581503-77cc412e-9d9e-4de1-8bc3-c3bccc54cdaa.mp4
|
|
18
145
|
|
|
19
146
|
To enable this feature, add `experimentalFeatures={{ aggregation: true }}`.
|
package/README.md
CHANGED
package/index.js
CHANGED
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
4
|
import * as React from 'react';
|
|
3
|
-
import { useGridApiContext } from '@mui/x-data-grid-premium';
|
|
5
|
+
import { useGridApiContext, useGridRootProps, GridEditModes } from '@mui/x-data-grid-premium';
|
|
4
6
|
import Select from '@mui/material/Select';
|
|
5
7
|
import MenuItem from '@mui/material/MenuItem';
|
|
6
8
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
@@ -17,30 +19,54 @@ function EditStatus(props) {
|
|
|
17
19
|
var id = props.id,
|
|
18
20
|
value = props.value,
|
|
19
21
|
field = props.field;
|
|
22
|
+
var rootProps = useGridRootProps();
|
|
20
23
|
var apiRef = useGridApiContext();
|
|
21
24
|
|
|
22
|
-
var handleChange = function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
var handleChange = /*#__PURE__*/function () {
|
|
26
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
|
|
27
|
+
var isValid;
|
|
28
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
29
|
+
while (1) {
|
|
30
|
+
switch (_context.prev = _context.next) {
|
|
31
|
+
case 0:
|
|
32
|
+
_context.next = 2;
|
|
33
|
+
return apiRef.current.setEditCellValue({
|
|
34
|
+
id: id,
|
|
35
|
+
field: field,
|
|
36
|
+
value: event.target.value
|
|
37
|
+
});
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
case 2:
|
|
40
|
+
isValid = _context.sent;
|
|
41
|
+
|
|
42
|
+
if (isValid && rootProps.editMode === GridEditModes.Cell) {
|
|
43
|
+
apiRef.current.stopCellEditMode({
|
|
44
|
+
id: id,
|
|
45
|
+
field: field,
|
|
46
|
+
cellToFocusAfter: 'below'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
case 4:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context.stop();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, _callee);
|
|
56
|
+
}));
|
|
57
|
+
|
|
58
|
+
return function handleChange(_x) {
|
|
59
|
+
return _ref.apply(this, arguments);
|
|
60
|
+
};
|
|
61
|
+
}();
|
|
40
62
|
|
|
41
63
|
var handleClose = function handleClose(event, reason) {
|
|
42
64
|
if (reason === 'backdropClick') {
|
|
43
|
-
apiRef.current.
|
|
65
|
+
apiRef.current.stopCellEditMode({
|
|
66
|
+
id: id,
|
|
67
|
+
field: field,
|
|
68
|
+
ignoreModifications: true
|
|
69
|
+
});
|
|
44
70
|
}
|
|
45
71
|
};
|
|
46
72
|
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useGridApiContext } from '@mui/x-data-grid-premium';
|
|
3
|
+
import { useGridApiContext, useGridRootProps, GridEditModes } from '@mui/x-data-grid-premium';
|
|
4
4
|
import Select from '@mui/material/Select';
|
|
5
5
|
import MenuItem from '@mui/material/MenuItem';
|
|
6
6
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
@@ -19,30 +19,32 @@ function EditStatus(props) {
|
|
|
19
19
|
value,
|
|
20
20
|
field
|
|
21
21
|
} = props;
|
|
22
|
+
const rootProps = useGridRootProps();
|
|
22
23
|
const apiRef = useGridApiContext();
|
|
23
24
|
|
|
24
|
-
const handleChange = event => {
|
|
25
|
-
apiRef.current.setEditCellValue({
|
|
25
|
+
const handleChange = async event => {
|
|
26
|
+
const isValid = await apiRef.current.setEditCellValue({
|
|
26
27
|
id,
|
|
27
28
|
field,
|
|
28
29
|
value: event.target.value
|
|
29
|
-
}, event);
|
|
30
|
-
apiRef.current.commitCellChange({
|
|
31
|
-
id,
|
|
32
|
-
field
|
|
33
30
|
});
|
|
34
|
-
apiRef.current.setCellMode(id, field, 'view');
|
|
35
31
|
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
if (isValid && rootProps.editMode === GridEditModes.Cell) {
|
|
33
|
+
apiRef.current.stopCellEditMode({
|
|
34
|
+
id,
|
|
35
|
+
field,
|
|
36
|
+
cellToFocusAfter: 'below'
|
|
37
|
+
});
|
|
40
38
|
}
|
|
41
39
|
};
|
|
42
40
|
|
|
43
41
|
const handleClose = (event, reason) => {
|
|
44
42
|
if (reason === 'backdropClick') {
|
|
45
|
-
apiRef.current.
|
|
43
|
+
apiRef.current.stopCellEditMode({
|
|
44
|
+
id,
|
|
45
|
+
field,
|
|
46
|
+
ignoreModifications: true
|
|
47
|
+
});
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|
package/node/index.js
CHANGED
|
@@ -43,30 +43,32 @@ function EditStatus(props) {
|
|
|
43
43
|
value,
|
|
44
44
|
field
|
|
45
45
|
} = props;
|
|
46
|
+
const rootProps = (0, _xDataGridPremium.useGridRootProps)();
|
|
46
47
|
const apiRef = (0, _xDataGridPremium.useGridApiContext)();
|
|
47
48
|
|
|
48
|
-
const handleChange = event => {
|
|
49
|
-
apiRef.current.setEditCellValue({
|
|
49
|
+
const handleChange = async event => {
|
|
50
|
+
const isValid = await apiRef.current.setEditCellValue({
|
|
50
51
|
id,
|
|
51
52
|
field,
|
|
52
53
|
value: event.target.value
|
|
53
|
-
}, event);
|
|
54
|
-
apiRef.current.commitCellChange({
|
|
55
|
-
id,
|
|
56
|
-
field
|
|
57
54
|
});
|
|
58
|
-
apiRef.current.setCellMode(id, field, 'view');
|
|
59
55
|
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
if (isValid && rootProps.editMode === _xDataGridPremium.GridEditModes.Cell) {
|
|
57
|
+
apiRef.current.stopCellEditMode({
|
|
58
|
+
id,
|
|
59
|
+
field,
|
|
60
|
+
cellToFocusAfter: 'below'
|
|
61
|
+
});
|
|
64
62
|
}
|
|
65
63
|
};
|
|
66
64
|
|
|
67
65
|
const handleClose = (event, reason) => {
|
|
68
66
|
if (reason === 'backdropClick') {
|
|
69
|
-
apiRef.current.
|
|
67
|
+
apiRef.current.stopCellEditMode({
|
|
68
|
+
id,
|
|
69
|
+
field,
|
|
70
|
+
ignoreModifications: true
|
|
71
|
+
});
|
|
70
72
|
}
|
|
71
73
|
};
|
|
72
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-generator",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.3",
|
|
4
4
|
"description": "Generate fake data for demo purposes only.",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.18.6",
|
|
23
23
|
"@mui/base": "^5.0.0-alpha.80",
|
|
24
|
-
"@mui/x-data-grid-premium": "5.15.
|
|
24
|
+
"@mui/x-data-grid-premium": "5.15.3",
|
|
25
25
|
"chance": "^1.1.8",
|
|
26
26
|
"clsx": "^1.2.1",
|
|
27
|
-
"lru-cache": "^7.13.
|
|
27
|
+
"lru-cache": "^7.13.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@mui/icons-material": "^5.4.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useGridApiContext } from '@mui/x-data-grid-premium';
|
|
3
|
+
import { useGridApiContext, useGridRootProps, GridEditModes } from '@mui/x-data-grid-premium';
|
|
4
4
|
import Select from '@mui/material/Select';
|
|
5
5
|
import MenuItem from '@mui/material/MenuItem';
|
|
6
6
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
@@ -19,30 +19,32 @@ function EditStatus(props) {
|
|
|
19
19
|
value,
|
|
20
20
|
field
|
|
21
21
|
} = props;
|
|
22
|
+
const rootProps = useGridRootProps();
|
|
22
23
|
const apiRef = useGridApiContext();
|
|
23
24
|
|
|
24
|
-
const handleChange = event => {
|
|
25
|
-
apiRef.current.setEditCellValue({
|
|
25
|
+
const handleChange = async event => {
|
|
26
|
+
const isValid = await apiRef.current.setEditCellValue({
|
|
26
27
|
id,
|
|
27
28
|
field,
|
|
28
29
|
value: event.target.value
|
|
29
|
-
}, event);
|
|
30
|
-
apiRef.current.commitCellChange({
|
|
31
|
-
id,
|
|
32
|
-
field
|
|
33
30
|
});
|
|
34
|
-
apiRef.current.setCellMode(id, field, 'view');
|
|
35
31
|
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
if (isValid && rootProps.editMode === GridEditModes.Cell) {
|
|
33
|
+
apiRef.current.stopCellEditMode({
|
|
34
|
+
id,
|
|
35
|
+
field,
|
|
36
|
+
cellToFocusAfter: 'below'
|
|
37
|
+
});
|
|
40
38
|
}
|
|
41
39
|
};
|
|
42
40
|
|
|
43
41
|
const handleClose = (event, reason) => {
|
|
44
42
|
if (reason === 'backdropClick') {
|
|
45
|
-
apiRef.current.
|
|
43
|
+
apiRef.current.stopCellEditMode({
|
|
44
|
+
id,
|
|
45
|
+
field,
|
|
46
|
+
ignoreModifications: true
|
|
47
|
+
});
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|