@mui/x-data-grid 9.4.0 → 9.5.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 +100 -0
- package/colDef/gridColumnTypesRegistry.d.mts +8 -0
- package/colDef/gridColumnTypesRegistry.d.ts +8 -0
- package/colDef/gridColumnTypesRegistry.js +44 -0
- package/colDef/gridColumnTypesRegistry.mjs +34 -0
- package/colDef/gridDefaultColumnTypes.d.mts +1 -1
- package/colDef/gridDefaultColumnTypes.d.ts +1 -1
- package/colDef/gridDefaultColumnTypes.js +11 -23
- package/colDef/gridDefaultColumnTypes.mjs +4 -22
- package/components/cell/GridActionsCell.js +1 -1
- package/components/cell/GridActionsCell.mjs +1 -1
- package/components/cell/GridLongTextCell.js +2 -0
- package/components/cell/GridLongTextCell.mjs +2 -0
- package/components/containers/GridRootStyles.js +29 -0
- package/components/containers/GridRootStyles.mjs +29 -0
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -4
- package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +2 -4
- package/components/panel/filterPanel/filterPanelUtils.d.mts +3 -2
- package/components/panel/filterPanel/filterPanelUtils.d.ts +3 -2
- package/components/panel/filterPanel/filterPanelUtils.js +4 -0
- package/components/panel/filterPanel/filterPanelUtils.mjs +3 -0
- package/constants/cssVariables.d.mts +3 -0
- package/constants/cssVariables.d.ts +3 -0
- package/constants/cssVariables.js +2 -1
- package/constants/cssVariables.mjs +2 -1
- package/constants/gridClasses.d.mts +48 -0
- package/constants/gridClasses.d.ts +48 -0
- package/constants/gridClasses.js +1 -1
- package/constants/gridClasses.mjs +1 -1
- package/hooks/core/useGridProps.js +5 -3
- package/hooks/core/useGridProps.mjs +5 -3
- package/hooks/features/columns/gridColumnsUtils.js +18 -10
- package/hooks/features/columns/gridColumnsUtils.mjs +19 -11
- package/hooks/features/columns/useGridColumns.js +11 -0
- package/hooks/features/columns/useGridColumns.mjs +11 -0
- package/hooks/features/dataSource/useGridDataSourceBase.js +2 -2
- package/hooks/features/dataSource/useGridDataSourceBase.mjs +2 -2
- package/hooks/features/editing/useGridCellEditing.js +1 -1
- package/hooks/features/editing/useGridCellEditing.mjs +1 -1
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/editing/useGridRowEditing.mjs +1 -1
- package/hooks/features/export/serializers/csvSerializer.js +3 -1
- package/hooks/features/export/serializers/csvSerializer.mjs +3 -1
- package/hooks/features/filter/gridFilterUtils.js +5 -3
- package/hooks/features/filter/gridFilterUtils.mjs +5 -3
- package/hooks/features/listView/useGridListView.js +1 -1
- package/hooks/features/listView/useGridListView.mjs +1 -1
- package/hooks/features/sorting/gridSortingUtils.js +3 -1
- package/hooks/features/sorting/gridSortingUtils.mjs +3 -1
- package/hooks/utils/useGridSelector.js +26 -23
- package/hooks/utils/useGridSelector.mjs +25 -23
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/index.d.mts +9 -4
- package/internals/index.d.ts +9 -4
- package/internals/index.js +62 -2
- package/internals/index.mjs +8 -4
- package/internals/utils/propValidation.js +3 -0
- package/internals/utils/propValidation.mjs +3 -0
- package/material/augmentation.d.mts +4 -0
- package/material/augmentation.d.ts +4 -0
- package/material/index.js +38 -24
- package/material/index.mjs +38 -24
- package/material/variables.js +2 -1
- package/material/variables.mjs +2 -1
- package/models/colDef/gridColDef.d.mts +35 -3
- package/models/colDef/gridColDef.d.ts +35 -3
- package/models/colDef/gridColType.d.mts +1 -0
- package/models/colDef/gridColType.d.ts +1 -0
- package/models/colDef/gridColumnTypesRecord.d.mts +1 -1
- package/models/colDef/gridColumnTypesRecord.d.ts +1 -1
- package/models/colDef/index.d.mts +1 -1
- package/models/colDef/index.d.ts +1 -1
- package/models/gridBaseSlots.d.mts +46 -0
- package/models/gridBaseSlots.d.ts +46 -0
- package/models/gridSlotsComponent.d.mts +5 -0
- package/models/gridSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponentsProps.d.mts +3 -1
- package/models/gridSlotsComponentsProps.d.ts +3 -1
- package/models/gridStateCommunity.d.mts +1 -1
- package/models/gridStateCommunity.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,105 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.5.0
|
|
4
|
+
|
|
5
|
+
_Jun 11, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 🎁 New [`multiSelect` column type for Data Grid Pro](https://mui.com/x/react-data-grid/column-definition/#MultiSelectColumn)
|
|
10
|
+
- 🚀 New [renderer="svg-progressive"](https://mui.com/x/react-charts/scatter/#progressive-renderer) paints scatter points in batched frames so large datasets render smoothly without blocking the main thread.
|
|
11
|
+
- 🐞 Bugfixes
|
|
12
|
+
- 📚 Documentation improvements
|
|
13
|
+
|
|
14
|
+
Special thanks go out to community members @mustafajw07 and @Anexus5919 for their valuable contribution.
|
|
15
|
+
|
|
16
|
+
The following team members contributed to this release:
|
|
17
|
+
@alexfauquette, @JCQuintas, @rita-codes, @rluzists1, @sai6855, @siriwatknp, @arminmeh, @brijeshb42
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@9.5.0`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Restrict warning messages to non-production environments in various components (#22461) @sai6855
|
|
24
|
+
- [DataGrid] Prevent React state update before mount (#22374) @arminmeh
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@9.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@9.5.0`, plus:
|
|
29
|
+
|
|
30
|
+
- [DataGridPro] Add new `multiSelect` column type (#21157) @siriwatknp
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-premium@9.5.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid-pro@9.5.0`.
|
|
35
|
+
|
|
36
|
+
### Date and Time Pickers
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-date-pickers@9.5.0`
|
|
39
|
+
|
|
40
|
+
- [pickers] Fix missing export of `th-TH` (#22703) @alexfauquette
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-date-pickers-pro@9.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-date-pickers@9.5.0`.
|
|
45
|
+
|
|
46
|
+
### Charts
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-charts@9.5.0`
|
|
49
|
+
|
|
50
|
+
- [charts] Add `FocusedBar` component to `BarScatterComposition` demo (#22704) @sai6855
|
|
51
|
+
- [charts] Add dedicated Bubble Chart documentation page (#22688) @mustafajw07
|
|
52
|
+
- [charts] Add progressive scatter renderer (#22518) @JCQuintas
|
|
53
|
+
- [charts] Avoid full axis pipeline rebuild on resize (#22695) @JCQuintas
|
|
54
|
+
- [charts] Document focus indicator in composition page (#22712) @JCQuintas
|
|
55
|
+
- [charts] Fix `ChartsTooltip` `container` and `disablePortal` props being ignored (#22690) @JCQuintas
|
|
56
|
+
- [charts] Make ordinal scales O(1) to copy and re-range (#22691) @JCQuintas
|
|
57
|
+
- [charts] Stabilize WebGL bar rendering at sub-pixel widths (#22678) @JCQuintas
|
|
58
|
+
- [charts] Use the series config to define value types (#22693) @sai6855
|
|
59
|
+
- [charts] Decouple interaction hook from the cartesian zoom (#22708) @alexfauquette
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts-pro@9.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-charts@9.5.0`, plus:
|
|
64
|
+
|
|
65
|
+
- [charts-pro] Add missing focus highlight (#22689) @alexfauquette
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-charts-premium@9.5.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-charts-pro@9.5.0`, plus:
|
|
70
|
+
|
|
71
|
+
- [charts-premium] Set `Heatmap` WebGL render as stable (#22665) @alexfauquette
|
|
72
|
+
- [charts-premium] Stabilize candlestick charts (#22666) @alexfauquette
|
|
73
|
+
- [charts-premium] Stabilize the radial charts (#22655) @alexfauquette
|
|
74
|
+
|
|
75
|
+
### Scheduler
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-scheduler@9.0.0-beta.1`
|
|
78
|
+
|
|
79
|
+
Internal changes.
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.1`, plus:
|
|
84
|
+
|
|
85
|
+
- [scheduler] Remove dead CSS variable writes in `EventTimelinePremiumContent` (#22720) @rita-codes
|
|
86
|
+
- [scheduler] Show scope dialog when deleting a recurring event (#22552) @Anexus5919
|
|
87
|
+
|
|
88
|
+
### Core
|
|
89
|
+
|
|
90
|
+
- [docs-infra] Fix immutable cache headers for `/\_next/static` assets (#22747) @brijeshb42
|
|
91
|
+
- [docs-infra] Prefix `/\_next/static` cache header rule with `/x` basePath (#22748) @brijeshb42
|
|
92
|
+
- [code-infra] Update dependencies to resolve Dependabot security alerts (#22714) @Janpot
|
|
93
|
+
|
|
94
|
+
### Docs
|
|
95
|
+
|
|
96
|
+
- [docs] Fix broken links checker crashing on 404 known-targets fetch (#22707) @sai6855
|
|
97
|
+
- [docs] Fix country data (#22716) @alexfauquette
|
|
98
|
+
|
|
99
|
+
### Miscellaneous
|
|
100
|
+
|
|
101
|
+
- [legal] Update EULA links in docs (#22717) @rluzists1
|
|
102
|
+
|
|
3
103
|
## 9.4.0
|
|
4
104
|
|
|
5
105
|
<!-- generated comparing v9.3.0..master -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GridColType } from "../models/colDef/gridColType.mjs";
|
|
2
|
+
import type { GridColTypeDef } from "../models/colDef/gridColDef.mjs";
|
|
3
|
+
import type { GridColumnTypesRecord } from "../models/colDef/gridColumnTypesRecord.mjs";
|
|
4
|
+
export declare const DEFAULT_GRID_COL_TYPE_KEY = "string";
|
|
5
|
+
export declare const isCommunityColumnType: (type: GridColType | undefined) => boolean;
|
|
6
|
+
export declare const registerGridColumnTypes: (columnTypes: Partial<GridColumnTypesRecord>) => void;
|
|
7
|
+
export declare const getGridColumnTypesRegistry: () => Record<string, GridColTypeDef>;
|
|
8
|
+
export declare const getRegisteredColumnTypeDef: (type: GridColType | undefined) => GridColTypeDef;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GridColType } from "../models/colDef/gridColType.js";
|
|
2
|
+
import type { GridColTypeDef } from "../models/colDef/gridColDef.js";
|
|
3
|
+
import type { GridColumnTypesRecord } from "../models/colDef/gridColumnTypesRecord.js";
|
|
4
|
+
export declare const DEFAULT_GRID_COL_TYPE_KEY = "string";
|
|
5
|
+
export declare const isCommunityColumnType: (type: GridColType | undefined) => boolean;
|
|
6
|
+
export declare const registerGridColumnTypes: (columnTypes: Partial<GridColumnTypesRecord>) => void;
|
|
7
|
+
export declare const getGridColumnTypesRegistry: () => Record<string, GridColTypeDef>;
|
|
8
|
+
export declare const getRegisteredColumnTypeDef: (type: GridColType | undefined) => GridColTypeDef;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.registerGridColumnTypes = exports.isCommunityColumnType = exports.getRegisteredColumnTypeDef = exports.getGridColumnTypesRegistry = exports.DEFAULT_GRID_COL_TYPE_KEY = void 0;
|
|
7
|
+
var _gridStringColDef = require("./gridStringColDef");
|
|
8
|
+
var _gridNumericColDef = require("./gridNumericColDef");
|
|
9
|
+
var _gridDateColDef = require("./gridDateColDef");
|
|
10
|
+
var _gridBooleanColDef = require("./gridBooleanColDef");
|
|
11
|
+
var _gridSingleSelectColDef = require("./gridSingleSelectColDef");
|
|
12
|
+
var _gridActionsColDef = require("./gridActionsColDef");
|
|
13
|
+
var _gridLongTextColDef = require("./gridLongTextColDef");
|
|
14
|
+
const DEFAULT_GRID_COL_TYPE_KEY = exports.DEFAULT_GRID_COL_TYPE_KEY = 'string';
|
|
15
|
+
|
|
16
|
+
// Mutable registry seeded with the community column types. Pro/Premium packages append
|
|
17
|
+
// their own types at module load via `registerGridColumnTypes`, so a community-only bundle
|
|
18
|
+
// never references them at runtime.
|
|
19
|
+
const columnTypesRegistry = {
|
|
20
|
+
string: _gridStringColDef.GRID_STRING_COL_DEF,
|
|
21
|
+
number: _gridNumericColDef.GRID_NUMERIC_COL_DEF,
|
|
22
|
+
date: _gridDateColDef.GRID_DATE_COL_DEF,
|
|
23
|
+
dateTime: _gridDateColDef.GRID_DATETIME_COL_DEF,
|
|
24
|
+
boolean: _gridBooleanColDef.GRID_BOOLEAN_COL_DEF,
|
|
25
|
+
singleSelect: _gridSingleSelectColDef.GRID_SINGLE_SELECT_COL_DEF,
|
|
26
|
+
[_gridActionsColDef.GRID_ACTIONS_COLUMN_TYPE]: _gridActionsColDef.GRID_ACTIONS_COL_DEF,
|
|
27
|
+
custom: _gridStringColDef.GRID_STRING_COL_DEF,
|
|
28
|
+
longText: _gridLongTextColDef.GRID_LONG_TEXT_COL_DEF
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Captured before any `registerGridColumnTypes` call, so it reflects the community-native types
|
|
32
|
+
// only. Used to keep Pro/Premium-registered types (e.g. `multiSelect`) from resolving in a
|
|
33
|
+
// community `DataGrid` even when a Pro grid registered them globally in the same bundle.
|
|
34
|
+
const COMMUNITY_COLUMN_TYPE_KEYS = new Set(Object.keys(columnTypesRegistry));
|
|
35
|
+
const isCommunityColumnType = type => type == null || COMMUNITY_COLUMN_TYPE_KEYS.has(type);
|
|
36
|
+
exports.isCommunityColumnType = isCommunityColumnType;
|
|
37
|
+
const registerGridColumnTypes = columnTypes => {
|
|
38
|
+
Object.assign(columnTypesRegistry, columnTypes);
|
|
39
|
+
};
|
|
40
|
+
exports.registerGridColumnTypes = registerGridColumnTypes;
|
|
41
|
+
const getGridColumnTypesRegistry = () => columnTypesRegistry;
|
|
42
|
+
exports.getGridColumnTypesRegistry = getGridColumnTypesRegistry;
|
|
43
|
+
const getRegisteredColumnTypeDef = type => (type ? columnTypesRegistry[type] : undefined) ?? columnTypesRegistry[DEFAULT_GRID_COL_TYPE_KEY];
|
|
44
|
+
exports.getRegisteredColumnTypeDef = getRegisteredColumnTypeDef;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GRID_STRING_COL_DEF } from "./gridStringColDef.mjs";
|
|
2
|
+
import { GRID_NUMERIC_COL_DEF } from "./gridNumericColDef.mjs";
|
|
3
|
+
import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from "./gridDateColDef.mjs";
|
|
4
|
+
import { GRID_BOOLEAN_COL_DEF } from "./gridBooleanColDef.mjs";
|
|
5
|
+
import { GRID_SINGLE_SELECT_COL_DEF } from "./gridSingleSelectColDef.mjs";
|
|
6
|
+
import { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from "./gridActionsColDef.mjs";
|
|
7
|
+
import { GRID_LONG_TEXT_COL_DEF } from "./gridLongTextColDef.mjs";
|
|
8
|
+
export const DEFAULT_GRID_COL_TYPE_KEY = 'string';
|
|
9
|
+
|
|
10
|
+
// Mutable registry seeded with the community column types. Pro/Premium packages append
|
|
11
|
+
// their own types at module load via `registerGridColumnTypes`, so a community-only bundle
|
|
12
|
+
// never references them at runtime.
|
|
13
|
+
const columnTypesRegistry = {
|
|
14
|
+
string: GRID_STRING_COL_DEF,
|
|
15
|
+
number: GRID_NUMERIC_COL_DEF,
|
|
16
|
+
date: GRID_DATE_COL_DEF,
|
|
17
|
+
dateTime: GRID_DATETIME_COL_DEF,
|
|
18
|
+
boolean: GRID_BOOLEAN_COL_DEF,
|
|
19
|
+
singleSelect: GRID_SINGLE_SELECT_COL_DEF,
|
|
20
|
+
[GRID_ACTIONS_COLUMN_TYPE]: GRID_ACTIONS_COL_DEF,
|
|
21
|
+
custom: GRID_STRING_COL_DEF,
|
|
22
|
+
longText: GRID_LONG_TEXT_COL_DEF
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// Captured before any `registerGridColumnTypes` call, so it reflects the community-native types
|
|
26
|
+
// only. Used to keep Pro/Premium-registered types (e.g. `multiSelect`) from resolving in a
|
|
27
|
+
// community `DataGrid` even when a Pro grid registered them globally in the same bundle.
|
|
28
|
+
const COMMUNITY_COLUMN_TYPE_KEYS = new Set(Object.keys(columnTypesRegistry));
|
|
29
|
+
export const isCommunityColumnType = type => type == null || COMMUNITY_COLUMN_TYPE_KEYS.has(type);
|
|
30
|
+
export const registerGridColumnTypes = columnTypes => {
|
|
31
|
+
Object.assign(columnTypesRegistry, columnTypes);
|
|
32
|
+
};
|
|
33
|
+
export const getGridColumnTypesRegistry = () => columnTypesRegistry;
|
|
34
|
+
export const getRegisteredColumnTypeDef = type => (type ? columnTypesRegistry[type] : undefined) ?? columnTypesRegistry[DEFAULT_GRID_COL_TYPE_KEY];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { GridColumnTypesRecord } from "../models/colDef/gridColumnTypesRecord.mjs";
|
|
2
|
-
export
|
|
2
|
+
export { DEFAULT_GRID_COL_TYPE_KEY } from "./gridColumnTypesRegistry.mjs";
|
|
3
3
|
export declare const getGridDefaultColumnTypes: () => GridColumnTypesRecord;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { GridColumnTypesRecord } from "../models/colDef/gridColumnTypesRecord.js";
|
|
2
|
-
export
|
|
2
|
+
export { DEFAULT_GRID_COL_TYPE_KEY } from "./gridColumnTypesRegistry.js";
|
|
3
3
|
export declare const getGridDefaultColumnTypes: () => GridColumnTypesRecord;
|
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
const getGridDefaultColumnTypes = () => {
|
|
16
|
-
const nativeColumnTypes = {
|
|
17
|
-
string: _gridStringColDef.GRID_STRING_COL_DEF,
|
|
18
|
-
number: _gridNumericColDef.GRID_NUMERIC_COL_DEF,
|
|
19
|
-
date: _gridDateColDef.GRID_DATE_COL_DEF,
|
|
20
|
-
dateTime: _gridDateColDef.GRID_DATETIME_COL_DEF,
|
|
21
|
-
boolean: _gridBooleanColDef.GRID_BOOLEAN_COL_DEF,
|
|
22
|
-
singleSelect: _gridSingleSelectColDef.GRID_SINGLE_SELECT_COL_DEF,
|
|
23
|
-
[_gridActionsColDef.GRID_ACTIONS_COLUMN_TYPE]: _gridActionsColDef.GRID_ACTIONS_COL_DEF,
|
|
24
|
-
custom: _gridStringColDef.GRID_STRING_COL_DEF,
|
|
25
|
-
longText: _gridLongTextColDef.GRID_LONG_TEXT_COL_DEF
|
|
26
|
-
};
|
|
27
|
-
return nativeColumnTypes;
|
|
28
|
-
};
|
|
7
|
+
Object.defineProperty(exports, "DEFAULT_GRID_COL_TYPE_KEY", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _gridColumnTypesRegistry.DEFAULT_GRID_COL_TYPE_KEY;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
exports.getGridDefaultColumnTypes = void 0;
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
var _gridColumnTypesRegistry = require("./gridColumnTypesRegistry");
|
|
16
|
+
const getGridDefaultColumnTypes = () => (0, _extends2.default)({}, (0, _gridColumnTypesRegistry.getGridColumnTypesRegistry)());
|
|
29
17
|
exports.getGridDefaultColumnTypes = getGridDefaultColumnTypes;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { GRID_SINGLE_SELECT_COL_DEF } from "./gridSingleSelectColDef.mjs";
|
|
6
|
-
import { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from "./gridActionsColDef.mjs";
|
|
7
|
-
import { GRID_LONG_TEXT_COL_DEF } from "./gridLongTextColDef.mjs";
|
|
8
|
-
export const DEFAULT_GRID_COL_TYPE_KEY = 'string';
|
|
9
|
-
export const getGridDefaultColumnTypes = () => {
|
|
10
|
-
const nativeColumnTypes = {
|
|
11
|
-
string: GRID_STRING_COL_DEF,
|
|
12
|
-
number: GRID_NUMERIC_COL_DEF,
|
|
13
|
-
date: GRID_DATE_COL_DEF,
|
|
14
|
-
dateTime: GRID_DATETIME_COL_DEF,
|
|
15
|
-
boolean: GRID_BOOLEAN_COL_DEF,
|
|
16
|
-
singleSelect: GRID_SINGLE_SELECT_COL_DEF,
|
|
17
|
-
[GRID_ACTIONS_COLUMN_TYPE]: GRID_ACTIONS_COL_DEF,
|
|
18
|
-
custom: GRID_STRING_COL_DEF,
|
|
19
|
-
longText: GRID_LONG_TEXT_COL_DEF
|
|
20
|
-
};
|
|
21
|
-
return nativeColumnTypes;
|
|
22
|
-
};
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { getGridColumnTypesRegistry } from "./gridColumnTypesRegistry.mjs";
|
|
3
|
+
export { DEFAULT_GRID_COL_TYPE_KEY } from "./gridColumnTypesRegistry.mjs";
|
|
4
|
+
export const getGridDefaultColumnTypes = () => _extends({}, getGridColumnTypesRegistry());
|
|
@@ -60,7 +60,7 @@ function GridActionsCell(props) {
|
|
|
60
60
|
});
|
|
61
61
|
} else if (child.type === _GridActionsCellItem.GridActionsCellItem || suppressChildrenValidation) {
|
|
62
62
|
actions.push(child);
|
|
63
|
-
} else {
|
|
63
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
64
64
|
const childType = typeof child.type === 'function' ? child.type.name : child.type;
|
|
65
65
|
(0, _warning.warnOnce)(`MUI X: Invalid child type in \`GridActionsCell\`. Expected \`GridActionsCellItem\` or \`React.Fragment\`, got \`${childType}\`.
|
|
66
66
|
If this is intentional, you can suppress this warning by passing the \`suppressChildrenValidation\` prop to \`GridActionsCell\`.`, 'error');
|
|
@@ -52,7 +52,7 @@ function GridActionsCell(props) {
|
|
|
52
52
|
});
|
|
53
53
|
} else if (child.type === GridActionsCellItem || suppressChildrenValidation) {
|
|
54
54
|
actions.push(child);
|
|
55
|
-
} else {
|
|
55
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
56
56
|
const childType = typeof child.type === 'function' ? child.type.name : child.type;
|
|
57
57
|
warnOnce(`MUI X: Invalid child type in \`GridActionsCell\`. Expected \`GridActionsCellItem\` or \`React.Fragment\`, got \`${childType}\`.
|
|
58
58
|
If this is intentional, you can suppress this warning by passing the \`suppressChildrenValidation\` prop to \`GridActionsCell\`.`, 'error');
|
|
@@ -185,6 +185,7 @@ function GridLongTextCell(props) {
|
|
|
185
185
|
children: value
|
|
186
186
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(GridLongTextCellCornerButton, (0, _extends2.default)({
|
|
187
187
|
ref: cornerButtonRef,
|
|
188
|
+
type: "button",
|
|
188
189
|
"aria-label": `${value}, ${apiRef.current.getLocaleText('longTextCellExpandLabel')}`,
|
|
189
190
|
"aria-haspopup": "dialog",
|
|
190
191
|
"aria-controls": popupOpen ? popupId : undefined,
|
|
@@ -236,6 +237,7 @@ function GridLongTextCell(props) {
|
|
|
236
237
|
'--_width': `${colDef.computedWidth}px`
|
|
237
238
|
}, slotProps?.popperContent?.style),
|
|
238
239
|
children: [renderContent ? renderContent(value) : value, /*#__PURE__*/(0, _jsxRuntime.jsx)(GridLongTextCellCornerButton, (0, _extends2.default)({
|
|
240
|
+
type: "button",
|
|
239
241
|
"aria-label": apiRef.current.getLocaleText('longTextCellCollapseLabel'),
|
|
240
242
|
"aria-keyshortcuts": "Escape"
|
|
241
243
|
}, slotProps?.collapseButton, {
|
|
@@ -177,6 +177,7 @@ function GridLongTextCell(props) {
|
|
|
177
177
|
children: value
|
|
178
178
|
})), /*#__PURE__*/_jsx(GridLongTextCellCornerButton, _extends({
|
|
179
179
|
ref: cornerButtonRef,
|
|
180
|
+
type: "button",
|
|
180
181
|
"aria-label": `${value}, ${apiRef.current.getLocaleText('longTextCellExpandLabel')}`,
|
|
181
182
|
"aria-haspopup": "dialog",
|
|
182
183
|
"aria-controls": popupOpen ? popupId : undefined,
|
|
@@ -228,6 +229,7 @@ function GridLongTextCell(props) {
|
|
|
228
229
|
'--_width': `${colDef.computedWidth}px`
|
|
229
230
|
}, slotProps?.popperContent?.style),
|
|
230
231
|
children: [renderContent ? renderContent(value) : value, /*#__PURE__*/_jsx(GridLongTextCellCornerButton, _extends({
|
|
232
|
+
type: "button",
|
|
231
233
|
"aria-label": apiRef.current.getLocaleText('longTextCellCollapseLabel'),
|
|
232
234
|
"aria-keyshortcuts": "Escape"
|
|
233
235
|
}, slotProps?.collapseButton, {
|
|
@@ -175,6 +175,16 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
175
175
|
[`& .${_gridClasses.gridClasses['columnHeader--filter']}`]: {
|
|
176
176
|
flex: 'none !important',
|
|
177
177
|
width: 'unset !important'
|
|
178
|
+
},
|
|
179
|
+
[`& .${_gridClasses.gridClasses.multiSelectCell}`]: {
|
|
180
|
+
width: 'max-content',
|
|
181
|
+
overflow: 'visible'
|
|
182
|
+
},
|
|
183
|
+
[`& .${_gridClasses.gridClasses['multiSelectCellChip--hidden']}`]: {
|
|
184
|
+
display: 'inline-flex'
|
|
185
|
+
},
|
|
186
|
+
[`& .${_gridClasses.gridClasses.multiSelectCellOverflow}`]: {
|
|
187
|
+
display: 'none'
|
|
178
188
|
}
|
|
179
189
|
},
|
|
180
190
|
[`&.${_gridClasses.gridClasses.withSidePanel}`]: {
|
|
@@ -523,6 +533,25 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
523
533
|
whiteSpace: 'initial',
|
|
524
534
|
lineHeight: 'inherit'
|
|
525
535
|
},
|
|
536
|
+
[`& .${_gridClasses.gridClasses['row--dynamicHeight']}`]: {
|
|
537
|
+
[`& .${_gridClasses.gridClasses.multiSelectCell}, .${_gridClasses.gridClasses.editMultiSelectCell}`]: {
|
|
538
|
+
flexWrap: 'wrap'
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
[`& .${_gridClasses.gridClasses.cell}[aria-rowspan]:not([aria-rowspan="1"])`]: {
|
|
542
|
+
[`& .${_gridClasses.gridClasses.multiSelectCell}`]: {
|
|
543
|
+
alignItems: 'flex-start',
|
|
544
|
+
alignContent: 'flex-start',
|
|
545
|
+
flexWrap: 'wrap',
|
|
546
|
+
paddingTop: 8
|
|
547
|
+
},
|
|
548
|
+
[`& .${_gridClasses.gridClasses['multiSelectCellChip--hidden']}`]: {
|
|
549
|
+
display: 'inline-flex'
|
|
550
|
+
},
|
|
551
|
+
[`& .${_gridClasses.gridClasses.multiSelectCellOverflow}`]: {
|
|
552
|
+
display: 'none'
|
|
553
|
+
}
|
|
554
|
+
},
|
|
526
555
|
[`& .${_gridClasses.gridClasses.cellEmpty}`]: {
|
|
527
556
|
flex: 1,
|
|
528
557
|
padding: 0,
|
|
@@ -169,6 +169,16 @@ export const GridRootStyles = styled('div', {
|
|
|
169
169
|
[`& .${c['columnHeader--filter']}`]: {
|
|
170
170
|
flex: 'none !important',
|
|
171
171
|
width: 'unset !important'
|
|
172
|
+
},
|
|
173
|
+
[`& .${c.multiSelectCell}`]: {
|
|
174
|
+
width: 'max-content',
|
|
175
|
+
overflow: 'visible'
|
|
176
|
+
},
|
|
177
|
+
[`& .${c['multiSelectCellChip--hidden']}`]: {
|
|
178
|
+
display: 'inline-flex'
|
|
179
|
+
},
|
|
180
|
+
[`& .${c.multiSelectCellOverflow}`]: {
|
|
181
|
+
display: 'none'
|
|
172
182
|
}
|
|
173
183
|
},
|
|
174
184
|
[`&.${c.withSidePanel}`]: {
|
|
@@ -517,6 +527,25 @@ export const GridRootStyles = styled('div', {
|
|
|
517
527
|
whiteSpace: 'initial',
|
|
518
528
|
lineHeight: 'inherit'
|
|
519
529
|
},
|
|
530
|
+
[`& .${c['row--dynamicHeight']}`]: {
|
|
531
|
+
[`& .${c.multiSelectCell}, .${c.editMultiSelectCell}`]: {
|
|
532
|
+
flexWrap: 'wrap'
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
[`& .${c.cell}[aria-rowspan]:not([aria-rowspan="1"])`]: {
|
|
536
|
+
[`& .${c.multiSelectCell}`]: {
|
|
537
|
+
alignItems: 'flex-start',
|
|
538
|
+
alignContent: 'flex-start',
|
|
539
|
+
flexWrap: 'wrap',
|
|
540
|
+
paddingTop: 8
|
|
541
|
+
},
|
|
542
|
+
[`& .${c['multiSelectCellChip--hidden']}`]: {
|
|
543
|
+
display: 'inline-flex'
|
|
544
|
+
},
|
|
545
|
+
[`& .${c.multiSelectCellOverflow}`]: {
|
|
546
|
+
display: 'none'
|
|
547
|
+
}
|
|
548
|
+
},
|
|
520
549
|
[`& .${c.cellEmpty}`]: {
|
|
521
550
|
flex: 1,
|
|
522
551
|
padding: 0,
|
|
@@ -64,10 +64,8 @@ function GridFilterInputSingleSelect(props) {
|
|
|
64
64
|
return (0, _filterPanelUtils.getValueOptions)(resolvedColumn);
|
|
65
65
|
}, [resolvedColumn]);
|
|
66
66
|
const onFilterChange = React.useCallback(event => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// NativeSelect casts the value to a string.
|
|
70
|
-
value = (0, _filterPanelUtils.getValueFromValueOptions)(value, currentValueOptions, getOptionValue);
|
|
67
|
+
// NativeSelect casts the value to a string, convert it back to the original type.
|
|
68
|
+
const value = (0, _filterPanelUtils.getValueFromValueOptions)(event.target.value, currentValueOptions, getOptionValue);
|
|
71
69
|
applyValue((0, _extends2.default)({}, item, {
|
|
72
70
|
value
|
|
73
71
|
}));
|
|
@@ -56,10 +56,8 @@ function GridFilterInputSingleSelect(props) {
|
|
|
56
56
|
return getValueOptions(resolvedColumn);
|
|
57
57
|
}, [resolvedColumn]);
|
|
58
58
|
const onFilterChange = React.useCallback(event => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// NativeSelect casts the value to a string.
|
|
62
|
-
value = getValueFromValueOptions(value, currentValueOptions, getOptionValue);
|
|
59
|
+
// NativeSelect casts the value to a string, convert it back to the original type.
|
|
60
|
+
const value = getValueFromValueOptions(event.target.value, currentValueOptions, getOptionValue);
|
|
63
61
|
applyValue(_extends({}, item, {
|
|
64
62
|
value
|
|
65
63
|
}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { GridColDef, GridSingleSelectColDef } from "../../../models/colDef/gridColDef.mjs";
|
|
1
|
+
import type { GridColDef, GridSingleSelectColDef, GridMultiSelectColDef } from "../../../models/colDef/gridColDef.mjs";
|
|
2
2
|
import type { GridValueOptionsParams } from "../../../models/params/gridValueOptionsParams.mjs";
|
|
3
3
|
export declare function isSingleSelectColDef(colDef: GridColDef | null): colDef is GridSingleSelectColDef;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function isMultiSelectColDef(colDef: GridColDef | null): colDef is GridMultiSelectColDef;
|
|
5
|
+
export declare function getValueOptions(column: GridSingleSelectColDef | GridMultiSelectColDef, additionalParams?: Omit<GridValueOptionsParams, 'field'>): import("@mui/x-data-grid").ValueOptions[] | undefined;
|
|
5
6
|
export declare function getValueFromValueOptions(value: string, valueOptions: any[] | undefined, getOptionValue: NonNullable<GridSingleSelectColDef['getOptionValue']>): any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { GridColDef, GridSingleSelectColDef } from "../../../models/colDef/gridColDef.js";
|
|
1
|
+
import type { GridColDef, GridSingleSelectColDef, GridMultiSelectColDef } from "../../../models/colDef/gridColDef.js";
|
|
2
2
|
import type { GridValueOptionsParams } from "../../../models/params/gridValueOptionsParams.js";
|
|
3
3
|
export declare function isSingleSelectColDef(colDef: GridColDef | null): colDef is GridSingleSelectColDef;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function isMultiSelectColDef(colDef: GridColDef | null): colDef is GridMultiSelectColDef;
|
|
5
|
+
export declare function getValueOptions(column: GridSingleSelectColDef | GridMultiSelectColDef, additionalParams?: Omit<GridValueOptionsParams, 'field'>): import("@mui/x-data-grid").ValueOptions[] | undefined;
|
|
5
6
|
export declare function getValueFromValueOptions(value: string, valueOptions: any[] | undefined, getOptionValue: NonNullable<GridSingleSelectColDef['getOptionValue']>): any;
|
|
@@ -6,11 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getValueFromValueOptions = getValueFromValueOptions;
|
|
8
8
|
exports.getValueOptions = getValueOptions;
|
|
9
|
+
exports.isMultiSelectColDef = isMultiSelectColDef;
|
|
9
10
|
exports.isSingleSelectColDef = isSingleSelectColDef;
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
function isSingleSelectColDef(colDef) {
|
|
12
13
|
return colDef?.type === 'singleSelect';
|
|
13
14
|
}
|
|
15
|
+
function isMultiSelectColDef(colDef) {
|
|
16
|
+
return colDef?.type === 'multiSelect';
|
|
17
|
+
}
|
|
14
18
|
function getValueOptions(column, additionalParams) {
|
|
15
19
|
if (!column) {
|
|
16
20
|
return undefined;
|
|
@@ -2,6 +2,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
export function isSingleSelectColDef(colDef) {
|
|
3
3
|
return colDef?.type === 'singleSelect';
|
|
4
4
|
}
|
|
5
|
+
export function isMultiSelectColDef(colDef) {
|
|
6
|
+
return colDef?.type === 'multiSelect';
|
|
7
|
+
}
|
|
5
8
|
export function getValueOptions(column, additionalParams) {
|
|
6
9
|
if (!column) {
|
|
7
10
|
return undefined;
|
|
@@ -75,6 +75,7 @@ declare const keys: {
|
|
|
75
75
|
readonly zIndex: {
|
|
76
76
|
readonly panel: "--DataGrid-t-z-index-panel";
|
|
77
77
|
readonly menu: "--DataGrid-t-z-index-menu";
|
|
78
|
+
readonly modal: "--DataGrid-t-z-index-modal";
|
|
78
79
|
};
|
|
79
80
|
};
|
|
80
81
|
export type GridCSSVariablesInterface = { [E in CreateObjectEntries<typeof keys> as E['value']]: string | number };
|
|
@@ -168,6 +169,7 @@ export declare const vars: {
|
|
|
168
169
|
zIndex: {
|
|
169
170
|
readonly panel: "--DataGrid-t-z-index-panel";
|
|
170
171
|
readonly menu: "--DataGrid-t-z-index-menu";
|
|
172
|
+
readonly modal: "--DataGrid-t-z-index-modal";
|
|
171
173
|
};
|
|
172
174
|
breakpoints: {
|
|
173
175
|
values: {
|
|
@@ -258,6 +260,7 @@ export declare const vars: {
|
|
|
258
260
|
readonly zIndex: {
|
|
259
261
|
readonly panel: "--DataGrid-t-z-index-panel";
|
|
260
262
|
readonly menu: "--DataGrid-t-z-index-menu";
|
|
263
|
+
readonly modal: "--DataGrid-t-z-index-modal";
|
|
261
264
|
};
|
|
262
265
|
};
|
|
263
266
|
};
|
|
@@ -75,6 +75,7 @@ declare const keys: {
|
|
|
75
75
|
readonly zIndex: {
|
|
76
76
|
readonly panel: "--DataGrid-t-z-index-panel";
|
|
77
77
|
readonly menu: "--DataGrid-t-z-index-menu";
|
|
78
|
+
readonly modal: "--DataGrid-t-z-index-modal";
|
|
78
79
|
};
|
|
79
80
|
};
|
|
80
81
|
export type GridCSSVariablesInterface = { [E in CreateObjectEntries<typeof keys> as E['value']]: string | number };
|
|
@@ -168,6 +169,7 @@ export declare const vars: {
|
|
|
168
169
|
zIndex: {
|
|
169
170
|
readonly panel: "--DataGrid-t-z-index-panel";
|
|
170
171
|
readonly menu: "--DataGrid-t-z-index-menu";
|
|
172
|
+
readonly modal: "--DataGrid-t-z-index-modal";
|
|
171
173
|
};
|
|
172
174
|
breakpoints: {
|
|
173
175
|
values: {
|
|
@@ -258,6 +260,7 @@ export declare const vars: {
|
|
|
258
260
|
readonly zIndex: {
|
|
259
261
|
readonly panel: "--DataGrid-t-z-index-panel";
|
|
260
262
|
readonly menu: "--DataGrid-t-z-index-menu";
|
|
263
|
+
readonly modal: "--DataGrid-t-z-index-modal";
|
|
261
264
|
};
|
|
262
265
|
};
|
|
263
266
|
};
|
|
@@ -514,6 +514,54 @@ export interface GridClasses {
|
|
|
514
514
|
* Styles applied to the edit long text cell textarea.
|
|
515
515
|
*/
|
|
516
516
|
editLongTextCellTextarea: string;
|
|
517
|
+
/**
|
|
518
|
+
* Styles applied to the multi-select cell root element.
|
|
519
|
+
*/
|
|
520
|
+
multiSelectCell: string;
|
|
521
|
+
/**
|
|
522
|
+
* Styles applied to each chip in the multi-select cell.
|
|
523
|
+
*/
|
|
524
|
+
multiSelectCellChip: string;
|
|
525
|
+
/**
|
|
526
|
+
* @ignore - do not document.
|
|
527
|
+
*/
|
|
528
|
+
'multiSelectCellChip--hidden': string;
|
|
529
|
+
/**
|
|
530
|
+
* Styles applied to the overflow "+N" chip in the multi-select cell.
|
|
531
|
+
*/
|
|
532
|
+
multiSelectCellOverflow: string;
|
|
533
|
+
/**
|
|
534
|
+
* Styles applied to the multi-select cell expand popup.
|
|
535
|
+
*/
|
|
536
|
+
multiSelectCellPopup: string;
|
|
537
|
+
/**
|
|
538
|
+
* Styles applied to the multi-select cell popper content.
|
|
539
|
+
*/
|
|
540
|
+
multiSelectCellPopperContent: string;
|
|
541
|
+
/**
|
|
542
|
+
* Styles applied to the edit multi-select cell root element.
|
|
543
|
+
*/
|
|
544
|
+
editMultiSelectCell: string;
|
|
545
|
+
/**
|
|
546
|
+
* Styles applied to each chip in the edit multi-select cell.
|
|
547
|
+
*/
|
|
548
|
+
editMultiSelectCellChip: string;
|
|
549
|
+
/**
|
|
550
|
+
* @ignore - do not document.
|
|
551
|
+
*/
|
|
552
|
+
'editMultiSelectCellChip--hidden': string;
|
|
553
|
+
/**
|
|
554
|
+
* Styles applied to the overflow "+N" chip in the edit multi-select cell.
|
|
555
|
+
*/
|
|
556
|
+
editMultiSelectCellOverflow: string;
|
|
557
|
+
/**
|
|
558
|
+
* Styles applied to the edit multi-select cell popup.
|
|
559
|
+
*/
|
|
560
|
+
editMultiSelectCellPopup: string;
|
|
561
|
+
/**
|
|
562
|
+
* Styles applied to the edit multi-select cell popper content.
|
|
563
|
+
*/
|
|
564
|
+
editMultiSelectCellPopperContent: string;
|
|
517
565
|
/**
|
|
518
566
|
* Styles applied to the filter icon element.
|
|
519
567
|
*/
|