@mui/x-data-grid 5.17.20 → 5.17.22

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/components/cell/GridCell.js +3 -1
  3. package/components/panel/GridColumnsPanel.js +15 -5
  4. package/hooks/features/export/useGridPrintExport.js +19 -3
  5. package/index.js +1 -1
  6. package/legacy/components/cell/GridCell.js +3 -1
  7. package/legacy/components/panel/GridColumnsPanel.js +15 -9
  8. package/legacy/hooks/features/export/useGridPrintExport.js +20 -4
  9. package/legacy/index.js +1 -1
  10. package/legacy/lib/createDetectElementResize/index.js +5 -5
  11. package/legacy/locales/beBY.js +161 -0
  12. package/legacy/locales/coreLocales.js +67 -0
  13. package/legacy/locales/esES.js +18 -14
  14. package/legacy/locales/frFR.js +1 -1
  15. package/legacy/locales/index.js +2 -0
  16. package/legacy/locales/jaJP.js +16 -16
  17. package/legacy/locales/skSK.js +8 -8
  18. package/legacy/locales/urPK.js +135 -0
  19. package/legacy/locales/viVN.js +22 -18
  20. package/lib/createDetectElementResize/index.js +5 -5
  21. package/locales/beBY.d.ts +2 -0
  22. package/locales/beBY.js +149 -0
  23. package/locales/coreLocales.d.ts +3 -0
  24. package/locales/coreLocales.js +65 -0
  25. package/locales/esES.js +14 -14
  26. package/locales/frFR.js +1 -1
  27. package/locales/index.d.ts +2 -0
  28. package/locales/index.js +2 -0
  29. package/locales/jaJP.js +16 -16
  30. package/locales/skSK.js +8 -8
  31. package/locales/urPK.d.ts +2 -0
  32. package/locales/urPK.js +123 -0
  33. package/locales/viVN.js +18 -18
  34. package/modern/components/cell/GridCell.js +3 -1
  35. package/modern/components/panel/GridColumnsPanel.js +15 -5
  36. package/modern/hooks/features/export/useGridPrintExport.js +19 -3
  37. package/modern/index.js +1 -1
  38. package/modern/lib/createDetectElementResize/index.js +5 -5
  39. package/modern/locales/beBY.js +149 -0
  40. package/modern/locales/coreLocales.js +65 -0
  41. package/modern/locales/esES.js +14 -14
  42. package/modern/locales/frFR.js +1 -1
  43. package/modern/locales/index.js +2 -0
  44. package/modern/locales/jaJP.js +16 -16
  45. package/modern/locales/skSK.js +8 -8
  46. package/modern/locales/urPK.js +123 -0
  47. package/modern/locales/viVN.js +18 -18
  48. package/node/components/cell/GridCell.js +3 -1
  49. package/node/components/panel/GridColumnsPanel.js +13 -5
  50. package/node/hooks/features/export/useGridPrintExport.js +19 -3
  51. package/node/index.js +1 -1
  52. package/node/lib/createDetectElementResize/index.js +5 -5
  53. package/node/locales/beBY.js +158 -0
  54. package/node/locales/coreLocales.js +73 -0
  55. package/node/locales/esES.js +14 -14
  56. package/node/locales/frFR.js +1 -1
  57. package/node/locales/index.js +26 -0
  58. package/node/locales/jaJP.js +16 -16
  59. package/node/locales/skSK.js +8 -8
  60. package/node/locales/urPK.js +133 -0
  61. package/node/locales/viVN.js +18 -18
  62. package/package.json +1 -1
@@ -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
- // filterPanelLinkOperator: 'Logic operator',
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
- // filterValueAny: 'any',
66
- // filterValueTrue: 'true',
67
- // filterValueFalse: 'false',
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
- // actionsCellMore: 'more',
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
- // detailPanelToggle: 'Detail panel toggle',
110
+ detailPanelToggle: '詳細パネルの切り替え',
111
111
  expandDetailPanel: '展開',
