@mui/x-data-grid 8.2.0 → 8.3.1
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 +199 -6
- package/components/GridScrollArea.js +1 -2
- package/components/base/GridOverlays.js +2 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +4 -2
- package/components/columnSelection/GridHeaderCheckbox.js +4 -0
- package/esm/components/GridScrollArea.js +1 -2
- package/esm/components/base/GridOverlays.js +2 -3
- package/esm/components/columnSelection/GridCellCheckboxRenderer.js +6 -4
- package/esm/components/columnSelection/GridHeaderCheckbox.js +4 -0
- package/esm/hooks/features/columns/gridColumnsUtils.js +15 -7
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +7 -6
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +6 -6
- package/esm/hooks/features/rowSelection/utils.d.ts +4 -1
- package/esm/hooks/features/rowSelection/utils.js +34 -33
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +7 -6
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/locales/koKR.js +68 -76
- package/esm/locales/nbNO.js +22 -24
- package/esm/material/index.js +24 -24
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/events/gridEventLookup.d.ts +1 -0
- package/esm/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
- package/esm/utils/css/context.js +4 -1
- package/hooks/features/columns/gridColumnsUtils.js +15 -7
- package/hooks/features/editing/useGridCellEditing.js +2 -1
- package/hooks/features/editing/useGridRowEditing.js +6 -5
- package/hooks/features/rowSelection/useGridRowSelection.js +6 -6
- package/hooks/features/rowSelection/utils.d.ts +4 -1
- package/hooks/features/rowSelection/utils.js +35 -35
- package/hooks/features/virtualization/useGridVirtualScroller.js +7 -6
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/locales/koKR.js +68 -76
- package/locales/nbNO.js +22 -24
- package/material/index.js +24 -24
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/events/gridEventLookup.d.ts +1 -0
- package/package.json +4 -4
- package/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
- package/utils/css/context.js +4 -1
package/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GridApiCommunity } from "./models/api/gridApiCommunity.js";
|
|
2
2
|
import { GridInitialStateCommunity, GridStateCommunity } from "./models/gridStateCommunity.js";
|
|
3
|
+
import "./material/index.js";
|
|
3
4
|
export { useGridApiContext } from "./hooks/utils/useGridApiContext.js";
|
|
4
5
|
export { useGridApiRef } from "./hooks/utils/useGridApiRef.js";
|
|
5
6
|
export { useGridRootProps } from "./hooks/utils/useGridRootProps.js";
|
package/esm/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid v8.
|
|
2
|
+
* @mui/x-data-grid v8.3.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
+
import "./material/index.js";
|
|
8
9
|
export { useGridApiContext } from "./hooks/utils/useGridApiContext.js";
|
|
9
10
|
export { useGridApiRef } from "./hooks/utils/useGridApiRef.js";
|
|
10
11
|
export { useGridRootProps } from "./hooks/utils/useGridRootProps.js";
|
package/esm/locales/koKR.js
CHANGED
|
@@ -3,10 +3,9 @@ const koKRGrid = {
|
|
|
3
3
|
// Root
|
|
4
4
|
noRowsLabel: '행이 없습니다.',
|
|
5
5
|
noResultsOverlayLabel: '결과값이 없습니다.',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
noColumnsOverlayLabel: '열이 없습니다',
|
|
7
|
+
noColumnsOverlayManageColumns: '열 관리하기',
|
|
8
|
+
emptyPivotOverlayLabel: '행, 열, 값을 추가하여 피벗 테이블을 만듭니다.',
|
|
10
9
|
// Density selector toolbar button text
|
|
11
10
|
toolbarDensity: '행 간격',
|
|
12
11
|
toolbarDensityLabel: '행 간격',
|
|
@@ -33,11 +32,9 @@ const koKRGrid = {
|
|
|
33
32
|
toolbarExportPrint: '프린트',
|
|
34
33
|
toolbarExportExcel: 'Excel로 내보내기',
|
|
35
34
|
// Toolbar pivot button
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
toolbarPivot: '피벗',
|
|
38
36
|
// Toolbar AI Assistant button
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
toolbarAssistant: 'AI 어시스턴트',
|
|
41
38
|
// Columns management text
|
|
42
39
|
columnsManagementSearchTitle: '검색',
|
|
43
40
|
columnsManagementNoColumns: '열이 없습니다.',
|
|
@@ -99,15 +96,14 @@ const koKRGrid = {
|
|
|
99
96
|
'headerFilterOperator>=': '같거나 더 큰',
|
|
100
97
|
'headerFilterOperator<': '더 작은',
|
|
101
98
|
'headerFilterOperator<=': '같거나 더 작은',
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
headerFilterClear: '필터 초기화',
|
|
104
100
|
// Filter values text
|
|
105
101
|
filterValueAny: '아무값',
|
|
106
102
|
filterValueTrue: '참',
|
|
107
103
|
filterValueFalse: '거짓',
|
|
108
104
|
// Column menu text
|
|
109
105
|
columnMenuLabel: '메뉴',
|
|
110
|
-
|
|
106
|
+
columnMenuAriaLabel: columnName => `${columnName} 열 메뉴`,
|
|
111
107
|
columnMenuShowColumns: '열 표시',
|
|
112
108
|
columnMenuManageColumns: '열 관리',
|
|
113
109
|
columnMenuFilter: '필터',
|
|
@@ -156,18 +152,18 @@ const koKRGrid = {
|
|
|
156
152
|
collapseDetailPanel: '접기',
|
|
157
153
|
// Pagination
|
|
158
154
|
paginationRowsPerPage: '페이지 당 행:',
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
paginationDisplayedRows: ({
|
|
156
|
+
from,
|
|
157
|
+
to,
|
|
158
|
+
count,
|
|
159
|
+
estimated
|
|
160
|
+
}) => {
|
|
161
|
+
if (!estimated) {
|
|
162
|
+
return `${from}–${to} of ${count !== -1 ? count : `${to} 이상`}`;
|
|
163
|
+
}
|
|
164
|
+
const estimatedLabel = estimated && estimated > to ? `약 ${estimated}` : `${to} 이상`;
|
|
165
|
+
return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
|
|
166
|
+
},
|
|
171
167
|
paginationItemAriaLabel: type => {
|
|
172
168
|
if (type === 'first') {
|
|
173
169
|
return '첫 번째 페이지로 이동';
|
|
@@ -191,61 +187,57 @@ const koKRGrid = {
|
|
|
191
187
|
aggregationFunctionLabelMax: '최대값',
|
|
192
188
|
aggregationFunctionLabelSize: '크기',
|
|
193
189
|
// Pivot panel
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
190
|
+
pivotToggleLabel: '피벗',
|
|
191
|
+
pivotRows: '행',
|
|
192
|
+
pivotColumns: '열',
|
|
193
|
+
pivotValues: '값',
|
|
194
|
+
pivotCloseButton: '피벗 설정 닫기',
|
|
195
|
+
pivotSearchButton: '필드 검색',
|
|
196
|
+
pivotSearchControlPlaceholder: '필드 검색',
|
|
197
|
+
pivotSearchControlLabel: '필드 검색',
|
|
198
|
+
pivotSearchControlClear: '검색 초기화',
|
|
199
|
+
pivotNoFields: '필드가 없습니다.',
|
|
200
|
+
pivotMenuMoveUp: '위로 이동',
|
|
201
|
+
pivotMenuMoveDown: '아래로 이동',
|
|
202
|
+
pivotMenuMoveToTop: '위로 이동',
|
|
203
|
+
pivotMenuMoveToBottom: '아래로 이동',
|
|
204
|
+
pivotMenuRows: '행',
|
|
205
|
+
pivotMenuColumns: '열',
|
|
206
|
+
pivotMenuValues: '값',
|
|
207
|
+
pivotMenuOptions: '필드 옵션',
|
|
208
|
+
pivotMenuAddToRows: '행에 추가',
|
|
209
|
+
pivotMenuAddToColumns: '열에 추가',
|
|
210
|
+
pivotMenuAddToValues: '값에 추가',
|
|
211
|
+
pivotMenuRemove: '제거',
|
|
212
|
+
pivotDragToRows: '행 생성',
|
|
213
|
+
pivotDragToColumns: '열 생성',
|
|
214
|
+
pivotDragToValues: '값 생성',
|
|
215
|
+
pivotYearColumnHeaderName: '(년)',
|
|
216
|
+
pivotQuarterColumnHeaderName: '(분기)',
|
|
222
217
|
// AI Assistant panel
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
218
|
+
aiAssistantPanelTitle: 'AI 어시스턴트',
|
|
219
|
+
aiAssistantPanelClose: 'AI 어시스턴트 닫기',
|
|
220
|
+
aiAssistantPanelNewConversation: '새 대화',
|
|
221
|
+
aiAssistantPanelConversationHistory: '대화 기록',
|
|
222
|
+
aiAssistantPanelEmptyConversation: '프롬프트 내역이 없습니다.',
|
|
223
|
+
aiAssistantSuggestions: '제안',
|
|
230
224
|
// Prompt field
|
|
231
225
|
promptFieldLabel: '프롬프트 입력',
|
|
232
226
|
promptFieldPlaceholder: '프롬프트 입력…',
|
|
233
227
|
promptFieldPlaceholderWithRecording: '프롬프트 입력 또는 녹음…',
|
|
234
228
|
promptFieldPlaceholderListening: '녹음 중…',
|
|
235
|
-
|
|
229
|
+
promptFieldSpeechRecognitionNotSupported: '이 브라우저에서 음성 인식을 지원하지 않습니다.',
|
|
236
230
|
promptFieldSend: '전송',
|
|
237
231
|
promptFieldRecord: '녹음',
|
|
238
|
-
promptFieldStopRecording: '녹음 정지'
|
|
239
|
-
|
|
232
|
+
promptFieldStopRecording: '녹음 정지',
|
|
240
233
|
// Prompt
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
234
|
+
promptRerun: '다시 실행',
|
|
235
|
+
promptProcessing: '처리 중…',
|
|
236
|
+
promptAppliedChanges: '변경사항 적용하기',
|
|
245
237
|
// Prompt changes
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
promptChangeGroupDescription: column => `${column} 값으로 그룹 생성`,
|
|
239
|
+
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
|
|
240
|
+
promptChangeAggregationDescription: (column, aggregation) => `${column} (${aggregation}) 집계`,
|
|
249
241
|
// promptChangeFilterLabel: (column: string, operator: string, value: string) => {
|
|
250
242
|
// if (operator === 'is any of') {
|
|
251
243
|
// return `${column} is any of: ${value}`;
|
|
@@ -258,13 +250,13 @@ const koKRGrid = {
|
|
|
258
250
|
// }
|
|
259
251
|
// return `Filter where ${column} ${operator} ${value}`;
|
|
260
252
|
// },
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
253
|
+
promptChangeSortDescription: (column, direction) => `${column} (${direction}) 기준으로 정렬`,
|
|
254
|
+
promptChangePivotEnableLabel: '피벗',
|
|
255
|
+
promptChangePivotEnableDescription: '피벗 활성화',
|
|
256
|
+
promptChangePivotColumnsLabel: count => `(${count}) 개의 열`,
|
|
257
|
+
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
258
|
+
promptChangePivotRowsLabel: count => `(${count}) 개의 행`,
|
|
259
|
+
promptChangePivotValuesLabel: count => `(${count}) 개의 값`,
|
|
260
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
|
|
269
261
|
};
|
|
270
262
|
export const koKR = getGridLocalization(koKRGrid);
|
package/esm/locales/nbNO.js
CHANGED
|
@@ -3,8 +3,8 @@ const nbNOGrid = {
|
|
|
3
3
|
// Root
|
|
4
4
|
noRowsLabel: 'Ingen rader',
|
|
5
5
|
noResultsOverlayLabel: 'Fant ingen resultat.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
noColumnsOverlayLabel: 'Ingen kolonner',
|
|
7
|
+
noColumnsOverlayManageColumns: 'Velg kolonner',
|
|
8
8
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
9
9
|
|
|
10
10
|
// Density selector toolbar button text
|
|
@@ -43,8 +43,7 @@ const nbNOGrid = {
|
|
|
43
43
|
columnsManagementNoColumns: 'Ingen kolonner',
|
|
44
44
|
columnsManagementShowHideAllText: 'Vis/skjul alle',
|
|
45
45
|
columnsManagementReset: 'Nullstill',
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
columnsManagementDeleteIconLabel: 'Tøm',
|
|
48
47
|
// Filter panel text
|
|
49
48
|
filterPanelAddFilter: 'Legg til filter',
|
|
50
49
|
filterPanelRemoveAll: 'Fjern alle',
|
|
@@ -58,9 +57,9 @@ const nbNOGrid = {
|
|
|
58
57
|
filterPanelInputPlaceholder: 'Filter verdi',
|
|
59
58
|
// Filter operators text
|
|
60
59
|
filterOperatorContains: 'inneholder',
|
|
61
|
-
|
|
60
|
+
filterOperatorDoesNotContain: 'inneholder ikke',
|
|
62
61
|
filterOperatorEquals: 'er lik',
|
|
63
|
-
|
|
62
|
+
filterOperatorDoesNotEqual: 'er ikke lik',
|
|
64
63
|
filterOperatorStartsWith: 'starter med',
|
|
65
64
|
filterOperatorEndsWith: 'slutter med',
|
|
66
65
|
filterOperatorIs: 'er',
|
|
@@ -80,9 +79,9 @@ const nbNOGrid = {
|
|
|
80
79
|
'filterOperator<=': '<=',
|
|
81
80
|
// Header filter operators text
|
|
82
81
|
headerFilterOperatorContains: 'Inneholder',
|
|
83
|
-
|
|
84
|
-
headerFilterOperatorEquals: '
|
|
85
|
-
|
|
82
|
+
headerFilterOperatorDoesNotContain: 'Inneholder ikke',
|
|
83
|
+
headerFilterOperatorEquals: 'Er lik',
|
|
84
|
+
headerFilterOperatorDoesNotEqual: 'Er ikke lik',
|
|
86
85
|
headerFilterOperatorStartsWith: 'Starter på',
|
|
87
86
|
headerFilterOperatorEndsWith: 'Slutter på',
|
|
88
87
|
headerFilterOperatorIs: 'Er',
|
|
@@ -100,15 +99,14 @@ const nbNOGrid = {
|
|
|
100
99
|
'headerFilterOperator>=': 'Større enn eller lik',
|
|
101
100
|
'headerFilterOperator<': 'Mindre enn',
|
|
102
101
|
'headerFilterOperator<=': 'Mindre enn eller lik',
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
headerFilterClear: 'Tøm filter',
|
|
105
103
|
// Filter values text
|
|
106
104
|
filterValueAny: 'noen',
|
|
107
105
|
filterValueTrue: 'sant',
|
|
108
106
|
filterValueFalse: 'usant',
|
|
109
107
|
// Column menu text
|
|
110
108
|
columnMenuLabel: 'Meny',
|
|
111
|
-
|
|
109
|
+
columnMenuAriaLabel: columnName => `${columnName} kolonnemeny`,
|
|
112
110
|
columnMenuShowColumns: 'Vis kolonner',
|
|
113
111
|
columnMenuManageColumns: 'Administrer kolonner',
|
|
114
112
|
columnMenuFilter: 'Filter',
|
|
@@ -157,18 +155,18 @@ const nbNOGrid = {
|
|
|
157
155
|
collapseDetailPanel: 'Kollaps',
|
|
158
156
|
// Pagination
|
|
159
157
|
paginationRowsPerPage: 'Rader per side:',
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
158
|
+
paginationDisplayedRows: ({
|
|
159
|
+
from,
|
|
160
|
+
to,
|
|
161
|
+
count,
|
|
162
|
+
estimated
|
|
163
|
+
}) => {
|
|
164
|
+
if (!estimated) {
|
|
165
|
+
return `${from}–${to} av ${count !== -1 ? count : `mer enn ${to}`}`;
|
|
166
|
+
}
|
|
167
|
+
const estimatedLabel = estimated && estimated > to ? `omtrent ${estimated}` : `mer enn ${to}`;
|
|
168
|
+
return `${from}–${to} av ${count !== -1 ? count : estimatedLabel}`;
|
|
169
|
+
},
|
|
172
170
|
paginationItemAriaLabel: type => {
|
|
173
171
|
if (type === 'first') {
|
|
174
172
|
return 'Gå til første side';
|
package/esm/material/index.js
CHANGED
|
@@ -9,19 +9,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
|
|
|
9
9
|
_excluded7 = ["material"],
|
|
10
10
|
_excluded8 = ["material"],
|
|
11
11
|
_excluded9 = ["material"],
|
|
12
|
+
_excluded0 = ["material"],
|
|
13
|
+
_excluded1 = ["material"],
|
|
12
14
|
_excluded10 = ["material"],
|
|
13
|
-
_excluded11 = ["material"],
|
|
15
|
+
_excluded11 = ["material", "label", "className"],
|
|
14
16
|
_excluded12 = ["material"],
|
|
15
|
-
_excluded13 = ["
|
|
16
|
-
_excluded14 = ["material"],
|
|
17
|
-
_excluded15 = ["
|
|
18
|
-
_excluded16 = ["
|
|
19
|
-
_excluded17 = ["
|
|
20
|
-
_excluded18 = ["
|
|
21
|
-
_excluded19 = ["
|
|
22
|
-
_excluded20 = ["
|
|
23
|
-
_excluded21 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
|
|
24
|
-
_excluded22 = ["native"];
|
|
17
|
+
_excluded13 = ["inert", "iconStart", "iconEnd", "children", "material"],
|
|
18
|
+
_excluded14 = ["slotProps", "material"],
|
|
19
|
+
_excluded15 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
|
|
20
|
+
_excluded16 = ["key"],
|
|
21
|
+
_excluded17 = ["inputProps", "InputProps", "InputLabelProps"],
|
|
22
|
+
_excluded18 = ["slotProps", "material"],
|
|
23
|
+
_excluded19 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
|
|
24
|
+
_excluded20 = ["native"];
|
|
25
25
|
import * as React from 'react';
|
|
26
26
|
import clsx from 'clsx';
|
|
27
27
|
import useForkRef from '@mui/utils/useForkRef';
|
|
@@ -327,7 +327,7 @@ const BaseIconButton = forwardRef(function BaseIconButton(props, ref) {
|
|
|
327
327
|
const {
|
|
328
328
|
material
|
|
329
329
|
} = props,
|
|
330
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
330
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded0);
|
|
331
331
|
return /*#__PURE__*/_jsx(MUIIconButton, _extends({}, rest, material, {
|
|
332
332
|
ref: ref
|
|
333
333
|
}));
|
|
@@ -336,7 +336,7 @@ const BaseTooltip = forwardRef(function BaseTooltip(props, ref) {
|
|
|
336
336
|
const {
|
|
337
337
|
material
|
|
338
338
|
} = props,
|
|
339
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
339
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded1);
|
|
340
340
|
return /*#__PURE__*/_jsx(MUITooltip, _extends({}, rest, material, {
|
|
341
341
|
ref: ref
|
|
342
342
|
}));
|
|
@@ -345,7 +345,7 @@ const BaseSkeleton = forwardRef(function BaseSkeleton(props, ref) {
|
|
|
345
345
|
const {
|
|
346
346
|
material
|
|
347
347
|
} = props,
|
|
348
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
348
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded10);
|
|
349
349
|
return /*#__PURE__*/_jsx(MUISkeleton, _extends({}, rest, material, {
|
|
350
350
|
ref: ref
|
|
351
351
|
}));
|
|
@@ -356,7 +356,7 @@ const BaseSwitch = forwardRef(function BaseSwitch(props, ref) {
|
|
|
356
356
|
label,
|
|
357
357
|
className
|
|
358
358
|
} = props,
|
|
359
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
359
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded11);
|
|
360
360
|
if (!label) {
|
|
361
361
|
return /*#__PURE__*/_jsx(MUISwitch, _extends({}, rest, material, {
|
|
362
362
|
className: className,
|
|
@@ -375,7 +375,7 @@ const BaseMenuList = forwardRef(function BaseMenuList(props, ref) {
|
|
|
375
375
|
const {
|
|
376
376
|
material
|
|
377
377
|
} = props,
|
|
378
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
378
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded12);
|
|
379
379
|
return /*#__PURE__*/_jsx(MUIMenuList, _extends({}, rest, material, {
|
|
380
380
|
ref: ref
|
|
381
381
|
}));
|
|
@@ -388,7 +388,7 @@ function BaseMenuItem(props) {
|
|
|
388
388
|
children,
|
|
389
389
|
material
|
|
390
390
|
} = props,
|
|
391
|
-
other = _objectWithoutPropertiesLoose(props,
|
|
391
|
+
other = _objectWithoutPropertiesLoose(props, _excluded13);
|
|
392
392
|
if (inert) {
|
|
393
393
|
other.disableRipple = true;
|
|
394
394
|
}
|
|
@@ -407,7 +407,7 @@ function BaseTextField(props) {
|
|
|
407
407
|
slotProps,
|
|
408
408
|
material
|
|
409
409
|
} = props,
|
|
410
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
410
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded14);
|
|
411
411
|
return /*#__PURE__*/_jsx(MUITextField, _extends({
|
|
412
412
|
variant: "outlined"
|
|
413
413
|
}, rest, material, {
|
|
@@ -434,7 +434,7 @@ function BaseAutocomplete(props) {
|
|
|
434
434
|
slotProps,
|
|
435
435
|
material
|
|
436
436
|
} = props,
|
|
437
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
437
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded15);
|
|
438
438
|
return /*#__PURE__*/_jsx(MUIAutocomplete, _extends({
|
|
439
439
|
id: id,
|
|
440
440
|
multiple: multiple,
|
|
@@ -451,7 +451,7 @@ function BaseAutocomplete(props) {
|
|
|
451
451
|
{
|
|
452
452
|
key
|
|
453
453
|
} = _getTagProps,
|
|
454
|
-
tagProps = _objectWithoutPropertiesLoose(_getTagProps,
|
|
454
|
+
tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded16);
|
|
455
455
|
return /*#__PURE__*/_jsx(MUIChip, _extends({
|
|
456
456
|
variant: "outlined",
|
|
457
457
|
size: "small",
|
|
@@ -464,7 +464,7 @@ function BaseAutocomplete(props) {
|
|
|
464
464
|
InputProps,
|
|
465
465
|
InputLabelProps
|
|
466
466
|
} = params,
|
|
467
|
-
inputRest = _objectWithoutPropertiesLoose(params,
|
|
467
|
+
inputRest = _objectWithoutPropertiesLoose(params, _excluded17);
|
|
468
468
|
return /*#__PURE__*/_jsx(MUITextField, _extends({}, inputRest, {
|
|
469
469
|
label: label,
|
|
470
470
|
placeholder: placeholder,
|
|
@@ -488,7 +488,7 @@ function transformInputProps(props, wrapAdornments = true) {
|
|
|
488
488
|
slotProps,
|
|
489
489
|
material
|
|
490
490
|
} = props,
|
|
491
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
491
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded18);
|
|
492
492
|
const result = rest;
|
|
493
493
|
if (wrapAdornments) {
|
|
494
494
|
if (result.startAdornment) {
|
|
@@ -537,7 +537,7 @@ function BasePopper(props) {
|
|
|
537
537
|
placement,
|
|
538
538
|
material
|
|
539
539
|
} = props,
|
|
540
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
540
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded19);
|
|
541
541
|
const modifiers = React.useMemo(() => {
|
|
542
542
|
const result = [{
|
|
543
543
|
name: 'preventOverflow',
|
|
@@ -635,7 +635,7 @@ function BaseSelectOption(_ref) {
|
|
|
635
635
|
let {
|
|
636
636
|
native
|
|
637
637
|
} = _ref,
|
|
638
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
638
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded20);
|
|
639
639
|
if (native) {
|
|
640
640
|
return /*#__PURE__*/_jsx("option", _extends({}, props));
|
|
641
641
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GridRowId, GridRowModel } from "../gridRows.js";
|
|
2
2
|
import type { GridRowSelectionModel } from "../gridRowSelectionModel.js";
|
|
3
|
+
import { GridControlledStateReasonLookup } from "../events/index.js";
|
|
3
4
|
/**
|
|
4
5
|
* The selection API interface that is available in the grid [[apiRef]].
|
|
5
6
|
*/
|
|
@@ -34,9 +35,10 @@ export interface GridRowSelectionApi {
|
|
|
34
35
|
*
|
|
35
36
|
* ⚠️ Caution: `setRowSelectionModel` doesn't apply the selection propagation automatically.
|
|
36
37
|
* Pass model returned by API method `getPropagatedRowSelectionModel` instead to apply the selection propagation.
|
|
37
|
-
* @param {gridRowSelectionModel} rowSelectionModel The new row selection model
|
|
38
|
+
* @param {gridRowSelectionModel} rowSelectionModel The new row selection model.
|
|
39
|
+
* @param {string} reason The reason for the state change.
|
|
38
40
|
*/
|
|
39
|
-
setRowSelectionModel: (rowSelectionModel: GridRowSelectionModel) => void;
|
|
41
|
+
setRowSelectionModel: (rowSelectionModel: GridRowSelectionModel, reason?: GridControlledStateReasonLookup['rowSelection']) => void;
|
|
40
42
|
}
|
|
41
43
|
export interface GridRowMultiSelectionApi {
|
|
42
44
|
/**
|
|
@@ -400,6 +400,7 @@ export interface GridControlledStateReasonLookup {
|
|
|
400
400
|
filter: 'upsertFilterItem' | 'upsertFilterItems' | 'deleteFilterItem' | 'changeLogicOperator' | 'restoreState' | 'removeAllFilterItems';
|
|
401
401
|
pagination: 'setPaginationModel' | 'stateRestorePreProcessing';
|
|
402
402
|
rows: 'addSkeletonRows';
|
|
403
|
+
rowSelection: 'singleRowSelection' | 'multipleRowsSelection';
|
|
403
404
|
}
|
|
404
405
|
export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEventLookup, GridHeaderFilterEventLookup, GridColumnGroupHeaderEventLookup, GridCellEventLookup, GridControlledStateEventLookup {
|
|
405
406
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CleanupTracking, UnregisterToken, UnsubscribeFn } from "./CleanupTracking.js";
|
|
2
2
|
export declare class TimerBasedCleanupTracking implements CleanupTracking {
|
|
3
|
-
timeouts?: Map<number,
|
|
3
|
+
timeouts?: Map<number, number> | undefined;
|
|
4
4
|
cleanupTimeout: number;
|
|
5
5
|
constructor(timeout?: number);
|
|
6
6
|
register(object: any, unsubscribe: UnsubscribeFn, unregisterToken: UnregisterToken): void;
|
package/esm/utils/css/context.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
2
3
|
import { useGridConfiguration } from "../../hooks/utils/useGridConfiguration.js";
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
const CLASSNAME_PREFIX = 'MuiDataGridVariables';
|
|
@@ -25,19 +26,21 @@ export function GridPortalWrapper({
|
|
|
25
26
|
}
|
|
26
27
|
export function GridCSSVariablesContext(props) {
|
|
27
28
|
const config = useGridConfiguration();
|
|
29
|
+
const rootProps = useGridRootProps();
|
|
28
30
|
const description = config.hooks.useCSSVariables();
|
|
29
31
|
const context = React.useMemo(() => {
|
|
30
32
|
const className = `${CLASSNAME_PREFIX}-${description.id}`;
|
|
31
33
|
const cssString = `.${className}{${variablesToString(description.variables)}}`;
|
|
32
34
|
const tag = /*#__PURE__*/_jsx("style", {
|
|
33
35
|
href: `/${className}`,
|
|
36
|
+
nonce: rootProps.nonce,
|
|
34
37
|
children: cssString
|
|
35
38
|
});
|
|
36
39
|
return {
|
|
37
40
|
className,
|
|
38
41
|
tag
|
|
39
42
|
};
|
|
40
|
-
}, [description]);
|
|
43
|
+
}, [rootProps.nonce, description]);
|
|
41
44
|
return /*#__PURE__*/_jsx(CSSVariablesContext.Provider, {
|
|
42
45
|
value: context,
|
|
43
46
|
children: props.children
|
|
@@ -318,13 +318,21 @@ function getFirstNonSpannedColumnToRender({
|
|
|
318
318
|
visibleRows
|
|
319
319
|
}) {
|
|
320
320
|
let firstNonSpannedColumnToRender = firstColumnToRender;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
321
|
+
let foundStableColumn = false;
|
|
322
|
+
|
|
323
|
+
// Keep checking columns until we find one that's not spanned in any visible row
|
|
324
|
+
while (!foundStableColumn && firstNonSpannedColumnToRender >= 0) {
|
|
325
|
+
foundStableColumn = true;
|
|
326
|
+
for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
|
|
327
|
+
const row = visibleRows[i];
|
|
328
|
+
if (row) {
|
|
329
|
+
const rowId = visibleRows[i].id;
|
|
330
|
+
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);
|
|
331
|
+
if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {
|
|
332
|
+
firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
|
|
333
|
+
foundStableColumn = false;
|
|
334
|
+
break; // Check the new column index against the visible rows, because it might be spanned
|
|
335
|
+
}
|
|
328
336
|
}
|
|
329
337
|
}
|
|
330
338
|
}
|
|
@@ -13,6 +13,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _warning = require("@mui/x-internals/warning");
|
|
14
14
|
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
15
15
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
16
|
+
var _isDeepEqual = require("@mui/x-internals/isDeepEqual");
|
|
16
17
|
var _useGridEvent = require("../../utils/useGridEvent");
|
|
17
18
|
var _gridEditRowModel = require("../../../models/gridEditRowModel");
|
|
18
19
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
@@ -338,7 +339,7 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
338
339
|
}
|
|
339
340
|
const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromCellEditing(id, field);
|
|
340
341
|
if (props.dataSource?.updateRow) {
|
|
341
|
-
if (row
|
|
342
|
+
if ((0, _isDeepEqual.isDeepEqual)(row, rowUpdate)) {
|
|
342
343
|
finishCellEditMode();
|
|
343
344
|
return;
|
|
344
345
|
}
|
|
@@ -321,8 +321,9 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
321
321
|
initialValue
|
|
322
322
|
} = params;
|
|
323
323
|
const row = apiRef.current.getRow(id);
|
|
324
|
-
const
|
|
325
|
-
const newProps =
|
|
324
|
+
const columns = (0, _gridColumnsSelector.gridColumnDefinitionsSelector)(apiRef);
|
|
325
|
+
const newProps = columns.reduce((acc, col) => {
|
|
326
|
+
const field = col.field;
|
|
326
327
|
const cellParams = apiRef.current.getCellParams(id, field);
|
|
327
328
|
if (!cellParams.isEditable) {
|
|
328
329
|
return acc;
|
|
@@ -339,7 +340,7 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
339
340
|
acc[field] = {
|
|
340
341
|
value: newValue,
|
|
341
342
|
error: false,
|
|
342
|
-
isProcessingProps: !!column.preProcessEditCellProps && deleteValue
|
|
343
|
+
isProcessingProps: column.editable && !!column.preProcessEditCellProps && deleteValue
|
|
343
344
|
};
|
|
344
345
|
return acc;
|
|
345
346
|
}, {});
|
|
@@ -348,8 +349,8 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
348
349
|
if (fieldToFocus) {
|
|
349
350
|
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
-
const
|
|
352
|
+
columns.filter(column => column.editable && !!column.preProcessEditCellProps && deleteValue).forEach(column => {
|
|
353
|
+
const field = column.field;
|
|
353
354
|
const value = apiRef.current.getCellValue(id, field);
|
|
354
355
|
const newValue = deleteValue ? (0, _utils2.getDefaultCellValue)(column) : initialValue ?? value;
|
|
355
356
|
Promise.resolve(column.preProcessEditCellProps({
|