zmdms-webui 3.5.1 → 3.5.3

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 (148) hide show
  1. package/dist/es/applayoutheader/setting/fullCom.js +5 -1
  2. package/dist/es/applayoutheader/setting/userInfo.js +9 -5
  3. package/dist/es/applayoutheader/setting/userInfoModal.js +18 -12
  4. package/dist/es/applayoutheader/setting/userPwdModal.js +19 -13
  5. package/dist/es/applayoutheader/tabs/index.js +10 -6
  6. package/dist/es/applayoutsider/menu/Logo.js +5 -1
  7. package/dist/es/applayoutsider/menu/SearchInput.js +6 -2
  8. package/dist/es/applayoutsider/menu/SubMenu.js +6 -2
  9. package/dist/es/asyncdynamicsetting/asyncDynamicDrawer.js +2 -0
  10. package/dist/es/asyncdynamicsetting/useAsyncDrawer.js +2 -0
  11. package/dist/es/button/button.js +4 -2
  12. package/dist/es/button/buttonDownload.js +6 -4
  13. package/dist/es/button/buttonExport.js +8 -4
  14. package/dist/es/button/buttonPreview.js +6 -3
  15. package/dist/es/canvastable/canvasTable.js +33 -29
  16. package/dist/es/canvastable/components/CanvasTableMenu.js +5 -1
  17. package/dist/es/canvastable/components/FilterPopover.js +15 -11
  18. package/dist/es/canvastable/hooks/useProcessedColumns.js +7 -2
  19. package/dist/es/canvastable/hooks/useSummaryRow.js +6 -2
  20. package/dist/es/canvastable/hooks/useTableRender.js +5 -1
  21. package/dist/es/chatroom/chat-room.js +8 -3
  22. package/dist/es/config/i18n/en/appLayoutHeader.js +70 -0
  23. package/dist/es/config/i18n/en/appLayoutSider.js +14 -0
  24. package/dist/es/config/i18n/en/asyncDynamicSetting.js +42 -0
  25. package/dist/es/config/i18n/en/authLoading.js +6 -0
  26. package/dist/es/config/i18n/en/button.js +14 -0
  27. package/dist/es/config/i18n/en/canvasTable.js +50 -0
  28. package/dist/es/config/i18n/en/chatRoom.js +14 -0
  29. package/dist/es/config/i18n/en/datePicker.js +22 -0
  30. package/dist/es/config/i18n/en/detailList.js +6 -0
  31. package/dist/es/config/i18n/en/differences.js +6 -0
  32. package/dist/es/config/i18n/en/dynamicSetting.js +72 -0
  33. package/dist/es/config/i18n/en/electronSignatures.js +173 -0
  34. package/dist/es/config/i18n/en/enhanceSelect.js +8 -0
  35. package/dist/es/config/i18n/en/footer.js +8 -0
  36. package/dist/es/config/i18n/en/form.js +26 -0
  37. package/dist/es/config/i18n/en/formItem.js +8 -0
  38. package/dist/es/config/i18n/en/inputNumber.js +7 -0
  39. package/dist/es/config/i18n/en/login.js +76 -0
  40. package/dist/es/config/i18n/en/modal.js +8 -0
  41. package/dist/es/config/i18n/en/notAuthPage.js +8 -0
  42. package/dist/es/config/i18n/en/notRoutePage.js +8 -0
  43. package/dist/es/config/i18n/en/operationBtn.js +10 -0
  44. package/dist/es/config/i18n/en/print.js +16 -0
  45. package/dist/es/config/i18n/en/select.js +6 -0
  46. package/dist/es/config/i18n/en/table.js +65 -0
  47. package/dist/es/config/i18n/en/tabs.js +10 -0
  48. package/dist/es/config/i18n/en/translationButton.js +26 -0
  49. package/dist/es/config/i18n/en/tree.js +6 -0
  50. package/dist/es/config/i18n/en/uploadList.js +82 -0
  51. package/dist/es/config/i18n/en/ztTransfer.js +14 -0
  52. package/dist/es/config/i18n/en.js +65 -1
  53. package/dist/es/config/i18n/i18nInstance.js +33 -0
  54. package/dist/es/config/i18n/zh_cn/appLayoutHeader.js +70 -0
  55. package/dist/es/config/i18n/zh_cn/appLayoutSider.js +14 -0
  56. package/dist/es/config/i18n/zh_cn/asyncDynamicSetting.js +42 -0
  57. package/dist/es/config/i18n/zh_cn/authLoading.js +6 -0
  58. package/dist/es/config/i18n/zh_cn/button.js +14 -0
  59. package/dist/es/config/i18n/zh_cn/canvasTable.js +50 -0
  60. package/dist/es/config/i18n/zh_cn/chatRoom.js +14 -0
  61. package/dist/es/config/i18n/zh_cn/datePicker.js +22 -0
  62. package/dist/es/config/i18n/zh_cn/detailList.js +6 -0
  63. package/dist/es/config/i18n/zh_cn/differences.js +6 -0
  64. package/dist/es/config/i18n/zh_cn/dynamicSetting.js +72 -0
  65. package/dist/es/config/i18n/zh_cn/electronSignatures.js +342 -0
  66. package/dist/es/config/i18n/zh_cn/enhanceSelect.js +8 -0
  67. package/dist/es/config/i18n/zh_cn/footer.js +8 -0
  68. package/dist/es/config/i18n/zh_cn/form.js +26 -0
  69. package/dist/es/config/i18n/zh_cn/formItem.js +8 -0
  70. package/dist/es/config/i18n/zh_cn/inputNumber.js +7 -0
  71. package/dist/es/config/i18n/zh_cn/login.js +76 -0
  72. package/dist/es/config/i18n/zh_cn/modal.js +8 -0
  73. package/dist/es/config/i18n/zh_cn/notAuthPage.js +8 -0
  74. package/dist/es/config/i18n/zh_cn/notRoutePage.js +8 -0
  75. package/dist/es/config/i18n/zh_cn/operationBtn.js +10 -0
  76. package/dist/es/config/i18n/zh_cn/print.js +16 -0
  77. package/dist/es/config/i18n/zh_cn/select.js +6 -0
  78. package/dist/es/config/i18n/zh_cn/table.js +65 -0
  79. package/dist/es/config/i18n/zh_cn/tabs.js +10 -0
  80. package/dist/es/config/i18n/zh_cn/translationButton.js +26 -0
  81. package/dist/es/config/i18n/zh_cn/tree.js +6 -0
  82. package/dist/es/config/i18n/zh_cn/uploadList.js +82 -0
  83. package/dist/es/config/i18n/zh_cn/ztTransfer.js +14 -0
  84. package/dist/es/config/i18n/zh_cn.d.ts +538 -0
  85. package/dist/es/config/i18n/zh_cn.js +65 -1
  86. package/dist/es/config/index.js +1 -1
  87. package/dist/es/config/useLocale.d.ts +554 -0
  88. package/dist/es/config/useLocale.js +41 -8
  89. package/dist/es/datepicker/index.js +9 -3
  90. package/dist/es/datepicker/utils.js +32 -26
  91. package/dist/es/detaillist/item.js +7 -2
  92. package/dist/es/detaillist/list.js +2 -0
  93. package/dist/es/differences/differences.js +8 -1
  94. package/dist/es/dynamicsetting/dynamicDrawer.js +41 -24
  95. package/dist/es/dynamicsetting/hooks.js +2 -0
  96. package/dist/es/dynamicsetting/moreConfig.js +6 -2
  97. package/dist/es/dynamicsetting/useSearch.js +5 -1
  98. package/dist/es/dynamicsetting/useTemplate.js +19 -15
  99. package/dist/es/electronsignatures/content.js +52 -31
  100. package/dist/es/electronsignatures/filecomponents/file-upload.js +2 -0
  101. package/dist/es/electronsignatures/filecomponents/useFetchFileTypeData.js +2 -0
  102. package/dist/es/enhanceselect/enhance-select.js +7 -3
  103. package/dist/es/enhanceselect/list-query.js +2 -0
  104. package/dist/es/enhanceselect/page-query.js +2 -0
  105. package/dist/es/form/common-search-list.js +7 -2
  106. package/dist/es/form/form.js +9 -5
  107. package/dist/es/form/resetButton.js +16 -11
  108. package/dist/es/form/useCommonSearch.js +12 -9
  109. package/dist/es/formitem/formItem.js +4 -2
  110. package/dist/es/inputnumber/inputNumber.js +11 -2
  111. package/dist/es/inputnumber/utils.js +41 -8
  112. package/dist/es/login/forget-password.js +9 -5
  113. package/dist/es/login/index.js +12 -8
  114. package/dist/es/modal/modal.js +6 -2
  115. package/dist/es/operationbtn/operationBtn.js +5 -3
  116. package/dist/es/select/hooks.js +5 -1
  117. package/dist/es/table/components/ColumnAddDel.js +11 -5
  118. package/dist/es/table/components/EnhanceBodyCell.js +7 -5
  119. package/dist/es/table/components/FilterDropdown.js +67 -17
  120. package/dist/es/table/components/SortTitle.js +8 -4
  121. package/dist/es/table/components/TableMenu.js +5 -1
  122. package/dist/es/table/components/TitleOperation.js +5 -1
  123. package/dist/es/table/components/table-header-operation/FillDown.js +7 -3
  124. package/dist/es/table/excel.js +8 -4
  125. package/dist/es/table/hooks/useSelectSubtotal.js +8 -1
  126. package/dist/es/table/table.js +6 -4
  127. package/dist/es/table/useColumns.js +8 -4
  128. package/dist/es/table/useSummary.js +6 -2
  129. package/dist/es/table/useTableValidate.js +39 -7
  130. package/dist/es/table/utils.js +10 -5
  131. package/dist/es/tabs/tab-type.js +10 -1
  132. package/dist/es/title/title.js +2 -0
  133. package/dist/es/translationbutton/DownFile.js +8 -4
  134. package/dist/es/translationbutton/PreviewFile.js +5 -3
  135. package/dist/es/translationbutton/hooks.js +5 -1
  136. package/dist/es/translationbutton/translationButton.js +15 -12
  137. package/dist/es/tree/tree.js +8 -2
  138. package/dist/es/uploadlist/hooks.js +17 -11
  139. package/dist/es/uploadlist/uploadList.js +39 -26
  140. package/dist/es/uploadlist/uploadListDetail.js +15 -11
  141. package/dist/es/uploadlist/uploadTable.js +23 -19
  142. package/dist/es/uploadlist/utils.js +8 -1
  143. package/dist/es/zttransfer/Container.js +5 -1
  144. package/dist/es/zttransfer/SelectContainer.js +5 -1
  145. package/dist/es/zttransfer/zt-transfer.js +5 -1
  146. package/dist/index.build.d.ts +1 -0
  147. package/dist/index.es.js +1 -0
  148. package/package.json +5 -2
