ronds-metadata 1.3.37 → 1.3.38

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 (26) hide show
  1. package/es/comps/DynamicPorts/comps/NodeElementForm.js +5 -4
  2. package/es/comps/DynamicPorts/comps/NodeElementNormal.js +5 -4
  3. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +3 -2
  4. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +2 -1
  5. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +3 -2
  6. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.js +3 -2
  7. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +4 -3
  8. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +3 -2
  9. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/NumberRange.js +1 -1
  10. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +3 -2
  11. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +3 -2
  12. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +4 -3
  13. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +4 -3
  14. package/es/comps/FormGenerator/comps/Canvas/core/index.js +3 -2
  15. package/es/comps/FormGenerator/comps/Canvas/index.js +7 -6
  16. package/es/comps/FormGenerator/comps/Settings/index.js +3 -2
  17. package/es/comps/FormGenerator/comps/Sidebar/Elements.js +3 -2
  18. package/es/comps/FormGenerator/comps/Sidebar/index.js +3 -2
  19. package/es/comps/FormGenerator/settings/ruleConfig.js +47 -46
  20. package/es/comps/MetadataForm/DataCell/Array.js +3 -3
  21. package/es/comps/MetadataForm/DataCell/Number.js +16 -16
  22. package/es/comps/MetadataForm/DataCell/Ref.js +12 -12
  23. package/es/comps/MetadataForm/DataCell/Select.js +19 -19
  24. package/es/comps/MetadataForm/DataCell/Switch.js +12 -12
  25. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +3 -2
  26. package/package.json +3 -1
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  /*
6
6
  * @Author: wangxian
7
7
  * @Date: 2022-05-24 08:50:16
8
- * @LastEditTime: 2024-02-29 17:05:37
8
+ * @LastEditTime: 2024-04-17 09:56:36
9
9
  */
10
10
  import { GlobalOutlined } from '@ant-design/icons';
11
11
  import { filter } from 'rxjs/operators';
@@ -14,6 +14,7 @@ import Icon from '../../Icons';
14
14
  import { gDPGraph } from '../graph';
15
15
  import React from 'react';
16
16
  import MetadataForm from '../../MetadataForm';
17
+ import { tr } from '../../../framework/locale';
17
18
  var NodeElementForm = function NodeElementForm(props) {
18
19
  var node = props.node;
19
20
  var data = (node === null || node === void 0 ? void 0 : node.getData()) || {};
@@ -84,7 +85,7 @@ var NodeElementForm = function NodeElementForm(props) {
84
85
  overflowX: 'hidden',
85
86
  wordBreak: 'break-all'
86
87
  }
87
- }, /*#__PURE__*/React.createElement("span", null, param === null || param === void 0 ? void 0 : param.remark)) : undefined
88
+ }, /*#__PURE__*/React.createElement("span", null, tr(param === null || param === void 0 ? void 0 : param.remark))) : undefined
88
89
  }, /*#__PURE__*/React.createElement("div", {
89
90
  className: "icon",
90
91
  style: {
@@ -96,13 +97,13 @@ var NodeElementForm = function NodeElementForm(props) {
96
97
  className: "notation"
97
98
  }, /*#__PURE__*/React.createElement("div", {
98
99
  className: "name",
99
- title: name,
100
+ title: tr(name),
100
101
  onDoubleClick: function onDoubleClick() {
101
102
  if (isCanEidt) {
102
103
  setIsNameEdit(true);
103
104
  }
104
105
  }
105
- }, name))), /*#__PURE__*/React.createElement("div", {
106
+ }, tr(name)))), /*#__PURE__*/React.createElement("div", {
106
107
  style: {
107
108
  maxHeight: '500px',
108
109
  overflowY: 'auto'
@@ -7,7 +7,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
7
7
  /*
8
8
  * @Author: wangxian
9
9
  * @Date: 2022-05-24 08:50:16
10
- * @LastEditTime: 2024-02-29 13:47:21
10
+ * @LastEditTime: 2024-04-17 09:55:26
11
11
  */
12
12
  import { GlobalOutlined } from '@ant-design/icons';
13
13
  import { filter } from 'rxjs/operators';
@@ -16,6 +16,7 @@ import Icon from '../../Icons';
16
16
  import { NodeStatus } from './NodeStatus';
17
17
  import { gDPGraph } from '../graph';
18
18
  import React from 'react';
19
+ import { tr } from '../../../framework/locale';
19
20
  var NodeElementNormal = function NodeElementNormal(props) {
20
21
  var node = props.node;
21
22
  var data = (node === null || node === void 0 ? void 0 : node.getData()) || {};
@@ -81,7 +82,7 @@ var NodeElementNormal = function NodeElementNormal(props) {
81
82
  overflowX: 'hidden',
82
83
  wordBreak: 'break-all'
83
84
  }
84
- }, /*#__PURE__*/React.createElement("span", null, param === null || param === void 0 ? void 0 : param.remark)) : undefined
85
+ }, /*#__PURE__*/React.createElement("span", null, tr(param === null || param === void 0 ? void 0 : param.remark))) : undefined
85
86
  }, /*#__PURE__*/React.createElement("div", {
86
87
  className: "icon",
87
88
  style: {
@@ -97,13 +98,13 @@ var NodeElementNormal = function NodeElementNormal(props) {
97
98
  onPressEnter: onPressEnter
98
99
  }) : /*#__PURE__*/React.createElement("div", {
99
100
  className: "name",
100
- title: name,
101
+ title: tr(name),
101
102
  onDoubleClick: function onDoubleClick() {
102
103
  if (isCanEidt) {
103
104
  setIsNameEdit(true);
104
105
  }
105
106
  }
106
- }, name), nodeStatus && (nodeStatus === null || nodeStatus === void 0 ? void 0 : nodeStatus.nodeStatus) && /*#__PURE__*/React.createElement(NodeStatus, {
107
+ }, tr(name)), nodeStatus && (nodeStatus === null || nodeStatus === void 0 ? void 0 : nodeStatus.nodeStatus) && /*#__PURE__*/React.createElement(NodeStatus, {
107
108
  onClick: onStatusClick,
108
109
  className: "statusIcon",
109
110
  status: nodeStatus.nodeStatus
@@ -8,11 +8,12 @@ import _Checkbox from "antd/es/checkbox";
8
8
  * @Author: uloveits 719310130@qq.com
9
9
  * @Date: 2023-02-06 15:05:42
10
10
  * @LastEditors: Please set LastEditors
11
- * @LastEditTime: 2023-02-25 13:41:30
11
+ * @LastEditTime: 2024-04-17 10:16:12
12
12
  */
13
13
  import React from 'react';
14
14
  import { withFieldCellWrapper } from '../HOC';
15
15
  import { deepClone } from '../../../../../../../utils';
16
+ import { tr } from '../../../../../../../framework/locale';
16
17
  var Index = function Index(props) {
17
18
  var data = props.data,
18
19
  fgStream = props.fgStream,
@@ -58,7 +59,7 @@ var Index = function Index(props) {
58
59
  span: setting === null || setting === void 0 ? void 0 : (_setting$checkbox = setting.checkbox) === null || _setting$checkbox === void 0 ? void 0 : _setting$checkbox.colSpan
59
60
  }, /*#__PURE__*/React.createElement(_Checkbox, {
60
61
  value: it.value
61
- }, it.label));
62
+ }, tr(it.label)));
62
63
  }))));
