@mui/x-data-grid 8.11.1 → 8.11.3
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 +181 -0
- package/DataGrid/DataGrid.js +5 -0
- package/components/GridShadowScrollArea.js +2 -2
- package/components/GridSkeletonLoadingOverlay.js +2 -2
- package/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.js +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/components/quickFilter/QuickFilterControl.js +1 -1
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/DataGrid/DataGrid.js +5 -0
- package/esm/components/GridShadowScrollArea.js +2 -2
- package/esm/components/GridSkeletonLoadingOverlay.js +2 -2
- package/esm/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/esm/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputBoolean.js +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/esm/components/quickFilter/QuickFilterControl.js +1 -1
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +6 -0
- package/esm/hooks/features/rows/gridRowsSelector.js +8 -0
- package/esm/hooks/features/rows/index.d.ts +1 -1
- package/esm/hooks/features/rows/index.js +1 -1
- package/esm/index.js +1 -1
- package/esm/material/index.js +35 -35
- package/esm/material/variables.js +31 -3
- package/esm/models/gridFilterItem.d.ts +4 -2
- package/esm/models/gridFilterOperator.d.ts +1 -1
- package/esm/models/props/DataGridProps.d.ts +5 -0
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/hooks/features/rows/gridRowsSelector.d.ts +6 -0
- package/hooks/features/rows/gridRowsSelector.js +8 -0
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +7 -0
- package/index.js +1 -1
- package/material/index.js +35 -35
- package/material/variables.js +30 -2
- package/models/gridFilterItem.d.ts +4 -2
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +5 -0
- package/package.json +4 -4
package/esm/material/index.js
CHANGED
|
@@ -134,7 +134,7 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
|
|
|
134
134
|
style,
|
|
135
135
|
fullWidth
|
|
136
136
|
} = props,
|
|
137
|
-
|
|
137
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
138
138
|
const menuProps = {
|
|
139
139
|
PaperProps: {
|
|
140
140
|
onKeyDown
|
|
@@ -162,7 +162,7 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
|
|
|
162
162
|
displayEmpty: true,
|
|
163
163
|
onChange: onChange,
|
|
164
164
|
variant: "outlined"
|
|
165
|
-
},
|
|
165
|
+
}, other, {
|
|
166
166
|
notched: true,
|
|
167
167
|
inputProps: slotProps?.htmlInput,
|
|
168
168
|
onOpen: onOpen,
|
|
@@ -194,7 +194,7 @@ const BasePagination = forwardRef(function BasePagination(props, ref) {
|
|
|
194
194
|
material,
|
|
195
195
|
disabled
|
|
196
196
|
} = props,
|
|
197
|
-
|
|
197
|
+
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
198
198
|
const computedProps = React.useMemo(() => {
|
|
199
199
|
if (!disabled) {
|
|
200
200
|
return undefined;
|
|
@@ -223,7 +223,7 @@ const BasePagination = forwardRef(function BasePagination(props, ref) {
|
|
|
223
223
|
estimated: estimatedRowCount
|
|
224
224
|
})),
|
|
225
225
|
getItemAriaLabel: apiRef.current.getLocaleText('paginationItemAriaLabel')
|
|
226
|
-
}, computedProps,
|
|
226
|
+
}, computedProps, other, material, {
|
|
227
227
|
ref: ref
|
|
228
228
|
}));
|
|
229
229
|
});
|
|
@@ -232,8 +232,8 @@ const BaseBadge = forwardRef(function BaseBadge(props, ref) {
|
|
|
232
232
|
const {
|
|
233
233
|
material
|
|
234
234
|
} = props,
|
|
235
|
-
|
|
236
|
-
return /*#__PURE__*/_jsx(MUIBadge, _extends({},
|
|
235
|
+
other = _objectWithoutPropertiesLoose(props, _excluded3);
|
|
236
|
+
return /*#__PURE__*/_jsx(MUIBadge, _extends({}, other, material, {
|
|
237
237
|
ref: ref
|
|
238
238
|
}));
|
|
239
239
|
});
|
|
@@ -287,8 +287,8 @@ const BaseCircularProgress = forwardRef(function BaseCircularProgress(props, ref
|
|
|
287
287
|
const {
|
|
288
288
|
material
|
|
289
289
|
} = props,
|
|
290
|
-
|
|
291
|
-
return /*#__PURE__*/_jsx(MUICircularProgress, _extends({},
|
|
290
|
+
other = _objectWithoutPropertiesLoose(props, _excluded5);
|
|
291
|
+
return /*#__PURE__*/_jsx(MUICircularProgress, _extends({}, other, material, {
|
|
292
292
|
ref: ref
|
|
293
293
|
}));
|
|
294
294
|
});
|
|
@@ -297,8 +297,8 @@ const BaseDivider = forwardRef(function BaseDivider(props, ref) {
|
|
|
297
297
|
const {
|
|
298
298
|
material
|
|
299
299
|
} = props,
|
|
300
|
-
|
|
301
|
-
return /*#__PURE__*/_jsx(MUIDivider, _extends({},
|
|
300
|
+
other = _objectWithoutPropertiesLoose(props, _excluded6);
|
|
301
|
+
return /*#__PURE__*/_jsx(MUIDivider, _extends({}, other, material, {
|
|
302
302
|
ref: ref
|
|
303
303
|
}));
|
|
304
304
|
});
|
|
@@ -307,8 +307,8 @@ const BaseLinearProgress = forwardRef(function BaseLinearProgress(props, ref) {
|
|
|
307
307
|
const {
|
|
308
308
|
material
|
|
309
309
|
} = props,
|
|
310
|
-
|
|
311
|
-
return /*#__PURE__*/_jsx(MUILinearProgress, _extends({},
|
|
310
|
+
other = _objectWithoutPropertiesLoose(props, _excluded7);
|
|
311
|
+
return /*#__PURE__*/_jsx(MUILinearProgress, _extends({}, other, material, {
|
|
312
312
|
ref: ref
|
|
313
313
|
}));
|
|
314
314
|
});
|
|
@@ -317,8 +317,8 @@ const BaseButton = forwardRef(function BaseButton(props, ref) {
|
|
|
317
317
|
const {
|
|
318
318
|
material
|
|
319
319
|
} = props,
|
|
320
|
-
|
|
321
|
-
return /*#__PURE__*/_jsx(MUIButton, _extends({},
|
|
320
|
+
other = _objectWithoutPropertiesLoose(props, _excluded8);
|
|
321
|
+
return /*#__PURE__*/_jsx(MUIButton, _extends({}, other, material, {
|
|
322
322
|
ref: ref
|
|
323
323
|
}));
|
|
324
324
|
});
|
|
@@ -327,8 +327,8 @@ const BaseChip = forwardRef(function BaseChip(props, ref) {
|
|
|
327
327
|
const {
|
|
328
328
|
material
|
|
329
329
|
} = props,
|
|
330
|
-
|
|
331
|
-
return /*#__PURE__*/_jsx(MUIChip, _extends({},
|
|
330
|
+
other = _objectWithoutPropertiesLoose(props, _excluded9);
|
|
331
|
+
return /*#__PURE__*/_jsx(MUIChip, _extends({}, other, material, {
|
|
332
332
|
ref: ref
|
|
333
333
|
}));
|
|
334
334
|
});
|
|
@@ -337,8 +337,8 @@ const BaseIconButton = forwardRef(function BaseIconButton(props, ref) {
|
|
|
337
337
|
const {
|
|
338
338
|
material
|
|
339
339
|
} = props,
|
|
340
|
-
|
|
341
|
-
return /*#__PURE__*/_jsx(MUIIconButton, _extends({},
|
|
340
|
+
other = _objectWithoutPropertiesLoose(props, _excluded0);
|
|
341
|
+
return /*#__PURE__*/_jsx(MUIIconButton, _extends({}, other, material, {
|
|
342
342
|
ref: ref
|
|
343
343
|
}));
|
|
344
344
|
});
|
|
@@ -347,8 +347,8 @@ const BaseTooltip = forwardRef(function BaseTooltip(props, ref) {
|
|
|
347
347
|
const {
|
|
348
348
|
material
|
|
349
349
|
} = props,
|
|
350
|
-
|
|
351
|
-
return /*#__PURE__*/_jsx(MUITooltip, _extends({},
|
|
350
|
+
other = _objectWithoutPropertiesLoose(props, _excluded1);
|
|
351
|
+
return /*#__PURE__*/_jsx(MUITooltip, _extends({}, other, material, {
|
|
352
352
|
ref: ref
|
|
353
353
|
}));
|
|
354
354
|
});
|
|
@@ -357,8 +357,8 @@ const BaseSkeleton = forwardRef(function BaseSkeleton(props, ref) {
|
|
|
357
357
|
const {
|
|
358
358
|
material
|
|
359
359
|
} = props,
|
|
360
|
-
|
|
361
|
-
return /*#__PURE__*/_jsx(MUISkeleton, _extends({},
|
|
360
|
+
other = _objectWithoutPropertiesLoose(props, _excluded10);
|
|
361
|
+
return /*#__PURE__*/_jsx(MUISkeleton, _extends({}, other, material, {
|
|
362
362
|
ref: ref
|
|
363
363
|
}));
|
|
364
364
|
});
|
|
@@ -369,16 +369,16 @@ const BaseSwitch = forwardRef(function BaseSwitch(props, ref) {
|
|
|
369
369
|
label,
|
|
370
370
|
className
|
|
371
371
|
} = props,
|
|
372
|
-
|
|
372
|
+
other = _objectWithoutPropertiesLoose(props, _excluded11);
|
|
373
373
|
if (!label) {
|
|
374
|
-
return /*#__PURE__*/_jsx(MUISwitch, _extends({},
|
|
374
|
+
return /*#__PURE__*/_jsx(MUISwitch, _extends({}, other, material, {
|
|
375
375
|
className: className,
|
|
376
376
|
ref: ref
|
|
377
377
|
}));
|
|
378
378
|
}
|
|
379
379
|
return /*#__PURE__*/_jsx(FormControlLabel, {
|
|
380
380
|
className: className,
|
|
381
|
-
control: /*#__PURE__*/_jsx(MUISwitch, _extends({},
|
|
381
|
+
control: /*#__PURE__*/_jsx(MUISwitch, _extends({}, other, material, {
|
|
382
382
|
ref: ref
|
|
383
383
|
})),
|
|
384
384
|
label: label
|
|
@@ -389,8 +389,8 @@ const BaseMenuList = forwardRef(function BaseMenuList(props, ref) {
|
|
|
389
389
|
const {
|
|
390
390
|
material
|
|
391
391
|
} = props,
|
|
392
|
-
|
|
393
|
-
return /*#__PURE__*/_jsx(MUIMenuList, _extends({},
|
|
392
|
+
other = _objectWithoutPropertiesLoose(props, _excluded12);
|
|
393
|
+
return /*#__PURE__*/_jsx(MUIMenuList, _extends({}, other, material, {
|
|
394
394
|
ref: ref
|
|
395
395
|
}));
|
|
396
396
|
});
|
|
@@ -422,10 +422,10 @@ function BaseTextField(props) {
|
|
|
422
422
|
slotProps,
|
|
423
423
|
material
|
|
424
424
|
} = props,
|
|
425
|
-
|
|
425
|
+
other = _objectWithoutPropertiesLoose(props, _excluded14);
|
|
426
426
|
return /*#__PURE__*/_jsx(MUITextField, _extends({
|
|
427
427
|
variant: "outlined"
|
|
428
|
-
},
|
|
428
|
+
}, other, material, {
|
|
429
429
|
inputProps: slotProps?.htmlInput,
|
|
430
430
|
InputProps: transformInputProps(slotProps?.input),
|
|
431
431
|
InputLabelProps: _extends({
|
|
@@ -449,7 +449,7 @@ function BaseAutocomplete(props) {
|
|
|
449
449
|
slotProps,
|
|
450
450
|
material
|
|
451
451
|
} = props,
|
|
452
|
-
|
|
452
|
+
other = _objectWithoutPropertiesLoose(props, _excluded15);
|
|
453
453
|
return /*#__PURE__*/_jsx(MUIAutocomplete, _extends({
|
|
454
454
|
id: id,
|
|
455
455
|
multiple: multiple,
|
|
@@ -490,7 +490,7 @@ function BaseAutocomplete(props) {
|
|
|
490
490
|
}, InputLabelProps)
|
|
491
491
|
}, slotProps?.textField, rootProps.slotProps?.baseTextField));
|
|
492
492
|
}
|
|
493
|
-
},
|
|
493
|
+
}, other, material));
|
|
494
494
|
}
|
|
495
495
|
function BaseInput(props) {
|
|
496
496
|
return /*#__PURE__*/_jsx(MUIInputBase, _extends({}, transformInputProps(props)));
|
|
@@ -503,8 +503,8 @@ function transformInputProps(props, wrapAdornments = true) {
|
|
|
503
503
|
slotProps,
|
|
504
504
|
material
|
|
505
505
|
} = props,
|
|
506
|
-
|
|
507
|
-
const result =
|
|
506
|
+
other = _objectWithoutPropertiesLoose(props, _excluded18);
|
|
507
|
+
const result = other;
|
|
508
508
|
if (wrapAdornments) {
|
|
509
509
|
if (result.startAdornment) {
|
|
510
510
|
result.startAdornment = /*#__PURE__*/_jsx(InputAdornment, {
|
|
@@ -552,7 +552,7 @@ function BasePopper(props) {
|
|
|
552
552
|
placement,
|
|
553
553
|
material
|
|
554
554
|
} = props,
|
|
555
|
-
|
|
555
|
+
other = _objectWithoutPropertiesLoose(props, _excluded19);
|
|
556
556
|
const modifiers = React.useMemo(() => {
|
|
557
557
|
const result = [{
|
|
558
558
|
name: 'preventOverflow',
|
|
@@ -614,7 +614,7 @@ function BasePopper(props) {
|
|
|
614
614
|
transition: transition,
|
|
615
615
|
placement: placement,
|
|
616
616
|
modifiers: modifiers
|
|
617
|
-
},
|
|
617
|
+
}, other, material, {
|
|
618
618
|
children: content
|
|
619
619
|
}));
|
|
620
620
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { alpha, darken, lighten } from '@mui/material/styles';
|
|
3
3
|
import { useTheme } from '@mui/material/styles';
|
|
4
|
-
import { hash
|
|
4
|
+
import { hash } from '@mui/x-internals/hash';
|
|
5
5
|
import { vars } from "../constants/cssVariables.js";
|
|
6
6
|
export function useMaterialCSSVariables() {
|
|
7
7
|
const theme = useTheme();
|
|
8
8
|
return React.useMemo(() => {
|
|
9
|
-
const id = hash(
|
|
9
|
+
const id = hash(stringifyTheme(theme));
|
|
10
10
|
const variables = transformTheme(theme);
|
|
11
11
|
return {
|
|
12
12
|
id,
|
|
@@ -97,5 +97,33 @@ function formatFont(font) {
|
|
|
97
97
|
if (!font) {
|
|
98
98
|
return undefined;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
const fontSize = typeof font.fontSize === 'number' ? `${font.fontSize}px` : font.fontSize;
|
|
101
|
+
return `${font.fontWeight} ${fontSize} / ${font.lineHeight} ${font.fontFamily}`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A version of JSON.stringify for theme objects.
|
|
106
|
+
* Fixes: https://github.com/mui/mui-x/issues/17521
|
|
107
|
+
* Source: https://www.30secondsofcode.org/js/s/stringify-circular-json/
|
|
108
|
+
*/
|
|
109
|
+
function stringifyTheme(input) {
|
|
110
|
+
const seen = new WeakSet();
|
|
111
|
+
return JSON.stringify(input, (_, v) => {
|
|
112
|
+
// https://github.com/mui/mui-x/issues/17855
|
|
113
|
+
if (typeof window !== 'undefined' && v === window || typeof document !== 'undefined' && v === document) {
|
|
114
|
+
return v.toString();
|
|
115
|
+
}
|
|
116
|
+
if (v !== null && typeof v === 'object') {
|
|
117
|
+
// Do not attempt to serialize React elements due to performance concerns.
|
|
118
|
+
// Fixes https://github.com/mui/mui-x/issues/19414
|
|
119
|
+
if (/*#__PURE__*/React.isValidElement(v)) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
if (seen.has(v)) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
seen.add(v);
|
|
126
|
+
}
|
|
127
|
+
return v;
|
|
128
|
+
});
|
|
101
129
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GridBaseColDef } from "./colDef/gridColDef.js";
|
|
1
2
|
/**
|
|
2
3
|
* Filter item definition interface.
|
|
3
4
|
* @demos
|
|
@@ -12,7 +13,7 @@ export interface GridFilterItem {
|
|
|
12
13
|
/**
|
|
13
14
|
* The column from which we want to filter the rows.
|
|
14
15
|
*/
|
|
15
|
-
field:
|
|
16
|
+
field: GridBaseColDef['field'];
|
|
16
17
|
/**
|
|
17
18
|
* The filtering value.
|
|
18
19
|
* The operator filtering function will decide for each row if the row values is correct compared to this value.
|
|
@@ -20,8 +21,9 @@ export interface GridFilterItem {
|
|
|
20
21
|
value?: any;
|
|
21
22
|
/**
|
|
22
23
|
* The name of the operator we want to apply.
|
|
24
|
+
* A custom operator is supported by providing any string value.
|
|
23
25
|
*/
|
|
24
|
-
operator: string;
|
|
26
|
+
operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | (string & {});
|
|
25
27
|
}
|
|
26
28
|
declare enum GridLogicOperator {
|
|
27
29
|
And = "and",
|
|
@@ -25,7 +25,7 @@ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any,
|
|
|
25
25
|
* The name of the filter operator.
|
|
26
26
|
* It will be matched with the `operator` property of the filter items.
|
|
27
27
|
*/
|
|
28
|
-
value:
|
|
28
|
+
value: GridFilterItem['operator'];
|
|
29
29
|
/**
|
|
30
30
|
* The callback that generates a filtering function for a given filter item and column.
|
|
31
31
|
* This function can return `null` to skip filtering for this item and column.
|
|
@@ -175,6 +175,11 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
175
175
|
* @default false
|
|
176
176
|
*/
|
|
177
177
|
disableRowSelectionOnClick: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* If `true`, the Data Grid will not use the exclude model optimization when selecting all rows.
|
|
180
|
+
* @default false
|
|
181
|
+
*/
|
|
182
|
+
disableRowSelectionExcludeModel: boolean;
|
|
178
183
|
/**
|
|
179
184
|
* If `true`, the virtualization is disabled.
|
|
180
185
|
* @default false
|
|
@@ -9,4 +9,4 @@ export declare const rowSelectionStateInitializer: GridStateInitializer<Pick<Dat
|
|
|
9
9
|
* @requires useGridFocus (state) - can be after
|
|
10
10
|
* @requires useGridKeyboardNavigation (`cellKeyDown` event must first be consumed by it)
|
|
11
11
|
*/
|
|
12
|
-
export declare const useGridRowSelection: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "checkboxSelection" | "rowSelectionModel" | "onRowSelectionModelChange" | "disableMultipleRowSelection" | "disableRowSelectionOnClick" | "isRowSelectable" | "checkboxSelectionVisibleOnly" | "pagination" | "paginationMode" | "filterMode" | "classes" | "keepNonExistentRowsSelected" | "rowSelection" | "rowSelectionPropagation" | "signature">) => void;
|
|
12
|
+
export declare const useGridRowSelection: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "checkboxSelection" | "rowSelectionModel" | "onRowSelectionModelChange" | "disableMultipleRowSelection" | "disableRowSelectionOnClick" | "disableRowSelectionExcludeModel" | "isRowSelectable" | "checkboxSelectionVisibleOnly" | "pagination" | "paginationMode" | "filterMode" | "classes" | "keepNonExistentRowsSelected" | "rowSelection" | "rowSelectionPropagation" | "signature">) => void;
|
|
@@ -439,7 +439,7 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
439
439
|
const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
|
|
440
440
|
const quickFilterModel = (0, _gridFilterSelector.gridQuickFilterValuesSelector)(apiRef);
|
|
441
441
|
const hasFilters = filterModel.items.length > 0 || quickFilterModel?.some(val => val.length);
|
|
442
|
-
if (!props.isRowSelectable && !props.checkboxSelectionVisibleOnly && (!isNestedData || props.rowSelectionPropagation?.descendants) && !hasFilters) {
|
|
442
|
+
if (!props.isRowSelectable && !props.checkboxSelectionVisibleOnly && (!isNestedData || props.rowSelectionPropagation?.descendants) && !hasFilters && !props.disableRowSelectionExcludeModel) {
|
|
443
443
|
apiRef.current.setRowSelectionModel({
|
|
444
444
|
type: value ? 'exclude' : 'include',
|
|
445
445
|
ids: new Set()
|
|
@@ -447,7 +447,7 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
447
447
|
} else {
|
|
448
448
|
apiRef.current.selectRows(getRowsToBeSelected(), value);
|
|
449
449
|
}
|
|
450
|
-
}, [apiRef, getRowsToBeSelected, props.checkboxSelectionVisibleOnly, props.isRowSelectable, props.rowSelectionPropagation?.descendants, isNestedData]);
|
|
450
|
+
}, [apiRef, getRowsToBeSelected, props.checkboxSelectionVisibleOnly, props.isRowSelectable, props.rowSelectionPropagation?.descendants, props.disableRowSelectionExcludeModel, isNestedData]);
|
|
451
451
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
452
452
|
toggleAllRows(params.value);
|
|
453
453
|
}, [toggleAllRows]);
|
|
@@ -13,12 +13,18 @@ export declare const gridTopLevelRowCountSelector: (args_0: import("react").RefO
|
|
|
13
13
|
export declare const gridRowsLookupSelector: (args_0: import("react").RefObject<{
|
|
14
14
|
state: GridStateCommunity;
|
|
15
15
|
} | null>) => import("@mui/x-data-grid").GridRowIdToModelLookup<import("@mui/x-data-grid").GridValidRowModel>;
|
|
16
|
+
/**
|
|
17
|
+
* @category Rows
|
|
18
|
+
*/
|
|
16
19
|
export declare const gridRowSelector: (args_0: import("react").RefObject<{
|
|
17
20
|
state: GridStateCommunity;
|
|
18
21
|
} | null>, id: GridRowId) => import("@mui/x-data-grid").GridValidRowModel;
|
|
19
22
|
export declare const gridRowTreeSelector: (args_0: import("react").RefObject<{
|
|
20
23
|
state: GridStateCommunity;
|
|
21
24
|
} | null>) => import("@mui/x-data-grid").GridRowTreeConfig;
|
|
25
|
+
/**
|
|
26
|
+
* @category Rows
|
|
27
|
+
*/
|
|
22
28
|
export declare const gridRowNodeSelector: (args_0: import("react").RefObject<{
|
|
23
29
|
state: GridStateCommunity;
|
|
24
30
|
} | null>, rowId: GridRowId) => import("@mui/x-data-grid").GridTreeNode;
|
|
@@ -12,8 +12,16 @@ const gridTopLevelRowCountSelector = exports.gridTopLevelRowCountSelector = (0,
|
|
|
12
12
|
|
|
13
13
|
// TODO rows v6: Rename
|
|
14
14
|
const gridRowsLookupSelector = exports.gridRowsLookupSelector = (0, _createSelector.createSelector)(gridRowsStateSelector, rows => rows.dataRowIdToModelLookup);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @category Rows
|
|
18
|
+
*/
|
|
15
19
|
const gridRowSelector = exports.gridRowSelector = (0, _createSelector.createSelector)(gridRowsLookupSelector, (rows, id) => rows[id]);
|
|
16
20
|
const gridRowTreeSelector = exports.gridRowTreeSelector = (0, _createSelector.createSelector)(gridRowsStateSelector, rows => rows.tree);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @category Rows
|
|
24
|
+
*/
|
|
17
25
|
const gridRowNodeSelector = exports.gridRowNodeSelector = (0, _createSelector.createSelector)(gridRowTreeSelector, (rowTree, rowId) => rowTree[rowId]);
|
|
18
26
|
const gridRowGroupsToFetchSelector = exports.gridRowGroupsToFetchSelector = (0, _createSelector.createSelector)(gridRowsStateSelector, rows => rows.groupsToFetch);
|
|
19
27
|
const gridRowGroupingNameSelector = exports.gridRowGroupingNameSelector = (0, _createSelector.createSelector)(gridRowsStateSelector, rows => rows.groupingName);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./gridRowsMetaSelector.js";
|
|
2
2
|
export * from "./gridRowsMetaState.js";
|
|
3
|
-
export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, gridRowNodeSelector } from "./gridRowsSelector.js";
|
|
3
|
+
export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, gridRowNodeSelector, gridRowSelector } from "./gridRowsSelector.js";
|
|
4
4
|
export type { GridRowsState, GridRowIdToModelLookup } from "./gridRowsInterfaces.js";
|
|
5
5
|
export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid, isAutogeneratedRow } from "./gridRowsUtils.js";
|
|
@@ -14,6 +14,7 @@ var _exportNames = {
|
|
|
14
14
|
gridRowMaximumTreeDepthSelector: true,
|
|
15
15
|
gridDataRowIdsSelector: true,
|
|
16
16
|
gridRowNodeSelector: true,
|
|
17
|
+
gridRowSelector: true,
|
|
17
18
|
GRID_ROOT_GROUP_ID: true,
|
|
18
19
|
checkGridRowIdIsValid: true,
|
|
19
20
|
isAutogeneratedRow: true
|
|
@@ -60,6 +61,12 @@ Object.defineProperty(exports, "gridRowNodeSelector", {
|
|
|
60
61
|
return _gridRowsSelector.gridRowNodeSelector;
|
|
61
62
|
}
|
|
62
63
|
});
|
|
64
|
+
Object.defineProperty(exports, "gridRowSelector", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return _gridRowsSelector.gridRowSelector;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
63
70
|
Object.defineProperty(exports, "gridRowTreeDepthsSelector", {
|
|
64
71
|
enumerable: true,
|
|
65
72
|
get: function () {
|
package/index.js
CHANGED
package/material/index.js
CHANGED
|
@@ -147,7 +147,7 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
|
|
|
147
147
|
style,
|
|
148
148
|
fullWidth
|
|
149
149
|
} = props,
|
|
150
|
-
|
|
150
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
151
151
|
const menuProps = {
|
|
152
152
|
PaperProps: {
|
|
153
153
|
onKeyDown
|
|
@@ -175,7 +175,7 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
|
|
|
175
175
|
displayEmpty: true,
|
|
176
176
|
onChange: onChange,
|
|
177
177
|
variant: "outlined"
|
|
178
|
-
},
|
|
178
|
+
}, other, {
|
|
179
179
|
notched: true,
|
|
180
180
|
inputProps: slotProps?.htmlInput,
|
|
181
181
|
onOpen: onOpen,
|
|
@@ -207,7 +207,7 @@ const BasePagination = (0, _forwardRef.forwardRef)(function BasePagination(props
|
|
|
207
207
|
material,
|
|
208
208
|
disabled
|
|
209
209
|
} = props,
|
|
210
|
-
|
|
210
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
211
211
|
const computedProps = React.useMemo(() => {
|
|
212
212
|
if (!disabled) {
|
|
213
213
|
return undefined;
|
|
@@ -236,7 +236,7 @@ const BasePagination = (0, _forwardRef.forwardRef)(function BasePagination(props
|
|
|
236
236
|
estimated: estimatedRowCount
|
|
237
237
|
})),
|
|
238
238
|
getItemAriaLabel: apiRef.current.getLocaleText('paginationItemAriaLabel')
|
|
239
|
-
}, computedProps,
|
|
239
|
+
}, computedProps, other, material, {
|
|
240
240
|
ref: ref
|
|
241
241
|
}));
|
|
242
242
|
});
|
|
@@ -245,8 +245,8 @@ const BaseBadge = (0, _forwardRef.forwardRef)(function BaseBadge(props, ref) {
|
|
|
245
245
|
const {
|
|
246
246
|
material
|
|
247
247
|
} = props,
|
|
248
|
-
|
|
249
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, (0, _extends2.default)({},
|
|
248
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded3);
|
|
249
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, (0, _extends2.default)({}, other, material, {
|
|
250
250
|
ref: ref
|
|
251
251
|
}));
|
|
252
252
|
});
|
|
@@ -300,8 +300,8 @@ const BaseCircularProgress = (0, _forwardRef.forwardRef)(function BaseCircularPr
|
|
|
300
300
|
const {
|
|
301
301
|
material
|
|
302
302
|
} = props,
|
|
303
|
-
|
|
304
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, (0, _extends2.default)({},
|
|
303
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded5);
|
|
304
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, (0, _extends2.default)({}, other, material, {
|
|
305
305
|
ref: ref
|
|
306
306
|
}));
|
|
307
307
|
});
|
|
@@ -310,8 +310,8 @@ const BaseDivider = (0, _forwardRef.forwardRef)(function BaseDivider(props, ref)
|
|
|
310
310
|
const {
|
|
311
311
|
material
|
|
312
312
|
} = props,
|
|
313
|
-
|
|
314
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, (0, _extends2.default)({},
|
|
313
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded6);
|
|
314
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, (0, _extends2.default)({}, other, material, {
|
|
315
315
|
ref: ref
|
|
316
316
|
}));
|
|
317
317
|
});
|
|
@@ -320,8 +320,8 @@ const BaseLinearProgress = (0, _forwardRef.forwardRef)(function BaseLinearProgre
|
|
|
320
320
|
const {
|
|
321
321
|
material
|
|
322
322
|
} = props,
|
|
323
|
-
|
|
324
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinearProgress.default, (0, _extends2.default)({},
|
|
323
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded7);
|
|
324
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinearProgress.default, (0, _extends2.default)({}, other, material, {
|
|
325
325
|
ref: ref
|
|
326
326
|
}));
|
|
327
327
|
});
|
|
@@ -330,8 +330,8 @@ const BaseButton = (0, _forwardRef.forwardRef)(function BaseButton(props, ref) {
|
|
|
330
330
|
const {
|
|
331
331
|
material
|
|
332
332
|
} = props,
|
|
333
|
-
|
|
334
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, (0, _extends2.default)({},
|
|
333
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded8);
|
|
334
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, (0, _extends2.default)({}, other, material, {
|
|
335
335
|
ref: ref
|
|
336
336
|
}));
|
|
337
337
|
});
|
|
@@ -340,8 +340,8 @@ const BaseChip = (0, _forwardRef.forwardRef)(function BaseChip(props, ref) {
|
|
|
340
340
|
const {
|
|
341
341
|
material
|
|
342
342
|
} = props,
|
|
343
|
-
|
|
344
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({},
|
|
343
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded9);
|
|
344
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({}, other, material, {
|
|
345
345
|
ref: ref
|
|
346
346
|
}));
|
|
347
347
|
});
|
|
@@ -350,8 +350,8 @@ const BaseIconButton = (0, _forwardRef.forwardRef)(function BaseIconButton(props
|
|
|
350
350
|
const {
|
|
351
351
|
material
|
|
352
352
|
} = props,
|
|
353
|
-
|
|
354
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({},
|
|
353
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded0);
|
|
354
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({}, other, material, {
|
|
355
355
|
ref: ref
|
|
356
356
|
}));
|
|
357
357
|
});
|
|
@@ -360,8 +360,8 @@ const BaseTooltip = (0, _forwardRef.forwardRef)(function BaseTooltip(props, ref)
|
|
|
360
360
|
const {
|
|
361
361
|
material
|
|
362
362
|
} = props,
|
|
363
|
-
|
|
364
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, (0, _extends2.default)({},
|
|
363
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded1);
|
|
364
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, (0, _extends2.default)({}, other, material, {
|
|
365
365
|
ref: ref
|
|
366
366
|
}));
|
|
367
367
|
});
|
|
@@ -370,8 +370,8 @@ const BaseSkeleton = (0, _forwardRef.forwardRef)(function BaseSkeleton(props, re
|
|
|
370
370
|
const {
|
|
371
371
|
material
|
|
372
372
|
} = props,
|
|
373
|
-
|
|
374
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, (0, _extends2.default)({},
|
|
373
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded10);
|
|
374
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, (0, _extends2.default)({}, other, material, {
|
|
375
375
|
ref: ref
|
|
376
376
|
}));
|
|
377
377
|
});
|
|
@@ -382,16 +382,16 @@ const BaseSwitch = (0, _forwardRef.forwardRef)(function BaseSwitch(props, ref) {
|
|
|
382
382
|
label,
|
|
383
383
|
className
|
|
384
384
|
} = props,
|
|
385
|
-
|
|
385
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded11);
|
|
386
386
|
if (!label) {
|
|
387
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({},
|
|
387
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, other, material, {
|
|
388
388
|
className: className,
|
|
389
389
|
ref: ref
|
|
390
390
|
}));
|
|
391
391
|
}
|
|
392
392
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormControlLabel, {
|
|
393
393
|
className: className,
|
|
394
|
-
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({},
|
|
394
|
+
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, other, material, {
|
|
395
395
|
ref: ref
|
|
396
396
|
})),
|
|
397
397
|
label: label
|
|
@@ -402,8 +402,8 @@ const BaseMenuList = (0, _forwardRef.forwardRef)(function BaseMenuList(props, re
|
|
|
402
402
|
const {
|
|
403
403
|
material
|
|
404
404
|
} = props,
|
|
405
|
-
|
|
406
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuList.default, (0, _extends2.default)({},
|
|
405
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded12);
|
|
406
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuList.default, (0, _extends2.default)({}, other, material, {
|
|
407
407
|
ref: ref
|
|
408
408
|
}));
|
|
409
409
|
});
|
|
@@ -435,10 +435,10 @@ function BaseTextField(props) {
|
|
|
435
435
|
slotProps,
|
|
436
436
|
material
|
|
437
437
|
} = props,
|
|
438
|
-
|
|
438
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded14);
|
|
439
439
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({
|
|
440
440
|
variant: "outlined"
|
|
441
|
-
},
|
|
441
|
+
}, other, material, {
|
|
442
442
|
inputProps: slotProps?.htmlInput,
|
|
443
443
|
InputProps: transformInputProps(slotProps?.input),
|
|
444
444
|
InputLabelProps: (0, _extends2.default)({
|
|
@@ -462,7 +462,7 @@ function BaseAutocomplete(props) {
|
|
|
462
462
|
slotProps,
|
|
463
463
|
material
|
|
464
464
|
} = props,
|
|
465
|
-
|
|
465
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
|
|
466
466
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
|
|
467
467
|
id: id,
|
|
468
468
|
multiple: multiple,
|
|
@@ -503,7 +503,7 @@ function BaseAutocomplete(props) {
|
|
|
503
503
|
}, InputLabelProps)
|
|
504
504
|
}, slotProps?.textField, rootProps.slotProps?.baseTextField));
|
|
505
505
|
}
|
|
506
|
-
},
|
|
506
|
+
}, other, material));
|
|
507
507
|
}
|
|
508
508
|
function BaseInput(props) {
|
|
509
509
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({}, transformInputProps(props)));
|
|
@@ -516,8 +516,8 @@ function transformInputProps(props, wrapAdornments = true) {
|
|
|
516
516
|
slotProps,
|
|
517
517
|
material
|
|
518
518
|
} = props,
|
|
519
|
-
|
|
520
|
-
const result =
|
|
519
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded18);
|
|
520
|
+
const result = other;
|
|
521
521
|
if (wrapAdornments) {
|
|
522
522
|
if (result.startAdornment) {
|
|
523
523
|
result.startAdornment = /*#__PURE__*/(0, _jsxRuntime.jsx)(InputAdornment, {
|
|
@@ -565,7 +565,7 @@ function BasePopper(props) {
|
|
|
565
565
|
placement,
|
|
566
566
|
material
|
|
567
567
|
} = props,
|
|
568
|
-
|
|
568
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded19);
|
|
569
569
|
const modifiers = React.useMemo(() => {
|
|
570
570
|
const result = [{
|
|
571
571
|
name: 'preventOverflow',
|
|
@@ -627,7 +627,7 @@ function BasePopper(props) {
|
|
|
627
627
|
transition: transition,
|
|
628
628
|
placement: placement,
|
|
629
629
|
modifiers: modifiers
|
|
630
|
-
},
|
|
630
|
+
}, other, material, {
|
|
631
631
|
children: content
|
|
632
632
|
}));
|
|
633
633
|
}
|