@mui/x-data-grid-premium 6.18.2 → 6.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,65 @@
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.18.3
7
+
8
+ _Dec 4, 2023_
9
+
10
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 📈 Fix a lot of Charts package issues
13
+ - 🌍 Improve Bulgarian (bg-BG) locale on Data Grid
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@6.18.3`
20
+
21
+ - [DataGrid] Fix cell editing adding a leading "v" on paste (#11166) @prasad5795
22
+ - [DataGrid] Fix handling of event target in portal (#11209) @cherniavskii
23
+ - [DataGrid] Fix `onFilterModelChange` being fired with stale field value (#11244) @gitstart
24
+ - [l10n] Improve Bulgarian (bg-BG) locale (#10856) (#11206) @Kristiqn95
25
+
26
+ #### `@mui/x-data-grid-pro@6.18.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
27
+
28
+ Same changes as in `@mui/x-data-grid@6.18.3`.
29
+
30
+ #### `@mui/x-data-grid-premium@6.18.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
31
+
32
+ Same changes as in `@mui/x-data-grid-pro@6.18.3`, plus:
33
+
34
+ - [DataGridPremium] Fix aggregated column ignoring column definition changes (#11176) @cherniavskii
35
+ - [DataGridPremium] Fix custom filter operators not working on aggregated column (#11201) @cherniavskii
36
+
37
+ ### Date Pickers
38
+
39
+ #### `@mui/x-date-pickers@6.18.3`
40
+
41
+ - [pickers] Correctly format `MultiSectionDigitalClock` number sections (#11297) @LukasTy
42
+ - [pickers] Expand field placeholder methods flexibility by providing `format` parameter (#11254) @LukasTy
43
+
44
+ #### `@mui/x-date-pickers-pro@6.18.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
45
+
46
+ Same changes as in `@mui/x-date-pickers@6.18.3`.
47
+
48
+ ### Charts / `@mui/x-charts@6.18.3`
49
+
50
+ - [charts] Adjusted `defaultizeValueFormatter` util to accept an optional `series.valueFormatter` value (#11213) @michelengelen
51
+ - [charts] Apply `labelStyle` and `tickLabelStyle` props on `<ChartsYAxis />` (#11180) @akamfoad
52
+ - [charts] Fix TS config (#11259) @alexfauquette
53
+ - [charts] Fix error with empty dataset (#11063) @alexfauquette
54
+ - [charts] Fix export strategy (#11235) @alexfauquette
55
+
56
+ ### Docs
57
+
58
+ - [docs] Add LTS section to support page (#11300) @joserodolfofreitas
59
+ - [docs] Add end v6 blogpost to whats new page (#11299) @joserodolfofreitas
60
+ - [docs] Document charts composition (#10710) @alexfauquette
61
+ - [docs] Fix version links (#11167) @LukasTy
62
+ - [docs] Improve Data Grid togglable columns example (#11241) @MBilalShafi
63
+ - [docs] Split charts overview and getting started in distinct pages (#10910) @alexfauquette
64
+
6
65
  ## 6.18.2
7
66
 
8
67
  _Nov 23, 2023_
@@ -1,10 +1,16 @@
1
1
  import * as React from 'react';
2
- import { GridColDef } from '@mui/x-data-grid-pro';
2
+ import { GridColDef, GridFilterOperator } from '@mui/x-data-grid-pro';
3
3
  import { GridBaseColDef } from '@mui/x-data-grid-pro/internals';
4
4
  import { GridApiPremium } from '../../../models/gridApiPremium';
5
5
  import { GridAggregationRule } from './gridAggregationInterfaces';
6
+ declare const AGGREGATION_WRAPPABLE_PROPERTIES: readonly ["valueGetter", "valueFormatter", "renderCell", "renderHeader", "filterOperators"];
7
+ type WrappableColumnProperty = (typeof AGGREGATION_WRAPPABLE_PROPERTIES)[number];
6
8
  interface GridColDefWithAggregationWrappers extends GridBaseColDef {
7
- aggregationWrappedColumn: GridBaseColDef;
9
+ aggregationWrappedProperties: {
10
+ name: WrappableColumnProperty;
11
+ originalValue: GridBaseColDef[WrappableColumnProperty];
12
+ wrappedValue: GridBaseColDef[WrappableColumnProperty];
13
+ }[];
8
14
  }
9
15
  /**
10
16
  * Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
@@ -19,5 +25,48 @@ export declare const wrapColumnWithAggregationValue: ({ column, apiRef, aggregat
19
25
  */
20
26
  export declare const unwrapColumnFromAggregation: ({ column, }: {
21
27
  column: GridColDef | GridColDefWithAggregationWrappers;
22
- }) => GridBaseColDef<import("@mui/x-data-grid-pro").GridValidRowModel, any, any>;
28
+ }) => GridBaseColDef<any, any, any> | {
29
+ field: string;
30
+ headerName?: string | undefined;
31
+ description?: string | undefined;
32
+ width?: number | undefined;
33
+ flex?: number | undefined;
34
+ minWidth?: number | undefined;
35
+ maxWidth?: number | undefined;
36
+ hideable?: boolean | undefined;
37
+ sortable?: boolean | undefined;
38
+ sortingOrder?: import("@mui/x-data-grid-pro").GridSortDirection[] | undefined;
39
+ resizable?: boolean | undefined;
40
+ editable?: boolean | undefined;
41
+ groupable?: boolean | undefined;
42
+ pinnable?: boolean | undefined;
43
+ sortComparator?: import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined;
44
+ type?: import("@mui/x-data-grid-pro").GridColType | undefined;
45
+ align?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
46
+ valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => any) | undefined;
47
+ valueSetter?: ((params: import("@mui/x-data-grid-pro").GridValueSetterParams<import("@mui/x-data-grid-pro").GridValidRowModel, any>) => import("@mui/x-data-grid-pro").GridValidRowModel) | undefined;
48
+ valueFormatter?: ((params: import("@mui/x-data-grid-pro").GridValueFormatterParams<any>) => any) | undefined;
49
+ valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNode> | undefined) => any) | undefined;
50
+ cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType<import("@mui/x-data-grid-pro").GridValidRowModel, any> | undefined;
51
+ renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
52
+ renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
53
+ preProcessEditCellProps?: ((params: import("@mui/x-data-grid-pro").GridPreProcessEditCellProps<any, any>) => import("@mui/x-data-grid-pro").GridEditCellProps<any> | Promise<import("@mui/x-data-grid-pro").GridEditCellProps<any>>) | undefined;
54
+ headerClassName?: import("@mui/x-data-grid-pro").GridColumnHeaderClassNamePropType | undefined;
55
+ renderHeader?: ((params: import("@mui/x-data-grid-pro").GridColumnHeaderParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any>) => React.ReactNode) | undefined;
56
+ headerAlign?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
57
+ hideSortIcons?: boolean | undefined;
58
+ disableColumnMenu?: boolean | undefined;
59
+ filterable?: boolean | undefined;
60
+ filterOperators?: GridFilterOperator<import("@mui/x-data-grid-pro").GridValidRowModel, any, any>[] | undefined;
61
+ getApplyQuickFilterFn?: import("@mui/x-data-grid/models/colDef/gridColDef").GetApplyQuickFilterFnLegacy<import("@mui/x-data-grid-pro").GridValidRowModel, any, any> | undefined;
62
+ getApplyQuickFilterFnV7?: import("@mui/x-data-grid/models/colDef/gridColDef").GetApplyQuickFilterFnV7<import("@mui/x-data-grid-pro").GridValidRowModel, any> | undefined;
63
+ disableReorder?: boolean | undefined;
64
+ disableExport?: boolean | undefined;
65
+ colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => number | undefined) | undefined;
66
+ renderHeaderFilter?: ((params: import("@mui/x-data-grid-pro").GridHeaderFilterCellProps) => React.ReactNode) | undefined;
67
+ aggregable?: boolean | undefined;
68
+ availableAggregationFunctions?: string[] | undefined;
69
+ groupingValueGetter?: ((params: import("../../..").GridGroupingValueGetterParams<import("@mui/x-data-grid-pro").GridValidRowModel, any>) => import("@mui/x-data-grid-pro").GridKeyValue | null | undefined) | undefined;
70
+ pastedValueParser?: ((value: string, params: import("@mui/x-data-grid-pro").GridCellParams<import("@mui/x-data-grid-pro").GridValidRowModel, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => any) | undefined;
71
+ };
23
72
  export {};
@@ -1,6 +1,8 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+ const _excluded = ["aggregationWrappedProperties"];
2
4
  import * as React from 'react';
3
- import { tagInternalFilter } from '@mui/x-data-grid-pro/internals';
5
+ import { isInternalFilter, tagInternalFilter } from '@mui/x-data-grid-pro/internals';
4
6
  import { gridAggregationLookupSelector } from './gridAggregationSelectors';
5
7
  import { GridFooterCell } from '../../../components/GridFooterCell';
6
8
  import { GridAggregationHeader } from '../../../components/GridAggregationHeader';
@@ -88,7 +90,7 @@ const getWrappedFilterOperators = ({
88
90
  }) => filterOperators.map(operator => {
89
91
  const baseGetApplyFilterFn = operator.getApplyFilterFn;
90
92
  const baseGetApplyFilterFnV7 = operator.getApplyFilterFnV7;
91
- const getApplyFilterFn = tagInternalFilter((filterItem, colDef) => {
93
+ let getApplyFilterFn = (filterItem, colDef) => {
92
94
  const filterFn = baseGetApplyFilterFn(filterItem, colDef);
93
95
  if (!filterFn) {
94
96
  return null;
@@ -99,19 +101,28 @@ const getWrappedFilterOperators = ({
99
101
  }
100
102
  return filterFn(params);
101
103
  };
102
- });
103
- const getApplyFilterFnV7 = baseGetApplyFilterFnV7 === undefined ? undefined : tagInternalFilter((filterItem, colDef) => {
104
- const filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
105
- if (!filterFn) {
106
- return null;
107
- }
108
- return (value, row, column, api) => {
109
- if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
110
- return true;
104
+ };
105
+ if (isInternalFilter(baseGetApplyFilterFn)) {
106
+ getApplyFilterFn = tagInternalFilter(getApplyFilterFn);
107
+ }
108
+ let getApplyFilterFnV7;
109
+ if (baseGetApplyFilterFnV7 !== undefined) {
110
+ getApplyFilterFnV7 = tagInternalFilter((filterItem, colDef) => {
111
+ const filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
112
+ if (!filterFn) {
113
+ return null;
111
114
  }
112
- return filterFn(value, row, column, api);
113
- };
114
- });
115
+ return (value, row, column, api) => {
116
+ if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
117
+ return true;
118
+ }
119
+ return filterFn(value, row, column, api);
120
+ };
121
+ });
122
+ if (isInternalFilter(baseGetApplyFilterFnV7)) {
123
+ getApplyFilterFnV7 = tagInternalFilter(getApplyFilterFnV7);
124
+ }
125
+ }
115
126
  return _extends({}, operator, {
116
127
  getApplyFilterFn,
117
128
  getApplyFilterFnV7
@@ -167,7 +178,7 @@ export const wrapColumnWithAggregationValue = ({
167
178
  };
168
179
  let didWrapSomeProperty = false;
169
180
  const wrappedColumn = _extends({}, column, {
170
- aggregationWrappedColumn: column
181
+ aggregationWrappedProperties: []
171
182
  });
172
183
  const wrapColumnProperty = (property, wrapper) => {
173
184
  const originalValue = column[property];
@@ -181,6 +192,11 @@ export const wrapColumnWithAggregationValue = ({
181
192
  if (wrappedProperty !== originalValue) {
182
193
  didWrapSomeProperty = true;
183
194
  wrappedColumn[property] = wrappedProperty;
195
+ wrappedColumn.aggregationWrappedProperties.push({
196
+ name: property,
197
+ originalValue,
198
+ wrappedValue: wrappedProperty
199
+ });
184
200
  }
185
201
  };
186
202
  wrapColumnProperty('valueGetter', getAggregationValueWrappedValueGetter);
@@ -200,6 +216,24 @@ export const wrapColumnWithAggregationValue = ({
200
216
  export const unwrapColumnFromAggregation = ({
201
217
  column
202
218
  }) => {
203
- var _aggregationWrappedCo;
204
- return (_aggregationWrappedCo = column.aggregationWrappedColumn) != null ? _aggregationWrappedCo : column;
219
+ if (!column.aggregationWrappedProperties) {
220
+ return column;
221
+ }
222
+ const _ref = column,
223
+ {
224
+ aggregationWrappedProperties
225
+ } = _ref,
226
+ unwrappedColumn = _objectWithoutPropertiesLoose(_ref, _excluded);
227
+ aggregationWrappedProperties.forEach(({
228
+ name,
229
+ originalValue,
230
+ wrappedValue
231
+ }) => {
232
+ // The value changed since we wrapped it
233
+ if (wrappedValue !== unwrappedColumn[name]) {
234
+ return;
235
+ }
236
+ unwrappedColumn[name] = originalValue;
237
+ });
238
+ return unwrappedColumn;
205
239
  };
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.18.2
2
+ * @mui/x-data-grid-premium v6.18.3
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,8 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+ var _excluded = ["aggregationWrappedProperties"];
2
4
  import * as React from 'react';
3
- import { tagInternalFilter } from '@mui/x-data-grid-pro/internals';
5
+ import { isInternalFilter, tagInternalFilter } from '@mui/x-data-grid-pro/internals';
4
6
  import { gridAggregationLookupSelector } from './gridAggregationSelectors';
5
7
  import { GridFooterCell } from '../../../components/GridFooterCell';
6
8
  import { GridAggregationHeader } from '../../../components/GridAggregationHeader';
@@ -85,7 +87,7 @@ var getWrappedFilterOperators = function getWrappedFilterOperators(_ref4) {
85
87
  return filterOperators.map(function (operator) {
86
88
  var baseGetApplyFilterFn = operator.getApplyFilterFn;
87
89
  var baseGetApplyFilterFnV7 = operator.getApplyFilterFnV7;
88
- var getApplyFilterFn = tagInternalFilter(function (filterItem, colDef) {
90
+ var getApplyFilterFn = function getApplyFilterFn(filterItem, colDef) {
89
91
  var filterFn = baseGetApplyFilterFn(filterItem, colDef);
90
92
  if (!filterFn) {
91
93
  return null;
@@ -96,19 +98,28 @@ var getWrappedFilterOperators = function getWrappedFilterOperators(_ref4) {
96
98
  }
97
99
  return filterFn(params);
98
100
  };
99
- });
100
- var getApplyFilterFnV7 = baseGetApplyFilterFnV7 === undefined ? undefined : tagInternalFilter(function (filterItem, colDef) {
101
- var filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
102
- if (!filterFn) {
103
- return null;
104
- }
105
- return function (value, row, column, api) {
106
- if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
107
- return true;
101
+ };
102
+ if (isInternalFilter(baseGetApplyFilterFn)) {
103
+ getApplyFilterFn = tagInternalFilter(getApplyFilterFn);
104
+ }
105
+ var getApplyFilterFnV7;
106
+ if (baseGetApplyFilterFnV7 !== undefined) {
107
+ getApplyFilterFnV7 = tagInternalFilter(function (filterItem, colDef) {
108
+ var filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
109
+ if (!filterFn) {
110
+ return null;
108
111
  }
109
- return filterFn(value, row, column, api);
110
- };
111
- });
112
+ return function (value, row, column, api) {
113
+ if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
114
+ return true;
115
+ }
116
+ return filterFn(value, row, column, api);
117
+ };
118
+ });
119
+ if (isInternalFilter(baseGetApplyFilterFnV7)) {
120
+ getApplyFilterFnV7 = tagInternalFilter(getApplyFilterFnV7);
121
+ }
122
+ }
112
123
  return _extends({}, operator, {
113
124
  getApplyFilterFn: getApplyFilterFn,
114
125
  getApplyFilterFnV7: getApplyFilterFnV7
@@ -163,7 +174,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
163
174
  };
164
175
  var didWrapSomeProperty = false;
165
176
  var wrappedColumn = _extends({}, column, {
166
- aggregationWrappedColumn: column
177
+ aggregationWrappedProperties: []
167
178
  });
168
179
  var wrapColumnProperty = function wrapColumnProperty(property, wrapper) {
169
180
  var originalValue = column[property];
@@ -177,6 +188,11 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
177
188
  if (wrappedProperty !== originalValue) {
178
189
  didWrapSomeProperty = true;
179
190
  wrappedColumn[property] = wrappedProperty;
191
+ wrappedColumn.aggregationWrappedProperties.push({
192
+ name: property,
193
+ originalValue: originalValue,
194
+ wrappedValue: wrappedProperty
195
+ });
180
196
  }
181
197
  };
182
198
  wrapColumnProperty('valueGetter', getAggregationValueWrappedValueGetter);
@@ -194,7 +210,22 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
194
210
  * Remove the aggregation wrappers around the wrappable properties of the column.
195
211
  */
196
212
  export var unwrapColumnFromAggregation = function unwrapColumnFromAggregation(_ref7) {
197
- var _aggregationWrappedCo;
198
213
  var column = _ref7.column;
199
- return (_aggregationWrappedCo = column.aggregationWrappedColumn) != null ? _aggregationWrappedCo : column;
214
+ if (!column.aggregationWrappedProperties) {
215
+ return column;
216
+ }
217
+ var _ref8 = column,
218
+ aggregationWrappedProperties = _ref8.aggregationWrappedProperties,
219
+ unwrappedColumn = _objectWithoutProperties(_ref8, _excluded);
220
+ aggregationWrappedProperties.forEach(function (_ref9) {
221
+ var name = _ref9.name,
222
+ originalValue = _ref9.originalValue,
223
+ wrappedValue = _ref9.wrappedValue;
224
+ // The value changed since we wrapped it
225
+ if (wrappedValue !== unwrappedColumn[name]) {
226
+ return;
227
+ }
228
+ unwrappedColumn[name] = originalValue;
229
+ });
230
+ return unwrappedColumn;
200
231
  };
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.18.2
2
+ * @mui/x-data-grid-premium v6.18.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTcwMDY5MDQwMDAwMA==";
3
+ var releaseInfo = "MTcwMTY0MDgwMDAwMA==";
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,6 +1,8 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+ const _excluded = ["aggregationWrappedProperties"];
2
4
  import * as React from 'react';
3
- import { tagInternalFilter } from '@mui/x-data-grid-pro/internals';
5
+ import { isInternalFilter, tagInternalFilter } from '@mui/x-data-grid-pro/internals';
4
6
  import { gridAggregationLookupSelector } from './gridAggregationSelectors';
5
7
  import { GridFooterCell } from '../../../components/GridFooterCell';
6
8
  import { GridAggregationHeader } from '../../../components/GridAggregationHeader';
@@ -86,7 +88,7 @@ const getWrappedFilterOperators = ({
86
88
  }) => filterOperators.map(operator => {
87
89
  const baseGetApplyFilterFn = operator.getApplyFilterFn;
88
90
  const baseGetApplyFilterFnV7 = operator.getApplyFilterFnV7;
89
- const getApplyFilterFn = tagInternalFilter((filterItem, colDef) => {
91
+ let getApplyFilterFn = (filterItem, colDef) => {
90
92
  const filterFn = baseGetApplyFilterFn(filterItem, colDef);
91
93
  if (!filterFn) {
92
94
  return null;
@@ -97,19 +99,28 @@ const getWrappedFilterOperators = ({
97
99
  }
98
100
  return filterFn(params);
99
101
  };
100
- });
101
- const getApplyFilterFnV7 = baseGetApplyFilterFnV7 === undefined ? undefined : tagInternalFilter((filterItem, colDef) => {
102
- const filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
103
- if (!filterFn) {
104
- return null;
105
- }
106
- return (value, row, column, api) => {
107
- if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
108
- return true;
102
+ };
103
+ if (isInternalFilter(baseGetApplyFilterFn)) {
104
+ getApplyFilterFn = tagInternalFilter(getApplyFilterFn);
105
+ }
106
+ let getApplyFilterFnV7;
107
+ if (baseGetApplyFilterFnV7 !== undefined) {
108
+ getApplyFilterFnV7 = tagInternalFilter((filterItem, colDef) => {
109
+ const filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
110
+ if (!filterFn) {
111
+ return null;
109
112
  }
110
- return filterFn(value, row, column, api);
111
- };
112
- });
113
+ return (value, row, column, api) => {
114
+ if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
115
+ return true;
116
+ }
117
+ return filterFn(value, row, column, api);
118
+ };
119
+ });
120
+ if (isInternalFilter(baseGetApplyFilterFnV7)) {
121
+ getApplyFilterFnV7 = tagInternalFilter(getApplyFilterFnV7);
122
+ }
123
+ }
113
124
  return _extends({}, operator, {
114
125
  getApplyFilterFn,
115
126
  getApplyFilterFnV7
@@ -164,7 +175,7 @@ export const wrapColumnWithAggregationValue = ({
164
175
  };
165
176
  let didWrapSomeProperty = false;
166
177
  const wrappedColumn = _extends({}, column, {
167
- aggregationWrappedColumn: column
178
+ aggregationWrappedProperties: []
168
179
  });
169
180
  const wrapColumnProperty = (property, wrapper) => {
170
181
  const originalValue = column[property];
@@ -178,6 +189,11 @@ export const wrapColumnWithAggregationValue = ({
178
189
  if (wrappedProperty !== originalValue) {
179
190
  didWrapSomeProperty = true;
180
191
  wrappedColumn[property] = wrappedProperty;
192
+ wrappedColumn.aggregationWrappedProperties.push({
193
+ name: property,
194
+ originalValue,
195
+ wrappedValue: wrappedProperty
196
+ });
181
197
  }
182
198
  };
183
199
  wrapColumnProperty('valueGetter', getAggregationValueWrappedValueGetter);
@@ -197,5 +213,24 @@ export const wrapColumnWithAggregationValue = ({
197
213
  export const unwrapColumnFromAggregation = ({
198
214
  column
199
215
  }) => {
200
- return column.aggregationWrappedColumn ?? column;
216
+ if (!column.aggregationWrappedProperties) {
217
+ return column;
218
+ }
219
+ const _ref = column,
220
+ {
221
+ aggregationWrappedProperties
222
+ } = _ref,
223
+ unwrappedColumn = _objectWithoutPropertiesLoose(_ref, _excluded);
224
+ aggregationWrappedProperties.forEach(({
225
+ name,
226
+ originalValue,
227
+ wrappedValue
228
+ }) => {
229
+ // The value changed since we wrapped it
230
+ if (wrappedValue !== unwrappedColumn[name]) {
231
+ return;
232
+ }
233
+ unwrappedColumn[name] = originalValue;
234
+ });
235
+ return unwrappedColumn;
201
236
  };
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.18.2
2
+ * @mui/x-data-grid-premium v6.18.3
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 = "MTcwMDY5MDQwMDAwMA==";
3
+ const releaseInfo = "MTcwMTY0MDgwMDAwMA==";
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
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.wrapColumnWithAggregationValue = exports.unwrapColumnFromAggregation = void 0;
8
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var React = _interopRequireWildcard(require("react"));
10
11
  var _internals = require("@mui/x-data-grid-pro/internals");
@@ -12,6 +13,7 @@ var _gridAggregationSelectors = require("./gridAggregationSelectors");
12
13
  var _GridFooterCell = require("../../../components/GridFooterCell");
13
14
  var _GridAggregationHeader = require("../../../components/GridAggregationHeader");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
16
+ const _excluded = ["aggregationWrappedProperties"];
15
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
19
  const AGGREGATION_WRAPPABLE_PROPERTIES = ['valueGetter', 'valueFormatter', 'renderCell', 'renderHeader', 'filterOperators'];
@@ -95,7 +97,7 @@ const getWrappedFilterOperators = ({
95
97
  }) => filterOperators.map(operator => {
96
98
  const baseGetApplyFilterFn = operator.getApplyFilterFn;
97
99
  const baseGetApplyFilterFnV7 = operator.getApplyFilterFnV7;
98
- const getApplyFilterFn = (0, _internals.tagInternalFilter)((filterItem, colDef) => {
100
+ let getApplyFilterFn = (filterItem, colDef) => {
99
101
  const filterFn = baseGetApplyFilterFn(filterItem, colDef);
100
102
  if (!filterFn) {
101
103
  return null;
@@ -106,19 +108,28 @@ const getWrappedFilterOperators = ({
106
108
  }
107
109
  return filterFn(params);
108
110
  };
109
- });
110
- const getApplyFilterFnV7 = baseGetApplyFilterFnV7 === undefined ? undefined : (0, _internals.tagInternalFilter)((filterItem, colDef) => {
111
- const filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
112
- if (!filterFn) {
113
- return null;
114
- }
115
- return (value, row, column, api) => {
116
- if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
117
- return true;
111
+ };
112
+ if ((0, _internals.isInternalFilter)(baseGetApplyFilterFn)) {
113
+ getApplyFilterFn = (0, _internals.tagInternalFilter)(getApplyFilterFn);
114
+ }
115
+ let getApplyFilterFnV7;
116
+ if (baseGetApplyFilterFnV7 !== undefined) {
117
+ getApplyFilterFnV7 = (0, _internals.tagInternalFilter)((filterItem, colDef) => {
118
+ const filterFn = baseGetApplyFilterFnV7(filterItem, colDef);
119
+ if (!filterFn) {
120
+ return null;
118
121
  }
119
- return filterFn(value, row, column, api);
120
- };
121
- });
122
+ return (value, row, column, api) => {
123
+ if (getCellAggregationResult(apiRef.current.getRowId(row), column.field) != null) {
124
+ return true;
125
+ }
126
+ return filterFn(value, row, column, api);
127
+ };
128
+ });
129
+ if ((0, _internals.isInternalFilter)(baseGetApplyFilterFnV7)) {
130
+ getApplyFilterFnV7 = (0, _internals.tagInternalFilter)(getApplyFilterFnV7);
131
+ }
132
+ }
122
133
  return (0, _extends2.default)({}, operator, {
123
134
  getApplyFilterFn,
124
135
  getApplyFilterFnV7
@@ -173,7 +184,7 @@ const wrapColumnWithAggregationValue = ({
173
184
  };
174
185
  let didWrapSomeProperty = false;
175
186
  const wrappedColumn = (0, _extends2.default)({}, column, {
176
- aggregationWrappedColumn: column
187
+ aggregationWrappedProperties: []
177
188
  });
178
189
  const wrapColumnProperty = (property, wrapper) => {
179
190
  const originalValue = column[property];
@@ -187,6 +198,11 @@ const wrapColumnWithAggregationValue = ({
187
198
  if (wrappedProperty !== originalValue) {
188
199
  didWrapSomeProperty = true;
189
200
  wrappedColumn[property] = wrappedProperty;
201
+ wrappedColumn.aggregationWrappedProperties.push({
202
+ name: property,
203
+ originalValue,
204
+ wrappedValue: wrappedProperty
205
+ });
190
206
  }
191
207
  };
192
208
  wrapColumnProperty('valueGetter', getAggregationValueWrappedValueGetter);
@@ -207,6 +223,25 @@ exports.wrapColumnWithAggregationValue = wrapColumnWithAggregationValue;
207
223
  const unwrapColumnFromAggregation = ({
208
224
  column
209
225
  }) => {
210
- return column.aggregationWrappedColumn ?? column;
226
+ if (!column.aggregationWrappedProperties) {
227
+ return column;
228
+ }
229
+ const _ref = column,
230
+ {
231
+ aggregationWrappedProperties
232
+ } = _ref,
233
+ unwrappedColumn = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
234
+ aggregationWrappedProperties.forEach(({
235
+ name,
236
+ originalValue,
237
+ wrappedValue
238
+ }) => {
239
+ // The value changed since we wrapped it
240
+ if (wrappedValue !== unwrappedColumn[name]) {
241
+ return;
242
+ }
243
+ unwrappedColumn[name] = originalValue;
244
+ });
245
+ return unwrappedColumn;
211
246
  };
212
247
  exports.unwrapColumnFromAggregation = unwrapColumnFromAggregation;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.18.2
2
+ * @mui/x-data-grid-premium v6.18.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcwMDY5MDQwMDAwMA==";
9
+ const releaseInfo = "MTcwMTY0MDgwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-premium",
3
- "version": "6.18.2",
3
+ "version": "6.18.3",
4
4
  "description": "The Premium plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.23.2",
35
35
  "@mui/utils": "^5.14.16",
36
- "@mui/x-data-grid": "6.18.2",
37
- "@mui/x-data-grid-pro": "6.18.2",
36
+ "@mui/x-data-grid": "6.18.3",
37
+ "@mui/x-data-grid-pro": "6.18.3",
38
38
  "@mui/x-license-pro": "6.10.2",
39
39
  "@types/format-util": "^1.0.3",
40
40
  "clsx": "^2.0.0",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcwMDY5MDQwMDAwMA==";
3
+ const releaseInfo = "MTcwMTY0MDgwMDAwMA==";
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