@mui/x-data-grid 5.17.3 → 5.17.4
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 +35 -1
- package/hooks/features/focus/useGridFocus.js +14 -15
- package/index.js +1 -1
- package/legacy/hooks/features/focus/useGridFocus.js +14 -15
- package/legacy/index.js +1 -1
- package/legacy/locales/faIR.js +14 -14
- package/legacy/locales/fiFI.js +32 -28
- package/legacy/locales/plPL.js +7 -7
- package/locales/faIR.js +14 -14
- package/locales/fiFI.js +28 -28
- package/locales/plPL.js +7 -7
- package/modern/hooks/features/focus/useGridFocus.js +14 -15
- package/modern/index.js +1 -1
- package/modern/locales/faIR.js +14 -14
- package/modern/locales/fiFI.js +28 -28
- package/modern/locales/plPL.js +7 -7
- package/node/hooks/features/focus/useGridFocus.js +14 -15
- package/node/index.js +1 -1
- package/node/locales/faIR.js +14 -14
- package/node/locales/fiFI.js +28 -28
- package/node/locales/plPL.js +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## v5.17.4
|
|
7
|
+
|
|
8
|
+
_Sep 22, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Finnish (fi-FI) locale to the pickers (#6230) @PetroSilenius
|
|
13
|
+
- 🌍 Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v5.17.4` / `@mui/x-data-grid-pro@v5.17.4` / `@mui/x-data-grid-premium@v5.17.4`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Do not publish `cellFocusOut` event if the row was removed (#6251) @cherniavskii
|
|
21
|
+
- [DataGrid] Improve Polish (pl-PL) locale on the data grid (#6245) @grzegorz-bach
|
|
22
|
+
|
|
23
|
+
### `@mui/x-date-pickers@v5.0.3` / `@mui/x-date-pickers-pro@v5.0.3`
|
|
24
|
+
|
|
25
|
+
#### Changes
|
|
26
|
+
|
|
27
|
+
- [pickers] Add Finnish (fi-FI) locale to pickers (#6219) (#6230) @PetroSilenius
|
|
28
|
+
- [pickers] Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
29
|
+
- [pickers] Fix usage with Typescript 4.8 (#6229) @flaviendelangle
|
|
30
|
+
- [YearPicker] Scroll to the current year even with `autoFocus=false` (#6224) @alexfauquette
|
|
31
|
+
|
|
32
|
+
### Docs
|
|
33
|
+
|
|
34
|
+
- [docs] Fix 301 link (#6239) @oliviertassinari
|
|
35
|
+
|
|
36
|
+
### Core
|
|
37
|
+
|
|
38
|
+
- [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
|
|
39
|
+
|
|
6
40
|
## 5.17.3
|
|
7
41
|
|
|
8
42
|
_Sep 16, 2022_
|
|
@@ -101,7 +135,7 @@ We'd like to offer a big thanks to the 3 contributors who made this release poss
|
|
|
101
135
|
|
|
102
136
|
_Sep 2, 2022_
|
|
103
137
|
|
|
104
|
-
🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and
|
|
138
|
+
🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
|
|
105
139
|
|
|
106
140
|
If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
|
|
107
141
|
|
|
@@ -28,6 +28,14 @@ export const focusStateInitializer = state => _extends({}, state, {
|
|
|
28
28
|
export const useGridFocus = (apiRef, props) => {
|
|
29
29
|
const logger = useGridLogger(apiRef, 'useGridFocus');
|
|
30
30
|
const lastClickedCell = React.useRef(null);
|
|
31
|
+
const publishCellFocusOut = React.useCallback((cell, event) => {
|
|
32
|
+
if (cell) {
|
|
33
|
+
// The row might have been deleted
|
|
34
|
+
if (apiRef.current.getRow(cell.id)) {
|
|
35
|
+
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, [apiRef]);
|
|
31
39
|
const setCellFocus = React.useCallback((id, field) => {
|
|
32
40
|
const focusedCell = gridFocusCellSelector(apiRef);
|
|
33
41
|
|
|
@@ -63,18 +71,14 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
63
71
|
if (focusedCell) {
|
|
64
72
|
// There's a focused cell but another cell was clicked
|
|
65
73
|
// Publishes an event to notify that the focus was lost
|
|
66
|
-
|
|
74
|
+
publishCellFocusOut(focusedCell, {});
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
apiRef.current.publishEvent('cellFocusIn', apiRef.current.getCellParams(id, field));
|
|
70
|
-
}, [apiRef, logger]);
|
|
78
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
71
79
|
const setColumnHeaderFocus = React.useCallback((field, event = {}) => {
|
|
72
80
|
const cell = gridFocusCellSelector(apiRef);
|
|
73
|
-
|
|
74
|
-
if (cell) {
|
|
75
|
-
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
76
|
-
}
|
|
77
|
-
|
|
81
|
+
publishCellFocusOut(cell, event);
|
|
78
82
|
apiRef.current.setState(state => {
|
|
79
83
|
logger.debug(`Focusing on column header with colIndex=${field}`);
|
|
80
84
|
return _extends({}, state, {
|
|
@@ -93,7 +97,7 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
93
97
|
});
|
|
94
98
|
});
|
|
95
99
|
apiRef.current.forceUpdate();
|
|
96
|
-
}, [apiRef, logger]);
|
|
100
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
97
101
|
const moveFocusToRelativeCell = React.useCallback((id, field, direction) => {
|
|
98
102
|
let columnIndexToFocus = apiRef.current.getColumnIndex(field);
|
|
99
103
|
let rowIndexToFocus = apiRef.current.getRowIndexRelativeToVisibleRows(id);
|
|
@@ -202,11 +206,6 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
202
206
|
|
|
203
207
|
if (cellElement != null && cellElement.contains(event.target)) {
|
|
204
208
|
return;
|
|
205
|
-
} // The row might have been deleted during the click
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (!apiRef.current.getRow(focusedCell.id)) {
|
|
209
|
-
return;
|
|
210
209
|
}
|
|
211
210
|
|
|
212
211
|
if (cellParams) {
|
|
@@ -221,9 +220,9 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
221
220
|
apiRef.current.forceUpdate(); // There's a focused cell but another element (not a cell) was clicked
|
|
222
221
|
// Publishes an event to notify that the focus was lost
|
|
223
222
|
|
|
224
|
-
|
|
223
|
+
publishCellFocusOut(focusedCell, event);
|
|
225
224
|
}
|
|
226
|
-
}, [apiRef]);
|
|
225
|
+
}, [apiRef, publishCellFocusOut]);
|
|
227
226
|
const handleCellModeChange = React.useCallback(params => {
|
|
228
227
|
if (params.cellMode === 'view') {
|
|
229
228
|
return;
|
package/index.js
CHANGED
|
@@ -30,6 +30,14 @@ export var focusStateInitializer = function focusStateInitializer(state) {
|
|
|
30
30
|
export var useGridFocus = function useGridFocus(apiRef, props) {
|
|
31
31
|
var logger = useGridLogger(apiRef, 'useGridFocus');
|
|
32
32
|
var lastClickedCell = React.useRef(null);
|
|
33
|
+
var publishCellFocusOut = React.useCallback(function (cell, event) {
|
|
34
|
+
if (cell) {
|
|
35
|
+
// The row might have been deleted
|
|
36
|
+
if (apiRef.current.getRow(cell.id)) {
|
|
37
|
+
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, [apiRef]);
|
|
33
41
|
var setCellFocus = React.useCallback(function (id, field) {
|
|
34
42
|
var focusedCell = gridFocusCellSelector(apiRef);
|
|
35
43
|
|
|
@@ -65,19 +73,15 @@ export var useGridFocus = function useGridFocus(apiRef, props) {
|
|
|
65
73
|
if (focusedCell) {
|
|
66
74
|
// There's a focused cell but another cell was clicked
|
|
67
75
|
// Publishes an event to notify that the focus was lost
|
|
68
|
-
|
|
76
|
+
publishCellFocusOut(focusedCell, {});
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
apiRef.current.publishEvent('cellFocusIn', apiRef.current.getCellParams(id, field));
|
|
72
|
-
}, [apiRef, logger]);
|
|
80
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
73
81
|
var setColumnHeaderFocus = React.useCallback(function (field) {
|
|
74
82
|
var event = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
75
83
|
var cell = gridFocusCellSelector(apiRef);
|
|
76
|
-
|
|
77
|
-
if (cell) {
|
|
78
|
-
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
79
|
-
}
|
|
80
|
-
|
|
84
|
+
publishCellFocusOut(cell, event);
|
|
81
85
|
apiRef.current.setState(function (state) {
|
|
82
86
|
logger.debug("Focusing on column header with colIndex=".concat(field));
|
|
83
87
|
return _extends({}, state, {
|
|
@@ -96,7 +100,7 @@ export var useGridFocus = function useGridFocus(apiRef, props) {
|
|
|
96
100
|
});
|
|
97
101
|
});
|
|
98
102
|
apiRef.current.forceUpdate();
|
|
99
|
-
}, [apiRef, logger]);
|
|
103
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
100
104
|
var moveFocusToRelativeCell = React.useCallback(function (id, field, direction) {
|
|
101
105
|
var columnIndexToFocus = apiRef.current.getColumnIndex(field);
|
|
102
106
|
var rowIndexToFocus = apiRef.current.getRowIndexRelativeToVisibleRows(id);
|
|
@@ -206,11 +210,6 @@ export var useGridFocus = function useGridFocus(apiRef, props) {
|
|
|
206
210
|
|
|
207
211
|
if (cellElement != null && cellElement.contains(event.target)) {
|
|
208
212
|
return;
|
|
209
|
-
} // The row might have been deleted during the click
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if (!apiRef.current.getRow(focusedCell.id)) {
|
|
213
|
-
return;
|
|
214
213
|
}
|
|
215
214
|
|
|
216
215
|
if (cellParams) {
|
|
@@ -227,9 +226,9 @@ export var useGridFocus = function useGridFocus(apiRef, props) {
|
|
|
227
226
|
apiRef.current.forceUpdate(); // There's a focused cell but another element (not a cell) was clicked
|
|
228
227
|
// Publishes an event to notify that the focus was lost
|
|
229
228
|
|
|
230
|
-
|
|
229
|
+
publishCellFocusOut(focusedCell, event);
|
|
231
230
|
}
|
|
232
|
-
}, [apiRef]);
|
|
231
|
+
}, [apiRef, publishCellFocusOut]);
|
|
233
232
|
var handleCellModeChange = React.useCallback(function (params) {
|
|
234
233
|
if (params.cellMode === 'view') {
|
|
235
234
|
return;
|
package/legacy/index.js
CHANGED
package/legacy/locales/faIR.js
CHANGED
|
@@ -23,15 +23,15 @@ var faIRGrid = {
|
|
|
23
23
|
return count !== 1 ? "".concat(count, " \u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0641\u0639\u0627\u0644") : "".concat(count, " \u0641\u06CC\u0644\u062A\u0631 \u0641\u0639\u0627\u0644");
|
|
24
24
|
},
|
|
25
25
|
// Quick filter toolbar field
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
toolbarQuickFilterPlaceholder: 'جستجو...',
|
|
27
|
+
toolbarQuickFilterLabel: 'جستجو',
|
|
28
|
+
toolbarQuickFilterDeleteIconLabel: 'حذف',
|
|
29
29
|
// Export selector toolbar button text
|
|
30
30
|
toolbarExport: 'خروجی',
|
|
31
31
|
toolbarExportLabel: 'خروجی',
|
|
32
32
|
toolbarExportCSV: 'دانلود به صورت CSV',
|
|
33
33
|
toolbarExportPrint: 'چاپ',
|
|
34
|
-
|
|
34
|
+
toolbarExportExcel: 'دانلود به صورت اکسل',
|
|
35
35
|
// Columns panel text
|
|
36
36
|
columnsPanelTextFieldLabel: 'پیداکردن ستون',
|
|
37
37
|
columnsPanelTextFieldPlaceholder: 'عنوان ستون',
|
|
@@ -119,17 +119,17 @@ var faIRGrid = {
|
|
|
119
119
|
return "\u0644\u063A\u0648 \u06AF\u0631\u0648\u0647\u200C\u0628\u0646\u062F\u06CC \u0628\u0631\u0627\u0633\u0627\u0633 ".concat(name);
|
|
120
120
|
},
|
|
121
121
|
// Master/detail
|
|
122
|
-
|
|
122
|
+
detailPanelToggle: 'پنل جزئیات',
|
|
123
123
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
124
|
-
collapseDetailPanel: 'بستن پنل جزئیات'
|
|
125
|
-
//
|
|
124
|
+
collapseDetailPanel: 'بستن پنل جزئیات',
|
|
125
|
+
// Row reordering text
|
|
126
|
+
rowReorderingHeaderName: 'ترتیب مجدد سطر',
|
|
126
127
|
// Aggregation
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
aggregationMenuItemHeader: 'تجمیع',
|
|
129
|
+
aggregationFunctionLabelSum: 'جمع',
|
|
130
|
+
aggregationFunctionLabelAvg: 'میانگین',
|
|
131
|
+
aggregationFunctionLabelMin: 'حداقل',
|
|
132
|
+
aggregationFunctionLabelMax: 'حداکثر',
|
|
133
|
+
aggregationFunctionLabelSize: 'اندازه'
|
|
134
134
|
};
|
|
135
135
|
export var faIR = getGridLocalization(faIRGrid, faIRCore);
|
package/legacy/locales/fiFI.js
CHANGED
|
@@ -6,7 +6,7 @@ var fiFIGrid = {
|
|
|
6
6
|
noResultsOverlayLabel: 'Ei tuloksia.',
|
|
7
7
|
errorOverlayDefaultLabel: 'Tapahtui virhe.',
|
|
8
8
|
// Density selector toolbar button text
|
|
9
|
-
toolbarDensity: '
|
|
9
|
+
toolbarDensity: 'Tiiveys',
|
|
10
10
|
toolbarDensityLabel: 'Tiiveys',
|
|
11
11
|
toolbarDensityCompact: 'Kompakti',
|
|
12
12
|
toolbarDensityStandard: 'Vakio',
|
|
@@ -23,15 +23,15 @@ var fiFIGrid = {
|
|
|
23
23
|
return count !== 1 ? "".concat(count, " aktiivista suodatinta") : "".concat(count, " aktiivinen suodatin");
|
|
24
24
|
},
|
|
25
25
|
// Quick filter toolbar field
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
toolbarQuickFilterPlaceholder: 'Hae…',
|
|
27
|
+
toolbarQuickFilterLabel: 'Hae',
|
|
28
|
+
toolbarQuickFilterDeleteIconLabel: 'Tyhjennä',
|
|
29
29
|
// Export selector toolbar button text
|
|
30
|
-
toolbarExport: '
|
|
31
|
-
toolbarExportLabel: '
|
|
30
|
+
toolbarExport: 'Vie',
|
|
31
|
+
toolbarExportLabel: 'Vie',
|
|
32
32
|
toolbarExportCSV: 'Lataa CSV-muodossa',
|
|
33
33
|
toolbarExportPrint: 'Tulosta',
|
|
34
|
-
|
|
34
|
+
toolbarExportExcel: 'Lataa Excel-muodossa',
|
|
35
35
|
// Columns panel text
|
|
36
36
|
columnsPanelTextFieldLabel: 'Etsi sarake',
|
|
37
37
|
columnsPanelTextFieldPlaceholder: 'Sarakkeen otsikko',
|
|
@@ -41,7 +41,7 @@ var fiFIGrid = {
|
|
|
41
41
|
// Filter panel text
|
|
42
42
|
filterPanelAddFilter: 'Lisää suodatin',
|
|
43
43
|
filterPanelDeleteIconLabel: 'Poista',
|
|
44
|
-
|
|
44
|
+
filterPanelLinkOperator: 'Logiikkaoperaattori',
|
|
45
45
|
filterPanelOperators: 'Operaattorit',
|
|
46
46
|
// TODO v6: rename to filterPanelOperator
|
|
47
47
|
filterPanelOperatorAnd: 'Ja',
|
|
@@ -62,7 +62,7 @@ var fiFIGrid = {
|
|
|
62
62
|
filterOperatorOnOrBefore: 'on sama tai ennen',
|
|
63
63
|
filterOperatorIsEmpty: 'on tyhjä',
|
|
64
64
|
filterOperatorIsNotEmpty: 'ei ole tyhjä',
|
|
65
|
-
|
|
65
|
+
filterOperatorIsAnyOf: 'mikä tahansa seuraavista',
|
|
66
66
|
// Filter values text
|
|
67
67
|
filterValueAny: 'mikä tahansa',
|
|
68
68
|
filterValueTrue: 'tosi',
|
|
@@ -93,10 +93,10 @@ var fiFIGrid = {
|
|
|
93
93
|
},
|
|
94
94
|
// Checkbox selection text
|
|
95
95
|
checkboxSelectionHeaderName: 'Valintaruutu',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
checkboxSelectionSelectAllRows: 'Valitse kaikki rivit',
|
|
97
|
+
checkboxSelectionUnselectAllRows: 'Poista kaikkien rivien valinta',
|
|
98
|
+
checkboxSelectionSelectRow: 'Valitse rivi',
|
|
99
|
+
checkboxSelectionUnselectRow: 'Poista rivin valinta',
|
|
100
100
|
// Boolean cell text
|
|
101
101
|
booleanCellTrueLabel: 'tosi',
|
|
102
102
|
booleanCellFalseLabel: 'epätosi',
|
|
@@ -109,23 +109,27 @@ var fiFIGrid = {
|
|
|
109
109
|
// Tree Data
|
|
110
110
|
treeDataGroupingHeaderName: 'Ryhmä',
|
|
111
111
|
treeDataExpand: 'Laajenna',
|
|
112
|
-
treeDataCollapse: 'Supista'
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
treeDataCollapse: 'Supista',
|
|
113
|
+
// Grouping columns
|
|
114
|
+
groupingColumnHeaderName: 'Ryhmä',
|
|
115
|
+
groupColumn: function groupColumn(name) {
|
|
116
|
+
return "Ryhmittelyperuste ".concat(name);
|
|
117
|
+
},
|
|
118
|
+
unGroupColumn: function unGroupColumn(name) {
|
|
119
|
+
return "Poista ryhmittelyperuste ".concat(name);
|
|
120
|
+
},
|
|
116
121
|
// Master/detail
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
detailPanelToggle: 'Yksityiskohtapaneelin vaihto',
|
|
123
|
+
expandDetailPanel: 'Laajenna',
|
|
124
|
+
collapseDetailPanel: 'Tiivistä',
|
|
120
125
|
// Row reordering text
|
|
121
|
-
|
|
126
|
+
rowReorderingHeaderName: 'Rivien uudelleenjärjestely',
|
|
122
127
|
// Aggregation
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
aggregationMenuItemHeader: 'Koostaminen',
|
|
129
|
+
aggregationFunctionLabelSum: 'summa',
|
|
130
|
+
aggregationFunctionLabelAvg: 'ka.',
|
|
131
|
+
aggregationFunctionLabelMin: 'min.',
|
|
132
|
+
aggregationFunctionLabelMax: 'maks.',
|
|
133
|
+
aggregationFunctionLabelSize: 'koko'
|
|
130
134
|
};
|
|
131
135
|
export var fiFI = getGridLocalization(fiFIGrid, fiFICore);
|
package/legacy/locales/plPL.js
CHANGED
|
@@ -23,15 +23,15 @@ var plPLGrid = {
|
|
|
23
23
|
return "Liczba aktywnych filtr\xF3w: ".concat(count);
|
|
24
24
|
},
|
|
25
25
|
// Quick filter toolbar field
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
toolbarQuickFilterPlaceholder: 'Wyszukaj…',
|
|
27
|
+
toolbarQuickFilterLabel: 'Szukaj',
|
|
28
|
+
toolbarQuickFilterDeleteIconLabel: 'Wyczyść',
|
|
29
29
|
// Export selector toolbar button text
|
|
30
30
|
toolbarExport: 'Eksportuj',
|
|
31
31
|
toolbarExportLabel: 'Eksportuj',
|
|
32
32
|
toolbarExportCSV: 'Pobierz jako plik CSV',
|
|
33
33
|
toolbarExportPrint: 'Drukuj',
|
|
34
|
-
|
|
34
|
+
toolbarExportExcel: 'Pobierz jako plik Excel',
|
|
35
35
|
// Columns panel text
|
|
36
36
|
columnsPanelTextFieldLabel: 'Znajdź kolumnę',
|
|
37
37
|
columnsPanelTextFieldPlaceholder: 'Tytuł kolumny',
|
|
@@ -121,9 +121,9 @@ var plPLGrid = {
|
|
|
121
121
|
// Master/detail
|
|
122
122
|
// detailPanelToggle: 'Detail panel toggle',
|
|
123
123
|
expandDetailPanel: 'Rozwiń',
|
|
124
|
-
collapseDetailPanel: 'Zwiń'
|
|
125
|
-
//
|
|
126
|
-
// Aggregation
|
|
124
|
+
collapseDetailPanel: 'Zwiń',
|
|
125
|
+
// Row reordering text
|
|
126
|
+
rowReorderingHeaderName: 'Porządkowanie wierszy' // Aggregation
|
|
127
127
|
// aggregationMenuItemHeader: 'Aggregation',
|
|
128
128
|
// aggregationFunctionLabelSum: 'sum',
|
|
129
129
|
// aggregationFunctionLabelAvg: 'avg',
|
package/locales/faIR.js
CHANGED
|
@@ -21,15 +21,15 @@ const faIRGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'نمایش فیلترها',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'جستجو...',
|
|
25
|
+
toolbarQuickFilterLabel: 'جستجو',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'حذف',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'خروجی',
|
|
29
29
|
toolbarExportLabel: 'خروجی',
|
|
30
30
|
toolbarExportCSV: 'دانلود به صورت CSV',
|
|
31
31
|
toolbarExportPrint: 'چاپ',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'دانلود به صورت اکسل',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'پیداکردن ستون',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'عنوان ستون',
|
|
@@ -107,17 +107,17 @@ const faIRGrid = {
|
|
|
107
107
|
groupColumn: name => `گروهبندی براساس ${name}`,
|
|
108
108
|
unGroupColumn: name => `لغو گروهبندی براساس ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
-
|
|
110
|
+
detailPanelToggle: 'پنل جزئیات',
|
|
111
111
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
112
|
-
collapseDetailPanel: 'بستن پنل جزئیات'
|
|
113
|
-
//
|
|
112
|
+
collapseDetailPanel: 'بستن پنل جزئیات',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'ترتیب مجدد سطر',
|
|
114
115
|
// Aggregation
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
aggregationMenuItemHeader: 'تجمیع',
|
|
117
|
+
aggregationFunctionLabelSum: 'جمع',
|
|
118
|
+
aggregationFunctionLabelAvg: 'میانگین',
|
|
119
|
+
aggregationFunctionLabelMin: 'حداقل',
|
|
120
|
+
aggregationFunctionLabelMax: 'حداکثر',
|
|
121
|
+
aggregationFunctionLabelSize: 'اندازه'
|
|
122
122
|
};
|
|
123
123
|
export const faIR = getGridLocalization(faIRGrid, faIRCore);
|
package/locales/fiFI.js
CHANGED
|
@@ -6,7 +6,7 @@ const fiFIGrid = {
|
|
|
6
6
|
noResultsOverlayLabel: 'Ei tuloksia.',
|
|
7
7
|
errorOverlayDefaultLabel: 'Tapahtui virhe.',
|
|
8
8
|
// Density selector toolbar button text
|
|
9
|
-
toolbarDensity: '
|
|
9
|
+
toolbarDensity: 'Tiiveys',
|
|
10
10
|
toolbarDensityLabel: 'Tiiveys',
|
|
11
11
|
toolbarDensityCompact: 'Kompakti',
|
|
12
12
|
toolbarDensityStandard: 'Vakio',
|
|
@@ -21,15 +21,15 @@ const fiFIGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'Näytä suodattimet',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktiivista suodatinta` : `${count} aktiivinen suodatin`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'Hae…',
|
|
25
|
+
toolbarQuickFilterLabel: 'Hae',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'Tyhjennä',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
|
-
toolbarExport: '
|
|
29
|
-
toolbarExportLabel: '
|
|
28
|
+
toolbarExport: 'Vie',
|
|
29
|
+
toolbarExportLabel: 'Vie',
|
|
30
30
|
toolbarExportCSV: 'Lataa CSV-muodossa',
|
|
31
31
|
toolbarExportPrint: 'Tulosta',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'Lataa Excel-muodossa',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'Etsi sarake',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'Sarakkeen otsikko',
|
|
@@ -39,7 +39,7 @@ const fiFIGrid = {
|
|
|
39
39
|
// Filter panel text
|
|
40
40
|
filterPanelAddFilter: 'Lisää suodatin',
|
|
41
41
|
filterPanelDeleteIconLabel: 'Poista',
|
|
42
|
-
|
|
42
|
+
filterPanelLinkOperator: 'Logiikkaoperaattori',
|
|
43
43
|
filterPanelOperators: 'Operaattorit',
|
|
44
44
|
// TODO v6: rename to filterPanelOperator
|
|
45
45
|
filterPanelOperatorAnd: 'Ja',
|
|
@@ -60,7 +60,7 @@ const fiFIGrid = {
|
|
|
60
60
|
filterOperatorOnOrBefore: 'on sama tai ennen',
|
|
61
61
|
filterOperatorIsEmpty: 'on tyhjä',
|
|
62
62
|
filterOperatorIsNotEmpty: 'ei ole tyhjä',
|
|
63
|
-
|
|
63
|
+
filterOperatorIsAnyOf: 'mikä tahansa seuraavista',
|
|
64
64
|
// Filter values text
|
|
65
65
|
filterValueAny: 'mikä tahansa',
|
|
66
66
|
filterValueTrue: 'tosi',
|
|
@@ -85,10 +85,10 @@ const fiFIGrid = {
|
|
|
85
85
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
86
86
|
// Checkbox selection text
|
|
87
87
|
checkboxSelectionHeaderName: 'Valintaruutu',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
checkboxSelectionSelectAllRows: 'Valitse kaikki rivit',
|
|
89
|
+
checkboxSelectionUnselectAllRows: 'Poista kaikkien rivien valinta',
|
|
90
|
+
checkboxSelectionSelectRow: 'Valitse rivi',
|
|
91
|
+
checkboxSelectionUnselectRow: 'Poista rivin valinta',
|
|
92
92
|
// Boolean cell text
|
|
93
93
|
booleanCellTrueLabel: 'tosi',
|
|
94
94
|
booleanCellFalseLabel: 'epätosi',
|
|
@@ -101,23 +101,23 @@ const fiFIGrid = {
|
|
|
101
101
|
// Tree Data
|
|
102
102
|
treeDataGroupingHeaderName: 'Ryhmä',
|
|
103
103
|
treeDataExpand: 'Laajenna',
|
|
104
|
-
treeDataCollapse: 'Supista'
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
treeDataCollapse: 'Supista',
|
|
105
|
+
// Grouping columns
|
|
106
|
+
groupingColumnHeaderName: 'Ryhmä',
|
|
107
|
+
groupColumn: name => `Ryhmittelyperuste ${name}`,
|
|
108
|
+
unGroupColumn: name => `Poista ryhmittelyperuste ${name}`,
|
|
108
109
|
// Master/detail
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
detailPanelToggle: 'Yksityiskohtapaneelin vaihto',
|
|
111
|
+
expandDetailPanel: 'Laajenna',
|
|
112
|
+
collapseDetailPanel: 'Tiivistä',
|
|
112
113
|
// Row reordering text
|
|
113
|
-
|
|
114
|
+
rowReorderingHeaderName: 'Rivien uudelleenjärjestely',
|
|
114
115
|
// Aggregation
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
aggregationMenuItemHeader: 'Koostaminen',
|
|
117
|
+
aggregationFunctionLabelSum: 'summa',
|
|
118
|
+
aggregationFunctionLabelAvg: 'ka.',
|
|
119
|
+
aggregationFunctionLabelMin: 'min.',
|
|
120
|
+
aggregationFunctionLabelMax: 'maks.',
|
|
121
|
+
aggregationFunctionLabelSize: 'koko'
|
|
122
122
|
};
|
|
123
123
|
export const fiFI = getGridLocalization(fiFIGrid, fiFICore);
|
package/locales/plPL.js
CHANGED
|
@@ -21,15 +21,15 @@ const plPLGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'Pokaż filtry',
|
|
22
22
|
toolbarFiltersTooltipActive: count => `Liczba aktywnych filtrów: ${count}`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'Wyszukaj…',
|
|
25
|
+
toolbarQuickFilterLabel: 'Szukaj',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'Wyczyść',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'Eksportuj',
|
|
29
29
|
toolbarExportLabel: 'Eksportuj',
|
|
30
30
|
toolbarExportCSV: 'Pobierz jako plik CSV',
|
|
31
31
|
toolbarExportPrint: 'Drukuj',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'Pobierz jako plik Excel',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'Znajdź kolumnę',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'Tytuł kolumny',
|
|
@@ -109,9 +109,9 @@ const plPLGrid = {
|
|
|
109
109
|
// Master/detail
|
|
110
110
|
// detailPanelToggle: 'Detail panel toggle',
|
|
111
111
|
expandDetailPanel: 'Rozwiń',
|
|
112
|
-
collapseDetailPanel: 'Zwiń'
|
|
113
|
-
//
|
|
114
|
-
// Aggregation
|
|
112
|
+
collapseDetailPanel: 'Zwiń',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'Porządkowanie wierszy' // Aggregation
|
|
115
115
|
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
116
|
// aggregationFunctionLabelSum: 'sum',
|
|
117
117
|
// aggregationFunctionLabelAvg: 'avg',
|
|
@@ -28,6 +28,14 @@ export const focusStateInitializer = state => _extends({}, state, {
|
|
|
28
28
|
export const useGridFocus = (apiRef, props) => {
|
|
29
29
|
const logger = useGridLogger(apiRef, 'useGridFocus');
|
|
30
30
|
const lastClickedCell = React.useRef(null);
|
|
31
|
+
const publishCellFocusOut = React.useCallback((cell, event) => {
|
|
32
|
+
if (cell) {
|
|
33
|
+
// The row might have been deleted
|
|
34
|
+
if (apiRef.current.getRow(cell.id)) {
|
|
35
|
+
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, [apiRef]);
|
|
31
39
|
const setCellFocus = React.useCallback((id, field) => {
|
|
32
40
|
const focusedCell = gridFocusCellSelector(apiRef);
|
|
33
41
|
|
|
@@ -63,18 +71,14 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
63
71
|
if (focusedCell) {
|
|
64
72
|
// There's a focused cell but another cell was clicked
|
|
65
73
|
// Publishes an event to notify that the focus was lost
|
|
66
|
-
|
|
74
|
+
publishCellFocusOut(focusedCell, {});
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
apiRef.current.publishEvent('cellFocusIn', apiRef.current.getCellParams(id, field));
|
|
70
|
-
}, [apiRef, logger]);
|
|
78
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
71
79
|
const setColumnHeaderFocus = React.useCallback((field, event = {}) => {
|
|
72
80
|
const cell = gridFocusCellSelector(apiRef);
|
|
73
|
-
|
|
74
|
-
if (cell) {
|
|
75
|
-
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
76
|
-
}
|
|
77
|
-
|
|
81
|
+
publishCellFocusOut(cell, event);
|
|
78
82
|
apiRef.current.setState(state => {
|
|
79
83
|
logger.debug(`Focusing on column header with colIndex=${field}`);
|
|
80
84
|
return _extends({}, state, {
|
|
@@ -93,7 +97,7 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
93
97
|
});
|
|
94
98
|
});
|
|
95
99
|
apiRef.current.forceUpdate();
|
|
96
|
-
}, [apiRef, logger]);
|
|
100
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
97
101
|
const moveFocusToRelativeCell = React.useCallback((id, field, direction) => {
|
|
98
102
|
let columnIndexToFocus = apiRef.current.getColumnIndex(field);
|
|
99
103
|
let rowIndexToFocus = apiRef.current.getRowIndexRelativeToVisibleRows(id);
|
|
@@ -202,11 +206,6 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
202
206
|
|
|
203
207
|
if (cellElement?.contains(event.target)) {
|
|
204
208
|
return;
|
|
205
|
-
} // The row might have been deleted during the click
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (!apiRef.current.getRow(focusedCell.id)) {
|
|
209
|
-
return;
|
|
210
209
|
}
|
|
211
210
|
|
|
212
211
|
if (cellParams) {
|
|
@@ -221,9 +220,9 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
221
220
|
apiRef.current.forceUpdate(); // There's a focused cell but another element (not a cell) was clicked
|
|
222
221
|
// Publishes an event to notify that the focus was lost
|
|
223
222
|
|
|
224
|
-
|
|
223
|
+
publishCellFocusOut(focusedCell, event);
|
|
225
224
|
}
|
|
226
|
-
}, [apiRef]);
|
|
225
|
+
}, [apiRef, publishCellFocusOut]);
|
|
227
226
|
const handleCellModeChange = React.useCallback(params => {
|
|
228
227
|
if (params.cellMode === 'view') {
|
|
229
228
|
return;
|
package/modern/index.js
CHANGED
package/modern/locales/faIR.js
CHANGED
|
@@ -21,15 +21,15 @@ const faIRGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'نمایش فیلترها',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'جستجو...',
|
|
25
|
+
toolbarQuickFilterLabel: 'جستجو',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'حذف',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'خروجی',
|
|
29
29
|
toolbarExportLabel: 'خروجی',
|
|
30
30
|
toolbarExportCSV: 'دانلود به صورت CSV',
|
|
31
31
|
toolbarExportPrint: 'چاپ',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'دانلود به صورت اکسل',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'پیداکردن ستون',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'عنوان ستون',
|
|
@@ -107,17 +107,17 @@ const faIRGrid = {
|
|
|
107
107
|
groupColumn: name => `گروهبندی براساس ${name}`,
|
|
108
108
|
unGroupColumn: name => `لغو گروهبندی براساس ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
-
|
|
110
|
+
detailPanelToggle: 'پنل جزئیات',
|
|
111
111
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
112
|
-
collapseDetailPanel: 'بستن پنل جزئیات'
|
|
113
|
-
//
|
|
112
|
+
collapseDetailPanel: 'بستن پنل جزئیات',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'ترتیب مجدد سطر',
|
|
114
115
|
// Aggregation
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
aggregationMenuItemHeader: 'تجمیع',
|
|
117
|
+
aggregationFunctionLabelSum: 'جمع',
|
|
118
|
+
aggregationFunctionLabelAvg: 'میانگین',
|
|
119
|
+
aggregationFunctionLabelMin: 'حداقل',
|
|
120
|
+
aggregationFunctionLabelMax: 'حداکثر',
|
|
121
|
+
aggregationFunctionLabelSize: 'اندازه'
|
|
122
122
|
};
|
|
123
123
|
export const faIR = getGridLocalization(faIRGrid, faIRCore);
|
package/modern/locales/fiFI.js
CHANGED
|
@@ -6,7 +6,7 @@ const fiFIGrid = {
|
|
|
6
6
|
noResultsOverlayLabel: 'Ei tuloksia.',
|
|
7
7
|
errorOverlayDefaultLabel: 'Tapahtui virhe.',
|
|
8
8
|
// Density selector toolbar button text
|
|
9
|
-
toolbarDensity: '
|
|
9
|
+
toolbarDensity: 'Tiiveys',
|
|
10
10
|
toolbarDensityLabel: 'Tiiveys',
|
|
11
11
|
toolbarDensityCompact: 'Kompakti',
|
|
12
12
|
toolbarDensityStandard: 'Vakio',
|
|
@@ -21,15 +21,15 @@ const fiFIGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'Näytä suodattimet',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktiivista suodatinta` : `${count} aktiivinen suodatin`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'Hae…',
|
|
25
|
+
toolbarQuickFilterLabel: 'Hae',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'Tyhjennä',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
|
-
toolbarExport: '
|
|
29
|
-
toolbarExportLabel: '
|
|
28
|
+
toolbarExport: 'Vie',
|
|
29
|
+
toolbarExportLabel: 'Vie',
|
|
30
30
|
toolbarExportCSV: 'Lataa CSV-muodossa',
|
|
31
31
|
toolbarExportPrint: 'Tulosta',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'Lataa Excel-muodossa',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'Etsi sarake',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'Sarakkeen otsikko',
|
|
@@ -39,7 +39,7 @@ const fiFIGrid = {
|
|
|
39
39
|
// Filter panel text
|
|
40
40
|
filterPanelAddFilter: 'Lisää suodatin',
|
|
41
41
|
filterPanelDeleteIconLabel: 'Poista',
|
|
42
|
-
|
|
42
|
+
filterPanelLinkOperator: 'Logiikkaoperaattori',
|
|
43
43
|
filterPanelOperators: 'Operaattorit',
|
|
44
44
|
// TODO v6: rename to filterPanelOperator
|
|
45
45
|
filterPanelOperatorAnd: 'Ja',
|
|
@@ -60,7 +60,7 @@ const fiFIGrid = {
|
|
|
60
60
|
filterOperatorOnOrBefore: 'on sama tai ennen',
|
|
61
61
|
filterOperatorIsEmpty: 'on tyhjä',
|
|
62
62
|
filterOperatorIsNotEmpty: 'ei ole tyhjä',
|
|
63
|
-
|
|
63
|
+
filterOperatorIsAnyOf: 'mikä tahansa seuraavista',
|
|
64
64
|
// Filter values text
|
|
65
65
|
filterValueAny: 'mikä tahansa',
|
|
66
66
|
filterValueTrue: 'tosi',
|
|
@@ -85,10 +85,10 @@ const fiFIGrid = {
|
|
|
85
85
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
86
86
|
// Checkbox selection text
|
|
87
87
|
checkboxSelectionHeaderName: 'Valintaruutu',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
checkboxSelectionSelectAllRows: 'Valitse kaikki rivit',
|
|
89
|
+
checkboxSelectionUnselectAllRows: 'Poista kaikkien rivien valinta',
|
|
90
|
+
checkboxSelectionSelectRow: 'Valitse rivi',
|
|
91
|
+
checkboxSelectionUnselectRow: 'Poista rivin valinta',
|
|
92
92
|
// Boolean cell text
|
|
93
93
|
booleanCellTrueLabel: 'tosi',
|
|
94
94
|
booleanCellFalseLabel: 'epätosi',
|
|
@@ -101,23 +101,23 @@ const fiFIGrid = {
|
|
|
101
101
|
// Tree Data
|
|
102
102
|
treeDataGroupingHeaderName: 'Ryhmä',
|
|
103
103
|
treeDataExpand: 'Laajenna',
|
|
104
|
-
treeDataCollapse: 'Supista'
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
treeDataCollapse: 'Supista',
|
|
105
|
+
// Grouping columns
|
|
106
|
+
groupingColumnHeaderName: 'Ryhmä',
|
|
107
|
+
groupColumn: name => `Ryhmittelyperuste ${name}`,
|
|
108
|
+
unGroupColumn: name => `Poista ryhmittelyperuste ${name}`,
|
|
108
109
|
// Master/detail
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
detailPanelToggle: 'Yksityiskohtapaneelin vaihto',
|
|
111
|
+
expandDetailPanel: 'Laajenna',
|
|
112
|
+
collapseDetailPanel: 'Tiivistä',
|
|
112
113
|
// Row reordering text
|
|
113
|
-
|
|
114
|
+
rowReorderingHeaderName: 'Rivien uudelleenjärjestely',
|
|
114
115
|
// Aggregation
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
aggregationMenuItemHeader: 'Koostaminen',
|
|
117
|
+
aggregationFunctionLabelSum: 'summa',
|
|
118
|
+
aggregationFunctionLabelAvg: 'ka.',
|
|
119
|
+
aggregationFunctionLabelMin: 'min.',
|
|
120
|
+
aggregationFunctionLabelMax: 'maks.',
|
|
121
|
+
aggregationFunctionLabelSize: 'koko'
|
|
122
122
|
};
|
|
123
123
|
export const fiFI = getGridLocalization(fiFIGrid, fiFICore);
|
package/modern/locales/plPL.js
CHANGED
|
@@ -21,15 +21,15 @@ const plPLGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'Pokaż filtry',
|
|
22
22
|
toolbarFiltersTooltipActive: count => `Liczba aktywnych filtrów: ${count}`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'Wyszukaj…',
|
|
25
|
+
toolbarQuickFilterLabel: 'Szukaj',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'Wyczyść',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'Eksportuj',
|
|
29
29
|
toolbarExportLabel: 'Eksportuj',
|
|
30
30
|
toolbarExportCSV: 'Pobierz jako plik CSV',
|
|
31
31
|
toolbarExportPrint: 'Drukuj',
|
|
32
|
-
|
|
32
|
+
toolbarExportExcel: 'Pobierz jako plik Excel',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'Znajdź kolumnę',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'Tytuł kolumny',
|
|
@@ -109,9 +109,9 @@ const plPLGrid = {
|
|
|
109
109
|
// Master/detail
|
|
110
110
|
// detailPanelToggle: 'Detail panel toggle',
|
|
111
111
|
expandDetailPanel: 'Rozwiń',
|
|
112
|
-
collapseDetailPanel: 'Zwiń'
|
|
113
|
-
//
|
|
114
|
-
// Aggregation
|
|
112
|
+
collapseDetailPanel: 'Zwiń',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'Porządkowanie wierszy' // Aggregation
|
|
115
115
|
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
116
|
// aggregationFunctionLabelSum: 'sum',
|
|
117
117
|
// aggregationFunctionLabelAvg: 'avg',
|
|
@@ -55,6 +55,14 @@ exports.focusStateInitializer = focusStateInitializer;
|
|
|
55
55
|
const useGridFocus = (apiRef, props) => {
|
|
56
56
|
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useGridFocus');
|
|
57
57
|
const lastClickedCell = React.useRef(null);
|
|
58
|
+
const publishCellFocusOut = React.useCallback((cell, event) => {
|
|
59
|
+
if (cell) {
|
|
60
|
+
// The row might have been deleted
|
|
61
|
+
if (apiRef.current.getRow(cell.id)) {
|
|
62
|
+
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, [apiRef]);
|
|
58
66
|
const setCellFocus = React.useCallback((id, field) => {
|
|
59
67
|
const focusedCell = (0, _gridFocusStateSelector.gridFocusCellSelector)(apiRef);
|
|
60
68
|
|
|
@@ -90,18 +98,14 @@ const useGridFocus = (apiRef, props) => {
|
|
|
90
98
|
if (focusedCell) {
|
|
91
99
|
// There's a focused cell but another cell was clicked
|
|
92
100
|
// Publishes an event to notify that the focus was lost
|
|
93
|
-
|
|
101
|
+
publishCellFocusOut(focusedCell, {});
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
apiRef.current.publishEvent('cellFocusIn', apiRef.current.getCellParams(id, field));
|
|
97
|
-
}, [apiRef, logger]);
|
|
105
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
98
106
|
const setColumnHeaderFocus = React.useCallback((field, event = {}) => {
|
|
99
107
|
const cell = (0, _gridFocusStateSelector.gridFocusCellSelector)(apiRef);
|
|
100
|
-
|
|
101
|
-
if (cell) {
|
|
102
|
-
apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);
|
|
103
|
-
}
|
|
104
|
-
|
|
108
|
+
publishCellFocusOut(cell, event);
|
|
105
109
|
apiRef.current.setState(state => {
|
|
106
110
|
logger.debug(`Focusing on column header with colIndex=${field}`);
|
|
107
111
|
return (0, _extends2.default)({}, state, {
|
|
@@ -120,7 +124,7 @@ const useGridFocus = (apiRef, props) => {
|
|
|
120
124
|
});
|
|
121
125
|
});
|
|
122
126
|
apiRef.current.forceUpdate();
|
|
123
|
-
}, [apiRef, logger]);
|
|
127
|
+
}, [apiRef, logger, publishCellFocusOut]);
|
|
124
128
|
const moveFocusToRelativeCell = React.useCallback((id, field, direction) => {
|
|
125
129
|
let columnIndexToFocus = apiRef.current.getColumnIndex(field);
|
|
126
130
|
let rowIndexToFocus = apiRef.current.getRowIndexRelativeToVisibleRows(id);
|
|
@@ -229,11 +233,6 @@ const useGridFocus = (apiRef, props) => {
|
|
|
229
233
|
|
|
230
234
|
if (cellElement != null && cellElement.contains(event.target)) {
|
|
231
235
|
return;
|
|
232
|
-
} // The row might have been deleted during the click
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
if (!apiRef.current.getRow(focusedCell.id)) {
|
|
236
|
-
return;
|
|
237
236
|
}
|
|
238
237
|
|
|
239
238
|
if (cellParams) {
|
|
@@ -248,9 +247,9 @@ const useGridFocus = (apiRef, props) => {
|
|
|
248
247
|
apiRef.current.forceUpdate(); // There's a focused cell but another element (not a cell) was clicked
|
|
249
248
|
// Publishes an event to notify that the focus was lost
|
|
250
249
|
|
|
251
|
-
|
|
250
|
+
publishCellFocusOut(focusedCell, event);
|
|
252
251
|
}
|
|
253
|
-
}, [apiRef]);
|
|
252
|
+
}, [apiRef, publishCellFocusOut]);
|
|
254
253
|
const handleCellModeChange = React.useCallback(params => {
|
|
255
254
|
if (params.cellMode === 'view') {
|
|
256
255
|
return;
|
package/node/index.js
CHANGED
package/node/locales/faIR.js
CHANGED
|
@@ -30,15 +30,15 @@ const faIRGrid = {
|
|
|
30
30
|
toolbarFiltersTooltipShow: 'نمایش فیلترها',
|
|
31
31
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
|
|
32
32
|
// Quick filter toolbar field
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
toolbarQuickFilterPlaceholder: 'جستجو...',
|
|
34
|
+
toolbarQuickFilterLabel: 'جستجو',
|
|
35
|
+
toolbarQuickFilterDeleteIconLabel: 'حذف',
|
|
36
36
|
// Export selector toolbar button text
|
|
37
37
|
toolbarExport: 'خروجی',
|
|
38
38
|
toolbarExportLabel: 'خروجی',
|
|
39
39
|
toolbarExportCSV: 'دانلود به صورت CSV',
|
|
40
40
|
toolbarExportPrint: 'چاپ',
|
|
41
|
-
|
|
41
|
+
toolbarExportExcel: 'دانلود به صورت اکسل',
|
|
42
42
|
// Columns panel text
|
|
43
43
|
columnsPanelTextFieldLabel: 'پیداکردن ستون',
|
|
44
44
|
columnsPanelTextFieldPlaceholder: 'عنوان ستون',
|
|
@@ -116,18 +116,18 @@ const faIRGrid = {
|
|
|
116
116
|
groupColumn: name => `گروهبندی براساس ${name}`,
|
|
117
117
|
unGroupColumn: name => `لغو گروهبندی براساس ${name}`,
|
|
118
118
|
// Master/detail
|
|
119
|
-
|
|
119
|
+
detailPanelToggle: 'پنل جزئیات',
|
|
120
120
|
expandDetailPanel: 'بازکردن پنل جزئیات',
|
|
121
|
-
collapseDetailPanel: 'بستن پنل جزئیات'
|
|
122
|
-
//
|
|
121
|
+
collapseDetailPanel: 'بستن پنل جزئیات',
|
|
122
|
+
// Row reordering text
|
|
123
|
+
rowReorderingHeaderName: 'ترتیب مجدد سطر',
|
|
123
124
|
// Aggregation
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
aggregationMenuItemHeader: 'تجمیع',
|
|
126
|
+
aggregationFunctionLabelSum: 'جمع',
|
|
127
|
+
aggregationFunctionLabelAvg: 'میانگین',
|
|
128
|
+
aggregationFunctionLabelMin: 'حداقل',
|
|
129
|
+
aggregationFunctionLabelMax: 'حداکثر',
|
|
130
|
+
aggregationFunctionLabelSize: 'اندازه'
|
|
131
131
|
};
|
|
132
132
|
const faIR = (0, _getGridLocalization.getGridLocalization)(faIRGrid, _locale.faIR);
|
|
133
133
|
exports.faIR = faIR;
|
package/node/locales/fiFI.js
CHANGED
|
@@ -15,7 +15,7 @@ const fiFIGrid = {
|
|
|
15
15
|
noResultsOverlayLabel: 'Ei tuloksia.',
|
|
16
16
|
errorOverlayDefaultLabel: 'Tapahtui virhe.',
|
|
17
17
|
// Density selector toolbar button text
|
|
18
|
-
toolbarDensity: '
|
|
18
|
+
toolbarDensity: 'Tiiveys',
|
|
19
19
|
toolbarDensityLabel: 'Tiiveys',
|
|
20
20
|
toolbarDensityCompact: 'Kompakti',
|
|
21
21
|
toolbarDensityStandard: 'Vakio',
|
|
@@ -30,15 +30,15 @@ const fiFIGrid = {
|
|
|
30
30
|
toolbarFiltersTooltipShow: 'Näytä suodattimet',
|
|
31
31
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktiivista suodatinta` : `${count} aktiivinen suodatin`,
|
|
32
32
|
// Quick filter toolbar field
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
toolbarQuickFilterPlaceholder: 'Hae…',
|
|
34
|
+
toolbarQuickFilterLabel: 'Hae',
|
|
35
|
+
toolbarQuickFilterDeleteIconLabel: 'Tyhjennä',
|
|
36
36
|
// Export selector toolbar button text
|
|
37
|
-
toolbarExport: '
|
|
38
|
-
toolbarExportLabel: '
|
|
37
|
+
toolbarExport: 'Vie',
|
|
38
|
+
toolbarExportLabel: 'Vie',
|
|
39
39
|
toolbarExportCSV: 'Lataa CSV-muodossa',
|
|
40
40
|
toolbarExportPrint: 'Tulosta',
|
|
41
|
-
|
|
41
|
+
toolbarExportExcel: 'Lataa Excel-muodossa',
|
|
42
42
|
// Columns panel text
|
|
43
43
|
columnsPanelTextFieldLabel: 'Etsi sarake',
|
|
44
44
|
columnsPanelTextFieldPlaceholder: 'Sarakkeen otsikko',
|
|
@@ -48,7 +48,7 @@ const fiFIGrid = {
|
|
|
48
48
|
// Filter panel text
|
|
49
49
|
filterPanelAddFilter: 'Lisää suodatin',
|
|
50
50
|
filterPanelDeleteIconLabel: 'Poista',
|
|
51
|
-
|
|
51
|
+
filterPanelLinkOperator: 'Logiikkaoperaattori',
|
|
52
52
|
filterPanelOperators: 'Operaattorit',
|
|
53
53
|
// TODO v6: rename to filterPanelOperator
|
|
54
54
|
filterPanelOperatorAnd: 'Ja',
|
|
@@ -69,7 +69,7 @@ const fiFIGrid = {
|
|
|
69
69
|
filterOperatorOnOrBefore: 'on sama tai ennen',
|
|
70
70
|
filterOperatorIsEmpty: 'on tyhjä',
|
|
71
71
|
filterOperatorIsNotEmpty: 'ei ole tyhjä',
|
|
72
|
-
|
|
72
|
+
filterOperatorIsAnyOf: 'mikä tahansa seuraavista',
|
|
73
73
|
// Filter values text
|
|
74
74
|
filterValueAny: 'mikä tahansa',
|
|
75
75
|
filterValueTrue: 'tosi',
|
|
@@ -94,10 +94,10 @@ const fiFIGrid = {
|
|
|
94
94
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
95
95
|
// Checkbox selection text
|
|
96
96
|
checkboxSelectionHeaderName: 'Valintaruutu',
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
checkboxSelectionSelectAllRows: 'Valitse kaikki rivit',
|
|
98
|
+
checkboxSelectionUnselectAllRows: 'Poista kaikkien rivien valinta',
|
|
99
|
+
checkboxSelectionSelectRow: 'Valitse rivi',
|
|
100
|
+
checkboxSelectionUnselectRow: 'Poista rivin valinta',
|
|
101
101
|
// Boolean cell text
|
|
102
102
|
booleanCellTrueLabel: 'tosi',
|
|
103
103
|
booleanCellFalseLabel: 'epätosi',
|
|
@@ -110,24 +110,24 @@ const fiFIGrid = {
|
|
|
110
110
|
// Tree Data
|
|
111
111
|
treeDataGroupingHeaderName: 'Ryhmä',
|
|
112
112
|
treeDataExpand: 'Laajenna',
|
|
113
|
-
treeDataCollapse: 'Supista'
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
treeDataCollapse: 'Supista',
|
|
114
|
+
// Grouping columns
|
|
115
|
+
groupingColumnHeaderName: 'Ryhmä',
|
|
116
|
+
groupColumn: name => `Ryhmittelyperuste ${name}`,
|
|
117
|
+
unGroupColumn: name => `Poista ryhmittelyperuste ${name}`,
|
|
117
118
|
// Master/detail
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
detailPanelToggle: 'Yksityiskohtapaneelin vaihto',
|
|
120
|
+
expandDetailPanel: 'Laajenna',
|
|
121
|
+
collapseDetailPanel: 'Tiivistä',
|
|
121
122
|
// Row reordering text
|
|
122
|
-
|
|
123
|
+
rowReorderingHeaderName: 'Rivien uudelleenjärjestely',
|
|
123
124
|
// Aggregation
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
aggregationMenuItemHeader: 'Koostaminen',
|
|
126
|
+
aggregationFunctionLabelSum: 'summa',
|
|
127
|
+
aggregationFunctionLabelAvg: 'ka.',
|
|
128
|
+
aggregationFunctionLabelMin: 'min.',
|
|
129
|
+
aggregationFunctionLabelMax: 'maks.',
|
|
130
|
+
aggregationFunctionLabelSize: 'koko'
|
|
131
131
|
};
|
|
132
132
|
const fiFI = (0, _getGridLocalization.getGridLocalization)(fiFIGrid, _locale.fiFI);
|
|
133
133
|
exports.fiFI = fiFI;
|
package/node/locales/plPL.js
CHANGED
|
@@ -30,15 +30,15 @@ const plPLGrid = {
|
|
|
30
30
|
toolbarFiltersTooltipShow: 'Pokaż filtry',
|
|
31
31
|
toolbarFiltersTooltipActive: count => `Liczba aktywnych filtrów: ${count}`,
|
|
32
32
|
// Quick filter toolbar field
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
toolbarQuickFilterPlaceholder: 'Wyszukaj…',
|
|
34
|
+
toolbarQuickFilterLabel: 'Szukaj',
|
|
35
|
+
toolbarQuickFilterDeleteIconLabel: 'Wyczyść',
|
|
36
36
|
// Export selector toolbar button text
|
|
37
37
|
toolbarExport: 'Eksportuj',
|
|
38
38
|
toolbarExportLabel: 'Eksportuj',
|
|
39
39
|
toolbarExportCSV: 'Pobierz jako plik CSV',
|
|
40
40
|
toolbarExportPrint: 'Drukuj',
|
|
41
|
-
|
|
41
|
+
toolbarExportExcel: 'Pobierz jako plik Excel',
|
|
42
42
|
// Columns panel text
|
|
43
43
|
columnsPanelTextFieldLabel: 'Znajdź kolumnę',
|
|
44
44
|
columnsPanelTextFieldPlaceholder: 'Tytuł kolumny',
|
|
@@ -118,9 +118,9 @@ const plPLGrid = {
|
|
|
118
118
|
// Master/detail
|
|
119
119
|
// detailPanelToggle: 'Detail panel toggle',
|
|
120
120
|
expandDetailPanel: 'Rozwiń',
|
|
121
|
-
collapseDetailPanel: 'Zwiń'
|
|
122
|
-
//
|
|
123
|
-
// Aggregation
|
|
121
|
+
collapseDetailPanel: 'Zwiń',
|
|
122
|
+
// Row reordering text
|
|
123
|
+
rowReorderingHeaderName: 'Porządkowanie wierszy' // Aggregation
|
|
124
124
|
// aggregationMenuItemHeader: 'Aggregation',
|
|
125
125
|
// aggregationFunctionLabelSum: 'sum',
|
|
126
126
|
// aggregationFunctionLabelAvg: 'avg',
|