@mui/x-data-grid-premium 8.3.0 → 8.4.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 +206 -10
- package/DataGridPremium/DataGridPremium.js +5 -3
- package/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/components/GridColumnMenuRowGroupItem.js +1 -0
- package/components/GridPremiumToolbar.js +1 -0
- package/components/collapsible/CollapsibleContext.js +1 -0
- package/components/pivotPanel/GridPivotPanelField.js +2 -2
- package/components/promptField/PromptFieldContext.js +1 -0
- package/components/resizablePanel/ResizablePanelContext.js +1 -0
- package/esm/DataGridPremium/DataGridPremium.js +5 -3
- package/esm/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/esm/components/GridColumnMenuRowGroupItem.js +1 -0
- package/esm/components/GridPremiumToolbar.js +1 -0
- package/esm/components/collapsible/CollapsibleContext.js +1 -0
- package/esm/components/pivotPanel/GridPivotPanelField.js +2 -2
- package/esm/components/promptField/PromptFieldContext.js +1 -0
- package/esm/components/resizablePanel/ResizablePanelContext.js +1 -0
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -0
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +3 -2
- package/esm/hooks/features/clipboard/useGridClipboardImport.d.ts +1 -1
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +4 -3
- package/esm/hooks/features/rowGrouping/createGroupingColDef.js +1 -0
- package/esm/index.js +1 -1
- package/esm/models/dataGridPremiumProps.d.ts +3 -2
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -0
- package/hooks/features/cellSelection/useGridCellSelection.js +3 -2
- package/hooks/features/clipboard/useGridClipboardImport.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboardImport.js +4 -3
- package/hooks/features/rowGrouping/createGroupingColDef.js +1 -0
- package/index.js +1 -1
- package/models/dataGridPremiumProps.d.ts +3 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,206 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.4.0
|
|
9
|
+
|
|
10
|
+
_May 21, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🔺 Support regular [`pyramid` variation in the `<FunnelChart />` component](https://mui.com/x/react-charts/funnel/#pyramid-chart):
|
|
15
|
+
|
|
16
|
+
<img width="398" alt="Pyramid funnel chart" src="https://github.com/user-attachments/assets/90ccb221-3a48-4ffa-8878-89c6db16da86" />
|
|
17
|
+
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
- 🌎 Improve Icelandic (is-IS) locale on the Data Grid
|
|
20
|
+
- 🐞 Bugfixes
|
|
21
|
+
|
|
22
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
23
|
+
@aizerin, @arminmeh, @campmarc, @jyash97, @mapache-salvaje, @noraleonte, @nusr, @ragnarr18, @romgrk, @whereisrmsqhs.
|
|
24
|
+
Following are all team members who have contributed to this release:
|
|
25
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @rita-codes.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid@8.4.0`
|
|
32
|
+
|
|
33
|
+
- [DataGrid] Fix content rendering for large rows while using automatic page size (#14737) @campmarc
|
|
34
|
+
- [DataGrid] Fix disabled typography variants crashing grid (#17934) @KenanYusuf
|
|
35
|
+
- [DataGrid] Fix tree data demo crash (#17904) @MBilalShafi
|
|
36
|
+
- [DataGrid] Use `exclude` selection model type if quick filter does not have actual values (#17899) @arminmeh
|
|
37
|
+
- [DataGrid] Fix clipboard copy behavior for cell ranges with empty cells (#16797) @nusr
|
|
38
|
+
- [l10n] Improve Icelandic (is-IS) locale (#17915) @ragnarr18
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid@8.4.0`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPro] Add `aria-expanded` attribute to the master detail toggle button (#17122) @whereisrmsqhs
|
|
45
|
+
- [DataGridPro] Preserve row state during server-side lazy loading (#17743) @arminmeh
|
|
46
|
+
- [DataGridPro] Prevent text selection when reordering rows (#16568) @jyash97
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-data-grid-premium@8.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-data-grid-pro@8.4.0`.
|
|
51
|
+
|
|
52
|
+
### Date and Time Pickers
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-pickers@8.4.0`
|
|
55
|
+
|
|
56
|
+
- [fields] Ensure fresh `disabled` value is used when focusing or clicking (#17914) @aizerin
|
|
57
|
+
- [fields] Improve the field controlled edition (#17816) @flaviendelangle
|
|
58
|
+
- [pickers] Fix `PickersTextField` overflow (#17942) @noraleonte
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-date-pickers-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
61
|
+
|
|
62
|
+
Same changes as in `@mui/x-date-pickers@8.4.0`.
|
|
63
|
+
|
|
64
|
+
### Charts
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts@8.4.0`
|
|
67
|
+
|
|
68
|
+
- [charts] Add grouped axes demo (#17848) @bernardobelchior
|
|
69
|
+
- [charts] Enable tooltip disable portal (#17871) @alexfauquette
|
|
70
|
+
- [charts] Improve performance in scatter chart (#17849) @bernardobelchior
|
|
71
|
+
- [charts] Recreate `isPointInside` less often (#17850) @bernardobelchior
|
|
72
|
+
- [charts] Try fix for flaky `useAnimate` test (#17777) @JCQuintas
|
|
73
|
+
- [charts] Add `isXInside` and `isYInside` (#17911) @bernardobelchior
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-charts-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-charts@8.4.0`, plus:
|
|
78
|
+
|
|
79
|
+
- [charts-pro] Add size for zoom slider (#17736) @bernardobelchior
|
|
80
|
+
- [charts-pro] Add zoom slider tooltip (#17733) @bernardobelchior
|
|
81
|
+
- [charts-pro] Clean and document Heatmap Tooltip (#17933) @alexfauquette
|
|
82
|
+
- [charts-pro] Introduce `Pyramid` chart (#17783) @JCQuintas
|
|
83
|
+
- [charts-pro] Update zoom slider nomenclature (#17938) @bernardobelchior
|
|
84
|
+
- [charts-pro] Fix error when importing rasterizehtml (#17897) @bernardobelchior
|
|
85
|
+
|
|
86
|
+
### Tree View
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-tree-view@8.4.0`
|
|
89
|
+
|
|
90
|
+
- [TreeView] Add `getItemChildren` prop in `RichTreeView` (#17894) @rita-codes
|
|
91
|
+
- [TreeView] Add a method in the `apiRef` to toggle the editing status of an item (#17768) @rita-codes
|
|
92
|
+
- [TreeView] Add missing sx prop on the Tree Item component (#17930) @flaviendelangle
|
|
93
|
+
|
|
94
|
+
#### `@mui/x-tree-view-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
95
|
+
|
|
96
|
+
Same changes as in `@mui/x-tree-view@8.4.0`.
|
|
97
|
+
|
|
98
|
+
### Docs
|
|
99
|
+
|
|
100
|
+
- [docs] Add a recipe for drag and drop row grouping (#17638) @KenanYusuf
|
|
101
|
+
- [docs] Add introductory text to Data Grid component pages (#17902) @KenanYusuf
|
|
102
|
+
- [docs] Refactor embedded CodeSandbox on Data Grid—Quickstart page (#17749) @rita-codes
|
|
103
|
+
- [docs] Remove double border on Data Grid—Quickstart demo (#17932) @rita-codes
|
|
104
|
+
- [docs] Standardize `apiRef` copy (#17776) @mapache-salvaje
|
|
105
|
+
- [docs][DataGrid] Revise server-side data docs (#17007) @mapache-salvaje
|
|
106
|
+
- [docs][DataGrid] Audit and revise the tree data doc (#17650) @mapache-salvaje
|
|
107
|
+
- [docs][pickers] Fix migration guide references to range fields (#17861) @LukasTy
|
|
108
|
+
- [docs][charts] Reorganize the Tooltip documentation (#17917) @alexfauquette
|
|
109
|
+
|
|
110
|
+
### Core
|
|
111
|
+
|
|
112
|
+
- [core] refactor: remove manual `displayName` (#17845) @romgrk
|
|
113
|
+
- [code-infra] Document how to use `vitest` cli (#17847) @JCQuintas
|
|
114
|
+
- [code-infra] Increase charts export test timeout (#17909) @JCQuintas
|
|
115
|
+
- [code-infra] Set `isolatedModules=true` in tsconfig (#17781) @JCQuintas
|
|
116
|
+
- [infra] Ensure proper docs preview path resolution (#17863) @LukasTy
|
|
117
|
+
|
|
118
|
+
## 8.3.1
|
|
119
|
+
|
|
120
|
+
_May 14, 2025_
|
|
121
|
+
|
|
122
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
123
|
+
|
|
124
|
+
- 🌍 Improve Norwegian Bokmål (nb-NO) locale on the Data Grid
|
|
125
|
+
- 🌍 Improve Korean (ko-KR) locale on the Data Grid and Pickers
|
|
126
|
+
- 📚 Documentation improvements
|
|
127
|
+
- 🐞 Bugfixes
|
|
128
|
+
|
|
129
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
130
|
+
@100pearlcent, @htollefsen, @JanPretzel, @sai6855.
|
|
131
|
+
Following are all team members who have contributed to this release:
|
|
132
|
+
@bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @MBilalShafi, @oliviertassinari, @prakhargupta1.
|
|
133
|
+
|
|
134
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
135
|
+
|
|
136
|
+
### Data Grid
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-data-grid@8.3.1`
|
|
139
|
+
|
|
140
|
+
- [DataGrid] Add `reason` param for `onRowSelectionModelChange` callback (#17545) @sai6855
|
|
141
|
+
- [DataGrid] Fix `renderContext` calculation loop (#17779) @cherniavskii
|
|
142
|
+
- [DataGrid] Fix column spanning jump on scroll (#17759) @cherniavskii
|
|
143
|
+
- [DataGrid] Fix material augmentation not working (#17761) @cherniavskii
|
|
144
|
+
- [DataGrid] Use arguments selector for checkbox props (#17683) @MBilalShafi
|
|
145
|
+
- [l10n] Improve Norwegian Bokmål (nb-NO) locale (#17766) @htollefsen
|
|
146
|
+
- [l10n] Improve Korean (ko-KR) locale (#17484) @100pearlcent
|
|
147
|
+
|
|
148
|
+
#### `@mui/x-data-grid-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
149
|
+
|
|
150
|
+
Same changes as in `@mui/x-data-grid@8.3.1`.
|
|
151
|
+
|
|
152
|
+
#### `@mui/x-data-grid-premium@8.3.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
153
|
+
|
|
154
|
+
Same changes as in `@mui/x-data-grid-pro@8.3.1`, plus:
|
|
155
|
+
|
|
156
|
+
- [DataGridPremium] Fix aggregation label not being used in pivot panel (#17760) @cherniavskii
|
|
157
|
+
|
|
158
|
+
### Date and Time Pickers
|
|
159
|
+
|
|
160
|
+
#### `@mui/x-date-pickers@8.3.1`
|
|
161
|
+
|
|
162
|
+
- [fields] Add notch to the field outlined when the label is manually shrank (#17620) @flaviendelangle
|
|
163
|
+
- [l10n] Improve Korean (ko-KR) locale (#17484) @100pearlcent
|
|
164
|
+
|
|
165
|
+
#### `@mui/x-date-pickers-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
166
|
+
|
|
167
|
+
Same changes as in `@mui/x-date-pickers@8.3.1`.
|
|
168
|
+
|
|
169
|
+
### Charts
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-charts@8.3.1`
|
|
172
|
+
|
|
173
|
+
- [charts] Fix infinite tick number when zoom range is zero (#17750) @bernardobelchior
|
|
174
|
+
- [charts] Improve tick rendering performance (#17755) @bernardobelchior
|
|
175
|
+
|
|
176
|
+
#### `@mui/x-charts-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
177
|
+
|
|
178
|
+
Same changes as in `@mui/x-charts@8.3.1`, plus:
|
|
179
|
+
|
|
180
|
+
- [charts-pro] Fix ESM build issue with Vite (#17774) @bernardobelchior
|
|
181
|
+
- [charts-pro] Add benchmark for zoomed in scatter chart (#17756) @bernardobelchior
|
|
182
|
+
|
|
183
|
+
### Tree View
|
|
184
|
+
|
|
185
|
+
#### `@mui/x-tree-view@8.3.1`
|
|
186
|
+
|
|
187
|
+
Internal changes.
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-tree-view-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
190
|
+
|
|
191
|
+
Same changes as in `@mui/x-tree-view@8.3.1`.
|
|
192
|
+
|
|
193
|
+
### Docs
|
|
194
|
+
|
|
195
|
+
- [docs] Fix 301 to Next.js docs for license @oliviertassinari
|
|
196
|
+
- [docs] Fix AI assistant API URL (#17745) @oliviertassinari
|
|
197
|
+
- [docs] Fix heading structure in README @oliviertassinari
|
|
198
|
+
- [docs] Fix translation keys documentation (#17811) @JanPretzel
|
|
199
|
+
- [docs] Improve CHANGELOG format @oliviertassinari
|
|
200
|
+
|
|
201
|
+
### Core
|
|
202
|
+
|
|
203
|
+
- [core] Apply YAML convention, blank line only at top level @oliviertassinari
|
|
204
|
+
- [code-infra] Fix dynamic import missing extensions (#17767) @Janpot
|
|
205
|
+
- [code-infra] Replace `mocha` with `vitest` for browser & jsdom tests (#14508) @JCQuintas
|
|
206
|
+
- [scheduler] Create the package and setup a private doc page (#17239) @flaviendelangle
|
|
207
|
+
|
|
8
208
|
## 8.3.0
|
|
9
209
|
|
|
10
210
|
_May 8, 2025_
|
|
@@ -15,10 +215,8 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
15
215
|
- 📚 Documentation improvements
|
|
16
216
|
- 🐞 Bugfixes
|
|
17
217
|
|
|
18
|
-
Special thanks go out to this community member for a valuable contribution:
|
|
19
|
-
@
|
|
20
|
-
Team members who have contributed to this release:
|
|
21
|
-
@alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @rita-codes, @romgrk.
|
|
218
|
+
Special thanks go out to this community member for a valuable contribution: @ptuukkan.
|
|
219
|
+
Team members who have contributed to this release: @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @rita-codes, @romgrk.
|
|
22
220
|
|
|
23
221
|
### Data Grid
|
|
24
222
|
|
|
@@ -531,8 +729,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
531
729
|
- 📚 Documentation improvements
|
|
532
730
|
- 🐞 Bugfixes
|
|
533
731
|
|
|
534
|
-
Team members who have contributed to this release:
|
|
535
|
-
@bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
732
|
+
Team members who have contributed to this release: @bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
536
733
|
|
|
537
734
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
538
735
|
|
|
@@ -845,7 +1042,7 @@ We'd like to offer a big thanks to the 21 contributors who made this release pos
|
|
|
845
1042
|
- 🌍 Improve Chinese (zh-CN), (zh-HK), (zh-TW), Czech (cs-CZ), Korean (ko-KR) and Slovak (sk-Sk) locales on the Data Grid
|
|
846
1043
|
- 🌍 Improve Chinese (zh-CN), (zh-HK) and (zh-TW) locales on the Pickers
|
|
847
1044
|
|
|
848
|
-
|
|
1045
|
+
### Breaking changes
|
|
849
1046
|
|
|
850
1047
|
- ℹ️ The peer dependency on `@mui/material` has been updated to accept only v7.
|
|
851
1048
|
This has been done to increase the adoption rate of ESM.
|
|
@@ -858,7 +1055,7 @@ Following are all team members who have contributed to this release:
|
|
|
858
1055
|
|
|
859
1056
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
860
1057
|
|
|
861
|
-
|
|
1058
|
+
### Alpha release highlights
|
|
862
1059
|
|
|
863
1060
|
Below are the highlights of the alpha releases leading up to this beta release:
|
|
864
1061
|
|
|
@@ -3152,8 +3349,7 @@ We'd like to offer a big thanks to the 4 contributors who made this release poss
|
|
|
3152
3349
|
|
|
3153
3350
|
- 🐞 Bugfixes
|
|
3154
3351
|
|
|
3155
|
-
Team members who have contributed to this release:
|
|
3156
|
-
@arminmeh, @cherniavskii, @LukasTy, @michelengelen.
|
|
3352
|
+
Team members who have contributed to this release: @arminmeh, @cherniavskii, @LukasTy, @michelengelen.
|
|
3157
3353
|
|
|
3158
3354
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
3159
3355
|
|
|
@@ -40,7 +40,7 @@ const configuration = {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
const releaseInfo = "
|
|
43
|
+
const releaseInfo = "MTc0Nzc3ODQwMDAwMA==";
|
|
44
44
|
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
45
45
|
packageName: "x-data-grid-premium",
|
|
46
46
|
releaseInfo: releaseInfo
|
|
@@ -1251,8 +1251,9 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1251
1251
|
/**
|
|
1252
1252
|
* The function is used to split the pasted text into rows and cells.
|
|
1253
1253
|
* @param {string} text The text pasted from the clipboard.
|
|
1254
|
+
* @param {string} delimiter The delimiter used to split the text. Default is the tab character and can be set with the `clipboardCopyCellDelimiter` prop.
|
|
1254
1255
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
1255
|
-
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(
|
|
1256
|
+
* @default (pastedText, delimiter = '\t') => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(delimiter)); }
|
|
1256
1257
|
*/
|
|
1257
1258
|
splitClipboardPastedText: _propTypes.default.func,
|
|
1258
1259
|
style: _propTypes.default.object,
|
|
@@ -1287,4 +1288,5 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1287
1288
|
* API:
|
|
1288
1289
|
* - [DataGridPremium API](https://mui.com/x/api/data-grid/data-grid-premium/)
|
|
1289
1290
|
*/
|
|
1290
|
-
const DataGridPremium = exports.DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
1291
|
+
const DataGridPremium = exports.DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
1292
|
+
if (process.env.NODE_ENV !== "production") DataGridPremium.displayName = "DataGridPremium";
|
|
@@ -35,11 +35,11 @@ const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PREMIUM_PROPS_D
|
|
|
35
35
|
aggregationRowsScope: 'filtered',
|
|
36
36
|
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
37
37
|
disableClipboardPaste: false,
|
|
38
|
-
splitClipboardPastedText: pastedText => {
|
|
38
|
+
splitClipboardPastedText: (pastedText, delimiter = '\t') => {
|
|
39
39
|
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
40
40
|
// See https://github.com/mui/mui-x/issues/9103
|
|
41
41
|
const text = pastedText.replace(/\r?\n$/, '');
|
|
42
|
-
return text.split(/\r\n|\n|\r/).map(row => row.split(
|
|
42
|
+
return text.split(/\r\n|\n|\r/).map(row => row.split(delimiter));
|
|
43
43
|
},
|
|
44
44
|
disablePivoting: false,
|
|
45
45
|
getPivotDerivedColumns: _utils.defaultGetPivotDerivedColumns,
|
|
@@ -37,6 +37,7 @@ function GridColumnMenuRowGroupItem(props) {
|
|
|
37
37
|
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
38
38
|
}, field);
|
|
39
39
|
};
|
|
40
|
+
if (process.env.NODE_ENV !== "production") renderUnGroupingMenuItem.displayName = "renderUnGroupingMenuItem";
|
|
40
41
|
if (!colDef || !(0, _gridRowGroupingUtils.isGroupingColumn)(colDef.field)) {
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
@@ -52,6 +52,7 @@ function GridPremiumToolbar(props) {
|
|
|
52
52
|
onClick: onMenuItemClick,
|
|
53
53
|
children: apiRef.current.getLocaleText('toolbarExportExcel')
|
|
54
54
|
}) : undefined;
|
|
55
|
+
if (process.env.NODE_ENV !== "production") additionalExportMenuItems.displayName = "additionalExportMenuItems";
|
|
55
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.GridToolbar, (0, _extends2.default)({}, other, {
|
|
56
57
|
additionalItems: additionalItems,
|
|
57
58
|
additionalExportMenuItems: additionalExportMenuItems
|
|
@@ -8,6 +8,7 @@ exports.CollapsibleContext = void 0;
|
|
|
8
8
|
exports.useCollapsibleContext = useCollapsibleContext;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
const CollapsibleContext = exports.CollapsibleContext = /*#__PURE__*/React.createContext(undefined);
|
|
11
|
+
if (process.env.NODE_ENV !== "production") CollapsibleContext.displayName = "CollapsibleContext";
|
|
11
12
|
function useCollapsibleContext() {
|
|
12
13
|
const context = React.useContext(CollapsibleContext);
|
|
13
14
|
if (context === undefined) {
|
|
@@ -158,7 +158,7 @@ function AggregationSelect({
|
|
|
158
158
|
};
|
|
159
159
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
160
160
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseChip, {
|
|
161
|
-
label: aggFunc,
|
|
161
|
+
label: rootProps.aggregationFunctions[aggFunc]?.label ?? aggFunc,
|
|
162
162
|
size: "small",
|
|
163
163
|
variant: "outlined",
|
|
164
164
|
ref: aggregationMenuTriggerRef,
|
|
@@ -181,7 +181,7 @@ function AggregationSelect({
|
|
|
181
181
|
selected: aggFunc === func,
|
|
182
182
|
onClick: () => handleClick(func)
|
|
183
183
|
}, rootProps.slotProps?.baseMenuItem, {
|
|
184
|
-
children: func
|
|
184
|
+
children: rootProps.aggregationFunctions[func]?.label ?? func
|
|
185
185
|
}), func))
|
|
186
186
|
}))
|
|
187
187
|
})]
|
|
@@ -8,6 +8,7 @@ exports.PromptFieldContext = void 0;
|
|
|
8
8
|
exports.usePromptFieldContext = usePromptFieldContext;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
const PromptFieldContext = exports.PromptFieldContext = /*#__PURE__*/React.createContext(undefined);
|
|
11
|
+
if (process.env.NODE_ENV !== "production") PromptFieldContext.displayName = "PromptFieldContext";
|
|
11
12
|
function usePromptFieldContext() {
|
|
12
13
|
const context = React.useContext(PromptFieldContext);
|
|
13
14
|
if (context === undefined) {
|
|
@@ -8,6 +8,7 @@ exports.ResizablePanelContext = void 0;
|
|
|
8
8
|
exports.useResizablePanelContext = useResizablePanelContext;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
const ResizablePanelContext = exports.ResizablePanelContext = /*#__PURE__*/React.createContext(undefined);
|
|
11
|
+
if (process.env.NODE_ENV !== "production") ResizablePanelContext.displayName = "ResizablePanelContext";
|
|
11
12
|
function useResizablePanelContext() {
|
|
12
13
|
const context = React.useContext(ResizablePanelContext);
|
|
13
14
|
if (context === undefined) {
|
|
@@ -33,7 +33,7 @@ const configuration = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const releaseInfo = "
|
|
36
|
+
const releaseInfo = "MTc0Nzc3ODQwMDAwMA==";
|
|
37
37
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
38
38
|
packageName: "x-data-grid-premium",
|
|
39
39
|
releaseInfo: releaseInfo
|
|
@@ -1244,8 +1244,9 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1244
1244
|
/**
|
|
1245
1245
|
* The function is used to split the pasted text into rows and cells.
|
|
1246
1246
|
* @param {string} text The text pasted from the clipboard.
|
|
1247
|
+
* @param {string} delimiter The delimiter used to split the text. Default is the tab character and can be set with the `clipboardCopyCellDelimiter` prop.
|
|
1247
1248
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
1248
|
-
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(
|
|
1249
|
+
* @default (pastedText, delimiter = '\t') => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(delimiter)); }
|
|
1249
1250
|
*/
|
|
1250
1251
|
splitClipboardPastedText: PropTypes.func,
|
|
1251
1252
|
style: PropTypes.object,
|
|
@@ -1280,4 +1281,5 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1280
1281
|
* API:
|
|
1281
1282
|
* - [DataGridPremium API](https://mui.com/x/api/data-grid/data-grid-premium/)
|
|
1282
1283
|
*/
|
|
1283
|
-
export const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
1284
|
+
export const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
1285
|
+
if (process.env.NODE_ENV !== "production") DataGridPremium.displayName = "DataGridPremium";
|
|
@@ -27,11 +27,11 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
27
27
|
aggregationRowsScope: 'filtered',
|
|
28
28
|
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
29
29
|
disableClipboardPaste: false,
|
|
30
|
-
splitClipboardPastedText: pastedText => {
|
|
30
|
+
splitClipboardPastedText: (pastedText, delimiter = '\t') => {
|
|
31
31
|
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
32
32
|
// See https://github.com/mui/mui-x/issues/9103
|
|
33
33
|
const text = pastedText.replace(/\r?\n$/, '');
|
|
34
|
-
return text.split(/\r\n|\n|\r/).map(row => row.split(
|
|
34
|
+
return text.split(/\r\n|\n|\r/).map(row => row.split(delimiter));
|
|
35
35
|
},
|
|
36
36
|
disablePivoting: false,
|
|
37
37
|
getPivotDerivedColumns: defaultGetPivotDerivedColumns,
|
|
@@ -30,6 +30,7 @@ export function GridColumnMenuRowGroupItem(props) {
|
|
|
30
30
|
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
31
31
|
}, field);
|
|
32
32
|
};
|
|
33
|
+
if (process.env.NODE_ENV !== "production") renderUnGroupingMenuItem.displayName = "renderUnGroupingMenuItem";
|
|
33
34
|
if (!colDef || !isGroupingColumn(colDef.field)) {
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
@@ -44,6 +44,7 @@ export function GridPremiumToolbar(props) {
|
|
|
44
44
|
onClick: onMenuItemClick,
|
|
45
45
|
children: apiRef.current.getLocaleText('toolbarExportExcel')
|
|
46
46
|
}) : undefined;
|
|
47
|
+
if (process.env.NODE_ENV !== "production") additionalExportMenuItems.displayName = "additionalExportMenuItems";
|
|
47
48
|
return /*#__PURE__*/_jsx(GridToolbar, _extends({}, other, {
|
|
48
49
|
additionalItems: additionalItems,
|
|
49
50
|
additionalExportMenuItems: additionalExportMenuItems
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const CollapsibleContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") CollapsibleContext.displayName = "CollapsibleContext";
|
|
3
4
|
export function useCollapsibleContext() {
|
|
4
5
|
const context = React.useContext(CollapsibleContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -150,7 +150,7 @@ function AggregationSelect({
|
|
|
150
150
|
};
|
|
151
151
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
152
152
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseChip, {
|
|
153
|
-
label: aggFunc,
|
|
153
|
+
label: rootProps.aggregationFunctions[aggFunc]?.label ?? aggFunc,
|
|
154
154
|
size: "small",
|
|
155
155
|
variant: "outlined",
|
|
156
156
|
ref: aggregationMenuTriggerRef,
|
|
@@ -173,7 +173,7 @@ function AggregationSelect({
|
|
|
173
173
|
selected: aggFunc === func,
|
|
174
174
|
onClick: () => handleClick(func)
|
|
175
175
|
}, rootProps.slotProps?.baseMenuItem, {
|
|
176
|
-
children: func
|
|
176
|
+
children: rootProps.aggregationFunctions[func]?.label ?? func
|
|
177
177
|
}), func))
|
|
178
178
|
}))
|
|
179
179
|
})]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const PromptFieldContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") PromptFieldContext.displayName = "PromptFieldContext";
|
|
3
4
|
export function usePromptFieldContext() {
|
|
4
5
|
const context = React.useContext(PromptFieldContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const ResizablePanelContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") ResizablePanelContext.displayName = "ResizablePanelContext";
|
|
3
4
|
export function useResizablePanelContext() {
|
|
4
5
|
const context = React.useContext(ResizablePanelContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -458,7 +458,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
458
458
|
const sortedSelectedRowIds = sortedRowIds.filter(id => unsortedSelectedRowIds.includes(`${id}`));
|
|
459
459
|
const copyData = sortedSelectedRowIds.reduce((acc, rowId) => {
|
|
460
460
|
const fieldsMap = cellSelectionModel[rowId];
|
|
461
|
-
const
|
|
461
|
+
const rowValues = Object.keys(fieldsMap).map(field => {
|
|
462
462
|
let cellData;
|
|
463
463
|
if (fieldsMap[field]) {
|
|
464
464
|
const cellParams = apiRef.current.getCellParams(rowId, field);
|
|
@@ -473,8 +473,9 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
473
473
|
} else {
|
|
474
474
|
cellData = '';
|
|
475
475
|
}
|
|
476
|
-
return
|
|
476
|
+
return cellData;
|
|
477
477
|
}, '');
|
|
478
|
+
const rowString = rowValues.join(clipboardCopyCellDelimiter);
|
|
478
479
|
return acc === '' ? rowString : [acc, rowString].join('\r\n');
|
|
479
480
|
}, '');
|
|
480
481
|
return copyData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
3
3
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart">) => void;
|
|
4
|
+
export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart" | "clipboardCopyCellDelimiter">) => void;
|
|
@@ -256,8 +256,9 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
256
256
|
const getRowId = props.getRowId;
|
|
257
257
|
const enableClipboardPaste = !props.disableClipboardPaste;
|
|
258
258
|
const logger = useGridLogger(apiRef, 'useGridClipboardImport');
|
|
259
|
-
const splitClipboardPastedText = props.splitClipboardPastedText;
|
|
260
259
|
const {
|
|
260
|
+
clipboardCopyCellDelimiter,
|
|
261
|
+
splitClipboardPastedText,
|
|
261
262
|
pagination,
|
|
262
263
|
paginationMode,
|
|
263
264
|
onBeforeClipboardPasteStart
|
|
@@ -285,7 +286,7 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
285
286
|
if (!text) {
|
|
286
287
|
return;
|
|
287
288
|
}
|
|
288
|
-
const pastedData = splitClipboardPastedText(text);
|
|
289
|
+
const pastedData = splitClipboardPastedText(text, clipboardCopyCellDelimiter);
|
|
289
290
|
if (!pastedData) {
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
@@ -318,7 +319,7 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
318
319
|
paginationMode
|
|
319
320
|
});
|
|
320
321
|
cellUpdater.applyUpdates();
|
|
321
|
-
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, splitClipboardPastedText, pagination, paginationMode, onBeforeClipboardPasteStart, logger]);
|
|
322
|
+
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, splitClipboardPastedText, clipboardCopyCellDelimiter, pagination, paginationMode, onBeforeClipboardPasteStart, logger]);
|
|
322
323
|
const checkIfCanStartEditing = React.useCallback((initialValue, {
|
|
323
324
|
event
|
|
324
325
|
}) => {
|
|
@@ -255,6 +255,7 @@ export const createGroupingColDefForAllGroupingCriteria = ({
|
|
|
255
255
|
// Then we apply the sorting / filtering on the leaves based on the properties of `leavesColDef`
|
|
256
256
|
//
|
|
257
257
|
// By default, we apply the sorting / filtering on the groups of the top level grouping criteria based on the properties of `columnsLookup[orderedGroupedByFields[0]]`.
|
|
258
|
+
if (process.env.NODE_ENV !== "production") commonProperties.renderCell.displayName = "commonProperties.renderCell";
|
|
258
259
|
let sourceProperties;
|
|
259
260
|
if (mainGroupingCriteria && rowGroupingModel.includes(mainGroupingCriteria)) {
|
|
260
261
|
sourceProperties = getGroupingCriteriaProperties(columnsLookup[mainGroupingCriteria], true);
|
package/esm/index.js
CHANGED
|
@@ -78,10 +78,11 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
|
|
|
78
78
|
/**
|
|
79
79
|
* The function is used to split the pasted text into rows and cells.
|
|
80
80
|
* @param {string} text The text pasted from the clipboard.
|
|
81
|
+
* @param {string} delimiter The delimiter used to split the text. Default is the tab character and can be set with the `clipboardCopyCellDelimiter` prop.
|
|
81
82
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
82
|
-
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(
|
|
83
|
+
* @default (pastedText, delimiter = '\t') => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(delimiter)); }
|
|
83
84
|
*/
|
|
84
|
-
splitClipboardPastedText: (text: string) => string[][] | null;
|
|
85
|
+
splitClipboardPastedText: (text: string, delimiter: string) => string[][] | null;
|
|
85
86
|
/**
|
|
86
87
|
* If `true`, the pivoting feature is disabled.
|
|
87
88
|
* @default false
|
|
@@ -467,7 +467,7 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
467
467
|
const sortedSelectedRowIds = sortedRowIds.filter(id => unsortedSelectedRowIds.includes(`${id}`));
|
|
468
468
|
const copyData = sortedSelectedRowIds.reduce((acc, rowId) => {
|
|
469
469
|
const fieldsMap = cellSelectionModel[rowId];
|
|
470
|
-
const
|
|
470
|
+
const rowValues = Object.keys(fieldsMap).map(field => {
|
|
471
471
|
let cellData;
|
|
472
472
|
if (fieldsMap[field]) {
|
|
473
473
|
const cellParams = apiRef.current.getCellParams(rowId, field);
|
|
@@ -482,8 +482,9 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
482
482
|
} else {
|
|
483
483
|
cellData = '';
|
|
484
484
|
}
|
|
485
|
-
return
|
|
485
|
+
return cellData;
|
|
486
486
|
}, '');
|
|
487
|
+
const rowString = rowValues.join(clipboardCopyCellDelimiter);
|
|
487
488
|
return acc === '' ? rowString : [acc, rowString].join('\r\n');
|
|
488
489
|
}, '');
|
|
489
490
|
return copyData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
3
3
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart">) => void;
|
|
4
|
+
export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart" | "clipboardCopyCellDelimiter">) => void;
|
|
@@ -264,8 +264,9 @@ const useGridClipboardImport = (apiRef, props) => {
|
|
|
264
264
|
const getRowId = props.getRowId;
|
|
265
265
|
const enableClipboardPaste = !props.disableClipboardPaste;
|
|
266
266
|
const logger = (0, _internals.useGridLogger)(apiRef, 'useGridClipboardImport');
|
|
267
|
-
const splitClipboardPastedText = props.splitClipboardPastedText;
|
|
268
267
|
const {
|
|
268
|
+
clipboardCopyCellDelimiter,
|
|
269
|
+
splitClipboardPastedText,
|
|
269
270
|
pagination,
|
|
270
271
|
paginationMode,
|
|
271
272
|
onBeforeClipboardPasteStart
|
|
@@ -293,7 +294,7 @@ const useGridClipboardImport = (apiRef, props) => {
|
|
|
293
294
|
if (!text) {
|
|
294
295
|
return;
|
|
295
296
|
}
|
|
296
|
-
const pastedData = splitClipboardPastedText(text);
|
|
297
|
+
const pastedData = splitClipboardPastedText(text, clipboardCopyCellDelimiter);
|
|
297
298
|
if (!pastedData) {
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
@@ -326,7 +327,7 @@ const useGridClipboardImport = (apiRef, props) => {
|
|
|
326
327
|
paginationMode
|
|
327
328
|
});
|
|
328
329
|
cellUpdater.applyUpdates();
|
|
329
|
-
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, splitClipboardPastedText, pagination, paginationMode, onBeforeClipboardPasteStart, logger]);
|
|
330
|
+
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, splitClipboardPastedText, clipboardCopyCellDelimiter, pagination, paginationMode, onBeforeClipboardPasteStart, logger]);
|
|
330
331
|
const checkIfCanStartEditing = React.useCallback((initialValue, {
|
|
331
332
|
event
|
|
332
333
|
}) => {
|
|
@@ -264,6 +264,7 @@ const createGroupingColDefForAllGroupingCriteria = ({
|
|
|
264
264
|
// Then we apply the sorting / filtering on the leaves based on the properties of `leavesColDef`
|
|
265
265
|
//
|
|
266
266
|
// By default, we apply the sorting / filtering on the groups of the top level grouping criteria based on the properties of `columnsLookup[orderedGroupedByFields[0]]`.
|
|
267
|
+
if (process.env.NODE_ENV !== "production") commonProperties.renderCell.displayName = "commonProperties.renderCell";
|
|
267
268
|
let sourceProperties;
|
|
268
269
|
if (mainGroupingCriteria && rowGroupingModel.includes(mainGroupingCriteria)) {
|
|
269
270
|
sourceProperties = getGroupingCriteriaProperties(columnsLookup[mainGroupingCriteria], true);
|
package/index.js
CHANGED
|
@@ -78,10 +78,11 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
|
|
|
78
78
|
/**
|
|
79
79
|
* The function is used to split the pasted text into rows and cells.
|
|
80
80
|
* @param {string} text The text pasted from the clipboard.
|
|
81
|
+
* @param {string} delimiter The delimiter used to split the text. Default is the tab character and can be set with the `clipboardCopyCellDelimiter` prop.
|
|
81
82
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
82
|
-
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(
|
|
83
|
+
* @default (pastedText, delimiter = '\t') => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(delimiter)); }
|
|
83
84
|
*/
|
|
84
|
-
splitClipboardPastedText: (text: string) => string[][] | null;
|
|
85
|
+
splitClipboardPastedText: (text: string, delimiter: string) => string[][] | null;
|
|
85
86
|
/**
|
|
86
87
|
* If `true`, the pivoting feature is disabled.
|
|
87
88
|
* @default false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Premium plan edition of the MUI X Data Grid Components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"exceljs": "^4.4.0",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"reselect": "^5.1.1",
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
47
|
-
"@mui/x-
|
|
48
|
-
"@mui/x-data-grid
|
|
45
|
+
"@mui/x-license": "8.4.0",
|
|
46
|
+
"@mui/x-data-grid-pro": "8.4.0",
|
|
47
|
+
"@mui/x-internals": "8.4.0",
|
|
48
|
+
"@mui/x-data-grid": "8.4.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@emotion/react": "^11.9.0",
|