@mui/x-data-grid 7.0.0-alpha.1 → 7.0.0-alpha.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 +607 -188
- package/DataGrid/DataGrid.d.ts +0 -10
- package/DataGrid/DataGrid.js +11 -23
- package/DataGrid/useDataGridProps.js +1 -1
- package/README.md +0 -1
- package/components/GridHeader.js +3 -2
- package/components/GridPagination.d.ts +2 -2
- package/components/GridRow.js +2 -4
- package/components/cell/GridCell.js +3 -3
- package/components/cell/GridEditDateCell.js +1 -20
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/components/panel/index.d.ts +0 -1
- package/components/panel/index.js +0 -1
- package/constants/defaultGridSlotsComponents.js +1 -2
- package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/editing/useGridCellEditing.js +8 -21
- package/hooks/features/editing/useGridRowEditing.js +7 -21
- package/hooks/features/export/useGridCsvExport.d.ts +1 -1
- package/hooks/features/export/useGridCsvExport.js +1 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -0
- package/hooks/features/filter/gridFilterUtils.js +7 -4
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/hooks/features/sorting/useGridSorting.js +6 -5
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +11 -23
- package/legacy/DataGrid/useDataGridProps.js +1 -1
- package/legacy/colDef/gridDefaultColumnTypes.js +2 -3
- package/legacy/components/GridHeader.js +3 -2
- package/legacy/components/GridPagination.js +3 -4
- package/legacy/components/GridRow.js +2 -4
- package/legacy/components/cell/GridCell.js +3 -3
- 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/columnHeaders/GridColumnHeadersInner.js +4 -5
- package/legacy/components/containers/GridRootStyles.js +69 -70
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/legacy/components/panel/index.js +0 -1
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +4 -5
- package/legacy/constants/defaultGridSlotsComponents.js +1 -2
- package/legacy/hooks/features/clipboard/useGridClipboard.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/export/useGridCsvExport.js +1 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +7 -4
- package/legacy/hooks/features/filter/useGridFilter.js +2 -2
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/legacy/hooks/features/sorting/useGridSorting.js +6 -5
- 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/heIL.js +1 -2
- package/legacy/models/params/gridEditCellParams.js +1 -0
- package/legacy/utils/domUtils.js +10 -15
- package/locales/arSD.js +1 -1
- package/locales/bgBG.js +33 -37
- package/locales/heIL.js +1 -2
- package/models/api/gridEditingApi.d.ts +2 -4
- package/models/api/gridSortApi.d.ts +2 -2
- package/models/gridFilterModel.d.ts +2 -2
- package/models/gridSlotsComponent.d.ts +0 -5
- package/models/gridSlotsComponentsProps.d.ts +0 -3
- package/models/params/gridEditCellParams.d.ts +3 -1
- package/models/params/gridEditCellParams.js +1 -0
- package/models/params/gridRowParams.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +11 -23
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/components/GridHeader.js +2 -1
- package/modern/components/GridRow.js +2 -4
- package/modern/components/cell/GridCell.js +2 -2
- 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/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/modern/components/panel/index.js +0 -1
- package/modern/constants/defaultGridSlotsComponents.js +1 -2
- package/modern/hooks/features/clipboard/useGridClipboard.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/export/useGridCsvExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +4 -2
- package/modern/hooks/features/filter/useGridFilter.js +2 -2
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/modern/hooks/features/sorting/useGridSorting.js +6 -5
- 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/heIL.js +1 -2
- package/modern/models/params/gridEditCellParams.js +1 -0
- package/modern/utils/domUtils.js +10 -15
- package/node/DataGrid/DataGrid.js +11 -23
- package/node/DataGrid/useDataGridProps.js +1 -1
- package/node/components/GridHeader.js +2 -1
- package/node/components/GridRow.js +1 -3
- package/node/components/cell/GridCell.js +2 -2
- 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/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/node/components/panel/index.js +0 -11
- package/node/constants/defaultGridSlotsComponents.js +0 -1
- package/node/hooks/features/clipboard/useGridClipboard.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/export/useGridCsvExport.js +1 -1
- package/node/hooks/features/filter/gridFilterUtils.js +6 -3
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/node/hooks/features/sorting/useGridSorting.js +6 -5
- 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/heIL.js +1 -2
- package/node/models/params/gridEditCellParams.js +1 -0
- package/node/utils/domUtils.js +11 -18
- package/package.json +6 -5
- package/utils/domUtils.d.ts +2 -3
- package/utils/domUtils.js +10 -15
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/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
|
@@ -8,9 +8,7 @@ exports.getActiveElement = void 0;
|
|
|
8
8
|
exports.getGridCellElement = getGridCellElement;
|
|
9
9
|
exports.getGridColumnHeaderElement = getGridColumnHeaderElement;
|
|
10
10
|
exports.getGridRowElement = getGridRowElement;
|
|
11
|
-
exports.
|
|
12
|
-
exports.isGridCellRoot = isGridCellRoot;
|
|
13
|
-
exports.isGridHeaderCellRoot = isGridHeaderCellRoot;
|
|
11
|
+
exports.isEventTargetInPortal = isEventTargetInPortal;
|
|
14
12
|
exports.isOverflown = isOverflown;
|
|
15
13
|
var _gridClasses = require("../constants/gridClasses");
|
|
16
14
|
function isOverflown(element) {
|
|
@@ -19,20 +17,6 @@ function isOverflown(element) {
|
|
|
19
17
|
function findParentElementFromClassName(elem, className) {
|
|
20
18
|
return elem.closest(`.${className}`);
|
|
21
19
|
}
|
|
22
|
-
function getRowEl(cell) {
|
|
23
|
-
if (!cell) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
return findParentElementFromClassName(cell, _gridClasses.gridClasses.row);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// TODO remove
|
|
30
|
-
function isGridCellRoot(elem) {
|
|
31
|
-
return elem != null && elem.classList.contains(_gridClasses.gridClasses.cell);
|
|
32
|
-
}
|
|
33
|
-
function isGridHeaderCellRoot(elem) {
|
|
34
|
-
return elem != null && elem.classList.contains(_gridClasses.gridClasses.columnHeader);
|
|
35
|
-
}
|
|
36
20
|
function escapeOperandAttributeSelector(operand) {
|
|
37
21
|
return operand.replace(/["\\]/g, '\\$&');
|
|
38
22
|
}
|
|
@@ -66,4 +50,13 @@ const getActiveElement = (root = document) => {
|
|
|
66
50
|
}
|
|
67
51
|
return activeEl;
|
|
68
52
|
};
|
|
69
|
-
exports.getActiveElement = getActiveElement;
|
|
53
|
+
exports.getActiveElement = getActiveElement;
|
|
54
|
+
function isEventTargetInPortal(event) {
|
|
55
|
+
if (
|
|
56
|
+
// The target is not an element when triggered by a Select inside the cell
|
|
57
|
+
// See https://github.com/mui/material-ui/issues/10534
|
|
58
|
+
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.3",
|
|
4
4
|
"description": "The community edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"funding": {
|
|
14
14
|
"type": "opencollective",
|
|
15
|
-
"url": "https://opencollective.com/mui"
|
|
15
|
+
"url": "https://opencollective.com/mui-org"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"react-component",
|
|
23
23
|
"material-ui",
|
|
24
24
|
"mui",
|
|
25
|
+
"mui-x",
|
|
25
26
|
"react-table",
|
|
26
27
|
"table",
|
|
27
28
|
"datatable",
|
|
@@ -35,15 +36,15 @@
|
|
|
35
36
|
"directory": "packages/grid/x-data-grid"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "^7.23.
|
|
39
|
-
"@mui/
|
|
39
|
+
"@babel/runtime": "^7.23.4",
|
|
40
|
+
"@mui/system": "^5.14.18",
|
|
41
|
+
"@mui/utils": "^5.14.18",
|
|
40
42
|
"clsx": "^2.0.0",
|
|
41
43
|
"prop-types": "^15.8.1",
|
|
42
44
|
"reselect": "^4.1.8"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
47
|
"@mui/material": "^5.4.1",
|
|
46
|
-
"@mui/system": "^5.4.1",
|
|
47
48
|
"react": "^17.0.0 || ^18.0.0",
|
|
48
49
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
49
50
|
},
|
package/utils/domUtils.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
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;
|
|
4
|
-
export declare function getRowEl(cell?: Element | null): HTMLElement | null;
|
|
5
|
-
export declare function isGridCellRoot(elem: Element | null): boolean;
|
|
6
|
-
export declare function isGridHeaderCellRoot(elem: Element | null): boolean;
|
|
7
5
|
export declare function getGridColumnHeaderElement(root: Element, field: string): HTMLDivElement | null;
|
|
8
6
|
export declare function getGridRowElement(root: Element, id: GridRowId): HTMLDivElement | null;
|
|
9
7
|
export declare function getGridCellElement(root: Element, { id, field }: {
|
|
@@ -11,3 +9,4 @@ export declare function getGridCellElement(root: Element, { id, field }: {
|
|
|
11
9
|
field: string;
|
|
12
10
|
}): HTMLDivElement | null;
|
|
13
11
|
export declare const getActiveElement: (root?: Document | ShadowRoot) => Element | null;
|
|
12
|
+
export declare function isEventTargetInPortal(event: React.SyntheticEvent): boolean;
|
package/utils/domUtils.js
CHANGED
|
@@ -5,20 +5,6 @@ export function isOverflown(element) {
|
|
|
5
5
|
export function findParentElementFromClassName(elem, className) {
|
|
6
6
|
return elem.closest(`.${className}`);
|
|
7
7
|
}
|
|
8
|
-
export function getRowEl(cell) {
|
|
9
|
-
if (!cell) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return findParentElementFromClassName(cell, gridClasses.row);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// TODO remove
|
|
16
|
-
export function isGridCellRoot(elem) {
|
|
17
|
-
return elem != null && elem.classList.contains(gridClasses.cell);
|
|
18
|
-
}
|
|
19
|
-
export function isGridHeaderCellRoot(elem) {
|
|
20
|
-
return elem != null && elem.classList.contains(gridClasses.columnHeader);
|
|
21
|
-
}
|
|
22
8
|
function escapeOperandAttributeSelector(operand) {
|
|
23
9
|
return operand.replace(/["\\]/g, '\\$&');
|
|
24
10
|
}
|
|
@@ -51,4 +37,13 @@ export const getActiveElement = (root = document) => {
|
|
|
51
37
|
return getActiveElement(activeEl.shadowRoot);
|
|
52
38
|
}
|
|
53
39
|
return activeEl;
|
|
54
|
-
};
|
|
40
|
+
};
|
|
41
|
+
export function isEventTargetInPortal(event) {
|
|
42
|
+
if (
|
|
43
|
+
// The target is not an element when triggered by a Select inside the cell
|
|
44
|
+
// See https://github.com/mui/material-ui/issues/10534
|
|
45
|
+
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|