strategy-panel 1.0.1 → 1.0.2

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 (341) hide show
  1. package/.fatherrc.ts +11 -26
  2. package/.umirc.ts +4 -0
  3. package/README.md +33 -33
  4. package/es/assets/decive.svg +1 -1
  5. package/es/assets/hand.svg +1 -1
  6. package/es/assets/lock.svg +8 -0
  7. package/es/components/canvas/component-tree-panel/category-tree/category-type.d.ts +1 -0
  8. package/es/{common/graph-common → components/canvas/component-tree-panel/category-tree}/category-type.js +28 -12
  9. package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.d.ts +17 -16
  10. package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.js +14 -14
  11. package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.less +36 -36
  12. package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.d.ts +12 -12
  13. package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.js +5 -3
  14. package/es/{pages → components/canvas}/component-tree-panel/index.d.ts +17 -17
  15. package/es/{pages → components/canvas}/component-tree-panel/index.js +1 -0
  16. package/es/{pages → components/canvas}/component-tree-panel/index.less +1 -0
  17. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -49
  18. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/data-origin.js +26 -34
  19. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -11
  20. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/index.js +15 -23
  21. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/style.less +1 -1
  22. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/cross-line.d.ts +9 -9
  23. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/cross-line.js +6 -10
  24. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/index.d.ts +10 -9
  25. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/index.js +17 -13
  26. package/es/{pages → components/canvas}/config-panel/components/condition-configuration/style.less +74 -74
  27. package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.d.ts +9 -9
  28. package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.js +24 -33
  29. package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/time-horizon.d.ts +10 -10
  30. package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/time-horizon.js +18 -28
  31. package/es/{pages → components/canvas}/config-panel/components/time-trigger/delay-time.d.ts +9 -9
  32. package/es/components/canvas/config-panel/components/time-trigger/effective-time.d.ts +7 -0
  33. package/es/components/canvas/config-panel/components/time-trigger/effective-time.js +43 -0
  34. package/es/{pages → components/canvas}/config-panel/components/time-trigger/index.d.ts +9 -8
  35. package/es/{pages → components/canvas}/config-panel/components/time-trigger/index.js +18 -17
  36. package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.d.ts +9 -9
  37. package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.js +4 -8
  38. package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.d.ts +9 -9
  39. package/es/components/canvas/config-panel/components/time-trigger/section-Detail.d.ts +10 -0
  40. package/es/components/canvas/config-panel/components/time-trigger/section-Detail.js +125 -0
  41. package/es/components/canvas/config-panel/components/time-trigger/section-time.d.ts +9 -0
  42. package/es/components/canvas/config-panel/components/time-trigger/section-time.js +81 -0
  43. package/es/{pages → components/canvas}/config-panel/components/time-trigger/timing-time.d.ts +9 -9
  44. package/es/{pages → components/canvas}/config-panel/components/time-trigger/timing-time.js +7 -11
  45. package/es/{pages → components/canvas}/config-panel/config-common.d.ts +38 -37
  46. package/es/{pages → components/canvas}/config-panel/config-common.js +9 -15
  47. package/es/{pages → components/canvas}/config-panel/index.d.ts +14 -13
  48. package/es/{pages → components/canvas}/config-panel/index.js +2 -2
  49. package/es/{pages → components/canvas}/config-panel/node-form.d.ts +23 -22
  50. package/es/{pages → components/canvas}/config-panel/node-form.js +14 -16
  51. package/es/{pages → components/canvas}/config-panel/style.less +90 -81
  52. package/es/{pages → components/canvas}/dag-canvas/canvas-content.d.ts +11 -10
  53. package/es/{pages → components/canvas}/dag-canvas/canvas-content.js +23 -12
  54. package/es/{pages → components/canvas}/dag-canvas/index.d.ts +23 -18
  55. package/es/{pages → components/canvas}/dag-canvas/index.js +5 -2
  56. package/es/{pages → components/canvas}/dag-canvas/preview.d.ts +10 -10
  57. package/es/components/canvas/dag-canvas/preview.js +53 -0
  58. package/es/{pages → components/canvas}/index.d.ts +48 -42
  59. package/es/{pages → components/canvas}/index.js +20 -10
  60. package/es/{pages → components/canvas}/index.less +2 -2
  61. package/es/{pages → components/canvas}/strategy-header/index.d.ts +48 -56
  62. package/es/components/canvas/strategy-header/index.js +210 -0
  63. package/es/{pages → components/canvas}/strategy-header/style.less +4 -3
  64. package/es/{pages → components/canvas}/strategy-header/theme-switch/index.d.ts +4 -4
  65. package/es/{pages → components/canvas}/strategy-header/theme-switch/index.js +2 -3
  66. package/es/index.d.ts +9 -8
  67. package/es/index.js +8 -7
  68. package/es/packages/graph-canvas/graph-common.d.ts +19 -0
  69. package/es/packages/graph-canvas/graph-common.js +19 -0
  70. package/es/packages/graph-canvas/graph-model/edge/group-edge/index.d.ts +4 -0
  71. package/es/packages/graph-canvas/graph-model/edge/group-edge/index.js +63 -0
  72. package/es/packages/graph-canvas/graph-model/edge/index.d.ts +2 -0
  73. package/es/packages/graph-canvas/graph-model/edge/index.js +2 -0
  74. package/es/packages/graph-canvas/graph-model/node/application-node/application-element.d.ts +9 -0
  75. package/es/packages/graph-canvas/graph-model/node/application-node/application-element.js +20 -0
  76. package/es/packages/graph-canvas/graph-model/node/application-node/application-element.less +17 -0
  77. package/es/packages/graph-canvas/graph-model/node/application-node/index.d.ts +7 -0
  78. package/es/{common/graph-common/shape/nodes/GroupNode.js → packages/graph-canvas/graph-model/node/application-node/index.js} +42 -22
  79. package/es/{common/graph-common/shape/nodes/CommonNode.d.ts → packages/graph-canvas/graph-model/node/common-node/index.d.ts} +7 -5
  80. package/es/{common/graph-common/shape/nodes/CommonNode.js → packages/graph-canvas/graph-model/node/common-node/index.js} +8 -7
  81. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.d.ts +9 -9
  82. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.js +16 -14
  83. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.less +4 -4
  84. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.d.ts +9 -9
  85. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.js +20 -15
  86. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.less +76 -81
  87. package/es/packages/graph-canvas/graph-model/node/condition-node/images/rhombus.svg +3 -0
  88. package/es/{common/graph-common/shape/nodes/ConditionJudgment.d.ts → packages/graph-canvas/graph-model/node/condition-node/index.d.ts} +5 -5
  89. package/es/{common/graph-common/shape/nodes/ConditionJudgment.js → packages/graph-canvas/graph-model/node/condition-node/index.js} +7 -6
  90. package/es/packages/graph-canvas/graph-model/node/index.d.ts +5 -0
  91. package/es/packages/graph-canvas/graph-model/node/index.js +5 -0
  92. package/es/packages/graph-canvas/graph-model/node/logical-node/images/AND.svg +11 -0
  93. package/es/packages/graph-canvas/graph-model/node/logical-node/images/OR.svg +11 -0
  94. package/es/packages/graph-canvas/graph-model/node/logical-node/images/XOR.svg +11 -0
  95. package/es/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -0
  96. package/es/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +5 -0
  97. package/es/packages/graph-canvas/graph-model/node/logical-node/index.d.ts +6 -0
  98. package/es/{common/graph-common/shape/nodes/LogicalNode.js → packages/graph-canvas/graph-model/node/logical-node/index.js} +15 -15
  99. package/es/packages/graph-canvas/graph-model/node/logical-node/logical-element.d.ts +9 -0
  100. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/logical-node}/logical-element.js +36 -19
  101. package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/logical-node}/logical-element.less +4 -9
  102. package/es/packages/graph-canvas/graph-model/node/style.less +8 -0
  103. package/es/{common → packages/graph-canvas}/graph-utils/graph.d.ts +87 -83
  104. package/es/{common → packages/graph-canvas}/graph-utils/graph.js +8 -4
  105. package/es/{pages/rx-models/experiment-graph.d.ts → packages/graph-canvas/index.d.ts} +79 -82
  106. package/es/{pages/rx-models/experiment-graph.js → packages/graph-canvas/index.js} +285 -252
  107. package/es/packages/graph-canvas/node-types.d.ts +6 -0
  108. package/es/packages/graph-canvas/node-types.js +54 -0
  109. package/es/packages/graph-canvas/typings.d.ts +5 -0
  110. package/es/{common/constants → packages/graph-common}/global.d.ts +1 -1
  111. package/es/{common/constants → packages/graph-common}/graph.d.ts +12 -10
  112. package/es/{common/constants → packages/graph-common}/graph.js +4 -2
  113. package/es/{pages/rx-models → packages/graph-core}/graph-util.d.ts +182 -186
  114. package/es/{pages/rx-models → packages/graph-core}/graph-util.js +8 -15
  115. package/es/{pages/rx-models/graph-core.d.ts → packages/graph-core/index.d.ts} +96 -96
  116. package/es/{pages/rx-models/graph-core.js → packages/graph-core/index.js} +119 -87
  117. package/es/packages/graph-core/typing.d.ts +107 -0
  118. package/es/{common/graph-common → packages/graph-model}/connector/index.d.ts +1 -1
  119. package/es/packages/graph-model/connector/index.js +14 -0
  120. package/es/packages/graph-model/edge/edge.less +8 -0
  121. package/es/packages/graph-model/edge/index.d.ts +5 -0
  122. package/es/{common/graph-common/shape/edge.js → packages/graph-model/edge/index.js} +10 -61
  123. package/es/packages/graph-model/node/index.d.ts +7 -0
  124. package/es/{common/graph-common/shape/nodes/BaseNode.js → packages/graph-model/node/index.js} +12 -3
  125. package/es/{common/graph-common/node-element/common-element.less → packages/graph-model/node/node-basic.less} +1 -0
  126. package/es/{hooks → packages/hooks}/useObservableState.d.ts +3 -3
  127. package/es/packages/hooks/withMode.d.ts +3 -0
  128. package/es/packages/hooks/withMode.js +12 -0
  129. package/es/style/default.less +8 -0
  130. package/es/style/svgRaw.d.ts +1 -0
  131. package/es/style/svgRaw.js +1 -0
  132. package/es/typings.d.ts +2 -8
  133. package/es/utils/utils.d.ts +1 -1
  134. package/lib/assets/AND.svg +11 -0
  135. package/lib/assets/OR.svg +11 -0
  136. package/lib/assets/XOR.svg +11 -0
  137. package/lib/assets/add.svg +13 -0
  138. package/lib/assets/alarm.svg +11 -0
  139. package/lib/assets/application.svg +11 -0
  140. package/lib/assets/cancel.svg +13 -0
  141. package/lib/assets/check.svg +12 -0
  142. package/lib/assets/condition.svg +12 -0
  143. package/lib/assets/control.svg +11 -0
  144. package/lib/assets/decive.svg +11 -0
  145. package/lib/assets/delete.svg +11 -0
  146. package/lib/assets/device.svg +11 -0
  147. package/lib/assets/edit.svg +11 -0
  148. package/lib/assets/hand.svg +11 -0
  149. package/lib/assets/link.svg +11 -0
  150. package/lib/assets/lock.svg +8 -0
  151. package/lib/assets/logical.svg +12 -0
  152. package/lib/assets/notice.svg +11 -0
  153. package/lib/assets/order.svg +11 -0
  154. package/lib/assets/relation.svg +11 -0
  155. package/lib/assets/rhombus.svg +3 -0
  156. package/lib/assets/save.svg +13 -0
  157. package/lib/assets/time.svg +11 -0
  158. package/lib/assets/variate.svg +12 -0
  159. package/lib/components/canvas/component-tree-panel/category-tree/category-type.d.ts +1 -0
  160. package/lib/components/canvas/component-tree-panel/category-tree/category-type.js +111 -0
  161. package/lib/components/canvas/component-tree-panel/category-tree/index.d.ts +17 -0
  162. package/lib/components/canvas/component-tree-panel/category-tree/index.js +115 -0
  163. package/lib/components/canvas/component-tree-panel/category-tree/index.less +36 -0
  164. package/lib/components/canvas/component-tree-panel/category-tree/node-title.d.ts +12 -0
  165. package/lib/components/canvas/component-tree-panel/category-tree/node-title.js +75 -0
  166. package/lib/components/canvas/component-tree-panel/category-tree/node-title.less +113 -0
  167. package/lib/components/canvas/component-tree-panel/index.d.ts +17 -0
  168. package/lib/components/canvas/component-tree-panel/index.js +33 -0
  169. package/lib/components/canvas/component-tree-panel/index.less +52 -0
  170. package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -0
  171. package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/data-origin.js +229 -0
  172. package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -0
  173. package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/index.js +187 -0
  174. package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/style.less +13 -0
  175. package/lib/components/canvas/config-panel/components/condition-configuration/cross-line.d.ts +9 -0
  176. package/lib/components/canvas/config-panel/components/condition-configuration/cross-line.js +57 -0
  177. package/lib/components/canvas/config-panel/components/condition-configuration/index.d.ts +10 -0
  178. package/lib/components/canvas/config-panel/components/condition-configuration/index.js +216 -0
  179. package/lib/components/canvas/config-panel/components/condition-configuration/style.less +74 -0
  180. package/lib/components/canvas/config-panel/components/time-trigger/components/cycle-time.d.ts +9 -0
  181. package/lib/components/canvas/config-panel/components/time-trigger/components/cycle-time.js +108 -0
  182. package/lib/components/canvas/config-panel/components/time-trigger/components/time-horizon.d.ts +10 -0
  183. package/lib/components/canvas/config-panel/components/time-trigger/components/time-horizon.js +78 -0
  184. package/lib/components/canvas/config-panel/components/time-trigger/delay-time.d.ts +9 -0
  185. package/lib/components/canvas/config-panel/components/time-trigger/delay-time.js +33 -0
  186. package/lib/components/canvas/config-panel/components/time-trigger/effective-time.d.ts +7 -0
  187. package/lib/components/canvas/config-panel/components/time-trigger/effective-time.js +58 -0
  188. package/lib/components/canvas/config-panel/components/time-trigger/index.d.ts +9 -0
  189. package/lib/components/canvas/config-panel/components/time-trigger/index.js +114 -0
  190. package/lib/components/canvas/config-panel/components/time-trigger/interval-time.d.ts +9 -0
  191. package/lib/components/canvas/config-panel/components/time-trigger/interval-time.js +63 -0
  192. package/lib/components/canvas/config-panel/components/time-trigger/persistent-time.d.ts +9 -0
  193. package/lib/components/canvas/config-panel/components/time-trigger/persistent-time.js +33 -0
  194. package/lib/components/canvas/config-panel/components/time-trigger/section-Detail.d.ts +10 -0
  195. package/lib/components/canvas/config-panel/components/time-trigger/section-Detail.js +140 -0
  196. package/lib/components/canvas/config-panel/components/time-trigger/section-time.d.ts +9 -0
  197. package/lib/components/canvas/config-panel/components/time-trigger/section-time.js +96 -0
  198. package/lib/components/canvas/config-panel/components/time-trigger/timing-time.d.ts +9 -0
  199. package/lib/components/canvas/config-panel/components/time-trigger/timing-time.js +65 -0
  200. package/lib/components/canvas/config-panel/config-common.d.ts +38 -0
  201. package/lib/components/canvas/config-panel/config-common.js +152 -0
  202. package/lib/components/canvas/config-panel/index.d.ts +14 -0
  203. package/lib/components/canvas/config-panel/index.js +68 -0
  204. package/lib/components/canvas/config-panel/node-form.d.ts +23 -0
  205. package/lib/components/canvas/config-panel/node-form.js +97 -0
  206. package/lib/components/canvas/config-panel/style.less +90 -0
  207. package/lib/components/canvas/dag-canvas/canvas-content.d.ts +11 -0
  208. package/lib/components/canvas/dag-canvas/canvas-content.js +130 -0
  209. package/lib/components/canvas/dag-canvas/canvas-content.less +5 -0
  210. package/lib/components/canvas/dag-canvas/index.d.ts +23 -0
  211. package/lib/components/canvas/dag-canvas/index.js +53 -0
  212. package/lib/components/canvas/dag-canvas/index.less +11 -0
  213. package/lib/components/canvas/dag-canvas/preview.d.ts +10 -0
  214. package/lib/components/canvas/dag-canvas/preview.js +73 -0
  215. package/lib/components/canvas/index.d.ts +48 -0
  216. package/lib/components/canvas/index.js +107 -0
  217. package/lib/components/canvas/index.less +50 -0
  218. package/lib/components/canvas/strategy-header/index.d.ts +48 -0
  219. package/lib/components/canvas/strategy-header/index.js +229 -0
  220. package/lib/components/canvas/strategy-header/style.less +23 -0
  221. package/lib/components/canvas/strategy-header/theme-switch/index.d.ts +4 -0
  222. package/lib/components/canvas/strategy-header/theme-switch/index.js +30 -0
  223. package/lib/components/canvas/strategy-header/theme-switch/style.less +11 -0
  224. package/lib/index.d.ts +9 -0
  225. package/lib/index.js +71 -0
  226. package/lib/packages/graph-canvas/graph-common.d.ts +19 -0
  227. package/lib/packages/graph-canvas/graph-common.js +27 -0
  228. package/lib/packages/graph-canvas/graph-model/edge/group-edge/edge.less +8 -0
  229. package/lib/packages/graph-canvas/graph-model/edge/group-edge/index.d.ts +4 -0
  230. package/lib/packages/graph-canvas/graph-model/edge/group-edge/index.js +74 -0
  231. package/lib/packages/graph-canvas/graph-model/edge/index.d.ts +2 -0
  232. package/lib/packages/graph-canvas/graph-model/edge/index.js +15 -0
  233. package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.d.ts +9 -0
  234. package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.js +31 -0
  235. package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.less +17 -0
  236. package/lib/packages/graph-canvas/graph-model/node/application-node/index.d.ts +7 -0
  237. package/lib/packages/graph-canvas/graph-model/node/application-node/index.js +133 -0
  238. package/lib/packages/graph-canvas/graph-model/node/common-node/index.d.ts +7 -0
  239. package/lib/packages/graph-canvas/graph-model/node/common-node/index.js +133 -0
  240. package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.d.ts +9 -0
  241. package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.js +69 -0
  242. package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.less +48 -0
  243. package/{es/common/graph-common/node-element/logical-element.d.ts → lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.d.ts} +9 -9
  244. package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.js +81 -0
  245. package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.less +76 -0
  246. package/lib/packages/graph-canvas/graph-model/node/condition-node/images/rhombus.svg +3 -0
  247. package/{es/common/graph-common/shape/nodes/LogicalNode.d.ts → lib/packages/graph-canvas/graph-model/node/condition-node/index.d.ts} +5 -5
  248. package/lib/packages/graph-canvas/graph-model/node/condition-node/index.js +143 -0
  249. package/lib/packages/graph-canvas/graph-model/node/index.d.ts +5 -0
  250. package/lib/packages/graph-canvas/graph-model/node/index.js +39 -0
  251. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/AND.svg +11 -0
  252. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/OR.svg +11 -0
  253. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/XOR.svg +11 -0
  254. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -0
  255. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +5 -0
  256. package/lib/packages/graph-canvas/graph-model/node/logical-node/index.d.ts +6 -0
  257. package/lib/packages/graph-canvas/graph-model/node/logical-node/index.js +143 -0
  258. package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.d.ts +9 -0
  259. package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.js +98 -0
  260. package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.less +49 -0
  261. package/lib/packages/graph-canvas/graph-model/node/style.less +8 -0
  262. package/lib/packages/graph-canvas/graph-utils/graph.d.ts +87 -0
  263. package/lib/packages/graph-canvas/graph-utils/graph.js +124 -0
  264. package/lib/packages/graph-canvas/index.d.ts +79 -0
  265. package/lib/packages/graph-canvas/index.js +1292 -0
  266. package/lib/packages/graph-canvas/node-types.d.ts +6 -0
  267. package/lib/packages/graph-canvas/node-types.js +66 -0
  268. package/lib/packages/graph-canvas/typings.d.ts +5 -0
  269. package/lib/packages/graph-common/global.d.ts +1 -0
  270. package/lib/packages/graph-common/global.js +8 -0
  271. package/lib/packages/graph-common/graph.d.ts +12 -0
  272. package/lib/packages/graph-common/graph.js +37 -0
  273. package/lib/packages/graph-core/graph-util.d.ts +182 -0
  274. package/lib/packages/graph-core/graph-util.js +368 -0
  275. package/lib/packages/graph-core/index.d.ts +96 -0
  276. package/lib/packages/graph-core/index.js +798 -0
  277. package/lib/packages/graph-core/typing.d.ts +107 -0
  278. package/lib/packages/graph-model/connector/index.d.ts +1 -0
  279. package/lib/packages/graph-model/connector/index.js +17 -0
  280. package/lib/packages/graph-model/edge/edge.less +8 -0
  281. package/lib/packages/graph-model/edge/index.d.ts +5 -0
  282. package/lib/packages/graph-model/edge/index.js +73 -0
  283. package/lib/packages/graph-model/node/index.d.ts +7 -0
  284. package/lib/packages/graph-model/node/index.js +63 -0
  285. package/lib/packages/graph-model/node/node-basic.less +118 -0
  286. package/lib/packages/hooks/useObservableState.d.ts +3 -0
  287. package/lib/packages/hooks/useObservableState.js +55 -0
  288. package/lib/packages/hooks/withMode.d.ts +3 -0
  289. package/lib/packages/hooks/withMode.js +22 -0
  290. package/lib/style/basic.less +12 -0
  291. package/lib/style/default.less +10 -0
  292. package/lib/style/position.less +25 -0
  293. package/lib/style/svgRaw.d.ts +1 -0
  294. package/lib/style/svgRaw.js +8 -0
  295. package/lib/style/theme-light.less +7 -0
  296. package/lib/style/variable.less +3 -0
  297. package/lib/typings.d.ts +8 -0
  298. package/lib/utils/utils.d.ts +1 -0
  299. package/lib/utils/utils.js +13 -0
  300. package/package.json +38 -37
  301. package/tsconfig.json +1 -1
  302. package/es/common/graph-common/category-type.d.ts +0 -16
  303. package/es/common/graph-common/connector/index.js +0 -14
  304. package/es/common/graph-common/node-element/node-group.d.ts +0 -8
  305. package/es/common/graph-common/node-element/node-group.js +0 -395
  306. package/es/common/graph-common/node-element/node-group.less +0 -53
  307. package/es/common/graph-common/node-popover/index.d.ts +0 -7
  308. package/es/common/graph-common/node-popover/index.js +0 -11
  309. package/es/common/graph-common/node-popover/index.less +0 -5
  310. package/es/common/graph-common/node-types.d.ts +0 -28
  311. package/es/common/graph-common/node-types.js +0 -60
  312. package/es/common/graph-common/shape/edge.d.ts +0 -10
  313. package/es/common/graph-common/shape/node.d.ts +0 -6
  314. package/es/common/graph-common/shape/node.js +0 -6
  315. package/es/common/graph-common/shape/nodes/BaseNode.d.ts +0 -4
  316. package/es/common/graph-common/shape/nodes/GroupNode.d.ts +0 -4
  317. package/es/component/cut.d.ts +0 -10
  318. package/es/component/cut.js +0 -34
  319. package/es/component/cut.less +0 -6
  320. package/es/component/item-name.d.ts +0 -6
  321. package/es/component/item-name.js +0 -30
  322. package/es/component/keyword.d.ts +0 -9
  323. package/es/component/keyword.js +0 -26
  324. package/es/component/keyword.less +0 -11
  325. package/es/component/rx-component/rx-input.d.ts +0 -8
  326. package/es/component/rx-component/rx-input.js +0 -47
  327. package/es/hooks/withMode.d.ts +0 -1
  328. package/es/hooks/withMode.js +0 -16
  329. package/es/pages/dag-canvas/preview.js +0 -42
  330. package/es/pages/rx-models/graph-core.less +0 -14
  331. package/es/pages/rx-models/typing.d.ts +0 -126
  332. package/es/pages/strategy-header/index.js +0 -154
  333. /package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.less +0 -0
  334. /package/es/{pages → components/canvas}/config-panel/components/time-trigger/delay-time.js +0 -0
  335. /package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.js +0 -0
  336. /package/es/{pages → components/canvas}/dag-canvas/canvas-content.less +0 -0
  337. /package/es/{pages → components/canvas}/dag-canvas/index.less +0 -0
  338. /package/es/{pages → components/canvas}/strategy-header/theme-switch/style.less +0 -0
  339. /package/es/{common/graph-common/shape → packages/graph-canvas/graph-model/edge/group-edge}/edge.less +0 -0
  340. /package/es/{common/constants → packages/graph-common}/global.js +0 -0
  341. /package/es/{hooks → packages/hooks}/useObservableState.js +0 -0
