ronds-metadata 1.3.37 → 1.3.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) 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 +4 -2
  18. package/es/comps/FormGenerator/comps/Sidebar/index.js +3 -2
  19. package/es/comps/FormGenerator/settings/index.js +33 -32
  20. package/es/comps/FormGenerator/settings/ruleConfig.js +47 -46
  21. package/es/comps/MetadataForm/DataCell/Array.js +3 -3
  22. package/es/comps/MetadataForm/DataCell/Input.js +3 -3
  23. package/es/comps/MetadataForm/DataCell/Number.js +16 -16
  24. package/es/comps/MetadataForm/DataCell/Ref.js +12 -12
  25. package/es/comps/MetadataForm/DataCell/Select.js +19 -19
  26. package/es/comps/MetadataForm/DataCell/Switch.js +12 -12
  27. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +3 -2
  28. package/es/comps/locales/en-US.d.ts +118 -0
  29. package/es/comps/locales/en-US.js +120 -2
  30. 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 14:24:13
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,13 @@ 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 15:02:27
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';
15
+ import Texty from '../../../Editable/comps/Texty';
14
16
  var Elements = function Elements(props) {
15
17
  var data = props.data;
16
18
  var _useDrag = useDrag({
@@ -61,6 +63,6 @@ var Elements = function Elements(props) {
61
63
  style: {
62
64
  marginRight: '10px'
63
65
  }
64
- }), data.name)));
66
+ }), /*#__PURE__*/React.createElement(Texty, null, " ", tr(data.name)))));
65
67
  };
66
68
  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) {