@mui/x-data-grid-premium 8.0.0-alpha.4 → 8.0.0-alpha.6

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +182 -0
  2. package/DataGridPremium/DataGridPremium.js +7 -10
  3. package/DataGridPremium/useDataGridPremiumProps.js +2 -2
  4. package/components/GridColumnMenuAggregationItem.js +37 -42
  5. package/components/GridColumnMenuRowGroupItem.js +5 -11
  6. package/components/GridColumnMenuRowUngroupItem.js +10 -19
  7. package/components/GridDataSourceGroupingCriteriaCell.js +1 -2
  8. package/components/GridPremiumColumnMenu.d.ts +1 -1
  9. package/components/GridPremiumColumnMenu.js +5 -5
  10. package/esm/DataGridPremium/DataGridPremium.js +7 -10
  11. package/esm/DataGridPremium/useDataGridPremiumProps.js +3 -3
  12. package/esm/components/GridColumnMenuAggregationItem.js +37 -42
  13. package/esm/components/GridColumnMenuRowGroupItem.js +6 -11
  14. package/esm/components/GridColumnMenuRowUngroupItem.js +11 -19
  15. package/esm/components/GridDataSourceGroupingCriteriaCell.js +1 -2
  16. package/esm/components/GridPremiumColumnMenu.js +5 -5
  17. package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +9 -4
  18. package/esm/utils/releaseInfo.js +1 -1
  19. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +9 -4
  20. package/index.js +1 -1
  21. package/modern/DataGridPremium/DataGridPremium.js +7 -10
  22. package/modern/DataGridPremium/useDataGridPremiumProps.js +3 -3
  23. package/modern/components/GridColumnMenuAggregationItem.js +37 -42
  24. package/modern/components/GridColumnMenuRowGroupItem.js +6 -11
  25. package/modern/components/GridColumnMenuRowUngroupItem.js +11 -19
  26. package/modern/components/GridDataSourceGroupingCriteriaCell.js +1 -2
  27. package/modern/components/GridPremiumColumnMenu.js +5 -5
  28. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +9 -4
  29. package/modern/index.js +1 -1
  30. package/modern/utils/releaseInfo.js +1 -1
  31. package/package.json +5 -5
  32. package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,187 @@
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.6
9
+
10
+ _Dec 26, 2024_
11
+
12
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🏎️ Improve Data Grid scrolling performance
15
+ - 🌍 Improve Dutch (nl-NL) locale on the Data Grid
16
+ - 🐞 Bugfixes
17
+
18
+ Special thanks go out to the community contributors who have helped make this release possible:
19
+ @JoepVerkoelen, @k-rajat19, @lauri865.
20
+ Following are all team members who have contributed to this release:
21
+ @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @romgrk.
22
+
23
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
24
+
25
+ ### Data Grid
26
+
27
+ #### Breaking changes
28
+
29
+ - The `sanitizeFilterItemValue()` utility is not exported anymore.
30
+
31
+ #### `@mui/x-data-grid@8.0.0-alpha.6`
32
+
33
+ - [DataGrid] Avoid subscribing to `renderContext` state in grid root for better scroll performance (#15986) @lauri865
34
+ - [DataGrid] Fix header filters showing clear button while empty (#15829) @k-rajat19
35
+ - [DataGrid] Improve test coverage of server side data source (#15942) @MBilalShafi
36
+ - [DataGrid] Move progress components to leaf import (#15914) @romgrk
37
+ - [DataGrid] Move skeleton to leaf import (#15931) @romgrk
38
+ - [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15955) @lauri865
39
+ - [l10n] Improve Dutch (nl-NL) locale (#15994) @JoepVerkoelen
40
+
41
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.6` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
42
+
43
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.6`.
44
+
45
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.6` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
46
+
47
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.6`, plus:
48
+
49
+ - [DataGridPremium] Fix column unpinning with row grouping (#15908) @k-rajat19
50
+
51
+ ### Date and Time Pickers
52
+
53
+ #### `@mui/x-date-pickers@8.0.0-alpha.6`
54
+
55
+ - [pickers] Use `usePickerContext()` and `usePickerActionsContext()` to get the actions in the `actionBar` slot and in internal components (#15843) @flaviendelangle
56
+ - [pickers] Use `usePickerContext()` to get the view-related props in the layout, toolbar and tabs slots (#15606) @flaviendelangle
57
+
58
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.6` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
59
+
60
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.6`.
61
+
62
+ ### Charts
63
+
64
+ #### `@mui/x-charts@8.0.0-alpha.6`
65
+
66
+ No changes since `@mui/x-charts@v8.0.0-alpha.5`.
67
+
68
+ #### `@mui/x-charts-pro@8.0.0-alpha.6` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
69
+
70
+ Same changes as in `@mui/x-charts@8.0.0-alpha.6`.
71
+
72
+ ### Tree View
73
+
74
+ #### `@mui/x-tree-view@8.0.0-alpha.6`
75
+
76
+ No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.5`.
77
+
78
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.6` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
79
+
80
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.6`.
81
+
82
+ ### Docs
83
+
84
+ - [docs] Remove production profiler from docs build (#15959) @lauri865
85
+ - [code-infra] Add new `next-env.d.ts` changes (#15947) @JCQuintas
86
+
87
+ ## 8.0.0-alpha.5
88
+
89
+ _Dec 19, 2024_
90
+
91
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
92
+
93
+ - 🌍 Improve Korean (ko-KR) locale on the Data Grid
94
+ - 🐞 Bugfixes
95
+
96
+ Special thanks go out to the community contributors who have helped make this release possible:
97
+ @good-jinu, @k-rajat19.
98
+ Following are all team members who have contributed to this release:
99
+ @alexfauquette, @cherniavskii, @flaviendelangle, @KenanYusuf, @LukasTy, @MBilalShafi, @romgrk.
100
+
101
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
102
+
103
+ ### Data Grid
104
+
105
+ #### Breaking changes
106
+
107
+ - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
108
+
109
+ - For `.root` element, use `slotProps.root`.
110
+ - For `.main` element (the one with `role="grid"`), use `slotProps.main`.
111
+
112
+ - `detailPanelExpandedRowIds` and `onDetailPanelExpandedRowIdsChange` props use a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array:
113
+
114
+ ```diff
115
+ -detailPanelExpandedRowIds?: GridRowId[];
116
+ +detailPanelExpandedRowIds?: Set<GridRowId>;
117
+
118
+ -onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
119
+ +onDetailPanelExpandedRowIdsChange?: (ids: Set<GridRowId>, details: GridCallbackDetails) => void;
120
+ ```
121
+
122
+ - `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.
123
+ - `gridDetailPanelExpandedRowIdsSelector` returns a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
124
+ - `gridDetailPanelExpandedRowsHeightCacheSelector` was removed.
125
+
126
+ #### `@mui/x-data-grid@8.0.0-alpha.5`
127
+
128
+ - [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15915) @k-rajat19
129
+ - [DataGrid] Fix autosizing with virtualized columns (#15116) @k-rajat19
130
+ - [DataGrid] Move `<Badge />` to leaf import (#15879) @romgrk
131
+ - [DataGrid] Move `<ListItemText />` and `<ListItemIcon />` to leaf import (#15869) @romgrk
132
+ - [DataGrid] Remove the Joy UI demo (#15913) @romgrk
133
+ - [DataGrid] Update quick filter input variant (#15909) @KenanYusuf
134
+ - [DataGrid] Use `slotProps` to forward props to `.main` and `.root` elements (#15870) @MBilalShafi
135
+ - [l10n] Improve Korean(ko-KR) locale (#15878) @good-jinu
136
+
137
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
138
+
139
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.5`, plus:
140
+
141
+ - [DataGridPro] Use `Set` for `detailPanelExpandedRowIds` (#15835) @cherniavskii
142
+
143
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
144
+
145
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.5`.
146
+
147
+ ### Date and Time Pickers
148
+
149
+ #### Breaking changes
150
+
151
+ - The `<PickersMonth />` component has been moved inside the Month Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#month-calendar).
152
+
153
+ - The `<PickersYear />` component has been moved inside the Year Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#year-calendar).
154
+
155
+ #### `@mui/x-date-pickers@8.0.0-alpha.5`
156
+
157
+ - [pickers] Add verification to disable skipped hours in spring forward DST (#15849) @flaviendelangle
158
+ - [pickers] Remove `PickersMonth` and `PickersYear` from the theme and remove the `div` wrapping each button (#15806) @flaviendelangle
159
+ - [pickers] Use the new `ownerState` object on the `<PickersTextField />` component (#15863) @flaviendelangle
160
+
161
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
162
+
163
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.5`.
164
+
165
+ ### Charts
166
+
167
+ #### `@mui/x-charts@8.0.0-alpha.5`
168
+
169
+ - [charts] Fix `<ScatterChart />` value type if `null` (#15917) @alexfauquette
170
+
171
+ #### `@mui/x-charts-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
172
+
173
+ Same changes as in `@mui/x-charts@8.0.0-alpha.5`.
174
+
175
+ ### Tree View
176
+
177
+ #### `@mui/x-tree-view@8.0.0-alpha.5`
178
+
179
+ No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.4`.
180
+
181
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
182
+
183
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.5`.
184
+
185
+ ### Core
186
+
187
+ - [code-infra] Remove `@mui/material-nextjs` dependency (#15925) @LukasTy
188
+
8
189
  ## 8.0.0-alpha.4
9
190
 
10
191
  _Dec 13, 2024_
@@ -39,6 +220,7 @@ Following are all team members who have contributed to this release:
39
220
  -const output = useGridSelector(apiRef, selector, equals)
40
221
  +const output = useGridSelector(apiRef, selector, arguments, equals)
41
222
  ```
223
+
42
224
  - The default variant for text fields and selects in the filter panel has been changed to `outlined`.
43
225
  - The "row spanning" feature is now stable.
44
226
  ```diff
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _xLicense = require("@mui/x-license");
14
14
  var _xDataGridPro = require("@mui/x-data-grid-pro");
15
15
  var _internals = require("@mui/x-data-grid-pro/internals");
16
+ var _forwardRef = require("@mui/x-internals/forwardRef");
16
17
  var _useDataGridPremiumComponent = require("./useDataGridPremiumComponent");
17
18
  var _useDataGridPremiumProps = require("./useDataGridPremiumProps");
18
19
  var _releaseInfo = require("../utils/releaseInfo");
@@ -30,7 +31,7 @@ let dataGridPremiumPropValidators;
30
31
  if (process.env.NODE_ENV !== 'production') {
31
32
  dataGridPremiumPropValidators = [..._internals.propValidatorsDataGrid, ..._internals.propValidatorsDataGridPro];
32
33
  }
33
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
34
+ const DataGridPremiumRaw = (0, _forwardRef.forwardRef)(function DataGridPremium(inProps, ref) {
34
35
  const props = (0, _useDataGridPremiumProps.useDataGridPremiumProps)(inProps);
35
36
  const privateApiRef = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(props.apiRef, props);
36
37
  (0, _xLicense.useLicenseVerifier)('x-data-grid-premium', releaseInfo);
@@ -44,9 +45,9 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
44
45
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGridPro.GridRoot, (0, _extends2.default)({
45
46
  className: props.className,
46
47
  style: props.style,
47
- sx: props.sx,
48
- ref: ref
49
- }, props.forwardedProps, {
48
+ sx: props.sx
49
+ }, props.slotProps?.root, {
50
+ ref: ref,
50
51
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridHeader, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridBody, {
51
52
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
52
53
  packageName: "x-data-grid-premium",
@@ -116,6 +117,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
116
117
  */
117
118
  autosizeOptions: _propTypes.default.shape({
118
119
  columns: _propTypes.default.arrayOf(_propTypes.default.string),
120
+ disableColumnVirtualization: _propTypes.default.bool,
119
121
  expand: _propTypes.default.bool,
120
122
  includeHeaders: _propTypes.default.bool,
121
123
  includeOutliers: _propTypes.default.bool,
@@ -193,7 +195,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
193
195
  /**
194
196
  * The row ids to show the detail panel.
195
197
  */
196
- detailPanelExpandedRowIds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired),
198
+ detailPanelExpandedRowIds: _propTypes.default /* @typescript-to-proptypes-ignore */.instanceOf(Set),
197
199
  /**
198
200
  * If `true`, aggregation is disabled.
199
201
  * @default false
@@ -339,11 +341,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
339
341
  quickFilterLogicOperator: _propTypes.default.oneOf(['and', 'or']),
340
342
  quickFilterValues: _propTypes.default.array
341
343
  }),
342
- /**
343
- * Forwarded props for the Data Grid root element.
344
- * @ignore - do not document.
345
- */
346
- forwardedProps: _propTypes.default.object,
347
344
  /**
348
345
  * Determines the position of an aggregated value.
349
346
  * @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 = (0, _internals.useProps)(
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.jsxs)(rootProps.slots.baseMenuItem, {
64
- disableRipple: true,
65
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
66
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuAggregationIcon, {
67
- fontSize: "small"
68
- })
69
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
70
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
71
- size: "small",
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
- sx: {
74
- minWidth: 150
75
- },
76
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
77
- id: `${id}-label`,
78
- children: label
79
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseSelect, {
80
- labelId: `${id}-label`,
81
- id: `${id}-input`,
82
- value: selectedAggregationRule,
83
- label: label,
84
- color: "primary",
85
- onChange: handleAggregationItemChange,
86
- onBlur: event => event.stopPropagation(),
87
- fullWidth: true,
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.jsxs)(rootProps.slots.baseMenuItem, {
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
35
32
  onClick: ungroupColumn,
36
33
  disabled: !groupedColumn.groupable,
37
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
38
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
39
- fontSize: "small"
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.jsxs)(rootProps.slots.baseMenuItem, {
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
40
37
  onClick: ungroupColumn,
41
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
42
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
43
- fontSize: "small"
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.jsxs)(rootProps.slots.baseMenuItem, {
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
51
45
  onClick: groupColumn,
52
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
53
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuGroupIcon, {
54
- fontSize: "small"
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
  }
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _utils = require("@mui/utils");
12
12
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
13
- var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
14
13
  var _internals = require("@mui/x-data-grid-pro/internals");
15
14
  var _xDataGridPro = require("@mui/x-data-grid-pro");
16
15
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
@@ -55,7 +54,7 @@ function GridGroupingCriteriaCellIcon(props) {
55
54
  if (isDataLoading) {
56
55
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
57
56
  className: classes.loadingContainer,
58
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseCircularProgress, {
59
58
  size: "1rem",
60
59
  color: "inherit"
61
60
  })
@@ -30,4 +30,4 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
30
30
  displayOrder: number;
31
31
  };
32
32
  };
33
- export declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
33
+ export declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps> | React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
@@ -11,6 +11,7 @@ exports.GridPremiumColumnMenu = void 0;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _xDataGridPro = require("@mui/x-data-grid-pro");
14
+ var _forwardRef = require("@mui/x-internals/forwardRef");
14
15
  var _GridColumnMenuAggregationItem = require("./GridColumnMenuAggregationItem");
15
16
  var _rowGrouping = require("../hooks/features/rowGrouping");
16
17
  var _GridColumnMenuRowGroupItem = require("./GridColumnMenuRowGroupItem");
@@ -37,11 +38,10 @@ const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = exports.GRID_COLUMN_MENU_SLOT_PROPS_
37
38
  displayOrder: 27
38
39
  }
39
40
  });
40
- const GridPremiumColumnMenu = exports.GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
41
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridGenericColumnMenu, (0, _extends2.default)({
42
- ref: ref
43
- }, props, {
41
+ const GridPremiumColumnMenu = exports.GridPremiumColumnMenu = (0, _forwardRef.forwardRef)(function GridPremiumColumnMenuSimple(props, ref) {
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridGenericColumnMenu, (0, _extends2.default)({}, props, {
44
43
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
45
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
44
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM,
45
+ ref: ref
46
46
  }));
47
47
  });
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
7
7
  import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot, GridContextProvider } from '@mui/x-data-grid-pro';
8
8
  import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps } from '@mui/x-data-grid-pro/internals';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useDataGridPremiumComponent } from "./useDataGridPremiumComponent.js";
10
11
  import { useDataGridPremiumProps } from "./useDataGridPremiumProps.js";
11
12
  import { getReleaseInfo } from "../utils/releaseInfo.js";
@@ -23,7 +24,7 @@ let dataGridPremiumPropValidators;
23
24
  if (process.env.NODE_ENV !== 'production') {
24
25
  dataGridPremiumPropValidators = [...propValidatorsDataGrid, ...propValidatorsDataGridPro];
25
26
  }
26
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
27
+ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
27
28
  const props = useDataGridPremiumProps(inProps);
28
29
  const privateApiRef = useDataGridPremiumComponent(props.apiRef, props);
29
30
  useLicenseVerifier('x-data-grid-premium', releaseInfo);
@@ -37,9 +38,9 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
37
38
  children: /*#__PURE__*/_jsxs(GridRoot, _extends({
38
39
  className: props.className,
39
40
  style: props.style,
40
- sx: props.sx,
41
- ref: ref
42
- }, props.forwardedProps, {
41
+ sx: props.sx
42
+ }, props.slotProps?.root, {
43
+ ref: ref,
43
44
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
44
45
  children: /*#__PURE__*/_jsx(Watermark, {
45
46
  packageName: "x-data-grid-premium",
@@ -109,6 +110,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
109
110
  */
110
111
  autosizeOptions: PropTypes.shape({
111
112
  columns: PropTypes.arrayOf(PropTypes.string),
113
+ disableColumnVirtualization: PropTypes.bool,
112
114
  expand: PropTypes.bool,
113
115
  includeHeaders: PropTypes.bool,
114
116
  includeOutliers: PropTypes.bool,
@@ -186,7 +188,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
186
188
  /**
187
189
  * The row ids to show the detail panel.
188
190
  */
189
- detailPanelExpandedRowIds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired),
191
+ detailPanelExpandedRowIds: PropTypes /* @typescript-to-proptypes-ignore */.instanceOf(Set),
190
192
  /**
191
193
  * If `true`, aggregation is disabled.
192
194
  * @default false
@@ -332,11 +334,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
332
334
  quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
333
335
  quickFilterValues: PropTypes.array
334
336
  }),
335
- /**
336
- * Forwarded props for the Data Grid root element.
337
- * @ignore - do not document.
338
- */
339
- forwardedProps: PropTypes.object,
340
337
  /**
341
338
  * Determines the position of an aggregated value.
342
339
  * @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, useProps } from '@mui/x-data-grid-pro/internals';
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 = useProps(
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,