63
64
  };
64
65
  export default withFieldCellWrapper(Index);
@@ -8,6 +8,7 @@ import React from "react";
8
8
  * @LastEditTime: 2023-02-16 14:52:38
9
9
  */
10
10
  import { withFieldCellWrapper } from '../HOC';
11
+ import { tr } from '../../../../../../../framework/locale';
11
12
  var Index = function Index(props) {
12
13
  var data = props.data,
13
14
  fgStream = props.fgStream,
@@ -15,7 +16,7 @@ var Index = function Index(props) {
15
16
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
16
17
  type: "color",
17
18
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
18
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder
19
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder)
19
20
  }));
20
21
  };
21
22
  export default withFieldCellWrapper(Index);
@@ -5,16 +5,17 @@ import React from "react";
5
5
  * @Author: uloveits 719310130@qq.com
6
6
  * @Date: 2023-02-06 15:05:42
7
7
  * @LastEditors: Please set LastEditors
8
- * @LastEditTime: 2023-04-27 18:51:17
8
+ * @LastEditTime: 2024-04-17 10:17:47
9
9
  */
10
10
  import { withFieldCellWrapper } from '../HOC';
11
11
  import { DEFAULT_DATE_FORMAT } from '../../../../../../../comps/MetadataForm/DataCell/Input';
12
+ import { tr } from '../../../../../../../framework/locale';
12
13
  var Index = function Index(props) {
13
14
  var setting = props.setting;
14
15
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DatePicker, {
15
16
  showTime: true,
16
17
  format: DEFAULT_DATE_FORMAT,
17
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
18
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
18
19
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
19
20
  }));
20
21
  };
@@ -5,16 +5,17 @@ import React from "react";
5
5
  * @Author: uloveits 719310130@qq.com
6
6
  * @Date: 2023-02-06 15:05:42
7
7
  * @LastEditors: Please set LastEditors
8
- * @LastEditTime: 2023-02-08 14:02:58
8
+ * @LastEditTime: 2024-04-17 10:15:15
9
9
  */
10
10
  import { withFieldCellWrapper } from '../HOC';
11
+ import { tr } from '../../../../../../../framework/locale';
11
12
  var Index = function Index(props) {
12
13
  var data = props.data,
13
14
  fgStream = props.fgStream,
14
15
  setting = props.setting;
15
16
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
16
17
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
17
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
18
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
18
19
  allowClear: true
19
20
  }));
20
21
  };
@@ -3,12 +3,13 @@ import _Select from "antd/es/select";
3
3
  /*
4
4
  * @Author: uloveits 719310130@qq.com
5
5
  * @Date: 2023-02-06 15:05:42
6
- * @LastEditors: uloveits 719310130@qq.com
7
- * @LastEditTime: 2023-02-10 19:04:10
6
+ * @LastEditors: Please set LastEditors
7
+ * @LastEditTime: 2024-04-17 10:18:20
8
8
  */
9
9
  import React from 'react';
10
10
  import { withFieldCellWrapper } from '../HOC';
11
11
  import { deepClone } from '../../../../../../../utils';
12
+ import { tr } from '../../../../../../../framework/locale';
12
13
  var Index = function Index(props) {
13
14
  var setting = props.setting;
14
15
  var processNormalOptions = React.useCallback(function (opt) {
@@ -44,7 +45,7 @@ var Index = function Index(props) {
44
45
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Select, {
45
46
  options: options,
46
47
  mode: "multiple",
47
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
48
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
48
49
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
49
50
  }));
50
51
  };
@@ -5,13 +5,14 @@ import React from "react";
5
5
  * @Author: uloveits 719310130@qq.com
6
6
  * @Date: 2023-02-06 15:05:42
7
7
  * @LastEditors: Please set LastEditors
8
- * @LastEditTime: 2023-02-10 09:04:21
8
+ * @LastEditTime: 2024-04-17 10:18:33
9
9
  */
10
10
  import { withFieldCellWrapper } from '../HOC';
11
+ import { tr } from '../../../../../../../framework/locale';
11
12
  var Index = function Index(props) {
12
13
  var setting = props.setting;
13
14
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_InputNumber, {
14
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
15
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
15
16
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
16
17
  }));
17
18
  };
@@ -7,7 +7,7 @@ import React from "react";
7
7
  * @Author: uloveits 719310130@qq.com
8
8
  * @Date: 2023-02-06 15:05:42
9
9
  * @LastEditors: Please set LastEditors
10
- * @LastEditTime: 2023-06-02 11:34:36
10
+ * @LastEditTime: 2024-04-17 10:19:14
11
11
  */
12
12
  import { withFieldCellWrapper } from '../HOC';
13
13
  var Index = function Index(props) {
@@ -5,16 +5,17 @@ import React from "react";
5
5
  * @Author: uloveits 719310130@qq.com
6
6
  * @Date: 2023-02-06 15:05:42
7
7
  * @LastEditors: Please set LastEditors
8
- * @LastEditTime: 2023-02-25 11:31:55
8
+ * @LastEditTime: 2024-04-17 10:19:26
9
9
  */
10
10
  import { withFieldCellWrapper } from '../HOC';
11
+ import { tr } from '../../../../../../../framework/locale';
11
12
  var Index = function Index(props) {
12
13
  var data = props.data,
13
14
  fgStream = props.fgStream,
14
15
  setting = props.setting;
15
16
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input.Password, {
16
17
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
17
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
18
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
18
19
  allowClear: true
19
20
  }));
20
21
  };
@@ -8,11 +8,12 @@ import _Radio from "antd/es/radio";
8
8
  * @Author: uloveits 719310130@qq.com
9
9
  * @Date: 2023-02-06 15:05:42
10
10
  * @LastEditors: Please set LastEditors
11
- * @LastEditTime: 2023-02-25 13:42:12
11
+ * @LastEditTime: 2024-04-17 10:19:48
12
12
  */
13
13
  import React from 'react';
14
14
  import { withFieldCellWrapper } from '../HOC';