@@ -1,10 +1,15 @@
1
1
  import { __assign } from '../_virtual/_tslib.js';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import classNames from '../node_modules/classnames/index.js';
4
+ import useLocale from '../config/useLocale.js';
5
+ import 'react';
6
+ import '../config/ZtxkContext.js';
7
+ import '../config/MyStorage.js';
4
8
  import { Col } from 'antd';
5
9
 
6
10
  var Item = function (_a) {
7
11
  var children = _a.children, className = _a.className, title = _a.title, _b = _a.isPopTitle, isPopTitle = _b === void 0 ? true : _b, titleSlotBefore = _a.titleSlotBefore, titleSlotAfter = _a.titleSlotAfter, _c = _a.colon, colon = _c === void 0 ? true : _c, _d = _a.span, span = _d === void 0 ? 6 : _d, titleSpan = _a.titleSpan, titleStyle = _a.titleStyle, isContentMerge = _a.isContentMerge, titleProps = _a.titleProps, textProps = _a.textProps, showDiff = _a.showDiff, _e = _a.isEllipsis, isEllipsis = _e === void 0 ? true : _e, isBlod = _a.isBlod, isFlex = _a.isFlex, isRequired = _a.isRequired, titleVerticalCenter = _a.titleVerticalCenter;
12
+ var locale = useLocale().DetailList;
8
13
  var classes = classNames("ztxk-grid-item", className, {
9
14
  "ztxk-grid-item--flex": isFlex,
10
15
  });
@@ -15,7 +20,7 @@ var Item = function (_a) {
15
20
  : undefined;
16
21
  return isContentMerge ? (jsxs(Col, __assign({ span: span, className: "ztxk-grid-item--merge" }, { children: [jsxs("div", __assign({ className: classes +
17
22
  " ztxk-grid-item--title" +
18
- "".concat(titleVerticalCenter ? " ztxk-grid-item--title-vertical-center" : ""), title: divTitle, style: titleStyle }, titleProps, { children: [isRequired && (jsx("span", __assign({ className: "ztxk-grid-item--title-required" }, { children: "*" }))), jsxs("span", __assign({ className: "ztxk-grid-item--title-text" }, { children: [titleSlotBefore, title, titleSlotAfter] })), jsx("span", __assign({ className: "ztxk-grid-item--title-colon" }, { children: colon && ":" }))] })), jsx("div", __assign({ className: showDiff
23
+ "".concat(titleVerticalCenter ? " ztxk-grid-item--title-vertical-center" : ""), title: divTitle, style: titleStyle }, titleProps, { children: [isRequired && (jsx("span", __assign({ className: "ztxk-grid-item--title-required" }, { children: "*" }))), jsxs("span", __assign({ className: "ztxk-grid-item--title-text" }, { children: [titleSlotBefore, title, titleSlotAfter] })), jsx("span", __assign({ className: "ztxk-grid-item--title-colon" }, { children: colon && locale.colon }))] })), jsx("div", __assign({ className: showDiff
19
24
  ? classes +
20
25
  " ztxk-grid-item--text ztxk-grid-item--diff" +
21
26
  "".concat(isEllipsis
@@ -29,7 +34,7 @@ var Item = function (_a) {
29
34
  " ztxk-grid-item--title" +
30
35
  "".concat(titleVerticalCenter ? " ztxk-grid-item--title-vertical-center" : ""),
31
36
  // span={titleSpan ? titleSpan : Math.ceil(span * 0.3)}
32
- span: titleSpan ? titleSpan : 3, title: divTitle, style: titleStyle }, titleProps, { children: [isRequired && (jsx("span", __assign({ className: "ztxk-grid-item--title-required" }, { children: "*" }))), jsxs("span", __assign({ className: "ztxk-grid-item--title-text" }, { children: [titleSlotBefore, title, titleSlotAfter] })), jsx("span", __assign({ className: "ztxk-grid-item--title-colon" }, { children: colon && ":" }))] })), jsx(Col, __assign({ className: showDiff
37
+ span: titleSpan ? titleSpan : 3, title: divTitle, style: titleStyle }, titleProps, { children: [isRequired && (jsx("span", __assign({ className: "ztxk-grid-item--title-required" }, { children: "*" }))), jsxs("span", __assign({ className: "ztxk-grid-item--title-text" }, { children: [titleSlotBefore, title, titleSlotAfter] })), jsx("span", __assign({ className: "ztxk-grid-item--title-colon" }, { children: colon && locale.colon }))] })), jsx(Col, __assign({ className: showDiff
33
38
  ? classes +
34
39
  " ztxk-grid-item--text ztxk-grid-item--diff" +
35
40
  "".concat(isEllipsis
@@ -2,7 +2,9 @@ import { __rest, __assign } from '../_virtual/_tslib.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import classNames from '../node_modules/classnames/index.js';
4
4
  import 'react';
5
+ import 'react-i18next';
5
6
  import '../config/ZtxkContext.js';
7
+ import '../config/i18n/i18nInstance.js';
6
8
  import useBaseContext from '../config/useBaseContext.js';
7
9
  import '../config/MyStorage.js';
8
10
  import Item from './item.js';
@@ -3,6 +3,9 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
4
  import classNames from '../node_modules/classnames/index.js';
5
5
  import { PLACEHOLDER_NULL } from '../config/constant.js';
6
+ import useLocale, { formatLocaleText } from '../config/useLocale.js';
7
+ import '../config/ZtxkContext.js';
8
+ import '../config/MyStorage.js';
6
9
  import { Tooltip } from 'antd';
7
10
 
8
11
  /**
@@ -10,10 +13,14 @@ import { Tooltip } from 'antd';
10
13
  */
11
14
  var Differences = function (_a) {
12
15
  var children = _a.children, describe = _a.describe, preValue = _a.preValue, currentValue = _a.currentValue, className = _a.className;
16
+ var locale = useLocale().Differences;
13
17
  var classes = classNames("ztxk-differences", className, {});
14
18
  var title = describe
15
19
  ? describe
16
- : "\u53D8\u66F4\u524D\u7684\u503C\uFF1A".concat(preValue || PLACEHOLDER_NULL, " \n\u5F53\u524D\u503C\uFF1A").concat(currentValue || PLACEHOLDER_NULL);
20
+ : formatLocaleText(locale.changeTooltip, {
21
+ preValue: preValue || PLACEHOLDER_NULL,
22
+ currentValue: currentValue || PLACEHOLDER_NULL,
23
+ });
17
24
  return (jsx(Tooltip, __assign({ className: classes, title: title }, { children: children })));
18
25
  };
19
26
  var MemoDifferences = memo(Differences);
@@ -6,8 +6,9 @@ import { useDynamic } from './useDynamic.js';
6
6
  import { useDrawer } from './hooks.js';
7
7
  import MoreConfig from './moreConfig.js';
8
8
  import useSearch from './useSearch.js';
9
- import '../config/ZtxkContext.js';
9
+ import useLocale, { formatLocaleText } from '../config/useLocale.js';
10
10
  import useBaseContext from '../config/useBaseContext.js';
11
+ import '../config/ZtxkContext.js';
11
12
  import '../config/MyStorage.js';
12
13
  import { getFinalValue } from '../config/utils.js';
13
14
  import { useLatest } from 'ahooks';
@@ -30,8 +31,9 @@ var sortDynamicListByType = function (list) {
30
31
  };
31
32
  // 这里操作的一直都是内部设置的list
32
33
  var DynamicDrawer = function (props, ref) {
33
- var list = props.list, dynamicKey = props.dynamicKey, parentDynamicKey = props.parentDynamicKey, _a = props.title, title = _a === void 0 ? "自定义配置" : _a, onCurrentListChange = props.onCurrentListChange, isMore = props.isMore, isFixed = props.isFixed, isDimensionDynamic = props.isDimensionDynamic, isSearch = props.isSearch, isSearchFilter = props.isSearchFilter, isTemplateSetting = props.isTemplateSetting, storeName = props.storeName;
34
- var _b = useBaseContext(), enableDynamicColumnSearch = _b.enableDynamicColumnSearch, enableTemplateSetting = _b.enableTemplateSetting, enableSearchFilter = _b.enableSearchFilter;
34
+ var locale = useLocale().DynamicSetting;
35
+ var list = props.list, dynamicKey = props.dynamicKey, parentDynamicKey = props.parentDynamicKey, title = props.title, onCurrentListChange = props.onCurrentListChange, isMore = props.isMore, isFixed = props.isFixed, isDimensionDynamic = props.isDimensionDynamic, isSearch = props.isSearch, isSearchFilter = props.isSearchFilter, isTemplateSetting = props.isTemplateSetting, storeName = props.storeName;
36
+ var _a = useBaseContext(), enableDynamicColumnSearch = _a.enableDynamicColumnSearch, enableTemplateSetting = _a.enableTemplateSetting, enableSearchFilter = _a.enableSearchFilter;
35
37
  // 是否开启搜索功能
36
38
  // 如果全局开启了默认添加,那么只要没有单独配置关闭,都认为需要打开
37
39
  var isDynamicColumnSearchEnabled = enableDynamicColumnSearch
@@ -44,8 +46,8 @@ var DynamicDrawer = function (props, ref) {
44
46
  // 根据外部传入的list 和本地存储信息 生成一个内部的currentDynamicList
45
47
  // 这个currentDynamicList 是可以是负责显示最终结果的
46
48
  // tempDynamicList 是操作时的临时变量 可能操作后不点击确认 直接点击取消 那么需要重置到之前的状态
47
- var _c = useDynamic(dynamicKey, parentDynamicKey, list), currentDynamicList = _c.currentDynamicList, setCurrentDynamicList = _c.setCurrentDynamicList, tempDynamicList = _c.tempDynamicList, setTempDynamicList = _c.setTempDynamicList;
48
- var _d = useTemplate(dynamicKey, {
49
+ var _b = useDynamic(dynamicKey, parentDynamicKey, list), currentDynamicList = _b.currentDynamicList, setCurrentDynamicList = _b.setCurrentDynamicList, tempDynamicList = _b.tempDynamicList, setTempDynamicList = _b.setTempDynamicList;
50
+ var _c = useTemplate(dynamicKey, {
49
51
  storeName: storeName,
50
52
  isTemplateSetting: isTemplateSettingEnabled,
51
53
  currentTemplateData: tempDynamicList,
@@ -53,10 +55,10 @@ var DynamicDrawer = function (props, ref) {
53
55
  // 更新配置
54
56
  setTempDynamicList(data);
55
57
  },
56
- }), renderTemplateModal = _d.renderTemplateModal, openTemplateModal = _d.openTemplateModal, saveCurrentTemplate = _d.saveCurrentTemplate, getCurrentTemplateData = _d.getCurrentTemplateData;
57
- var _e = useState(""), currentTemplateTitle = _e[0], setCurrentTemplateTitle = _e[1];
58
+ }), renderTemplateModal = _c.renderTemplateModal, openTemplateModal = _c.openTemplateModal, saveCurrentTemplate = _c.saveCurrentTemplate, getCurrentTemplateData = _c.getCurrentTemplateData;
59
+ var _d = useState(""), currentTemplateTitle = _d[0], setCurrentTemplateTitle = _d[1];
58
60
  var confirmModalRef = useRef(null);
59
- var _f = useDrawer(currentDynamicList, setCurrentDynamicList, dynamicKey, parentDynamicKey, setTempDynamicList, list, onCurrentListChange), visible = _f.visible, setVisible = _f.setVisible, onClose = _f.onClose, onReset = _f.onReset, onSure = _f.onSure;
61
+ var _e = useDrawer(currentDynamicList, setCurrentDynamicList, dynamicKey, parentDynamicKey, setTempDynamicList, list, onCurrentListChange), visible = _e.visible, setVisible = _e.setVisible, onClose = _e.onClose, onReset = _e.onReset, onSure = _e.onSure;
60
62
  // 像外部暴露方法
61
63
  useImperativeHandle(ref, function () {
62
64
  return {
@@ -75,10 +77,10 @@ var DynamicDrawer = function (props, ref) {
75
77
  });
76
78
  return _checkedValues;
77
79
  }, [tempDynamicList]);
78
- var _g = useSearch(tempDynamicList, checkedValues, isDimensionDynamic, isSearchFilterEnabled), onSearchHandle = _g.onSearchHandle, onCheckBtn = _g.onCheckBtn, filterDynamicColumns = _g.filterDynamicColumns, onSearchHandleDebounce = _g.onSearchHandleDebounce;
80
+ var _f = useSearch(tempDynamicList, checkedValues, isDimensionDynamic, isSearchFilterEnabled), onSearchHandle = _f.onSearchHandle, onCheckBtn = _f.onCheckBtn, filterDynamicColumns = _f.filterDynamicColumns, onSearchHandleDebounce = _f.onSearchHandleDebounce;
79
81
  var filterDynamicColumnsRef = useLatest(filterDynamicColumns);
80
82
  // 根据isDimension分区
81
- var _h = useMemo(function () {
83
+ var _g = useMemo(function () {
82
84
  var dynamicList = tempDynamicList;
83
85
  // 这里为什么不直接赋值 filterDynamicColumns 是因为某些地方是直接使用item的引用去查找索引的
84
86
  if (filterDynamicColumns && isSearchFilterEnabled) {
@@ -89,7 +91,7 @@ var DynamicDrawer = function (props, ref) {
89
91
  var dimensionList = dynamicList.filter(function (item) { return item.isDimension; });
90
92
  var fieldList = dynamicList.filter(function (item) { return !item.isDimension; });
91
93
  return { dimensionList: dimensionList, fieldList: fieldList };
92
- }, [tempDynamicList, filterDynamicColumns, isSearchFilterEnabled]), dimensionList = _h.dimensionList, fieldList = _h.fieldList;
94
+ }, [tempDynamicList, filterDynamicColumns, isSearchFilterEnabled]), dimensionList = _g.dimensionList, fieldList = _g.fieldList;
93
95
  // 排序优先级判断
94
96
  var isDimensionPriority = useCallback(function (dragIndex, hoverIndex) {
95
97
  // 从上到下还是从下到上拖动
@@ -107,12 +109,15 @@ var DynamicDrawer = function (props, ref) {
107
109
  if ((oldItem === null || oldItem === void 0 ? void 0 : oldItem.dimensionPriority) !== undefined &&
108
110
  (dragItem === null || dragItem === void 0 ? void 0 : dragItem.dimensionPriority) !== undefined) {
109
111
  if ((oldItem === null || oldItem === void 0 ? void 0 : oldItem.dimensionPriority) < (dragItem === null || dragItem === void 0 ? void 0 : dragItem.dimensionPriority)) {
110
- myMessage.warning("".concat(dragItem === null || dragItem === void 0 ? void 0 : dragItem.label, "\u4E0D\u80FD\u6392\u5E8F\u5230").concat(oldItem === null || oldItem === void 0 ? void 0 : oldItem.label).concat(isUp ? "前面" : "后面"));
112
+ myMessage.warning(formatLocaleText(isUp ? locale.cannotSortToFront : locale.cannotSortToBack, {
113
+ dragLabel: dragItem === null || dragItem === void 0 ? void 0 : dragItem.label,
114
+ targetLabel: oldItem === null || oldItem === void 0 ? void 0 : oldItem.label,
115
+ }));
111
116
  return false;
112
117
  }
113
118
  }
114
119
  return true;
115
- }, [tempDynamicList]);
120
+ }, [tempDynamicList, locale]);
116
121
  // 拖拽
117
122
  var onMoveItem = useCallback(function (dragIndex, hoverIndex) {
118
123
  // 这里认为如果搜索了,不支持排序。
@@ -240,7 +245,10 @@ var DynamicDrawer = function (props, ref) {
240
245
  var missingLabels = missingRequired.map(getItemLabel).join("、");
241
246
  return {
242
247
  valid: false,
243
- message: "\u3010".concat(currentLabel, "\u3011\u9700\u8981\u4F9D\u8D56\u3010").concat(missingLabels, "\u3011\uFF0C\u8BF7\u5148\u52FE\u9009\u8FD9\u4E9B\u4F9D\u8D56\u9879\uFF01"),
248
+ message: formatLocaleText(locale.dependencyRequiredError, {
249
+ label: currentLabel,
250
+ labels: missingLabels,
251
+ }),
244
252
  };
245
253
  }
246
254
  }
@@ -253,7 +261,10 @@ var DynamicDrawer = function (props, ref) {
253
261
  var anyOfLabels = deps.anyOf.map(getItemLabel).join("、");
254
262
  return {
255
263
  valid: false,
256
- message: "\u3010".concat(currentLabel, "\u3011\u9700\u8981\u81F3\u5C11\u4F9D\u8D56\u4EE5\u4E0B\u4E00\u9879\uFF1A\u3010").concat(anyOfLabels, "\u3011\uFF0C\u8BF7\u5148\u52FE\u9009\u5176\u4E2D\u4E00\u9879\uFF01"),
264
+ message: formatLocaleText(locale.dependencyAnyOfError, {
265
+ label: currentLabel,
266
+ labels: anyOfLabels,
267
+ }),
257
268
  };
258
269
  }
259
270
  }
@@ -324,7 +335,7 @@ var DynamicDrawer = function (props, ref) {
324
335
  break;
325
336
  }
326
337
  if (hasConflict) {
327
- myMessage.warning("所选项存在互斥关系,不能同时勾选!");
338
+ myMessage.warning(locale.exclusiveConflictError);
328
339
  return; // 拦截本次勾选
329
340
  }
330
341
  // 4. 正常更新,包括联动子元素
@@ -413,7 +424,9 @@ var DynamicDrawer = function (props, ref) {
413
424
  if (depInMain && !depInMain.checked) {
414
425
  depInMain.checked = true;
415
426
  var depLabel = depInMain.label || depInMain.key;
416
- myMessage.success("\u5DF2\u81EA\u52A8\u52FE\u9009\u4F9D\u8D56\u9879\uFF1A".concat(depLabel));
427
+ myMessage.success(formatLocaleText(locale.autoCheckDependencyTip, {
428
+ labels: depLabel,
429
+ }));
417
430
  }
418
431
  }
419
432
  });
@@ -437,7 +450,9 @@ var DynamicDrawer = function (props, ref) {
437
450
  if (depInMain && !depInMain.checked) {
438
451
  depInMain.checked = true;
439
452
  var depLabel = depInMain.label || depInMain.key;
440
- myMessage.success("\u5DF2\u81EA\u52A8\u52FE\u9009\u4F9D\u8D56\u9879\uFF1A".concat(depLabel));
453
+ myMessage.success(formatLocaleText(locale.autoCheckDependencyTip, {
454
+ labels: depLabel,
455
+ }));
441
456
  }
442
457
  }
443
458
  }
@@ -455,7 +470,9 @@ var DynamicDrawer = function (props, ref) {
455
470
  return (item === null || item === void 0 ? void 0 : item.label) || key;
456
471
  })
457
472
  .join("、");
458
- myMessage.success("\u5DF2\u81EA\u52A8\u52FE\u9009\u4F9D\u8D56\u9879\uFF1A".concat(depLabels));
473
+ myMessage.success(formatLocaleText(locale.autoCheckDependencyTip, {
474
+ labels: depLabels,
475
+ }));
459
476
  }
460
477
  }
461
478
  // 4. 更新子元素的选中状态
@@ -524,8 +541,8 @@ var DynamicDrawer = function (props, ref) {
524
541
  })] }));
525
542
  };
526
543
  /**底部按钮 */
527
- var renderFooter = function () { return (jsxs(Fragment, { children: [jsx(ButtonCom, __assign({ type: "default", onClick: onClose }, { children: "\u53D6\u6D88" })), jsx(ButtonCom, __assign({ type: "default", onClick: onReset }, { children: "\u91CD\u7F6E" })), jsx(ButtonCom, __assign({ type: "primary", onClick: onSureHandle }, { children: "\u786E\u5B9A" }))] })); };
528
- return (jsxs(Fragment, { children: [jsx(Drawer, __assign({ className: "dynamic-drawer", title: jsxs("div", { children: [jsx(SettingOutlined, { style: { fontSize: 16 } }), jsxs("span", __assign({ className: "search-drawer--title-text" }, { children: [title, jsx("span", { children: "\uFF08\u62D6\u62FD\u6392\u5E8F\uFF09" })] }))] }), width: 300, placement: "right", open: visible, closable: false, maskClosable: false, footer: renderFooter() }, { children: jsxs("div", __assign({ className: "search-drawer--filter" }, { children: [isTemplateSettingEnabled && storeName ? (jsxs("div", __assign({ className: "search-drawer--template" }, { children: [jsx(ButtonCom, __assign({ type: "default", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
544
+ var renderFooter = function () { return (jsxs(Fragment, { children: [jsx(ButtonCom, __assign({ type: "default", onClick: onClose }, { children: locale.cancel })), jsx(ButtonCom, __assign({ type: "default", onClick: onReset }, { children: locale.reset })), jsx(ButtonCom, __assign({ type: "primary", onClick: onSureHandle }, { children: locale.ok }))] })); };
545
+ return (jsxs(Fragment, { children: [jsx(Drawer, __assign({ className: "dynamic-drawer", title: jsxs("div", { children: [jsx(SettingOutlined, { style: { fontSize: 16 } }), jsxs("span", __assign({ className: "search-drawer--title-text" }, { children: [title || locale.customConfigTitle, jsx("span", { children: locale.dragSortHint })] }))] }), width: 300, placement: "right", open: visible, closable: false, maskClosable: false, footer: renderFooter() }, { children: jsxs("div", __assign({ className: "search-drawer--filter" }, { children: [isTemplateSettingEnabled && storeName ? (jsxs("div", __assign({ className: "search-drawer--template" }, { children: [jsx(ButtonCom, __assign({ type: "default", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
529
546
  var currentTemplateTitle;
530
547
  var _a, _b, _c;
531
548
  return __generator(this, function (_d) {
@@ -538,10 +555,10 @@ var DynamicDrawer = function (props, ref) {
538
555
  (_c = (_b = confirmModalRef.current) === null || _b === void 0 ? void 0 : _b.open) === null || _c === void 0 ? void 0 : _c.call(_b);
539
556
  return [2 /*return*/];
540
557
  });
541
- }); } }, { children: "\u4FDD\u5B58\u6A21\u677F" })), jsx(ButtonCom, __assign({ type: "default", onClick: openTemplateModal }, { children: "\u6A21\u677F\u8BBE\u7F6E" }))] }))) : null, isDynamicColumnSearchEnabled ? (jsxs("div", __assign({ className: "search-drawer--filter-input" }, { children: [jsx(Input.Search, { placeholder: "\u641C\u7D22", onSearch: onSearchHandle, onChange: function (e) {
558
+ }); } }, { children: locale.saveTemplate })), jsx(ButtonCom, __assign({ type: "default", onClick: openTemplateModal }, { children: locale.templateSetting }))] }))) : null, isDynamicColumnSearchEnabled ? (jsxs("div", __assign({ className: "search-drawer--filter-input" }, { children: [jsx(Input.Search, { placeholder: locale.searchPlaceholder, onSearch: onSearchHandle, onChange: function (e) {
542
559
  onSearchHandleDebounce(e);
543
- } }), jsx(ButtonCom, __assign({ type: "default", className: "selector-all", loading: false, onClick: function () { return onCheckBtn("all", onCheckboxChange); } }, { children: "\u5168\u9009" })), jsx(ButtonCom, __assign({ type: "default", className: "selector-inverse", loading: false, onClick: function () { return onCheckBtn("inverse", onCheckboxChange); } }, { children: "\u53CD\u9009" }))] }))) : null, jsx(Checkbox.Group, __assign({ value: checkedValues, onChange: onCheckboxChange }, { children: jsxs(Sortable, { children: [isDimensionDynamic &&
544
- renderSection(dimensionList, 0, "维度配置"), renderSection(fieldList, dimensionList.length, isDimensionDynamic ? "字段配置" : undefined)] }) }))] })) })), renderTemplateModal(), jsx(TemplateModalConfirm, { currentTemplateTitle: currentTemplateTitle, confirmModalRef: confirmModalRef, openTemplateModal: openTemplateModal, saveCurrentTemplate: saveCurrentTemplate })] }));
560
+ } }), jsx(ButtonCom, __assign({ type: "default", className: "selector-all", loading: false, onClick: function () { return onCheckBtn("all", onCheckboxChange); } }, { children: locale.selectAll })), jsx(ButtonCom, __assign({ type: "default", className: "selector-inverse", loading: false, onClick: function () { return onCheckBtn("inverse", onCheckboxChange); } }, { children: locale.selectInverse }))] }))) : null, jsx(Checkbox.Group, __assign({ value: checkedValues, onChange: onCheckboxChange }, { children: jsxs(Sortable, { children: [isDimensionDynamic &&
561
+ renderSection(dimensionList, 0, locale.dimensionConfig), renderSection(fieldList, dimensionList.length, isDimensionDynamic ? locale.fieldConfig : undefined)] }) }))] })) })), renderTemplateModal(), jsx(TemplateModalConfirm, { currentTemplateTitle: currentTemplateTitle, confirmModalRef: confirmModalRef, openTemplateModal: openTemplateModal, saveCurrentTemplate: saveCurrentTemplate })] }));
545
562
  };
