@mui/x-data-grid-premium 7.18.0 → 7.19.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 +110 -0
- package/DataGridPremium/DataGridPremium.js +22 -1
- package/components/GridPremiumColumnMenu.d.ts +3 -3
- package/esm/DataGridPremium/DataGridPremium.js +22 -1
- package/esm/hooks/features/aggregation/gridAggregationUtils.js +1 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +9 -7
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/aggregation/gridAggregationUtils.js +1 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +22 -22
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/hooks/features/cellSelection/useGridCellSelection.js +9 -7
- package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +2 -2
- package/hooks/features/rows/useGridRowAriaAttributes.d.ts +1 -1
- package/index.js +1 -1
- package/material/index.d.ts +3 -3
- package/modern/DataGridPremium/DataGridPremium.js +22 -1
- package/modern/hooks/features/aggregation/gridAggregationUtils.js +1 -1
- package/modern/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +9 -7
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,116 @@
|
|
|
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.19.0
|
|
7
|
+
|
|
8
|
+
_Oct 4, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 26 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🔁 Automatic parents and children selection for Data Grid ["tree data"](https://mui.com/x/react-data-grid/tree-data/) and ["row grouping"](https://mui.com/x/react-data-grid/row-grouping/) features
|
|
13
|
+
- 💫 Support `minHeight` and `maxHeight` on flex parent container for the Data Grid component
|
|
14
|
+
- 🎁 Export `publicAPI` from the `useTreeItem2Utils` hook for the Tree View
|
|
15
|
+
- 🌍 Improve Bulgarian (bg-BG), Croatian (hr-HR), French (fr-FR), German (de-DE), Japanese (ja-JP) and Vietnamese (vi-VN) locales and add Portuguese (pt-PT) locale on the Data Grid component
|
|
16
|
+
- 🌏 Improve Czech (cs-CZ) and Portuguese (pt-BR) locales and add Bulgarian (bg-BG), Croatian (hr-HR) and Portuguese (pt-PT) locales on the Pickers components
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
|
|
20
|
+
Special thanks goes out to our community contributors who have helped make this release possible:
|
|
21
|
+
@AWAIS97, @chucamphong, @GMchris, @JakubSveda, @k-rajat19, @k725, @lhilgert9, @ruiaraujo012, @Sanderand, @thomasmoon, @vallereaugabriel.
|
|
22
|
+
Following are all team members who have contributed to this release:
|
|
23
|
+
@alexfauquette, @arminmeh, @arthurbalduini, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @romgrk, @sai6855, @samuelsycamore.
|
|
24
|
+
|
|
25
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
26
|
+
|
|
27
|
+
### Data Grid
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid@7.19.0`
|
|
30
|
+
|
|
31
|
+
- [DataGrid] Fix column definition `undefined` value (#14456) @sai6855
|
|
32
|
+
- [DataGrid] Fix `checkboxSelectionVisibleOnly` reset the selection on filtering (#14677) @MBilalShafi
|
|
33
|
+
- [DataGrid] Fix background colors when `CSSVarsProvider` is used (#12901) @cherniavskii
|
|
34
|
+
- [DataGrid] Fix error when initializing aggregation with row spanning (#14710) @MBilalShafi
|
|
35
|
+
- [DataGrid] Fix scroll to cell logic for keyboard navigating cells and drag selection with pinned columns (#14550) @KenanYusuf
|
|
36
|
+
- [DataGrid] Support `minHeight` and `maxHeight` on flex parent container (#14614) @cherniavskii
|
|
37
|
+
- [l10n] Add missing Portuguese (pt-PT) translations (#14707) @ruiaraujo012
|
|
38
|
+
- [l10n] Improve Bulgarian (bg-BG) locale (#14451) @GMchris
|
|
39
|
+
- [l10n] Improve Croatian (hr-HR) locale (#14794) @arminmeh
|
|
40
|
+
- [l10n] Improve French (fr-FR) locale (#14750) @vallereaugabriel
|
|
41
|
+
- [l10n] Improve German (de-DE) locale (#14755) @lhilgert9
|
|
42
|
+
- [l10n] Improve Japanese (ja-JP) locale (#14381) @k725
|
|
43
|
+
- [l10n] Improve Vietnamese (vi-VN) locale (#14769) @chucamphong
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-data-grid-pro@7.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid@7.19.0`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPro] Fix dragging styles removal in column reorder (#14680) @k-rajat19
|
|
50
|
+
- [DataGridPro] Fix row pre-processing running with a stale data source (#14810) @MBilalShafi
|
|
51
|
+
- [DataGridPro] Fix `onRowsScrollEnd` not firing on very fast scrolling (#14171) @arminmeh
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid-premium@7.19.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-data-grid-pro@7.19.0`, plus:
|
|
56
|
+
|
|
57
|
+
- [DataGridPremium] Automatic parents and children selection (#13757) @MBilalShafi
|
|
58
|
+
|
|
59
|
+
### Date and Time Pickers
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-date-pickers@7.19.0`
|
|
62
|
+
|
|
63
|
+
- [pickers] Fix left-right keyboard nav with `yearsOrder="desc"` and `direction="rtl"` (#14682) @thomasmoon
|
|
64
|
+
- [pickers] Improve `PickerValidDate` type (#14771) @flaviendelangle
|
|
65
|
+
- [pickers] Improve typing of the range pickers (#14716) @flaviendelangle
|
|
66
|
+
- [l10n] Add Bulgarian (bg-BG) locale (#14469) @GMchris
|
|
67
|
+
- [l10n] Add Croatian (hr-HR) locale (#14795) @arminmeh
|
|
68
|
+
- [l10n] Add Portuguese (pt-PT) locale (#14722) @ruiaraujo012
|
|
69
|
+
- [l10n] Improve Czech (cs-CZ) locale (#14732) @JakubSveda
|
|
70
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#14725) @arthurbalduini
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-date-pickers-pro@7.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
|
+
|
|
74
|
+
Same changes as in `@mui/x-date-pickers@7.19.0`.
|
|
75
|
+
|
|
76
|
+
### Charts
|
|
77
|
+
|
|
78
|
+
#### `@mui/x-charts@7.19.0`
|
|
79
|
+
|
|
80
|
+
- [charts] Fix `LineChart` area animation being stuck when resizing container (#14711) @alexfauquette
|
|
81
|
+
- [charts] Improve types and start using `warnOnce` (#14792) @JCQuintas
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-charts-pro@7.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-charts@7.19.0`.
|
|
86
|
+
|
|
87
|
+
### Tree View
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-tree-view@7.19.0`
|
|
90
|
+
|
|
91
|
+
- [TreeView] Apply experimental features in `getDefaultizedParams` instead of in the plugin render (#14661) @flaviendelangle
|
|
92
|
+
- [TreeView] Export `publicAPI` form `useTreeItem2Utils` (#14729) @noraleonte
|
|
93
|
+
- [TreeView] Fix cursor navigation interfering with browser shortcut keys (#14798) @sai6855
|
|
94
|
+
- [TreeView] Fix invalid test for items reordering (#14665) @flaviendelangle
|
|
95
|
+
- [TreeView] Remove `instance.getTreeItemIdAttribute` (#14667) @flaviendelangle
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Added warning callout for Firefox reordering bug (#14516) @michelengelen
|
|
100
|
+
- [docs] Copyedit `pages.ts` navigation (#14782) @samuelsycamore
|
|
101
|
+
- [docs] Fix typo in row spanning doc (#14770) @flaviendelangle
|
|
102
|
+
- [docs] Fix typo in the Tree View migration guide to v7 (#14727) @Sanderand
|
|
103
|
+
- [docs] Fix typo in usage of Moment guide for UTC and timezones (#14780) @AWAIS97
|
|
104
|
+
- [docs] Fix what's new link to use absolute URL (#14543) @oliviertassinari
|
|
105
|
+
|
|
106
|
+
### Core
|
|
107
|
+
|
|
108
|
+
- [core] Fix class name composition order (#14775) @oliviertassinari
|
|
109
|
+
- [core] Replace minWidth, maxWidth with width (#14776) @oliviertassinari
|
|
110
|
+
- [code-infra] Remove custom playwright installation steps (#14728) @Janpot
|
|
111
|
+
- [code-infra] Replace or remove all instances of `e` identifier (#14724) @samuelsycamore
|
|
112
|
+
- [infra] Adds community contribution section to the changelog script (#14799) @michelengelen
|
|
113
|
+
- [infra] Fix line break in Stack Overflow message @oliviertassinari
|
|
114
|
+
- [test] Fix `Escape` event firing event (#14797) @oliviertassinari
|
|
115
|
+
|
|
6
116
|
## 7.18.0
|
|
7
117
|
|
|
8
118
|
_Sep 20, 2024_
|
|
@@ -94,6 +94,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
94
94
|
/**
|
|
95
95
|
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
96
96
|
* @default false
|
|
97
|
+
* @deprecated Use flex parent container instead: https://mui.com/x/react-data-grid/layout/#flex-parent-container
|
|
98
|
+
* @example
|
|
99
|
+
* <div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
100
|
+
* <DataGrid />
|
|
101
|
+
* </div>
|
|
97
102
|
*/
|
|
98
103
|
autoHeight: _propTypes.default.bool,
|
|
99
104
|
/**
|
|
@@ -414,7 +419,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
414
419
|
*/
|
|
415
420
|
headerFilterHeight: _propTypes.default.number,
|
|
416
421
|
/**
|
|
417
|
-
* If `true`,
|
|
422
|
+
* If `true`, the header filters feature is enabled.
|
|
418
423
|
* @default false
|
|
419
424
|
*/
|
|
420
425
|
headerFilters: _propTypes.default.bool,
|
|
@@ -948,6 +953,22 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
948
953
|
* Sets the row selection model of the Data Grid.
|
|
949
954
|
*/
|
|
950
955
|
rowSelectionModel: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired), _propTypes.default.number, _propTypes.default.string]),
|
|
956
|
+
/**
|
|
957
|
+
* When `rowSelectionPropagation.descendants` is set to `true`.
|
|
958
|
+
* - Selecting a parent will auto-select all its filtered descendants.
|
|
959
|
+
* - Deselecting a parent will auto-deselect all its filtered descendants.
|
|
960
|
+
*
|
|
961
|
+
* When `rowSelectionPropagation.parents=true`
|
|
962
|
+
* - Selecting all descendants of a parent would auto-select it.
|
|
963
|
+
* - Deselecting a descendant of a selected parent would deselect the parent.
|
|
964
|
+
*
|
|
965
|
+
* Works with tree data and row grouping on the client-side only.
|
|
966
|
+
* @default { parents: false, descendants: false }
|
|
967
|
+
*/
|
|
968
|
+
rowSelectionPropagation: _propTypes.default.shape({
|
|
969
|
+
descendants: _propTypes.default.bool,
|
|
970
|
+
parents: _propTypes.default.bool
|
|
971
|
+
}),
|
|
951
972
|
/**
|
|
952
973
|
* Loading rows can be processed on the server or client-side.
|
|
953
974
|
* Set it to 'client' if you would like enable infnite loading.
|
|
@@ -6,9 +6,9 @@ export declare const GRID_COLUMN_MENU_SLOTS_PREMIUM: {
|
|
|
6
6
|
columnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
|
|
7
7
|
columnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
|
|
8
8
|
columnMenuPinningItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuPinningItem;
|
|
9
|
-
columnMenuSortItem: typeof import("@mui/x-data-grid
|
|
10
|
-
columnMenuFilterItem: typeof import("@mui/x-data-grid
|
|
11
|
-
columnMenuColumnsItem: typeof import("@mui/x-data-grid
|
|
9
|
+
columnMenuSortItem: typeof import("@mui/x-data-grid").GridColumnMenuSortItem;
|
|
10
|
+
columnMenuFilterItem: typeof import("@mui/x-data-grid").GridColumnMenuFilterItem;
|
|
11
|
+
columnMenuColumnsItem: typeof import("@mui/x-data-grid").GridColumnMenuColumnsItem;
|
|
12
12
|
};
|
|
13
13
|
export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
|
|
14
14
|
columnMenuAggregationItem: {
|
|
@@ -87,6 +87,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
87
87
|
/**
|
|
88
88
|
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
89
89
|
* @default false
|
|
90
|
+
* @deprecated Use flex parent container instead: https://mui.com/x/react-data-grid/layout/#flex-parent-container
|
|
91
|
+
* @example
|
|
92
|
+
* <div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
93
|
+
* <DataGrid />
|
|
94
|
+
* </div>
|
|
90
95
|
*/
|
|
91
96
|
autoHeight: PropTypes.bool,
|
|
92
97
|
/**
|
|
@@ -407,7 +412,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
407
412
|
*/
|
|
408
413
|
headerFilterHeight: PropTypes.number,
|
|
409
414
|
/**
|
|
410
|
-
* If `true`,
|
|
415
|
+
* If `true`, the header filters feature is enabled.
|
|
411
416
|
* @default false
|
|
412
417
|
*/
|
|
413
418
|
headerFilters: PropTypes.bool,
|
|
@@ -941,6 +946,22 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
941
946
|
* Sets the row selection model of the Data Grid.
|
|
942
947
|
*/
|
|
943
948
|
rowSelectionModel: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired), PropTypes.number, PropTypes.string]),
|
|
949
|
+
/**
|
|
950
|
+
* When `rowSelectionPropagation.descendants` is set to `true`.
|
|
951
|
+
* - Selecting a parent will auto-select all its filtered descendants.
|
|
952
|
+
* - Deselecting a parent will auto-deselect all its filtered descendants.
|
|
953
|
+
*
|
|
954
|
+
* When `rowSelectionPropagation.parents=true`
|
|
955
|
+
* - Selecting all descendants of a parent would auto-select it.
|
|
956
|
+
* - Deselecting a descendant of a selected parent would deselect the parent.
|
|
957
|
+
*
|
|
958
|
+
* Works with tree data and row grouping on the client-side only.
|
|
959
|
+
* @default { parents: false, descendants: false }
|
|
960
|
+
*/
|
|
961
|
+
rowSelectionPropagation: PropTypes.shape({
|
|
962
|
+
descendants: PropTypes.bool,
|
|
963
|
+
parents: PropTypes.bool
|
|
964
|
+
}),
|
|
944
965
|
/**
|
|
945
966
|
* Loading rows can be processed on the server or client-side.
|
|
946
967
|
* Set it to 'client' if you would like enable infnite loading.
|
|
@@ -169,7 +169,7 @@ export const getAggregationFunctionLabel = ({
|
|
|
169
169
|
}
|
|
170
170
|
try {
|
|
171
171
|
return apiRef.current.getLocaleText(`aggregationFunctionLabel${capitalize(aggregationRule.aggregationFunctionName)}`);
|
|
172
|
-
} catch
|
|
172
|
+
} catch {
|
|
173
173
|
return aggregationRule.aggregationFunctionName;
|
|
174
174
|
}
|
|
175
175
|
};
|
|
@@ -12,8 +12,8 @@ const getAggregationValueWrappedValueGetter = ({
|
|
|
12
12
|
getCellAggregationResult
|
|
13
13
|
}) => {
|
|
14
14
|
const wrappedValueGetter = (value, row, column, apiRef) => {
|
|
15
|
-
const rowId = apiRef.current.getRowId(row);
|
|
16
|
-
const cellAggregationResult = getCellAggregationResult(rowId, column.field);
|
|
15
|
+
const rowId = apiRef.current.getRowId?.(row);
|
|
16
|
+
const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
|
|
17
17
|
if (cellAggregationResult != null) {
|
|
18
18
|
return cellAggregationResult?.value ?? null;
|
|
19
19
|
}
|
|
@@ -191,9 +191,10 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
191
191
|
y: mouseY
|
|
192
192
|
} = mousePosition.current;
|
|
193
193
|
const {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
} = dimensions.
|
|
194
|
+
width,
|
|
195
|
+
height: viewportOuterHeight
|
|
196
|
+
} = dimensions.viewportOuterSize;
|
|
197
|
+
const height = viewportOuterHeight - totalHeaderHeight;
|
|
197
198
|
let deltaX = 0;
|
|
198
199
|
let deltaY = 0;
|
|
199
200
|
let factor = 0;
|
|
@@ -227,7 +228,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
227
228
|
autoScrollRAF.current = requestAnimationFrame(autoScroll);
|
|
228
229
|
}
|
|
229
230
|
autoScroll();
|
|
230
|
-
}, [apiRef, dimensions]);
|
|
231
|
+
}, [apiRef, dimensions, totalHeaderHeight]);
|
|
231
232
|
const handleCellMouseOver = React.useCallback((params, event) => {
|
|
232
233
|
if (!lastMouseDownCell.current) {
|
|
233
234
|
return;
|
|
@@ -249,9 +250,10 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
249
250
|
y
|
|
250
251
|
} = virtualScrollerRect;
|
|
251
252
|
const {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
} = dimensions.
|
|
253
|
+
width,
|
|
254
|
+
height: viewportOuterHeight
|
|
255
|
+
} = dimensions.viewportOuterSize;
|
|
256
|
+
const height = viewportOuterHeight - totalHeaderHeight;
|
|
255
257
|
const mouseX = event.clientX - x;
|
|
256
258
|
const mouseY = event.clientY - y - totalHeaderHeight;
|
|
257
259
|
mousePosition.current = {
|
package/esm/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 = "MTcyNzk4OTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -183,7 +183,7 @@ const getAggregationFunctionLabel = ({
|
|
|
183
183
|
}
|
|
184
184
|
try {
|
|
185
185
|
return apiRef.current.getLocaleText(`aggregationFunctionLabel${(0, _utils.unstable_capitalize)(aggregationRule.aggregationFunctionName)}`);
|
|
186
|
-
} catch
|
|
186
|
+
} catch {
|
|
187
187
|
return aggregationRule.aggregationFunctionName;
|
|
188
188
|
}
|
|
189
189
|
};
|
|
@@ -35,40 +35,40 @@ export declare const unwrapColumnFromAggregation: ({ column, }: {
|
|
|
35
35
|
maxWidth?: number;
|
|
36
36
|
hideable?: boolean;
|
|
37
37
|
sortable?: boolean;
|
|
38
|
-
sortingOrder?: readonly import("@mui/x-data-grid
|
|
38
|
+
sortingOrder?: readonly import("@mui/x-data-grid").GridSortDirection[];
|
|
39
39
|
resizable?: boolean;
|
|
40
40
|
editable?: boolean;
|
|
41
41
|
groupable?: boolean;
|
|
42
42
|
pinnable?: boolean;
|
|
43
|
-
sortComparator?: import("@mui/x-data-grid
|
|
44
|
-
getSortComparator?: ((sortDirection: import("@mui/x-data-grid
|
|
45
|
-
type?: import("@mui/x-data-grid
|
|
46
|
-
align?: import("@mui/x-data-grid
|
|
47
|
-
valueGetter?: import("@mui/x-data-grid
|
|
48
|
-
rowSpanValueGetter?: import("@mui/x-data-grid
|
|
49
|
-
valueSetter?: import("@mui/x-data-grid
|
|
50
|
-
valueFormatter?: import("@mui/x-data-grid
|
|
51
|
-
valueParser?: import("@mui/x-data-grid
|
|
52
|
-
cellClassName?: import("@mui/x-data-grid
|
|
43
|
+
sortComparator?: import("@mui/x-data-grid").GridComparatorFn<any> | undefined;
|
|
44
|
+
getSortComparator?: ((sortDirection: import("@mui/x-data-grid").GridSortDirection) => import("@mui/x-data-grid").GridComparatorFn<any> | undefined) | undefined;
|
|
45
|
+
type?: import("@mui/x-data-grid").GridColType;
|
|
46
|
+
align?: import("@mui/x-data-grid").GridAlignment;
|
|
47
|
+
valueGetter?: import("@mui/x-data-grid").GridValueGetter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
|
|
48
|
+
rowSpanValueGetter?: import("@mui/x-data-grid").GridValueGetter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
|
|
49
|
+
valueSetter?: import("@mui/x-data-grid").GridValueSetter<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
50
|
+
valueFormatter?: import("@mui/x-data-grid").GridValueFormatter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
|
|
51
|
+
valueParser?: import("@mui/x-data-grid").GridValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
52
|
+
cellClassName?: import("@mui/x-data-grid").GridCellClassNamePropType<import("@mui/x-data-grid").GridValidRowModel, any> | undefined;
|
|
53
53
|
display?: "text" | "flex";
|
|
54
|
-
renderCell?: ((params: import("@mui/x-data-grid
|
|
55
|
-
renderEditCell?: ((params: import("@mui/x-data-grid
|
|
56
|
-
preProcessEditCellProps?: ((params: import("@mui/x-data-grid
|
|
57
|
-
headerClassName?: import("@mui/x-data-grid
|
|
58
|
-
renderHeader?: ((params: import("@mui/x-data-grid
|
|
59
|
-
headerAlign?: import("@mui/x-data-grid
|
|
54
|
+
renderCell?: ((params: import("@mui/x-data-grid").GridRenderCellParams<import("@mui/x-data-grid").GridValidRowModel, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
|
|
55
|
+
renderEditCell?: ((params: import("@mui/x-data-grid").GridRenderEditCellParams<import("@mui/x-data-grid").GridValidRowModel, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
|
|
56
|
+
preProcessEditCellProps?: ((params: import("@mui/x-data-grid").GridPreProcessEditCellProps) => import("@mui/x-data-grid").GridEditCellProps | Promise<import("@mui/x-data-grid").GridEditCellProps>) | undefined;
|
|
57
|
+
headerClassName?: import("@mui/x-data-grid").GridColumnHeaderClassNamePropType;
|
|
58
|
+
renderHeader?: ((params: import("@mui/x-data-grid").GridColumnHeaderParams<import("@mui/x-data-grid").GridValidRowModel, any, any>) => React.ReactNode) | undefined;
|
|
59
|
+
headerAlign?: import("@mui/x-data-grid").GridAlignment;
|
|
60
60
|
hideSortIcons?: boolean;
|
|
61
61
|
disableColumnMenu?: boolean;
|
|
62
62
|
filterable?: boolean;
|
|
63
|
-
filterOperators?: readonly GridFilterOperator<import("@mui/x-data-grid
|
|
64
|
-
getApplyQuickFilterFn?: import("@mui/x-data-grid
|
|
63
|
+
filterOperators?: readonly GridFilterOperator<import("@mui/x-data-grid").GridValidRowModel, any, any>[] | undefined;
|
|
64
|
+
getApplyQuickFilterFn?: import("@mui/x-data-grid").GetApplyQuickFilterFn<import("@mui/x-data-grid").GridValidRowModel, any> | undefined;
|
|
65
65
|
disableReorder?: boolean;
|
|
66
66
|
disableExport?: boolean;
|
|
67
|
-
colSpan?: number | import("@mui/x-data-grid
|
|
67
|
+
colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
68
68
|
renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
|
|
69
69
|
aggregable?: boolean;
|
|
70
70
|
availableAggregationFunctions?: string[];
|
|
71
|
-
groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid
|
|
72
|
-
pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid
|
|
71
|
+
groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
|
|
72
|
+
pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
73
73
|
};
|
|
74
74
|
export {};
|
|
@@ -20,8 +20,8 @@ const getAggregationValueWrappedValueGetter = ({
|
|
|
20
20
|
getCellAggregationResult
|
|
21
21
|
}) => {
|
|
22
22
|
const wrappedValueGetter = (value, row, column, apiRef) => {
|
|
23
|
-
const rowId = apiRef.current.getRowId(row);
|
|
24
|
-
const cellAggregationResult = getCellAggregationResult(rowId, column.field);
|
|
23
|
+
const rowId = apiRef.current.getRowId?.(row);
|
|
24
|
+
const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
|
|
25
25
|
if (cellAggregationResult != null) {
|
|
26
26
|
return cellAggregationResult?.value ?? null;
|
|
27
27
|
}
|
|
@@ -200,9 +200,10 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
200
200
|
y: mouseY
|
|
201
201
|
} = mousePosition.current;
|
|
202
202
|
const {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
} = dimensions.
|
|
203
|
+
width,
|
|
204
|
+
height: viewportOuterHeight
|
|
205
|
+
} = dimensions.viewportOuterSize;
|
|
206
|
+
const height = viewportOuterHeight - totalHeaderHeight;
|
|
206
207
|
let deltaX = 0;
|
|
207
208
|
let deltaY = 0;
|
|
208
209
|
let factor = 0;
|
|
@@ -236,7 +237,7 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
236
237
|
autoScrollRAF.current = requestAnimationFrame(autoScroll);
|
|
237
238
|
}
|
|
238
239
|
autoScroll();
|
|
239
|
-
}, [apiRef, dimensions]);
|
|
240
|
+
}, [apiRef, dimensions, totalHeaderHeight]);
|
|
240
241
|
const handleCellMouseOver = React.useCallback((params, event) => {
|
|
241
242
|
if (!lastMouseDownCell.current) {
|
|
242
243
|
return;
|
|
@@ -258,9 +259,10 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
258
259
|
y
|
|
259
260
|
} = virtualScrollerRect;
|
|
260
261
|
const {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
} = dimensions.
|
|
262
|
+
width,
|
|
263
|
+
height: viewportOuterHeight
|
|
264
|
+
} = dimensions.viewportOuterSize;
|
|
265
|
+
const height = viewportOuterHeight - totalHeaderHeight;
|
|
264
266
|
const mouseX = event.clientX - x;
|
|
265
267
|
const mouseY = event.clientY - y - totalHeaderHeight;
|
|
266
268
|
mousePosition.current = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GridStatePremium } from '../../../models/gridStatePremium';
|
|
2
|
-
export declare const gridRowGroupingModelSelector: import("@mui/x-data-grid
|
|
3
|
-
export declare const gridRowGroupingSanitizedModelSelector: import("@mui/x-data-grid
|
|
2
|
+
export declare const gridRowGroupingModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridRowGroupingInterfaces").GridRowGroupingModel>;
|
|
3
|
+
export declare const gridRowGroupingSanitizedModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGridRowAriaAttributes: () => (rowNode: import("@mui/x-data-grid").GridTreeNode, index: number) =>
|
|
1
|
+
export declare const useGridRowAriaAttributes: () => (rowNode: import("@mui/x-data-grid").GridTreeNode, index: number) => React.HTMLAttributes<HTMLElement>;
|
package/index.js
CHANGED
package/material/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const materialSlots: {
|
|
2
|
-
columnMenuUngroupIcon:
|
|
3
|
-
columnMenuGroupIcon:
|
|
4
|
-
columnMenuAggregationIcon:
|
|
2
|
+
columnMenuUngroupIcon: React.JSXElementConstructor<any>;
|
|
3
|
+
columnMenuGroupIcon: React.JSXElementConstructor<any>;
|
|
4
|
+
columnMenuAggregationIcon: React.JSXElementConstructor<any>;
|
|
5
5
|
};
|
|
6
6
|
export default materialSlots;
|
|
@@ -87,6 +87,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
87
87
|
/**
|
|
88
88
|
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
89
89
|
* @default false
|
|
90
|
+
* @deprecated Use flex parent container instead: https://mui.com/x/react-data-grid/layout/#flex-parent-container
|
|
91
|
+
* @example
|
|
92
|
+
* <div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
93
|
+
* <DataGrid />
|
|
94
|
+
* </div>
|
|
90
95
|
*/
|
|
91
96
|
autoHeight: PropTypes.bool,
|
|
92
97
|
/**
|
|
@@ -407,7 +412,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
407
412
|
*/
|
|
408
413
|
headerFilterHeight: PropTypes.number,
|
|
409
414
|
/**
|
|
410
|
-
* If `true`,
|
|
415
|
+
* If `true`, the header filters feature is enabled.
|
|
411
416
|
* @default false
|
|
412
417
|
*/
|
|
413
418
|
headerFilters: PropTypes.bool,
|
|
@@ -941,6 +946,22 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
941
946
|
* Sets the row selection model of the Data Grid.
|
|
942
947
|
*/
|
|
943
948
|
rowSelectionModel: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired), PropTypes.number, PropTypes.string]),
|
|
949
|
+
/**
|
|
950
|
+
* When `rowSelectionPropagation.descendants` is set to `true`.
|
|
951
|
+
* - Selecting a parent will auto-select all its filtered descendants.
|
|
952
|
+
* - Deselecting a parent will auto-deselect all its filtered descendants.
|
|
953
|
+
*
|
|
954
|
+
* When `rowSelectionPropagation.parents=true`
|
|
955
|
+
* - Selecting all descendants of a parent would auto-select it.
|
|
956
|
+
* - Deselecting a descendant of a selected parent would deselect the parent.
|
|
957
|
+
*
|
|
958
|
+
* Works with tree data and row grouping on the client-side only.
|
|
959
|
+
* @default { parents: false, descendants: false }
|
|
960
|
+
*/
|
|
961
|
+
rowSelectionPropagation: PropTypes.shape({
|
|
962
|
+
descendants: PropTypes.bool,
|
|
963
|
+
parents: PropTypes.bool
|
|
964
|
+
}),
|
|
944
965
|
/**
|
|
945
966
|
* Loading rows can be processed on the server or client-side.
|
|
946
967
|
* Set it to 'client' if you would like enable infnite loading.
|
|
@@ -169,7 +169,7 @@ export const getAggregationFunctionLabel = ({
|
|
|
169
169
|
}
|
|
170
170
|
try {
|
|
171
171
|
return apiRef.current.getLocaleText(`aggregationFunctionLabel${capitalize(aggregationRule.aggregationFunctionName)}`);
|
|
172
|
-
} catch
|
|
172
|
+
} catch {
|
|
173
173
|
return aggregationRule.aggregationFunctionName;
|
|
174
174
|
}
|
|
175
175
|
};
|
|
@@ -12,8 +12,8 @@ const getAggregationValueWrappedValueGetter = ({
|
|
|
12
12
|
getCellAggregationResult
|
|
13
13
|
}) => {
|
|
14
14
|
const wrappedValueGetter = (value, row, column, apiRef) => {
|
|
15
|
-
const rowId = apiRef.current.getRowId(row);
|
|
16
|
-
const cellAggregationResult = getCellAggregationResult(rowId, column.field);
|
|
15
|
+
const rowId = apiRef.current.getRowId?.(row);
|
|
16
|
+
const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
|
|
17
17
|
if (cellAggregationResult != null) {
|
|
18
18
|
return cellAggregationResult?.value ?? null;
|
|
19
19
|
}
|
|
@@ -191,9 +191,10 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
191
191
|
y: mouseY
|
|
192
192
|
} = mousePosition.current;
|
|
193
193
|
const {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
} = dimensions.
|
|
194
|
+
width,
|
|
195
|
+
height: viewportOuterHeight
|
|
196
|
+
} = dimensions.viewportOuterSize;
|
|
197
|
+
const height = viewportOuterHeight - totalHeaderHeight;
|
|
197
198
|
let deltaX = 0;
|
|
198
199
|
let deltaY = 0;
|
|
199
200
|
let factor = 0;
|
|
@@ -227,7 +228,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
227
228
|
autoScrollRAF.current = requestAnimationFrame(autoScroll);
|
|
228
229
|
}
|
|
229
230
|
autoScroll();
|
|
230
|
-
}, [apiRef, dimensions]);
|
|
231
|
+
}, [apiRef, dimensions, totalHeaderHeight]);
|
|
231
232
|
const handleCellMouseOver = React.useCallback((params, event) => {
|
|
232
233
|
if (!lastMouseDownCell.current) {
|
|
233
234
|
return;
|
|
@@ -249,9 +250,10 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
249
250
|
y
|
|
250
251
|
} = virtualScrollerRect;
|
|
251
252
|
const {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
} = dimensions.
|
|
253
|
+
width,
|
|
254
|
+
height: viewportOuterHeight
|
|
255
|
+
} = dimensions.viewportOuterSize;
|
|
256
|
+
const height = viewportOuterHeight - totalHeaderHeight;
|
|
255
257
|
const mouseX = event.clientX - x;
|
|
256
258
|
const mouseY = event.clientY - y - totalHeaderHeight;
|
|
257
259
|
mousePosition.current = {
|
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 = "MTcyNzk4OTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.19.0",
|
|
4
4
|
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"exceljs": "^4.4.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"reselect": "^5.1.1",
|
|
43
|
-
"@mui/x-data-grid": "7.
|
|
43
|
+
"@mui/x-data-grid": "7.19.0",
|
|
44
44
|
"@mui/x-internals": "7.18.0",
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
45
|
+
"@mui/x-data-grid-pro": "7.19.0",
|
|
46
|
+
"@mui/x-license": "7.18.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTcyNzk4OTIwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|