15
15
  import { deepClone } from '../../../../../../../utils';
16
+ import { tr } from '../../../../../../../framework/locale';
16
17
  var Index = function Index(props) {
17
18
  var data = props.data,
18
19
  fgStream = props.fgStream,
@@ -58,7 +59,7 @@ var Index = function Index(props) {
58
59
  span: setting === null || setting === void 0 ? void 0 : (_setting$checkbox = setting.checkbox) === null || _setting$checkbox === void 0 ? void 0 : _setting$checkbox.colSpan
59
60
  }, /*#__PURE__*/React.createElement(_Radio, {
60
61
  value: it.value
61
- }, it.label));
62
+ }, tr(it.label)));
62
63
  }))));
63
64
  };
64
65
  export default withFieldCellWrapper(Index);
@@ -3,12 +3,13 @@ import _Select from "antd/es/select";
3
3
  /*
4
4
  * @Author: uloveits 719310130@qq.com
5
5
  * @Date: 2023-02-06 15:05:42
6
- * @LastEditors: uloveits 719310130@qq.com
7
- * @LastEditTime: 2023-02-28 15:55:42
6
+ * @LastEditors: Please set LastEditors
7
+ * @LastEditTime: 2024-04-17 10:20:00
8
8
  */
9
9
  import React from 'react';
10
10
  import { withFieldCellWrapper } from '../HOC';
11
11
  import { deepClone } from '../../../../../../../utils';
12
+ import { tr } from '../../../../../../../framework/locale';
12
13
  var Index = function Index(props) {
13
14
  var setting = props.setting;
14
15
  var processNormalOptions = React.useCallback(function (opt) {
@@ -43,7 +44,7 @@ var Index = function Index(props) {
43
44
  }, [setting === null || setting === void 0 ? void 0 : setting.enum]);
44
45
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Select, {
45
46
  options: options,
46
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
47
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
47
48
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
48
49
  allowClear: true
49
50
  }));
@@ -4,16 +4,17 @@ import React from "react";
4
4
  /*
5
5
  * @Author: uloveits 719310130@qq.com
6
6
  * @Date: 2023-02-06 15:05:42
7
- * @LastEditors: uloveits 719310130@qq.com
8
- * @LastEditTime: 2023-02-28 16:26:14
7
+ * @LastEditors: Please set LastEditors
8
+ * @LastEditTime: 2024-04-17 10:20:19
9
9
  */
10
10
  import { withFieldCellWrapper } from '../HOC';
11
+ import { tr } from '../../../../../../../framework/locale';
11
12
  var Index = function Index(props) {
12
13
  var _setting$text;
13
14
  var setting = props.setting;
14
15
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input.TextArea, {
15
16
  rows: (setting === null || setting === void 0 ? void 0 : (_setting$text = setting.text) === null || _setting$text === void 0 ? void 0 : _setting$text.textareaRows) || 4,
16
- placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
17
+ placeholder: tr(setting === null || setting === void 0 ? void 0 : setting.placeholder),
17
18
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
18
19
  }));
19
20
  };
@@ -10,7 +10,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
10
10
  /*
11
11
  * @Author: wangxian
12
12
  * @Date: 2023-02-06 09:46:17
13
- * @LastEditTime: 2023-06-25 18:09:24
13
+ * @LastEditTime: 2024-04-17 10:03:33
14
14
  */
15
15
  import React from 'react';
16
16
  import { useDrop } from 'react-dnd';
@@ -19,6 +19,7 @@ import { dragItemType, formSetting as _formSetting, streamEventType } from '../.
19
19
  import useObservable from '../../../../../framework/rxjs-hooks/useObservable';
20
20
  import { arrayInsert, arrayMoveImmutable, guid } from '../../../../../utils';
21
21
  import RenderField from './RenderField';
22
+ import { tr } from '../../../../../framework/locale';
22
23
  import './index.less';
23
24
  var CanvasCore = function CanvasCore(props) {
24
25
  var _formSetting$layout;
@@ -273,6 +274,6 @@ var CanvasCore = function CanvasCore(props) {
273
274
  color: 'var(--ronds-metadata-color-text-2)',
274
275
  opacity: 0.6
275
276
  }
276
- }, "\u62D6\u62FD\u5DE6\u4FA7\u680F\u7684\u7EC4\u4EF6\u8FDB\u884C\u6DFB\u52A0")))));
277
+ }, tr('拖拽左侧栏的组件进行添加'))))));
277
278
  };
278
279
  export default /*#__PURE__*/React.memo(CanvasCore);
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
8
  /*
9
9
  * @Author: wangxian
10
10
  * @Date: 2023-02-06 08:24:17
11
- * @LastEditTime: 2023-10-12 10:50:46
11
+ * @LastEditTime: 2024-04-17 10:01:46
12
12
  */
13
13
  import React from 'react';
14
14
  import copy from 'copy-to-clipboard';
@@ -18,6 +18,7 @@ import { transFG2Schema } from '../../transformer';
18
18
  import CanvasCore from './core';
19
19
  import useObservable from '../../../../framework/rxjs-hooks/useObservable';
20
20
  import Preview from './Preview';