546
563
  DynamicDrawer.displayName = "ZTXK_WEBUI_DynamicDrawer";
547
564
  var DynamicDrawer$1 = memo(forwardRef(DynamicDrawer));
@@ -1,6 +1,8 @@
1
1
  import { useState, useCallback } from 'react';
2
2
  import { getSetDynamicKey } from './useDynamic.js';
3
+ import 'react-i18next';
3
4
  import '../config/ZtxkContext.js';
5
+ import '../config/i18n/i18nInstance.js';
4
6
  import useBaseContext from '../config/useBaseContext.js';
5
7
  import '../config/MyStorage.js';
6
8
 
@@ -2,11 +2,15 @@ import { __assign } from '../_virtual/_tslib.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { memo, useState } from 'react';
4
4
  import { useLatest } from 'ahooks';
5
+ import useLocale from '../config/useLocale.js';
6
+ import '../config/ZtxkContext.js';
7
+ import '../config/MyStorage.js';
5
8
  import MenuOutlined from '../node_modules/@ant-design/icons/es/icons/MenuOutlined.js';
6
9
  import { Radio, Switch, Dropdown } from 'antd';
7
10
 
8
11
  var MoreConfig = function (_a) {
9
12
  var fixed = _a.fixed, onChange = _a.onChange, isFixed = _a.isFixed, isSum = _a.isSum, isDimensionSum = _a.isDimensionSum;
13
+ var locale = useLocale().DynamicSetting;
10
14
  var onChangeLastestRef = useLatest(onChange);
11
15
  var _b = useState(false), open = _b[0], setOpen = _b[1];
12
16
  var _c = useState(fixed), fixedValue = _c[0], setFixedValue = _c[1];
@@ -18,7 +22,7 @@ var MoreConfig = function (_a) {
18
22
  setSumChecked(checked);
19
23
  };
20
24
  var fixedItem = {
21
- label: (jsxs("div", { children: ["\u56FA\u5B9A\uFF1A", jsxs(Radio.Group, __assign({ name: "dynamic-fixed", value: fixedValue, onChange: onFixedChange, optionType: "button", buttonStyle: "solid" }, { children: [jsx(Radio, __assign({ value: "left" }, { children: "\u5DE6" })), jsx(Radio, __assign({ value: "right" }, { children: "\u53F3" })), jsx(Radio, __assign({ value: "" }, { children: "\u65E0" }))] }))] })),
25
+ label: (jsxs("div", { children: [locale.fixedLabel, jsxs(Radio.Group, __assign({ name: "dynamic-fixed", value: fixedValue, onChange: onFixedChange, optionType: "button", buttonStyle: "solid" }, { children: [jsx(Radio, __assign({ value: "left" }, { children: locale.fixedLeft })), jsx(Radio, __assign({ value: "right" }, { children: locale.fixedRight })), jsx(Radio, __assign({ value: "" }, { children: locale.fixedNone }))] }))] })),
22
26
  key: "0",
23
27
  };
24
28
  var items = [];
@@ -27,7 +31,7 @@ var MoreConfig = function (_a) {
27
31
  }
28
32
  if (isSum) {
29
33
  items.push({
30
- label: (jsxs("div", { children: ["\u5408\u8BA1\uFF1A", jsx(Switch, { checked: sumChecked, onChange: onSumChange })] })),
34
+ label: (jsxs("div", { children: [locale.sumLabel, jsx(Switch, { checked: sumChecked, onChange: onSumChange })] })),
31
35
  key: "1",
32
36
  });
33
37
  }
@@ -2,6 +2,9 @@ import { __spreadArray } from '../_virtual/_tslib.js';
2
2
  import { useState } from 'react';
3
3
  import { useMemoizedFn } from 'ahooks';
4
4
  import debounce from 'lodash/debounce';
5
+ import useLocale from '../config/useLocale.js';
6
+ import '../config/ZtxkContext.js';
7
+ import '../config/MyStorage.js';
5
8
  import myMessage from '../message/index.js';
6
9
 
7
10
  /**
@@ -14,6 +17,7 @@ import myMessage from '../message/index.js';
14
17
  * @returns
15
18
  */
16
19
  function useSearch(dynamicList, checkedValues, isDimensionDynamic, isSearchFilterEnabled) {
20
+ var locale = useLocale().DynamicSetting;
17
21
  // 过滤后的可见列集合(仅操作此集合中的列)
18
22
  var _a = useState(null), filterDynamicColumns = _a[0], setFilterDynamicColumns = _a[1];
19
23
  // 未参与过滤的列,但是选中了的值
@@ -34,7 +38,7 @@ function useSearch(dynamicList, checkedValues, isDimensionDynamic, isSearchFilte
34
38
  */
35
39
  var onCheckBtn = function (type, onCheckboxChange) {
36
40
  if (isDimensionDynamic) {
37
- myMessage.warn("维度列不支持全选/反选");
41
+ myMessage.warn(locale.dimensionNoSelectAll);
38
42
  return;
39
43
  }
40
44
  // 1. 确定操作的目标列集合:仅对「过滤后可见列」操作(优先 filterDynamicColumns,无则用 dynamicColumns)
@@ -1,8 +1,9 @@
1
1
  import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { forwardRef, useState, useImperativeHandle, useRef, useEffect } from 'react';
4
- import '../config/ZtxkContext.js';
4
+ import useLocale from '../config/useLocale.js';
5
5
  import useBaseContext from '../config/useBaseContext.js';
6
+ import '../config/ZtxkContext.js';
6
7
  import MyStorage from '../config/MyStorage.js';
7
8
  import classNames from '../node_modules/classnames/index.js';
8
9
  import Input from '../input/input.js';
@@ -299,6 +300,7 @@ function useTemplate(templateKey, options) {
299
300
  }
300
301
  var TemplateModal = function (props) {
301
302
  var currentTemplateData = props.currentTemplateData, templateList = props.templateList, setCurrentTemplateData = props.setCurrentTemplateData, deleteTemplateByIndex = props.deleteTemplateByIndex, currentTemplateKey = props.currentTemplateKey, setCurrentTemplateKey = props.setCurrentTemplateKey, setStorageCurrentKey = props.setStorageCurrentKey, updateServerData = props.updateServerData, onChange = props.onChange, templateModalRef = props.templateModalRef;
303
+ var locale = useLocale().DynamicSetting;
302
304
  var iptRef = useRef(null);
303
305
  /**
304
306
  * @description 验证模板名称
@@ -307,7 +309,7 @@ var TemplateModal = function (props) {
307
309
  var _a;
308
310
  var currentCommonName = (_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.getValue();
309
311
  if (!currentCommonName) {
310
- myMessage.warning("请输入模板名称");
312
+ myMessage.warning(locale.inputTemplateName);
311
313
  updateServerData === null || updateServerData === void 0 ? void 0 : updateServerData();
312
314
  return null;
313
315
  }
@@ -334,13 +336,13 @@ var TemplateModal = function (props) {
334
336
  return [4 /*yield*/, setCurrentTemplateData(data)];
335
337
  case 1:
336
338
  _d.sent();
337
- myMessage.success("保存成功!");
339
+ myMessage.success(locale.saveTemplateSuccess);
338
340
  (_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.setValue("");
339
341
  (_c = (_b = templateModalRef.current) === null || _b === void 0 ? void 0 : _b.close) === null || _c === void 0 ? void 0 : _c.call(_b);
340
342
  return [3 /*break*/, 3];
341
343
  case 2:
342
344
  err_1 = _d.sent();
343
- myMessage.error("保存模板失败!");
345
+ myMessage.error(locale.saveTemplateFail);
344
346
  throw err_1;
345
347
  case 3: return [2 /*return*/];
346
348
  }
@@ -358,7 +360,7 @@ var TemplateModal = function (props) {
358
360
  templateName = validateTemplateName();
359
361
  if (!templateName) {
360
362
  (_b = (_a = templateModalRef.current) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a);
361
- return [2 /*return*/, Promise.reject("请输入模板名称")];
363
+ return [2 /*return*/, Promise.reject(locale.inputTemplateName)];
362
364
  }
363
365
  data = createTemplateData(templateName);
364
366
  return [4 /*yield*/, saveTemplate(data)];
@@ -368,21 +370,22 @@ var TemplateModal = function (props) {
368
370
  }
369
371
  });
370
372
  }); };
