@mui/x-data-grid 6.18.1 → 6.18.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 +112 -0
- package/components/GridRow.js +2 -4
- package/components/cell/GridEditDateCell.js +1 -20
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/hooks/features/editing/useGridCellEditing.js +8 -21
- package/hooks/features/editing/useGridRowEditing.js +7 -21
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/legacy/components/GridRow.js +2 -4
- package/legacy/components/cell/GridEditDateCell.js +1 -20
- package/legacy/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/legacy/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/legacy/hooks/features/editing/useGridCellEditing.js +8 -21
- package/legacy/hooks/features/editing/useGridRowEditing.js +7 -23
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -1
- package/legacy/locales/arSD.js +1 -1
- package/legacy/locales/bgBG.js +33 -37
- package/legacy/locales/csCZ.js +2 -2
- package/legacy/locales/heIL.js +1 -2
- package/legacy/models/params/gridEditCellParams.js +1 -0
- package/legacy/utils/domUtils.js +10 -1
- package/locales/arSD.js +1 -1
- package/locales/bgBG.js +33 -37
- package/locales/csCZ.js +2 -2
- package/locales/heIL.js +1 -2
- package/models/api/gridEditingApi.d.ts +2 -4
- package/models/params/gridEditCellParams.d.ts +3 -1
- package/models/params/gridEditCellParams.js +1 -0
- package/models/params/gridRowParams.d.ts +1 -0
- package/modern/components/GridRow.js +2 -4
- package/modern/components/cell/GridEditDateCell.js +1 -20
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +8 -21
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -21
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/locales/arSD.js +1 -1
- package/modern/locales/bgBG.js +33 -37
- package/modern/locales/csCZ.js +2 -2
- package/modern/locales/heIL.js +1 -2
- package/modern/models/params/gridEditCellParams.js +1 -0
- package/modern/utils/domUtils.js +10 -1
- package/node/components/GridRow.js +1 -3
- package/node/components/cell/GridEditDateCell.js +1 -20
- package/node/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/node/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/node/hooks/features/editing/useGridCellEditing.js +7 -20
- package/node/hooks/features/editing/useGridRowEditing.js +6 -20
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/locales/arSD.js +1 -1
- package/node/locales/bgBG.js +33 -37
- package/node/locales/csCZ.js +2 -2
- package/node/locales/heIL.js +1 -2
- package/node/models/params/gridEditCellParams.js +1 -0
- package/node/utils/domUtils.js +11 -1
- package/package.json +1 -1
- package/utils/domUtils.d.ts +2 -0
- package/utils/domUtils.js +10 -1
package/node/internals/index.js
CHANGED
|
@@ -84,6 +84,7 @@ var _exportNames = {
|
|
|
84
84
|
unstable_resetCreateSelectorCache: true,
|
|
85
85
|
findParentElementFromClassName: true,
|
|
86
86
|
getActiveElement: true,
|
|
87
|
+
isEventTargetInPortal: true,
|
|
87
88
|
isNavigationKey: true,
|
|
88
89
|
clamp: true,
|
|
89
90
|
isDeepEqual: true,
|
|
@@ -323,6 +324,12 @@ Object.defineProperty(exports, "isDeepEqual", {
|
|
|
323
324
|
return _utils2.isDeepEqual;
|
|
324
325
|
}
|
|
325
326
|
});
|
|
327
|
+
Object.defineProperty(exports, "isEventTargetInPortal", {
|
|
328
|
+
enumerable: true,
|
|
329
|
+
get: function () {
|
|
330
|
+
return _domUtils.isEventTargetInPortal;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
326
333
|
Object.defineProperty(exports, "isFunction", {
|
|
327
334
|
enumerable: true,
|
|
328
335
|
get: function () {
|
package/node/locales/arSD.js
CHANGED
|
@@ -99,7 +99,7 @@ const arSDGrid = {
|
|
|
99
99
|
// Column menu text
|
|
100
100
|
columnMenuLabel: 'القائمة',
|
|
101
101
|
columnMenuShowColumns: 'إظهار الأعمدة',
|
|
102
|
-
|
|
102
|
+
columnMenuManageColumns: 'إدارة الأعمدة',
|
|
103
103
|
columnMenuFilter: 'المرشِح',
|
|
104
104
|
columnMenuHideColumn: 'إخفاء',
|
|
105
105
|
columnMenuUnsort: 'الغاء الفرز',
|
package/node/locales/bgBG.js
CHANGED
|
@@ -66,34 +66,32 @@ const bgBGGrid = {
|
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
headerFilterOperatorContains: 'Съдържа',
|
|
77
|
+
headerFilterOperatorEquals: 'Равнo',
|
|
78
|
+
headerFilterOperatorStartsWith: 'Започва с',
|
|
79
|
+
headerFilterOperatorEndsWith: 'Завършва с',
|
|
80
|
+
headerFilterOperatorIs: 'Равно е на',
|
|
81
|
+
headerFilterOperatorNot: 'Не се равнява на',
|
|
82
|
+
headerFilterOperatorAfter: 'След',
|
|
83
|
+
headerFilterOperatorOnOrAfter: 'След (включително)',
|
|
84
|
+
headerFilterOperatorBefore: 'Преди',
|
|
85
|
+
headerFilterOperatorOnOrBefore: 'Преди (включително)',
|
|
86
|
+
headerFilterOperatorIsEmpty: 'Празен',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: 'Не е празен',
|
|
88
|
+
headerFilterOperatorIsAnyOf: 'Всичко от',
|
|
89
|
+
'headerFilterOperator=': 'Равно',
|
|
90
|
+
'headerFilterOperator!=': 'Различно',
|
|
91
|
+
'headerFilterOperator>': 'По-голямо от',
|
|
92
|
+
'headerFilterOperator>=': 'По-голямо или равно на',
|
|
93
|
+
'headerFilterOperator<': 'По-малко от',
|
|
94
|
+
'headerFilterOperator<=': 'По-малко или равно на',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: 'всякакви',
|
|
99
97
|
filterValueTrue: 'вярно',
|
|
@@ -141,19 +139,17 @@ const bgBGGrid = {
|
|
|
141
139
|
groupColumn: name => `Групирай по ${name}`,
|
|
142
140
|
unGroupColumn: name => `Спри групиране по ${name}`,
|
|
143
141
|
// Master/detail
|
|
144
|
-
|
|
142
|
+
detailPanelToggle: 'Превключване на панела с детайли',
|
|
145
143
|
expandDetailPanel: 'Разгъване',
|
|
146
144
|
collapseDetailPanel: 'Свиване',
|
|
147
145
|
// Row reordering text
|
|
148
|
-
rowReorderingHeaderName: 'Подредба на редове'
|
|
149
|
-
|
|
146
|
+
rowReorderingHeaderName: 'Подредба на редове',
|
|
150
147
|
// Aggregation
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
aggregationMenuItemHeader: 'Агрегиране',
|
|
149
|
+
aggregationFunctionLabelSum: 'сума',
|
|
150
|
+
aggregationFunctionLabelAvg: 'срст',
|
|
151
|
+
aggregationFunctionLabelMin: 'мин',
|
|
152
|
+
aggregationFunctionLabelMax: 'макс',
|
|
153
|
+
aggregationFunctionLabelSize: 'размер'
|
|
157
154
|
};
|
|
158
|
-
|
|
159
155
|
const bgBG = exports.bgBG = (0, _getGridLocalization.getGridLocalization)(bgBGGrid, _locale.bgBG);
|
package/node/locales/csCZ.js
CHANGED
|
@@ -156,8 +156,8 @@ const csCZGrid = {
|
|
|
156
156
|
// Actions cell more text
|
|
157
157
|
actionsCellMore: 'více',
|
|
158
158
|
// Column pinning text
|
|
159
|
-
pinToLeft: 'Připnout
|
|
160
|
-
pinToRight: 'Připnout
|
|
159
|
+
pinToLeft: 'Připnout vlevo',
|
|
160
|
+
pinToRight: 'Připnout vpravo',
|
|
161
161
|
unpin: 'Odepnout',
|
|
162
162
|
// Tree Data
|
|
163
163
|
treeDataGroupingHeaderName: 'Skupina',
|
package/node/locales/heIL.js
CHANGED
|
@@ -12,6 +12,7 @@ var GridCellEditStartReasons = exports.GridCellEditStartReasons = /*#__PURE__*/f
|
|
|
12
12
|
GridCellEditStartReasons["cellDoubleClick"] = "cellDoubleClick";
|
|
13
13
|
GridCellEditStartReasons["printableKeyDown"] = "printableKeyDown";
|
|
14
14
|
GridCellEditStartReasons["deleteKeyDown"] = "deleteKeyDown";
|
|
15
|
+
GridCellEditStartReasons["pasteKeyDown"] = "pasteKeyDown";
|
|
15
16
|
return GridCellEditStartReasons;
|
|
16
17
|
}(GridCellEditStartReasons || {});
|
|
17
18
|
/**
|
package/node/utils/domUtils.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.getGridCellElement = getGridCellElement;
|
|
|
9
9
|
exports.getGridColumnHeaderElement = getGridColumnHeaderElement;
|
|
10
10
|
exports.getGridRowElement = getGridRowElement;
|
|
11
11
|
exports.getRowEl = getRowEl;
|
|
12
|
+
exports.isEventTargetInPortal = isEventTargetInPortal;
|
|
12
13
|
exports.isGridCellRoot = isGridCellRoot;
|
|
13
14
|
exports.isGridHeaderCellRoot = isGridHeaderCellRoot;
|
|
14
15
|
exports.isOverflown = isOverflown;
|
|
@@ -66,4 +67,13 @@ const getActiveElement = (root = document) => {
|
|
|
66
67
|
}
|
|
67
68
|
return activeEl;
|
|
68
69
|
};
|
|
69
|
-
exports.getActiveElement = getActiveElement;
|
|
70
|
+
exports.getActiveElement = getActiveElement;
|
|
71
|
+
function isEventTargetInPortal(event) {
|
|
72
|
+
if (
|
|
73
|
+
// The target is not an element when triggered by a Select inside the cell
|
|
74
|
+
// See https://github.com/mui/material-ui/issues/10534
|
|
75
|
+
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
}
|
package/package.json
CHANGED
package/utils/domUtils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { GridRowId } from '../models/gridRows';
|
|
2
3
|
export declare function isOverflown(element: Element): boolean;
|
|
3
4
|
export declare function findParentElementFromClassName(elem: Element, className: string): Element | null;
|
|
@@ -11,3 +12,4 @@ export declare function getGridCellElement(root: Element, { id, field }: {
|
|
|
11
12
|
field: string;
|
|
12
13
|
}): HTMLDivElement | null;
|
|
13
14
|
export declare const getActiveElement: (root?: Document | ShadowRoot) => Element | null;
|
|
15
|
+
export declare function isEventTargetInPortal(event: React.SyntheticEvent): boolean;
|
package/utils/domUtils.js
CHANGED
|
@@ -51,4 +51,13 @@ export const getActiveElement = (root = document) => {
|
|
|
51
51
|
return getActiveElement(activeEl.shadowRoot);
|
|
52
52
|
}
|
|
53
53
|
return activeEl;
|
|
54
|
-
};
|
|
54
|
+
};
|
|
55
|
+
export function isEventTargetInPortal(event) {
|
|
56
|
+
if (
|
|
57
|
+
// The target is not an element when triggered by a Select inside the cell
|
|
58
|
+
// See https://github.com/mui/material-ui/issues/10534
|
|
59
|
+
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|