@mui/x-data-grid-premium 6.10.0 → 6.10.1

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 CHANGED
@@ -3,6 +3,75 @@
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.1
7
+
8
+ _Jul 20, 2023_
9
+
10
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Fix CSV export for values containing double quotes
13
+ - 🚀 Improve tree data performance
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@v6.10.1`
20
+
21
+ - [DataGrid] Filtering performance: compile filter applier with `eval` (#9635) @romgrk
22
+ - [DataGrid] Fix CSV export for values containing double quotes (#9667) @cherniavskii
23
+ - [DataGrid] Fix column type change not working correctly (#9594) @cherniavskii
24
+ - [DataGrid] Fix quick filter `undefined` row error (#9708) @romgrk
25
+ - [DataGrid] Prevent `viewportOuterSize.height` going negative (#9664) @gitstart
26
+ - [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
27
+ - [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
28
+
29
+ #### `@mui/x-data-grid-pro@v6.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
30
+
31
+ Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
32
+
33
+ - [DataGridPro] Improve tree data performance (#9682) @cherniavskii
34
+ - [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
35
+
36
+ #### `@mui/x-data-grid-premium@v6.10.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
37
+
38
+ Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
39
+
40
+ ### Date Pickers
41
+
42
+ #### `@mui/x-date-pickers@v6.10.1`
43
+
44
+ - [fields] Fix `format` and `value` update order (#9715) @LukasTy
45
+ - [pickers] Remove `require` usage in comment (#9675) @LukasTy
46
+
47
+ #### `@mui/x-date-pickers-pro@v6.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
48
+
49
+ Same changes as in `@mui/x-date-pickers@v6.10.1`.
50
+
51
+ ### Charts / `@mui/x-charts@v6.0.0-alpha.4`
52
+
53
+ - [charts] Fix blinking in responsive charts and extremums computation for line charts (#9734) @alexfauquette
54
+ - [charts] Use ESM with imports (#9645) @alexfauquette
55
+
56
+ ### Docs
57
+
58
+ - [docs] Add additional note for license key installation on Next.js (#9575) @joserodolfofreitas
59
+ - [docs] Add paragraph about managing focus of custom edit components (#9658) @m4theushw
60
+ - [docs] Add unsorted icon slot to the custom sort icons demo (#9169) @d4rekanguok
61
+ - [docs] Disable ad for onboarding pages (#9700) @oliviertassinari
62
+ - [docs] Disabling ads without toolbar has no effect @oliviertassinari
63
+ - [docs] Fix Date Pickers usage to Title Case (#9680) @richbustos
64
+ - [docs] Fix sorting in `CustomSortIcons` demo (#9656) @MBilalShafi
65
+ - [docs] Improve the UI for pickers introduction (#9644) @alexfauquette
66
+ - [docs] Improve the demo design @oliviertassinari
67
+ - [docs] Localization progress, polish (#9672) @oliviertassinari
68
+ - [docs] Normalize the WIP items (#9671) @oliviertassinari
69
+
70
+ ### Core
71
+
72
+ - [core] Add `validate` command (#9714) @romgrk
73
+ - [CHANGELOG] Update generator to new format @oliviertassinari
74
+
6
75
  ## 6.10.0
7
76
 
8
77
  _Jul 13, 2023_
@@ -26,11 +95,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
26
95
  - [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
27
96
  - [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
28
97
 
29
- #### `@mui/x-data-grid-pro@6.10.0`
98
+ #### `@mui/x-data-grid-pro@6.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
30
99
 
31
100
  Same changes as in `@mui/x-data-grid@6.10.0`.
32
101
 
33
- #### `@mui/x-data-grid-premium@6.10.0`
102
+ #### `@mui/x-data-grid-premium@6.10.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
34
103
 
35
104
  Same changes as in `@mui/x-data-grid-pro@6.10.0`.
36
105
 
@@ -41,7 +110,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
41
110
  - [pickers] Fix date calendar issues (#9652) @LukasTy
42
111
  - [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
43
112
 
44
- #### `@mui/x-date-pickers-pro@6.10.0`
113
+ #### `@mui/x-date-pickers-pro@6.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
45
114
 
46
115
  Same changes as in `@mui/x-date-pickers@6.10.0`.
47
116
 
@@ -5,14 +5,14 @@ import { gridAggregationModelSelector } from './gridAggregationSelectors';
5
5
  import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from './gridAggregationUtils';
6
6
  import { createAggregationLookup } from './createAggregationLookup';
7
7
  export const aggregationStateInitializer = (state, props, apiRef) => {
8
- var _ref, _props$aggregationMod, _props$initialState, _props$initialState$a;
8
+ var _ref, _props$aggregationMod, _props$initialState;
9
9
  apiRef.current.caches.aggregation = {
10
10
  rulesOnLastColumnHydration: {},
11
11
  rulesOnLastRowHydration: {}
12
12
  };
13
13
  return _extends({}, state, {
14
14
  aggregation: {
15
- model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$a = _props$initialState.aggregation) == null ? void 0 : _props$initialState$a.model) != null ? _ref : {}
15
+ model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.aggregation) == null ? void 0 : _props$initialState.model) != null ? _ref : {}
16
16
  }
17
17
  });
18
18
  };
@@ -149,7 +149,7 @@ export const wrapColumnWithAggregationValue = ({
149
149
  aggregationRule
150
150
  }) => {
151
151
  const getCellAggregationResult = (id, field) => {
152
- var _rowNode$parent, _gridAggregationLooku, _gridAggregationLooku2;
152
+ var _rowNode$parent, _gridAggregationLooku;
153
153
  let cellAggregationPosition = null;
154
154
  const rowNode = apiRef.current.getRowNode(id);
155
155
  if (rowNode.type === 'group') {
@@ -163,7 +163,7 @@ export const wrapColumnWithAggregationValue = ({
163
163
 
164
164
  // TODO: Add custom root id
165
165
  const groupId = cellAggregationPosition === 'inline' ? id : (_rowNode$parent = rowNode.parent) != null ? _rowNode$parent : '';
166
- const aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null ? void 0 : (_gridAggregationLooku2 = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku2[field];
166
+ const aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null || (_gridAggregationLooku = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku[field];
167
167
  if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
168
168
  return null;
169
169
  }
@@ -119,15 +119,15 @@ export const useGridCellSelection = (apiRef, props) => {
119
119
  return params.rowNode.type !== 'pinnedRow';
120
120
  }, [apiRef]);
121
121
  const handleMouseUp = useEventCallback(() => {
122
- var _apiRef$current$rootE, _apiRef$current$rootE2;
122
+ var _apiRef$current$rootE;
123
123
  lastMouseDownCell.current = null;
124
- (_apiRef$current$rootE = apiRef.current.rootElementRef) == null ? void 0 : (_apiRef$current$rootE2 = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE2.classList.remove(gridClasses['root--disableUserSelection']);
124
+ (_apiRef$current$rootE = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE.classList.remove(gridClasses['root--disableUserSelection']);
125
125
 
126
126
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
127
127
  stopAutoScroll();
128
128
  });
129
129
  const handleCellMouseDown = React.useCallback((params, event) => {
130
- var _apiRef$current$rootE3, _apiRef$current$rootE4, _apiRef$current$rootE5;
130
+ var _apiRef$current$rootE2, _apiRef$current$rootE3;
131
131
  // Skip if the click comes from the right-button or, only on macOS, Ctrl is pressed
132
132
  // Fix for https://github.com/mui/mui-x/pull/6567#issuecomment-1329155578
133
133
  const isMacOs = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
@@ -142,8 +142,8 @@ export const useGridCellSelection = (apiRef, props) => {
142
142
  id: params.id,
143
143
  field: params.field
144
144
  };
145
- (_apiRef$current$rootE3 = apiRef.current.rootElementRef) == null ? void 0 : (_apiRef$current$rootE4 = _apiRef$current$rootE3.current) == null ? void 0 : _apiRef$current$rootE4.classList.add(gridClasses['root--disableUserSelection']);
146
- const document = ownerDocument((_apiRef$current$rootE5 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE5.current);
145
+ (_apiRef$current$rootE2 = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE2 = _apiRef$current$rootE2.current) == null ? void 0 : _apiRef$current$rootE2.classList.add(gridClasses['root--disableUserSelection']);
146
+ const document = ownerDocument((_apiRef$current$rootE3 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE3.current);
147
147
  document.addEventListener('mouseup', handleMouseUp, {
148
148
  once: true
149
149
  });
@@ -161,20 +161,20 @@ export const useGridCellSelection = (apiRef, props) => {
161
161
  };
162
162
  }, []);
163
163
  const startAutoScroll = React.useCallback(() => {
164
- var _apiRef$current$virtu, _apiRef$current$virtu2, _apiRef$current$virtu3;
164
+ var _apiRef$current$virtu, _apiRef$current$virtu2;
165
165
  if (autoScrollRAF.current) {
166
166
  return;
167
167
  }
168
168
  if (!((_apiRef$current$virtu = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu.current)) {
169
169
  return;
170
170
  }
171
- const virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null ? void 0 : (_apiRef$current$virtu3 = _apiRef$current$virtu2.current) == null ? void 0 : _apiRef$current$virtu3.getBoundingClientRect();
171
+ const virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu2 = _apiRef$current$virtu2.current) == null ? void 0 : _apiRef$current$virtu2.getBoundingClientRect();
172
172
  if (!virtualScrollerRect) {
173
173
  return;
174
174
  }
175
175
  function autoScroll() {
176
- var _apiRef$current$virtu4;
177
- if (!mousePosition.current || !((_apiRef$current$virtu4 = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu4.current)) {
176
+ var _apiRef$current$virtu3;
177
+ if (!mousePosition.current || !((_apiRef$current$virtu3 = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu3.current)) {
178
178
  return;
179
179
  }
180
180
  const {
@@ -221,7 +221,7 @@ export const useGridCellSelection = (apiRef, props) => {
221
221
  autoScroll();
222
222
  }, [apiRef]);
223
223
  const handleCellMouseOver = React.useCallback((params, event) => {
224
- var _apiRef$current$virtu5, _apiRef$current$virtu6;
224
+ var _apiRef$current$virtu4;
225
225
  if (!lastMouseDownCell.current) {
226
226
  return;
227
227
  }
@@ -233,7 +233,7 @@ export const useGridCellSelection = (apiRef, props) => {
233
233
  id,
234
234
  field
235
235
  }, event.ctrlKey || event.metaKey);
236
- const virtualScrollerRect = (_apiRef$current$virtu5 = apiRef.current.virtualScrollerRef) == null ? void 0 : (_apiRef$current$virtu6 = _apiRef$current$virtu5.current) == null ? void 0 : _apiRef$current$virtu6.getBoundingClientRect();
236
+ const virtualScrollerRect = (_apiRef$current$virtu4 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu4 = _apiRef$current$virtu4.current) == null ? void 0 : _apiRef$current$virtu4.getBoundingClientRect();
237
237
  if (!virtualScrollerRect) {
238
238
  return;
239
239
  }
@@ -354,8 +354,8 @@ export const useGridCellSelection = (apiRef, props) => {
354
354
  }
355
355
  }, [apiRef, props.unstable_cellSelectionModel]);
356
356
  React.useEffect(() => {
357
- var _apiRef$current$rootE6;
358
- const rootRef = (_apiRef$current$rootE6 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE6.current;
357
+ var _apiRef$current$rootE4;
358
+ const rootRef = (_apiRef$current$rootE4 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE4.current;
359
359
  return () => {
360
360
  stopAutoScroll();
361
361
  const document = ownerDocument(rootRef);
@@ -5,13 +5,13 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
5
5
  import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
6
6
  import { getRowGroupingFieldFromGroupingCriteria, ROW_GROUPING_STRATEGY, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from './gridRowGroupingUtils';
7
7
  export const rowGroupingStateInitializer = (state, props, apiRef) => {
8
- var _ref, _props$rowGroupingMod, _props$initialState, _props$initialState$r;
8
+ var _ref, _props$rowGroupingMod, _props$initialState;
9
9
  apiRef.current.caches.rowGrouping = {
10
10
  rulesOnLastRowTreeCreation: []
11
11
  };
12
12
  return _extends({}, state, {
13
13
  rowGrouping: {
14
- model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model) != null ? _ref : []
14
+ model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model) != null ? _ref : []
15
15
  }
16
16
  });
17
17
  };
@@ -22,7 +22,7 @@ export const rowGroupingStateInitializer = (state, props, apiRef) => {
22
22
  * @requires useGridParamsApi (method) - can be after, async only
23
23
  */
24
24
  export const useGridRowGrouping = (apiRef, props) => {
25
- var _props$initialState3, _props$initialState3$;
25
+ var _props$initialState3;
26
26
  apiRef.current.registerControlState({
27
27
  stateId: 'rowGrouping',
28
28
  propModel: props.rowGroupingModel,
@@ -89,7 +89,7 @@ export const useGridRowGrouping = (apiRef, props) => {
89
89
  return columnMenuItems;
90
90
  }, [props.disableRowGrouping]);
91
91
  const stateExportPreProcessing = React.useCallback((prevState, context) => {
92
- var _props$initialState2, _props$initialState2$;
92
+ var _props$initialState2;
93
93
  const rowGroupingModelToExport = gridRowGroupingModelSelector(apiRef);
94
94
  const shouldExportRowGroupingModel =
95
95
  // Always export if the `exportOnlyDirtyModels` property is not activated
@@ -97,7 +97,7 @@ export const useGridRowGrouping = (apiRef, props) => {
97
97
  // Always export if the model is controlled
98
98
  props.rowGroupingModel != null ||
99
99
  // Always export if the model has been initialized
100
- ((_props$initialState2 = props.initialState) == null ? void 0 : (_props$initialState2$ = _props$initialState2.rowGrouping) == null ? void 0 : _props$initialState2$.model) != null ||
100
+ ((_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.rowGrouping) == null ? void 0 : _props$initialState2.model) != null ||
101
101
  // Export if the model is not empty
102
102
  Object.keys(rowGroupingModelToExport).length > 0;
103
103
  if (!shouldExportRowGroupingModel) {
@@ -108,7 +108,7 @@ export const useGridRowGrouping = (apiRef, props) => {
108
108
  model: rowGroupingModelToExport
109
109
  }
110
110
  });
111
- }, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null ? void 0 : (_props$initialState3$ = _props$initialState3.rowGrouping) == null ? void 0 : _props$initialState3$.model]);
111
+ }, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.rowGrouping) == null ? void 0 : _props$initialState3.model]);
112
112
  const stateRestorePreProcessing = React.useCallback((params, context) => {
113
113
  var _context$stateToResto;
114
114
  if (props.disableRowGrouping) {
@@ -22,9 +22,9 @@ const updateColumnVisibilityModel = (columnVisibilityModel, rowGroupingModel, pr
22
22
  * Does not work when used with the `hide` property of `GridColDef`
23
23
  */
24
24
  export const useKeepGroupedColumnsHidden = props => {
25
- var _props$rowGroupingMod, _props$initialState, _props$initialState$r;
25
+ var _props$rowGroupingMod, _props$initialState;
26
26
  const initialProps = React.useRef(props);
27
- const rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model);
27
+ const rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model);
28
28
  React.useEffect(() => {
29
29
  props.apiRef.current.subscribeEvent('rowGroupingModelChange', newModel => {
30
30
  const columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
@@ -35,7 +35,7 @@ export const useKeepGroupedColumnsHidden = props => {
35
35
  return React.useMemo(() => {
36
36
  var _invariantInitialStat;
37
37
  const invariantInitialState = initialProps.current.initialState;
38
- const columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null ? void 0 : (_invariantInitialStat = invariantInitialState.columns) == null ? void 0 : _invariantInitialStat.columnVisibilityModel, rowGroupingModel.current, undefined);
38
+ const columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null || (_invariantInitialStat = invariantInitialState.columns) == null ? void 0 : _invariantInitialStat.columnVisibilityModel, rowGroupingModel.current, undefined);
39
39
  return _extends({}, invariantInitialState, {
40
40
  columns: _extends({}, invariantInitialState == null ? void 0 : invariantInitialState.columns, {
41
41
  columnVisibilityModel
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.10.0
2
+ * @mui/x-data-grid-premium v6.10.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -5,14 +5,14 @@ import { gridAggregationModelSelector } from './gridAggregationSelectors';
5
5
  import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from './gridAggregationUtils';
6
6
  import { createAggregationLookup } from './createAggregationLookup';
7
7
  export var aggregationStateInitializer = function aggregationStateInitializer(state, props, apiRef) {
8
- var _ref, _props$aggregationMod, _props$initialState, _props$initialState$a;
8
+ var _ref, _props$aggregationMod, _props$initialState;
9
9
  apiRef.current.caches.aggregation = {
10
10
  rulesOnLastColumnHydration: {},
11
11
  rulesOnLastRowHydration: {}
12
12
  };
13
13
  return _extends({}, state, {
14
14
  aggregation: {
15
- model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$a = _props$initialState.aggregation) == null ? void 0 : _props$initialState$a.model) != null ? _ref : {}
15
+ model: (_ref = (_props$aggregationMod = props.aggregationModel) != null ? _props$aggregationMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.aggregation) == null ? void 0 : _props$initialState.model) != null ? _ref : {}
16
16
  }
17
17
  });
18
18
  };
@@ -145,7 +145,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
145
145
  apiRef = _ref6.apiRef,
146
146
  aggregationRule = _ref6.aggregationRule;
147
147
  var getCellAggregationResult = function getCellAggregationResult(id, field) {
148
- var _rowNode$parent, _gridAggregationLooku, _gridAggregationLooku2;
148
+ var _rowNode$parent, _gridAggregationLooku;
149
149
  var cellAggregationPosition = null;
150
150
  var rowNode = apiRef.current.getRowNode(id);
151
151
  if (rowNode.type === 'group') {
@@ -159,7 +159,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
159
159
 
160
160
  // TODO: Add custom root id
161
161
  var groupId = cellAggregationPosition === 'inline' ? id : (_rowNode$parent = rowNode.parent) != null ? _rowNode$parent : '';
162
- var aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null ? void 0 : (_gridAggregationLooku2 = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku2[field];
162
+ var aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null || (_gridAggregationLooku = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku[field];
163
163
  if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
164
164
  return null;
165
165
  }
@@ -136,15 +136,15 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
136
136
  return params.rowNode.type !== 'pinnedRow';
137
137
  }, [apiRef]);
138
138
  var handleMouseUp = useEventCallback(function () {
139
- var _apiRef$current$rootE, _apiRef$current$rootE2;
139
+ var _apiRef$current$rootE;
140
140
  lastMouseDownCell.current = null;
141
- (_apiRef$current$rootE = apiRef.current.rootElementRef) == null ? void 0 : (_apiRef$current$rootE2 = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE2.classList.remove(gridClasses['root--disableUserSelection']);
141
+ (_apiRef$current$rootE = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE.classList.remove(gridClasses['root--disableUserSelection']);
142
142
 
143
143
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
144
144
  stopAutoScroll();
145
145
  });
146
146
  var handleCellMouseDown = React.useCallback(function (params, event) {
147
- var _apiRef$current$rootE3, _apiRef$current$rootE4, _apiRef$current$rootE5;
147
+ var _apiRef$current$rootE2, _apiRef$current$rootE3;
148
148
  // Skip if the click comes from the right-button or, only on macOS, Ctrl is pressed
149
149
  // Fix for https://github.com/mui/mui-x/pull/6567#issuecomment-1329155578
150
150
  var isMacOs = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
@@ -159,8 +159,8 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
159
159
  id: params.id,
160
160
  field: params.field
161
161
  };
162
- (_apiRef$current$rootE3 = apiRef.current.rootElementRef) == null ? void 0 : (_apiRef$current$rootE4 = _apiRef$current$rootE3.current) == null ? void 0 : _apiRef$current$rootE4.classList.add(gridClasses['root--disableUserSelection']);
163
- var document = ownerDocument((_apiRef$current$rootE5 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE5.current);
162
+ (_apiRef$current$rootE2 = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE2 = _apiRef$current$rootE2.current) == null ? void 0 : _apiRef$current$rootE2.classList.add(gridClasses['root--disableUserSelection']);
163
+ var document = ownerDocument((_apiRef$current$rootE3 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE3.current);
164
164
  document.addEventListener('mouseup', handleMouseUp, {
165
165
  once: true
166
166
  });
@@ -178,20 +178,20 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
178
178
  };
179
179
  }, []);
180
180
  var startAutoScroll = React.useCallback(function () {
181
- var _apiRef$current$virtu, _apiRef$current$virtu2, _apiRef$current$virtu3;
181
+ var _apiRef$current$virtu, _apiRef$current$virtu2;
182
182
  if (autoScrollRAF.current) {
183
183
  return;
184
184
  }
185
185
  if (!((_apiRef$current$virtu = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu.current)) {
186
186
  return;
187
187
  }
188
- var virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null ? void 0 : (_apiRef$current$virtu3 = _apiRef$current$virtu2.current) == null ? void 0 : _apiRef$current$virtu3.getBoundingClientRect();
188
+ var virtualScrollerRect = (_apiRef$current$virtu2 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu2 = _apiRef$current$virtu2.current) == null ? void 0 : _apiRef$current$virtu2.getBoundingClientRect();
189
189
  if (!virtualScrollerRect) {
190
190
  return;
191
191
  }
192
192
  function autoScroll() {
193
- var _apiRef$current$virtu4;
194
- if (!mousePosition.current || !((_apiRef$current$virtu4 = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu4.current)) {
193
+ var _apiRef$current$virtu3;
194
+ if (!mousePosition.current || !((_apiRef$current$virtu3 = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu3.current)) {
195
195
  return;
196
196
  }
197
197
  var _mousePosition$curren = mousePosition.current,
@@ -221,9 +221,9 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
221
221
  deltaX = AUTO_SCROLL_SPEED;
222
222
  }
223
223
  if (deltaX !== 0 || deltaY !== 0) {
224
- var _apiRef$current$virtu5 = apiRef.current.virtualScrollerRef.current,
225
- scrollLeft = _apiRef$current$virtu5.scrollLeft,
226
- scrollTop = _apiRef$current$virtu5.scrollTop;
224
+ var _apiRef$current$virtu4 = apiRef.current.virtualScrollerRef.current,
225
+ scrollLeft = _apiRef$current$virtu4.scrollLeft,
226
+ scrollTop = _apiRef$current$virtu4.scrollTop;
227
227
  apiRef.current.scroll({
228
228
  top: scrollTop + deltaY * factor,
229
229
  left: scrollLeft + deltaX * factor
@@ -234,7 +234,7 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
234
234
  autoScroll();
235
235
  }, [apiRef]);
236
236
  var handleCellMouseOver = React.useCallback(function (params, event) {
237
- var _apiRef$current$virtu6, _apiRef$current$virtu7;
237
+ var _apiRef$current$virtu5;
238
238
  if (!lastMouseDownCell.current) {
239
239
  return;
240
240
  }
@@ -244,7 +244,7 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
244
244
  id: id,
245
245
  field: field
246
246
  }, event.ctrlKey || event.metaKey);
247
- var virtualScrollerRect = (_apiRef$current$virtu6 = apiRef.current.virtualScrollerRef) == null ? void 0 : (_apiRef$current$virtu7 = _apiRef$current$virtu6.current) == null ? void 0 : _apiRef$current$virtu7.getBoundingClientRect();
247
+ var virtualScrollerRect = (_apiRef$current$virtu5 = apiRef.current.virtualScrollerRef) == null || (_apiRef$current$virtu5 = _apiRef$current$virtu5.current) == null ? void 0 : _apiRef$current$virtu5.getBoundingClientRect();
248
248
  if (!virtualScrollerRect) {
249
249
  return;
250
250
  }
@@ -349,8 +349,8 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
349
349
  }
350
350
  }, [apiRef, props.unstable_cellSelectionModel]);
351
351
  React.useEffect(function () {
352
- var _apiRef$current$rootE6;
353
- var rootRef = (_apiRef$current$rootE6 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE6.current;
352
+ var _apiRef$current$rootE4;
353
+ var rootRef = (_apiRef$current$rootE4 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE4.current;
354
354
  return function () {
355
355
  stopAutoScroll();
356
356
  var document = ownerDocument(rootRef);
@@ -6,13 +6,13 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
6
6
  import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
7
7
  import { getRowGroupingFieldFromGroupingCriteria, ROW_GROUPING_STRATEGY, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from './gridRowGroupingUtils';
8
8
  export var rowGroupingStateInitializer = function rowGroupingStateInitializer(state, props, apiRef) {
9
- var _ref, _props$rowGroupingMod, _props$initialState, _props$initialState$r;
9
+ var _ref, _props$rowGroupingMod, _props$initialState;
10
10
  apiRef.current.caches.rowGrouping = {
11
11
  rulesOnLastRowTreeCreation: []
12
12
  };
13
13
  return _extends({}, state, {
14
14
  rowGrouping: {
15
- model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model) != null ? _ref : []
15
+ model: (_ref = (_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model) != null ? _ref : []
16
16
  }
17
17
  });
18
18
  };
@@ -23,7 +23,7 @@ export var rowGroupingStateInitializer = function rowGroupingStateInitializer(st
23
23
  * @requires useGridParamsApi (method) - can be after, async only
24
24
  */
25
25
  export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
26
- var _props$initialState3, _props$initialState3$;
26
+ var _props$initialState3;
27
27
  apiRef.current.registerControlState({
28
28
  stateId: 'rowGrouping',
29
29
  propModel: props.rowGroupingModel,
@@ -92,7 +92,7 @@ export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
92
92
  return columnMenuItems;
93
93
  }, [props.disableRowGrouping]);
94
94
  var stateExportPreProcessing = React.useCallback(function (prevState, context) {
95
- var _props$initialState2, _props$initialState2$;
95
+ var _props$initialState2;
96
96
  var rowGroupingModelToExport = gridRowGroupingModelSelector(apiRef);
97
97
  var shouldExportRowGroupingModel =
98
98
  // Always export if the `exportOnlyDirtyModels` property is not activated
@@ -100,7 +100,7 @@ export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
100
100
  // Always export if the model is controlled
101
101
  props.rowGroupingModel != null ||
102
102
  // Always export if the model has been initialized
103
- ((_props$initialState2 = props.initialState) == null ? void 0 : (_props$initialState2$ = _props$initialState2.rowGrouping) == null ? void 0 : _props$initialState2$.model) != null ||
103
+ ((_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.rowGrouping) == null ? void 0 : _props$initialState2.model) != null ||
104
104
  // Export if the model is not empty
105
105
  Object.keys(rowGroupingModelToExport).length > 0;
106
106
  if (!shouldExportRowGroupingModel) {
@@ -111,7 +111,7 @@ export var useGridRowGrouping = function useGridRowGrouping(apiRef, props) {
111
111
  model: rowGroupingModelToExport
112
112
  }
113
113
  });
114
- }, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null ? void 0 : (_props$initialState3$ = _props$initialState3.rowGrouping) == null ? void 0 : _props$initialState3$.model]);
114
+ }, [apiRef, props.rowGroupingModel, (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.rowGrouping) == null ? void 0 : _props$initialState3.model]);
115
115
  var stateRestorePreProcessing = React.useCallback(function (params, context) {
116
116
  var _context$stateToResto;
117
117
  if (props.disableRowGrouping) {
@@ -22,9 +22,9 @@ var updateColumnVisibilityModel = function updateColumnVisibilityModel(columnVis
22
22
  * Does not work when used with the `hide` property of `GridColDef`
23
23
  */
24
24
  export var useKeepGroupedColumnsHidden = function useKeepGroupedColumnsHidden(props) {
25
- var _props$rowGroupingMod, _props$initialState, _props$initialState$r;
25
+ var _props$rowGroupingMod, _props$initialState;
26
26
  var initialProps = React.useRef(props);
27
- var rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model);
27
+ var rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState.model);
28
28
  React.useEffect(function () {
29
29
  props.apiRef.current.subscribeEvent('rowGroupingModelChange', function (newModel) {
30
30
  var columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
@@ -35,7 +35,7 @@ export var useKeepGroupedColumnsHidden = function useKeepGroupedColumnsHidden(pr
35
35
  return React.useMemo(function () {
36
36
  var _invariantInitialStat;
37
37
  var invariantInitialState = initialProps.current.initialState;
38
- var columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null ? void 0 : (_invariantInitialStat = invariantInitialState.columns) == null ? void 0 : _invariantInitialStat.columnVisibilityModel, rowGroupingModel.current, undefined);
38
+ var columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState == null || (_invariantInitialStat = invariantInitialState.columns) == null ? void 0 : _invariantInitialStat.columnVisibilityModel, rowGroupingModel.current, undefined);
39
39
  return _extends({}, invariantInitialState, {
40
40
  columns: _extends({}, invariantInitialState == null ? void 0 : invariantInitialState.columns, {
41
41
  columnVisibilityModel: columnVisibilityModel
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.10.0
2
+ * @mui/x-data-grid-premium v6.10.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY4OTE5OTIwMDAwMA==";
3
+ var releaseInfo = "MTY4OTgyMjAwMDAwMA==";
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/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.10.0
2
+ * @mui/x-data-grid-premium v6.10.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY4OTE5OTIwMDAwMA==";
3
+ const releaseInfo = "MTY4OTgyMjAwMDAwMA==";
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/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.10.0
2
+ * @mui/x-data-grid-premium v6.10.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -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 = "MTY4OTE5OTIwMDAwMA==";
9
+ const releaseInfo = "MTY4OTgyMjAwMDAwMA==";
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.0",
3
+ "version": "6.10.1",
4
4
  "description": "The Premium plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -31,10 +31,10 @@
31
31
  "directory": "packages/grid/x-data-grid-premium"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.22.5",
35
- "@mui/utils": "^5.13.6",
36
- "@mui/x-data-grid": "6.10.0",
37
- "@mui/x-data-grid-pro": "6.10.0",
34
+ "@babel/runtime": "^7.22.6",
35
+ "@mui/utils": "^5.13.7",
36
+ "@mui/x-data-grid": "6.10.1",
37
+ "@mui/x-data-grid-pro": "6.10.1",
38
38
  "@mui/x-license-pro": "6.10.0",
39
39
  "@types/format-util": "^1.0.2",
40
40
  "clsx": "^1.2.1",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY4OTE5OTIwMDAwMA==";
3
+ const releaseInfo = "MTY4OTgyMjAwMDAwMA==";
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