ronds-metadata 1.3.89 → 1.3.91

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 (244) hide show
  1. package/README.md +25 -25
  2. package/es/api/index.d.ts +11 -1
  3. package/es/api/index.js +202 -47
  4. package/es/comps/Chart/bar/index.d.ts +8 -0
  5. package/es/comps/Chart/bar/index.js +136 -0
  6. package/es/comps/Chart/constants.d.ts +7 -0
  7. package/es/comps/Chart/constants.js +8 -0
  8. package/es/comps/Chart/index.d.ts +9 -0
  9. package/es/comps/Chart/index.js +31 -0
  10. package/es/comps/Chart/line/index.d.ts +8 -0
  11. package/es/comps/Chart/line/index.js +163 -0
  12. package/es/comps/Chart/pie/index.d.ts +8 -0
  13. package/es/comps/Chart/pie/index.js +67 -0
  14. package/es/comps/Chart/type.d.ts +19 -0
  15. package/es/comps/Chart/type.js +1 -0
  16. package/es/comps/Chart/utils.d.ts +1 -0
  17. package/es/comps/Chart/utils.js +19 -0
  18. package/es/comps/CodeEdit/index.d.ts +5 -2
  19. package/es/comps/CodeEdit/index.js +42 -91
  20. package/es/comps/CodeEdit/index.less +6 -6
  21. package/es/comps/CodeEdit/utils.d.ts +2 -0
  22. package/es/comps/CodeEdit/utils.js +173 -0
  23. package/es/comps/CodeEditor/config.d.ts +27 -0
  24. package/es/comps/CodeEditor/config.js +64 -0
  25. package/es/comps/CodeEditor/index.d.ts +42 -0
  26. package/es/comps/CodeEditor/index.js +320 -0
  27. package/es/comps/CodeEditor/index.less +3 -0
  28. package/es/comps/CodeEditor/suggestions/constants/cassandra.d.ts +7 -0
  29. package/es/comps/CodeEditor/suggestions/constants/cassandra.js +6 -0
  30. package/es/comps/CodeEditor/suggestions/constants/clickhouse.d.ts +7 -0
  31. package/es/comps/CodeEditor/suggestions/constants/clickhouse.js +6 -0
  32. package/es/comps/CodeEditor/suggestions/constants/dm.d.ts +7 -0
  33. package/es/comps/CodeEditor/suggestions/constants/dm.js +6 -0
  34. package/es/comps/CodeEditor/suggestions/constants/index.d.ts +33 -0
  35. package/es/comps/CodeEditor/suggestions/constants/index.js +19 -0
  36. package/es/comps/CodeEditor/suggestions/constants/pgsql.d.ts +7 -0
  37. package/es/comps/CodeEditor/suggestions/constants/pgsql.js +6 -0
  38. package/es/comps/CodeEditor/suggestions/constants/redis.d.ts +7 -0
  39. package/es/comps/CodeEditor/suggestions/constants/redis.js +6 -0
  40. package/es/comps/CodeEditor/suggestions/constants/sqlserver.d.ts +7 -0
  41. package/es/comps/CodeEditor/suggestions/constants/sqlserver.js +6 -0
  42. package/es/comps/CodeEditor/suggestions/register/database.d.ts +8 -0
  43. package/es/comps/CodeEditor/suggestions/register/database.js +61 -0
  44. package/es/comps/CodeEditor/suggestions/register/field.d.ts +10 -0
  45. package/es/comps/CodeEditor/suggestions/register/field.js +144 -0
  46. package/es/comps/CodeEditor/suggestions/register/index.d.ts +7 -0
  47. package/es/comps/CodeEditor/suggestions/register/index.js +7 -0
  48. package/es/comps/CodeEditor/suggestions/register/keyword.d.ts +6 -0
  49. package/es/comps/CodeEditor/suggestions/register/keyword.js +79 -0
  50. package/es/comps/CodeEditor/suggestions/register/prompt.d.ts +5 -0
  51. package/es/comps/CodeEditor/suggestions/register/prompt.js +40 -0
  52. package/es/comps/CodeEditor/suggestions/register/schema.d.ts +7 -0
  53. package/es/comps/CodeEditor/suggestions/register/schema.js +85 -0
  54. package/es/comps/CodeEditor/suggestions/register/table.d.ts +14 -0
  55. package/es/comps/CodeEditor/suggestions/register/table.js +173 -0
  56. package/es/comps/CodeEditor/utils.d.ts +13 -0
  57. package/es/comps/CodeEditor/utils.js +69 -0
  58. package/es/comps/DataMine/Line.js +0 -1
  59. package/es/comps/DraggableDiv/index.d.ts +9 -0
  60. package/es/comps/DraggableDiv/index.js +139 -0
  61. package/es/comps/DraggableDiv/index.less +45 -0
  62. package/es/comps/DynamicPorts/comps/ContextMenu.less +8 -8
  63. package/es/comps/DynamicPorts/comps/DragNode.js +1 -1
  64. package/es/comps/DynamicPorts/comps/GraphHandler/index.less +39 -39
  65. package/es/comps/DynamicPorts/comps/NodeElementAlgo.d.ts +6 -0
  66. package/es/comps/DynamicPorts/comps/NodeElementAlgo.js +76 -0
  67. package/es/comps/DynamicPorts/comps/NodeElementConfig.d.ts +6 -0
  68. package/es/comps/DynamicPorts/comps/NodeElementConfig.js +73 -0
  69. package/es/comps/DynamicPorts/comps/NodeElementRead.d.ts +6 -0
  70. package/es/comps/DynamicPorts/comps/NodeElementRead.js +76 -0
  71. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.less +5 -5
  72. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.less +40 -40
  73. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.js +1 -1
  74. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.less +42 -42
  75. package/es/comps/DynamicPorts/comps/shape/connector.js +12 -2
  76. package/es/comps/DynamicPorts/comps/shape/edge.d.ts +2 -0
  77. package/es/comps/DynamicPorts/comps/shape/edge.js +30 -3
  78. package/es/comps/DynamicPorts/comps/shape/edge.less +8 -8
  79. package/es/comps/DynamicPorts/comps/shape/node.d.ts +15 -0
  80. package/es/comps/DynamicPorts/comps/shape/node.js +293 -5
  81. package/es/comps/DynamicPorts/constant/index.d.ts +2 -0
  82. package/es/comps/DynamicPorts/constant/index.js +3 -1
  83. package/es/comps/DynamicPorts/graph.d.ts +2 -2
  84. package/es/comps/DynamicPorts/graph.js +63 -38
  85. package/es/comps/DynamicPorts/index.d.ts +1 -1
  86. package/es/comps/DynamicPorts/index.js +1 -1
  87. package/es/comps/DynamicPorts/index.less +304 -3
  88. package/es/comps/DynamicPorts/interface.d.ts +7 -0
  89. package/es/comps/DynamicPorts/interface.js +1 -1
  90. package/es/comps/DynamicPorts/utils.d.ts +4 -0
  91. package/es/comps/DynamicPorts/utils.js +13 -2
  92. package/es/comps/Editable/DataCell/ButtonCell.js +28 -2
  93. package/es/comps/Editable/comps/EditableAction.d.ts +1 -0
  94. package/es/comps/Editable/comps/EditableAction.js +2 -1
  95. package/es/comps/Editable/comps/EditableRow.js +3 -2
  96. package/es/comps/Editable/comps/Texty.js +1 -2
  97. package/es/comps/Editable/comps/Texty.less +43 -43
  98. package/es/comps/Editable/comps/index.less +38 -38
  99. package/es/comps/Editable/index.d.ts +19 -0
  100. package/es/comps/Editable/index.js +15 -6
  101. package/es/comps/Editable/index.less +97 -97
  102. package/es/comps/Editable/interface.d.ts +1 -0
  103. package/es/comps/FileView/index.js +2 -2
  104. package/es/comps/FormGenerator/comps/Canvas/Preview.js +2 -1
  105. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/CassandraDs.d.ts +3 -0
  106. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/CassandraDs.js +258 -0
  107. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/KafkaDs.d.ts +3 -0
  108. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/KafkaDs.js +203 -0
  109. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/MinioDs.d.ts +3 -0
  110. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/MinioDs.js +203 -0
  111. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/PostgreSqlDs.d.ts +3 -0
  112. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/PostgreSqlDs.js +313 -0
  113. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/RedisDs.d.ts +3 -0
  114. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/datasource/RedisDs.js +203 -0
  115. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +11 -1
  116. package/es/comps/FormGenerator/comps/Canvas/core/index.less +53 -0
  117. package/es/comps/FormGenerator/comps/Canvas/index.js +1 -1
  118. package/es/comps/FormGenerator/comps/Sidebar/index.js +3 -2
  119. package/es/comps/FormGenerator/comps/Sidebar/index.less +21 -21
  120. package/es/comps/FormGenerator/index.less +20 -20
  121. package/es/comps/FormGenerator/settings/index.d.ts +131 -8
  122. package/es/comps/FormGenerator/settings/index.js +41 -1
  123. package/es/comps/FormGenerator/settings/ruleConfig.d.ts +49 -0
  124. package/es/comps/FormGenerator/settings/ruleConfig.js +49 -0
  125. package/es/comps/FormGenerator/transformer.js +33 -7
  126. package/es/comps/JsonEdit/index.js +0 -1
  127. package/es/comps/JsonEdit/index.less +64 -64
  128. package/es/comps/JsonView/index.less +41 -41
  129. package/es/comps/MdEdit/index.less +6 -6
  130. package/es/comps/MdEditPro/index.less +166 -166
  131. package/es/comps/MdNavbar/index.less +1 -1
  132. package/es/comps/MdView/index.less +3 -3
  133. package/es/comps/MetadataEdit/components/MetaFieldsEdit.js +5 -5
  134. package/es/comps/MetadataEdit/constant/index.js +0 -2
  135. package/es/comps/MetadataEdit/index.js +3 -3
  136. package/es/comps/MetadataEdit/index.less +10 -10
  137. package/es/comps/MetadataEdit/type.d.ts +20 -20
  138. package/es/comps/MetadataForm/DataCell/Array.js +14 -2
  139. package/es/comps/MetadataForm/DataCell/Input.js +65 -8
  140. package/es/comps/MetadataForm/DataCell/Ref.js +6 -6
  141. package/es/comps/MetadataForm/DataCell/Select.js +72 -31
  142. package/es/comps/MetadataForm/DataCell/business/config.d.ts +32 -36
  143. package/es/comps/MetadataForm/DataCell/business/config.js +74 -67
  144. package/es/comps/MetadataForm/DataCell/business/index.js +44 -1
  145. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +7 -7
  146. package/es/comps/MetadataForm/DataCell/plugin/ButtonSelect.d.ts +12 -0
  147. package/es/comps/MetadataForm/DataCell/plugin/ButtonSelect.js +68 -0
  148. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.d.ts +9 -1
  149. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.js +163 -90
  150. package/es/comps/MetadataForm/DataCell/plugin/Datasource/DataLake.d.ts +20 -0
  151. package/es/comps/MetadataForm/DataCell/plugin/Datasource/DataLake.js +255 -0
  152. package/es/comps/MetadataForm/DataCell/plugin/Datasource/DatasourceType.d.ts +17 -0
  153. package/es/comps/MetadataForm/DataCell/plugin/Datasource/DatasourceType.js +133 -0
  154. package/es/comps/MetadataForm/DataCell/plugin/Datasource/ExtraAttr.d.ts +10 -0
  155. package/es/comps/MetadataForm/DataCell/plugin/Datasource/ExtraAttr.js +65 -0
  156. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.d.ts +11 -1
  157. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.js +146 -60
  158. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Minio.d.ts +18 -0
  159. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Minio.js +92 -0
  160. package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.d.ts +13 -3
  161. package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.js +206 -124
  162. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Redis.d.ts +18 -0
  163. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Redis.js +92 -0
  164. package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.d.ts +10 -1
  165. package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.js +207 -122
  166. package/es/comps/MetadataForm/DataCell/plugin/Datasource/hooks.d.ts +2 -1
  167. package/es/comps/MetadataForm/DataCell/plugin/Datasource/hooks.js +39 -16
  168. package/es/comps/MetadataForm/DataCell/plugin/Datasource/index.js +359 -164
  169. package/es/comps/MetadataForm/DataCell/plugin/MappingTable.d.ts +12 -0
  170. package/es/comps/MetadataForm/DataCell/plugin/MappingTable.js +289 -0
  171. package/es/comps/MetadataForm/DataCell/plugin/RefreshSelect.js +17 -15
  172. package/es/comps/MetadataForm/DataCell/plugin/RunFrequency.d.ts +7 -0
  173. package/es/comps/MetadataForm/DataCell/plugin/RunFrequency.js +395 -0
  174. package/es/comps/MetadataForm/DataCell/plugin/RunStopSetting.d.ts +7 -0
  175. package/es/comps/MetadataForm/DataCell/plugin/RunStopSetting.js +238 -0
  176. package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.d.ts +4 -1
  177. package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.js +94 -78
  178. package/es/comps/MetadataForm/HOC/index.js +4 -4
  179. package/es/comps/MetadataForm/HOC/index.less +17 -6
  180. package/es/comps/MetadataForm/constants.d.ts +4 -0
  181. package/es/comps/MetadataForm/constants.js +6 -2
  182. package/es/comps/MetadataForm/hooks/index.js +5 -5
  183. package/es/comps/MetadataForm/index.d.ts +12 -0
  184. package/es/comps/MetadataForm/index.js +59 -3
  185. package/es/comps/MetadataForm/index.less +32 -29
  186. package/es/comps/MetadataForm/interface.d.ts +6 -0
  187. package/es/comps/MetadataForm/interface.js +2 -1
  188. package/es/comps/MetadataForm/utils.d.ts +2 -0
  189. package/es/comps/MetadataForm/utils.js +45 -9
  190. package/es/comps/Split/index.less +29 -29
  191. package/es/comps/VideoPlayer/index.d.ts +3 -0
  192. package/es/comps/VideoPlayer/index.js +14 -0
  193. package/es/comps/VideoPlayer/index.less +9 -0
  194. package/es/framework/canvas/EventBus.d.ts +21 -0
  195. package/es/framework/canvas/EventBus.js +66 -0
  196. package/es/framework/canvas/ImageLoadPool.d.ts +24 -0
  197. package/es/framework/canvas/ImageLoadPool.js +197 -0
  198. package/es/framework/canvas/index.d.ts +409 -0
  199. package/es/framework/canvas/index.js +2639 -0
  200. package/es/framework/canvas/shape/Circle.d.ts +7 -0
  201. package/es/framework/canvas/shape/Circle.js +35 -0
  202. package/es/framework/canvas/shape/Dot.d.ts +7 -0
  203. package/es/framework/canvas/shape/Dot.js +30 -0
  204. package/es/framework/canvas/shape/Grid.d.ts +12 -0
  205. package/es/framework/canvas/shape/Grid.js +82 -0
  206. package/es/framework/canvas/shape/Line.d.ts +6 -0
  207. package/es/framework/canvas/shape/Line.js +29 -0
  208. package/es/framework/canvas/shape/Polygon.d.ts +6 -0
  209. package/es/framework/canvas/shape/Polygon.js +24 -0
  210. package/es/framework/canvas/shape/Rect.d.ts +6 -0
  211. package/es/framework/canvas/shape/Rect.js +37 -0
  212. package/es/framework/canvas/shape/Shape.d.ts +42 -0
  213. package/es/framework/canvas/shape/Shape.js +49 -0
  214. package/es/framework/canvas/type.d.ts +17 -0
  215. package/es/framework/canvas/type.js +1 -0
  216. package/es/framework/graph/index.js +4 -4
  217. package/es/framework/graph/index.less +15 -15
  218. package/es/framework/http/index.js +8 -8
  219. package/es/framework/http/msgpack5/lib/helpers.js +0 -1
  220. package/es/framework/jsonQl/index.js +22 -22
  221. package/es/framework/libs/iconfont/iconfont.css +171 -3
  222. package/es/framework/libs/iconfont/iconfont.json +294 -0
  223. package/es/framework/libs/iconfont/iconfont.ttf +0 -0
  224. package/es/framework/libs/iconfont/iconfont.woff +0 -0
  225. package/es/framework/libs/iconfont/iconfont.woff2 +0 -0
  226. package/es/framework/libs/jquery.min.js +5 -5
  227. package/es/framework/metadata/MetadataService.d.ts +7 -0
  228. package/es/framework/metadata/MetadataService.js +124 -29
  229. package/es/framework/metadata/types.d.ts +14 -1
  230. package/es/framework/proto/index.d.ts +18 -0
  231. package/es/framework/proto/index.js +85 -1
  232. package/es/framework/rxjs-hooks/useMemoReplaySubject.d.ts +3 -0
  233. package/es/framework/rxjs-hooks/useMemoReplaySubject.js +49 -0
  234. package/es/framework/wave/index.d.ts +217 -0
  235. package/es/framework/wave/index.js +1448 -0
  236. package/es/framework/wave/type.d.ts +143 -0
  237. package/es/framework/wave/type.js +1 -0
  238. package/es/index.d.ts +10 -1
  239. package/es/index.js +13 -2
  240. package/es/theme.less +2 -0
  241. package/es/utils.js +1 -1
  242. package/package.json +122 -117
  243. package/es/comps/MetadataForm/DataCell/plugin/MapTable.d.ts +0 -8
  244. package/es/comps/MetadataForm/DataCell/plugin/MapTable.js +0 -297
