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
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import { Dom, Node } from '@antv/x6';
6
6
  import { ReactShape } from '@antv/x6-react-shape';
7
- import { NODE_WIDTH, NODE_HEIGHT } from '../../constant';
7
+ import { NODE_WIDTH, NODE_HEIGHT, NODE_WIDTH_ALGO } from '../../constant';
8
8
  export var BaseNode = /*#__PURE__*/function (_ReactShape) {
9
9
  _inherits(BaseNode, _ReactShape);
10
10
  var _super = _createSuper(BaseNode);
@@ -175,12 +175,114 @@ DPGroupNode.config({
175
175
  }]
176
176
  }]
177
177
  });
178
- export var DPNodeForm = /*#__PURE__*/function (_BaseNode3) {
179
- _inherits(DPNodeForm, _BaseNode3);
180
- var _super4 = _createSuper(DPNodeForm);
178
+ export var DPNodeAlgo = /*#__PURE__*/function (_BaseNode3) {
179
+ _inherits(DPNodeAlgo, _BaseNode3);
180
+ var _super4 = _createSuper(DPNodeAlgo);
181
+ function DPNodeAlgo() {
182
+ _classCallCheck(this, DPNodeAlgo);
183
+ return _super4.apply(this, arguments);
184
+ }
185
+ _createClass(DPNodeAlgo, [{
186
+ key: "getInPorts",
187
+ value: function getInPorts() {
188
+ return this.getPortsByGroup('in');
189
+ }
190
+ }, {
191
+ key: "getOutPorts",
192
+ value: function getOutPorts() {
193
+ return this.getPortsByGroup('out');
194
+ }
195
+ }, {
196
+ key: "getConfigPorts",
197
+ value: function getConfigPorts() {
198
+ return this.getPortsByGroup('bottom');
199
+ }
200
+ }]);
201
+ return DPNodeAlgo;
202
+ }(BaseNode);
203
+ Node.registry.register('rz-algo-rect-port', DPNodeAlgo);
204
+ DPNodeAlgo.config({
205
+ width: NODE_WIDTH_ALGO,
206
+ height: 64,
207
+ shape: 'rz-algo-rect-port',
208
+ ports: {
209
+ groups: {
210
+ in: {
211
+ position: {
212
+ name: 'left'
213
+ },
214
+ zIndex: 2
215
+ },
216
+ out: {
217
+ position: {
218
+ name: 'right'
219
+ },
220
+ zIndex: 2
221
+ },
222
+ top: {
223
+ position: {
224
+ name: 'top'
225
+ },
226
+ zIndex: 2
227
+ },
228
+ config: {
229
+ position: {
230
+ name: 'bottom'
231
+ },
232
+ zIndex: 2
233
+ }
234
+ }
235
+ },
236
+ attrs: {
237
+ body: {
238
+ magnet: false,
239
+ fill: 'none',
240
+ stroke: 'none',
241
+ refWidth: '100%',
242
+ refHeight: '100%',
243
+ zIndex: 1
244
+ }
245
+ },
246
+ portMarkup: [{
247
+ tagName: 'foreignObject',
248
+ selector: 'fo',
249
+ attrs: {
250
+ width: 6,
251
+ height: 6,
252
+ x: -3,
253
+ y: -3,
254
+ zIndex: 10,
255
+ // magnet决定是否可交互
256
+ magnet: 'true'
257
+ },
258
+ children: [{
259
+ ns: Dom.ns.xhtml,
260
+ tagName: 'body',
261
+ selector: 'foBody',
262
+ attrs: {
263
+ xmlns: Dom.ns.xhtml
264
+ },
265
+ style: {
266
+ width: '100%',
267
+ height: '100%'
268
+ },
269
+ children: [{
270
+ tagName: 'span',
271
+ selector: 'content',
272
+ style: {
273
+ width: '100%',
274
+ height: '100%'
275
+ }
276
+ }]
277
+ }]
278
+ }]
279
+ });
280
+ export var DPNodeForm = /*#__PURE__*/function (_BaseNode4) {
281
+ _inherits(DPNodeForm, _BaseNode4);
282
+ var _super5 = _createSuper(DPNodeForm);
181
283
  function DPNodeForm() {
182
284
  _classCallCheck(this, DPNodeForm);
183
- return _super4.apply(this, arguments);
285
+ return _super5.apply(this, arguments);
184
286
  }
185
287
  _createClass(DPNodeForm, [{
186
288
  key: "getInPorts",
@@ -259,4 +361,190 @@ DPNodeForm.config({
259
361
  }]
260
362
  }]
261
363
  }]
364
+ });
365
+ export var DPNodeRead = /*#__PURE__*/function (_BaseNode5) {
366
+ _inherits(DPNodeRead, _BaseNode5);
367
+ var _super6 = _createSuper(DPNodeRead);
368
+ function DPNodeRead() {
369
+ _classCallCheck(this, DPNodeRead);
370
+ return _super6.apply(this, arguments);
371
+ }
372
+ _createClass(DPNodeRead, [{
373
+ key: "getInPorts",
374
+ value: function getInPorts() {
375
+ return this.getPortsByGroup('in');
376
+ }
377
+ }, {
378
+ key: "getOutPorts",
379
+ value: function getOutPorts() {
380
+ return this.getPortsByGroup('out');
381
+ }
382
+ }, {
383
+ key: "getConfigPorts",
384
+ value: function getConfigPorts() {
385
+ return this.getPortsByGroup('bottom');
386
+ }
387
+ }]);
388
+ return DPNodeRead;
389
+ }(BaseNode);
390
+ Node.registry.register('rz-read-rect-port', DPNodeRead);
391
+ DPNodeRead.config({
392
+ width: NODE_WIDTH_ALGO,
393
+ height: 64,
394
+ shape: 'rz-read-rect-port',
395
+ ports: {
396
+ groups: {
397
+ in: {
398
+ position: {
399
+ name: 'left'
400
+ },
401
+ zIndex: 2
402
+ },
403
+ out: {
404
+ position: {
405
+ name: 'right'
406
+ },
407
+ zIndex: 2
408
+ },
409
+ top: {
410
+ position: {
411
+ name: 'top'
412
+ },
413
+ zIndex: 2
414
+ },
415
+ config: {
416
+ position: {
417
+ name: 'bottom'
418
+ },
419
+ zIndex: 2
420
+ }
421
+ }
422
+ },
423
+ attrs: {
424
+ body: {
425
+ magnet: false,
426
+ fill: 'none',
427
+ stroke: 'none',
428
+ refWidth: '100%',
429
+ refHeight: '100%',
430
+ zIndex: 1
431
+ }
432
+ },
433
+ portMarkup: [{
434
+ tagName: 'foreignObject',
435
+ selector: 'fo',
436
+ attrs: {
437
+ width: 6,
438
+ height: 6,
439
+ x: -3,
440
+ y: -3,
441
+ zIndex: 10,
442
+ // magnet决定是否可交互
443
+ magnet: 'true'
444
+ },
445
+ children: [{
446
+ ns: Dom.ns.xhtml,
447
+ tagName: 'body',
448
+ selector: 'foBody',
449
+ attrs: {
450
+ xmlns: Dom.ns.xhtml
451
+ },
452
+ style: {
453
+ width: '100%',
454
+ height: '100%'
455
+ },
456
+ children: [{
457
+ tagName: 'span',
458
+ selector: 'content',
459
+ style: {
460
+ width: '100%',
461
+ height: '100%'
462
+ }
463
+ }]
464
+ }]
465
+ }]
466
+ });
467
+ export var DPNodeConfig = /*#__PURE__*/function (_BaseNode6) {
468
+ _inherits(DPNodeConfig, _BaseNode6);
469
+ var _super7 = _createSuper(DPNodeConfig);
470
+ function DPNodeConfig() {
471
+ _classCallCheck(this, DPNodeConfig);
472
+ return _super7.apply(this, arguments);
473
+ }
474
+ _createClass(DPNodeConfig, [{
475
+ key: "getInPorts",
476
+ value: function getInPorts() {
477
+ return this.getPortsByGroup('in');
478
+ }
479
+ }, {
480
+ key: "getOutPorts",
481
+ value: function getOutPorts() {
482
+ return this.getPortsByGroup('out');
483
+ }
484
+ }, {
485
+ key: "getConfigPorts",
486
+ value: function getConfigPorts() {
487
+ return this.getPortsByGroup('bottom');
488
+ }
489
+ }]);
490
+ return DPNodeConfig;
491
+ }(BaseNode);
492
+ Node.registry.register('rz-config-rect-port', DPNodeConfig);
493
+ DPNodeConfig.config({
494
+ width: NODE_WIDTH_ALGO,
495
+ height: 64,
496
+ shape: 'rz-config-rect-port',
497
+ ports: {
498
+ groups: {
499
+ out: {
500
+ position: {
501
+ name: 'top'
502
+ },
503
+ zIndex: 2
504
+ }
505
+ }
506
+ },
507
+ attrs: {
508
+ body: {
509
+ magnet: false,
510
+ fill: 'none',
511
+ stroke: 'none',
512
+ refWidth: '100%',
513
+ refHeight: '100%',
514
+ zIndex: 1
515
+ }
516
+ },
517
+ portMarkup: [{
518
+ tagName: 'foreignObject',
519
+ selector: 'fo',
520
+ attrs: {
521
+ width: 6,
522
+ height: 6,
523
+ x: -3,
524
+ y: -3,
525
+ zIndex: 10,
526
+ // magnet决定是否可交互
527
+ magnet: 'true'
528
+ },
529
+ children: [{
530
+ ns: Dom.ns.xhtml,
531
+ tagName: 'body',
532
+ selector: 'foBody',
533
+ attrs: {
534
+ xmlns: Dom.ns.xhtml
535
+ },
536
+ style: {
537
+ width: '100%',
538
+ height: '100%'
539
+ },
540
+ children: [{
541
+ tagName: 'span',
542
+ selector: 'content',
543
+ style: {
544
+ width: '100%',
545
+ height: '100%'
546
+ }
547
+ }]
548
+ }]
549
+ }]
262
550
  });
