@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.
Files changed (79) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/components/GridRow.js +2 -4
  3. package/components/cell/GridEditDateCell.js +1 -20
  4. package/components/columnHeaders/GridColumnGroupHeader.js +2 -1
  5. package/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  6. package/components/panel/filterPanel/GridFilterForm.js +2 -2
  7. package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  8. package/hooks/features/editing/useGridCellEditing.js +8 -21
  9. package/hooks/features/editing/useGridRowEditing.js +7 -21
  10. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
  11. package/hooks/features/rowSelection/useGridRowSelection.js +2 -1
  12. package/index.js +1 -1
  13. package/internals/index.d.ts +1 -1
  14. package/internals/index.js +1 -1
  15. package/legacy/components/GridRow.js +2 -4
  16. package/legacy/components/cell/GridEditDateCell.js +1 -20
  17. package/legacy/components/columnHeaders/GridColumnGroupHeader.js +2 -1
  18. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  19. package/legacy/components/panel/filterPanel/GridFilterForm.js +2 -2
  20. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  21. package/legacy/hooks/features/editing/useGridCellEditing.js +8 -21
  22. package/legacy/hooks/features/editing/useGridRowEditing.js +7 -23
  23. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
  24. package/legacy/hooks/features/rowSelection/useGridRowSelection.js +2 -1
  25. package/legacy/index.js +1 -1
  26. package/legacy/internals/index.js +1 -1
  27. package/legacy/locales/arSD.js +1 -1
  28. package/legacy/locales/bgBG.js +33 -37
  29. package/legacy/locales/csCZ.js +2 -2
  30. package/legacy/locales/heIL.js +1 -2
  31. package/legacy/models/params/gridEditCellParams.js +1 -0
  32. package/legacy/utils/domUtils.js +10 -1
  33. package/locales/arSD.js +1 -1
  34. package/locales/bgBG.js +33 -37
  35. package/locales/csCZ.js +2 -2
  36. package/locales/heIL.js +1 -2
  37. package/models/api/gridEditingApi.d.ts +2 -4
  38. package/models/params/gridEditCellParams.d.ts +3 -1
  39. package/models/params/gridEditCellParams.js +1 -0
  40. package/models/params/gridRowParams.d.ts +1 -0
  41. package/modern/components/GridRow.js +2 -4
  42. package/modern/components/cell/GridEditDateCell.js +1 -20
  43. package/modern/components/columnHeaders/GridColumnGroupHeader.js +2 -1
  44. package/modern/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  45. package/modern/components/panel/filterPanel/GridFilterForm.js +2 -2
  46. package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  47. package/modern/hooks/features/editing/useGridCellEditing.js +8 -21
  48. package/modern/hooks/features/editing/useGridRowEditing.js +7 -21
  49. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
  50. package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -1
  51. package/modern/index.js +1 -1
  52. package/modern/internals/index.js +1 -1
  53. package/modern/locales/arSD.js +1 -1
  54. package/modern/locales/bgBG.js +33 -37
  55. package/modern/locales/csCZ.js +2 -2
  56. package/modern/locales/heIL.js +1 -2
  57. package/modern/models/params/gridEditCellParams.js +1 -0
  58. package/modern/utils/domUtils.js +10 -1
  59. package/node/components/GridRow.js +1 -3
  60. package/node/components/cell/GridEditDateCell.js +1 -20
  61. package/node/components/columnHeaders/GridColumnGroupHeader.js +2 -1
  62. package/node/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  63. package/node/components/panel/filterPanel/GridFilterForm.js +2 -2
  64. package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  65. package/node/hooks/features/editing/useGridCellEditing.js +7 -20
  66. package/node/hooks/features/editing/useGridRowEditing.js +6 -20
  67. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -1
  68. package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -1
  69. package/node/index.js +1 -1
  70. package/node/internals/index.js +7 -0
  71. package/node/locales/arSD.js +1 -1
  72. package/node/locales/bgBG.js +33 -37
  73. package/node/locales/csCZ.js +2 -2
  74. package/node/locales/heIL.js +1 -2
  75. package/node/models/params/gridEditCellParams.js +1 -0
  76. package/node/utils/domUtils.js +11 -1
  77. package/package.json +1 -1
  78. package/utils/domUtils.d.ts +2 -0
  79. package/utils/domUtils.js +10 -1
