@mui/x-data-grid-premium 8.0.0-alpha.4 → 8.0.0-alpha.5
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 +103 -0
- package/DataGridPremium/DataGridPremium.js +3 -7
- package/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/components/GridColumnMenuAggregationItem.js +37 -42
- package/components/GridColumnMenuRowGroupItem.js +5 -11
- package/components/GridColumnMenuRowUngroupItem.js +10 -19
- package/esm/DataGridPremium/DataGridPremium.js +3 -7
- package/esm/DataGridPremium/useDataGridPremiumProps.js +3 -3
- package/esm/components/GridColumnMenuAggregationItem.js +37 -42
- package/esm/components/GridColumnMenuRowGroupItem.js +6 -11
- package/esm/components/GridColumnMenuRowUngroupItem.js +11 -19
- package/esm/utils/releaseInfo.js +1 -1
- package/index.js +1 -1
- package/modern/DataGridPremium/DataGridPremium.js +3 -7
- package/modern/DataGridPremium/useDataGridPremiumProps.js +3 -3
- package/modern/components/GridColumnMenuAggregationItem.js +37 -42
- package/modern/components/GridColumnMenuRowGroupItem.js +6 -11
- package/modern/components/GridColumnMenuRowUngroupItem.js +11 -19
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +5 -5
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,108 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.5
|
|
9
|
+
|
|
10
|
+
_Dec 19, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🌍 Improve Korean (ko-KR) locale on the Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
18
|
+
@good-jinu, @k-rajat19.
|
|
19
|
+
Following are all team members who have contributed to this release:
|
|
20
|
+
@alexfauquette, @cherniavskii, @flaviendelangle, @KenanYusuf, @LukasTy, @MBilalShafi, @romgrk.
|
|
21
|
+
|
|
22
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
|
|
29
|
+
|
|
30
|
+
- For `.root` element, use `slotProps.root`.
|
|
31
|
+
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.
|
|
32
|
+
|
|
33
|
+
- `detailPanelExpandedRowIds` and `onDetailPanelExpandedRowIdsChange` props use a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array:
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
-detailPanelExpandedRowIds?: GridRowId[];
|
|
37
|
+
+detailPanelExpandedRowIds?: Set<GridRowId>;
|
|
38
|
+
|
|
39
|
+
-onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
|
|
40
|
+
+onDetailPanelExpandedRowIdsChange?: (ids: Set<GridRowId>, details: GridCallbackDetails) => void;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- `apiRef.current.getExpandedDetailPanels` and `apiRef.current.setExpandedDetailPanels` methods receive and return a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
|
|
44
|
+
- `gridDetailPanelExpandedRowIdsSelector` returns a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
|
|
45
|
+
- `gridDetailPanelExpandedRowsHeightCacheSelector` was removed.
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-data-grid@8.0.0-alpha.5`
|
|
48
|
+
|
|
49
|
+
- [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15915) @k-rajat19
|
|
50
|
+
- [DataGrid] Fix autosizing with virtualized columns (#15116) @k-rajat19
|
|
51
|
+
- [DataGrid] Move `<Badge />` to leaf import (#15879) @romgrk
|
|
52
|
+
- [DataGrid] Move `<ListItemText />` and `<ListItemIcon />` to leaf import (#15869) @romgrk
|
|
53
|
+
- [DataGrid] Remove the Joy UI demo (#15913) @romgrk
|
|
54
|
+
- [DataGrid] Update quick filter input variant (#15909) @KenanYusuf
|
|
55
|
+
- [DataGrid] Use `slotProps` to forward props to `.main` and `.root` elements (#15870) @MBilalShafi
|
|
56
|
+
- [l10n] Improve Korean(ko-KR) locale (#15878) @good-jinu
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
|
+
|
|
60
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.5`, plus:
|
|
61
|
+
|
|
62
|
+
- [DataGridPro] Use `Set` for `detailPanelExpandedRowIds` (#15835) @cherniavskii
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.5`.
|
|
67
|
+
|
|
68
|
+
### Date and Time Pickers
|
|
69
|
+
|
|
70
|
+
#### Breaking changes
|
|
71
|
+
|
|
72
|
+
- The `<PickersMonth />` component has been moved inside the Month Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#month-calendar).
|
|
73
|
+
|
|
74
|
+
- The `<PickersYear />` component has been moved inside the Year Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#year-calendar).
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.5`
|
|
77
|
+
|
|
78
|
+
- [pickers] Add verification to disable skipped hours in spring forward DST (#15849) @flaviendelangle
|
|
79
|
+
- [pickers] Remove `PickersMonth` and `PickersYear` from the theme and remove the `div` wrapping each button (#15806) @flaviendelangle
|
|
80
|
+
- [pickers] Use the new `ownerState` object on the `<PickersTextField />` component (#15863) @flaviendelangle
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
83
|
+
|
|
84
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.5`.
|
|
85
|
+
|
|
86
|
+
### Charts
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-charts@8.0.0-alpha.5`
|
|
89
|
+
|
|
90
|
+
- [charts] Fix `<ScatterChart />` value type if `null` (#15917) @alexfauquette
|
|
91
|
+
|
|
92
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
93
|
+
|
|
94
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.5`.
|
|
95
|
+
|
|
96
|
+
### Tree View
|
|
97
|
+
|
|
98
|
+
#### `@mui/x-tree-view@8.0.0-alpha.5`
|
|
99
|
+
|
|
100
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.4`.
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
103
|
+
|
|
104
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.5`.
|
|
105
|
+
|
|
106
|
+
### Core
|
|
107
|
+
|
|
108
|
+
- [code-infra] Remove `@mui/material-nextjs` dependency (#15925) @LukasTy
|
|
109
|
+
|
|
8
110
|
## 8.0.0-alpha.4
|
|
9
111
|
|
|
10
112
|
_Dec 13, 2024_
|
|
@@ -39,6 +141,7 @@ Following are all team members who have contributed to this release:
|
|
|
39
141
|
-const output = useGridSelector(apiRef, selector, equals)
|
|
40
142
|
+const output = useGridSelector(apiRef, selector, arguments, equals)
|
|
41
143
|
```
|
|
144
|
+
|
|
42
145
|
- The default variant for text fields and selects in the filter panel has been changed to `outlined`.
|
|
43
146
|
- The "row spanning" feature is now stable.
|
|
44
147
|
```diff
|
|
@@ -46,7 +46,7 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
46
46
|
style: props.style,
|
|
47
47
|
sx: props.sx,
|
|
48
48
|
ref: ref
|
|
49
|
-
}, props.
|
|
49
|
+
}, props.slotProps?.root, {
|
|
50
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridHeader, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridBody, {
|
|
51
51
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
52
52
|
packageName: "x-data-grid-premium",
|
|
@@ -116,6 +116,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
116
116
|
*/
|
|
117
117
|
autosizeOptions: _propTypes.default.shape({
|
|
118
118
|
columns: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
119
|
+
disableColumnVirtualization: _propTypes.default.bool,
|
|
119
120
|
expand: _propTypes.default.bool,
|
|
120
121
|
includeHeaders: _propTypes.default.bool,
|
|
121
122
|
includeOutliers: _propTypes.default.bool,
|
|
@@ -193,7 +194,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
193
194
|
/**
|
|
194
195
|
* The row ids to show the detail panel.
|
|
195
196
|
*/
|
|
196
|
-
detailPanelExpandedRowIds: _propTypes.default
|
|
197
|
+
detailPanelExpandedRowIds: _propTypes.default /* @typescript-to-proptypes-ignore */.instanceOf(Set),
|
|
197
198
|
/**
|
|
198
199
|
* If `true`, aggregation is disabled.
|
|
199
200
|
* @default false
|
|
@@ -339,11 +340,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
339
340
|
quickFilterLogicOperator: _propTypes.default.oneOf(['and', 'or']),
|
|
340
341
|
quickFilterValues: _propTypes.default.array
|
|
341
342
|
}),
|
|
342
|
-
/**
|
|
343
|
-
* Forwarded props for the Data Grid root element.
|
|
344
|
-
* @ignore - do not document.
|
|
345
|
-
*/
|
|
346
|
-
forwardedProps: _propTypes.default.object,
|
|
347
343
|
/**
|
|
348
344
|
* Determines the position of an aggregated value.
|
|
349
345
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -42,12 +42,12 @@ const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PREMIUM_PROPS_D
|
|
|
42
42
|
});
|
|
43
43
|
const defaultSlots = _dataGridPremiumDefaultSlotsComponents.DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
|
|
44
44
|
const useDataGridPremiumProps = inProps => {
|
|
45
|
-
const themedProps =
|
|
45
|
+
const themedProps =
|
|
46
46
|
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
47
47
|
(0, _styles.useThemeProps)({
|
|
48
48
|
props: inProps,
|
|
49
49
|
name: 'MuiDataGrid'
|
|
50
|
-
})
|
|
50
|
+
});
|
|
51
51
|
const localeText = React.useMemo(() => (0, _extends2.default)({}, _xDataGridPro.GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
52
52
|
const slots = React.useMemo(() => (0, _internals.computeSlots)({
|
|
53
53
|
defaultSlots,
|
|
@@ -12,8 +12,6 @@ var _toPropertyKey2 = _interopRequireDefault(require("@babel/runtime/helpers/toP
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
15
|
-
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
16
|
-
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
17
15
|
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
18
16
|
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
19
17
|
var _utils = require("@mui/utils");
|
|
@@ -60,47 +58,44 @@ function GridColumnMenuAggregationItem(props) {
|
|
|
60
58
|
apiRef.current.hideColumnMenu();
|
|
61
59
|
};
|
|
62
60
|
const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
|
|
63
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
62
|
+
inert: true,
|
|
63
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuAggregationIcon, {
|
|
64
|
+
fontSize: "small"
|
|
65
|
+
}),
|
|
66
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
|
|
67
|
+
size: "small",
|
|
68
|
+
fullWidth: true,
|
|
69
|
+
sx: {
|
|
70
|
+
minWidth: 150
|
|
71
|
+
},
|
|
72
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
|
|
73
|
+
id: `${id}-label`,
|
|
74
|
+
children: label
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseSelect, {
|
|
76
|
+
labelId: `${id}-label`,
|
|
77
|
+
id: `${id}-input`,
|
|
78
|
+
value: selectedAggregationRule,
|
|
79
|
+
label: label,
|
|
80
|
+
color: "primary",
|
|
81
|
+
onChange: handleAggregationItemChange,
|
|
82
|
+
onBlur: event => event.stopPropagation(),
|
|
72
83
|
fullWidth: true,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
children:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
89
|
-
value: "",
|
|
90
|
-
children: "..."
|
|
91
|
-
}), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
92
|
-
value: aggFunc,
|
|
93
|
-
children: (0, _gridAggregationUtils.getAggregationFunctionLabel)({
|
|
94
|
-
apiRef,
|
|
95
|
-
aggregationRule: {
|
|
96
|
-
aggregationFunctionName: aggFunc,
|
|
97
|
-
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
}, aggFunc))]
|
|
101
|
-
})]
|
|
102
|
-
})
|
|
103
|
-
})]
|
|
84
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
85
|
+
value: "",
|
|
86
|
+
children: "..."
|
|
87
|
+
}), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
88
|
+
value: aggFunc,
|
|
89
|
+
children: (0, _gridAggregationUtils.getAggregationFunctionLabel)({
|
|
90
|
+
apiRef,
|
|
91
|
+
aggregationRule: {
|
|
92
|
+
aggregationFunctionName: aggFunc,
|
|
93
|
+
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}, aggFunc))]
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
104
99
|
});
|
|
105
100
|
}
|
|
106
101
|
process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.GridColumnMenuRowGroupItem = GridColumnMenuRowGroupItem;
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
11
|
-
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
12
9
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
13
10
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
14
11
|
var _gridRowGroupingSelector = require("../hooks/features/rowGrouping/gridRowGroupingSelector");
|
|
@@ -31,16 +28,13 @@ function GridColumnMenuRowGroupItem(props) {
|
|
|
31
28
|
};
|
|
32
29
|
const groupedColumn = columnsLookup[field];
|
|
33
30
|
const name = groupedColumn.headerName ?? field;
|
|
34
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
35
32
|
onClick: ungroupColumn,
|
|
36
33
|
disabled: !groupedColumn.groupable,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
|
|
42
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
43
|
-
})]
|
|
34
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
|
|
35
|
+
fontSize: "small"
|
|
36
|
+
}),
|
|
37
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
44
38
|
}, field);
|
|
45
39
|
};
|
|
46
40
|
if (!colDef || !(0, _gridRowGroupingUtils.isGroupingColumn)(colDef.field)) {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.GridColumnMenuRowUngroupItem = GridColumnMenuRowUngroupItem;
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
11
|
-
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
12
9
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
13
10
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
14
11
|
var _gridRowGroupingSelector = require("../hooks/features/rowGrouping/gridRowGroupingSelector");
|
|
@@ -36,25 +33,19 @@ function GridColumnMenuRowUngroupItem(props) {
|
|
|
36
33
|
};
|
|
37
34
|
const name = columnsLookup[colDef.field].headerName ?? colDef.field;
|
|
38
35
|
if (rowGroupingModel.includes(colDef.field)) {
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
40
37
|
onClick: ungroupColumn,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
|
|
46
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
47
|
-
})]
|
|
38
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
|
|
39
|
+
fontSize: "small"
|
|
40
|
+
}),
|
|
41
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
48
42
|
});
|
|
49
43
|
}
|
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
51
45
|
onClick: groupColumn,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
|
|
57
|
-
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
58
|
-
})]
|
|
46
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuGroupIcon, {
|
|
47
|
+
fontSize: "small"
|
|
48
|
+
}),
|
|
49
|
+
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
59
50
|
});
|
|
60
51
|
}
|
|
@@ -39,7 +39,7 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
39
39
|
style: props.style,
|
|
40
40
|
sx: props.sx,
|
|
41
41
|
ref: ref
|
|
42
|
-
}, props.
|
|
42
|
+
}, props.slotProps?.root, {
|
|
43
43
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
|
|
44
44
|
children: /*#__PURE__*/_jsx(Watermark, {
|
|
45
45
|
packageName: "x-data-grid-premium",
|
|
@@ -109,6 +109,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
109
109
|
*/
|
|
110
110
|
autosizeOptions: PropTypes.shape({
|
|
111
111
|
columns: PropTypes.arrayOf(PropTypes.string),
|
|
112
|
+
disableColumnVirtualization: PropTypes.bool,
|
|
112
113
|
expand: PropTypes.bool,
|
|
113
114
|
includeHeaders: PropTypes.bool,
|
|
114
115
|
includeOutliers: PropTypes.bool,
|
|
@@ -186,7 +187,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
186
187
|
/**
|
|
187
188
|
* The row ids to show the detail panel.
|
|
188
189
|
*/
|
|
189
|
-
detailPanelExpandedRowIds: PropTypes
|
|
190
|
+
detailPanelExpandedRowIds: PropTypes /* @typescript-to-proptypes-ignore */.instanceOf(Set),
|
|
190
191
|
/**
|
|
191
192
|
* If `true`, aggregation is disabled.
|
|
192
193
|
* @default false
|
|
@@ -332,11 +333,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
332
333
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
333
334
|
quickFilterValues: PropTypes.array
|
|
334
335
|
}),
|
|
335
|
-
/**
|
|
336
|
-
* Forwarded props for the Data Grid root element.
|
|
337
|
-
* @ignore - do not document.
|
|
338
|
-
*/
|
|
339
|
-
forwardedProps: PropTypes.object,
|
|
340
336
|
/**
|
|
341
337
|
* Determines the position of an aggregated value.
|
|
342
338
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
4
|
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, GridSignature } from '@mui/x-data-grid-pro';
|
|
5
|
-
import { computeSlots
|
|
5
|
+
import { computeSlots } from '@mui/x-data-grid-pro/internals';
|
|
6
6
|
import { GRID_AGGREGATION_FUNCTIONS } from "../hooks/features/aggregation/index.js";
|
|
7
7
|
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridPremiumDefaultSlotsComponents.js";
|
|
8
8
|
const getDataGridPremiumForcedProps = themedProps => _extends({
|
|
@@ -34,12 +34,12 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
34
34
|
});
|
|
35
35
|
const defaultSlots = DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
|
|
36
36
|
export const useDataGridPremiumProps = inProps => {
|
|
37
|
-
const themedProps =
|
|
37
|
+
const themedProps =
|
|
38
38
|
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
39
39
|
useThemeProps({
|
|
40
40
|
props: inProps,
|
|
41
41
|
name: 'MuiDataGrid'
|
|
42
|
-
})
|
|
42
|
+
});
|
|
43
43
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
44
44
|
const slots = React.useMemo(() => computeSlots({
|
|
45
45
|
defaultSlots,
|
|
@@ -4,8 +4,6 @@ import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
7
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
8
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
9
7
|
import FormControl from '@mui/material/FormControl';
|
|
10
8
|
import InputLabel from '@mui/material/InputLabel';
|
|
11
9
|
import { unstable_useId as useId } from '@mui/utils';
|
|
@@ -52,47 +50,44 @@ function GridColumnMenuAggregationItem(props) {
|
|
|
52
50
|
apiRef.current.hideColumnMenu();
|
|
53
51
|
};
|
|
54
52
|
const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
|
|
55
|
-
return /*#__PURE__*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
54
|
+
inert: true,
|
|
55
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuAggregationIcon, {
|
|
56
|
+
fontSize: "small"
|
|
57
|
+
}),
|
|
58
|
+
children: /*#__PURE__*/_jsxs(FormControl, {
|
|
59
|
+
size: "small",
|
|
60
|
+
fullWidth: true,
|
|
61
|
+
sx: {
|
|
62
|
+
minWidth: 150
|
|
63
|
+
},
|
|
64
|
+
children: [/*#__PURE__*/_jsx(InputLabel, {
|
|
65
|
+
id: `${id}-label`,
|
|
66
|
+
children: label
|
|
67
|
+
}), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, {
|
|
68
|
+
labelId: `${id}-label`,
|
|
69
|
+
id: `${id}-input`,
|
|
70
|
+
value: selectedAggregationRule,
|
|
71
|
+
label: label,
|
|
72
|
+
color: "primary",
|
|
73
|
+
onChange: handleAggregationItemChange,
|
|
74
|
+
onBlur: event => event.stopPropagation(),
|
|
64
75
|
fullWidth: true,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
children:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
children: [/*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
81
|
-
value: "",
|
|
82
|
-
children: "..."
|
|
83
|
-
}), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
84
|
-
value: aggFunc,
|
|
85
|
-
children: getAggregationFunctionLabel({
|
|
86
|
-
apiRef,
|
|
87
|
-
aggregationRule: {
|
|
88
|
-
aggregationFunctionName: aggFunc,
|
|
89
|
-
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
90
|
-
}
|
|
91
|
-
})
|
|
92
|
-
}, aggFunc))]
|
|
93
|
-
})]
|
|
94
|
-
})
|
|
95
|
-
})]
|
|
76
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
77
|
+
value: "",
|
|
78
|
+
children: "..."
|
|
79
|
+
}), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
80
|
+
value: aggFunc,
|
|
81
|
+
children: getAggregationFunctionLabel({
|
|
82
|
+
apiRef,
|
|
83
|
+
aggregationRule: {
|
|
84
|
+
aggregationFunctionName: aggFunc,
|
|
85
|
+
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
}, aggFunc))]
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
96
91
|
});
|
|
97
92
|
}
|
|
98
93
|
process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
3
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
4
2
|
import { useGridSelector, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
5
3
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
6
4
|
import { gridRowGroupingSanitizedModelSelector } from "../hooks/features/rowGrouping/gridRowGroupingSelector.js";
|
|
7
5
|
import { getRowGroupingCriteriaFromGroupingField, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, isGroupingColumn } from "../hooks/features/rowGrouping/gridRowGroupingUtils.js";
|
|
8
6
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
|
-
import { jsx as _jsx
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
8
|
export function GridColumnMenuRowGroupItem(props) {
|
|
11
9
|
const {
|
|
12
10
|
colDef,
|
|
@@ -23,16 +21,13 @@ export function GridColumnMenuRowGroupItem(props) {
|
|
|
23
21
|
};
|
|
24
22
|
const groupedColumn = columnsLookup[field];
|
|
25
23
|
const name = groupedColumn.headerName ?? field;
|
|
26
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
27
25
|
onClick: ungroupColumn,
|
|
28
26
|
disabled: !groupedColumn.groupable,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
34
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
35
|
-
})]
|
|
27
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuUngroupIcon, {
|
|
28
|
+
fontSize: "small"
|
|
29
|
+
}),
|
|
30
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
36
31
|
}, field);
|
|
37
32
|
};
|
|
38
33
|
if (!colDef || !isGroupingColumn(colDef.field)) {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
3
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
4
2
|
import { gridColumnLookupSelector, useGridSelector } from '@mui/x-data-grid-pro';
|
|
5
3
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
6
4
|
import { gridRowGroupingSanitizedModelSelector } from "../hooks/features/rowGrouping/gridRowGroupingSelector.js";
|
|
7
5
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
8
|
-
import { jsx as _jsx
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
7
|
export function GridColumnMenuRowUngroupItem(props) {
|
|
10
8
|
const {
|
|
11
9
|
colDef,
|
|
@@ -28,25 +26,19 @@ export function GridColumnMenuRowUngroupItem(props) {
|
|
|
28
26
|
};
|
|
29
27
|
const name = columnsLookup[colDef.field].headerName ?? colDef.field;
|
|
30
28
|
if (rowGroupingModel.includes(colDef.field)) {
|
|
31
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
32
30
|
onClick: ungroupColumn,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
38
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
39
|
-
})]
|
|
31
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuUngroupIcon, {
|
|
32
|
+
fontSize: "small"
|
|
33
|
+
}),
|
|
34
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
40
35
|
});
|
|
41
36
|
}
|
|
42
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
43
38
|
onClick: groupColumn,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
49
|
-
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
50
|
-
})]
|
|
39
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuGroupIcon, {
|
|
40
|
+
fontSize: "small"
|
|
41
|
+
}),
|
|
42
|
+
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
51
43
|
});
|
|
52
44
|
}
|
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 = "MTczNDU2NjQwMDAwMA==";
|
|
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/index.js
CHANGED
|
@@ -39,7 +39,7 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
39
39
|
style: props.style,
|
|
40
40
|
sx: props.sx,
|
|
41
41
|
ref: ref
|
|
42
|
-
}, props.
|
|
42
|
+
}, props.slotProps?.root, {
|
|
43
43
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
|
|
44
44
|
children: /*#__PURE__*/_jsx(Watermark, {
|
|
45
45
|
packageName: "x-data-grid-premium",
|
|
@@ -109,6 +109,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
109
109
|
*/
|
|
110
110
|
autosizeOptions: PropTypes.shape({
|
|
111
111
|
columns: PropTypes.arrayOf(PropTypes.string),
|
|
112
|
+
disableColumnVirtualization: PropTypes.bool,
|
|
112
113
|
expand: PropTypes.bool,
|
|
113
114
|
includeHeaders: PropTypes.bool,
|
|
114
115
|
includeOutliers: PropTypes.bool,
|
|
@@ -186,7 +187,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
186
187
|
/**
|
|
187
188
|
* The row ids to show the detail panel.
|
|
188
189
|
*/
|
|
189
|
-
detailPanelExpandedRowIds: PropTypes
|
|
190
|
+
detailPanelExpandedRowIds: PropTypes /* @typescript-to-proptypes-ignore */.instanceOf(Set),
|
|
190
191
|
/**
|
|
191
192
|
* If `true`, aggregation is disabled.
|
|
192
193
|
* @default false
|
|
@@ -332,11 +333,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
332
333
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
333
334
|
quickFilterValues: PropTypes.array
|
|
334
335
|
}),
|
|
335
|
-
/**
|
|
336
|
-
* Forwarded props for the Data Grid root element.
|
|
337
|
-
* @ignore - do not document.
|
|
338
|
-
*/
|
|
339
|
-
forwardedProps: PropTypes.object,
|
|
340
336
|
/**
|
|
341
337
|
* Determines the position of an aggregated value.
|
|
342
338
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
4
|
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, GridSignature } from '@mui/x-data-grid-pro';
|
|
5
|
-
import { computeSlots
|
|
5
|
+
import { computeSlots } from '@mui/x-data-grid-pro/internals';
|
|
6
6
|
import { GRID_AGGREGATION_FUNCTIONS } from "../hooks/features/aggregation/index.js";
|
|
7
7
|
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridPremiumDefaultSlotsComponents.js";
|
|
8
8
|
const getDataGridPremiumForcedProps = themedProps => _extends({
|
|
@@ -34,12 +34,12 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
34
34
|
});
|
|
35
35
|
const defaultSlots = DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
|
|
36
36
|
export const useDataGridPremiumProps = inProps => {
|
|
37
|
-
const themedProps =
|
|
37
|
+
const themedProps =
|
|
38
38
|
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
39
39
|
useThemeProps({
|
|
40
40
|
props: inProps,
|
|
41
41
|
name: 'MuiDataGrid'
|
|
42
|
-
})
|
|
42
|
+
});
|
|
43
43
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
44
44
|
const slots = React.useMemo(() => computeSlots({
|
|
45
45
|
defaultSlots,
|
|
@@ -4,8 +4,6 @@ import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
7
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
8
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
9
7
|
import FormControl from '@mui/material/FormControl';
|
|
10
8
|
import InputLabel from '@mui/material/InputLabel';
|
|
11
9
|
import { unstable_useId as useId } from '@mui/utils';
|
|
@@ -52,47 +50,44 @@ function GridColumnMenuAggregationItem(props) {
|
|
|
52
50
|
apiRef.current.hideColumnMenu();
|
|
53
51
|
};
|
|
54
52
|
const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
|
|
55
|
-
return /*#__PURE__*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
54
|
+
inert: true,
|
|
55
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuAggregationIcon, {
|
|
56
|
+
fontSize: "small"
|
|
57
|
+
}),
|
|
58
|
+
children: /*#__PURE__*/_jsxs(FormControl, {
|
|
59
|
+
size: "small",
|
|
60
|
+
fullWidth: true,
|
|
61
|
+
sx: {
|
|
62
|
+
minWidth: 150
|
|
63
|
+
},
|
|
64
|
+
children: [/*#__PURE__*/_jsx(InputLabel, {
|
|
65
|
+
id: `${id}-label`,
|
|
66
|
+
children: label
|
|
67
|
+
}), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, {
|
|
68
|
+
labelId: `${id}-label`,
|
|
69
|
+
id: `${id}-input`,
|
|
70
|
+
value: selectedAggregationRule,
|
|
71
|
+
label: label,
|
|
72
|
+
color: "primary",
|
|
73
|
+
onChange: handleAggregationItemChange,
|
|
74
|
+
onBlur: event => event.stopPropagation(),
|
|
64
75
|
fullWidth: true,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
children:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
children: [/*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
81
|
-
value: "",
|
|
82
|
-
children: "..."
|
|
83
|
-
}), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
84
|
-
value: aggFunc,
|
|
85
|
-
children: getAggregationFunctionLabel({
|
|
86
|
-
apiRef,
|
|
87
|
-
aggregationRule: {
|
|
88
|
-
aggregationFunctionName: aggFunc,
|
|
89
|
-
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
90
|
-
}
|
|
91
|
-
})
|
|
92
|
-
}, aggFunc))]
|
|
93
|
-
})]
|
|
94
|
-
})
|
|
95
|
-
})]
|
|
76
|
+
children: [/*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
77
|
+
value: "",
|
|
78
|
+
children: "..."
|
|
79
|
+
}), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
80
|
+
value: aggFunc,
|
|
81
|
+
children: getAggregationFunctionLabel({
|
|
82
|
+
apiRef,
|
|
83
|
+
aggregationRule: {
|
|
84
|
+
aggregationFunctionName: aggFunc,
|
|
85
|
+
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
}, aggFunc))]
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
96
91
|
});
|
|
97
92
|
}
|
|
98
93
|
process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
3
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
4
2
|
import { useGridSelector, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
5
3
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
6
4
|
import { gridRowGroupingSanitizedModelSelector } from "../hooks/features/rowGrouping/gridRowGroupingSelector.js";
|
|
7
5
|
import { getRowGroupingCriteriaFromGroupingField, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, isGroupingColumn } from "../hooks/features/rowGrouping/gridRowGroupingUtils.js";
|
|
8
6
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
|
-
import { jsx as _jsx
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
8
|
export function GridColumnMenuRowGroupItem(props) {
|
|
11
9
|
const {
|
|
12
10
|
colDef,
|
|
@@ -23,16 +21,13 @@ export function GridColumnMenuRowGroupItem(props) {
|
|
|
23
21
|
};
|
|
24
22
|
const groupedColumn = columnsLookup[field];
|
|
25
23
|
const name = groupedColumn.headerName ?? field;
|
|
26
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
27
25
|
onClick: ungroupColumn,
|
|
28
26
|
disabled: !groupedColumn.groupable,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
34
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
35
|
-
})]
|
|
27
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuUngroupIcon, {
|
|
28
|
+
fontSize: "small"
|
|
29
|
+
}),
|
|
30
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
36
31
|
}, field);
|
|
37
32
|
};
|
|
38
33
|
if (!colDef || !isGroupingColumn(colDef.field)) {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
3
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
4
2
|
import { gridColumnLookupSelector, useGridSelector } from '@mui/x-data-grid-pro';
|
|
5
3
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
6
4
|
import { gridRowGroupingSanitizedModelSelector } from "../hooks/features/rowGrouping/gridRowGroupingSelector.js";
|
|
7
5
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
8
|
-
import { jsx as _jsx
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
7
|
export function GridColumnMenuRowUngroupItem(props) {
|
|
10
8
|
const {
|
|
11
9
|
colDef,
|
|
@@ -28,25 +26,19 @@ export function GridColumnMenuRowUngroupItem(props) {
|
|
|
28
26
|
};
|
|
29
27
|
const name = columnsLookup[colDef.field].headerName ?? colDef.field;
|
|
30
28
|
if (rowGroupingModel.includes(colDef.field)) {
|
|
31
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
32
30
|
onClick: ungroupColumn,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
38
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
39
|
-
})]
|
|
31
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuUngroupIcon, {
|
|
32
|
+
fontSize: "small"
|
|
33
|
+
}),
|
|
34
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
40
35
|
});
|
|
41
36
|
}
|
|
42
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
43
38
|
onClick: groupColumn,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
|
49
|
-
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
50
|
-
})]
|
|
39
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuGroupIcon, {
|
|
40
|
+
fontSize: "small"
|
|
41
|
+
}),
|
|
42
|
+
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
51
43
|
});
|
|
52
44
|
}
|
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 = "MTczNDU2NjQwMDAwMA==";
|
|
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": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.5",
|
|
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
|
|
44
|
-
"@mui/x-data-grid": "8.0.0-alpha.
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
43
|
+
"@mui/x-data-grid": "8.0.0-alpha.5",
|
|
44
|
+
"@mui/x-data-grid-pro": "8.0.0-alpha.5",
|
|
45
|
+
"@mui/x-internals": "8.0.0-alpha.5",
|
|
46
|
+
"@mui/x-license": "8.0.0-alpha.5"
|
|
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 = "MTczNDU2NjQwMDAwMA==";
|
|
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
|