@mui/x-data-grid-premium 6.10.0 → 6.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 +136 -3
- package/components/GridGroupingColumnFooterCell.js +8 -11
- package/components/GridGroupingColumnLeafCell.js +1 -2
- package/components/GridGroupingCriteriaCell.js +1 -2
- package/hooks/features/aggregation/gridAggregationUtils.js +6 -2
- package/hooks/features/aggregation/useGridAggregation.js +2 -2
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/hooks/features/cellSelection/useGridCellSelection.js +13 -13
- package/hooks/features/rowGrouping/useGridRowGrouping.js +6 -6
- package/hooks/utils/useKeepGroupedColumnsHidden.js +3 -3
- package/index.js +1 -1
- package/legacy/components/GridGroupingColumnFooterCell.js +10 -9
- package/legacy/components/GridGroupingColumnLeafCell.js +3 -2
- package/legacy/components/GridGroupingCriteriaCell.js +3 -2
- package/legacy/hooks/features/aggregation/gridAggregationUtils.js +5 -2
- package/legacy/hooks/features/aggregation/useGridAggregation.js +2 -2
- package/legacy/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/legacy/hooks/features/cellSelection/useGridCellSelection.js +16 -16
- package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +6 -6
- package/legacy/hooks/utils/useKeepGroupedColumnsHidden.js +3 -3
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/components/GridGroupingColumnFooterCell.js +8 -11
- package/modern/components/GridGroupingColumnLeafCell.js +1 -2
- package/modern/components/GridGroupingCriteriaCell.js +1 -2
- package/modern/hooks/features/aggregation/gridAggregationUtils.js +6 -2
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/components/GridGroupingColumnFooterCell.js +8 -11
- package/node/components/GridGroupingColumnLeafCell.js +1 -2
- package/node/components/GridGroupingCriteriaCell.js +1 -2
- package/node/hooks/features/aggregation/gridAggregationUtils.js +12 -8
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,139 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.10.2
|
|
7
|
+
|
|
8
|
+
_Jul 27, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🚀 Improve scatter charts performance
|
|
13
|
+
- 📚 Redesigned component API documentation and side navigation
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### Data Grid
|
|
17
|
+
|
|
18
|
+
#### `@mui/x-data-grid@v6.10.2`
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Fix quick filter & aggregation error (#9729) @romgrk
|
|
21
|
+
- [DataGrid] Fix row click propagation causing error in nested grid (#9741) @cherniavskii
|
|
22
|
+
- [DataGrid] Keep focused cell in the DOM (#7357) @yaredtsy
|
|
23
|
+
- [l10n] Improve Finnish (fi-FI) locale (#9746) @sambbaahh
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link)
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid@v6.10.2`.
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-premium@v6.10.2` [](https://mui.com/r/x-premium-svg-link)
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
32
|
+
|
|
33
|
+
- [DataGridPremium] Allow to customize grouping cell offset (#9417) @cherniavskii
|
|
34
|
+
|
|
35
|
+
### Date Pickers
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-date-pickers@v6.10.2`
|
|
38
|
+
|
|
39
|
+
- [pickers] Remove the `endOfDate` from `DigitalClock` timeOptions (#9800) @noraleonte
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link)
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-date-pickers@v6.10.2`.
|
|
44
|
+
|
|
45
|
+
### Charts / `@mui/x-charts@v6.0.0-alpha.5`
|
|
46
|
+
|
|
47
|
+
- [charts] Improve JSDoc for axis-related props (#9779) @flaviendelangle
|
|
48
|
+
- [charts] Improve performances of Scatter component (#9527) @flaviendelangle
|
|
49
|
+
|
|
50
|
+
### Docs
|
|
51
|
+
|
|
52
|
+
- [docs] Add `pnpm` in more places @oliviertassinari
|
|
53
|
+
- [docs] Add `pnpm` installation instructions for MUI X (#9707) @richbustos
|
|
54
|
+
- [docs] Align pickers "uncontrolled vs controlled" sections (#9772) @LukasTy
|
|
55
|
+
- [docs] Apply style guide to the data grid Layout page (#9673) @richbustos
|
|
56
|
+
- [docs] Differentiate between packages in `slotProps` docs (#9668) @cherniavskii
|
|
57
|
+
- [docs] Fix charts width in axis pages (#9801) @alexfauquette
|
|
58
|
+
- [docs] Fix wrong prop name in the Editing page (#9753) @m4theushw
|
|
59
|
+
- [docs] New component API page and side nav design (#9187) @alexfauquette
|
|
60
|
+
- [docs] Update overview page with up to date information about the plans (#9512) @joserodolfofreitas
|
|
61
|
+
|
|
62
|
+
### Core
|
|
63
|
+
|
|
64
|
+
- [core] Use PR charts version in preview (#9787) @alexfauquette
|
|
65
|
+
- [license] Allow overriding the license on specific parts of the page (#9717) @Janpot
|
|
66
|
+
- [license] Throw in dev mode after 30 days (#9701) @oliviertassinari
|
|
67
|
+
- [license] Only throw in dev mode (#9803) @oliviertassinari
|
|
68
|
+
- [test] Fail the CI when new unexpected files are created (#9728) @oliviertassinari
|
|
69
|
+
|
|
70
|
+
## 6.10.1
|
|
71
|
+
|
|
72
|
+
_Jul 20, 2023_
|
|
73
|
+
|
|
74
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
75
|
+
|
|
76
|
+
- 🎁 Fix CSV export for values containing double quotes
|
|
77
|
+
- 🚀 Improve tree data performance
|
|
78
|
+
- 🐞 Bugfixes
|
|
79
|
+
- 📚 Documentation improvements
|
|
80
|
+
|
|
81
|
+
### Data Grid
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-data-grid@v6.10.1`
|
|
84
|
+
|
|
85
|
+
- [DataGrid] Filtering performance: compile filter applier with `eval` (#9635) @romgrk
|
|
86
|
+
- [DataGrid] Fix CSV export for values containing double quotes (#9667) @cherniavskii
|
|
87
|
+
- [DataGrid] Fix column type change not working correctly (#9594) @cherniavskii
|
|
88
|
+
- [DataGrid] Fix quick filter `undefined` row error (#9708) @romgrk
|
|
89
|
+
- [DataGrid] Prevent `viewportOuterSize.height` going negative (#9664) @gitstart
|
|
90
|
+
- [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
|
|
91
|
+
- [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-data-grid-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link)
|
|
94
|
+
|
|
95
|
+
Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
|
|
96
|
+
|
|
97
|
+
- [DataGridPro] Improve tree data performance (#9682) @cherniavskii
|
|
98
|
+
- [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-data-grid-premium@v6.10.1` [](https://mui.com/r/x-premium-svg-link)
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
103
|
+
|
|
104
|
+
### Date Pickers
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-date-pickers@v6.10.1`
|
|
107
|
+
|
|
108
|
+
- [fields] Fix `format` and `value` update order (#9715) @LukasTy
|
|
109
|
+
- [pickers] Remove `require` usage in comment (#9675) @LukasTy
|
|
110
|
+
|
|
111
|
+
#### `@mui/x-date-pickers-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link)
|
|
112
|
+
|
|
113
|
+
Same changes as in `@mui/x-date-pickers@v6.10.1`.
|
|
114
|
+
|
|
115
|
+
### Charts / `@mui/x-charts@v6.0.0-alpha.4`
|
|
116
|
+
|
|
117
|
+
- [charts] Fix blinking in responsive charts and extremums computation for line charts (#9734) @alexfauquette
|
|
118
|
+
- [charts] Use ESM with imports (#9645) @alexfauquette
|
|
119
|
+
|
|
120
|
+
### Docs
|
|
121
|
+
|
|
122
|
+
- [docs] Add additional note for license key installation on Next.js (#9575) @joserodolfofreitas
|
|
123
|
+
- [docs] Add paragraph about managing focus of custom edit components (#9658) @m4theushw
|
|
124
|
+
- [docs] Add unsorted icon slot to the custom sort icons demo (#9169) @d4rekanguok
|
|
125
|
+
- [docs] Disable ad for onboarding pages (#9700) @oliviertassinari
|
|
126
|
+
- [docs] Disabling ads without toolbar has no effect @oliviertassinari
|
|
127
|
+
- [docs] Fix Date Pickers usage to Title Case (#9680) @richbustos
|
|
128
|
+
- [docs] Fix sorting in `CustomSortIcons` demo (#9656) @MBilalShafi
|
|
129
|
+
- [docs] Improve the UI for pickers introduction (#9644) @alexfauquette
|
|
130
|
+
- [docs] Improve the demo design @oliviertassinari
|
|
131
|
+
- [docs] Localization progress, polish (#9672) @oliviertassinari
|
|
132
|
+
- [docs] Normalize the WIP items (#9671) @oliviertassinari
|
|
133
|
+
|
|
134
|
+
### Core
|
|
135
|
+
|
|
136
|
+
- [core] Add `validate` command (#9714) @romgrk
|
|
137
|
+
- [CHANGELOG] Update generator to new format @oliviertassinari
|
|
138
|
+
|
|
6
139
|
## 6.10.0
|
|
7
140
|
|
|
8
141
|
_Jul 13, 2023_
|
|
@@ -26,11 +159,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
26
159
|
- [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
|
|
27
160
|
- [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
|
|
28
161
|
|
|
29
|
-
#### `@mui/x-data-grid-pro@6.10.0`
|
|
162
|
+
#### `@mui/x-data-grid-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link)
|
|
30
163
|
|
|
31
164
|
Same changes as in `@mui/x-data-grid@6.10.0`.
|
|
32
165
|
|
|
33
|
-
#### `@mui/x-data-grid-premium@6.10.0`
|
|
166
|
+
#### `@mui/x-data-grid-premium@6.10.0` [](https://mui.com/r/x-premium-svg-link)
|
|
34
167
|
|
|
35
168
|
Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
36
169
|
|
|
@@ -41,7 +174,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
|
41
174
|
- [pickers] Fix date calendar issues (#9652) @LukasTy
|
|
42
175
|
- [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
|
|
43
176
|
|
|
44
|
-
#### `@mui/x-date-pickers-pro@6.10.0`
|
|
177
|
+
#### `@mui/x-date-pickers-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link)
|
|
45
178
|
|
|
46
179
|
Same changes as in `@mui/x-date-pickers@6.10.0`.
|
|
47
180
|
|
|
@@ -4,22 +4,19 @@ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
|
4
4
|
import { GridFooterCell } from './GridFooterCell';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
function GridGroupingColumnFooterCell(props) {
|
|
7
|
-
const {
|
|
8
|
-
rowNode
|
|
9
|
-
} = props;
|
|
10
7
|
const rootProps = useGridRootProps();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
const sx = {
|
|
9
|
+
ml: 0
|
|
10
|
+
};
|
|
11
|
+
if (props.rowNode.parent == null) {
|
|
12
|
+
sx.ml = 0;
|
|
14
13
|
} else if (rootProps.rowGroupingColumnMode === 'multiple') {
|
|
15
|
-
|
|
14
|
+
sx.ml = 2;
|
|
16
15
|
} else {
|
|
17
|
-
|
|
16
|
+
sx.ml = theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(props.rowNode.depth)})`;
|
|
18
17
|
}
|
|
19
18
|
return /*#__PURE__*/_jsx(GridFooterCell, _extends({
|
|
20
|
-
sx:
|
|
21
|
-
ml: marginLeft
|
|
22
|
-
}
|
|
19
|
+
sx: sx
|
|
23
20
|
}, props));
|
|
24
21
|
}
|
|
25
22
|
export { GridGroupingColumnFooterCell };
|
|
@@ -8,10 +8,9 @@ function GridGroupingColumnLeafCell(props) {
|
|
|
8
8
|
rowNode
|
|
9
9
|
} = props;
|
|
10
10
|
const rootProps = useGridRootProps();
|
|
11
|
-
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 1 : rowNode.depth * 2;
|
|
12
11
|
return /*#__PURE__*/_jsx(Box, {
|
|
13
12
|
sx: {
|
|
14
|
-
ml:
|
|
13
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 1 : theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(rowNode.depth)})`
|
|
15
14
|
},
|
|
16
15
|
children: (_props$formattedValue = props.formattedValue) != null ? _props$formattedValue : props.value
|
|
17
16
|
});
|
|
@@ -48,7 +48,6 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
48
48
|
apiRef.current.setCellFocus(id, field);
|
|
49
49
|
event.stopPropagation();
|
|
50
50
|
};
|
|
51
|
-
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 0 : rowNode.depth * 2;
|
|
52
51
|
let cellContent;
|
|
53
52
|
const colDef = apiRef.current.getColumn(rowNode.groupingField);
|
|
54
53
|
if (typeof colDef.renderCell === 'function') {
|
|
@@ -65,7 +64,7 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
65
64
|
return /*#__PURE__*/_jsxs(Box, {
|
|
66
65
|
className: classes.root,
|
|
67
66
|
sx: {
|
|
68
|
-
ml:
|
|
67
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 0 : theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(rowNode.depth)})`
|
|
69
68
|
},
|
|
70
69
|
children: [/*#__PURE__*/_jsx("div", {
|
|
71
70
|
className: classes.toggle,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { unstable_capitalize as capitalize } from '@mui/utils';
|
|
3
|
+
import { GRID_ID_AUTOGENERATED } from '@mui/x-data-grid/internals';
|
|
3
4
|
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
4
5
|
import { addPinnedRow, isDeepEqual, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
|
|
5
6
|
export const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
|
|
@@ -108,10 +109,13 @@ export const addFooterRows = ({
|
|
|
108
109
|
const updateRootGroupFooter = groupNode => {
|
|
109
110
|
const shouldHaveFooter = hasAggregationRule && getAggregationPosition(groupNode) === 'footer';
|
|
110
111
|
if (shouldHaveFooter) {
|
|
112
|
+
const rowId = getAggregationFooterRowIdFromGroupId(null);
|
|
111
113
|
newGroupingParams = addPinnedRow({
|
|
112
114
|
groupingParams: newGroupingParams,
|
|
113
|
-
rowModel:
|
|
114
|
-
|
|
115
|
+
rowModel: {
|
|
116
|
+
[GRID_ID_AUTOGENERATED]: rowId
|
|
117
|
+
},
|
|
118
|
+
rowId,
|
|
115
119
|
position: 'bottom',
|
|
116
120
|
apiRef,
|
|
117
121
|
isAutoGenerated: true
|
|
@@ -5,14 +5,14 @@ import { gridAggregationModelSelector } from './gridAggregationSelectors';
|
|
|
5
5
|
import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from './gridAggregationUtils';
|
|
6
6
|
import { createAggregationLookup } from './createAggregationLookup';
|
|
7
7
|
export const aggregationStateInitializer = (state, props, apiRef) => {
|
|
8
|
-
var _ref, _props$aggregationMod, _props$initialState
|
|
8
|
+
var _ref, _props$aggregationMod, _props$initialState;
|
|
9
9
|
apiRef.current.caches.aggregation = {
|
|
10
10
|
rulesOnLastColumnHydration: {},
|
|
11
11
|
rulesOnLastRowHydration: {}
|
|
12
12
|
};
|
|
13
13
|
return _extends({}, state, {
|
|
14
14
|
aggregation: {
|
|
15
|
-
model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null
|
|
15
|
+
model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.aggregation) == null ? void 0 : _props$initialState.model) != null ? _ref : {}
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
};
|
|
@@ -149,7 +149,7 @@ export const wrapColumnWithAggregationValue = ({
|
|
|
149
149
|
aggregationRule
|
|
150
150
|
}) => {
|
|
151
151
|
const getCellAggregationResult = (id, field) => {
|
|
152
|
-
var _rowNode$parent, _gridAggregationLooku
|
|
152
|
+
var _rowNode$parent, _gridAggregationLooku;
|
|
153
153
|
let cellAggregationPosition = null;
|
|
154
154
|
const rowNode = apiRef.current.getRowNode(id);
|
|
155
155
|
if (rowNode.type === 'group') {
|
|
@@ -163,7 +163,7 @@ export const wrapColumnWithAggregationValue = ({
|
|
|
163
163
|
|
|
164
164
|
// TODO: Add custom root id
|
|
165
165
|
const groupId = cellAggregationPosition === 'inline' ? id : (_rowNode$parent = rowNode.parent) != null ? _rowNode$parent : '';
|
|
166
|
-
const aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null
|
|
166
|
+
const aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null || (_gridAggregationLooku = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku[field];
|
|
167
167
|
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
@@ -119,15 +119,15 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
119
119
|
return params.rowNode.type !== 'pinnedRow';
|
|
120
120
|
}, [apiRef]);
|
|
121
121
|
const handleMouseUp = useEventCallback(() => {
|
|
122
|
-
var _apiRef$current$rootE
|
|
122
|
+
var _apiRef$current$rootE;
|
|
123
123
|
lastMouseDownCell.current = null;
|
|
124
|
-
(_apiRef$current$rootE = apiRef.current.rootElementRef) == null
|
|
124
|
+
(_apiRef$current$rootE = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE.classList.remove(gridClasses['root--disableUserSelection']);
|
|
125
125
|
|
|
126
126
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
127
127
|
stopAutoScroll();
|
|
128
128
|
});
|
|
129
129
|
const handleCellMouseDown = React.useCallback((params, event) => {
|
|
130
|
-
var _apiRef$current$
|
|
130
|
+
var _apiRef$current$rootE2, _apiRef$current$rootE3;
|
|
131
131
|
// Skip if the click comes from the right-button or, only on macOS, Ctrl is pressed
|
|
132
132
|
// Fix for https://github.com/mui/mui-x/pull/6567#issuecomment-1329155578
|
|
133
133
|
const isMacOs = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
@@ -142,8 +142,8 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
142
142
|
id: params.id,
|
|
143
143
|
field: params.field
|
|
144
144
|
};
|
|
145
|
-
(_apiRef$current$
|
|
146
|
-
const document = ownerDocument((_apiRef$current$
|
|
145
|
+
(_apiRef$current$rootE2 = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE2 = _apiRef$current$rootE2.current) == null ? void 0 : _apiRef$current$rootE2.classList.add(gridClasses['root--disableUserSelection']);
|
|
146
|
+
const document = ownerDocument((_apiRef$current$rootE3 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE3.current);
|
|
147
147
|
document.addEventListener('mouseup', handleMouseUp, {
|
|
148
148
|
once: true
|
|
149
149
|
});
|
|
@@ -161,20 +161,20 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
161
161
|
};
|
|
162
162
|
}, []);
|
|
163
163
|
const startAutoScroll = React.useCallback(() => {
|
|
164
|
-
var _apiRef$current$virtu, _apiRef$current$virtu2
|
|
164
|
+
var _apiRef$current$virtu, _apiRef$current$virtu2;
|
|
165
165
|
if (autoScrollRAF.current) {
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
if (!((_apiRef$current$virtu = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu.current)) {
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
const virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null
|
|
171
|
+
const virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu2 = _apiRef$current$virtu2.current) == null ? void 0 : _apiRef$current$virtu2.getBoundingClientRect();
|
|
172
172
|
if (!virtualScrollerRect) {
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
function autoScroll() {
|
|
176
|
-
var _apiRef$current$
|
|
177
|
-
if (!mousePosition.current || !((_apiRef$current$
|
|
176
|
+
var _apiRef$current$virtu3;
|
|
177
|
+
if (!mousePosition.current || !((_apiRef$current$virtu3 = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu3.current)) {
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
const {
|
|
@@ -221,7 +221,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
221
221
|
autoScroll();
|
|
222
222
|
}, [apiRef]);
|
|
223
223
|
const handleCellMouseOver = React.useCallback((params, event) => {
|
|
224
|
-
var _apiRef$current$
|
|
224
|
+
var _apiRef$current$virtu4;
|
|
225
225
|
if (!lastMouseDownCell.current) {
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
@@ -233,7 +233,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
233
233
|
id,
|
|
234
234
|
field
|
|
235
235
|
}, event.ctrlKey || event.metaKey);
|
|
236
|
-
const virtualScrollerRect = (_apiRef$current$
|
|
236
|
+
const virtualScrollerRect = (_apiRef$current$virtu4 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu4 = _apiRef$current$virtu4.current) == null ? void 0 : _apiRef$current$virtu4.getBoundingClientRect();
|
|
237
237
|
if (!virtualScrollerRect) {
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
@@ -354,8 +354,8 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
354
354
|
}
|
|
355
355
|
}, [apiRef, props.unstable_cellSelectionModel]);
|
|
356
356
|
React.useEffect(() => {
|
|
357
|
-
var _apiRef$current$
|
|
358
|
-
const rootRef = (_apiRef$current$
|
|
357
|
+
var _apiRef$current$rootE4;
|
|
358
|
+
const rootRef = (_apiRef$current$rootE4 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE4.current;
|
|
359
359
|
return () => {
|
|
360
360
|
stopAutoScroll();
|
|
361
361
|
const document = ownerDocument(rootRef);
|
|
@@ -5,13 +5,13 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
|
|
6
6
|
import { getRowGroupingFieldFromGroupingCriteria, ROW_GROUPING_STRATEGY, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from './gridRowGroupingUtils';
|
|
7
7
|
export const rowGroupingStateInitializer = (state, props, apiRef) => {
|
|
8
|
-
var _ref, _props$rowGroupingMod, _props$initialState
|
|
8
|
+
var _ref, _props$rowGroupingMod, _props$initialState;
|
|
9
9
|
apiRef.current.caches.rowGrouping = {
|
|
10
10
|
rulesOnLastRowTreeCreation: []
|
|
11
11
|
};
|
|
12
12
|
return _extends({}, state, {
|
|
13
13
|
rowGrouping: {
|
|
14
|
-
model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null
|
|
14
|
+
model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model) != null ? _ref : []
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
};
|
|
@@ -22,7 +22,7 @@ export const rowGroupingStateInitializer = (state, props, apiRef) => {
|
|
|
22
22
|
* @requires useGridParamsApi (method) - can be after, async only
|
|
23
23
|
*/
|
|
24
24
|
export const useGridRowGrouping = (apiRef, props) => {
|
|
25
|
-
var _props$initialState3
|
|
25
|
+
var _props$initialState3;
|
|
26
26
|
apiRef.current.registerControlState({
|
|
27
27
|
stateId: 'rowGrouping',
|
|
28
28
|
propModel: props.rowGroupingModel,
|
|
@@ -89,7 +89,7 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
89
89
|
return columnMenuItems;
|
|
90
90
|
}, [props.disableRowGrouping]);
|
|
91
91
|
const stateExportPreProcessing = React.useCallback((prevState, context) => {
|
|
92
|
-
var _props$initialState2
|
|
92
|
+
var _props$initialState2;
|
|
93
93
|
const rowGroupingModelToExport = gridRowGroupingModelSelector(apiRef);
|
|
94
94
|
const shouldExportRowGroupingModel =
|
|
95
95
|
// Always export if the `exportOnlyDirtyModels` property is not activated
|
|
@@ -97,7 +97,7 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
97
97
|
// Always export if the model is controlled
|
|
98
98
|
props.rowGroupingModel != null ||
|
|
99
99
|
// Always export if the model has been initialized
|
|
100
|
-
((_props$initialState2 = props.initialState) == null
|
|
100
|
+
((_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.rowGrouping) == null ? void 0 : _props$initialState2.model) != null ||
|
|
101
101
|
// Export if the model is not empty
|
|
102
102
|
Object.keys(rowGroupingModelToExport).length > 0;
|
|
103
103
|
if (!shouldExportRowGroupingModel) {
|
|
@@ -108,7 +108,7 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
108
108
|
model: rowGroupingModelToExport
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
}, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null
|
|
111
|
+
}, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.rowGrouping) == null ? void 0 : _props$initialState3.model]);
|
|
112
112
|
const stateRestorePreProcessing = React.useCallback((params, context) => {
|
|
113
113
|
var _context$stateToResto;
|
|
114
114
|
if (props.disableRowGrouping) {
|
|
@@ -22,9 +22,9 @@ const updateColumnVisibilityModel = (columnVisibilityModel, rowGroupingModel, pr
|
|
|
22
22
|
* Does not work when used with the `hide` property of `GridColDef`
|
|
23
23
|
*/
|
|
24
24
|
export const useKeepGroupedColumnsHidden = props => {
|
|
25
|
-
var _props$rowGroupingMod, _props$initialState
|
|
25
|
+
var _props$rowGroupingMod, _props$initialState;
|
|
26
26
|
const initialProps = React.useRef(props);
|
|
27
|
-
const rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null
|
|
27
|
+
const rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model);
|
|
28
28
|
React.useEffect(() => {
|
|
29
29
|
props.apiRef.current.subscribeEvent('rowGroupingModelChange', newModel => {
|
|
30
30
|
const columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
|
|
@@ -35,7 +35,7 @@ export const useKeepGroupedColumnsHidden = props => {
|
|
|
35
35
|
return React.useMemo(() => {
|
|
36
36
|
var _invariantInitialStat;
|
|
37
37
|
const invariantInitialState = initialProps.current.initialState;
|
|
38
|
-
const columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null
|
|
38
|
+
const columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null || (_invariantInitialStat = invariantInitialState.columns) == null ? void 0 : _invariantInitialStat.columnVisibilityModel, rowGroupingModel.current, undefined);
|
|
39
39
|
return _extends({}, invariantInitialState, {
|
|
40
40
|
columns: _extends({}, invariantInitialState == null ? void 0 : invariantInitialState.columns, {
|
|
41
41
|
columnVisibilityModel
|
package/index.js
CHANGED
|
@@ -4,20 +4,21 @@ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
|
4
4
|
import { GridFooterCell } from './GridFooterCell';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
function GridGroupingColumnFooterCell(props) {
|
|
7
|
-
var rowNode = props.rowNode;
|
|
8
7
|
var rootProps = useGridRootProps();
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var sx = {
|
|
9
|
+
ml: 0
|
|
10
|
+
};
|
|
11
|
+
if (props.rowNode.parent == null) {
|
|
12
|
+
sx.ml = 0;
|
|
12
13
|
} else if (rootProps.rowGroupingColumnMode === 'multiple') {
|
|
13
|
-
|
|
14
|
+
sx.ml = 2;
|
|
14
15
|
} else {
|
|
15
|
-
|
|
16
|
+
sx.ml = function (theme) {
|
|
17
|
+
return "calc(var(--DataGrid-cellOffsetMultiplier) * ".concat(theme.spacing(props.rowNode.depth), ")");
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
20
|
return /*#__PURE__*/_jsx(GridFooterCell, _extends({
|
|
18
|
-
sx:
|
|
19
|
-
ml: marginLeft
|
|
20
|
-
}
|
|
21
|
+
sx: sx
|
|
21
22
|
}, props));
|
|
22
23
|
}
|
|
23
24
|
export { GridGroupingColumnFooterCell };
|
|
@@ -6,10 +6,11 @@ function GridGroupingColumnLeafCell(props) {
|
|
|
6
6
|
var _props$formattedValue;
|
|
7
7
|
var rowNode = props.rowNode;
|
|
8
8
|
var rootProps = useGridRootProps();
|
|
9
|
-
var marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 1 : rowNode.depth * 2;
|
|
10
9
|
return /*#__PURE__*/_jsx(Box, {
|
|
11
10
|
sx: {
|
|
12
|
-
ml:
|
|
11
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 1 : function (theme) {
|
|
12
|
+
return "calc(var(--DataGrid-cellOffsetMultiplier) * ".concat(theme.spacing(rowNode.depth), ")");
|
|
13
|
+
}
|
|
13
14
|
},
|
|
14
15
|
children: (_props$formattedValue = props.formattedValue) != null ? _props$formattedValue : props.value
|
|
15
16
|
});
|
|
@@ -44,7 +44,6 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
44
44
|
apiRef.current.setCellFocus(id, field);
|
|
45
45
|
event.stopPropagation();
|
|
46
46
|
};
|
|
47
|
-
var marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 0 : rowNode.depth * 2;
|
|
48
47
|
var cellContent;
|
|
49
48
|
var colDef = apiRef.current.getColumn(rowNode.groupingField);
|
|
50
49
|
if (typeof colDef.renderCell === 'function') {
|
|
@@ -61,7 +60,9 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
61
60
|
return /*#__PURE__*/_jsxs(Box, {
|
|
62
61
|
className: classes.root,
|
|
63
62
|
sx: {
|
|
64
|
-
ml:
|
|
63
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 0 : function (theme) {
|
|
64
|
+
return "calc(var(--DataGrid-cellOffsetMultiplier) * ".concat(theme.spacing(rowNode.depth), ")");
|
|
65
|
+
}
|
|
65
66
|
},
|
|
66
67
|
children: [/*#__PURE__*/_jsx("div", {
|
|
67
68
|
className: classes.toggle,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
4
|
import { unstable_capitalize as capitalize } from '@mui/utils';
|
|
5
|
+
import { GRID_ID_AUTOGENERATED } from '@mui/x-data-grid/internals';
|
|
4
6
|
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
5
7
|
import { addPinnedRow, isDeepEqual, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
|
|
6
8
|
export var GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
|
|
@@ -116,10 +118,11 @@ export var addFooterRows = function addFooterRows(_ref6) {
|
|
|
116
118
|
var updateRootGroupFooter = function updateRootGroupFooter(groupNode) {
|
|
117
119
|
var shouldHaveFooter = hasAggregationRule && getAggregationPosition(groupNode) === 'footer';
|
|
118
120
|
if (shouldHaveFooter) {
|
|
121
|
+
var rowId = getAggregationFooterRowIdFromGroupId(null);
|
|
119
122
|
newGroupingParams = addPinnedRow({
|
|
120
123
|
groupingParams: newGroupingParams,
|
|
121
|
-
rowModel:
|
|
122
|
-
rowId:
|
|
124
|
+
rowModel: _defineProperty({}, GRID_ID_AUTOGENERATED, rowId),
|
|
125
|
+
rowId: rowId,
|
|
123
126
|
position: 'bottom',
|
|
124
127
|
apiRef: apiRef,
|
|
125
128
|
isAutoGenerated: true
|
|
@@ -5,14 +5,14 @@ import { gridAggregationModelSelector } from './gridAggregationSelectors';
|
|
|
5
5
|
import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from './gridAggregationUtils';
|
|
6
6
|
import { createAggregationLookup } from './createAggregationLookup';
|
|
7
7
|
export var aggregationStateInitializer = function aggregationStateInitializer(state, props, apiRef) {
|
|
8
|
-
var _ref, _props$aggregationMod, _props$initialState
|
|
8
|
+
var _ref, _props$aggregationMod, _props$initialState;
|
|
9
9
|
apiRef.current.caches.aggregation = {
|
|
10
10
|
rulesOnLastColumnHydration: {},
|
|
11
11
|
rulesOnLastRowHydration: {}
|
|
12
12
|
};
|
|
13
13
|
return _extends({}, state, {
|
|
14
14
|
aggregation: {
|
|
15
|
-
model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null
|
|
15
|
+
model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.aggregation) == null ? void 0 : _props$initialState.model) != null ? _ref : {}
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
};
|
|
@@ -145,7 +145,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
|
|
|
145
145
|
apiRef = _ref6.apiRef,
|
|
146
146
|
aggregationRule = _ref6.aggregationRule;
|
|
147
147
|
var getCellAggregationResult = function getCellAggregationResult(id, field) {
|
|
148
|
-
var _rowNode$parent, _gridAggregationLooku
|
|
148
|
+
var _rowNode$parent, _gridAggregationLooku;
|
|
149
149
|
var cellAggregationPosition = null;
|
|
150
150
|
var rowNode = apiRef.current.getRowNode(id);
|
|
151
151
|
if (rowNode.type === 'group') {
|
|
@@ -159,7 +159,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
|
|
|
159
159
|
|
|
160
160
|
// TODO: Add custom root id
|
|
161
161
|
var groupId = cellAggregationPosition === 'inline' ? id : (_rowNode$parent = rowNode.parent) != null ? _rowNode$parent : '';
|
|
162
|
-
var aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null
|
|
162
|
+
var aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null || (_gridAggregationLooku = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku[field];
|
|
163
163
|
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
@@ -136,15 +136,15 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
136
136
|
return params.rowNode.type !== 'pinnedRow';
|
|
137
137
|
}, [apiRef]);
|
|
138
138
|
var handleMouseUp = useEventCallback(function () {
|
|
139
|
-
var _apiRef$current$rootE
|
|
139
|
+
var _apiRef$current$rootE;
|
|
140
140
|
lastMouseDownCell.current = null;
|
|
141
|
-
(_apiRef$current$rootE = apiRef.current.rootElementRef) == null
|
|
141
|
+
(_apiRef$current$rootE = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE.classList.remove(gridClasses['root--disableUserSelection']);
|
|
142
142
|
|
|
143
143
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
144
144
|
stopAutoScroll();
|
|
145
145
|
});
|
|
146
146
|
var handleCellMouseDown = React.useCallback(function (params, event) {
|
|
147
|
-
var _apiRef$current$
|
|
147
|
+
var _apiRef$current$rootE2, _apiRef$current$rootE3;
|
|
148
148
|
// Skip if the click comes from the right-button or, only on macOS, Ctrl is pressed
|
|
149
149
|
// Fix for https://github.com/mui/mui-x/pull/6567#issuecomment-1329155578
|
|
150
150
|
var isMacOs = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
@@ -159,8 +159,8 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
159
159
|
id: params.id,
|
|
160
160
|
field: params.field
|
|
161
161
|
};
|
|
162
|
-
(_apiRef$current$
|
|
163
|
-
var document = ownerDocument((_apiRef$current$
|
|
162
|
+
(_apiRef$current$rootE2 = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE2 = _apiRef$current$rootE2.current) == null ? void 0 : _apiRef$current$rootE2.classList.add(gridClasses['root--disableUserSelection']);
|
|
163
|
+
var document = ownerDocument((_apiRef$current$rootE3 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE3.current);
|
|
164
164
|
document.addEventListener('mouseup', handleMouseUp, {
|
|
165
165
|
once: true
|
|
166
166
|
});
|
|
@@ -178,20 +178,20 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
178
178
|
};
|
|
179
179
|
}, []);
|
|
180
180
|
var startAutoScroll = React.useCallback(function () {
|
|
181
|
-
var _apiRef$current$virtu, _apiRef$current$virtu2
|
|
181
|
+
var _apiRef$current$virtu, _apiRef$current$virtu2;
|
|
182
182
|
if (autoScrollRAF.current) {
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
if (!((_apiRef$current$virtu = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu.current)) {
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
|
-
var virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null
|
|
188
|
+
var virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu2 = _apiRef$current$virtu2.current) == null ? void 0 : _apiRef$current$virtu2.getBoundingClientRect();
|
|
189
189
|
if (!virtualScrollerRect) {
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
function autoScroll() {
|
|
193
|
-
var _apiRef$current$
|
|
194
|
-
if (!mousePosition.current || !((_apiRef$current$
|
|
193
|
+
var _apiRef$current$virtu3;
|
|
194
|
+
if (!mousePosition.current || !((_apiRef$current$virtu3 = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu3.current)) {
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
var _mousePosition$curren = mousePosition.current,
|
|
@@ -221,9 +221,9 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
221
221
|
deltaX = AUTO_SCROLL_SPEED;
|
|
222
222
|
}
|
|
223
223
|
if (deltaX !== 0 || deltaY !== 0) {
|
|
224
|
-
var _apiRef$current$
|
|
225
|
-
scrollLeft = _apiRef$current$
|
|
226
|
-
scrollTop = _apiRef$current$
|
|
224
|
+
var _apiRef$current$virtu4 = apiRef.current.virtualScrollerRef.current,
|
|
225
|
+
scrollLeft = _apiRef$current$virtu4.scrollLeft,
|
|
226
|
+
scrollTop = _apiRef$current$virtu4.scrollTop;
|
|
227
227
|
apiRef.current.scroll({
|
|
228
228
|
top: scrollTop + deltaY * factor,
|
|
229
229
|
left: scrollLeft + deltaX * factor
|
|
@@ -234,7 +234,7 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
234
234
|
autoScroll();
|
|
235
235
|
}, [apiRef]);
|
|
236
236
|
var handleCellMouseOver = React.useCallback(function (params, event) {
|
|
237
|
-
var _apiRef$current$
|
|
237
|
+
var _apiRef$current$virtu5;
|
|
238
238
|
if (!lastMouseDownCell.current) {
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
@@ -244,7 +244,7 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
244
244
|
id: id,
|
|
245
245
|
field: field
|
|
246
246
|
}, event.ctrlKey || event.metaKey);
|
|
247
|
-
var virtualScrollerRect = (_apiRef$current$
|
|
247
|
+
var virtualScrollerRect = (_apiRef$current$virtu5 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu5 = _apiRef$current$virtu5.current) == null ? void 0 : _apiRef$current$virtu5.getBoundingClientRect();
|
|
248
248
|
if (!virtualScrollerRect) {
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
@@ -349,8 +349,8 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
349
349
|
}
|
|
350
350
|
}, [apiRef, props.unstable_cellSelectionModel]);
|
|
351
351
|
React.useEffect(function () {
|
|
352
|
-
var _apiRef$current$
|
|
353
|
-
var rootRef = (_apiRef$current$
|
|
352
|
+
var _apiRef$current$rootE4;
|
|
353
|
+
var rootRef = (_apiRef$current$rootE4 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE4.current;
|
|
354
354
|
return function () {
|
|
355
355
|
stopAutoScroll();
|
|
356
356
|
var document = ownerDocument(rootRef);
|
|
@@ -6,13 +6,13 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
|
6
6
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
|
|
7
7
|
import { getRowGroupingFieldFromGroupingCriteria, ROW_GROUPING_STRATEGY, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from './gridRowGroupingUtils';
|
|
8
8
|
export var rowGroupingStateInitializer = function rowGroupingStateInitializer(state, props, apiRef) {
|
|
9
|
-
var _ref, _props$rowGroupingMod, _props$initialState
|
|
9
|
+
var _ref, _props$rowGroupingMod, _props$initialState;
|
|
10
10
|
apiRef.current.caches.rowGrouping = {
|
|
11
11
|
rulesOnLastRowTreeCreation: []
|
|
12
12
|
};
|
|
13
13
|
return _extends({}, state, {
|
|
14
14
|
rowGrouping: {
|
|
15
|
-
model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null
|
|
15
|
+
model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model) != null ? _ref : []
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
};
|
|
@@ -23,7 +23,7 @@ export var rowGroupingStateInitializer = function rowGroupingStateInitializer(st
|
|
|
23
23
|
* @requires useGridParamsApi (method) - can be after, async only
|
|
24
24
|
*/
|
|
25
25
|
export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
|
|
26
|
-
var _props$initialState3
|
|
26
|
+
var _props$initialState3;
|
|
27
27
|
apiRef.current.registerControlState({
|
|
28
28
|
stateId: 'rowGrouping',
|
|
29
29
|
propModel: props.rowGroupingModel,
|
|
@@ -92,7 +92,7 @@ export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
|
|
|
92
92
|
return columnMenuItems;
|
|
93
93
|
}, [props.disableRowGrouping]);
|
|
94
94
|
var stateExportPreProcessing = React.useCallback(function (prevState, context) {
|
|
95
|
-
var _props$initialState2
|
|
95
|
+
var _props$initialState2;
|
|
96
96
|
var rowGroupingModelToExport = gridRowGroupingModelSelector(apiRef);
|
|
97
97
|
var shouldExportRowGroupingModel =
|
|
98
98
|
// Always export if the `exportOnlyDirtyModels` property is not activated
|
|
@@ -100,7 +100,7 @@ export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
|
|
|
100
100
|
// Always export if the model is controlled
|
|
101
101
|
props.rowGroupingModel != null ||
|
|
102
102
|
// Always export if the model has been initialized
|
|
103
|
-
((_props$initialState2 = props.initialState) == null
|
|
103
|
+
((_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.rowGrouping) == null ? void 0 : _props$initialState2.model) != null ||
|
|
104
104
|
// Export if the model is not empty
|
|
105
105
|
Object.keys(rowGroupingModelToExport).length > 0;
|
|
106
106
|
if (!shouldExportRowGroupingModel) {
|
|
@@ -111,7 +111,7 @@ export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
|
|
|
111
111
|
model: rowGroupingModelToExport
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
}, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null
|
|
114
|
+
}, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.rowGrouping) == null ? void 0 : _props$initialState3.model]);
|
|
115
115
|
var stateRestorePreProcessing = React.useCallback(function (params, context) {
|
|
116
116
|
var _context$stateToResto;
|
|
117
117
|
if (props.disableRowGrouping) {
|
|
@@ -22,9 +22,9 @@ var updateColumnVisibilityModel = function updateColumnVisibilityModel(columnVis
|
|
|
22
22
|
* Does not work when used with the `hide` property of `GridColDef`
|
|
23
23
|
*/
|
|
24
24
|
export var useKeepGroupedColumnsHidden = function useKeepGroupedColumnsHidden(props) {
|
|
25
|
-
var _props$rowGroupingMod, _props$initialState
|
|
25
|
+
var _props$rowGroupingMod, _props$initialState;
|
|
26
26
|
var initialProps = React.useRef(props);
|
|
27
|
-
var rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null
|
|
27
|
+
var rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model);
|
|
28
28
|
React.useEffect(function () {
|
|
29
29
|
props.apiRef.current.subscribeEvent('rowGroupingModelChange', function (newModel) {
|
|
30
30
|
var columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
|
|
@@ -35,7 +35,7 @@ export var useKeepGroupedColumnsHidden = function useKeepGroupedColumnsHidden(pr
|
|
|
35
35
|
return React.useMemo(function () {
|
|
36
36
|
var _invariantInitialStat;
|
|
37
37
|
var invariantInitialState = initialProps.current.initialState;
|
|
38
|
-
var columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null
|
|
38
|
+
var columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null || (_invariantInitialStat = invariantInitialState.columns) == null ? void 0 : _invariantInitialStat.columnVisibilityModel, rowGroupingModel.current, undefined);
|
|
39
39
|
return _extends({}, invariantInitialState, {
|
|
40
40
|
columns: _extends({}, invariantInitialState == null ? void 0 : invariantInitialState.columns, {
|
|
41
41
|
columnVisibilityModel: columnVisibilityModel
|
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 = "MTY5MDQwODgwMDAwMA==";
|
|
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
|
|
@@ -4,22 +4,19 @@ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
|
4
4
|
import { GridFooterCell } from './GridFooterCell';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
function GridGroupingColumnFooterCell(props) {
|
|
7
|
-
const {
|
|
8
|
-
rowNode
|
|
9
|
-
} = props;
|
|
10
7
|
const rootProps = useGridRootProps();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
const sx = {
|
|
9
|
+
ml: 0
|
|
10
|
+
};
|
|
11
|
+
if (props.rowNode.parent == null) {
|
|
12
|
+
sx.ml = 0;
|
|
14
13
|
} else if (rootProps.rowGroupingColumnMode === 'multiple') {
|
|
15
|
-
|
|
14
|
+
sx.ml = 2;
|
|
16
15
|
} else {
|
|
17
|
-
|
|
16
|
+
sx.ml = theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(props.rowNode.depth)})`;
|
|
18
17
|
}
|
|
19
18
|
return /*#__PURE__*/_jsx(GridFooterCell, _extends({
|
|
20
|
-
sx:
|
|
21
|
-
ml: marginLeft
|
|
22
|
-
}
|
|
19
|
+
sx: sx
|
|
23
20
|
}, props));
|
|
24
21
|
}
|
|
25
22
|
export { GridGroupingColumnFooterCell };
|
|
@@ -7,10 +7,9 @@ function GridGroupingColumnLeafCell(props) {
|
|
|
7
7
|
rowNode
|
|
8
8
|
} = props;
|
|
9
9
|
const rootProps = useGridRootProps();
|
|
10
|
-
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 1 : rowNode.depth * 2;
|
|
11
10
|
return /*#__PURE__*/_jsx(Box, {
|
|
12
11
|
sx: {
|
|
13
|
-
ml:
|
|
12
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 1 : theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(rowNode.depth)})`
|
|
14
13
|
},
|
|
15
14
|
children: props.formattedValue ?? props.value
|
|
16
15
|
});
|
|
@@ -47,7 +47,6 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
47
47
|
apiRef.current.setCellFocus(id, field);
|
|
48
48
|
event.stopPropagation();
|
|
49
49
|
};
|
|
50
|
-
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 0 : rowNode.depth * 2;
|
|
51
50
|
let cellContent;
|
|
52
51
|
const colDef = apiRef.current.getColumn(rowNode.groupingField);
|
|
53
52
|
if (typeof colDef.renderCell === 'function') {
|
|
@@ -64,7 +63,7 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
64
63
|
return /*#__PURE__*/_jsxs(Box, {
|
|
65
64
|
className: classes.root,
|
|
66
65
|
sx: {
|
|
67
|
-
ml:
|
|
66
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 0 : theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(rowNode.depth)})`
|
|
68
67
|
},
|
|
69
68
|
children: [/*#__PURE__*/_jsx("div", {
|
|
70
69
|
className: classes.toggle,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { unstable_capitalize as capitalize } from '@mui/utils';
|
|
3
|
+
import { GRID_ID_AUTOGENERATED } from '@mui/x-data-grid/internals';
|
|
3
4
|
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
4
5
|
import { addPinnedRow, isDeepEqual, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
|
|
5
6
|
export const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
|
|
@@ -108,10 +109,13 @@ export const addFooterRows = ({
|
|
|
108
109
|
const updateRootGroupFooter = groupNode => {
|
|
109
110
|
const shouldHaveFooter = hasAggregationRule && getAggregationPosition(groupNode) === 'footer';
|
|
110
111
|
if (shouldHaveFooter) {
|
|
112
|
+
const rowId = getAggregationFooterRowIdFromGroupId(null);
|
|
111
113
|
newGroupingParams = addPinnedRow({
|
|
112
114
|
groupingParams: newGroupingParams,
|
|
113
|
-
rowModel:
|
|
114
|
-
|
|
115
|
+
rowModel: {
|
|
116
|
+
[GRID_ID_AUTOGENERATED]: rowId
|
|
117
|
+
},
|
|
118
|
+
rowId,
|
|
115
119
|
position: 'bottom',
|
|
116
120
|
apiRef,
|
|
117
121
|
isAutoGenerated: true
|
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 = "MTY5MDQwODgwMDAwMA==";
|
|
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
|
|
@@ -13,21 +13,18 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
function GridGroupingColumnFooterCell(props) {
|
|
16
|
-
const {
|
|
17
|
-
rowNode
|
|
18
|
-
} = props;
|
|
19
16
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const sx = {
|
|
18
|
+
ml: 0
|
|
19
|
+
};
|
|
20
|
+
if (props.rowNode.parent == null) {
|
|
21
|
+
sx.ml = 0;
|
|
23
22
|
} else if (rootProps.rowGroupingColumnMode === 'multiple') {
|
|
24
|
-
|
|
23
|
+
sx.ml = 2;
|
|
25
24
|
} else {
|
|
26
|
-
|
|
25
|
+
sx.ml = theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(props.rowNode.depth)})`;
|
|
27
26
|
}
|
|
28
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridFooterCell.GridFooterCell, (0, _extends2.default)({
|
|
29
|
-
sx:
|
|
30
|
-
ml: marginLeft
|
|
31
|
-
}
|
|
28
|
+
sx: sx
|
|
32
29
|
}, props));
|
|
33
30
|
}
|
|
@@ -16,10 +16,9 @@ function GridGroupingColumnLeafCell(props) {
|
|
|
16
16
|
rowNode
|
|
17
17
|
} = props;
|
|
18
18
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
19
|
-
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 1 : rowNode.depth * 2;
|
|
20
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
21
20
|
sx: {
|
|
22
|
-
ml:
|
|
21
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 1 : theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(rowNode.depth)})`
|
|
23
22
|
},
|
|
24
23
|
children: props.formattedValue ?? props.value
|
|
25
24
|
});
|
|
@@ -55,7 +55,6 @@ function GridGroupingCriteriaCell(props) {
|
|
|
55
55
|
apiRef.current.setCellFocus(id, field);
|
|
56
56
|
event.stopPropagation();
|
|
57
57
|
};
|
|
58
|
-
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 0 : rowNode.depth * 2;
|
|
59
58
|
let cellContent;
|
|
60
59
|
const colDef = apiRef.current.getColumn(rowNode.groupingField);
|
|
61
60
|
if (typeof colDef.renderCell === 'function') {
|
|
@@ -72,7 +71,7 @@ function GridGroupingCriteriaCell(props) {
|
|
|
72
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
73
72
|
className: classes.root,
|
|
74
73
|
sx: {
|
|
75
|
-
ml:
|
|
74
|
+
ml: rootProps.rowGroupingColumnMode === 'multiple' ? 0 : theme => `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(rowNode.depth)})`
|
|
76
75
|
},
|
|
77
76
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
77
|
className: classes.toggle,
|
|
@@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.mergeStateWithAggregationModel = exports.getAvailableAggregationFunctions = exports.getAggregationRules = exports.getAggregationFunctionLabel = exports.getAggregationFooterRowIdFromGroupId = exports.canColumnHaveAggregationFunction = exports.areAggregationRulesEqual = exports.addFooterRows = exports.GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _utils = require("@mui/utils");
|
|
10
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
10
11
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
11
|
-
var
|
|
12
|
+
var _internals2 = require("@mui/x-data-grid-pro/internals");
|
|
12
13
|
const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
|
|
13
14
|
exports.GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = GRID_AGGREGATION_ROOT_FOOTER_ROW_ID;
|
|
14
15
|
const getAggregationFooterRowIdFromGroupId = groupId => {
|
|
@@ -93,7 +94,7 @@ const addFooterRows = ({
|
|
|
93
94
|
const footerId = getAggregationFooterRowIdFromGroupId(groupNode.id);
|
|
94
95
|
if (groupNode.footerId !== footerId) {
|
|
95
96
|
if (groupNode.footerId != null) {
|
|
96
|
-
(0,
|
|
97
|
+
(0, _internals2.removeNodeFromTree)({
|
|
97
98
|
node: newGroupingParams.tree[groupNode.footerId],
|
|
98
99
|
tree: newGroupingParams.tree,
|
|
99
100
|
treeDepths: newGroupingParams.treeDepths
|
|
@@ -105,10 +106,10 @@ const addFooterRows = ({
|
|
|
105
106
|
depth: groupNode ? groupNode.depth + 1 : 0,
|
|
106
107
|
type: 'footer'
|
|
107
108
|
};
|
|
108
|
-
(0,
|
|
109
|
+
(0, _internals2.insertNodeInTree)(footerNode, newGroupingParams.tree, newGroupingParams.treeDepths, null);
|
|
109
110
|
}
|
|
110
111
|
} else if (groupNode.footerId != null) {
|
|
111
|
-
(0,
|
|
112
|
+
(0, _internals2.removeNodeFromTree)({
|
|
112
113
|
node: newGroupingParams.tree[groupNode.footerId],
|
|
113
114
|
tree: newGroupingParams.tree,
|
|
114
115
|
treeDepths: newGroupingParams.treeDepths
|
|
@@ -121,10 +122,13 @@ const addFooterRows = ({
|
|
|
121
122
|
const updateRootGroupFooter = groupNode => {
|
|
122
123
|
const shouldHaveFooter = hasAggregationRule && getAggregationPosition(groupNode) === 'footer';
|
|
123
124
|
if (shouldHaveFooter) {
|
|
124
|
-
|
|
125
|
+
const rowId = getAggregationFooterRowIdFromGroupId(null);
|
|
126
|
+
newGroupingParams = (0, _internals2.addPinnedRow)({
|
|
125
127
|
groupingParams: newGroupingParams,
|
|
126
|
-
rowModel:
|
|
127
|
-
|
|
128
|
+
rowModel: {
|
|
129
|
+
[_internals.GRID_ID_AUTOGENERATED]: rowId
|
|
130
|
+
},
|
|
131
|
+
rowId,
|
|
128
132
|
position: 'bottom',
|
|
129
133
|
apiRef,
|
|
130
134
|
isAutoGenerated: true
|
|
@@ -155,7 +159,7 @@ exports.addFooterRows = addFooterRows;
|
|
|
155
159
|
const areAggregationRulesEqual = (previousValue, newValue) => {
|
|
156
160
|
const previousFields = Object.keys(previousValue ?? {});
|
|
157
161
|
const newFields = Object.keys(newValue);
|
|
158
|
-
if (!(0,
|
|
162
|
+
if (!(0, _internals2.isDeepEqual)(previousFields, newFields)) {
|
|
159
163
|
return false;
|
|
160
164
|
}
|
|
161
165
|
return newFields.every(field => {
|
package/node/index.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 = "MTY5MDQwODgwMDAwMA==";
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.2",
|
|
4
4
|
"description": "The Premium plan edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"directory": "packages/grid/x-data-grid-premium"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "^7.22.
|
|
35
|
-
"@mui/utils": "^5.13.
|
|
36
|
-
"@mui/x-data-grid": "6.10.
|
|
37
|
-
"@mui/x-data-grid-pro": "6.10.
|
|
38
|
-
"@mui/x-license-pro": "6.10.
|
|
34
|
+
"@babel/runtime": "^7.22.6",
|
|
35
|
+
"@mui/utils": "^5.13.7",
|
|
36
|
+
"@mui/x-data-grid": "6.10.2",
|
|
37
|
+
"@mui/x-data-grid-pro": "6.10.2",
|
|
38
|
+
"@mui/x-license-pro": "6.10.2",
|
|
39
39
|
"@types/format-util": "^1.0.2",
|
|
40
40
|
"clsx": "^1.2.1",
|
|
41
41
|
"exceljs": "^4.3.0",
|
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 = "MTY5MDQwODgwMDAwMA==";
|
|
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
|