@mui/x-data-grid-pro 6.10.0 → 6.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +136 -3
  2. package/components/GridTreeDataGroupingCell.js +1 -1
  3. package/components/headerFiltering/GridHeaderFilterCell.js +1 -1
  4. package/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
  5. package/hooks/features/rowPinning/useGridRowPinning.js +2 -2
  6. package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +1 -1
  7. package/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +2 -2
  8. package/hooks/features/rowReorder/useGridRowReorder.js +2 -0
  9. package/index.js +1 -1
  10. package/legacy/components/GridTreeDataGroupingCell.js +1 -1
  11. package/legacy/components/headerFiltering/GridHeaderFilterCell.js +1 -1
  12. package/legacy/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
  13. package/legacy/hooks/features/rowPinning/useGridRowPinning.js +2 -2
  14. package/legacy/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +2 -2
  15. package/legacy/hooks/features/rowReorder/useGridRowReorder.js +2 -0
  16. package/legacy/index.js +1 -1
  17. package/legacy/utils/domUtils.js +7 -1
  18. package/legacy/utils/releaseInfo.js +1 -1
  19. package/legacy/utils/tree/insertDataRowInTree.js +2 -2
  20. package/legacy/utils/tree/utils.js +12 -22
  21. package/modern/hooks/features/rowReorder/useGridRowReorder.js +2 -0
  22. package/modern/index.js +1 -1
  23. package/modern/utils/domUtils.js +7 -1
  24. package/modern/utils/releaseInfo.js +1 -1
  25. package/modern/utils/tree/utils.js +2 -11
  26. package/node/hooks/features/rowReorder/useGridRowReorder.js +2 -0
  27. package/node/index.js +1 -1
  28. package/node/utils/domUtils.js +7 -1
  29. package/node/utils/releaseInfo.js +1 -1
  30. package/node/utils/tree/utils.js +2 -11
  31. package/package.json +5 -5
  32. package/utils/domUtils.d.ts +2 -2
  33. package/utils/domUtils.js +8 -1
  34. package/utils/releaseInfo.js +1 -1
  35. package/utils/tree/insertDataRowInTree.js +2 -2
  36. package/utils/tree/utils.js +3 -12