21
+ import { tr } from '../../../../framework/locale';
21
22
  var Canvas = function Canvas() {
22
23
  var nodesRef = React.useRef([]);
23
24
  var settingRef = React.useRef({
@@ -95,12 +96,12 @@ var Canvas = function Canvas() {
95
96
  marginRight: '8px'
96
97
  },
97
98
  onClick: onPreview
98
- }, schema.length > 0 ? '取消预览' : '预览'), /*#__PURE__*/React.createElement(_Button, {
99
+ }, schema.length > 0 ? tr('取消预览') : tr('预览')), /*#__PURE__*/React.createElement(_Button, {
99
100
  style: {
100
101
  marginRight: '8px'
101
102
  },
102
103
  onClick: onClearCanvas
103
- }, "\u6E05\u7A7A"), /*#__PURE__*/React.createElement(_Button, {
104
+ }, tr('清空')), /*#__PURE__*/React.createElement(_Button, {
104
105
  style: {
105
106
  marginRight: '8px'
106
107
  },
@@ -108,15 +109,15 @@ var Canvas = function Canvas() {
108
109
  onClick: function onClick() {
109
110
  var _schema = transFG2Schema(nodesRef.current, settingRef.current, typesRef.current);
110
111
  if (copy(JSON.stringify(_schema))) {
111
- _message.success("\u5DF2\u590D\u5236\u5230\u526A\u5207\u677F");
112
+ _message.success(tr('已复制到剪切板'));
112
113
  }
113
114
  }
114
- }, "\u5BFC\u51FASchema"), /*#__PURE__*/React.createElement(_Button, {
115
+ }, tr('导出Schema')), /*#__PURE__*/React.createElement(_Button, {
115
116
  style: {
116
117
  marginRight: '8px'
117
118
  },
118
119
  onClick: onImportSchema
119
- }, "\u5BFC\u5165")), schema.length > 0 && /*#__PURE__*/React.createElement(Preview, {
120
+ }, tr(' 导入'))), schema.length > 0 && /*#__PURE__*/React.createElement(Preview, {
120
121
  schema: schema
121
122
  }), /*#__PURE__*/React.createElement("div", {
122
123
  style: {
@@ -7,13 +7,14 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
7
7
  * @Author: uloveits 719310130@qq.com
8
8
  * @Date: 2023-02-04 16:35:15
9
9
  * @LastEditors: Please set LastEditors
10
- * @LastEditTime: 2023-06-26 08:52:25
10
+ * @LastEditTime: 2024-04-17 09:59:51
11
11
  */
12
12
  import React from 'react';
13
13
  import { FGCtx } from '../../Provider';
14
14
  import { formSetting, streamEventType } from '../../settings';
15
15
  import MetadataForm from '../../../../comps/MetadataForm';
16
16
  import useObservable from '../../../../framework/rxjs-hooks/useObservable';
17
+ import { tr } from '../../../../framework/locale';
17
18
  var Settings = function Settings() {
18
19
  var _curNode$param, _formSetting$param;
19
20
  var fGCtx = React.useContext(FGCtx) || {};
@@ -108,7 +109,7 @@ var Settings = function Settings() {
108
109
  activeKey: curTab,
109
110
  onChange: onTabChange
110
111
  }, curNode && /*#__PURE__*/React.createElement(_Tabs.TabPane, {
111
- tab: "\u7EC4\u4EF6\u914D\u7F6E",
112
+ tab: tr('组件配置'),
112
113
  key: curNode.id
113
114
  }, /*#__PURE__*/React.createElement(MetadataForm, {
114
115
  schema: (_curNode$param = curNode.param) === null || _curNode$param === void 0 ? void 0 : _curNode$param.schema,
@@ -6,11 +6,12 @@ import React from "react";
6
6
  * @Author: uloveits 719310130@qq.com
7
7
  * @Date: 2023-02-04 17:21:17
8
8
  * @LastEditors: Please set LastEditors
9
- * @LastEditTime: 2023-06-15 10:13:41
9
+ * @LastEditTime: 2024-04-17 09:58:31
10
10
  */
11
11
  import { useDrag } from 'react-dnd';
12
12
  import Icon from '../../../Icons';
13
13
  import { dragItemType } from '../../settings';
14
+ import { tr } from '../../../../framework/locale';
14
15
  var Elements = function Elements(props) {
15
16
  var data = props.data;
16
17
  var _useDrag = useDrag({
@@ -61,6 +62,6 @@ var Elements = function Elements(props) {
61
62
  style: {
62
63
  marginRight: '10px'
63
64
  }
64
- }), data.name)));
65
+ }), tr(data.name))));
65
66
  };
66
67
  export default Elements;
@@ -18,6 +18,7 @@ import JsonSchema from './JsonSchema';
18
18
  import useObservable from '../../../../framework/rxjs-hooks/useObservable';
19
19
  import { FGCtx } from '../../Provider';
20
20
  import { transFG2Schema } from '../../transformer';
21
+ import { tr } from '../../../../framework/locale';
21
22
  var Sidebar = function Sidebar() {
22
23
  var _React$useState = React.useState('comps'),
23
24
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -84,10 +85,10 @@ var Sidebar = function Sidebar() {
84
85
  className: "fg-sidebar-bottom-tool"
85
86
  }, /*#__PURE__*/React.createElement(_Radio.Group, {
86
87
  options: [{
87
- label: '组件',
88
+ label: tr('组件'),
88
89
  value: 'comps'
89
90
  }, {
90
- label: 'JSON',
91
+ label: tr('JSON'),
91
92
  value: 'json'
92
93
  }],
93
94
  onChange: function onChange(_ref) {
@@ -2,9 +2,10 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  /*
3
3
  * @Author: wangxian
4
4
  * @Date: 2023-02-08 10:36:25
5
- * @LastEditTime: 2023-06-02 10:39:54
5
+ * @LastEditTime: 2024-04-17 10:42:02
6
6
  */
7
7
  import { DEFAULT_DATE_FORMAT } from '../../../comps/MetadataForm/DataCell/Input';
8
+ import { tr } from '../../../framework/locale';
8
9
  export var Rule = {
9
10
  common: {
10
11
  id: {
@@ -16,7 +17,7 @@ export var Rule = {
16
17
  refId: 'com.ronds.schema.default.Rule.Form',
17
18
  value: {
18
19
  label: 'ID',
19
- tooltip: '字段名称(仅支持英文)'
20
+ tooltip: tr('字段名称(仅支持英文)')
20
21
  }
21
22
  }]
22
23
  },
@@ -28,7 +29,7 @@ export var Rule = {
28
29
  type: 'ref',
29
30
  refId: 'com.ronds.schema.default.Rule.Form',
30
31
  value: {
31
- label: '标题'
32
+ label: tr('标题')
32
33
  }
33
34
  }]
34
35
  },
@@ -40,7 +41,7 @@ export var Rule = {
40
41
  type: 'ref',
41
42
  refId: 'com.ronds.schema.default.Rule.Form',
42
43
  value: {
43
- label: '标题颜色',
44
+ label: tr('标题颜色'),
44
45
  type: 'colorPicker'
45
46
  }
46
47
  }]
@@ -57,9 +58,9 @@ export var Rule = {
57
58
  depend: {}
58
59
  },
59
60
  common: {
60
- label: '组件布局',
61
- tooltip: '默认按照整体布局配置排布',
62
- help: '这里填写表单整体布局的倍数,最大一行'
61
+ label: tr('组件布局'),
62
+ tooltip: tr('默认按照整体布局配置排布'),
63
+ help: tr('这里填写表单整体布局的倍数,最大一行')
63
64
  }
64
65
  }
65
66
  }]
@@ -72,7 +73,7 @@ export var Rule = {
72
73
  type: 'ref',
73
74
  refId: 'com.ronds.schema.default.Rule.Form',
74
75
  value: {
75
- label: '默认值'
76
+ label: tr('默认值')
76
77
  }
77
78
  }]
78
79
  },
@@ -84,7 +85,7 @@ export var Rule = {
84
85
  type: 'ref',
85
86
  refId: 'com.ronds.schema.default.Rule.Form',
86
87
  value: {
87
- label: '帮助说明'
88
+ label: tr('帮助说明')
88
89
  }
89
90
  }]
