@mui/x-data-grid-premium 7.24.0 → 7.25.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 (33) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
  3. package/components/GridAggregationHeader.js +6 -1
  4. package/esm/components/GridAggregationHeader.js +6 -1
  5. package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -0
  6. package/esm/utils/releaseInfo.js +1 -1
  7. package/hooks/features/aggregation/createAggregationLookup.d.ts +2 -2
  8. package/hooks/features/aggregation/gridAggregationUtils.d.ts +3 -3
  9. package/hooks/features/aggregation/useGridAggregation.d.ts +2 -2
  10. package/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +2 -2
  11. package/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -0
  12. package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +2 -1
  13. package/hooks/features/cellSelection/useGridCellSelection.d.ts +2 -2
  14. package/hooks/features/clipboard/useGridClipboardImport.d.ts +2 -2
  15. package/hooks/features/export/serializer/excelSerializer.d.ts +3 -2
  16. package/hooks/features/export/useGridExcelExport.d.ts +2 -2
  17. package/hooks/features/rowGrouping/createGroupingColDef.d.ts +2 -2
  18. package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +4 -4
  19. package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +2 -2
  20. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +2 -2
  21. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +2 -2
  22. package/hooks/utils/useGridApiRef.d.ts +3 -1
  23. package/hooks/utils/useKeepGroupedColumnsHidden.d.ts +2 -2
  24. package/index.js +1 -1
  25. package/models/dataGridPremiumProps.d.ts +2 -2
  26. package/models/gridGroupingValueGetter.d.ts +2 -1
  27. package/models/gridPastedValueParser.d.ts +2 -1
  28. package/modern/components/GridAggregationHeader.js +6 -1
  29. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -0
  30. package/modern/index.js +1 -1
  31. package/modern/utils/releaseInfo.js +1 -1
  32. package/package.json +5 -5
  33. package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,154 @@
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
+ ## 7.25.0
7
+
8
+ _Jan 31, 2025_
9
+
10
+ We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🐞 Bugfixes
13
+
14
+ Special thanks go out to the community contributors who have helped make this release possible:
15
+ @k-rajat19, @lauri865.
16
+ Following are all team members who have contributed to this release:
17
+ @KenanYusuf, @MBilalShafi, @arminmeh.
18
+
19
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
20
+
21
+ ### Data Grid
22
+
23
+ #### `@mui/x-data-grid@7.25.0`
24
+
25
+ - [DataGrid] Fix `renderContext` calculation with scroll bounce / over-scroll (#16368) @lauri865
26
+ - [DataGrid] Refactor row state propagation (#16351) @lauri865
27
+ - [DataGrid] Add missing style overrides (#16272) (#16358) @KenanYusuf
28
+ - [DataGrid] Fix header filters keyboard navigation when there are no rows (#16369) @k-rajat19
29
+ - [DataGrid] Fix order of `onClick` prop on toolbar buttons (#16364) @KenanYusuf
30
+ - [DataGrid] Improve test coverage of server side data source (#15988) @MBilalShafi
31
+ - [DataGrid] Remove outdated warning (#16370) @MBilalShafi
32
+ - [DataGrid] Respect width of `iconContainer` during autosizing (#16409) @michelengelen
33
+
34
+ #### `@mui/x-data-grid-pro@7.25.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@7.25.0`, plus:
37
+
38
+ - [DataGridPro] Fix the return type of `useGridApiRef` for Pro and Premium packages on React < 19 (#16348) @arminmeh
39
+ - [DataGridPro] Fetch new rows only once when multiple models are changed in one cycle (#16382) @arminmeh
40
+
41
+ #### `@mui/x-data-grid-premium@7.25.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@7.25.0`.
44
+
45
+ ### Date and Time Pickers
46
+
47
+ #### `@mui/x-date-pickers@7.25.0`
48
+
49
+ Internal changes.
50
+
51
+ #### `@mui/x-date-pickers-pro@7.25.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
52
+
53
+ Same changes as in `@mui/x-date-pickers@7.25.0`.
54
+
55
+ ### Charts
56
+
57
+ #### `@mui/x-charts@7.25.0`
58
+
59
+ Internal changes.
60
+
61
+ #### `@mui/x-charts-pro@7.25.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
62
+
63
+ Same changes as in `@mui/x-charts@7.25.0`.
64
+
65
+ ### Tree View
66
+
67
+ #### `@mui/x-tree-view@7.25.0`
68
+
69
+ Internal changes.
70
+
71
+ #### `@mui/x-tree-view-pro@7.25.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
72
+
73
+ Same changes as in `@mui/x-tree-view@7.25.0`.
74
+
75
+ ### Docs
76
+
77
+ - [docs] Improve release documentation (#16322) @MBilalShafi
78
+
79
+ ### Core
80
+
81
+ - [test] Fix flaky data source tests in DataGrid (#16382) @lauri865
82
+
83
+ ## 7.24.1
84
+
85
+ _Jan 24, 2025_
86
+
87
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
88
+
89
+ - 🐞 Bugfixes
90
+ - 🌍 Improve Persian (fa-IR) locale on the Data Grid
91
+
92
+ Special thanks go out to the community contributors who have helped make this release possible:
93
+ @mostafaRoosta74, @lauri865.
94
+ Following are all team members who have contributed to this release:
95
+ @alexfauquette, @JCQuintas, @cherniavskii, @LukasTy, @arminmeh.
96
+
97
+ ### Data Grid
98
+
99
+ #### `@mui/x-data-grid@7.24.1`
100
+
101
+ - [DataGrid] Fix toggling preference panel from toolbar (#16276) @lauri865
102
+ - [DataGrid] Only try to mount filter button if there are filters present (#16269) @lauri865
103
+ - [DataGrid] Revert `apiRef` to be `MutableRefObject` for React versions < 19 (#16320) @arminmeh
104
+ - [l10n] Improve Persian (fa-IR) locale (#15964) @mostafaRoosta74
105
+
106
+ #### `@mui/x-data-grid-pro@7.24.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
107
+
108
+ Same changes as in `@mui/x-data-grid@7.24.1`.
109
+
110
+ #### `@mui/x-data-grid-premium@7.24.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
111
+
112
+ Same changes as in `@mui/x-data-grid-pro@7.24.1`.
113
+
114
+ ### Date and Time Pickers
115
+
116
+ #### `@mui/x-date-pickers@7.24.1`
117
+
118
+ - [fields] Reset `all` selected state on section edit (#16232) @LukasTy
119
+
120
+ #### `@mui/x-date-pickers-pro@7.24.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
121
+
122
+ Same changes as in `@mui/x-date-pickers@7.24.1`.
123
+
124
+ ### Charts
125
+
126
+ #### `@mui/x-charts@7.24.1`
127
+
128
+ - [charts] Handle case where gradient stop `offset` could be `Infinite` (@JCQuintas) (#16309) @JCQuintas
129
+
130
+ #### `@mui/x-charts-pro@7.24.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
131
+
132
+ Same changes as in `@mui/x-charts@7.24.1`.
133
+
134
+ ### Tree View
135
+
136
+ #### `@mui/x-tree-view@7.24.1`
137
+
138
+ Internal changes.
139
+
140
+ #### `@mui/x-tree-view-pro@7.24.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
141
+
142
+ Same changes as in `@mui/x-tree-view@7.24.1`.
143
+
144
+ ### Docs
145
+
146
+ - [docs] Fix `domainLimit` definition (#16271) @alexfauquette
147
+
148
+ ### Core
149
+
150
+ - [core] Make `@mui/x-internals` a dependency of `@mui/x-license` (#16265) @alexfauquette
151
+ - [test] Fix flaky column pinning tests (#16228) @cherniavskii
152
+ - [test] Fix flaky tests (#16264) @lauri865
153
+
6
154
  ## 7.24.0
7
155
 
8
156
  _Jan 17, 2025_
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridApiPremium, GridPrivateApiPremium } from '../models/gridApiPremium';
3
3
  import { DataGridPremiumProcessedProps } from '../models/dataGridPremiumProps';
4
- export declare const useDataGridPremiumComponent: (inputApiRef: React.RefObject<GridApiPremium> | undefined, props: DataGridPremiumProcessedProps) => React.RefObject<GridPrivateApiPremium>;
4
+ export declare const useDataGridPremiumComponent: (inputApiRef: RefObject<GridApiPremium> | undefined, props: DataGridPremiumProcessedProps) => import("react").RefObject<GridPrivateApiPremium>;
@@ -20,7 +20,12 @@ const _excluded = ["renderHeader"];
20
20
  const GridAggregationHeaderRoot = (0, _styles.styled)('div', {
21
21
  name: 'MuiDataGrid',
22
22
  slot: 'AggregationColumnHeader',
23
- overridesResolver: (_, styles) => styles.aggregationColumnHeader
23
+ overridesResolver: (props, styles) => {
24
+ const {
25
+ ownerState
26
+ } = props;
27
+ return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign === 'left' && styles['aggregationColumnHeader--alignLeft'], ownerState.colDef.headerAlign === 'center' && styles['aggregationColumnHeader--alignCenter'], ownerState.colDef.headerAlign === 'right' && styles['aggregationColumnHeader--alignRight']];
28
+ }
24
29
  })({
25
30
  display: 'flex',
26
31
  flexDirection: 'column',
@@ -12,7 +12,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const GridAggregationHeaderRoot = styled('div', {
13
13
  name: 'MuiDataGrid',
14
14
  slot: 'AggregationColumnHeader',
15
- overridesResolver: (_, styles) => styles.aggregationColumnHeader
15
+ overridesResolver: (props, styles) => {
16
+ const {
17
+ ownerState
18
+ } = props;
19
+ return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign === 'left' && styles['aggregationColumnHeader--alignLeft'], ownerState.colDef.headerAlign === 'center' && styles['aggregationColumnHeader--alignCenter'], ownerState.colDef.headerAlign === 'right' && styles['aggregationColumnHeader--alignRight']];
20
+ }
16
21
  })({
17
22
  display: 'flex',
18
23
  flexDirection: 'column',
@@ -34,6 +34,7 @@ export const useGridAggregationPreProcessors = (apiRef, props) => {
34
34
  columnsState.lookup[field] = column;
35
35
  });
36
36
  rulesOnLastColumnHydration.current = aggregationRules;
37
+ apiRef.current.caches.aggregation.rulesOnLastColumnHydration = aggregationRules;
37
38
  return columnsState;
38
39
  }, [apiRef, props.aggregationFunctions, props.disableAggregation]);
39
40
  const addGroupFooterRows = React.useCallback(value => {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczNzA2ODQwMDAwMA==";
3
+ const releaseInfo = "MTczODI5OTYwMDAwMA==";
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,9 +1,9 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridApiPremium } from '../../../models/gridApiPremium';
3
3
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
4
4
  import { GridAggregationFunction, GridAggregationLookup } from './gridAggregationInterfaces';
5
5
  export declare const createAggregationLookup: ({ apiRef, aggregationFunctions, aggregationRowsScope, getAggregationPosition, }: {
6
- apiRef: React.RefObject<GridApiPremium>;
6
+ apiRef: RefObject<GridApiPremium>;
7
7
  aggregationFunctions: Record<string, GridAggregationFunction>;
8
8
  aggregationRowsScope: DataGridPremiumProcessedProps["aggregationRowsScope"];
9
9
  getAggregationPosition: DataGridPremiumProcessedProps["getAggregationPosition"];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridColDef, GridRowId } from '@mui/x-data-grid-pro';
3
3
  import { GridColumnRawLookup, GridHydrateRowsValue } from '@mui/x-data-grid-pro/internals';
4
4
  import { GridAggregationFunction, GridAggregationModel, GridAggregationRule, GridAggregationRules } from './gridAggregationInterfaces';
@@ -29,7 +29,7 @@ interface AddFooterRowsParams {
29
29
  * If `true`, there are some aggregation rules to apply
30
30
  */
31
31
  hasAggregationRule: boolean;
32
- apiRef: React.RefObject<GridPrivateApiPremium>;
32
+ apiRef: RefObject<GridPrivateApiPremium>;
33
33
  }
34
34
  /**
35
35
  * Add a footer for each group that has at least one column with an aggregated value.
@@ -40,7 +40,7 @@ export declare const addFooterRows: ({ groupingParams, apiRef, getAggregationPos
40
40
  */
41
41
  export declare const areAggregationRulesEqual: (previousValue: GridAggregationRules | undefined, newValue: GridAggregationRules) => boolean;
42
42
  export declare const getAggregationFunctionLabel: ({ apiRef, aggregationRule, }: {
43
- apiRef: React.RefObject<GridApiPremium>;
43
+ apiRef: RefObject<GridApiPremium>;
44
44
  aggregationRule: GridAggregationRule;
45
45
  }) => string;
46
46
  export {};
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
3
3
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
4
4
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
5
5
  export declare const aggregationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'aggregationModel' | 'initialState'>, GridPrivateApiPremium>;
6
- export declare const useGridAggregation: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "onAggregationModelChange" | "initialState" | "aggregationModel" | "getAggregationPosition" | "aggregationFunctions" | "aggregationRowsScope" | "disableAggregation" | "rowGroupingColumnMode">) => void;
6
+ export declare const useGridAggregation: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "onAggregationModelChange" | "initialState" | "aggregationModel" | "getAggregationPosition" | "aggregationFunctions" | "aggregationRowsScope" | "disableAggregation" | "rowGroupingColumnMode">) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
3
3
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
4
- export declare const useGridAggregationPreProcessors: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aggregationFunctions" | "disableAggregation" | "getAggregationPosition" | "slotProps" | "slots">) => void;
4
+ export declare const useGridAggregationPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aggregationFunctions" | "disableAggregation" | "getAggregationPosition" | "slotProps" | "slots">) => void;
@@ -42,6 +42,7 @@ const useGridAggregationPreProcessors = (apiRef, props) => {
42
42
  columnsState.lookup[field] = column;
43
43
  });
44
44
  rulesOnLastColumnHydration.current = aggregationRules;
45
+ apiRef.current.caches.aggregation.rulesOnLastColumnHydration = aggregationRules;
45
46
  return columnsState;
46
47
  }, [apiRef, props.aggregationFunctions, props.disableAggregation]);
47
48
  const addGroupFooterRows = React.useCallback(value => {
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { RefObject } from '@mui/x-internals/types';
2
3
  import { GridColDef, GridFilterOperator } from '@mui/x-data-grid-pro';
3
4
  import { GridBaseColDef } from '@mui/x-data-grid-pro/internals';
4
5
  import { GridApiPremium } from '../../../models/gridApiPremium';
@@ -17,7 +18,7 @@ interface GridColDefWithAggregationWrappers extends GridBaseColDef {
17
18
  */
18
19
  export declare const wrapColumnWithAggregationValue: ({ column, apiRef, aggregationRule, }: {
19
20
  column: GridBaseColDef;
20
- apiRef: React.RefObject<GridApiPremium>;
21
+ apiRef: RefObject<GridApiPremium>;
21
22
  aggregationRule: GridAggregationRule;
22
23
  }) => GridBaseColDef;
23
24
  /**
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
3
3
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
4
4
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
5
5
  export declare const cellSelectionStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'cellSelectionModel' | 'initialState'>>;
6
- export declare const useGridCellSelection: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "cellSelection" | "cellSelectionModel" | "onCellSelectionModelChange" | "pagination" | "paginationMode" | "ignoreValueFormatterDuringExport" | "clipboardCopyCellDelimiter" | "columnHeaderHeight">) => void;
6
+ export declare const useGridCellSelection: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "cellSelection" | "cellSelectionModel" | "onCellSelectionModelChange" | "pagination" | "paginationMode" | "ignoreValueFormatterDuringExport" | "clipboardCopyCellDelimiter" | "columnHeaderHeight">) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
3
3
  import type { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
4
- export declare const useGridClipboardImport: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart">) => void;
4
+ export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart">) => void;
@@ -1,4 +1,5 @@
1
1
  import type * as Excel from 'exceljs';
2
+ import { RefObject } from '@mui/x-internals/types';
2
3
  import { GridRowId, GridColDef } from '@mui/x-data-grid-pro';
3
4
  import { GridStateColDef, GridColumnGroupLookup } from '@mui/x-data-grid/internals';
4
5
  import { ColumnsStylesInterface, GridExcelExportOptions } from '../gridExcelExportInterface';
@@ -18,7 +19,7 @@ interface SerializedRow {
18
19
  * actual rendered columns.
19
20
  * The caller of this function MUST call `resetColSpan()` before and after usage.
20
21
  */
21
- export declare const serializeRowUnsafe: (id: GridRowId, columns: GridStateColDef[], apiRef: React.RefObject<GridPrivateApiPremium>, defaultValueOptionsFormulae: {
22
+ export declare const serializeRowUnsafe: (id: GridRowId, columns: GridStateColDef[], apiRef: RefObject<GridPrivateApiPremium>, defaultValueOptionsFormulae: {
22
23
  [field: string]: {
23
24
  address: string;
24
25
  };
@@ -53,7 +54,7 @@ interface BuildExcelOptions extends Pick<GridExcelExportOptions, 'exceljsPreProc
53
54
  rowIds: GridRowId[];
54
55
  columnsStyles?: ColumnsStylesInterface;
55
56
  }
56
- export declare function buildExcel(options: BuildExcelOptions, apiRef: React.RefObject<GridPrivateApiPremium>): Promise<Excel.Workbook>;
57
+ export declare function buildExcel(options: BuildExcelOptions, apiRef: RefObject<GridPrivateApiPremium>): Promise<Excel.Workbook>;
57
58
  export interface ExcelExportInitEvent {
58
59
  serializedColumns: SerializedColumns;
59
60
  serializedRows: SerializedRow[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
3
3
  import { DataGridPremiumProps } from '../../../models/dataGridPremiumProps';
4
4
  /**
@@ -8,4 +8,4 @@ import { DataGridPremiumProps } from '../../../models/dataGridPremiumProps';
8
8
  * @requires useGridSelection (state)
9
9
  * @requires useGridParamsApi (method)
10
10
  */
11
- export declare const useGridExcelExport: (apiRef: React.RefObject<GridPrivateApiPremium>, props: DataGridPremiumProps) => void;
11
+ export declare const useGridExcelExport: (apiRef: RefObject<GridPrivateApiPremium>, props: DataGridPremiumProps) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridColDef, GridGroupingColDefOverride } from '@mui/x-data-grid-pro';
3
3
  import { GridColumnRawLookup } from '@mui/x-data-grid-pro/internals';
4
4
  import { GridApiPremium } from '../../../models/gridApiPremium';
@@ -25,7 +25,7 @@ interface CreateGroupingColDefMonoCriteriaParams {
25
25
  */
26
26
  export declare const createGroupingColDefForOneGroupingCriteria: ({ columnsLookup, groupedByColDef, groupingCriteria, colDefOverride, strategy, }: CreateGroupingColDefMonoCriteriaParams) => GridColDef;
27
27
  interface CreateGroupingColDefSeveralCriteriaParams {
28
- apiRef: React.RefObject<GridApiPremium>;
28
+ apiRef: RefObject<GridApiPremium>;
29
29
  columnsLookup: GridColumnRawLookup;
30
30
  /**
31
31
  * The fields from which we are grouping the rows.
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridRowTreeConfig, GridFilterState, GridFilterModel, GridRowModel, GridColDef, GridKeyValue, GridDataSource } from '@mui/x-data-grid-pro';
3
3
  import { GridAggregatedFilterItemApplier, GridColumnRawLookup, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn } from '@mui/x-data-grid-pro/internals';
4
4
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
@@ -15,7 +15,7 @@ interface FilterRowTreeFromTreeDataParams {
15
15
  rowTree: GridRowTreeConfig;
16
16
  isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
17
17
  filterModel: GridFilterModel;
18
- apiRef: React.RefObject<GridPrivateApiPremium>;
18
+ apiRef: RefObject<GridPrivateApiPremium>;
19
19
  }
20
20
  /**
21
21
  * A leaf is visible if it passed the filter
@@ -26,12 +26,12 @@ interface FilterRowTreeFromTreeDataParams {
26
26
  export declare const filterRowTreeFromGroupingColumns: (params: FilterRowTreeFromTreeDataParams) => Omit<GridFilterState, "filterModel">;
27
27
  export declare const getColDefOverrides: (groupingColDefProp: DataGridPremiumProcessedProps["groupingColDef"], fields: string[], strategy?: RowGroupingStrategy) => import("@mui/x-data-grid-pro").GridGroupingColDefOverride<any> | null | undefined;
28
28
  export declare const mergeStateWithRowGroupingModel: (rowGroupingModel: GridRowGroupingModel) => (state: GridStatePremium) => GridStatePremium;
29
- export declare const setStrategyAvailability: (privateApiRef: React.RefObject<GridPrivateApiPremium>, disableRowGrouping: boolean, dataSource?: GridDataSource) => void;
29
+ export declare const setStrategyAvailability: (privateApiRef: RefObject<GridPrivateApiPremium>, disableRowGrouping: boolean, dataSource?: GridDataSource) => void;
30
30
  export declare const getCellGroupingCriteria: ({ row, colDef, groupingRule, apiRef, }: {
31
31
  row: GridRowModel;
32
32
  colDef: GridColDef;
33
33
  groupingRule: GridGroupingRule;
34
- apiRef: React.RefObject<GridPrivateApiPremium>;
34
+ apiRef: RefObject<GridPrivateApiPremium>;
35
35
  }) => {
36
36
  key: GridKeyValue | null | undefined;
37
37
  field: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
3
3
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
4
- export declare const useGridDataSourceRowGroupingPreProcessors: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
4
+ export declare const useGridDataSourceRowGroupingPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
3
3
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
4
4
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
@@ -8,4 +8,4 @@ export declare const rowGroupingStateInitializer: GridStateInitializer<Pick<Data
8
8
  * @requires useGridRows (state, method) - can be after, async only
9
9
  * @requires useGridParamsApi (method) - can be after, async only
10
10
  */
11
- export declare const useGridRowGrouping: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "groupingColDef" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "unstable_dataSource">) => void;
11
+ export declare const useGridRowGrouping: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "groupingColDef" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "unstable_dataSource">) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
3
3
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
4
- export declare const useGridRowGroupingPreProcessors: (apiRef: React.RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
4
+ export declare const useGridRowGroupingPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
@@ -1,2 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
2
+ import { GridApiCommon } from '@mui/x-data-grid';
1
3
  import { GridApiPremium } from '../../models/gridApiPremium';
2
- export declare const useGridApiRef: () => import("react").RefObject<GridApiPremium>;
4
+ export declare const useGridApiRef: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api>;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridApi } from '@mui/x-data-grid-pro';
3
3
  import { GridInitialStatePremium } from '../../models/gridStatePremium';
4
4
  import { DataGridPremiumProps } from '../../models/dataGridPremiumProps';
@@ -8,5 +8,5 @@ import { DataGridPremiumProps } from '../../models/dataGridPremiumProps';
8
8
  * Does not work when used with the `hide` property of `GridColDef`
9
9
  */
10
10
  export declare const useKeepGroupedColumnsHidden: (props: {
11
- apiRef: React.RefObject<GridApi>;
11
+ apiRef: RefObject<GridApi>;
12
12
  } & Pick<DataGridPremiumProps, "initialState" | "rowGroupingModel">) => GridInitialStatePremium;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v7.24.0
2
+ * @mui/x-data-grid-premium v7.25.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridCallbackDetails, GridValidRowModel, GridGroupNode, GridEventListener } from '@mui/x-data-grid-pro';
3
3
  import { GridExperimentalProFeatures, DataGridProPropsWithDefaultValue, DataGridProPropsWithoutDefaultValue, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithComplexDefaultValueBeforeProcessing, DataGridPremiumSharedPropsWithDefaultValue } from '@mui/x-data-grid-pro/internals';
4
4
  import type { GridRowGroupingModel } from '../hooks/features/rowGrouping';
@@ -93,7 +93,7 @@ export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowM
93
93
  /**
94
94
  * The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
95
95
  */
96
- apiRef?: React.RefObject<GridApiPremium>;
96
+ apiRef?: RefObject<GridApiPremium>;
97
97
  /**
98
98
  * The initial state of the DataGridPremium.
99
99
  * The data in it is set in the state on initialization but isn't controlled.
@@ -1,3 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
1
2
  import { GridValidRowModel, GridColDef, GridKeyValue } from '@mui/x-data-grid-pro';
2
3
  import { GridApiPremium } from './gridApiPremium';
3
- export type GridGroupingValueGetter<R extends GridValidRowModel = GridValidRowModel, TValue = never> = (value: TValue, row: R, column: GridColDef<R>, apiRef: React.RefObject<GridApiPremium>) => GridKeyValue | null | undefined;
4
+ export type GridGroupingValueGetter<R extends GridValidRowModel = GridValidRowModel, TValue = never> = (value: TValue, row: R, column: GridColDef<R>, apiRef: RefObject<GridApiPremium>) => GridKeyValue | null | undefined;
@@ -1,3 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
1
2
  import { GridColDef, GridValidRowModel } from '@mui/x-data-grid';
2
3
  import { GridApiPremium } from './gridApiPremium';
3
- export type GridPastedValueParser<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> = (value: string, row: R, column: GridColDef<R, V, F>, apiRef: React.RefObject<GridApiPremium>) => V | undefined;
4
+ export type GridPastedValueParser<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> = (value: string, row: R, column: GridColDef<R, V, F>, apiRef: RefObject<GridApiPremium>) => V | undefined;
@@ -12,7 +12,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const GridAggregationHeaderRoot = styled('div', {
13
13
  name: 'MuiDataGrid',
14
14
  slot: 'AggregationColumnHeader',
15
- overridesResolver: (_, styles) => styles.aggregationColumnHeader
15
+ overridesResolver: (props, styles) => {
16
+ const {
17
+ ownerState
18
+ } = props;
19
+ return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign === 'left' && styles['aggregationColumnHeader--alignLeft'], ownerState.colDef.headerAlign === 'center' && styles['aggregationColumnHeader--alignCenter'], ownerState.colDef.headerAlign === 'right' && styles['aggregationColumnHeader--alignRight']];
20
+ }
16
21
  })({
17
22
  display: 'flex',
18
23
  flexDirection: 'column',
@@ -34,6 +34,7 @@ export const useGridAggregationPreProcessors = (apiRef, props) => {
34
34
  columnsState.lookup[field] = column;
35
35
  });
36
36
  rulesOnLastColumnHydration.current = aggregationRules;
37
+ apiRef.current.caches.aggregation.rulesOnLastColumnHydration = aggregationRules;
37
38
  return columnsState;
38
39
  }, [apiRef, props.aggregationFunctions, props.disableAggregation]);
39
40
  const addGroupFooterRows = React.useCallback(value => {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v7.24.0
2
+ * @mui/x-data-grid-premium v7.25.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczNzA2ODQwMDAwMA==";
3
+ const releaseInfo = "MTczODI5OTYwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-premium",
3
- "version": "7.24.0",
3
+ "version": "7.25.0",
4
4
  "description": "The Premium plan edition of the Data Grid Components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -40,10 +40,10 @@
40
40
  "exceljs": "^4.4.0",
41
41
  "prop-types": "^15.8.1",
42
42
  "reselect": "^5.1.1",
43
- "@mui/x-license": "7.24.0",
44
- "@mui/x-internals": "7.24.0",
45
- "@mui/x-data-grid": "7.24.0",
46
- "@mui/x-data-grid-pro": "7.24.0"
43
+ "@mui/x-data-grid": "7.25.0",
44
+ "@mui/x-license": "7.25.0",
45
+ "@mui/x-internals": "7.25.0",
46
+ "@mui/x-data-grid-pro": "7.25.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@emotion/react": "^11.9.0",
@@ -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 = "MTczNzA2ODQwMDAwMA==";
9
+ const releaseInfo = "MTczODI5OTYwMDAwMA==";
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