ronds-metadata 1.2.10 → 1.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. package/es/api/index.js +249 -0
  2. package/es/comps/DynamicPorts/comps/ContextMenu.js +44 -0
  3. package/es/comps/DynamicPorts/comps/DragNode.js +55 -0
  4. package/es/comps/DynamicPorts/comps/GraphHandler/index.js +51 -0
  5. package/es/comps/DynamicPorts/comps/NodeElement.js +30 -0
  6. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.js +42 -0
  7. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.js +40 -0
  8. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.js +55 -0
  9. package/es/comps/DynamicPorts/comps/shape/connector.js +19 -0
  10. package/es/comps/DynamicPorts/comps/shape/edge.js +91 -0
  11. package/es/comps/DynamicPorts/comps/shape/node.js +190 -0
  12. package/es/comps/DynamicPorts/constant/index.js +19 -0
  13. package/es/comps/DynamicPorts/graph.js +697 -0
  14. package/es/comps/DynamicPorts/index.js +143 -0
  15. package/es/comps/DynamicPorts/interface.js +6 -0
  16. package/es/comps/DynamicPorts/utils.js +127 -0
  17. package/es/comps/Editable/DataCell/ButtonCell.js +45 -0
  18. package/es/comps/Editable/DataCell/ColorPicker.js +33 -0
  19. package/es/comps/Editable/DataCell/Input.js +54 -0
  20. package/es/comps/Editable/DataCell/Number.js +44 -0
  21. package/es/comps/Editable/DataCell/Select.js +48 -0
  22. package/es/comps/Editable/DataCell/Switch.js +33 -0
  23. package/es/comps/Editable/comps/EditableAction.js +110 -0
  24. package/es/comps/Editable/comps/EditableCell.js +108 -0
  25. package/es/comps/Editable/comps/EditableHeardCell.js +172 -0
  26. package/es/comps/Editable/comps/EditableRow.js +118 -0
  27. package/es/comps/Editable/comps/Texty.js +277 -0
  28. package/es/comps/Editable/index.js +386 -0
  29. package/es/comps/Editable/interface.js +8 -0
  30. package/es/comps/Editable/utils.js +46 -0
  31. package/es/comps/FileView/index.js +198 -0
  32. package/es/comps/FormGenerator/Provider.js +8 -0
  33. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +69 -0
  34. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +17 -0
  35. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +16 -0
  36. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.js +17 -0
  37. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.js +50 -0
  38. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +55 -0
  39. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +14 -0
  40. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.js +50 -0
  41. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +17 -0
  42. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +69 -0
  43. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +55 -0
  44. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.js +13 -0
  45. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.js +50 -0
  46. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +14 -0
  47. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.js +27 -0
  48. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.js +261 -0
  49. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +62 -0
  50. package/es/comps/FormGenerator/comps/Canvas/core/index.js +315 -0
  51. package/es/comps/FormGenerator/comps/Canvas/index.js +120 -0
  52. package/es/comps/FormGenerator/comps/Settings/index.js +150 -0
  53. package/es/comps/FormGenerator/comps/Sidebar/Elements.js +48 -0
  54. package/es/comps/FormGenerator/comps/Sidebar/index.js +37 -0
  55. package/es/comps/FormGenerator/index.js +68 -0
  56. package/es/comps/FormGenerator/settings/index.js +367 -0
  57. package/es/comps/FormGenerator/settings/ruleConfig.js +557 -0
  58. package/es/comps/FormGenerator/transformer.js +300 -0
  59. package/es/comps/Icons/index.js +23 -0
  60. package/es/comps/JsonEdit/constant/index.js +87 -0
  61. package/es/comps/JsonEdit/index.js +221 -0
  62. package/es/comps/JsonView/index.js +109 -0
  63. package/es/comps/MdEdit/index.js +41 -0
  64. package/es/comps/MdNavbar/index.js +180 -0
  65. package/es/comps/MdNavbar/utils.js +34 -0
  66. package/es/comps/MdView/index.js +70 -0
  67. package/es/comps/MetadataEdit/components/MetaFieldsEdit.js +419 -0
  68. package/es/comps/MetadataEdit/components/MetaPropsEdit.js +368 -0
  69. package/es/comps/MetadataEdit/constant/index.js +69 -0
  70. package/es/comps/MetadataEdit/hooks/index.js +43 -0
  71. package/es/comps/MetadataEdit/index.js +255 -0
  72. package/es/comps/MetadataEditV2/components/MetaFieldsEdit.js +237 -0
  73. package/es/comps/MetadataEditV2/components/MetaPropsEdit.js +367 -0
  74. package/es/comps/MetadataEditV2/constant/index.js +69 -0
  75. package/es/comps/MetadataEditV2/hooks/index.js +43 -0
  76. package/es/comps/MetadataEditV2/index.js +298 -0
  77. package/es/comps/MetadataForm/DataCell/Array.js +148 -0
  78. package/es/comps/MetadataForm/DataCell/Input.js +198 -0
  79. package/es/comps/MetadataForm/DataCell/Number.js +130 -0
  80. package/es/comps/MetadataForm/DataCell/Ref.js +326 -0
  81. package/es/comps/MetadataForm/DataCell/Select.js +557 -0
  82. package/es/comps/MetadataForm/DataCell/Switch.js +115 -0
  83. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +359 -0
  84. package/es/comps/MetadataForm/HOC/index.js +125 -0
  85. package/es/comps/MetadataForm/constants.js +11 -0
  86. package/es/comps/MetadataForm/hooks/index.js +128 -0
  87. package/es/comps/MetadataForm/index.js +268 -0
  88. package/es/comps/MetadataForm/interface.js +8 -0
  89. package/es/comps/MetadataForm/utils.js +112 -0
  90. package/es/comps/locales/en-US.js +24 -0
  91. package/es/comps/locales/index.js +8 -0
  92. package/es/comps/locales/zh-CN.js +24 -0
  93. package/es/config.js +50 -0
  94. package/es/framework/graph/index.js +515 -0
  95. package/es/framework/hooks/use-async-memo.js +32 -0
  96. package/es/framework/hooks/use-sync-scroll.js +106 -0
  97. package/es/framework/http/cache.js +137 -0
  98. package/es/framework/http/cancel.js +44 -0
  99. package/es/framework/http/index.js +392 -0
  100. package/es/framework/http/msgpack.js +34 -0
  101. package/es/framework/http/msgpack5/index.js +84 -0
  102. package/es/framework/http/msgpack5/lib/codecs/DateCodec.js +71 -0
  103. package/es/framework/http/msgpack5/lib/decoder.js +287 -0
  104. package/es/framework/http/msgpack5/lib/encoder.js +252 -0
  105. package/es/framework/http/msgpack5/lib/helpers.js +23 -0
  106. package/es/framework/http/msgpack5/lib/streams.js +93 -0
  107. package/es/framework/http/types.js +1 -0
  108. package/es/framework/libs/jquery.min.js +4022 -0
  109. package/es/framework/locale/dil8/di18n.js +132 -0
  110. package/es/framework/locale/dil8/index.js +3 -0
  111. package/es/framework/locale/dil8/translate.js +76 -0
  112. package/es/framework/locale/dil8/util.js +17 -0
  113. package/es/framework/locale/index.js +26 -0
  114. package/es/framework/metadata/MetadataService.js +169 -0
  115. package/es/framework/metadata/index.js +384 -0
  116. package/es/framework/rxjs-hooks/useMemoSubject.js +16 -0
  117. package/es/framework/rxjs-hooks/useObservable.js +22 -0
  118. package/es/framework/rxjs-hooks/useObservableState.js +45 -0
  119. package/es/index.js +27 -0
  120. package/es/utils.js +138 -0
  121. package/package.json +1 -1