90
91
  },
@@ -96,7 +97,7 @@ export var Rule = {
96
97
  type: 'ref',
97
98
  refId: 'com.ronds.schema.default.Rule.Form',
98
99
  value: {
99
- label: '提示说明'
100
+ label: tr('提示说明')
100
101
  }
101
102
  }]
102
103
  },
@@ -108,7 +109,7 @@ export var Rule = {
108
109
  type: 'ref',
109
110
  refId: 'com.ronds.schema.default.Rule.Form',
110
111
  value: {
111
- label: '默认文本'
112
+ label: tr('默认文本')
112
113
  }
113
114
  }]
114
115
  },
@@ -120,8 +121,8 @@ export var Rule = {
120
121
  type: 'ref',
121
122
  refId: 'com.ronds.schema.default.Rule.Form',
122
123
  value: {
123
- label: '是否换行',
124
- help: '后面字段另起一行'
124
+ label: tr('是否换行'),
125
+ help: tr('后面字段另起一行')
125
126
  }
126
127
  }]
127
128
  },
@@ -133,7 +134,7 @@ export var Rule = {
133
134
  type: 'ref',
134
135
  refId: 'com.ronds.schema.default.Rule.Form',
135
136
  value: {
136
- label: '是否必填'
137
+ label: tr('是否必填')
137
138
  }
138
139
  }]
139
140
  },
@@ -145,7 +146,7 @@ export var Rule = {
145
146
  type: 'ref',
146
147
  refId: 'com.ronds.schema.default.Rule.Form',
147
148
  value: {
148
- label: '是否禁用'
149
+ label: tr('是否禁用')
149
150
  }
150
151
  }]
151
152
  },