371
- return (jsxs(ModalComponent, __assign({ title: "\u6A21\u677F\u8BBE\u7F6E", ref: templateModalRef, onOk: handleOk, width: "60%" }, { children: [jsx(MyInput, { ref: iptRef }), jsx("div", __assign({ className: "dynamic-template--list" }, { children: templateList.map(function (item, index) { return (jsxs("div", __assign({ className: classNames("dynamic-template--item", {
373
+ return (jsxs(ModalComponent, __assign({ title: locale.templateSetting, ref: templateModalRef, onOk: handleOk, width: "60%" }, { children: [jsx(MyInput, { ref: iptRef }), jsx("div", __assign({ className: "dynamic-template--list" }, { children: templateList.map(function (item, index) { return (jsxs("div", __assign({ className: classNames("dynamic-template--item", {
372
374
  "dynamic-template--item-active": item.key === currentTemplateKey,
373
375
  }), onClick: function () {
374
376
  setCurrentTemplateKey(item.key);
375
377
  onChange === null || onChange === void 0 ? void 0 : onChange(item.value);
376
378
  // 设置当前存储选中的key
377
379
  setStorageCurrentKey === null || setStorageCurrentKey === void 0 ? void 0 : setStorageCurrentKey(item.key);
378
- } }, { children: [jsx("div", __assign({ className: "dynamic-template--item-title" }, { children: item.title })), jsx(Popconfirm, __assign({ title: "\u786E\u8BA4\u5220\u9664\u5417\uFF1F", onConfirm: function (e) {
380
+ } }, { children: [jsx("div", __assign({ className: "dynamic-template--item-title" }, { children: item.title })), jsx(Popconfirm, __assign({ title: locale.confirmDelete, onConfirm: function (e) {
379
381
  var _a, _b;
380
382
  (_a = e === null || e === void 0 ? void 0 : e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
381
383
  (_b = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _b === void 0 ? void 0 : _b.call(e);
382
384
  deleteTemplateByIndex(index);
383
- }, onCancel: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); } }, { children: jsx(ButtonCom, __assign({ type: "default" }, { children: "\u5220\u9664" })) }))] }), item.key)); }) }))] })));
385
+ }, onCancel: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); } }, { children: jsx(ButtonCom, __assign({ type: "default" }, { children: locale.delete })) }))] }), item.key)); }) }))] })));
384
386
  };
