@mui/x-data-grid 9.0.0-rc.0 → 9.0.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 +207 -6892
- package/components/containers/GridRootStyles.js +50 -0
- package/components/containers/GridRootStyles.mjs +50 -0
- package/constants/gridClasses.d.mts +25 -1
- package/constants/gridClasses.d.ts +25 -1
- package/constants/gridClasses.js +1 -1
- package/constants/gridClasses.mjs +1 -1
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/editing/useGridRowEditing.mjs +1 -1
- package/hooks/features/focus/useGridFocus.js +4 -0
- package/hooks/features/focus/useGridFocus.mjs +4 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +17 -1
- package/hooks/features/rowSelection/useGridRowSelection.mjs +17 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/index.d.mts +2 -2
- package/internals/index.d.ts +2 -2
- package/internals/index.js +21 -0
- package/internals/index.mjs +2 -2
- package/package.json +6 -6
- package/utils/keyboardUtils.d.mts +2 -0
- package/utils/keyboardUtils.d.ts +2 -0
- package/utils/keyboardUtils.js +8 -0
- package/utils/keyboardUtils.mjs +6 -0
|
@@ -471,6 +471,26 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
471
471
|
textOverflow: 'ellipsis',
|
|
472
472
|
'&.Mui-selected': selectedStyles
|
|
473
473
|
},
|
|
474
|
+
/* Default range border styles using box-shadow to avoid layout shift */
|
|
475
|
+
[`& .${_gridClasses.gridClasses.cell}.Mui-selected`]: {
|
|
476
|
+
'--range-top': '0 0 0 0 transparent',
|
|
477
|
+
'--range-bottom': '0 0 0 0 transparent',
|
|
478
|
+
'--range-left': '0 0 0 0 transparent',
|
|
479
|
+
'--range-right': '0 0 0 0 transparent',
|
|
480
|
+
boxShadow: 'var(--range-top), var(--range-bottom), var(--range-left), var(--range-right)'
|
|
481
|
+
},
|
|
482
|
+
[`& .${_gridClasses.gridClasses['cell--rangeTop']}`]: {
|
|
483
|
+
'--range-top': `inset 0 2px 0 0 ${_cssVariables.vars.colors.interactive.focus}`
|
|
484
|
+
},
|
|
485
|
+
[`& .${_gridClasses.gridClasses['cell--rangeBottom']}`]: {
|
|
486
|
+
'--range-bottom': `inset 0 -2px 0 0 ${_cssVariables.vars.colors.interactive.focus}`
|
|
487
|
+
},
|
|
488
|
+
[`& .${_gridClasses.gridClasses['cell--rangeLeft']}`]: {
|
|
489
|
+
'--range-left': `inset 2px 0 0 0 ${_cssVariables.vars.colors.interactive.focus}`
|
|
490
|
+
},
|
|
491
|
+
[`& .${_gridClasses.gridClasses['cell--rangeRight']}`]: {
|
|
492
|
+
'--range-right': `inset -2px 0 0 0 ${_cssVariables.vars.colors.interactive.focus}`
|
|
493
|
+
},
|
|
474
494
|
[`& .${_gridClasses.gridClasses['virtualScrollerContent--overflowed']} .${_gridClasses.gridClasses['row--lastVisible']} .${_gridClasses.gridClasses.cell}`]: {
|
|
475
495
|
borderTopColor: 'transparent'
|
|
476
496
|
},
|
|
@@ -701,6 +721,36 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
701
721
|
display: 'none'
|
|
702
722
|
}
|
|
703
723
|
},
|
|
724
|
+
/* Fill handle styles */
|
|
725
|
+
[`& .${_gridClasses.gridClasses['cell--withFillHandle']}`]: {
|
|
726
|
+
position: 'relative',
|
|
727
|
+
'&::after': {
|
|
728
|
+
content: '""',
|
|
729
|
+
position: 'absolute',
|
|
730
|
+
bottom: 0,
|
|
731
|
+
insetInlineEnd: 0,
|
|
732
|
+
width: 7,
|
|
733
|
+
height: 7,
|
|
734
|
+
backgroundColor: _cssVariables.vars.colors.interactive.focus,
|
|
735
|
+
cursor: 'crosshair',
|
|
736
|
+
zIndex: 50
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
[`& .${_gridClasses.gridClasses['cell--fillPreview']}`]: {
|
|
740
|
+
backgroundColor: `color-mix(in srgb, ${_cssVariables.vars.colors.interactive.focus} 8%, transparent)`
|
|
741
|
+
},
|
|
742
|
+
[`& .${_gridClasses.gridClasses['cell--fillPreviewTop']}`]: {
|
|
743
|
+
borderTop: `1px dashed ${_cssVariables.vars.colors.interactive.focus}`
|
|
744
|
+
},
|
|
745
|
+
[`& .${_gridClasses.gridClasses['cell--fillPreviewBottom']}`]: {
|
|
746
|
+
borderBottom: `1px dashed ${_cssVariables.vars.colors.interactive.focus}`
|
|
747
|
+
},
|
|
748
|
+
[`& .${_gridClasses.gridClasses['cell--fillPreviewLeft']}`]: {
|
|
749
|
+
borderLeft: `1px dashed ${_cssVariables.vars.colors.interactive.focus}`
|
|
750
|
+
},
|
|
751
|
+
[`& .${_gridClasses.gridClasses['cell--fillPreviewRight']}`]: {
|
|
752
|
+
borderRight: `1px dashed ${_cssVariables.vars.colors.interactive.focus}`
|
|
753
|
+
},
|
|
704
754
|
[`& .${_gridClasses.gridClasses['row--beingDragged']}`]: {
|
|
705
755
|
color: _cssVariables.vars.colors.foreground.disabled,
|
|
706
756
|
'&:hover': {
|
|
@@ -465,6 +465,26 @@ export const GridRootStyles = styled('div', {
|
|
|
465
465
|
textOverflow: 'ellipsis',
|
|
466
466
|
'&.Mui-selected': selectedStyles
|
|
467
467
|
},
|
|
468
|
+
/* Default range border styles using box-shadow to avoid layout shift */
|
|
469
|
+
[`& .${c.cell}.Mui-selected`]: {
|
|
470
|
+
'--range-top': '0 0 0 0 transparent',
|
|
471
|
+
'--range-bottom': '0 0 0 0 transparent',
|
|
472
|
+
'--range-left': '0 0 0 0 transparent',
|
|
473
|
+
'--range-right': '0 0 0 0 transparent',
|
|
474
|
+
boxShadow: 'var(--range-top), var(--range-bottom), var(--range-left), var(--range-right)'
|
|
475
|
+
},
|
|
476
|
+
[`& .${c['cell--rangeTop']}`]: {
|
|
477
|
+
'--range-top': `inset 0 2px 0 0 ${vars.colors.interactive.focus}`
|
|
478
|
+
},
|
|
479
|
+
[`& .${c['cell--rangeBottom']}`]: {
|
|
480
|
+
'--range-bottom': `inset 0 -2px 0 0 ${vars.colors.interactive.focus}`
|
|
481
|
+
},
|
|
482
|
+
[`& .${c['cell--rangeLeft']}`]: {
|
|
483
|
+
'--range-left': `inset 2px 0 0 0 ${vars.colors.interactive.focus}`
|
|
484
|
+
},
|
|
485
|
+
[`& .${c['cell--rangeRight']}`]: {
|
|
486
|
+
'--range-right': `inset -2px 0 0 0 ${vars.colors.interactive.focus}`
|
|
487
|
+
},
|
|
468
488
|
[`& .${c['virtualScrollerContent--overflowed']} .${c['row--lastVisible']} .${c.cell}`]: {
|
|
469
489
|
borderTopColor: 'transparent'
|
|
470
490
|
},
|
|
@@ -695,6 +715,36 @@ export const GridRootStyles = styled('div', {
|
|
|
695
715
|
display: 'none'
|
|
696
716
|
}
|
|
697
717
|
},
|
|
718
|
+
/* Fill handle styles */
|
|
719
|
+
[`& .${c['cell--withFillHandle']}`]: {
|
|
720
|
+
position: 'relative',
|
|
721
|
+
'&::after': {
|
|
722
|
+
content: '""',
|
|
723
|
+
position: 'absolute',
|
|
724
|
+
bottom: 0,
|
|
725
|
+
insetInlineEnd: 0,
|
|
726
|
+
width: 7,
|
|
727
|
+
height: 7,
|
|
728
|
+
backgroundColor: vars.colors.interactive.focus,
|
|
729
|
+
cursor: 'crosshair',
|
|
730
|
+
zIndex: 50
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
[`& .${c['cell--fillPreview']}`]: {
|
|
734
|
+
backgroundColor: `color-mix(in srgb, ${vars.colors.interactive.focus} 8%, transparent)`
|
|
735
|
+
},
|
|
736
|
+
[`& .${c['cell--fillPreviewTop']}`]: {
|
|
737
|
+
borderTop: `1px dashed ${vars.colors.interactive.focus}`
|
|
738
|
+
},
|
|
739
|
+
[`& .${c['cell--fillPreviewBottom']}`]: {
|
|
740
|
+
borderBottom: `1px dashed ${vars.colors.interactive.focus}`
|
|
741
|
+
},
|
|
742
|
+
[`& .${c['cell--fillPreviewLeft']}`]: {
|
|
743
|
+
borderLeft: `1px dashed ${vars.colors.interactive.focus}`
|
|
744
|
+
},
|
|
745
|
+
[`& .${c['cell--fillPreviewRight']}`]: {
|
|
746
|
+
borderRight: `1px dashed ${vars.colors.interactive.focus}`
|
|
747
|
+
},
|
|
698
748
|
[`& .${c['row--beingDragged']}`]: {
|
|
699
749
|
color: vars.colors.foreground.disabled,
|
|
700
750
|
'&:hover': {
|
|
@@ -136,6 +136,30 @@ export interface GridClasses {
|
|
|
136
136
|
* Styles applied to the cell element if it is at the right edge of a cell selection range.
|
|
137
137
|
*/
|
|
138
138
|
'cell--rangeRight': string;
|
|
139
|
+
/**
|
|
140
|
+
* Styles applied to the cell element when it displays the fill handle.
|
|
141
|
+
*/
|
|
142
|
+
'cell--withFillHandle': string;
|
|
143
|
+
/**
|
|
144
|
+
* Styles applied to the cell element when it is in the fill preview range.
|
|
145
|
+
*/
|
|
146
|
+
'cell--fillPreview': string;
|
|
147
|
+
/**
|
|
148
|
+
* Styles applied to the cell element if it is at the top edge of the fill preview range.
|
|
149
|
+
*/
|
|
150
|
+
'cell--fillPreviewTop': string;
|
|
151
|
+
/**
|
|
152
|
+
* Styles applied to the cell element if it is at the bottom edge of the fill preview range.
|
|
153
|
+
*/
|
|
154
|
+
'cell--fillPreviewBottom': string;
|
|
155
|
+
/**
|
|
156
|
+
* Styles applied to the cell element if it is at the left edge of the fill preview range.
|
|
157
|
+
*/
|
|
158
|
+
'cell--fillPreviewLeft': string;
|
|
159
|
+
/**
|
|
160
|
+
* Styles applied to the cell element if it is at the right edge of the fill preview range.
|
|
161
|
+
*/
|
|
162
|
+
'cell--fillPreviewRight': string;
|
|
139
163
|
/**
|
|
140
164
|
* Styles applied to the cell element if it is pinned to the left.
|
|
141
165
|
*/
|
|
@@ -989,6 +1013,6 @@ export declare function getDataGridUtilityClass(slot: string): string;
|
|
|
989
1013
|
*/
|
|
990
1014
|
export declare const gridClassesOverrides: {
|
|
991
1015
|
readonly root: ["autoHeight", "autosizing", "root--densityStandard", "root--densityComfortable", "root--densityCompact", "root--disableUserSelection", "root--noToolbar", "withVerticalBorder"];
|
|
992
|
-
readonly children: ["actionsCell", "booleanCell", "cell", "cell--editable", "cell--editing", "cell--flex", "cell--pinnedLeft", "cell--pinnedRight", "cell--rangeBottom", "cell--rangeLeft", "cell--rangeRight", "cell--rangeTop", "cell--selectionMode", "cell--textCenter", "cell--textLeft", "cell--textRight", "cell--withLeftBorder", "cell--withRightBorder", "cellCheckbox", "cellEmpty", "cellOffsetLeft", "cellSkeleton", "checkboxInput", "columnHeader", "columnHeader--alignCenter", "columnHeader--alignLeft", "columnHeader--alignRight", "columnHeader--dragging", "columnHeader--emptyGroup", "columnHeader--filledGroup", "columnHeader--filtered", "columnHeader--last", "columnHeader--moving", "columnHeader--numeric", "columnHeader--pinnedLeft", "columnHeader--pinnedRight", "columnHeader--siblingFocused", "columnHeader--sortable", "columnHeader--sorted", "columnHeader--withLeftBorder", "columnHeader--withRightBorder", "columnHeaderCheckbox", "columnHeaderDraggableContainer", "columnHeaderTitleContainer", "columnHeaderTitleContainerContent", "columnSeparator", "columnSeparator--resizable", "columnSeparator--resizing", "columnSeparator--sideLeft", "columnSeparator--sideRight", "container--bottom", "container--top", "detailPanelToggleCell", "detailPanelToggleCell--expanded", "editBooleanCell", "filterIcon", "filler--borderBottom", "filler--pinnedLeft", "filler--pinnedRight", "groupingCriteriaCell", "groupingCriteriaCellLoadingContainer", "groupingCriteriaCellToggle", "headerFilterRow", "iconSeparator", "menuIcon", "menuIconButton", "menuList", "menuOpen", "overlayWrapperInner", "pinnedRows", "pinnedRows--bottom", "pinnedRows--top", "row", "row--borderBottom", "row--detailPanelExpanded", "row--dragging", "row--dynamicHeight", "row--editable", "row--editing", "row--firstVisible", "row--lastVisible", "rowReorderCell", "rowReorderCell--draggable", "rowReorderCellContainer", "rowReorderCellPlaceholder", "rowSkeleton", "scrollbar", "scrollbar--horizontal", "scrollbar--vertical", "scrollbarFiller", "scrollbarFiller--pinnedRight", "sortIcon", "treeDataGroupingCell", "treeDataGroupingCellLoadingContainer", "treeDataGroupingCellToggle", "withBorderColor", "row--beingDragged"];
|
|
1016
|
+
readonly children: ["actionsCell", "booleanCell", "cell", "cell--editable", "cell--editing", "cell--flex", "cell--pinnedLeft", "cell--pinnedRight", "cell--rangeBottom", "cell--rangeLeft", "cell--rangeRight", "cell--rangeTop", "cell--withFillHandle", "cell--fillPreview", "cell--fillPreviewTop", "cell--fillPreviewBottom", "cell--fillPreviewLeft", "cell--fillPreviewRight", "cell--selectionMode", "cell--textCenter", "cell--textLeft", "cell--textRight", "cell--withLeftBorder", "cell--withRightBorder", "cellCheckbox", "cellEmpty", "cellOffsetLeft", "cellSkeleton", "checkboxInput", "columnHeader", "columnHeader--alignCenter", "columnHeader--alignLeft", "columnHeader--alignRight", "columnHeader--dragging", "columnHeader--emptyGroup", "columnHeader--filledGroup", "columnHeader--filtered", "columnHeader--last", "columnHeader--moving", "columnHeader--numeric", "columnHeader--pinnedLeft", "columnHeader--pinnedRight", "columnHeader--siblingFocused", "columnHeader--sortable", "columnHeader--sorted", "columnHeader--withLeftBorder", "columnHeader--withRightBorder", "columnHeaderCheckbox", "columnHeaderDraggableContainer", "columnHeaderTitleContainer", "columnHeaderTitleContainerContent", "columnSeparator", "columnSeparator--resizable", "columnSeparator--resizing", "columnSeparator--sideLeft", "columnSeparator--sideRight", "container--bottom", "container--top", "detailPanelToggleCell", "detailPanelToggleCell--expanded", "editBooleanCell", "filterIcon", "filler--borderBottom", "filler--pinnedLeft", "filler--pinnedRight", "groupingCriteriaCell", "groupingCriteriaCellLoadingContainer", "groupingCriteriaCellToggle", "headerFilterRow", "iconSeparator", "menuIcon", "menuIconButton", "menuList", "menuOpen", "overlayWrapperInner", "pinnedRows", "pinnedRows--bottom", "pinnedRows--top", "row", "row--borderBottom", "row--detailPanelExpanded", "row--dragging", "row--dynamicHeight", "row--editable", "row--editing", "row--firstVisible", "row--lastVisible", "rowReorderCell", "rowReorderCell--draggable", "rowReorderCellContainer", "rowReorderCellPlaceholder", "rowSkeleton", "scrollbar", "scrollbar--horizontal", "scrollbar--vertical", "scrollbarFiller", "scrollbarFiller--pinnedRight", "sortIcon", "treeDataGroupingCell", "treeDataGroupingCellLoadingContainer", "treeDataGroupingCellToggle", "withBorderColor", "row--beingDragged"];
|
|
993
1017
|
};
|
|
994
1018
|
export declare const gridClasses: Record<keyof GridClasses, string>;
|
|
@@ -136,6 +136,30 @@ export interface GridClasses {
|
|
|
136
136
|
* Styles applied to the cell element if it is at the right edge of a cell selection range.
|
|
137
137
|
*/
|
|
138
138
|
'cell--rangeRight': string;
|
|
139
|
+
/**
|
|
140
|
+
* Styles applied to the cell element when it displays the fill handle.
|
|
141
|
+
*/
|
|
142
|
+
'cell--withFillHandle': string;
|
|
143
|
+
/**
|
|
144
|
+
* Styles applied to the cell element when it is in the fill preview range.
|
|
145
|
+
*/
|
|
146
|
+
'cell--fillPreview': string;
|
|
147
|
+
/**
|
|
148
|
+
* Styles applied to the cell element if it is at the top edge of the fill preview range.
|
|
149
|
+
*/
|
|
150
|
+
'cell--fillPreviewTop': string;
|
|
151
|
+
/**
|
|
152
|
+
* Styles applied to the cell element if it is at the bottom edge of the fill preview range.
|
|
153
|
+
*/
|
|
154
|
+
'cell--fillPreviewBottom': string;
|
|
155
|
+
/**
|
|
156
|
+
* Styles applied to the cell element if it is at the left edge of the fill preview range.
|
|
157
|
+
*/
|
|
158
|
+
'cell--fillPreviewLeft': string;
|
|
159
|
+
/**
|
|
160
|
+
* Styles applied to the cell element if it is at the right edge of the fill preview range.
|
|
161
|
+
*/
|
|
162
|
+
'cell--fillPreviewRight': string;
|
|
139
163
|
/**
|
|
140
164
|
* Styles applied to the cell element if it is pinned to the left.
|
|
141
165
|
*/
|
|
@@ -989,6 +1013,6 @@ export declare function getDataGridUtilityClass(slot: string): string;
|
|
|
989
1013
|
*/
|
|
990
1014
|
export declare const gridClassesOverrides: {
|
|
991
1015
|
readonly root: ["autoHeight", "autosizing", "root--densityStandard", "root--densityComfortable", "root--densityCompact", "root--disableUserSelection", "root--noToolbar", "withVerticalBorder"];
|
|
992
|
-
readonly children: ["actionsCell", "booleanCell", "cell", "cell--editable", "cell--editing", "cell--flex", "cell--pinnedLeft", "cell--pinnedRight", "cell--rangeBottom", "cell--rangeLeft", "cell--rangeRight", "cell--rangeTop", "cell--selectionMode", "cell--textCenter", "cell--textLeft", "cell--textRight", "cell--withLeftBorder", "cell--withRightBorder", "cellCheckbox", "cellEmpty", "cellOffsetLeft", "cellSkeleton", "checkboxInput", "columnHeader", "columnHeader--alignCenter", "columnHeader--alignLeft", "columnHeader--alignRight", "columnHeader--dragging", "columnHeader--emptyGroup", "columnHeader--filledGroup", "columnHeader--filtered", "columnHeader--last", "columnHeader--moving", "columnHeader--numeric", "columnHeader--pinnedLeft", "columnHeader--pinnedRight", "columnHeader--siblingFocused", "columnHeader--sortable", "columnHeader--sorted", "columnHeader--withLeftBorder", "columnHeader--withRightBorder", "columnHeaderCheckbox", "columnHeaderDraggableContainer", "columnHeaderTitleContainer", "columnHeaderTitleContainerContent", "columnSeparator", "columnSeparator--resizable", "columnSeparator--resizing", "columnSeparator--sideLeft", "columnSeparator--sideRight", "container--bottom", "container--top", "detailPanelToggleCell", "detailPanelToggleCell--expanded", "editBooleanCell", "filterIcon", "filler--borderBottom", "filler--pinnedLeft", "filler--pinnedRight", "groupingCriteriaCell", "groupingCriteriaCellLoadingContainer", "groupingCriteriaCellToggle", "headerFilterRow", "iconSeparator", "menuIcon", "menuIconButton", "menuList", "menuOpen", "overlayWrapperInner", "pinnedRows", "pinnedRows--bottom", "pinnedRows--top", "row", "row--borderBottom", "row--detailPanelExpanded", "row--dragging", "row--dynamicHeight", "row--editable", "row--editing", "row--firstVisible", "row--lastVisible", "rowReorderCell", "rowReorderCell--draggable", "rowReorderCellContainer", "rowReorderCellPlaceholder", "rowSkeleton", "scrollbar", "scrollbar--horizontal", "scrollbar--vertical", "scrollbarFiller", "scrollbarFiller--pinnedRight", "sortIcon", "treeDataGroupingCell", "treeDataGroupingCellLoadingContainer", "treeDataGroupingCellToggle", "withBorderColor", "row--beingDragged"];
|
|
1016
|
+
readonly children: ["actionsCell", "booleanCell", "cell", "cell--editable", "cell--editing", "cell--flex", "cell--pinnedLeft", "cell--pinnedRight", "cell--rangeBottom", "cell--rangeLeft", "cell--rangeRight", "cell--rangeTop", "cell--withFillHandle", "cell--fillPreview", "cell--fillPreviewTop", "cell--fillPreviewBottom", "cell--fillPreviewLeft", "cell--fillPreviewRight", "cell--selectionMode", "cell--textCenter", "cell--textLeft", "cell--textRight", "cell--withLeftBorder", "cell--withRightBorder", "cellCheckbox", "cellEmpty", "cellOffsetLeft", "cellSkeleton", "checkboxInput", "columnHeader", "columnHeader--alignCenter", "columnHeader--alignLeft", "columnHeader--alignRight", "columnHeader--dragging", "columnHeader--emptyGroup", "columnHeader--filledGroup", "columnHeader--filtered", "columnHeader--last", "columnHeader--moving", "columnHeader--numeric", "columnHeader--pinnedLeft", "columnHeader--pinnedRight", "columnHeader--siblingFocused", "columnHeader--sortable", "columnHeader--sorted", "columnHeader--withLeftBorder", "columnHeader--withRightBorder", "columnHeaderCheckbox", "columnHeaderDraggableContainer", "columnHeaderTitleContainer", "columnHeaderTitleContainerContent", "columnSeparator", "columnSeparator--resizable", "columnSeparator--resizing", "columnSeparator--sideLeft", "columnSeparator--sideRight", "container--bottom", "container--top", "detailPanelToggleCell", "detailPanelToggleCell--expanded", "editBooleanCell", "filterIcon", "filler--borderBottom", "filler--pinnedLeft", "filler--pinnedRight", "groupingCriteriaCell", "groupingCriteriaCellLoadingContainer", "groupingCriteriaCellToggle", "headerFilterRow", "iconSeparator", "menuIcon", "menuIconButton", "menuList", "menuOpen", "overlayWrapperInner", "pinnedRows", "pinnedRows--bottom", "pinnedRows--top", "row", "row--borderBottom", "row--detailPanelExpanded", "row--dragging", "row--dynamicHeight", "row--editable", "row--editing", "row--firstVisible", "row--lastVisible", "rowReorderCell", "rowReorderCell--draggable", "rowReorderCellContainer", "rowReorderCellPlaceholder", "rowSkeleton", "scrollbar", "scrollbar--horizontal", "scrollbar--vertical", "scrollbarFiller", "scrollbarFiller--pinnedRight", "sortIcon", "treeDataGroupingCell", "treeDataGroupingCellLoadingContainer", "treeDataGroupingCellToggle", "withBorderColor", "row--beingDragged"];
|
|
993
1017
|
};
|
|
994
1018
|
export declare const gridClasses: Record<keyof GridClasses, string>;
|
package/constants/gridClasses.js
CHANGED
|
@@ -26,7 +26,7 @@ function getDataGridUtilityClass(slot) {
|
|
|
26
26
|
*/
|
|
27
27
|
const gridClassesOverrides = exports.gridClassesOverrides = {
|
|
28
28
|
root: ['autoHeight', 'autosizing', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'withVerticalBorder'],
|
|
29
|
-
children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',
|
|
29
|
+
children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--withFillHandle', 'cell--fillPreview', 'cell--fillPreviewTop', 'cell--fillPreviewBottom', 'cell--fillPreviewLeft', 'cell--fillPreviewRight', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',
|
|
30
30
|
// TODO v9: Rename to `cell--dragging`
|
|
31
31
|
'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']
|
|
32
32
|
};
|
|
@@ -18,7 +18,7 @@ export function getDataGridUtilityClass(slot) {
|
|
|
18
18
|
*/
|
|
19
19
|
export const gridClassesOverrides = {
|
|
20
20
|
root: ['autoHeight', 'autosizing', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'withVerticalBorder'],
|
|
21
|
-
children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',
|
|
21
|
+
children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--withFillHandle', 'cell--fillPreview', 'cell--fillPreviewTop', 'cell--fillPreviewBottom', 'cell--fillPreviewLeft', 'cell--fillPreviewRight', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',
|
|
22
22
|
// TODO v9: Rename to `cell--dragging`
|
|
23
23
|
'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']
|
|
24
24
|
};
|
|
@@ -411,7 +411,7 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
411
411
|
updateRowInRowModesModel(id, null);
|
|
412
412
|
delete prevRowValuesLookup.current[id];
|
|
413
413
|
};
|
|
414
|
-
if (ignoreModifications
|
|
414
|
+
if (ignoreModifications) {
|
|
415
415
|
finishRowEditMode();
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
@@ -404,7 +404,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
404
404
|
updateRowInRowModesModel(id, null);
|
|
405
405
|
delete prevRowValuesLookup.current[id];
|
|
406
406
|
};
|
|
407
|
-
if (ignoreModifications
|
|
407
|
+
if (ignoreModifications) {
|
|
408
408
|
finishRowEditMode();
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
@@ -301,6 +301,10 @@ const useGridFocus = (apiRef, props) => {
|
|
|
301
301
|
if (event.relatedTarget?.getAttribute('class')?.includes(_gridClasses.gridClasses.columnHeader)) {
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
|
+
// Don't clear focus when it moves to a body cell — setCellFocus already set it
|
|
305
|
+
if (event.relatedTarget?.getAttribute('class')?.includes(_gridClasses.gridClasses.cell)) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
304
308
|
logger.debug(`Clearing focus`);
|
|
305
309
|
apiRef.current.setState(state => (0, _extends2.default)({}, state, {
|
|
306
310
|
focus: {
|
|
@@ -293,6 +293,10 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
293
293
|
if (event.relatedTarget?.getAttribute('class')?.includes(gridClasses.columnHeader)) {
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
+
// Don't clear focus when it moves to a body cell — setCellFocus already set it
|
|
297
|
+
if (event.relatedTarget?.getAttribute('class')?.includes(gridClasses.cell)) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
296
300
|
logger.debug(`Clearing focus`);
|
|
297
301
|
apiRef.current.setState(state => _extends({}, state, {
|
|
298
302
|
focus: {
|
|
@@ -334,6 +334,21 @@ You need to upgrade to DataGridPro or DataGridPremium component to unlock multip
|
|
|
334
334
|
ids: new Set(currentSelection.ids)
|
|
335
335
|
};
|
|
336
336
|
const selectionManager = (0, _gridRowSelectionManager.createRowSelectionManager)(newSelectionModel);
|
|
337
|
+
const isOrHasSelectableDescendant = nodeId => {
|
|
338
|
+
const node = rowTree[nodeId];
|
|
339
|
+
if (!node) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Only consider nodes that are present (not filtered out) when using client-side filtering.
|
|
344
|
+
if (props.filterMode !== 'server' && filteredRowsLookup[nodeId] === false) {
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
if (node.type !== 'group') {
|
|
348
|
+
return Boolean(rowsLookup[nodeId]) && apiRef.current.isRowSelectable(nodeId);
|
|
349
|
+
}
|
|
350
|
+
return node.children.some(childId => isOrHasSelectableDescendant(childId));
|
|
351
|
+
};
|
|
337
352
|
let hasChanged = false;
|
|
338
353
|
for (const id of currentSelection.ids) {
|
|
339
354
|
if (isNonExistent(id)) {
|
|
@@ -356,7 +371,8 @@ You need to upgrade to DataGridPro or DataGridPremium component to unlock multip
|
|
|
356
371
|
continue;
|
|
357
372
|
}
|
|
358
373
|
// Keep previously selected tree data parents selected if all their children are filtered out
|
|
359
|
-
|
|
374
|
+
// or not selectable.
|
|
375
|
+
if (node.children.some(childId => filteredRowsLookup[childId] !== false && isOrHasSelectableDescendant(childId))) {
|
|
360
376
|
selectionManager.unselect(id);
|
|
361
377
|
hasChanged = true;
|
|
362
378
|
}
|
|
@@ -326,6 +326,21 @@ You need to upgrade to DataGridPro or DataGridPremium component to unlock multip
|
|
|
326
326
|
ids: new Set(currentSelection.ids)
|
|
327
327
|
};
|
|
328
328
|
const selectionManager = createRowSelectionManager(newSelectionModel);
|
|
329
|
+
const isOrHasSelectableDescendant = nodeId => {
|
|
330
|
+
const node = rowTree[nodeId];
|
|
331
|
+
if (!node) {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Only consider nodes that are present (not filtered out) when using client-side filtering.
|
|
336
|
+
if (props.filterMode !== 'server' && filteredRowsLookup[nodeId] === false) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
if (node.type !== 'group') {
|
|
340
|
+
return Boolean(rowsLookup[nodeId]) && apiRef.current.isRowSelectable(nodeId);
|
|
341
|
+
}
|
|
342
|
+
return node.children.some(childId => isOrHasSelectableDescendant(childId));
|
|
343
|
+
};
|
|
329
344
|
let hasChanged = false;
|
|
330
345
|
for (const id of currentSelection.ids) {
|
|
331
346
|
if (isNonExistent(id)) {
|
|
@@ -348,7 +363,8 @@ You need to upgrade to DataGridPro or DataGridPremium component to unlock multip
|
|
|
348
363
|
continue;
|
|
349
364
|
}
|
|
350
365
|
// Keep previously selected tree data parents selected if all their children are filtered out
|
|
351
|
-
|
|
366
|
+
// or not selectable.
|
|
367
|
+
if (node.children.some(childId => filteredRowsLookup[childId] !== false && isOrHasSelectableDescendant(childId))) {
|
|
352
368
|
selectionManager.unselect(id);
|
|
353
369
|
hasChanged = true;
|
|
354
370
|
}
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/internals/index.d.mts
CHANGED
|
@@ -103,8 +103,8 @@ export * from "../utils/rtlFlipSide.mjs";
|
|
|
103
103
|
export { NotRendered } from "../utils/assert.mjs";
|
|
104
104
|
export { createSelector, createRootSelector, createSelectorMemoized } from "../utils/createSelector.mjs";
|
|
105
105
|
export { gridRowGroupsToFetchSelector } from "../hooks/features/rows/gridRowsSelector.mjs";
|
|
106
|
-
export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal } from "../utils/domUtils.mjs";
|
|
107
|
-
export { isNavigationKey, isPasteShortcut, isCopyShortcut, isUndoShortcut, isRedoShortcut } from "../utils/keyboardUtils.mjs";
|
|
106
|
+
export { findParentElementFromClassName, getActiveElement, getGridCellElement, isEventTargetInPortal } from "../utils/domUtils.mjs";
|
|
107
|
+
export { isNavigationKey, isPasteShortcut, isCopyShortcut, isUndoShortcut, isRedoShortcut, isFillDownShortcut, isFillRightShortcut } from "../utils/keyboardUtils.mjs";
|
|
108
108
|
export * from "../utils/utils.mjs";
|
|
109
109
|
export { exportAs } from "../utils/exportAs.mjs";
|
|
110
110
|
export * from "../utils/getPublicApiRef.mjs";
|
package/internals/index.d.ts
CHANGED
|
@@ -103,8 +103,8 @@ export * from "../utils/rtlFlipSide.js";
|
|
|
103
103
|
export { NotRendered } from "../utils/assert.js";
|
|
104
104
|
export { createSelector, createRootSelector, createSelectorMemoized } from "../utils/createSelector.js";
|
|
105
105
|
export { gridRowGroupsToFetchSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
106
|
-
export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal } from "../utils/domUtils.js";
|
|
107
|
-
export { isNavigationKey, isPasteShortcut, isCopyShortcut, isUndoShortcut, isRedoShortcut } from "../utils/keyboardUtils.js";
|
|
106
|
+
export { findParentElementFromClassName, getActiveElement, getGridCellElement, isEventTargetInPortal } from "../utils/domUtils.js";
|
|
107
|
+
export { isNavigationKey, isPasteShortcut, isCopyShortcut, isUndoShortcut, isRedoShortcut, isFillDownShortcut, isFillRightShortcut } from "../utils/keyboardUtils.js";
|
|
108
108
|
export * from "../utils/utils.js";
|
|
109
109
|
export { exportAs } from "../utils/exportAs.js";
|
|
110
110
|
export * from "../utils/getPublicApiRef.js";
|
package/internals/index.js
CHANGED
|
@@ -118,12 +118,15 @@ var _exportNames = {
|
|
|
118
118
|
createSelectorMemoized: true,
|
|
119
119
|
findParentElementFromClassName: true,
|
|
120
120
|
getActiveElement: true,
|
|
121
|
+
getGridCellElement: true,
|
|
121
122
|
isEventTargetInPortal: true,
|
|
122
123
|
isNavigationKey: true,
|
|
123
124
|
isPasteShortcut: true,
|
|
124
125
|
isCopyShortcut: true,
|
|
125
126
|
isUndoShortcut: true,
|
|
126
127
|
isRedoShortcut: true,
|
|
128
|
+
isFillDownShortcut: true,
|
|
129
|
+
isFillRightShortcut: true,
|
|
127
130
|
exportAs: true,
|
|
128
131
|
useGridPrivateApiContext: true,
|
|
129
132
|
serializeCellValue: true,
|
|
@@ -359,6 +362,12 @@ Object.defineProperty(exports, "getColumnsToExport", {
|
|
|
359
362
|
return _utils3.getColumnsToExport;
|
|
360
363
|
}
|
|
361
364
|
});
|
|
365
|
+
Object.defineProperty(exports, "getGridCellElement", {
|
|
366
|
+
enumerable: true,
|
|
367
|
+
get: function () {
|
|
368
|
+
return _domUtils.getGridCellElement;
|
|
369
|
+
}
|
|
370
|
+
});
|
|
362
371
|
Object.defineProperty(exports, "getGridFilter", {
|
|
363
372
|
enumerable: true,
|
|
364
373
|
get: function () {
|
|
@@ -503,6 +512,18 @@ Object.defineProperty(exports, "isEventTargetInPortal", {
|
|
|
503
512
|
return _domUtils.isEventTargetInPortal;
|
|
504
513
|
}
|
|
505
514
|
});
|
|
515
|
+
Object.defineProperty(exports, "isFillDownShortcut", {
|
|
516
|
+
enumerable: true,
|
|
517
|
+
get: function () {
|
|
518
|
+
return _keyboardUtils.isFillDownShortcut;
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
Object.defineProperty(exports, "isFillRightShortcut", {
|
|
522
|
+
enumerable: true,
|
|
523
|
+
get: function () {
|
|
524
|
+
return _keyboardUtils.isFillRightShortcut;
|
|
525
|
+
}
|
|
526
|
+
});
|
|
506
527
|
Object.defineProperty(exports, "isNavigationKey", {
|
|
507
528
|
enumerable: true,
|
|
508
529
|
get: function () {
|
package/internals/index.mjs
CHANGED
|
@@ -82,8 +82,8 @@ export * from "../utils/rtlFlipSide.mjs";
|
|
|
82
82
|
export { NotRendered } from "../utils/assert.mjs";
|
|
83
83
|
export { createSelector, createRootSelector, createSelectorMemoized } from "../utils/createSelector.mjs";
|
|
84
84
|
export { gridRowGroupsToFetchSelector } from "../hooks/features/rows/gridRowsSelector.mjs";
|
|
85
|
-
export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal } from "../utils/domUtils.mjs";
|
|
86
|
-
export { isNavigationKey, isPasteShortcut, isCopyShortcut, isUndoShortcut, isRedoShortcut } from "../utils/keyboardUtils.mjs";
|
|
85
|
+
export { findParentElementFromClassName, getActiveElement, getGridCellElement, isEventTargetInPortal } from "../utils/domUtils.mjs";
|
|
86
|
+
export { isNavigationKey, isPasteShortcut, isCopyShortcut, isUndoShortcut, isRedoShortcut, isFillDownShortcut, isFillRightShortcut } from "../utils/keyboardUtils.mjs";
|
|
87
87
|
export * from "../utils/utils.mjs";
|
|
88
88
|
export { exportAs } from "../utils/exportAs.mjs";
|
|
89
89
|
export * from "../utils/getPublicApiRef.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@babel/runtime": "^7.28.6",
|
|
41
|
-
"@mui/utils": "9.0.0
|
|
41
|
+
"@mui/utils": "9.0.0",
|
|
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-internals": "9.0.0
|
|
46
|
-
"@mui/x-virtualizer": "
|
|
45
|
+
"@mui/x-internals": "^9.0.0",
|
|
46
|
+
"@mui/x-virtualizer": "9.0.0-alpha.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
|
50
50
|
"@emotion/styled": "^11.8.1",
|
|
51
|
-
"@mui/material": "^7.3.0 || ^9.0.0
|
|
52
|
-
"@mui/system": "^7.3.0 || ^9.0.0
|
|
51
|
+
"@mui/material": "^7.3.0 || ^9.0.0",
|
|
52
|
+
"@mui/system": "^7.3.0 || ^9.0.0",
|
|
53
53
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
54
54
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
55
55
|
},
|
|
@@ -6,4 +6,6 @@ export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is
|
|
|
6
6
|
export declare function isPasteShortcut(event: React.KeyboardEvent): boolean;
|
|
7
7
|
export declare function isCopyShortcut(event: KeyboardEvent): boolean;
|
|
8
8
|
export declare function isUndoShortcut(event: React.KeyboardEvent): boolean;
|
|
9
|
+
export declare function isFillDownShortcut(event: React.KeyboardEvent): boolean;
|
|
10
|
+
export declare function isFillRightShortcut(event: React.KeyboardEvent): boolean;
|
|
9
11
|
export declare function isRedoShortcut(event: React.KeyboardEvent): boolean;
|
package/utils/keyboardUtils.d.ts
CHANGED
|
@@ -6,4 +6,6 @@ export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is
|
|
|
6
6
|
export declare function isPasteShortcut(event: React.KeyboardEvent): boolean;
|
|
7
7
|
export declare function isCopyShortcut(event: KeyboardEvent): boolean;
|
|
8
8
|
export declare function isUndoShortcut(event: React.KeyboardEvent): boolean;
|
|
9
|
+
export declare function isFillDownShortcut(event: React.KeyboardEvent): boolean;
|
|
10
|
+
export declare function isFillRightShortcut(event: React.KeyboardEvent): boolean;
|
|
9
11
|
export declare function isRedoShortcut(event: React.KeyboardEvent): boolean;
|
package/utils/keyboardUtils.js
CHANGED
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isCopyShortcut = isCopyShortcut;
|
|
7
|
+
exports.isFillDownShortcut = isFillDownShortcut;
|
|
8
|
+
exports.isFillRightShortcut = isFillRightShortcut;
|
|
7
9
|
exports.isNavigationKey = exports.isKeyboardEvent = exports.isHideMenuKey = void 0;
|
|
8
10
|
exports.isPasteShortcut = isPasteShortcut;
|
|
9
11
|
exports.isPrintableKey = isPrintableKey;
|
|
@@ -45,6 +47,12 @@ function isCopyShortcut(event) {
|
|
|
45
47
|
function isUndoShortcut(event) {
|
|
46
48
|
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'Z' && !event.shiftKey && !event.altKey;
|
|
47
49
|
}
|
|
50
|
+
function isFillDownShortcut(event) {
|
|
51
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'D' && !event.shiftKey && !event.altKey;
|
|
52
|
+
}
|
|
53
|
+
function isFillRightShortcut(event) {
|
|
54
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'R' && !event.shiftKey && !event.altKey;
|
|
55
|
+
}
|
|
48
56
|
function isRedoShortcut(event) {
|
|
49
57
|
return (event.ctrlKey || event.metaKey) && (String.fromCharCode(event.keyCode) === 'Z' && event.shiftKey || String.fromCharCode(event.keyCode) === 'Y' && !event.shiftKey) && !event.altKey;
|
|
50
58
|
}
|
package/utils/keyboardUtils.mjs
CHANGED
|
@@ -31,6 +31,12 @@ export function isCopyShortcut(event) {
|
|
|
31
31
|
export function isUndoShortcut(event) {
|
|
32
32
|
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'Z' && !event.shiftKey && !event.altKey;
|
|
33
33
|
}
|
|
34
|
+
export function isFillDownShortcut(event) {
|
|
35
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'D' && !event.shiftKey && !event.altKey;
|
|
36
|
+
}
|
|
37
|
+
export function isFillRightShortcut(event) {
|
|
38
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'R' && !event.shiftKey && !event.altKey;
|
|
39
|
+
}
|
|
34
40
|
export function isRedoShortcut(event) {
|
|
35
41
|
return (event.ctrlKey || event.metaKey) && (String.fromCharCode(event.keyCode) === 'Z' && event.shiftKey || String.fromCharCode(event.keyCode) === 'Y' && !event.shiftKey) && !event.altKey;
|
|
36
42
|
}
|