@@ -2,6 +2,8 @@ export declare const GROUP_HORIZONTAL__PADDING = 24;
2
2
  export declare const GROUP_VERTICAL__PADDING = 40;
3
3
  export declare const NODE_WIDTH = 180;
4
4
  export declare const NODE_HEIGHT = 32;
5
+ export declare const NODE_WIDTH_ALGO = 180;
6
+ export declare const NODE_HEIGHT_ALGO = 64;
5
7
  export declare const RERENDER_EVENT = "RERENDER_EVENT";
6
8
  export declare const DRAGGABLE_COMPONENT = "DRAGGABLE_COMPONENT";
7
9
  export declare const DRAGGABLE_MODEL = "DRAGGABLE_MODEL";
@@ -1,12 +1,14 @@
1
1
  /*
2
2
  * @Author: wangxian
3
3
  * @Date: 2022-05-24 08:48:57
4
- * @LastEditTime: 2022-05-25 11:37:48
4
+ * @LastEditTime: 2025-07-01 17:19:51
5
5
  */
6
6
  export var GROUP_HORIZONTAL__PADDING = 24; // 分组横向 padding
7
7
  export var GROUP_VERTICAL__PADDING = 40; // 分组纵向 padding
8
8
  export var NODE_WIDTH = 180;
9
9
  export var NODE_HEIGHT = 32;
