@mui/x-data-grid 7.0.0-alpha.2 → 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 +241 -0
- 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/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/components/GridHeader.js +3 -2
- 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/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/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/bgBG.js +33 -37
- package/legacy/models/params/gridEditCellParams.js +1 -0
- package/legacy/utils/domUtils.js +10 -1
- package/locales/bgBG.js +33 -37
- 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/bgBG.js +33 -37
- package/modern/models/params/gridEditCellParams.js +1 -0
- package/modern/utils/domUtils.js +10 -1
- 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/bgBG.js +33 -37
- package/node/models/params/gridEditCellParams.js +1 -0
- package/node/utils/domUtils.js +11 -1
- package/package.json +2 -2
- package/utils/domUtils.d.ts +2 -0
- package/utils/domUtils.js +10 -1
|
@@ -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,6 +8,7 @@ exports.getActiveElement = void 0;
|
|
|
8
8
|
exports.getGridCellElement = getGridCellElement;
|
|
9
9
|
exports.getGridColumnHeaderElement = getGridColumnHeaderElement;
|
|
10
10
|
exports.getGridRowElement = getGridRowElement;
|
|
11
|
+
exports.isEventTargetInPortal = isEventTargetInPortal;
|
|
11
12
|
exports.isOverflown = isOverflown;
|
|
12
13
|
var _gridClasses = require("../constants/gridClasses");
|
|
13
14
|
function isOverflown(element) {
|
|
@@ -49,4 +50,13 @@ const getActiveElement = (root = document) => {
|
|
|
49
50
|
}
|
|
50
51
|
return activeEl;
|
|
51
52
|
};
|
|
52
|
-
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",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@babel/runtime": "^7.23.4",
|
|
40
|
+
"@mui/system": "^5.14.18",
|
|
40
41
|
"@mui/utils": "^5.14.18",
|
|
41
42
|
"clsx": "^2.0.0",
|
|
42
43
|
"prop-types": "^15.8.1",
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"@mui/material": "^5.4.1",
|
|
47
|
-
"@mui/system": "^5.4.1",
|
|
48
48
|
"react": "^17.0.0 || ^18.0.0",
|
|
49
49
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
50
50
|
},
|
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;
|
|
@@ -8,3 +9,4 @@ export declare function getGridCellElement(root: Element, { id, field }: {
|
|
|
8
9
|
field: string;
|
|
9
10
|
}): HTMLDivElement | null;
|
|
10
11
|
export declare const getActiveElement: (root?: Document | ShadowRoot) => Element | null;
|
|
12
|
+
export declare function isEventTargetInPortal(event: React.SyntheticEvent): boolean;
|
package/utils/domUtils.js
CHANGED
|
@@ -37,4 +37,13 @@ export const getActiveElement = (root = document) => {
|
|
|
37
37
|
return getActiveElement(activeEl.shadowRoot);
|
|
38
38
|
}
|
|
39
39
|
return activeEl;
|
|
40
|
-
};
|
|
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
|
+
}
|