@mui/x-data-grid 6.19.1 → 6.19.3
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 +84 -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/heIL.js +7 -8
- package/legacy/locales/plPL.js +0 -1
- package/legacy/utils/utils.js +0 -1
- package/locales/coreLocales.js +1 -0
- package/locales/heIL.js +7 -8
- 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/heIL.js +7 -8
- 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/heIL.js +7 -8
- 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
|
@@ -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);
|
|
@@ -239,7 +239,6 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
239
239
|
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
|
240
240
|
return; // The prop always win
|
|
241
241
|
}
|
|
242
|
-
|
|
243
242
|
setRowModesModel(newModel);
|
|
244
243
|
rowModesModelRef.current = newModel;
|
|
245
244
|
apiRef.current.publishEvent('rowModesModelChange', newModel);
|
|
@@ -131,7 +131,10 @@ export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) =>
|
|
|
131
131
|
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
|
|
132
132
|
validDescendants.push(child);
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
|
135
|
+
for (let j = 0; j < childDescendants.length; j += 1) {
|
|
136
|
+
validDescendants.push(childDescendants[j]);
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
139
|
if (!skipAutoGeneratedRows && node.footerId != null) {
|
|
137
140
|
validDescendants.push(node.footerId);
|
|
@@ -550,7 +550,6 @@ export const useGridVirtualScroller = props => {
|
|
|
550
550
|
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
551
551
|
size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
552
552
|
}
|
|
553
|
-
|
|
554
553
|
return size;
|
|
555
554
|
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
556
555
|
React.useEffect(() => {
|
package/modern/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 const beBYCore = {
|
|
7
8
|
components: {
|
|
8
9
|
MuiTablePagination: {
|
package/modern/locales/heIL.js
CHANGED
|
@@ -60,13 +60,12 @@ const heILGrid = {
|
|
|
60
60
|
filterOperatorIsEmpty: 'ריק',
|
|
61
61
|
filterOperatorIsNotEmpty: 'אינו ריק',
|
|
62
62
|
filterOperatorIsAnyOf: 'הוא אחד מ-',
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
70
69
|
// Header filter operators text
|
|
71
70
|
headerFilterOperatorContains: 'מכיל',
|
|
72
71
|
headerFilterOperatorEquals: 'שווה',
|
|
@@ -134,7 +133,7 @@ const heILGrid = {
|
|
|
134
133
|
groupColumn: name => `קבץ לפי ${name}`,
|
|
135
134
|
unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
|
|
136
135
|
// Master/detail
|
|
137
|
-
|
|
136
|
+
detailPanelToggle: 'הצג/הסתר פרטים',
|
|
138
137
|
expandDetailPanel: 'הרחב',
|
|
139
138
|
collapseDetailPanel: 'כווץ',
|
|
140
139
|
// Row reordering text
|
package/modern/locales/plPL.js
CHANGED
package/modern/utils/utils.js
CHANGED
|
@@ -40,7 +40,6 @@ const GridOverlayWrapperRoot = (0, _system.styled)('div', {
|
|
|
40
40
|
zIndex: overlayType === 'loadingOverlay' ? 5 // Should be above pinned columns, pinned rows, and detail panel
|
|
41
41
|
: 4 // Should be above pinned columns and detail panel
|
|
42
42
|
}));
|
|
43
|
-
|
|
44
43
|
const GridOverlayWrapperInner = (0, _system.styled)('div', {
|
|
45
44
|
name: 'MuiDataGrid',
|
|
46
45
|
slot: 'OverlayWrapperInner',
|
|
@@ -71,7 +70,6 @@ function GridOverlayWrapper(props) {
|
|
|
71
70
|
if (rootProps.autoHeight && height === 0) {
|
|
72
71
|
height = (0, _gridRowsUtils.getMinimalContentHeight)(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
73
72
|
}
|
|
74
|
-
|
|
75
73
|
const classes = useUtilityClasses((0, _extends2.default)({}, props, {
|
|
76
74
|
classes: rootProps.classes
|
|
77
75
|
}));
|
|
@@ -135,7 +135,6 @@ function GridActionsCell(props) {
|
|
|
135
135
|
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
|
136
136
|
return; // We're already in the first or last item = do nothing and let the grid listen the event
|
|
137
137
|
}
|
|
138
|
-
|
|
139
138
|
if (newIndex !== focusedButtonIndex) {
|
|
140
139
|
event.preventDefault(); // Prevent scrolling
|
|
141
140
|
event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
|
|
@@ -132,12 +132,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
132
132
|
* Function responsible for formatting values of quick filter in a string when the model is modified
|
|
133
133
|
* @param {any[]} values The new values passed to the quick filter model
|
|
134
134
|
* @returns {string} The string to display in the text field
|
|
135
|
+
* @default (values: string[]) => values.join(' ')
|
|
135
136
|
*/
|
|
136
137
|
quickFilterFormatter: _propTypes.default.func,
|
|
137
138
|
/**
|
|
138
139
|
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
|
139
140
|
* @param {string} input The value entered by the user
|
|
140
141
|
* @returns {any[]} The array of value on which quick filter is applied
|
|
142
|
+
* @default (searchText: string) => searchText
|
|
143
|
+
* .split(' ')
|
|
144
|
+
* .filter((word) => word !== '')
|
|
141
145
|
*/
|
|
142
146
|
quickFilterParser: _propTypes.default.func
|
|
143
147
|
} : void 0;
|
|
@@ -38,7 +38,6 @@ const VirtualScrollerRoot = (0, _system.styled)('div', {
|
|
|
38
38
|
},
|
|
39
39
|
zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
|
|
40
40
|
});
|
|
41
|
-
|
|
42
41
|
const GridVirtualScroller = exports.GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
|
|
43
42
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
44
43
|
const classes = useUtilityClasses(rootProps);
|
|
@@ -90,7 +90,6 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
90
90
|
reason = event.shiftKey ? _gridEditCellParams.GridCellEditStopReasons.shiftTabKeyDown : _gridEditCellParams.GridCellEditStopReasons.tabKeyDown;
|
|
91
91
|
event.preventDefault(); // Prevent going to the next element in the tab sequence
|
|
92
92
|
}
|
|
93
|
-
|
|
94
93
|
if (reason) {
|
|
95
94
|
const newParams = (0, _extends2.default)({}, params, {
|
|
96
95
|
reason
|
|
@@ -184,7 +183,6 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
184
183
|
if (props.cellModesModel && isNewModelDifferentFromProp) {
|
|
185
184
|
return; // The prop always win
|
|
186
185
|
}
|
|
187
|
-
|
|
188
186
|
setCellModesModel(newModel);
|
|
189
187
|
cellModesModelRef.current = newModel;
|
|
190
188
|
apiRef.current.publishEvent('cellModesModelChange', newModel);
|
|
@@ -248,7 +248,6 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
248
248
|
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
|
249
249
|
return; // The prop always win
|
|
250
250
|
}
|
|
251
|
-
|
|
252
251
|
setRowModesModel(newModel);
|
|
253
252
|
rowModesModelRef.current = newModel;
|
|
254
253
|
apiRef.current.publishEvent('rowModesModelChange', newModel);
|
|
@@ -149,7 +149,10 @@ const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) => {
|
|
|
149
149
|
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
|
|
150
150
|
validDescendants.push(child);
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
|
153
|
+
for (let j = 0; j < childDescendants.length; j += 1) {
|
|
154
|
+
validDescendants.push(childDescendants[j]);
|
|
155
|
+
}
|
|
153
156
|
}
|
|
154
157
|
if (!skipAutoGeneratedRows && node.footerId != null) {
|
|
155
158
|
validDescendants.push(node.footerId);
|
|
@@ -561,7 +561,6 @@ const useGridVirtualScroller = props => {
|
|
|
561
561
|
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
562
562
|
size.height = (0, _gridRowsUtils.getMinimalContentHeight)(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
563
563
|
}
|
|
564
|
-
|
|
565
564
|
return size;
|
|
566
565
|
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
567
566
|
React.useEffect(() => {
|
package/node/index.js
CHANGED
package/node/locales/heIL.js
CHANGED
|
@@ -66,13 +66,12 @@ const heILGrid = {
|
|
|
66
66
|
filterOperatorIsEmpty: 'ריק',
|
|
67
67
|
filterOperatorIsNotEmpty: 'אינו ריק',
|
|
68
68
|
filterOperatorIsAnyOf: 'הוא אחד מ-',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
76
75
|
// Header filter operators text
|
|
77
76
|
headerFilterOperatorContains: 'מכיל',
|
|
78
77
|
headerFilterOperatorEquals: 'שווה',
|
|
@@ -140,7 +139,7 @@ const heILGrid = {
|
|
|
140
139
|
groupColumn: name => `קבץ לפי ${name}`,
|
|
141
140
|
unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
|
|
142
141
|
// Master/detail
|
|
143
|
-
|
|
142
|
+
detailPanelToggle: 'הצג/הסתר פרטים',
|
|
144
143
|
expandDetailPanel: 'הרחב',
|
|
145
144
|
collapseDetailPanel: 'כווץ',
|
|
146
145
|
// Row reordering text
|
package/node/locales/plPL.js
CHANGED
package/node/utils/utils.js
CHANGED
package/package.json
CHANGED