@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/modern/joy/joySlots.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["
|
|
4
|
-
_excluded2 = ["
|
|
5
|
-
_excluded3 = ["
|
|
6
|
-
_excluded4 = ["color", "size", "sx", "
|
|
7
|
-
_excluded5 = ["
|
|
8
|
-
_excluded6 = ["native"],
|
|
9
|
-
_excluded7 = ["
|
|
3
|
+
const _excluded = ["slotProps", "variant", "color", "sx"],
|
|
4
|
+
_excluded2 = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
|
|
5
|
+
_excluded3 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
|
|
6
|
+
_excluded4 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
|
|
7
|
+
_excluded5 = ["color", "size", "sx", "touchRippleRef"],
|
|
8
|
+
_excluded6 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
|
|
9
|
+
_excluded7 = ["native"],
|
|
10
|
+
_excluded8 = ["shrink", "variant", "sx"];
|
|
10
11
|
import * as React from 'react';
|
|
12
|
+
import JoyBadge from '@mui/joy/Badge';
|
|
11
13
|
import JoyCheckbox from '@mui/joy/Checkbox';
|
|
14
|
+
import JoyDivider from '@mui/joy/Divider';
|
|
12
15
|
import JoyInput from '@mui/joy/Input';
|
|
13
16
|
import JoyFormControl from '@mui/joy/FormControl';
|
|
14
17
|
import JoyFormLabel from '@mui/joy/FormLabel';
|
|
@@ -58,14 +61,27 @@ function convertVariant(variant, defaultVariant = 'plain') {
|
|
|
58
61
|
filled: 'soft'
|
|
59
62
|
}[variant] || defaultVariant;
|
|
60
63
|
}
|
|
61
|
-
const
|
|
64
|
+
const Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
65
|
+
let {
|
|
66
|
+
color,
|
|
67
|
+
sx
|
|
68
|
+
} = _ref,
|
|
69
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
70
|
+
return /*#__PURE__*/_jsx(JoyBadge, _extends({}, props, {
|
|
71
|
+
color: convertColor(color),
|
|
72
|
+
variant: "plain",
|
|
73
|
+
sx: sx,
|
|
74
|
+
ref: ref
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
const Checkbox = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
62
78
|
let {
|
|
63
79
|
inputProps,
|
|
64
80
|
onChange,
|
|
65
81
|
checked,
|
|
66
82
|
inputRef
|
|
67
|
-
} =
|
|
68
|
-
props = _objectWithoutPropertiesLoose(
|
|
83
|
+
} = _ref2,
|
|
84
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
69
85
|
return /*#__PURE__*/_jsx(JoyCheckbox, _extends({}, props, {
|
|
70
86
|
slotProps: {
|
|
71
87
|
input: _extends({}, inputProps, {
|
|
@@ -77,7 +93,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
77
93
|
onChange: onChange
|
|
78
94
|
}));
|
|
79
95
|
});
|
|
80
|
-
const TextField = /*#__PURE__*/React.forwardRef((
|
|
96
|
+
const TextField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
81
97
|
let {
|
|
82
98
|
onChange,
|
|
83
99
|
label,
|
|
@@ -87,8 +103,8 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
87
103
|
type,
|
|
88
104
|
size,
|
|
89
105
|
variant
|
|
90
|
-
} =
|
|
91
|
-
props = _objectWithoutPropertiesLoose(
|
|
106
|
+
} = _ref3,
|
|
107
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
92
108
|
const rootRef = useForkRef(ref, props.InputProps?.ref);
|
|
93
109
|
const inputForkRef = useForkRef(inputRef, props?.inputProps?.ref);
|
|
94
110
|
const {
|
|
@@ -116,7 +132,7 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
116
132
|
})]
|
|
117
133
|
});
|
|
118
134
|
});
|
|
119
|
-
const Button = /*#__PURE__*/React.forwardRef(function Button(
|
|
135
|
+
const Button = /*#__PURE__*/React.forwardRef(function Button(_ref4, ref) {
|
|
120
136
|
let {
|
|
121
137
|
startIcon,
|
|
122
138
|
color,
|
|
@@ -124,8 +140,8 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
|
|
|
124
140
|
size,
|
|
125
141
|
sx,
|
|
126
142
|
variant
|
|
127
|
-
} =
|
|
128
|
-
props = _objectWithoutPropertiesLoose(
|
|
143
|
+
} = _ref4,
|
|
144
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
129
145
|
return /*#__PURE__*/_jsx(JoyButton, _extends({}, props, {
|
|
130
146
|
size: convertSize(size),
|
|
131
147
|
color: convertColor(color),
|
|
@@ -136,13 +152,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
|
|
|
136
152
|
sx: sx
|
|
137
153
|
}));
|
|
138
154
|
});
|
|
139
|
-
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(
|
|
155
|
+
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref5, ref) {
|
|
140
156
|
let {
|
|
141
157
|
color,
|
|
142
158
|
size,
|
|
143
159
|
sx
|
|
144
|
-
} =
|
|
145
|
-
props = _objectWithoutPropertiesLoose(
|
|
160
|
+
} = _ref5,
|
|
161
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
146
162
|
return /*#__PURE__*/_jsx(JoyIconButton, _extends({}, props, {
|
|
147
163
|
size: convertSize(size),
|
|
148
164
|
color: convertColor(color) ?? 'neutral',
|
|
@@ -151,7 +167,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref)
|
|
|
151
167
|
sx: sx
|
|
152
168
|
}));
|
|
153
169
|
});
|
|
154
|
-
const Select = /*#__PURE__*/React.forwardRef((
|
|
170
|
+
const Select = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
155
171
|
let {
|
|
156
172
|
open,
|
|
157
173
|
onOpen,
|
|
@@ -163,8 +179,8 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
163
179
|
MenuProps,
|
|
164
180
|
inputRef,
|
|
165
181
|
labelId
|
|
166
|
-
} =
|
|
167
|
-
props = _objectWithoutPropertiesLoose(
|
|
182
|
+
} = _ref6,
|
|
183
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
168
184
|
const handleChange = (event, newValue) => {
|
|
169
185
|
if (event && onChange) {
|
|
170
186
|
// Same as in https://github.com/mui/material-ui/blob/e5558282a8f36856aef1299f3a36f3235e92e770/packages/mui-material/src/Select/SelectInput.js#L288-L300
|
|
@@ -215,17 +231,17 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
215
231
|
}
|
|
216
232
|
}));
|
|
217
233
|
});
|
|
218
|
-
const Option = /*#__PURE__*/React.forwardRef((
|
|
219
|
-
let props = _objectWithoutPropertiesLoose(
|
|
234
|
+
const Option = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
235
|
+
let props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
220
236
|
return /*#__PURE__*/_jsx(JoyOption, _extends({}, props, {
|
|
221
237
|
ref: ref
|
|
222
238
|
}));
|
|
223
239
|
});
|
|
224
|
-
const InputLabel = /*#__PURE__*/React.forwardRef((
|
|
240
|
+
const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
225
241
|
let {
|
|
226
242
|
sx
|
|
227
|
-
} =
|
|
228
|
-
props = _objectWithoutPropertiesLoose(
|
|
243
|
+
} = _ref8,
|
|
244
|
+
props = _objectWithoutPropertiesLoose(_ref8, _excluded8);
|
|
229
245
|
return /*#__PURE__*/_jsx(JoyFormLabel, _extends({}, props, {
|
|
230
246
|
ref: ref,
|
|
231
247
|
sx: sx
|
|
@@ -351,7 +367,9 @@ const LoadingOverlay = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
351
367
|
}));
|
|
352
368
|
});
|
|
353
369
|
const joySlots = _extends({}, joyIconSlots, {
|
|
370
|
+
baseBadge: Badge,
|
|
354
371
|
baseCheckbox: Checkbox,
|
|
372
|
+
baseDivider: JoyDivider,
|
|
355
373
|
baseTextField: TextField,
|
|
356
374
|
baseButton: Button,
|
|
357
375
|
baseIconButton: IconButton,
|
package/modern/locales/daDK.js
CHANGED
|
@@ -33,8 +33,7 @@ const daDKGrid = {
|
|
|
33
33
|
columnsManagementSearchTitle: 'Søg',
|
|
34
34
|
columnsManagementNoColumns: 'Ingen søjler',
|
|
35
35
|
columnsManagementShowHideAllText: 'Vis/Skjul Alle',
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
columnsManagementReset: 'Nulstil',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Tilføj filter',
|
|
40
39
|
filterPanelRemoveAll: 'Fjern alle',
|
|
@@ -48,9 +47,9 @@ const daDKGrid = {
|
|
|
48
47
|
filterPanelInputPlaceholder: 'Filterværdi',
|
|
49
48
|
// Filter operators text
|
|
50
49
|
filterOperatorContains: 'indeholder',
|
|
51
|
-
|
|
50
|
+
filterOperatorDoesNotContain: 'indeholder ikke',
|
|
52
51
|
filterOperatorEquals: 'lig med',
|
|
53
|
-
|
|
52
|
+
filterOperatorDoesNotEqual: 'ikke lig med',
|
|
54
53
|
filterOperatorStartsWith: 'begynder med',
|
|
55
54
|
filterOperatorEndsWith: 'ender med',
|
|
56
55
|
filterOperatorIs: 'er lig med',
|
|
@@ -70,9 +69,9 @@ const daDKGrid = {
|
|
|
70
69
|
'filterOperator<=': '<=',
|
|
71
70
|
// Header filter operators text
|
|
72
71
|
headerFilterOperatorContains: 'Indeholder',
|
|
73
|
-
|
|
72
|
+
headerFilterOperatorDoesNotContain: 'Indeholder ikke',
|
|
74
73
|
headerFilterOperatorEquals: 'Lig med',
|
|
75
|
-
|
|
74
|
+
headerFilterOperatorDoesNotEqual: 'Ikke lig med',
|
|
76
75
|
headerFilterOperatorStartsWith: 'Begynder med',
|
|
77
76
|
headerFilterOperatorEndsWith: 'Ender med',
|
|
78
77
|
headerFilterOperatorIs: 'Er lig med',
|
package/modern/locales/itIT.js
CHANGED
|
@@ -30,11 +30,10 @@ const itITGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Stampa',
|
|
31
31
|
toolbarExportExcel: 'Scarica come Excel',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Cerca',
|
|
34
|
+
columnsManagementNoColumns: 'Nessuna colonna',
|
|
35
|
+
columnsManagementShowHideAllText: 'Mostra/Nascondi Tutto',
|
|
36
|
+
columnsManagementReset: 'Resetta',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Aggiungi un filtro',
|
|
40
39
|
filterPanelRemoveAll: 'Rimuovi filtri',
|
|
@@ -48,13 +47,13 @@ const itITGrid = {
|
|
|
48
47
|
filterPanelInputPlaceholder: 'Filtra il valore',
|
|
49
48
|
// Filter operators text
|
|
50
49
|
filterOperatorContains: 'contiene',
|
|
51
|
-
|
|
50
|
+
filterOperatorDoesNotContain: 'non contiene',
|
|
52
51
|
filterOperatorEquals: 'uguale a',
|
|
53
|
-
|
|
52
|
+
filterOperatorDoesNotEqual: 'diverso da',
|
|
54
53
|
filterOperatorStartsWith: 'comincia per',
|
|
55
54
|
filterOperatorEndsWith: 'termina per',
|
|
56
55
|
filterOperatorIs: 'uguale a',
|
|
57
|
-
filterOperatorNot: '
|
|
56
|
+
filterOperatorNot: 'diverso da',
|
|
58
57
|
filterOperatorAfter: 'dopo il',
|
|
59
58
|
filterOperatorOnOrAfter: 'a partire dal',
|
|
60
59
|
filterOperatorBefore: 'prima del',
|
|
@@ -70,26 +69,26 @@ const itITGrid = {
|
|
|
70
69
|
'filterOperator<=': '<=',
|
|
71
70
|
// Header filter operators text
|
|
72
71
|
headerFilterOperatorContains: 'Contiene',
|
|
73
|
-
|
|
74
|
-
headerFilterOperatorEquals: '
|
|
75
|
-
|
|
76
|
-
headerFilterOperatorStartsWith: '
|
|
77
|
-
headerFilterOperatorEndsWith: '
|
|
78
|
-
headerFilterOperatorIs: '
|
|
79
|
-
headerFilterOperatorNot: '
|
|
80
|
-
headerFilterOperatorAfter: '
|
|
81
|
-
headerFilterOperatorOnOrAfter: '
|
|
82
|
-
headerFilterOperatorBefore: '
|
|
83
|
-
headerFilterOperatorOnOrBefore: '
|
|
84
|
-
headerFilterOperatorIsEmpty: '
|
|
85
|
-
headerFilterOperatorIsNotEmpty: '
|
|
86
|
-
headerFilterOperatorIsAnyOf: '
|
|
87
|
-
'headerFilterOperator=': '
|
|
88
|
-
'headerFilterOperator!=': '
|
|
89
|
-
'headerFilterOperator>': '
|
|
90
|
-
'headerFilterOperator>=': '
|
|
91
|
-
'headerFilterOperator<': '
|
|
92
|
-
'headerFilterOperator<=': '
|
|
72
|
+
headerFilterOperatorDoesNotContain: 'Non contiene',
|
|
73
|
+
headerFilterOperatorEquals: 'Uguale a',
|
|
74
|
+
headerFilterOperatorDoesNotEqual: 'Diverso da',
|
|
75
|
+
headerFilterOperatorStartsWith: 'Comincia per',
|
|
76
|
+
headerFilterOperatorEndsWith: 'Termina per',
|
|
77
|
+
headerFilterOperatorIs: 'Uguale a',
|
|
78
|
+
headerFilterOperatorNot: 'Diverso da',
|
|
79
|
+
headerFilterOperatorAfter: 'Dopo il',
|
|
80
|
+
headerFilterOperatorOnOrAfter: 'A partire dal',
|
|
81
|
+
headerFilterOperatorBefore: 'Prima del',
|
|
82
|
+
headerFilterOperatorOnOrBefore: 'Fino al',
|
|
83
|
+
headerFilterOperatorIsEmpty: 'È vuoto',
|
|
84
|
+
headerFilterOperatorIsNotEmpty: 'Non è vuoto',
|
|
85
|
+
headerFilterOperatorIsAnyOf: 'È uno tra',
|
|
86
|
+
'headerFilterOperator=': 'Uguale a',
|
|
87
|
+
'headerFilterOperator!=': 'Diverso da',
|
|
88
|
+
'headerFilterOperator>': 'Maggiore di',
|
|
89
|
+
'headerFilterOperator>=': 'Maggiore o uguale a',
|
|
90
|
+
'headerFilterOperator<': 'Minore di',
|
|
91
|
+
'headerFilterOperator<=': 'Minore o uguale a',
|
|
93
92
|
// Filter values text
|
|
94
93
|
filterValueAny: 'qualunque',
|
|
95
94
|
filterValueTrue: 'vero',
|
package/modern/locales/ptBR.js
CHANGED
|
@@ -47,9 +47,9 @@ const ptBRGrid = {
|
|
|
47
47
|
filterPanelInputPlaceholder: 'Filtrar valor',
|
|
48
48
|
// Filter operators text
|
|
49
49
|
filterOperatorContains: 'contém',
|
|
50
|
-
|
|
50
|
+
filterOperatorDoesNotContain: 'não contém',
|
|
51
51
|
filterOperatorEquals: 'é igual a',
|
|
52
|
-
|
|
52
|
+
filterOperatorDoesNotEqual: 'não é igual a',
|
|
53
53
|
filterOperatorStartsWith: 'começa com',
|
|
54
54
|
filterOperatorEndsWith: 'termina com',
|
|
55
55
|
filterOperatorIs: 'é',
|
|
@@ -69,9 +69,9 @@ const ptBRGrid = {
|
|
|
69
69
|
'filterOperator<=': 'menor ou igual que',
|
|
70
70
|
// Header filter operators text
|
|
71
71
|
headerFilterOperatorContains: 'Contém',
|
|
72
|
-
|
|
72
|
+
headerFilterOperatorDoesNotContain: 'Não contém',
|
|
73
73
|
headerFilterOperatorEquals: 'Igual',
|
|
74
|
-
|
|
74
|
+
headerFilterOperatorDoesNotEqual: 'Não é igual a',
|
|
75
75
|
headerFilterOperatorStartsWith: 'Começa com',
|
|
76
76
|
headerFilterOperatorEndsWith: 'Termina com',
|
|
77
77
|
headerFilterOperatorIs: 'É',
|
package/modern/material/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import MUIBadge from '@mui/material/Badge';
|
|
2
3
|
import MUICheckbox from '@mui/material/Checkbox';
|
|
4
|
+
import MUIDivider from '@mui/material/Divider';
|
|
3
5
|
import MUITextField from '@mui/material/TextField';
|
|
4
6
|
import MUIFormControl from '@mui/material/FormControl';
|
|
5
7
|
import MUISelect from '@mui/material/Select';
|
|
@@ -51,7 +53,9 @@ const iconSlots = {
|
|
|
51
53
|
columnReorderIcon: GridDragIcon
|
|
52
54
|
};
|
|
53
55
|
const materialSlots = _extends({}, iconSlots, {
|
|
56
|
+
baseBadge: MUIBadge,
|
|
54
57
|
baseCheckbox: MUICheckbox,
|
|
58
|
+
baseDivider: MUIDivider,
|
|
55
59
|
baseTextField: MUITextField,
|
|
56
60
|
baseFormControl: MUIFormControl,
|
|
57
61
|
baseSelect: MUISelect,
|
|
@@ -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
|
+
};
|
|
@@ -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
|
}
|
|
@@ -702,6 +702,7 @@ DataGridRaw.propTypes = {
|
|
|
702
702
|
* Setting it to a lower value could be useful when using dynamic row height,
|
|
703
703
|
* but might reduce performance when displaying a large number of rows.
|
|
704
704
|
* @default 166
|
|
705
|
+
* @deprecated
|
|
705
706
|
*/
|
|
706
707
|
rowPositionsDebounceMs: _propTypes.default.number,
|
|
707
708
|
/**
|
package/node/DataGrid/index.js
CHANGED
|
@@ -3,19 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
DATA_GRID_PROPS_DEFAULT_VALUES: true
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "DATA_GRID_PROPS_DEFAULT_VALUES", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return _useDataGridProps.DATA_GRID_PROPS_DEFAULT_VALUES;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
6
|
var _DataGrid = require("./DataGrid");
|
|
16
7
|
Object.keys(_DataGrid).forEach(function (key) {
|
|
17
8
|
if (key === "default" || key === "__esModule") return;
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
9
|
if (key in exports && exports[key] === _DataGrid[key]) return;
|
|
20
10
|
Object.defineProperty(exports, key, {
|
|
21
11
|
enumerable: true,
|
|
@@ -23,5 +13,4 @@ Object.keys(_DataGrid).forEach(function (key) {
|
|
|
23
13
|
return _DataGrid[key];
|
|
24
14
|
}
|
|
25
15
|
});
|
|
26
|
-
});
|
|
27
|
-
var _useDataGridProps = require("./useDataGridProps");
|
|
16
|
+
});
|
|
@@ -34,6 +34,7 @@ var _useGridColumnGrouping = require("../hooks/features/columnGrouping/useGridCo
|
|
|
34
34
|
var _virtualization = require("../hooks/features/virtualization");
|
|
35
35
|
var _useGridColumnResize = require("../hooks/features/columnResize/useGridColumnResize");
|
|
36
36
|
var _useGridRowSpanning = require("../hooks/features/rows/useGridRowSpanning");
|
|
37
|
+
var _useGridListView = require("../hooks/features/listView/useGridListView");
|
|
37
38
|
const useDataGridComponent = (inputApiRef, props) => {
|
|
38
39
|
const apiRef = (0, _useGridInitialization.useGridInitialization)(inputApiRef, props);
|
|
39
40
|
|
|
@@ -63,12 +64,13 @@ const useDataGridComponent = (inputApiRef, props) => {
|
|
|
63
64
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridColumnMenu.columnMenuStateInitializer, apiRef, props);
|
|
64
65
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridColumnGrouping.columnGroupsStateInitializer, apiRef, props);
|
|
65
66
|
(0, _useGridInitializeState.useGridInitializeState)(_virtualization.virtualizationStateInitializer, apiRef, props);
|
|
67
|
+
(0, _useGridInitializeState.useGridInitializeState)(_useGridListView.listViewStateInitializer, apiRef, props);
|
|
66
68
|
(0, _useGridKeyboardNavigation.useGridKeyboardNavigation)(apiRef, props);
|
|
67
69
|
(0, _useGridRowSelection.useGridRowSelection)(apiRef, props);
|
|
68
70
|
(0, _useGridColumns.useGridColumns)(apiRef, props);
|
|
69
71
|
(0, _useGridRows.useGridRows)(apiRef, props);
|
|
70
72
|
(0, _useGridRowSpanning.useGridRowSpanning)(apiRef, props);
|
|
71
|
-
(0, _useGridParamsApi.useGridParamsApi)(apiRef);
|
|
73
|
+
(0, _useGridParamsApi.useGridParamsApi)(apiRef, props);
|
|
72
74
|
(0, _useGridColumnSpanning.useGridColumnSpanning)(apiRef);
|
|
73
75
|
(0, _useGridColumnGrouping.useGridColumnGrouping)(apiRef, props);
|
|
74
76
|
(0, _useGridEditing.useGridEditing)(apiRef, props);
|
|
@@ -89,6 +91,7 @@ const useDataGridComponent = (inputApiRef, props) => {
|
|
|
89
91
|
(0, _useGridEvents.useGridEvents)(apiRef, props);
|
|
90
92
|
(0, _useGridStatePersistence.useGridStatePersistence)(apiRef);
|
|
91
93
|
(0, _virtualization.useGridVirtualization)(apiRef, props);
|
|
94
|
+
(0, _useGridListView.useGridListView)(apiRef, props);
|
|
92
95
|
return apiRef;
|
|
93
96
|
};
|
|
94
97
|
exports.useDataGridComponent = useDataGridComponent;
|
|
@@ -5,14 +5,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.useDataGridProps =
|
|
8
|
+
exports.useDataGridProps = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _constants = require("../constants");
|
|
13
13
|
var _defaultGridSlotsComponents = require("../constants/defaultGridSlotsComponents");
|
|
14
|
-
var _models = require("../models");
|
|
15
14
|
var _utils = require("../internals/utils");
|
|
15
|
+
var _dataGridPropsDefaultValues = require("../constants/dataGridPropsDefaultValues");
|
|
16
16
|
const DATA_GRID_FORCED_PROPS = {
|
|
17
17
|
disableMultipleColumnsFiltering: true,
|
|
18
18
|
disableMultipleColumnsSorting: true,
|
|
@@ -22,67 +22,8 @@ const DATA_GRID_FORCED_PROPS = {
|
|
|
22
22
|
checkboxSelectionVisibleOnly: false,
|
|
23
23
|
disableColumnReorder: true,
|
|
24
24
|
keepColumnPositionIfDraggedOutside: false,
|
|
25
|
-
signature: 'DataGrid'
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
|
|
30
|
-
*/
|
|
31
|
-
const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
32
|
-
autoHeight: false,
|
|
33
|
-
autoPageSize: false,
|
|
34
|
-
autosizeOnMount: false,
|
|
35
|
-
checkboxSelection: false,
|
|
36
|
-
checkboxSelectionVisibleOnly: false,
|
|
37
|
-
clipboardCopyCellDelimiter: '\t',
|
|
38
|
-
columnBufferPx: 150,
|
|
39
|
-
columnHeaderHeight: 56,
|
|
40
|
-
disableAutosize: false,
|
|
41
|
-
disableColumnFilter: false,
|
|
42
|
-
disableColumnMenu: false,
|
|
43
|
-
disableColumnReorder: false,
|
|
44
|
-
disableColumnResize: false,
|
|
45
|
-
disableColumnSelector: false,
|
|
46
|
-
disableColumnSorting: false,
|
|
47
|
-
disableDensitySelector: false,
|
|
48
|
-
disableEval: false,
|
|
49
|
-
disableMultipleColumnsFiltering: false,
|
|
50
|
-
disableMultipleColumnsSorting: false,
|
|
51
|
-
disableMultipleRowSelection: false,
|
|
52
|
-
disableRowSelectionOnClick: false,
|
|
53
|
-
disableVirtualization: false,
|
|
54
|
-
editMode: _models.GridEditModes.Cell,
|
|
55
|
-
filterDebounceMs: 150,
|
|
56
|
-
filterMode: 'client',
|
|
57
|
-
hideFooter: false,
|
|
58
|
-
hideFooterPagination: false,
|
|
59
|
-
hideFooterRowCount: false,
|
|
60
|
-
hideFooterSelectedRowCount: false,
|
|
61
|
-
ignoreDiacritics: false,
|
|
62
|
-
ignoreValueFormatterDuringExport: false,
|
|
63
|
-
// TODO v8: Update to 'select'
|
|
64
|
-
indeterminateCheckboxAction: 'deselect',
|
|
65
|
-
keepColumnPositionIfDraggedOutside: false,
|
|
66
|
-
keepNonExistentRowsSelected: false,
|
|
67
|
-
loading: false,
|
|
68
|
-
logger: console,
|
|
69
|
-
logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
|
70
|
-
pageSizeOptions: [25, 50, 100],
|
|
71
|
-
pagination: false,
|
|
72
|
-
paginationMode: 'client',
|
|
73
|
-
resizeThrottleMs: 60,
|
|
74
|
-
rowBufferPx: 150,
|
|
75
|
-
rowHeight: 52,
|
|
76
|
-
rowPositionsDebounceMs: 166,
|
|
77
|
-
rows: [],
|
|
78
|
-
rowSelection: true,
|
|
79
|
-
rowSpacingType: 'margin',
|
|
80
|
-
showCellVerticalBorder: false,
|
|
81
|
-
showColumnVerticalBorder: false,
|
|
82
|
-
sortingMode: 'client',
|
|
83
|
-
sortingOrder: ['asc', 'desc', null],
|
|
84
|
-
throttleRowsMs: 0,
|
|
85
|
-
unstable_rowSpanning: false
|
|
25
|
+
signature: 'DataGrid',
|
|
26
|
+
unstable_listView: false
|
|
86
27
|
};
|
|
87
28
|
const defaultSlots = _defaultGridSlotsComponents.DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
88
29
|
const useDataGridProps = inProps => {
|
|
@@ -98,9 +39,9 @@ const useDataGridProps = inProps => {
|
|
|
98
39
|
slots: themedProps.slots
|
|
99
40
|
}), [themedProps.slots]);
|
|
100
41
|
const injectDefaultProps = React.useMemo(() => {
|
|
101
|
-
return Object.keys(DATA_GRID_PROPS_DEFAULT_VALUES).reduce((acc, key) => {
|
|
42
|
+
return Object.keys(_dataGridPropsDefaultValues.DATA_GRID_PROPS_DEFAULT_VALUES).reduce((acc, key) => {
|
|
102
43
|
// @ts-ignore
|
|
103
|
-
acc[key] = themedProps[key] ?? DATA_GRID_PROPS_DEFAULT_VALUES[key];
|
|
44
|
+
acc[key] = themedProps[key] ?? _dataGridPropsDefaultValues.DATA_GRID_PROPS_DEFAULT_VALUES[key];
|
|
104
45
|
return acc;
|
|
105
46
|
}, {});
|
|
106
47
|
}, [themedProps]);
|
|
@@ -21,6 +21,7 @@ const GridPaginationRoot = (0, _styles.styled)(_TablePagination.default)(({
|
|
|
21
21
|
}) => ({
|
|
22
22
|
maxHeight: 'calc(100% + 1px)',
|
|
23
23
|
// border width
|
|
24
|
+
flexGrow: 1,
|
|
24
25
|
[`& .${_TablePagination.tablePaginationClasses.selectLabel}`]: {
|
|
25
26
|
display: 'none',
|
|
26
27
|
[theme.breakpoints.up('sm')]: {
|