@mui/x-data-grid-premium 6.13.0 → 6.15.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 +162 -1
- package/DataGridPremium/DataGridPremium.js +20 -0
- package/DataGridPremium/useDataGridPremiumComponent.js +75 -73
- package/README.md +3 -7
- package/hooks/features/clipboard/useGridClipboardImport.js +7 -5
- package/index.js +1 -1
- package/legacy/DataGridPremium/DataGridPremium.js +20 -0
- package/legacy/DataGridPremium/useDataGridPremiumComponent.js +75 -73
- package/legacy/hooks/features/clipboard/useGridClipboardImport.js +7 -5
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/models/gridApiPremium.d.ts +2 -2
- package/modern/DataGridPremium/DataGridPremium.js +20 -0
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +75 -73
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +7 -5
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPremium/DataGridPremium.js +20 -0
- package/node/DataGridPremium/useDataGridPremiumComponent.js +74 -72
- package/node/hooks/features/clipboard/useGridClipboardImport.js +6 -4
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,166 @@
|
|
|
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.15.0
|
|
7
|
+
|
|
8
|
+
_Sep 22, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🚀 Implement columns auto-sizing (#10180) @romgrk
|
|
13
|
+
- 🎁 Add support for `getRowsToExport` option to print export on the data grid (#10084) @zreecespieces
|
|
14
|
+
- 🌍 Improve Finnish (fi-FI) locale
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
### Data Grid
|
|
19
|
+
|
|
20
|
+
#### `@mui/x-data-grid@6.15.0`
|
|
21
|
+
|
|
22
|
+
- [DataGrid] Add support for `getRowsToExport` option to print export (#10084) @zreecespieces
|
|
23
|
+
- [DataGrid] Fix dev warning about `InputLabelProps` (#10413) @romgrk
|
|
24
|
+
- [DataGrid] Refactor `GridMenu` prop `onClickAway` to `onClose` (#10411) @romgrk
|
|
25
|
+
- [DataGrid] Restore focus after `GridMenu` closes (#10412) @romgrk
|
|
26
|
+
- [DataGrid] Fix typing of `GridActionsCellItem` (#10344) @romgrk
|
|
27
|
+
- [DataGrid] Hide `eval` from bundlers (#10329) @romgrk
|
|
28
|
+
- [DataGrid] Add `border: 0` to unmounted focused cell to avoid layout shifts in that row (#10318) @lauri865
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-pro@6.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid@6.15.0`, plus:
|
|
33
|
+
|
|
34
|
+
- [DataGridPro] Implement columns auto-sizing (#10180) @romgrk
|
|
35
|
+
- [DataGridPro] Fix keyboard navigation issue in header filters (#10358) @MBilalShafi
|
|
36
|
+
- [DataGridPro] Add missing row hover styles (#10252) @cherniavskii
|
|
37
|
+
- [DataGridPro] Make default filter items have stable references in header filters (#10338) @MBilalShafi
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid-premium@6.15.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-data-grid-pro@6.15.0`.
|
|
42
|
+
|
|
43
|
+
### Date Pickers
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers@6.15.0`
|
|
46
|
+
|
|
47
|
+
- [pickers] Support tokens without spaces (#10185) @alexfauquette
|
|
48
|
+
- [l10n] Improve Finnish (fi-FI) locale (#10346) @samijouppila
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-date-pickers-pro@6.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-date-pickers@6.15.0`.
|
|
53
|
+
|
|
54
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.12`
|
|
55
|
+
|
|
56
|
+
- [charts] Fix sparkline scale and rendering (#10402) @alexfauquette
|
|
57
|
+
- [charts] Remove components from `@mui/material` (#10115) @alexfauquette
|
|
58
|
+
|
|
59
|
+
### Tree View / `@mui/x-tree-view@6.0.0-alpha.4`
|
|
60
|
+
|
|
61
|
+
- [TreeView] Split features into plugins to prepare for Pro version (#10123) @flaviendelangle
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- [docs] Add charts documentation pages to complete pricing table (#10394) @alexfauquette
|
|
66
|
+
- [docs] Add missing MIT packages on the Licensing page (#10348) @flaviendelangle
|
|
67
|
+
- [docs] Clearer component pattern @oliviertassinari
|
|
68
|
+
- [docs] Easier to understand demo (#10370) @oliviertassinari
|
|
69
|
+
- [docs] Fix `301` to Material UI @oliviertassinari
|
|
70
|
+
- [docs] Improve the column visibility section (#10327) @MBilalShafi
|
|
71
|
+
- [docs] Improve the documentation section `rowIdentifier` (#10326) @MBilalShafi
|
|
72
|
+
- [docs] Improve pickers localization documentation (#10202) @flaviendelangle
|
|
73
|
+
- [docs] Polish typescript ref usage (#10359) @oliviertassinari
|
|
74
|
+
- [docs] Improve charts tooltip wording (#10406) @alexfauquette
|
|
75
|
+
|
|
76
|
+
### Core
|
|
77
|
+
|
|
78
|
+
- [core] Cleanup GitHub issues template (#10372) @romgrk
|
|
79
|
+
- [core] Fix Circle CI OOM (#10385) @romgrk
|
|
80
|
+
- [core] Improve sleep test helper @oliviertassinari
|
|
81
|
+
- [core] Remove unwanted prefixes @oliviertassinari
|
|
82
|
+
- [core] Remove duplicate label @oliviertassinari
|
|
83
|
+
- [core] Simplify source @oliviertassinari
|
|
84
|
+
- [core] Upgrade monorepo (#10425) @cherniavskii
|
|
85
|
+
- [core] Upgrade monorepo to have the new typescript-to-proptype (#10224) @flaviendelangle
|
|
86
|
+
- [test] Do not use deprecated adapter methods (#10416) @flaviendelangle
|
|
87
|
+
- [test] Name test suites according to sentence case (#10429) @alexfauquette
|
|
88
|
+
|
|
89
|
+
## 6.14.0
|
|
90
|
+
|
|
91
|
+
_Sep 14, 2023_
|
|
92
|
+
|
|
93
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
94
|
+
|
|
95
|
+
- 🎁 Fix `YearCalendar` and `MonthCalendar` accessibility (#10312) @LukasTy
|
|
96
|
+
|
|
97
|
+
The `YearCalendar` and `MonthCalendar` items role has been changed from `button` to `radio` in order to improve the component's a11y support.
|
|
98
|
+
If you were relying on the mentioned components having a `button` role for items, you will need to update your usage to expect a `radio` role instead.
|
|
99
|
+
|
|
100
|
+
- 🌍 Improve Japanese (ja-JP), Persian (fa-IR), and Vietnamese (vi-VN) locales on the data grid
|
|
101
|
+
- 🐞 Bugfixes
|
|
102
|
+
- 📚 Documentation improvements
|
|
103
|
+
|
|
104
|
+
### Data Grid
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-data-grid@6.14.0`
|
|
107
|
+
|
|
108
|
+
- [l10n] Improve Japanese (ja-JP) locale (#10299) @makoto14
|
|
109
|
+
- [l10n] Improve Persian (fa-IR) locale (#10277) @aminsaedi
|
|
110
|
+
- [l10n] Improve Vietnamese (vi-VN) locale (#10280) @khangnguyen2100
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-data-grid-pro@6.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-data-grid@6.14.0`.
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-data-grid-premium@6.14.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-data-grid-pro@6.14.0`, plus:
|
|
119
|
+
|
|
120
|
+
- [DataGridPremium] Fix clipboard import cutting off at 100 rows (#9930) @gitstart
|
|
121
|
+
|
|
122
|
+
### Date Pickers
|
|
123
|
+
|
|
124
|
+
#### `@mui/x-date-pickers@6.14.0`
|
|
125
|
+
|
|
126
|
+
- [pickers] Fix `YearCalendar` and `MonthCalendar` a11y (#10312) @LukasTy
|
|
127
|
+
- [pickers] Localize `TimeClock` meridiem text (#10324) @LukasTy
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-date-pickers-pro@6.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
130
|
+
|
|
131
|
+
Same changes as in `@mui/x-date-pickers@6.14.0`.
|
|
132
|
+
|
|
133
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.11`
|
|
134
|
+
|
|
135
|
+
- [charts] Add default `barGapRatio` and increase `categoryGapRatio` (#10317) @LukasTy
|
|
136
|
+
- [charts] Enable `eslint` on the package (#10330) @LukasTy
|
|
137
|
+
|
|
138
|
+
### Tree View / `@mui/x-tree-view@6.0.0-alpha.3`
|
|
139
|
+
|
|
140
|
+
- [TreeView] Fix box-sizing dependency (#10255) @oliviertassinari
|
|
141
|
+
|
|
142
|
+
### Docs
|
|
143
|
+
|
|
144
|
+
- [docs] Add conditional range picker props example (#10227) @LukasTy
|
|
145
|
+
- [docs] Add toolbar to the multi-filters demo (#10223) @MBilalShafi
|
|
146
|
+
- [docs] Avoid the use of "We" @oliviertassinari
|
|
147
|
+
- [docs] Clarify MUI vs. MUI Core difference @oliviertassinari
|
|
148
|
+
- [docs] Enable `ariaV7` flag for demos using `useDemoData` hook (#10204) @cherniavskii
|
|
149
|
+
- [docs] Fix Tree View link to API references (#10282) @oliviertassinari
|
|
150
|
+
- [docs] Fix image layout shift (#10313) @oliviertassinari
|
|
151
|
+
- [docs] Fix link to MUI X from readme logo @oliviertassinari
|
|
152
|
+
- [docs] Fix redirection to Base UI URLs @oliviertassinari
|
|
153
|
+
- [docs] Improve Tree View demos (#10268) @oliviertassinari
|
|
154
|
+
- [docs] Improve docs for ref type props (#10273) @michelengelen
|
|
155
|
+
- [docs] Improve npm package README (#10269) @oliviertassinari
|
|
156
|
+
- [docs] Improve the clarity of the npm links @oliviertassinari
|
|
157
|
+
- [docs] Keep installation readme simple @oliviertassinari
|
|
158
|
+
- [docs] Make each component feel more standalone @oliviertassinari
|
|
159
|
+
|
|
160
|
+
### Core
|
|
161
|
+
|
|
162
|
+
- [core] Add types extension for clarity @oliviertassinari
|
|
163
|
+
- [core] Set logo height to fix layout shift in GitHub @oliviertassinari
|
|
164
|
+
- [core] TrapFocus was renamed to FocusTrap @oliviertassinari
|
|
165
|
+
|
|
6
166
|
## 6.13.0
|
|
7
167
|
|
|
8
168
|
_Sep 8, 2023_
|
|
@@ -12,6 +172,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
12
172
|
- 🎁 Fix `anchorRef` behavior on range pickers (#10077) @LukasTy
|
|
13
173
|
|
|
14
174
|
The range picker popup will now be anchored to the first input element and left aligned like other pickers.
|
|
175
|
+
|
|
15
176
|
- 🌍 Improve Slovak (sk-SK) locale on the data grid
|
|
16
177
|
- 🐞 Bugfixes
|
|
17
178
|
- 📚 Documentation improvements
|
|
@@ -1838,7 +1999,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
1838
1999
|
#### Changes
|
|
1839
2000
|
|
|
1840
2001
|
- [DataGrid] Add interface for `singleSelect` column (#7685) @m4theushw
|
|
1841
|
-
- [DataGrid] Allow to pass props to the `
|
|
2002
|
+
- [DataGrid] Allow to pass props to the `FocusTrap` inside the panel wrapper (#7733) @ivek-Prajapatii
|
|
1842
2003
|
- [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7857) @cherniavskii
|
|
1843
2004
|
- [DataGridPro] Change cursor when dragging a column (#7725) @sai6855
|
|
1844
2005
|
- [DataGridPremium] Fix `leafField` to have correct focus value (#7950) @MBilalShafi
|
|
@@ -84,6 +84,21 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
84
84
|
* @default false
|
|
85
85
|
*/
|
|
86
86
|
autoPageSize: PropTypes.bool,
|
|
87
|
+
/**
|
|
88
|
+
* If `true`, columns are autosized after the datagrid is mounted.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
autosizeOnMount: PropTypes.bool,
|
|
92
|
+
/**
|
|
93
|
+
* The options for autosize when user-initiated.
|
|
94
|
+
*/
|
|
95
|
+
autosizeOptions: PropTypes.shape({
|
|
96
|
+
columns: PropTypes.arrayOf(PropTypes.string),
|
|
97
|
+
expand: PropTypes.bool,
|
|
98
|
+
includeHeaders: PropTypes.bool,
|
|
99
|
+
includeOutliers: PropTypes.bool,
|
|
100
|
+
outliersFactor: PropTypes.number
|
|
101
|
+
}),
|
|
87
102
|
/**
|
|
88
103
|
* Controls the modes of the cells.
|
|
89
104
|
*/
|
|
@@ -168,6 +183,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
168
183
|
* @default false
|
|
169
184
|
*/
|
|
170
185
|
disableAggregation: PropTypes.bool,
|
|
186
|
+
/**
|
|
187
|
+
* If `true`, column autosizing on header separator double-click is disabled.
|
|
188
|
+
* @default false
|
|
189
|
+
*/
|
|
190
|
+
disableAutosize: PropTypes.bool,
|
|
171
191
|
/**
|
|
172
192
|
* If `true`, the filtering will only be applied to the top level rows when grouping rows with the `treeData` prop.
|
|
173
193
|
* @default false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering } from '@mui/x-data-grid-pro/internals';
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization } from '@mui/x-data-grid-pro/internals';
|
|
2
2
|
// Premium-only features
|
|
3
3
|
import { useGridAggregation, aggregationStateInitializer } from '../hooks/features/aggregation/useGridAggregation';
|
|
4
4
|
import { useGridAggregationPreProcessors } from '../hooks/features/aggregation/useGridAggregationPreProcessors';
|
|
@@ -8,86 +8,88 @@ import { useGridExcelExport } from '../hooks/features/export/useGridExcelExport'
|
|
|
8
8
|
import { cellSelectionStateInitializer, useGridCellSelection } from '../hooks/features/cellSelection/useGridCellSelection';
|
|
9
9
|
import { useGridClipboardImport } from '../hooks/features/clipboard/useGridClipboardImport';
|
|
10
10
|
export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
11
|
-
const
|
|
11
|
+
const apiRef = useGridInitialization(inputApiRef, props);
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Register all pre-processors called during state initialization here.
|
|
15
15
|
*/
|
|
16
|
-
useGridRowSelectionPreProcessors(
|
|
17
|
-
useGridRowReorderPreProcessors(
|
|
18
|
-
useGridRowGroupingPreProcessors(
|
|
19
|
-
useGridTreeDataPreProcessors(
|
|
20
|
-
useGridLazyLoaderPreProcessors(
|
|
21
|
-
useGridRowPinningPreProcessors(
|
|
22
|
-
useGridAggregationPreProcessors(
|
|
23
|
-
useGridDetailPanelPreProcessors(
|
|
16
|
+
useGridRowSelectionPreProcessors(apiRef, props);
|
|
17
|
+
useGridRowReorderPreProcessors(apiRef, props);
|
|
18
|
+
useGridRowGroupingPreProcessors(apiRef, props);
|
|
19
|
+
useGridTreeDataPreProcessors(apiRef, props);
|
|
20
|
+
useGridLazyLoaderPreProcessors(apiRef, props);
|
|
21
|
+
useGridRowPinningPreProcessors(apiRef);
|
|
22
|
+
useGridAggregationPreProcessors(apiRef, props);
|
|
23
|
+
useGridDetailPanelPreProcessors(apiRef, props);
|
|
24
24
|
// The column pinning `hydrateColumns` pre-processor must be after every other `hydrateColumns` pre-processors
|
|
25
25
|
// Because it changes the order of the columns.
|
|
26
|
-
useGridColumnPinningPreProcessors(
|
|
27
|
-
useGridRowsPreProcessors(
|
|
26
|
+
useGridColumnPinningPreProcessors(apiRef, props);
|
|
27
|
+
useGridRowsPreProcessors(apiRef);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Register all state initializers here.
|
|
31
31
|
*/
|
|
32
|
-
useGridInitializeState(headerFilteringStateInitializer,
|
|
33
|
-
useGridInitializeState(rowGroupingStateInitializer,
|
|
34
|
-
useGridInitializeState(aggregationStateInitializer,
|
|
35
|
-
useGridInitializeState(rowSelectionStateInitializer,
|
|
36
|
-
useGridInitializeState(cellSelectionStateInitializer,
|
|
37
|
-
useGridInitializeState(detailPanelStateInitializer,
|
|
38
|
-
useGridInitializeState(columnPinningStateInitializer,
|
|
39
|
-
useGridInitializeState(columnsStateInitializer,
|
|
40
|
-
useGridInitializeState(rowPinningStateInitializer,
|
|
41
|
-
useGridInitializeState(rowsStateInitializer,
|
|
42
|
-
useGridInitializeState(editingStateInitializer,
|
|
43
|
-
useGridInitializeState(focusStateInitializer,
|
|
44
|
-
useGridInitializeState(sortingStateInitializer,
|
|
45
|
-
useGridInitializeState(preferencePanelStateInitializer,
|
|
46
|
-
useGridInitializeState(filterStateInitializer,
|
|
47
|
-
useGridInitializeState(densityStateInitializer,
|
|
48
|
-
useGridInitializeState(columnReorderStateInitializer,
|
|
49
|
-
useGridInitializeState(columnResizeStateInitializer,
|
|
50
|
-
useGridInitializeState(paginationStateInitializer,
|
|
51
|
-
useGridInitializeState(rowsMetaStateInitializer,
|
|
52
|
-
useGridInitializeState(columnMenuStateInitializer,
|
|
53
|
-
useGridInitializeState(columnGroupsStateInitializer,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
32
|
+
useGridInitializeState(headerFilteringStateInitializer, apiRef, props);
|
|
33
|
+
useGridInitializeState(rowGroupingStateInitializer, apiRef, props);
|
|
34
|
+
useGridInitializeState(aggregationStateInitializer, apiRef, props);
|
|
35
|
+
useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
|
|
36
|
+
useGridInitializeState(cellSelectionStateInitializer, apiRef, props);
|
|
37
|
+
useGridInitializeState(detailPanelStateInitializer, apiRef, props);
|
|
38
|
+
useGridInitializeState(columnPinningStateInitializer, apiRef, props);
|
|
39
|
+
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
40
|
+
useGridInitializeState(rowPinningStateInitializer, apiRef, props);
|
|
41
|
+
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
42
|
+
useGridInitializeState(editingStateInitializer, apiRef, props);
|
|
43
|
+
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
44
|
+
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
|
45
|
+
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
|
46
|
+
useGridInitializeState(filterStateInitializer, apiRef, props);
|
|
47
|
+
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
48
|
+
useGridInitializeState(columnReorderStateInitializer, apiRef, props);
|
|
49
|
+
useGridInitializeState(columnResizeStateInitializer, apiRef, props);
|
|
50
|
+
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
51
|
+
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
52
|
+
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
53
|
+
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
|
54
|
+
useGridInitializeState(virtualizationStateInitializer, apiRef, props);
|
|
55
|
+
useGridRowGrouping(apiRef, props);
|
|
56
|
+
useGridHeaderFiltering(apiRef, props);
|
|
57
|
+
useGridTreeData(apiRef);
|
|
58
|
+
useGridAggregation(apiRef, props);
|
|
59
|
+
useGridKeyboardNavigation(apiRef, props);
|
|
60
|
+
useGridRowSelection(apiRef, props);
|
|
61
|
+
useGridCellSelection(apiRef, props);
|
|
62
|
+
useGridColumnPinning(apiRef, props);
|
|
63
|
+
useGridRowPinning(apiRef, props);
|
|
64
|
+
useGridColumns(apiRef, props);
|
|
65
|
+
useGridRows(apiRef, props);
|
|
66
|
+
useGridParamsApi(apiRef, props);
|
|
67
|
+
useGridDetailPanel(apiRef, props);
|
|
68
|
+
useGridColumnSpanning(apiRef);
|
|
69
|
+
useGridColumnGrouping(apiRef, props);
|
|
70
|
+
useGridClipboardImport(apiRef, props);
|
|
71
|
+
useGridEditing(apiRef, props);
|
|
72
|
+
useGridFocus(apiRef, props);
|
|
73
|
+
useGridPreferencesPanel(apiRef, props);
|
|
74
|
+
useGridFilter(apiRef, props);
|
|
75
|
+
useGridSorting(apiRef, props);
|
|
76
|
+
useGridDensity(apiRef, props);
|
|
77
|
+
useGridColumnReorder(apiRef, props);
|
|
78
|
+
useGridColumnResize(apiRef, props);
|
|
79
|
+
useGridPagination(apiRef, props);
|
|
80
|
+
useGridRowsMeta(apiRef, props);
|
|
81
|
+
useGridRowReorder(apiRef, props);
|
|
82
|
+
useGridScroll(apiRef, props);
|
|
83
|
+
useGridInfiniteLoader(apiRef, props);
|
|
84
|
+
useGridLazyLoader(apiRef, props);
|
|
85
|
+
useGridColumnMenu(apiRef);
|
|
86
|
+
useGridCsvExport(apiRef, props);
|
|
87
|
+
useGridPrintExport(apiRef, props);
|
|
88
|
+
useGridExcelExport(apiRef, props);
|
|
89
|
+
useGridClipboard(apiRef, props);
|
|
90
|
+
useGridDimensions(apiRef, props);
|
|
91
|
+
useGridEvents(apiRef, props);
|
|
92
|
+
useGridStatePersistence(apiRef);
|
|
93
|
+
useGridVirtualization(apiRef, props);
|
|
94
|
+
return apiRef;
|
|
93
95
|
};
|
package/README.md
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MUI X Data Grid Premium
|
|
2
2
|
|
|
3
3
|
This package is the Premium plan edition of the data grid component.
|
|
4
|
-
It's part of MUI X, an open
|
|
4
|
+
It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
8
8
|
Install the package in your project directory with:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
// with npm
|
|
12
11
|
npm install @mui/x-data-grid-premium
|
|
13
|
-
|
|
14
|
-
// with yarn
|
|
15
|
-
yarn add @mui/x-data-grid-premium
|
|
16
12
|
```
|
|
17
13
|
|
|
18
14
|
This component has the following peer dependencies that you will need to install as well.
|
|
@@ -28,4 +24,4 @@ This component has the following peer dependencies that you will need to install
|
|
|
28
24
|
|
|
29
25
|
## Documentation
|
|
30
26
|
|
|
31
|
-
[
|
|
27
|
+
Visit [https://mui.com/x/react-data-grid/](https://mui.com/x/react-data-grid/) to view the full documentation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector } from '@mui/x-data-grid';
|
|
3
|
+
import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector, gridExpandedSortedRowIdsSelector } from '@mui/x-data-grid';
|
|
4
4
|
import { buildWarning, getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
|
|
6
6
|
import { unstable_debounce as debounce } from '@mui/utils';
|
|
@@ -156,7 +156,8 @@ class CellValueUpdater {
|
|
|
156
156
|
function defaultPasteResolver({
|
|
157
157
|
pastedData,
|
|
158
158
|
apiRef,
|
|
159
|
-
updateCell
|
|
159
|
+
updateCell,
|
|
160
|
+
pagination
|
|
160
161
|
}) {
|
|
161
162
|
const isSingleValuePasted = pastedData.length === 1 && pastedData[0].length === 1;
|
|
162
163
|
const cellSelectionModel = apiRef.current.unstable_getCellSelectionModel();
|
|
@@ -220,7 +221,7 @@ function defaultPasteResolver({
|
|
|
220
221
|
}
|
|
221
222
|
const selectedRowId = selectedCell.id;
|
|
222
223
|
const selectedRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(selectedRowId);
|
|
223
|
-
const visibleRowIds = gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
|
|
224
|
+
const visibleRowIds = pagination ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
224
225
|
const selectedFieldIndex = visibleColumnFields.indexOf(selectedCell.field);
|
|
225
226
|
pastedData.forEach((rowData, index) => {
|
|
226
227
|
const rowId = visibleRowIds[selectedRowIndex + index];
|
|
@@ -291,10 +292,11 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
291
292
|
},
|
|
292
293
|
updateCell: (...args) => {
|
|
293
294
|
cellUpdater.updateCell(...args);
|
|
294
|
-
}
|
|
295
|
+
},
|
|
296
|
+
pagination: props.pagination
|
|
295
297
|
});
|
|
296
298
|
cellUpdater.applyUpdates();
|
|
297
|
-
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText]);
|
|
299
|
+
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText, props.pagination]);
|
|
298
300
|
const checkIfCanStartEditing = React.useCallback((initialValue, {
|
|
299
301
|
event
|
|
300
302
|
}) => {
|
package/index.js
CHANGED
|
@@ -84,6 +84,21 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
84
84
|
* @default false
|
|
85
85
|
*/
|
|
86
86
|
autoPageSize: PropTypes.bool,
|
|
87
|
+
/**
|
|
88
|
+
* If `true`, columns are autosized after the datagrid is mounted.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
autosizeOnMount: PropTypes.bool,
|
|
92
|
+
/**
|
|
93
|
+
* The options for autosize when user-initiated.
|
|
94
|
+
*/
|
|
95
|
+
autosizeOptions: PropTypes.shape({
|
|
96
|
+
columns: PropTypes.arrayOf(PropTypes.string),
|
|
97
|
+
expand: PropTypes.bool,
|
|
98
|
+
includeHeaders: PropTypes.bool,
|
|
99
|
+
includeOutliers: PropTypes.bool,
|
|
100
|
+
outliersFactor: PropTypes.number
|
|
101
|
+
}),
|
|
87
102
|
/**
|
|
88
103
|
* Controls the modes of the cells.
|
|
89
104
|
*/
|
|
@@ -168,6 +183,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
168
183
|
* @default false
|
|
169
184
|
*/
|
|
170
185
|
disableAggregation: PropTypes.bool,
|
|
186
|
+
/**
|
|
187
|
+
* If `true`, column autosizing on header separator double-click is disabled.
|
|
188
|
+
* @default false
|
|
189
|
+
*/
|
|
190
|
+
disableAutosize: PropTypes.bool,
|
|
171
191
|
/**
|
|
172
192
|
* If `true`, the filtering will only be applied to the top level rows when grouping rows with the `treeData` prop.
|
|
173
193
|
* @default false
|