@mui/x-data-grid 7.10.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 +169 -0
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +4 -1
- package/components/panel/GridPreferencesPanel.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +3 -4
- package/components/panel/filterPanel/GridFilterForm.js +1 -12
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/hooks/core/useGridApiInitialization.js +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/hooks/features/editing/gridEditingSelectors.d.ts +3 -0
- package/hooks/features/editing/gridEditingSelectors.js +3 -1
- package/hooks/features/editing/index.d.ts +1 -0
- package/hooks/features/editing/index.js +1 -0
- 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/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/sorting/gridSortingUtils.js +2 -3
- package/hooks/utils/useGridApiEventHandler.d.ts +3 -2
- 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/locales/ruRU.js +4 -5
- package/models/api/gridCoreApi.d.ts +1 -1
- package/modern/components/panel/GridPanel.js +4 -1
- package/modern/components/panel/GridPreferencesPanel.js +3 -4
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -12
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/modern/hooks/core/useGridApiInitialization.js +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/modern/hooks/features/editing/gridEditingSelectors.js +3 -1
- package/modern/hooks/features/editing/index.js +1 -0
- 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/index.js +1 -0
- 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/locales/ruRU.js +4 -5
- package/modern/utils/createSelector.js +4 -5
- package/node/components/panel/GridPanel.js +4 -1
- package/node/components/panel/GridPreferencesPanel.js +4 -5
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -12
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/node/hooks/core/useGridApiInitialization.js +2 -2
- package/node/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/node/hooks/features/editing/gridEditingSelectors.js +3 -1
- package/node/hooks/features/editing/index.js +16 -0
- 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/index.js +11 -0
- 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/locales/ruRU.js +4 -5
- package/node/utils/createSelector.js +4 -5
- package/package.json +5 -5
- package/utils/createSelector.d.ts +1 -1
- package/utils/createSelector.js +4 -5
- package/modern/utils/EventManager.js +0 -69
- package/modern/utils/warning.js +0 -24
- package/node/utils/EventManager.js +0 -76
- package/node/utils/warning.js +0 -32
- package/utils/EventManager.d.ts +0 -29
- package/utils/EventManager.js +0 -69
- package/utils/warning.d.ts +0 -2
- package/utils/warning.js +0 -24
|
@@ -1,21 +1,12 @@
|
|
|
1
|
+
import { warnOnce } from './warning';
|
|
1
2
|
import { isNumber } from '../../utils/utils';
|
|
2
3
|
import { GridSignature } from '../../hooks/utils/useGridApiEventHandler';
|
|
3
4
|
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.unstable_dataSource && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
4
|
-
const warnedOnceCache = new Set();
|
|
5
|
-
function warnOnce(message) {
|
|
6
|
-
if (!warnedOnceCache.has(message)) {
|
|
7
|
-
console.error(message);
|
|
8
|
-
warnedOnceCache.add(message);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
5
|
export function validateProps(props, validators) {
|
|
12
6
|
validators.forEach(validator => {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
warnOnce(
|
|
7
|
+
const message = validator(props);
|
|
8
|
+
if (message) {
|
|
9
|
+
warnOnce(message, 'error');
|
|
16
10
|
}
|
|
17
11
|
});
|
|
18
|
-
}
|
|
19
|
-
export function clearWarningsCache() {
|
|
20
|
-
warnedOnceCache.clear();
|
|
21
12
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const warnedOnceCache = new Set();
|
|
2
|
+
|
|
3
|
+
// TODO move to @mui/x-internals
|
|
4
|
+
// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
|
|
5
|
+
export function warnOnce(message, gravity = 'warning') {
|
|
6
|
+
if (process.env.NODE_ENV === 'production') {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
|
|
10
|
+
if (!warnedOnceCache.has(cleanMessage)) {
|
|
11
|
+
warnedOnceCache.add(cleanMessage);
|
|
12
|
+
if (gravity === 'error') {
|
|
13
|
+
console.error(cleanMessage);
|
|
14
|
+
} else {
|
|
15
|
+
console.warn(cleanMessage);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function clearWarningsCache() {
|
|
20
|
+
warnedOnceCache.clear();
|
|
21
|
+
}
|
package/locales/deDE.js
CHANGED
|
@@ -33,8 +33,7 @@ const deDEGrid = {
|
|
|
33
33
|
columnsManagementSearchTitle: 'Suche',
|
|
34
34
|
columnsManagementNoColumns: 'Keine Spalten',
|
|
35
35
|
columnsManagementShowHideAllText: 'Alle anzeigen/verbergen',
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
columnsManagementReset: 'Zurücksetzen',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Filter hinzufügen',
|
|
40
39
|
filterPanelRemoveAll: 'Alle entfernen',
|
package/locales/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './jaJP';
|
|
|
17
17
|
export * from './koKR';
|
|
18
18
|
export * from './nbNO';
|
|
19
19
|
export * from './nlNL';
|
|
20
|
+
export * from './nnNO';
|
|
20
21
|
export * from './plPL';
|
|
21
22
|
export * from './ptBR';
|
|
22
23
|
export * from './roRO';
|
|
@@ -32,3 +33,4 @@ export * from './zhTW';
|
|
|
32
33
|
export * from './hrHR';
|
|
33
34
|
export * from './ptPT';
|
|
34
35
|
export * from './zhHK';
|
|
36
|
+
export * from './isIS';
|
package/locales/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export * from './jaJP';
|
|
|
18
18
|
export * from './koKR';
|
|
19
19
|
export * from './nbNO';
|
|
20
20
|
export * from './nlNL';
|
|
21
|
+
export * from './nnNO';
|
|
21
22
|
export * from './plPL';
|
|
22
23
|
export * from './ptBR';
|
|
23
24
|
export * from './roRO';
|
|
@@ -32,4 +33,5 @@ export * from './zhCN';
|
|
|
32
33
|
export * from './zhTW';
|
|
33
34
|
export * from './hrHR';
|
|
34
35
|
export * from './ptPT';
|
|
35
|
-
export * from './zhHK';
|
|
36
|
+
export * from './zhHK';
|
|
37
|
+
export * from './isIS';
|
package/locales/isIS.js
ADDED
|
@@ -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/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',
|
package/locales/nnNO.js
ADDED
|
@@ -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);
|
package/locales/ruRU.js
CHANGED
|
@@ -45,11 +45,10 @@ const ruRUGrid = {
|
|
|
45
45
|
toolbarExportPrint: 'Печать',
|
|
46
46
|
toolbarExportExcel: 'Скачать в формате Excel',
|
|
47
47
|
// Columns management text
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
columnsManagementSearchTitle: 'Поиск',
|
|
49
|
+
columnsManagementNoColumns: 'Нет столбцов',
|
|
50
|
+
columnsManagementShowHideAllText: 'Показать/Скрыть Всё',
|
|
51
|
+
columnsManagementReset: 'Сбросить',
|
|
53
52
|
// Filter panel text
|
|
54
53
|
filterPanelAddFilter: 'Добавить фильтр',
|
|
55
54
|
filterPanelRemoveAll: 'Очистить фильтр',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
|
|
2
3
|
import { GridEventPublisher, GridEventListener, GridEvents } from '../events';
|
|
3
4
|
import { Store } from '../../utils/Store';
|
|
4
|
-
import { EventManager, EventListenerOptions } from '../../utils/EventManager';
|
|
5
5
|
import { GridApiCaches } from '../gridApiCaches';
|
|
6
6
|
import type { GridApiCommon, GridPrivateApiCommon } from './gridApiCommon';
|
|
7
7
|
import type { DataGridProcessedProps } from '../props/DataGridProps';
|
|
@@ -57,7 +57,10 @@ const GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
57
57
|
}, [apiRef]);
|
|
58
58
|
const modifiers = React.useMemo(() => [{
|
|
59
59
|
name: 'flip',
|
|
60
|
-
enabled:
|
|
60
|
+
enabled: true,
|
|
61
|
+
options: {
|
|
62
|
+
rootBoundary: 'document'
|
|
63
|
+
}
|
|
61
64
|
}, {
|
|
62
65
|
name: 'isPlaced',
|
|
63
66
|
enabled: true,
|
|
@@ -7,19 +7,18 @@ import { GridPreferencePanelsValue } from '../../hooks/features/preferencesPanel
|
|
|
7
7
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
8
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export
|
|
10
|
+
export function GridPreferencesPanel() {
|
|
11
11
|
const apiRef = useGridApiContext();
|
|
12
12
|
const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);
|
|
13
13
|
const rootProps = useGridRootProps();
|
|
14
14
|
const preferencePanelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
15
15
|
const panelContent = apiRef.current.unstable_applyPipeProcessors('preferencePanel', null, preferencePanelState.openedPanelValue ?? GridPreferencePanelsValue.filters);
|
|
16
16
|
return /*#__PURE__*/_jsx(rootProps.slots.panel, _extends({
|
|
17
|
-
ref: ref,
|
|
18
17
|
as: rootProps.slots.basePopper,
|
|
19
18
|
open: columns.length > 0 && preferencePanelState.open,
|
|
20
19
|
id: preferencePanelState.panelId,
|
|
21
20
|
"aria-labelledby": preferencePanelState.labelId
|
|
22
|
-
}, rootProps.slotProps?.panel,
|
|
21
|
+
}, rootProps.slotProps?.panel, rootProps.slotProps?.basePopper, {
|
|
23
22
|
children: panelContent
|
|
24
23
|
}));
|
|
25
|
-
}
|
|
24
|
+
}
|
|
@@ -243,18 +243,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
243
243
|
applyMultiFilterOperatorChanges(logicOperator);
|
|
244
244
|
}, [applyMultiFilterOperatorChanges]);
|
|
245
245
|
const handleDeleteFilter = () => {
|
|
246
|
-
|
|
247
|
-
if (item.value === undefined) {
|
|
248
|
-
deleteFilter(item);
|
|
249
|
-
} else {
|
|
250
|
-
// TODO v6: simplify the behavior by always remove the filter form
|
|
251
|
-
applyFilterChanges(_extends({}, item, {
|
|
252
|
-
value: undefined
|
|
253
|
-
}));
|
|
254
|
-
}
|
|
255
|
-
} else {
|
|
256
|
-
deleteFilter(item);
|
|
257
|
-
}
|
|
246
|
+
deleteFilter(item);
|
|
258
247
|
};
|
|
259
248
|
React.useImperativeHandle(focusElementRef, () => ({
|
|
260
249
|
focus: () => {
|
|
@@ -88,6 +88,6 @@ process.env.NODE_ENV !== "production" ? GridFilterInputMultipleValue.propTypes =
|
|
|
88
88
|
operator: PropTypes.string.isRequired,
|
|
89
89
|
value: PropTypes.any
|
|
90
90
|
}).isRequired,
|
|
91
|
-
type: PropTypes.oneOf(['number', 'text'])
|
|
91
|
+
type: PropTypes.oneOf(['date', 'datetime-local', 'number', 'text'])
|
|
92
92
|
} : void 0;
|
|
93
93
|
export { GridFilterInputMultipleValue };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { EventManager } from '@mui/x-internals/EventManager';
|
|
2
3
|
import { Store } from '../../utils/Store';
|
|
3
4
|
import { useGridApiMethod } from '../utils/useGridApiMethod';
|
|
4
5
|
import { GridSignature } from '../utils/useGridApiEventHandler';
|
|
5
|
-
import { EventManager } from '../../utils/EventManager';
|
|
6
6
|
const SYMBOL_API_PRIVATE = Symbol('mui.api_private');
|
|
7
7
|
const isSyntheticEvent = event => {
|
|
8
8
|
return event.isPropagationStopped !== undefined;
|
|
@@ -82,7 +82,7 @@ export function useGridApiInitialization(inputApiRef, props) {
|
|
|
82
82
|
if (isSyntheticEvent(event) && event.isPropagationStopped()) {
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
const details = props.signature === GridSignature.DataGridPro ? {
|
|
85
|
+
const details = props.signature === GridSignature.DataGridPro || props.signature === GridSignature.DataGridPremium ? {
|
|
86
86
|
api: privateApiRef.current.getPublicApi()
|
|
87
87
|
} : {};
|
|
88
88
|
privateApiRef.current.eventManager.emit(name, params, event, details);
|
|
@@ -267,6 +267,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
267
267
|
// Check if the current event is part of a double-click
|
|
268
268
|
if (nativeEvent.timeStamp - prevTimeStamp < 300 && nativeEvent.clientX === prevClientX && nativeEvent.clientY === prevClientY) {
|
|
269
269
|
refs.previousMouseClickEvent = undefined;
|
|
270
|
+
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
270
271
|
return;
|
|
271
272
|
}
|
|
272
273
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gridEditingSelectors';
|