@mui/x-data-grid 5.17.20 → 5.17.21
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 +38 -0
- package/components/cell/GridCell.js +3 -1
- package/components/panel/GridColumnsPanel.js +15 -5
- package/hooks/features/export/useGridPrintExport.js +7 -3
- package/index.js +1 -1
- package/legacy/components/cell/GridCell.js +3 -1
- package/legacy/components/panel/GridColumnsPanel.js +15 -9
- package/legacy/hooks/features/export/useGridPrintExport.js +8 -4
- package/legacy/index.js +1 -1
- package/legacy/lib/createDetectElementResize/index.js +5 -5
- package/legacy/locales/beBY.js +161 -0
- package/legacy/locales/coreLocales.js +67 -0
- package/legacy/locales/esES.js +18 -14
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/jaJP.js +16 -16
- package/legacy/locales/skSK.js +8 -8
- package/legacy/locales/viVN.js +22 -18
- package/lib/createDetectElementResize/index.js +5 -5
- package/locales/beBY.d.ts +2 -0
- package/locales/beBY.js +149 -0
- package/locales/coreLocales.d.ts +3 -0
- package/locales/coreLocales.js +65 -0
- package/locales/esES.js +14 -14
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/jaJP.js +16 -16
- package/locales/skSK.js +8 -8
- package/locales/viVN.js +18 -18
- package/modern/components/cell/GridCell.js +3 -1
- package/modern/components/panel/GridColumnsPanel.js +15 -5
- package/modern/hooks/features/export/useGridPrintExport.js +7 -3
- package/modern/index.js +1 -1
- package/modern/lib/createDetectElementResize/index.js +5 -5
- package/modern/locales/beBY.js +149 -0
- package/modern/locales/coreLocales.js +65 -0
- package/modern/locales/esES.js +14 -14
- package/modern/locales/index.js +1 -0
- package/modern/locales/jaJP.js +16 -16
- package/modern/locales/skSK.js +8 -8
- package/modern/locales/viVN.js +18 -18
- package/node/components/cell/GridCell.js +3 -1
- package/node/components/panel/GridColumnsPanel.js +13 -5
- package/node/hooks/features/export/useGridPrintExport.js +7 -3
- package/node/index.js +1 -1
- package/node/lib/createDetectElementResize/index.js +5 -5
- package/node/locales/beBY.js +158 -0
- package/node/locales/coreLocales.js +73 -0
- package/node/locales/esES.js +14 -14
- package/node/locales/index.js +13 -0
- package/node/locales/jaJP.js +16 -16
- package/node/locales/skSK.js +8 -8
- package/node/locales/viVN.js +18 -18
- package/package.json +1 -1
|
@@ -86,11 +86,11 @@ export default function createDetectElementResize(nonce, hostWindow) {
|
|
|
86
86
|
var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
|
|
87
87
|
var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
|
88
88
|
|
|
89
|
-
var createStyles = function createStyles(doc) {
|
|
90
|
-
if (!
|
|
89
|
+
var createStyles = function createStyles(doc, root) {
|
|
90
|
+
if (!root.getElementById('muiDetectElementResize')) {
|
|
91
91
|
//opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
|
|
92
92
|
var css = (animationKeyframes ? animationKeyframes : '') + '.Mui-resizeTriggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.Mui-resizeTriggers, .Mui-resizeTriggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .Mui-resizeTriggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
93
|
-
|
|
93
|
+
container = root.constructor.name === 'ShadowRoot' ? root : doc.head || doc.getElementsByTagName('head')[0],
|
|
94
94
|
style = doc.createElement('style');
|
|
95
95
|
style.id = 'muiDetectElementResize';
|
|
96
96
|
style.type = 'text/css';
|
|
@@ -105,7 +105,7 @@ export default function createDetectElementResize(nonce, hostWindow) {
|
|
|
105
105
|
style.appendChild(doc.createTextNode(css));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
container.appendChild(style);
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
@@ -118,7 +118,7 @@ export default function createDetectElementResize(nonce, hostWindow) {
|
|
|
118
118
|
element.style.position = 'relative';
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
createStyles(doc);
|
|
121
|
+
createStyles(doc, element.getRootNode());
|
|
122
122
|
element.__resizeLast__ = {};
|
|
123
123
|
element.__resizeListeners__ = [];
|
|
124
124
|
(element.__resizeTriggers__ = doc.createElement('div')).className = 'Mui-resizeTriggers';
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { beBYCore } from './coreLocales';
|
|
2
|
+
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
3
|
+
|
|
4
|
+
const getPluralForm = (count, options) => {
|
|
5
|
+
let pluralForm = options.other;
|
|
6
|
+
const lastDigit = count % 10;
|
|
7
|
+
|
|
8
|
+
if (lastDigit > 1 && lastDigit < 5 && (count < 10 || count > 20)) {
|
|
9
|
+
pluralForm = options.twoToFour;
|
|
10
|
+
} else if (lastDigit === 1 && count % 100 !== 11) {
|
|
11
|
+
pluralForm = options.one;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return `${count} ${pluralForm}`;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const beBYGrid = {
|
|
18
|
+
// Root
|
|
19
|
+
noRowsLabel: 'Няма радкоў',
|
|
20
|
+
noResultsOverlayLabel: 'Дадзеныя не знойдзены.',
|
|
21
|
+
// errorOverlayDefaultLabel: 'An error occurred.',
|
|
22
|
+
// Density selector toolbar button text
|
|
23
|
+
toolbarDensity: 'Вышыня радка',
|
|
24
|
+
toolbarDensityLabel: 'Вышыня радка',
|
|
25
|
+
toolbarDensityCompact: 'Кампактны',
|
|
26
|
+
toolbarDensityStandard: 'Стандартны',
|
|
27
|
+
toolbarDensityComfortable: 'Камфортны',
|
|
28
|
+
// Columns selector toolbar button text
|
|
29
|
+
toolbarColumns: 'Слупкі',
|
|
30
|
+
toolbarColumnsLabel: 'Выберыце слупкі',
|
|
31
|
+
// Filters toolbar button text
|
|
32
|
+
toolbarFilters: 'Фільтры',
|
|
33
|
+
toolbarFiltersLabel: 'Паказаць фільтры',
|
|
34
|
+
toolbarFiltersTooltipHide: 'Схаваць фільтры',
|
|
35
|
+
toolbarFiltersTooltipShow: 'Паказаць фільтры',
|
|
36
|
+
toolbarFiltersTooltipActive: count => getPluralForm(count, {
|
|
37
|
+
one: 'актыўны фільтр',
|
|
38
|
+
twoToFour: 'актыўных фільтра',
|
|
39
|
+
other: 'актыўных фільтраў'
|
|
40
|
+
}),
|
|
41
|
+
// Quick filter toolbar field
|
|
42
|
+
toolbarQuickFilterPlaceholder: 'Пошук…',
|
|
43
|
+
toolbarQuickFilterLabel: 'Пошук',
|
|
44
|
+
toolbarQuickFilterDeleteIconLabel: 'Ачысціць',
|
|
45
|
+
// Export selector toolbar button text
|
|
46
|
+
toolbarExport: 'Экспарт',
|
|
47
|
+
toolbarExportLabel: 'Экспарт',
|
|
48
|
+
toolbarExportCSV: 'Спампаваць у фармаце CSV',
|
|
49
|
+
toolbarExportPrint: 'Друк',
|
|
50
|
+
toolbarExportExcel: 'Спампаваць у фармаце Excel',
|
|
51
|
+
// Columns panel text
|
|
52
|
+
columnsPanelTextFieldLabel: 'Знайсці слупок',
|
|
53
|
+
columnsPanelTextFieldPlaceholder: 'Загаловак слупка',
|
|
54
|
+
columnsPanelDragIconLabel: 'Змяніць чарговасць слупкоў',
|
|
55
|
+
columnsPanelShowAllButton: 'Паказаць усе',
|
|
56
|
+
columnsPanelHideAllButton: 'Схаваць усе',
|
|
57
|
+
// Filter panel text
|
|
58
|
+
filterPanelAddFilter: 'Дадаць фільтр',
|
|
59
|
+
filterPanelDeleteIconLabel: 'Выдаліць',
|
|
60
|
+
filterPanelLinkOperator: 'Лагічныя аператары',
|
|
61
|
+
filterPanelOperators: 'Аператары',
|
|
62
|
+
// TODO v6: rename to filterPanelOperator
|
|
63
|
+
filterPanelOperatorAnd: 'І',
|
|
64
|
+
filterPanelOperatorOr: 'Або',
|
|
65
|
+
filterPanelColumns: 'Слупкі',
|
|
66
|
+
filterPanelInputLabel: 'Значэнне',
|
|
67
|
+
filterPanelInputPlaceholder: 'Значэнне фільтра',
|
|
68
|
+
// Filter operators text
|
|
69
|
+
filterOperatorContains: 'змяшчае',
|
|
70
|
+
filterOperatorEquals: 'роўны',
|
|
71
|
+
filterOperatorStartsWith: 'пачынаецца з',
|
|
72
|
+
filterOperatorEndsWith: 'скончваецца на',
|
|
73
|
+
filterOperatorIs: 'роўны',
|
|
74
|
+
filterOperatorNot: 'не роўны',
|
|
75
|
+
filterOperatorAfter: 'больш чым',
|
|
76
|
+
filterOperatorOnOrAfter: 'больш ці роўны',
|
|
77
|
+
filterOperatorBefore: 'меньш чым',
|
|
78
|
+
filterOperatorOnOrBefore: 'меньш ці роўны',
|
|
79
|
+
filterOperatorIsEmpty: 'пусты',
|
|
80
|
+
filterOperatorIsNotEmpty: 'не пусты',
|
|
81
|
+
filterOperatorIsAnyOf: 'усякі з',
|
|
82
|
+
// Filter values text
|
|
83
|
+
filterValueAny: 'усякі',
|
|
84
|
+
filterValueTrue: 'праўда',
|
|
85
|
+
filterValueFalse: 'няпраўда',
|
|
86
|
+
// Column menu text
|
|
87
|
+
columnMenuLabel: 'Меню',
|
|
88
|
+
columnMenuShowColumns: 'Паказаць слупкі',
|
|
89
|
+
columnMenuFilter: 'Фільтр',
|
|
90
|
+
columnMenuHideColumn: 'Схаваць',
|
|
91
|
+
columnMenuUnsort: 'Скасаваць сартыроўку',
|
|
92
|
+
columnMenuSortAsc: 'Сартыраваць па нарастанню',
|
|
93
|
+
columnMenuSortDesc: 'Сартыраваць па спаданню',
|
|
94
|
+
// Column header text
|
|
95
|
+
columnHeaderFiltersTooltipActive: count => getPluralForm(count, {
|
|
96
|
+
one: 'актыўны фільтр',
|
|
97
|
+
twoToFour: 'актыўных фільтра',
|
|
98
|
+
other: 'актыўных фільтраў'
|
|
99
|
+
}),
|
|
100
|
+
columnHeaderFiltersLabel: 'Паказаць фільтры',
|
|
101
|
+
columnHeaderSortIconLabel: 'Сартыраваць',
|
|
102
|
+
// Rows selected footer text
|
|
103
|
+
footerRowSelected: count => getPluralForm(count, {
|
|
104
|
+
one: 'абраны радок',
|
|
105
|
+
twoToFour: 'абраных радка',
|
|
106
|
+
other: 'абраных радкоў'
|
|
107
|
+
}),
|
|
108
|
+
// Total row amount footer text
|
|
109
|
+
footerTotalRows: 'Усяго радкоў:',
|
|
110
|
+
// Total visible row amount footer text
|
|
111
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} з ${totalCount.toLocaleString()}`,
|
|
112
|
+
// Checkbox selection text
|
|
113
|
+
checkboxSelectionHeaderName: 'Выбар сцяжка',
|
|
114
|
+
checkboxSelectionSelectAllRows: 'Абраць усе радкі',
|
|
115
|
+
checkboxSelectionUnselectAllRows: 'Скасаваць выбар усіх радкоў',
|
|
116
|
+
checkboxSelectionSelectRow: 'Абраць радок',
|
|
117
|
+
checkboxSelectionUnselectRow: 'Скасаваць выбар радка',
|
|
118
|
+
// Boolean cell text
|
|
119
|
+
booleanCellTrueLabel: 'праўда',
|
|
120
|
+
booleanCellFalseLabel: 'няпраўда',
|
|
121
|
+
// Actions cell more text
|
|
122
|
+
actionsCellMore: 'больш',
|
|
123
|
+
// Column pinning text
|
|
124
|
+
pinToLeft: 'Замацаваць злева',
|
|
125
|
+
pinToRight: 'Замацаваць справа',
|
|
126
|
+
unpin: 'Адмацаваць',
|
|
127
|
+
// Tree Data
|
|
128
|
+
treeDataGroupingHeaderName: 'Група',
|
|
129
|
+
treeDataExpand: 'паказаць даччыныя элементы',
|
|
130
|
+
treeDataCollapse: 'схаваць даччыныя элементы',
|
|
131
|
+
// Grouping columns
|
|
132
|
+
groupingColumnHeaderName: 'Група',
|
|
133
|
+
groupColumn: name => `Групаваць па ${name}`,
|
|
134
|
+
unGroupColumn: name => `Разгрупаваць па ${name}`,
|
|
135
|
+
// Master/detail
|
|
136
|
+
detailPanelToggle: 'Дэталі',
|
|
137
|
+
expandDetailPanel: 'Разгарнуць',
|
|
138
|
+
collapseDetailPanel: 'Згарнуць',
|
|
139
|
+
// Row reordering text
|
|
140
|
+
rowReorderingHeaderName: 'Змяненне чарговасці радкоў',
|
|
141
|
+
// Aggregation
|
|
142
|
+
aggregationMenuItemHeader: "Аб'яднанне дадзеных",
|
|
143
|
+
aggregationFunctionLabelSum: 'сума',
|
|
144
|
+
aggregationFunctionLabelAvg: 'сярэдняе',
|
|
145
|
+
aggregationFunctionLabelMin: 'мінімум',
|
|
146
|
+
aggregationFunctionLabelMax: 'максімум',
|
|
147
|
+
aggregationFunctionLabelSize: 'памер'
|
|
148
|
+
};
|
|
149
|
+
export const beBY = getGridLocalization(beBYGrid, beBYCore);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// This file contains copies of the core locales for `MuiTablePagination` released
|
|
2
|
+
// after the `@mui/material` package `v5.4.1` (peer dependency of `@mui/x-data-grid`).
|
|
3
|
+
// This allows not to bump the minimal version of `@mui/material` in peerDependencies which results
|
|
4
|
+
// in broader compatibility between the packages.
|
|
5
|
+
// See https://github.com/mui/mui-x/pull/7646#issuecomment-1404605556 for additional context.
|
|
6
|
+
export const beBYCore = {
|
|
7
|
+
components: {
|
|
8
|
+
MuiTablePagination: {
|
|
9
|
+
defaultProps: {
|
|
10
|
+
getItemAriaLabel: type => {
|
|
11
|
+
if (type === 'first') {
|
|
12
|
+
return 'Перайсці на першую старонку';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (type === 'last') {
|
|
16
|
+
return 'Перайсці на апошнюю старонку';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (type === 'next') {
|
|
20
|
+
return 'Перайсці на наступную старонку';
|
|
21
|
+
} // if (type === 'previous') {
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
return 'Перайсці на папярэднюю старонку';
|
|
25
|
+
},
|
|
26
|
+
labelRowsPerPage: 'Радкоў на старонцы:',
|
|
27
|
+
labelDisplayedRows: ({
|
|
28
|
+
from,
|
|
29
|
+
to,
|
|
30
|
+
count
|
|
31
|
+
}) => `${from}–${to} з ${count !== -1 ? count : `больш чым ${to}`}`
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const urPKCore = {
|
|
37
|
+
components: {
|
|
38
|
+
MuiTablePagination: {
|
|
39
|
+
defaultProps: {
|
|
40
|
+
getItemAriaLabel: type => {
|
|
41
|
+
if (type === 'first') {
|
|
42
|
+
return 'پہلے صفحے پر جائیں';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (type === 'last') {
|
|
46
|
+
return 'آخری صفحے پر جائیں';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (type === 'next') {
|
|
50
|
+
return 'اگلے صفحے پر جائیں';
|
|
51
|
+
} // if (type === 'previous') {
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
return 'پچھلے صفحے پر جائیں';
|
|
55
|
+
},
|
|
56
|
+
labelRowsPerPage: 'ایک صفحے پر قطاریں:',
|
|
57
|
+
labelDisplayedRows: ({
|
|
58
|
+
from,
|
|
59
|
+
to,
|
|
60
|
+
count
|
|
61
|
+
}) => `${count !== -1 ? `${count} میں سے` : `${to} سے ذیادہ میں سے`} ${from} سے ${to} قطاریں`
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
package/modern/locales/esES.js
CHANGED
|
@@ -99,25 +99,25 @@ const esESGrid = {
|
|
|
99
99
|
pinToRight: 'Anclar a la derecha',
|
|
100
100
|
unpin: 'Desanclar',
|
|
101
101
|
// Tree Data
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
treeDataGroupingHeaderName: 'Grupo',
|
|
103
|
+
treeDataExpand: 'mostrar hijos',
|
|
104
|
+
treeDataCollapse: 'ocultar hijos',
|
|
105
105
|
// Grouping columns
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
groupingColumnHeaderName: 'Grupo',
|
|
107
|
+
groupColumn: name => `Agrupar por ${name}`,
|
|
108
|
+
unGroupColumn: name => `No agrupar por ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
-
|
|
110
|
+
detailPanelToggle: 'Alternar detalle',
|
|
111
111
|
expandDetailPanel: 'Expandir',
|
|
112
|
-
collapseDetailPanel: '
|
|
112
|
+
collapseDetailPanel: 'Contraer',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
|
|
114
|
+
rowReorderingHeaderName: 'Reordenar filas',
|
|
115
115
|
// Aggregation
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
aggregationMenuItemHeader: 'Agregación',
|
|
117
|
+
aggregationFunctionLabelSum: 'sum',
|
|
118
|
+
aggregationFunctionLabelAvg: 'avg',
|
|
119
119
|
aggregationFunctionLabelMin: 'min',
|
|
120
|
-
aggregationFunctionLabelMax: 'max'
|
|
121
|
-
|
|
120
|
+
aggregationFunctionLabelMax: 'max',
|
|
121
|
+
aggregationFunctionLabelSize: 'tamaño'
|
|
122
122
|
};
|
|
123
123
|
export const esES = getGridLocalization(esESGrid, esESCore);
|
package/modern/locales/index.js
CHANGED
package/modern/locales/jaJP.js
CHANGED
|
@@ -10,7 +10,7 @@ const jaJPGrid = {
|
|
|
10
10
|
toolbarDensityLabel: '行間隔',
|
|
11
11
|
toolbarDensityCompact: 'コンパクト',
|
|
12
12
|
toolbarDensityStandard: '標準',
|
|
13
|
-
toolbarDensityComfortable: '
|
|
13
|
+
toolbarDensityComfortable: '広め',
|
|
14
14
|
// Columns selector toolbar button text
|
|
15
15
|
toolbarColumns: '列一覧',
|
|
16
16
|
toolbarColumnsLabel: '列選択',
|
|
@@ -39,8 +39,8 @@ const jaJPGrid = {
|
|
|
39
39
|
// Filter panel text
|
|
40
40
|
filterPanelAddFilter: 'フィルター追加',
|
|
41
41
|
filterPanelDeleteIconLabel: '削除',
|
|
42
|
-
|
|
43
|
-
filterPanelOperators: '
|
|
42
|
+
filterPanelLinkOperator: '論理演算子',
|
|
43
|
+
filterPanelOperators: '演算子',
|
|
44
44
|
// TODO v6: rename to filterPanelOperator
|
|
45
45
|
filterPanelOperatorAnd: 'And',
|
|
46
46
|
filterPanelOperatorOr: 'Or',
|
|
@@ -62,9 +62,9 @@ const jaJPGrid = {
|
|
|
62
62
|
filterOperatorIsNotEmpty: '...空でない',
|
|
63
63
|
filterOperatorIsAnyOf: '...のいずれか',
|
|
64
64
|
// Filter values text
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
filterValueAny: 'いずれか',
|
|
66
|
+
filterValueTrue: '真',
|
|
67
|
+
filterValueFalse: '偽',
|
|
68
68
|
// Column menu text
|
|
69
69
|
columnMenuLabel: 'メニュー',
|
|
70
70
|
columnMenuShowColumns: '列表示',
|
|
@@ -93,7 +93,7 @@ const jaJPGrid = {
|
|
|
93
93
|
booleanCellTrueLabel: '真',
|
|
94
94
|
booleanCellFalseLabel: '偽',
|
|
95
95
|
// Actions cell more text
|
|
96
|
-
|
|
96
|
+
actionsCellMore: 'もっと見る',
|
|
97
97
|
// Column pinning text
|
|
98
98
|
pinToLeft: '左側に固定',
|
|
99
99
|
pinToRight: '右側に固定',
|
|
@@ -107,17 +107,17 @@ const jaJPGrid = {
|
|
|
107
107
|
groupColumn: name => `${name}でグループ化`,
|
|
108
108
|
unGroupColumn: name => `${name}のグループを解除`,
|
|
109
109
|
// Master/detail
|
|
110
|
-
|
|
110
|
+
detailPanelToggle: '詳細パネルの切り替え',
|
|
111
111
|
expandDetailPanel: '展開',
|
|
112
112
|
collapseDetailPanel: '折りたたみ',
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: '行並び替え'
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
rowReorderingHeaderName: '行並び替え',
|
|
115
|
+
// Aggregation
|
|
116
|
+
aggregationMenuItemHeader: '合計',
|
|
117
|
+
aggregationFunctionLabelSum: '和',
|
|
118
|
+
aggregationFunctionLabelAvg: '平均',
|
|
119
|
+
aggregationFunctionLabelMin: '最小値',
|
|
120
|
+
aggregationFunctionLabelMax: '最大値',
|
|
121
|
+
aggregationFunctionLabelSize: 'サイズ'
|
|
122
122
|
};
|
|
123
123
|
export const jaJP = getGridLocalization(jaJPGrid, jaJPCore);
|
package/modern/locales/skSK.js
CHANGED
|
@@ -146,13 +146,13 @@ const skSKGrid = {
|
|
|
146
146
|
expandDetailPanel: 'Rozbaliť',
|
|
147
147
|
collapseDetailPanel: 'Zbaliť',
|
|
148
148
|
// Row reordering text
|
|
149
|
-
rowReorderingHeaderName: 'Preusporiadávanie riadkov'
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
rowReorderingHeaderName: 'Preusporiadávanie riadkov',
|
|
150
|
+
// Aggregation
|
|
151
|
+
aggregationMenuItemHeader: 'Agregácia',
|
|
152
|
+
aggregationFunctionLabelSum: 'suma',
|
|
153
|
+
aggregationFunctionLabelAvg: 'priemer',
|
|
154
|
+
aggregationFunctionLabelMin: 'min',
|
|
155
|
+
aggregationFunctionLabelMax: 'max',
|
|
156
|
+
aggregationFunctionLabelSize: 'počet'
|
|
157
157
|
};
|
|
158
158
|
export const skSK = getGridLocalization(skSKGrid, skSKCore);
|
package/modern/locales/viVN.js
CHANGED
|
@@ -21,15 +21,15 @@ const viVNGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'Hiện',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count > 1 ? `${count} bộ lọc hoạt động` : `${count} bộ lọc hoạt động`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'Tìm kiếm…',
|
|
25
|
+
toolbarQuickFilterLabel: 'Tìm kiếm',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'Xóa tìm kiếm',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'Xuất',
|
|
29
29
|
toolbarExportLabel: 'Xuất',
|
|
30
30
|
toolbarExportCSV: 'Xuất CSV',
|
|
31
31
|
toolbarExportPrint: 'In',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'Xuất Excel',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'Tìm kiếm',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'Tiêu đề cột',
|
|
@@ -39,7 +39,7 @@ const viVNGrid = {
|
|
|
39
39
|
// Filter panel text
|
|
40
40
|
filterPanelAddFilter: 'Thêm bộ lọc',
|
|
41
41
|
filterPanelDeleteIconLabel: 'Xóa',
|
|
42
|
-
|
|
42
|
+
filterPanelLinkOperator: 'Toán tử logic',
|
|
43
43
|
filterPanelOperators: 'Toán tử',
|
|
44
44
|
// TODO v6: rename to filterPanelOperator
|
|
45
45
|
filterPanelOperatorAnd: 'Và',
|
|
@@ -85,10 +85,10 @@ const viVNGrid = {
|
|
|
85
85
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
86
86
|
// Checkbox selection text
|
|
87
87
|
checkboxSelectionHeaderName: 'Tích vào ô trống',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
checkboxSelectionSelectAllRows: 'Chọn tất cả hàng',
|
|
89
|
+
checkboxSelectionUnselectAllRows: 'Bỏ chọn tất cả hàng',
|
|
90
|
+
checkboxSelectionSelectRow: 'Chọn hàng',
|
|
91
|
+
checkboxSelectionUnselectRow: 'Bỏ chọn hàng',
|
|
92
92
|
// Boolean cell text
|
|
93
93
|
booleanCellTrueLabel: 'Có',
|
|
94
94
|
booleanCellFalseLabel: 'Không',
|
|
@@ -101,17 +101,17 @@ const viVNGrid = {
|
|
|
101
101
|
// Tree Data
|
|
102
102
|
treeDataGroupingHeaderName: 'Nhóm',
|
|
103
103
|
treeDataExpand: 'mở rộng',
|
|
104
|
-
treeDataCollapse: 'ẩn đi'
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
treeDataCollapse: 'ẩn đi',
|
|
105
|
+
// Grouping columns
|
|
106
|
+
groupingColumnHeaderName: 'Nhóm',
|
|
107
|
+
groupColumn: name => `Nhóm theo ${name}`,
|
|
108
|
+
unGroupColumn: name => `Hủy nhóm theo ${name}`,
|
|
108
109
|
// Master/detail
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
detailPanelToggle: 'Ẩn/hiện chi tiết',
|
|
111
|
+
expandDetailPanel: 'Mở rộng',
|
|
112
|
+
collapseDetailPanel: 'Thu nhỏ',
|
|
112
113
|
// Row reordering text
|
|
113
|
-
|
|
114
|
-
// Aggregation
|
|
114
|
+
rowReorderingHeaderName: 'Sắp xếp hàng' // Aggregation
|
|
115
115
|
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
116
|
// aggregationFunctionLabelSum: 'sum',
|
|
117
117
|
// aggregationFunctionLabelAvg: 'avg',
|
|
@@ -203,9 +203,11 @@ function GridCell(props) {
|
|
|
203
203
|
|
|
204
204
|
const renderChildren = () => {
|
|
205
205
|
if (children == null) {
|
|
206
|
+
const valueString = valueToRender == null ? void 0 : valueToRender.toString();
|
|
206
207
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
208
|
+
title: valueString,
|
|
207
209
|
className: classes.content,
|
|
208
|
-
children:
|
|
210
|
+
children: valueString
|
|
209
211
|
});
|
|
210
212
|
}
|
|
211
213
|
|
|
@@ -137,11 +137,19 @@ function GridColumnsPanel(props) {
|
|
|
137
137
|
|
|
138
138
|
const toggleAllColumns = React.useCallback(isVisible => {
|
|
139
139
|
if (apiRef.current.unstable_caches.columns.isUsingColumnVisibilityModel) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
const currentModel = (0, _gridColumnsSelector.gridColumnVisibilityModelSelector)(apiRef);
|
|
141
|
+
const newModel = (0, _extends2.default)({}, currentModel);
|
|
142
|
+
columns.forEach(col => {
|
|
143
|
+
if (col.hideable) {
|
|
144
|
+
if (isVisible) {
|
|
145
|
+
// delete the key from the model instead of setting it to `true`
|
|
146
|
+
delete newModel[col.field];
|
|
147
|
+
} else {
|
|
148
|
+
newModel[col.field] = false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
return apiRef.current.setColumnVisibilityModel(newModel);
|
|
145
153
|
} // TODO v6: Remove
|
|
146
154
|
|
|
147
155
|
|
|
@@ -253,10 +253,14 @@ const useGridPrintExport = (apiRef, props) => {
|
|
|
253
253
|
} else {
|
|
254
254
|
printWindow.onload = () => {
|
|
255
255
|
handlePrintWindowLoad(printWindow, options);
|
|
256
|
+
const mediaQueryList = printWindow.contentWindow.matchMedia('print');
|
|
257
|
+
mediaQueryList.addEventListener('change', mql => {
|
|
258
|
+
const isAfterPrint = mql.matches === false;
|
|
256
259
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
+
if (isAfterPrint) {
|
|
261
|
+
handlePrintWindowAfterPrint(printWindow);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
260
264
|
};
|
|
261
265
|
|
|
262
266
|
doc.current.body.appendChild(printWindow);
|
package/node/index.js
CHANGED
|
@@ -93,11 +93,11 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
93
93
|
var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
|
|
94
94
|
var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
|
95
95
|
|
|
96
|
-
var createStyles = function createStyles(doc) {
|
|
97
|
-
if (!
|
|
96
|
+
var createStyles = function createStyles(doc, root) {
|
|
97
|
+
if (!root.getElementById('muiDetectElementResize')) {
|
|
98
98
|
//opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
|
|
99
99
|
var css = (animationKeyframes ? animationKeyframes : '') + '.Mui-resizeTriggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.Mui-resizeTriggers, .Mui-resizeTriggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .Mui-resizeTriggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
100
|
-
|
|
100
|
+
container = root.constructor.name === 'ShadowRoot' ? root : doc.head || doc.getElementsByTagName('head')[0],
|
|
101
101
|
style = doc.createElement('style');
|
|
102
102
|
style.id = 'muiDetectElementResize';
|
|
103
103
|
style.type = 'text/css';
|
|
@@ -112,7 +112,7 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
112
112
|
style.appendChild(doc.createTextNode(css));
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
container.appendChild(style);
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
|
|
@@ -125,7 +125,7 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
125
125
|
element.style.position = 'relative';
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
createStyles(doc);
|
|
128
|
+
createStyles(doc, element.getRootNode());
|
|
129
129
|
element.__resizeLast__ = {};
|
|
130
130
|
element.__resizeListeners__ = [];
|
|
131
131
|
(element.__resizeTriggers__ = doc.createElement('div')).className = 'Mui-resizeTriggers';
|