10
+ export var NODE_WIDTH_ALGO = 180;
11
+ export var NODE_HEIGHT_ALGO = 64;
10
12
  // 触发画布重新渲染事件
11
13
  export var RERENDER_EVENT = 'RERENDER_EVENT';
12
14
  /*
@@ -2,7 +2,7 @@ import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
2
2
  import { Subscription } from 'rxjs/internal/Subscription';
3
3
  import { ConnectionRemovedArgs, ContextMenuInfo, GraphCore } from '../../framework/graph';
4
4
  import { BaseEdge, DPEdge } from './comps/shape/edge';
5
- import { BaseNode, DPNode, DPNodeForm } from './comps/shape/node';
5
+ import { BaseNode, DPNode, DPNodeAlgo, DPNodeConfig, DPNodeForm, DPNodeRead } from './comps/shape/node';
6
6
  import { NDPGraph } from './interface';
7
7
  import { formatGraphData } from './utils';
8
8
  type NodeMeta = ReturnType<typeof formatGraphData>['nodes'][number];
@@ -47,7 +47,7 @@ declare class DPGraph extends GraphCore<BaseNode, BaseEdge> {
47
47
  initialize(graphData?: NDPGraph.GraphData): Promise<void>;
48
48
  loadDPGraph(graphData: any): Promise<void>;
49
49
  isGraphReady(): boolean;
50
- switchNode: (nodeMeta: NodeMeta) => DPNode | DPNodeForm;
50
+ switchNode: (nodeMeta: NodeMeta) => DPNode | DPNodeAlgo | DPNodeForm | DPNodeRead | DPNodeConfig;
51
51
  renderGraph: (wrapper: HTMLElement, container: HTMLElement) => void;
52
52
  renderGraphData: (graphData: NDPGraph.GraphData) => Promise<void>;
53
53
  renderNode(nodeMeta: NodeMeta): BaseNode | undefined;
@@ -16,7 +16,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
16
16
  /*
17
17
  * @Author: wangxian
18
18
  * @Date: 2022-05-24 14:31:01
19
- * @LastEditTime: 2024-02-29 13:40:06
19
+ * @LastEditTime: 2025-07-02 18:45:19
20
20
  */