112
112
  collapseDetailPanel: '折りたたみ',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: '行並び替え' // Aggregation
115
- // aggregationMenuItemHeader: 'Aggregation',
116
- // aggregationFunctionLabelSum: 'sum',
117
- // aggregationFunctionLabelAvg: 'avg',
118
- // aggregationFunctionLabelMin: 'min',
119
- // aggregationFunctionLabelMax: 'max',
120
- // aggregationFunctionLabelSize: 'size',
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);
@@ -146,13 +146,13 @@ const skSKGrid = {
146
146
  expandDetailPanel: 'Rozbaliť',
147
147
  collapseDetailPanel: 'Zbaliť',
148
148
  // Row reordering text
149
- rowReorderingHeaderName: 'Preusporiadávanie riadkov' // Aggregation
150
- // aggregationMenuItemHeader: 'Aggregation',
151
- // aggregationFunctionLabelSum: 'sum',
152
- // aggregationFunctionLabelAvg: 'avg',
153
- // aggregationFunctionLabelMin: 'min',
154
- // aggregationFunctionLabelMax: 'max',
155
- // aggregationFunctionLabelSize: 'size',
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);
@@ -0,0 +1,123 @@
1
+ import { urPKCore } from './coreLocales';
2
+ import { getGridLocalization } from '../utils/getGridLocalization';
3
+ const urPKGrid = {
4
+ // Root
5
+ noRowsLabel: 'کوئی قطاریں نہیں',
6
+ noResultsOverlayLabel: 'کوئی نتائج نہیں',
7
+ errorOverlayDefaultLabel: 'ایک مسئلہ ہو گیا',
8
+ // Density selector toolbar button text
9
+ toolbarDensity: 'کثافت',
10
+ toolbarDensityLabel: 'کثافت',
11
+ toolbarDensityCompact: 'تنگ',
12
+ toolbarDensityStandard: 'درمیانہ',
13
+ toolbarDensityComfortable: 'مناسب',
14
+ // Columns selector toolbar button text
15
+ toolbarColumns: 'کالمز',
16
+ toolbarColumnsLabel: 'کالمز کو منتخب کریں',
17
+ // Filters toolbar button text
18
+ toolbarFilters: 'فلٹرز',
19
+ toolbarFiltersLabel: 'فلٹرز دکھائیں',
20
+ toolbarFiltersTooltipHide: 'فلٹرز چھپائیں',
21
+ toolbarFiltersTooltipShow: 'فلٹرز دکھائیں',
22
+ toolbarFiltersTooltipActive: count => count !== 1 ? `${count} فعال فلٹرز` : `${count} فلٹرز فعال`,
23
+ // Quick filter toolbar field
24
+ toolbarQuickFilterPlaceholder: 'تلاش کریں۔۔۔',
25
+ toolbarQuickFilterLabel: 'تلاش کریں',
26
+ toolbarQuickFilterDeleteIconLabel: 'کلئیر کریں',
27
+ // Export selector toolbar button text
28
+ toolbarExport: 'ایکسپورٹ',
29
+ toolbarExportLabel: 'ایکسپورٹ',
30
+ toolbarExportCSV: 'CSV کے طور پر ڈاوٴنلوڈ کریں',
31
+ toolbarExportPrint: 'پرنٹ کریں',
32
+ toolbarExportExcel: 'ایکسل کے طور پر ڈاوٴنلوڈ کریں',
33
+ // Columns panel text
34
+ columnsPanelTextFieldLabel: 'کالم کو تلاش کریں',
35
+ columnsPanelTextFieldPlaceholder: 'کالم کا عنوان',
36
+ columnsPanelDragIconLabel: 'کالم کی ترتیب تبدیل کریں',
37
+ columnsPanelShowAllButton: 'سارے دکھائیں',
38
+ columnsPanelHideAllButton: 'سارے چھپائیں',
39
+ // Filter panel text
40
+ filterPanelAddFilter: 'نیا فلٹر',
41
+ filterPanelDeleteIconLabel: 'ختم کریں',
42
+ filterPanelLinkOperator: 'لاجک آپریٹر',
43
+ filterPanelOperators: 'آپریٹر',
44
+ // TODO v6: rename to filterPanelOperator
45
+ filterPanelOperatorAnd: 'اور',
46
+ filterPanelOperatorOr: 'یا',
47
+ filterPanelColumns: 'کالمز',
48
+ filterPanelInputLabel: 'ویلیو',
49
+ filterPanelInputPlaceholder: 'ویلیو کو فلٹر کریں',
50
+ // Filter operators text
51
+ filterOperatorContains: 'شامل ہے',
52
+ filterOperatorEquals: 'برابر ہے',
53
+ filterOperatorStartsWith: 'شروع ہوتا ہے',
54
+ filterOperatorEndsWith: 'ختم ہوتا ہے',
55
+ filterOperatorIs: 'ہے',
56
+ filterOperatorNot: 'نہیں',
57
+ filterOperatorAfter: 'بعد میں ہے',
58
+ filterOperatorOnOrAfter: 'پر یا بعد میں ہے',
59
+ filterOperatorBefore: 'پہلے ہے',
60
+ filterOperatorOnOrBefore: 'پر یا پہلے ہے',
61
+ filterOperatorIsEmpty: 'خالی ہے',
62
+ filterOperatorIsNotEmpty: 'خالی نہیں ہے',
63
+ filterOperatorIsAnyOf: 'ان میں سے کوئی ہے',
64
+ // Filter values text
65
+ filterValueAny: 'کوئی بھی',
66
+ filterValueTrue: 'صحیح',
67
+ filterValueFalse: 'غلط',
68
+ // Column menu text
69
+ columnMenuLabel: 'مینیو',
70
+ columnMenuShowColumns: 'کالم دکھائیں',
71
+ columnMenuFilter: 'فلٹر',
72
+ columnMenuHideColumn: 'چھپائیں',
73
+ columnMenuUnsort: 'sort ختم کریں',
74
+ columnMenuSortAsc: 'ترتیب صعودی',
75
+ columnMenuSortDesc: 'ترتیب نزولی',
76
+ // Column header text
77
+ columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} فعال فلٹرز` : `${count} فلٹرز فعال`,
78
+ columnHeaderFiltersLabel: 'فلٹرز دکھائیں',
79
+ columnHeaderSortIconLabel: 'Sort',
80
+ // Rows selected footer text
81
+ footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} منتخب قطاریں` : `${count.toLocaleString()} منتخب قطار`,
82
+ // Total row amount footer text
83
+ footerTotalRows: 'کل قطاریں:',
84
+ // Total visible row amount footer text
85
+ footerTotalVisibleRows: (visibleCount, totalCount) => `${totalCount.toLocaleString()} میں سے ${visibleCount.toLocaleString()}`,
86
+ // Checkbox selection text
87
+ checkboxSelectionHeaderName: 'چیک باکس منتخب کریں',
88
+ checkboxSelectionSelectAllRows: 'تمام قطاریں منتخب کریں',
89
+ checkboxSelectionUnselectAllRows: 'تمام قطاریں نامنتخب کریں ',
90
+ checkboxSelectionSelectRow: 'قطار منتخب کریں',
91
+ checkboxSelectionUnselectRow: 'قطار نامنتخب کریں',
92
+ // Boolean cell text
93
+ booleanCellTrueLabel: 'ہاں',
94
+ booleanCellFalseLabel: 'نہیں',
95
+ // Actions cell more text
96
+ actionsCellMore: 'ذیادہ',
97
+ // Column pinning text
98
+ pinToLeft: 'بائیں جانب pin کریں',
99
+ pinToRight: 'دائیں جانب pin کریں',
100
+ unpin: 'pin ختم کریں',
101
+ // Tree Data
102
+ treeDataGroupingHeaderName: 'گروپ',
103
+ treeDataExpand: 'شاخیں دیکھیں',
104
+ treeDataCollapse: 'شاخیں چھپائیں',
105
+ // Grouping columns
106
+ groupingColumnHeaderName: 'گروپ',
107
+ groupColumn: name => `${name} سے گروپ کریں`,
108
+ unGroupColumn: name => `${name} سے گروپ ختم کریں`,
109
+ // Master/detail
110
+ detailPanelToggle: 'ڈیٹیل پینل کھولیں / بند کریں',
111
+ expandDetailPanel: 'پھیلائیں',
112
+ collapseDetailPanel: 'تنگ کریں',
113
+ // Row reordering text
114
+ rowReorderingHeaderName: 'قطاروں کی ترتیب تبدیل کریں',
115
+ // Aggregation
116
+ aggregationMenuItemHeader: 'Aggregation',
117
+ aggregationFunctionLabelSum: 'sum',
118
+ aggregationFunctionLabelAvg: 'avg',
119
+ aggregationFunctionLabelMin: 'min',
120
+ aggregationFunctionLabelMax: 'max',
121
+ aggregationFunctionLabelSize: 'size'
122
+ };
123
+ export const urPK = getGridLocalization(urPKGrid, urPKCore);
@@ -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
- // toolbarQuickFilterPlaceholder: 'Search…',
25
- // toolbarQuickFilterLabel: 'Search',
26
- // toolbarQuickFilterDeleteIconLabel: 'Clear',
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
- // toolbarExportExcel: 'Download as Excel',
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
- // filterPanelLinkOperator: 'Logic operator',
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
- // checkboxSelectionSelectAllRows: 'Select all rows',
89
- // checkboxSelectionUnselectAllRows: 'Unselect all rows',
90
- // checkboxSelectionSelectRow: 'Select row',
91
- // checkboxSelectionUnselectRow: 'Unselect row',
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' // Grouping columns
105
- // groupingColumnHeaderName: 'Group',
106
- // groupColumn: name => `Group by ${name}`,
107
- // unGroupColumn: name => `Stop grouping by ${name}`,
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
- // detailPanelToggle: 'Detail panel toggle',
110
- // expandDetailPanel: 'Expand',
111
- // collapseDetailPanel: 'Collapse',
110
+ detailPanelToggle: 'Ẩn/hiện chi tiết',
111
+ expandDetailPanel: 'Mở rộng',
112
+ collapseDetailPanel: 'Thu nhỏ',
112
113
  // Row reordering text
