@mui/x-data-grid 5.12.2 → 5.13.1
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 +160 -6
- package/DataGrid/DataGrid.js +4 -4
- package/colDef/gridDateOperators.js +4 -2
- package/colDef/gridNumericOperators.js +4 -2
- package/colDef/gridStringOperators.d.ts +1 -1
- package/colDef/gridStringOperators.js +15 -8
- package/components/GridRow.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +2 -2
- package/components/cell/GridBooleanCell.js +4 -3
- package/components/cell/GridEditBooleanCell.js +4 -3
- package/components/cell/GridEditDateCell.js +4 -3
- package/components/cell/GridEditInputCell.js +4 -3
- package/components/cell/GridEditSingleSelectCell.js +9 -7
- package/components/panel/GridColumnsPanel.js +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +11 -4
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +5 -9
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +42 -19
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +28 -15
- package/hooks/features/editRows/useGridCellEditing.new.js +7 -1
- package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
- package/hooks/features/editRows/useGridRowEditing.new.js +7 -1
- package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
- package/hooks/features/filter/gridFilterUtils.js +8 -5
- package/hooks/features/filter/useGridFilter.js +19 -1
- package/hooks/features/rows/useGridRows.js +16 -3
- package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +14 -3
- package/hooks/utils/useGridApiContext.js +1 -1
- package/hooks/utils/useGridRootProps.js +1 -1
- package/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +4 -4
- package/legacy/colDef/gridDateOperators.js +4 -2
- package/legacy/colDef/gridNumericOperators.js +4 -2
- package/legacy/colDef/gridStringOperators.js +17 -7
- package/legacy/components/GridRow.js +1 -1
- package/legacy/components/cell/GridBooleanCell.js +3 -1
- package/legacy/components/cell/GridEditBooleanCell.js +4 -2
- package/legacy/components/cell/GridEditDateCell.js +4 -2
- package/legacy/components/cell/GridEditInputCell.js +4 -2
- package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
- package/legacy/components/panel/GridColumnsPanel.js +3 -1
- package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +34 -12
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/legacy/hooks/features/dimensions/useGridDimensions.js +27 -15
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +7 -1
- package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +7 -1
- package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
- package/legacy/hooks/features/filter/gridFilterUtils.js +8 -5
- package/legacy/hooks/features/filter/useGridFilter.js +19 -1
- package/legacy/hooks/features/rows/useGridRows.js +18 -3
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +19 -8
- package/legacy/hooks/utils/useGridApiContext.js +1 -1
- package/legacy/hooks/utils/useGridRootProps.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locales/deDE.js +4 -4
- package/legacy/locales/frFR.js +11 -11
- package/legacy/locales/index.js +3 -0
- package/legacy/locales/nlNL.js +15 -15
- package/legacy/locales/ptBR.js +11 -11
- package/legacy/locales/roRO.js +128 -0
- package/legacy/locales/skSK.js +16 -16
- package/legacy/locales/svSE.js +128 -0
- package/legacy/utils/keyboardUtils.js +4 -3
- package/locales/deDE.js +4 -4
- package/locales/frFR.js +11 -11
- package/locales/index.d.ts +3 -0
- package/locales/index.js +3 -0
- package/locales/nlNL.js +15 -15
- package/locales/ptBR.js +11 -11
- package/locales/roRO.d.ts +2 -0
- package/locales/roRO.js +116 -0
- package/locales/skSK.js +16 -16
- package/locales/svSE.d.ts +2 -0
- package/locales/svSE.js +116 -0
- package/models/gridFilterOperator.d.ts +6 -0
- package/modern/DataGrid/DataGrid.js +4 -4
- package/modern/colDef/gridDateOperators.js +4 -2
- package/modern/colDef/gridNumericOperators.js +4 -2
- package/modern/colDef/gridStringOperators.js +15 -8
- package/modern/components/GridRow.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +4 -3
- package/modern/components/cell/GridEditBooleanCell.js +4 -3
- package/modern/components/cell/GridEditDateCell.js +4 -3
- package/modern/components/cell/GridEditInputCell.js +4 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
- package/modern/components/panel/GridColumnsPanel.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +32 -13
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +28 -15
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +7 -1
- package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +7 -1
- package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +8 -5
- package/modern/hooks/features/filter/useGridFilter.js +17 -1
- package/modern/hooks/features/rows/useGridRows.js +16 -3
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +10 -3
- package/modern/hooks/utils/useGridApiContext.js +1 -1
- package/modern/hooks/utils/useGridRootProps.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locales/deDE.js +4 -4
- package/modern/locales/frFR.js +11 -11
- package/modern/locales/index.js +3 -0
- package/modern/locales/nlNL.js +15 -15
- package/modern/locales/ptBR.js +11 -11
- package/modern/locales/roRO.js +116 -0
- package/modern/locales/skSK.js +16 -16
- package/modern/locales/svSE.js +116 -0
- package/modern/utils/keyboardUtils.js +4 -3
- package/node/DataGrid/DataGrid.js +4 -4
- package/node/colDef/gridDateOperators.js +4 -2
- package/node/colDef/gridNumericOperators.js +4 -2
- package/node/colDef/gridStringOperators.js +15 -8
- package/node/components/GridRow.js +1 -1
- package/node/components/cell/GridBooleanCell.js +5 -3
- package/node/components/cell/GridEditBooleanCell.js +5 -3
- package/node/components/cell/GridEditDateCell.js +5 -3
- package/node/components/cell/GridEditInputCell.js +5 -3
- package/node/components/cell/GridEditSingleSelectCell.js +10 -7
- package/node/components/panel/GridColumnsPanel.js +1 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +43 -20
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/node/hooks/features/dimensions/useGridDimensions.js +28 -15
- package/node/hooks/features/editRows/useGridCellEditing.new.js +7 -1
- package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
- package/node/hooks/features/editRows/useGridRowEditing.new.js +7 -1
- package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
- package/node/hooks/features/filter/gridFilterUtils.js +7 -4
- package/node/hooks/features/filter/useGridFilter.js +19 -1
- package/node/hooks/features/rows/useGridRows.js +16 -3
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +14 -3
- package/node/hooks/utils/useGridApiContext.js +1 -1
- package/node/hooks/utils/useGridRootProps.js +1 -1
- package/node/index.js +1 -1
- package/node/locales/deDE.js +4 -4
- package/node/locales/frFR.js +11 -11
- package/node/locales/index.js +39 -0
- package/node/locales/nlNL.js +15 -15
- package/node/locales/ptBR.js +11 -11
- package/node/locales/roRO.js +126 -0
- package/node/locales/skSK.js +16 -16
- package/node/locales/svSE.js +126 -0
- package/node/utils/keyboardUtils.js +4 -3
- package/package.json +4 -4
- package/utils/keyboardUtils.js +4 -3
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.svSE = void 0;
|
|
7
|
+
|
|
8
|
+
var _locale = require("@mui/material/locale");
|
|
9
|
+
|
|
10
|
+
var _getGridLocalization = require("../utils/getGridLocalization");
|
|
11
|
+
|
|
12
|
+
const svSEGrid = {
|
|
13
|
+
// Root
|
|
14
|
+
noRowsLabel: 'Inga rader',
|
|
15
|
+
noResultsOverlayLabel: 'Inga resultat funna.',
|
|
16
|
+
errorOverlayDefaultLabel: 'Ett fel uppstod.',
|
|
17
|
+
// Density selector toolbar button text
|
|
18
|
+
toolbarDensity: 'Densitet',
|
|
19
|
+
toolbarDensityLabel: 'Densitet',
|
|
20
|
+
toolbarDensityCompact: 'Kompakt',
|
|
21
|
+
toolbarDensityStandard: 'Standard',
|
|
22
|
+
toolbarDensityComfortable: 'Bekväm',
|
|
23
|
+
// Columns selector toolbar button text
|
|
24
|
+
toolbarColumns: 'Kolumner',
|
|
25
|
+
toolbarColumnsLabel: 'Välj kolumner',
|
|
26
|
+
// Filters toolbar button text
|
|
27
|
+
toolbarFilters: 'Filter',
|
|
28
|
+
toolbarFiltersLabel: 'Visa filter',
|
|
29
|
+
toolbarFiltersTooltipHide: 'Dölj filter',
|
|
30
|
+
toolbarFiltersTooltipShow: 'Visa filter',
|
|
31
|
+
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktiva filter` : `${count} aktivt filter`,
|
|
32
|
+
// Quick filter toolbar field
|
|
33
|
+
toolbarQuickFilterPlaceholder: 'Sök...',
|
|
34
|
+
toolbarQuickFilterLabel: 'Sök',
|
|
35
|
+
toolbarQuickFilterDeleteIconLabel: 'Rensa',
|
|
36
|
+
// Export selector toolbar button text
|
|
37
|
+
toolbarExport: 'Exportera',
|
|
38
|
+
toolbarExportLabel: 'Exportera',
|
|
39
|
+
toolbarExportCSV: 'Ladda ner som CSV',
|
|
40
|
+
toolbarExportPrint: 'Skriv ut',
|
|
41
|
+
toolbarExportExcel: 'Ladda ner som Excel',
|
|
42
|
+
// Columns panel text
|
|
43
|
+
columnsPanelTextFieldLabel: 'Hitta kolumn',
|
|
44
|
+
columnsPanelTextFieldPlaceholder: 'Kolumntitel',
|
|
45
|
+
columnsPanelDragIconLabel: 'Ordna om kolumnen',
|
|
46
|
+
columnsPanelShowAllButton: 'Visa alla',
|
|
47
|
+
columnsPanelHideAllButton: 'Dölj alla',
|
|
48
|
+
// Filter panel text
|
|
49
|
+
filterPanelAddFilter: 'Lägg till filter',
|
|
50
|
+
filterPanelDeleteIconLabel: 'Ta bort',
|
|
51
|
+
filterPanelLinkOperator: 'Logisk operatör',
|
|
52
|
+
filterPanelOperators: 'Operatör',
|
|
53
|
+
// TODO v6: rename to filterPanelOperator
|
|
54
|
+
filterPanelOperatorAnd: 'Och',
|
|
55
|
+
filterPanelOperatorOr: 'Eller',
|
|
56
|
+
filterPanelColumns: 'Kolumner',
|
|
57
|
+
filterPanelInputLabel: 'Värde',
|
|
58
|
+
filterPanelInputPlaceholder: 'Filtervärde',
|
|
59
|
+
// Filter operators text
|
|
60
|
+
filterOperatorContains: 'innehåller',
|
|
61
|
+
filterOperatorEquals: 'är lika med',
|
|
62
|
+
filterOperatorStartsWith: 'börjar med',
|
|
63
|
+
filterOperatorEndsWith: 'slutar med',
|
|
64
|
+
filterOperatorIs: 'är',
|
|
65
|
+
filterOperatorNot: 'är inte',
|
|
66
|
+
filterOperatorAfter: 'är efter',
|
|
67
|
+
filterOperatorOnOrAfter: 'är på eller efter',
|
|
68
|
+
filterOperatorBefore: 'är innan',
|
|
69
|
+
filterOperatorOnOrBefore: 'är på eller innan',
|
|
70
|
+
filterOperatorIsEmpty: 'är tom',
|
|
71
|
+
filterOperatorIsNotEmpty: 'är inte tom',
|
|
72
|
+
filterOperatorIsAnyOf: 'är någon av',
|
|
73
|
+
// Filter values text
|
|
74
|
+
filterValueAny: 'något',
|
|
75
|
+
filterValueTrue: 'sant',
|
|
76
|
+
filterValueFalse: 'falskt',
|
|
77
|
+
// Column menu text
|
|
78
|
+
columnMenuLabel: 'Meny',
|
|
79
|
+
columnMenuShowColumns: 'Visa kolumner',
|
|
80
|
+
columnMenuFilter: 'Filtrera',
|
|
81
|
+
columnMenuHideColumn: 'Dölj',
|
|
82
|
+
columnMenuUnsort: 'Osortera',
|
|
83
|
+
columnMenuSortAsc: 'Sortera stigande',
|
|
84
|
+
columnMenuSortDesc: 'Sortera fallande',
|
|
85
|
+
// Column header text
|
|
86
|
+
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktiva filter` : `${count} aktivt filter`,
|
|
87
|
+
columnHeaderFiltersLabel: 'Visa filter',
|
|
88
|
+
columnHeaderSortIconLabel: 'Sortera',
|
|
89
|
+
// Rows selected footer text
|
|
90
|
+
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rader markerade` : `${count.toLocaleString()} rad markerad`,
|
|
91
|
+
// Total row amount footer text
|
|
92
|
+
footerTotalRows: 'Totalt antal rader:',
|
|
93
|
+
// Total visible row amount footer text
|
|
94
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`,
|
|
95
|
+
// Checkbox selection text
|
|
96
|
+
checkboxSelectionHeaderName: 'Markering med kryssruta',
|
|
97
|
+
checkboxSelectionSelectAllRows: 'Markera alla rader',
|
|
98
|
+
checkboxSelectionUnselectAllRows: 'Avmarkera alla rader',
|
|
99
|
+
checkboxSelectionSelectRow: 'Markera rad',
|
|
100
|
+
checkboxSelectionUnselectRow: 'Avmarkera rad',
|
|
101
|
+
// Boolean cell text
|
|
102
|
+
booleanCellTrueLabel: 'ja',
|
|
103
|
+
booleanCellFalseLabel: 'nej',
|
|
104
|
+
// Actions cell more text
|
|
105
|
+
actionsCellMore: 'mer',
|
|
106
|
+
// Column pinning text
|
|
107
|
+
pinToLeft: 'Fäst till vänster',
|
|
108
|
+
pinToRight: 'Fäst till höger',
|
|
109
|
+
unpin: 'Ta bort fäste',
|
|
110
|
+
// Tree Data
|
|
111
|
+
treeDataGroupingHeaderName: 'Grupp',
|
|
112
|
+
treeDataExpand: 'visa underordnade',
|
|
113
|
+
treeDataCollapse: 'dölj underordnade',
|
|
114
|
+
// Grouping columns
|
|
115
|
+
groupingColumnHeaderName: 'Grupp',
|
|
116
|
+
groupColumn: name => `Gruppera efter ${name}`,
|
|
117
|
+
unGroupColumn: name => `Sluta gruppera efter ${name}`,
|
|
118
|
+
// Master/detail
|
|
119
|
+
// detailPanelToggle: 'Detail panel toggle',
|
|
120
|
+
expandDetailPanel: 'Expandera',
|
|
121
|
+
collapseDetailPanel: 'Kollapsa',
|
|
122
|
+
// Row reordering text
|
|
123
|
+
rowReorderingHeaderName: 'Ordna om rader'
|
|
124
|
+
};
|
|
125
|
+
const svSE = (0, _getGridLocalization.getGridLocalization)(svSEGrid, _locale.svSE);
|
|
126
|
+
exports.svSE = svSE;
|
|
@@ -36,12 +36,13 @@ const isPageKeys = key => key.indexOf('Page') === 0;
|
|
|
36
36
|
|
|
37
37
|
exports.isPageKeys = isPageKeys;
|
|
38
38
|
|
|
39
|
-
const isDeleteKeys = key => key === 'Delete' || key === 'Backspace';
|
|
39
|
+
const isDeleteKeys = key => key === 'Delete' || key === 'Backspace'; // Non printable keys have a name, e.g. "ArrowRight", see the whole list:
|
|
40
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
|
|
41
|
+
|
|
40
42
|
|
|
41
43
|
exports.isDeleteKeys = isDeleteKeys;
|
|
42
|
-
const printableCharRegex = /^(\p{L}|\p{M}\p{L}|\p{M}|\p{N}|\p{Z}|\p{S}|\p{P})$/iu;
|
|
43
44
|
|
|
44
|
-
const isPrintableKey = key =>
|
|
45
|
+
const isPrintableKey = key => key.length === 1;
|
|
45
46
|
|
|
46
47
|
exports.isPrintableKey = isPrintableKey;
|
|
47
48
|
const GRID_MULTIPLE_SELECTION_KEYS = ['Meta', 'Control', 'Shift'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.1",
|
|
4
4
|
"description": "The community edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"directory": "packages/grid/x-data-grid"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "^7.
|
|
38
|
+
"@babel/runtime": "^7.18.6",
|
|
39
39
|
"@mui/utils": "^5.4.1",
|
|
40
|
-
"clsx": "^1.
|
|
40
|
+
"clsx": "^1.2.1",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
|
-
"reselect": "^4.1.
|
|
42
|
+
"reselect": "^4.1.6"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@mui/material": "^5.4.1",
|
package/utils/keyboardUtils.js
CHANGED
|
@@ -8,9 +8,10 @@ export const isSpaceKey = key => key === ' ';
|
|
|
8
8
|
export const isArrowKeys = key => key.indexOf('Arrow') === 0;
|
|
9
9
|
export const isHomeOrEndKeys = key => key === 'Home' || key === 'End';
|
|
10
10
|
export const isPageKeys = key => key.indexOf('Page') === 0;
|
|
11
|
-
export const isDeleteKeys = key => key === 'Delete' || key === 'Backspace';
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export const isDeleteKeys = key => key === 'Delete' || key === 'Backspace'; // Non printable keys have a name, e.g. "ArrowRight", see the whole list:
|
|
12
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
|
|
13
|
+
|
|
14
|
+
export const isPrintableKey = key => key.length === 1;
|
|
14
15
|
export const GRID_MULTIPLE_SELECTION_KEYS = ['Meta', 'Control', 'Shift'];
|
|
15
16
|
export const GRID_CELL_EXIT_EDIT_MODE_KEYS = ['Enter', 'Escape', 'Tab'];
|
|
16
17
|
export const GRID_CELL_EDIT_COMMIT_KEYS = ['Enter', 'Tab'];
|