package/CHANGELOG.md CHANGED
@@ -3,6 +3,139 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.10.2
7
+
8
+ _Jul 27, 2023_
9
+
10
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Improve scatter charts performance
13
+ - 📚 Redesigned component API documentation and side navigation
14
+ - 🐞 Bugfixes
15
+
16
+ ### Data Grid
17
+
18
+ #### `@mui/x-data-grid@v6.10.2`
19
+
20
+ - [DataGrid] Fix quick filter & aggregation error (#9729) @romgrk
21
+ - [DataGrid] Fix row click propagation causing error in nested grid (#9741) @cherniavskii
22
+ - [DataGrid] Keep focused cell in the DOM (#7357) @yaredtsy
23
+ - [l10n] Improve Finnish (fi-FI) locale (#9746) @sambbaahh
24
+
25
+ #### `@mui/x-data-grid-pro@v6.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
26
+
27
+ Same changes as in `@mui/x-data-grid@v6.10.2`.
28
+
29
+ #### `@mui/x-data-grid-premium@v6.10.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
30
+
31
+ Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
32
+
33
+ - [DataGridPremium] Allow to customize grouping cell offset (#9417) @cherniavskii
34
+
35
+ ### Date Pickers
36
+
37
+ #### `@mui/x-date-pickers@v6.10.2`
38
+
39
+ - [pickers] Remove the `endOfDate` from `DigitalClock` timeOptions (#9800) @noraleonte
40
+
41
+ #### `@mui/x-date-pickers-pro@v6.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
42
+
43
+ Same changes as in `@mui/x-date-pickers@v6.10.2`.
44
+
45
+ ### Charts / `@mui/x-charts@v6.0.0-alpha.5`
46
+
47
+ - [charts] Improve JSDoc for axis-related props (#9779) @flaviendelangle
48
+ - [charts] Improve performances of Scatter component (#9527) @flaviendelangle
49
+
50
+ ### Docs
51
+
52
+ - [docs] Add `pnpm` in more places @oliviertassinari
53
+ - [docs] Add `pnpm` installation instructions for MUI X (#9707) @richbustos
54
+ - [docs] Align pickers "uncontrolled vs controlled" sections (#9772) @LukasTy
55
+ - [docs] Apply style guide to the data grid Layout page (#9673) @richbustos
56
+ - [docs] Differentiate between packages in `slotProps` docs (#9668) @cherniavskii
57
+ - [docs] Fix charts width in axis pages (#9801) @alexfauquette
58
+ - [docs] Fix wrong prop name in the Editing page (#9753) @m4theushw
59
+ - [docs] New component API page and side nav design (#9187) @alexfauquette
60
+ - [docs] Update overview page with up to date information about the plans (#9512) @joserodolfofreitas
61
+
62
+ ### Core
63
+
64
+ - [core] Use PR charts version in preview (#9787) @alexfauquette
65
+ - [license] Allow overriding the license on specific parts of the page (#9717) @Janpot
66
+ - [license] Throw in dev mode after 30 days (#9701) @oliviertassinari
67
+ - [license] Only throw in dev mode (#9803) @oliviertassinari
68
+ - [test] Fail the CI when new unexpected files are created (#9728) @oliviertassinari
69
+
70
+ ## 6.10.1
71
+
72
+ _Jul 20, 2023_
73
+
74
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
75
+
76
+ - 🎁 Fix CSV export for values containing double quotes
77
+ - 🚀 Improve tree data performance
78
+ - 🐞 Bugfixes
79
+ - 📚 Documentation improvements
80
+
81
+ ### Data Grid
82
+
83
+ #### `@mui/x-data-grid@v6.10.1`
84
+
85
+ - [DataGrid] Filtering performance: compile filter applier with `eval` (#9635) @romgrk
86
+ - [DataGrid] Fix CSV export for values containing double quotes (#9667) @cherniavskii
87
+ - [DataGrid] Fix column type change not working correctly (#9594) @cherniavskii
88
+ - [DataGrid] Fix quick filter `undefined` row error (#9708) @romgrk
89
+ - [DataGrid] Prevent `viewportOuterSize.height` going negative (#9664) @gitstart
90
+ - [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
91
+ - [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
92
+
93
+ #### `@mui/x-data-grid-pro@v6.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
94
+
95
+ Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
96
+
97
+ - [DataGridPro] Improve tree data performance (#9682) @cherniavskii
98
+ - [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
99
+
100
+ #### `@mui/x-data-grid-premium@v6.10.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
101
+
102
+ Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
103
+
104
+ ### Date Pickers
105
+
106
+ #### `@mui/x-date-pickers@v6.10.1`
107
+
108
+ - [fields] Fix `format` and `value` update order (#9715) @LukasTy
109
+ - [pickers] Remove `require` usage in comment (#9675) @LukasTy
110
+
111
+ #### `@mui/x-date-pickers-pro@v6.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
112
+
113
+ Same changes as in `@mui/x-date-pickers@v6.10.1`.
114
+
115
+ ### Charts / `@mui/x-charts@v6.0.0-alpha.4`
116
+
117
+ - [charts] Fix blinking in responsive charts and extremums computation for line charts (#9734) @alexfauquette
118
+ - [charts] Use ESM with imports (#9645) @alexfauquette
119
+
120
+ ### Docs
121
+
122
+ - [docs] Add additional note for license key installation on Next.js (#9575) @joserodolfofreitas
123
+ - [docs] Add paragraph about managing focus of custom edit components (#9658) @m4theushw
124
+ - [docs] Add unsorted icon slot to the custom sort icons demo (#9169) @d4rekanguok
125
+ - [docs] Disable ad for onboarding pages (#9700) @oliviertassinari
126
+ - [docs] Disabling ads without toolbar has no effect @oliviertassinari
127
+ - [docs] Fix Date Pickers usage to Title Case (#9680) @richbustos
128
+ - [docs] Fix sorting in `CustomSortIcons` demo (#9656) @MBilalShafi
129
+ - [docs] Improve the UI for pickers introduction (#9644) @alexfauquette
130
+ - [docs] Improve the demo design @oliviertassinari
131
+ - [docs] Localization progress, polish (#9672) @oliviertassinari
132
+ - [docs] Normalize the WIP items (#9671) @oliviertassinari
133
+
134
+ ### Core
135
+
136
+ - [core] Add `validate` command (#9714) @romgrk
137
+ - [CHANGELOG] Update generator to new format @oliviertassinari
138
+
6
139
  ## 6.10.0
7
140
 
8
141
  _Jul 13, 2023_
@@ -26,11 +159,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
26
159
  - [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
27
160
  - [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
28
161
 
29
- #### `@mui/x-data-grid-pro@6.10.0`
162
+ #### `@mui/x-data-grid-pro@6.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
30
163
 
31
164
  Same changes as in `@mui/x-data-grid@6.10.0`.
32
165
 
33
- #### `@mui/x-data-grid-premium@6.10.0`
166
+ #### `@mui/x-data-grid-premium@6.10.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
34
167
 
35
168
  Same changes as in `@mui/x-data-grid-pro@6.10.0`.
36
169
 
@@ -41,7 +174,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
41
174
  - [pickers] Fix date calendar issues (#9652) @LukasTy
42
175
  - [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
43
176
 
44
- #### `@mui/x-date-pickers-pro@6.10.0`
177
+ #### `@mui/x-date-pickers-pro@6.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
45
178
 
46
179
  Same changes as in `@mui/x-date-pickers@6.10.0`.
47
180
 
@@ -55,7 +55,7 @@ function GridTreeDataGroupingCell(props) {
55
55
  onClick: handleClick,
56
56
  tabIndex: -1,
57
57
  "aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand')
58
- }, rootProps == null ? void 0 : (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
58
+ }, rootProps == null || (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
59
59
  children: /*#__PURE__*/_jsx(Icon, {
60
60
  fontSize: "inherit"
61
61
  })
@@ -146,7 +146,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
146
146
  colDef
147
147
  });
148
148
  const classes = useUtilityClasses(ownerState);
149
- const isNoInputOperator = (filterOperators == null ? void 0 : (_filterOperators$find = filterOperators.find(({
149
+ const isNoInputOperator = (filterOperators == null || (_filterOperators$find = filterOperators.find(({
150
150
  value
151
151
  }) => item.operator === value)) == null ? void 0 : _filterOperators$find.requiresFilterValue) === false;
152
152
  const isApplied = Boolean(item == null ? void 0 : item.value) || isNoInputOperator;
@@ -5,11 +5,11 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
5
5
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from './gridDetailPanelToggleColDef';
6
6
  import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowsHeightCacheSelector, gridDetailPanelRawHeightCacheSelector } from './gridDetailPanelSelector';
7
7
  export const detailPanelStateInitializer = (state, props) => {
8
- var _ref, _props$detailPanelExp, _props$initialState, _props$initialState$d;
8
+ var _ref, _props$detailPanelExp, _props$initialState;
9
9
  return _extends({}, state, {
10
10
  detailPanel: {
11
11
  heightCache: {},
12
- expandedRowIds: (_ref = (_props$detailPanelExp = props.detailPanelExpandedRowIds) != null ? _props$detailPanelExp : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$d = _props$initialState.detailPanel) == null ? void 0 : _props$initialState$d.expandedRowIds) != null ? _ref : []
12
+ expandedRowIds: (_ref = (_props$detailPanelExp = props.detailPanelExpandedRowIds) != null ? _props$detailPanelExp : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.detailPanel) == null ? void 0 : _props$initialState.expandedRowIds) != null ? _ref : []
13
13
  }
14
14
  });
15
15
  };
@@ -9,12 +9,12 @@ function createPinnedRowsInternalCache(pinnedRows, getRowId) {
9
9
  bottomIds: [],
10
10
  idLookup: {}
11
11
  };
12
- pinnedRows == null ? void 0 : (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.forEach(rowModel => {
12
+ pinnedRows == null || (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.forEach(rowModel => {
13
13
  const id = getRowIdFromRowModel(rowModel, getRowId);
14
14
  cache.topIds.push(id);
15
15
  cache.idLookup[id] = rowModel;
16
16
  });
17
- pinnedRows == null ? void 0 : (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.forEach(rowModel => {
17
+ pinnedRows == null || (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.forEach(rowModel => {
18
18
  const id = getRowIdFromRowModel(rowModel, getRowId);
19
19
  cache.bottomIds.push(id);
20
20
  cache.idLookup[id] = rowModel;
@@ -6,7 +6,7 @@ import { GridPinnedRowsProp } from './gridRowPinningInterface';
6
6
  type GridPinnedRowPosition = keyof GridPinnedRowsProp;
7
7
  export declare function addPinnedRow({ groupingParams, rowModel, rowId, position, apiRef, isAutoGenerated, }: {
8
8
  groupingParams: GridHydrateRowsValue;
9
- rowModel: GridRowModel | undefined;
9
+ rowModel: GridRowModel;
10
10
  rowId: GridRowId;
11
11
  position: GridPinnedRowPosition;
12
12
  apiRef: React.MutableRefObject<GridPrivateApiPro>;
@@ -11,7 +11,7 @@ export function addPinnedRow({
11
11
  apiRef,
12
12
  isAutoGenerated
13
13
  }) {
14
- var _groupingParams$addit, _groupingParams$addit2, _groupingParams$addit3, _groupingParams$addit4;
14
+ var _groupingParams$addit, _groupingParams$addit2;
15
15
  const dataRowIdToModelLookup = _extends({}, groupingParams.dataRowIdToModelLookup);
16
16
  const dataRowIdToIdLookup = _extends({}, groupingParams.dataRowIdToIdLookup);
17
17
  const tree = _extends({}, groupingParams.tree);
@@ -40,7 +40,7 @@ export function addPinnedRow({
40
40
  id: rowId,
41
41
  model: rowModel
42
42
  };
43
- if ((_groupingParams$addit2 = groupingParams.additionalRowGroups) != null && (_groupingParams$addit3 = _groupingParams$addit2.pinnedRows) != null && (_groupingParams$addit4 = _groupingParams$addit3[position]) != null && _groupingParams$addit4.includes(newPinnedRow)) {
43
+ if ((_groupingParams$addit2 = groupingParams.additionalRowGroups) != null && (_groupingParams$addit2 = _groupingParams$addit2.pinnedRows) != null && (_groupingParams$addit2 = _groupingParams$addit2[position]) != null && _groupingParams$addit2.includes(newPinnedRow)) {
44
44
  return _extends({}, groupingParams, {
45
45
  dataRowIdToModelLookup,
46
46
  dataRowIdToIdLookup,
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
3
3
  import { useGridLogger, useGridApiEventHandler, getDataGridUtilityClass, useGridSelector, gridSortModelSelector, gridRowMaximumTreeDepthSelector, useGridApiOptionHandler } from '@mui/x-data-grid';
4
4
  import { gridEditRowsStateSelector } from '@mui/x-data-grid/internals';
5
+ import { GRID_REORDER_COL_DEF } from './gridRowReorderColDef';
5
6
  var Direction = /*#__PURE__*/function (Direction) {
6
7
  Direction[Direction["UP"] = 0] = "UP";
7
8
  Direction[Direction["DOWN"] = 1] = "DOWN";
@@ -66,6 +67,7 @@ export const useGridRowReorder = (apiRef, props) => {
66
67
  dragRowNode.current.classList.remove(classes.rowDragging);
67
68
  });
68
69
  originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
70
+ apiRef.current.setCellFocus(params.id, GRID_REORDER_COL_DEF.field);
69
71
  }, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
70
72
  const handleDragOver = React.useCallback((params, event) => {
71
73
  if (dragRowId === '') {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.10.0
2
+ * @mui/x-data-grid-pro v6.10.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -52,7 +52,7 @@ function GridTreeDataGroupingCell(props) {
52
52
  onClick: handleClick,
53
53
  tabIndex: -1,
54
54
  "aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand')
55
- }, rootProps == null ? void 0 : (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
55
+ }, rootProps == null || (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
56
56
  children: /*#__PURE__*/_jsx(Icon, {
57
57
  fontSize: "inherit"
58
58
  })
@@ -146,7 +146,7 @@ var GridHeaderFilterCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
146
146
  colDef: colDef
147
147
  });
148
148
  var classes = useUtilityClasses(ownerState);
149
- var isNoInputOperator = (filterOperators == null ? void 0 : (_filterOperators$find = filterOperators.find(function (_ref) {
149
+ var isNoInputOperator = (filterOperators == null || (_filterOperators$find = filterOperators.find(function (_ref) {
150
150
  var value = _ref.value;
151
151
  return item.operator === value;
152
152
  })) == null ? void 0 : _filterOperators$find.requiresFilterValue) === false;
@@ -7,11 +7,11 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
7
7
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from './gridDetailPanelToggleColDef';
8
8
  import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowsHeightCacheSelector, gridDetailPanelRawHeightCacheSelector } from './gridDetailPanelSelector';
9
9
  export var detailPanelStateInitializer = function detailPanelStateInitializer(state, props) {
10
- var _ref, _props$detailPanelExp, _props$initialState, _props$initialState$d;
10
+ var _ref, _props$detailPanelExp, _props$initialState;
11
11
  return _extends({}, state, {
12
12
  detailPanel: {
13
13
  heightCache: {},
14
- expandedRowIds: (_ref = (_props$detailPanelExp = props.detailPanelExpandedRowIds) != null ? _props$detailPanelExp : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$d = _props$initialState.detailPanel) == null ? void 0 : _props$initialState$d.expandedRowIds) != null ? _ref : []
14
+ expandedRowIds: (_ref = (_props$detailPanelExp = props.detailPanelExpandedRowIds) != null ? _props$detailPanelExp : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.detailPanel) == null ? void 0 : _props$initialState.expandedRowIds) != null ? _ref : []
15
15
  }
16
16
  });
17
17
  };
@@ -9,12 +9,12 @@ function createPinnedRowsInternalCache(pinnedRows, getRowId) {
9
9
  bottomIds: [],
10
10
  idLookup: {}
11
11
  };
12
- pinnedRows == null ? void 0 : (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.forEach(function (rowModel) {
12
+ pinnedRows == null || (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.forEach(function (rowModel) {
13
13
  var id = getRowIdFromRowModel(rowModel, getRowId);
14
14
  cache.topIds.push(id);
15
15
  cache.idLookup[id] = rowModel;
16
16
  });
17
- pinnedRows == null ? void 0 : (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.forEach(function (rowModel) {
17
+ pinnedRows == null || (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.forEach(function (rowModel) {
18
18
  var id = getRowIdFromRowModel(rowModel, getRowId);
19
19
  cache.bottomIds.push(id);
20
20
  cache.idLookup[id] = rowModel;
@@ -6,7 +6,7 @@ import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
6
6
  import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
7
7
  import { insertNodeInTree } from '../../../utils/tree/utils';
8
8
  export function addPinnedRow(_ref) {
9
- var _groupingParams$addit, _groupingParams$addit2, _groupingParams$addit3, _groupingParams$addit4;
9
+ var _groupingParams$addit, _groupingParams$addit2;
10
10
  var groupingParams = _ref.groupingParams,
11
11
  rowModel = _ref.rowModel,
12
12
  rowId = _ref.rowId,
@@ -41,7 +41,7 @@ export function addPinnedRow(_ref) {
41
41
  id: rowId,
42
42
  model: rowModel
43
43
  };
44
- if ((_groupingParams$addit2 = groupingParams.additionalRowGroups) != null && (_groupingParams$addit3 = _groupingParams$addit2.pinnedRows) != null && (_groupingParams$addit4 = _groupingParams$addit3[position]) != null && _groupingParams$addit4.includes(newPinnedRow)) {
44
+ if ((_groupingParams$addit2 = groupingParams.additionalRowGroups) != null && (_groupingParams$addit2 = _groupingParams$addit2.pinnedRows) != null && (_groupingParams$addit2 = _groupingParams$addit2[position]) != null && _groupingParams$addit2.includes(newPinnedRow)) {
45
45
  return _extends({}, groupingParams, {
46
46
  dataRowIdToModelLookup: dataRowIdToModelLookup,
47
47
  dataRowIdToIdLookup: dataRowIdToIdLookup,
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
4
4
  import { useGridLogger, useGridApiEventHandler, getDataGridUtilityClass, useGridSelector, gridSortModelSelector, gridRowMaximumTreeDepthSelector, useGridApiOptionHandler } from '@mui/x-data-grid';
5
5
  import { gridEditRowsStateSelector } from '@mui/x-data-grid/internals';
6
+ import { GRID_REORDER_COL_DEF } from './gridRowReorderColDef';
6
7
  var Direction = /*#__PURE__*/function (Direction) {
7
8
  Direction[Direction["UP"] = 0] = "UP";
8
9
  Direction[Direction["DOWN"] = 1] = "DOWN";
@@ -68,6 +69,7 @@ export var useGridRowReorder = function useGridRowReorder(apiRef, props) {
68
69
  dragRowNode.current.classList.remove(classes.rowDragging);
69
70
  });
70
71
  originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
72
+ apiRef.current.setCellFocus(params.id, GRID_REORDER_COL_DEF.field);
71
73
  }, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
72
74
  var handleDragOver = React.useCallback(function (params, event) {
73
75
  if (dragRowId === '') {
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.10.0
2
+ * @mui/x-data-grid-pro v6.10.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -11,6 +11,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
11
11
  return Array.from((_elem$querySelectorAl = elem.querySelectorAll("[data-fields*=\"|-".concat(field, "-|\"]"))) != null ? _elem$querySelectorAl : []);
12
12
  }
13
13
  export function findGridCellElementsFromCol(col, api) {
14
+ var _api$virtualScrollerR;
14
15
  var root = findParentElementFromClassName(col, gridClasses.root);
15
16
  if (!root) {
16
17
  throw new Error('MUI: The root element is not found.');
@@ -21,7 +22,12 @@ export function findGridCellElementsFromCol(col, api) {
21
22
  }
22
23
  var colIndex = Number(ariaColIndex) - 1;
23
24
  var cells = [];
24
- var renderedRowElements = root.querySelectorAll(".".concat(gridClasses.row));
25
+ var virtualScrollerContent = (_api$virtualScrollerR = api.virtualScrollerRef) == null || (_api$virtualScrollerR = _api$virtualScrollerR.current) == null ? void 0 : _api$virtualScrollerR.firstElementChild;
26
+ if (!virtualScrollerContent) {
27
+ return [];
28
+ }
29
+ var renderedRowElements = virtualScrollerContent.querySelectorAll(":scope > div > .".concat(gridClasses.row) // Use > to ignore rows from detail panels
30
+ );
25
31
  renderedRowElements.forEach(function (rowElement) {
26
32
  var rowId = rowElement.getAttribute('data-id');
27
33
  if (!rowId) {
@@ -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 = "MTY5MDQwODgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -18,13 +18,13 @@ export var insertDataRowInTree = function insertDataRowInTree(_ref) {
18
18
  defaultGroupingExpansionDepth = _ref.defaultGroupingExpansionDepth;
19
19
  var parentNodeId = GRID_ROOT_GROUP_ID;
20
20
  for (var depth = 0; depth < path.length; depth += 1) {
21
- var _childrenFromPath, _childrenFromPath$fie;
21
+ var _childrenFromPath;
22
22
  var _path$depth = path[depth],
23
23
  key = _path$depth.key,
24
24
  field = _path$depth.field;
25
25
  var fieldWithDefaultValue = field != null ? field : '__no_field__';
26
26
  var keyWithDefaultValue = key != null ? key : '__no_key__';
27
- var existingNodeIdWithPartialPath = (_childrenFromPath = tree[parentNodeId].childrenFromPath) == null ? void 0 : (_childrenFromPath$fie = _childrenFromPath[fieldWithDefaultValue]) == null ? void 0 : _childrenFromPath$fie[keyWithDefaultValue.toString()];
27
+ var existingNodeIdWithPartialPath = (_childrenFromPath = tree[parentNodeId].childrenFromPath) == null || (_childrenFromPath = _childrenFromPath[fieldWithDefaultValue]) == null ? void 0 : _childrenFromPath[keyWithDefaultValue.toString()];
28
28
 
29
29
  // When we reach the last step of the path,
30
30
  // We need to create a node for the row passed to `insertNodeInTree`
@@ -1,5 +1,3 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
3
1
  import _extends from "@babel/runtime/helpers/esm/extends";
4
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
@@ -106,24 +104,16 @@ export var removeNodeFromTree = function removeNodeFromTree(_ref2) {
106
104
  // For groups and leaves,
107
105
  // Unregister the node from its parents `children` and `childrenFromPath` properties.
108
106
  else {
109
- var _groupingField2, _groupingKey2, _parentNode$childrenF3, _parentNode$childrenF4;
107
+ var _groupingField2, _groupingKey2;
110
108
  var groupingField = (_groupingField2 = node.groupingField) != null ? _groupingField2 : '__no_field__';
111
109
  var groupingKey = (_groupingKey2 = node.groupingKey) != null ? _groupingKey2 : '__no_key__';
112
- var _ref3 = (_parentNode$childrenF3 = (_parentNode$childrenF4 = parentNode.childrenFromPath) == null ? void 0 : _parentNode$childrenF4[groupingField]) != null ? _parentNode$childrenF3 : {},
113
- _groupingKey$toString = groupingKey.toString(),
114
- childrenToRemove = _ref3[_groupingKey$toString],
115
- newChildrenFromPathWithField = _objectWithoutProperties(_ref3, [_groupingKey$toString].map(_toPropertyKey));
116
110
 
117
111
  // TODO rows v6: Can we avoid this linear complexity ?
118
112
  var children = parentNode.children.filter(function (childId) {
119
113
  return childId !== node.id;
120
114
  });
121
- var childrenFromPath = _extends({}, parentNode.childrenFromPath);
122
- if (Object.keys(newChildrenFromPathWithField).length === 0) {
123
- delete childrenFromPath[groupingField];
124
- } else {
125
- childrenFromPath[groupingField] = newChildrenFromPathWithField;
126
- }
115
+ var childrenFromPath = parentNode.childrenFromPath;
116
+ delete childrenFromPath[groupingField][groupingKey.toString()];
127
117
  tree[parentNode.id] = _extends({}, parentNode, {
128
118
  children: children,
129
119
  childrenFromPath: childrenFromPath
@@ -134,12 +124,12 @@ export var removeNodeFromTree = function removeNodeFromTree(_ref2) {
134
124
  /**
135
125
  * Updates the `id` and `isAutoGenerated` properties of a group node.
136
126
  */
137
- export var updateGroupNodeIdAndAutoGenerated = function updateGroupNodeIdAndAutoGenerated(_ref4) {
138
- var node = _ref4.node,
139
- updatedNode = _ref4.updatedNode,
140
- previousTree = _ref4.previousTree,
141
- tree = _ref4.tree,
142
- treeDepths = _ref4.treeDepths;
127
+ export var updateGroupNodeIdAndAutoGenerated = function updateGroupNodeIdAndAutoGenerated(_ref3) {
128
+ var node = _ref3.node,
129
+ updatedNode = _ref3.updatedNode,
130
+ previousTree = _ref3.previousTree,
131
+ tree = _ref3.tree,
132
+ treeDepths = _ref3.treeDepths;
143
133
  // 1. Set the new parent for all children from the old group
144
134
  node.children.forEach(function (childId) {
145
135
  tree[childId] = _extends({}, tree[childId], {
@@ -169,9 +159,9 @@ export var createUpdatedGroupsManager = function createUpdatedGroupsManager() {
169
159
  }
170
160
  };
171
161
  };
172
- export var getVisibleRowsLookup = function getVisibleRowsLookup(_ref5) {
173
- var tree = _ref5.tree,
174
- filteredRowsLookup = _ref5.filteredRowsLookup;
162
+ export var getVisibleRowsLookup = function getVisibleRowsLookup(_ref4) {
163
+ var tree = _ref4.tree,
164
+ filteredRowsLookup = _ref4.filteredRowsLookup;
175
165
  if (!filteredRowsLookup) {
176
166
  return {};
177
167
  }
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
3
3
  import { useGridLogger, useGridApiEventHandler, getDataGridUtilityClass, useGridSelector, gridSortModelSelector, gridRowMaximumTreeDepthSelector, useGridApiOptionHandler } from '@mui/x-data-grid';
4
4
  import { gridEditRowsStateSelector } from '@mui/x-data-grid/internals';
5
+ import { GRID_REORDER_COL_DEF } from './gridRowReorderColDef';
5
6
  var Direction = /*#__PURE__*/function (Direction) {
6
7
  Direction[Direction["UP"] = 0] = "UP";
7
8
  Direction[Direction["DOWN"] = 1] = "DOWN";
@@ -66,6 +67,7 @@ export const useGridRowReorder = (apiRef, props) => {
66
67
  dragRowNode.current.classList.remove(classes.rowDragging);
67
68
  });
68
69
  originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
70
+ apiRef.current.setCellFocus(params.id, GRID_REORDER_COL_DEF.field);
69
71
  }, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
70
72
  const handleDragOver = React.useCallback((params, event) => {
71
73
  if (dragRowId === '') {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.10.0
2
+ * @mui/x-data-grid-pro v6.10.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -20,7 +20,13 @@ export function findGridCellElementsFromCol(col, api) {
20
20
  }
21
21
  const colIndex = Number(ariaColIndex) - 1;
22
22
  const cells = [];
23
- const renderedRowElements = root.querySelectorAll(`.${gridClasses.row}`);
23
+ const virtualScrollerContent = api.virtualScrollerRef?.current?.firstElementChild;
24
+ if (!virtualScrollerContent) {
25
+ return [];
26
+ }
27
+ const renderedRowElements = virtualScrollerContent.querySelectorAll(`:scope > div > .${gridClasses.row}` // Use > to ignore rows from detail panels
28
+ );
29
+
24
30
  renderedRowElements.forEach(rowElement => {
25
31
  const rowId = rowElement.getAttribute('data-id');
26
32
  if (!rowId) {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY4OTE5OTIwMDAwMA==";
3
+ const releaseInfo = "MTY5MDQwODgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -1,5 +1,3 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
- import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
3
1
  import _extends from "@babel/runtime/helpers/esm/extends";
4
2
  import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
5
3
  export const getGroupRowIdFromPath = path => {
@@ -106,18 +104,11 @@ export const removeNodeFromTree = ({
106
104
  else {
107
105
  const groupingField = node.groupingField ?? '__no_field__';
108
106
  const groupingKey = node.groupingKey ?? '__no_key__';
109
- const _ref = parentNode.childrenFromPath?.[groupingField] ?? {},
110
- _groupingKey$toString = groupingKey.toString(),
111
- newChildrenFromPathWithField = _objectWithoutPropertiesLoose(_ref, [_groupingKey$toString].map(_toPropertyKey));
112
107
 
113
108
  // TODO rows v6: Can we avoid this linear complexity ?
114
109
  const children = parentNode.children.filter(childId => childId !== node.id);
115
- const childrenFromPath = _extends({}, parentNode.childrenFromPath);
116
- if (Object.keys(newChildrenFromPathWithField).length === 0) {
117
- delete childrenFromPath[groupingField];
118
- } else {
119
- childrenFromPath[groupingField] = newChildrenFromPathWithField;
120
- }
110
+ const childrenFromPath = parentNode.childrenFromPath;
111
+ delete childrenFromPath[groupingField][groupingKey.toString()];
121
112
  tree[parentNode.id] = _extends({}, parentNode, {
122
113
  children,
123
114
  childrenFromPath
@@ -8,6 +8,7 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _utils = require("@mui/utils");
9
9
  var _xDataGrid = require("@mui/x-data-grid");
10
10
  var _internals = require("@mui/x-data-grid/internals");
11
+ var _gridRowReorderColDef = require("./gridRowReorderColDef");
11
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
14
  var Direction = /*#__PURE__*/function (Direction) {
@@ -74,6 +75,7 @@ const useGridRowReorder = (apiRef, props) => {
74
75
  dragRowNode.current.classList.remove(classes.rowDragging);
75
76
  });
76
77
  originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
78
+ apiRef.current.setCellFocus(params.id, _gridRowReorderColDef.GRID_REORDER_COL_DEF.field);
77
79
  }, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
78
80
  const handleDragOver = React.useCallback((params, event) => {
79
81
  if (dragRowId === '') {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.10.0
2
+ * @mui/x-data-grid-pro v6.10.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -29,7 +29,13 @@ function findGridCellElementsFromCol(col, api) {
29
29
  }
30
30
  const colIndex = Number(ariaColIndex) - 1;
31
31
  const cells = [];
32
- const renderedRowElements = root.querySelectorAll(`.${_xDataGrid.gridClasses.row}`);
32
+ const virtualScrollerContent = api.virtualScrollerRef?.current?.firstElementChild;
33
+ if (!virtualScrollerContent) {
34
+ return [];
35
+ }
36
+ const renderedRowElements = virtualScrollerContent.querySelectorAll(`:scope > div > .${_xDataGrid.gridClasses.row}` // Use > to ignore rows from detail panels
37
+ );
38
+
33
39
  renderedRowElements.forEach(rowElement => {
34
40
  const rowId = rowElement.getAttribute('data-id');
35
41
  if (!rowId) {
@@ -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 = "MTY5MDQwODgwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.updateGroupNodeIdAndAutoGenerated = exports.updateGroupDefaultExpansion = exports.removeNodeFromTree = exports.insertNodeInTree = exports.getVisibleRowsLookup = exports.getNodePathInTree = exports.getGroupRowIdFromPath = exports.createUpdatedGroupsManager = void 0;
8
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
- var _toPropertyKey2 = _interopRequireDefault(require("@babel/runtime/helpers/toPropertyKey"));
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
9
  var _xDataGrid = require("@mui/x-data-grid");
12
10
  const getGroupRowIdFromPath = path => {
@@ -117,18 +115,11 @@ const removeNodeFromTree = ({
117
115
  else {
118
116
  const groupingField = node.groupingField ?? '__no_field__';
119
117
  const groupingKey = node.groupingKey ?? '__no_key__';
120
- const _ref = parentNode.childrenFromPath?.[groupingField] ?? {},
121
- _groupingKey$toString = groupingKey.toString(),
122
- newChildrenFromPathWithField = (0, _objectWithoutPropertiesLoose2.default)(_ref, [_groupingKey$toString].map(_toPropertyKey2.default));
123
118
 
124
119
  // TODO rows v6: Can we avoid this linear complexity ?
125
120
  const children = parentNode.children.filter(childId => childId !== node.id);
126
- const childrenFromPath = (0, _extends2.default)({}, parentNode.childrenFromPath);
127
- if (Object.keys(newChildrenFromPathWithField).length === 0) {
128
- delete childrenFromPath[groupingField];
129
- } else {
130
- childrenFromPath[groupingField] = newChildrenFromPathWithField;
131
- }
121
+ const childrenFromPath = parentNode.childrenFromPath;
122
+ delete childrenFromPath[groupingField][groupingKey.toString()];
132
123
  tree[parentNode.id] = (0, _extends2.default)({}, parentNode, {
133
124
  children,
134
125
  childrenFromPath
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "6.10.0",
3
+ "version": "6.10.2",
4
4
  "description": "The Pro 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-pro"
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-license-pro": "6.10.0",
34
+ "@babel/runtime": "^7.22.6",
35
+ "@mui/utils": "^5.13.7",
36
+ "@mui/x-data-grid": "6.10.2",
37
+ "@mui/x-license-pro": "6.10.2",
38
38
  "@types/format-util": "^1.0.2",
39
39
  "clsx": "^1.2.1",
40
40
  "prop-types": "^15.8.1",
@@ -1,5 +1,5 @@
1
- import { GridApiPro } from '../models/gridApiPro';
1
+ import { GridPrivateApiPro } from '../models/gridApiPro';
2
2
  export declare function getFieldFromHeaderElem(colCellEl: Element): string;
3
3
  export declare function findHeaderElementFromField(elem: Element, field: string): Element | null;
4
4
  export declare function findGroupHeaderElementsFromField(elem: Element, field: string): Element[];
5
- export declare function findGridCellElementsFromCol(col: HTMLElement, api: GridApiPro): Element[];
5
+ export declare function findGridCellElementsFromCol(col: HTMLElement, api: GridPrivateApiPro): Element[];
package/utils/domUtils.js CHANGED
@@ -11,6 +11,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
11
11
  return Array.from((_elem$querySelectorAl = elem.querySelectorAll(`[data-fields*="|-${field}-|"]`)) != null ? _elem$querySelectorAl : []);
12
12
  }
13
13
  export function findGridCellElementsFromCol(col, api) {
14
+ var _api$virtualScrollerR;
14
15
  const root = findParentElementFromClassName(col, gridClasses.root);
15
16
  if (!root) {
16
17
  throw new Error('MUI: The root element is not found.');
@@ -21,7 +22,13 @@ export function findGridCellElementsFromCol(col, api) {
21
22
  }
22
23
  const colIndex = Number(ariaColIndex) - 1;
23
24
  const cells = [];
24
- const renderedRowElements = root.querySelectorAll(`.${gridClasses.row}`);
25
+ const virtualScrollerContent = (_api$virtualScrollerR = api.virtualScrollerRef) == null || (_api$virtualScrollerR = _api$virtualScrollerR.current) == null ? void 0 : _api$virtualScrollerR.firstElementChild;
26
+ if (!virtualScrollerContent) {
27
+ return [];
28
+ }
29
+ const renderedRowElements = virtualScrollerContent.querySelectorAll(`:scope > div > .${gridClasses.row}` // Use > to ignore rows from detail panels
30
+ );
31
+
25
32
  renderedRowElements.forEach(rowElement => {
26
33
  const rowId = rowElement.getAttribute('data-id');
27
34
  if (!rowId) {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY4OTE5OTIwMDAwMA==";
3
+ const releaseInfo = "MTY5MDQwODgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -19,14 +19,14 @@ export const insertDataRowInTree = ({
19
19
  }) => {
20
20
  let parentNodeId = GRID_ROOT_GROUP_ID;
21
21
  for (let depth = 0; depth < path.length; depth += 1) {
22
- var _childrenFromPath, _childrenFromPath$fie;
22
+ var _childrenFromPath;
23
23
  const {
24
24
  key,
25
25
  field
26
26
  } = path[depth];
27
27
  const fieldWithDefaultValue = field != null ? field : '__no_field__';
28
28
  const keyWithDefaultValue = key != null ? key : '__no_key__';
29
- const existingNodeIdWithPartialPath = (_childrenFromPath = tree[parentNodeId].childrenFromPath) == null ? void 0 : (_childrenFromPath$fie = _childrenFromPath[fieldWithDefaultValue]) == null ? void 0 : _childrenFromPath$fie[keyWithDefaultValue.toString()];
29
+ const existingNodeIdWithPartialPath = (_childrenFromPath = tree[parentNodeId].childrenFromPath) == null || (_childrenFromPath = _childrenFromPath[fieldWithDefaultValue]) == null ? void 0 : _childrenFromPath[keyWithDefaultValue.toString()];
30
30
 
31
31
  // When we reach the last step of the path,
32
32
  // We need to create a node for the row passed to `insertNodeInTree`
@@ -1,5 +1,3 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
- import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
3
1
  import _extends from "@babel/runtime/helpers/esm/extends";
4
2
  import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
5
3
  export const getGroupRowIdFromPath = path => {
@@ -106,21 +104,14 @@ export const removeNodeFromTree = ({
106
104
  // For groups and leaves,
107
105
  // Unregister the node from its parents `children` and `childrenFromPath` properties.
108
106
  else {
109
- var _groupingField2, _groupingKey2, _parentNode$childrenF2, _parentNode$childrenF3;
107
+ var _groupingField2, _groupingKey2;
110
108
  const groupingField = (_groupingField2 = node.groupingField) != null ? _groupingField2 : '__no_field__';
111
109
  const groupingKey = (_groupingKey2 = node.groupingKey) != null ? _groupingKey2 : '__no_key__';
112
- const _ref = (_parentNode$childrenF2 = (_parentNode$childrenF3 = parentNode.childrenFromPath) == null ? void 0 : _parentNode$childrenF3[groupingField]) != null ? _parentNode$childrenF2 : {},
113
- _groupingKey$toString = groupingKey.toString(),
114
- newChildrenFromPathWithField = _objectWithoutPropertiesLoose(_ref, [_groupingKey$toString].map(_toPropertyKey));
115
110
 
116
111
  // TODO rows v6: Can we avoid this linear complexity ?
117
112
  const children = parentNode.children.filter(childId => childId !== node.id);
118
- const childrenFromPath = _extends({}, parentNode.childrenFromPath);
119
- if (Object.keys(newChildrenFromPathWithField).length === 0) {
120
- delete childrenFromPath[groupingField];
121
- } else {
122
- childrenFromPath[groupingField] = newChildrenFromPathWithField;
123
- }
113
+ const childrenFromPath = parentNode.childrenFromPath;
114
+ delete childrenFromPath[groupingField][groupingKey.toString()];
124
115
  tree[parentNode.id] = _extends({}, parentNode, {
125
116
  children,
126
117
  childrenFromPath