@lemon-fe/components 1.4.10 → 1.4.12
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/es/base-table/locale/vi.d.ts +3 -0
- package/es/base-table/locale/vi.js +5 -0
- package/es/base-table/locale/zh_Hant_HK.d.ts +3 -0
- package/es/base-table/locale/zh_Hant_HK.js +5 -0
- package/es/color-picker/locale/vi.d.ts +3 -0
- package/es/color-picker/locale/vi.js +4 -0
- package/es/color-picker/locale/zh_Hant_HK.d.ts +3 -0
- package/es/color-picker/locale/zh_Hant_HK.js +4 -0
- package/es/data-grid/components/search.js +24 -15
- package/es/data-grid/locale/vi.d.ts +3 -0
- package/es/data-grid/locale/vi.js +60 -0
- package/es/data-grid/locale/zh_Hant_HK.d.ts +3 -0
- package/es/data-grid/locale/zh_Hant_HK.js +60 -0
- package/es/duration-picker/locale/vi.d.ts +3 -0
- package/es/duration-picker/locale/vi.js +14 -0
- package/es/duration-picker/locale/zh_Hant_HK.d.ts +3 -0
- package/es/duration-picker/locale/zh_Hant_HK.js +14 -0
- package/es/filter/locale/vi.d.ts +3 -0
- package/es/filter/locale/vi.js +29 -0
- package/es/filter/locale/zh_Hant_HK.d.ts +3 -0
- package/es/filter/locale/zh_Hant_HK.js +29 -0
- package/es/locale/vi.d.ts +3 -0
- package/es/locale/vi.js +29 -0
- package/es/locale/zh_Hant_HK.d.ts +3 -0
- package/es/locale/zh_Hant_HK.js +29 -0
- package/es/select/index.js +9 -3
- package/es/select-panel/locale/vi.d.ts +3 -0
- package/es/select-panel/locale/vi.js +5 -0
- package/es/select-panel/locale/zh_Hant_HK.d.ts +3 -0
- package/es/select-panel/locale/zh_Hant_HK.js +5 -0
- package/es/select-view/locale/vi.d.ts +3 -0
- package/es/select-view/locale/vi.js +6 -0
- package/es/select-view/locale/zh_Hant_HK.d.ts +3 -0
- package/es/select-view/locale/zh_Hant_HK.js +6 -0
- package/es/sider-tree/locale/vi.d.ts +3 -0
- package/es/sider-tree/locale/vi.js +5 -0
- package/es/sider-tree/locale/zh_Hant_HK.d.ts +3 -0
- package/es/sider-tree/locale/zh_Hant_HK.js +5 -0
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { Button, Input, Space } from 'antd';
|
|
14
|
-
import React, { forwardRef, memo, useState, useImperativeHandle, useMemo } from 'react';
|
|
14
|
+
import React, { forwardRef, memo, useState, useImperativeHandle, useMemo, useRef } from 'react';
|
|
15
15
|
import { useLocaleReceiver } from "../../locale-receiver";
|
|
16
16
|
import { useGridStore } from "../hooks";
|
|
17
17
|
import { useDebounce } from '@lemon-fe/hooks';
|
|
@@ -38,11 +38,18 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
|
|
|
38
38
|
var _useLocaleReceiver = useLocaleReceiver('DataGrid'),
|
|
39
39
|
_useLocaleReceiver2 = _slicedToArray(_useLocaleReceiver, 1),
|
|
40
40
|
dataGridLocale = _useLocaleReceiver2[0];
|
|
41
|
+
var searching = useRef(false);
|
|
41
42
|
var handleSearch = useDebounce(function (str) {
|
|
42
43
|
var keywords = str.trim();
|
|
44
|
+
var finish = function finish(newState) {
|
|
45
|
+
searching.current = false;
|
|
46
|
+
setState(function (pre) {
|
|
47
|
+
return _objectSpread(_objectSpread({}, pre), newState);
|
|
48
|
+
});
|
|
49
|
+
return newState;
|
|
50
|
+
};
|
|
43
51
|
if (keywords.length <= 0) {
|
|
44
|
-
|
|
45
|
-
return;
|
|
52
|
+
return finish(defaultState);
|
|
46
53
|
}
|
|
47
54
|
var cols = [];
|
|
48
55
|
if (searchFields) {
|
|
@@ -78,11 +85,9 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
|
|
|
78
85
|
}
|
|
79
86
|
}
|
|
80
87
|
});
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
index: -1
|
|
85
|
-
});
|
|
88
|
+
return finish({
|
|
89
|
+
nodes: nodes,
|
|
90
|
+
index: -1
|
|
86
91
|
});
|
|
87
92
|
}, 300);
|
|
88
93
|
var focusCell = function focusCell(index) {
|
|
@@ -119,12 +124,13 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
|
|
|
119
124
|
});
|
|
120
125
|
});
|
|
121
126
|
};
|
|
122
|
-
var handleNext = function handleNext() {
|
|
123
|
-
|
|
127
|
+
var handleNext = function handleNext(value) {
|
|
128
|
+
var data = value;
|
|
129
|
+
if (data.nodes.length <= 0) {
|
|
124
130
|
return;
|
|
125
131
|
}
|
|
126
|
-
var idx = (
|
|
127
|
-
focusCell(
|
|
132
|
+
var idx = (data.index + 1) % data.nodes.length;
|
|
133
|
+
focusCell(data.nodes[idx].index);
|
|
128
134
|
setState(function (prev) {
|
|
129
135
|
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
130
136
|
index: idx
|
|
@@ -148,12 +154,13 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
|
|
|
148
154
|
keywords: e.target.value
|
|
149
155
|
});
|
|
150
156
|
});
|
|
157
|
+
searching.current = true;
|
|
151
158
|
handleSearch(e.target.value);
|
|
152
159
|
},
|
|
153
160
|
suffix: /*#__PURE__*/React.createElement("span", null, "".concat(state.index + 1, "/").concat(state.nodes.length)),
|
|
154
|
-
|
|
161
|
+
onKeyDown: function onKeyDown(e) {
|
|
155
162
|
if (e.key === 'Enter') {
|
|
156
|
-
handleNext();
|
|
163
|
+
handleNext(searching.current ? handleSearch.flush() : state);
|
|
157
164
|
}
|
|
158
165
|
}
|
|
159
166
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -161,6 +168,8 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
|
|
|
161
168
|
onClick: handlePrev
|
|
162
169
|
}, dataGridLocale.searchPrevText), /*#__PURE__*/React.createElement(Button, {
|
|
163
170
|
size: "small",
|
|
164
|
-
onClick:
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
return handleNext(state);
|
|
173
|
+
}
|
|
165
174
|
}, dataGridLocale.searchNextText));
|
|
166
175
|
}));
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
localeText: {
|
|
3
|
+
copy: 'Sao chép',
|
|
4
|
+
copyWithHeaders: 'Sao chép (kèm tiêu đề cột)',
|
|
5
|
+
copyWithGroupHeaders: 'Sao chép (kèm tiêu đề nhóm cột)',
|
|
6
|
+
paste: 'Dán',
|
|
7
|
+
export: 'Xuất',
|
|
8
|
+
csvExport: 'Xuất dưới dạng CSV',
|
|
9
|
+
searchOoo: 'Tìm kiếm',
|
|
10
|
+
autosizeThiscolumn: 'Kích thước chiều rộng cột hiện tại tự thích ứng',
|
|
11
|
+
autosizeAllColumns: 'Kích thước chiều rộng tất cả các cột tự thích ứng',
|
|
12
|
+
resetColumns: 'Đặt lại tất cả các cột',
|
|
13
|
+
pinColumn: 'Gắn cột',
|
|
14
|
+
pinLeft: 'Gắn bên trái',
|
|
15
|
+
pinRight: 'Gắn bên phải',
|
|
16
|
+
noPin: 'Không gắn cột',
|
|
17
|
+
expandAll: 'Mở rộng tất cả',
|
|
18
|
+
collapseAll: 'Thu gọn tất cả',
|
|
19
|
+
columns: 'Cột',
|
|
20
|
+
sortAscending: 'Sắp xếp tăng dần',
|
|
21
|
+
sortDescending: 'Sắp xếp giảm dần'
|
|
22
|
+
},
|
|
23
|
+
pagination: {
|
|
24
|
+
totalText: 'Tổng cộng ${total} bản ghi'
|
|
25
|
+
},
|
|
26
|
+
fieldModal: {
|
|
27
|
+
addCustomColumnText: 'Thêm cột tùy chỉnh',
|
|
28
|
+
customColumnNameText: 'Tên cột tùy chỉnh',
|
|
29
|
+
customColumnExpressionText: 'Công thức tùy chỉnh',
|
|
30
|
+
customColumnExpressionPlaceholder: 'Độ dài tối đa của công thức tùy chỉnh là 300',
|
|
31
|
+
customColumnDecimalPlacesText: 'Số chữ số thập phân',
|
|
32
|
+
summaryText: 'Có thống kê tổng cộng không?',
|
|
33
|
+
summaryTypeText: 'Quy tắc tính tổng cộng',
|
|
34
|
+
summaryTypeContentText: "\n <div>\n <p>1. T\xEDnh t\u1ED5ng gi\xE1 tr\u1ECB d\u1EEF li\u1EC7u c\u1EE7a c\u1ED9t t\xF9y ch\u1EC9nh \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng.</p>\n <p>\n 2. Ngu\u1ED3n d\u1EEF li\u1EC7u t\xEDnh to\xE1n gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng theo c\xF4ng th\u1EE9c t\xEDnh to\xE1n.\n <br />\n C\xE1c tr\u01B0\u1EDDng \u0111\u01B0\u1EE3c th\xEAm v\xE0o trong c\xF4ng th\u1EE9c s\u1EBD \u0111\u01B0\u1EE3c t\xEDnh t\u1ED5ng tr\u01B0\u1EDBc, sau \u0111\xF3 t\xEDnh to\xE1n gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng theo c\xF4ng th\u1EE9c.\n </p>\n </div>\n ",
|
|
35
|
+
customSummaryDataText: 'Tính tổng giá trị dữ liệu của cột tùy chỉnh để có được giá trị tổng cộng',
|
|
36
|
+
dataSourceSummaryDataText: 'Nguồn dữ liệu tính toán giá trị tổng cộng theo công thức tính toán',
|
|
37
|
+
addFieldText: 'Thêm trường'
|
|
38
|
+
},
|
|
39
|
+
validate: {
|
|
40
|
+
fieldErrorText: 'Nhập sai trường ${field}'
|
|
41
|
+
},
|
|
42
|
+
maxWordText: 'Trường ${headerName} tối đa có ${maxLength} ký tự',
|
|
43
|
+
operationSuccessText: 'Thao tác thành công',
|
|
44
|
+
displayText: 'Hiển thị',
|
|
45
|
+
searchText: 'Nhấn Enter để tìm kiếm',
|
|
46
|
+
addCustomColumnText: 'Thêm cột tùy chỉnh',
|
|
47
|
+
resetText: 'Đặt lại',
|
|
48
|
+
saveText: 'Lưu',
|
|
49
|
+
editText: 'Chỉnh sửa',
|
|
50
|
+
deleteText: 'Xóa',
|
|
51
|
+
searchPlaceholderText: 'Nhập từ khóa để tìm kiếm',
|
|
52
|
+
searchPrevText: 'Trước đó',
|
|
53
|
+
searchNextText: 'Tiếp theo',
|
|
54
|
+
selectedTipText: 'Đã chọn ${length} bản ghi',
|
|
55
|
+
clearSelectedText: 'Xóa tất cả các mục đã chọn',
|
|
56
|
+
moreText: 'Thêm nhiều hơn',
|
|
57
|
+
actionText: 'Thao tác',
|
|
58
|
+
index: 'Số thứ tự'
|
|
59
|
+
};
|
|
60
|
+
export default locale;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
localeText: {
|
|
3
|
+
copy: '複製',
|
|
4
|
+
copyWithHeaders: '複製(帶表頭)',
|
|
5
|
+
copyWithGroupHeaders: '複製(帶表頭分組)',
|
|
6
|
+
paste: '黏貼',
|
|
7
|
+
export: '導出',
|
|
8
|
+
csvExport: 'CSV 導出',
|
|
9
|
+
searchOoo: '搜索',
|
|
10
|
+
autosizeThiscolumn: '當前列寬自適應',
|
|
11
|
+
autosizeAllColumns: '所有列寬自適應',
|
|
12
|
+
resetColumns: '重置所有列',
|
|
13
|
+
pinColumn: '固定列',
|
|
14
|
+
pinLeft: '固定在左側',
|
|
15
|
+
pinRight: '固定在右側',
|
|
16
|
+
noPin: '不固定',
|
|
17
|
+
expandAll: '展開所有',
|
|
18
|
+
collapseAll: '摺疊所有',
|
|
19
|
+
columns: '列',
|
|
20
|
+
sortAscending: '正序',
|
|
21
|
+
sortDescending: '逆序'
|
|
22
|
+
},
|
|
23
|
+
pagination: {
|
|
24
|
+
totalText: '共${total}條'
|
|
25
|
+
},
|
|
26
|
+
fieldModal: {
|
|
27
|
+
addCustomColumnText: '添加自定義列',
|
|
28
|
+
customColumnNameText: '自定義列名',
|
|
29
|
+
customColumnExpressionText: '自定義公式',
|
|
30
|
+
customColumnExpressionPlaceholder: '自定義公式長度上限300',
|
|
31
|
+
customColumnDecimalPlacesText: '小數位數',
|
|
32
|
+
summaryText: '是否統計合計',
|
|
33
|
+
summaryTypeText: '合計規則',
|
|
34
|
+
summaryTypeContentText: "\n <div>\n <p>1\u3001\u81EA\u5B9A\u7FA9\u5217\u6578\u64DA\u503C\u6C42\u548C\u5F97\u51FA\u5408\u8A08\u503C</p>\n <p>\n 2\u3001\u6578\u64DA\u6E90\u6839\u64DA\u8A08\u7B97\u516C\u5F0F\u5F97\u51FA\u5408\u8A08\u503C\n <br />\n \u516C\u5F0F\u4E2D\u6DFB\u52A0\u7684\u5B57\u6BB5\u5148\u6C42\u548C\uFF0C\u518D\u6839\u64DA\u8A08\u7B97\u516C\u5F0F\u8A08\u7B97\u51FA\u5408\u8A08\n </p>\n </div>\n ",
|
|
35
|
+
customSummaryDataText: '自定義列數據值求和得出合計值',
|
|
36
|
+
dataSourceSummaryDataText: '數據源根據計算公式得出合計值',
|
|
37
|
+
addFieldText: '添加字段'
|
|
38
|
+
},
|
|
39
|
+
validate: {
|
|
40
|
+
fieldErrorText: '${field}輸入錯誤'
|
|
41
|
+
},
|
|
42
|
+
maxWordText: '${headerName}最多${maxLength}個字符',
|
|
43
|
+
operationSuccessText: '操作成功',
|
|
44
|
+
displayText: '顯示',
|
|
45
|
+
searchText: '按回車進行搜索',
|
|
46
|
+
addCustomColumnText: '添加自定義列',
|
|
47
|
+
resetText: '重置',
|
|
48
|
+
saveText: '保存',
|
|
49
|
+
editText: '編輯',
|
|
50
|
+
deleteText: '刪除',
|
|
51
|
+
searchPlaceholderText: '輸入關鍵字搜索',
|
|
52
|
+
searchPrevText: '上一個',
|
|
53
|
+
searchNextText: '下一個',
|
|
54
|
+
selectedTipText: '已選${length}條',
|
|
55
|
+
clearSelectedText: '清空已選',
|
|
56
|
+
moreText: '更多',
|
|
57
|
+
actionText: '操作',
|
|
58
|
+
index: '序號'
|
|
59
|
+
};
|
|
60
|
+
export default locale;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
customDateText: 'Thời gian theo tùy chỉnh',
|
|
3
|
+
todayText: 'Hôm nay',
|
|
4
|
+
yesterdayText: 'Hôm qua',
|
|
5
|
+
thisWeekText: 'Tuần này',
|
|
6
|
+
lastWeekText: 'Tuần trước',
|
|
7
|
+
thisMonthText: 'Tháng này',
|
|
8
|
+
lastMonthText: 'Tháng trước',
|
|
9
|
+
lastThirtyDaysText: '30 ngày gần đây',
|
|
10
|
+
lastQuarterText: 'Quý trước',
|
|
11
|
+
thisQuarterText: 'Quý này',
|
|
12
|
+
thisYearText: 'Năm nay'
|
|
13
|
+
};
|
|
14
|
+
export default locale;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
customDateText: '自定義時間段',
|
|
3
|
+
todayText: '今天',
|
|
4
|
+
yesterdayText: '昨天',
|
|
5
|
+
thisWeekText: '本週',
|
|
6
|
+
lastWeekText: '上週',
|
|
7
|
+
thisMonthText: '本月',
|
|
8
|
+
lastMonthText: '上月',
|
|
9
|
+
lastThirtyDaysText: '最近30日',
|
|
10
|
+
lastQuarterText: '上季',
|
|
11
|
+
thisQuarterText: '本季',
|
|
12
|
+
thisYearText: '今年'
|
|
13
|
+
};
|
|
14
|
+
export default locale;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
savePlanModalTitle: 'Sơ đồ lọc',
|
|
3
|
+
planModalPatternWarning: 'Vui lòng không nhập ký tự đặc biệt: $',
|
|
4
|
+
planNameText: 'Tên',
|
|
5
|
+
removePlanText: 'Xóa sơ đồ',
|
|
6
|
+
planLimitText: 'Tổng số sơ đồ truy vấn không được vượt quá 6',
|
|
7
|
+
lableDateText: 'Ngày',
|
|
8
|
+
defaultTitleText: 'Mặc định',
|
|
9
|
+
noDefaultRemoveText: 'Không được phép xóa mục mặc định',
|
|
10
|
+
autoPlaceholderText: 'Vui lòng ${action} ${label}',
|
|
11
|
+
searchText: 'Truy vấn',
|
|
12
|
+
selectText: 'Chọn',
|
|
13
|
+
inputText: 'Nhập',
|
|
14
|
+
searchOptionText: 'Tùy chọn tìm kiếm',
|
|
15
|
+
advanceSearchText: 'Tìm kiếm nâng cao',
|
|
16
|
+
collapseSearchText: 'Thu gọn tìm kiếm',
|
|
17
|
+
resetText: 'Đặt lại',
|
|
18
|
+
hideOptionKeepOne: 'Vui lòng giữ ít nhất một tùy chọn lọc',
|
|
19
|
+
save: 'Lưu',
|
|
20
|
+
delete: 'Xóa',
|
|
21
|
+
rename: 'Đổi tên',
|
|
22
|
+
cancel: 'Hủy',
|
|
23
|
+
sameTitleWarning: 'Tên đã tồn tại, vui lòng nhập lại',
|
|
24
|
+
deleteModal: {
|
|
25
|
+
titleText: 'Thông báo',
|
|
26
|
+
confirmDeleteText: 'Bạn có chắc chắn muốn xóa ${title}?'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default locale;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
savePlanModalTitle: '篩選方案',
|
|
3
|
+
planModalPatternWarning: '請不要輸入特殊字符: $',
|
|
4
|
+
planNameText: '名稱',
|
|
5
|
+
removePlanText: '刪除方案',
|
|
6
|
+
planLimitText: '查詢方案總數不可超過6個',
|
|
7
|
+
lableDateText: '日期',
|
|
8
|
+
defaultTitleText: '默認',
|
|
9
|
+
noDefaultRemoveText: '不允許刪除默認',
|
|
10
|
+
autoPlaceholderText: '請${action}${label}',
|
|
11
|
+
searchText: '查詢',
|
|
12
|
+
selectText: '選擇',
|
|
13
|
+
inputText: '輸入',
|
|
14
|
+
searchOptionText: '搜索選項',
|
|
15
|
+
advanceSearchText: '高級搜索',
|
|
16
|
+
collapseSearchText: '收起搜索',
|
|
17
|
+
resetText: '重置',
|
|
18
|
+
hideOptionKeepOne: '請至少保留一個篩選項',
|
|
19
|
+
save: '保存',
|
|
20
|
+
delete: '刪除',
|
|
21
|
+
rename: '重新命名',
|
|
22
|
+
cancel: '取消',
|
|
23
|
+
sameTitleWarning: '名稱已存在,請重新填寫',
|
|
24
|
+
deleteModal: {
|
|
25
|
+
titleText: '提示',
|
|
26
|
+
confirmDeleteText: '確定刪除${title}?'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default locale;
|
package/es/locale/vi.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import antVi from 'antd/lib/locale/vi_VN';
|
|
8
|
+
import { default as BaseTable } from "../base-table/locale/vi";
|
|
9
|
+
import { default as ColorPickerLocale } from "../color-picker/locale/vi";
|
|
10
|
+
import { default as DataGridLocale } from "../data-grid/locale/vi";
|
|
11
|
+
import { default as DurationPickerLocale } from "../duration-picker/locale/vi";
|
|
12
|
+
import { default as Filter } from "../filter/locale/vi";
|
|
13
|
+
import { default as SelectPanelLocale } from "../select-panel/locale/vi";
|
|
14
|
+
import { default as SelectViewLocale } from "../select-view/locale/vi";
|
|
15
|
+
import { default as SiderTreeLocale } from "../sider-tree/locale/vi";
|
|
16
|
+
var vi = _objectSpread(_objectSpread({}, antVi), {}, {
|
|
17
|
+
Select: _objectSpread(_objectSpread({}, antVi.Select), {}, {
|
|
18
|
+
copy: 'Sao chép'
|
|
19
|
+
}),
|
|
20
|
+
Filter: Filter,
|
|
21
|
+
BaseTable: BaseTable,
|
|
22
|
+
ColorPicker: ColorPickerLocale,
|
|
23
|
+
DataGrid: DataGridLocale,
|
|
24
|
+
SiderTree: SiderTreeLocale,
|
|
25
|
+
SelectView: SelectViewLocale,
|
|
26
|
+
SelectPanel: SelectPanelLocale,
|
|
27
|
+
DurationPicker: DurationPickerLocale
|
|
28
|
+
});
|
|
29
|
+
export default vi;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import antZhHk from 'antd/lib/locale/zh_HK';
|
|
8
|
+
import { default as BaseTable } from "../base-table/locale/zh_Hant_HK";
|
|
9
|
+
import { default as ColorPickerLocale } from "../color-picker/locale/zh_Hant_HK";
|
|
10
|
+
import { default as DataGridLocale } from "../data-grid/locale/zh_Hant_HK";
|
|
11
|
+
import { default as DurationPickerLocale } from "../duration-picker/locale/zh_Hant_HK";
|
|
12
|
+
import { default as Filter } from "../filter/locale/zh_Hant_HK";
|
|
13
|
+
import { default as SelectPanelLocale } from "../select-panel/locale/zh_Hant_HK";
|
|
14
|
+
import { default as SelectViewLocale } from "../select-view/locale/zh_Hant_HK";
|
|
15
|
+
import { default as SiderTreeLocale } from "../sider-tree/locale/zh_Hant_HK";
|
|
16
|
+
var zhHantHk = _objectSpread(_objectSpread({}, antZhHk), {}, {
|
|
17
|
+
Select: _objectSpread(_objectSpread({}, antZhHk.Select), {}, {
|
|
18
|
+
copy: '複製'
|
|
19
|
+
}),
|
|
20
|
+
Filter: Filter,
|
|
21
|
+
BaseTable: BaseTable,
|
|
22
|
+
ColorPicker: ColorPickerLocale,
|
|
23
|
+
DataGrid: DataGridLocale,
|
|
24
|
+
SiderTree: SiderTreeLocale,
|
|
25
|
+
SelectView: SelectViewLocale,
|
|
26
|
+
SelectPanel: SelectPanelLocale,
|
|
27
|
+
DurationPicker: DurationPickerLocale
|
|
28
|
+
});
|
|
29
|
+
export default zhHantHk;
|
package/es/select/index.js
CHANGED
|
@@ -16,15 +16,21 @@ import Empty from "../empty";
|
|
|
16
16
|
import Icons from "../icons";
|
|
17
17
|
import { useLocaleReceiver } from "../locale-receiver";
|
|
18
18
|
import { mergeDefaultProps } from "../utils";
|
|
19
|
+
import { LoadingOutlined } from '@ant-design/icons';
|
|
19
20
|
|
|
20
21
|
// 这个必须加,否则部分select的样式会有问题
|
|
21
22
|
mergeDefaultProps(AntdSelect, {
|
|
22
|
-
clearIcon: Icons.Clear,
|
|
23
23
|
notFoundContent: /*#__PURE__*/React.createElement(Empty, {
|
|
24
24
|
imageStyle: {
|
|
25
25
|
height: 60
|
|
26
26
|
}
|
|
27
|
-
})
|
|
27
|
+
}),
|
|
28
|
+
suffixIcon: /*#__PURE__*/React.createElement(Icons.Down, {
|
|
29
|
+
style: {
|
|
30
|
+
pointerEvents: 'none'
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
clearIcon: /*#__PURE__*/React.createElement(Icons.Clear, null)
|
|
28
34
|
});
|
|
29
35
|
function InternalSelect(props, ref) {
|
|
30
36
|
var wrapper = useRef(null);
|
|
@@ -38,7 +44,7 @@ function InternalSelect(props, ref) {
|
|
|
38
44
|
style: {
|
|
39
45
|
pointerEvents: 'none'
|
|
40
46
|
}
|
|
41
|
-
}) :
|
|
47
|
+
}) : /*#__PURE__*/React.createElement(LoadingOutlined, null)
|
|
42
48
|
}, props, {
|
|
43
49
|
ref: ref
|
|
44
50
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.12",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"registry": "https://registry.npmjs.org"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "3115130fcdb626142ac775355fc2ae79a79dd647"
|
|
62
62
|
}
|