@mui/x-data-grid 8.14.1 → 8.15.0

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 (106) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/components/GridScrollShadows.js +23 -3
  3. package/constants/gridClasses.d.ts +12 -0
  4. package/constants/gridClasses.js +1 -1
  5. package/constants/localeTextConstants.js +2 -1
  6. package/esm/components/GridScrollShadows.js +22 -3
  7. package/esm/constants/gridClasses.d.ts +12 -0
  8. package/esm/constants/gridClasses.js +1 -1
  9. package/esm/constants/localeTextConstants.js +2 -1
  10. package/esm/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +6 -4
  11. package/esm/hooks/features/dataSource/models.d.ts +28 -28
  12. package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  13. package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -14
  14. package/esm/hooks/features/dataSource/utils.d.ts +2 -1
  15. package/esm/hooks/features/dataSource/utils.js +2 -1
  16. package/esm/index.js +1 -1
  17. package/esm/internals/index.d.ts +1 -1
  18. package/esm/locales/arSD.js +1 -0
  19. package/esm/locales/beBY.js +1 -0
  20. package/esm/locales/bgBG.js +1 -0
  21. package/esm/locales/bnBD.js +1 -0
  22. package/esm/locales/csCZ.js +1 -0
  23. package/esm/locales/daDK.js +1 -0
  24. package/esm/locales/deDE.js +1 -0
  25. package/esm/locales/elGR.js +1 -0
  26. package/esm/locales/esES.js +1 -0
  27. package/esm/locales/faIR.js +1 -0
  28. package/esm/locales/fiFI.js +1 -0
  29. package/esm/locales/frFR.js +1 -0
  30. package/esm/locales/heIL.js +1 -0
  31. package/esm/locales/hrHR.js +1 -0
  32. package/esm/locales/huHU.js +1 -0
  33. package/esm/locales/hyAM.js +1 -0
  34. package/esm/locales/idID.js +1 -0
  35. package/esm/locales/isIS.js +1 -0
  36. package/esm/locales/itIT.js +1 -0
  37. package/esm/locales/jaJP.js +1 -0
  38. package/esm/locales/koKR.js +1 -0
  39. package/esm/locales/nbNO.js +1 -0
  40. package/esm/locales/nlNL.js +1 -0
  41. package/esm/locales/nnNO.js +1 -0
  42. package/esm/locales/plPL.js +1 -0
  43. package/esm/locales/ptBR.js +1 -0
  44. package/esm/locales/ptPT.js +1 -0
  45. package/esm/locales/roRO.js +1 -0
  46. package/esm/locales/ruRU.js +1 -0
  47. package/esm/locales/skSK.js +1 -0
  48. package/esm/locales/svSE.js +1 -0
  49. package/esm/locales/trTR.js +1 -0
  50. package/esm/locales/ukUA.js +1 -0
  51. package/esm/locales/urPK.js +1 -0
  52. package/esm/locales/viVN.js +1 -0
  53. package/esm/locales/zhCN.js +1 -0
  54. package/esm/locales/zhHK.js +1 -0
  55. package/esm/locales/zhTW.js +1 -0
  56. package/esm/models/api/gridLocaleTextApi.d.ts +1 -0
  57. package/esm/models/gridDataSource.d.ts +13 -0
  58. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +6 -4
  59. package/hooks/features/dataSource/models.d.ts +28 -28
  60. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  61. package/hooks/features/dataSource/useGridDataSourceBase.js +27 -14
  62. package/hooks/features/dataSource/utils.d.ts +2 -1
  63. package/hooks/features/dataSource/utils.js +2 -1
  64. package/index.js +1 -1
  65. package/internals/index.d.ts +1 -1
  66. package/locales/arSD.js +1 -0
  67. package/locales/beBY.js +1 -0
  68. package/locales/bgBG.js +1 -0
  69. package/locales/bnBD.js +1 -0
  70. package/locales/csCZ.js +1 -0
  71. package/locales/daDK.js +1 -0
  72. package/locales/deDE.js +1 -0
  73. package/locales/elGR.js +1 -0
  74. package/locales/esES.js +1 -0
  75. package/locales/faIR.js +1 -0
  76. package/locales/fiFI.js +1 -0
  77. package/locales/frFR.js +1 -0
  78. package/locales/heIL.js +1 -0
  79. package/locales/hrHR.js +1 -0
  80. package/locales/huHU.js +1 -0
  81. package/locales/hyAM.js +1 -0
  82. package/locales/idID.js +1 -0
  83. package/locales/isIS.js +1 -0
  84. package/locales/itIT.js +1 -0
  85. package/locales/jaJP.js +1 -0
  86. package/locales/koKR.js +1 -0
  87. package/locales/nbNO.js +1 -0
  88. package/locales/nlNL.js +1 -0
  89. package/locales/nnNO.js +1 -0
  90. package/locales/plPL.js +1 -0
  91. package/locales/ptBR.js +1 -0
  92. package/locales/ptPT.js +1 -0
  93. package/locales/roRO.js +1 -0
  94. package/locales/ruRU.js +1 -0
  95. package/locales/skSK.js +1 -0
  96. package/locales/svSE.js +1 -0
  97. package/locales/trTR.js +1 -0
  98. package/locales/ukUA.js +1 -0
  99. package/locales/urPK.js +1 -0
  100. package/locales/viVN.js +1 -0
  101. package/locales/zhCN.js +1 -0
  102. package/locales/zhHK.js +1 -0
  103. package/locales/zhTW.js +1 -0
  104. package/models/api/gridLocaleTextApi.d.ts +1 -0
  105. package/models/gridDataSource.d.ts +13 -0
  106. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,113 @@
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.15.0
9
+
10
+ _Oct 23, 2025_
11
+
12
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🖌️ Add new [`brush` charts interaction](https://mui.com/x/react-charts/brush/) for building custom behavior.
15
+ ![brush visualization example](https://github.com/user-attachments/assets/60c382a1-e418-4736-8dcb-1567c4e361e3)
16
+ - ⚡️ Performance improvements for large bar charts
17
+ - 🤖 Data Grid AI assistant can now [visualize the query results](https://mui.com/x/react-data-grid/ai-assistant/#data-visualization) by controlling the chart integration settings
18
+ - 📦 DataGrid uses an internal MUI fork of ExcelJS that does not depend on vulnerable versions of NPM packages
19
+ - 🐞 Bugfixes
20
+ - 📚 Documentation improvements
21
+
22
+ Special thanks go out to the community members for their valuable contributions:
23
+ @ZagrebaAlex
24
+
25
+ The following are all team members who have contributed to this release:
26
+ @alexfauquette, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @prakhargupta1, @rita-codes, @siriwatknp, @arminmeh, @brijeshb42, @noraleonte
27
+
28
+ ### Data Grid
29
+
30
+ #### `@mui/x-data-grid@8.15.0`
31
+
32
+ - [DataGrid] Fix `dataSource.fetchRows` API's return type (#20068) @arminmeh
33
+
34
+ #### `@mui/x-data-grid-pro@8.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
35
+
36
+ Same changes as in `@mui/x-data-grid@8.15.0`, plus:
37
+
38
+ - [DataGridPro] Keep children in the tree after parent row is re-fetched with the data source (#19934) @arminmeh
39
+ - [DataGridPro] Support scroll shadows customization (#19982) @KenanYusuf
40
+
41
+ #### `@mui/x-data-grid-premium@8.15.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
42
+
43
+ Same changes as in `@mui/x-data-grid-pro@8.15.0`, plus:
44
+
45
+ - [DataGridPremium] Use ExcelJS fork (#19796) @cherniavskii
46
+ - [DataGridPremium] Support data visualization in AI Assistant (#19831) @arminmeh
47
+
48
+ ### Date and Time Pickers
49
+
50
+ #### `@mui/x-date-pickers@8.15.0`
51
+
52
+ Internal changes.
53
+
54
+ #### `@mui/x-date-pickers-pro@8.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
55
+
56
+ Same changes as in `@mui/x-date-pickers@8.15.0`.
57
+
58
+ ### Charts
59
+
60
+ #### `@mui/x-charts@8.15.0`
61
+
62
+ - [charts] Add `ChartsBrushOverlay` and allow brush configuration (#19956) @JCQuintas
63
+ - [charts] Add `getStringSize` benchmark. Remove benchmarks from built package. (#19995) @bernardobelchior
64
+ - [charts] Batch string size measurement (#19994) @bernardobelchior
65
+ - [charts] Fix console issue (#20025) @JCQuintas
66
+ - [charts] Fix is[ZoomFeature]Enabled type (#20058) @alexfauquette
67
+ - [charts] Fix reference line middle spacing (#20004) @JCQuintas
68
+ - [charts] Improve `getStringSize` and `batchMeasureStrings` performance (#19996) @bernardobelchior
69
+ - [charts] Improve deep export script (#20007) @JCQuintas
70
+ - [charts] Improve string measurement benchmarks (#19999) @bernardobelchior
71
+ - [charts] Measure string sizes using SVG elements (#19981) @bernardobelchior
72
+ - [l10n] Improve Greek (gr-GR) locale (#20060) @ZagrebaAlex
73
+
74
+ #### `@mui/x-charts-pro@8.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
75
+
76
+ Same changes as in `@mui/x-charts@8.15.0`, plus:
77
+
78
+ - [charts-pro] Fix pan with `axis.reverse` (#20031) @JCQuintas
79
+
80
+ #### `@mui/x-charts-premium@8.15.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
81
+
82
+ Same changes as in `@mui/x-charts-pro@8.15.0`.
83
+
84
+ ### Tree View
85
+
86
+ #### `@mui/x-tree-view@8.15.0`
87
+
88
+ - [tree view] Multi character type-ahead (#19942) @noraleonte
89
+
90
+ #### `@mui/x-tree-view-pro@8.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
91
+
92
+ Same changes as in `@mui/x-tree-view@8.15.0`.
93
+
94
+ ### Codemod
95
+
96
+ #### `@mui/x-codemod@8.14.0`
97
+
98
+ Internal changes.
99
+
100
+ ### Docs
101
+
102
+ - [docs] Add overview section for scatter chart and heatmap (#19888) @prakhargupta1
103
+ - [docs] Add charts bell curve example (#20003) @JCQuintas
104
+ - [docs] Add grouped multiple fields for Data Grid row grouping recipe (#19964) @siriwatknp
105
+ - [docs] Add Data Grid loading state recipe (#19958) @siriwatknp
106
+
107
+ ### Core
108
+
109
+ - [code-infra] Remove @mui/monorepo usage for react versioning (#19894) @Janpot
110
+ - [code-infra] Remove invalid `environment: 'browser'` from vitest browser config (#19993) @bernardobelchior
111
+ - [code-infra] Remove unused babel aliases (#19987) @Janpot
112
+ - [code-infra] Turn on all testing-library eslint rules (#19946) @brijeshb42
113
+ - [docs-infra] Fix broken hash link (#20062) @Janpot
114
+
8
115
  ## 8.14.1
9
116
 
10
117
  _Oct 16, 2025_
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  'use client';
3
3
 
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
6
  Object.defineProperty(exports, "__esModule", {
6
7
  value: true
@@ -9,14 +10,30 @@ exports.GridScrollShadows = GridScrollShadows;
9
10
  var React = _interopRequireWildcard(require("react"));
10
11
  var _system = require("@mui/system");
11
12
  var _RtlProvider = require("@mui/system/RtlProvider");
13
+ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
12
14
  var _hooks = require("../hooks");
13
15
  var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
14
16
  var _useGridRootProps = require("../hooks/utils/useGridRootProps");
15
17
  var _cssVariables = require("../constants/cssVariables");
16
18
  var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
17
19
  var _gridDimensionsSelectors = require("../hooks/features/dimensions/gridDimensionsSelectors");
20
+ var _constants = require("../constants");
18
21
  var _jsxRuntime = require("react/jsx-runtime");
19
- const ScrollShadow = (0, _system.styled)('div')(({
22
+ const useUtilityClasses = ownerState => {
23
+ const {
24
+ classes,
25
+ position
26
+ } = ownerState;
27
+ const slots = {
28
+ root: ['scrollShadow', `scrollShadow--${position}`]
29
+ };
30
+ return (0, _composeClasses.default)(slots, _constants.getDataGridUtilityClass, classes);
31
+ };
32
+ const ScrollShadow = (0, _system.styled)('div', {
33
+ name: 'MuiDataGrid',
34
+ slot: 'ScrollShadow',
35
+ overridesResolver: (props, styles) => [styles.root, styles[props.position]]
36
+ })(({
20
37
  theme
21
38
  }) => ({
22
39
  position: 'absolute',
@@ -30,8 +47,9 @@ const ScrollShadow = (0, _system.styled)('div')(({
30
47
  '--opacity': theme.palette.mode === 'dark' ? '0.7' : '0.18',
31
48
  '--blur': 'var(--length)',
32
49
  '--spread': 'calc(var(--length) * -1)',
33
- '--color-start': 'rgba(0, 0, 0, calc(var(--hasScrollStart) * var(--opacity)))',
34
- '--color-end': 'rgba(0, 0, 0, calc(var(--hasScrollEnd) * var(--opacity)))',
50
+ '--color': '0, 0, 0',
51
+ '--color-start': 'rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))',
52
+ '--color-end': 'rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))',
35
53
  variants: [{
36
54
  props: {
37
55
  position: 'vertical'
@@ -61,6 +79,7 @@ function GridScrollShadows(props) {
61
79
  classes: rootProps.classes,
62
80
  position
63
81
  };
82
+ const classes = useUtilityClasses(ownerState);
64
83
  const ref = React.useRef(null);
65
84
  const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
66
85
  const hasScrollX = (0, _hooks.useGridSelector)(apiRef, _gridDimensionsSelectors.gridHasScrollXSelector);
@@ -98,6 +117,7 @@ function GridScrollShadows(props) {
98
117
  updateScrollShadowVisibility((position === 'horizontal' ? apiRef.current.virtualScrollerRef?.current?.scrollLeft : apiRef.current.virtualScrollerRef?.current?.scrollTop) ?? 0);
99
118
  }, [updateScrollShadowVisibility, apiRef, position]);
100
119
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ScrollShadow, {
120
+ className: classes.root,
101
121
  ownerState: ownerState,
102
122
  ref: ref,
103
123
  style: {
@@ -676,6 +676,18 @@ export interface GridClasses {
676
676
  * Styles applied to the scrollbar filler cell.
677
677
  */
678
678
  'scrollbarFiller--pinnedRight': string;
679
+ /**
680
+ * Styles applied to the scroll shadow element.
681
+ */
682
+ scrollShadow: string;
683
+ /**
684
+ * Styles applied to the horizontal scroll shadow element.
685
+ */
686
+ 'scrollShadow--horizontal': string;
687
+ /**
688
+ * Styles applied to the vertical scroll shadow element.
689
+ */
690
+ 'scrollShadow--vertical': string;
679
691
  /**
680
692
  * Styles applied to the footer selected row count element.
681
693
  */
@@ -13,4 +13,4 @@ function getDataGridUtilityClass(slot) {
13
13
  }
14
14
  const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
15
15
  // TODO v9: Rename to `cell--dragging`
16
- 'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
16
+ 'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
@@ -290,5 +290,6 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
290
290
  promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
291
291
  promptChangePivotRowsLabel: count => `Rows (${count})`,
292
292
  promptChangePivotValuesLabel: count => `Values (${count})`,
293
- promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
293
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
294
+ promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
294
295
  };
@@ -3,14 +3,30 @@
3
3
  import * as React from 'react';
4
4
  import { styled } from '@mui/system';
5
5
  import { useRtl } from '@mui/system/RtlProvider';
6
+ import composeClasses from '@mui/utils/composeClasses';
6
7
  import { gridDimensionsSelector, gridPinnedColumnsSelector, useGridEvent, useGridSelector } from "../hooks/index.js";
7
8
  import { gridPinnedRowsSelector } from "../hooks/features/rows/gridRowsSelector.js";
8
9
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
9
10
  import { vars } from "../constants/cssVariables.js";
10
11
  import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
11
12
  import { gridHasScrollXSelector, gridHasScrollYSelector } from "../hooks/features/dimensions/gridDimensionsSelectors.js";
13
+ import { getDataGridUtilityClass } from "../constants/index.js";
12
14
  import { jsx as _jsx } from "react/jsx-runtime";
13
- const ScrollShadow = styled('div')(({
15
+ const useUtilityClasses = ownerState => {
16
+ const {
17
+ classes,
18
+ position
19
+ } = ownerState;
20
+ const slots = {
21
+ root: ['scrollShadow', `scrollShadow--${position}`]
22
+ };
23
+ return composeClasses(slots, getDataGridUtilityClass, classes);
24
+ };
25
+ const ScrollShadow = styled('div', {
26
+ name: 'MuiDataGrid',
27
+ slot: 'ScrollShadow',
28
+ overridesResolver: (props, styles) => [styles.root, styles[props.position]]
29
+ })(({
14
30
  theme
15
31
  }) => ({
16
32
  position: 'absolute',
@@ -24,8 +40,9 @@ const ScrollShadow = styled('div')(({
24
40
  '--opacity': theme.palette.mode === 'dark' ? '0.7' : '0.18',
25
41
  '--blur': 'var(--length)',
26
42
  '--spread': 'calc(var(--length) * -1)',
27
- '--color-start': 'rgba(0, 0, 0, calc(var(--hasScrollStart) * var(--opacity)))',
28
- '--color-end': 'rgba(0, 0, 0, calc(var(--hasScrollEnd) * var(--opacity)))',
43
+ '--color': '0, 0, 0',
44
+ '--color-start': 'rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))',
45
+ '--color-end': 'rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))',
29
46
  variants: [{
30
47
  props: {
31
48
  position: 'vertical'
@@ -55,6 +72,7 @@ function GridScrollShadows(props) {
55
72
  classes: rootProps.classes,
56
73
  position
57
74
  };
75
+ const classes = useUtilityClasses(ownerState);
58
76
  const ref = React.useRef(null);
59
77
  const apiRef = useGridPrivateApiContext();
60
78
  const hasScrollX = useGridSelector(apiRef, gridHasScrollXSelector);
@@ -92,6 +110,7 @@ function GridScrollShadows(props) {
92
110
  updateScrollShadowVisibility((position === 'horizontal' ? apiRef.current.virtualScrollerRef?.current?.scrollLeft : apiRef.current.virtualScrollerRef?.current?.scrollTop) ?? 0);
93
111
  }, [updateScrollShadowVisibility, apiRef, position]);
94
112
  return /*#__PURE__*/_jsx(ScrollShadow, {
113
+ className: classes.root,
95
114
  ownerState: ownerState,
96
115
  ref: ref,
97
116
  style: {
@@ -676,6 +676,18 @@ export interface GridClasses {
676
676
  * Styles applied to the scrollbar filler cell.
677
677
  */
678
678
  'scrollbarFiller--pinnedRight': string;
679
+ /**
680
+ * Styles applied to the scroll shadow element.
681
+ */
682
+ scrollShadow: string;
683
+ /**
684
+ * Styles applied to the horizontal scroll shadow element.
685
+ */
686
+ 'scrollShadow--horizontal': string;
687
+ /**
688
+ * Styles applied to the vertical scroll shadow element.
689
+ */
690
+ 'scrollShadow--vertical': string;
679
691
  /**
680
692
  * Styles applied to the footer selected row count element.
681
693
  */
@@ -5,4 +5,4 @@ export function getDataGridUtilityClass(slot) {
5
5
  }
6
6
  export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
7
7
  // TODO v9: Rename to `cell--dragging`
8
- 'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
8
+ 'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
@@ -284,5 +284,6 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
284
284
  promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
285
285
  promptChangePivotRowsLabel: count => `Rows (${count})`,
286
286
  promptChangePivotValuesLabel: count => `Values (${count})`,
287
- promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
287
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
288
+ promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
288
289
  };
@@ -1,7 +1,7 @@
1
- import { GridRowTreeCreationParams, GridRowTreeCreationValue, GridRowsState } from "../../features/rows/gridRowsInterfaces.js";
2
- import { GridFilteringMethodParams, GridFilteringMethodValue, GridFilterState, GridVisibleRowsLookupState } from "../../features/filter/gridFilterState.js";
3
- import { GridSortingMethodParams, GridSortingMethodValue } from "../../features/sorting/gridSortingState.js";
4
- import { GridGetRowsParams, GridGetRowsResponse } from "../../../models/gridDataSource.js";
1
+ import type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridRowsState } from "../../features/rows/gridRowsInterfaces.js";
2
+ import type { GridFilteringMethodParams, GridFilteringMethodValue, GridFilterState, GridVisibleRowsLookupState } from "../../features/filter/gridFilterState.js";
3
+ import type { GridSortingMethodParams, GridSortingMethodValue } from "../../features/sorting/gridSortingState.js";
4
+ import type { GridGetRowsParams, GridGetRowsResponse, GridGetRowsOptions } from "../../../models/gridDataSource.js";
5
5
  export type GridStrategyProcessorName = keyof GridStrategyProcessingLookup;
6
6
  export declare enum GridStrategyGroup {
7
7
  DataSource = "dataSource",
@@ -14,9 +14,11 @@ export interface GridStrategyProcessingLookup {
14
14
  params: {
15
15
  response: GridGetRowsResponse;
16
16
  fetchParams: GridGetRowsParams;
17
+ options: GridGetRowsOptions;
17
18
  } | {
18
19
  error: Error;
19
20
  fetchParams: GridGetRowsParams;
21
+ options: GridGetRowsOptions;
20
22
  };
21
23
  value: void;
22
24
  };
@@ -1,40 +1,40 @@
1
- import type { GridDataSourceCache, GridGetRowsParams, GridUpdateRowParams } from "../../../models/gridDataSource.js";
1
+ import type { GridDataSourceCache, GridGetRowsParams, GridUpdateRowParams, GridGetRowsOptions } from "../../../models/gridDataSource.js";
2
2
  import type { GridRowId, GridRowModel } from "../../../models/gridRows.js";
3
3
  import type { GridDataSourceCacheDefaultConfig } from "./cache.js";
4
4
  /**
5
5
  * The parameters for the `fetchRows` method.
6
6
  */
7
- export interface GridDataSourceFetchRowsParams extends Partial<GridGetRowsParams> {
8
- /**
9
- * If `true`, bypasses the cache and forces a refetch of the rows from the server.
10
- */
11
- skipCache?: boolean;
12
- }
13
- export interface GridDataSourceApiBase {
14
- /**
15
- * Fetches the rows from the server.
16
- * If no `parentId` option is provided, it fetches the root rows.
17
- * Any missing parameter from `params` will be filled from the state (sorting, filtering, etc.).
18
- * @param {GridRowId} parentId The id of the parent node (default: `GRID_ROOT_GROUP_ID`).
19
- * @param {GridDataSourceFetchRowsParams} params Request parameters override.
20
- */
21
- fetchRows: (parentId?: GridRowId, params?: GridDataSourceFetchRowsParams) => void;
22
- /**
23
- * The data source cache object.
24
- */
25
- cache: GridDataSourceCache;
26
- /**
27
- * Syncs the row with the server and updates in the grid.
28
- * @param {GridUpdateRowParams} params The parameters for the edit operation.
29
- * @returns {Promise<GridRowModel> | undefined} The updated row or `undefined` if `dataSource.updateRow` is not passed.
30
- */
31
- editRow: (params: GridUpdateRowParams) => Promise<GridRowModel> | undefined;
32
- }
7
+ export type GridDataSourceFetchRowsParams<T> = Partial<T> & GridGetRowsOptions;
33
8
  export interface GridDataSourceApi {
34
9
  /**
35
10
  * The data source API.
36
11
  */
37
- dataSource: GridDataSourceApiBase;
12
+ dataSource: {
13
+ /**
14
+ * Fetches the rows from the server.
15
+ * If no `parentId` option is provided, it fetches the root rows.
16
+ * Any missing parameter from `params` will be filled from the state (sorting, filtering, etc.).
17
+ * @param {GridRowId} parentId The id of the parent node (default: `GRID_ROOT_GROUP_ID`).
18
+ * @param {GridDataSourceFetchRowsParams<GridGetRowsParams>} params Request parameters override.
19
+ * @returns {Promise<void>} A promise that resolves when the rows are fetched.
20
+ */
21
+ fetchRows: (parentId?: GridRowId, params?: GridDataSourceFetchRowsParams<GridGetRowsParams>) => Promise<void>;
22
+ /**
23
+ * The data source cache object.
24
+ */
25
+ cache: GridDataSourceCache;
26
+ /**
27
+ * Syncs the row with the server and updates in the grid.
28
+ * @param {GridUpdateRowParams} params The parameters for the edit operation.
29
+ * @returns {Promise<GridRowModel> | undefined} The updated row or `undefined` if `dataSource.updateRow` is not passed.
30
+ */
31
+ editRow: (params: GridUpdateRowParams) => Promise<GridRowModel> | undefined;
32
+ };
33
+ }
34
+ export interface GridDataSourceApiBase {
35
+ fetchRows: GridDataSourceApi['dataSource']['fetchRows'];
36
+ cache: GridDataSourceApi['dataSource']['cache'];
37
+ editRow: GridDataSourceApi['dataSource']['editRow'];
38
38
  }
39
39
  export interface GridDataSourceBaseOptions {
40
40
  cacheOptions?: GridDataSourceCacheDefaultConfig;
@@ -10,7 +10,7 @@ export declare const useGridDataSourceBase: <Api extends GridPrivateApiCommunity
10
10
  api: {
11
11
  public: GridDataSourceApi;
12
12
  };
13
- debouncedFetchRows: ((parentId?: import("@mui/x-data-grid").GridRowId, params?: import("./models.js").GridDataSourceFetchRowsParams) => void) & import("@mui/utils/debounce").Cancelable;
13
+ debouncedFetchRows: ((parentId?: import("@mui/x-data-grid").GridRowId, params?: import("./models.js").GridDataSourceFetchRowsParams<import("@mui/x-data-grid").GridGetRowsParams>) => Promise<void>) & import("@mui/utils/debounce").Cancelable;
14
14
  strategyProcessor: {
15
15
  strategyName: DataSourceRowsUpdateStrategy;
16
16
  group: "dataSourceRowsUpdate";
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["skipCache"];
5
+ const _excluded = ["skipCache", "keepChildrenExpanded"];
6
6
  import * as React from 'react';
7
7
  import useLazyRef from '@mui/utils/useLazyRef';
8
8
  import debounce from '@mui/utils/debounce';
@@ -33,8 +33,8 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
33
33
  apiRef.current.setStrategyAvailability(GridStrategyGroup.DataSource, DataSourceRowsUpdateStrategy.Default, props.dataSource ? () => true : () => false);
34
34
  }, [apiRef, props.dataSource]);
35
35
  const [currentStrategy, setCurrentStrategy] = React.useState(apiRef.current.getActiveStrategy(GridStrategyGroup.DataSource));
36
- const defaultRowsUpdateStrategyActive = React.useMemo(() => {
37
- return currentStrategy === DataSourceRowsUpdateStrategy.Default;
36
+ const standardRowsUpdateStrategyActive = React.useMemo(() => {
37
+ return currentStrategy === DataSourceRowsUpdateStrategy.Default || currentStrategy === DataSourceRowsUpdateStrategy.GroupedData;
38
38
  }, [currentStrategy]);
39
39
  const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
40
40
  const lastRequestId = React.useRef(0);
@@ -60,7 +60,8 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
60
60
  options.clearDataSourceState?.();
61
61
  const _ref = params || {},
62
62
  {
63
- skipCache
63
+ skipCache,
64
+ keepChildrenExpanded
64
65
  } = _ref,
65
66
  getRowsParams = _objectWithoutPropertiesLoose(_ref, _excluded);
66
67
  const fetchParams = _extends({}, gridGetRowsParamsSelector(apiRef), apiRef.current.unstable_applyPipeProcessors('getRowsParams', {}), getRowsParams);
@@ -69,13 +70,17 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
69
70
  if (!skipCache && responses.every(response => response !== undefined)) {
70
71
  apiRef.current.applyStrategyProcessor('dataSourceRowsUpdate', {
71
72
  response: CacheChunkManager.mergeResponses(responses),
72
- fetchParams
73
+ fetchParams,
74
+ options: {
75
+ skipCache,
76
+ keepChildrenExpanded
77
+ }
73
78
  });
74
79
  return;
75
80
  }
76
81
 
77
82
  // Manage loading state only for the default strategy
78
- if (defaultRowsUpdateStrategyActive || apiRef.current.getRowsCount() === 0) {
83
+ if (standardRowsUpdateStrategyActive || apiRef.current.getRowsCount() === 0) {
79
84
  apiRef.current.setLoading(true);
80
85
  }
81
86
  const requestId = lastRequestId.current + 1;
@@ -87,14 +92,22 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
87
92
  if (lastRequestId.current === requestId) {
88
93
  apiRef.current.applyStrategyProcessor('dataSourceRowsUpdate', {
89
94
  response: getRowsResponse,
90
- fetchParams
95
+ fetchParams,
96
+ options: {
97
+ skipCache,
98
+ keepChildrenExpanded
99
+ }
91
100
  });
92
101
  }
93
102
  } catch (originalError) {
94
103
  if (lastRequestId.current === requestId) {
95
104
  apiRef.current.applyStrategyProcessor('dataSourceRowsUpdate', {
96
105
  error: originalError,
97
- fetchParams
106
+ fetchParams,
107
+ options: {
108
+ skipCache,
109
+ keepChildrenExpanded
110
+ }
98
111
  });
99
112
  if (typeof onDataSourceErrorProp === 'function') {
100
113
  onDataSourceErrorProp(new GridGetRowsError({
@@ -107,11 +120,11 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
107
120
  }
108
121
  }
109
122
  } finally {
110
- if (defaultRowsUpdateStrategyActive && lastRequestId.current === requestId) {
123
+ if (standardRowsUpdateStrategyActive && lastRequestId.current === requestId) {
111
124
  apiRef.current.setLoading(false);
112
125
  }
113
126
  }
114
- }, [cacheChunkManager, cache, apiRef, defaultRowsUpdateStrategyActive, props.dataSource?.getRows, onDataSourceErrorProp, options, props.signature]);
127
+ }, [cacheChunkManager, cache, apiRef, standardRowsUpdateStrategyActive, props.dataSource?.getRows, onDataSourceErrorProp, options, props.signature]);
115
128
  const handleStrategyActivityChange = React.useCallback(() => {
116
129
  setCurrentStrategy(apiRef.current.getActiveStrategy(GridStrategyGroup.DataSource));
117
130
  }, [apiRef]);
@@ -186,7 +199,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
186
199
  React.useEffect(() => {
187
200
  // Return early if the proper strategy isn't set yet
188
201
  // Context: https://github.com/mui/mui-x/issues/19650
189
- if (currentStrategy !== DataSourceRowsUpdateStrategy.Default && currentStrategy !== DataSourceRowsUpdateStrategy.LazyLoading) {
202
+ if (currentStrategy !== DataSourceRowsUpdateStrategy.Default && currentStrategy !== DataSourceRowsUpdateStrategy.LazyLoading && currentStrategy !== DataSourceRowsUpdateStrategy.GroupedData) {
190
203
  return undefined;
191
204
  }
192
205
  if (props.dataSource) {
@@ -213,9 +226,9 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
213
226
  cache,
214
227
  events: {
215
228
  strategyAvailabilityChange: handleStrategyActivityChange,
216
- sortModelChange: runIf(defaultRowsUpdateStrategyActive, () => debouncedFetchRows()),
217
- filterModelChange: runIf(defaultRowsUpdateStrategyActive, () => debouncedFetchRows()),
218
- paginationModelChange: runIf(defaultRowsUpdateStrategyActive, () => debouncedFetchRows())
229
+ sortModelChange: runIf(standardRowsUpdateStrategyActive, () => debouncedFetchRows()),
230
+ filterModelChange: runIf(standardRowsUpdateStrategyActive, () => debouncedFetchRows()),
231
+ paginationModelChange: runIf(standardRowsUpdateStrategyActive, () => debouncedFetchRows())
219
232
  }
220
233
  };
221
234
  };
@@ -1,7 +1,8 @@
1
1
  import type { GridGetRowsParams, GridGetRowsResponse } from "../../../models/gridDataSource.js";
2
2
  export declare enum DataSourceRowsUpdateStrategy {
3
- Default = "set-new-rows",
3
+ Default = "set-flat-rows",
4
4
  LazyLoading = "replace-row-range",
5
+ GroupedData = "set-grouped-rows",
5
6
  }
6
7
  /**
7
8
  * Provides better cache hit rate by:
@@ -1,7 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  export let DataSourceRowsUpdateStrategy = /*#__PURE__*/function (DataSourceRowsUpdateStrategy) {
3
- DataSourceRowsUpdateStrategy["Default"] = "set-new-rows";
3
+ DataSourceRowsUpdateStrategy["Default"] = "set-flat-rows";
4
4
  DataSourceRowsUpdateStrategy["LazyLoading"] = "replace-row-range";
5
+ DataSourceRowsUpdateStrategy["GroupedData"] = "set-grouped-rows";
5
6
  return DataSourceRowsUpdateStrategy;
6
7
  }({});
7
8
 
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.14.1
2
+ * @mui/x-data-grid v8.15.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -87,7 +87,7 @@ export { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js
87
87
  export type { GridStateInitializer } from "../hooks/utils/useGridInitializeState.js";
88
88
  export type * as BaseSlots from "../models/gridBaseSlots.js";
89
89
  export type * from "../models/props/DataGridProps.js";
90
- export type { GridDataSourceApiBase, GridDataSourceApi, GridDataSourceBaseOptions } from "../hooks/features/dataSource/models.js";
90
+ export type { GridDataSourceApiBase, GridDataSourceApi, GridDataSourceBaseOptions, GridDataSourceFetchRowsParams } from "../hooks/features/dataSource/models.js";
91
91
  export { DataSourceRowsUpdateStrategy } from "../hooks/features/dataSource/utils.js";
92
92
  export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataSourceBase.js";
93
93
  export { CacheChunkManager } from "../hooks/features/dataSource/utils.js";
@@ -298,5 +298,6 @@ const arSDGrid = {
298
298
  // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
299
299
  // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
300
300
  // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
301
+ // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
301
302
  };
302
303
  export const arSD = getGridLocalization(arSDGrid);
@@ -322,5 +322,6 @@ const beBYGrid = {
322
322
  // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
323
323
  // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
324
324
  // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
325
+ // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
325
326
  };
326
327
  export const beBY = getGridLocalization(beBYGrid);
@@ -299,5 +299,6 @@ const bgBGGrid = {
299
299
  // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
300
300
  // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
301
301
  // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
302
+ // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
302
303
  };
303
304
  export const bgBG = getGridLocalization(bgBGGrid);
@@ -297,5 +297,6 @@ const bnBDGrid = {
297
297
  // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
298
298
  // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
299
299
  // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
300
+ // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
300
301
  };
301
302
  export const bnBD = getGridLocalization(bnBDGrid);