385
387
  var MyInput = forwardRef(function (_props, ref) {
388
+ var locale = useLocale().DynamicSetting;
386
389
  var _a = useState(""), value = _a[0], setValue = _a[1];
387
390
  var onChange = function (e) {
388
391
  setValue(e.target.value);
@@ -391,16 +394,17 @@ var MyInput = forwardRef(function (_props, ref) {
391
394
  getValue: function () { return value; },
392
395
  setValue: setValue,
393
396
  }); });
394
- return (jsx(Input, { placeholder: "\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0", value: value, onChange: onChange }));
397
+ return (jsx(Input, { placeholder: locale.inputTemplateName, value: value, onChange: onChange }));
395
398
  });
396
399
  /** 保存模板二次确认框 */
397
400
  var TemplateModalConfirm = function (props) {
398
401
  var currentTemplateTitle = props.currentTemplateTitle, confirmModalRef = props.confirmModalRef, openTemplateModal = props.openTemplateModal, saveCurrentTemplate = props.saveCurrentTemplate;
399
- return (jsx(ModalComponent, __assign({ ref: confirmModalRef, title: "\u6A21\u677F\u4FDD\u5B58\u786E\u8BA4", width: "60%", footer: jsxs(Fragment, { children: [jsx(ButtonCom, __assign({ type: "primary", onClick: function () {
402
+ var locale = useLocale().DynamicSetting;
403
+ return (jsx(ModalComponent, __assign({ ref: confirmModalRef, title: locale.templateSaveConfirmTitle, width: "60%", footer: jsxs(Fragment, { children: [jsx(ButtonCom, __assign({ type: "primary", onClick: function () {
400
404
  var _a, _b;
401
405
  (_b = (_a = confirmModalRef.current) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a);
402
406
  openTemplateModal === null || openTemplateModal === void 0 ? void 0 : openTemplateModal();
403
- } }, { children: "\u6A21\u677F\u8BBE\u7F6E" })), jsx(ButtonCom, __assign({ type: "primary", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
407
+ } }, { children: locale.templateSetting })), jsx(ButtonCom, __assign({ type: "primary", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
404
408
  var _a, _b;
405
409
  return __generator(this, function (_c) {
406
410
  switch (_c.label) {
@@ -409,20 +413,20 @@ var TemplateModalConfirm = function (props) {
409
413
  return [4 /*yield*/, saveCurrentTemplate()];
410
414
  case 1:
411
415
  _c.sent();
412
- myMessage.success("保存成功");
416
+ myMessage.success(locale.saveSuccess);
413
417
  (_b = (_a = confirmModalRef.current) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a);
414
418
  return [3 /*break*/, 3];
415
419
  case 2:
416
420
  _c.sent();
417
- myMessage.error("保存失败");
421
+ myMessage.error(locale.saveFail);
418
422
  return [3 /*break*/, 3];
419
423
  case 3: return [2 /*return*/];
420
424
  }
421
425
  });
422
- }); } }, { children: "\u786E\u5B9A" })), jsx(ButtonCom, __assign({ type: "default", onClick: function () {
426
+ }); } }, { children: locale.ok })), jsx(ButtonCom, __assign({ type: "default", onClick: function () {
423
427
  var _a, _b;
424
428
  (_b = (_a = confirmModalRef.current) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a);
425
- } }, { children: "\u53D6\u6D88" }))] }) }, { children: jsxs("div", __assign({ className: "dynamic-template-confirm--item-title" }, { children: ["\u5F53\u524D\u6B63\u5728\u4FEE\u6539", jsx("b", { children: currentTemplateTitle }), "\uFF0C\u662F\u5426\u786E\u8BA4\u4FDD\u5B58\uFF1F \u82E5\u4E3A\u65B0\u589E\u6A21\u677F\u8BF7\u70B9\u51FB\u2018\u6A21\u677F\u8BBE\u7F6E\u2019\u7EF4\u62A4\u540D\u79F0\u3002"] })) })));
429
+ } }, { children: locale.cancel }))] }) }, { children: jsxs("div", __assign({ className: "dynamic-template-confirm--item-title" }, { children: [locale.currentEditing, jsx("b", { children: currentTemplateTitle }), locale.confirmSaveTip] })) })));
426
430
  };
427
431
 
428
432
  export { TemplateDatasetName, TemplateModalConfirm, useTemplate as default };