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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# [5.82.0](https://github.com/rsuite/rsuite/compare/v5.81.0...v5.82.0) (2025-05-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **locale:** add support for Thai (th_TH) ([#4299](https://github.com/rsuite/rsuite/issues/4299)) ([91a7a45](https://github.com/rsuite/rsuite/commit/91a7a45c26d3f13df161fa56ef212bf17f61e460))
|
|
7
|
+
* **locales:** add Ukrainian (uk-UA) localization for DateRangePicker and other components ([#4288](https://github.com/rsuite/rsuite/issues/4288)) ([b8789ec](https://github.com/rsuite/rsuite/commit/b8789ec085fed00c5f4ddedf7f3ff82301c62b4b))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# [5.81.0](https://github.com/rsuite/rsuite/compare/v5.80.3...v5.81.0) (2025-05-23)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **toaster:** fix issue where delayed closing affects state ([#4294](https://github.com/rsuite/rsuite/issues/4294)) ([3279371](https://github.com/rsuite/rsuite/commit/32793717cd40f9c2e38d81d5830ffc438792b4f2))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **CheckTreePicker:** support onCascadeChange prop ([#4287](https://github.com/rsuite/rsuite/issues/4287)) ([48c5a9b](https://github.com/rsuite/rsuite/commit/48c5a9bc5f5885d8a6cff0a825f1a5ba7e885823))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
1
25
|
## [5.80.3](https://github.com/rsuite/rsuite/compare/v5.80.2...v5.80.3) (2025-05-17)
|
|
2
26
|
|
|
3
27
|
|
|
@@ -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.
|
|
@@ -24,7 +24,7 @@ var _useFocusState2 = _interopRequireDefault(require("./hooks/useFocusState"));
|
|
|
24
24
|
var _utils2 = require("../CheckTree/utils");
|
|
25
25
|
var _TreeProvider = require("../internals/Tree/TreeProvider");
|
|
26
26
|
var _CustomProvider = require("../CustomProvider");
|
|
27
|
-
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"];
|
|
27
|
+
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"];
|
|
28
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
30
|
/**
|
|
@@ -110,6 +110,7 @@ var CheckTreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, re
|
|
|
110
110
|
renderTree = _propsWithDefaults$re === void 0 ? DEPRECATED_renderMenu : _propsWithDefaults$re,
|
|
111
111
|
renderTreeIcon = propsWithDefaults.renderTreeIcon,
|
|
112
112
|
renderTreeNode = propsWithDefaults.renderTreeNode,
|
|
113
|
+
onCascadeChange = propsWithDefaults.onCascadeChange,
|
|
113
114
|
rest = (0, _objectWithoutPropertiesLoose2.default)(propsWithDefaults, _excluded);
|
|
114
115
|
var _usePickerRef = (0, _Picker.usePickerRef)(ref),
|
|
115
116
|
trigger = _usePickerRef.trigger,
|
|
@@ -174,6 +175,7 @@ var CheckTreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, re
|
|
|
174
175
|
setFocusItemValue(null);
|
|
175
176
|
setValue([]);
|
|
176
177
|
onChange === null || onChange === void 0 || onChange([], event);
|
|
178
|
+
onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange([], event);
|
|
177
179
|
});
|
|
178
180
|
var handleTreeKeyDown = (0, _hooks.useEventCallback)(function (event) {
|
|
179
181
|
(0, _Picker.onMenuKeyDown)(event, {
|
|
@@ -193,9 +195,37 @@ var CheckTreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, re
|
|
|
193
195
|
onExit: handleClean,
|
|
194
196
|
onMenuKeyDown: handleTreeKeyDown
|
|
195
197
|
}, rest));
|
|
198
|
+
|
|
199
|
+
// transform the parent node value to the leaf node value
|
|
200
|
+
var handleTransValue2Children = (0, _hooks.useEventCallback)(function (nextSelectedNodes) {
|
|
201
|
+
return nextSelectedNodes.map(function (node) {
|
|
202
|
+
var currentNode = node.refKey ? flattenedNodes[node.refKey] : null;
|
|
203
|
+
if (currentNode && currentNode[childrenKey] && currentNode[childrenKey].length) {
|
|
204
|
+
var childNodes = currentNode[childrenKey].filter(function (child) {
|
|
205
|
+
var childValue = child[valueKey];
|
|
206
|
+
return !disabledItemValues.includes(childValue) && !uncheckableItemValues.includes(childValue);
|
|
207
|
+
});
|
|
208
|
+
return handleTransValue2Children(childNodes);
|
|
209
|
+
}
|
|
210
|
+
return node;
|
|
211
|
+
}).flat();
|
|
212
|
+
});
|
|
213
|
+
var handleChangeCascade = (0, _hooks.useEventCallback)(function (nextValue, event) {
|
|
214
|
+
if (!cascade) {
|
|
215
|
+
onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange(nextValue, event);
|
|
216
|
+
} else {
|
|
217
|
+
var nextSelectedNodes = (0, _utils2.getSelectedItems)(flattenedNodes, nextValue);
|
|
218
|
+
var childrenNodes = handleTransValue2Children(nextSelectedNodes);
|
|
219
|
+
var childrenValue = childrenNodes.map(function (node) {
|
|
220
|
+
return node[valueKey];
|
|
221
|
+
});
|
|
222
|
+
onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange(childrenValue, event);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
196
225
|
var handleChange = (0, _hooks.useEventCallback)(function (nextValue, event) {
|
|
197
226
|
setValue(nextValue);
|
|
198
227
|
onChange === null || onChange === void 0 || onChange(nextValue, event);
|
|
228
|
+
handleChangeCascade(nextValue, event);
|
|
199
229
|
});
|
|
200
230
|
var treeContext = (0, _react.useMemo)(function () {
|
|
201
231
|
return {
|
package/cjs/locales/es_ES.js
CHANGED
package/cjs/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/cjs/locales/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports.zhTW = exports.zhCN = exports.trTR = exports.svSE = exports.ruRU = exports.ptBR = exports.plPL = exports.nlNL = exports.neNP = exports.koKR = exports.kkKZ = exports.jaJP = exports.itIT = exports.huHU = exports.frFR = exports.fiFI = exports.faIR = exports.esES = exports.esAR = exports.enUS = exports.enGB = exports.deDE = exports.daDK = exports.csCZ = exports.caES = exports.arEG = void 0;
|
|
6
|
+
exports.zhTW = exports.zhCN = exports.ukUA = exports.trTR = exports.thTH = exports.svSE = exports.ruRU = exports.ptBR = exports.plPL = exports.nlNL = exports.neNP = exports.koKR = exports.kkKZ = exports.jaJP = exports.itIT = exports.huHU = exports.frFR = exports.fiFI = exports.faIR = exports.esES = exports.esAR = exports.enUS = exports.enGB = exports.deDE = exports.daDK = exports.csCZ = exports.caES = exports.arEG = void 0;
|
|
7
7
|
var _ar_EG = _interopRequireDefault(require("./ar_EG"));
|
|
8
8
|
exports.arEG = _ar_EG.default;
|
|
9
9
|
var _da_DK = _interopRequireDefault(require("./da_DK"));
|
|
@@ -55,4 +55,8 @@ exports.neNP = _ne_NP.default;
|
|
|
55
55
|
var _cs_CZ = _interopRequireDefault(require("./cs_CZ"));
|
|
56
56
|
exports.csCZ = _cs_CZ.default;
|
|
57
57
|
var _pl_PL = _interopRequireDefault(require("./pl_PL"));
|
|
58
|
-
exports.plPL = _pl_PL.default;
|
|
58
|
+
exports.plPL = _pl_PL.default;
|
|
59
|
+
var _uk_UA = _interopRequireDefault(require("./uk_UA"));
|
|
60
|
+
exports.ukUA = _uk_UA.default;
|
|
61
|
+
var _th_TH = _interopRequireDefault(require("./th_TH"));
|
|
62
|
+
exports.thTH = _th_TH.default;
|
|
@@ -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,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
|
+
var _th = _interopRequireDefault(require("date-fns/locale/th"));
|
|
9
|
+
var DateTimeFormats = {
|
|
10
|
+
sunday: 'อา.',
|
|
11
|
+
monday: 'จ.',
|
|
12
|
+
tuesday: 'อ.',
|
|
13
|
+
wednesday: 'พ.',
|
|
14
|
+
thursday: 'พฤ.',
|
|
15
|
+
friday: 'ศ.',
|
|
16
|
+
saturday: 'ส.',
|
|
17
|
+
ok: 'ตกลง',
|
|
18
|
+
today: 'วันนี้',
|
|
19
|
+
yesterday: 'เมื่อวาน',
|
|
20
|
+
now: 'ตอนนี้',
|
|
21
|
+
hours: 'ชั่วโมง',
|
|
22
|
+
minutes: 'นาที',
|
|
23
|
+
seconds: 'วินาที',
|
|
24
|
+
/**
|
|
25
|
+
* Reference from en_GB without modifications.
|
|
26
|
+
**/
|
|
27
|
+
formattedMonthPattern: 'MMM yyyy',
|
|
28
|
+
formattedDayPattern: 'dd MMM yyyy',
|
|
29
|
+
shortDateFormat: 'dd/MM/yyyy',
|
|
30
|
+
shortTimeFormat: 'HH:mm',
|
|
31
|
+
dateLocale: _th.default
|
|
32
|
+
};
|
|
33
|
+
var Combobox = {
|
|
34
|
+
noResultsText: 'ไม่พบผลลัพธ์',
|
|
35
|
+
placeholder: 'เลือก',
|
|
36
|
+
searchPlaceholder: 'ค้นหา',
|
|
37
|
+
checkAll: 'ทั้งหมด'
|
|
38
|
+
};
|
|
39
|
+
var CreatableComboBox = (0, _extends2.default)({}, Combobox, {
|
|
40
|
+
newItem: 'รายการใหม่',
|
|
41
|
+
createOption: 'สร้างรายการ "{0}"'
|
|
42
|
+
});
|
|
43
|
+
var _default = exports.default = {
|
|
44
|
+
code: 'th-TH',
|
|
45
|
+
common: {
|
|
46
|
+
loading: 'กำลังโหลด...',
|
|
47
|
+
emptyMessage: 'ไม่พบข้อมูล',
|
|
48
|
+
remove: 'ลบ',
|
|
49
|
+
clear: 'ล้าง'
|
|
50
|
+
},
|
|
51
|
+
Plaintext: {
|
|
52
|
+
unfilled: 'ไม่ได้ระบุ',
|
|
53
|
+
notSelected: 'ไม่ได้เลือก',
|
|
54
|
+
notUploaded: 'ไม่ได้อัพโหลด'
|
|
55
|
+
},
|
|
56
|
+
Pagination: {
|
|
57
|
+
more: 'เพิ่มเติม',
|
|
58
|
+
prev: 'ก่อนหน้า',
|
|
59
|
+
next: 'ถัดไป',
|
|
60
|
+
first: 'หน้าแรก',
|
|
61
|
+
last: 'หน้าสุดท้าย',
|
|
62
|
+
limit: '{0} / หน้า',
|
|
63
|
+
total: 'รายการทั้งหมด: {0}',
|
|
64
|
+
skip: 'ไปยัง {0}'
|
|
65
|
+
},
|
|
66
|
+
DateTimeFormats: DateTimeFormats,
|
|
67
|
+
Calendar: DateTimeFormats,
|
|
68
|
+
DatePicker: DateTimeFormats,
|
|
69
|
+
DateRangePicker: (0, _extends2.default)({}, DateTimeFormats, {
|
|
70
|
+
last7Days: '7 วันที่ผ่านมา'
|
|
71
|
+
}),
|
|
72
|
+
Combobox: Combobox,
|
|
73
|
+
InputPicker: CreatableComboBox,
|
|
74
|
+
TagPicker: CreatableComboBox,
|
|
75
|
+
Uploader: {
|
|
76
|
+
inited: 'เริ่มต้น',
|
|
77
|
+
progress: 'กำลังอัพโหลด',
|
|
78
|
+
error: 'ข้อผิดพลาด',
|
|
79
|
+
complete: 'เสร็จสมบูรณ์',
|
|
80
|
+
emptyFile: 'ว่างเปล่า',
|
|
81
|
+
upload: 'อัพโหลด',
|
|
82
|
+
removeFile: 'ลบไฟล์'
|
|
83
|
+
},
|
|
84
|
+
CloseButton: {
|
|
85
|
+
closeLabel: 'ปิด'
|
|
86
|
+
},
|
|
87
|
+
Breadcrumb: {
|
|
88
|
+
expandText: 'แสดงเส้นทาง'
|
|
89
|
+
},
|
|
90
|
+
Toggle: {
|
|
91
|
+
on: 'เปิด',
|
|
92
|
+
off: 'ปิด'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
@@ -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,91 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
|
+
var _uk = _interopRequireDefault(require("date-fns/locale/uk"));
|
|
9
|
+
var DateTimeFormats = {
|
|
10
|
+
sunday: 'Нд',
|
|
11
|
+
monday: 'Пн',
|
|
12
|
+
tuesday: 'Вт',
|
|
13
|
+
wednesday: 'Ср',
|
|
14
|
+
thursday: 'Чт',
|
|
15
|
+
friday: 'Пт',
|
|
16
|
+
saturday: 'Сб',
|
|
17
|
+
ok: 'ОК',
|
|
18
|
+
today: 'Сьогодні',
|
|
19
|
+
yesterday: 'Вчора',
|
|
20
|
+
now: 'Зараз',
|
|
21
|
+
hours: 'Години',
|
|
22
|
+
minutes: 'Хвилини',
|
|
23
|
+
seconds: 'Секунди',
|
|
24
|
+
formattedMonthPattern: 'MMM yyyy',
|
|
25
|
+
formattedDayPattern: 'dd MMM yyyy',
|
|
26
|
+
shortDateFormat: 'dd.MM.yyyy',
|
|
27
|
+
shortTimeFormat: 'HH:mm',
|
|
28
|
+
dateLocale: _uk.default
|
|
29
|
+
};
|
|
30
|
+
var Combobox = {
|
|
31
|
+
noResultsText: 'Результати не знайдено',
|
|
32
|
+
placeholder: 'Вибрати',
|
|
33
|
+
searchPlaceholder: 'Пошук',
|
|
34
|
+
checkAll: 'Усі'
|
|
35
|
+
};
|
|
36
|
+
var CreatableComboBox = (0, _extends2.default)({}, Combobox, {
|
|
37
|
+
newItem: 'Новий',
|
|
38
|
+
createOption: 'Створити опцію "{0}"'
|
|
39
|
+
});
|
|
40
|
+
var _default = exports.default = {
|
|
41
|
+
code: 'uk-UA',
|
|
42
|
+
common: {
|
|
43
|
+
loading: 'Завантаження...',
|
|
44
|
+
emptyMessage: 'Дані не знайдено',
|
|
45
|
+
remove: 'Видалити',
|
|
46
|
+
clear: 'Очистити'
|
|
47
|
+
},
|
|
48
|
+
Plaintext: {
|
|
49
|
+
unfilled: 'Незаповнено',
|
|
50
|
+
notSelected: 'Не вибрано',
|
|
51
|
+
notUploaded: 'Не завантажено'
|
|
52
|
+
},
|
|
53
|
+
Pagination: {
|
|
54
|
+
more: 'Більше',
|
|
55
|
+
prev: 'Попередня',
|
|
56
|
+
next: 'Наступна',
|
|
57
|
+
first: 'Перша',
|
|
58
|
+
last: 'Остання',
|
|
59
|
+
limit: '{0} / сторінка',
|
|
60
|
+
total: 'Всього: {0}',
|
|
61
|
+
skip: 'Перейти до {0}'
|
|
62
|
+
},
|
|
63
|
+
DateTimeFormats: DateTimeFormats,
|
|
64
|
+
Calendar: DateTimeFormats,
|
|
65
|
+
DatePicker: DateTimeFormats,
|
|
66
|
+
DateRangePicker: (0, _extends2.default)({}, DateTimeFormats, {
|
|
67
|
+
last7Days: 'Останні 7 днів'
|
|
68
|
+
}),
|
|
69
|
+
Combobox: Combobox,
|
|
70
|
+
InputPicker: CreatableComboBox,
|
|
71
|
+
TagPicker: CreatableComboBox,
|
|
72
|
+
Uploader: {
|
|
73
|
+
inited: 'Ініційовано',
|
|
74
|
+
progress: 'Завантаження',
|
|
75
|
+
error: 'Помилка',
|
|
76
|
+
complete: 'Завершено',
|
|
77
|
+
emptyFile: 'Порожній',
|
|
78
|
+
upload: 'Завантажити',
|
|
79
|
+
removeFile: 'Видалити файл'
|
|
80
|
+
},
|
|
81
|
+
CloseButton: {
|
|
82
|
+
closeLabel: 'Закрити'
|
|
83
|
+
},
|
|
84
|
+
Breadcrumb: {
|
|
85
|
+
expandText: 'Показати шлях'
|
|
86
|
+
},
|
|
87
|
+
Toggle: {
|
|
88
|
+
on: 'Увімкнено',
|
|
89
|
+
off: 'Вимкнено'
|
|
90
|
+
}
|
|
91
|
+
};
|
|
@@ -66,7 +66,9 @@ var useMessages = function useMessages() {
|
|
|
66
66
|
// Remove all invisible messages after 400ms.
|
|
67
67
|
// The delay removal here is to preserve the animation.
|
|
68
68
|
setTimeout(function () {
|
|
69
|
-
setMessages(
|
|
69
|
+
setMessages(function () {
|
|
70
|
+
return [];
|
|
71
|
+
});
|
|
70
72
|
}, 400);
|
|
71
73
|
}, [messages]);
|
|
72
74
|
var remove = (0, _react.useCallback)(function (key) {
|
|
@@ -80,9 +82,11 @@ var useMessages = function useMessages() {
|
|
|
80
82
|
|
|
81
83
|
// Remove invisible messages after 400ms.
|
|
82
84
|
setTimeout(function () {
|
|
83
|
-
setMessages(
|
|
84
|
-
return msg
|
|
85
|
-
|
|
85
|
+
setMessages(function (prevMessages) {
|
|
86
|
+
return prevMessages.filter(function (msg) {
|
|
87
|
+
return msg.visible;
|
|
88
|
+
});
|
|
89
|
+
});
|
|
86
90
|
}, 400);
|
|
87
91
|
}, [messages, getKey]);
|
|
88
92
|
return {
|