@lemon-fe/components 1.4.11 → 1.4.13-alpha.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.
Files changed (40) hide show
  1. package/es/base-table/locale/vi.d.ts +3 -0
  2. package/es/base-table/locale/vi.js +5 -0
  3. package/es/base-table/locale/zh_Hant_HK.d.ts +3 -0
  4. package/es/base-table/locale/zh_Hant_HK.js +5 -0
  5. package/es/color-picker/locale/vi.d.ts +3 -0
  6. package/es/color-picker/locale/vi.js +4 -0
  7. package/es/color-picker/locale/zh_Hant_HK.d.ts +3 -0
  8. package/es/color-picker/locale/zh_Hant_HK.js +4 -0
  9. package/es/data-grid/index.d.ts +1 -1
  10. package/es/data-grid/locale/vi.d.ts +3 -0
  11. package/es/data-grid/locale/vi.js +60 -0
  12. package/es/data-grid/locale/zh_Hant_HK.d.ts +3 -0
  13. package/es/data-grid/locale/zh_Hant_HK.js +60 -0
  14. package/es/duration-picker/locale/vi.d.ts +3 -0
  15. package/es/duration-picker/locale/vi.js +14 -0
  16. package/es/duration-picker/locale/zh_Hant_HK.d.ts +3 -0
  17. package/es/duration-picker/locale/zh_Hant_HK.js +14 -0
  18. package/es/filter/locale/vi.d.ts +3 -0
  19. package/es/filter/locale/vi.js +29 -0
  20. package/es/filter/locale/zh_Hant_HK.d.ts +3 -0
  21. package/es/filter/locale/zh_Hant_HK.js +29 -0
  22. package/es/locale/vi.d.ts +3 -0
  23. package/es/locale/vi.js +29 -0
  24. package/es/locale/zh_Hant_HK.d.ts +3 -0
  25. package/es/locale/zh_Hant_HK.js +29 -0
  26. package/es/select-panel/locale/vi.d.ts +3 -0
  27. package/es/select-panel/locale/vi.js +5 -0
  28. package/es/select-panel/locale/zh_Hant_HK.d.ts +3 -0
  29. package/es/select-panel/locale/zh_Hant_HK.js +5 -0
  30. package/es/select-view/locale/vi.d.ts +3 -0
  31. package/es/select-view/locale/vi.js +6 -0
  32. package/es/select-view/locale/zh_Hant_HK.d.ts +3 -0
  33. package/es/select-view/locale/zh_Hant_HK.js +6 -0
  34. package/es/sider-tree/index.d.ts +4 -0
  35. package/es/sider-tree/index.js +39 -28
  36. package/es/sider-tree/locale/vi.d.ts +3 -0
  37. package/es/sider-tree/locale/vi.js +5 -0
  38. package/es/sider-tree/locale/zh_Hant_HK.d.ts +3 -0
  39. package/es/sider-tree/locale/zh_Hant_HK.js +5 -0
  40. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ import type { BaseTableLocale } from './locale';
