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
@@ -1,60 +0,0 @@
1
- var _nodeTypeMeta;
2
-
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
5
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
-
7
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
-
9
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
-
11
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
-
13
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
-
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
-
17
- import { CONDITION_HEIGHT, CONDITION_WIDTH, LOGICAL_EDG } from "../constants/graph";
18
- export var SCENE_DISPLAY = {
19
- EQUIPMENT: 'SCENE_DISPLAY_EQUIPMENT',
20
- TIME: 'SCENE_DISPLAY_TIME',
21
- MANUAL: 'SCENE_DISPLAY_MANUAL' // 手动触发
22
-
23
- }; // 场景触发
24
-
25
- export var COMPONENTS_TYPE = {
26
- COMMONLY_USED: 'COMMONLY_USED',
27
- SCENE_DISPLAY: 'SCENE_DISPLAY',
28
- SIGN_OPERATION: 'SIGN_OPERATION',
29
- MOTION_OPERATION: 'MOTION_OPERATION',
30
- APPLICATION: 'APPLICATION' // 应用组件
31
-
32
- };
33
- export var COMMONLY_USED = {
34
- VARIATE: 'COMMONLY_USED_VARIATE' // 变量
35
-
36
- }; // 通用组件
37
-
38
- export var SIGN_OPERATION = {
39
- RELATION: 'SIGN_OPERATION_RELATION',
40
- LOGICAL: 'SIGN_OPERATION_LOGICAL',
41
- CONDITION: 'SIGN_OPERATION_CONDITION' // 条件判断
42
-
43
- }; // 运算符号
44
-
45
- export var MOTION_OPERATION = {
46
- ALARM: 'MOTION_OPERATION_ALARM',
47
- NOTICE: 'MOTION_OPERATION_NOTICE',
48
- ORDER: 'MOTION_OPERATION_ORDER',
49
- CONTROL: 'MOTION_OPERATION_CONTROL' // 远程控制
50
-
51
- }; // 运动符号
52
-
53
- export var ALL_NODE_TYPE = [].concat(_toConsumableArray(Object.values(COMMONLY_USED)), _toConsumableArray(Object.values(SCENE_DISPLAY)), _toConsumableArray(Object.values(SIGN_OPERATION)), _toConsumableArray(Object.values(MOTION_OPERATION)), _toConsumableArray(Object.values(COMPONENTS_TYPE)));
54
- export var nodeTypeMeta = (_nodeTypeMeta = {}, _defineProperty(_nodeTypeMeta, SIGN_OPERATION.CONDITION, {
55
- width: CONDITION_WIDTH,
56
- height: CONDITION_HEIGHT
57
- }), _defineProperty(_nodeTypeMeta, SIGN_OPERATION.LOGICAL, {
58
- width: LOGICAL_EDG,
59
- height: LOGICAL_EDG
60
- }), _nodeTypeMeta);
@@ -1,10 +0,0 @@
1
- import { Shape } from '@antv/x6';
2
- import './edge.less';
3
- export declare class BaseEdge extends Shape.Edge {
4
- isGroupEdge(): boolean;
5
- }
6
- export declare class GuideEdge extends BaseEdge {
7
- }
8
- export declare class X6DemoGroupEdge extends GuideEdge {
9
- isGroupEdge(): boolean;
10
- }
@@ -1,6 +0,0 @@
1
- import BaseNode from './nodes/BaseNode';
2
- import CommonNode from './nodes/CommonNode';
3
- import GroupNode from './nodes/GroupNode';
4
- import ConditionJudgment from './nodes/ConditionJudgment';
5
- import LogicalNode from './nodes/LogicalNode';
6
- export { BaseNode, CommonNode, GroupNode, LogicalNode, ConditionJudgment };
@@ -1,6 +0,0 @@
1
- import BaseNode from "./nodes/BaseNode";
2
- import CommonNode from "./nodes/CommonNode";
3
- import GroupNode from "./nodes/GroupNode";
4
- import ConditionJudgment from "./nodes/ConditionJudgment";
5
- import LogicalNode from "./nodes/LogicalNode";
6
- export { BaseNode, CommonNode, GroupNode, LogicalNode, ConditionJudgment };
@@ -1,4 +0,0 @@
1
- import { ReactShape } from '@antv/x6-react-shape';
2
- export default class BaseNode extends ReactShape {
3
- isGroup(): boolean;
4
- }
@@ -1,4 +0,0 @@
1
- import BaseNode from './BaseNode';
2
- export default class GroupNode extends BaseNode {
3
- isGroup(): boolean;
4
- }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import './cut.less';
3
- interface Props {
4
- left: number;
5
- right: number;
6
- max: number;
7
- children: string;
8
- }
9
- export declare const Cut: React.FC<Props>;
10
- export {};
@@ -1,34 +0,0 @@
1
- import React, { useCallback } from 'react';
2
- import "./cut.less";
3
- export var Cut = function Cut(props) {
4
- var left = props.left,
5
- _props$right = props.right,
6
- right = _props$right === void 0 ? 0 : _props$right,
7
- max = props.max,
8
- children = props.children;
9
- var getText = useCallback(function () {
10
- var len = children.length;
11
- var ellipsis = '...';
12
- var leftStr = '';
13
- var rightStr = '';
14
-
15
- if (len > max) {
16
- if (left && len) {
17
- leftStr = children.substr(0, left);
18
- } else {
19
- leftStr = children.substr(0, max);
20
- }
21
-
22
- if (right) {
23
- rightStr = children.substr(-right, right);
24
- }
25
-
26
- return "".concat(leftStr).concat(ellipsis).concat(rightStr);
27
- }
28
-
29
- return children;
30
- }, [left, right, max, children]);
31
- return /*#__PURE__*/React.createElement("span", {
32
- className: "no-wrap"
33
- }, getText());
34
- };
@@ -1,6 +0,0 @@
1
- .no-wrap {
2
- display: inline-block;
3
- overflow: hidden;
4
- white-space: nowrap;
5
- vertical-align: middle;
6
- }
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- data: any;
4
- }
5
- export declare const ItemName: React.FC<Props>;
6
- export {};
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { unescape } from 'lodash-es';
3
- import { Cut } from "./cut";
4
- import { Keyword } from "./keyword";
5
- export var ItemName = function ItemName(props) {
6
- var data = props.data;
7
- var keyword = data.keyword,
8
- _data$cutParas = data.cutParas,
9
- cutParas = _data$cutParas === void 0 ? {} : _data$cutParas;
10
- var name = unescape(data.name);
11
- var max = cutParas.max,
12
- side = cutParas.side;
13
-
14
- if (keyword) {
15
- return /*#__PURE__*/React.createElement(Keyword, {
16
- raw: name,
17
- keyword: keyword
18
- });
19
- }
20
-
21
- if (max) {
22
- return /*#__PURE__*/React.createElement(Cut, {
23
- max: max,
24
- left: side,
25
- right: side
26
- }, name);
27
- }
28
-
29
- return /*#__PURE__*/React.createElement("span", null, name);
30
- };
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './keyword.less';
3
- interface Props {
4
- raw: string;
5
- keyword: string;
6
- className?: string;
7
- }
8
- export declare const Keyword: React.FC<Props>;
9
- export {};
@@ -1,26 +0,0 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
- import React from 'react';
4
- import classnames from 'classnames';
5
- import "./keyword.less";
6
- export var Keyword = function Keyword(props) {
7
- var raw = props.raw,
8
- keyword = props.keyword,
9
- className = props.className;
10
-
11
- if (keyword) {
12
- var regex = new RegExp(keyword, 'ig');
13
- var arr = raw.split(regex);
14
- return /*#__PURE__*/React.createElement("span", {
15
- className: classnames(_defineProperty({
16
- 'keyword-wrapper': true
17
- }, className, !!className))
18
- }, arr.map(function (section, index) {
19
- return index !== arr.length - 1 ? /*#__PURE__*/React.createElement("span", {
20
- key: section + index
21
- }, section, /*#__PURE__*/React.createElement("strong", null, keyword)) : section;
22
- }));
23
- }
24
-
25
- return null;
26
- };
@@ -1,11 +0,0 @@
1
- .keyword-wrapper {
2
- strong {
3
- color: #dd4b39;
4
- font-weight: normal;
5
- font-style: normal;
6
- }
7
-
8
- max-width: 200px;
9
- overflow: hidden;
10
- text-overflow: ellipsis;
11
- }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { Observable } from 'rxjs';
3
- import { InputProps } from 'antd/es/input';
4
- interface RxInputProps extends Omit<InputProps, 'value'> {
5
- value: Observable<string>;
6
- }
7
- export declare const RxInput: React.FC<RxInputProps>;
8
- export {};
@@ -1,47 +0,0 @@
1
- import "antd/es/input/style";
2
- import _Input from "antd/es/input";
3
- import "antd/es/config-provider/style";
4
- import _ConfigProvider from "antd/es/config-provider";
5
- var _excluded = ["value"];
6
-
7
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
-
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
-
11
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
-
13
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
-
15
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
-
17
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
-
19
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
20
-
21
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
22
-
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
-
25
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
26
-
27
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
28
-
29
- import React from 'react';
30
- import { useObservableState } from "../../hooks/useObservableState";
31
- import { ANT_PREFIX } from "../../common/constants/global";
32
- export var RxInput = function RxInput(props) {
33
- var value = props.value,
34
- otherProps = _objectWithoutProperties(props, _excluded);
35
-
36
- var _useObservableState = useObservableState(function () {
37
- return value;
38
- }),
39
- _useObservableState2 = _slicedToArray(_useObservableState, 1),
40
- realValue = _useObservableState2[0];
41
-
42
- return /*#__PURE__*/React.createElement(_ConfigProvider, {
43
- prefixCls: ANT_PREFIX
44
- }, /*#__PURE__*/React.createElement(_Input, _objectSpread({
45
- value: realValue
46
- }, otherProps)));
47
- };
@@ -1 +0,0 @@
1
- export declare function withMode(WrappedComponent: any, mode: Types.ModeType): JSX.Element;
@@ -1,16 +0,0 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- import React from 'react';
8
- export function withMode(WrappedComponent, mode) {
9
- var WithModeComponent = function WithModeComponent(props) {
10
- return /*#__PURE__*/React.createElement(WrappedComponent.type, _objectSpread({}, props));
11
- };
12
-
13
- return /*#__PURE__*/React.createElement(WithModeComponent, _objectSpread(_objectSpread({}, (WrappedComponent === null || WrappedComponent === void 0 ? void 0 : WrappedComponent.props) || {}), {}, {
14
- mode: mode
15
- }));
16
- }
@@ -1,42 +0,0 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import '@antv/x6-react-shape';
3
- import classNames from 'classnames';
4
- import { useExperimentGraph, useUnmountExperimentGraph } from "../rx-models/experiment-graph";
5
- import "./canvas-content.less";
6
-
7
- var CanvasContent = function CanvasContent(props) {
8
- var experimentId = props.experimentId,
9
- className = props.className,
10
- viewData = props.viewData; // 处理画布卸载
11
-
12
- useUnmountExperimentGraph(experimentId);
13
- var containerRef = useRef(null);
14
- var canvasRef = useRef(null);
15
- var expGraph = useExperimentGraph(experimentId); // 渲染画布
16
-
17
- useEffect(function () {
18
- window.renderForm = expGraph.setActiveAlgoData;
19
- window.requestIdleCallback(function () {
20
- var _expGraph$graph;
21
-
22
- expGraph.renderGraph(containerRef.current, canvasRef.current, {
23
- interacting: false
24
- });
25
- expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph = expGraph.graph) === null || _expGraph$graph === void 0 ? void 0 : _expGraph$graph.hideGrid();
26
- expGraph.onClearSelectNodes();
27
- console.log('initPreviewData', viewData);
28
- expGraph.initPreviewData(viewData).then();
29
- });
30
- return function () {
31
- delete window.renderForm;
32
- };
33
- }, [expGraph]);
34
- return /*#__PURE__*/React.createElement("div", {
35
- ref: containerRef,
36
- className: classNames(className, 'canvas-content')
37
- }, /*#__PURE__*/React.createElement("div", {
38
- ref: canvasRef
39
- }));
40
- };
41
-
42
- export default CanvasContent;
@@ -1,14 +0,0 @@
1
- .ant-spin-container {
2
- width: 100%;
3
- height: 100%;
4
- }
5
-
6
- .x6-widget-selection-inner {
7
- border: none !important;
8
- box-shadow: none !important;
9
- }
10
-
11
- .x6-widget-selection-box {
12
- border: none !important;
13
- box-shadow: none !important;
14
- }
@@ -1,126 +0,0 @@
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
- // 实验的执行状态
83
- export interface ExecutionStatus {
84
- instStatus: InstStatus
85
- execInfo: ExecInfo
86
- status: string
87
- }
88
-
89
- export interface InstStatus {
90
- [k: string]: string
91
- }
92
-
93
- export interface GroupStatus {}
94
-
95
- export interface ExecInfo {
96
- [k: string]: ExecDetail
97
- }
98
-
99
- export interface ExecDetail {
100
- defName: string
101
- quickViewData: QuickViewData
102
- jobStatus: string
103
- percentage: number
104
- lastTime: number
105
- name: string
106
- startTime: string
107
- endTime: string
108
- }
109
-
110
- export interface QuickViewData {}
111
- }
112
-
113
- // 模型
114
- export namespace NModel {
115
- export interface Model {
116
- codeName: string
117
- isNew: boolean
118
- catId: number
119
- parentId: number
120
- category: string
121
- owner: string
122
- name: string
123
- id: number
124
- type: string
125
- }
126
- }
@@ -1,154 +0,0 @@
1
- import "antd/es/input/style";
2
- import _Input from "antd/es/input";
3
-
4
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
-
6
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
-
8
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9
-
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
-
12
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
13
-
14
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
-
16
- import React, { useState } from 'react';
17
- import { useExperimentGraph } from "../rx-models/experiment-graph"; // import ThemeSwitch from './theme-switch';
18
-
19
- import "../../style/position.less";
20
- import "./style.less";
21
-
22
- var Index = function Index(props) {
23
- var name = props.name,
24
- _props$isActive = props.isActive,
25
- isActive = _props$isActive === void 0 ? false : _props$isActive,
26
- onActiveSwitch = props.onActiveSwitch,
27
- onCancel = props.onCancel,
28
- onSave = props.onSave,
29
- experimentId = props.experimentId,
30
- onNameChange = props.onNameChange,
31
- extraHeaderData = props.extraHeaderData;
32
-
33
- var _useState = useState(false),
34
- _useState2 = _slicedToArray(_useState, 2),
35
- bordered = _useState2[0],
36
- setBordered = _useState2[1];
37
-
38
- var expGraph = useExperimentGraph(experimentId);
39
-
40
- var handleSave = function handleSave(type) {
41
- var _expGraph$graph, _expGraph$graph2;
42
-
43
- var nodes = expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph = expGraph.graph) === null || _expGraph$graph === void 0 ? void 0 : _expGraph$graph.getNodes();
44
- var nodesData = nodes === null || nodes === void 0 ? void 0 : nodes.map(function (item) {
45
- return item === null || item === void 0 ? void 0 : item.store.data;
46
- });
47
- var edges = expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph2 = expGraph.graph) === null || _expGraph$graph2 === void 0 ? void 0 : _expGraph$graph2.getEdges();
48
- var edgesData = edges === null || edges === void 0 ? void 0 : edges.map(function (item) {
49
- return item === null || item === void 0 ? void 0 : item.store.data;
50
- });
51
- console.log({
52
- nodes: nodesData,
53
- links: edgesData
54
- });
55
- onSave === null || onSave === void 0 ? void 0 : onSave(type, {
56
- nodes: nodesData,
57
- links: edgesData
58
- });
59
- };
60
-
61
- var handleFocus = function handleFocus() {
62
- setBordered(true);
63
- };
64
-
65
- var handleEditName = function handleEditName(strategyName) {
66
- onNameChange === null || onNameChange === void 0 ? void 0 : onNameChange(strategyName);
67
- };
68
-
69
- var handleBlur = function handleBlur(e) {
70
- handleEditName(e.target.value);
71
- setBordered(false);
72
- };
73
-
74
- var handlePressEnter = function handlePressEnter(e) {
75
- e.target.blur();
76
- };
77
-
78
- return /*#__PURE__*/React.createElement("div", {
79
- className: "strategyHeader"
80
- }, /*#__PURE__*/React.createElement("div", {
81
- className: "pos-btw"
82
- }, /*#__PURE__*/React.createElement(_Input, {
83
- defaultValue: name,
84
- placeholder: "\u7B56\u7565\u540D\u79F0",
85
- style: {
86
- width: 265
87
- },
88
- bordered: bordered,
89
- onFocus: handleFocus,
90
- onBlur: handleBlur,
91
- onPressEnter: handlePressEnter
92
- }), /*#__PURE__*/React.createElement("div", {
93
- className: "pos-end"
94
- }, extraHeaderData === null || extraHeaderData === void 0 ? void 0 : extraHeaderData.map(function (item, index) {
95
- return (
96
- /*#__PURE__*/
97
- // eslint-disable-next-line react/no-array-index-key
98
- React.createElement("span", {
99
- key: index,
100
- onClick: item === null || item === void 0 ? void 0 : item.onClick,
101
- className: "header-btn"
102
- }, /*#__PURE__*/React.createElement("img", {
103
- alt: "",
104
- className: "header-btn-img",
105
- src: item.imgUrl
106
- }), item.name)
107
- );
108
- }), /*#__PURE__*/React.createElement("span", {
109
- onClick: function onClick() {
110
- handleSave('application');
111
- },
112
- className: "header-btn"
113
- }, /*#__PURE__*/React.createElement("img", {
114
- alt: "",
115
- className: "header-btn-img",
116
- src: require("../../assets/save.svg")
117
- }), "\u4FDD\u5B58\u4E3A\u5E94\u7528"), /*#__PURE__*/React.createElement("span", {
118
- className: "header-btn",
119
- onClick: onCancel
120
- }, /*#__PURE__*/React.createElement("img", {
121
- alt: "",
122
- className: "header-btn-img",
123
- src: require("../../assets/cancel.svg")
124
- }), "\u53D6\u6D88"), /*#__PURE__*/React.createElement("span", {
125
- className: "header-btn",
126
- onClick: function onClick() {
127
- handleSave('data');
128
- }
129
- }, /*#__PURE__*/React.createElement("img", {
130
- alt: "",
131
- className: "header-btn-img",
132
- src: require("../../assets/save.svg")
133
- }), "\u4FDD\u5B58"), isActive ? /*#__PURE__*/React.createElement("span", {
134
- className: "header-btn",
135
- onClick: function onClick() {
136
- onActiveSwitch === null || onActiveSwitch === void 0 ? void 0 : onActiveSwitch(false);
137
- }
138
- }, /*#__PURE__*/React.createElement("img", {
139
- alt: "",
140
- className: "header-btn-img",
141
- src: require("../../assets/cancel.svg")
142
- }), "\u505C\u7528") : /*#__PURE__*/React.createElement("span", {
143
- className: "header-btn",
144
- onClick: function onClick() {
145
- onActiveSwitch === null || onActiveSwitch === void 0 ? void 0 : onActiveSwitch(true);
146
- }
147
- }, /*#__PURE__*/React.createElement("img", {
148
- alt: "",
149
- className: "header-btn-img",
150
- src: require("../../assets/check.svg")
151
- }), "\u542F\u7528"))));
152
- };
153
-
154
- export default Index;