@mui/x-data-grid-premium 6.5.0 → 6.7.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 +150 -2
- package/DataGridPremium/DataGridPremium.js +11 -4
- package/DataGridPremium/useDataGridPremiumProps.js +6 -1
- package/README.md +2 -2
- package/components/GridAggregationHeader.d.ts +2 -2
- package/components/GridColumnMenuAggregationItem.d.ts +2 -2
- package/components/GridColumnMenuRowGroupItem.d.ts +2 -2
- package/components/GridColumnMenuRowUngroupItem.d.ts +2 -2
- package/components/GridExcelExportMenuItem.d.ts +2 -2
- package/components/GridFooterCell.d.ts +2 -2
- package/components/GridGroupingColumnFooterCell.d.ts +2 -2
- package/components/GridGroupingColumnLeafCell.d.ts +2 -2
- package/components/GridGroupingCriteriaCell.d.ts +2 -2
- package/components/GridPremiumColumnMenu.d.ts +1 -1
- package/hooks/features/aggregation/gridAggregationUtils.js +1 -6
- package/hooks/features/export/gridExcelExportInterface.d.ts +1 -1
- package/hooks/features/export/serializer/excelSerializer.d.ts +7 -7
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -8
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -1
- package/index.js +1 -1
- package/legacy/DataGridPremium/DataGridPremium.js +11 -4
- package/legacy/DataGridPremium/useDataGridPremiumProps.js +4 -1
- package/legacy/hooks/features/aggregation/gridAggregationUtils.js +1 -6
- package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -8
- package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/models/dataGridPremiumProps.d.ts +1 -1
- package/modern/DataGridPremium/DataGridPremium.js +11 -4
- package/modern/DataGridPremium/useDataGridPremiumProps.js +6 -1
- package/modern/hooks/features/aggregation/gridAggregationUtils.js +1 -6
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -8
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -1
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPremium/DataGridPremium.js +11 -4
- package/node/DataGridPremium/useDataGridPremiumProps.js +6 -1
- package/node/hooks/features/aggregation/gridAggregationUtils.js +1 -6
- package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -8
- package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +7 -7
- package/themeAugmentation/overrides.d.ts +1 -1
- 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
|
+
## 6.7.0
|
|
7
|
+
|
|
8
|
+
_Jun 9, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Improve the default `format` prop value on the pickers.
|
|
13
|
+
|
|
14
|
+
Here are a few examples:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<TimePicker views={['hours', 'minutes', 'seconds']} ampm />
|
|
18
|
+
// Format before v6.7.0: `hh:mm aa`
|
|
19
|
+
// Format after v6.7.0: `hh:mm:ss aa`
|
|
20
|
+
|
|
21
|
+
<DatePicker views={['year']} />
|
|
22
|
+
// Format before v6.7.0: `MM/DD/YYYY`
|
|
23
|
+
// Format after v6.7.0: `YYYY`
|
|
24
|
+
|
|
25
|
+
<DateTimePicker views={['day', 'hours', 'minutes']} ampm />
|
|
26
|
+
// Format before v6.7.0: `MM/DD/YYYY hh:mm aa`
|
|
27
|
+
// Format after v6.7.0: `DD hh:mm aa`
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- 🌍 Add Romanian (ro-RO) locale on the pickers
|
|
31
|
+
- 🌍 Improve German (de-DE) locale on the pickers
|
|
32
|
+
- 🌍 Improve Czech (cs-CZ), German (de-DE) and Turkish (tr-TR) locales on the data grid
|
|
33
|
+
- 🚀 Performance improvements
|
|
34
|
+
- 🐞 Bugfixes
|
|
35
|
+
- 📚 Documentation improvements
|
|
36
|
+
|
|
37
|
+
### `@mui/x-data-grid@v6.7.0` / `@mui/x-data-grid-pro@v6.7.0` / `@mui/x-data-grid-premium@v6.7.0`
|
|
38
|
+
|
|
39
|
+
#### Changes
|
|
40
|
+
|
|
41
|
+
- [DataGrid] Allow overflowing grid root element (#9179) @cherniavskii
|
|
42
|
+
- [DataGrid] Fix module augmentation error when using `@mui/lab` (#9235) @cherniavskii
|
|
43
|
+
- [DataGrid] Fix row with ids matching `Object` prototype (#9265) @romgrk
|
|
44
|
+
- [DataGrid] Fix `sortModel` and `filterModel` resetting when columns change (#9239) @alexgonch
|
|
45
|
+
- [DataGrid] Improve grouping performance for large datasets (#9200) @romgrk
|
|
46
|
+
- [DataGrid] Increase threshold to trigger memory leak warning (#9263) @m4theushw
|
|
47
|
+
- [DataGrid] Update data grid migration guide to include updated type (#9272) @MBilalShafi
|
|
48
|
+
- [DataGridPro] Improve header filter menu visuals (#9181) @MBilalShafi
|
|
49
|
+
- [DataGridPremium] Remove last line break on clipboard paste (#9163) @cherniavskii
|
|
50
|
+
- [l10n] Improve Czech (cs-CZ) locale (#9266) @MartinSkarpa
|
|
51
|
+
- [l10n] Improve German (de-DE) locale (#9259) @ximex
|
|
52
|
+
- [l10n] Improve Turkish (tr-TR) locale (#9237) @MCErtan
|
|
53
|
+
|
|
54
|
+
### `@mui/x-date-pickers@v6.7.0` / `@mui/x-date-pickers-pro@v6.7.0`
|
|
55
|
+
|
|
56
|
+
#### Changes
|
|
57
|
+
|
|
58
|
+
- [l10n] Add Romanian (ro-RO) locale (#9257) @ximex
|
|
59
|
+
- [l10n] Improve German (de-DE) locale (#9258) @ximex
|
|
60
|
+
- [pickers] Apply dynamic default format depending on views for all desktop and mobile pickers (#9126) @flaviendelangle
|
|
61
|
+
- [pickers] Update `DateRangePickerDay` props JSDoc (#9191) @stevus
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- [docs] Fix missing props on the `GridFilterPanel` API page (#9180) @cherniavskii
|
|
66
|
+
- [docs] Fix overview page typo (#9230) @LukasTy
|
|
67
|
+
- [docs] Fix version redirect (#9273) @alexfauquette
|
|
68
|
+
|
|
69
|
+
### Core
|
|
70
|
+
|
|
71
|
+
- [core] Temporarily remove the Argos upload on the regression testing (#9267) @flaviendelangle
|
|
72
|
+
- [charts] Add clip-path to avoid charts overflow (#9012) @alexfauquette
|
|
73
|
+
- [charts] Add style customization on bar (#8935) @alexfauquette
|
|
74
|
+
- [charts] Enforce axis `min`/`max` over the `nice()` method (#9189) @alexfauquette
|
|
75
|
+
- [charts] Improve axis label and ticks label alignements (#9190) @alexfauquette
|
|
76
|
+
- [charts] Simplify the switch between responsive and fix dimensions (#9151) @alexfauquette
|
|
77
|
+
|
|
78
|
+
## 6.6.0
|
|
79
|
+
|
|
80
|
+
_Jun 1, 2023_
|
|
81
|
+
|
|
82
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
83
|
+
|
|
84
|
+
- 🚀 New date time picking UI on [`DesktopDateTimePicker`](https://mui.com/x/react-date-pickers/date-time-picker/)
|
|
85
|
+
|
|
86
|
+
<img src="https://user-images.githubusercontent.com/4941090/242533399-2b106390-8158-4aba-9ca4-b621c6310977.gif" width="628" />
|
|
87
|
+
|
|
88
|
+
- 🚀 Performance improvements
|
|
89
|
+
- 🐞 Bugfixes
|
|
90
|
+
- 📚 Documentation improvements
|
|
91
|
+
- 🌍 Improve Dutch (nl-NL) and French (fr-FR) locales on the data grid
|
|
92
|
+
- 🌍 Add Vietnamese (vi-VN) locale on the pickers
|
|
93
|
+
|
|
94
|
+
### `@mui/x-data-grid@v6.6.0` / `@mui/x-data-grid-pro@v6.6.0` / `@mui/x-data-grid-premium@v6.6.0`
|
|
95
|
+
|
|
96
|
+
#### Changes
|
|
97
|
+
|
|
98
|
+
- [DataGrid] Support data attributes (#8845) @romgrk
|
|
99
|
+
- [DataGrid] Avoid allocations in `hydrateRowsMeta` (#9121) @romgrk
|
|
100
|
+
- [DataGrid] Fix filter input select accessibility (#9018) @Jul13nT
|
|
101
|
+
- [DataGrid] Fix accessibility issues in panels and toolbar buttons (#8862) @romgrk
|
|
102
|
+
- [DataGrid] Fix `onCellEditStop` not invoked (#8857) @romgrk
|
|
103
|
+
- [DataGridPro] Fix auto-scroll when reordering columns (#8856) @m4theushw
|
|
104
|
+
- [DataGridPro] Fix row ID type casting in detail panels lookup (#8976) @minchaej
|
|
105
|
+
- [DataGridPro] Emit `columnWidthChange` event on `touchEnd` of column resize (#8669) @MBilalShafi
|
|
106
|
+
- [DataGridPro] Do not apply filters on `rowExpansionChange` (#8671) @cherniavskii
|
|
107
|
+
- [DataGridPro] Prevent click event on sorting after a resize (#9117) @romgrk
|
|
108
|
+
- [DataGridPremium] Improve Excel export interface (#9128) @TiagoPortfolio
|
|
109
|
+
- [l10n] Improve Dutch (nl-NL) locale (#9043) @thedutchruben
|
|
110
|
+
- [l10n] Improve French (fr-FR) locale (#9109) @Jul13nT
|
|
111
|
+
|
|
112
|
+
### `@mui/x-date-pickers@v6.6.0` / `@mui/x-date-pickers-pro@v6.6.0`
|
|
113
|
+
|
|
114
|
+
#### Changes
|
|
115
|
+
|
|
116
|
+
- [fields] Allow to explicitly define the reference value and improve its default value (#9019) @flaviendelangle
|
|
117
|
+
- [l10n] Add Vietnamese (vi-VN) locale (#9099) @nhannt201
|
|
118
|
+
- [pickers] Add `DigitalClock` to `DesktopDateTimePicker` (#8946) @LukasTy
|
|
119
|
+
- [pickers] Add support for timezones on the adapters (#9068) @flaviendelangle
|
|
120
|
+
- [pickers] Fix `MonthCalendar` and `YearCalendar` disabled validation (#9149) @LukasTy
|
|
121
|
+
- [pickers] Fix bug when fields have a unique section (#9110) @alexfauquette
|
|
122
|
+
- [pickers] Fix focus jumping on Safari (#9072) @LukasTy
|
|
123
|
+
- [pickers] Use the locale start of the week in `getWeekArray` (#9176) @flaviendelangle
|
|
124
|
+
|
|
125
|
+
### Docs
|
|
126
|
+
|
|
127
|
+
- [docs] Add single input range picker demo (#9159) @LukasTy
|
|
128
|
+
- [docs] Align `DateCalendar` demo views with labels (#9152) @LukasTy
|
|
129
|
+
- [docs] Clarify the peer dependency with React (#9067) @oliviertassinari
|
|
130
|
+
- [docs] Fix Norwegian locale typo (#9168) @LukasTy
|
|
131
|
+
- [docs] Fix column menu item demo (#9071) @MBilalShafi
|
|
132
|
+
- [docs] Improve localization table progress bars (#9033) @noraleonte
|
|
133
|
+
- [docs] Smooth performance animation (#8986) @oliviertassinari
|
|
134
|
+
- [docs] Use responsive time and date time pickers and the views sections (#9127) @flaviendelangle
|
|
135
|
+
- [docs] Reduce layout shift in grid demo (#9132) @oliviertassinari
|
|
136
|
+
- [docs] Fix tree data children lazy-loading demo (#8840) @yaredtsy
|
|
137
|
+
- [docs] Improve filtering docs discoverability (#9074) @MBilalShafi
|
|
138
|
+
|
|
139
|
+
### Core
|
|
140
|
+
|
|
141
|
+
- [core] Allow string literals as keys in `localesText` (#9045) @MBilalShafi
|
|
142
|
+
- [core] Fix `randomInt` producing values exceeding `max` value (#9086) @cherniavskii
|
|
143
|
+
- [core] Fix flaky test on `dateWithTimezone` adapter test (#9129) @flaviendelangle
|
|
144
|
+
- [core] Lock `@types/node` on v18 (#9107) @LukasTy
|
|
145
|
+
- [core] Remove `cross-fetch` dependency (#9108) @LukasTy
|
|
146
|
+
- [core] Remove `createDetectElementResize()` replaced with `ResizeObserver` (#9015) @oliviertassinari
|
|
147
|
+
- [core] Upgrade monorepo (#9027) @m4theushw
|
|
148
|
+
- [core] Upgrade monorepo (#9106) @LukasTy
|
|
149
|
+
- [charts] Fix proptypes (#9125) @LukasTy
|
|
150
|
+
- [charts] Generate the charts proptypes (#9010) @alexfauquette
|
|
151
|
+
- [charts] Manage series stacking (#8888) @alexfauquette
|
|
152
|
+
- [license] List side effects in the license package (#9092) @cherniavskii
|
|
153
|
+
|
|
6
154
|
## v6.5.0
|
|
7
155
|
|
|
8
156
|
_May 19, 2023_
|
|
@@ -102,7 +250,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
102
250
|
|
|
103
251
|
### Docs
|
|
104
252
|
|
|
105
|
-
- [docs] Fix date pickers typo in the docs
|
|
253
|
+
- [docs] Fix date pickers typo in the docs (#8939) @richbustos
|
|
106
254
|
- [docs] Fix master detail demo (#8894) @m4theushw
|
|
107
255
|
- [docs] Fix typo in clipboard docs (#8971) @MBilalShafi
|
|
108
256
|
- [docs] Reduce list of dependencies in Codesandbox/Stackblitz demos (#8535) @cherniavskii
|
|
@@ -4440,7 +4588,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
4440
4588
|
|
|
4441
4589
|
- 👔 **Excel export**. You can find this new Premium feature at: https://mui.com/x/react-data-grid/export/#excel-export.
|
|
4442
4590
|
|
|
4443
|
-
- 🔎 **Quick filtering**. You can now add a quick filtering search bar to your grid. To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar. More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering
|
|
4591
|
+
- 🔎 **Quick filtering**. You can now add a quick filtering search bar to your grid. To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar. More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering/quick-filter/).
|
|
4444
4592
|
|
|
4445
4593
|
<img src="https://user-images.githubusercontent.com/13808724/167700105-5a5acc7c-5463-4871-8514-3d09e2f365ae.png" width="724">
|
|
4446
4594
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { useLicenseVerifier, Watermark } from '@mui/x-license-pro';
|
|
@@ -18,11 +19,12 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
18
19
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
19
20
|
privateApiRef: privateApiRef,
|
|
20
21
|
props: props,
|
|
21
|
-
children: /*#__PURE__*/_jsxs(GridRoot, {
|
|
22
|
+
children: /*#__PURE__*/_jsxs(GridRoot, _extends({
|
|
22
23
|
className: props.className,
|
|
23
24
|
style: props.style,
|
|
24
25
|
sx: props.sx,
|
|
25
|
-
ref: ref
|
|
26
|
+
ref: ref
|
|
27
|
+
}, props.forwardedProps, {
|
|
26
28
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
|
|
27
29
|
VirtualScrollerComponent: DataGridProVirtualScroller,
|
|
28
30
|
ColumnHeadersProps: {
|
|
@@ -33,7 +35,7 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
33
35
|
releaseInfo: releaseInfo
|
|
34
36
|
})
|
|
35
37
|
}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
36
|
-
})
|
|
38
|
+
}))
|
|
37
39
|
});
|
|
38
40
|
});
|
|
39
41
|
export const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
@@ -286,6 +288,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
286
288
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
287
289
|
quickFilterValues: PropTypes.array
|
|
288
290
|
}),
|
|
291
|
+
/**
|
|
292
|
+
* Forwarded props for the grid root element.
|
|
293
|
+
* @ignore - do not document.
|
|
294
|
+
*/
|
|
295
|
+
forwardedProps: PropTypes.object,
|
|
289
296
|
/**
|
|
290
297
|
* Determines the position of an aggregated value.
|
|
291
298
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -933,7 +940,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
933
940
|
* The function is used to split the pasted text into rows and cells.
|
|
934
941
|
* @param {string} text The text pasted from the clipboard.
|
|
935
942
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
936
|
-
* @default `(
|
|
943
|
+
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
|
|
937
944
|
*/
|
|
938
945
|
unstable_splitClipboardPastedText: PropTypes.func
|
|
939
946
|
} : void 0;
|
|
@@ -18,7 +18,12 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
18
18
|
aggregationRowsScope: 'filtered',
|
|
19
19
|
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
20
20
|
disableClipboardPaste: false,
|
|
21
|
-
unstable_splitClipboardPastedText:
|
|
21
|
+
unstable_splitClipboardPastedText: pastedText => {
|
|
22
|
+
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
23
|
+
// See https://github.com/mui/mui-x/issues/9103
|
|
24
|
+
const text = pastedText.replace(/\r?\n$/, '');
|
|
25
|
+
return text.split(/\r\n|\n|\r/).map(row => row.split('\t'));
|
|
26
|
+
}
|
|
22
27
|
});
|
|
23
28
|
const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
24
29
|
export const useDataGridPremiumProps = inProps => {
|
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ This component has the following peer dependencies that you will need to install
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@mui/material": "^5.4.1",
|
|
23
23
|
"@mui/system": "^5.4.1",
|
|
24
|
-
"react": "^17.0.
|
|
25
|
-
"react-dom": "^17.0.
|
|
24
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
25
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
26
26
|
},
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnHeaderParams } from '@mui/x-data-grid';
|
|
3
|
-
declare function GridAggregationHeader(props: GridColumnHeaderParams): JSX.Element | null;
|
|
3
|
+
declare function GridAggregationHeader(props: GridColumnHeaderParams): React.JSX.Element | null;
|
|
4
4
|
export { GridAggregationHeader };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
declare function GridColumnMenuAggregationItem(props: GridColumnMenuItemProps): JSX.Element;
|
|
3
|
+
declare function GridColumnMenuAggregationItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
4
4
|
declare namespace GridColumnMenuAggregationItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
declare function GridColumnMenuRowGroupItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuRowGroupItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuRowGroupItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
declare function GridColumnMenuRowUngroupItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuRowUngroupItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuRowUngroupItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridExportMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
3
|
import { GridExcelExportOptions } from '../hooks/features/export';
|
|
4
4
|
export type GridExcelExportMenuItemProps = GridExportMenuItemProps<GridExcelExportOptions>;
|
|
5
|
-
declare function GridExcelExportMenuItem(props: GridExcelExportMenuItemProps): JSX.Element;
|
|
5
|
+
declare function GridExcelExportMenuItem(props: GridExcelExportMenuItemProps): React.JSX.Element;
|
|
6
6
|
declare namespace GridExcelExportMenuItem {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridRenderCellParams } from '@mui/x-data-grid';
|
|
3
3
|
import { Theme } from '@mui/material/styles';
|
|
4
4
|
import { SxProps } from '@mui/system';
|
|
5
5
|
interface GridFooterCellProps extends GridRenderCellParams {
|
|
6
6
|
sx?: SxProps<Theme>;
|
|
7
7
|
}
|
|
8
|
-
declare function GridFooterCell(props: GridFooterCellProps): JSX.Element;
|
|
8
|
+
declare function GridFooterCell(props: GridFooterCellProps): React.JSX.Element;
|
|
9
9
|
export { GridFooterCell };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridRenderCellParams } from '@mui/x-data-grid-pro';
|
|
3
|
-
declare function GridGroupingColumnFooterCell(props: GridRenderCellParams): JSX.Element;
|
|
3
|
+
declare function GridGroupingColumnFooterCell(props: GridRenderCellParams): React.JSX.Element;
|
|
4
4
|
export { GridGroupingColumnFooterCell };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridRenderCellParams } from '@mui/x-data-grid-pro';
|
|
3
|
-
declare function GridGroupingColumnLeafCell(props: GridRenderCellParams): JSX.Element;
|
|
3
|
+
declare function GridGroupingColumnLeafCell(props: GridRenderCellParams): React.JSX.Element;
|
|
4
4
|
export { GridGroupingColumnLeafCell };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridRenderCellParams, GridGroupNode } from '@mui/x-data-grid-pro';
|
|
3
3
|
interface GridGroupingCriteriaCellProps extends GridRenderCellParams<any, any, any, GridGroupNode> {
|
|
4
4
|
hideDescendantCount?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare function GridGroupingCriteriaCell(props: GridGroupingCriteriaCellProps): JSX.Element;
|
|
6
|
+
export declare function GridGroupingCriteriaCell(props: GridGroupingCriteriaCellProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuProps, GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
3
|
import { GridColumnMenuAggregationItem } from './GridColumnMenuAggregationItem';
|
|
4
|
-
export declare function GridColumnMenuGroupingItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
4
|
+
export declare function GridColumnMenuGroupingItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
5
5
|
export declare const GRID_COLUMN_MENU_SLOTS_PREMIUM: {
|
|
6
6
|
columnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
|
|
7
7
|
columnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
|
|
@@ -92,12 +92,7 @@ export const addFooterRows = ({
|
|
|
92
92
|
depth: groupNode ? groupNode.depth + 1 : 0,
|
|
93
93
|
type: 'footer'
|
|
94
94
|
};
|
|
95
|
-
insertNodeInTree(
|
|
96
|
-
previousTree: null,
|
|
97
|
-
node: footerNode,
|
|
98
|
-
tree: newGroupingParams.tree,
|
|
99
|
-
treeDepths: newGroupingParams.treeDepths
|
|
100
|
-
});
|
|
95
|
+
insertNodeInTree(footerNode, newGroupingParams.tree, newGroupingParams.treeDepths, null);
|
|
101
96
|
}
|
|
102
97
|
} else if (groupNode.footerId != null) {
|
|
103
98
|
removeNodeFromTree({
|
|
@@ -22,18 +22,18 @@ export declare const serializeColumn: (column: GridColDef, columnsStyles: Column
|
|
|
22
22
|
headerText: string;
|
|
23
23
|
width: number;
|
|
24
24
|
style: {
|
|
25
|
-
numFmt
|
|
26
|
-
font
|
|
27
|
-
alignment
|
|
28
|
-
protection
|
|
29
|
-
border
|
|
30
|
-
fill
|
|
25
|
+
numFmt?: string | undefined;
|
|
26
|
+
font?: Partial<Excel.Font> | undefined;
|
|
27
|
+
alignment?: Partial<Excel.Alignment> | undefined;
|
|
28
|
+
protection?: Partial<Excel.Protection> | undefined;
|
|
29
|
+
border?: Partial<Excel.Borders> | undefined;
|
|
30
|
+
fill?: Excel.Fill | undefined;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
type SerializedColumns = Array<{
|
|
34
34
|
key: string;
|
|
35
35
|
width: number;
|
|
36
|
-
style: Excel.Style
|
|
36
|
+
style: Partial<Excel.Style>;
|
|
37
37
|
headerText: string;
|
|
38
38
|
}>;
|
|
39
39
|
export declare function serializeColumns(columns: GridStateColDef[], styles: ColumnsStylesInterface): SerializedColumns;
|
|
@@ -40,7 +40,6 @@ export const filterRowTreeFromGroupingColumns = params => {
|
|
|
40
40
|
isRowMatchingFilters,
|
|
41
41
|
filterModel
|
|
42
42
|
} = params;
|
|
43
|
-
const visibleRowsLookup = {};
|
|
44
43
|
const filteredRowsLookup = {};
|
|
45
44
|
const filteredDescendantCountLookup = {};
|
|
46
45
|
const filterTreeNode = (node, areAncestorsExpanded, ancestorsResults) => {
|
|
@@ -72,13 +71,7 @@ export const filterRowTreeFromGroupingColumns = params => {
|
|
|
72
71
|
isPassingFiltering = passFilterLogic(allResults.map(result => result.passingFilterItems), allResults.map(result => result.passingQuickFilterValues), filterModel, params.apiRef);
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
|
-
visibleRowsLookup[node.id] = isPassingFiltering && areAncestorsExpanded;
|
|
76
74
|
filteredRowsLookup[node.id] = isPassingFiltering;
|
|
77
|
-
|
|
78
|
-
// TODO rows v6: Should we keep storing the visibility status of footer independently or rely on the group visibility in the selector ?
|
|
79
|
-
if (node.type === 'group' && node.footerId != null) {
|
|
80
|
-
visibleRowsLookup[node.footerId] = isPassingFiltering && areAncestorsExpanded && !!node.childrenExpanded;
|
|
81
|
-
}
|
|
82
75
|
if (!isPassingFiltering) {
|
|
83
76
|
return 0;
|
|
84
77
|
}
|
|
@@ -96,7 +89,6 @@ export const filterRowTreeFromGroupingColumns = params => {
|
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
return {
|
|
99
|
-
visibleRowsLookup,
|
|
100
92
|
filteredRowsLookup,
|
|
101
93
|
filteredDescendantCountLookup
|
|
102
94
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { gridColumnLookupSelector, gridRowTreeSelector, useFirstRender, GRID_CHECKBOX_SELECTION_FIELD } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree, getVisibleRowsLookup } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
|
|
5
5
|
import { createGroupingColDefForAllGroupingCriteria, createGroupingColDefForOneGroupingCriteria } from './createGroupingColDef';
|
|
6
6
|
import { filterRowTreeFromGroupingColumns, getColDefOverrides, ROW_GROUPING_STRATEGY, isGroupingColumn, setStrategyAvailability, getCellGroupingCriteria, getGroupingRules } from './gridRowGroupingUtils';
|
|
@@ -138,6 +138,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
138
138
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'rowTreeCreation', createRowTreeForRowGrouping);
|
|
139
139
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'filtering', filterRows);
|
|
140
140
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'sorting', sortRows);
|
|
141
|
+
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'visibleRowsLookupCreation', getVisibleRowsLookup);
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
* 1ST RENDER
|
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { useLicenseVerifier, Watermark } from '@mui/x-license-pro';
|
|
@@ -18,11 +19,12 @@ var DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(
|
|
|
18
19
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
19
20
|
privateApiRef: privateApiRef,
|
|
20
21
|
props: props,
|
|
21
|
-
children: /*#__PURE__*/_jsxs(GridRoot, {
|
|
22
|
+
children: /*#__PURE__*/_jsxs(GridRoot, _extends({
|
|
22
23
|
className: props.className,
|
|
23
24
|
style: props.style,
|
|
24
25
|
sx: props.sx,
|
|
25
|
-
ref: ref
|
|
26
|
+
ref: ref
|
|
27
|
+
}, props.forwardedProps, {
|
|
26
28
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
|
|
27
29
|
VirtualScrollerComponent: DataGridProVirtualScroller,
|
|
28
30
|
ColumnHeadersProps: {
|
|
@@ -33,7 +35,7 @@ var DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(
|
|
|
33
35
|
releaseInfo: releaseInfo
|
|
34
36
|
})
|
|
35
37
|
}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
36
|
-
})
|
|
38
|
+
}))
|
|
37
39
|
});
|
|
38
40
|
});
|
|
39
41
|
export var DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
@@ -286,6 +288,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
286
288
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
287
289
|
quickFilterValues: PropTypes.array
|
|
288
290
|
}),
|
|
291
|
+
/**
|
|
292
|
+
* Forwarded props for the grid root element.
|
|
293
|
+
* @ignore - do not document.
|
|
294
|
+
*/
|
|
295
|
+
forwardedProps: PropTypes.object,
|
|
289
296
|
/**
|
|
290
297
|
* Determines the position of an aggregated value.
|
|
291
298
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -933,7 +940,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
933
940
|
* The function is used to split the pasted text into rows and cells.
|
|
934
941
|
* @param {string} text The text pasted from the clipboard.
|
|
935
942
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
936
|
-
* @default `(
|
|
943
|
+
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
|
|
937
944
|
*/
|
|
938
945
|
unstable_splitClipboardPastedText: PropTypes.func
|
|
939
946
|
} : void 0;
|
|
@@ -21,7 +21,10 @@ export var DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO_P
|
|
|
21
21
|
return groupNode.depth === -1 ? 'footer' : 'inline';
|
|
22
22
|
},
|
|
23
23
|
disableClipboardPaste: false,
|
|
24
|
-
unstable_splitClipboardPastedText: function unstable_splitClipboardPastedText(
|
|
24
|
+
unstable_splitClipboardPastedText: function unstable_splitClipboardPastedText(pastedText) {
|
|
25
|
+
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
26
|
+
// See https://github.com/mui/mui-x/issues/9103
|
|
27
|
+
var text = pastedText.replace(/\r?\n$/, '');
|
|
25
28
|
return text.split(/\r\n|\n|\r/).map(function (row) {
|
|
26
29
|
return row.split('\t');
|
|
27
30
|
});
|
|
@@ -100,12 +100,7 @@ export var addFooterRows = function addFooterRows(_ref6) {
|
|
|
100
100
|
depth: groupNode ? groupNode.depth + 1 : 0,
|
|
101
101
|
type: 'footer'
|
|
102
102
|
};
|
|
103
|
-
insertNodeInTree(
|
|
104
|
-
previousTree: null,
|
|
105
|
-
node: footerNode,
|
|
106
|
-
tree: newGroupingParams.tree,
|
|
107
|
-
treeDepths: newGroupingParams.treeDepths
|
|
108
|
-
});
|
|
103
|
+
insertNodeInTree(footerNode, newGroupingParams.tree, newGroupingParams.treeDepths, null);
|
|
109
104
|
}
|
|
110
105
|
} else if (groupNode.footerId != null) {
|
|
111
106
|
removeNodeFromTree({
|
|
@@ -41,7 +41,6 @@ export var filterRowTreeFromGroupingColumns = function filterRowTreeFromGrouping
|
|
|
41
41
|
var rowTree = params.rowTree,
|
|
42
42
|
isRowMatchingFilters = params.isRowMatchingFilters,
|
|
43
43
|
filterModel = params.filterModel;
|
|
44
|
-
var visibleRowsLookup = {};
|
|
45
44
|
var filteredRowsLookup = {};
|
|
46
45
|
var filteredDescendantCountLookup = {};
|
|
47
46
|
var filterTreeNode = function filterTreeNode(node, areAncestorsExpanded, ancestorsResults) {
|
|
@@ -79,13 +78,7 @@ export var filterRowTreeFromGroupingColumns = function filterRowTreeFromGrouping
|
|
|
79
78
|
}), filterModel, params.apiRef);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
|
-
visibleRowsLookup[node.id] = isPassingFiltering && areAncestorsExpanded;
|
|
83
81
|
filteredRowsLookup[node.id] = isPassingFiltering;
|
|
84
|
-
|
|
85
|
-
// TODO rows v6: Should we keep storing the visibility status of footer independently or rely on the group visibility in the selector ?
|
|
86
|
-
if (node.type === 'group' && node.footerId != null) {
|
|
87
|
-
visibleRowsLookup[node.footerId] = isPassingFiltering && areAncestorsExpanded && !!node.childrenExpanded;
|
|
88
|
-
}
|
|
89
82
|
if (!isPassingFiltering) {
|
|
90
83
|
return 0;
|
|
91
84
|
}
|
|
@@ -103,7 +96,6 @@ export var filterRowTreeFromGroupingColumns = function filterRowTreeFromGrouping
|
|
|
103
96
|
}
|
|
104
97
|
}
|
|
105
98
|
return {
|
|
106
|
-
visibleRowsLookup: visibleRowsLookup,
|
|
107
99
|
filteredRowsLookup: filteredRowsLookup,
|
|
108
100
|
filteredDescendantCountLookup: filteredDescendantCountLookup
|
|
109
101
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { gridColumnLookupSelector, gridRowTreeSelector, useFirstRender, GRID_CHECKBOX_SELECTION_FIELD } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree } from '@mui/x-data-grid-pro/internals';
|
|
4
|
+
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree, getVisibleRowsLookup } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
|
|
6
6
|
import { createGroupingColDefForAllGroupingCriteria, createGroupingColDefForOneGroupingCriteria } from './createGroupingColDef';
|
|
7
7
|
import { filterRowTreeFromGroupingColumns, getColDefOverrides, ROW_GROUPING_STRATEGY, isGroupingColumn, setStrategyAvailability, getCellGroupingCriteria, getGroupingRules } from './gridRowGroupingUtils';
|
|
@@ -149,6 +149,7 @@ export var useGridRowGroupingPreProcessors = function useGridRowGroupingPreProce
|
|
|
149
149
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'rowTreeCreation', createRowTreeForRowGrouping);
|
|
150
150
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'filtering', filterRows);
|
|
151
151
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'sorting', sortRows);
|
|
152
|
+
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'visibleRowsLookupCreation', getVisibleRowsLookup);
|
|
152
153
|
|
|
153
154
|
/**
|
|
154
155
|
* 1ST RENDER
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY4NjI2MTYwMDAwMA==";
|
|
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
|
|
@@ -93,7 +93,7 @@ export interface DataGridPremiumPropsWithDefaultValue extends DataGridProPropsWi
|
|
|
93
93
|
* The function is used to split the pasted text into rows and cells.
|
|
94
94
|
* @param {string} text The text pasted from the clipboard.
|
|
95
95
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
96
|
-
* @default `(
|
|
96
|
+
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
|
|
97
97
|
*/
|
|
98
98
|
unstable_splitClipboardPastedText: (text: string) => string[][] | null;
|
|
99
99
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { useLicenseVerifier, Watermark } from '@mui/x-license-pro';
|
|
@@ -18,11 +19,12 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
18
19
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
19
20
|
privateApiRef: privateApiRef,
|
|
20
21
|
props: props,
|
|
21
|
-
children: /*#__PURE__*/_jsxs(GridRoot, {
|
|
22
|
+
children: /*#__PURE__*/_jsxs(GridRoot, _extends({
|
|
22
23
|
className: props.className,
|
|
23
24
|
style: props.style,
|
|
24
25
|
sx: props.sx,
|
|
25
|
-
ref: ref
|
|
26
|
+
ref: ref
|
|
27
|
+
}, props.forwardedProps, {
|
|
26
28
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
|
|
27
29
|
VirtualScrollerComponent: DataGridProVirtualScroller,
|
|
28
30
|
ColumnHeadersProps: {
|
|
@@ -33,7 +35,7 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
33
35
|
releaseInfo: releaseInfo
|
|
34
36
|
})
|
|
35
37
|
}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
36
|
-
})
|
|
38
|
+
}))
|
|
37
39
|
});
|
|
38
40
|
});
|
|
39
41
|
export const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
@@ -286,6 +288,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
286
288
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
287
289
|
quickFilterValues: PropTypes.array
|
|
288
290
|
}),
|
|
291
|
+
/**
|
|
292
|
+
* Forwarded props for the grid root element.
|
|
293
|
+
* @ignore - do not document.
|
|
294
|
+
*/
|
|
295
|
+
forwardedProps: PropTypes.object,
|
|
289
296
|
/**
|
|
290
297
|
* Determines the position of an aggregated value.
|
|
291
298
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -933,7 +940,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
933
940
|
* The function is used to split the pasted text into rows and cells.
|
|
934
941
|
* @param {string} text The text pasted from the clipboard.
|
|
935
942
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
936
|
-
* @default `(
|
|
943
|
+
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
|
|
937
944
|
*/
|
|
938
945
|
unstable_splitClipboardPastedText: PropTypes.func
|
|
939
946
|
} : void 0;
|
|
@@ -18,7 +18,12 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
18
18
|
aggregationRowsScope: 'filtered',
|
|
19
19
|
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
20
20
|
disableClipboardPaste: false,
|
|
21
|
-
unstable_splitClipboardPastedText:
|
|
21
|
+
unstable_splitClipboardPastedText: pastedText => {
|
|
22
|
+
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
23
|
+
// See https://github.com/mui/mui-x/issues/9103
|
|
24
|
+
const text = pastedText.replace(/\r?\n$/, '');
|
|
25
|
+
return text.split(/\r\n|\n|\r/).map(row => row.split('\t'));
|
|
26
|
+
}
|
|
22
27
|
});
|
|
23
28
|
const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
24
29
|
export const useDataGridPremiumProps = inProps => {
|
|
@@ -92,12 +92,7 @@ export const addFooterRows = ({
|
|
|
92
92
|
depth: groupNode ? groupNode.depth + 1 : 0,
|
|
93
93
|
type: 'footer'
|
|
94
94
|
};
|
|
95
|
-
insertNodeInTree(
|
|
96
|
-
previousTree: null,
|
|
97
|
-
node: footerNode,
|
|
98
|
-
tree: newGroupingParams.tree,
|
|
99
|
-
treeDepths: newGroupingParams.treeDepths
|
|
100
|
-
});
|
|
95
|
+
insertNodeInTree(footerNode, newGroupingParams.tree, newGroupingParams.treeDepths, null);
|
|
101
96
|
}
|
|
102
97
|
} else if (groupNode.footerId != null) {
|
|
103
98
|
removeNodeFromTree({
|
|
@@ -40,7 +40,6 @@ export const filterRowTreeFromGroupingColumns = params => {
|
|
|
40
40
|
isRowMatchingFilters,
|
|
41
41
|
filterModel
|
|
42
42
|
} = params;
|
|
43
|
-
const visibleRowsLookup = {};
|
|
44
43
|
const filteredRowsLookup = {};
|
|
45
44
|
const filteredDescendantCountLookup = {};
|
|
46
45
|
const filterTreeNode = (node, areAncestorsExpanded, ancestorsResults) => {
|
|
@@ -72,13 +71,7 @@ export const filterRowTreeFromGroupingColumns = params => {
|
|
|
72
71
|
isPassingFiltering = passFilterLogic(allResults.map(result => result.passingFilterItems), allResults.map(result => result.passingQuickFilterValues), filterModel, params.apiRef);
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
|
-
visibleRowsLookup[node.id] = isPassingFiltering && areAncestorsExpanded;
|
|
76
74
|
filteredRowsLookup[node.id] = isPassingFiltering;
|
|
77
|
-
|
|
78
|
-
// TODO rows v6: Should we keep storing the visibility status of footer independently or rely on the group visibility in the selector ?
|
|
79
|
-
if (node.type === 'group' && node.footerId != null) {
|
|
80
|
-
visibleRowsLookup[node.footerId] = isPassingFiltering && areAncestorsExpanded && !!node.childrenExpanded;
|
|
81
|
-
}
|
|
82
75
|
if (!isPassingFiltering) {
|
|
83
76
|
return 0;
|
|
84
77
|
}
|
|
@@ -96,7 +89,6 @@ export const filterRowTreeFromGroupingColumns = params => {
|
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
return {
|
|
99
|
-
visibleRowsLookup,
|
|
100
92
|
filteredRowsLookup,
|
|
101
93
|
filteredDescendantCountLookup
|
|
102
94
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { gridColumnLookupSelector, gridRowTreeSelector, useFirstRender, GRID_CHECKBOX_SELECTION_FIELD } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree, getVisibleRowsLookup } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
|
|
5
5
|
import { createGroupingColDefForAllGroupingCriteria, createGroupingColDefForOneGroupingCriteria } from './createGroupingColDef';
|
|
6
6
|
import { filterRowTreeFromGroupingColumns, getColDefOverrides, ROW_GROUPING_STRATEGY, isGroupingColumn, setStrategyAvailability, getCellGroupingCriteria, getGroupingRules } from './gridRowGroupingUtils';
|
|
@@ -138,6 +138,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
138
138
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'rowTreeCreation', createRowTreeForRowGrouping);
|
|
139
139
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'filtering', filterRows);
|
|
140
140
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'sorting', sortRows);
|
|
141
|
+
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'visibleRowsLookupCreation', getVisibleRowsLookup);
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
* 1ST RENDER
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY4NjI2MTYwMDAwMA==";
|
|
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.DataGridPremium = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var React = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
11
|
var _xLicensePro = require("@mui/x-license-pro");
|
|
@@ -26,11 +27,12 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
26
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridContextProvider, {
|
|
27
28
|
privateApiRef: privateApiRef,
|
|
28
29
|
props: props,
|
|
29
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGridPro.GridRoot, {
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGridPro.GridRoot, (0, _extends2.default)({
|
|
30
31
|
className: props.className,
|
|
31
32
|
style: props.style,
|
|
32
33
|
sx: props.sx,
|
|
33
|
-
ref: ref
|
|
34
|
+
ref: ref
|
|
35
|
+
}, props.forwardedProps, {
|
|
34
36
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridHeader, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridBody, {
|
|
35
37
|
VirtualScrollerComponent: _internals.DataGridProVirtualScroller,
|
|
36
38
|
ColumnHeadersProps: {
|
|
@@ -41,7 +43,7 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
|
|
|
41
43
|
releaseInfo: releaseInfo
|
|
42
44
|
})
|
|
43
45
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridFooterPlaceholder, {})]
|
|
44
|
-
})
|
|
46
|
+
}))
|
|
45
47
|
});
|
|
46
48
|
});
|
|
47
49
|
const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
@@ -295,6 +297,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
295
297
|
quickFilterLogicOperator: _propTypes.default.oneOf(['and', 'or']),
|
|
296
298
|
quickFilterValues: _propTypes.default.array
|
|
297
299
|
}),
|
|
300
|
+
/**
|
|
301
|
+
* Forwarded props for the grid root element.
|
|
302
|
+
* @ignore - do not document.
|
|
303
|
+
*/
|
|
304
|
+
forwardedProps: _propTypes.default.object,
|
|
298
305
|
/**
|
|
299
306
|
* Determines the position of an aggregated value.
|
|
300
307
|
* @param {GridGroupNode} groupNode The current group.
|
|
@@ -942,7 +949,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
942
949
|
* The function is used to split the pasted text into rows and cells.
|
|
943
950
|
* @param {string} text The text pasted from the clipboard.
|
|
944
951
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
945
|
-
* @default `(
|
|
952
|
+
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
|
|
946
953
|
*/
|
|
947
954
|
unstable_splitClipboardPastedText: _propTypes.default.func
|
|
948
955
|
} : void 0;
|
|
@@ -26,7 +26,12 @@ const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = (0, _extends2.default)({}, _xData
|
|
|
26
26
|
aggregationRowsScope: 'filtered',
|
|
27
27
|
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
28
28
|
disableClipboardPaste: false,
|
|
29
|
-
unstable_splitClipboardPastedText:
|
|
29
|
+
unstable_splitClipboardPastedText: pastedText => {
|
|
30
|
+
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
31
|
+
// See https://github.com/mui/mui-x/issues/9103
|
|
32
|
+
const text = pastedText.replace(/\r?\n$/, '');
|
|
33
|
+
return text.split(/\r\n|\n|\r/).map(row => row.split('\t'));
|
|
34
|
+
}
|
|
30
35
|
});
|
|
31
36
|
exports.DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES;
|
|
32
37
|
const defaultSlots = (0, _internals.uncapitalizeObjectKeys)(_dataGridPremiumDefaultSlotsComponents.DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
@@ -105,12 +105,7 @@ const addFooterRows = ({
|
|
|
105
105
|
depth: groupNode ? groupNode.depth + 1 : 0,
|
|
106
106
|
type: 'footer'
|
|
107
107
|
};
|
|
108
|
-
(0, _internals.insertNodeInTree)(
|
|
109
|
-
previousTree: null,
|
|
110
|
-
node: footerNode,
|
|
111
|
-
tree: newGroupingParams.tree,
|
|
112
|
-
treeDepths: newGroupingParams.treeDepths
|
|
113
|
-
});
|
|
108
|
+
(0, _internals.insertNodeInTree)(footerNode, newGroupingParams.tree, newGroupingParams.treeDepths, null);
|
|
114
109
|
}
|
|
115
110
|
} else if (groupNode.footerId != null) {
|
|
116
111
|
(0, _internals.removeNodeFromTree)({
|
|
@@ -52,7 +52,6 @@ const filterRowTreeFromGroupingColumns = params => {
|
|
|
52
52
|
isRowMatchingFilters,
|
|
53
53
|
filterModel
|
|
54
54
|
} = params;
|
|
55
|
-
const visibleRowsLookup = {};
|
|
56
55
|
const filteredRowsLookup = {};
|
|
57
56
|
const filteredDescendantCountLookup = {};
|
|
58
57
|
const filterTreeNode = (node, areAncestorsExpanded, ancestorsResults) => {
|
|
@@ -84,13 +83,7 @@ const filterRowTreeFromGroupingColumns = params => {
|
|
|
84
83
|
isPassingFiltering = (0, _internals.passFilterLogic)(allResults.map(result => result.passingFilterItems), allResults.map(result => result.passingQuickFilterValues), filterModel, params.apiRef);
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
|
-
visibleRowsLookup[node.id] = isPassingFiltering && areAncestorsExpanded;
|
|
88
86
|
filteredRowsLookup[node.id] = isPassingFiltering;
|
|
89
|
-
|
|
90
|
-
// TODO rows v6: Should we keep storing the visibility status of footer independently or rely on the group visibility in the selector ?
|
|
91
|
-
if (node.type === 'group' && node.footerId != null) {
|
|
92
|
-
visibleRowsLookup[node.footerId] = isPassingFiltering && areAncestorsExpanded && !!node.childrenExpanded;
|
|
93
|
-
}
|
|
94
87
|
if (!isPassingFiltering) {
|
|
95
88
|
return 0;
|
|
96
89
|
}
|
|
@@ -108,7 +101,6 @@ const filterRowTreeFromGroupingColumns = params => {
|
|
|
108
101
|
}
|
|
109
102
|
}
|
|
110
103
|
return {
|
|
111
|
-
visibleRowsLookup,
|
|
112
104
|
filteredRowsLookup,
|
|
113
105
|
filteredDescendantCountLookup
|
|
114
106
|
};
|
|
@@ -146,6 +146,7 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
146
146
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'rowTreeCreation', createRowTreeForRowGrouping);
|
|
147
147
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'filtering', filterRows);
|
|
148
148
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'sorting', sortRows);
|
|
149
|
+
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'visibleRowsLookupCreation', _internals.getVisibleRowsLookup);
|
|
149
150
|
|
|
150
151
|
/**
|
|
151
152
|
* 1ST RENDER
|
package/node/index.js
CHANGED
|
@@ -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 = "
|
|
9
|
+
const releaseInfo = "MTY4NjI2MTYwMDAwMA==";
|
|
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.
|
|
3
|
+
"version": "6.7.0",
|
|
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",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.21.0",
|
|
35
|
-
"@mui/utils": "^5.
|
|
36
|
-
"@mui/x-data-grid": "6.
|
|
37
|
-
"@mui/x-data-grid-pro": "6.
|
|
38
|
-
"@mui/x-license-pro": "6.0
|
|
35
|
+
"@mui/utils": "^5.13.1",
|
|
36
|
+
"@mui/x-data-grid": "6.7.0",
|
|
37
|
+
"@mui/x-data-grid-pro": "6.7.0",
|
|
38
|
+
"@mui/x-license-pro": "6.6.0",
|
|
39
39
|
"@types/format-util": "^1.0.2",
|
|
40
40
|
"clsx": "^1.2.1",
|
|
41
41
|
"exceljs": "^4.3.0",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@mui/material": "^5.4.1",
|
|
47
47
|
"@mui/system": "^5.4.1",
|
|
48
|
-
"react": "^17.0.
|
|
49
|
-
"react-dom": "^17.0.
|
|
48
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
49
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
50
50
|
},
|
|
51
51
|
"setupFiles": [
|
|
52
52
|
"<rootDir>/src/setupTests.js"
|
|
@@ -2,7 +2,7 @@ import { GridClassKey } from '@mui/x-data-grid';
|
|
|
2
2
|
export interface DataGridPremiumComponentNameToClassKey {
|
|
3
3
|
MuiDataGrid: GridClassKey;
|
|
4
4
|
}
|
|
5
|
-
declare module '@mui/material/styles
|
|
5
|
+
declare module '@mui/material/styles' {
|
|
6
6
|
interface ComponentNameToClassKey extends DataGridPremiumComponentNameToClassKey {
|
|
7
7
|
}
|
|
8
8
|
}
|
package/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY4NjI2MTYwMDAwMA==";
|
|
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
|