2
+ declare const locale: BaseTableLocale;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ var locale = {
2
+ noDataText: 'Chưa có dữ liệu',
3
+ dataTotalText: 'Tổng cộng ${total} bản ghi'
4
+ };
5
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { BaseTableLocale } from './locale';
2
+ declare const locale: BaseTableLocale;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ var locale = {
2
+ noDataText: '暫無數據',
3
+ dataTotalText: '共${total}條'
4
+ };
5
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { ColorPickerLocale } from './locale';
2
+ declare const locale: ColorPickerLocale;
3
+ export default locale;
@@ -0,0 +1,4 @@
1
+ var locale = {
2
+ gridientTooltipText: 'Độ trong suốt của màu, 0 cho độ trong suốt, 100 cho độ mờ'
3
+ };
4
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { ColorPickerLocale } from './locale';
2
+ declare const locale: ColorPickerLocale;
3
+ export default locale;
@@ -0,0 +1,4 @@
1
+ var locale = {
2
+ gridientTooltipText: '顏色的透明度,0表示透明,100表示不透明'
3
+ };
4
+ export default locale;
@@ -17,7 +17,7 @@ declare const Editors: {
17
17
  Text: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
18
18
  Date: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
19
19
  Number: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
20
- Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "allowClear" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
20
+ Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
21
21
  fieldNames?: {
22
22
  label: string;
23
23
  value: string;
@@ -0,0 +1,3 @@
1
+ import type { DataGridLocale } from './locale';
2
+ declare const locale: DataGridLocale;
3
+ export default locale;
@@ -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,3 @@
1
+ import type { DataGridLocale } from './locale';
2
+ declare const locale: DataGridLocale;
3
+ 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,3 @@
1
+ import type { DurationPickerLocale } from './locale';
2
+ declare const locale: DurationPickerLocale;
3
+ 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,3 @@
1
+ import type { DurationPickerLocale } from './locale';
2
+ declare const locale: DurationPickerLocale;
3
+ 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,3 @@
1
+ import type { FilterLocale } from './locale';
2
+ declare const locale: FilterLocale;
3
+ 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,3 @@
1
+ import type { FilterLocale } from './locale';
2
+ declare const locale: FilterLocale;
3
+ 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;
@@ -0,0 +1,3 @@
1
+ import type { Locale } from './locale';
2
+ declare const vi: Locale;
3
+ 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 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,3 @@
1
+ import type { Locale } from './locale';
2
+ declare const zhHantHk: Locale;
3
+ export default zhHantHk;
@@ -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;
@@ -0,0 +1,3 @@
1
+ import type { SelectPanelLocale } from './locale';
2
+ declare const locale: SelectPanelLocale;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ var locale = {
2
+ selectedDataText: 'Đã chọn ${length} mục',
3
+ clearText: 'Xóa sạch'
4
+ };
5
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { SelectPanelLocale } from './locale';
2
+ declare const locale: SelectPanelLocale;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ var locale = {
2
+ selectedDataText: '已選擇${length}個',
3
+ clearText: '清空'
4
+ };
5
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { SelectViewLocale } from './locale';
2
+ declare const locale: SelectViewLocale;
3
+ export default locale;
@@ -0,0 +1,6 @@
1
+ var locale = {
2
+ listText: 'Danh sách',
3
+ selectedDataText: 'Đã chọn (${length})',
4
+ clearText: 'Xóa sạch'
5
+ };
6
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { SelectViewLocale } from './locale';
2
+ declare const locale: SelectViewLocale;
3
+ export default locale;
@@ -0,0 +1,6 @@
1
+ var locale = {
2
+ listText: '列表',
3
+ selectedDataText: '已選擇(${length})',
4
+ clearText: '清空'
5
+ };
6
+ export default locale;
@@ -16,6 +16,10 @@ interface Props<KeyType> extends Omit<TreeProps, 'onSelect' | 'selectedKeys' | '
16
16
  defaultExpandedKeys?: KeyType[];
17
17
  active?: boolean;
18
18
  height?: number | 'auto';
19
+ /**
20
+ * @description 是否在搜索时保留父节点
21
+ */
22
+ filterKeepParents?: boolean;
19
23
  }
20
24
  declare function SiderTreeTabs(props: {
21
25
  tabs: {
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["tabs", "children"],
2
- _excluded2 = ["data", "showSearch", "placeholder", "onSelect", "filterNode", "operation", "header", "footer", "height"];
2
+ _excluded2 = ["data", "showSearch", "placeholder", "onSelect", "filterNode", "operation", "header", "footer", "height", "filterKeepParents"];
3
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -73,6 +73,7 @@ export default function SiderTree(props) {
73
73
  header = props.header,
74
74
  footer = props.footer,
75
75
  heightProp = props.height,
76
+ filterKeepParents = props.filterKeepParents,
76
77
  restProps = _objectWithoutProperties(props, _excluded2);
77
78
  var _useState = useState(''),
78
79
  _useState2 = _slicedToArray(_useState, 2),
@@ -87,14 +88,13 @@ export default function SiderTree(props) {
87
88
  SiderTreeLocale = _useLocaleReceiver2[0];
88
89
  var tree = useMemo(function () {
89
90
  var list = mData;
90
- if (keywords) {
91
- list = list.filter(function (item) {
92
- if (filterNode) {
93
- return filterNode(keywords, item);
94
- } else {
95
- return item.title.toString().toLowerCase().includes(keywords.toLowerCase());
96
- }
97
- });
91
+ var items = new Set();
92
+ var addedNodes = new Set();
93
+ var shouldInclude = function shouldInclude(item) {
94
+ return filterNode ? filterNode(keywords, item) : item.title.toString().includes(keywords);
95
+ };
96
+ if (keywords && !filterKeepParents) {
97
+ list = list.filter(shouldInclude);
98
98
  }
99
99
  var map = new Map(list.map(function (item) {
100
100
  return [item.key, {
@@ -102,30 +102,32 @@ export default function SiderTree(props) {
102
102
  parent: item.parent,
103
103
  icon: item.icon,
104
104
  data: item,
105
- title: /*#__PURE__*/React.createElement(TreeNodeTitle, {
106
- operation: operation,
107
- node: item,
108
- prefixCls: prefix()
109
- })
105
+ title: item.title
110
106
  }];
111
107
  }));
112
- var items = [];
113
- _toConsumableArray(map.values()).forEach(function (item) {
114
- var parent;
115
- if (item.parent !== undefined) {
116
- parent = map.get(item.parent);
108
+ list.forEach(function (item) {
109
+ if (keywords && !shouldInclude(item)) {
110
+ return;
117
111
  }
118
- if (!parent) {
119
- items.push(item);
120
- } else {
121
- if (parent.children === undefined) {
122
- parent.children = [];
112
+ var parent;
113
+ var node = map.get(item.key);
114
+ while (node) {
115
+ if (addedNodes.has(node)) {
116
+ return;
117
+ }
118
+ parent = node.parent ? map.get(node.parent) : undefined;
119
+ if (parent) {
120
+ parent.children = parent.children || [];
121
+ parent.children.push(node);
122
+ } else {
123
+ items.add(node);
123
124
  }
124
- parent.children.push(item);
125
+ addedNodes.add(node);
126
+ node = parent;
125
127
  }
126
128
  });
127
- return items;
128
- }, [mData, keywords]);
129
+ return _toConsumableArray(items);
130
+ }, [mData, keywords, filterKeepParents]);
129
131
  var handleChange = useDebounce(function (value) {
130
132
  setKeywords(value);
131
133
  }, 300);
@@ -141,14 +143,23 @@ export default function SiderTree(props) {
141
143
  prefix: /*#__PURE__*/React.createElement(Icons.Search, null)
142
144
  });
143
145
  }
146
+ var prefixCls = prefix();
144
147
  var bodyContent = tree.length <= 0 ? /*#__PURE__*/React.createElement("div", {
145
148
  className: prefix('empty')
146
149
  }, /*#__PURE__*/React.createElement(EmptyImage, null), /*#__PURE__*/React.createElement("div", null, SiderTreeLocale.noDataText)) : /*#__PURE__*/React.createElement(Tree, _extends({
150
+ // @ts-ignore antd Tree type error
147
151
  treeData: tree,
148
152
  itemHeight: 28,
149
153
  showLine: true,
150
154
  height: height,
151
- onSelect: function onSelect(_, info) {
155
+ titleRender: function titleRender(node) {
156
+ return /*#__PURE__*/React.createElement(TreeNodeTitle, {
157
+ operation: operation,
158
+ node: node.data,
159
+ prefixCls: prefixCls
160
+ });
161
+ },
162
+ onSelect: function onSelect(keys, info) {
152
163
  if (_onSelect) {
153
164
  _onSelect(info.node.data, info);
154
165
  }
@@ -0,0 +1,3 @@
1
+ import type { SiderTreeLocale } from './locale';
2
+ declare const locale: SiderTreeLocale;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ var locale = {
2
+ noDataText: 'Chưa có dữ liệu',
3
+ addText: 'Thêm mới'
4
+ };
5
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { SiderTreeLocale } from './locale';
2
+ declare const locale: SiderTreeLocale;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ var locale = {
2
+ noDataText: '暫無數據',
3
+ addText: '新增'
4
+ };
5
+ export default locale;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.4.11",
3
+ "version": "1.4.13-alpha.0",
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": "f95a565edfdb1d9c4937e75ab4c13fca67af3244"
61
+ "gitHead": "00899f57f0b55f7f3a06850c2d264a47ba675a44"
62
62
  }