@@ -158,7 +159,7 @@ export var Rule = {
158
159
  refId: 'com.ronds.schema.default.Rule.Form',
159
160
  value: {
160
161
  common: {
161
- label: '是否隐藏'
162
+ label: tr('是否隐藏')
162
163
  },
163
164
  'common-en-US': {}
164
165
  }
@@ -176,7 +177,7 @@ export var Rule = {
176
177
  value: {
177
178
  text: {},
178
179
  common: {
179
- label: '隐藏'
180
+ label: tr('隐藏')
180
181
  },
181
182
  'common-en-US': {}
182
183
  }
@@ -192,7 +193,7 @@ export var Rule = {
192
193
  value: {
193
194
  text: {},
194
195
  common: {
195
- label: '显示',
196
+ label: tr('显示'),
196
197
  depend: {}
197
198
  },
198
199
  'common-en-US': {}
@@ -209,7 +210,7 @@ export var Rule = {
209
210
  value: {
210
211
  text: {},
211
212
  common: {
212
- label: '非必填',
213
+ label: tr('非必填'),
213
214
  depend: {}
214
215
  },
215
216
  'common-en-US': {}
@@ -226,7 +227,7 @@ export var Rule = {
226
227
  value: {
227
228
  text: {},
228
229
  common: {
229
- label: '只读',
230
+ label: tr('只读'),
230
231
  depend: {}
231
232
  },
232
233
  'common-en-US': {}
@@ -257,24 +258,24 @@ export var Rule = {
257
258
  enum: {
258
259
  value: [{
259
260
  key: 'textarea',
260
- value: '文本框'
261
+ value: tr('文本框')
261
262
  }, {
262
263
  key: 'password',
263
- value: '密码框'
264
+ value: tr('密码框')
264
265
  }, {
265
266
  key: 'datePicker',
266
- value: '日期选择框'
267
+ value: tr('日期选择框')
267
268
  }, {
268
269
  key: 'colorPicker',
269
- value: '颜色选择框'
270
+ value: tr('颜色选择框')
270
271
  }, {
271
272
  key: 'upload',
272
- value: '上传'
273
+ value: tr('上传')
273
274
  }]
274
275
  },
275
276
  text: {},
276
277
  common: {
277
- label: '类型'
278
+ label: tr('类型')
278
279
  }
279
280
  }
280
281
  }]
@@ -289,7 +290,7 @@ export var Rule = {
289
290
  value: {
290
291
  text: {},
291
292
  common: {
292
- label: '格式化',
293
+ label: tr('格式化'),
293
294
  help: "".concat(DEFAULT_DATE_FORMAT)
294
295
  },
295
296
  'common-en-US': {}
@@ -306,7 +307,7 @@ export var Rule = {
306
307
  value: {
307
308
  text: {},
308
309
  common: {
309
- label: '默认高度'
310
+ label: tr('默认高度')
310
311
  },
311
312
  'common-en-US': {}
312
313
  }
@@ -324,7 +325,7 @@ export var Rule = {
324
325
  value: {
325
326
  text: {},
326
327
  common: {
327
- label: '正则表达式'
328
+ label: tr('正则表达式')
328
329
  },
329
330
  'common-en-US': {}
330
331
  }
@@ -340,7 +341,7 @@ export var Rule = {
340
341
  value: {
341
342
  text: {},
342
343
  common: {
343
- label: '提示信息'
344
+ label: tr('提示信息')
344
345
  },
345
346
  'common-en-US': {}
346
347
  }
@@ -365,7 +366,7 @@ var Ref2Rule = {
365
366
  refId: 'com.ronds.schema.default.Rule.Form.Common',
366
367
  value: {
367
368
  common: {
368
- label: '枚举值'
369
+ label: tr('枚举值')
369
370
  },
370
371
  'common-en-US': {},
371
372
  array: {
@@ -398,8 +399,8 @@ var Ref2Rule = {
398
399
  refId: 'com.ronds.schema.default.Rule.Form',
399
400
  value: {
400
401
  common: {
401
- label: '动态枚举值',
402
- tooltip: '通过接口调用获取枚举值'
402
+ label: tr('动态枚举值'),
403
+ tooltip: tr('通过接口调用获取枚举值')
403
404
  },
404
405
  'common-en-US': {}
405
406
  }
@@ -418,7 +419,7 @@ var Ref2Rule = {
418
419
  value: {
419
420
  text: {},
420
421
  common: {
421
- label: '请求URL'
422
+ label: tr('请求URL')
422
423
  },
423
424
  'common-en-US': {}
424
425
  }
@@ -438,7 +439,7 @@ var Ref2Rule = {
438
439
  value: {
439
440
  text: {},
440
441
  common: {
441
- label: '请求方法',
442
+ label: tr('请求方法'),
442
443
  defaultValue: 'get'
443
444
  },
444
445
  'common-en-US': {}
@@ -456,8 +457,8 @@ var Ref2Rule = {
456
457
  type: 'textarea'
457
458
  },
458
459
  common: {
459
- label: 'Body参数',
460
- help: '支持Json字符串,系统会自动序列化',
460
+ label: tr('Body参数'),
461
+ help: tr('支持Json字符串,系统会自动序列化'),
461
462
  depend: {
462
463
  show: "method=='post'"
463
464
  }
@@ -475,7 +476,7 @@ var Ref2Rule = {
475
476
  value: {
476
477
  text: {},
477
478
  common: {
478
- label: 'Key的替换属性'
479
+ label: tr('Key的替换属性')
479
480
  },
480
481
  'common-en-US': {}
481
482
  }
@@ -490,7 +491,7 @@ var Ref2Rule = {
490
491
  value: {
491
492
  text: {},
492
493
  common: {
493
- label: 'Vaule的替换属性'
494
+ label: tr('Vaule的替换属性')
494
495
  },
495
496
  'common-en-US': {}
496
497
  }
@@ -505,8 +506,8 @@ var Ref2Rule = {
505
506
  value: {
506
507
  text: {},
507
508
  common: {
508
- label: '监听',
509
- help: '监听多个属性,用英文逗号隔开',
509
+ label: tr('监听'),
510
+ help: tr('监听多个属性,用英文逗号隔开'),
510
511
  placeholder: 'id,name'
511
512
  },
512
513
  'common-en-US': {}
@@ -530,7 +531,7 @@ export var RefRule = {
530
531
  refId: 'com.ronds.schema.default.Rule.Form',
531
532
  value: {
532
533
  common: {
533
- label: '列表联动'
534
+ label: tr('列表联动')
534
535
  },
535
536
  'common-en-US': {}
536
537
  }
@@ -557,7 +558,7 @@ export var RefRule = {
557
558
  value: {
558
559
  array: {},
559
560
  common: {
560
- label: '校验规则'
561
+ label: tr('校验规则')
561
562
  },
562
563
  'common-en-US': {}
563
564
  }
@@ -581,7 +582,7 @@ export var RefRule = {
581
582
  refId: 'com.ronds.schema.default.Rule.Form',
582
583
  value: {
583
584
  common: {
584
- label: '高级设置'
585
+ label: tr('高级设置')
585
586
  },
586
587
  'common-en-US': {}
587
588
  }
@@ -604,7 +605,7 @@ export var RefRule = {
604
605
  refId: 'com.ronds.schema.default.Rule.Form',
605
606
  value: {
606
607
  common: {
607
- label: '高级设置'
608
+ label: tr('高级设置')
608
609
  },
609
610
  'common-en-US': {}
610
611
  }
@@ -627,7 +628,7 @@ export var RefRule = {
627
628
  refId: 'com.ronds.schema.default.Rule.Form',
628
629
  value: {
629
630
  common: {
630
- label: '高级设置'
631
+ label: tr('高级设置')
631
632
  },
632
633
  ref: {
633
634
  titleHidden: true
@@ -11,7 +11,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
11
11
  /*
12
12
  * @Author: wangxian
13
13
  * @Date: 2021-09-18 14:15:04
14
- * @LastEditTime: 2024-03-20 13:39:47
14
+ * @LastEditTime: 2024-04-17 09:14:59
15
15
  */
16
16
  import React from 'react';
17
17
  import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
@@ -66,7 +66,7 @@ function Index(props) {
66
66
  className: "ant-form-item-label ant-form-item-label-wrap mt-1 "
67
67
  }, /*#__PURE__*/React.createElement("label", {
68
68
  className: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require) && 'ant-form-item-required')
69
- }, extraInfo.label || fieldRule && ((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && ((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : _fieldRule$2$value.common.label) || id)), formContext.isShowTypeInfo && /*#__PURE__*/React.createElement("div", {
69
+ }, tr(extraInfo.label) || fieldRule && tr((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && tr((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : _fieldRule$2$value.common.label) || id)), formContext.isShowTypeInfo && /*#__PURE__*/React.createElement("div", {
70
70
  style: {
71
71
  padding: '0 6px',
72
72
  position: 'absolute',
@@ -74,7 +74,7 @@ function Index(props) {
74
74
  top: '19px',
75
75
  background: '#fff'
76
76
  }
77
- }, help || (items === null || items === void 0 ? void 0 : items.type)))), /*#__PURE__*/React.createElement(_Col, {
77
+ }, tr(help) || (items === null || items === void 0 ? void 0 : items.type)))), /*#__PURE__*/React.createElement(_Col, {
78
78
  flex: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? "0 0 ".concat((24 - labelSpan) * 100 / 24, "%") : 1,
79
79
  style: {
80
80
  width: "".concat((24 - labelSpan) * 100 / 24, "%")
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
8
  /*
9
9
  * @Author: wangxian
10
10
  * @Date: 2021-09-18 14:15:04
11
- * @LastEditTime: 2024-02-27 09:45:28
11
+ * @LastEditTime: 2024-04-17 09:22:09
12
12
  */
13
13
  import React from 'react';
14
14
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -37,7 +37,7 @@ function Index(props) {
37
37
  var _ = _rules.map(function (it) {
38
38
  return {
39
39
  pattern: new RegExp(eval(it === null || it === void 0 ? void 0 : it.regExp), 'g'),
40
- message: it.message
40
+ message: tr(it.message)
41
41
  };
42
42
  });
43
43
  setRules(_toConsumableArray(_));
@@ -55,7 +55,7 @@ function Index(props) {
55
55
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
56
56
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
57
57
  } : {}
58
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
58
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
59
59
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
60
60
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
61
61
  offset: 0
@@ -69,13 +69,13 @@ function Index(props) {
69
69
  } : undefined,
70
70
  rules: [{
71
71
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
72
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
72
+ message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
73
73
  }].concat(_toConsumableArray(rules)),
74
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
75
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
74
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
75
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
76
76
  }), /*#__PURE__*/React.createElement(_InputNumber, {
77
77
  disabled: (_extraInfo$disabled = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : disabled,
78
- placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
78
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
79
79
  }));
80
80
  }
81
81
  return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
@@ -88,7 +88,7 @@ function Index(props) {
88
88
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
89
89
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
90
90
  } : {}
91
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
91
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
92
92
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
93
93
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
94
94
  offset: 0
@@ -103,13 +103,13 @@ function Index(props) {
103
103
  name: name,
104
104
  rules: [{
105
105
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
106
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
106
+ message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
107
107
  }].concat(_toConsumableArray(rules)),
108
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
109
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
108
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
109
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
110
110
  }, /*#__PURE__*/React.createElement(_InputNumber, {
111
111
  disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
112
- placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
112
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
113
113
  })) : /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
114
114
  style: {
115
115
  flex: 1,
@@ -118,13 +118,13 @@ function Index(props) {
118
118
  name: [field === null || field === void 0 ? void 0 : field.name],
119
119
  rules: [{
120
120
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
121
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
121
+ message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
122
122
  }].concat(_toConsumableArray(rules)),
123
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
124
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
123
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
124
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
125
125
  }), /*#__PURE__*/React.createElement(_InputNumber, {
126
126
  disabled: (_extraInfo$disabled3 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled3 !== void 0 ? _extraInfo$disabled3 : disabled,
127
- placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
127
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
128
128
  }));
129
129
  }
130
130
  export default /*#__PURE__*/React.memo(Index);
@@ -194,7 +194,7 @@ function Index(props) {
194
194
  }
195
195
  }, /*#__PURE__*/React.createElement("label", {
196
196
  className: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require) && 'ant-form-item-required')
197
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || fieldRule && ((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && ((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : (_fieldRule$2$value$co = _fieldRule$2$value.common) === null || _fieldRule$2$value$co === void 0 ? void 0 : _fieldRule$2$value$co.label) || id)), formContext.isFoldForm && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
197
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || fieldRule && tr((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && tr((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : (_fieldRule$2$value$co = _fieldRule$2$value.common) === null || _fieldRule$2$value$co === void 0 ? void 0 : _fieldRule$2$value$co.label) || id)), formContext.isFoldForm && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
198
198
  type: "link",
199
199
  onClick: function onClick() {
200
200
  setIsFold(!isFold);
@@ -233,7 +233,7 @@ function Index(props) {
233
233
  }
234
234
  return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
235
235
  key: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.defaultValue,
236
- label: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id,
236
+ label: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id,
237
237
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
238
238
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
239
239
  offset: 0
@@ -249,16 +249,16 @@ function Index(props) {
249
249
  name: id,
250
250
  rules: [{
251
251
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
252
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
252
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
253
253
  }],
254
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
255
- tooltip: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip) || help
254
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
255
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip) || tr(help)
256
256
  }, /*#__PURE__*/React.createElement(_Select, {
257
257
  showSearch: true,
258
258
  options: options || [],
259
- placeholder: extraInfo.placeholder,
259
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
260
260
  disabled: (_extraInfo$disabled = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : disabled,
261
- notFoundContent: '没有批到到该实体数据',
261
+ notFoundContent: tr('没有匹配到该实体数据'),
262
262
  filterOption: function filterOption(input, option) {
263
263
  return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
264
264
  },
@@ -272,19 +272,19 @@ function Index(props) {
272
272
  name: [field === null || field === void 0 ? void 0 : field.name],
273
273
  rules: [{
274
274
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
275
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
275
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
276
276
  }],
277
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
278
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
277
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
278
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
279
279
  }), /*#__PURE__*/React.createElement(_Select, {
280
280
  showSearch: true,
281
281
  style: {
282
282
  width: '100%'
283
283
  },
284
284
  options: options || [],
285
- placeholder: extraInfo.placeholder,
285
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
286
286
  disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
287
- notFoundContent: '没有批到到该实体数据',
287
+ notFoundContent: tr('没有匹配到该实体数据'),
288
288
  filterOption: function filterOption(input, option) {
289
289
  return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
290
290
  },
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
37
37
  /*
38
38
  * @Author:wangxian
39
39
  * @Date: 2021-09-18 14:15:04
40
- * @LastEditTime: 2024-02-26 10:27:57
40
+ * @LastEditTime: 2024-04-17 09:50:12
41
41
  */
42
42
  import React from 'react';
43
43
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -444,10 +444,10 @@ function Index(props) {
444
444
  labelInValue: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelInValue,
445
445
  allowClear: true,
446
446
  disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
447
- placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder,
447
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
448
448
  maxTagCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagCount,
449
449
  maxTagTextLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagTextLength,
450
- maxTagPlaceholder: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
450
+ maxTagPlaceholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
451
451
  });
452
452
  } else if (isPagination) {
453
453
  var _extraInfo$disabled3;
@@ -455,7 +455,7 @@ function Index(props) {
455
455
  mode: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.isMutiple) ? 'multiple' : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mode,
456
456
  onSelect: onSelect,
457
457
  disabled: (_extraInfo$disabled3 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled3 !== void 0 ? _extraInfo$disabled3 : disabled,
458
- placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder,
458
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
459
459
  options: httpOptions && httpOptions.length > 0 ? httpOptions : options,
460
460
  dropdownRender: function dropdownRender(menu) {
461
461
  return /*#__PURE__*/React.createElement(React.Fragment, null, menu, /*#__PURE__*/React.createElement(_Divider, {
@@ -496,7 +496,7 @@ function Index(props) {
496
496
  span: extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$checkbox = extraInfo.checkbox) === null || _extraInfo$checkbox === void 0 ? void 0 : _extraInfo$checkbox.colSpan
497
497
  }, /*#__PURE__*/React.createElement(_Checkbox, {
498
498
  value: it.value
499
- }, it.label));
499
+ }, tr(it.label)));
500
500
  }))) : /*#__PURE__*/React.createElement(_Radio.Group, {
501
501
  style: {
502
502
  width: '100%'
@@ -508,7 +508,7 @@ function Index(props) {
508
508
  span: extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$checkbox2 = extraInfo.checkbox) === null || _extraInfo$checkbox2 === void 0 ? void 0 : _extraInfo$checkbox2.colSpan
509
509
  }, /*#__PURE__*/React.createElement(_Radio, {
510
510
  value: it.value
511
- }, it.label));
511
+ }, tr(it.label)));
512
512
  })));
513
513
  } else {
514
514
  var _extraInfo$disabled4;
@@ -516,7 +516,7 @@ function Index(props) {
516
516
  mode: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.isMutiple) ? 'multiple' : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mode,
517
517
  onSelect: onSelect,
518
518
  disabled: (_extraInfo$disabled4 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled4 !== void 0 ? _extraInfo$disabled4 : disabled,
519
- placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder,
519
+ placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
520
520
  options: myOptions,
521
521
  showSearch: true,
522
522
  filterOption: function filterOption(input, option) {
@@ -531,7 +531,7 @@ function Index(props) {
531
531
  labelInValue: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelInValue,
532
532
  maxTagCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagCount,
533
533
  maxTagTextLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagTextLength,
534
- maxTagPlaceholder: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
534
+ maxTagPlaceholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
535
535
  });
536
536
  }
537
537
  };
@@ -546,7 +546,7 @@ function Index(props) {
546
546
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
547
547
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
548
548
  } : {}
549
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
549
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
550
550
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
551
551
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
552
552
  offset: 0
@@ -561,10 +561,10 @@ function Index(props) {
561
561
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
562
562
  rules: [{
563
563
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
564
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
564
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
565
565
  }],
566
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
567
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
566
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
567
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
568
568
  }), processSelectType((_extraInfo$http8 = extraInfo.http) === null || _extraInfo$http8 === void 0 ? void 0 : _extraInfo$http8.isCascader, (_extraInfo$http9 = extraInfo.http) === null || _extraInfo$http9 === void 0 ? void 0 : _extraInfo$http9.isTreeSelect, (_extraInfo$http10 = extraInfo.http) === null || _extraInfo$http10 === void 0 ? void 0 : _extraInfo$http10.isPagination));
569
569
  }
570
570
  return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
@@ -577,7 +577,7 @@ function Index(props) {
577
577
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
578
578
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
579
579
  } : {}
580
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
580
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
581
581
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
582
582
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
583
583
  offset: 0
@@ -592,10 +592,10 @@ function Index(props) {
592
592
  name: name,
593
593
  rules: [{
594
594
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
595
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
595
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
596
596
  }],
597
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
598
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
597
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
598
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
599
599
  }, processSelectType((_extraInfo$http11 = extraInfo.http) === null || _extraInfo$http11 === void 0 ? void 0 : _extraInfo$http11.isCascader, (_extraInfo$http12 = extraInfo.http) === null || _extraInfo$http12 === void 0 ? void 0 : _extraInfo$http12.isTreeSelect, (_extraInfo$http13 = extraInfo.http) === null || _extraInfo$http13 === void 0 ? void 0 : _extraInfo$http13.isPagination)) : /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
600
600
  style: {
601
601
  flex: 1,
@@ -604,10 +604,10 @@ function Index(props) {
604
604
  name: [field === null || field === void 0 ? void 0 : field.name],
605
605
  rules: [{
606
606
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
607
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
607
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
608
608
  }],
609
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
610
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
609
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
610
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
611
611
  }), processSelectType((_extraInfo$http14 = extraInfo.http) === null || _extraInfo$http14 === void 0 ? void 0 : _extraInfo$http14.isCascader, (_extraInfo$http15 = extraInfo.http) === null || _extraInfo$http15 === void 0 ? void 0 : _extraInfo$http15.isTreeSelect, (_extraInfo$http16 = extraInfo.http) === null || _extraInfo$http16 === void 0 ? void 0 : _extraInfo$http16.isPagination));
612
612
  }
613
613
  export default /*#__PURE__*/React.memo(Index);
@@ -7,7 +7,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
7
7
  /*
8
8
  * @Author: wangxian
9
9
  * @Date: 2021-09-18 14:15:04
10
- * @LastEditTime: 2024-02-27 09:47:00
10
+ * @LastEditTime: 2024-04-17 09:52:06
11
11
  */
12
12
  import React from 'react';
13
13
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -37,7 +37,7 @@ function Index(props) {
37
37
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
38
38
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
39
39
  } : {}
40
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
40
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
41
41
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
42
42
  span: labelSpan,
43
43
  offset: 0
@@ -53,10 +53,10 @@ function Index(props) {
53
53
  valuePropName: "checked",
54
54
  rules: [{
55
55
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
56
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
56
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
57
57
  }],
58
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
59
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
58
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
59
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
60
60
  }), /*#__PURE__*/React.createElement(_Switch, {
61
61
  disabled: (_extraInfo$disabled = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : disabled,
62
62
  checkedChildren: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.checkedChildren,
@@ -68,7 +68,7 @@ function Index(props) {
68
68
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
69
69
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
70
70
  } : {}
71
- }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
71
+ }, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
72
72
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
73
73
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
74
74
  offset: 0
@@ -89,10 +89,10 @@ function Index(props) {
89
89
  valuePropName: "checked",
90
90
  rules: [{
91
91
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
92
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
92
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
93
93
  }],
94
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
95
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
94
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
95
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
96
96
  }, /*#__PURE__*/React.createElement(_Switch, {
97
97
  disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
98
98
  checkedChildren: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.checkedChildren,
@@ -106,10 +106,10 @@ function Index(props) {
106
106
  valuePropName: "checked",
107
107
  rules: [{
108
108
  required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
109
- message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
109
+ message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
110
110
  }],
111
- help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
112
- tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
111
+ help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
112
+ tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
113
113
  }), /*#__PURE__*/React.createElement(_Switch, {
114
114
  disabled: (_extraInfo$disabled3 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled3 !== void 0 ? _extraInfo$disabled3 : disabled,
115
115
  checkedChildren: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.checkedChildren,
@@ -17,6 +17,7 @@ import { MetadataFormContext } from '../../interface';
17
17
  import { assignReplace, getLabelByProps } from '../../utils';
18
18
  import { deepClone, getConstantValue } from '../../../../utils';
19
19
  import { STREAM_EVENT_TYPE } from '../../constants';
20
+ import { tr } from '../../../../framework/locale';
20
21
  var TableArray = function TableArray(props) {
21
22
  var initValue = props.initValue,
22
23
  readonly = props.readonly,
@@ -239,7 +240,7 @@ var TableArray = function TableArray(props) {
239
240
  }
240
241
  _enum.forEach(function (it) {
241
242
  var obj = {
242
- label: it.value,
243
+ label: tr(it.value),
243
244
  value: (it === null || it === void 0 ? void 0 : it.key) || (it === null || it === void 0 ? void 0 : it.value)
244
245
  };
245
246
  _options.push(obj);
@@ -262,7 +263,7 @@ var TableArray = function TableArray(props) {
262
263
  var it = _properties[i];
263
264
  var extraInfo = refFieldsRef.current.get(it.id);
264
265
  var obj = {
265
- title: getLabelByProps(it),
266
+ title: tr(getLabelByProps(it)),
266
267
  key: it.id,
267
268
  dataIndex: it.id,
268
269
  width: processColumnType(it, extraInfo) === 'buttonCell' ? 25 : 50,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.37",
4
+ "version": "1.3.38",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",
@@ -81,6 +81,7 @@
81
81
  "remark-gfm": "^3.0.1",
82
82
  "ronds-react-markdown": "^1.0.12",
83
83
  "rxjs": "^7.5.4",
84
+ "walk": "^2.3.15",
84
85
  "xlsx": "^0.18.5"
85
86
  },
86
87
  "peerDependencies": {
@@ -107,6 +108,7 @@
107
108
  "gh-pages": "^3.0.0",
108
109
  "less-loader": "^7.0.0",
109
110
  "lint-staged": "^10.0.7",
111
+ "node-xlsx": "^0.24.0",
110
112
  "prettier": "^2.2.1",
111
113
  "style-loader": "^1.2.1",
112
114
  "webpack-cli": "^3.3.12",