@mui/x-data-grid 7.11.0 → 7.11.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 +84 -0
- package/components/panel/GridPreferencesPanel.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +3 -4
- package/hooks/core/useGridApiInitialization.js +1 -1
- package/hooks/features/editing/useGridCellEditing.js +2 -3
- package/hooks/features/editing/useGridRowEditing.js +2 -3
- package/hooks/features/export/serializers/csvSerializer.js +7 -8
- package/hooks/features/filter/gridFilterUtils.js +12 -9
- package/hooks/features/sorting/gridSortingUtils.js +2 -3
- package/hooks/utils/useGridApiEventHandler.d.ts +2 -1
- package/hooks/utils/useGridApiEventHandler.js +1 -0
- package/hooks/utils/useGridSelector.js +2 -3
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -1
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/internals/utils/propValidation.d.ts +0 -1
- package/internals/utils/propValidation.js +4 -13
- package/internals/utils/warning.d.ts +2 -0
- package/internals/utils/warning.js +21 -0
- package/locales/deDE.js +1 -2
- package/locales/index.d.ts +2 -0
- package/locales/index.js +3 -1
- package/locales/isIS.d.ts +2 -0
- package/locales/isIS.js +149 -0
- package/locales/nbNO.js +30 -32
- package/locales/nnNO.d.ts +2 -0
- package/locales/nnNO.js +148 -0
- package/modern/components/panel/GridPreferencesPanel.js +3 -4
- package/modern/hooks/core/useGridApiInitialization.js +1 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +2 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -3
- package/modern/hooks/features/export/serializers/csvSerializer.js +7 -8
- package/modern/hooks/features/filter/gridFilterUtils.js +12 -9
- package/modern/hooks/features/sorting/gridSortingUtils.js +2 -3
- package/modern/hooks/utils/useGridApiEventHandler.js +1 -0
- package/modern/hooks/utils/useGridSelector.js +2 -3
- package/modern/index.js +1 -1
- package/modern/internals/index.js +0 -1
- package/modern/internals/utils/index.js +2 -1
- package/modern/internals/utils/propValidation.js +4 -13
- package/modern/internals/utils/warning.js +21 -0
- package/modern/locales/deDE.js +1 -2
- package/modern/locales/index.js +3 -1
- package/modern/locales/isIS.js +149 -0
- package/modern/locales/nbNO.js +30 -32
- package/modern/locales/nnNO.js +148 -0
- package/modern/utils/createSelector.js +2 -3
- package/node/components/panel/GridPreferencesPanel.js +4 -5
- package/node/hooks/core/useGridApiInitialization.js +1 -1
- package/node/hooks/features/editing/useGridCellEditing.js +2 -3
- package/node/hooks/features/editing/useGridRowEditing.js +2 -3
- package/node/hooks/features/export/serializers/csvSerializer.js +7 -8
- package/node/hooks/features/filter/gridFilterUtils.js +12 -9
- package/node/hooks/features/sorting/gridSortingUtils.js +2 -3
- package/node/hooks/utils/useGridApiEventHandler.js +1 -0
- package/node/hooks/utils/useGridSelector.js +2 -3
- package/node/index.js +1 -1
- package/node/internals/index.js +0 -8
- package/node/internals/utils/index.js +11 -0
- package/node/internals/utils/propValidation.js +4 -14
- package/node/internals/utils/warning.js +28 -0
- package/node/locales/deDE.js +1 -2
- package/node/locales/index.js +22 -0
- package/node/locales/isIS.js +155 -0
- package/node/locales/nbNO.js +30 -32
- package/node/locales/nnNO.js +154 -0
- package/node/utils/createSelector.js +2 -3
- package/package.json +4 -4
- package/utils/createSelector.js +2 -3
- package/modern/utils/warning.js +0 -24
- package/node/utils/warning.js +0 -32
- package/utils/warning.d.ts +0 -2
- package/utils/warning.js +0 -24
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { isIS as isISCore } from '@mui/material/locale';
|
|
2
|
+
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
3
|
+
const isISGrid = {
|
|
4
|
+
// Root
|
|
5
|
+
noRowsLabel: 'Engar raðir',
|
|
6
|
+
noResultsOverlayLabel: 'Engar niðurstöður',
|
|
7
|
+
// Density selector toolbar button text
|
|
8
|
+
toolbarDensity: 'Þéttleiki',
|
|
9
|
+
toolbarDensityLabel: 'Þéttleiki',
|
|
10
|
+
toolbarDensityCompact: 'Þétt',
|
|
11
|
+
toolbarDensityStandard: 'Staðlað',
|
|
12
|
+
toolbarDensityComfortable: 'Rúmlegt',
|
|
13
|
+
// Columns selector toolbar button text
|
|
14
|
+
toolbarColumns: 'Dálkar',
|
|
15
|
+
toolbarColumnsLabel: 'Veldu dálka',
|
|
16
|
+
// Filters toolbar button text
|
|
17
|
+
toolbarFilters: 'Sía',
|
|
18
|
+
toolbarFiltersLabel: 'Sjá síur',
|
|
19
|
+
toolbarFiltersTooltipHide: 'Fela síur',
|
|
20
|
+
toolbarFiltersTooltipShow: 'Sjá síur',
|
|
21
|
+
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} virk sía` : `${count} virkar síur`,
|
|
22
|
+
// Quick filter toolbar field
|
|
23
|
+
toolbarQuickFilterPlaceholder: 'Leita…',
|
|
24
|
+
toolbarQuickFilterLabel: 'Leita',
|
|
25
|
+
toolbarQuickFilterDeleteIconLabel: 'Eyða',
|
|
26
|
+
// Export selector toolbar button text
|
|
27
|
+
toolbarExport: 'Flytja út',
|
|
28
|
+
toolbarExportLabel: 'Flytja út',
|
|
29
|
+
toolbarExportCSV: 'Hlaða niður sem CSV',
|
|
30
|
+
toolbarExportPrint: 'Prenta',
|
|
31
|
+
toolbarExportExcel: 'Hlaða niður sem Excel',
|
|
32
|
+
// Columns management text
|
|
33
|
+
// columnsManagementSearchTitle: 'Search',
|
|
34
|
+
// columnsManagementNoColumns: 'No columns',
|
|
35
|
+
// columnsManagementShowHideAllText: 'Show/Hide All',
|
|
36
|
+
// columnsManagementReset: 'Reset',
|
|
37
|
+
|
|
38
|
+
// Filter panel text
|
|
39
|
+
filterPanelAddFilter: 'Bæta síu',
|
|
40
|
+
filterPanelRemoveAll: 'Fjarlægja alla',
|
|
41
|
+
filterPanelDeleteIconLabel: 'Eyða',
|
|
42
|
+
filterPanelLogicOperator: 'Rökvirkir',
|
|
43
|
+
filterPanelOperator: 'Virkir',
|
|
44
|
+
filterPanelOperatorAnd: 'Og',
|
|
45
|
+
filterPanelOperatorOr: 'Eða',
|
|
46
|
+
filterPanelColumns: 'Dálkar',
|
|
47
|
+
filterPanelInputLabel: 'Gildi',
|
|
48
|
+
filterPanelInputPlaceholder: 'Síu gildi',
|
|
49
|
+
// Filter operators text
|
|
50
|
+
filterOperatorContains: 'inniheldur',
|
|
51
|
+
filterOperatorEquals: 'jafnt og',
|
|
52
|
+
filterOperatorStartsWith: 'byrjar með',
|
|
53
|
+
filterOperatorEndsWith: 'endar með',
|
|
54
|
+
filterOperatorIs: 'er líka með',
|
|
55
|
+
filterOperatorNot: 'er ekki líka með',
|
|
56
|
+
filterOperatorAfter: 'eftir',
|
|
57
|
+
filterOperatorOnOrAfter: 'á eða eftir',
|
|
58
|
+
filterOperatorBefore: 'fyrir',
|
|
59
|
+
filterOperatorOnOrBefore: 'á eða fyrir',
|
|
60
|
+
filterOperatorIsEmpty: 'inniheldur ekki gögn',
|
|
61
|
+
filterOperatorIsNotEmpty: 'inniheldur gögn',
|
|
62
|
+
filterOperatorIsAnyOf: 'inniheldur einn af',
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
69
|
+
// Header filter operators text
|
|
70
|
+
headerFilterOperatorContains: 'Inniheldur',
|
|
71
|
+
headerFilterOperatorEquals: 'Jafnt og',
|
|
72
|
+
headerFilterOperatorStartsWith: 'Byrjar með',
|
|
73
|
+
headerFilterOperatorEndsWith: 'Endar með',
|
|
74
|
+
headerFilterOperatorIs: 'Er jafnt og',
|
|
75
|
+
headerFilterOperatorNot: 'Er ekki jafnt og',
|
|
76
|
+
headerFilterOperatorAfter: 'Eftir',
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Á eða eftir',
|
|
78
|
+
headerFilterOperatorBefore: 'Fyrir',
|
|
79
|
+
headerFilterOperatorOnOrBefore: 'Á eða fyrir',
|
|
80
|
+
headerFilterOperatorIsEmpty: 'Inniheldur ekki gögn',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: 'Inniheldur gögn',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'Inniheldur einn af',
|
|
83
|
+
'headerFilterOperator=': 'Jafnt og',
|
|
84
|
+
'headerFilterOperator!=': 'Ekki jafnt og',
|
|
85
|
+
'headerFilterOperator>': 'Stærra en',
|
|
86
|
+
'headerFilterOperator>=': 'Stærra en eða jafnt og',
|
|
87
|
+
'headerFilterOperator<': 'Minna en',
|
|
88
|
+
'headerFilterOperator<=': 'Minna en eða jafnt og',
|
|
89
|
+
// Filter values text
|
|
90
|
+
filterValueAny: 'hvað sem er',
|
|
91
|
+
filterValueTrue: 'satt',
|
|
92
|
+
filterValueFalse: 'falskt',
|
|
93
|
+
// Column menu text
|
|
94
|
+
columnMenuLabel: 'Valmynd',
|
|
95
|
+
columnMenuShowColumns: 'Sýna dálka',
|
|
96
|
+
columnMenuManageColumns: 'Stjórna dálkum',
|
|
97
|
+
columnMenuFilter: 'Síur',
|
|
98
|
+
columnMenuHideColumn: 'Fela dálka',
|
|
99
|
+
columnMenuUnsort: 'Fjarlægja röðun',
|
|
100
|
+
columnMenuSortAsc: 'Raða hækkandi',
|
|
101
|
+
columnMenuSortDesc: 'Raða lækkandi',
|
|
102
|
+
// Column header text
|
|
103
|
+
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} virkar síur` : `Ein virk sía`,
|
|
104
|
+
columnHeaderFiltersLabel: 'Sýna síur',
|
|
105
|
+
columnHeaderSortIconLabel: 'Raða',
|
|
106
|
+
// Rows selected footer text
|
|
107
|
+
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} raðir valdar` : `Ein röð valin`,
|
|
108
|
+
// Total row amount footer text
|
|
109
|
+
footerTotalRows: 'Heildarfjöldi lína:',
|
|
110
|
+
// Total visible row amount footer text
|
|
111
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} af ${totalCount.toLocaleString()}`,
|
|
112
|
+
// Checkbox selection text
|
|
113
|
+
checkboxSelectionHeaderName: 'Val á gátreit',
|
|
114
|
+
checkboxSelectionSelectAllRows: 'Velja allar raðir',
|
|
115
|
+
checkboxSelectionUnselectAllRows: 'Afvelja allar raðir',
|
|
116
|
+
checkboxSelectionSelectRow: 'Velja röð',
|
|
117
|
+
checkboxSelectionUnselectRow: 'Afvelja röð',
|
|
118
|
+
// Boolean cell text
|
|
119
|
+
booleanCellTrueLabel: 'já',
|
|
120
|
+
booleanCellFalseLabel: 'nei',
|
|
121
|
+
// Actions cell more text
|
|
122
|
+
actionsCellMore: 'meira',
|
|
123
|
+
// Column pinning text
|
|
124
|
+
pinToLeft: 'Festa til vinstri',
|
|
125
|
+
pinToRight: 'Festa til hægri',
|
|
126
|
+
unpin: 'Losa um',
|
|
127
|
+
// Tree Data
|
|
128
|
+
treeDataGroupingHeaderName: 'Hópur',
|
|
129
|
+
treeDataExpand: 'Sýna undirliði',
|
|
130
|
+
treeDataCollapse: 'Fela undirliði',
|
|
131
|
+
// Grouping columns
|
|
132
|
+
groupingColumnHeaderName: 'Hópur',
|
|
133
|
+
groupColumn: name => `Hópa eftir ${name}`,
|
|
134
|
+
unGroupColumn: name => `Fjarlægja hópun eftir ${name}`,
|
|
135
|
+
// Master/detail
|
|
136
|
+
detailPanelToggle: 'Stækka/minnka smáatriðaspjald',
|
|
137
|
+
expandDetailPanel: 'Stækka',
|
|
138
|
+
collapseDetailPanel: 'Minnka',
|
|
139
|
+
// Row reordering text
|
|
140
|
+
rowReorderingHeaderName: 'Endurröðun raða',
|
|
141
|
+
// Aggregation
|
|
142
|
+
aggregationMenuItemHeader: 'Samsafn',
|
|
143
|
+
aggregationFunctionLabelSum: 'sum',
|
|
144
|
+
aggregationFunctionLabelAvg: 'avg',
|
|
145
|
+
aggregationFunctionLabelMin: 'min',
|
|
146
|
+
aggregationFunctionLabelMax: 'max',
|
|
147
|
+
aggregationFunctionLabelSize: 'stærð'
|
|
148
|
+
};
|
|
149
|
+
export const isIS = getGridLocalization(isISGrid, isISCore);
|
package/modern/locales/nbNO.js
CHANGED
|
@@ -16,7 +16,7 @@ const nbNOGrid = {
|
|
|
16
16
|
// Filters toolbar button text
|
|
17
17
|
toolbarFilters: 'Filter',
|
|
18
18
|
toolbarFiltersLabel: 'Vis filter',
|
|
19
|
-
toolbarFiltersTooltipHide: 'Skjul
|
|
19
|
+
toolbarFiltersTooltipHide: 'Skjul filter',
|
|
20
20
|
toolbarFiltersTooltipShow: 'Vis filter',
|
|
21
21
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`,
|
|
22
22
|
// Quick filter toolbar field
|
|
@@ -39,7 +39,7 @@ const nbNOGrid = {
|
|
|
39
39
|
filterPanelRemoveAll: 'Fjern alle',
|
|
40
40
|
filterPanelDeleteIconLabel: 'Slett',
|
|
41
41
|
filterPanelLogicOperator: 'Logisk operator',
|
|
42
|
-
filterPanelOperator: '
|
|
42
|
+
filterPanelOperator: 'Operator',
|
|
43
43
|
filterPanelOperatorAnd: 'Og',
|
|
44
44
|
filterPanelOperatorOr: 'Eller',
|
|
45
45
|
filterPanelColumns: 'Kolonner',
|
|
@@ -59,34 +59,32 @@ const nbNOGrid = {
|
|
|
59
59
|
filterOperatorIsEmpty: 'er tom',
|
|
60
60
|
filterOperatorIsNotEmpty: 'er ikke tom',
|
|
61
61
|
filterOperatorIsAnyOf: 'er en av',
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
'filterOperator=': '=',
|
|
63
|
+
'filterOperator!=': '!=',
|
|
64
|
+
'filterOperator>': '>',
|
|
65
|
+
'filterOperator>=': '>=',
|
|
66
|
+
'filterOperator<': '<',
|
|
67
|
+
'filterOperator<=': '<=',
|
|
69
68
|
// Header filter operators text
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
headerFilterOperatorContains: 'Inneholder',
|
|
70
|
+
headerFilterOperatorEquals: 'Lik',
|
|
71
|
+
headerFilterOperatorStartsWith: 'Starter på',
|
|
72
|
+
headerFilterOperatorEndsWith: 'Slutter på',
|
|
73
|
+
headerFilterOperatorIs: 'Er',
|
|
74
|
+
headerFilterOperatorNot: 'Er ikke',
|
|
75
|
+
headerFilterOperatorAfter: 'Er etter',
|
|
76
|
+
headerFilterOperatorOnOrAfter: 'Er på eller etter',
|
|
77
|
+
headerFilterOperatorBefore: 'Er før',
|
|
78
|
+
headerFilterOperatorOnOrBefore: 'Er på eller før',
|
|
79
|
+
headerFilterOperatorIsEmpty: 'Er tom',
|
|
80
|
+
headerFilterOperatorIsNotEmpty: 'Er ikke tom',
|
|
81
|
+
headerFilterOperatorIsAnyOf: 'Er en av',
|
|
82
|
+
'headerFilterOperator=': 'Lik',
|
|
83
|
+
'headerFilterOperator!=': 'Ikke lik',
|
|
84
|
+
'headerFilterOperator>': 'Større enn',
|
|
85
|
+
'headerFilterOperator>=': 'Større enn eller lik',
|
|
86
|
+
'headerFilterOperator<': 'Mindre enn',
|
|
87
|
+
'headerFilterOperator<=': 'Mindre enn eller lik',
|
|
90
88
|
// Filter values text
|
|
91
89
|
filterValueAny: 'noen',
|
|
92
90
|
filterValueTrue: 'sant',
|
|
@@ -111,7 +109,7 @@ const nbNOGrid = {
|
|
|
111
109
|
// Total visible row amount footer text
|
|
112
110
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`,
|
|
113
111
|
// Checkbox selection text
|
|
114
|
-
checkboxSelectionHeaderName: 'Avmerkingsboks
|
|
112
|
+
checkboxSelectionHeaderName: 'Avmerkingsboks',
|
|
115
113
|
checkboxSelectionSelectAllRows: 'Velg alle rader',
|
|
116
114
|
checkboxSelectionUnselectAllRows: 'Velg bort alle rader',
|
|
117
115
|
checkboxSelectionSelectRow: 'Velg rad',
|
|
@@ -132,13 +130,13 @@ const nbNOGrid = {
|
|
|
132
130
|
// Grouping columns
|
|
133
131
|
groupingColumnHeaderName: 'Grupper',
|
|
134
132
|
groupColumn: name => `Grupper på ${name}`,
|
|
135
|
-
unGroupColumn: name => `
|
|
133
|
+
unGroupColumn: name => `Slutt å grupper på ${name}`,
|
|
136
134
|
// Master/detail
|
|
137
135
|
detailPanelToggle: 'Utvid/kollaps detalj panel',
|
|
138
136
|
expandDetailPanel: 'Utvid',
|
|
139
137
|
collapseDetailPanel: 'Kollaps',
|
|
140
138
|
// Row reordering text
|
|
141
|
-
rowReorderingHeaderName: '
|
|
139
|
+
rowReorderingHeaderName: 'Radreorganisering',
|
|
142
140
|
// Aggregation
|
|
143
141
|
aggregationMenuItemHeader: 'Aggregering',
|
|
144
142
|
aggregationFunctionLabelSum: 'sum',
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { nnNO as nnNOCore } from '@mui/material/locale';
|
|
2
|
+
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
3
|
+
const nnNOGrid = {
|
|
4
|
+
// Root
|
|
5
|
+
noRowsLabel: 'Ingen rader',
|
|
6
|
+
noResultsOverlayLabel: 'Fann ingen resultat.',
|
|
7
|
+
// Density selector toolbar button text
|
|
8
|
+
toolbarDensity: 'Tettheit',
|
|
9
|
+
toolbarDensityLabel: 'Tettheit',
|
|
10
|
+
toolbarDensityCompact: 'Kompakt',
|
|
11
|
+
toolbarDensityStandard: 'Standard',
|
|
12
|
+
toolbarDensityComfortable: 'Komfortabelt',
|
|
13
|
+
// Columns selector toolbar button text
|
|
14
|
+
toolbarColumns: 'Kolonner',
|
|
15
|
+
toolbarColumnsLabel: 'Vel kolonner',
|
|
16
|
+
// Filters toolbar button text
|
|
17
|
+
toolbarFilters: 'Filter',
|
|
18
|
+
toolbarFiltersLabel: 'Vis filter',
|
|
19
|
+
toolbarFiltersTooltipHide: 'Skjul filter',
|
|
20
|
+
toolbarFiltersTooltipShow: 'Vis filter',
|
|
21
|
+
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`,
|
|
22
|
+
// Quick filter toolbar field
|
|
23
|
+
toolbarQuickFilterPlaceholder: 'Søk…',
|
|
24
|
+
toolbarQuickFilterLabel: 'Søk',
|
|
25
|
+
toolbarQuickFilterDeleteIconLabel: 'Slett',
|
|
26
|
+
// Export selector toolbar button text
|
|
27
|
+
toolbarExport: 'Eksporter',
|
|
28
|
+
toolbarExportLabel: 'Eksporter',
|
|
29
|
+
toolbarExportCSV: 'Last ned som CSV',
|
|
30
|
+
toolbarExportPrint: 'Skriv ut',
|
|
31
|
+
toolbarExportExcel: 'Last ned som Excel',
|
|
32
|
+
// Columns management text
|
|
33
|
+
columnsManagementSearchTitle: 'Søk',
|
|
34
|
+
columnsManagementNoColumns: 'Ingen kolonner',
|
|
35
|
+
columnsManagementShowHideAllText: 'Vis/skjul alle',
|
|
36
|
+
columnsManagementReset: 'Nullstill',
|
|
37
|
+
// Filter panel text
|
|
38
|
+
filterPanelAddFilter: 'Legg til filter',
|
|
39
|
+
filterPanelRemoveAll: 'Fjern alle',
|
|
40
|
+
filterPanelDeleteIconLabel: 'Slett',
|
|
41
|
+
filterPanelLogicOperator: 'Logisk operator',
|
|
42
|
+
filterPanelOperator: 'Operator',
|
|
43
|
+
filterPanelOperatorAnd: 'Og',
|
|
44
|
+
filterPanelOperatorOr: 'Eller',
|
|
45
|
+
filterPanelColumns: 'Kolonner',
|
|
46
|
+
filterPanelInputLabel: 'Verdi',
|
|
47
|
+
filterPanelInputPlaceholder: 'Filter verdi',
|
|
48
|
+
// Filter operators text
|
|
49
|
+
filterOperatorContains: 'inneheld',
|
|
50
|
+
filterOperatorEquals: 'er lik',
|
|
51
|
+
filterOperatorStartsWith: 'startar med',
|
|
52
|
+
filterOperatorEndsWith: 'sluttar med',
|
|
53
|
+
filterOperatorIs: 'er',
|
|
54
|
+
filterOperatorNot: 'er ikkje',
|
|
55
|
+
filterOperatorAfter: 'er etter',
|
|
56
|
+
filterOperatorOnOrAfter: 'er på eller etter',
|
|
57
|
+
filterOperatorBefore: 'er før',
|
|
58
|
+
filterOperatorOnOrBefore: 'er på eller før',
|
|
59
|
+
filterOperatorIsEmpty: 'er tom',
|
|
60
|
+
filterOperatorIsNotEmpty: 'er ikkje tom',
|
|
61
|
+
filterOperatorIsAnyOf: 'er ein av',
|
|
62
|
+
'filterOperator=': '=',
|
|
63
|
+
'filterOperator!=': '!=',
|
|
64
|
+
'filterOperator>': '>',
|
|
65
|
+
'filterOperator>=': '>=',
|
|
66
|
+
'filterOperator<': '<',
|
|
67
|
+
'filterOperator<=': '<=',
|
|
68
|
+
// Header filter operators text
|
|
69
|
+
headerFilterOperatorContains: 'Inneheld',
|
|
70
|
+
headerFilterOperatorEquals: 'Lik',
|
|
71
|
+
headerFilterOperatorStartsWith: 'Startar på',
|
|
72
|
+
headerFilterOperatorEndsWith: 'Sluttar på',
|
|
73
|
+
headerFilterOperatorIs: 'Er',
|
|
74
|
+
headerFilterOperatorNot: 'Er ikkje',
|
|
75
|
+
headerFilterOperatorAfter: 'Er etter',
|
|
76
|
+
headerFilterOperatorOnOrAfter: 'Er på eller etter',
|
|
77
|
+
headerFilterOperatorBefore: 'Er før',
|
|
78
|
+
headerFilterOperatorOnOrBefore: 'Er på eller før',
|
|
79
|
+
headerFilterOperatorIsEmpty: 'Er tom',
|
|
80
|
+
headerFilterOperatorIsNotEmpty: 'Er ikkje tom',
|
|
81
|
+
headerFilterOperatorIsAnyOf: 'Er ein av',
|
|
82
|
+
'headerFilterOperator=': 'Lik',
|
|
83
|
+
'headerFilterOperator!=': 'Ikkje lik',
|
|
84
|
+
'headerFilterOperator>': 'Større enn',
|
|
85
|
+
'headerFilterOperator>=': 'Større enn eller lik',
|
|
86
|
+
'headerFilterOperator<': 'Mindre enn',
|
|
87
|
+
'headerFilterOperator<=': 'Mindre enn eller lik',
|
|
88
|
+
// Filter values text
|
|
89
|
+
filterValueAny: 'nokon',
|
|
90
|
+
filterValueTrue: 'sant',
|
|
91
|
+
filterValueFalse: 'usant',
|
|
92
|
+
// Column menu text
|
|
93
|
+
columnMenuLabel: 'Meny',
|
|
94
|
+
columnMenuShowColumns: 'Vis kolonner',
|
|
95
|
+
columnMenuManageColumns: 'Administrer kolonner',
|
|
96
|
+
columnMenuFilter: 'Filter',
|
|
97
|
+
columnMenuHideColumn: 'Skjul',
|
|
98
|
+
columnMenuUnsort: 'Usorter',
|
|
99
|
+
columnMenuSortAsc: 'Sorter AUKANDE',
|
|
100
|
+
columnMenuSortDesc: 'Sorter SYNKANDE',
|
|
101
|
+
// Column header text
|
|
102
|
+
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`,
|
|
103
|
+
columnHeaderFiltersLabel: 'Vis filter',
|
|
104
|
+
columnHeaderSortIconLabel: 'Sorter',
|
|
105
|
+
// Rows selected footer text
|
|
106
|
+
footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rader valt` : `${count.toLocaleString()} rad valt`,
|
|
107
|
+
// Total row amount footer text
|
|
108
|
+
footerTotalRows: 'Totalt tal rader:',
|
|
109
|
+
// Total visible row amount footer text
|
|
110
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`,
|
|
111
|
+
// Checkbox selection text
|
|
112
|
+
checkboxSelectionHeaderName: 'Avmerkingsboks',
|
|
113
|
+
checkboxSelectionSelectAllRows: 'Vel alle rader',
|
|
114
|
+
checkboxSelectionUnselectAllRows: 'Vel vekk alle rader',
|
|
115
|
+
checkboxSelectionSelectRow: 'Vel rad',
|
|
116
|
+
checkboxSelectionUnselectRow: 'Vel vekk rad',
|
|
117
|
+
// Boolean cell text
|
|
118
|
+
booleanCellTrueLabel: 'sant',
|
|
119
|
+
booleanCellFalseLabel: 'usant',
|
|
120
|
+
// Actions cell more text
|
|
121
|
+
actionsCellMore: 'meir',
|
|
122
|
+
// Column pinning text
|
|
123
|
+
pinToLeft: 'Fest til venstre',
|
|
124
|
+
pinToRight: 'Fest til høgre',
|
|
125
|
+
unpin: 'Lausne',
|
|
126
|
+
// Tree Data
|
|
127
|
+
treeDataGroupingHeaderName: 'Grupper',
|
|
128
|
+
treeDataExpand: 'vis barn',
|
|
129
|
+
treeDataCollapse: 'skjul barn',
|
|
130
|
+
// Grouping columns
|
|
131
|
+
groupingColumnHeaderName: 'Grupper',
|
|
132
|
+
groupColumn: name => `Grupper på ${name}`,
|
|
133
|
+
unGroupColumn: name => `Slutt å grupper på ${name}`,
|
|
134
|
+
// Master/detail
|
|
135
|
+
detailPanelToggle: 'Utvid/kollaps detalj panel',
|
|
136
|
+
expandDetailPanel: 'Utvid',
|
|
137
|
+
collapseDetailPanel: 'Kolaps',
|
|
138
|
+
// Row reordering text
|
|
139
|
+
rowReorderingHeaderName: 'Radreorganisering',
|
|
140
|
+
// Aggregation
|
|
141
|
+
aggregationMenuItemHeader: 'Aggregering',
|
|
142
|
+
aggregationFunctionLabelSum: 'sum',
|
|
143
|
+
aggregationFunctionLabelAvg: 'snitt',
|
|
144
|
+
aggregationFunctionLabelMin: 'min',
|
|
145
|
+
aggregationFunctionLabelMax: 'maks',
|
|
146
|
+
aggregationFunctionLabelSize: 'størrelse'
|
|
147
|
+
};
|
|
148
|
+
export const nnNO = getGridLocalization(nnNOGrid, nnNOCore);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createSelector as reselectCreateSelector } from 'reselect';
|
|
2
|
-
import {
|
|
2
|
+
import { warnOnce } from '../internals/utils/warning';
|
|
3
3
|
const cache = new WeakMap();
|
|
4
|
-
const missingInstanceIdWarning = buildWarning(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
|
|
5
4
|
function checkIsAPIRef(value) {
|
|
6
5
|
return 'current' in value && 'instanceId' in value.current;
|
|
7
6
|
}
|
|
@@ -79,7 +78,7 @@ export const createSelectorMemoized = (...args) => {
|
|
|
79
78
|
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
80
79
|
if (process.env.NODE_ENV !== 'production') {
|
|
81
80
|
if (cacheKey.id === 'default') {
|
|
82
|
-
|
|
81
|
+
warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
const cacheArgsInit = cache.get(cacheKey);
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.GridPreferencesPanel =
|
|
7
|
+
exports.GridPreferencesPanel = GridPreferencesPanel;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _gridColumnsSelector = require("../../hooks/features/columns/gridColumnsSelector");
|
|
@@ -16,19 +16,18 @@ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
-
|
|
19
|
+
function GridPreferencesPanel() {
|
|
20
20
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
21
21
|
const columns = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnDefinitionsSelector);
|
|
22
22
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
23
23
|
const preferencePanelState = (0, _useGridSelector.useGridSelector)(apiRef, _gridPreferencePanelSelector.gridPreferencePanelStateSelector);
|
|
24
24
|
const panelContent = apiRef.current.unstable_applyPipeProcessors('preferencePanel', null, preferencePanelState.openedPanelValue ?? _gridPreferencePanelsValue.GridPreferencePanelsValue.filters);
|
|
25
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.panel, (0, _extends2.default)({
|
|
26
|
-
ref: ref,
|
|
27
26
|
as: rootProps.slots.basePopper,
|
|
28
27
|
open: columns.length > 0 && preferencePanelState.open,
|
|
29
28
|
id: preferencePanelState.panelId,
|
|
30
29
|
"aria-labelledby": preferencePanelState.labelId
|
|
31
|
-
}, rootProps.slotProps?.panel,
|
|
30
|
+
}, rootProps.slotProps?.panel, rootProps.slotProps?.basePopper, {
|
|
32
31
|
children: panelContent
|
|
33
32
|
}));
|
|
34
|
-
}
|
|
33
|
+
}
|
|
@@ -91,7 +91,7 @@ function useGridApiInitialization(inputApiRef, props) {
|
|
|
91
91
|
if (isSyntheticEvent(event) && event.isPropagationStopped()) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
const details = props.signature === _useGridApiEventHandler.GridSignature.DataGridPro ? {
|
|
94
|
+
const details = props.signature === _useGridApiEventHandler.GridSignature.DataGridPro || props.signature === _useGridApiEventHandler.GridSignature.DataGridPremium ? {
|
|
95
95
|
api: privateApiRef.current.getPublicApi()
|
|
96
96
|
} : {};
|
|
97
97
|
privateApiRef.current.eventManager.emit(name, params, event, details);
|
|
@@ -15,7 +15,7 @@ var _gridEditRowModel = require("../../../models/gridEditRowModel");
|
|
|
15
15
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
16
16
|
var _gridEditingSelectors = require("./gridEditingSelectors");
|
|
17
17
|
var _keyboardUtils = require("../../../utils/keyboardUtils");
|
|
18
|
-
var _warning = require("../../../utils/warning");
|
|
18
|
+
var _warning = require("../../../internals/utils/warning");
|
|
19
19
|
var _gridRowsSelector = require("../rows/gridRowsSelector");
|
|
20
20
|
var _utils2 = require("../../../utils/utils");
|
|
21
21
|
var _gridEditCellParams = require("../../../models/params/gridEditCellParams");
|
|
@@ -23,7 +23,6 @@ const _excluded = ["id", "field"],
|
|
|
23
23
|
_excluded2 = ["id", "field"];
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
-
const missingOnProcessRowUpdateErrorWarning = (0, _warning.buildWarning)(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
|
|
27
26
|
const useGridCellEditing = (apiRef, props) => {
|
|
28
27
|
const [cellModesModel, setCellModesModel] = React.useState({});
|
|
29
28
|
const cellModesModelRef = React.useRef(cellModesModel);
|
|
@@ -345,7 +344,7 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
345
344
|
if (onProcessRowUpdateError) {
|
|
346
345
|
onProcessRowUpdateError(errorThrown);
|
|
347
346
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
348
|
-
|
|
347
|
+
(0, _warning.warnOnce)(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
|
|
349
348
|
}
|
|
350
349
|
};
|
|
351
350
|
try {
|
|
@@ -16,7 +16,7 @@ var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
|
16
16
|
var _gridEditingSelectors = require("./gridEditingSelectors");
|
|
17
17
|
var _keyboardUtils = require("../../../utils/keyboardUtils");
|
|
18
18
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
19
|
-
var _warning = require("../../../utils/warning");
|
|
19
|
+
var _warning = require("../../../internals/utils/warning");
|
|
20
20
|
var _gridRowsSelector = require("../rows/gridRowsSelector");
|
|
21
21
|
var _utils2 = require("../../../utils/utils");
|
|
22
22
|
var _gridRowParams = require("../../../models/params/gridRowParams");
|
|
@@ -25,7 +25,6 @@ const _excluded = ["id"],
|
|
|
25
25
|
_excluded2 = ["id"];
|
|
26
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
27
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
const missingOnProcessRowUpdateErrorWarning = (0, _warning.buildWarning)(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
|
|
29
28
|
const useGridRowEditing = (apiRef, props) => {
|
|
30
29
|
const [rowModesModel, setRowModesModel] = React.useState({});
|
|
31
30
|
const rowModesModelRef = React.useRef(rowModesModel);
|
|
@@ -398,7 +397,7 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
398
397
|
if (onProcessRowUpdateError) {
|
|
399
398
|
onProcessRowUpdateError(errorThrown);
|
|
400
399
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
401
|
-
|
|
400
|
+
(0, _warning.warnOnce)(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
|
|
402
401
|
}
|
|
403
402
|
};
|
|
404
403
|
try {
|
|
@@ -6,21 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.buildCSV = buildCSV;
|
|
7
7
|
exports.serializeCellValue = void 0;
|
|
8
8
|
var _colDef = require("../../../../colDef");
|
|
9
|
-
var _warning = require("../../../../utils/warning");
|
|
9
|
+
var _warning = require("../../../../internals/utils/warning");
|
|
10
10
|
function sanitizeCellValue(value, csvOptions) {
|
|
11
11
|
const valueStr = typeof value === 'string' ? value : `${value}`;
|
|
12
12
|
if (csvOptions.shouldAppendQuotes || csvOptions.escapeFormulas) {
|
|
13
13
|
const escapedValue = valueStr.replace(/"/g, '""');
|
|
14
|
-
// Make sure value containing delimiter or line break won't be split into multiple cells
|
|
15
|
-
if ([csvOptions.delimiter, '\n', '\r', '"'].some(delimiter => valueStr.includes(delimiter))) {
|
|
16
|
-
return `"${escapedValue}"`;
|
|
17
|
-
}
|
|
18
14
|
if (csvOptions.escapeFormulas) {
|
|
19
15
|
// See https://owasp.org/www-community/attacks/CSV_Injection
|
|
20
16
|
if (['=', '+', '-', '@', '\t', '\r'].includes(escapedValue[0])) {
|
|
21
|
-
return `'${escapedValue}`;
|
|
17
|
+
return `"'${escapedValue}"`;
|
|
22
18
|
}
|
|
23
19
|
}
|
|
20
|
+
// Make sure value containing delimiter or line break won't be split into multiple cells
|
|
21
|
+
if ([csvOptions.delimiter, '\n', '\r', '"'].some(delimiter => valueStr.includes(delimiter))) {
|
|
22
|
+
return `"${escapedValue}"`;
|
|
23
|
+
}
|
|
24
24
|
return escapedValue;
|
|
25
25
|
}
|
|
26
26
|
return valueStr;
|
|
@@ -48,7 +48,6 @@ const serializeCellValue = (cellParams, options) => {
|
|
|
48
48
|
return sanitizeCellValue(value, csvOptions);
|
|
49
49
|
};
|
|
50
50
|
exports.serializeCellValue = serializeCellValue;
|
|
51
|
-
const objectFormattedValueWarning = (0, _warning.buildWarning)(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
|
|
52
51
|
class CSVRow {
|
|
53
52
|
constructor(options) {
|
|
54
53
|
this.options = void 0;
|
|
@@ -87,7 +86,7 @@ const serializeRow = ({
|
|
|
87
86
|
const cellParams = getCellParams(id, column.field);
|
|
88
87
|
if (process.env.NODE_ENV !== 'production') {
|
|
89
88
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
90
|
-
|
|
89
|
+
(0, _warning.warnOnce)(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
row.addValue(serializeCellValue(cellParams, {
|
|
@@ -8,7 +8,7 @@ exports.shouldQuickFilterExcludeHiddenColumns = exports.sanitizeFilterModel = ex
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _models = require("../../../models");
|
|
10
10
|
var _gridFilterState = require("./gridFilterState");
|
|
11
|
-
var _warning = require("../../../utils/warning");
|
|
11
|
+
var _warning = require("../../../internals/utils/warning");
|
|
12
12
|
var _getPublicApiRef = require("../../../utils/getPublicApiRef");
|
|
13
13
|
var _columns = require("../columns");
|
|
14
14
|
let hasEval;
|
|
@@ -44,25 +44,28 @@ const cleanFilterItem = (item, apiRef) => {
|
|
|
44
44
|
return cleanItem;
|
|
45
45
|
};
|
|
46
46
|
exports.cleanFilterItem = cleanFilterItem;
|
|
47
|
-
const filterModelDisableMultiColumnsFilteringWarning = (0, _warning.buildWarning)(['MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
|
|
48
|
-
const filterModelMissingItemIdWarning = (0, _warning.buildWarning)('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
|
|
49
|
-
const filterModelMissingItemOperatorWarning = (0, _warning.buildWarning)('MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
|
|
50
47
|
const sanitizeFilterModel = (model, disableMultipleColumnsFiltering, apiRef) => {
|
|
51
48
|
const hasSeveralItems = model.items.length > 1;
|
|
52
49
|
let items;
|
|
53
50
|
if (hasSeveralItems && disableMultipleColumnsFiltering) {
|
|
54
|
-
|
|
51
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
52
|
+
(0, _warning.warnOnce)(['MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
|
|
53
|
+
}
|
|
55
54
|
items = [model.items[0]];
|
|
56
55
|
} else {
|
|
57
56
|
items = model.items;
|
|
58
57
|
}
|
|
59
58
|
const hasItemsWithoutIds = hasSeveralItems && items.some(item => item.id == null);
|
|
60
59
|
const hasItemWithoutOperator = items.some(item => item.operator == null);
|
|
61
|
-
if (
|
|
62
|
-
|
|
60
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
61
|
+
if (hasItemsWithoutIds) {
|
|
62
|
+
(0, _warning.warnOnce)('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
|
|
63
|
+
}
|
|
63
64
|
}
|
|
64
|
-
if (
|
|
65
|
-
|
|
65
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
66
|
+
if (hasItemWithoutOperator) {
|
|
67
|
+
(0, _warning.warnOnce)('MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
|
|
68
|
+
}
|
|
66
69
|
}
|
|
67
70
|
if (hasItemWithoutOperator || hasItemsWithoutIds) {
|
|
68
71
|
return (0, _extends2.default)({}, model, {
|
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.sanitizeSortModel = exports.mergeStateWithSortModel = exports.gridStringOrNumberComparator = exports.gridNumberComparator = exports.gridDateComparator = exports.getNextGridSortDirection = exports.buildAggregatedSortingApplier = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _warning = require("../../../utils/warning");
|
|
10
|
-
const sortModelDisableMultiColumnsSortingWarning = (0, _warning.buildWarning)(['MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
|
|
9
|
+
var _warning = require("../../../internals/utils/warning");
|
|
11
10
|
const sanitizeSortModel = (model, disableMultipleColumnsSorting) => {
|
|
12
11
|
if (disableMultipleColumnsSorting && model.length > 1) {
|
|
13
12
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
-
|
|
13
|
+
(0, _warning.warnOnce)(['MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
|
|
15
14
|
}
|
|
16
15
|
return [model[0]];
|
|
17
16
|
}
|
|
@@ -19,6 +19,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
19
19
|
var GridSignature = exports.GridSignature = /*#__PURE__*/function (GridSignature) {
|
|
20
20
|
GridSignature["DataGrid"] = "DataGrid";
|
|
21
21
|
GridSignature["DataGridPro"] = "DataGridPro";
|
|
22
|
+
GridSignature["DataGridPremium"] = "DataGridPremium";
|
|
22
23
|
return GridSignature;
|
|
23
24
|
}(GridSignature || {});
|
|
24
25
|
// We use class to make it easier to detect in heap snapshots by name
|