21
21
  import _regeneratorRuntime from "@babel/runtime/regenerator";
22
22
  import produce from 'immer';
@@ -29,12 +29,15 @@ import { round } from 'lodash-es';
29
29
  import { GraphCore } from '../../framework/graph';
30
30
  import NodeElementNormal from './comps/NodeElementNormal';
31
31
  import { DPEdge } from './comps/shape/edge';
32
- import { DPNode, DPNodeForm } from './comps/shape/node';
32
+ import { DPNode, DPNodeAlgo, DPNodeConfig, DPNodeForm, DPNodeRead } from './comps/shape/node';
33
33
  import { formatGraphData, copy, formatNodeInfoToNodeMeta, formattedEdgesToEdgeMeta, isClipboardEmpty, cleanClipboard, getCellsInClipboard } from './utils';
34
34
  import { deepClone, guid } from '../../utils';
35
35
  import { MetadataService } from '../../framework/metadata/MetadataService';
36
36
  import { tr } from '../../framework/locale';
37
37
  import NodeElementForm from './comps/NodeElementForm';
38
+ import NodeElementAlgo from './comps/NodeElementAlgo';
39
+ import NodeElementRead from './comps/NodeElementRead';
40
+ import NodeElementConfig from './comps/NodeElementConfig';
38
41
  var DPGraph = /*#__PURE__*/function (_GraphCore) {
39
42
  _inherits(DPGraph, _GraphCore);
40
43
  var _super = _createSuper(DPGraph);
@@ -65,7 +68,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
65
68
  },
66
69
  allowBlank: false,
67
70
  highlight: true,
68
- connector: 'pai',
71
+ connector: 'smooth',
69
72
  sourceAnchor: 'bottom',
70
73
  targetAnchor: 'center',
71
74
  connectionPoint: 'anchor',
@@ -94,7 +97,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
94
97
  // 是否触发交互事件
95
98
  validateMagnet: function validateMagnet(_ref) {
96
99
  var magnet = _ref.magnet;
97
- return magnet.getAttribute('port-group') !== 'in';
100
+ return ['in', 'config'].indexOf(magnet.getAttribute('port-group')) === -1;
98
101
  },
99
102
  // 显示可用的链接桩
100
103
  validateConnection: function validateConnection(_ref2) {
@@ -111,7 +114,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
111
114
  return false;
112
115
  }
113
116
  // 只能连接到输入链接桩
