@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/material/index.js
CHANGED
|
@@ -64,19 +64,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
|
|
|
64
64
|
_excluded7 = ["material"],
|
|
65
65
|
_excluded8 = ["material"],
|
|
66
66
|
_excluded9 = ["material"],
|
|
67
|
+
_excluded0 = ["material"],
|
|
68
|
+
_excluded1 = ["material"],
|
|
67
69
|
_excluded10 = ["material"],
|
|
68
|
-
_excluded11 = ["material"],
|
|
70
|
+
_excluded11 = ["material", "label", "className"],
|
|
69
71
|
_excluded12 = ["material"],
|
|
70
|
-
_excluded13 = ["
|
|
71
|
-
_excluded14 = ["material"],
|
|
72
|
-
_excluded15 = ["
|
|
73
|
-
_excluded16 = ["
|
|
74
|
-
_excluded17 = ["
|
|
75
|
-
_excluded18 = ["
|
|
76
|
-
_excluded19 = ["
|
|
77
|
-
_excluded20 = ["
|
|
78
|
-
_excluded21 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
|
|
79
|
-
_excluded22 = ["native"];
|
|
72
|
+
_excluded13 = ["inert", "iconStart", "iconEnd", "children", "material"],
|
|
73
|
+
_excluded14 = ["slotProps", "material"],
|
|
74
|
+
_excluded15 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
|
|
75
|
+
_excluded16 = ["key"],
|
|
76
|
+
_excluded17 = ["inputProps", "InputProps", "InputLabelProps"],
|
|
77
|
+
_excluded18 = ["slotProps", "material"],
|
|
78
|
+
_excluded19 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
|
|
79
|
+
_excluded20 = ["native"];
|
|
80
80
|
/* eslint-disable material-ui/disallow-react-api-in-server-components */
|
|
81
81
|
|
|
82
82
|
const InputAdornment = (0, _styles.styled)(_InputAdornment.default)(({
|
|
@@ -340,7 +340,7 @@ const BaseIconButton = (0, _forwardRef.forwardRef)(function BaseIconButton(props
|
|
|
340
340
|
const {
|
|
341
341
|
material
|
|
342
342
|
} = props,
|
|
343
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
343
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded0);
|
|
344
344
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({}, rest, material, {
|
|
345
345
|
ref: ref
|
|
346
346
|
}));
|
|
@@ -349,7 +349,7 @@ const BaseTooltip = (0, _forwardRef.forwardRef)(function BaseTooltip(props, ref)
|
|
|
349
349
|
const {
|
|
350
350
|
material
|
|
351
351
|
} = props,
|
|
352
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
352
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded1);
|
|
353
353
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, (0, _extends2.default)({}, rest, material, {
|
|
354
354
|
ref: ref
|
|
355
355
|
}));
|
|
@@ -358,7 +358,7 @@ const BaseSkeleton = (0, _forwardRef.forwardRef)(function BaseSkeleton(props, re
|
|
|
358
358
|
const {
|
|
359
359
|
material
|
|
360
360
|
} = props,
|
|
361
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
361
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded10);
|
|
362
362
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, (0, _extends2.default)({}, rest, material, {
|
|
363
363
|
ref: ref
|
|
364
364
|
}));
|
|
@@ -369,7 +369,7 @@ const BaseSwitch = (0, _forwardRef.forwardRef)(function BaseSwitch(props, ref) {
|
|
|
369
369
|
label,
|
|
370
370
|
className
|
|
371
371
|
} = props,
|
|
372
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
372
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded11);
|
|
373
373
|
if (!label) {
|
|
374
374
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, rest, material, {
|
|
375
375
|
className: className,
|
|
@@ -388,7 +388,7 @@ const BaseMenuList = (0, _forwardRef.forwardRef)(function BaseMenuList(props, re
|
|
|
388
388
|
const {
|
|
389
389
|
material
|
|
390
390
|
} = props,
|
|
391
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
391
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded12);
|
|
392
392
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuList.default, (0, _extends2.default)({}, rest, material, {
|
|
393
393
|
ref: ref
|
|
394
394
|
}));
|
|
@@ -401,7 +401,7 @@ function BaseMenuItem(props) {
|
|
|
401
401
|
children,
|
|
402
402
|
material
|
|
403
403
|
} = props,
|
|
404
|
-
other = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
404
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded13);
|
|
405
405
|
if (inert) {
|
|
406
406
|
other.disableRipple = true;
|
|
407
407
|
}
|
|
@@ -420,7 +420,7 @@ function BaseTextField(props) {
|
|
|
420
420
|
slotProps,
|
|
421
421
|
material
|
|
422
422
|
} = props,
|
|
423
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
423
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded14);
|
|
424
424
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({
|
|
425
425
|
variant: "outlined"
|
|
426
426
|
}, rest, material, {
|
|
@@ -447,7 +447,7 @@ function BaseAutocomplete(props) {
|
|
|
447
447
|
slotProps,
|
|
448
448
|
material
|
|
449
449
|
} = props,
|
|
450
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
450
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
|
|
451
451
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
|
|
452
452
|
id: id,
|
|
453
453
|
multiple: multiple,
|
|
@@ -464,7 +464,7 @@ function BaseAutocomplete(props) {
|
|
|
464
464
|
{
|
|
465
465
|
key
|
|
466
466
|
} = _getTagProps,
|
|
467
|
-
tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps,
|
|
467
|
+
tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded16);
|
|
468
468
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
|
|
469
469
|
variant: "outlined",
|
|
470
470
|
size: "small",
|
|
@@ -477,7 +477,7 @@ function BaseAutocomplete(props) {
|
|
|
477
477
|
InputProps,
|
|
478
478
|
InputLabelProps
|
|
479
479
|
} = params,
|
|
480
|
-
inputRest = (0, _objectWithoutPropertiesLoose2.default)(params,
|
|
480
|
+
inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded17);
|
|
481
481
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, inputRest, {
|
|
482
482
|
label: label,
|
|
483
483
|
placeholder: placeholder,
|
|
@@ -501,7 +501,7 @@ function transformInputProps(props, wrapAdornments = true) {
|
|
|
501
501
|
slotProps,
|
|
502
502
|
material
|
|
503
503
|
} = props,
|
|
504
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
504
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded18);
|
|
505
505
|
const result = rest;
|
|
506
506
|
if (wrapAdornments) {
|
|
507
507
|
if (result.startAdornment) {
|
|
@@ -550,7 +550,7 @@ function BasePopper(props) {
|
|
|
550
550
|
placement,
|
|
551
551
|
material
|
|
552
552
|
} = props,
|
|
553
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props,
|
|
553
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded19);
|
|
554
554
|
const modifiers = React.useMemo(() => {
|
|
555
555
|
const result = [{
|
|
556
556
|
name: 'preventOverflow',
|
|
@@ -648,7 +648,7 @@ function BaseSelectOption(_ref) {
|
|
|
648
648
|
let {
|
|
649
649
|
native
|
|
650
650
|
} = _ref,
|
|
651
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(_ref,
|
|
651
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded20);
|
|
652
652
|
if (native) {
|
|
653
653
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", (0, _extends2.default)({}, props));
|
|
654
654
|
}
|
|
@@ -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
|
/**
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.
|
|
4
|
-
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
3
|
+
"version": "8.3.1",
|
|
5
4
|
"author": "MUI Team",
|
|
5
|
+
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"bugs": {
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"directory": "packages/x-data-grid"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@babel/runtime": "^7.27.
|
|
42
|
+
"@babel/runtime": "^7.27.1",
|
|
43
43
|
"@mui/utils": "^7.0.2",
|
|
44
44
|
"clsx": "^2.1.1",
|
|
45
45
|
"prop-types": "^15.8.1",
|
|
46
46
|
"reselect": "^5.1.1",
|
|
47
47
|
"use-sync-external-store": "^1.5.0",
|
|
48
|
-
"@mui/x-internals": "8.
|
|
48
|
+
"@mui/x-internals": "8.3.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@emotion/react": "^11.9.0",
|
|
@@ -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/utils/css/context.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.GridPortalWrapper = GridPortalWrapper;
|
|
|
9
9
|
exports.useCSSVariablesClass = useCSSVariablesClass;
|
|
10
10
|
exports.useCSSVariablesContext = useCSSVariablesContext;
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
12
13
|
var _useGridConfiguration = require("../../hooks/utils/useGridConfiguration");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
const CLASSNAME_PREFIX = 'MuiDataGridVariables';
|
|
@@ -35,19 +36,21 @@ function GridPortalWrapper({
|
|
|
35
36
|
}
|
|
36
37
|
function GridCSSVariablesContext(props) {
|
|
37
38
|
const config = (0, _useGridConfiguration.useGridConfiguration)();
|
|
39
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
38
40
|
const description = config.hooks.useCSSVariables();
|
|
39
41
|
const context = React.useMemo(() => {
|
|
40
42
|
const className = `${CLASSNAME_PREFIX}-${description.id}`;
|
|
41
43
|
const cssString = `.${className}{${variablesToString(description.variables)}}`;
|
|
42
44
|
const tag = /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {
|
|
43
45
|
href: `/${className}`,
|
|
46
|
+
nonce: rootProps.nonce,
|
|
44
47
|
children: cssString
|
|
45
48
|
});
|
|
46
49
|
return {
|
|
47
50
|
className,
|
|
48
51
|
tag
|
|
49
52
|
};
|
|
50
|
-
}, [description]);
|
|
53
|
+
}, [rootProps.nonce, description]);
|
|
51
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(CSSVariablesContext.Provider, {
|
|
52
55
|
value: context,
|
|
53
56
|
children: props.children
|