@mui/x-data-grid 6.18.2 → 6.18.4
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 +101 -1
- package/components/GridRow.js +2 -4
- package/components/cell/GridCell.js +15 -15
- 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/GridCell.js +14 -14
- 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/bgBG.js +33 -37
- package/legacy/locales/daDK.js +37 -39
- package/legacy/models/params/gridEditCellParams.js +1 -0
- package/legacy/utils/domUtils.js +10 -1
- package/locales/bgBG.js +33 -37
- package/locales/daDK.js +37 -39
- 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/GridCell.js +15 -15
- 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/bgBG.js +33 -37
- package/modern/locales/daDK.js +37 -39
- 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/GridCell.js +15 -15
- 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/bgBG.js +33 -37
- package/node/locales/daDK.js +37 -39
- 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/locales/daDK.js
CHANGED
|
@@ -53,47 +53,45 @@ const daDKGrid = {
|
|
|
53
53
|
filterPanelInputLabel: 'Værdi',
|
|
54
54
|
filterPanelInputPlaceholder: 'Filter værdi',
|
|
55
55
|
// Filter operators text
|
|
56
|
-
filterOperatorContains: '
|
|
57
|
-
filterOperatorEquals: '
|
|
58
|
-
filterOperatorStartsWith: '
|
|
59
|
-
filterOperatorEndsWith: '
|
|
60
|
-
filterOperatorIs: '
|
|
61
|
-
filterOperatorNot: '
|
|
62
|
-
filterOperatorAfter: '
|
|
63
|
-
filterOperatorOnOrAfter: '
|
|
64
|
-
filterOperatorBefore: '
|
|
65
|
-
filterOperatorOnOrBefore: '
|
|
66
|
-
filterOperatorIsEmpty: '
|
|
67
|
-
filterOperatorIsNotEmpty: '
|
|
56
|
+
filterOperatorContains: 'indeholder',
|
|
57
|
+
filterOperatorEquals: 'lig med',
|
|
58
|
+
filterOperatorStartsWith: 'begynder med',
|
|
59
|
+
filterOperatorEndsWith: 'ender med',
|
|
60
|
+
filterOperatorIs: 'er lig med',
|
|
61
|
+
filterOperatorNot: 'er ikke lig med',
|
|
62
|
+
filterOperatorAfter: 'efter',
|
|
63
|
+
filterOperatorOnOrAfter: 'på eller efter',
|
|
64
|
+
filterOperatorBefore: 'før',
|
|
65
|
+
filterOperatorOnOrBefore: 'på eller før',
|
|
66
|
+
filterOperatorIsEmpty: 'indeholder ikke data',
|
|
67
|
+
filterOperatorIsNotEmpty: 'indeholder data',
|
|
68
68
|
filterOperatorIsAnyOf: 'indeholder en af',
|
|
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: 'Indeholder',
|
|
77
|
+
headerFilterOperatorEquals: 'Lig med',
|
|
78
|
+
headerFilterOperatorStartsWith: 'Begynder med',
|
|
79
|
+
headerFilterOperatorEndsWith: 'Ender med',
|
|
80
|
+
headerFilterOperatorIs: 'Er lig med',
|
|
81
|
+
headerFilterOperatorNot: 'Er ikke lig med',
|
|
82
|
+
headerFilterOperatorAfter: 'Efter',
|
|
83
|
+
headerFilterOperatorOnOrAfter: 'På eller efter',
|
|
84
|
+
headerFilterOperatorBefore: 'Før',
|
|
85
|
+
headerFilterOperatorOnOrBefore: 'På eller før',
|
|
86
|
+
headerFilterOperatorIsEmpty: 'Indeholder ikke data',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: 'Indeholder data',
|
|
88
|
+
headerFilterOperatorIsAnyOf: 'Indeholder en af',
|
|
89
|
+
'headerFilterOperator=': 'Lig med',
|
|
90
|
+
'headerFilterOperator!=': 'Ikke lig med',
|
|
91
|
+
'headerFilterOperator>': 'Større end',
|
|
92
|
+
'headerFilterOperator>=': 'Større end eller lig med',
|
|
93
|
+
'headerFilterOperator<': 'Mindre end',
|
|
94
|
+
'headerFilterOperator<=': 'Mindre end eller lig med',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: 'hvilken som helst',
|
|
99
97
|
filterValueTrue: 'positiv',
|
|
@@ -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
|
+
}
|