@mui/x-data-grid 8.10.0 → 8.10.2
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 +182 -0
- package/components/GridRow.js +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +5 -1
- package/components/containers/GridRootStyles.js +5 -0
- package/components/virtualization/GridVirtualScroller.js +3 -3
- package/esm/DataGrid/index.js +1 -1
- package/esm/components/GridRow.js +5 -5
- package/esm/components/columnHeaders/GridColumnHeaderItem.js +5 -1
- package/esm/components/containers/GridRootStyles.js +5 -0
- package/esm/components/virtualization/GridVirtualScroller.js +3 -3
- package/esm/hooks/core/useGridVirtualizer.js +64 -44
- package/esm/hooks/features/dataSource/cache.js +0 -3
- package/esm/hooks/features/dataSource/gridDataSourceError.js +16 -16
- package/esm/hooks/features/dataSource/utils.js +51 -52
- package/esm/hooks/features/dimensions/gridDimensionsApi.d.ts +2 -67
- package/esm/hooks/features/dimensions/useGridDimensions.js +20 -15
- package/esm/hooks/features/export/serializers/csvSerializer.js +2 -3
- package/esm/hooks/features/export/useGridPrintExport.js +3 -8
- package/esm/hooks/features/filter/gridFilterUtils.js +11 -2
- package/esm/index.js +1 -1
- package/esm/internals/utils/cache.js +0 -1
- package/esm/locales/fiFI.js +6 -6
- package/esm/models/api/gridApiCommon.d.ts +1 -1
- package/esm/models/gridRowSelectionManager.js +0 -2
- package/esm/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +5 -7
- package/esm/utils/cleanupTracking/TimerBasedCleanupTracking.js +2 -2
- package/hooks/core/useGridVirtualizer.js +62 -42
- package/hooks/features/dataSource/cache.js +0 -3
- package/hooks/features/dataSource/gridDataSourceError.js +16 -16
- package/hooks/features/dataSource/utils.js +51 -52
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +2 -67
- package/hooks/features/dimensions/useGridDimensions.js +20 -15
- package/hooks/features/export/serializers/csvSerializer.js +2 -3
- package/hooks/features/export/useGridPrintExport.js +3 -8
- package/hooks/features/filter/gridFilterUtils.js +10 -1
- package/index.js +1 -1
- package/internals/utils/cache.js +0 -1
- package/locales/fiFI.js +6 -6
- package/models/api/gridApiCommon.d.ts +1 -1
- package/models/gridRowSelectionManager.js +0 -2
- package/package.json +8 -9
- package/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +5 -7
- package/utils/cleanupTracking/TimerBasedCleanupTracking.js +2 -2
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GridUpdateRowError = exports.GridGetRowsError = void 0;
|
|
7
7
|
class GridGetRowsError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* The parameters used in the failed request
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The original error that caused this error
|
|
14
|
+
*/
|
|
15
|
+
|
|
8
16
|
constructor(options) {
|
|
9
17
|
super(options.message);
|
|
10
|
-
/**
|
|
11
|
-
* The parameters used in the failed request
|
|
12
|
-
*/
|
|
13
|
-
this.params = void 0;
|
|
14
|
-
/**
|
|
15
|
-
* The original error that caused this error
|
|
16
|
-
*/
|
|
17
|
-
this.cause = void 0;
|
|
18
18
|
this.name = 'GridGetRowsError';
|
|
19
19
|
this.params = options.params;
|
|
20
20
|
this.cause = options.cause;
|
|
@@ -22,16 +22,16 @@ class GridGetRowsError extends Error {
|
|
|
22
22
|
}
|
|
23
23
|
exports.GridGetRowsError = GridGetRowsError;
|
|
24
24
|
class GridUpdateRowError extends Error {
|
|
25
|
+
/**
|
|
26
|
+
* The parameters used in the failed request
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The original error that caused this error
|
|
31
|
+
*/
|
|
32
|
+
|
|
25
33
|
constructor(options) {
|
|
26
34
|
super(options.message);
|
|
27
|
-
/**
|
|
28
|
-
* The parameters used in the failed request
|
|
29
|
-
*/
|
|
30
|
-
this.params = void 0;
|
|
31
|
-
/**
|
|
32
|
-
* The original error that caused this error
|
|
33
|
-
*/
|
|
34
|
-
this.cause = void 0;
|
|
35
35
|
this.name = 'GridUpdateRowError';
|
|
36
36
|
this.params = options.params;
|
|
37
37
|
this.cause = options.cause;
|
|
@@ -24,58 +24,57 @@ class CacheChunkManager {
|
|
|
24
24
|
* Has no effect if cursor pagination is used.
|
|
25
25
|
*/
|
|
26
26
|
constructor(chunkSize) {
|
|
27
|
-
this.chunkSize = void 0;
|
|
28
|
-
this.getCacheKeys = key => {
|
|
29
|
-
if (this.chunkSize < 1 || typeof key.start !== 'number') {
|
|
30
|
-
return [key];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// split the range into chunks
|
|
34
|
-
const chunkedKeys = [];
|
|
35
|
-
for (let i = key.start; i <= key.end; i += this.chunkSize) {
|
|
36
|
-
const end = Math.min(i + this.chunkSize - 1, key.end);
|
|
37
|
-
chunkedKeys.push((0, _extends2.default)({}, key, {
|
|
38
|
-
start: i,
|
|
39
|
-
end
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
return chunkedKeys;
|
|
43
|
-
};
|
|
44
|
-
this.splitResponse = (key, response) => {
|
|
45
|
-
const cacheKeys = this.getCacheKeys(key);
|
|
46
|
-
if (cacheKeys.length === 1) {
|
|
47
|
-
return new Map([[key, response]]);
|
|
48
|
-
}
|
|
49
|
-
const responses = new Map();
|
|
50
|
-
cacheKeys.forEach(chunkKey => {
|
|
51
|
-
const isLastChunk = chunkKey.end === key.end;
|
|
52
|
-
const responseSlice = (0, _extends2.default)({}, response, {
|
|
53
|
-
pageInfo: (0, _extends2.default)({}, response.pageInfo, {
|
|
54
|
-
// If the original response had page info, update that information for all but last chunk and keep the original value for the last chunk
|
|
55
|
-
hasNextPage: response.pageInfo?.hasNextPage !== undefined && !isLastChunk ? true : response.pageInfo?.hasNextPage,
|
|
56
|
-
nextCursor: response.pageInfo?.nextCursor !== undefined && !isLastChunk ? response.rows[chunkKey.end + 1].id : response.pageInfo?.nextCursor
|
|
57
|
-
}),
|
|
58
|
-
rows: typeof chunkKey.start !== 'number' || typeof key.start !== 'number' ? response.rows : response.rows.slice(chunkKey.start - key.start, chunkKey.end - key.start + 1)
|
|
59
|
-
});
|
|
60
|
-
responses.set(chunkKey, responseSlice);
|
|
61
|
-
});
|
|
62
|
-
return responses;
|
|
63
|
-
};
|
|
64
27
|
this.chunkSize = chunkSize;
|
|
65
28
|
}
|
|
29
|
+
getCacheKeys = key => {
|
|
30
|
+
if (this.chunkSize < 1 || typeof key.start !== 'number') {
|
|
31
|
+
return [key];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// split the range into chunks
|
|
35
|
+
const chunkedKeys = [];
|
|
36
|
+
for (let i = key.start; i <= key.end; i += this.chunkSize) {
|
|
37
|
+
const end = Math.min(i + this.chunkSize - 1, key.end);
|
|
38
|
+
chunkedKeys.push((0, _extends2.default)({}, key, {
|
|
39
|
+
start: i,
|
|
40
|
+
end
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
return chunkedKeys;
|
|
44
|
+
};
|
|
45
|
+
splitResponse = (key, response) => {
|
|
46
|
+
const cacheKeys = this.getCacheKeys(key);
|
|
47
|
+
if (cacheKeys.length === 1) {
|
|
48
|
+
return new Map([[key, response]]);
|
|
49
|
+
}
|
|
50
|
+
const responses = new Map();
|
|
51
|
+
cacheKeys.forEach(chunkKey => {
|
|
52
|
+
const isLastChunk = chunkKey.end === key.end;
|
|
53
|
+
const responseSlice = (0, _extends2.default)({}, response, {
|
|
54
|
+
pageInfo: (0, _extends2.default)({}, response.pageInfo, {
|
|
55
|
+
// If the original response had page info, update that information for all but last chunk and keep the original value for the last chunk
|
|
56
|
+
hasNextPage: response.pageInfo?.hasNextPage !== undefined && !isLastChunk ? true : response.pageInfo?.hasNextPage,
|
|
57
|
+
nextCursor: response.pageInfo?.nextCursor !== undefined && !isLastChunk ? response.rows[chunkKey.end + 1].id : response.pageInfo?.nextCursor
|
|
58
|
+
}),
|
|
59
|
+
rows: typeof chunkKey.start !== 'number' || typeof key.start !== 'number' ? response.rows : response.rows.slice(chunkKey.start - key.start, chunkKey.end - key.start + 1)
|
|
60
|
+
});
|
|
61
|
+
responses.set(chunkKey, responseSlice);
|
|
62
|
+
});
|
|
63
|
+
return responses;
|
|
64
|
+
};
|
|
65
|
+
static mergeResponses = responses => {
|
|
66
|
+
if (responses.length === 1) {
|
|
67
|
+
return responses[0];
|
|
68
|
+
}
|
|
69
|
+
return responses.reduce((acc, response) => ({
|
|
70
|
+
rows: [...acc.rows, ...response.rows],
|
|
71
|
+
rowCount: response.rowCount,
|
|
72
|
+
pageInfo: response.pageInfo
|
|
73
|
+
}), {
|
|
74
|
+
rows: [],
|
|
75
|
+
rowCount: 0,
|
|
76
|
+
pageInfo: {}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
66
79
|
}
|
|
67
|
-
exports.CacheChunkManager = CacheChunkManager;
|
|
68
|
-
CacheChunkManager.mergeResponses = responses => {
|
|
69
|
-
if (responses.length === 1) {
|
|
70
|
-
return responses[0];
|
|
71
|
-
}
|
|
72
|
-
return responses.reduce((acc, response) => ({
|
|
73
|
-
rows: [...acc.rows, ...response.rows],
|
|
74
|
-
rowCount: response.rowCount,
|
|
75
|
-
pageInfo: response.pageInfo
|
|
76
|
-
}), {
|
|
77
|
-
rows: [],
|
|
78
|
-
rowCount: 0,
|
|
79
|
-
pageInfo: {}
|
|
80
|
-
});
|
|
81
|
-
};
|
|
80
|
+
exports.CacheChunkManager = CacheChunkManager;
|
|
@@ -1,62 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface GridDimensions {
|
|
3
|
-
/**
|
|
4
|
-
* Indicates that the dimensions have been initialized.
|
|
5
|
-
*/
|
|
6
|
-
isReady: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* The root container size.
|
|
9
|
-
*/
|
|
10
|
-
root: ElementSize;
|
|
11
|
-
/**
|
|
12
|
-
* The viewport size including scrollbars.
|
|
13
|
-
*/
|
|
14
|
-
viewportOuterSize: ElementSize;
|
|
15
|
-
/**
|
|
16
|
-
* The viewport size not including scrollbars.
|
|
17
|
-
*/
|
|
18
|
-
viewportInnerSize: ElementSize;
|
|
19
|
-
/**
|
|
20
|
-
* The size of the main content (unpinned rows & columns).
|
|
21
|
-
*/
|
|
22
|
-
contentSize: ElementSize;
|
|
23
|
-
/**
|
|
24
|
-
* The minimum size to display the grid, including all pinned sections and headers.
|
|
25
|
-
*/
|
|
26
|
-
minimumSize: ElementSize;
|
|
27
|
-
/**
|
|
28
|
-
* Indicates if a scroll is currently needed to go from the beginning of the first column to the end of the last column.
|
|
29
|
-
*/
|
|
30
|
-
hasScrollX: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Indicates if a scroll is currently needed to go from the beginning of the first row to the end of the last row.
|
|
33
|
-
*/
|
|
34
|
-
hasScrollY: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Size of the scrollbar used to scroll the rows in pixel.
|
|
37
|
-
* It is defined even when the scrollbar is currently not needed.
|
|
38
|
-
*/
|
|
39
|
-
scrollbarSize: number;
|
|
40
|
-
/**
|
|
41
|
-
* Width of a row.
|
|
42
|
-
*/
|
|
43
|
-
rowWidth: number;
|
|
44
|
-
/**
|
|
45
|
-
* Height of a row.
|
|
46
|
-
*/
|
|
47
|
-
rowHeight: number;
|
|
48
|
-
/**
|
|
49
|
-
* Size of all the visible columns.
|
|
50
|
-
*/
|
|
51
|
-
columnsTotalWidth: number;
|
|
52
|
-
/**
|
|
53
|
-
* Size of left pinned columns.
|
|
54
|
-
*/
|
|
55
|
-
leftPinnedWidth: number;
|
|
56
|
-
/**
|
|
57
|
-
* Size of right pinned columns.
|
|
58
|
-
*/
|
|
59
|
-
rightPinnedWidth: number;
|
|
1
|
+
import type { DimensionsState } from '@mui/x-virtualizer/models';
|
|
2
|
+
export interface GridDimensions extends DimensionsState {
|
|
60
3
|
/**
|
|
61
4
|
* Height of one column header.
|
|
62
5
|
*/
|
|
@@ -73,14 +16,6 @@ export interface GridDimensions {
|
|
|
73
16
|
* Height of all the column headers.
|
|
74
17
|
*/
|
|
75
18
|
headersTotalHeight: number;
|
|
76
|
-
/**
|
|
77
|
-
* Size of the top container.
|
|
78
|
-
*/
|
|
79
|
-
topContainerHeight: number;
|
|
80
|
-
/**
|
|
81
|
-
* Size of the bottom container.
|
|
82
|
-
*/
|
|
83
|
-
bottomContainerHeight: number;
|
|
84
19
|
}
|
|
85
20
|
export interface GridDimensionsApi {
|
|
86
21
|
/**
|
|
@@ -11,7 +11,6 @@ exports.useGridDimensions = useGridDimensions;
|
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _store = require("@mui/x-internals/store");
|
|
14
|
-
var _xVirtualizer = require("@mui/x-virtualizer");
|
|
15
14
|
var _useGridEvent = require("../../utils/useGridEvent");
|
|
16
15
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
17
16
|
var _createSelector = require("../../../utils/createSelector");
|
|
@@ -66,8 +65,6 @@ const columnsTotalWidthSelector = (0, _createSelector.createSelector)(_columns.g
|
|
|
66
65
|
return (0, _roundToDecimalPlaces.roundToDecimalPlaces)(positions[colCount - 1] + visibleColumns[colCount - 1].computedWidth, 1);
|
|
67
66
|
});
|
|
68
67
|
function useGridDimensions(apiRef, props) {
|
|
69
|
-
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useResizeContainer');
|
|
70
|
-
const errorShown = React.useRef(false);
|
|
71
68
|
const virtualizer = apiRef.current.virtualizer;
|
|
72
69
|
const updateDimensions = virtualizer.api.updateDimensions;
|
|
73
70
|
const getViewportPageSize = virtualizer.api.getViewportPageSize;
|
|
@@ -84,20 +81,28 @@ function useGridDimensions(apiRef, props) {
|
|
|
84
81
|
const handleRootMount = root => {
|
|
85
82
|
setCSSVariables(root, (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef));
|
|
86
83
|
};
|
|
87
|
-
const handleResize = size => {
|
|
88
|
-
if (size.height === 0 && !errorShown.current && !props.autoHeight && !_isJSDOM.isJSDOM) {
|
|
89
|
-
logger.error(['The parent DOM element of the Data Grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
90
|
-
errorShown.current = true;
|
|
91
|
-
}
|
|
92
|
-
if (size.width === 0 && !errorShown.current && !_isJSDOM.isJSDOM) {
|
|
93
|
-
logger.error(['The parent DOM element of the Data Grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
94
|
-
errorShown.current = true;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
84
|
(0, _useGridEvent.useGridEventPriority)(apiRef, 'rootMount', handleRootMount);
|
|
98
|
-
(0, _useGridEvent.useGridEventPriority)(apiRef, 'resize', handleResize);
|
|
99
85
|
(0, _useGridEvent.useGridEventPriority)(apiRef, 'debouncedResize', props.onResize);
|
|
100
|
-
|
|
86
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
87
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
88
|
+
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useResizeContainer');
|
|
89
|
+
const errorShown = React.useRef(false);
|
|
90
|
+
(0, _useGridEvent.useGridEventPriority)(apiRef, 'resize', size => {
|
|
91
|
+
if (!getRootDimensions().isReady) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (size.height === 0 && !errorShown.current && !props.autoHeight && !_isJSDOM.isJSDOM) {
|
|
95
|
+
logger.error(['The parent DOM element of the Data Grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
96
|
+
errorShown.current = true;
|
|
97
|
+
}
|
|
98
|
+
if (size.width === 0 && !errorShown.current && !_isJSDOM.isJSDOM) {
|
|
99
|
+
logger.error(['The parent DOM element of the Data Grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
|
|
100
|
+
errorShown.current = true;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
/* eslint-enable react-hooks/rules-of-hooks */
|
|
104
|
+
}
|
|
105
|
+
(0, _store.useStoreEffect)(apiRef.current.store, s => s.dimensions, (previous, next) => {
|
|
101
106
|
if (apiRef.current.rootElementRef.current) {
|
|
102
107
|
setCSSVariables(apiRef.current.rootElementRef.current, next);
|
|
103
108
|
}
|
|
@@ -52,10 +52,9 @@ const serializeCellValue = (cellParams, options) => {
|
|
|
52
52
|
};
|
|
53
53
|
exports.serializeCellValue = serializeCellValue;
|
|
54
54
|
class CSVRow {
|
|
55
|
+
rowString = '';
|
|
56
|
+
isEmpty = true;
|
|
55
57
|
constructor(options) {
|
|
56
|
-
this.options = void 0;
|
|
57
|
-
this.rowString = '';
|
|
58
|
-
this.isEmpty = true;
|
|
59
58
|
this.options = options;
|
|
60
59
|
}
|
|
61
60
|
addValue(value) {
|
|
@@ -114,11 +114,11 @@ const useGridPrintExport = (apiRef, props) => {
|
|
|
114
114
|
|
|
115
115
|
// See https://support.google.com/chrome/thread/191619088?hl=en&msgid=193009642
|
|
116
116
|
gridClone.style.contain = 'size';
|
|
117
|
-
let gridToolbarElementHeight = gridRootElement.querySelector(`.${_gridClasses.gridClasses.
|
|
117
|
+
let gridToolbarElementHeight = gridRootElement.querySelector(`.${_gridClasses.gridClasses.toolbar}`)?.offsetHeight || 0;
|
|
118
118
|
let gridFooterElementHeight = gridRootElement.querySelector(`.${_gridClasses.gridClasses.footerContainer}`)?.offsetHeight || 0;
|
|
119
119
|
const gridFooterElement = gridClone.querySelector(`.${_gridClasses.gridClasses.footerContainer}`);
|
|
120
120
|
if (normalizeOptions.hideToolbar) {
|
|
121
|
-
gridClone.querySelector(`.${_gridClasses.gridClasses.
|
|
121
|
+
gridClone.querySelector(`.${_gridClasses.gridClasses.toolbar}`)?.remove();
|
|
122
122
|
gridToolbarElementHeight = 0;
|
|
123
123
|
}
|
|
124
124
|
if (normalizeOptions.hideFooter && gridFooterElement) {
|
|
@@ -216,12 +216,7 @@ const useGridPrintExport = (apiRef, props) => {
|
|
|
216
216
|
}));
|
|
217
217
|
}
|
|
218
218
|
previousVirtualizationState.current = apiRef.current.state.virtualization;
|
|
219
|
-
apiRef.current.
|
|
220
|
-
virtualization: (0, _extends2.default)({}, state.virtualization, {
|
|
221
|
-
enabled: false,
|
|
222
|
-
enabledForColumns: false
|
|
223
|
-
})
|
|
224
|
-
}));
|
|
219
|
+
apiRef.current.unstable_setVirtualization(false);
|
|
225
220
|
await updateGridColumnsForPrint(options?.fields, options?.allColumns, options?.includeCheckboxes);
|
|
226
221
|
updateGridRowsForPrint(options?.getRowsToExport ?? _utils.defaultGetRowsToExport);
|
|
227
222
|
await raf(); // wait for the state changes to take action
|
|
@@ -203,7 +203,16 @@ const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
|
|
|
203
203
|
if (quickFilterValues.length === 0) {
|
|
204
204
|
return null;
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const allColumnFields = (0, _columns.gridColumnFieldsSelector)(apiRef);
|
|
207
|
+
const columnVisibilityModel = (0, _columns.gridColumnVisibilityModelSelector)(apiRef);
|
|
208
|
+
let columnFields;
|
|
209
|
+
if (shouldQuickFilterExcludeHiddenColumns(filterModel)) {
|
|
210
|
+
// Do not use gridVisibleColumnFieldsSelector here, because quick filter won't work in the list view mode
|
|
211
|
+
// See https://github.com/mui/mui-x/issues/19145
|
|
212
|
+
columnFields = allColumnFields.filter(field => columnVisibilityModel[field] !== false);
|
|
213
|
+
} else {
|
|
214
|
+
columnFields = allColumnFields;
|
|
215
|
+
}
|
|
207
216
|
const appliersPerField = [];
|
|
208
217
|
const {
|
|
209
218
|
ignoreDiacritics
|
package/index.js
CHANGED
package/internals/utils/cache.js
CHANGED
package/locales/fiFI.js
CHANGED
|
@@ -9,8 +9,8 @@ const fiFIGrid = {
|
|
|
9
9
|
// Root
|
|
10
10
|
noRowsLabel: 'Ei rivejä',
|
|
11
11
|
noResultsOverlayLabel: 'Ei tuloksia.',
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
noColumnsOverlayLabel: 'Ei sarakkeita',
|
|
13
|
+
noColumnsOverlayManageColumns: 'Hallitse sarakkeita',
|
|
14
14
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
15
15
|
|
|
16
16
|
// Density selector toolbar button text
|
|
@@ -64,9 +64,9 @@ const fiFIGrid = {
|
|
|
64
64
|
filterPanelInputPlaceholder: 'Suodattimen arvo',
|
|
65
65
|
// Filter operators text
|
|
66
66
|
filterOperatorContains: 'sisältää',
|
|
67
|
-
|
|
67
|
+
filterOperatorDoesNotContain: 'ei sisällä',
|
|
68
68
|
filterOperatorEquals: 'on yhtä suuri kuin',
|
|
69
|
-
|
|
69
|
+
filterOperatorDoesNotEqual: 'on eri suuri kuin',
|
|
70
70
|
filterOperatorStartsWith: 'alkaa',
|
|
71
71
|
filterOperatorEndsWith: 'päättyy',
|
|
72
72
|
filterOperatorIs: 'on',
|
|
@@ -86,9 +86,9 @@ const fiFIGrid = {
|
|
|
86
86
|
'filterOperator<=': '<=',
|
|
87
87
|
// Header filter operators text
|
|
88
88
|
headerFilterOperatorContains: 'Sisältää',
|
|
89
|
-
|
|
89
|
+
headerFilterOperatorDoesNotContain: 'Ei sisällä',
|
|
90
90
|
headerFilterOperatorEquals: 'On yhtä suuri kuin',
|
|
91
|
-
|
|
91
|
+
headerFilterOperatorDoesNotEqual: 'On eri suuri kuin',
|
|
92
92
|
headerFilterOperatorStartsWith: 'Alkaa',
|
|
93
93
|
headerFilterOperatorEndsWith: 'Päättyy',
|
|
94
94
|
headerFilterOperatorIs: 'On',
|
|
@@ -31,7 +31,7 @@ import type { GridHeaderFilteringApi, GridHeaderFilteringPrivateApi } from "./gr
|
|
|
31
31
|
import type { DataGridProcessedProps } from "../props/DataGridProps.js";
|
|
32
32
|
import type { GridColumnResizeApi } from "../../hooks/features/columnResize/index.js";
|
|
33
33
|
import type { GridPivotingPrivateApiCommunity } from "../../hooks/features/pivoting/gridPivotingInterfaces.js";
|
|
34
|
-
export interface GridApiCommon<GridState extends GridStateCommunity =
|
|
34
|
+
export interface GridApiCommon<GridState extends GridStateCommunity = GridStateCommunity, GridInitialState extends GridInitialStateCommunity = GridInitialStateCommunity> extends GridCoreApi, GridPipeProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridRowSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi, GridVirtualizationApi, GridLocaleTextApi, GridScrollApi, GridColumnSpanningApi, GridStateApi<GridState>, GridStatePersistenceApi<GridInitialState>, GridColumnGroupingApi, GridHeaderFilteringApi, GridColumnResizeApi {}
|
|
35
35
|
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon, Props extends DataGridProcessedProps> extends GridCorePrivateApi<Api, PrivateApi, Props>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi, GridEditingPrivateApi, GridLoggerApi, GridFocusPrivateApi, GridHeaderFilteringPrivateApi, GridVirtualizationPrivateApi, GridRowProPrivateApi, GridParamsPrivateApi, GridPivotingPrivateApiCommunity {
|
|
36
36
|
virtualizer: Virtualizer;
|
|
37
37
|
}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createRowSelectionManager = void 0;
|
|
7
7
|
class IncludeManager {
|
|
8
8
|
constructor(model) {
|
|
9
|
-
this.data = void 0;
|
|
10
9
|
this.data = model.ids;
|
|
11
10
|
}
|
|
12
11
|
has(id) {
|
|
@@ -21,7 +20,6 @@ class IncludeManager {
|
|
|
21
20
|
}
|
|
22
21
|
class ExcludeManager {
|
|
23
22
|
constructor(model) {
|
|
24
|
-
this.data = void 0;
|
|
25
23
|
this.data = model.ids;
|
|
26
24
|
}
|
|
27
25
|
has(id) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.2",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime": "^7.28.2",
|
|
42
|
-
"@mui/utils": "^7.
|
|
42
|
+
"@mui/utils": "^7.3.1",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
44
|
"prop-types": "^15.8.1",
|
|
45
45
|
"use-sync-external-store": "^1.5.0",
|
|
46
|
-
"@mui/x-internals": "8.10.
|
|
47
|
-
"@mui/x-virtualizer": "0.1.
|
|
46
|
+
"@mui/x-internals": "8.10.2",
|
|
47
|
+
"@mui/x-virtualizer": "0.1.3"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@emotion/react": "^11.9.0",
|
|
@@ -65,7 +65,8 @@
|
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=14.0.0"
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"type": "commonjs",
|
|
69
|
+
"types": "./index.d.ts",
|
|
69
70
|
"exports": {
|
|
70
71
|
"./package.json": "./package.json",
|
|
71
72
|
".": {
|
|
@@ -88,8 +89,6 @@
|
|
|
88
89
|
"default": "./esm/*/index.js"
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
|
-
"./esm": null
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
"types": "./index.d.ts"
|
|
92
|
+
"./esm": null
|
|
93
|
+
}
|
|
95
94
|
}
|
|
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.FinalizationRegistryBasedCleanupTracking = void 0;
|
|
7
7
|
class FinalizationRegistryBasedCleanupTracking {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
}
|
|
8
|
+
registry = new FinalizationRegistry(unsubscribe => {
|
|
9
|
+
if (typeof unsubscribe === 'function') {
|
|
10
|
+
unsubscribe();
|
|
11
|
+
}
|
|
12
|
+
});
|
|
15
13
|
register(object, unsubscribe, unregisterToken) {
|
|
16
14
|
this.registry.register(object, unsubscribe, unregisterToken);
|
|
17
15
|
}
|
|
@@ -7,9 +7,9 @@ exports.TimerBasedCleanupTracking = void 0;
|
|
|
7
7
|
// If no effect ran after this amount of time, we assume that the render was not committed by React
|
|
8
8
|
const CLEANUP_TIMER_LOOP_MILLIS = 1000;
|
|
9
9
|
class TimerBasedCleanupTracking {
|
|
10
|
+
timeouts = new Map();
|
|
11
|
+
cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;
|
|
10
12
|
constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {
|
|
11
|
-
this.timeouts = new Map();
|
|
12
|
-
this.cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;
|
|
13
13
|
this.cleanupTimeout = timeout;
|
|
14
14
|
}
|
|
15
15
|
register(object, unsubscribe, unregisterToken) {
|