@mui/x-data-grid-premium 6.10.1 → 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 +64 -0
- 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/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/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 +4 -4
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,70 @@
|
|
|
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
|
+
|
|
6
70
|
## 6.10.1
|
|
7
71
|
|
|
8
72
|
_Jul 20, 2023_
|
|
@@ -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
|
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
|
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",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.22.6",
|
|
35
35
|
"@mui/utils": "^5.13.7",
|
|
36
|
-
"@mui/x-data-grid": "6.10.
|
|
37
|
-
"@mui/x-data-grid-pro": "6.10.
|
|
38
|
-
"@mui/x-license-pro": "6.10.
|
|
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
|