114
- if (!targetMagnet || targetMagnet.getAttribute('port-group') !== 'in') {
117
+ if (!targetMagnet || ['in', 'config'].indexOf(targetMagnet.getAttribute('port-group')) === -1) {
115
118
  return false;
116
119
  }
117
120
  // 找到当前输出port
@@ -124,7 +127,9 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
124
127
  var targetPort = targetNode.getPort(targetPortId);
125
128
  // 如果设置输出port类型,则需要校验类型是否相等
126
129
  // 只有类型相等才可以联线
127
- if ((sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) !== '-1' && (sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) !== '-2' && (sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) && (targetPort === null || targetPort === void 0 ? void 0 : targetPort.type) && targetPort.type.indexOf(sourcePort.type) === -1) {
130
+ if ((sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) === '-1' || (sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) === '-2' || (targetPort === null || targetPort === void 0 ? void 0 : targetPort.type) === '-1' || (targetPort === null || targetPort === void 0 ? void 0 : targetPort.type) === '-2') {
131
+ return true;
132
+ } else if ((sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) !== '-1' && (sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) !== '-2' && (sourcePort === null || sourcePort === void 0 ? void 0 : sourcePort.type) && (targetPort === null || targetPort === void 0 ? void 0 : targetPort.type) && targetPort.type.indexOf(sourcePort.type) === -1) {
128
133
  return false;
129
134
  }
130
135
  // 判断目标链接桩是否可连接
@@ -167,18 +172,13 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
167
172
  var container = contentSelectors && contentSelectors.content;
168
173
  var placement = port.group === 'in' ? 'top' : 'bottom';
169
174
  if (container) {
170
- ReactDOM.render( /*#__PURE__*/React.createElement(_Tooltip, {
175
+ ReactDOM.render(/*#__PURE__*/React.createElement(_Tooltip, {
171
176
  title: port.name,
172
177
  placement: placement
173
178
  }, /*#__PURE__*/React.createElement("span", {
174
- className: "dp-port ".concat(port.connected ? 'connected' : ''),
175
- style: port.color ? {
176
- borderColor: "".concat(port.connected ? "".concat(port.color, " transparent transparent") : port.color),
177
- width: '8px',
178
- height: '8px'
179
- } : {
180
- width: '8px',
181
- height: '8px'
179
+ className: "dp-port dp-port-".concat(port.group, " ").concat(port.connected ? "connected" : ''),
180
+ style: port.color && {
181
+ borderColor: "".concat(port.connected ? "".concat(port.color, " transparent transparent") : port.color)
182
182
  }
183
183
  })), container);
184
184
  }
@@ -201,12 +201,35 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
201
201
  // 节点模式
202
202
  _this.mode = void 0;
203
203
  _this.switchNode = function (nodeMeta) {
204
+ var _nodeMeta$param, _nodeMeta$param2;
204
205
  switch (_this.mode) {
205
206
  case 'normal':
206
207
  return new DPNode(_objectSpread(_objectSpread({}, nodeMeta), {}, {
207
208
  shape: 'dp-rect-port',
208
209
  component: /*#__PURE__*/React.createElement(NodeElementNormal, null)
209
210
  }));
211
+ case 'algo':
212
+ if ((nodeMeta === null || nodeMeta === void 0 ? void 0 : (_nodeMeta$param = nodeMeta.param) === null || _nodeMeta$param === void 0 ? void 0 : _nodeMeta$param.shape) === 'read') {
213
+ return new DPNodeRead(_objectSpread(_objectSpread({}, nodeMeta), {}, {
214
+ width: 128,
215
+ height: 64,
216
+ shape: 'rz-read-rect-port',
217
+ component: /*#__PURE__*/React.createElement(NodeElementRead, null)
218
+ }));
219
+ }
220
+ if ((nodeMeta === null || nodeMeta === void 0 ? void 0 : (_nodeMeta$param2 = nodeMeta.param) === null || _nodeMeta$param2 === void 0 ? void 0 : _nodeMeta$param2.shape) === 'config') {
221
+ return new DPNodeConfig(_objectSpread(_objectSpread({}, nodeMeta), {}, {
222
+ width: 64,
223
+ height: 64,
224
+ shape: 'rz-config-rect-port',
225
+ component: /*#__PURE__*/React.createElement(NodeElementConfig, null)
226
+ }));
227
+ }
228
+ return new DPNodeAlgo(_objectSpread(_objectSpread({}, nodeMeta), {}, {
229
+ height: 64,
230
+ shape: 'rz-algo-rect-port',
231
+ component: /*#__PURE__*/React.createElement(NodeElementAlgo, null)
232
+ }));
210
233
  case 'form':
211
234
  return new DPNodeForm(_objectSpread(_objectSpread({}, nodeMeta), {}, {
212
235
  shape: 'dp-rect-port',
@@ -241,7 +264,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
241
264
  };
242
265
  // 画布已经渲染的情况下,再次渲染图数据
243
266
  _this.renderGraphData = /*#__PURE__*/function () {
244
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(graphData) {
267
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(graphData) {
245
268
  var _formatGraphData2, nodes, edges, dpNodes, dpEdges;
246
269
  return _regeneratorRuntime.wrap(function _callee$(_context) {
247
270
  while (1) switch (_context.prev = _context.next) {
@@ -335,7 +358,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
335
358
  };
336
359
  // 运行画布或节点
337
360
  _this.runGraph = /*#__PURE__*/function () {
338
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(debugId) {
361
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(debugId) {
339
362
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
340
363
  while (1) switch (_context2.prev = _context2.next) {
341
364
  case 0:
@@ -364,7 +387,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
364
387
  }();
365
388
  // 获取执行状态
366
389
  _this.loadExecutionStatus = /*#__PURE__*/function () {
367
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(debugId) {
390
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(debugId) {
368
391
  var _this$queryStatusSub;
369
392
  var server;
370
393
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
@@ -373,8 +396,8 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
373
396
  (_this$queryStatusSub = _this.queryStatusSub) === null || _this$queryStatusSub === void 0 ? void 0 : _this$queryStatusSub.unsubscribe();
374
397
  // 每三秒查询一次执行状态
375
398
  server = new MetadataService();
376
- _this.queryStatusSub = timer(0, 2000).subscribe( /*#__PURE__*/function () {
377
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(resPromise) {
399
+ _this.queryStatusSub = timer(0, 2000).subscribe(/*#__PURE__*/function () {
400
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(resPromise) {
378
401
  var execStatusRes, status, _this$queryStatusSub2;
379
402
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
380
403
  while (1) switch (_context3.prev = _context3.next) {
@@ -422,7 +445,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
422
445
  }();
423
446
  // 停止实验的执行
424
447
  _this.stopRunGraph = /*#__PURE__*/function () {
425
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(debugId) {
448
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(debugId) {
426
449
  var server, stopRes;
427
450
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
428
451
  while (1) switch (_context5.prev = _context5.next) {
@@ -461,7 +484,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
461
484
  _createClass(DPGraph, [{
462
485
  key: "initialize",
463
486
  value: function () {
464
- var _initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(graphData) {
487
+ var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(graphData) {
465
488
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
466
489
  while (1) switch (_context6.prev = _context6.next) {
467
490
  case 0:
@@ -495,7 +518,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
495
518
  }, {
496
519
  key: "loadDPGraph",
497
520
  value: function () {
498
- var _loadDPGraph = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(graphData) {
521
+ var _loadDPGraph = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(graphData) {
499
522
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
500
523
  while (1) switch (_context7.prev = _context7.next) {
501
524
  case 0:
@@ -552,7 +575,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
552
575
  }, {
553
576
  key: "updateDPGraph",
554
577
  value: function () {
555
- var _updateDPGraph = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
578
+ var _updateDPGraph = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
556
579
  var nodes,
557
580
  edges,
558
581
  oldGraph,
@@ -589,7 +612,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
589
612
  }, {
590
613
  key: "delDPGraphElement",
591
614
  value: function () {
592
- var _delDPGraphElement = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
615
+ var _delDPGraphElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
593
616
  var nodes,
594
617
  edges,
595
618
  oldGraph,
@@ -635,10 +658,10 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
635
658
  key: "onConnectNode",
636
659
  value: // 处理连线事件
637
660
  function () {
638
- var _onConnectNode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(args) {
661
+ var _onConnectNode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee0(args) {
639
662
  var _args$edge, edge, isNew, source, target, _edge$getTargetCell, _edge$getTargetCell$p, _ports$find, node, portId, ports, color, data;
640
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
641
- while (1) switch (_context10.prev = _context10.next) {
663
+ return _regeneratorRuntime.wrap(function _callee0$(_context0) {
664
+ while (1) switch (_context0.prev = _context0.next) {
642
665
  case 0:
643
666
  _args$edge = args.edge, edge = _args$edge === void 0 ? {} : _args$edge, isNew = args.isNew;
644
667
  source = edge.source, target = edge.target;
@@ -661,6 +684,8 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
661
684
  stroke: color || '#808080'
662
685
  }
663
686
  });
687
+ // edge.setConnector('curveConnector');
688
+ edge.setConnector('smooth');
664
689
  data = {
665
690
  source: source.cell,
666
691
  target: target.cell,
@@ -674,14 +699,14 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
674
699
  this.updateDPGraph([], [data]);
675
700
  }
676
701
  }
677
- return _context10.abrupt("return", {
702
+ return _context0.abrupt("return", {
678
703
  success: true
679
704
  });
680
705
  case 4:
681
706
  case "end":
682
- return _context10.stop();
707
+ return _context0.stop();
683
708
  }
684
- }, _callee10, this);
709
+ }, _callee0, this);
685
710
  }));
686
711
  function onConnectNode(_x8) {
687
712
  return _onConnectNode.apply(this, arguments);
@@ -789,8 +814,8 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
789
814
  }, {
790
815
  key: "onCopyNodes",
791
816
  value: function onCopyNodes(args) {
792
- var _args11 = _slicedToArray(args, 2),
793
- action = _args11[1];
817
+ var _args1 = _slicedToArray(args, 2),
818
+ action = _args1[1];
794
819
  var selectedCells = this.graph.getSelectedCells();
795
820
  switch (action) {
796
821
  case 'command+c':
@@ -848,11 +873,11 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
848
873
  }, {
849
874
  key: "onMoveNodes",
850
875
  value: function () {
851
- var _onMoveNodes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(movedNodes) {
876
+ var _onMoveNodes = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee1(movedNodes) {
852
877
  var _this3 = this;
853
878
  var targetNodes, newPos, oldGraph, newGraph;
854
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
855
- while (1) switch (_context11.prev = _context11.next) {
879
+ return _regeneratorRuntime.wrap(function _callee1$(_context1) {
880
+ while (1) switch (_context1.prev = _context1.next) {
856
881
  case 0:
857
882
  targetNodes = movedNodes.filter(function (arg) {
858
883
  var node = arg.node;
@@ -896,9 +921,9 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
896
921
  }
897
922
  case 2:
898
923
  case "end":
899
- return _context11.stop();
924
+ return _context1.stop();
900
925
  }
901
- }, _callee11, this);
926
+ }, _callee1, this);
902
927
  }));
903
928
  function onMoveNodes(_x9) {
904
929
  return _onMoveNodes.apply(this, arguments);
@@ -10,7 +10,7 @@ interface IDynamicPortsProps {
10
10
  /**
11
11
  * 节点图模式
12
12
  */
13
- mode?: 'normal' | 'form';
13
+ mode?: 'normal' | 'form' | 'algo';
14
14
  /**
15
15
  * 离开销毁
16
16
  */
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  /*
4
4
  * @Author: wangxian
5
5
  * @Date: 2022-05-16 18:53:31
6
- * @LastEditTime: 2024-02-29 11:32:12
6
+ * @LastEditTime: 2025-07-01 15:35:03
7
7
  */
8
8
  import React from 'react';
9
9
  import { filter } from 'rxjs';