@mui/x-data-grid 6.19.1 → 6.19.2
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 +35 -0
- package/components/GridPagination.d.ts +4 -4
- package/components/GridRow.js +0 -1
- package/components/base/GridOverlays.js +0 -2
- package/components/cell/GridActionsCell.js +0 -1
- package/components/cell/GridActionsCellItem.d.ts +5 -5
- package/components/panel/GridPanel.d.ts +3 -3
- package/components/toolbar/GridToolbarQuickFilter.d.ts +4 -0
- package/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/components/virtualization/GridVirtualScroller.js +0 -1
- package/hooks/features/editing/useGridCellEditing.js +0 -2
- package/hooks/features/editing/useGridRowEditing.js +0 -1
- package/hooks/features/rows/gridRowsUtils.js +4 -1
- package/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/index.js +1 -1
- package/legacy/colDef/gridDefaultColumnTypes.js +2 -3
- package/legacy/components/GridPagination.js +3 -4
- package/legacy/components/GridRow.js +0 -1
- package/legacy/components/base/GridOverlays.js +0 -2
- package/legacy/components/cell/GridActionsCell.js +0 -1
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +4 -5
- package/legacy/components/containers/GridRootStyles.js +69 -70
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +8 -5
- package/legacy/components/virtualization/GridVirtualScroller.js +0 -1
- package/legacy/hooks/features/editing/useGridCellEditing.js +0 -2
- package/legacy/hooks/features/editing/useGridRowEditing.js +0 -1
- package/legacy/hooks/features/rows/gridRowsUtils.js +4 -1
- package/legacy/hooks/features/rows/useGridParamsApi.js +4 -5
- package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/legacy/index.js +1 -1
- package/legacy/locales/coreLocales.js +1 -0
- package/legacy/locales/plPL.js +0 -1
- package/legacy/utils/utils.js +0 -1
- package/locales/coreLocales.js +1 -0
- package/locales/plPL.js +0 -1
- package/modern/components/GridRow.js +0 -1
- package/modern/components/base/GridOverlays.js +0 -2
- package/modern/components/cell/GridActionsCell.js +0 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/modern/components/virtualization/GridVirtualScroller.js +0 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +0 -2
- package/modern/hooks/features/editing/useGridRowEditing.js +0 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +4 -1
- package/modern/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/modern/index.js +1 -1
- package/modern/locales/coreLocales.js +1 -0
- package/modern/locales/plPL.js +0 -1
- package/modern/utils/utils.js +0 -1
- package/node/components/GridRow.js +0 -1
- package/node/components/base/GridOverlays.js +0 -2
- package/node/components/cell/GridActionsCell.js +0 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/node/components/virtualization/GridVirtualScroller.js +0 -1
- package/node/hooks/features/editing/useGridCellEditing.js +0 -2
- package/node/hooks/features/editing/useGridRowEditing.js +0 -1
- package/node/hooks/features/rows/gridRowsUtils.js +4 -1
- package/node/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/node/index.js +1 -1
- package/node/locales/plPL.js +0 -1
- package/node/utils/utils.js +0 -1
- package/package.json +1 -1
- package/utils/utils.js +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
var _columnHeaderStyles;
|
|
4
3
|
import { alpha, styled, darken, lighten } from '@mui/material/styles';
|
|
5
4
|
import { gridClasses } from '../../constants/gridClasses';
|
|
6
5
|
function getBorderColor(theme) {
|
|
@@ -16,13 +15,13 @@ var columnHeadersStyles = _defineProperty({}, ".".concat(gridClasses.columnSepar
|
|
|
16
15
|
visibility: 'visible',
|
|
17
16
|
width: 'auto'
|
|
18
17
|
});
|
|
19
|
-
var columnHeaderStyles = (
|
|
18
|
+
var columnHeaderStyles = _defineProperty(_defineProperty({}, "& .".concat(gridClasses.iconButtonContainer), {
|
|
20
19
|
visibility: 'visible',
|
|
21
20
|
width: 'auto'
|
|
22
|
-
}),
|
|
21
|
+
}), "& .".concat(gridClasses.menuIcon), {
|
|
23
22
|
width: 'auto',
|
|
24
23
|
visibility: 'visible'
|
|
25
|
-
})
|
|
24
|
+
});
|
|
26
25
|
export var GridRootStyles = styled('div', {
|
|
27
26
|
name: 'MuiDataGrid',
|
|
28
27
|
slot: 'Root',
|
|
@@ -31,7 +30,7 @@ export var GridRootStyles = styled('div', {
|
|
|
31
30
|
_defineProperty({}, "& .".concat(gridClasses['cell--withRenderer']), styles['cell--withRenderer']), _defineProperty({}, "& .".concat(gridClasses.cell), styles.cell), _defineProperty({}, "& .".concat(gridClasses['cell--rangeTop']), styles['cell--rangeTop']), _defineProperty({}, "& .".concat(gridClasses['cell--rangeBottom']), styles['cell--rangeBottom']), _defineProperty({}, "& .".concat(gridClasses['cell--rangeLeft']), styles['cell--rangeLeft']), _defineProperty({}, "& .".concat(gridClasses['cell--rangeRight']), styles['cell--rangeRight']), _defineProperty({}, "& .".concat(gridClasses['cell--withRightBorder']), styles['cell--withRightBorder']), _defineProperty({}, "& .".concat(gridClasses.cellContent), styles.cellContent), _defineProperty({}, "& .".concat(gridClasses.cellCheckbox), styles.cellCheckbox), _defineProperty({}, "& .".concat(gridClasses.cellSkeleton), styles.cellSkeleton), _defineProperty({}, "& .".concat(gridClasses.checkboxInput), styles.checkboxInput), _defineProperty({}, "& .".concat(gridClasses['columnHeader--alignCenter']), styles['columnHeader--alignCenter']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--alignLeft']), styles['columnHeader--alignLeft']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--alignRight']), styles['columnHeader--alignRight']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--dragging']), styles['columnHeader--dragging']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--moving']), styles['columnHeader--moving']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--numeric']), styles['columnHeader--numeric']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--sortable']), styles['columnHeader--sortable']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--sorted']), styles['columnHeader--sorted']), _defineProperty({}, "& .".concat(gridClasses['columnHeader--withRightBorder']), styles['columnHeader--withRightBorder']), _defineProperty({}, "& .".concat(gridClasses.columnHeader), styles.columnHeader), _defineProperty({}, "& .".concat(gridClasses.headerFilterRow), styles.headerFilterRow), _defineProperty({}, "& .".concat(gridClasses.columnHeaderCheckbox), styles.columnHeaderCheckbox), _defineProperty({}, "& .".concat(gridClasses.columnHeaderDraggableContainer), styles.columnHeaderDraggableContainer), _defineProperty({}, "& .".concat(gridClasses.columnHeaderTitleContainer), styles.columnHeaderTitleContainer), _defineProperty({}, "& .".concat(gridClasses['columnSeparator--resizable']), styles['columnSeparator--resizable']), _defineProperty({}, "& .".concat(gridClasses['columnSeparator--resizing']), styles['columnSeparator--resizing']), _defineProperty({}, "& .".concat(gridClasses.columnSeparator), styles.columnSeparator), _defineProperty({}, "& .".concat(gridClasses.filterIcon), styles.filterIcon), _defineProperty({}, "& .".concat(gridClasses.iconSeparator), styles.iconSeparator), _defineProperty({}, "& .".concat(gridClasses.menuIcon), styles.menuIcon), _defineProperty({}, "& .".concat(gridClasses.menuIconButton), styles.menuIconButton), _defineProperty({}, "& .".concat(gridClasses.menuOpen), styles.menuOpen), _defineProperty({}, "& .".concat(gridClasses.menuList), styles.menuList), _defineProperty({}, "& .".concat(gridClasses['row--editable']), styles['row--editable']), _defineProperty({}, "& .".concat(gridClasses['row--editing']), styles['row--editing']), _defineProperty({}, "& .".concat(gridClasses['row--dragging']), styles['row--dragging']), _defineProperty({}, "& .".concat(gridClasses.row), styles.row), _defineProperty({}, "& .".concat(gridClasses.rowReorderCellPlaceholder), styles.rowReorderCellPlaceholder), _defineProperty({}, "& .".concat(gridClasses.rowReorderCell), styles.rowReorderCell), _defineProperty({}, "& .".concat(gridClasses['rowReorderCell--draggable']), styles['rowReorderCell--draggable']), _defineProperty({}, "& .".concat(gridClasses.sortIcon), styles.sortIcon), _defineProperty({}, "& .".concat(gridClasses.withBorderColor), styles.withBorderColor), _defineProperty({}, "& .".concat(gridClasses.treeDataGroupingCell), styles.treeDataGroupingCell), _defineProperty({}, "& .".concat(gridClasses.treeDataGroupingCellToggle), styles.treeDataGroupingCellToggle), _defineProperty({}, "& .".concat(gridClasses.detailPanelToggleCell), styles.detailPanelToggleCell), _defineProperty({}, "& .".concat(gridClasses['detailPanelToggleCell--expanded']), styles['detailPanelToggleCell--expanded']), styles.root];
|
|
32
31
|
}
|
|
33
32
|
})(function (_ref61) {
|
|
34
|
-
var
|
|
33
|
+
var _extends2;
|
|
35
34
|
var theme = _ref61.theme;
|
|
36
35
|
var borderColor = getBorderColor(theme);
|
|
37
36
|
var radius = theme.shape.borderRadius;
|
|
@@ -57,45 +56,45 @@ export var GridRootStyles = styled('div', {
|
|
|
57
56
|
minHeight: 0,
|
|
58
57
|
flexDirection: 'column',
|
|
59
58
|
overflowAnchor: 'none'
|
|
60
|
-
}, _defineProperty(_extends2, "&.".concat(gridClasses.autoHeight), _defineProperty({
|
|
59
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "&.".concat(gridClasses.autoHeight), _defineProperty({
|
|
61
60
|
height: 'auto'
|
|
62
61
|
}, "& .".concat(gridClasses['row--lastVisible'], " .").concat(gridClasses.cell), {
|
|
63
62
|
borderBottomColor: 'transparent'
|
|
64
|
-
})),
|
|
63
|
+
})), "&.".concat(gridClasses.autosizing), _defineProperty(_defineProperty({}, "& .".concat(gridClasses.columnHeaderTitleContainerContent, " > *"), {
|
|
65
64
|
overflow: 'visible !important'
|
|
66
|
-
}),
|
|
65
|
+
}), "& .".concat(gridClasses.cell, " > *"), {
|
|
67
66
|
overflow: 'visible !important',
|
|
68
67
|
whiteSpace: 'nowrap'
|
|
69
|
-
})
|
|
68
|
+
})), "& .".concat(gridClasses['virtualScrollerContent--overflowed'], " .").concat(gridClasses['row--lastVisible'], " .").concat(gridClasses.cell), {
|
|
70
69
|
borderBottomColor: 'transparent'
|
|
71
|
-
}),
|
|
70
|
+
}), "& .".concat(gridClasses.columnHeader, ", & .").concat(gridClasses.cell), {
|
|
72
71
|
WebkitTapHighlightColor: 'transparent',
|
|
73
72
|
lineHeight: null,
|
|
74
73
|
padding: '0 10px',
|
|
75
74
|
boxSizing: 'border-box'
|
|
76
|
-
}),
|
|
75
|
+
}), "& .".concat(gridClasses.columnHeader, ":focus-within, & .").concat(gridClasses.cell, ":focus-within"), {
|
|
77
76
|
outline: "solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette.primary.mainChannel, " / 0.5)") : alpha(theme.palette.primary.main, 0.5), " 1px"),
|
|
78
77
|
outlineWidth: 1,
|
|
79
78
|
outlineOffset: -1
|
|
80
|
-
}),
|
|
79
|
+
}), "& .".concat(gridClasses.columnHeader, ":focus, & .").concat(gridClasses.cell, ":focus"), {
|
|
81
80
|
outline: "solid ".concat(theme.palette.primary.main, " 1px")
|
|
82
|
-
}),
|
|
81
|
+
}), "& .".concat(gridClasses.columnHeaderCheckbox, ", & .").concat(gridClasses.cellCheckbox), {
|
|
83
82
|
padding: 0,
|
|
84
83
|
justifyContent: 'center',
|
|
85
84
|
alignItems: 'center'
|
|
86
|
-
}),
|
|
85
|
+
}), "& .".concat(gridClasses.columnHeader), {
|
|
87
86
|
position: 'relative',
|
|
88
87
|
display: 'flex',
|
|
89
88
|
alignItems: 'center'
|
|
90
|
-
}),
|
|
89
|
+
}), "& .".concat(gridClasses['columnHeader--sorted'], " .").concat(gridClasses.iconButtonContainer, ", & .").concat(gridClasses['columnHeader--filtered'], " .").concat(gridClasses.iconButtonContainer), {
|
|
91
90
|
visibility: 'visible',
|
|
92
91
|
width: 'auto'
|
|
93
|
-
}),
|
|
92
|
+
}), "& .".concat(gridClasses.columnHeader, ":not(.").concat(gridClasses['columnHeader--sorted'], ") .").concat(gridClasses.sortIcon), {
|
|
94
93
|
opacity: 0,
|
|
95
94
|
transition: theme.transitions.create(['opacity'], {
|
|
96
95
|
duration: theme.transitions.duration.shorter
|
|
97
96
|
})
|
|
98
|
-
}), _defineProperty(_extends2, "& .".concat(gridClasses.columnHeaderTitleContainer), {
|
|
97
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(gridClasses.columnHeaderTitleContainer), {
|
|
99
98
|
display: 'flex',
|
|
100
99
|
alignItems: 'center',
|
|
101
100
|
minWidth: 0,
|
|
@@ -104,39 +103,39 @@ export var GridRootStyles = styled('div', {
|
|
|
104
103
|
overflow: 'hidden',
|
|
105
104
|
// to anchor the aggregation label
|
|
106
105
|
position: 'relative'
|
|
107
|
-
}),
|
|
106
|
+
}), "& .".concat(gridClasses.columnHeaderTitleContainerContent), {
|
|
108
107
|
overflow: 'hidden',
|
|
109
108
|
display: 'flex',
|
|
110
109
|
alignItems: 'center'
|
|
111
|
-
}),
|
|
110
|
+
}), "& .".concat(gridClasses['columnHeader--filledGroup'], " .").concat(gridClasses.columnHeaderTitleContainer), {
|
|
112
111
|
borderBottomWidth: '1px',
|
|
113
112
|
borderBottomStyle: 'solid',
|
|
114
113
|
boxSizing: 'border-box'
|
|
115
|
-
}),
|
|
114
|
+
}), "& .".concat(gridClasses['columnHeader--filledGroup'], ".").concat(gridClasses['columnHeader--showColumnBorder'], " .").concat(gridClasses.columnHeaderTitleContainer), {
|
|
116
115
|
borderBottom: "none"
|
|
117
|
-
}),
|
|
116
|
+
}), "& .".concat(gridClasses['columnHeader--filledGroup'], ".").concat(gridClasses['columnHeader--showColumnBorder']), {
|
|
118
117
|
borderBottomWidth: '1px',
|
|
119
118
|
borderBottomStyle: 'solid',
|
|
120
119
|
boxSizing: 'border-box'
|
|
121
|
-
}),
|
|
120
|
+
}), "& .".concat(gridClasses.headerFilterRow), {
|
|
122
121
|
borderTop: "1px solid ".concat(borderColor)
|
|
123
|
-
}),
|
|
122
|
+
}), "& .".concat(gridClasses.sortIcon, ", & .").concat(gridClasses.filterIcon), {
|
|
124
123
|
fontSize: 'inherit'
|
|
125
|
-
}),
|
|
124
|
+
}), "& .".concat(gridClasses['columnHeader--sortable']), {
|
|
126
125
|
cursor: 'pointer'
|
|
127
|
-
}),
|
|
126
|
+
}), "& .".concat(gridClasses['columnHeader--alignCenter'], " .").concat(gridClasses.columnHeaderTitleContainer), {
|
|
128
127
|
justifyContent: 'center'
|
|
129
|
-
}),
|
|
128
|
+
}), "& .".concat(gridClasses['columnHeader--alignRight'], " .").concat(gridClasses.columnHeaderDraggableContainer, ", & .").concat(gridClasses['columnHeader--alignRight'], " .").concat(gridClasses.columnHeaderTitleContainer), {
|
|
130
129
|
flexDirection: 'row-reverse'
|
|
131
|
-
}), _defineProperty(_extends2, "& .".concat(gridClasses['columnHeader--alignCenter'], " .").concat(gridClasses.menuIcon, ", & .").concat(gridClasses['columnHeader--alignRight'], " .").concat(gridClasses.menuIcon), {
|
|
130
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(gridClasses['columnHeader--alignCenter'], " .").concat(gridClasses.menuIcon, ", & .").concat(gridClasses['columnHeader--alignRight'], " .").concat(gridClasses.menuIcon), {
|
|
132
131
|
marginRight: 'auto',
|
|
133
132
|
marginLeft: -6
|
|
134
|
-
}),
|
|
133
|
+
}), "& .".concat(gridClasses['columnHeader--alignRight'], " .").concat(gridClasses.menuIcon, ", & .").concat(gridClasses['columnHeader--alignRight'], " .").concat(gridClasses.menuIcon), {
|
|
135
134
|
marginRight: 'auto',
|
|
136
135
|
marginLeft: -10
|
|
137
|
-
}),
|
|
136
|
+
}), "& .".concat(gridClasses['columnHeader--moving']), {
|
|
138
137
|
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
139
|
-
}),
|
|
138
|
+
}), "& .".concat(gridClasses.columnSeparator), {
|
|
140
139
|
visibility: 'hidden',
|
|
141
140
|
position: 'absolute',
|
|
142
141
|
zIndex: 100,
|
|
@@ -144,13 +143,13 @@ export var GridRootStyles = styled('div', {
|
|
|
144
143
|
flexDirection: 'column',
|
|
145
144
|
justifyContent: 'center',
|
|
146
145
|
color: borderColor
|
|
147
|
-
}),
|
|
146
|
+
}), '@media (hover: hover)', _defineProperty(_defineProperty(_defineProperty({}, "& .".concat(gridClasses.columnHeaders, ":hover"), columnHeadersStyles), "& .".concat(gridClasses.columnHeader, ":hover"), columnHeaderStyles), "& .".concat(gridClasses.columnHeader, ":not(.").concat(gridClasses['columnHeader--sorted'], "):hover .").concat(gridClasses.sortIcon), {
|
|
148
147
|
opacity: 0.5
|
|
149
|
-
})
|
|
148
|
+
})), '@media (hover: none)', _defineProperty(_defineProperty({}, "& .".concat(gridClasses.columnHeaders), columnHeadersStyles), "& .".concat(gridClasses.columnHeader), columnHeaderStyles)), "& .".concat(gridClasses['columnSeparator--sideLeft']), {
|
|
150
149
|
left: -12
|
|
151
|
-
}),
|
|
150
|
+
}), "& .".concat(gridClasses['columnSeparator--sideRight']), {
|
|
152
151
|
right: -12
|
|
153
|
-
}),
|
|
152
|
+
}), "& .".concat(gridClasses['columnSeparator--resizable']), _defineProperty(_defineProperty({
|
|
154
153
|
cursor: 'col-resize',
|
|
155
154
|
touchAction: 'none',
|
|
156
155
|
'&:hover': {
|
|
@@ -160,23 +159,23 @@ export var GridRootStyles = styled('div', {
|
|
|
160
159
|
color: borderColor
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
|
-
},
|
|
162
|
+
}, "&.".concat(gridClasses['columnSeparator--resizing']), {
|
|
164
163
|
color: (theme.vars || theme).palette.text.primary
|
|
165
|
-
}),
|
|
164
|
+
}), '& svg', {
|
|
166
165
|
pointerEvents: 'none'
|
|
167
|
-
})
|
|
166
|
+
})), "& .".concat(gridClasses.iconSeparator), {
|
|
168
167
|
color: 'inherit'
|
|
169
|
-
}), _defineProperty(_extends2, "& .".concat(gridClasses.menuIcon), {
|
|
168
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(gridClasses.menuIcon), {
|
|
170
169
|
width: 0,
|
|
171
170
|
visibility: 'hidden',
|
|
172
171
|
fontSize: 20,
|
|
173
172
|
marginRight: -10,
|
|
174
173
|
display: 'flex',
|
|
175
174
|
alignItems: 'center'
|
|
176
|
-
}),
|
|
175
|
+
}), ".".concat(gridClasses.menuOpen), {
|
|
177
176
|
visibility: 'visible',
|
|
178
177
|
width: 'auto'
|
|
179
|
-
}),
|
|
178
|
+
}), "& .".concat(gridClasses.row), {
|
|
180
179
|
display: 'flex',
|
|
181
180
|
width: 'fit-content',
|
|
182
181
|
breakInside: 'avoid',
|
|
@@ -198,7 +197,7 @@ export var GridRootStyles = styled('div', {
|
|
|
198
197
|
}
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
|
-
}),
|
|
200
|
+
}), "& .".concat(gridClasses.cell), {
|
|
202
201
|
display: 'flex',
|
|
203
202
|
alignItems: 'center',
|
|
204
203
|
borderBottom: '1px solid',
|
|
@@ -212,17 +211,17 @@ export var GridRootStyles = styled('div', {
|
|
|
212
211
|
}
|
|
213
212
|
}
|
|
214
213
|
}
|
|
215
|
-
}),
|
|
214
|
+
}), "&.".concat(gridClasses['root--disableUserSelection'], " .").concat(gridClasses.cell), {
|
|
216
215
|
userSelect: 'none'
|
|
217
|
-
}),
|
|
216
|
+
}), "& .".concat(gridClasses.row, ":not(.").concat(gridClasses['row--dynamicHeight'], ") > .").concat(gridClasses.cell), {
|
|
218
217
|
overflow: 'hidden',
|
|
219
218
|
whiteSpace: 'nowrap'
|
|
220
|
-
}),
|
|
219
|
+
}), "& .".concat(gridClasses.cellContent), {
|
|
221
220
|
overflow: 'hidden',
|
|
222
221
|
textOverflow: 'ellipsis'
|
|
223
|
-
}),
|
|
222
|
+
}), "& .".concat(gridClasses.cell, ".").concat(gridClasses['cell--selectionMode']), {
|
|
224
223
|
cursor: 'default'
|
|
225
|
-
}),
|
|
224
|
+
}), "& .".concat(gridClasses.cell, ".").concat(gridClasses['cell--editing']), {
|
|
226
225
|
padding: 1,
|
|
227
226
|
display: 'flex',
|
|
228
227
|
boxShadow: theme.shadows[2],
|
|
@@ -231,85 +230,85 @@ export var GridRootStyles = styled('div', {
|
|
|
231
230
|
outline: "solid ".concat((theme.vars || theme).palette.primary.main, " 1px"),
|
|
232
231
|
outlineOffset: '-1px'
|
|
233
232
|
}
|
|
234
|
-
}),
|
|
233
|
+
}), "& .".concat(gridClasses['row--editing']), {
|
|
235
234
|
boxShadow: theme.shadows[2]
|
|
236
|
-
}), _defineProperty(_extends2, "& .".concat(gridClasses['row--editing'], " .").concat(gridClasses.cell), {
|
|
235
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(gridClasses['row--editing'], " .").concat(gridClasses.cell), {
|
|
237
236
|
boxShadow: theme.shadows[0],
|
|
238
237
|
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
239
|
-
}),
|
|
238
|
+
}), "& .".concat(gridClasses.editBooleanCell), {
|
|
240
239
|
display: 'flex',
|
|
241
240
|
height: '100%',
|
|
242
241
|
width: '100%',
|
|
243
242
|
alignItems: 'center',
|
|
244
243
|
justifyContent: 'center'
|
|
245
|
-
}),
|
|
244
|
+
}), "& .".concat(gridClasses.booleanCell, "[data-value=\"true\"]"), {
|
|
246
245
|
color: (theme.vars || theme).palette.text.secondary
|
|
247
|
-
}),
|
|
246
|
+
}), "& .".concat(gridClasses.booleanCell, "[data-value=\"false\"]"), {
|
|
248
247
|
color: (theme.vars || theme).palette.text.disabled
|
|
249
|
-
}),
|
|
248
|
+
}), "& .".concat(gridClasses.actionsCell), {
|
|
250
249
|
display: 'inline-flex',
|
|
251
250
|
alignItems: 'center',
|
|
252
251
|
gridGap: theme.spacing(1)
|
|
253
|
-
}),
|
|
252
|
+
}), "& .".concat(gridClasses.rowReorderCell), {
|
|
254
253
|
display: 'inline-flex',
|
|
255
254
|
flex: 1,
|
|
256
255
|
alignItems: 'center',
|
|
257
256
|
justifyContent: 'center',
|
|
258
257
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
259
|
-
}),
|
|
258
|
+
}), "& .".concat(gridClasses['rowReorderCell--draggable']), {
|
|
260
259
|
cursor: 'move',
|
|
261
260
|
opacity: 1
|
|
262
|
-
}),
|
|
261
|
+
}), "& .".concat(gridClasses.rowReorderCellContainer), {
|
|
263
262
|
padding: 0,
|
|
264
263
|
alignItems: 'stretch'
|
|
265
|
-
}),
|
|
264
|
+
}), ".".concat(gridClasses.withBorderColor), {
|
|
266
265
|
borderColor: borderColor
|
|
267
|
-
}),
|
|
266
|
+
}), "& .".concat(gridClasses['cell--withRightBorder']), {
|
|
268
267
|
borderRightWidth: '1px',
|
|
269
268
|
borderRightStyle: 'solid'
|
|
270
|
-
}), _defineProperty(_extends2, "& .".concat(gridClasses['columnHeader--withRightBorder']), {
|
|
269
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extends2, "& .".concat(gridClasses['columnHeader--withRightBorder']), {
|
|
271
270
|
borderRightWidth: '1px',
|
|
272
271
|
borderRightStyle: 'solid'
|
|
273
|
-
}),
|
|
272
|
+
}), "& .".concat(gridClasses['cell--textLeft']), {
|
|
274
273
|
justifyContent: 'flex-start'
|
|
275
|
-
}),
|
|
274
|
+
}), "& .".concat(gridClasses['cell--textRight']), {
|
|
276
275
|
justifyContent: 'flex-end'
|
|
277
|
-
}),
|
|
276
|
+
}), "& .".concat(gridClasses['cell--textCenter']), {
|
|
278
277
|
justifyContent: 'center'
|
|
279
|
-
}),
|
|
278
|
+
}), "& .".concat(gridClasses.columnHeaderDraggableContainer), {
|
|
280
279
|
display: 'flex',
|
|
281
280
|
width: '100%',
|
|
282
281
|
height: '100%'
|
|
283
|
-
}),
|
|
282
|
+
}), "& .".concat(gridClasses.rowReorderCellPlaceholder), {
|
|
284
283
|
display: 'none'
|
|
285
|
-
}),
|
|
284
|
+
}), "& .".concat(gridClasses['columnHeader--dragging'], ", & .").concat(gridClasses['row--dragging']), {
|
|
286
285
|
background: (theme.vars || theme).palette.background.paper,
|
|
287
286
|
padding: '0 12px',
|
|
288
287
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
289
288
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
290
|
-
}),
|
|
289
|
+
}), "& .".concat(gridClasses['row--dragging']), _defineProperty({
|
|
291
290
|
background: (theme.vars || theme).palette.background.paper,
|
|
292
291
|
padding: '0 12px',
|
|
293
292
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
294
293
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
295
294
|
}, "& .".concat(gridClasses.rowReorderCellPlaceholder), {
|
|
296
295
|
display: 'flex'
|
|
297
|
-
})),
|
|
296
|
+
})), "& .".concat(gridClasses.treeDataGroupingCell), {
|
|
298
297
|
display: 'flex',
|
|
299
298
|
alignItems: 'center',
|
|
300
299
|
width: '100%'
|
|
301
|
-
}),
|
|
300
|
+
}), "& .".concat(gridClasses.treeDataGroupingCellToggle), {
|
|
302
301
|
flex: '0 0 28px',
|
|
303
302
|
alignSelf: 'stretch',
|
|
304
303
|
marginRight: theme.spacing(2)
|
|
305
|
-
}), _defineProperty(_extends2, "& .".concat(gridClasses.groupingCriteriaCell), {
|
|
304
|
+
}), _defineProperty(_defineProperty(_extends2, "& .".concat(gridClasses.groupingCriteriaCell), {
|
|
306
305
|
display: 'flex',
|
|
307
306
|
alignItems: 'center',
|
|
308
307
|
width: '100%'
|
|
309
|
-
}),
|
|
308
|
+
}), "& .".concat(gridClasses.groupingCriteriaCellToggle), {
|
|
310
309
|
flex: '0 0 28px',
|
|
311
310
|
alignSelf: 'stretch',
|
|
312
311
|
marginRight: theme.spacing(2)
|
|
313
|
-
})
|
|
312
|
+
})));
|
|
314
313
|
return gridStyle;
|
|
315
314
|
});
|
|
@@ -21,9 +21,8 @@ var GridToolbarQuickFilterRoot = styled(TextField, {
|
|
|
21
21
|
return styles.toolbarQuickFilter;
|
|
22
22
|
}
|
|
23
23
|
})(function (_ref) {
|
|
24
|
-
var _ref2;
|
|
25
24
|
var theme = _ref.theme;
|
|
26
|
-
return
|
|
25
|
+
return _defineProperty(_defineProperty({
|
|
27
26
|
width: 'auto',
|
|
28
27
|
paddingBottom: theme.spacing(0.5),
|
|
29
28
|
'& input': {
|
|
@@ -32,15 +31,15 @@ var GridToolbarQuickFilterRoot = styled(TextField, {
|
|
|
32
31
|
'& .MuiInput-underline:before': {
|
|
33
32
|
borderBottom: "1px solid ".concat((theme.vars || theme).palette.divider)
|
|
34
33
|
}
|
|
35
|
-
},
|
|
34
|
+
}, "& input[type=search]::-ms-clear,\n& input[type=search]::-ms-reveal", {
|
|
36
35
|
/* clears the 'X' icon from IE */
|
|
37
36
|
display: 'none',
|
|
38
37
|
width: 0,
|
|
39
38
|
height: 0
|
|
40
|
-
}),
|
|
39
|
+
}), "& input[type=\"search\"]::-webkit-search-decoration,\n & input[type=\"search\"]::-webkit-search-cancel-button,\n & input[type=\"search\"]::-webkit-search-results-button,\n & input[type=\"search\"]::-webkit-search-results-decoration", {
|
|
41
40
|
/* clears the 'X' icon from Chrome */
|
|
42
41
|
display: 'none'
|
|
43
|
-
})
|
|
42
|
+
});
|
|
44
43
|
});
|
|
45
44
|
var defaultSearchValueParser = function defaultSearchValueParser(searchText) {
|
|
46
45
|
return searchText.split(' ').filter(function (word) {
|
|
@@ -140,12 +139,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
140
139
|
* Function responsible for formatting values of quick filter in a string when the model is modified
|
|
141
140
|
* @param {any[]} values The new values passed to the quick filter model
|
|
142
141
|
* @returns {string} The string to display in the text field
|
|
142
|
+
* @default (values: string[]) => values.join(' ')
|
|
143
143
|
*/
|
|
144
144
|
quickFilterFormatter: PropTypes.func,
|
|
145
145
|
/**
|
|
146
146
|
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
|
147
147
|
* @param {string} input The value entered by the user
|
|
148
148
|
* @returns {any[]} The array of value on which quick filter is applied
|
|
149
|
+
* @default (searchText: string) => searchText
|
|
150
|
+
* .split(' ')
|
|
151
|
+
* .filter((word) => word !== '')
|
|
149
152
|
*/
|
|
150
153
|
quickFilterParser: PropTypes.func
|
|
151
154
|
} : void 0;
|
|
@@ -29,7 +29,6 @@ var VirtualScrollerRoot = styled('div', {
|
|
|
29
29
|
},
|
|
30
30
|
zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
|
|
31
31
|
});
|
|
32
|
-
|
|
33
32
|
var GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
|
|
34
33
|
var rootProps = useGridRootProps();
|
|
35
34
|
var classes = useUtilityClasses(rootProps);
|
|
@@ -88,7 +88,6 @@ export var useGridCellEditing = function useGridCellEditing(apiRef, props) {
|
|
|
88
88
|
reason = event.shiftKey ? GridCellEditStopReasons.shiftTabKeyDown : GridCellEditStopReasons.tabKeyDown;
|
|
89
89
|
event.preventDefault(); // Prevent going to the next element in the tab sequence
|
|
90
90
|
}
|
|
91
|
-
|
|
92
91
|
if (reason) {
|
|
93
92
|
var newParams = _extends({}, params, {
|
|
94
93
|
reason: reason
|
|
@@ -178,7 +177,6 @@ export var useGridCellEditing = function useGridCellEditing(apiRef, props) {
|
|
|
178
177
|
if (props.cellModesModel && isNewModelDifferentFromProp) {
|
|
179
178
|
return; // The prop always win
|
|
180
179
|
}
|
|
181
|
-
|
|
182
180
|
setCellModesModel(newModel);
|
|
183
181
|
cellModesModelRef.current = newModel;
|
|
184
182
|
apiRef.current.publishEvent('cellModesModelChange', newModel);
|
|
@@ -243,7 +243,6 @@ export var useGridRowEditing = function useGridRowEditing(apiRef, props) {
|
|
|
243
243
|
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
|
244
244
|
return; // The prop always win
|
|
245
245
|
}
|
|
246
|
-
|
|
247
246
|
setRowModesModel(newModel);
|
|
248
247
|
rowModesModelRef.current = newModel;
|
|
249
248
|
apiRef.current.publishEvent('rowModesModelChange', newModel);
|
|
@@ -135,7 +135,10 @@ export var getTreeNodeDescendants = function getTreeNodeDescendants(tree, parent
|
|
|
135
135
|
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
|
|
136
136
|
validDescendants.push(child);
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
var childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
|
139
|
+
for (var j = 0; j < childDescendants.length; j += 1) {
|
|
140
|
+
validDescendants.push(childDescendants[j]);
|
|
141
|
+
}
|
|
139
142
|
}
|
|
140
143
|
if (!skipAutoGeneratedRows && node.footerId != null) {
|
|
141
144
|
validDescendants.push(node.footerId);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _wrapNativeSuper from "@babel/runtime/helpers/esm/wrapNativeSuper";
|
|
7
|
-
function
|
|
8
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { getGridCellElement, getGridColumnHeaderElement, getGridRowElement } from '../../../utils/domUtils';
|
|
11
11
|
import { GRID_ID_AUTOGENERATED } from './gridRowsUtils';
|
|
@@ -13,10 +13,9 @@ import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
|
13
13
|
import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector';
|
|
14
14
|
export var MissingRowIdError = /*#__PURE__*/function (_Error) {
|
|
15
15
|
_inherits(MissingRowIdError, _Error);
|
|
16
|
-
var _super = _createSuper(MissingRowIdError);
|
|
17
16
|
function MissingRowIdError() {
|
|
18
17
|
_classCallCheck(this, MissingRowIdError);
|
|
19
|
-
return
|
|
18
|
+
return _callSuper(this, MissingRowIdError, arguments);
|
|
20
19
|
}
|
|
21
20
|
return _createClass(MissingRowIdError);
|
|
22
21
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
@@ -68,7 +68,6 @@ export var useGridRowsMeta = function useGridRowsMeta(apiRef, props) {
|
|
|
68
68
|
needsFirstMeasurement: true // Assume all rows will need to be measured by default
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
|
|
72
71
|
var _rowsHeightLookup$cur = rowsHeightLookup.current[row.id],
|
|
73
72
|
isResized = _rowsHeightLookup$cur.isResized,
|
|
74
73
|
needsFirstMeasurement = _rowsHeightLookup$cur.needsFirstMeasurement,
|
|
@@ -585,7 +585,6 @@ export var useGridVirtualScroller = function useGridVirtualScroller(props) {
|
|
|
585
585
|
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
586
586
|
size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
587
587
|
}
|
|
588
|
-
|
|
589
588
|
return size;
|
|
590
589
|
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
591
590
|
React.useEffect(function () {
|
package/legacy/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// This allows not to bump the minimal version of `@mui/material` in peerDependencies which results
|
|
4
4
|
// in broader compatibility between the packages.
|
|
5
5
|
// See https://github.com/mui/mui-x/pull/7646#issuecomment-1404605556 for additional context.
|
|
6
|
+
|
|
6
7
|
export var beBYCore = {
|
|
7
8
|
components: {
|
|
8
9
|
MuiTablePagination: {
|
package/legacy/locales/plPL.js
CHANGED
package/legacy/utils/utils.js
CHANGED
package/locales/coreLocales.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// This allows not to bump the minimal version of `@mui/material` in peerDependencies which results
|
|
4
4
|
// in broader compatibility between the packages.
|
|
5
5
|
// See https://github.com/mui/mui-x/pull/7646#issuecomment-1404605556 for additional context.
|
|
6
|
+
|
|
6
7
|
export const beBYCore = {
|
|
7
8
|
components: {
|
|
8
9
|
MuiTablePagination: {
|
package/locales/plPL.js
CHANGED
|
@@ -31,7 +31,6 @@ const GridOverlayWrapperRoot = styled('div', {
|
|
|
31
31
|
zIndex: overlayType === 'loadingOverlay' ? 5 // Should be above pinned columns, pinned rows, and detail panel
|
|
32
32
|
: 4 // Should be above pinned columns and detail panel
|
|
33
33
|
}));
|
|
34
|
-
|
|
35
34
|
const GridOverlayWrapperInner = styled('div', {
|
|
36
35
|
name: 'MuiDataGrid',
|
|
37
36
|
slot: 'OverlayWrapperInner',
|
|
@@ -62,7 +61,6 @@ function GridOverlayWrapper(props) {
|
|
|
62
61
|
if (rootProps.autoHeight && height === 0) {
|
|
63
62
|
height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
64
63
|
}
|
|
65
|
-
|
|
66
64
|
const classes = useUtilityClasses(_extends({}, props, {
|
|
67
65
|
classes: rootProps.classes
|
|
68
66
|
}));
|
|
@@ -126,7 +126,6 @@ function GridActionsCell(props) {
|
|
|
126
126
|
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
|
127
127
|
return; // We're already in the first or last item = do nothing and let the grid listen the event
|
|
128
128
|
}
|
|
129
|
-
|
|
130
129
|
if (newIndex !== focusedButtonIndex) {
|
|
131
130
|
event.preventDefault(); // Prevent scrolling
|
|
132
131
|
event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
|
|
@@ -123,12 +123,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
123
123
|
* Function responsible for formatting values of quick filter in a string when the model is modified
|
|
124
124
|
* @param {any[]} values The new values passed to the quick filter model
|
|
125
125
|
* @returns {string} The string to display in the text field
|
|
126
|
+
* @default (values: string[]) => values.join(' ')
|
|
126
127
|
*/
|
|
127
128
|
quickFilterFormatter: PropTypes.func,
|
|
128
129
|
/**
|
|
129
130
|
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
|
130
131
|
* @param {string} input The value entered by the user
|
|
131
132
|
* @returns {any[]} The array of value on which quick filter is applied
|
|
133
|
+
* @default (searchText: string) => searchText
|
|
134
|
+
* .split(' ')
|
|
135
|
+
* .filter((word) => word !== '')
|
|
132
136
|
*/
|
|
133
137
|
quickFilterParser: PropTypes.func
|
|
134
138
|
} : void 0;
|
|
@@ -29,7 +29,6 @@ const VirtualScrollerRoot = styled('div', {
|
|
|
29
29
|
},
|
|
30
30
|
zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
|
|
31
31
|
});
|
|
32
|
-
|
|
33
32
|
const GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
|
|
34
33
|
const rootProps = useGridRootProps();
|
|
35
34
|
const classes = useUtilityClasses(rootProps);
|
|
@@ -81,7 +81,6 @@ export const useGridCellEditing = (apiRef, props) => {
|
|
|
81
81
|
reason = event.shiftKey ? GridCellEditStopReasons.shiftTabKeyDown : GridCellEditStopReasons.tabKeyDown;
|
|
82
82
|
event.preventDefault(); // Prevent going to the next element in the tab sequence
|
|
83
83
|
}
|
|
84
|
-
|
|
85
84
|
if (reason) {
|
|
86
85
|
const newParams = _extends({}, params, {
|
|
87
86
|
reason
|
|
@@ -175,7 +174,6 @@ export const useGridCellEditing = (apiRef, props) => {
|
|
|
175
174
|
if (props.cellModesModel && isNewModelDifferentFromProp) {
|
|
176
175
|
return; // The prop always win
|
|
177
176
|
}
|
|
178
|
-
|
|
179
177
|
setCellModesModel(newModel);
|
|
180
178
|
cellModesModelRef.current = newModel;
|
|
181
179
|
apiRef.current.publishEvent('cellModesModelChange', newModel);
|