@@ -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 () {
@@ -99,7 +99,7 @@ const arSDGrid = {
99
99
  // Column menu text
100
100
  columnMenuLabel: 'القائمة',
101
101
  columnMenuShowColumns: 'إظهار الأعمدة',
102
- // columnMenuManageColumns: 'Manage columns',
102
+ columnMenuManageColumns: 'إدارة الأعمدة',
103
103
  columnMenuFilter: 'المرشِح',
104
104
  columnMenuHideColumn: 'إخفاء',
105
105
  columnMenuUnsort: 'الغاء الفرز',
@@ -66,34 +66,32 @@ const bgBGGrid = {
66
66
  filterOperatorIsEmpty: 'е празен',
67
67
  filterOperatorIsNotEmpty: 'не е празен',
68
68
  filterOperatorIsAnyOf: 'е някой от',
69
- // 'filterOperator=': '=',
70
- // 'filterOperator!=': '!=',
71
- // 'filterOperator>': '>',
72
- // 'filterOperator>=': '>=',
73
- // 'filterOperator<': '<',
74
- // 'filterOperator<=': '<=',
75
-
69
+ 'filterOperator=': '=',
70
+ 'filterOperator!=': '!=',
71
+ 'filterOperator>': '>',
72
+ 'filterOperator>=': '>=',
73
+ 'filterOperator<': '<',
74
+ 'filterOperator<=': '<=',
76
75
  // Header filter operators text
77
- // headerFilterOperatorContains: 'Contains',
78
- // headerFilterOperatorEquals: 'Equals',
79
- // headerFilterOperatorStartsWith: 'Starts with',
80
- // headerFilterOperatorEndsWith: 'Ends with',
81
- // headerFilterOperatorIs: 'Is',
82
- // headerFilterOperatorNot: 'Is not',
83
- // headerFilterOperatorAfter: 'Is after',
84
- // headerFilterOperatorOnOrAfter: 'Is on or after',
85
- // headerFilterOperatorBefore: 'Is before',
86
- // headerFilterOperatorOnOrBefore: 'Is on or before',
87
- // headerFilterOperatorIsEmpty: 'Is empty',
88
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
89
- // headerFilterOperatorIsAnyOf: 'Is any of',
90
- // 'headerFilterOperator=': 'Equals',
91
- // 'headerFilterOperator!=': 'Not equals',
92
- // 'headerFilterOperator>': 'Greater than',
93
- // 'headerFilterOperator>=': 'Greater than or equal to',
94
- // 'headerFilterOperator<': 'Less than',
95
- // 'headerFilterOperator<=': 'Less than or equal to',
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
- // detailPanelToggle: 'Detail panel toggle',
142
+ detailPanelToggle: 'Превключване на панела с детайли',
145
143
  expandDetailPanel: 'Разгъване',
146
144
  collapseDetailPanel: 'Свиване',
147
145
  // Row reordering text
148
- rowReorderingHeaderName: 'Подредба на редове'
149
-
146
+ rowReorderingHeaderName: 'Подредба на редове',
150
147
  // Aggregation
151
- // aggregationMenuItemHeader: 'Aggregation',
152
- // aggregationFunctionLabelSum: 'sum',
153
- // aggregationFunctionLabelAvg: 'avg',
154
- // aggregationFunctionLabelMin: 'min',
155
- // aggregationFunctionLabelMax: 'max',
156
- // aggregationFunctionLabelSize: 'size',
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);
@@ -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 na levo',
160
- pinToRight: 'Připnout na pravo',
159
+ pinToLeft: 'Připnout vlevo',
160
+ pinToRight: 'Připnout vpravo',
161
161
  unpin: 'Odepnout',
162
162
  // Tree Data
163
163
  treeDataGroupingHeaderName: 'Skupina',
@@ -130,8 +130,7 @@ const heILGrid = {
130
130
  // Column pinning text
131
131
  pinToLeft: 'נעץ משמאל',
132
132
  pinToRight: 'נעץ מימין',
133
- // unpin: 'Unpin',
134
-
133
+ unpin: 'הסר נעיצה',
135
134
  // Tree Data
136
135
  treeDataGroupingHeaderName: 'קבוצה',
137
136
  treeDataExpand: 'הרחב',
@@ -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
  /**
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "6.18.1",
3
+ "version": "6.18.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",
@@ -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
+ }