@mui/x-data-grid-pro 5.17.21 → 5.17.23
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 +60 -0
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +6 -1
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +36 -0
- package/index.js +1 -1
- package/legacy/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +36 -0
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +34 -0
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +37 -0
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +2 -2
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,66 @@
|
|
|
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.17.23
|
|
7
|
+
|
|
8
|
+
_Feb 9, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Improve Brazilian Portuguese (pt-BR) locale
|
|
13
|
+
- 🎉 Add banner and callouts to inform about MUI X v6 beta
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v5.17.23` / `@mui/x-data-grid-pro@v5.17.23` / `@mui/x-data-grid-premium@v5.17.23`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Allow to customize the value displayed in the filter button tooltip (#7816) @ithrforu
|
|
21
|
+
- [DataGrid] Fix `getCellElement` method not working with pinned columns (#7844) @yaredtsy
|
|
22
|
+
- [DataGrid] Fix stale rows issue in `unstable_replaceRows` (#7694) @MBilalShafi
|
|
23
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#7850) @ed-ateixeira
|
|
24
|
+
|
|
25
|
+
### `@mui/x-date-pickers@v_5.0.18` / `@mui/x-date-pickers-pro@v_5.0.18`
|
|
26
|
+
|
|
27
|
+
#### Changes
|
|
28
|
+
|
|
29
|
+
- [pickers] Update pickers when new value has a distinct timezone (#7853) @alexfauquette
|
|
30
|
+
|
|
31
|
+
### Docs
|
|
32
|
+
|
|
33
|
+
- [docs] Add messages in v5 doc to inform people about v6 (#7838) @flaviendelangle
|
|
34
|
+
- [docs] Fix 301 link @oliviertassinari
|
|
35
|
+
|
|
36
|
+
### Core
|
|
37
|
+
|
|
38
|
+
- [core] Upgrade monorepo (#7849) @cherniavskii
|
|
39
|
+
|
|
40
|
+
## v5.17.22
|
|
41
|
+
|
|
42
|
+
_Feb 2, 2023_
|
|
43
|
+
|
|
44
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
45
|
+
|
|
46
|
+
- 🌍 Add Urdu (ur-PK) locale
|
|
47
|
+
- 🌍 Improve French (fr-FR) and Italian (it-IT) locales
|
|
48
|
+
- 🐞 Bugfixes
|
|
49
|
+
|
|
50
|
+
### `@mui/x-data-grid@v5.17.22` / `@mui/x-data-grid-pro@v5.17.22` / `@mui/x-data-grid-premium@v5.17.22`
|
|
51
|
+
|
|
52
|
+
#### Changes
|
|
53
|
+
|
|
54
|
+
- [DataGrid] Fix an error when deleting pinned row using the buttons in the `actions` column (#7767) @cherniavskii
|
|
55
|
+
- [DataGrid] Fix print preview regression in Chrome browser (#7405) @cherniavskii
|
|
56
|
+
- [l10n] Add Urdu (ur-PK) locale (#7778) @MBilalShafi
|
|
57
|
+
- [l10n] Improve French (fr-FR) locale (#7795) @Vivek-Prajapatii
|
|
58
|
+
|
|
59
|
+
### `@mui/x-date-pickers@v5.0.17` / `@mui/x-date-pickers-pro@v5.0.17`
|
|
60
|
+
|
|
61
|
+
#### Changes
|
|
62
|
+
|
|
63
|
+
- [TimePicker] Add missing `themeAugmentation` entry (#7732) @LukasTy
|
|
64
|
+
- [l10n] Improve Italian (it-IT) locale (#7761) @simonecervini
|
|
65
|
+
|
|
6
66
|
## v5.17.21
|
|
7
67
|
|
|
8
68
|
_Jan 27, 2023_
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { GridHydrateRowsValue } from '@mui/x-data-grid/internals';
|
|
3
3
|
import { GridRowEntry, GridRowId, GridRowModel } from '@mui/x-data-grid';
|
|
4
4
|
import { GridApiPro } from '../../../models/gridApiPro';
|
|
5
|
-
import { GridPinnedRowsProp } from './gridRowPinningInterface';
|
|
5
|
+
import type { GridPinnedRowsProp } from './gridRowPinningInterface';
|
|
6
6
|
declare type GridPinnedRowPosition = keyof GridPinnedRowsProp;
|
|
7
7
|
export declare function addPinnedRow({ groupingParams, rowModel, rowId, position, apiRef, isAutoGenerated, }: {
|
|
8
8
|
groupingParams: GridHydrateRowsValue;
|
|
@@ -31,5 +31,10 @@ export declare function addPinnedRow({ groupingParams, rowModel, rowId, position
|
|
|
31
31
|
ids: GridRowId[];
|
|
32
32
|
idToIdLookup: Record<string, GridRowId>;
|
|
33
33
|
};
|
|
34
|
+
export declare function removePinnedRow({ groupingParams, rowId, apiRef, }: {
|
|
35
|
+
groupingParams: GridHydrateRowsValue;
|
|
36
|
+
rowId: GridRowId;
|
|
37
|
+
apiRef: React.MutableRefObject<GridApiPro>;
|
|
38
|
+
}): void;
|
|
34
39
|
export declare const useGridRowPinningPreProcessors: (apiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
35
40
|
export {};
|
|
@@ -45,11 +45,28 @@ export function addPinnedRow({
|
|
|
45
45
|
})
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
+
export function removePinnedRow({
|
|
49
|
+
groupingParams,
|
|
50
|
+
rowId,
|
|
51
|
+
apiRef
|
|
52
|
+
}) {
|
|
53
|
+
const idRowsLookup = _extends({}, groupingParams.idRowsLookup);
|
|
54
|
+
|
|
55
|
+
const tree = _extends({}, groupingParams.tree);
|
|
56
|
+
|
|
57
|
+
delete idRowsLookup[rowId];
|
|
58
|
+
delete tree[rowId];
|
|
59
|
+
delete apiRef.current.unstable_caches.rows.idRowsLookup[rowId];
|
|
60
|
+
delete apiRef.current.unstable_caches.rows.idToIdLookup[rowId];
|
|
61
|
+
}
|
|
48
62
|
export const useGridRowPinningPreProcessors = apiRef => {
|
|
63
|
+
const previousPinnedRowsCacheRef = React.useRef(null);
|
|
49
64
|
const addPinnedRows = React.useCallback(groupingParams => {
|
|
50
65
|
var _pinnedRowsCache$topI, _pinnedRowsCache$bott;
|
|
51
66
|
|
|
52
67
|
const pinnedRowsCache = apiRef.current.unstable_caches.pinnedRows || {};
|
|
68
|
+
const previousPinnedRowsCache = previousPinnedRowsCacheRef.current;
|
|
69
|
+
previousPinnedRowsCacheRef.current = pinnedRowsCache;
|
|
53
70
|
|
|
54
71
|
let newGroupingParams = _extends({}, groupingParams, {
|
|
55
72
|
additionalRowGroups: _extends({}, groupingParams.additionalRowGroups, {
|
|
@@ -58,6 +75,25 @@ export const useGridRowPinningPreProcessors = apiRef => {
|
|
|
58
75
|
})
|
|
59
76
|
});
|
|
60
77
|
|
|
78
|
+
if (previousPinnedRowsCache) {
|
|
79
|
+
var _previousPinnedRowsCa, _previousPinnedRowsCa2;
|
|
80
|
+
|
|
81
|
+
(_previousPinnedRowsCa = previousPinnedRowsCache.topIds) == null ? void 0 : _previousPinnedRowsCa.forEach(rowId => {
|
|
82
|
+
removePinnedRow({
|
|
83
|
+
groupingParams: newGroupingParams,
|
|
84
|
+
rowId,
|
|
85
|
+
apiRef
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
(_previousPinnedRowsCa2 = previousPinnedRowsCache.bottomIds) == null ? void 0 : _previousPinnedRowsCa2.forEach(rowId => {
|
|
89
|
+
removePinnedRow({
|
|
90
|
+
groupingParams: newGroupingParams,
|
|
91
|
+
rowId,
|
|
92
|
+
apiRef
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
61
97
|
(_pinnedRowsCache$topI = pinnedRowsCache.topIds) == null ? void 0 : _pinnedRowsCache$topI.forEach(rowId => {
|
|
62
98
|
newGroupingParams = addPinnedRow({
|
|
63
99
|
groupingParams: newGroupingParams,
|
package/index.js
CHANGED
|
@@ -45,11 +45,28 @@ export function addPinnedRow(_ref) {
|
|
|
45
45
|
})
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
+
export function removePinnedRow(_ref2) {
|
|
49
|
+
var groupingParams = _ref2.groupingParams,
|
|
50
|
+
rowId = _ref2.rowId,
|
|
51
|
+
apiRef = _ref2.apiRef;
|
|
52
|
+
|
|
53
|
+
var idRowsLookup = _extends({}, groupingParams.idRowsLookup);
|
|
54
|
+
|
|
55
|
+
var tree = _extends({}, groupingParams.tree);
|
|
56
|
+
|
|
57
|
+
delete idRowsLookup[rowId];
|
|
58
|
+
delete tree[rowId];
|
|
59
|
+
delete apiRef.current.unstable_caches.rows.idRowsLookup[rowId];
|
|
60
|
+
delete apiRef.current.unstable_caches.rows.idToIdLookup[rowId];
|
|
61
|
+
}
|
|
48
62
|
export var useGridRowPinningPreProcessors = function useGridRowPinningPreProcessors(apiRef) {
|
|
63
|
+
var previousPinnedRowsCacheRef = React.useRef(null);
|
|
49
64
|
var addPinnedRows = React.useCallback(function (groupingParams) {
|
|
50
65
|
var _pinnedRowsCache$topI, _pinnedRowsCache$bott;
|
|
51
66
|
|
|
52
67
|
var pinnedRowsCache = apiRef.current.unstable_caches.pinnedRows || {};
|
|
68
|
+
var previousPinnedRowsCache = previousPinnedRowsCacheRef.current;
|
|
69
|
+
previousPinnedRowsCacheRef.current = pinnedRowsCache;
|
|
53
70
|
|
|
54
71
|
var newGroupingParams = _extends({}, groupingParams, {
|
|
55
72
|
additionalRowGroups: _extends({}, groupingParams.additionalRowGroups, {
|
|
@@ -58,6 +75,25 @@ export var useGridRowPinningPreProcessors = function useGridRowPinningPreProcess
|
|
|
58
75
|
})
|
|
59
76
|
});
|
|
60
77
|
|
|
78
|
+
if (previousPinnedRowsCache) {
|
|
79
|
+
var _previousPinnedRowsCa, _previousPinnedRowsCa2;
|
|
80
|
+
|
|
81
|
+
(_previousPinnedRowsCa = previousPinnedRowsCache.topIds) == null ? void 0 : _previousPinnedRowsCa.forEach(function (rowId) {
|
|
82
|
+
removePinnedRow({
|
|
83
|
+
groupingParams: newGroupingParams,
|
|
84
|
+
rowId: rowId,
|
|
85
|
+
apiRef: apiRef
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
(_previousPinnedRowsCa2 = previousPinnedRowsCache.bottomIds) == null ? void 0 : _previousPinnedRowsCa2.forEach(function (rowId) {
|
|
89
|
+
removePinnedRow({
|
|
90
|
+
groupingParams: newGroupingParams,
|
|
91
|
+
rowId: rowId,
|
|
92
|
+
apiRef: apiRef
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
61
97
|
(_pinnedRowsCache$topI = pinnedRowsCache.topIds) == null ? void 0 : _pinnedRowsCache$topI.forEach(function (rowId) {
|
|
62
98
|
newGroupingParams = addPinnedRow({
|
|
63
99
|
groupingParams: newGroupingParams,
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY3NTg5NzIwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -43,9 +43,26 @@ export function addPinnedRow({
|
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
export function removePinnedRow({
|
|
47
|
+
groupingParams,
|
|
48
|
+
rowId,
|
|
49
|
+
apiRef
|
|
50
|
+
}) {
|
|
51
|
+
const idRowsLookup = _extends({}, groupingParams.idRowsLookup);
|
|
52
|
+
|
|
53
|
+
const tree = _extends({}, groupingParams.tree);
|
|
54
|
+
|
|
55
|
+
delete idRowsLookup[rowId];
|
|
56
|
+
delete tree[rowId];
|
|
57
|
+
delete apiRef.current.unstable_caches.rows.idRowsLookup[rowId];
|
|
58
|
+
delete apiRef.current.unstable_caches.rows.idToIdLookup[rowId];
|
|
59
|
+
}
|
|
46
60
|
export const useGridRowPinningPreProcessors = apiRef => {
|
|
61
|
+
const previousPinnedRowsCacheRef = React.useRef(null);
|
|
47
62
|
const addPinnedRows = React.useCallback(groupingParams => {
|
|
48
63
|
const pinnedRowsCache = apiRef.current.unstable_caches.pinnedRows || {};
|
|
64
|
+
const previousPinnedRowsCache = previousPinnedRowsCacheRef.current;
|
|
65
|
+
previousPinnedRowsCacheRef.current = pinnedRowsCache;
|
|
49
66
|
|
|
50
67
|
let newGroupingParams = _extends({}, groupingParams, {
|
|
51
68
|
additionalRowGroups: _extends({}, groupingParams.additionalRowGroups, {
|
|
@@ -54,6 +71,23 @@ export const useGridRowPinningPreProcessors = apiRef => {
|
|
|
54
71
|
})
|
|
55
72
|
});
|
|
56
73
|
|
|
74
|
+
if (previousPinnedRowsCache) {
|
|
75
|
+
previousPinnedRowsCache.topIds?.forEach(rowId => {
|
|
76
|
+
removePinnedRow({
|
|
77
|
+
groupingParams: newGroupingParams,
|
|
78
|
+
rowId,
|
|
79
|
+
apiRef
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
previousPinnedRowsCache.bottomIds?.forEach(rowId => {
|
|
83
|
+
removePinnedRow({
|
|
84
|
+
groupingParams: newGroupingParams,
|
|
85
|
+
rowId,
|
|
86
|
+
apiRef
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
57
91
|
pinnedRowsCache.topIds?.forEach(rowId => {
|
|
58
92
|
newGroupingParams = addPinnedRow({
|
|
59
93
|
groupingParams: newGroupingParams,
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY3NTg5NzIwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.addPinnedRow = addPinnedRow;
|
|
9
|
+
exports.removePinnedRow = removePinnedRow;
|
|
9
10
|
exports.useGridRowPinningPreProcessors = void 0;
|
|
10
11
|
|
|
11
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -61,17 +62,53 @@ function addPinnedRow({
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
function removePinnedRow({
|
|
66
|
+
groupingParams,
|
|
67
|
+
rowId,
|
|
68
|
+
apiRef
|
|
69
|
+
}) {
|
|
70
|
+
const idRowsLookup = (0, _extends2.default)({}, groupingParams.idRowsLookup);
|
|
71
|
+
const tree = (0, _extends2.default)({}, groupingParams.tree);
|
|
72
|
+
delete idRowsLookup[rowId];
|
|
73
|
+
delete tree[rowId];
|
|
74
|
+
delete apiRef.current.unstable_caches.rows.idRowsLookup[rowId];
|
|
75
|
+
delete apiRef.current.unstable_caches.rows.idToIdLookup[rowId];
|
|
76
|
+
}
|
|
77
|
+
|
|
64
78
|
const useGridRowPinningPreProcessors = apiRef => {
|
|
79
|
+
const previousPinnedRowsCacheRef = React.useRef(null);
|
|
65
80
|
const addPinnedRows = React.useCallback(groupingParams => {
|
|
66
81
|
var _pinnedRowsCache$topI, _pinnedRowsCache$bott;
|
|
67
82
|
|
|
68
83
|
const pinnedRowsCache = apiRef.current.unstable_caches.pinnedRows || {};
|
|
84
|
+
const previousPinnedRowsCache = previousPinnedRowsCacheRef.current;
|
|
85
|
+
previousPinnedRowsCacheRef.current = pinnedRowsCache;
|
|
69
86
|
let newGroupingParams = (0, _extends2.default)({}, groupingParams, {
|
|
70
87
|
additionalRowGroups: (0, _extends2.default)({}, groupingParams.additionalRowGroups, {
|
|
71
88
|
// reset pinned rows state
|
|
72
89
|
pinnedRows: {}
|
|
73
90
|
})
|
|
74
91
|
});
|
|
92
|
+
|
|
93
|
+
if (previousPinnedRowsCache) {
|
|
94
|
+
var _previousPinnedRowsCa, _previousPinnedRowsCa2;
|
|
95
|
+
|
|
96
|
+
(_previousPinnedRowsCa = previousPinnedRowsCache.topIds) == null ? void 0 : _previousPinnedRowsCa.forEach(rowId => {
|
|
97
|
+
removePinnedRow({
|
|
98
|
+
groupingParams: newGroupingParams,
|
|
99
|
+
rowId,
|
|
100
|
+
apiRef
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
(_previousPinnedRowsCa2 = previousPinnedRowsCache.bottomIds) == null ? void 0 : _previousPinnedRowsCa2.forEach(rowId => {
|
|
104
|
+
removePinnedRow({
|
|
105
|
+
groupingParams: newGroupingParams,
|
|
106
|
+
rowId,
|
|
107
|
+
apiRef
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
75
112
|
(_pinnedRowsCache$topI = pinnedRowsCache.topIds) == null ? void 0 : _pinnedRowsCache$topI.forEach(rowId => {
|
|
76
113
|
newGroupingParams = addPinnedRow({
|
|
77
114
|
groupingParams: newGroupingParams,
|
package/node/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
|
|
|
8
8
|
var _utils = require("@mui/utils");
|
|
9
9
|
|
|
10
10
|
const getReleaseInfo = () => {
|
|
11
|
-
const releaseInfo = "
|
|
11
|
+
const releaseInfo = "MTY3NTg5NzIwMDAwMA==";
|
|
12
12
|
|
|
13
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
14
|
// A simple hack to set the value in the test environment (has no build step).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "5.17.
|
|
3
|
+
"version": "5.17.23",
|
|
4
4
|
"description": "The Pro plan edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.18.9",
|
|
35
35
|
"@mui/utils": "^5.10.3",
|
|
36
|
-
"@mui/x-data-grid": "5.17.
|
|
36
|
+
"@mui/x-data-grid": "5.17.23",
|
|
37
37
|
"@mui/x-license-pro": "5.17.12",
|
|
38
38
|
"@types/format-util": "^1.0.2",
|
|
39
39
|
"clsx": "^1.2.1",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY3NTg5NzIwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|