@@ -31,7 +31,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
31
31
  import { Graph } from '@antv/x6';
32
32
  import { BehaviorSubject, fromEventPattern, merge } from 'rxjs';
33
33
  import { debounceTime, map, tap, scan } from 'rxjs/operators';
34
- import "./graph-core.less";
35
34
 
36
35
  function setCellsSelectedStatus(cells, selected) {
37
36
  cells.forEach(function (cell) {
@@ -57,31 +56,51 @@ export var GraphCore = /*#__PURE__*/function () {
57
56
  // 节点移动的订阅
58
57
  // 删除节点或连线的订阅
59
58
  // 复制节点的订阅
59
+ // 撤销
60
60
  function GraphCore(options) {
61
61
  var _this = this;
62
62
 
63
63
  _classCallCheck(this, GraphCore);
64
64
 
65
- this.wrapper = void 0;
66
- this.container = void 0;
67
- this.nodeMetas = void 0;
68
- this.edgeMetas = void 0;
69
- this.options = void 0;
70
- this.graph = void 0;
71
- this.contextMenuInfo$ = new BehaviorSubject(null);
72
- this.selectedNodes$ = new BehaviorSubject([]);
73
- this.copyableNodeId$ = new BehaviorSubject('');
74
- this.windowResizeSub = void 0;
75
- this.contextMenuSub = void 0;
76
- this.nodeContextMenuSub = void 0;
77
- this.selectNodeSub = void 0;
78
- this.connectNodeSub = void 0;
79
- this.connectionRemovedSub = void 0;
80
- this.moveNodesSub = void 0;
81
- this.deleteNodeOrEdgeSub = void 0;
82
- this.copyNodeSub = void 0;
83
-
84
- this.resizeGraph = function () {
65
+ _defineProperty(this, "wrapper", void 0);
66
+
67
+ _defineProperty(this, "container", void 0);
68
+
69
+ _defineProperty(this, "nodeMetas", void 0);
70
+
71
+ _defineProperty(this, "edgeMetas", void 0);
72
+
73
+ _defineProperty(this, "options", void 0);
74
+
75
+ _defineProperty(this, "graph", void 0);
76
+
77
+ _defineProperty(this, "contextMenuInfo$", new BehaviorSubject(null));
78
+
79
+ _defineProperty(this, "selectedNodes$", new BehaviorSubject([]));
80
+
81
+ _defineProperty(this, "copyableNodeId$", new BehaviorSubject(''));
82
+
83
+ _defineProperty(this, "windowResizeSub", void 0);
84
+
85
+ _defineProperty(this, "contextMenuSub", void 0);
86
+
87
+ _defineProperty(this, "nodeContextMenuSub", void 0);
88
+
89
+ _defineProperty(this, "selectNodeSub", void 0);
90
+
91
+ _defineProperty(this, "connectNodeSub", void 0);
92
+
93
+ _defineProperty(this, "connectionRemovedSub", void 0);
94
+
95
+ _defineProperty(this, "moveNodesSub", void 0);
96
+
97
+ _defineProperty(this, "deleteNodeOrEdgeSub", void 0);
98
+
99
+ _defineProperty(this, "copyNodeSub", void 0);
100
+
101
+ _defineProperty(this, "undoNode", void 0);
102
+
103
+ _defineProperty(this, "resizeGraph", function () {
85
104
  var graph = _this.graph,
86
105
  wrapper = _this.wrapper;
87
106
 
@@ -92,104 +111,104 @@ export var GraphCore = /*#__PURE__*/function () {
92
111
  graph.resize(width, height);
93
112
  });
94
113
  }
95
- };
114
+ });
96
115
 
97
- this.addNode = function (nodeMeta) {
116
+ _defineProperty(this, "addNode", function (nodeMeta) {
98
117
  var _this$nodeMetas;
99
118
 
100
119
  (_this$nodeMetas = _this.nodeMetas) === null || _this$nodeMetas === void 0 ? void 0 : _this$nodeMetas.push(nodeMeta);
101
120
  return _this.renderNode(nodeMeta);
102
- };
121
+ });
103
122
 
104
- this.addEdge = function (edgeMeta) {
123
+ _defineProperty(this, "addEdge", function (edgeMeta) {
105
124
  var _this$edgeMetas;
106
125
 
107
126
  (_this$edgeMetas = _this.edgeMetas) === null || _this$edgeMetas === void 0 ? void 0 : _this$edgeMetas.push(edgeMeta);
108
127
  return _this.renderEdge(edgeMeta);
109
- };
128
+ });
110
129
 
111
- this.getNodeById = function (nodeId) {
130
+ _defineProperty(this, "getNodeById", function (nodeId) {
112
131
  var _this$graph;
113
132
 
114
133
  var node = (_this$graph = _this.graph) === null || _this$graph === void 0 ? void 0 : _this$graph.getCellById(nodeId);
115
134
 
116
- if (node === null || node === void 0 ? void 0 : node.isNode()) {
135
+ if (node !== null && node !== void 0 && node.isNode()) {
117
136
  return node;
118
137
  }
119
138
 
120
139
  return undefined;
121
- };
140
+ });
122
141
 
123
- this.getNodes = function () {
142
+ _defineProperty(this, "getNodes", function () {
124
143
  var _this$graph2;
125
144
 
126
145
  return ((_this$graph2 = _this.graph) === null || _this$graph2 === void 0 ? void 0 : _this$graph2.getNodes()) || [];
127
- };
146
+ });
128
147
 
129
- this.getEdgeById = function (nodeId) {
148
+ _defineProperty(this, "getEdgeById", function (nodeId) {
130
149
  var _this$graph3;
131
150
 
132
151
  var edge = (_this$graph3 = _this.graph) === null || _this$graph3 === void 0 ? void 0 : _this$graph3.getCellById(nodeId);
133
152
 
134
- if (edge === null || edge === void 0 ? void 0 : edge.isEdge()) {
153
+ if (edge !== null && edge !== void 0 && edge.isEdge()) {
135
154
  return edge;
136
155
  }
137
156
 
138
157
  return undefined;
139
- };
158
+ });
140
159
 
141
- this.getEdges = function () {
160
+ _defineProperty(this, "getEdges", function () {
142
161
  var _this$graph4;
143
162
 
144
163
  return ((_this$graph4 = _this.graph) === null || _this$graph4 === void 0 ? void 0 : _this$graph4.getEdges()) || [];
145
- };
164
+ });
146
165
 
147
- this.getCellById = function (cellId) {
166
+ _defineProperty(this, "getCellById", function (cellId) {
148
167
  var _this$graph5;
149
168
 
150
169
  var cell = (_this$graph5 = _this.graph) === null || _this$graph5 === void 0 ? void 0 : _this$graph5.getCellById(cellId);
151
170
 
152
- if ((cell === null || cell === void 0 ? void 0 : cell.isNode()) || (cell === null || cell === void 0 ? void 0 : cell.isEdge())) {
171
+ if (cell !== null && cell !== void 0 && cell.isNode() || cell !== null && cell !== void 0 && cell.isEdge()) {
153
172
  return cell;
154
173
  }
155
174
 
156
175
  return undefined;
157
- };
176
+ });
158
177
 
159
- this.getCells = function () {
178
+ _defineProperty(this, "getCells", function () {
160
179
  var _this$graph6;
161
180
 
162
181
  return ((_this$graph6 = _this.graph) === null || _this$graph6 === void 0 ? void 0 : _this$graph6.getCells()) || [];
163
- };
182
+ });
164
183
 
165
- this.updateNodeById = function (nodeId, handler) {
184
+ _defineProperty(this, "updateNodeById", function (nodeId, handler) {
166
185
  handler(_this.getNodeById(nodeId));
167
- };
186
+ });
168
187
 
169
- this.updateNodes = function (handler) {
188
+ _defineProperty(this, "updateNodes", function (handler) {
170
189
  handler(_this.getNodes());
171
- };
190
+ });
172
191
 
173
- this.updateEdgeById = function (edgeId, handler) {
192
+ _defineProperty(this, "updateEdgeById", function (edgeId, handler) {
174
193
  var _this$graph7;
175
194
 
176
195
  var edge = (_this$graph7 = _this.graph) === null || _this$graph7 === void 0 ? void 0 : _this$graph7.getCellById(edgeId);
177
196
 
178
- if (edge === null || edge === void 0 ? void 0 : edge.isEdge()) {
197
+ if (edge !== null && edge !== void 0 && edge.isEdge()) {
179
198
  handler(edge);
180
199
  } else {
181
200
  handler(undefined);
182
201
  }
183
- };
202
+ });
184
203
 
185
- this.updateEdges = function (handler) {
204
+ _defineProperty(this, "updateEdges", function (handler) {
186
205
  var _this$graph8;
187
206
 
188
207
  var edges = ((_this$graph8 = _this.graph) === null || _this$graph8 === void 0 ? void 0 : _this$graph8.getEdges()) || [];
189
208
  handler(edges);
190
- };
209
+ });
191
210
 
192
- this.deleteNodes = function (nodes) {
211
+ _defineProperty(this, "deleteNodes", function (nodes) {
193
212
  var _this$graph9;
194
213
 
195
214
  var target = [].concat(nodes); // @ts-ignore
@@ -198,9 +217,9 @@ export var GraphCore = /*#__PURE__*/function () {
198
217
  return !target.includes(nodeMeta.id);
199
218
  });
200
219
  (_this$graph9 = _this.graph) === null || _this$graph9 === void 0 ? void 0 : _this$graph9.removeCells(target);
201
- };
220
+ });
202
221
 
203
- this.deleteEdges = function (edges) {
222
+ _defineProperty(this, "deleteEdges", function (edges) {
204
223
  var _this$graph10;
205
224
 
206
225
  var target = [].concat(edges);
@@ -212,13 +231,13 @@ export var GraphCore = /*#__PURE__*/function () {
212
231
  return !targetIds.includes(edgeMeta.id);
213
232
  });
214
233
  (_this$graph10 = _this.graph) === null || _this$graph10 === void 0 ? void 0 : _this$graph10.removeCells(target);
215
- };
234
+ });
216
235
 
217
- this.clearContextMenuInfo = function () {
236
+ _defineProperty(this, "clearContextMenuInfo", function () {
218
237
  _this.contextMenuInfo$.next(null);
219
- };
238
+ });
220
239
 
221
- this.zoom = function (factor) {
240
+ _defineProperty(this, "zoom", function (factor) {
222
241
  if (typeof factor === 'number') {
223
242
  var _this$graph11;
224
243
 
@@ -235,9 +254,9 @@ export var GraphCore = /*#__PURE__*/function () {
235
254
  (_this$graph13 = _this.graph) === null || _this$graph13 === void 0 ? void 0 : _this$graph13.scale(1);
236
255
  (_this$graph14 = _this.graph) === null || _this$graph14 === void 0 ? void 0 : _this$graph14.centerContent();
237
256
  }
238
- };
257
+ });
239
258
 
240
- this.toggleSelectionEnabled = function (enabled) {
259
+ _defineProperty(this, "toggleSelectionEnabled", function (enabled) {
241
260
  var graph = _this.graph;
242
261
 
243
262
  if (graph) {
@@ -251,9 +270,9 @@ export var GraphCore = /*#__PURE__*/function () {
251
270
  graph.disableRubberband(); // graph.scroller.widget?.setCursor('grab', { silent: true })
252
271
  }
253
272
  }
254
- };
273
+ });
255
274
 
256
- this.selectNodes = function (ids) {
275
+ _defineProperty(this, "selectNodes", function (ids) {
257
276
  var graph = _this.graph;
258
277
 
259
278
  if (graph) {
@@ -268,37 +287,37 @@ export var GraphCore = /*#__PURE__*/function () {
268
287
  graph.scrollToCell(cell);
269
288
  }
270
289
  }
271
- };
290
+ });
272
291
 
273
- this.unSelectNode = function () {
292
+ _defineProperty(this, "unSelectNode", function () {
274
293
  var graph = _this.graph;
275
294
 
276
295
  if (graph) {
277
296
  graph.cleanSelection();
278
297
  }
279
- };
298
+ });
280
299
 
281
- this.redo = function () {
300
+ _defineProperty(this, "redo", function () {
282
301
  var graph = _this.graph;
283
302
 
284
303
  if (graph) {
285
304
  graph.redo();
286
305
  }
287
- };
306
+ });
288
307
 
289
- this.undo = function () {
308
+ _defineProperty(this, "undo", function () {
290
309
  var graph = _this.graph;
291
310
 
292
311
  if (graph) {
293
312
  graph.undo();
294
313
  }
295
- };
314
+ });
296
315
 
297
- this.setCopyableNodeId = function (id) {
316
+ _defineProperty(this, "setCopyableNodeId", function (id) {
298
317
  _this.copyableNodeId$.next(id);
299
- };
318
+ });
300
319
 
301
- this.throwRenderError = function () {
320
+ _defineProperty(this, "throwRenderError", function () {
302
321
  if (!_this.wrapper) {
303
322
  throw new Error('Wrapper element is needed.');
304
323
  }
@@ -314,7 +333,7 @@ export var GraphCore = /*#__PURE__*/function () {
314
333
  if (!_this.edgeMetas) {
315
334
  throw new Error('EdgeMetas could not be empty');
316
335
  }
317
- };
336
+ });
318
337
 
319
338
  var _wrapper = options.wrapper,
320
339
  container = options.container,
@@ -393,6 +412,7 @@ export var GraphCore = /*#__PURE__*/function () {
393
412
  value: function render(params) {
394
413
  var _this2 = this;
395
414
 
415
+ console.log('<<<<<<< core >>>>>> render');
396
416
  this.setMeta(params);
397
417
 
398
418
  if (this.isMetaValid) {
@@ -489,6 +509,9 @@ export var GraphCore = /*#__PURE__*/function () {
489
509
  }, function (handler) {
490
510
  graph.off('edge:connected', handler);
491
511
  }).subscribe(function (args) {
512
+ // TODO connectNode
513
+ console.log('<<<<<<< core >>>>>> connectNode', args);
514
+
492
515
  _this2.onConnectNode(args);
493
516
  }); // 处理连线删除事件
494
517
 
@@ -496,7 +519,8 @@ export var GraphCore = /*#__PURE__*/function () {
496
519
  graph.on('edge:removed', handler);
497
520
  }, function (handler) {
498
521
  graph.off('edge:removed', handler);
499
- }).subscribe(function (args) {
522
+ } // eslint-disable-next-line consistent-return
523
+ ).subscribe(function (args) {
500
524
  _this2.onConnectionRemoved(args);
501
525
  }); // 处理节点移动事件
502
526
 
@@ -562,6 +586,14 @@ export var GraphCore = /*#__PURE__*/function () {
562
586
  nodes: selectedNodes,
563
587
  edges: selectedEdges
564
588
  });
589
+ }); // 处理删除节点或连线事件
590
+
591
+ this.undoNode = fromEventPattern(function (handler) {
592
+ graph.bindKey(['ctrl+z'], handler);
593
+ }, function () {
594
+ graph.unbindKey(['ctrl+z']);
595
+ }).subscribe(function () {
596
+ graph.undo();
565
597
  }); // 处理节点复制事件
566
598
 
567
599
  this.copyNodeSub = fromEventPattern(function (handler) {
@@ -587,7 +619,7 @@ export var GraphCore = /*#__PURE__*/function () {
587
619
  switch (action) {
588
620
  case 'command+c':
589
621
  case 'ctrl+c':
590
- if (selectedCells === null || selectedCells === void 0 ? void 0 : selectedCells.length) {
622
+ if (selectedCells !== null && selectedCells !== void 0 && selectedCells.length) {
591
623
  _this2.setCopyableNodeId(selectedCells[0].id); // 当前只支持单节点的复制粘贴
592
624
 
593
625
  }
@@ -613,20 +645,20 @@ export var GraphCore = /*#__PURE__*/function () {
613
645
  }, {
614
646
  key: "renderNode",
615
647
  value: function renderNode(nodeMeta) {
616
- console.log('renderNode => ', nodeMeta);
648
+ console.log('<<<<<<< core >>>>>> renderNode => ', nodeMeta);
617
649
  return this.graph.addNode(nodeMeta);
618
650
  }
619
651
  }, {
620
652
  key: "renderEdge",
621
653
  value: function renderEdge(edgeMeta) {
622
- console.log('renderEdge => ', edgeMeta);
654
+ console.log('<<<<<<< core >>>>>> renderEdge => ', edgeMeta);
623
655
  return this.graph.addEdge(edgeMeta);
624
656
  }
625
657
  }, {
626
658
  key: "afterLayout",
627
659
  value: function afterLayout() {
628
660
  if (process.env.NODE_ENV === 'development') {
629
- console.log('[GraphCore] call afterLayout');
661
+ console.log('<<<<<<< core >>>>>> [GraphCore] call afterLayout');
630
662
  }
631
663
  }
632
664
  }, {
@@ -638,14 +670,14 @@ export var GraphCore = /*#__PURE__*/function () {
638
670
  key: "onContextMenu",
639
671
  value: function onContextMenu(data) {
640
672
  if (process.env.NODE_ENV === 'development') {
641
- console.log('[GraphCore] context menu info:', data);
673
+ console.log('<<<<<<< core >>>>>> [GraphCore] context menu info:', data);
642
674
  }
643
675
  }
644
676
  }, {
645
677
  key: "onNodeContextMenu",
646
678
  value: function onNodeContextMenu(data) {
647
679
  if (process.env.NODE_ENV === 'development') {
648
- console.log('[GraphCore] context menu info:', data);
680
+ console.log('<<<<<<< core >>>>>> [GraphCore] context menu info:', data);
649
681
  }
650
682
  }
651
683
  }, {
@@ -654,35 +686,35 @@ export var GraphCore = /*#__PURE__*/function () {
654
686
  this.selectedNodes$.next(nodes);
655
687
 
656
688
  if (process.env.NODE_ENV === 'development') {
657
- console.log('[GraphCore] select nodes:', nodes);
689
+ console.log('<<<<<<< core >>>>>> [GraphCore] select nodes:', nodes);
658
690
  }
659
691
  }
660
692
  }, {
661
693
  key: "onConnectNode",
662
694
  value: function onConnectNode(args) {
663
695
  if (process.env.NODE_ENV === 'development') {
664
- console.log('[GraphCore] connect nodes:', args);
696
+ console.log('<<<<<<< core >>>>>> [GraphCore] connect nodes:', args);
665
697
  }
666
698
  }
667
699
  }, {
668
700
  key: "onConnectionRemoved",
669
701
  value: function onConnectionRemoved(args) {
670
702
  if (process.env.NODE_ENV === 'development') {
671
- console.log('[GraphCore] delete connection:', args);
703
+ console.log('<<<<<<< core >>>>>> [GraphCore] delete connection:', args);
672
704
  }
673
705
  }
674
706
  }, {
675
707
  key: "onMoveNodeStart",
676
708
  value: function onMoveNodeStart(args) {
677
709
  if (process.env.NODE_ENV === 'development') {
678
- console.log('[GraphCore] move nodes start:', args);
710
+ console.log('<<<<<<< core >>>>>> [GraphCore] move nodes start:', args);
679
711
  }
680
712
  }
681
713
  }, {
682
714
  key: "onMoveNodes",
683
715
  value: function onMoveNodes(args) {
684
716
  if (process.env.NODE_ENV === 'development') {
685
- console.log('[GraphCore] move nodes:', args);
717
+ console.log('<<<<<<< core >>>>>> [GraphCore] move nodes:', args);
686
718
  }
687
719
  } // 按下删除键的回调,默认参数为当前选中的节点和边
688
720
 
@@ -690,7 +722,7 @@ export var GraphCore = /*#__PURE__*/function () {
690
722
  key: "onDeleteNodeOrEdge",
691
723
  value: function onDeleteNodeOrEdge(args) {
692
724
  if (process.env.NODE_ENV === 'development') {
693
- console.log('[GraphCore] delete nodes or edge:', args);
725
+ console.log('<<<<<<< core >>>>>> [GraphCore] delete nodes or edge:', args);
694
726
  }
695
727
  } // 校验节点是否可复制,为 true 则可被用于复制
696
728
 
@@ -698,7 +730,7 @@ export var GraphCore = /*#__PURE__*/function () {
698
730
  key: "validateNodeCopyable",
699
731
  value: function validateNodeCopyable(node) {
700
732
  if (process.env.NODE_ENV === 'development') {
701
- console.log('[GraphCore] validate nodes copyable:', node);
733
+ console.log('<<<<<<< core >>>>>> [GraphCore] validate nodes copyable:', node);
702
734
  }
703
735
 
704
736
  return true;
@@ -708,7 +740,7 @@ export var GraphCore = /*#__PURE__*/function () {
708
740
  key: "onCopyNode",
709
741
  value: function onCopyNode(copyNode) {
710
742
  if (process.env.NODE_ENV === 'development') {
711
- console.log('[GraphCore] copy nodes:', copyNode);
743
+ console.log('<<<<<<< core >>>>>> [GraphCore] copy nodes:', copyNode);
712
744
  }
713
745
  }
714
746
  /* 以下为主动触发的方法 */
@@ -0,0 +1,107 @@
1
+ import type { EdgeView } from '@antv/x6';
2
+
3
+ // 实验
4
+ export namespace NExperiment {
5
+ export interface Experiment {
6
+ description: string;
7
+ name: string;
8
+ id: number;
9
+ gmtCreate: string;
10
+ }
11
+ }
12
+
13
+ // 实验图
14
+ export namespace NExperimentGraph {
15
+ export interface ExperimentGraph {
16
+ nodes: Node[];
17
+ groups: Group[];
18
+ links: Link[];
19
+ }
20
+
21
+ export interface ModalParams {
22
+ type: string;
23
+ experimentId: string;
24
+ nodeInstanceId?: number;
25
+ node?: Node;
26
+ ctx?: any;
27
+ }
28
+
29
+ export interface ContextMenuInfo {
30
+ type: 'edge' | 'graph';
31
+ data: EdgeView.PositionEventArgs<any>;
32
+ }
33
+
34
+ export interface Node {
35
+ outPorts: OutPort[];
36
+ inPorts: InPort[];
37
+ positionX: number;
38
+ positionY: number;
39
+ codeName?: string;
40
+ category?: string;
41
+ name: string;
42
+ id: string;
43
+ nodeInstanceId?: number;
44
+ groupId?: number;
45
+ status?: number;
46
+ }
47
+
48
+ export interface Port {
49
+ sequence: number;
50
+ id: string;
51
+ description?: string;
52
+ }
53
+
54
+ export type OutPort = Port;
55
+
56
+ export type InPort = Port;
57
+
58
+ export interface Group {
59
+ isCollapsed: boolean;
60
+ experimentId: number;
61
+ name: string;
62
+ id: number;
63
+ }
64
+
65
+ export interface Link {
66
+ inputPortId: number;
67
+ outputPortId: number;
68
+ source: number;
69
+ type?: string;
70
+ target: number;
71
+ }
72
+ }
73
+
74
+ // 执行状态
75
+ export namespace NExecutionStatus {
76
+ // 当前选中的组件
77
+ export interface ActiveNode {
78
+ type: 'legacy' | 'algo';
79
+ [k: string]: any;
80
+ }
81
+
82
+ export interface ExecDetail {
83
+ defName: string;
84
+ quickViewData: QuickViewData;
85
+ jobStatus: string;
86
+ percentage: number;
87
+ lastTime: number;
88
+ name: string;
89
+ startTime: string;
90
+ endTime: string;
91
+ }
92
+ }
93
+
94
+ // 模型
95
+ export namespace NModel {
96
+ export interface Model {
97
+ codeName: string;
98
+ isNew: boolean;
99
+ catId: number;
100
+ parentId: number;
101
+ category: string;
102
+ owner: string;
103
+ name: string;
104
+ id: number;
105
+ type: string;
106
+ }
107
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Graph } from '@antv/x6';
2
+ Graph.registerConnector('pai', function (s, t) {
3
+ var offset = 4;
4
+ var control = 80;
5
+ var v1 = {
6
+ x: s.x,
7
+ y: s.y + offset + control
8
+ };
9
+ var v2 = {
10
+ x: t.x,
11
+ y: t.y - offset - control
12
+ };
13
+ return "\n M ".concat(s.x, " ").concat(s.y, "\n L ").concat(s.x, " ").concat(s.y + offset, "\n C ").concat(v1.x, " ").concat(v1.y, " ").concat(v2.x, " ").concat(v2.y, " ").concat(t.x, " ").concat(t.y - offset, "\n L ").concat(t.x, " ").concat(t.y, "\n ");
14
+ }, true);
@@ -0,0 +1,8 @@
1
+ .x6-edge {
2
+ &-selected,
3
+ &:hover {
4
+ path[stroke-width='1'] {
5
+ stroke-width: 3px;
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,5 @@
1
+ import { Shape } from '@antv/x6';
2
+ import './edge.less';
3
+ export default class BaseEdge extends Shape.Edge {
4
+ isGroupEdge(): boolean;
5
+ }