113
- // rowReorderingHeaderName: 'Row reordering',
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: valueToRender == null ? void 0 : valueToRender.toString()
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
- if (isVisible) {
141
- return apiRef.current.setColumnVisibilityModel({});
142
- }
143
-
144
- return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.filter(col => col.hideable !== false).map(col => [col.field, false])));
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
 
@@ -47,6 +47,11 @@ function raf() {
47
47
  });
48
48
  }
49
49
 
50
+ function getChromeVersion() {
51
+ const raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
52
+ return raw ? parseInt(raw[2], 10) : null;
53
+ }
54
+
50
55
  /**
51
56
  * @requires useGridColumns (state)
52
57
  * @requires useGridFilter (state)
@@ -121,6 +126,13 @@ const useGridPrintExport = (apiRef, props) => {
121
126
 
122
127
  const gridMain = gridClone.querySelector(`.${_gridClasses.gridClasses.main}`);
123
128
  gridMain.style.overflow = 'visible';
129
+ const chromeVersion = getChromeVersion();
130
+
131
+ if (chromeVersion && chromeVersion >= 108) {
132
+ // See https://support.google.com/chrome/thread/191619088?hl=en&msgid=193009642
133
+ gridClone.style.contain = 'size';
134
+ }
135
+
124
136
  const columnHeaders = gridClone.querySelector(`.${_gridClasses.gridClasses.columnHeaders}`);
125
137
  const columnHeadersInner = columnHeaders.querySelector(`.${_gridClasses.gridClasses.columnHeadersInner}`);
126
138
  columnHeadersInner.style.width = '100%';
@@ -253,10 +265,14 @@ const useGridPrintExport = (apiRef, props) => {
253
265
  } else {
254
266
  printWindow.onload = () => {
255
267
  handlePrintWindowLoad(printWindow, options);
268
+ const mediaQueryList = printWindow.contentWindow.matchMedia('print');
269
+ mediaQueryList.addEventListener('change', mql => {
270
+ const isAfterPrint = mql.matches === false;
256
271
 
257
- printWindow.contentWindow.onafterprint = () => {
258
- handlePrintWindowAfterPrint(printWindow);
259
- };
272
+ if (isAfterPrint) {
273
+ handlePrintWindowAfterPrint(printWindow);
274
+ }
275
+ });
260
276
  };
261
277
 
262
278
  doc.current.body.appendChild(printWindow);
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI X v5.17.20
1
+ /** @license MUI X v5.17.22
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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 (!doc.getElementById('muiDetectElementResize')) {
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
- head = doc.head || doc.getElementsByTagName('head')[0],
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
- head.appendChild(style);
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';
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.beBY = void 0;
7
+
8
+ var _coreLocales = require("./coreLocales");
9
+
10
+ var _getGridLocalization = require("../utils/getGridLocalization");
11
+
12
+ const getPluralForm = (count, options) => {
13
+ let pluralForm = options.other;
14
+ const lastDigit = count % 10;
15
+
16
+ if (lastDigit > 1 && lastDigit < 5 && (count < 10 || count > 20)) {
17
+ pluralForm = options.twoToFour;
18
+ } else if (lastDigit === 1 && count % 100 !== 11) {
19
+ pluralForm = options.one;
20
+ }
21
+
22
+ return `${count} ${pluralForm}`;
23
+ };
24
+
25
+ const beBYGrid = {
26
+ // Root
27
+ noRowsLabel: 'Няма радкоў',
28
+ noResultsOverlayLabel: 'Дадзеныя не знойдзены.',
29
+ // errorOverlayDefaultLabel: 'An error occurred.',
30
+ // Density selector toolbar button text
31
+ toolbarDensity: 'Вышыня радка',
32
+ toolbarDensityLabel: 'Вышыня радка',
33
+ toolbarDensityCompact: 'Кампактны',
34
+ toolbarDensityStandard: 'Стандартны',
35
+ toolbarDensityComfortable: 'Камфортны',
36
+ // Columns selector toolbar button text
37
+ toolbarColumns: 'Слупкі',
38
+ toolbarColumnsLabel: 'Выберыце слупкі',
39
+ // Filters toolbar button text
40
+ toolbarFilters: 'Фільтры',
41
+ toolbarFiltersLabel: 'Паказаць фільтры',
42
+ toolbarFiltersTooltipHide: 'Схаваць фільтры',
43
+ toolbarFiltersTooltipShow: 'Паказаць фільтры',
44
+ toolbarFiltersTooltipActive: count => getPluralForm(count, {
45
+ one: 'актыўны фільтр',
46
+ twoToFour: 'актыўных фільтра',
47
+ other: 'актыўных фільтраў'
48
+ }),
49
+ // Quick filter toolbar field
50
+ toolbarQuickFilterPlaceholder: 'Пошук…',
51
+ toolbarQuickFilterLabel: 'Пошук',
52
+ toolbarQuickFilterDeleteIconLabel: 'Ачысціць',
53
+ // Export selector toolbar button text
54
+ toolbarExport: 'Экспарт',
55
+ toolbarExportLabel: 'Экспарт',
56
+ toolbarExportCSV: 'Спампаваць у фармаце CSV',
57
+ toolbarExportPrint: 'Друк',
58
+ toolbarExportExcel: 'Спампаваць у фармаце Excel',
59
+ // Columns panel text
60
+ columnsPanelTextFieldLabel: 'Знайсці слупок',
61
+ columnsPanelTextFieldPlaceholder: 'Загаловак слупка',
62
+ columnsPanelDragIconLabel: 'Змяніць чарговасць слупкоў',
63
+ columnsPanelShowAllButton: 'Паказаць усе',
64
+ columnsPanelHideAllButton: 'Схаваць усе',
65
+ // Filter panel text
66
+ filterPanelAddFilter: 'Дадаць фільтр',
67
+ filterPanelDeleteIconLabel: 'Выдаліць',
68
+ filterPanelLinkOperator: 'Лагічныя аператары',
69
+ filterPanelOperators: 'Аператары',
70
+ // TODO v6: rename to filterPanelOperator
71
+ filterPanelOperatorAnd: 'І',
72
+ filterPanelOperatorOr: 'Або',
73
+ filterPanelColumns: 'Слупкі',
74
+ filterPanelInputLabel: 'Значэнне',
75
+ filterPanelInputPlaceholder: 'Значэнне фільтра',
76
+ // Filter operators text
77
+ filterOperatorContains: 'змяшчае',
78
+ filterOperatorEquals: 'роўны',
79
+ filterOperatorStartsWith: 'пачынаецца з',
80
+ filterOperatorEndsWith: 'скончваецца на',
81
+ filterOperatorIs: 'роўны',
82
+ filterOperatorNot: 'не роўны',
83
+ filterOperatorAfter: 'больш чым',
84
+ filterOperatorOnOrAfter: 'больш ці роўны',
85
+ filterOperatorBefore: 'меньш чым',
86
+ filterOperatorOnOrBefore: 'меньш ці роўны',
87
+ filterOperatorIsEmpty: 'пусты',
88
+ filterOperatorIsNotEmpty: 'не пусты',
89
+ filterOperatorIsAnyOf: 'усякі з',
90
+ // Filter values text
91
+ filterValueAny: 'усякі',
92
+ filterValueTrue: 'праўда',
93
+ filterValueFalse: 'няпраўда',
94
+ // Column menu text
95
+ columnMenuLabel: 'Меню',
96
+ columnMenuShowColumns: 'Паказаць слупкі',
97
+ columnMenuFilter: 'Фільтр',
98
+ columnMenuHideColumn: 'Схаваць',
99
+ columnMenuUnsort: 'Скасаваць сартыроўку',
100
+ columnMenuSortAsc: 'Сартыраваць па нарастанню',
101
+ columnMenuSortDesc: 'Сартыраваць па спаданню',
102
+ // Column header text
103
+ columnHeaderFiltersTooltipActive: count => getPluralForm(count, {
104
+ one: 'актыўны фільтр',
105
+ twoToFour: 'актыўных фільтра',
106
+ other: 'актыўных фільтраў'
107
+ }),
108
+ columnHeaderFiltersLabel: 'Паказаць фільтры',
109
+ columnHeaderSortIconLabel: 'Сартыраваць',
110
+ // Rows selected footer text
111
+ footerRowSelected: count => getPluralForm(count, {
112
+ one: 'абраны радок',
113
+ twoToFour: 'абраных радка',
114
+ other: 'абраных радкоў'
115
+ }),
116
+ // Total row amount footer text
117
+ footerTotalRows: 'Усяго радкоў:',
118
+ // Total visible row amount footer text
119
+ footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} з ${totalCount.toLocaleString()}`,
120
+ // Checkbox selection text
121
+ checkboxSelectionHeaderName: 'Выбар сцяжка',
122
+ checkboxSelectionSelectAllRows: 'Абраць усе радкі',
123
+ checkboxSelectionUnselectAllRows: 'Скасаваць выбар усіх радкоў',
124
+ checkboxSelectionSelectRow: 'Абраць радок',
125
+ checkboxSelectionUnselectRow: 'Скасаваць выбар радка',
126
+ // Boolean cell text
127
+ booleanCellTrueLabel: 'праўда',
128
+ booleanCellFalseLabel: 'няпраўда',
129
+ // Actions cell more text
130
+ actionsCellMore: 'больш',
131
+ // Column pinning text
132
+ pinToLeft: 'Замацаваць злева',
133
+ pinToRight: 'Замацаваць справа',
134
+ unpin: 'Адмацаваць',
135
+ // Tree Data
136
+ treeDataGroupingHeaderName: 'Група',
137
+ treeDataExpand: 'паказаць даччыныя элементы',
138
+ treeDataCollapse: 'схаваць даччыныя элементы',
139
+ // Grouping columns
140
+ groupingColumnHeaderName: 'Група',
141
+ groupColumn: name => `Групаваць па ${name}`,
142
+ unGroupColumn: name => `Разгрупаваць па ${name}`,
143
+ // Master/detail
144
+ detailPanelToggle: 'Дэталі',
145
+ expandDetailPanel: 'Разгарнуць',
146
+ collapseDetailPanel: 'Згарнуць',
147
+ // Row reordering text
148
+ rowReorderingHeaderName: 'Змяненне чарговасці радкоў',
149
+ // Aggregation
150
+ aggregationMenuItemHeader: "Аб'яднанне дадзеных",
151
+ aggregationFunctionLabelSum: 'сума',
152
+ aggregationFunctionLabelAvg: 'сярэдняе',
153
+ aggregationFunctionLabelMin: 'мінімум',
154
+ aggregationFunctionLabelMax: 'максімум',
155
+ aggregationFunctionLabelSize: 'памер'
156
+ };
157
+ const beBY = (0, _getGridLocalization.getGridLocalization)(beBYGrid, _coreLocales.beBYCore);
158
+ exports.beBY = beBY;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.urPKCore = exports.beBYCore = void 0;
7
+ // This file contains copies of the core locales for `MuiTablePagination` released
8
+ // after the `@mui/material` package `v5.4.1` (peer dependency of `@mui/x-data-grid`).
9
+ // This allows not to bump the minimal version of `@mui/material` in peerDependencies which results
10
+ // in broader compatibility between the packages.
11
+ // See https://github.com/mui/mui-x/pull/7646#issuecomment-1404605556 for additional context.
12
+ const beBYCore = {
13
+ components: {
14
+ MuiTablePagination: {
15
+ defaultProps: {
16
+ getItemAriaLabel: type => {
17
+ if (type === 'first') {
18
+ return 'Перайсці на першую старонку';
19
+ }
20
+
21
+ if (type === 'last') {
22
+ return 'Перайсці на апошнюю старонку';
23
+ }
24
+
25
+ if (type === 'next') {
26
+ return 'Перайсці на наступную старонку';
27
+ } // if (type === 'previous') {
28
+
29
+
30
+ return 'Перайсці на папярэднюю старонку';
31
+ },
32
+ labelRowsPerPage: 'Радкоў на старонцы:',
33
+ labelDisplayedRows: ({
34
+ from,
35
+ to,
36
+ count
37
+ }) => `${from}–${to} з ${count !== -1 ? count : `больш чым ${to}`}`
38
+ }
39
+ }
40
+ }
41
+ };
42
+ exports.beBYCore = beBYCore;
43
+ const urPKCore = {
44
+ components: {
45
+ MuiTablePagination: {
46
+ defaultProps: {
47
+ getItemAriaLabel: type => {
48
+ if (type === 'first') {
49
+ return 'پہلے صفحے پر جائیں';
50
+ }
51
+
52
+ if (type === 'last') {
53
+ return 'آخری صفحے پر جائیں';
54
+ }
55
+
56
+ if (type === 'next') {
57
+ return 'اگلے صفحے پر جائیں';
58
+ } // if (type === 'previous') {
59
+
60
+
61
+ return 'پچھلے صفحے پر جائیں';
62
+ },
63
+ labelRowsPerPage: 'ایک صفحے پر قطاریں:',
64
+ labelDisplayedRows: ({
65
+ from,
66
+ to,
67
+ count
68
+ }) => `${count !== -1 ? `${count} میں سے` : `${to} سے ذیادہ میں سے`} ${from} سے ${to} قطاریں`
69
+ }
70
+ }
71
+ }
72
+ };
73
+ exports.urPKCore = urPKCore;