@mui/x-data-grid 6.9.0 → 6.9.2
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 +136 -8
- package/DataGrid/DataGrid.js +4 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/README.md +1 -1
- package/colDef/gridActionsColDef.js +2 -1
- package/colDef/gridBooleanColDef.js +1 -0
- package/colDef/gridBooleanOperators.js +5 -6
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/colDef/gridDateColDef.js +2 -0
- package/colDef/gridDateOperators.js +14 -19
- package/colDef/gridNumericColDef.js +3 -1
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridNumericOperators.js +24 -43
- package/colDef/gridSingleSelectOperators.js +9 -14
- package/colDef/gridStringColDef.js +3 -1
- package/colDef/gridStringOperators.d.ts +2 -2
- package/colDef/gridStringOperators.js +22 -36
- package/colDef/utils.d.ts +21 -0
- package/colDef/utils.js +51 -0
- package/components/GridPagination.js +16 -3
- package/components/cell/GridCell.js +1 -1
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.js +3 -3
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/hooks/features/editing/useGridEditing.js +2 -1
- package/hooks/features/editing/useGridRowEditing.js +2 -2
- package/hooks/features/filter/gridFilterState.d.ts +6 -5
- package/hooks/features/filter/gridFilterUtils.d.ts +8 -6
- package/hooks/features/filter/gridFilterUtils.js +115 -57
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +34 -25
- package/hooks/features/pagination/gridPaginationSelector.js +10 -5
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -0
- package/hooks/features/rows/gridRowsUtils.js +1 -0
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -1
- package/hooks/features/rows/useGridParamsApi.js +31 -1
- package/hooks/features/rows/useGridRows.js +4 -3
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +1 -0
- package/joy/joySlots.js +29 -8
- package/legacy/DataGrid/DataGrid.js +4 -1
- package/legacy/DataGrid/useDataGridComponent.js +1 -1
- package/legacy/colDef/gridActionsColDef.js +2 -1
- package/legacy/colDef/gridBooleanColDef.js +1 -0
- package/legacy/colDef/gridBooleanOperators.js +5 -5
- package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/legacy/colDef/gridDateColDef.js +2 -0
- package/legacy/colDef/gridDateOperators.js +14 -16
- package/legacy/colDef/gridNumericColDef.js +3 -1
- package/legacy/colDef/gridNumericOperators.js +24 -33
- package/legacy/colDef/gridSingleSelectOperators.js +9 -11
- package/legacy/colDef/gridStringColDef.js +3 -1
- package/legacy/colDef/gridStringOperators.js +22 -28
- package/legacy/colDef/utils.js +51 -0
- package/legacy/components/GridPagination.js +16 -3
- package/legacy/components/cell/GridCell.js +2 -1
- package/legacy/components/cell/GridEditDateCell.js +1 -1
- package/legacy/components/cell/GridEditInputCell.js +3 -3
- package/legacy/hooks/features/columns/gridColumnsUtils.js +4 -1
- package/legacy/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/legacy/hooks/features/editing/useGridEditing.js +2 -1
- package/legacy/hooks/features/editing/useGridRowEditing.js +2 -2
- package/legacy/hooks/features/filter/gridFilterUtils.js +115 -65
- package/legacy/hooks/features/filter/useGridFilter.js +32 -24
- package/legacy/hooks/features/pagination/gridPaginationSelector.js +10 -5
- package/legacy/hooks/features/rows/gridRowsUtils.js +1 -0
- package/legacy/hooks/features/rows/useGridParamsApi.js +29 -1
- package/legacy/hooks/features/rows/useGridRows.js +15 -16
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -0
- package/legacy/joy/joySlots.js +29 -8
- package/legacy/locales/esES.js +3 -3
- package/legacy/locales/huHU.js +23 -25
- package/legacy/locales/roRO.js +34 -38
- package/locales/esES.js +3 -3
- package/locales/huHU.js +23 -25
- package/locales/roRO.js +34 -38
- package/models/api/gridEditingApi.d.ts +1 -1
- package/models/api/gridParamsApi.d.ts +22 -1
- package/models/colDef/gridColDef.d.ts +13 -1
- package/models/gridFilterOperator.d.ts +17 -2
- package/models/gridRows.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +4 -1
- package/modern/DataGrid/DataGrid.js +4 -1
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/colDef/gridActionsColDef.js +2 -1
- package/modern/colDef/gridBooleanColDef.js +1 -0
- package/modern/colDef/gridBooleanOperators.js +5 -6
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/modern/colDef/gridDateColDef.js +2 -0
- package/modern/colDef/gridDateOperators.js +14 -19
- package/modern/colDef/gridNumericColDef.js +3 -1
- package/modern/colDef/gridNumericOperators.js +24 -43
- package/modern/colDef/gridSingleSelectOperators.js +9 -14
- package/modern/colDef/gridStringColDef.js +3 -1
- package/modern/colDef/gridStringOperators.js +22 -36
- package/modern/colDef/utils.js +51 -0
- package/modern/components/GridPagination.js +16 -2
- package/modern/components/cell/GridCell.js +1 -1
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +3 -3
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/modern/hooks/features/editing/useGridEditing.js +1 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -2
- package/modern/hooks/features/filter/gridFilterUtils.js +110 -54
- package/modern/hooks/features/filter/useGridFilter.js +34 -25
- package/modern/hooks/features/pagination/gridPaginationSelector.js +9 -5
- package/modern/hooks/features/rows/gridRowsUtils.js +1 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +29 -1
- package/modern/hooks/features/rows/useGridRows.js +4 -3
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/joy/joySlots.js +29 -7
- package/modern/locales/esES.js +3 -3
- package/modern/locales/huHU.js +23 -25
- package/modern/locales/roRO.js +34 -38
- package/node/DataGrid/DataGrid.js +4 -1
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/colDef/gridActionsColDef.js +2 -1
- package/node/colDef/gridBooleanColDef.js +1 -0
- package/node/colDef/gridBooleanOperators.js +5 -6
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/node/colDef/gridDateColDef.js +2 -0
- package/node/colDef/gridDateOperators.js +14 -19
- package/node/colDef/gridNumericColDef.js +3 -1
- package/node/colDef/gridNumericOperators.js +24 -43
- package/node/colDef/gridSingleSelectOperators.js +9 -14
- package/node/colDef/gridStringColDef.js +3 -1
- package/node/colDef/gridStringOperators.js +22 -36
- package/node/colDef/utils.js +64 -0
- package/node/components/GridPagination.js +16 -2
- package/node/components/cell/GridCell.js +1 -1
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +3 -3
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/node/hooks/features/editing/useGridEditing.js +1 -1
- package/node/hooks/features/editing/useGridRowEditing.js +1 -1
- package/node/hooks/features/filter/gridFilterUtils.js +110 -54
- package/node/hooks/features/filter/useGridFilter.js +33 -24
- package/node/hooks/features/pagination/gridPaginationSelector.js +9 -5
- package/node/hooks/features/rows/gridRowsUtils.js +3 -1
- package/node/hooks/features/rows/useGridParamsApi.js +29 -1
- package/node/hooks/features/rows/useGridRows.js +3 -2
- package/node/index.js +1 -1
- package/node/internals/index.js +13 -1
- package/node/joy/joySlots.js +29 -7
- package/node/locales/esES.js +3 -3
- package/node/locales/huHU.js +23 -25
- package/node/locales/roRO.js +34 -38
- package/package.json +2 -2
package/legacy/joy/joySlots.js
CHANGED
|
@@ -21,11 +21,14 @@ import JoySelect from '@mui/joy/Select';
|
|
|
21
21
|
import JoyOption from '@mui/joy/Option';
|
|
22
22
|
import JoyBox from '@mui/joy/Box';
|
|
23
23
|
import JoyTypography from '@mui/joy/Typography';
|
|
24
|
+
import JoyCircularProgress from '@mui/joy/CircularProgress';
|
|
25
|
+
import JoyTooltip from '@mui/joy/Tooltip';
|
|
24
26
|
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
25
27
|
import joyIconSlots, { GridKeyboardArrowRight, GridKeyboardArrowLeft } from './icons';
|
|
26
28
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
27
29
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
28
30
|
import { gridFilteredTopLevelRowCountSelector, gridPaginationModelSelector } from '../hooks';
|
|
31
|
+
import { GridOverlay } from '../components/containers/GridOverlay';
|
|
29
32
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
33
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
34
|
function convertColor(color) {
|
|
@@ -290,7 +293,6 @@ var getLabelDisplayedRowsTo = function getLabelDisplayedRowsTo(_ref11) {
|
|
|
290
293
|
return pageSize === -1 ? rowCount : Math.min(rowCount, (page + 1) * pageSize);
|
|
291
294
|
};
|
|
292
295
|
var Pagination = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
293
|
-
var _rootProps$pageSizeOp;
|
|
294
296
|
var apiRef = useGridApiContext();
|
|
295
297
|
var rootProps = useGridRootProps();
|
|
296
298
|
var paginationModel = gridPaginationModelSelector(apiRef);
|
|
@@ -307,7 +309,20 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
307
309
|
}, [apiRef]);
|
|
308
310
|
var page = paginationModel.page <= lastPage ? paginationModel.page : lastPage;
|
|
309
311
|
var pageSize = paginationModel.pageSize;
|
|
310
|
-
var
|
|
312
|
+
var isPageSizeIncludedInPageSizeOptions = function isPageSizeIncludedInPageSizeOptions() {
|
|
313
|
+
for (var i = 0; i < rootProps.pageSizeOptions.length; i += 1) {
|
|
314
|
+
var option = rootProps.pageSizeOptions[i];
|
|
315
|
+
if (typeof option === 'number') {
|
|
316
|
+
if (option === pageSize) {
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
} else if (option.value === pageSize) {
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return false;
|
|
324
|
+
};
|
|
325
|
+
var pageSizeOptions = isPageSizeIncludedInPageSizeOptions() ? rootProps.pageSizeOptions : [];
|
|
311
326
|
var handleChangeRowsPerPage = function handleChangeRowsPerPage(event, newValue) {
|
|
312
327
|
var newPageSize = Number(newValue);
|
|
313
328
|
apiRef.current.setPageSize(newPageSize);
|
|
@@ -331,9 +346,9 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
331
346
|
value: pageSize,
|
|
332
347
|
children: pageSizeOptions.map(function (option) {
|
|
333
348
|
return /*#__PURE__*/_jsx(Option, {
|
|
334
|
-
value: option,
|
|
335
|
-
children: option
|
|
336
|
-
}, option);
|
|
349
|
+
value: typeof option !== 'number' && option.value ? option.value : option,
|
|
350
|
+
children: typeof option !== 'number' && option.label ? option.label : "".concat(option)
|
|
351
|
+
}, typeof option !== 'number' && option.label ? option.label : "".concat(option));
|
|
337
352
|
})
|
|
338
353
|
})]
|
|
339
354
|
}), /*#__PURE__*/_jsx(JoyTypography, {
|
|
@@ -382,6 +397,12 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
382
397
|
})]
|
|
383
398
|
});
|
|
384
399
|
});
|
|
400
|
+
var LoadingOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
401
|
+
return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {
|
|
402
|
+
ref: ref,
|
|
403
|
+
children: /*#__PURE__*/_jsx(JoyCircularProgress, {})
|
|
404
|
+
}));
|
|
405
|
+
});
|
|
385
406
|
var joySlots = _extends({}, joyIconSlots, {
|
|
386
407
|
baseCheckbox: Checkbox,
|
|
387
408
|
baseTextField: TextField,
|
|
@@ -392,8 +413,8 @@ var joySlots = _extends({}, joyIconSlots, {
|
|
|
392
413
|
baseSelectOption: Option,
|
|
393
414
|
baseInputLabel: InputLabel,
|
|
394
415
|
baseFormControl: JoyFormControl,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
416
|
+
baseTooltip: JoyTooltip,
|
|
417
|
+
pagination: Pagination,
|
|
418
|
+
loadingOverlay: LoadingOverlay
|
|
398
419
|
});
|
|
399
420
|
export default joySlots;
|
package/legacy/locales/esES.js
CHANGED
|
@@ -8,8 +8,8 @@ var esESGrid = {
|
|
|
8
8
|
toolbarDensity: 'Densidad',
|
|
9
9
|
toolbarDensityLabel: 'Densidad',
|
|
10
10
|
toolbarDensityCompact: 'Compacta',
|
|
11
|
-
toolbarDensityStandard: '
|
|
12
|
-
toolbarDensityComfortable: '
|
|
11
|
+
toolbarDensityStandard: 'Estándar',
|
|
12
|
+
toolbarDensityComfortable: 'Cómoda',
|
|
13
13
|
// Columns selector toolbar button text
|
|
14
14
|
toolbarColumns: 'Columnas',
|
|
15
15
|
toolbarColumnsLabel: 'Seleccionar columnas',
|
|
@@ -39,7 +39,7 @@ var esESGrid = {
|
|
|
39
39
|
columnsPanelHideAllButton: 'Ocultar todo',
|
|
40
40
|
// Filter panel text
|
|
41
41
|
filterPanelAddFilter: 'Agregar filtro',
|
|
42
|
-
|
|
42
|
+
filterPanelRemoveAll: 'Remover todos',
|
|
43
43
|
filterPanelDeleteIconLabel: 'Borrar',
|
|
44
44
|
filterPanelLogicOperator: 'Operador lógico',
|
|
45
45
|
filterPanelOperator: 'Operadores',
|
package/legacy/locales/huHU.js
CHANGED
|
@@ -62,34 +62,32 @@ var huHUGrid = {
|
|
|
62
62
|
filterOperatorIsEmpty: 'üres',
|
|
63
63
|
filterOperatorIsNotEmpty: 'nem üres',
|
|
64
64
|
filterOperatorIsAnyOf: 'a következők egyike:',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
'filterOperator=': '=',
|
|
66
|
+
'filterOperator!=': '!=',
|
|
67
|
+
'filterOperator>': '>',
|
|
68
|
+
'filterOperator>=': '>=',
|
|
69
|
+
'filterOperator<': '<',
|
|
70
|
+
'filterOperator<=': '<=',
|
|
72
71
|
// Header filter operators text
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
headerFilterOperatorContains: 'Tartalmazza:',
|
|
73
|
+
headerFilterOperatorEquals: 'Egyenlő ezzel:',
|
|
74
|
+
headerFilterOperatorStartsWith: 'Ezzel kezdődik:',
|
|
75
|
+
headerFilterOperatorEndsWith: 'Ezzel végződik:',
|
|
77
76
|
// headerFilterOperatorIs: 'Is',
|
|
78
77
|
// headerFilterOperatorNot: 'Is not',
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
headerFilterOperatorAfter: 'Ezutáni:',
|
|
79
|
+
headerFilterOperatorOnOrAfter: 'Ekkozori vagy ezutáni:',
|
|
80
|
+
headerFilterOperatorBefore: 'Ezelőtti:',
|
|
81
|
+
headerFilterOperatorOnOrBefore: 'Ekkori vagy ezelőtti:',
|
|
82
|
+
headerFilterOperatorIsEmpty: 'Üres',
|
|
83
|
+
headerFilterOperatorIsNotEmpty: 'Nem üres',
|
|
84
|
+
headerFilterOperatorIsAnyOf: 'A következők egyike:',
|
|
85
|
+
'headerFilterOperator=': 'Egyenlő',
|
|
86
|
+
'headerFilterOperator!=': 'Nem egyenlő',
|
|
87
|
+
'headerFilterOperator>': 'Nagyobb mint',
|
|
88
|
+
'headerFilterOperator>=': 'Nagyobb vagy egyenlő',
|
|
89
|
+
'headerFilterOperator<': 'Kissebb mint',
|
|
90
|
+
'headerFilterOperator<=': 'Kissebb vagy enygenlő',
|
|
93
91
|
// Filter values text
|
|
94
92
|
filterValueAny: 'bármilyen',
|
|
95
93
|
filterValueTrue: 'igaz',
|
package/legacy/locales/roRO.js
CHANGED
|
@@ -39,7 +39,7 @@ var roROGrid = {
|
|
|
39
39
|
columnsPanelHideAllButton: 'Ascunde tot',
|
|
40
40
|
// Filter panel text
|
|
41
41
|
filterPanelAddFilter: 'Adăugare filtru',
|
|
42
|
-
|
|
42
|
+
filterPanelRemoveAll: 'Șterge tot',
|
|
43
43
|
filterPanelDeleteIconLabel: 'Ștergere',
|
|
44
44
|
filterPanelLogicOperator: 'Operatori logici',
|
|
45
45
|
filterPanelOperator: 'Operatori',
|
|
@@ -62,34 +62,32 @@ var roROGrid = {
|
|
|
62
62
|
filterOperatorIsEmpty: 'este gol',
|
|
63
63
|
filterOperatorIsNotEmpty: 'nu este gol',
|
|
64
64
|
filterOperatorIsAnyOf: 'este una din valori',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
'filterOperator=': '=',
|
|
66
|
+
'filterOperator!=': '!=',
|
|
67
|
+
'filterOperator>': '>',
|
|
68
|
+
'filterOperator>=': '>=',
|
|
69
|
+
'filterOperator<': '<',
|
|
70
|
+
'filterOperator<=': '<=',
|
|
72
71
|
// Header filter operators text
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
72
|
+
headerFilterOperatorContains: 'Conține',
|
|
73
|
+
headerFilterOperatorEquals: 'Egal cu',
|
|
74
|
+
headerFilterOperatorStartsWith: 'Începe cu',
|
|
75
|
+
headerFilterOperatorEndsWith: 'Se termină cu',
|
|
76
|
+
headerFilterOperatorIs: 'Este',
|
|
77
|
+
headerFilterOperatorNot: 'Nu este',
|
|
78
|
+
headerFilterOperatorAfter: 'Este după',
|
|
79
|
+
headerFilterOperatorOnOrAfter: 'Este la sau „după”',
|
|
80
|
+
headerFilterOperatorBefore: 'Este înainte de',
|
|
81
|
+
headerFilterOperatorOnOrBefore: 'este la sau înainte de',
|
|
82
|
+
headerFilterOperatorIsEmpty: 'Este gol',
|
|
83
|
+
headerFilterOperatorIsNotEmpty: 'Nu este gol',
|
|
84
|
+
headerFilterOperatorIsAnyOf: 'Este una din valori',
|
|
85
|
+
'headerFilterOperator=': 'Egal cu',
|
|
86
|
+
'headerFilterOperator!=': 'Nu este egal cu',
|
|
87
|
+
'headerFilterOperator>': 'Mai mare decât',
|
|
88
|
+
'headerFilterOperator>=': 'Mai mare sau egal cu',
|
|
89
|
+
'headerFilterOperator<': 'Mai mic decât',
|
|
90
|
+
'headerFilterOperator<=': 'Mai mic sau egal cu',
|
|
93
91
|
// Filter values text
|
|
94
92
|
filterValueAny: 'Aleatoriu',
|
|
95
93
|
filterValueTrue: 'Da',
|
|
@@ -97,7 +95,7 @@ var roROGrid = {
|
|
|
97
95
|
// Column menu text
|
|
98
96
|
columnMenuLabel: 'Meniu',
|
|
99
97
|
columnMenuShowColumns: 'Afișează toate coloanele',
|
|
100
|
-
|
|
98
|
+
columnMenuManageColumns: 'Gestionează coloane',
|
|
101
99
|
columnMenuFilter: 'Filtru',
|
|
102
100
|
columnMenuHideColumn: 'Ascunde',
|
|
103
101
|
columnMenuUnsort: 'Dezactivare sortare',
|
|
@@ -151,15 +149,13 @@ var roROGrid = {
|
|
|
151
149
|
expandDetailPanel: 'Extindere',
|
|
152
150
|
collapseDetailPanel: 'Restrângere',
|
|
153
151
|
// Row reordering text
|
|
154
|
-
rowReorderingHeaderName: 'Reordonare rânduri'
|
|
155
|
-
|
|
152
|
+
rowReorderingHeaderName: 'Reordonare rânduri',
|
|
156
153
|
// Aggregation
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
aggregationMenuItemHeader: 'Agregare',
|
|
155
|
+
aggregationFunctionLabelSum: 'Sumă',
|
|
156
|
+
aggregationFunctionLabelAvg: 'Medie',
|
|
157
|
+
aggregationFunctionLabelMin: 'Minim',
|
|
158
|
+
aggregationFunctionLabelMax: 'Maxim',
|
|
159
|
+
aggregationFunctionLabelSize: 'Numărul elementelor'
|
|
163
160
|
};
|
|
164
|
-
|
|
165
161
|
export var roRO = getGridLocalization(roROGrid, roROCore);
|
package/locales/esES.js
CHANGED
|
@@ -8,8 +8,8 @@ const esESGrid = {
|
|
|
8
8
|
toolbarDensity: 'Densidad',
|
|
9
9
|
toolbarDensityLabel: 'Densidad',
|
|
10
10
|
toolbarDensityCompact: 'Compacta',
|
|
11
|
-
toolbarDensityStandard: '
|
|
12
|
-
toolbarDensityComfortable: '
|
|
11
|
+
toolbarDensityStandard: 'Estándar',
|
|
12
|
+
toolbarDensityComfortable: 'Cómoda',
|
|
13
13
|
// Columns selector toolbar button text
|
|
14
14
|
toolbarColumns: 'Columnas',
|
|
15
15
|
toolbarColumnsLabel: 'Seleccionar columnas',
|
|
@@ -37,7 +37,7 @@ const esESGrid = {
|
|
|
37
37
|
columnsPanelHideAllButton: 'Ocultar todo',
|
|
38
38
|
// Filter panel text
|
|
39
39
|
filterPanelAddFilter: 'Agregar filtro',
|
|
40
|
-
|
|
40
|
+
filterPanelRemoveAll: 'Remover todos',
|
|
41
41
|
filterPanelDeleteIconLabel: 'Borrar',
|
|
42
42
|
filterPanelLogicOperator: 'Operador lógico',
|
|
43
43
|
filterPanelOperator: 'Operadores',
|
package/locales/huHU.js
CHANGED
|
@@ -60,34 +60,32 @@ const huHUGrid = {
|
|
|
60
60
|
filterOperatorIsEmpty: 'üres',
|
|
61
61
|
filterOperatorIsNotEmpty: 'nem üres',
|
|
62
62
|
filterOperatorIsAnyOf: 'a következők egyike:',
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
70
69
|
// Header filter operators text
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
headerFilterOperatorContains: 'Tartalmazza:',
|
|
71
|
+
headerFilterOperatorEquals: 'Egyenlő ezzel:',
|
|
72
|
+
headerFilterOperatorStartsWith: 'Ezzel kezdődik:',
|
|
73
|
+
headerFilterOperatorEndsWith: 'Ezzel végződik:',
|
|
75
74
|
// headerFilterOperatorIs: 'Is',
|
|
76
75
|
// headerFilterOperatorNot: 'Is not',
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
headerFilterOperatorAfter: 'Ezutáni:',
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Ekkozori vagy ezutáni:',
|
|
78
|
+
headerFilterOperatorBefore: 'Ezelőtti:',
|
|
79
|
+
headerFilterOperatorOnOrBefore: 'Ekkori vagy ezelőtti:',
|
|
80
|
+
headerFilterOperatorIsEmpty: 'Üres',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: 'Nem üres',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'A következők egyike:',
|
|
83
|
+
'headerFilterOperator=': 'Egyenlő',
|
|
84
|
+
'headerFilterOperator!=': 'Nem egyenlő',
|
|
85
|
+
'headerFilterOperator>': 'Nagyobb mint',
|
|
86
|
+
'headerFilterOperator>=': 'Nagyobb vagy egyenlő',
|
|
87
|
+
'headerFilterOperator<': 'Kissebb mint',
|
|
88
|
+
'headerFilterOperator<=': 'Kissebb vagy enygenlő',
|
|
91
89
|
// Filter values text
|
|
92
90
|
filterValueAny: 'bármilyen',
|
|
93
91
|
filterValueTrue: 'igaz',
|
package/locales/roRO.js
CHANGED
|
@@ -37,7 +37,7 @@ const roROGrid = {
|
|
|
37
37
|
columnsPanelHideAllButton: 'Ascunde tot',
|
|
38
38
|
// Filter panel text
|
|
39
39
|
filterPanelAddFilter: 'Adăugare filtru',
|
|
40
|
-
|
|
40
|
+
filterPanelRemoveAll: 'Șterge tot',
|
|
41
41
|
filterPanelDeleteIconLabel: 'Ștergere',
|
|
42
42
|
filterPanelLogicOperator: 'Operatori logici',
|
|
43
43
|
filterPanelOperator: 'Operatori',
|
|
@@ -60,34 +60,32 @@ const roROGrid = {
|
|
|
60
60
|
filterOperatorIsEmpty: 'este gol',
|
|
61
61
|
filterOperatorIsNotEmpty: 'nu este gol',
|
|
62
62
|
filterOperatorIsAnyOf: 'este una din valori',
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
70
69
|
// Header filter operators text
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
headerFilterOperatorContains: 'Conține',
|
|
71
|
+
headerFilterOperatorEquals: 'Egal cu',
|
|
72
|
+
headerFilterOperatorStartsWith: 'Începe cu',
|
|
73
|
+
headerFilterOperatorEndsWith: 'Se termină cu',
|
|
74
|
+
headerFilterOperatorIs: 'Este',
|
|
75
|
+
headerFilterOperatorNot: 'Nu este',
|
|
76
|
+
headerFilterOperatorAfter: 'Este după',
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Este la sau „după”',
|
|
78
|
+
headerFilterOperatorBefore: 'Este înainte de',
|
|
79
|
+
headerFilterOperatorOnOrBefore: 'este la sau înainte de',
|
|
80
|
+
headerFilterOperatorIsEmpty: 'Este gol',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: 'Nu este gol',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'Este una din valori',
|
|
83
|
+
'headerFilterOperator=': 'Egal cu',
|
|
84
|
+
'headerFilterOperator!=': 'Nu este egal cu',
|
|
85
|
+
'headerFilterOperator>': 'Mai mare decât',
|
|
86
|
+
'headerFilterOperator>=': 'Mai mare sau egal cu',
|
|
87
|
+
'headerFilterOperator<': 'Mai mic decât',
|
|
88
|
+
'headerFilterOperator<=': 'Mai mic sau egal cu',
|
|
91
89
|
// Filter values text
|
|
92
90
|
filterValueAny: 'Aleatoriu',
|
|
93
91
|
filterValueTrue: 'Da',
|
|
@@ -95,7 +93,7 @@ const roROGrid = {
|
|
|
95
93
|
// Column menu text
|
|
96
94
|
columnMenuLabel: 'Meniu',
|
|
97
95
|
columnMenuShowColumns: 'Afișează toate coloanele',
|
|
98
|
-
|
|
96
|
+
columnMenuManageColumns: 'Gestionează coloane',
|
|
99
97
|
columnMenuFilter: 'Filtru',
|
|
100
98
|
columnMenuHideColumn: 'Ascunde',
|
|
101
99
|
columnMenuUnsort: 'Dezactivare sortare',
|
|
@@ -139,15 +137,13 @@ const roROGrid = {
|
|
|
139
137
|
expandDetailPanel: 'Extindere',
|
|
140
138
|
collapseDetailPanel: 'Restrângere',
|
|
141
139
|
// Row reordering text
|
|
142
|
-
rowReorderingHeaderName: 'Reordonare rânduri'
|
|
143
|
-
|
|
140
|
+
rowReorderingHeaderName: 'Reordonare rânduri',
|
|
144
141
|
// Aggregation
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
aggregationMenuItemHeader: 'Agregare',
|
|
143
|
+
aggregationFunctionLabelSum: 'Sumă',
|
|
144
|
+
aggregationFunctionLabelAvg: 'Medie',
|
|
145
|
+
aggregationFunctionLabelMin: 'Minim',
|
|
146
|
+
aggregationFunctionLabelMax: 'Maxim',
|
|
147
|
+
aggregationFunctionLabelSize: 'Numărul elementelor'
|
|
151
148
|
};
|
|
152
|
-
|
|
153
149
|
export const roRO = getGridLocalization(roROGrid, roROCore);
|
|
@@ -52,7 +52,7 @@ export interface GridEditingSharedApi {
|
|
|
52
52
|
* @param {string} field The field being edited.
|
|
53
53
|
* @ignore - do not document.
|
|
54
54
|
*/
|
|
55
|
-
unstable_getEditCellMeta: (id: GridRowId, field: string) => GridEditCellMeta;
|
|
55
|
+
unstable_getEditCellMeta: (id: GridRowId, field: string) => GridEditCellMeta | null;
|
|
56
56
|
}
|
|
57
57
|
export interface GridEditingSharedPrivateApi {
|
|
58
58
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridColDef } from '../colDef';
|
|
2
|
+
import { GridValidRowModel, GridRowId, GridTreeNode, GridRowModel } from '../gridRows';
|
|
2
3
|
import { GridCellParams } from '../params/gridCellParams';
|
|
3
4
|
import { GridColumnHeaderParams } from '../params/gridColumnHeaderParams';
|
|
4
5
|
import { GridRowParams } from '../params/gridRowParams';
|
|
@@ -11,6 +12,26 @@ export interface GridParamsApi {
|
|
|
11
12
|
* @returns {v} The cell value.
|
|
12
13
|
*/
|
|
13
14
|
getCellValue: <V extends any = any>(id: GridRowId, field: string) => V;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the cell value.
|
|
17
|
+
* Use it instead of `getCellValue` for better performance if you have `row` and `colDef`.
|
|
18
|
+
* @template V
|
|
19
|
+
* @param {GridRowModel} row The row model.
|
|
20
|
+
* @param {GridColDef} colDef The column definition.
|
|
21
|
+
* @returns {v} The cell value.
|
|
22
|
+
* @ignore - do not document
|
|
23
|
+
*/
|
|
24
|
+
getRowValue: <V extends any = any>(row: GridRowModel, colDef: GridColDef) => V;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the cell formatted value
|
|
27
|
+
* Use it instead of `getCellParams` for better performance if you only need the formatted value.
|
|
28
|
+
* @template V
|
|
29
|
+
* @param {GridRowModel} row The row model.
|
|
30
|
+
* @param {GridColDef} colDef The column definition.
|
|
31
|
+
* @returns {v} The cell value.
|
|
32
|
+
* @ignore - do not document
|
|
33
|
+
*/
|
|
34
|
+
getRowFormattedValue: <V extends any = any>(row: GridRowModel, colDef: GridColDef) => V;
|
|
14
35
|
/**
|
|
15
36
|
* Gets the underlying DOM element for a cell at the given `id` and `field`.
|
|
16
37
|
* @param {GridRowId} id The id of the row.
|
|
@@ -24,6 +24,9 @@ export type ValueOptions = string | number | {
|
|
|
24
24
|
* Value that can be used as a key for grouping rows
|
|
25
25
|
*/
|
|
26
26
|
export type GridKeyValue = string | number | boolean;
|
|
27
|
+
export type GridApplyQuickFilterV7<R extends GridValidRowModel = GridValidRowModel, V = any> = (value: V, row: R, column: GridColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => boolean;
|
|
28
|
+
export type GetApplyQuickFilterFnLegacy<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> = (value: any, colDef: GridStateColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => null | ((params: GridCellParams<R, V, F>) => boolean);
|
|
29
|
+
export type GetApplyQuickFilterFnV7<R extends GridValidRowModel = GridValidRowModel, V = any> = (value: any, colDef: GridStateColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => null | GridApplyQuickFilterV7<R, V>;
|
|
27
30
|
/**
|
|
28
31
|
* Column Definition base interface.
|
|
29
32
|
*/
|
|
@@ -207,7 +210,16 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
|
|
|
207
210
|
* @param {React.MutableRefObject<GridApiCommunity>} apiRef Deprecated: The API of the grid.
|
|
208
211
|
* @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row pass this filter value or not.
|
|
209
212
|
*/
|
|
210
|
-
getApplyQuickFilterFn?:
|
|
213
|
+
getApplyQuickFilterFn?: GetApplyQuickFilterFnLegacy<R, V, F>;
|
|
214
|
+
/**
|
|
215
|
+
* The callback that generates a filtering function for a given quick filter value.
|
|
216
|
+
* This function can return `null` to skip filtering for this value and column.
|
|
217
|
+
* @param {any} value The value with which we want to filter the column.
|
|
218
|
+
* @param {GridStateColDef} colDef The column from which we want to filter the rows.
|
|
219
|
+
* @param {React.MutableRefObject<GridApiCommunity>} apiRef Deprecated: The API of the grid.
|
|
220
|
+
* @returns {null | GridApplyQuickFilterV7} The function to call to check if a row pass this filter value or not.
|
|
221
|
+
*/
|
|
222
|
+
getApplyQuickFilterFnV7?: GetApplyQuickFilterFnV7<R, V>;
|
|
211
223
|
/**
|
|
212
224
|
* If `true`, this column cannot be reordered.
|
|
213
225
|
* @default false
|
|
@@ -3,6 +3,11 @@ import { GridFilterItem } from './gridFilterItem';
|
|
|
3
3
|
import { GridCellParams } from './params/gridCellParams';
|
|
4
4
|
import type { GridColDef } from './colDef/gridColDef';
|
|
5
5
|
import type { GridValidRowModel } from './gridRows';
|
|
6
|
+
import type { GridApiCommunity } from './api/gridApiCommunity';
|
|
7
|
+
type ApplyFilterFnLegacy<R extends GridValidRowModel = any, V = any, F = V> = (params: GridCellParams<R, V, F>) => boolean;
|
|
8
|
+
type ApplyFilterFnV7<R extends GridValidRowModel = any, V = any, F = V> = (value: V, row: R, column: GridColDef<R, V, F>, apiRef: React.MutableRefObject<GridApiCommunity>) => boolean;
|
|
9
|
+
export type GetApplyFilterFnV7<R extends GridValidRowModel = any, V = any, F = V> = (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ApplyFilterFnV7<R, V, F>;
|
|
10
|
+
export type GetApplyFilterFnLegacy<R extends GridValidRowModel = any, V = any, F = V> = (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ApplyFilterFnLegacy<R, V, F>;
|
|
6
11
|
/**
|
|
7
12
|
* Filter operator definition interface.
|
|
8
13
|
* @demos
|
|
@@ -27,9 +32,18 @@ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any,
|
|
|
27
32
|
* This function can return `null` to skip filtering for this item and column.
|
|
28
33
|
* @param {GridFilterItem} filterItem The filter item with which we want to filter the column.
|
|
29
34
|
* @param {GridColDef} column The column from which we want to filter the rows.
|
|
30
|
-
* @returns {null |
|
|
35
|
+
* @returns {null | ApplyFilterFnLegacy} The function to call to check if a row pass this filter item or not.
|
|
31
36
|
*/
|
|
32
|
-
getApplyFilterFn:
|
|
37
|
+
getApplyFilterFn: GetApplyFilterFnLegacy<R, V, F>;
|
|
38
|
+
/**
|
|
39
|
+
* The callback that generates a filtering function for a given filter item and column.
|
|
40
|
+
* This function can return `null` to skip filtering for this item and column.
|
|
41
|
+
* This function uses the more performant V7 API.
|
|
42
|
+
* @param {GridFilterItem} filterItem The filter item with which we want to filter the column.
|
|
43
|
+
* @param {GridColDef} column The column from which we want to filter the rows.
|
|
44
|
+
* @returns {null | ApplyFilterFnV7} The function to call to check if a row pass this filter item or not.
|
|
45
|
+
*/
|
|
46
|
+
getApplyFilterFnV7?: GetApplyFilterFnV7<R, V, F>;
|
|
33
47
|
/**
|
|
34
48
|
* The input component to render in the filter panel for this filter operator.
|
|
35
49
|
*/
|
|
@@ -51,3 +65,4 @@ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any,
|
|
|
51
65
|
*/
|
|
52
66
|
requiresFilterValue?: boolean;
|
|
53
67
|
}
|
|
68
|
+
export {};
|
package/models/gridRows.d.ts
CHANGED
|
@@ -256,7 +256,10 @@ export interface DataGridPropsWithDefaultValues {
|
|
|
256
256
|
* Select the pageSize dynamically using the component UI.
|
|
257
257
|
* @default [25, 50, 100]
|
|
258
258
|
*/
|
|
259
|
-
pageSizeOptions: number
|
|
259
|
+
pageSizeOptions: Array<number | {
|
|
260
|
+
value: number;
|
|
261
|
+
label: string;
|
|
262
|
+
}>;
|
|
260
263
|
/**
|
|
261
264
|
* Sets the type of space between rows added by `getRowSpacing`.
|
|
262
265
|
* @default "margin"
|
|
@@ -513,7 +513,10 @@ DataGridRaw.propTypes = {
|
|
|
513
513
|
* Select the pageSize dynamically using the component UI.
|
|
514
514
|
* @default [25, 50, 100]
|
|
515
515
|
*/
|
|
516
|
-
pageSizeOptions: PropTypes.arrayOf(PropTypes.number
|
|
516
|
+
pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
517
|
+
label: PropTypes.string.isRequired,
|
|
518
|
+
value: PropTypes.number.isRequired
|
|
519
|
+
})]).isRequired),
|
|
517
520
|
pagination: props => {
|
|
518
521
|
if (props.pagination === false) {
|
|
519
522
|
return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination.'].join('\n'));
|
|
@@ -54,7 +54,7 @@ export const useDataGridComponent = (inputApiRef, props) => {
|
|
|
54
54
|
useGridRowSelection(privateApiRef, props);
|
|
55
55
|
useGridColumns(privateApiRef, props);
|
|
56
56
|
useGridRows(privateApiRef, props);
|
|
57
|
-
useGridParamsApi(privateApiRef);
|
|
57
|
+
useGridParamsApi(privateApiRef, props);
|
|
58
58
|
useGridColumnSpanning(privateApiRef);
|
|
59
59
|
useGridColumnGrouping(privateApiRef, props);
|
|
60
60
|
useGridEditing(privateApiRef, props);
|
|
@@ -14,5 +14,6 @@ export const GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
14
14
|
disableColumnMenu: true,
|
|
15
15
|
disableExport: true,
|
|
16
16
|
renderCell: renderActionsCell,
|
|
17
|
-
getApplyQuickFilterFn: undefined
|
|
17
|
+
getApplyQuickFilterFn: undefined,
|
|
18
|
+
getApplyQuickFilterFnV7: undefined
|
|
18
19
|
});
|
|
@@ -36,6 +36,7 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
36
36
|
valueFormatter: gridBooleanFormatter,
|
|
37
37
|
filterOperators: getGridBooleanOperators(),
|
|
38
38
|
getApplyQuickFilterFn: undefined,
|
|
39
|
+
getApplyQuickFilterFnV7: undefined,
|
|
39
40
|
// @ts-ignore
|
|
40
41
|
aggregable: false,
|
|
41
42
|
// @ts-ignore
|