@mui/x-data-grid-premium 5.17.3 → 6.0.0-alpha.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 +212 -3
- package/DataGridPremium/DataGridPremium.js +3 -13
- package/components/GridExcelExportMenuItem.js +11 -1
- package/hooks/utils/useKeepGroupedColumnsHidden.js +2 -2
- package/index.js +1 -1
- package/legacy/DataGridPremium/DataGridPremium.js +3 -13
- package/legacy/components/GridExcelExportMenuItem.js +11 -1
- package/legacy/hooks/utils/useKeepGroupedColumnsHidden.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/models/gridGroupingValueGetterParams.d.ts +2 -2
- package/modern/DataGridPremium/DataGridPremium.js +3 -13
- package/modern/components/GridExcelExportMenuItem.js +11 -1
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +2 -2
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPremium/DataGridPremium.js +3 -13
- package/node/components/GridExcelExportMenuItem.js +11 -1
- package/node/hooks/utils/useKeepGroupedColumnsHidden.js +1 -1
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,215 @@
|
|
|
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.0.0-alpha.0
|
|
7
|
+
|
|
8
|
+
_Sep 22, 2022_
|
|
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
|
+
- 🌍 Add a `localeText` prop to all pickers to customize the translations (#6212) @flaviendelangle
|
|
13
|
+
- 🌍 Add Finnish (fi-FI) locale to the pickers (#6219) @PetroSilenius
|
|
14
|
+
- 🌍 Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
|
|
18
|
+
### `@mui/x-data-grid@v6.0.0-alpha.0` / `@mui/x-data-grid-pro@v6.0.0-alpha.0` / `@mui/x-data-grid-premium@v6.0.0-alpha.0`
|
|
19
|
+
|
|
20
|
+
#### Breaking changes
|
|
21
|
+
|
|
22
|
+
- The deprecated `hide` column property has been removed in favor of the `columnVisibilityModel` prop and initial state.
|
|
23
|
+
|
|
24
|
+
```diff
|
|
25
|
+
<DataGrid
|
|
26
|
+
columns={[
|
|
27
|
+
field: 'id,
|
|
28
|
+
- hide: true,
|
|
29
|
+
]}
|
|
30
|
+
+ initialState={{
|
|
31
|
+
+ columns: {
|
|
32
|
+
+ columnVisibilityModel: { id: false },
|
|
33
|
+
+ }
|
|
34
|
+
+ }}
|
|
35
|
+
/>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
You can find more information about this new API on our [documentation](https://next.mui.com/x/react-data-grid/column-visibility/).
|
|
39
|
+
|
|
40
|
+
- The `GridEvents` enum is now a TypeScript type.
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
- apiRef.current.subscribeEvent(GridEvents.rowClick', handleRowClick)
|
|
44
|
+
+ apiRef.current.subscribeEvent('rowClick', handleRowClick)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Changes
|
|
48
|
+
|
|
49
|
+
- [DataGrid] Do not publish `cellFocusOut` event if the row was removed (#6251) @cherniavskii
|
|
50
|
+
- [DataGrid] Fix scroll anchoring with master details (#6054) @oliviertassinari
|
|
51
|
+
- [DataGrid] Improve Polish (pl-PL) locale on the data grid (#6245) @grzegorz-bach
|
|
52
|
+
- [DataGrid] Remove the `GridEvents` enum (#6003) @flaviendelangle
|
|
53
|
+
- [DataGrid] Remove the deprecated `hide` column property (#5999) @flaviendelangle
|
|
54
|
+
|
|
55
|
+
### `@mui/x-date-pickers@v6.0.0-alpha.0` / `@mui/x-date-pickers-pro@v6.0.0-alpha.0`
|
|
56
|
+
|
|
57
|
+
#### Breaking changes
|
|
58
|
+
|
|
59
|
+
- All the deprecated props that allowed you to set the text displayed in the pickers have been removed.
|
|
60
|
+
|
|
61
|
+
You can now use the `localText` prop available on all picker components:
|
|
62
|
+
|
|
63
|
+
| Removed prop | Property in the new `localText` prop |
|
|
64
|
+
|------------------------------|-----------------------------------------------------------------------------------|
|
|
65
|
+
| `endText` | `end` |
|
|
66
|
+
| `getClockLabelText` | `clockLabelText` |
|
|
67
|
+
| `getHoursClockNumberText` | `hoursClockNumberText` |
|
|
68
|
+
| `getMinutesClockNumberText` | `minutesClockNumberText` |
|
|
69
|
+
| `getSecondsClockNumberText` | `secondsClockNumberText` |
|
|
70
|
+
| `getViewSwitchingButtonText` | `calendarViewSwitchingButtonAriaLabel` |
|
|
71
|
+
| `leftArrowButtonText` | `openPreviousView` (or `previousMonth` when the button changes the visible month) |
|
|
72
|
+
| `rightArrowButtonText` | `openNextView` (or `nextMonth` when the button changes the visible month) |
|
|
73
|
+
| `startText` | `start` |
|
|
74
|
+
|
|
75
|
+
For instance if you want to replace the `startText` / `endText`
|
|
76
|
+
|
|
77
|
+
```diff
|
|
78
|
+
<DateRangePicker
|
|
79
|
+
- startText="From"
|
|
80
|
+
- endText="To"
|
|
81
|
+
+ localeText={{
|
|
82
|
+
+ start: 'From',
|
|
83
|
+
+ end: 'To',
|
|
84
|
+
+ }}
|
|
85
|
+
/>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
You can find more information about the new api, including how to set those translations on all your components at once in the [documentation](https://next.mui.com/x/react-date-pickers/localization/)
|
|
89
|
+
|
|
90
|
+
- The component slots `LeftArrowButton` and `RightArrowButton` have been renamed `PreviousIconButton` and `NextIconButton` to better describe there usage:
|
|
91
|
+
|
|
92
|
+
```diff
|
|
93
|
+
<DatePicker
|
|
94
|
+
components={{
|
|
95
|
+
- LeftArrowButton: CustomButton,
|
|
96
|
+
+ PreviousIconButton: CustomButton,
|
|
97
|
+
|
|
98
|
+
- RightArrowButton: CustomButton,
|
|
99
|
+
+ NextIconButton: CustomButton,
|
|
100
|
+
}}
|
|
101
|
+
|
|
102
|
+
componentsProps={{
|
|
103
|
+
- leftArrowButton: {},
|
|
104
|
+
+ previousIconButton: {},
|
|
105
|
+
|
|
106
|
+
- rightArrowButton: {},
|
|
107
|
+
+ nextIconButton: {},
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- The `date` prop has been renamed `value` on `MonthPicker` / `YearPicker`, `ClockPicker` and `CalendarPicker`.
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
- <MonthPicker date={dayjs()} onChange={handleMonthChange} />
|
|
116
|
+
+ <MonthPicker value={dayjs()} onChange={handleMonthChange} />
|
|
117
|
+
|
|
118
|
+
- <YearPicker date={dayjs()} onChange={handleYearChange} />
|
|
119
|
+
+ <YearPicker value={dayjs()} onChange={handleYearChange} />
|
|
120
|
+
|
|
121
|
+
- <ClockPicker date={dayjs()} onChange={handleTimeChange} />
|
|
122
|
+
+ <ClockPicker value={dayjs()} onChange={handleTimeChange} />
|
|
123
|
+
|
|
124
|
+
- <CalendarPicker date={dayjs()} onChange={handleDateChange} />
|
|
125
|
+
+ <CalendarPicker value={dayjs()} onChange={handleDateChange} />
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Changes
|
|
129
|
+
|
|
130
|
+
- [CalendarPicker] Don't move to closest enabled date when `props.date` contains a disabled date (#6146) @flaviendelangle
|
|
131
|
+
- [DateRangePicker] Switch to new month when changing the value from the outside (#6166) @flaviendelangle
|
|
132
|
+
- [pickers] Add a `localeText` prop to all pickers to customize the translations (#6212) @flaviendelangle
|
|
133
|
+
- [pickers] Add Finnish (fi-FI) locale to the pickers (#6219) (#6230) @PetroSilenius
|
|
134
|
+
- [pickers] Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
135
|
+
- [pickers] Allow nested `LocalizationProvider` (#6011) @flaviendelangle
|
|
136
|
+
- [pickers] Clean slots on `PickersArrowSwitcher` component (#5890) @flaviendelangle
|
|
137
|
+
- [pickers] Fix invalid date error when decreasing `DateField` day (#6071) @alexfauquette
|
|
138
|
+
- [pickers] Fix mobile section selection (#6207) @oliviertassinari
|
|
139
|
+
- [pickers] Fix usage with Typescript 4.8 (#6229) @flaviendelangle
|
|
140
|
+
- [pickers] Improve error message when no adapter context is found (#6211) @flaviendelangle
|
|
141
|
+
- [pickers] Remove `valueStr` from the field state (#6142) @flaviendelangle
|
|
142
|
+
- [pickers] Remove remaining deprecated locale props (#6233) @flaviendelangle
|
|
143
|
+
- [pickers] Rename the `date` prop `value` on `MonthPicker` / `YearPicker`, `ClockPicker` and `CalendarPicker` (#6128) @flaviendelangle
|
|
144
|
+
- [pickers] Rename the `onClose` prop of `PickersPopper` `onDismiss` to simplify typing (#6155) @flaviendelangle
|
|
145
|
+
- [pickers] Support the `sx` prop on all public component with a root HTML elements (#5944) @flaviendelangle
|
|
146
|
+
- [pickers] Unify `PickersMonth` and `PickersYear` behaviors (#6034) @flaviendelangle
|
|
147
|
+
- [pickers] Use `shouldDisableMonth` and `shouldDisableYear` for date validation (#6066) @flaviendelangle
|
|
148
|
+
- [YearPicker] Scroll to the current year even with `autoFocus=false` (#6224) @alexfauquette
|
|
149
|
+
|
|
150
|
+
### Docs
|
|
151
|
+
|
|
152
|
+
- [docs] Add automatic vale check (#5429) @alexfauquette
|
|
153
|
+
- [docs] Add Pro logo in "column ordering" link (#6127) @alexfauquette
|
|
154
|
+
- [docs] Fix 301 link (#6239) @oliviertassinari
|
|
155
|
+
- [docs] Fix broken link (#6163) @alexfauquette
|
|
156
|
+
- [docs] Fix broken links (#6101) @alexfauquette
|
|
157
|
+
- [docs] Fix demonstration date to avoid hydration errors (#6032) @alexfauquette
|
|
158
|
+
- [docs] Fix hidden popper in restore state example (#6191) @heyfirst
|
|
159
|
+
- [docs] Fix invalid links causing 404 & 301 errors (#6105) @oliviertassinari
|
|
160
|
+
- [docs] Fix npm repository url in the pickers `package.json` (#6172) @oliviertassinari
|
|
161
|
+
- [docs] Fix typo in linked issue (#6162) @flaviendelangle
|
|
162
|
+
- [docs] Import `generateUtilityClass` from `@mui/utils` (#6216) @michaldudak
|
|
163
|
+
- [docs] Improve Upgrade plan docs (#6018) @oliviertassinari
|
|
164
|
+
- [docs] Link the OpenSSF Best Practices card (#6171) @oliviertassinari
|
|
165
|
+
|
|
166
|
+
### Core
|
|
167
|
+
|
|
168
|
+
- [core] Add `v5.17.3` changelog to next branch (#6250) @flaviendelangle
|
|
169
|
+
- [core] Add link to the security page on the `README` (#6073) @oliviertassinari
|
|
170
|
+
- [core] Fix scroll restoration in the docs (#5938) @oliviertassinari
|
|
171
|
+
- [core] Remove the Storybook (#6099) @flaviendelangle
|
|
172
|
+
- [core] Tag release as `next` in NPM (#6256) @m4theushw
|
|
173
|
+
- [core] Update monorepo (#6180) @flaviendelangle
|
|
174
|
+
- [core] Use the `next` branch for Prettier (#6097) @flaviendelangle
|
|
175
|
+
- [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
|
|
176
|
+
- [test] Fix logic to skip column pinning tests (#6133) @m4theushw
|
|
177
|
+
- [test] Hide the date on the print regression test (#6120) @flaviendelangle
|
|
178
|
+
- [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
|
|
179
|
+
- [website] Improve security header @oliviertassinari
|
|
180
|
+
|
|
181
|
+
## v5.17.4
|
|
182
|
+
|
|
183
|
+
_Sep 22, 2022_
|
|
184
|
+
|
|
185
|
+
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
186
|
+
|
|
187
|
+
- 🌍 Add Finnish (fi-FI) locale to the pickers (#6230) @PetroSilenius
|
|
188
|
+
- 🌍 Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
189
|
+
- 🐞 Bugfixes
|
|
190
|
+
|
|
191
|
+
### `@mui/x-data-grid@v5.17.4` / `@mui/x-data-grid-pro@v5.17.4` / `@mui/x-data-grid-premium@v5.17.4`
|
|
192
|
+
|
|
193
|
+
#### Changes
|
|
194
|
+
|
|
195
|
+
- [DataGrid] Do not publish `cellFocusOut` event if the row was removed (#6251) @cherniavskii
|
|
196
|
+
- [DataGrid] Improve Polish (pl-PL) locale on the data grid (#6245) @grzegorz-bach
|
|
197
|
+
|
|
198
|
+
### `@mui/x-date-pickers@v5.0.3` / `@mui/x-date-pickers-pro@v5.0.3`
|
|
199
|
+
|
|
200
|
+
#### Changes
|
|
201
|
+
|
|
202
|
+
- [pickers] Add Finnish (fi-FI) locale to pickers (#6219) (#6230) @PetroSilenius
|
|
203
|
+
- [pickers] Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
204
|
+
- [pickers] Fix usage with Typescript 4.8 (#6229) @flaviendelangle
|
|
205
|
+
- [YearPicker] Scroll to the current year even with `autoFocus=false` (#6224) @alexfauquette
|
|
206
|
+
|
|
207
|
+
### Docs
|
|
208
|
+
|
|
209
|
+
- [docs] Fix 301 link (#6239) @oliviertassinari
|
|
210
|
+
|
|
211
|
+
### Core
|
|
212
|
+
|
|
213
|
+
- [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
|
|
214
|
+
|
|
6
215
|
## 5.17.3
|
|
7
216
|
|
|
8
217
|
_Sep 16, 2022_
|
|
@@ -1406,7 +1615,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
1406
1615
|
- [DataGrid] Stop checkbox ripple on blur (#3835) @m4theushw
|
|
1407
1616
|
- [DataGrid] Stop calling `onRowClick` when clicking in cells with interactive elements (#3929) @m4theushw
|
|
1408
1617
|
- [DataGrid] Use only `headerName` when available to search column (#3959) @pkratz
|
|
1409
|
-
- [DataGrid] Use the bundling scripts as the packages published by the [https://github.com/mui/material-ui
|
|
1618
|
+
- [DataGrid] Use the bundling scripts as the packages published by the [material-ui](https://github.com/mui/material-ui) repository (#3965) @flaviendelangle
|
|
1410
1619
|
- [DataGridPro] Add `unstable_setRowHeight` method to `apiRef` (#3751) @cherniavskii
|
|
1411
1620
|
- [DataGridPro] Always export the `pageSize` and `page` when it has been initialized or is being controlled (#3908) @flaviendelangle
|
|
1412
1621
|
- [DataGridPro] Disable export for detail panel column (#4057) @gustavhagland
|
|
@@ -4051,7 +4260,7 @@ Big thanks to the 7 contributors who made this release possible. Here are some h
|
|
|
4051
4260
|
|
|
4052
4261
|
- 💄 Release the cell editing feature (#1287) @dtassone
|
|
4053
4262
|
|
|
4054
|
-
This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/x/react-data-grid/editing
|
|
4263
|
+
This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/x/react-data-grid/editing/). We have spent the last three months working on it.
|
|
4055
4264
|
|
|
4056
4265
|

|
|
4057
4266
|
|
|
@@ -4661,7 +4870,7 @@ _Dec 9, 2020_
|
|
|
4661
4870
|
|
|
4662
4871
|
Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
4663
4872
|
|
|
4664
|
-
- 🔍 Add a new data grid [density selector](https://mui.com/x/react-data-grid/
|
|
4873
|
+
- 🔍 Add a new data grid [density selector](https://mui.com/x/react-data-grid/accessibility/#density) feature (#606) @DanailH.
|
|
4665
4874
|
- 💄 A first iteration on the data grid's toolbar.
|
|
4666
4875
|
- 🧪 Continue the iteration on the data grid filtering feature, soon to be released @dtassone.
|
|
4667
4876
|
|
|
@@ -661,16 +661,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
661
661
|
*/
|
|
662
662
|
onColumnResize: PropTypes.func,
|
|
663
663
|
|
|
664
|
-
/**
|
|
665
|
-
* Callback fired when a column visibility changes.
|
|
666
|
-
* Only works when no `columnVisibilityModel` is provided and if we change the visibility of a single column at a time.
|
|
667
|
-
* @param {GridColumnVisibilityChangeParams} params With all properties from [[GridColumnVisibilityChangeParams]].
|
|
668
|
-
* @param {MuiEvent<{}>} event The event object.
|
|
669
|
-
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
670
|
-
* @deprecated Use `onColumnVisibilityModelChange` instead.
|
|
671
|
-
*/
|
|
672
|
-
onColumnVisibilityChange: PropTypes.func,
|
|
673
|
-
|
|
674
664
|
/**
|
|
675
665
|
* Callback fired when the column visibility model changes.
|
|
676
666
|
* @param {GridColumnVisibilityModel} model The new model.
|
|
@@ -929,8 +919,8 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
929
919
|
* Rows data to pin on top or bottom.
|
|
930
920
|
*/
|
|
931
921
|
pinnedRows: PropTypes.shape({
|
|
932
|
-
bottom: PropTypes.
|
|
933
|
-
top: PropTypes.
|
|
922
|
+
bottom: PropTypes.arrayOf(PropTypes.object),
|
|
923
|
+
top: PropTypes.arrayOf(PropTypes.object)
|
|
934
924
|
}),
|
|
935
925
|
|
|
936
926
|
/**
|
|
@@ -987,7 +977,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
987
977
|
/**
|
|
988
978
|
* Set of rows of type [[GridRowsProp]].
|
|
989
979
|
*/
|
|
990
|
-
rows: PropTypes.
|
|
980
|
+
rows: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
991
981
|
|
|
992
982
|
/**
|
|
993
983
|
* Loading rows can be processed on the server or client-side.
|
|
@@ -33,7 +33,17 @@ process.env.NODE_ENV !== "production" ? GridExcelExportMenuItem.propTypes = {
|
|
|
33
33
|
// ----------------------------------------------------------------------
|
|
34
34
|
hideMenu: PropTypes.func,
|
|
35
35
|
options: PropTypes.shape({
|
|
36
|
-
|
|
36
|
+
allColumns: PropTypes.bool,
|
|
37
|
+
columnsStyles: PropTypes.object,
|
|
38
|
+
disableToolbarButton: PropTypes.bool,
|
|
39
|
+
exceljsPostProcess: PropTypes.func,
|
|
40
|
+
exceljsPreProcess: PropTypes.func,
|
|
41
|
+
fields: PropTypes.arrayOf(PropTypes.string),
|
|
42
|
+
fileName: PropTypes.string,
|
|
43
|
+
getRowsToExport: PropTypes.func,
|
|
44
|
+
includeColumnGroupsHeaders: PropTypes.bool,
|
|
45
|
+
includeHeaders: PropTypes.bool,
|
|
46
|
+
valueOptionsSheetName: PropTypes.string
|
|
37
47
|
})
|
|
38
48
|
} : void 0;
|
|
39
49
|
export { GridExcelExportMenuItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { gridColumnVisibilityModelSelector
|
|
3
|
+
import { gridColumnVisibilityModelSelector } from '@mui/x-data-grid-pro';
|
|
4
4
|
|
|
5
5
|
const updateColumnVisibilityModel = (columnVisibilityModel, rowGroupingModel, prevRowGroupingModel) => {
|
|
6
6
|
const newColumnVisibilityModel = _extends({}, columnVisibilityModel);
|
|
@@ -30,7 +30,7 @@ export const useKeepGroupedColumnsHidden = props => {
|
|
|
30
30
|
const initialProps = React.useRef(props);
|
|
31
31
|
const rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model);
|
|
32
32
|
React.useEffect(() => {
|
|
33
|
-
props.apiRef.current.subscribeEvent(
|
|
33
|
+
props.apiRef.current.subscribeEvent('rowGroupingModelChange', newModel => {
|
|
34
34
|
const columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
|
|
35
35
|
props.apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
36
36
|
rowGroupingModel.current = newModel;
|
package/index.js
CHANGED
|
@@ -661,16 +661,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
661
661
|
*/
|
|
662
662
|
onColumnResize: PropTypes.func,
|
|
663
663
|
|
|
664
|
-
/**
|
|
665
|
-
* Callback fired when a column visibility changes.
|
|
666
|
-
* Only works when no `columnVisibilityModel` is provided and if we change the visibility of a single column at a time.
|
|
667
|
-
* @param {GridColumnVisibilityChangeParams} params With all properties from [[GridColumnVisibilityChangeParams]].
|
|
668
|
-
* @param {MuiEvent<{}>} event The event object.
|
|
669
|
-
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
670
|
-
* @deprecated Use `onColumnVisibilityModelChange` instead.
|
|
671
|
-
*/
|
|
672
|
-
onColumnVisibilityChange: PropTypes.func,
|
|
673
|
-
|
|
674
664
|
/**
|
|
675
665
|
* Callback fired when the column visibility model changes.
|
|
676
666
|
* @param {GridColumnVisibilityModel} model The new model.
|
|
@@ -929,8 +919,8 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
929
919
|
* Rows data to pin on top or bottom.
|
|
930
920
|
*/
|
|
931
921
|
pinnedRows: PropTypes.shape({
|
|
932
|
-
bottom: PropTypes.
|
|
933
|
-
top: PropTypes.
|
|
922
|
+
bottom: PropTypes.arrayOf(PropTypes.object),
|
|
923
|
+
top: PropTypes.arrayOf(PropTypes.object)
|
|
934
924
|
}),
|
|
935
925
|
|
|
936
926
|
/**
|
|
@@ -987,7 +977,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
987
977
|
/**
|
|
988
978
|
* Set of rows of type [[GridRowsProp]].
|
|
989
979
|
*/
|
|
990
|
-
rows: PropTypes.
|
|
980
|
+
rows: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
991
981
|
|
|
992
982
|
/**
|
|
993
983
|
* Loading rows can be processed on the server or client-side.
|
|
@@ -31,7 +31,17 @@ process.env.NODE_ENV !== "production" ? GridExcelExportMenuItem.propTypes = {
|
|
|
31
31
|
// ----------------------------------------------------------------------
|
|
32
32
|
hideMenu: PropTypes.func,
|
|
33
33
|
options: PropTypes.shape({
|
|
34
|
-
|
|
34
|
+
allColumns: PropTypes.bool,
|
|
35
|
+
columnsStyles: PropTypes.object,
|
|
36
|
+
disableToolbarButton: PropTypes.bool,
|
|
37
|
+
exceljsPostProcess: PropTypes.func,
|
|
38
|
+
exceljsPreProcess: PropTypes.func,
|
|
39
|
+
fields: PropTypes.arrayOf(PropTypes.string),
|
|
40
|
+
fileName: PropTypes.string,
|
|
41
|
+
getRowsToExport: PropTypes.func,
|
|
42
|
+
includeColumnGroupsHeaders: PropTypes.bool,
|
|
43
|
+
includeHeaders: PropTypes.bool,
|
|
44
|
+
valueOptionsSheetName: PropTypes.string
|
|
35
45
|
})
|
|
36
46
|
} : void 0;
|
|
37
47
|
export { GridExcelExportMenuItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { gridColumnVisibilityModelSelector
|
|
3
|
+
import { gridColumnVisibilityModelSelector } from '@mui/x-data-grid-pro';
|
|
4
4
|
|
|
5
5
|
var updateColumnVisibilityModel = function updateColumnVisibilityModel(columnVisibilityModel, rowGroupingModel, prevRowGroupingModel) {
|
|
6
6
|
var newColumnVisibilityModel = _extends({}, columnVisibilityModel);
|
|
@@ -30,7 +30,7 @@ export var useKeepGroupedColumnsHidden = function useKeepGroupedColumnsHidden(pr
|
|
|
30
30
|
var initialProps = React.useRef(props);
|
|
31
31
|
var rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model);
|
|
32
32
|
React.useEffect(function () {
|
|
33
|
-
props.apiRef.current.subscribeEvent(
|
|
33
|
+
props.apiRef.current.subscribeEvent('rowGroupingModelChange', function (newModel) {
|
|
34
34
|
var columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
|
|
35
35
|
props.apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
36
36
|
rowGroupingModel.current = newModel;
|
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 = "MTY2Mzg4NDAwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GridRowId, GridRowModel, GridRowTreeNodeConfig, GridColDef, GridStateColDef
|
|
1
|
+
import { GridRowId, GridRowModel, GridValidRowModel, GridRowTreeNodeConfig, GridColDef, GridStateColDef } from '@mui/x-data-grid-pro';
|
|
2
2
|
/**
|
|
3
3
|
* Parameters passed to `colDef.groupingValueGetter`.
|
|
4
4
|
*/
|
|
5
|
-
export interface GridGroupingValueGetterParams<V = any, R extends GridValidRowModel =
|
|
5
|
+
export interface GridGroupingValueGetterParams<V = any, R extends GridValidRowModel = any> {
|
|
6
6
|
/**
|
|
7
7
|
* The grid row id.
|
|
8
8
|
*/
|
|
@@ -661,16 +661,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
661
661
|
*/
|
|
662
662
|
onColumnResize: PropTypes.func,
|
|
663
663
|
|
|
664
|
-
/**
|
|
665
|
-
* Callback fired when a column visibility changes.
|
|
666
|
-
* Only works when no `columnVisibilityModel` is provided and if we change the visibility of a single column at a time.
|
|
667
|
-
* @param {GridColumnVisibilityChangeParams} params With all properties from [[GridColumnVisibilityChangeParams]].
|
|
668
|
-
* @param {MuiEvent<{}>} event The event object.
|
|
669
|
-
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
670
|
-
* @deprecated Use `onColumnVisibilityModelChange` instead.
|
|
671
|
-
*/
|
|
672
|
-
onColumnVisibilityChange: PropTypes.func,
|
|
673
|
-
|
|
674
664
|
/**
|
|
675
665
|
* Callback fired when the column visibility model changes.
|
|
676
666
|
* @param {GridColumnVisibilityModel} model The new model.
|
|
@@ -929,8 +919,8 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
929
919
|
* Rows data to pin on top or bottom.
|
|
930
920
|
*/
|
|
931
921
|
pinnedRows: PropTypes.shape({
|
|
932
|
-
bottom: PropTypes.
|
|
933
|
-
top: PropTypes.
|
|
922
|
+
bottom: PropTypes.arrayOf(PropTypes.object),
|
|
923
|
+
top: PropTypes.arrayOf(PropTypes.object)
|
|
934
924
|
}),
|
|
935
925
|
|
|
936
926
|
/**
|
|
@@ -987,7 +977,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
987
977
|
/**
|
|
988
978
|
* Set of rows of type [[GridRowsProp]].
|
|
989
979
|
*/
|
|
990
|
-
rows: PropTypes.
|
|
980
|
+
rows: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
991
981
|
|
|
992
982
|
/**
|
|
993
983
|
* Loading rows can be processed on the server or client-side.
|
|
@@ -33,7 +33,17 @@ process.env.NODE_ENV !== "production" ? GridExcelExportMenuItem.propTypes = {
|
|
|
33
33
|
// ----------------------------------------------------------------------
|
|
34
34
|
hideMenu: PropTypes.func,
|
|
35
35
|
options: PropTypes.shape({
|
|
36
|
-
|
|
36
|
+
allColumns: PropTypes.bool,
|
|
37
|
+
columnsStyles: PropTypes.object,
|
|
38
|
+
disableToolbarButton: PropTypes.bool,
|
|
39
|
+
exceljsPostProcess: PropTypes.func,
|
|
40
|
+
exceljsPreProcess: PropTypes.func,
|
|
41
|
+
fields: PropTypes.arrayOf(PropTypes.string),
|
|
42
|
+
fileName: PropTypes.string,
|
|
43
|
+
getRowsToExport: PropTypes.func,
|
|
44
|
+
includeColumnGroupsHeaders: PropTypes.bool,
|
|
45
|
+
includeHeaders: PropTypes.bool,
|
|
46
|
+
valueOptionsSheetName: PropTypes.string
|
|
37
47
|
})
|
|
38
48
|
} : void 0;
|
|
39
49
|
export { GridExcelExportMenuItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { gridColumnVisibilityModelSelector
|
|
3
|
+
import { gridColumnVisibilityModelSelector } from '@mui/x-data-grid-pro';
|
|
4
4
|
|
|
5
5
|
const updateColumnVisibilityModel = (columnVisibilityModel, rowGroupingModel, prevRowGroupingModel) => {
|
|
6
6
|
const newColumnVisibilityModel = _extends({}, columnVisibilityModel);
|
|
@@ -28,7 +28,7 @@ export const useKeepGroupedColumnsHidden = props => {
|
|
|
28
28
|
const initialProps = React.useRef(props);
|
|
29
29
|
const rowGroupingModel = React.useRef(props.rowGroupingModel ?? props.initialState?.rowGrouping?.model);
|
|
30
30
|
React.useEffect(() => {
|
|
31
|
-
props.apiRef.current.subscribeEvent(
|
|
31
|
+
props.apiRef.current.subscribeEvent('rowGroupingModelChange', newModel => {
|
|
32
32
|
const columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
|
|
33
33
|
props.apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
34
34
|
rowGroupingModel.current = newModel;
|
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 = "MTY2Mzg4NDAwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -684,16 +684,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
684
684
|
*/
|
|
685
685
|
onColumnResize: _propTypes.default.func,
|
|
686
686
|
|
|
687
|
-
/**
|
|
688
|
-
* Callback fired when a column visibility changes.
|
|
689
|
-
* Only works when no `columnVisibilityModel` is provided and if we change the visibility of a single column at a time.
|
|
690
|
-
* @param {GridColumnVisibilityChangeParams} params With all properties from [[GridColumnVisibilityChangeParams]].
|
|
691
|
-
* @param {MuiEvent<{}>} event The event object.
|
|
692
|
-
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
693
|
-
* @deprecated Use `onColumnVisibilityModelChange` instead.
|
|
694
|
-
*/
|
|
695
|
-
onColumnVisibilityChange: _propTypes.default.func,
|
|
696
|
-
|
|
697
687
|
/**
|
|
698
688
|
* Callback fired when the column visibility model changes.
|
|
699
689
|
* @param {GridColumnVisibilityModel} model The new model.
|
|
@@ -952,8 +942,8 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
952
942
|
* Rows data to pin on top or bottom.
|
|
953
943
|
*/
|
|
954
944
|
pinnedRows: _propTypes.default.shape({
|
|
955
|
-
bottom: _propTypes.default.
|
|
956
|
-
top: _propTypes.default.
|
|
945
|
+
bottom: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
946
|
+
top: _propTypes.default.arrayOf(_propTypes.default.object)
|
|
957
947
|
}),
|
|
958
948
|
|
|
959
949
|
/**
|
|
@@ -1010,7 +1000,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1010
1000
|
/**
|
|
1011
1001
|
* Set of rows of type [[GridRowsProp]].
|
|
1012
1002
|
*/
|
|
1013
|
-
rows: _propTypes.default.
|
|
1003
|
+
rows: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
1014
1004
|
|
|
1015
1005
|
/**
|
|
1016
1006
|
* Loading rows can be processed on the server or client-side.
|
|
@@ -52,6 +52,16 @@ process.env.NODE_ENV !== "production" ? GridExcelExportMenuItem.propTypes = {
|
|
|
52
52
|
// ----------------------------------------------------------------------
|
|
53
53
|
hideMenu: _propTypes.default.func,
|
|
54
54
|
options: _propTypes.default.shape({
|
|
55
|
-
|
|
55
|
+
allColumns: _propTypes.default.bool,
|
|
56
|
+
columnsStyles: _propTypes.default.object,
|
|
57
|
+
disableToolbarButton: _propTypes.default.bool,
|
|
58
|
+
exceljsPostProcess: _propTypes.default.func,
|
|
59
|
+
exceljsPreProcess: _propTypes.default.func,
|
|
60
|
+
fields: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
61
|
+
fileName: _propTypes.default.string,
|
|
62
|
+
getRowsToExport: _propTypes.default.func,
|
|
63
|
+
includeColumnGroupsHeaders: _propTypes.default.bool,
|
|
64
|
+
includeHeaders: _propTypes.default.bool,
|
|
65
|
+
valueOptionsSheetName: _propTypes.default.string
|
|
56
66
|
})
|
|
57
67
|
} : void 0;
|
|
@@ -44,7 +44,7 @@ const useKeepGroupedColumnsHidden = props => {
|
|
|
44
44
|
const initialProps = React.useRef(props);
|
|
45
45
|
const rowGroupingModel = React.useRef((_props$rowGroupingMod = props.rowGroupingModel) != null ? _props$rowGroupingMod : (_props$initialState = props.initialState) == null ? void 0 : (_props$initialState$r = _props$initialState.rowGrouping) == null ? void 0 : _props$initialState$r.model);
|
|
46
46
|
React.useEffect(() => {
|
|
47
|
-
props.apiRef.current.subscribeEvent(
|
|
47
|
+
props.apiRef.current.subscribeEvent('rowGroupingModelChange', newModel => {
|
|
48
48
|
const columnVisibilityModel = updateColumnVisibilityModel((0, _xDataGridPro.gridColumnVisibilityModelSelector)(props.apiRef), newModel, rowGroupingModel.current);
|
|
49
49
|
props.apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
50
50
|
rowGroupingModel.current = newModel;
|
package/node/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
|
|
|
8
8
|
var _utils = require("@mui/utils");
|
|
9
9
|
|
|
10
10
|
const getReleaseInfo = () => {
|
|
11
|
-
const releaseInfo = "
|
|
11
|
+
const releaseInfo = "MTY2Mzg4NDAwMDAwMA==";
|
|
12
12
|
|
|
13
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
14
|
// A simple hack to set the value in the test environment (has no build step).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.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",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"directory": "packages/grid/x-data-grid-premium"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "^7.
|
|
35
|
-
"@mui/utils": "^5.10.
|
|
36
|
-
"@mui/x-data-grid": "
|
|
37
|
-
"@mui/x-data-grid-pro": "
|
|
38
|
-
"@mui/x-license-pro": "
|
|
34
|
+
"@babel/runtime": "^7.19.0",
|
|
35
|
+
"@mui/utils": "^5.10.6",
|
|
36
|
+
"@mui/x-data-grid": "6.0.0-alpha.0",
|
|
37
|
+
"@mui/x-data-grid-pro": "6.0.0-alpha.0",
|
|
38
|
+
"@mui/x-license-pro": "6.0.0-alpha.0",
|
|
39
39
|
"@types/format-util": "^1.0.2",
|
|
40
40
|
"clsx": "^1.2.1",
|
|
41
41
|
"exceljs": "^4.3.0",
|
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 = "MTY2Mzg4NDAwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|