@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
|
@@ -54,10 +54,45 @@ export type AutocompleteProps<Value = string, Multiple extends boolean = false,
|
|
|
54
54
|
* @param {string} value The new value of the input.
|
|
55
55
|
*/
|
|
56
56
|
onInputChange?: (event: React.SyntheticEvent, value: string) => void;
|
|
57
|
+
/** Control the popup open state. */
|
|
58
|
+
open?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Callback fired when the popup requests to be opened.
|
|
61
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
62
|
+
*/
|
|
63
|
+
onOpen?: (event: React.SyntheticEvent) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Callback fired when the popup requests to be closed.
|
|
66
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
67
|
+
* @param {string} reason The reason for closing.
|
|
68
|
+
*/
|
|
69
|
+
onClose?: (event: React.SyntheticEvent, reason: string) => void;
|
|
70
|
+
/** If true, the popup won't close when a value is selected. */
|
|
71
|
+
disableCloseOnSelect?: boolean;
|
|
72
|
+
/** If true, the popup opens when the input is focused. */
|
|
73
|
+
openOnFocus?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Render the option, use `getOptionLabel` by default.
|
|
76
|
+
* @param {React.HTMLAttributes<HTMLLIElement> & { key: any }} props The props to apply on the li element.
|
|
77
|
+
* @param {Value} option The option to render.
|
|
78
|
+
* @param {object} state The state of each option.
|
|
79
|
+
* @param {string} state.inputValue The input value.
|
|
80
|
+
* @param {number} state.index The index of the option in the list.
|
|
81
|
+
* @param {boolean} state.selected Whether the option is selected.
|
|
82
|
+
* @returns {React.ReactNode} react node to render
|
|
83
|
+
*/
|
|
84
|
+
renderOption?: (props: React.HTMLAttributes<HTMLLIElement> & {
|
|
85
|
+
key: any;
|
|
86
|
+
}, option: Value, state: {
|
|
87
|
+
inputValue: string;
|
|
88
|
+
index: number;
|
|
89
|
+
selected: boolean;
|
|
90
|
+
}) => React.ReactNode;
|
|
57
91
|
label?: React.ReactNode;
|
|
58
92
|
placeholder?: string;
|
|
59
93
|
slotProps?: {
|
|
60
94
|
textField: TextFieldProps;
|
|
95
|
+
chip?: ChipProps | ((value: Value, index: number) => ChipProps);
|
|
61
96
|
};
|
|
62
97
|
};
|
|
63
98
|
export type BadgeProps = CommonProps & {
|
|
@@ -182,6 +217,15 @@ export type PopperProps = CommonProps & {
|
|
|
182
217
|
/** @default 'bottom' */
|
|
183
218
|
placement?: Placement;
|
|
184
219
|
};
|
|
220
|
+
export type ModalProps = CommonProps & {
|
|
221
|
+
open: boolean;
|
|
222
|
+
children: React.ReactElement<unknown>;
|
|
223
|
+
onClose?: (event: object, reason: 'backdropClick' | 'escapeKeyDown') => void;
|
|
224
|
+
keepMounted?: boolean;
|
|
225
|
+
disableAutoFocus?: boolean;
|
|
226
|
+
disableEnforceFocus?: boolean;
|
|
227
|
+
disableRestoreFocus?: boolean;
|
|
228
|
+
};
|
|
185
229
|
export type CircularProgressProps = CommonProps & {
|
|
186
230
|
/**
|
|
187
231
|
* Pixels or CSS value.
|
|
@@ -225,9 +269,11 @@ export type SelectProps = CommonProps & {
|
|
|
225
269
|
open?: boolean;
|
|
226
270
|
error?: boolean;
|
|
227
271
|
disabled?: boolean;
|
|
272
|
+
multiple?: boolean;
|
|
228
273
|
onChange?: React.ChangeEventHandler;
|
|
229
274
|
onOpen?: (event: React.SyntheticEvent) => void;
|
|
230
275
|
onClose?: (event: React.KeyboardEvent, reason: 'backdropClick' | 'escapeKeyDown' | 'tabKeyDown') => void;
|
|
276
|
+
renderValue?: (value: any) => React.ReactNode;
|
|
231
277
|
label?: React.ReactNode;
|
|
232
278
|
labelId?: string;
|
|
233
279
|
native?: boolean;
|
|
@@ -48,6 +48,11 @@ export interface GridBaseSlots {
|
|
|
48
48
|
* @default MenuItem
|
|
49
49
|
*/
|
|
50
50
|
baseMenuItem: React.JSXElementConstructor<GridSlotProps['baseMenuItem']>;
|
|
51
|
+
/**
|
|
52
|
+
* The custom Modal component used in the grid.
|
|
53
|
+
* @default Modal
|
|
54
|
+
*/
|
|
55
|
+
baseModal: React.JSXElementConstructor<GridSlotProps['baseModal']>;
|
|
51
56
|
/**
|
|
52
57
|
* The custom TextField component used in the grid.
|
|
53
58
|
* @default TextField
|
|
@@ -48,6 +48,11 @@ export interface GridBaseSlots {
|
|
|
48
48
|
* @default MenuItem
|
|
49
49
|
*/
|
|
50
50
|
baseMenuItem: React.JSXElementConstructor<GridSlotProps['baseMenuItem']>;
|
|
51
|
+
/**
|
|
52
|
+
* The custom Modal component used in the grid.
|
|
53
|
+
* @default Modal
|
|
54
|
+
*/
|
|
55
|
+
baseModal: React.JSXElementConstructor<GridSlotProps['baseModal']>;
|
|
51
56
|
/**
|
|
52
57
|
* The custom TextField component used in the grid.
|
|
53
58
|
* @default TextField
|
|
@@ -19,7 +19,7 @@ import type { GridRowCountProps } from "../components/GridRowCount.mjs";
|
|
|
19
19
|
import type { GridColumnHeaderSortIconProps } from "../components/columnHeaders/GridColumnHeaderSortIcon.mjs";
|
|
20
20
|
import type { GridBottomContainerProps } from "../components/virtualization/GridBottomContainer.mjs";
|
|
21
21
|
import type { GridRowId } from "./gridRows.mjs";
|
|
22
|
-
import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.mjs";
|
|
22
|
+
import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, ModalProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.mjs";
|
|
23
23
|
type RootProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
|
|
24
24
|
type MainProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
|
|
25
25
|
export interface BaseAutocompletePropsOverrides {}
|
|
@@ -31,6 +31,7 @@ export interface BaseDividerPropsOverrides {}
|
|
|
31
31
|
export interface BaseLinearProgressPropsOverrides {}
|
|
32
32
|
export interface BaseMenuListPropsOverrides {}
|
|
33
33
|
export interface BaseMenuItemPropsOverrides {}
|
|
34
|
+
export interface BaseModalPropsOverrides {}
|
|
34
35
|
export interface BaseTabsPropsOverrides {}
|
|
35
36
|
export interface BaseTextFieldPropsOverrides {}
|
|
36
37
|
export interface BaseSelectPropsOverrides {}
|
|
@@ -79,6 +80,7 @@ interface BaseSlotProps {
|
|
|
79
80
|
baseLinearProgress: LinearProgressProps & BaseLinearProgressPropsOverrides;
|
|
80
81
|
baseMenuList: MenuListProps & BaseMenuListPropsOverrides;
|
|
81
82
|
baseMenuItem: MenuItemProps & BaseMenuItemPropsOverrides;
|
|
83
|
+
baseModal: ModalProps & BaseModalPropsOverrides;
|
|
82
84
|
baseTabs: TabsProps & BaseTabsPropsOverrides;
|
|
83
85
|
baseTextField: TextFieldProps & BaseTextFieldPropsOverrides;
|
|
84
86
|
baseSwitch: SwitchProps & BaseSwitchPropsOverrides;
|
|
@@ -19,7 +19,7 @@ import type { GridRowCountProps } from "../components/GridRowCount.js";
|
|
|
19
19
|
import type { GridColumnHeaderSortIconProps } from "../components/columnHeaders/GridColumnHeaderSortIcon.js";
|
|
20
20
|
import type { GridBottomContainerProps } from "../components/virtualization/GridBottomContainer.js";
|
|
21
21
|
import type { GridRowId } from "./gridRows.js";
|
|
22
|
-
import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.js";
|
|
22
|
+
import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, ModalProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.js";
|
|
23
23
|
type RootProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
|
|
24
24
|
type MainProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
|
|
25
25
|
export interface BaseAutocompletePropsOverrides {}
|
|
@@ -31,6 +31,7 @@ export interface BaseDividerPropsOverrides {}
|
|
|
31
31
|
export interface BaseLinearProgressPropsOverrides {}
|
|
32
32
|
export interface BaseMenuListPropsOverrides {}
|
|
33
33
|
export interface BaseMenuItemPropsOverrides {}
|
|
34
|
+
export interface BaseModalPropsOverrides {}
|
|
34
35
|
export interface BaseTabsPropsOverrides {}
|
|
35
36
|
export interface BaseTextFieldPropsOverrides {}
|
|
36
37
|
export interface BaseSelectPropsOverrides {}
|
|
@@ -79,6 +80,7 @@ interface BaseSlotProps {
|
|
|
79
80
|
baseLinearProgress: LinearProgressProps & BaseLinearProgressPropsOverrides;
|
|
80
81
|
baseMenuList: MenuListProps & BaseMenuListPropsOverrides;
|
|
81
82
|
baseMenuItem: MenuItemProps & BaseMenuItemPropsOverrides;
|
|
83
|
+
baseModal: ModalProps & BaseModalPropsOverrides;
|
|
82
84
|
baseTabs: TabsProps & BaseTabsPropsOverrides;
|
|
83
85
|
baseTextField: TextFieldProps & BaseTextFieldPropsOverrides;
|
|
84
86
|
baseSwitch: SwitchProps & BaseSwitchPropsOverrides;
|
|
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
|
|
|
13
13
|
* Some props are passed on the state to enable grid selectors to select
|
|
14
14
|
* and react to them.
|
|
15
15
|
*/
|
|
16
|
-
export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource'>;
|
|
16
|
+
export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource' | 'signature'>;
|
|
17
17
|
/**
|
|
18
18
|
* The state of Data Grid.
|
|
19
19
|
*/
|
|
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
|
|
|
13
13
|
* Some props are passed on the state to enable grid selectors to select
|
|
14
14
|
* and react to them.
|
|
15
15
|
*/
|
|
16
|
-
export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource'>;
|
|
16
|
+
export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource' | 'signature'>;
|
|
17
17
|
/**
|
|
18
18
|
* The state of Data Grid.
|
|
19
19
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"use-sync-external-store": "^1.6.0",
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
45
|
+
"@mui/x-internals": "^9.1.0",
|
|
46
|
+
"@mui/x-virtualizer": "9.0.0-alpha.8"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|