rsuite 5.80.3 → 5.82.0
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 +24 -0
- package/cjs/CheckTreePicker/CheckTreePicker.d.ts +4 -0
- package/cjs/CheckTreePicker/CheckTreePicker.js +31 -1
- package/cjs/locales/es_ES.js +1 -1
- package/cjs/locales/index.d.ts +2 -0
- package/cjs/locales/index.js +6 -2
- package/cjs/locales/th_TH.d.ts +163 -0
- package/cjs/locales/th_TH.js +94 -0
- package/cjs/locales/uk_UA.d.ts +151 -0
- package/cjs/locales/uk_UA.js +91 -0
- package/cjs/toaster/ToastContainer.js +8 -4
- package/dist/rsuite.js +2 -2
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/CheckTreePicker/CheckTreePicker.d.ts +4 -0
- package/esm/CheckTreePicker/CheckTreePicker.js +31 -1
- package/esm/locales/es_ES.js +1 -1
- package/esm/locales/index.d.ts +2 -0
- package/esm/locales/index.js +3 -1
- package/esm/locales/th_TH.d.ts +163 -0
- package/esm/locales/th_TH.js +89 -0
- package/esm/locales/uk_UA.d.ts +151 -0
- package/esm/locales/uk_UA.js +86 -0
- package/esm/toaster/ToastContainer.js +8 -4
- package/locales/th_TH/package.json +7 -0
- package/locales/uk_UA/package.json +7 -0
- package/package.json +1 -1
|
@@ -33,6 +33,10 @@ export interface CheckTreePickerProps<V = ValueType> extends Omit<CheckTreeViewP
|
|
|
33
33
|
* Custom render selected items
|
|
34
34
|
*/
|
|
35
35
|
renderValue?: (value: V, selectedNodes: TreeNode[], selectedElement: React.ReactNode) => React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* In the cascade case, the leaf node's value change callbacks
|
|
38
|
+
*/
|
|
39
|
+
onCascadeChange?: (v: ValueType, event: React.SyntheticEvent) => void;
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* The `CheckTreePicker` component is used for selecting multiple options which are organized in a tree structure.
|
|
@@ -5,7 +5,7 @@ import _omit from "lodash/omit";
|
|
|
5
5
|
import _isFunction from "lodash/isFunction";
|
|
6
6
|
import _pick from "lodash/pick";
|
|
7
7
|
import _isNil from "lodash/isNil";
|
|
8
|
-
var _excluded = ["as", "id", "appearance", "cleanable", "countable", "cascade", "classPrefix", "childrenKey", "disabled", "data", "defaultValue", "defaultExpandAll", "disabledItemValues", "expandItemValues", "defaultExpandItemValues", "placeholder", "popupClassName", "popupStyle", "popupAutoWidth", "placement", "treeHeight", "toggleAs", "menuAutoWidth", "menuClassName", "menuStyle", "style", "searchBy", "searchKeyword", "showIndentLine", "searchable", "valueKey", "value", "virtualized", "uncheckableItemValues", "locale", "labelKey", "listProps", "getChildren", "renderExtraFooter", "onEnter", "onChange", "onClean", "onExit", "onSearch", "onSelect", "onSelectItem", "onScroll", "onExpand", "renderValue", "renderMenu", "renderTree", "renderTreeIcon", "renderTreeNode"];
|
|
8
|
+
var _excluded = ["as", "id", "appearance", "cleanable", "countable", "cascade", "classPrefix", "childrenKey", "disabled", "data", "defaultValue", "defaultExpandAll", "disabledItemValues", "expandItemValues", "defaultExpandItemValues", "placeholder", "popupClassName", "popupStyle", "popupAutoWidth", "placement", "treeHeight", "toggleAs", "menuAutoWidth", "menuClassName", "menuStyle", "style", "searchBy", "searchKeyword", "showIndentLine", "searchable", "valueKey", "value", "virtualized", "uncheckableItemValues", "locale", "labelKey", "listProps", "getChildren", "renderExtraFooter", "onEnter", "onChange", "onClean", "onExit", "onSearch", "onSelect", "onSelectItem", "onScroll", "onExpand", "renderValue", "renderMenu", "renderTree", "renderTreeIcon", "renderTreeNode", "onCascadeChange"];
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { useClassNames, useEventCallback } from "../internals/hooks/index.js";
|
|
@@ -103,6 +103,7 @@ var CheckTreePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
103
103
|
renderTree = _propsWithDefaults$re === void 0 ? DEPRECATED_renderMenu : _propsWithDefaults$re,
|
|
104
104
|
renderTreeIcon = propsWithDefaults.renderTreeIcon,
|
|
105
105
|
renderTreeNode = propsWithDefaults.renderTreeNode,
|
|
106
|
+
onCascadeChange = propsWithDefaults.onCascadeChange,
|
|
106
107
|
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
107
108
|
var _usePickerRef = usePickerRef(ref),
|
|
108
109
|
trigger = _usePickerRef.trigger,
|
|
@@ -167,6 +168,7 @@ var CheckTreePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
167
168
|
setFocusItemValue(null);
|
|
168
169
|
setValue([]);
|
|
169
170
|
onChange === null || onChange === void 0 || onChange([], event);
|
|
171
|
+
onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange([], event);
|
|
170
172
|
});
|
|
171
173
|
var handleTreeKeyDown = useEventCallback(function (event) {
|
|
172
174
|
onMenuKeyDown(event, {
|
|
@@ -186,9 +188,37 @@ var CheckTreePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
186
188
|
onExit: handleClean,
|
|
187
189
|
onMenuKeyDown: handleTreeKeyDown
|
|
188
190
|
}, rest));
|
|
191
|
+
|
|
192
|
+
// transform the parent node value to the leaf node value
|
|
193
|
+
var handleTransValue2Children = useEventCallback(function (nextSelectedNodes) {
|
|
194
|
+
return nextSelectedNodes.map(function (node) {
|
|
195
|
+
var currentNode = node.refKey ? flattenedNodes[node.refKey] : null;
|
|
196
|
+
if (currentNode && currentNode[childrenKey] && currentNode[childrenKey].length) {
|
|
197
|
+
var childNodes = currentNode[childrenKey].filter(function (child) {
|
|
198
|
+
var childValue = child[valueKey];
|
|
199
|
+
return !disabledItemValues.includes(childValue) && !uncheckableItemValues.includes(childValue);
|
|
200
|
+
});
|
|
201
|
+
return handleTransValue2Children(childNodes);
|
|
202
|
+
}
|
|
203
|
+
return node;
|
|
204
|
+
}).flat();
|
|
205
|
+
});
|
|
206
|
+
var handleChangeCascade = useEventCallback(function (nextValue, event) {
|
|
207
|
+
if (!cascade) {
|
|
208
|
+
onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange(nextValue, event);
|
|
209
|
+
} else {
|
|
210
|
+
var nextSelectedNodes = getSelectedItems(flattenedNodes, nextValue);
|
|
211
|
+
var childrenNodes = handleTransValue2Children(nextSelectedNodes);
|
|
212
|
+
var childrenValue = childrenNodes.map(function (node) {
|
|
213
|
+
return node[valueKey];
|
|
214
|
+
});
|
|
215
|
+
onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange(childrenValue, event);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
189
218
|
var handleChange = useEventCallback(function (nextValue, event) {
|
|
190
219
|
setValue(nextValue);
|
|
191
220
|
onChange === null || onChange === void 0 || onChange(nextValue, event);
|
|
221
|
+
handleChangeCascade(nextValue, event);
|
|
192
222
|
});
|
|
193
223
|
var treeContext = useMemo(function () {
|
|
194
224
|
return {
|
package/esm/locales/es_ES.js
CHANGED
package/esm/locales/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export { default as jaJP } from './ja_JP';
|
|
|
26
26
|
export { default as neNP } from './ne_NP';
|
|
27
27
|
export { default as csCZ } from './cs_CZ';
|
|
28
28
|
export { default as plPL } from './pl_PL';
|
|
29
|
+
export { default as ukUA } from './uk_UA';
|
|
30
|
+
export { default as thTH } from './th_TH';
|
|
29
31
|
type PickKeys<T> = {
|
|
30
32
|
[keys in keyof T]?: T[keys];
|
|
31
33
|
};
|
package/esm/locales/index.js
CHANGED
|
@@ -24,4 +24,6 @@ export { default as frFR } from "./fr_FR.js";
|
|
|
24
24
|
export { default as jaJP } from "./ja_JP.js";
|
|
25
25
|
export { default as neNP } from "./ne_NP.js";
|
|
26
26
|
export { default as csCZ } from "./cs_CZ.js";
|
|
27
|
-
export { default as plPL } from "./pl_PL.js";
|
|
27
|
+
export { default as plPL } from "./pl_PL.js";
|
|
28
|
+
export { default as ukUA } from "./uk_UA.js";
|
|
29
|
+
export { default as thTH } from "./th_TH.js";
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
code: string;
|
|
3
|
+
common: {
|
|
4
|
+
loading: string;
|
|
5
|
+
emptyMessage: string;
|
|
6
|
+
remove: string;
|
|
7
|
+
clear: string;
|
|
8
|
+
};
|
|
9
|
+
Plaintext: {
|
|
10
|
+
unfilled: string;
|
|
11
|
+
notSelected: string;
|
|
12
|
+
notUploaded: string;
|
|
13
|
+
};
|
|
14
|
+
Pagination: {
|
|
15
|
+
more: string;
|
|
16
|
+
prev: string;
|
|
17
|
+
next: string;
|
|
18
|
+
first: string;
|
|
19
|
+
last: string;
|
|
20
|
+
limit: string;
|
|
21
|
+
total: string;
|
|
22
|
+
skip: string;
|
|
23
|
+
};
|
|
24
|
+
DateTimeFormats: {
|
|
25
|
+
sunday: string;
|
|
26
|
+
monday: string;
|
|
27
|
+
tuesday: string;
|
|
28
|
+
wednesday: string;
|
|
29
|
+
thursday: string;
|
|
30
|
+
friday: string;
|
|
31
|
+
saturday: string;
|
|
32
|
+
ok: string;
|
|
33
|
+
today: string;
|
|
34
|
+
yesterday: string;
|
|
35
|
+
now: string;
|
|
36
|
+
hours: string;
|
|
37
|
+
minutes: string;
|
|
38
|
+
seconds: string;
|
|
39
|
+
/**
|
|
40
|
+
* Reference from en_GB without modifications.
|
|
41
|
+
**/
|
|
42
|
+
formattedMonthPattern: string;
|
|
43
|
+
formattedDayPattern: string;
|
|
44
|
+
shortDateFormat: string;
|
|
45
|
+
shortTimeFormat: string;
|
|
46
|
+
dateLocale: any;
|
|
47
|
+
};
|
|
48
|
+
Calendar: {
|
|
49
|
+
sunday: string;
|
|
50
|
+
monday: string;
|
|
51
|
+
tuesday: string;
|
|
52
|
+
wednesday: string;
|
|
53
|
+
thursday: string;
|
|
54
|
+
friday: string;
|
|
55
|
+
saturday: string;
|
|
56
|
+
ok: string;
|
|
57
|
+
today: string;
|
|
58
|
+
yesterday: string;
|
|
59
|
+
now: string;
|
|
60
|
+
hours: string;
|
|
61
|
+
minutes: string;
|
|
62
|
+
seconds: string;
|
|
63
|
+
/**
|
|
64
|
+
* Reference from en_GB without modifications.
|
|
65
|
+
**/
|
|
66
|
+
formattedMonthPattern: string;
|
|
67
|
+
formattedDayPattern: string;
|
|
68
|
+
shortDateFormat: string;
|
|
69
|
+
shortTimeFormat: string;
|
|
70
|
+
dateLocale: any;
|
|
71
|
+
};
|
|
72
|
+
DatePicker: {
|
|
73
|
+
sunday: string;
|
|
74
|
+
monday: string;
|
|
75
|
+
tuesday: string;
|
|
76
|
+
wednesday: string;
|
|
77
|
+
thursday: string;
|
|
78
|
+
friday: string;
|
|
79
|
+
saturday: string;
|
|
80
|
+
ok: string;
|
|
81
|
+
today: string;
|
|
82
|
+
yesterday: string;
|
|
83
|
+
now: string;
|
|
84
|
+
hours: string;
|
|
85
|
+
minutes: string;
|
|
86
|
+
seconds: string;
|
|
87
|
+
/**
|
|
88
|
+
* Reference from en_GB without modifications.
|
|
89
|
+
**/
|
|
90
|
+
formattedMonthPattern: string;
|
|
91
|
+
formattedDayPattern: string;
|
|
92
|
+
shortDateFormat: string;
|
|
93
|
+
shortTimeFormat: string;
|
|
94
|
+
dateLocale: any;
|
|
95
|
+
};
|
|
96
|
+
DateRangePicker: {
|
|
97
|
+
last7Days: string;
|
|
98
|
+
sunday: string;
|
|
99
|
+
monday: string;
|
|
100
|
+
tuesday: string;
|
|
101
|
+
wednesday: string;
|
|
102
|
+
thursday: string;
|
|
103
|
+
friday: string;
|
|
104
|
+
saturday: string;
|
|
105
|
+
ok: string;
|
|
106
|
+
today: string;
|
|
107
|
+
yesterday: string;
|
|
108
|
+
now: string;
|
|
109
|
+
hours: string;
|
|
110
|
+
minutes: string;
|
|
111
|
+
seconds: string;
|
|
112
|
+
/**
|
|
113
|
+
* Reference from en_GB without modifications.
|
|
114
|
+
**/
|
|
115
|
+
formattedMonthPattern: string;
|
|
116
|
+
formattedDayPattern: string;
|
|
117
|
+
shortDateFormat: string;
|
|
118
|
+
shortTimeFormat: string;
|
|
119
|
+
dateLocale: any;
|
|
120
|
+
};
|
|
121
|
+
Combobox: {
|
|
122
|
+
noResultsText: string;
|
|
123
|
+
placeholder: string;
|
|
124
|
+
searchPlaceholder: string;
|
|
125
|
+
checkAll: string;
|
|
126
|
+
};
|
|
127
|
+
InputPicker: {
|
|
128
|
+
newItem: string;
|
|
129
|
+
createOption: string;
|
|
130
|
+
noResultsText: string;
|
|
131
|
+
placeholder: string;
|
|
132
|
+
searchPlaceholder: string;
|
|
133
|
+
checkAll: string;
|
|
134
|
+
};
|
|
135
|
+
TagPicker: {
|
|
136
|
+
newItem: string;
|
|
137
|
+
createOption: string;
|
|
138
|
+
noResultsText: string;
|
|
139
|
+
placeholder: string;
|
|
140
|
+
searchPlaceholder: string;
|
|
141
|
+
checkAll: string;
|
|
142
|
+
};
|
|
143
|
+
Uploader: {
|
|
144
|
+
inited: string;
|
|
145
|
+
progress: string;
|
|
146
|
+
error: string;
|
|
147
|
+
complete: string;
|
|
148
|
+
emptyFile: string;
|
|
149
|
+
upload: string;
|
|
150
|
+
removeFile: string;
|
|
151
|
+
};
|
|
152
|
+
CloseButton: {
|
|
153
|
+
closeLabel: string;
|
|
154
|
+
};
|
|
155
|
+
Breadcrumb: {
|
|
156
|
+
expandText: string;
|
|
157
|
+
};
|
|
158
|
+
Toggle: {
|
|
159
|
+
on: string;
|
|
160
|
+
off: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import th from 'date-fns/locale/th';
|
|
4
|
+
var DateTimeFormats = {
|
|
5
|
+
sunday: 'อา.',
|
|
6
|
+
monday: 'จ.',
|
|
7
|
+
tuesday: 'อ.',
|
|
8
|
+
wednesday: 'พ.',
|
|
9
|
+
thursday: 'พฤ.',
|
|
10
|
+
friday: 'ศ.',
|
|
11
|
+
saturday: 'ส.',
|
|
12
|
+
ok: 'ตกลง',
|
|
13
|
+
today: 'วันนี้',
|
|
14
|
+
yesterday: 'เมื่อวาน',
|
|
15
|
+
now: 'ตอนนี้',
|
|
16
|
+
hours: 'ชั่วโมง',
|
|
17
|
+
minutes: 'นาที',
|
|
18
|
+
seconds: 'วินาที',
|
|
19
|
+
/**
|
|
20
|
+
* Reference from en_GB without modifications.
|
|
21
|
+
**/
|
|
22
|
+
formattedMonthPattern: 'MMM yyyy',
|
|
23
|
+
formattedDayPattern: 'dd MMM yyyy',
|
|
24
|
+
shortDateFormat: 'dd/MM/yyyy',
|
|
25
|
+
shortTimeFormat: 'HH:mm',
|
|
26
|
+
dateLocale: th
|
|
27
|
+
};
|
|
28
|
+
var Combobox = {
|
|
29
|
+
noResultsText: 'ไม่พบผลลัพธ์',
|
|
30
|
+
placeholder: 'เลือก',
|
|
31
|
+
searchPlaceholder: 'ค้นหา',
|
|
32
|
+
checkAll: 'ทั้งหมด'
|
|
33
|
+
};
|
|
34
|
+
var CreatableComboBox = _extends({}, Combobox, {
|
|
35
|
+
newItem: 'รายการใหม่',
|
|
36
|
+
createOption: 'สร้างรายการ "{0}"'
|
|
37
|
+
});
|
|
38
|
+
export default {
|
|
39
|
+
code: 'th-TH',
|
|
40
|
+
common: {
|
|
41
|
+
loading: 'กำลังโหลด...',
|
|
42
|
+
emptyMessage: 'ไม่พบข้อมูล',
|
|
43
|
+
remove: 'ลบ',
|
|
44
|
+
clear: 'ล้าง'
|
|
45
|
+
},
|
|
46
|
+
Plaintext: {
|
|
47
|
+
unfilled: 'ไม่ได้ระบุ',
|
|
48
|
+
notSelected: 'ไม่ได้เลือก',
|
|
49
|
+
notUploaded: 'ไม่ได้อัพโหลด'
|
|
50
|
+
},
|
|
51
|
+
Pagination: {
|
|
52
|
+
more: 'เพิ่มเติม',
|
|
53
|
+
prev: 'ก่อนหน้า',
|
|
54
|
+
next: 'ถัดไป',
|
|
55
|
+
first: 'หน้าแรก',
|
|
56
|
+
last: 'หน้าสุดท้าย',
|
|
57
|
+
limit: '{0} / หน้า',
|
|
58
|
+
total: 'รายการทั้งหมด: {0}',
|
|
59
|
+
skip: 'ไปยัง {0}'
|
|
60
|
+
},
|
|
61
|
+
DateTimeFormats: DateTimeFormats,
|
|
62
|
+
Calendar: DateTimeFormats,
|
|
63
|
+
DatePicker: DateTimeFormats,
|
|
64
|
+
DateRangePicker: _extends({}, DateTimeFormats, {
|
|
65
|
+
last7Days: '7 วันที่ผ่านมา'
|
|
66
|
+
}),
|
|
67
|
+
Combobox: Combobox,
|
|
68
|
+
InputPicker: CreatableComboBox,
|
|
69
|
+
TagPicker: CreatableComboBox,
|
|
70
|
+
Uploader: {
|
|
71
|
+
inited: 'เริ่มต้น',
|
|
72
|
+
progress: 'กำลังอัพโหลด',
|
|
73
|
+
error: 'ข้อผิดพลาด',
|
|
74
|
+
complete: 'เสร็จสมบูรณ์',
|
|
75
|
+
emptyFile: 'ว่างเปล่า',
|
|
76
|
+
upload: 'อัพโหลด',
|
|
77
|
+
removeFile: 'ลบไฟล์'
|
|
78
|
+
},
|
|
79
|
+
CloseButton: {
|
|
80
|
+
closeLabel: 'ปิด'
|
|
81
|
+
},
|
|
82
|
+
Breadcrumb: {
|
|
83
|
+
expandText: 'แสดงเส้นทาง'
|
|
84
|
+
},
|
|
85
|
+
Toggle: {
|
|
86
|
+
on: 'เปิด',
|
|
87
|
+
off: 'ปิด'
|
|
88
|
+
}
|
|
89
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
code: string;
|
|
3
|
+
common: {
|
|
4
|
+
loading: string;
|
|
5
|
+
emptyMessage: string;
|
|
6
|
+
remove: string;
|
|
7
|
+
clear: string;
|
|
8
|
+
};
|
|
9
|
+
Plaintext: {
|
|
10
|
+
unfilled: string;
|
|
11
|
+
notSelected: string;
|
|
12
|
+
notUploaded: string;
|
|
13
|
+
};
|
|
14
|
+
Pagination: {
|
|
15
|
+
more: string;
|
|
16
|
+
prev: string;
|
|
17
|
+
next: string;
|
|
18
|
+
first: string;
|
|
19
|
+
last: string;
|
|
20
|
+
limit: string;
|
|
21
|
+
total: string;
|
|
22
|
+
skip: string;
|
|
23
|
+
};
|
|
24
|
+
DateTimeFormats: {
|
|
25
|
+
sunday: string;
|
|
26
|
+
monday: string;
|
|
27
|
+
tuesday: string;
|
|
28
|
+
wednesday: string;
|
|
29
|
+
thursday: string;
|
|
30
|
+
friday: string;
|
|
31
|
+
saturday: string;
|
|
32
|
+
ok: string;
|
|
33
|
+
today: string;
|
|
34
|
+
yesterday: string;
|
|
35
|
+
now: string;
|
|
36
|
+
hours: string;
|
|
37
|
+
minutes: string;
|
|
38
|
+
seconds: string;
|
|
39
|
+
formattedMonthPattern: string;
|
|
40
|
+
formattedDayPattern: string;
|
|
41
|
+
shortDateFormat: string;
|
|
42
|
+
shortTimeFormat: string;
|
|
43
|
+
dateLocale: any;
|
|
44
|
+
};
|
|
45
|
+
Calendar: {
|
|
46
|
+
sunday: string;
|
|
47
|
+
monday: string;
|
|
48
|
+
tuesday: string;
|
|
49
|
+
wednesday: string;
|
|
50
|
+
thursday: string;
|
|
51
|
+
friday: string;
|
|
52
|
+
saturday: string;
|
|
53
|
+
ok: string;
|
|
54
|
+
today: string;
|
|
55
|
+
yesterday: string;
|
|
56
|
+
now: string;
|
|
57
|
+
hours: string;
|
|
58
|
+
minutes: string;
|
|
59
|
+
seconds: string;
|
|
60
|
+
formattedMonthPattern: string;
|
|
61
|
+
formattedDayPattern: string;
|
|
62
|
+
shortDateFormat: string;
|
|
63
|
+
shortTimeFormat: string;
|
|
64
|
+
dateLocale: any;
|
|
65
|
+
};
|
|
66
|
+
DatePicker: {
|
|
67
|
+
sunday: string;
|
|
68
|
+
monday: string;
|
|
69
|
+
tuesday: string;
|
|
70
|
+
wednesday: string;
|
|
71
|
+
thursday: string;
|
|
72
|
+
friday: string;
|
|
73
|
+
saturday: string;
|
|
74
|
+
ok: string;
|
|
75
|
+
today: string;
|
|
76
|
+
yesterday: string;
|
|
77
|
+
now: string;
|
|
78
|
+
hours: string;
|
|
79
|
+
minutes: string;
|
|
80
|
+
seconds: string;
|
|
81
|
+
formattedMonthPattern: string;
|
|
82
|
+
formattedDayPattern: string;
|
|
83
|
+
shortDateFormat: string;
|
|
84
|
+
shortTimeFormat: string;
|
|
85
|
+
dateLocale: any;
|
|
86
|
+
};
|
|
87
|
+
DateRangePicker: {
|
|
88
|
+
last7Days: string;
|
|
89
|
+
sunday: string;
|
|
90
|
+
monday: string;
|
|
91
|
+
tuesday: string;
|
|
92
|
+
wednesday: string;
|
|
93
|
+
thursday: string;
|
|
94
|
+
friday: string;
|
|
95
|
+
saturday: string;
|
|
96
|
+
ok: string;
|
|
97
|
+
today: string;
|
|
98
|
+
yesterday: string;
|
|
99
|
+
now: string;
|
|
100
|
+
hours: string;
|
|
101
|
+
minutes: string;
|
|
102
|
+
seconds: string;
|
|
103
|
+
formattedMonthPattern: string;
|
|
104
|
+
formattedDayPattern: string;
|
|
105
|
+
shortDateFormat: string;
|
|
106
|
+
shortTimeFormat: string;
|
|
107
|
+
dateLocale: any;
|
|
108
|
+
};
|
|
109
|
+
Combobox: {
|
|
110
|
+
noResultsText: string;
|
|
111
|
+
placeholder: string;
|
|
112
|
+
searchPlaceholder: string;
|
|
113
|
+
checkAll: string;
|
|
114
|
+
};
|
|
115
|
+
InputPicker: {
|
|
116
|
+
newItem: string;
|
|
117
|
+
createOption: string;
|
|
118
|
+
noResultsText: string;
|
|
119
|
+
placeholder: string;
|
|
120
|
+
searchPlaceholder: string;
|
|
121
|
+
checkAll: string;
|
|
122
|
+
};
|
|
123
|
+
TagPicker: {
|
|
124
|
+
newItem: string;
|
|
125
|
+
createOption: string;
|
|
126
|
+
noResultsText: string;
|
|
127
|
+
placeholder: string;
|
|
128
|
+
searchPlaceholder: string;
|
|
129
|
+
checkAll: string;
|
|
130
|
+
};
|
|
131
|
+
Uploader: {
|
|
132
|
+
inited: string;
|
|
133
|
+
progress: string;
|
|
134
|
+
error: string;
|
|
135
|
+
complete: string;
|
|
136
|
+
emptyFile: string;
|
|
137
|
+
upload: string;
|
|
138
|
+
removeFile: string;
|
|
139
|
+
};
|
|
140
|
+
CloseButton: {
|
|
141
|
+
closeLabel: string;
|
|
142
|
+
};
|
|
143
|
+
Breadcrumb: {
|
|
144
|
+
expandText: string;
|
|
145
|
+
};
|
|
146
|
+
Toggle: {
|
|
147
|
+
on: string;
|
|
148
|
+
off: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import uk from 'date-fns/locale/uk';
|
|
4
|
+
var DateTimeFormats = {
|
|
5
|
+
sunday: 'Нд',
|
|
6
|
+
monday: 'Пн',
|
|
7
|
+
tuesday: 'Вт',
|
|
8
|
+
wednesday: 'Ср',
|
|
9
|
+
thursday: 'Чт',
|
|
10
|
+
friday: 'Пт',
|
|
11
|
+
saturday: 'Сб',
|
|
12
|
+
ok: 'ОК',
|
|
13
|
+
today: 'Сьогодні',
|
|
14
|
+
yesterday: 'Вчора',
|
|
15
|
+
now: 'Зараз',
|
|
16
|
+
hours: 'Години',
|
|
17
|
+
minutes: 'Хвилини',
|
|
18
|
+
seconds: 'Секунди',
|
|
19
|
+
formattedMonthPattern: 'MMM yyyy',
|
|
20
|
+
formattedDayPattern: 'dd MMM yyyy',
|
|
21
|
+
shortDateFormat: 'dd.MM.yyyy',
|
|
22
|
+
shortTimeFormat: 'HH:mm',
|
|
23
|
+
dateLocale: uk
|
|
24
|
+
};
|
|
25
|
+
var Combobox = {
|
|
26
|
+
noResultsText: 'Результати не знайдено',
|
|
27
|
+
placeholder: 'Вибрати',
|
|
28
|
+
searchPlaceholder: 'Пошук',
|
|
29
|
+
checkAll: 'Усі'
|
|
30
|
+
};
|
|
31
|
+
var CreatableComboBox = _extends({}, Combobox, {
|
|
32
|
+
newItem: 'Новий',
|
|
33
|
+
createOption: 'Створити опцію "{0}"'
|
|
34
|
+
});
|
|
35
|
+
export default {
|
|
36
|
+
code: 'uk-UA',
|
|
37
|
+
common: {
|
|
38
|
+
loading: 'Завантаження...',
|
|
39
|
+
emptyMessage: 'Дані не знайдено',
|
|
40
|
+
remove: 'Видалити',
|
|
41
|
+
clear: 'Очистити'
|
|
42
|
+
},
|
|
43
|
+
Plaintext: {
|
|
44
|
+
unfilled: 'Незаповнено',
|
|
45
|
+
notSelected: 'Не вибрано',
|
|
46
|
+
notUploaded: 'Не завантажено'
|
|
47
|
+
},
|
|
48
|
+
Pagination: {
|
|
49
|
+
more: 'Більше',
|
|
50
|
+
prev: 'Попередня',
|
|
51
|
+
next: 'Наступна',
|
|
52
|
+
first: 'Перша',
|
|
53
|
+
last: 'Остання',
|
|
54
|
+
limit: '{0} / сторінка',
|
|
55
|
+
total: 'Всього: {0}',
|
|
56
|
+
skip: 'Перейти до {0}'
|
|
57
|
+
},
|
|
58
|
+
DateTimeFormats: DateTimeFormats,
|
|
59
|
+
Calendar: DateTimeFormats,
|
|
60
|
+
DatePicker: DateTimeFormats,
|
|
61
|
+
DateRangePicker: _extends({}, DateTimeFormats, {
|
|
62
|
+
last7Days: 'Останні 7 днів'
|
|
63
|
+
}),
|
|
64
|
+
Combobox: Combobox,
|
|
65
|
+
InputPicker: CreatableComboBox,
|
|
66
|
+
TagPicker: CreatableComboBox,
|
|
67
|
+
Uploader: {
|
|
68
|
+
inited: 'Ініційовано',
|
|
69
|
+
progress: 'Завантаження',
|
|
70
|
+
error: 'Помилка',
|
|
71
|
+
complete: 'Завершено',
|
|
72
|
+
emptyFile: 'Порожній',
|
|
73
|
+
upload: 'Завантажити',
|
|
74
|
+
removeFile: 'Видалити файл'
|
|
75
|
+
},
|
|
76
|
+
CloseButton: {
|
|
77
|
+
closeLabel: 'Закрити'
|
|
78
|
+
},
|
|
79
|
+
Breadcrumb: {
|
|
80
|
+
expandText: 'Показати шлях'
|
|
81
|
+
},
|
|
82
|
+
Toggle: {
|
|
83
|
+
on: 'Увімкнено',
|
|
84
|
+
off: 'Вимкнено'
|
|
85
|
+
}
|
|
86
|
+
};
|
|
@@ -59,7 +59,9 @@ var useMessages = function useMessages() {
|
|
|
59
59
|
// Remove all invisible messages after 400ms.
|
|
60
60
|
// The delay removal here is to preserve the animation.
|
|
61
61
|
setTimeout(function () {
|
|
62
|
-
setMessages(
|
|
62
|
+
setMessages(function () {
|
|
63
|
+
return [];
|
|
64
|
+
});
|
|
63
65
|
}, 400);
|
|
64
66
|
}, [messages]);
|
|
65
67
|
var remove = useCallback(function (key) {
|
|
@@ -73,9 +75,11 @@ var useMessages = function useMessages() {
|
|
|
73
75
|
|
|
74
76
|
// Remove invisible messages after 400ms.
|
|
75
77
|
setTimeout(function () {
|
|
76
|
-
setMessages(
|
|
77
|
-
return msg
|
|
78
|
-
|
|
78
|
+
setMessages(function (prevMessages) {
|
|
79
|
+
return prevMessages.filter(function (msg) {
|
|
80
|
+
return msg.visible;
|
|
81
|
+
});
|
|
82
|
+
});
|
|
79
83
|
}, 400);
|
|
80
84
|
}, [messages, getKey]);
|
|
81
85
|
return {
|