@mui/x-data-grid-premium 6.0.3 → 6.1.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.
- package/CHANGELOG.md +119 -0
- package/components/GridPremiumColumnMenu.d.ts +8 -8
- package/components/GridPremiumColumnMenu.js +7 -7
- package/components/reexports.d.ts +1 -1
- package/components/reexports.js +1 -1
- package/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +2 -2
- package/hooks/features/rowGrouping/useGridRowGrouping.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/legacy/components/GridPremiumColumnMenu.js +7 -7
- package/legacy/components/reexports.js +1 -1
- package/legacy/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -1
- package/legacy/hooks/features/aggregation/wrapColumnWithAggregation.js +2 -2
- package/legacy/hooks/features/export/serializer/excelSerializer.js +160 -170
- package/legacy/hooks/features/export/useGridExcelExport.js +89 -93
- package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +1 -1
- package/legacy/index.js +2 -2
- package/legacy/typeOverloads/reexports.js +8 -0
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/components/GridPremiumColumnMenu.js +7 -7
- package/modern/components/reexports.js +1 -1
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -1
- package/modern/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -1
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +1 -1
- package/modern/index.js +2 -2
- package/modern/typeOverloads/reexports.js +8 -0
- package/modern/utils/releaseInfo.js +1 -1
- package/node/components/GridPremiumColumnMenu.js +9 -9
- package/node/components/reexports.js +4 -4
- package/node/hooks/features/aggregation/useGridAggregationPreProcessors.js +1 -1
- package/node/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -1
- package/node/hooks/features/export/useGridExcelExport.js +2 -2
- package/node/hooks/features/rowGrouping/useGridRowGrouping.js +1 -1
- package/node/index.js +7 -7
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/typeOverloads/reexports.js +8 -0
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,125 @@
|
|
|
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.1.0
|
|
7
|
+
|
|
8
|
+
_Apr 7, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Catalan (ca-ES), Kazakh (kz-KZ) and improve Spanish (es-ES), Dutch (nl-NL), Hebrew (he-IL), Hungarian (hu-HU), Japanese (ja-JP), Portuguese (pt-BR), and Russian (ru-RU) locales
|
|
13
|
+
- ✨ Allow to control visibility of columns shown in the columns panel (#8401) @MBilalShafi
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### `@mui/x-data-grid@v6.1.0` / `@mui/x-data-grid-pro@v6.1.0` / `@mui/x-data-grid-premium@v6.1.0`
|
|
18
|
+
|
|
19
|
+
#### Changes
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Allow to control visibility of columns shown in the `ColumnsPanel` component (#8401) @MBilalShafi
|
|
22
|
+
- [DataGrid] Fix filters with empty array value not being removed from the filter model (#8501) @cherniavskii
|
|
23
|
+
- [DataGrid] Fix memory leaks in development (#8301) @cherniavskii
|
|
24
|
+
- [DataGrid] Sync `date` column value when entering edit mode by pressing a digit (#8364) @m4theushw
|
|
25
|
+
- [DataGrid] Wrap column menu button with a tooltip (#7890) @cherniavskii
|
|
26
|
+
- [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
|
|
27
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#8486) @PetakCC
|
|
28
|
+
- [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
|
|
29
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
|
|
30
|
+
- [l10n] Improve Russian (ru-RU) locale (#8510) @alexrapro
|
|
31
|
+
|
|
32
|
+
### `@mui/x-date-pickers@v6.1.0` / `@mui/x-date-pickers-pro@v6.1.0`
|
|
33
|
+
|
|
34
|
+
#### Changes
|
|
35
|
+
|
|
36
|
+
- [fields] Fix RTL navigation (#8490) @alexfauquette
|
|
37
|
+
- [fields] Fix usage of `slotProps.textField.InputProps` (#8428) @flaviendelangle
|
|
38
|
+
- [pickers] Fix `componentsProps.dialog` propagation (#8509) @LukasTy
|
|
39
|
+
- [pickers] Move `hasError` from `fieldValueManager` to `valueManager` (#8453) @flaviendelangle
|
|
40
|
+
- [pickers] Move the adapters interfaces to the X repository (#8412) @flaviendelangle
|
|
41
|
+
- [pickers] Update peer dependency versions (#8531) @LukasTy
|
|
42
|
+
- [pickers] Fix `isValid` regression (#8543) @LukasTy
|
|
43
|
+
- [l10n] Add Catalan (Spain) (ca-ES) and improve Spanish (es-ES) locales (#8498) @makenshikuro
|
|
44
|
+
- [l10n] Add Kazakh (kz-KZ) locale (#8451) @zhunus
|
|
45
|
+
- [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
|
|
46
|
+
- [l10n] Improve Hebrew (he-IL) locale (#8464) @soris1989
|
|
47
|
+
- [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
|
|
48
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
|
|
49
|
+
|
|
50
|
+
### Docs
|
|
51
|
+
|
|
52
|
+
- [docs] Fix 301 redirect (#8524) @alexfauquette
|
|
53
|
+
- [docs] Fix 404 links (#8454) @alexfauquette
|
|
54
|
+
- [docs] Fix broken API reference link (#8460) @oliviertassinari
|
|
55
|
+
|
|
56
|
+
### Core
|
|
57
|
+
|
|
58
|
+
- [core] Avoid 301 links (#8383) @oliviertassinari
|
|
59
|
+
- [core] Fix the l10n helper by using danger instead of actions (#8512) @alexfauquette
|
|
60
|
+
- [core] Help contributors for l10n PRs (#8503) @alexfauquette
|
|
61
|
+
- [core] Remove legacy token (#8457) @oliviertassinari
|
|
62
|
+
- [charts] Add a styling system (#8445) @alexfauquette
|
|
63
|
+
|
|
64
|
+
## 6.0.4
|
|
65
|
+
|
|
66
|
+
_Mar 30, 2023_
|
|
67
|
+
|
|
68
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
69
|
+
|
|
70
|
+
- 🌍 Add Danish (da-DK), and improve Norwegian (nb-NO), Spanish (es-ES), and Swedish (sv-SE) locales
|
|
71
|
+
- 🐞 Bugfixes
|
|
72
|
+
- 📚 Documentation improvements
|
|
73
|
+
|
|
74
|
+
### `@mui/x-data-grid@v6.0.4` / `@mui/x-data-grid-pro@v6.0.4` / `@mui/x-data-grid-premium@v6.0.4`
|
|
75
|
+
|
|
76
|
+
#### Changes
|
|
77
|
+
|
|
78
|
+
- [DataGrid] Fix column header tooltip not showing when the title is truncated (#8433) @rohitnatesh
|
|
79
|
+
- [DataGrid] Fix filter model buttons' display condition (#8415) @MBilalShafi
|
|
80
|
+
- [DataGrid] Fix infinite rerender in a flex parent (#8436) @cherniavskii
|
|
81
|
+
- [DataGrid] Prevent reopening column menu when clicking in the button while it is open (#8286) @tanuj-22
|
|
82
|
+
- [DataGrid] Rename `components` by `slots` in column menu API (#7999) @MBilalShafi
|
|
83
|
+
- [DataGrid] Remove hardcoded CSS classes' usages (#8444) @MBilalShafi
|
|
84
|
+
- [DataGridPremium] Fix aggregation initial state causing issue with quick filter (#8441) @MBilalShafi
|
|
85
|
+
- [l10n] Improve Danish (da-DK) locale (#8368) @BossElijah
|
|
86
|
+
- [l10n] Improve Danish (da-DK) locale (#8378) @BossElijah
|
|
87
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8367) @BossElijah
|
|
88
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8409) @BossElijah
|
|
89
|
+
- [l10n] Improve Spanish (es-ES) locale (#8420) @martjanz
|
|
90
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
91
|
+
|
|
92
|
+
### `@mui/x-date-pickers@v6.0.4` / `@mui/x-date-pickers-pro@v6.0.4`
|
|
93
|
+
|
|
94
|
+
#### Changes
|
|
95
|
+
|
|
96
|
+
- [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
|
|
97
|
+
- [fields] Clean the active date manager (#8370) @flaviendelangle
|
|
98
|
+
- [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
|
|
99
|
+
- [fields] Only add RTL characters when needed (#8325) @flaviendelangle
|
|
100
|
+
- [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
|
|
101
|
+
- [pickers] Allows non token characters in format (#8256) @alexfauquette
|
|
102
|
+
- [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
|
|
103
|
+
- [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
|
|
104
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8382) @BossElijah
|
|
105
|
+
- [l10n] Add Danish (da-DK) locale (#8379) @BossElijah
|
|
106
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
107
|
+
|
|
108
|
+
### `@mui/x-codemod@v6.0.4`
|
|
109
|
+
|
|
110
|
+
#### Changes
|
|
111
|
+
|
|
112
|
+
- [codemod] Fix `remove-stabilized-experimentalFeatures` codemod (#8289) @alexfauquette
|
|
113
|
+
|
|
114
|
+
### Docs
|
|
115
|
+
|
|
116
|
+
- [docs] Fix `GridCellParams` signature in migration guide (#8427) @cherniavskii
|
|
117
|
+
- [docs] Fix "Custom field" demos responsive styles (#8408) @LukasTy
|
|
118
|
+
- [docs] Remove `label` from demos where it reduces clarity (#8416) @LukasTy
|
|
119
|
+
- [docs] Update slots' references in Data Grid migration guide (#8159) @MBilalShafi
|
|
120
|
+
|
|
121
|
+
### Core
|
|
122
|
+
|
|
123
|
+
- [charts] Work on typing (#8421) @flaviendelangle
|
|
124
|
+
|
|
6
125
|
## 6.0.3
|
|
7
126
|
|
|
8
127
|
_Mar 23, 2023_
|
|
@@ -2,15 +2,15 @@ import * as React from 'react';
|
|
|
2
2
|
import { GridColumnMenuProps, GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
3
|
import { GridColumnMenuAggregationItem } from './GridColumnMenuAggregationItem';
|
|
4
4
|
export declare function GridColumnMenuGroupingItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export declare const GRID_COLUMN_MENU_SLOTS_PREMIUM: {
|
|
6
|
+
columnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
|
|
7
|
+
columnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
|
|
8
|
+
columnMenuPinningItem: typeof import("@mui/x-data-grid-pro/components/GridColumnMenuPinningItem").GridColumnMenuPinningItem;
|
|
9
|
+
columnMenuSortItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem").GridColumnMenuSortItem;
|
|
10
|
+
columnMenuFilterItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem").GridColumnMenuFilterItem;
|
|
11
|
+
columnMenuColumnsItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem").GridColumnMenuColumnsItem;
|
|
12
12
|
};
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
|
|
14
14
|
columnMenuAggregationItem: {
|
|
15
15
|
displayOrder: number;
|
|
16
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { GridGenericColumnMenu,
|
|
4
|
+
import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid-pro';
|
|
5
5
|
import { GridColumnMenuAggregationItem } from './GridColumnMenuAggregationItem';
|
|
6
6
|
import { isGroupingColumn } from '../hooks/features/rowGrouping';
|
|
7
7
|
import { GridColumnMenuRowGroupItem } from './GridColumnMenuRowGroupItem';
|
|
@@ -19,11 +19,11 @@ export function GridColumnMenuGroupingItem(props) {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
export const GRID_COLUMN_MENU_SLOTS_PREMIUM = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
23
|
+
columnMenuAggregationItem: GridColumnMenuAggregationItem,
|
|
24
|
+
columnMenuGroupingItem: GridColumnMenuGroupingItem
|
|
25
25
|
});
|
|
26
|
-
export const
|
|
26
|
+
export const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
27
27
|
columnMenuAggregationItem: {
|
|
28
28
|
displayOrder: 23
|
|
29
29
|
},
|
|
@@ -35,8 +35,8 @@ const GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremium
|
|
|
35
35
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
|
|
36
36
|
ref: ref
|
|
37
37
|
}, props, {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
|
|
39
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
|
|
40
40
|
}));
|
|
41
41
|
});
|
|
42
42
|
process.env.NODE_ENV !== "production" ? GridPremiumColumnMenu.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridPremiumColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridPremiumColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PREMIUM as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM as GRID_COLUMN_MENU_SLOT_PROPS, } from './GridPremiumColumnMenu';
|
package/components/reexports.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridPremiumColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridPremiumColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PREMIUM as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM as GRID_COLUMN_MENU_SLOT_PROPS } from './GridPremiumColumnMenu';
|
|
@@ -68,7 +68,7 @@ export const useGridAggregationPreProcessors = (apiRef, props) => {
|
|
|
68
68
|
if (availableAggregationFunctions.length === 0) {
|
|
69
69
|
return columnMenuItems;
|
|
70
70
|
}
|
|
71
|
-
return [...columnMenuItems, '
|
|
71
|
+
return [...columnMenuItems, 'columnMenuAggregationItem'];
|
|
72
72
|
}, [props.aggregationFunctions, props.disableAggregation]);
|
|
73
73
|
const stateExportPreProcessing = React.useCallback(prevState => {
|
|
74
74
|
if (props.disableAggregation) {
|
|
@@ -132,7 +132,7 @@ export const wrapColumnWithAggregationValue = ({
|
|
|
132
132
|
aggregationRule
|
|
133
133
|
}) => {
|
|
134
134
|
const getCellAggregationResult = (id, field) => {
|
|
135
|
-
var _rowNode$parent, _gridAggregationLooku;
|
|
135
|
+
var _rowNode$parent, _gridAggregationLooku, _gridAggregationLooku2;
|
|
136
136
|
let cellAggregationPosition = null;
|
|
137
137
|
const rowNode = apiRef.current.getRowNode(id);
|
|
138
138
|
if (rowNode.type === 'group') {
|
|
@@ -146,7 +146,7 @@ export const wrapColumnWithAggregationValue = ({
|
|
|
146
146
|
|
|
147
147
|
// TODO: Add custom root id
|
|
148
148
|
const groupId = cellAggregationPosition === 'inline' ? id : (_rowNode$parent = rowNode.parent) != null ? _rowNode$parent : '';
|
|
149
|
-
const aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)[groupId]) == null ? void 0 :
|
|
149
|
+
const aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null ? void 0 : (_gridAggregationLooku2 = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku2[field];
|
|
150
150
|
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
@@ -38,9 +38,9 @@ export declare const getCellGroupingCriteria: ({ row, id, colDef, groupingRule,
|
|
|
38
38
|
export declare const getGroupingRules: ({ sanitizedRowGroupingModel, columnsLookup, }: {
|
|
39
39
|
sanitizedRowGroupingModel: GridRowGroupingModel;
|
|
40
40
|
columnsLookup: GridColumnRawLookup;
|
|
41
|
-
}) => GridGroupingRules
|
|
41
|
+
}) => GridGroupingRules;
|
|
42
42
|
/**
|
|
43
43
|
* Compares two sets of grouping rules to determine if they are equal or not.
|
|
44
44
|
*/
|
|
45
|
-
export declare const areGroupingRulesEqual: (newValue: GridGroupingRules
|
|
45
|
+
export declare const areGroupingRulesEqual: (newValue: GridGroupingRules, previousValue: GridGroupingRules) => boolean;
|
|
46
46
|
export {};
|
|
@@ -84,7 +84,7 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
84
84
|
return columnMenuItems;
|
|
85
85
|
}
|
|
86
86
|
if (isGroupingColumn(colDef.field) || colDef.groupable) {
|
|
87
|
-
return [...columnMenuItems, '
|
|
87
|
+
return [...columnMenuItems, 'columnMenuGroupingItem'];
|
|
88
88
|
}
|
|
89
89
|
return columnMenuItems;
|
|
90
90
|
}, [props.disableRowGrouping]);
|
package/index.d.ts
CHANGED
|
@@ -20,4 +20,4 @@ export { GridColumnHeaders } from '@mui/x-data-grid-pro';
|
|
|
20
20
|
export type { DataGridPremiumProps, GridExperimentalPremiumFeatures, } from './models/dataGridPremiumProps';
|
|
21
21
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
22
22
|
export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
|
|
23
|
-
export { GridColumnMenu,
|
|
23
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS, } from './components/reexports';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid-premium v6.0
|
|
2
|
+
* @mui/x-data-grid-premium v6.1.0
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -25,4 +25,4 @@ export * from './models';
|
|
|
25
25
|
export * from './components';
|
|
26
26
|
export { GridColumnHeaders } from '@mui/x-data-grid-pro';
|
|
27
27
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
28
|
-
export { GridColumnMenu,
|
|
28
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { GridGenericColumnMenu,
|
|
4
|
+
import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid-pro';
|
|
5
5
|
import { GridColumnMenuAggregationItem } from './GridColumnMenuAggregationItem';
|
|
6
6
|
import { isGroupingColumn } from '../hooks/features/rowGrouping';
|
|
7
7
|
import { GridColumnMenuRowGroupItem } from './GridColumnMenuRowGroupItem';
|
|
@@ -17,11 +17,11 @@ export function GridColumnMenuGroupingItem(props) {
|
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
export var
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export var GRID_COLUMN_MENU_SLOTS_PREMIUM = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
21
|
+
columnMenuAggregationItem: GridColumnMenuAggregationItem,
|
|
22
|
+
columnMenuGroupingItem: GridColumnMenuGroupingItem
|
|
23
23
|
});
|
|
24
|
-
export var
|
|
24
|
+
export var GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
25
25
|
columnMenuAggregationItem: {
|
|
26
26
|
displayOrder: 23
|
|
27
27
|
},
|
|
@@ -33,8 +33,8 @@ var GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremiumCo
|
|
|
33
33
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
|
|
34
34
|
ref: ref
|
|
35
35
|
}, props, {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
|
|
37
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
|
|
38
38
|
}));
|
|
39
39
|
});
|
|
40
40
|
process.env.NODE_ENV !== "production" ? GridPremiumColumnMenu.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridPremiumColumnMenu as GridColumnMenu,
|
|
1
|
+
export { GridPremiumColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PREMIUM as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM as GRID_COLUMN_MENU_SLOT_PROPS } from './GridPremiumColumnMenu';
|
|
@@ -69,7 +69,7 @@ export var useGridAggregationPreProcessors = function useGridAggregationPreProce
|
|
|
69
69
|
if (availableAggregationFunctions.length === 0) {
|
|
70
70
|
return columnMenuItems;
|
|
71
71
|
}
|
|
72
|
-
return [].concat(_toConsumableArray(columnMenuItems), ['
|
|
72
|
+
return [].concat(_toConsumableArray(columnMenuItems), ['columnMenuAggregationItem']);
|
|
73
73
|
}, [props.aggregationFunctions, props.disableAggregation]);
|
|
74
74
|
var stateExportPreProcessing = React.useCallback(function (prevState) {
|
|
75
75
|
if (props.disableAggregation) {
|
|
@@ -129,7 +129,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
|
|
|
129
129
|
apiRef = _ref6.apiRef,
|
|
130
130
|
aggregationRule = _ref6.aggregationRule;
|
|
131
131
|
var getCellAggregationResult = function getCellAggregationResult(id, field) {
|
|
132
|
-
var _rowNode$parent, _gridAggregationLooku;
|
|
132
|
+
var _rowNode$parent, _gridAggregationLooku, _gridAggregationLooku2;
|
|
133
133
|
var cellAggregationPosition = null;
|
|
134
134
|
var rowNode = apiRef.current.getRowNode(id);
|
|
135
135
|
if (rowNode.type === 'group') {
|
|
@@ -143,7 +143,7 @@ export var wrapColumnWithAggregationValue = function wrapColumnWithAggregationVa
|
|
|
143
143
|
|
|
144
144
|
// TODO: Add custom root id
|
|
145
145
|
var groupId = cellAggregationPosition === 'inline' ? id : (_rowNode$parent = rowNode.parent) != null ? _rowNode$parent : '';
|
|
146
|
-
var aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)[groupId]) == null ? void 0 :
|
|
146
|
+
var aggregationResult = (_gridAggregationLooku = gridAggregationLookupSelector(apiRef)) == null ? void 0 : (_gridAggregationLooku2 = _gridAggregationLooku[groupId]) == null ? void 0 : _gridAggregationLooku2[field];
|
|
147
147
|
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
148
148
|
return null;
|
|
149
149
|
}
|