@@ -1,297 +0,0 @@
1
- import "antd/es/checkbox/style";
2
- import _Checkbox from "antd/es/checkbox";
3
- import "antd/es/row/style";
4
- import _Row from "antd/es/row";
5
- import "antd/es/button/style";
6
- import _Button from "antd/es/button";
7
- import "antd/es/col/style";
8
- import _Col from "antd/es/col";
9
- import "antd/es/select/style";
10
- import _Select from "antd/es/select";
11
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
12
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
13
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
14
- import { CloseCircleFilled, ArrowRightOutlined } from '@ant-design/icons';
15
- import React from 'react';
16
- import Editable from '../../../../comps/Editable';
17
- import { MetadataFormContext } from '../../interface';
18
- import { useGetLabelCol, useGetWrapperCol } from './Datasource/hooks';
19
- import useObservable from '../../../../framework/rxjs-hooks/useObservable';
20
- import { STREAM_EVENT_TYPE } from '../../constants';
21
- var MapTable = function MapTable(props) {
22
- var value = props.value,
23
- onChange = props.onChange,
24
- extraInfo = props.extraInfo,
25
- disabled = props.disabled;
26
- var _React$useState = React.useState([]),
27
- _React$useState2 = _slicedToArray(_React$useState, 2),
28
- tableDataSource = _React$useState2[0],
29
- setTableDataSource = _React$useState2[1];
30
- var _React$useState3 = React.useState([]),
31
- _React$useState4 = _slicedToArray(_React$useState3, 2),
32
- tableDataTarget = _React$useState4[0],
33
- setTableDataTarget = _React$useState4[1];
34
- var tableDataSourceRef = React.useRef([]);
35
- var tableDataTargetRef = React.useRef([]);
36
- var _React$useState5 = React.useState([]),
37
- _React$useState6 = _slicedToArray(_React$useState5, 2),
38
- options = _React$useState6[0],
39
- setOptions = _React$useState6[1];
40
- var _React$useState7 = React.useState(),
41
- _React$useState8 = _slicedToArray(_React$useState7, 2),
42
- mapping = _React$useState8[0],
43
- setMapping = _React$useState8[1];
44
- var _React$useState9 = React.useState(),
45
- _React$useState10 = _slicedToArray(_React$useState9, 2),
46
- output = _React$useState10[0],
47
- setOutput = _React$useState10[1];
48
- var _React$useState11 = React.useState(),
49
- _React$useState12 = _slicedToArray(_React$useState11, 2),
50
- disableArray = _React$useState12[0],
51
- setDisableArray = _React$useState12[1];
52
- var sourceEditableStreamRef = React.useRef();
53
- var targetEditableStreamRef = React.useRef();
54
- var _React$useContext = React.useContext(MetadataFormContext),
55
- form = _React$useContext.form;
56
- var labelCol = useGetLabelCol(extraInfo);
57
- var wrapperCol = useGetWrapperCol(extraInfo);
58
- var formContext = React.useContext(MetadataFormContext) || {};
59
- useObservable(function (p) {
60
- if ((p === null || p === void 0 ? void 0 : p.type) === STREAM_EVENT_TYPE.ON_VALUES_CHANGE) {}
61
- }, [formContext === null || formContext === void 0 ? void 0 : formContext.stream$]);
62
- var triggerChange = function triggerChange(changedValue) {
63
- onChange && onChange(_objectSpread({
64
- mapping: mapping,
65
- output: output,
66
- options: options,
67
- dataSource: tableDataSource,
68
- dataTarget: tableDataTarget
69
- }, changedValue));
70
- };
71
- var onBtnClick = function onBtnClick(index) {
72
- var _disableArray = _toConsumableArray(disableArray);
73
- _disableArray[index] = !_disableArray[index];
74
- setDisableArray(_disableArray);
75
- };
76
- var onOutputChange = function onOutputChange(value) {
77
- setOutput(value);
78
- triggerChange({
79
- output: value
80
- });
81
- };
82
- var onSourceMove = function onSourceMove(data) {
83
- var newDataSource = _toConsumableArray(tableDataSource);
84
- var removedElement = newDataSource.splice(data === null || data === void 0 ? void 0 : data.dragIndex, 1)[0];
85
- newDataSource.splice(data === null || data === void 0 ? void 0 : data.hoverIndex, 0, removedElement);
86
- setTableDataSource(newDataSource);
87
- tableDataSourceRef.current = newDataSource;
88
- };
89
- var onTargetMove = function onTargetMove(data) {
90
- var newDataTarget = _toConsumableArray(tableDataTarget);
91
- var removedElement = newDataTarget.splice(data === null || data === void 0 ? void 0 : data.dragIndex, 1)[0];
92
- newDataTarget.splice(data === null || data === void 0 ? void 0 : data.hoverIndex, 0, removedElement);
93
- setTableDataTarget(newDataTarget);
94
- tableDataTargetRef.current = newDataTarget;
95
- };
96
- React.useEffect(function () {
97
- if (value) {
98
- if (value.mapping) {
99
- setMapping(value.mapping);
100
- triggerChange({
101
- mapping: value.mapping
102
- });
103
- }
104
- if (value.output) {
105
- setOutput(value.output);
106
- triggerChange({
107
- output: value.output
108
- });
109
- }
110
- if (value.options) {
111
- setOptions(value.options);
112
- triggerChange({
113
- options: value.options
114
- });
115
- }
116
- if (value.dataSource) {
117
- setTableDataSource(value.dataSource);
118
- tableDataSourceRef.current = value.dataSource;
119
- triggerChange({
120
- dataSource: value.dataSource
121
- });
122
- }
123
- if (value.dataTarget) {
124
- setTableDataTarget(value.dataTarget);
125
- tableDataTargetRef.current = value.dataTarget;
126
- triggerChange({
127
- dataTarget: value.dataTarget
128
- });
129
- }
130
- }
131
- }, []);
132
- React.useEffect(function () {
133
- if (disableArray) {
134
- var _mapping = [];
135
- disableArray.forEach(function (_, idx) {
136
- if (disableArray[idx]) {
137
- var _tableDataSource$idx, _tableDataSource$idx2, _tableDataTarget$idx, _tableDataTarget$idx2;
138
- _mapping.push({
139
- src: {
140
- name: (_tableDataSource$idx = tableDataSource[idx]) === null || _tableDataSource$idx === void 0 ? void 0 : _tableDataSource$idx.name,
141
- dataType: (_tableDataSource$idx2 = tableDataSource[idx]) === null || _tableDataSource$idx2 === void 0 ? void 0 : _tableDataSource$idx2.type
142
- },
143
- dst: {
144
- name: (_tableDataTarget$idx = tableDataTarget[idx]) === null || _tableDataTarget$idx === void 0 ? void 0 : _tableDataTarget$idx.name,
145
- dataType: (_tableDataTarget$idx2 = tableDataTarget[idx]) === null || _tableDataTarget$idx2 === void 0 ? void 0 : _tableDataTarget$idx2.type
146
- }
147
- });
148
- }
149
- });
150
- setMapping(_mapping);
151
- triggerChange({
152
- mapping: _mapping
153
- });
154
- }
155
- }, [disableArray]);
156
- React.useEffect(function () {
157
- var values = form.getFieldsValue().mapTable;
158
- if (tableDataSourceRef.current.length !== 0) {
159
- setTableDataSource(tableDataSourceRef.current);
160
- } else {
161
- (values === null || values === void 0 ? void 0 : values.dataSource) && setTableDataSource(values.dataSource);
162
- }
163
- if (tableDataTargetRef.current.length !== 0) {
164
- setTableDataTarget(tableDataTargetRef.current);
165
- } else {
166
- (values === null || values === void 0 ? void 0 : values.dataTarget) && setTableDataTarget(values.dataTarget);
167
- }
168
- (values === null || values === void 0 ? void 0 : values.options) && setOptions(values.options);
169
- if (!disableArray && (values === null || values === void 0 ? void 0 : values.dataSource) && (values === null || values === void 0 ? void 0 : values.dataTarget)) {
170
- var _values$dataSource, _values$dataTarget;
171
- var valueArray = new Array(Math.min((_values$dataSource = values.dataSource) === null || _values$dataSource === void 0 ? void 0 : _values$dataSource.length, (_values$dataTarget = values.dataTarget) === null || _values$dataTarget === void 0 ? void 0 : _values$dataTarget.length)).fill(true);
172
- setDisableArray(valueArray);
173
- }
174
- }, [form.getFieldsValue(), disableArray]);
175
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Row, {
176
- className: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.borderHidden) && 'ant-form-item',
177
- style: {
178
- alignItems: 'center'
179
- }
180
- }, /*#__PURE__*/React.createElement(_Col, {
181
- flex: wrapperCol,
182
- style: {
183
- paddingBottom: '8px'
184
- }
185
- }, /*#__PURE__*/React.createElement(_Select, {
186
- onChange: onOutputChange,
187
- value: output,
188
- options: options,
189
- disabled: disabled
190
- })), /*#__PURE__*/React.createElement("div", {
191
- style: {
192
- display: 'flex',
193
- width: '100%',
194
- height: '100%',
195
- marginTop: '2px'
196
- }
197
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
198
- style: {
199
- width: '40%'
200
- }
201
- }, /*#__PURE__*/React.createElement(Editable, {
202
- readonly: disabled,
203
- type: "single",
204
- columns: columnSource,
205
- dataSource: tableDataSource,
206
- onRowConfirm: function onRowConfirm() {},
207
- onRowDelete: function onRowDelete() {},
208
- getStreamInstance: function getStreamInstance(stream) {
209
- return sourceEditableStreamRef.current = stream;
210
- },
211
- onRowClick: function onRowClick(record) {},
212
- onMove: onSourceMove
213
- })), /*#__PURE__*/React.createElement("div", {
214
- style: {
215
- marginTop: '39px',
216
- marginRight: '6px'
217
- }
218
- }, _toConsumableArray(Array(Math.min(tableDataSource === null || tableDataSource === void 0 ? void 0 : tableDataSource.length, tableDataTarget === null || tableDataTarget === void 0 ? void 0 : tableDataTarget.length))).map(function (_, index) {
219
- return /*#__PURE__*/React.createElement("div", {
220
- key: index,
221
- style: {
222
- marginLeft: '6px',
223
- marginRight: '6px',
224
- lineHeight: '33px'
225
- }
226
- }, /*#__PURE__*/React.createElement(_Button, {
227
- key: index,
228
- type: "link",
229
- icon: disableArray && disableArray[index] ? /*#__PURE__*/React.createElement(ArrowRightOutlined, null) : /*#__PURE__*/React.createElement(CloseCircleFilled, null),
230
- onClick: function onClick() {
231
- return onBtnClick(index);
232
- },
233
- disabled: disabled
234
- }));
235
- })), /*#__PURE__*/React.createElement("div", {
236
- style: {
237
- width: '40%'
238
- }
239
- }, /*#__PURE__*/React.createElement(Editable, {
240
- readonly: disabled,
241
- type: "single",
242
- columns: columnTarget,
243
- dataSource: tableDataTarget,
244
- onRowConfirm: function onRowConfirm() {},
245
- onRowDelete: function onRowDelete() {},
246
- getStreamInstance: function getStreamInstance(stream) {
247
- return targetEditableStreamRef.current = stream;
248
- },
249
- onRowClick: function onRowClick(record) {},
250
- onMove: onTargetMove
251
- }))))));
252
- };
253
- export default MapTable;
254
- var columnSource = [{
255
- title: '来源表字段',
256
- dataIndex: 'name',
257
- key: 'name'
258
- }, {
259
- title: '类型',
260
- dataIndex: 'type',
261
- key: 'type'
262
- }, {
263
- title: '注释',
264
- dataIndex: 'label',
265
- key: 'label'
266
- }];
267
- var columnTarget = [{
268
- title: '目标表字段',
269
- dataIndex: 'name',
270
- key: 'name'
271
- }, {
272
- title: '类型',
273
- dataIndex: 'type',
274
- key: 'type'
275
- }, {
276
- title: '注释',
277
- dataIndex: 'label',
278
- key: 'label'
279
- }, {
280
- title: '主键',
281
- dataIndex: 'key',
282
- key: 'key',
283
- render: function render(val) {
284
- return /*#__PURE__*/React.createElement(_Checkbox, {
285
- checked: val
286
- });
287
- }
288
- }, {
289
- title: '非空',
290
- dataIndex: 'require',
291
- key: 'require',
292
- render: function render(val) {
293
- return /*#__PURE__*/React.createElement(_Checkbox, {
294
- checked: val
295
- });
296
- }
297
- }];