@mui/x-data-grid 7.20.0 → 7.22.0
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 +200 -31
- package/DataGrid/DataGrid.js +1 -0
- package/DataGrid/index.d.ts +0 -1
- package/DataGrid/index.js +1 -2
- package/DataGrid/useDataGridComponent.js +4 -1
- package/DataGrid/useDataGridProps.d.ts +1 -5
- package/DataGrid/useDataGridProps.js +3 -62
- package/components/GridPagination.js +1 -0
- package/components/GridRow.js +25 -36
- package/components/base/GridOverlays.js +8 -0
- package/components/cell/GridBooleanCell.d.ts +3 -3
- package/components/cell/GridBooleanCell.js +11 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/components/containers/GridRootStyles.js +5 -2
- package/components/menu/columnMenu/GridColumnMenu.js +32 -0
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/components/toolbar/GridToolbar.js +2 -3
- package/components/toolbar/GridToolbarExport.d.ts +9 -3
- package/components/toolbar/GridToolbarExport.js +43 -3
- package/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/components/virtualization/GridBottomContainer.js +0 -17
- package/components/virtualization/GridMainContainer.js +2 -1
- package/components/virtualization/GridVirtualScrollbar.js +4 -0
- package/components/virtualization/GridVirtualScroller.js +4 -2
- package/constants/dataGridPropsDefaultValues.d.ts +5 -0
- package/constants/dataGridPropsDefaultValues.js +60 -0
- package/constants/gridClasses.d.ts +5 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +6 -1
- package/hooks/features/clipboard/useGridClipboard.js +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -1
- package/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +3 -0
- package/hooks/features/dimensions/useGridDimensions.js +4 -2
- package/hooks/features/focus/useGridFocus.js +18 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +9 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +5 -0
- package/hooks/features/listView/gridListViewSelectors.js +4 -0
- package/hooks/features/listView/useGridListView.d.ts +10 -0
- package/hooks/features/listView/useGridListView.js +54 -0
- package/hooks/features/pagination/gridPaginationSelector.js +2 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +11 -2
- package/hooks/features/rowSelection/utils.js +1 -1
- package/hooks/features/rows/gridRowsMetaInterfaces.d.ts +16 -0
- package/hooks/features/rows/gridRowsMetaInterfaces.js +1 -0
- package/hooks/features/rows/gridRowsUtils.d.ts +3 -0
- package/hooks/features/rows/gridRowsUtils.js +14 -1
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -1
- package/hooks/features/rows/useGridParamsApi.js +4 -3
- package/hooks/features/rows/useGridRowsMeta.js +135 -154
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +3 -2
- package/hooks/features/virtualization/useGridVirtualScroller.js +25 -10
- package/hooks/utils/useGridApiMethod.js +2 -1
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +2 -1
- package/joy/joySlots.js +45 -27
- package/locales/daDK.js +5 -6
- package/locales/itIT.js +27 -28
- package/locales/ptBR.js +4 -4
- package/material/index.js +4 -0
- package/models/api/gridRowsMetaApi.d.ts +15 -14
- package/models/colDef/gridColDef.d.ts +6 -0
- package/models/colDef/index.d.ts +1 -1
- package/models/gridApiCaches.d.ts +2 -0
- package/models/gridExport.d.ts +1 -1
- package/models/gridSlotsComponent.d.ts +10 -0
- package/models/gridSlotsComponentsProps.d.ts +9 -0
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +14 -3
- package/modern/DataGrid/DataGrid.js +1 -0
- package/modern/DataGrid/index.js +1 -2
- package/modern/DataGrid/useDataGridComponent.js +4 -1
- package/modern/DataGrid/useDataGridProps.js +3 -62
- package/modern/components/GridPagination.js +1 -0
- package/modern/components/GridRow.js +25 -36
- package/modern/components/base/GridOverlays.js +8 -0
- package/modern/components/cell/GridBooleanCell.js +11 -1
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/modern/components/containers/GridRootStyles.js +5 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +32 -0
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/modern/components/toolbar/GridToolbar.js +2 -3
- package/modern/components/toolbar/GridToolbarExport.js +43 -3
- package/modern/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/modern/components/virtualization/GridBottomContainer.js +0 -17
- package/modern/components/virtualization/GridMainContainer.js +2 -1
- package/modern/components/virtualization/GridVirtualScrollbar.js +4 -0
- package/modern/components/virtualization/GridVirtualScroller.js +4 -2
- package/modern/constants/dataGridPropsDefaultValues.js +60 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +2 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -1
- package/modern/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
- package/modern/hooks/features/columns/gridColumnsUtils.js +3 -0
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +18 -3
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +9 -5
- package/modern/hooks/features/listView/gridListViewSelectors.js +4 -0
- package/modern/hooks/features/listView/useGridListView.js +54 -0
- package/modern/hooks/features/pagination/gridPaginationSelector.js +2 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +11 -2
- package/modern/hooks/features/rowSelection/utils.js +1 -1
- package/modern/hooks/features/rows/gridRowsMetaInterfaces.js +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +14 -1
- package/modern/hooks/features/rows/useGridParamsApi.js +4 -3
- package/modern/hooks/features/rows/useGridRowsMeta.js +135 -154
- package/modern/hooks/features/scroll/useGridScroll.js +3 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +25 -10
- package/modern/hooks/utils/useGridApiMethod.js +2 -1
- package/modern/index.js +2 -1
- package/modern/internals/index.js +2 -1
- package/modern/joy/joySlots.js +45 -27
- package/modern/locales/daDK.js +5 -6
- package/modern/locales/itIT.js +27 -28
- package/modern/locales/ptBR.js +4 -4
- package/modern/material/index.js +4 -0
- package/modern/utils/ResizeObserver.js +10 -0
- package/modern/utils/keyboardUtils.js +12 -4
- package/node/DataGrid/DataGrid.js +1 -0
- package/node/DataGrid/index.js +1 -12
- package/node/DataGrid/useDataGridComponent.js +4 -1
- package/node/DataGrid/useDataGridProps.js +6 -65
- package/node/components/GridPagination.js +1 -0
- package/node/components/GridRow.js +25 -36
- package/node/components/base/GridOverlays.js +8 -0
- package/node/components/cell/GridBooleanCell.js +11 -1
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/node/components/containers/GridRootStyles.js +5 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +32 -0
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/node/components/toolbar/GridToolbar.js +2 -3
- package/node/components/toolbar/GridToolbarExport.js +40 -0
- package/node/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/node/components/virtualization/GridBottomContainer.js +0 -17
- package/node/components/virtualization/GridMainContainer.js +2 -1
- package/node/components/virtualization/GridVirtualScrollbar.js +4 -0
- package/node/components/virtualization/GridVirtualScroller.js +4 -2
- package/node/constants/dataGridPropsDefaultValues.js +66 -0
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/clipboard/useGridClipboard.js +2 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -1
- package/node/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
- package/node/hooks/features/columns/gridColumnsUtils.js +3 -0
- package/node/hooks/features/dimensions/useGridDimensions.js +3 -1
- package/node/hooks/features/focus/useGridFocus.js +18 -3
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +9 -5
- package/node/hooks/features/listView/gridListViewSelectors.js +11 -0
- package/node/hooks/features/listView/useGridListView.js +64 -0
- package/node/hooks/features/pagination/gridPaginationSelector.js +3 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +11 -2
- package/node/hooks/features/rowSelection/utils.js +1 -1
- package/node/hooks/features/rows/gridRowsMetaInterfaces.js +5 -0
- package/node/hooks/features/rows/gridRowsUtils.js +16 -2
- package/node/hooks/features/rows/useGridParamsApi.js +4 -3
- package/node/hooks/features/rows/useGridRowsMeta.js +136 -154
- package/node/hooks/features/scroll/useGridScroll.js +3 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +25 -10
- package/node/hooks/utils/useGridApiMethod.js +3 -1
- package/node/index.js +13 -1
- package/node/internals/index.js +22 -0
- package/node/joy/joySlots.js +45 -27
- package/node/locales/daDK.js +5 -6
- package/node/locales/itIT.js +27 -28
- package/node/locales/ptBR.js +4 -4
- package/node/material/index.js +4 -0
- package/node/utils/ResizeObserver.js +16 -0
- package/node/utils/keyboardUtils.js +15 -5
- package/package.json +2 -2
- package/utils/ResizeObserver.d.ts +4 -0
- package/utils/ResizeObserver.js +10 -0
- package/utils/keyboardUtils.d.ts +1 -0
- package/utils/keyboardUtils.js +12 -4
package/node/joy/joySlots.js
CHANGED
|
@@ -9,7 +9,9 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _Badge = _interopRequireDefault(require("@mui/joy/Badge"));
|
|
12
13
|
var _Checkbox = _interopRequireDefault(require("@mui/joy/Checkbox"));
|
|
14
|
+
var _Divider = _interopRequireDefault(require("@mui/joy/Divider"));
|
|
13
15
|
var _Input = _interopRequireDefault(require("@mui/joy/Input"));
|
|
14
16
|
var _FormControl = _interopRequireDefault(require("@mui/joy/FormControl"));
|
|
15
17
|
var _FormLabel = _interopRequireDefault(require("@mui/joy/FormLabel"));
|
|
@@ -28,13 +30,14 @@ var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
|
28
30
|
var _hooks = require("../hooks");
|
|
29
31
|
var _GridOverlay = require("../components/containers/GridOverlay");
|
|
30
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
|
-
const _excluded = ["
|
|
32
|
-
_excluded2 = ["
|
|
33
|
-
_excluded3 = ["
|
|
34
|
-
_excluded4 = ["color", "size", "sx", "
|
|
35
|
-
_excluded5 = ["
|
|
36
|
-
_excluded6 = ["native"],
|
|
37
|
-
_excluded7 = ["
|
|
33
|
+
const _excluded = ["slotProps", "variant", "color", "sx"],
|
|
34
|
+
_excluded2 = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
|
|
35
|
+
_excluded3 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
|
|
36
|
+
_excluded4 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
|
|
37
|
+
_excluded5 = ["color", "size", "sx", "touchRippleRef"],
|
|
38
|
+
_excluded6 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
|
|
39
|
+
_excluded7 = ["native"],
|
|
40
|
+
_excluded8 = ["shrink", "variant", "sx"];
|
|
38
41
|
function convertColor(color) {
|
|
39
42
|
if (color === 'secondary') {
|
|
40
43
|
return 'primary';
|
|
@@ -66,14 +69,27 @@ function convertVariant(variant, defaultVariant = 'plain') {
|
|
|
66
69
|
filled: 'soft'
|
|
67
70
|
}[variant] || defaultVariant;
|
|
68
71
|
}
|
|
69
|
-
const
|
|
72
|
+
const Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
73
|
+
let {
|
|
74
|
+
color,
|
|
75
|
+
sx
|
|
76
|
+
} = _ref,
|
|
77
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
78
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, (0, _extends2.default)({}, props, {
|
|
79
|
+
color: convertColor(color),
|
|
80
|
+
variant: "plain",
|
|
81
|
+
sx: sx,
|
|
82
|
+
ref: ref
|
|
83
|
+
}));
|
|
84
|
+
});
|
|
85
|
+
const Checkbox = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
70
86
|
let {
|
|
71
87
|
inputProps,
|
|
72
88
|
onChange,
|
|
73
89
|
checked,
|
|
74
90
|
inputRef
|
|
75
|
-
} =
|
|
76
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
91
|
+
} = _ref2,
|
|
92
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded2);
|
|
77
93
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, (0, _extends2.default)({}, props, {
|
|
78
94
|
slotProps: {
|
|
79
95
|
input: (0, _extends2.default)({}, inputProps, {
|
|
@@ -85,7 +101,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
85
101
|
onChange: onChange
|
|
86
102
|
}));
|
|
87
103
|
});
|
|
88
|
-
const TextField = /*#__PURE__*/React.forwardRef((
|
|
104
|
+
const TextField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
89
105
|
let {
|
|
90
106
|
onChange,
|
|
91
107
|
label,
|
|
@@ -95,8 +111,8 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
95
111
|
type,
|
|
96
112
|
size,
|
|
97
113
|
variant
|
|
98
|
-
} =
|
|
99
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
114
|
+
} = _ref3,
|
|
115
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded3);
|
|
100
116
|
const rootRef = (0, _utils.unstable_useForkRef)(ref, props.InputProps?.ref);
|
|
101
117
|
const inputForkRef = (0, _utils.unstable_useForkRef)(inputRef, props?.inputProps?.ref);
|
|
102
118
|
const {
|
|
@@ -124,7 +140,7 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
124
140
|
})]
|
|
125
141
|
});
|
|
126
142
|
});
|
|
127
|
-
const Button = /*#__PURE__*/React.forwardRef(function Button(
|
|
143
|
+
const Button = /*#__PURE__*/React.forwardRef(function Button(_ref4, ref) {
|
|
128
144
|
let {
|
|
129
145
|
startIcon,
|
|
130
146
|
color,
|
|
@@ -132,8 +148,8 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
|
|
|
132
148
|
size,
|
|
133
149
|
sx,
|
|
134
150
|
variant
|
|
135
|
-
} =
|
|
136
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
151
|
+
} = _ref4,
|
|
152
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded4);
|
|
137
153
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, (0, _extends2.default)({}, props, {
|
|
138
154
|
size: convertSize(size),
|
|
139
155
|
color: convertColor(color),
|
|
@@ -144,13 +160,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
|
|
|
144
160
|
sx: sx
|
|
145
161
|
}));
|
|
146
162
|
});
|
|
147
|
-
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(
|
|
163
|
+
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref5, ref) {
|
|
148
164
|
let {
|
|
149
165
|
color,
|
|
150
166
|
size,
|
|
151
167
|
sx
|
|
152
|
-
} =
|
|
153
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
168
|
+
} = _ref5,
|
|
169
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref5, _excluded5);
|
|
154
170
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({}, props, {
|
|
155
171
|
size: convertSize(size),
|
|
156
172
|
color: convertColor(color) ?? 'neutral',
|
|
@@ -159,7 +175,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref)
|
|
|
159
175
|
sx: sx
|
|
160
176
|
}));
|
|
161
177
|
});
|
|
162
|
-
const Select = /*#__PURE__*/React.forwardRef((
|
|
178
|
+
const Select = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
163
179
|
let {
|
|
164
180
|
open,
|
|
165
181
|
onOpen,
|
|
@@ -171,8 +187,8 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
171
187
|
MenuProps,
|
|
172
188
|
inputRef,
|
|
173
189
|
labelId
|
|
174
|
-
} =
|
|
175
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
190
|
+
} = _ref6,
|
|
191
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref6, _excluded6);
|
|
176
192
|
const handleChange = (event, newValue) => {
|
|
177
193
|
if (event && onChange) {
|
|
178
194
|
// Same as in https://github.com/mui/material-ui/blob/e5558282a8f36856aef1299f3a36f3235e92e770/packages/mui-material/src/Select/SelectInput.js#L288-L300
|
|
@@ -223,17 +239,17 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
223
239
|
}
|
|
224
240
|
}));
|
|
225
241
|
});
|
|
226
|
-
const Option = /*#__PURE__*/React.forwardRef((
|
|
227
|
-
let props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
242
|
+
const Option = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
243
|
+
let props = (0, _objectWithoutPropertiesLoose2.default)(_ref7, _excluded7);
|
|
228
244
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Option.default, (0, _extends2.default)({}, props, {
|
|
229
245
|
ref: ref
|
|
230
246
|
}));
|
|
231
247
|
});
|
|
232
|
-
const InputLabel = /*#__PURE__*/React.forwardRef((
|
|
248
|
+
const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
233
249
|
let {
|
|
234
250
|
sx
|
|
235
|
-
} =
|
|
236
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(
|
|
251
|
+
} = _ref8,
|
|
252
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref8, _excluded8);
|
|
237
253
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormLabel.default, (0, _extends2.default)({}, props, {
|
|
238
254
|
ref: ref,
|
|
239
255
|
sx: sx
|
|
@@ -359,7 +375,9 @@ const LoadingOverlay = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
359
375
|
}));
|
|
360
376
|
});
|
|
361
377
|
const joySlots = (0, _extends2.default)({}, _icons.default, {
|
|
378
|
+
baseBadge: Badge,
|
|
362
379
|
baseCheckbox: Checkbox,
|
|
380
|
+
baseDivider: _Divider.default,
|
|
363
381
|
baseTextField: TextField,
|
|
364
382
|
baseButton: Button,
|
|
365
383
|
baseIconButton: IconButton,
|
package/node/locales/daDK.js
CHANGED
|
@@ -39,8 +39,7 @@ const daDKGrid = {
|
|
|
39
39
|
columnsManagementSearchTitle: 'Søg',
|
|
40
40
|
columnsManagementNoColumns: 'Ingen søjler',
|
|
41
41
|
columnsManagementShowHideAllText: 'Vis/Skjul Alle',
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
columnsManagementReset: 'Nulstil',
|
|
44
43
|
// Filter panel text
|
|
45
44
|
filterPanelAddFilter: 'Tilføj filter',
|
|
46
45
|
filterPanelRemoveAll: 'Fjern alle',
|
|
@@ -54,9 +53,9 @@ const daDKGrid = {
|
|
|
54
53
|
filterPanelInputPlaceholder: 'Filterværdi',
|
|
55
54
|
// Filter operators text
|
|
56
55
|
filterOperatorContains: 'indeholder',
|
|
57
|
-
|
|
56
|
+
filterOperatorDoesNotContain: 'indeholder ikke',
|
|
58
57
|
filterOperatorEquals: 'lig med',
|
|
59
|
-
|
|
58
|
+
filterOperatorDoesNotEqual: 'ikke lig med',
|
|
60
59
|
filterOperatorStartsWith: 'begynder med',
|
|
61
60
|
filterOperatorEndsWith: 'ender med',
|
|
62
61
|
filterOperatorIs: 'er lig med',
|
|
@@ -76,9 +75,9 @@ const daDKGrid = {
|
|
|
76
75
|
'filterOperator<=': '<=',
|
|
77
76
|
// Header filter operators text
|
|
78
77
|
headerFilterOperatorContains: 'Indeholder',
|
|
79
|
-
|
|
78
|
+
headerFilterOperatorDoesNotContain: 'Indeholder ikke',
|
|
80
79
|
headerFilterOperatorEquals: 'Lig med',
|
|
81
|
-
|
|
80
|
+
headerFilterOperatorDoesNotEqual: 'Ikke lig med',
|
|
82
81
|
headerFilterOperatorStartsWith: 'Begynder med',
|
|
83
82
|
headerFilterOperatorEndsWith: 'Ender med',
|
|
84
83
|
headerFilterOperatorIs: 'Er lig med',
|
package/node/locales/itIT.js
CHANGED
|
@@ -36,11 +36,10 @@ const itITGrid = {
|
|
|
36
36
|
toolbarExportPrint: 'Stampa',
|
|
37
37
|
toolbarExportExcel: 'Scarica come Excel',
|
|
38
38
|
// Columns management text
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
columnsManagementSearchTitle: 'Cerca',
|
|
40
|
+
columnsManagementNoColumns: 'Nessuna colonna',
|
|
41
|
+
columnsManagementShowHideAllText: 'Mostra/Nascondi Tutto',
|
|
42
|
+
columnsManagementReset: 'Resetta',
|
|
44
43
|
// Filter panel text
|
|
45
44
|
filterPanelAddFilter: 'Aggiungi un filtro',
|
|
46
45
|
filterPanelRemoveAll: 'Rimuovi filtri',
|
|
@@ -54,13 +53,13 @@ const itITGrid = {
|
|
|
54
53
|
filterPanelInputPlaceholder: 'Filtra il valore',
|
|
55
54
|
// Filter operators text
|
|
56
55
|
filterOperatorContains: 'contiene',
|
|
57
|
-
|
|
56
|
+
filterOperatorDoesNotContain: 'non contiene',
|
|
58
57
|
filterOperatorEquals: 'uguale a',
|
|
59
|
-
|
|
58
|
+
filterOperatorDoesNotEqual: 'diverso da',
|
|
60
59
|
filterOperatorStartsWith: 'comincia per',
|
|
61
60
|
filterOperatorEndsWith: 'termina per',
|
|
62
61
|
filterOperatorIs: 'uguale a',
|
|
63
|
-
filterOperatorNot: '
|
|
62
|
+
filterOperatorNot: 'diverso da',
|
|
64
63
|
filterOperatorAfter: 'dopo il',
|
|
65
64
|
filterOperatorOnOrAfter: 'a partire dal',
|
|
66
65
|
filterOperatorBefore: 'prima del',
|
|
@@ -76,26 +75,26 @@ const itITGrid = {
|
|
|
76
75
|
'filterOperator<=': '<=',
|
|
77
76
|
// Header filter operators text
|
|
78
77
|
headerFilterOperatorContains: 'Contiene',
|
|
79
|
-
|
|
80
|
-
headerFilterOperatorEquals: '
|
|
81
|
-
|
|
82
|
-
headerFilterOperatorStartsWith: '
|
|
83
|
-
headerFilterOperatorEndsWith: '
|
|
84
|
-
headerFilterOperatorIs: '
|
|
85
|
-
headerFilterOperatorNot: '
|
|
86
|
-
headerFilterOperatorAfter: '
|
|
87
|
-
headerFilterOperatorOnOrAfter: '
|
|
88
|
-
headerFilterOperatorBefore: '
|
|
89
|
-
headerFilterOperatorOnOrBefore: '
|
|
90
|
-
headerFilterOperatorIsEmpty: '
|
|
91
|
-
headerFilterOperatorIsNotEmpty: '
|
|
92
|
-
headerFilterOperatorIsAnyOf: '
|
|
93
|
-
'headerFilterOperator=': '
|
|
94
|
-
'headerFilterOperator!=': '
|
|
95
|
-
'headerFilterOperator>': '
|
|
96
|
-
'headerFilterOperator>=': '
|
|
97
|
-
'headerFilterOperator<': '
|
|
98
|
-
'headerFilterOperator<=': '
|
|
78
|
+
headerFilterOperatorDoesNotContain: 'Non contiene',
|
|
79
|
+
headerFilterOperatorEquals: 'Uguale a',
|
|
80
|
+
headerFilterOperatorDoesNotEqual: 'Diverso da',
|
|
81
|
+
headerFilterOperatorStartsWith: 'Comincia per',
|
|
82
|
+
headerFilterOperatorEndsWith: 'Termina per',
|
|
83
|
+
headerFilterOperatorIs: 'Uguale a',
|
|
84
|
+
headerFilterOperatorNot: 'Diverso da',
|
|
85
|
+
headerFilterOperatorAfter: 'Dopo il',
|
|
86
|
+
headerFilterOperatorOnOrAfter: 'A partire dal',
|
|
87
|
+
headerFilterOperatorBefore: 'Prima del',
|
|
88
|
+
headerFilterOperatorOnOrBefore: 'Fino al',
|
|
89
|
+
headerFilterOperatorIsEmpty: 'È vuoto',
|
|
90
|
+
headerFilterOperatorIsNotEmpty: 'Non è vuoto',
|
|
91
|
+
headerFilterOperatorIsAnyOf: 'È uno tra',
|
|
92
|
+
'headerFilterOperator=': 'Uguale a',
|
|
93
|
+
'headerFilterOperator!=': 'Diverso da',
|
|
94
|
+
'headerFilterOperator>': 'Maggiore di',
|
|
95
|
+
'headerFilterOperator>=': 'Maggiore o uguale a',
|
|
96
|
+
'headerFilterOperator<': 'Minore di',
|
|
97
|
+
'headerFilterOperator<=': 'Minore o uguale a',
|
|
99
98
|
// Filter values text
|
|
100
99
|
filterValueAny: 'qualunque',
|
|
101
100
|
filterValueTrue: 'vero',
|
package/node/locales/ptBR.js
CHANGED
|
@@ -53,9 +53,9 @@ const ptBRGrid = {
|
|
|
53
53
|
filterPanelInputPlaceholder: 'Filtrar valor',
|
|
54
54
|
// Filter operators text
|
|
55
55
|
filterOperatorContains: 'contém',
|
|
56
|
-
|
|
56
|
+
filterOperatorDoesNotContain: 'não contém',
|
|
57
57
|
filterOperatorEquals: 'é igual a',
|
|
58
|
-
|
|
58
|
+
filterOperatorDoesNotEqual: 'não é igual a',
|
|
59
59
|
filterOperatorStartsWith: 'começa com',
|
|
60
60
|
filterOperatorEndsWith: 'termina com',
|
|
61
61
|
filterOperatorIs: 'é',
|
|
@@ -75,9 +75,9 @@ const ptBRGrid = {
|
|
|
75
75
|
'filterOperator<=': 'menor ou igual que',
|
|
76
76
|
// Header filter operators text
|
|
77
77
|
headerFilterOperatorContains: 'Contém',
|
|
78
|
-
|
|
78
|
+
headerFilterOperatorDoesNotContain: 'Não contém',
|
|
79
79
|
headerFilterOperatorEquals: 'Igual',
|
|
80
|
-
|
|
80
|
+
headerFilterOperatorDoesNotEqual: 'Não é igual a',
|
|
81
81
|
headerFilterOperatorStartsWith: 'Começa com',
|
|
82
82
|
headerFilterOperatorEndsWith: 'Termina com',
|
|
83
83
|
headerFilterOperatorIs: 'É',
|
package/node/material/index.js
CHANGED
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
9
10
|
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
11
|
+
var _Divider = _interopRequireDefault(require("@mui/material/Divider"));
|
|
10
12
|
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
11
13
|
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
12
14
|
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
@@ -58,7 +60,9 @@ const iconSlots = {
|
|
|
58
60
|
columnReorderIcon: _icons.GridDragIcon
|
|
59
61
|
};
|
|
60
62
|
const materialSlots = (0, _extends2.default)({}, iconSlots, {
|
|
63
|
+
baseBadge: _Badge.default,
|
|
61
64
|
baseCheckbox: _Checkbox.default,
|
|
65
|
+
baseDivider: _Divider.default,
|
|
62
66
|
baseTextField: _TextField.default,
|
|
63
67
|
baseFormControl: _FormControl.default,
|
|
64
68
|
baseSelect: _Select.default,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ResizeObserver = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* HACK: Minimal shim to get jsdom to work.
|
|
11
|
+
*/
|
|
12
|
+
const ResizeObserver = exports.ResizeObserver = typeof globalThis.ResizeObserver !== 'undefined' ? globalThis.ResizeObserver : class ResizeObserver {
|
|
13
|
+
observe() {}
|
|
14
|
+
unobserve() {}
|
|
15
|
+
disconnect() {}
|
|
16
|
+
};
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.isCellExitEditModeKeys = exports.isCellEnterEditModeKeys = exports.isCellEditCommitKeys = exports.GRID_MULTIPLE_SELECTION_KEYS = exports.GRID_CELL_EXIT_EDIT_MODE_KEYS = exports.GRID_CELL_EDIT_COMMIT_KEYS = void 0;
|
|
7
|
+
exports.isCopyShortcut = isCopyShortcut;
|
|
8
|
+
exports.isNavigationKey = exports.isMultipleKey = exports.isKeyboardEvent = exports.isHideMenuKey = void 0;
|
|
7
9
|
exports.isPasteShortcut = isPasteShortcut;
|
|
8
10
|
exports.isPrintableKey = isPrintableKey;
|
|
9
11
|
// Non printable keys have a name, for example "ArrowRight", see the whole list:
|
|
@@ -37,8 +39,16 @@ const isHideMenuKey = key => key === 'Tab' || key === 'Escape';
|
|
|
37
39
|
// However, maybe it's overkill to fix, so let's be lazy.
|
|
38
40
|
exports.isHideMenuKey = isHideMenuKey;
|
|
39
41
|
function isPasteShortcut(event) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
return (event.ctrlKey || event.metaKey) &&
|
|
43
|
+
// We can't use event.code === 'KeyV' as event.code assumes a QWERTY keyboard layout,
|
|
44
|
+
// for example, it would be another letter on a Dvorak physical keyboard.
|
|
45
|
+
// We can't use event.key === 'v' as event.key is not stable with key modifiers and keyboard layouts,
|
|
46
|
+
// for example, it would be ה on a Hebrew keyboard layout.
|
|
47
|
+
// https://github.com/w3c/uievents/issues/377 could be a long-term solution
|
|
48
|
+
String.fromCharCode(event.keyCode) === 'V' && !event.shiftKey && !event.altKey;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Checks if the keyboard event corresponds to the copy shortcut (CTRL+C or CMD+C) across different localization keyboards.
|
|
52
|
+
function isCopyShortcut(event) {
|
|
53
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'C' && !event.shiftKey && !event.altKey;
|
|
44
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.22.0",
|
|
4
4
|
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"reselect": "^5.1.1",
|
|
45
|
-
"@mui/x-internals": "7.
|
|
45
|
+
"@mui/x-internals": "7.21.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@emotion/react": "^11.9.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* HACK: Minimal shim to get jsdom to work.
|
|
5
|
+
*/
|
|
6
|
+
export const ResizeObserver = typeof globalThis.ResizeObserver !== 'undefined' ? globalThis.ResizeObserver : class ResizeObserver {
|
|
7
|
+
observe() {}
|
|
8
|
+
unobserve() {}
|
|
9
|
+
disconnect() {}
|
|
10
|
+
};
|
package/utils/keyboardUtils.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export declare const isNavigationKey: (key: string) => boolean;
|
|
|
11
11
|
export declare const isKeyboardEvent: (event: any) => event is React.KeyboardEvent<HTMLElement>;
|
|
12
12
|
export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is "Tab" | "Escape";
|
|
13
13
|
export declare function isPasteShortcut(event: React.KeyboardEvent): boolean;
|
|
14
|
+
export declare function isCopyShortcut(event: KeyboardEvent): boolean;
|
package/utils/keyboardUtils.js
CHANGED
|
@@ -22,8 +22,16 @@ export const isHideMenuKey = key => key === 'Tab' || key === 'Escape';
|
|
|
22
22
|
// In theory, on macOS, ctrl + v doesn't trigger a paste, so the function should return false.
|
|
23
23
|
// However, maybe it's overkill to fix, so let's be lazy.
|
|
24
24
|
export function isPasteShortcut(event) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
return (event.ctrlKey || event.metaKey) &&
|
|
26
|
+
// We can't use event.code === 'KeyV' as event.code assumes a QWERTY keyboard layout,
|
|
27
|
+
// for example, it would be another letter on a Dvorak physical keyboard.
|
|
28
|
+
// We can't use event.key === 'v' as event.key is not stable with key modifiers and keyboard layouts,
|
|
29
|
+
// for example, it would be ה on a Hebrew keyboard layout.
|
|
30
|
+
// https://github.com/w3c/uievents/issues/377 could be a long-term solution
|
|
31
|
+
String.fromCharCode(event.keyCode) === 'V' && !event.shiftKey && !event.altKey;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Checks if the keyboard event corresponds to the copy shortcut (CTRL+C or CMD+C) across different localization keyboards.
|
|
35
|
+
export function isCopyShortcut(event) {
|
|
36
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'C' && !event.shiftKey && !event.altKey;
|
|
29
37
|
}
|