@@ -0,0 +1,69 @@
1
+ import "antd/es/row/style";
2
+ import _Row from "antd/es/row";
3
+ import "antd/es/col/style";
4
+ import _Col from "antd/es/col";
5
+ import "antd/es/checkbox/style";
6
+ import _Checkbox from "antd/es/checkbox";
7
+ import React from 'react';
8
+ import { withFieldCellWrapper } from '../HOC';
9
+ import { deepClone } from '../../../../../../../utils';
10
+
11
+ var Index = function Index(props) {
12
+ var data = props.data,
13
+ fgStream = props.fgStream,
14
+ setting = props.setting;
15
+ var processNormalOptions = React.useCallback(function (opt) {
16
+ var _options = [];
17
+
18
+ var _enum = deepClone(opt);
19
+
20
+ _enum.forEach(function (it) {
21
+ var _it$key;
22
+
23
+ var obj = {
24
+ label: it.value,
25
+ value: (_it$key = it === null || it === void 0 ? void 0 : it.key) !== null && _it$key !== void 0 ? _it$key : it === null || it === void 0 ? void 0 : it.value
26
+ };
27
+
28
+ _options.push(obj);
29
+ });
30
+
31
+ return _options;
32
+ }, []);
33
+ var options = React.useMemo(function () {
34
+ var _setting$enum;
35
+
36
+ if (setting === null || setting === void 0 ? void 0 : (_setting$enum = setting.enum) === null || _setting$enum === void 0 ? void 0 : _setting$enum.value) {
37
+ var _setting$enum2;
38
+
39
+ return processNormalOptions(setting === null || setting === void 0 ? void 0 : (_setting$enum2 = setting.enum) === null || _setting$enum2 === void 0 ? void 0 : _setting$enum2.value);
40
+ }
41
+
42
+ return [{
43
+ label: 'uloveits1',
44
+ value: '1'
45
+ }, {
46
+ label: 'uloveits2',
47
+ value: '2'
48
+ }, {
49
+ label: 'uloveits3',
50
+ value: '3'
51
+ }];
52
+ }, [setting === null || setting === void 0 ? void 0 : setting.enum]);
53
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Checkbox.Group, {
54
+ style: {
55
+ width: '100%'
56
+ }
57
+ }, /*#__PURE__*/React.createElement(_Row, null, options.map(function (it) {
58
+ var _setting$checkbox;
59
+
60
+ return /*#__PURE__*/React.createElement(_Col, {
61
+ key: it.value,
62
+ span: setting === null || setting === void 0 ? void 0 : (_setting$checkbox = setting.checkbox) === null || _setting$checkbox === void 0 ? void 0 : _setting$checkbox.colSpan
63
+ }, /*#__PURE__*/React.createElement(_Checkbox, {
64
+ value: it.value
65
+ }, it.label));
66
+ }))));
67
+ };
68
+
69
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,17 @@
1
+ import "antd/es/input/style";
2
+ import _Input from "antd/es/input";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+
6
+ var Index = function Index(props) {
7
+ var data = props.data,
8
+ fgStream = props.fgStream,
9
+ setting = props.setting;
10
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
11
+ type: "color",
12
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
13
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder
14
+ }));
15
+ };
16
+
17
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,16 @@
1
+ import "antd/es/date-picker/style";
2
+ import _DatePicker from "antd/es/date-picker";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+ import { DEFAULT_DATE_FORMAT } from '../../../../../../../comps/MetadataForm/DataCell/Input';
6
+
7
+ var Index = function Index(props) {
8
+ var setting = props.setting;
9
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DatePicker, {
10
+ showTime: true,
11
+ format: DEFAULT_DATE_FORMAT,
12
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
13
+ }));
14
+ };
15
+
16
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,17 @@
1
+ import "antd/es/input/style";
2
+ import _Input from "antd/es/input";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+
6
+ var Index = function Index(props) {
7
+ var data = props.data,
8
+ fgStream = props.fgStream,
9
+ setting = props.setting;
10
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
11
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
12
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
13
+ allowClear: true
14
+ }));
15
+ };
16
+
17
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,50 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+
5
+ /*
6
+ * @Author: uloveits 719310130@qq.com
7
+ * @Date: 2023-02-06 15:05:42
8
+ * @LastEditors: uloveits 719310130@qq.com
9
+ * @LastEditTime: 2023-02-24 17:00:24
10
+ */
11
+ import React from 'react';
12
+ import CanvasCore from '../../index';
13
+ import { withFieldCellWrapper } from '../HOC';
14
+ import { streamEventType } from '../../../../../settings/index';
15
+
16
+ var Index = function Index(props) {
17
+ var data = props.data,
18
+ fgStream = props.fgStream,
19
+ setting = props.setting,
20
+ types = props.types;
21
+
22
+ var _React$useState = React.useState([]),
23
+ _React$useState2 = _slicedToArray(_React$useState, 2),
24
+ nodes = _React$useState2[0],
25
+ setNodes = _React$useState2[1];
26
+
27
+ var nodesRef = React.useRef([]);
28
+ React.useEffect(function () {
29
+ if ((types === null || types === void 0 ? void 0 : types.nodes.length) > 0) {
30
+ setNodes(_toConsumableArray(types.nodes));
31
+ nodesRef.current = types.nodes;
32
+ }
33
+ }, [types]);
34
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CanvasCore, {
35
+ key: data.id,
36
+ refId: data.id,
37
+ nodes: nodes,
38
+ onChange: function onChange(nodes) {
39
+ fgStream && fgStream.next({
40
+ type: streamEventType.onTypesChange,
41
+ payload: _defineProperty({}, data.id, {
42
+ id: (setting === null || setting === void 0 ? void 0 : setting.id) || data.id,
43
+ nodes: nodes
44
+ })
45
+ });
46
+ }
47
+ }));
48
+ };
49
+
50
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,55 @@
1
+ import "antd/es/select/style";
2
+ import _Select from "antd/es/select";
3
+ import React from 'react';
4
+ import { withFieldCellWrapper } from '../HOC';
5
+ import { deepClone } from '../../../../../../../utils';
6
+
7
+ var Index = function Index(props) {
8
+ var setting = props.setting;
9
+ var processNormalOptions = React.useCallback(function (opt) {
10
+ var _options = [];
11
+
12
+ var _enum = deepClone(opt);
13
+
14
+ _enum.forEach(function (it) {
15
+ var _it$key;
16
+
17
+ var obj = {
18
+ label: it.value,
19
+ value: (_it$key = it === null || it === void 0 ? void 0 : it.key) !== null && _it$key !== void 0 ? _it$key : it === null || it === void 0 ? void 0 : it.value
20
+ };
21
+
22
+ _options.push(obj);
23
+ });
24
+
25
+ return _options;
26
+ }, []);
27
+ var options = React.useMemo(function () {
28
+ var _setting$enum;
29
+
30
+ if (setting === null || setting === void 0 ? void 0 : (_setting$enum = setting.enum) === null || _setting$enum === void 0 ? void 0 : _setting$enum.value) {
31
+ var _setting$enum2;
32
+
33
+ return processNormalOptions(setting === null || setting === void 0 ? void 0 : (_setting$enum2 = setting.enum) === null || _setting$enum2 === void 0 ? void 0 : _setting$enum2.value);
34
+ }
35
+
36
+ return [{
37
+ label: 'uloveits1',
38
+ value: '1'
39
+ }, {
40
+ label: 'uloveits2',
41
+ value: '2'
42
+ }, {
43
+ label: 'uloveits3',
44
+ value: '3'
45
+ }];
46
+ }, [setting === null || setting === void 0 ? void 0 : setting.enum]);
47
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Select, {
48
+ options: options,
49
+ mode: "multiple",
50
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
51
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
52
+ }));
53
+ };
54
+
55
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,14 @@
1
+ import "antd/es/input-number/style";
2
+ import _InputNumber from "antd/es/input-number";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+
6
+ var Index = function Index(props) {
7
+ var setting = props.setting;
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_InputNumber, {
9
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
10
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
11
+ }));
12
+ };
13
+
14
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,50 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+
5
+ /*
6
+ * @Author: uloveits 719310130@qq.com
7
+ * @Date: 2023-02-06 15:05:42
8
+ * @LastEditors: uloveits 719310130@qq.com
9
+ * @LastEditTime: 2023-02-21 16:32:27
10
+ */
11
+ import React from 'react';
12
+ import CanvasCore from '../../index';
13
+ import { withFieldCellWrapper } from '../HOC';
14
+ import { streamEventType } from '../../../../../settings/index';
15
+
16
+ var Index = function Index(props) {
17
+ var data = props.data,
18
+ fgStream = props.fgStream,
19
+ setting = props.setting,
20
+ types = props.types;
21
+
22
+ var _React$useState = React.useState([]),
23
+ _React$useState2 = _slicedToArray(_React$useState, 2),
24
+ nodes = _React$useState2[0],
25
+ setNodes = _React$useState2[1];
26
+
27
+ var nodesRef = React.useRef([]);
28
+ React.useEffect(function () {
29
+ if ((types === null || types === void 0 ? void 0 : types.nodes.length) > 0) {
30
+ setNodes(_toConsumableArray(types.nodes));
31
+ nodesRef.current = types.nodes;
32
+ }
33
+ }, [types]);
34
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CanvasCore, {
35
+ key: data.id,
36
+ refId: data.id,
37
+ nodes: nodes,
38
+ onChange: function onChange(nodes) {
39
+ fgStream && fgStream.next({
40
+ type: streamEventType.onTypesChange,
41
+ payload: _defineProperty({}, data.id, {
42
+ id: (setting === null || setting === void 0 ? void 0 : setting.id) || data.id,
43
+ nodes: nodes
44
+ })
45
+ });
46
+ }
47
+ }));
48
+ };
49
+
50
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,17 @@
1
+ import "antd/es/input/style";
2
+ import _Input from "antd/es/input";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+
6
+ var Index = function Index(props) {
7
+ var data = props.data,
8
+ fgStream = props.fgStream,
9
+ setting = props.setting;
10
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input.Password, {
11
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
12
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
13
+ allowClear: true
14
+ }));
15
+ };
16
+
17
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,69 @@
1
+ import "antd/es/row/style";
2
+ import _Row from "antd/es/row";
3
+ import "antd/es/col/style";
4
+ import _Col from "antd/es/col";
5
+ import "antd/es/radio/style";
6
+ import _Radio from "antd/es/radio";
7
+ import React from 'react';
8
+ import { withFieldCellWrapper } from '../HOC';
9
+ import { deepClone } from '../../../../../../../utils';
10
+
11
+ var Index = function Index(props) {
12
+ var data = props.data,
13
+ fgStream = props.fgStream,
14
+ setting = props.setting;
15
+ var processNormalOptions = React.useCallback(function (opt) {
16
+ var _options = [];
17
+
18
+ var _enum = deepClone(opt);
19
+
20
+ _enum.forEach(function (it) {
21
+ var _it$key;
22
+
23
+ var obj = {
24
+ label: it.value,
25
+ value: (_it$key = it === null || it === void 0 ? void 0 : it.key) !== null && _it$key !== void 0 ? _it$key : it === null || it === void 0 ? void 0 : it.value
26
+ };
27
+
28
+ _options.push(obj);
29
+ });
30
+
31
+ return _options;
32
+ }, []);
33
+ var options = React.useMemo(function () {
34
+ var _setting$enum;
35
+
36
+ if (setting === null || setting === void 0 ? void 0 : (_setting$enum = setting.enum) === null || _setting$enum === void 0 ? void 0 : _setting$enum.value) {
37
+ var _setting$enum2;
38
+
39
+ return processNormalOptions(setting === null || setting === void 0 ? void 0 : (_setting$enum2 = setting.enum) === null || _setting$enum2 === void 0 ? void 0 : _setting$enum2.value);
40
+ }
41
+
42
+ return [{
43
+ label: 'uloveits1',
44
+ value: '1'
45
+ }, {
46
+ label: 'uloveits2',
47
+ value: '2'
48
+ }, {
49
+ label: 'uloveits3',
50
+ value: '3'
51
+ }];
52
+ }, [setting === null || setting === void 0 ? void 0 : setting.enum]);
53
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Radio.Group, {
54
+ style: {
55
+ width: '100%'
56
+ }
57
+ }, /*#__PURE__*/React.createElement(_Row, null, options.map(function (it) {
58
+ var _setting$checkbox;
59
+
60
+ return /*#__PURE__*/React.createElement(_Col, {
61
+ key: it.value,
62
+ span: setting === null || setting === void 0 ? void 0 : (_setting$checkbox = setting.checkbox) === null || _setting$checkbox === void 0 ? void 0 : _setting$checkbox.colSpan
63
+ }, /*#__PURE__*/React.createElement(_Radio, {
64
+ value: it.value
65
+ }, it.label));
66
+ }))));
67
+ };
68
+
69
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,55 @@
1
+ import "antd/es/select/style";
2
+ import _Select from "antd/es/select";
3
+ import React from 'react';
4
+ import { withFieldCellWrapper } from '../HOC';
5
+ import { deepClone } from '../../../../../../../utils';
6
+
7
+ var Index = function Index(props) {
8
+ var setting = props.setting;
9
+ var processNormalOptions = React.useCallback(function (opt) {
10
+ var _options = [];
11
+
12
+ var _enum = deepClone(opt);
13
+
14
+ _enum.forEach(function (it) {
15
+ var _it$key;
16
+
17
+ var obj = {
18
+ label: it.value,
19
+ value: (_it$key = it === null || it === void 0 ? void 0 : it.key) !== null && _it$key !== void 0 ? _it$key : it === null || it === void 0 ? void 0 : it.value
20
+ };
21
+
22
+ _options.push(obj);
23
+ });
24
+
25
+ return _options;
26
+ }, []);
27
+ var options = React.useMemo(function () {
28
+ var _setting$enum;
29
+
30
+ if (setting === null || setting === void 0 ? void 0 : (_setting$enum = setting.enum) === null || _setting$enum === void 0 ? void 0 : _setting$enum.value) {
31
+ var _setting$enum2;
32
+
33
+ return processNormalOptions(setting === null || setting === void 0 ? void 0 : (_setting$enum2 = setting.enum) === null || _setting$enum2 === void 0 ? void 0 : _setting$enum2.value);
34
+ }
35
+
36
+ return [{
37
+ label: 'uloveits1',
38
+ value: '1'
39
+ }, {
40
+ label: 'uloveits2',
41
+ value: '2'
42
+ }, {
43
+ label: 'uloveits3',
44
+ value: '3'
45
+ }];
46
+ }, [setting === null || setting === void 0 ? void 0 : setting.enum]);
47
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Select, {
48
+ options: options,
49
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
50
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
51
+ allowClear: true
52
+ }));
53
+ };
54
+
55
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,13 @@
1
+ import "antd/es/switch/style";
2
+ import _Switch from "antd/es/switch";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+
6
+ var Index = function Index(props) {
7
+ var setting = props.setting;
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Switch, {
9
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
10
+ }));
11
+ };
12
+
13
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,50 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+
5
+ /*
6
+ * @Author: uloveits 719310130@qq.com
7
+ * @Date: 2023-02-06 15:05:42
8
+ * @LastEditors: uloveits 719310130@qq.com
9
+ * @LastEditTime: 2023-02-27 10:10:23
10
+ */
11
+ import React from 'react';
12
+ import CanvasCore from '../../index';
13
+ import { withFieldCellWrapper } from '../HOC';
14
+ import { streamEventType } from '../../../../../settings/index';
15
+
16
+ var Index = function Index(props) {
17
+ var data = props.data,
18
+ fgStream = props.fgStream,
19
+ setting = props.setting,
20
+ types = props.types;
21
+
22
+ var _React$useState = React.useState([]),
23
+ _React$useState2 = _slicedToArray(_React$useState, 2),
24
+ nodes = _React$useState2[0],
25
+ setNodes = _React$useState2[1];
26
+
27
+ var nodesRef = React.useRef([]);
28
+ React.useEffect(function () {
29
+ if ((types === null || types === void 0 ? void 0 : types.nodes.length) > 0) {
30
+ setNodes(_toConsumableArray(types.nodes));
31
+ nodesRef.current = types.nodes;
32
+ }
33
+ }, [types]);
34
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CanvasCore, {
35
+ key: data.id,
36
+ refId: data.id,
37
+ nodes: nodes,
38
+ onChange: function onChange(nodes) {
39
+ fgStream && fgStream.next({
40
+ type: streamEventType.onTypesChange,
41
+ payload: _defineProperty({}, data.id, {
42
+ id: (setting === null || setting === void 0 ? void 0 : setting.id) || data.id,
43
+ nodes: nodes
44
+ })
45
+ });
46
+ }
47
+ }));
48
+ };
49
+
50
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,14 @@
1
+ import "antd/es/input/style";
2
+ import _Input from "antd/es/input";
3
+ import React from "react";
4
+ import { withFieldCellWrapper } from '../HOC';
5
+
6
+ var Index = function Index(props) {
7
+ var setting = props.setting;
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input.TextArea, {
9
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
10
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
11
+ }));
12
+ };
13
+
14
+ export default withFieldCellWrapper(Index);
@@ -0,0 +1,27 @@
1
+ import "antd/es/upload/style";
2
+ import _Upload from "antd/es/upload";
3
+ import "antd/es/button/style";
4
+ import _Button from "antd/es/button";
5
+ import React from "react";
6
+
7
+ /*
8
+ * @Author: uloveits 719310130@qq.com
9
+ * @Date: 2023-02-06 15:05:42
10
+ * @LastEditors: Please set LastEditors
11
+ * @LastEditTime: 2023-02-25 11:34:21
12
+ */
13
+ import { UploadOutlined } from '@ant-design/icons';
14
+ import { withFieldCellWrapper } from '../HOC';
15
+ import { tr } from '../../../../../../../framework/locale';
16
+
17
+ var Index = function Index(props) {
18
+ var data = props.data,
19
+ fgStream = props.fgStream,
20
+ setting = props.setting;
21
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Upload, null, /*#__PURE__*/React.createElement(_Button, {
22
+ disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
23
+ icon: /*#__PURE__*/React.createElement(UploadOutlined, null)
24
+ }, tr('上传'))));
25
+ };
26
+
27
+ export default withFieldCellWrapper(Index);