@sunspirytus/xflow-core 1.0.52

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 (796) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/index.css +108 -0
  4. package/dist/index.umd.js +35 -0
  5. package/dist/index.umd.js.map +1 -0
  6. package/es/antd-icons/index.d.ts +20 -0
  7. package/es/antd-icons/index.js +29 -0
  8. package/es/antd-icons/index.js.map +1 -0
  9. package/es/command/__test__/graph-command.spec.d.ts +1 -0
  10. package/es/command/__test__/graph-command.spec.js +109 -0
  11. package/es/command/__test__/graph-command.spec.js.map +1 -0
  12. package/es/command/graph-command.d.ts +177 -0
  13. package/es/command/graph-command.js +300 -0
  14. package/es/command/graph-command.js.map +1 -0
  15. package/es/command/index.d.ts +7 -0
  16. package/es/command/index.js +6 -0
  17. package/es/command/index.js.map +1 -0
  18. package/es/command/interface.d.ts +221 -0
  19. package/es/command/interface.js +23 -0
  20. package/es/command/interface.js.map +1 -0
  21. package/es/command/module.d.ts +2 -0
  22. package/es/command/module.js +15 -0
  23. package/es/command/module.js.map +1 -0
  24. package/es/command-contributions/cmd-context.d.ts +76 -0
  25. package/es/command-contributions/cmd-context.js +123 -0
  26. package/es/command-contributions/cmd-context.js.map +1 -0
  27. package/es/command-contributions/command-contribution.d.ts +23 -0
  28. package/es/command-contributions/command-contribution.js +182 -0
  29. package/es/command-contributions/command-contribution.js.map +1 -0
  30. package/es/command-contributions/components/context.d.ts +11 -0
  31. package/es/command-contributions/components/context.js +86 -0
  32. package/es/command-contributions/components/context.js.map +1 -0
  33. package/es/command-contributions/components/index.d.ts +11 -0
  34. package/es/command-contributions/components/index.js +32 -0
  35. package/es/command-contributions/components/index.js.map +1 -0
  36. package/es/command-contributions/config.d.ts +39 -0
  37. package/es/command-contributions/config.js +64 -0
  38. package/es/command-contributions/config.js.map +1 -0
  39. package/es/command-contributions/constant.d.ts +98 -0
  40. package/es/command-contributions/constant.js +272 -0
  41. package/es/command-contributions/constant.js.map +1 -0
  42. package/es/command-contributions/edge/edge-add.d.ts +83 -0
  43. package/es/command-contributions/edge/edge-add.js +134 -0
  44. package/es/command-contributions/edge/edge-add.js.map +1 -0
  45. package/es/command-contributions/edge/edge-back.d.ts +27 -0
  46. package/es/command-contributions/edge/edge-back.js +72 -0
  47. package/es/command-contributions/edge/edge-back.js.map +1 -0
  48. package/es/command-contributions/edge/edge-del.d.ts +67 -0
  49. package/es/command-contributions/edge/edge-del.js +129 -0
  50. package/es/command-contributions/edge/edge-del.js.map +1 -0
  51. package/es/command-contributions/edge/edge-front.d.ts +27 -0
  52. package/es/command-contributions/edge/edge-front.js +72 -0
  53. package/es/command-contributions/edge/edge-front.js.map +1 -0
  54. package/es/command-contributions/edge/edge-highlight.d.ts +32 -0
  55. package/es/command-contributions/edge/edge-highlight.js +92 -0
  56. package/es/command-contributions/edge/edge-highlight.js.map +1 -0
  57. package/es/command-contributions/edge/edge-update.d.ts +46 -0
  58. package/es/command-contributions/edge/edge-update.js +99 -0
  59. package/es/command-contributions/edge/edge-update.js.map +1 -0
  60. package/es/command-contributions/edge/index.d.ts +50 -0
  61. package/es/command-contributions/edge/index.js +19 -0
  62. package/es/command-contributions/edge/index.js.map +1 -0
  63. package/es/command-contributions/graph/graph-add-tool.d.ts +49 -0
  64. package/es/command-contributions/graph/graph-add-tool.js +74 -0
  65. package/es/command-contributions/graph/graph-add-tool.js.map +1 -0
  66. package/es/command-contributions/graph/graph-cmd-redo.d.ts +40 -0
  67. package/es/command-contributions/graph/graph-cmd-redo.js +77 -0
  68. package/es/command-contributions/graph/graph-cmd-redo.js.map +1 -0
  69. package/es/command-contributions/graph/graph-cmd-undo.d.ts +36 -0
  70. package/es/command-contributions/graph/graph-cmd-undo.js +77 -0
  71. package/es/command-contributions/graph/graph-cmd-undo.js.map +1 -0
  72. package/es/command-contributions/graph/graph-copy.d.ts +39 -0
  73. package/es/command-contributions/graph/graph-copy.js +102 -0
  74. package/es/command-contributions/graph/graph-copy.js.map +1 -0
  75. package/es/command-contributions/graph/graph-del-tool.d.ts +47 -0
  76. package/es/command-contributions/graph/graph-del-tool.js +68 -0
  77. package/es/command-contributions/graph/graph-del-tool.js.map +1 -0
  78. package/es/command-contributions/graph/graph-fulllscreen.d.ts +37 -0
  79. package/es/command-contributions/graph/graph-fulllscreen.js +84 -0
  80. package/es/command-contributions/graph/graph-fulllscreen.js.map +1 -0
  81. package/es/command-contributions/graph/graph-history-redo.d.ts +33 -0
  82. package/es/command-contributions/graph/graph-history-redo.js +69 -0
  83. package/es/command-contributions/graph/graph-history-redo.js.map +1 -0
  84. package/es/command-contributions/graph/graph-history-reset.d.ts +33 -0
  85. package/es/command-contributions/graph/graph-history-reset.js +59 -0
  86. package/es/command-contributions/graph/graph-history-reset.js.map +1 -0
  87. package/es/command-contributions/graph/graph-history-toggle.d.ts +35 -0
  88. package/es/command-contributions/graph/graph-history-toggle.js +75 -0
  89. package/es/command-contributions/graph/graph-history-toggle.js.map +1 -0
  90. package/es/command-contributions/graph/graph-history-undo.d.ts +35 -0
  91. package/es/command-contributions/graph/graph-history-undo.js +69 -0
  92. package/es/command-contributions/graph/graph-history-undo.js.map +1 -0
  93. package/es/command-contributions/graph/graph-layout.d.ts +43 -0
  94. package/es/command-contributions/graph/graph-layout.js +71 -0
  95. package/es/command-contributions/graph/graph-layout.js.map +1 -0
  96. package/es/command-contributions/graph/graph-load-data.d.ts +37 -0
  97. package/es/command-contributions/graph/graph-load-data.js +68 -0
  98. package/es/command-contributions/graph/graph-load-data.js.map +1 -0
  99. package/es/command-contributions/graph/graph-meta.d.ts +47 -0
  100. package/es/command-contributions/graph/graph-meta.js +78 -0
  101. package/es/command-contributions/graph/graph-meta.js.map +1 -0
  102. package/es/command-contributions/graph/graph-paste.d.ts +52 -0
  103. package/es/command-contributions/graph/graph-paste.js +129 -0
  104. package/es/command-contributions/graph/graph-paste.js.map +1 -0
  105. package/es/command-contributions/graph/graph-render.d.ts +53 -0
  106. package/es/command-contributions/graph/graph-render.js +249 -0
  107. package/es/command-contributions/graph/graph-render.js.map +1 -0
  108. package/es/command-contributions/graph/graph-resize.d.ts +40 -0
  109. package/es/command-contributions/graph/graph-resize.js +75 -0
  110. package/es/command-contributions/graph/graph-resize.js.map +1 -0
  111. package/es/command-contributions/graph/graph-save-data.d.ts +43 -0
  112. package/es/command-contributions/graph/graph-save-data.js +101 -0
  113. package/es/command-contributions/graph/graph-save-data.js.map +1 -0
  114. package/es/command-contributions/graph/graph-toggle-multi-select.d.ts +38 -0
  115. package/es/command-contributions/graph/graph-toggle-multi-select.js +96 -0
  116. package/es/command-contributions/graph/graph-toggle-multi-select.js.map +1 -0
  117. package/es/command-contributions/graph/graph-zoom.d.ts +51 -0
  118. package/es/command-contributions/graph/graph-zoom.js +89 -0
  119. package/es/command-contributions/graph/graph-zoom.js.map +1 -0
  120. package/es/command-contributions/graph/index.d.ts +114 -0
  121. package/es/command-contributions/graph/index.js +83 -0
  122. package/es/command-contributions/graph/index.js.map +1 -0
  123. package/es/command-contributions/group/group-add.d.ts +56 -0
  124. package/es/command-contributions/group/group-add.js +114 -0
  125. package/es/command-contributions/group/group-add.js.map +1 -0
  126. package/es/command-contributions/group/group-del.d.ts +43 -0
  127. package/es/command-contributions/group/group-del.js +100 -0
  128. package/es/command-contributions/group/group-del.js.map +1 -0
  129. package/es/command-contributions/group/group-init.d.ts +40 -0
  130. package/es/command-contributions/group/group-init.js +97 -0
  131. package/es/command-contributions/group/group-init.js.map +1 -0
  132. package/es/command-contributions/group/group-toggle-collapse.d.ts +47 -0
  133. package/es/command-contributions/group/group-toggle-collapse.js +123 -0
  134. package/es/command-contributions/group/group-toggle-collapse.js.map +1 -0
  135. package/es/command-contributions/group/index.d.ts +39 -0
  136. package/es/command-contributions/group/index.js +14 -0
  137. package/es/command-contributions/group/index.js.map +1 -0
  138. package/es/command-contributions/index.d.ts +10 -0
  139. package/es/command-contributions/index.js +13 -0
  140. package/es/command-contributions/index.js.map +1 -0
  141. package/es/command-contributions/interface.d.ts +17 -0
  142. package/es/command-contributions/interface.js +2 -0
  143. package/es/command-contributions/interface.js.map +1 -0
  144. package/es/command-contributions/mapping-service.d.ts +20 -0
  145. package/es/command-contributions/mapping-service.js +91 -0
  146. package/es/command-contributions/mapping-service.js.map +1 -0
  147. package/es/command-contributions/models/index.d.ts +24 -0
  148. package/es/command-contributions/models/index.js +9 -0
  149. package/es/command-contributions/models/index.js.map +1 -0
  150. package/es/command-contributions/models/update-model.d.ts +45 -0
  151. package/es/command-contributions/models/update-model.js +70 -0
  152. package/es/command-contributions/models/update-model.js.map +1 -0
  153. package/es/command-contributions/module.d.ts +5 -0
  154. package/es/command-contributions/module.js +45 -0
  155. package/es/command-contributions/module.js.map +1 -0
  156. package/es/command-contributions/node/index.d.ts +70 -0
  157. package/es/command-contributions/node/index.js +38 -0
  158. package/es/command-contributions/node/index.js.map +1 -0
  159. package/es/command-contributions/node/node-add.d.ts +58 -0
  160. package/es/command-contributions/node/node-add.js +131 -0
  161. package/es/command-contributions/node/node-add.js.map +1 -0
  162. package/es/command-contributions/node/node-back.d.ts +32 -0
  163. package/es/command-contributions/node/node-back.js +74 -0
  164. package/es/command-contributions/node/node-back.js.map +1 -0
  165. package/es/command-contributions/node/node-center.d.ts +30 -0
  166. package/es/command-contributions/node/node-center.js +60 -0
  167. package/es/command-contributions/node/node-center.js.map +1 -0
  168. package/es/command-contributions/node/node-del.d.ts +51 -0
  169. package/es/command-contributions/node/node-del.js +102 -0
  170. package/es/command-contributions/node/node-del.js.map +1 -0
  171. package/es/command-contributions/node/node-front.d.ts +27 -0
  172. package/es/command-contributions/node/node-front.js +73 -0
  173. package/es/command-contributions/node/node-front.js.map +1 -0
  174. package/es/command-contributions/node/node-highlight.d.ts +39 -0
  175. package/es/command-contributions/node/node-highlight.js +85 -0
  176. package/es/command-contributions/node/node-highlight.js.map +1 -0
  177. package/es/command-contributions/node/node-move.d.ts +51 -0
  178. package/es/command-contributions/node/node-move.js +94 -0
  179. package/es/command-contributions/node/node-move.js.map +1 -0
  180. package/es/command-contributions/node/node-select.d.ts +30 -0
  181. package/es/command-contributions/node/node-select.js +73 -0
  182. package/es/command-contributions/node/node-select.js.map +1 -0
  183. package/es/command-contributions/node/node-update-port.d.ts +54 -0
  184. package/es/command-contributions/node/node-update-port.js +105 -0
  185. package/es/command-contributions/node/node-update-port.js.map +1 -0
  186. package/es/command-contributions/node/node-update.d.ts +53 -0
  187. package/es/command-contributions/node/node-update.js +122 -0
  188. package/es/command-contributions/node/node-update.js.map +1 -0
  189. package/es/common/deferred.d.ts +8 -0
  190. package/es/common/deferred.js +17 -0
  191. package/es/common/deferred.js.map +1 -0
  192. package/es/common/delay.d.ts +1 -0
  193. package/es/common/delay.js +5 -0
  194. package/es/common/delay.js.map +1 -0
  195. package/es/common/disposable.d.ts +28 -0
  196. package/es/common/disposable.js +81 -0
  197. package/es/common/disposable.js.map +1 -0
  198. package/es/common/event-helper.d.ts +7 -0
  199. package/es/common/event-helper.js +8 -0
  200. package/es/common/event-helper.js.map +1 -0
  201. package/es/common/graph-utils.d.ts +22 -0
  202. package/es/common/graph-utils.js +34 -0
  203. package/es/common/graph-utils.js.map +1 -0
  204. package/es/common/position.d.ts +10 -0
  205. package/es/common/position.js +12 -0
  206. package/es/common/position.js.map +1 -0
  207. package/es/common/rx-model-hook.d.ts +16 -0
  208. package/es/common/rx-model-hook.js +92 -0
  209. package/es/common/rx-model-hook.js.map +1 -0
  210. package/es/common/rx-model.d.ts +66 -0
  211. package/es/common/rx-model.js +101 -0
  212. package/es/common/rx-model.js.map +1 -0
  213. package/es/common/safe-json.d.ts +1 -0
  214. package/es/common/safe-json.js +12 -0
  215. package/es/common/safe-json.js.map +1 -0
  216. package/es/common/types.d.ts +15 -0
  217. package/es/common/types.js +2 -0
  218. package/es/common/types.js.map +1 -0
  219. package/es/common/utils.d.ts +11 -0
  220. package/es/common/utils.js +48 -0
  221. package/es/common/utils.js.map +1 -0
  222. package/es/common/uuid.d.ts +2 -0
  223. package/es/common/uuid.js +8 -0
  224. package/es/common/uuid.js.map +1 -0
  225. package/es/constants.d.ts +31 -0
  226. package/es/constants.js +26 -0
  227. package/es/constants.js.map +1 -0
  228. package/es/hooks/components/index.d.ts +13 -0
  229. package/es/hooks/components/index.js +36 -0
  230. package/es/hooks/components/index.js.map +1 -0
  231. package/es/hooks/config.d.ts +41 -0
  232. package/es/hooks/config.js +35 -0
  233. package/es/hooks/config.js.map +1 -0
  234. package/es/hooks/contributions/default.d.ts +19 -0
  235. package/es/hooks/contributions/default.js +41 -0
  236. package/es/hooks/contributions/default.js.map +1 -0
  237. package/es/hooks/contributions/graph.d.ts +19 -0
  238. package/es/hooks/contributions/graph.js +96 -0
  239. package/es/hooks/contributions/graph.js.map +1 -0
  240. package/es/hooks/hook-registry.d.ts +27 -0
  241. package/es/hooks/hook-registry.js +51 -0
  242. package/es/hooks/hook-registry.js.map +1 -0
  243. package/es/hooks/index.d.ts +4 -0
  244. package/es/hooks/index.js +9 -0
  245. package/es/hooks/index.js.map +1 -0
  246. package/es/hooks/interface.d.ts +62 -0
  247. package/es/hooks/interface.js +19 -0
  248. package/es/hooks/interface.js.map +1 -0
  249. package/es/hooks/module.d.ts +8 -0
  250. package/es/hooks/module.js +26 -0
  251. package/es/hooks/module.js.map +1 -0
  252. package/es/index.d.ts +85 -0
  253. package/es/index.js +97 -0
  254. package/es/index.js.map +1 -0
  255. package/es/interface.d.ts +161 -0
  256. package/es/interface.js +21 -0
  257. package/es/interface.js.map +1 -0
  258. package/es/keybinding/components/index.d.ts +13 -0
  259. package/es/keybinding/components/index.js +36 -0
  260. package/es/keybinding/components/index.js.map +1 -0
  261. package/es/keybinding/config.d.ts +23 -0
  262. package/es/keybinding/config.js +36 -0
  263. package/es/keybinding/config.js.map +1 -0
  264. package/es/keybinding/index.d.ts +4 -0
  265. package/es/keybinding/index.js +5 -0
  266. package/es/keybinding/index.js.map +1 -0
  267. package/es/keybinding/interface.d.ts +52 -0
  268. package/es/keybinding/interface.js +6 -0
  269. package/es/keybinding/interface.js.map +1 -0
  270. package/es/keybinding/keybinding-registry.d.ts +52 -0
  271. package/es/keybinding/keybinding-registry.js +129 -0
  272. package/es/keybinding/keybinding-registry.js.map +1 -0
  273. package/es/keybinding/module.d.ts +8 -0
  274. package/es/keybinding/module.js +33 -0
  275. package/es/keybinding/module.js.map +1 -0
  276. package/es/menu/components/index.d.ts +4 -0
  277. package/es/menu/components/index.js +22 -0
  278. package/es/menu/components/index.js.map +1 -0
  279. package/es/menu/index.d.ts +3 -0
  280. package/es/menu/index.js +10 -0
  281. package/es/menu/index.js.map +1 -0
  282. package/es/menu/interface.d.ts +114 -0
  283. package/es/menu/interface.js +18 -0
  284. package/es/menu/interface.js.map +1 -0
  285. package/es/menu/menu-registry.d.ts +32 -0
  286. package/es/menu/menu-registry.js +65 -0
  287. package/es/menu/menu-registry.js.map +1 -0
  288. package/es/menu/module.d.ts +3 -0
  289. package/es/menu/module.js +17 -0
  290. package/es/menu/module.js.map +1 -0
  291. package/es/model-service/components/index.d.ts +12 -0
  292. package/es/model-service/components/index.js +40 -0
  293. package/es/model-service/components/index.js.map +1 -0
  294. package/es/model-service/config.d.ts +20 -0
  295. package/es/model-service/config.js +36 -0
  296. package/es/model-service/config.js.map +1 -0
  297. package/es/model-service/constant.d.ts +174 -0
  298. package/es/model-service/constant.js +162 -0
  299. package/es/model-service/constant.js.map +1 -0
  300. package/es/model-service/contributions/command-model.d.ts +9 -0
  301. package/es/model-service/contributions/command-model.js +48 -0
  302. package/es/model-service/contributions/command-model.js.map +1 -0
  303. package/es/model-service/contributions/graph-model.d.ts +12 -0
  304. package/es/model-service/contributions/graph-model.js +250 -0
  305. package/es/model-service/contributions/graph-model.js.map +1 -0
  306. package/es/model-service/index.d.ts +6 -0
  307. package/es/model-service/index.js +7 -0
  308. package/es/model-service/index.js.map +1 -0
  309. package/es/model-service/interface.d.ts +66 -0
  310. package/es/model-service/interface.js +11 -0
  311. package/es/model-service/interface.js.map +1 -0
  312. package/es/model-service/model-registry.d.ts +49 -0
  313. package/es/model-service/model-registry.js +117 -0
  314. package/es/model-service/model-registry.js.map +1 -0
  315. package/es/model-service/module.d.ts +9 -0
  316. package/es/model-service/module.js +42 -0
  317. package/es/model-service/module.js.map +1 -0
  318. package/es/model-service/utils.d.ts +5 -0
  319. package/es/model-service/utils.js +52 -0
  320. package/es/model-service/utils.js.map +1 -0
  321. package/es/style/components.css +108 -0
  322. package/es/style/components.less +1 -0
  323. package/es/style/index.css +0 -0
  324. package/es/style/index.less +1 -0
  325. package/es/style/themes/default.css +0 -0
  326. package/es/style/themes/default.less +2 -0
  327. package/es/style/themes/index.css +0 -0
  328. package/es/style/themes/index.less +1 -0
  329. package/es/toolbar/components/index.d.ts +4 -0
  330. package/es/toolbar/components/index.js +21 -0
  331. package/es/toolbar/components/index.js.map +1 -0
  332. package/es/toolbar/index.d.ts +3 -0
  333. package/es/toolbar/index.js +8 -0
  334. package/es/toolbar/index.js.map +1 -0
  335. package/es/toolbar/interface.d.ts +104 -0
  336. package/es/toolbar/interface.js +8 -0
  337. package/es/toolbar/interface.js.map +1 -0
  338. package/es/toolbar/module.d.ts +8 -0
  339. package/es/toolbar/module.js +18 -0
  340. package/es/toolbar/module.js.map +1 -0
  341. package/es/toolbar/toolbar-registry.d.ts +80 -0
  342. package/es/toolbar/toolbar-registry.js +127 -0
  343. package/es/toolbar/toolbar-registry.js.map +1 -0
  344. package/es/xflow-main/application-module.d.ts +8 -0
  345. package/es/xflow-main/application-module.js +46 -0
  346. package/es/xflow-main/application-module.js.map +1 -0
  347. package/es/xflow-main/application.d.ts +77 -0
  348. package/es/xflow-main/application.js +178 -0
  349. package/es/xflow-main/application.js.map +1 -0
  350. package/es/xflow-main/components/app-context.d.ts +14 -0
  351. package/es/xflow-main/components/app-context.js +75 -0
  352. package/es/xflow-main/components/app-context.js.map +1 -0
  353. package/es/xflow-main/components/app-extension-module.d.ts +7 -0
  354. package/es/xflow-main/components/app-extension-module.js +32 -0
  355. package/es/xflow-main/components/app-extension-module.js.map +1 -0
  356. package/es/xflow-main/components/canvas.d.ts +11 -0
  357. package/es/xflow-main/components/canvas.js +62 -0
  358. package/es/xflow-main/components/canvas.js.map +1 -0
  359. package/es/xflow-main/components/extension-context.d.ts +5 -0
  360. package/es/xflow-main/components/extension-context.js +9 -0
  361. package/es/xflow-main/components/extension-context.js.map +1 -0
  362. package/es/xflow-main/components/extension-registry.d.ts +22 -0
  363. package/es/xflow-main/components/extension-registry.js +61 -0
  364. package/es/xflow-main/components/extension-registry.js.map +1 -0
  365. package/es/xflow-main/components/global-config-context.d.ts +3 -0
  366. package/es/xflow-main/components/global-config-context.js +31 -0
  367. package/es/xflow-main/components/global-config-context.js.map +1 -0
  368. package/es/xflow-main/components/index.d.ts +58 -0
  369. package/es/xflow-main/components/index.js +116 -0
  370. package/es/xflow-main/components/index.js.map +1 -0
  371. package/es/xflow-main/graph/config.d.ts +102 -0
  372. package/es/xflow-main/graph/config.js +233 -0
  373. package/es/xflow-main/graph/config.js.map +1 -0
  374. package/es/xflow-main/graph/graph-provider.d.ts +47 -0
  375. package/es/xflow-main/graph/graph-provider.js +196 -0
  376. package/es/xflow-main/graph/graph-provider.js.map +1 -0
  377. package/es/xflow-main/graph/index.d.ts +4 -0
  378. package/es/xflow-main/graph/index.js +5 -0
  379. package/es/xflow-main/graph/index.js.map +1 -0
  380. package/es/xflow-main/graph/module.d.ts +4 -0
  381. package/es/xflow-main/graph/module.js +16 -0
  382. package/es/xflow-main/graph/module.js.map +1 -0
  383. package/es/xflow-main/graph/react-group-node/index.css +44 -0
  384. package/es/xflow-main/graph/react-group-node/index.d.ts +2 -0
  385. package/es/xflow-main/graph/react-group-node/index.js +32 -0
  386. package/es/xflow-main/graph/react-group-node/index.js.map +1 -0
  387. package/es/xflow-main/graph/react-group-node/index.less +50 -0
  388. package/es/xflow-main/graph/react-node/index.css +42 -0
  389. package/es/xflow-main/graph/react-node/index.d.ts +20 -0
  390. package/es/xflow-main/graph/react-node/index.js +50 -0
  391. package/es/xflow-main/graph/react-node/index.js.map +1 -0
  392. package/es/xflow-main/graph/react-node/index.less +49 -0
  393. package/es/xflow-main/index.d.ts +19 -0
  394. package/es/xflow-main/index.js +26 -0
  395. package/es/xflow-main/index.js.map +1 -0
  396. package/es/xflow-main/interface.d.ts +33 -0
  397. package/es/xflow-main/interface.js +3 -0
  398. package/es/xflow-main/interface.js.map +1 -0
  399. package/es/xflow-main/style/index.css +108 -0
  400. package/es/xflow-main/style/index.less +31 -0
  401. package/lib/antd-icons/index.d.ts +20 -0
  402. package/lib/antd-icons/index.js +34 -0
  403. package/lib/antd-icons/index.js.map +1 -0
  404. package/lib/command/__test__/graph-command.spec.d.ts +1 -0
  405. package/lib/command/__test__/graph-command.spec.js +136 -0
  406. package/lib/command/__test__/graph-command.spec.js.map +1 -0
  407. package/lib/command/graph-command.d.ts +177 -0
  408. package/lib/command/graph-command.js +390 -0
  409. package/lib/command/graph-command.js.map +1 -0
  410. package/lib/command/index.d.ts +7 -0
  411. package/lib/command/index.js +15 -0
  412. package/lib/command/index.js.map +1 -0
  413. package/lib/command/interface.d.ts +221 -0
  414. package/lib/command/interface.js +26 -0
  415. package/lib/command/interface.js.map +1 -0
  416. package/lib/command/module.d.ts +2 -0
  417. package/lib/command/module.js +18 -0
  418. package/lib/command/module.js.map +1 -0
  419. package/lib/command-contributions/cmd-context.d.ts +76 -0
  420. package/lib/command-contributions/cmd-context.js +160 -0
  421. package/lib/command-contributions/cmd-context.js.map +1 -0
  422. package/lib/command-contributions/command-contribution.d.ts +23 -0
  423. package/lib/command-contributions/command-contribution.js +205 -0
  424. package/lib/command-contributions/command-contribution.js.map +1 -0
  425. package/lib/command-contributions/components/context.d.ts +11 -0
  426. package/lib/command-contributions/components/context.js +95 -0
  427. package/lib/command-contributions/components/context.js.map +1 -0
  428. package/lib/command-contributions/components/index.d.ts +11 -0
  429. package/lib/command-contributions/components/index.js +40 -0
  430. package/lib/command-contributions/components/index.js.map +1 -0
  431. package/lib/command-contributions/config.d.ts +39 -0
  432. package/lib/command-contributions/config.js +79 -0
  433. package/lib/command-contributions/config.js.map +1 -0
  434. package/lib/command-contributions/constant.d.ts +98 -0
  435. package/lib/command-contributions/constant.js +275 -0
  436. package/lib/command-contributions/constant.js.map +1 -0
  437. package/lib/command-contributions/edge/edge-add.d.ts +83 -0
  438. package/lib/command-contributions/edge/edge-add.js +179 -0
  439. package/lib/command-contributions/edge/edge-add.js.map +1 -0
  440. package/lib/command-contributions/edge/edge-back.d.ts +27 -0
  441. package/lib/command-contributions/edge/edge-back.js +107 -0
  442. package/lib/command-contributions/edge/edge-back.js.map +1 -0
  443. package/lib/command-contributions/edge/edge-del.d.ts +67 -0
  444. package/lib/command-contributions/edge/edge-del.js +170 -0
  445. package/lib/command-contributions/edge/edge-del.js.map +1 -0
  446. package/lib/command-contributions/edge/edge-front.d.ts +27 -0
  447. package/lib/command-contributions/edge/edge-front.js +107 -0
  448. package/lib/command-contributions/edge/edge-front.js.map +1 -0
  449. package/lib/command-contributions/edge/edge-highlight.d.ts +32 -0
  450. package/lib/command-contributions/edge/edge-highlight.js +121 -0
  451. package/lib/command-contributions/edge/edge-highlight.js.map +1 -0
  452. package/lib/command-contributions/edge/edge-update.d.ts +46 -0
  453. package/lib/command-contributions/edge/edge-update.js +148 -0
  454. package/lib/command-contributions/edge/edge-update.js.map +1 -0
  455. package/lib/command-contributions/edge/index.d.ts +50 -0
  456. package/lib/command-contributions/edge/index.js +23 -0
  457. package/lib/command-contributions/edge/index.js.map +1 -0
  458. package/lib/command-contributions/graph/graph-add-tool.d.ts +49 -0
  459. package/lib/command-contributions/graph/graph-add-tool.js +111 -0
  460. package/lib/command-contributions/graph/graph-add-tool.js.map +1 -0
  461. package/lib/command-contributions/graph/graph-cmd-redo.d.ts +40 -0
  462. package/lib/command-contributions/graph/graph-cmd-redo.js +104 -0
  463. package/lib/command-contributions/graph/graph-cmd-redo.js.map +1 -0
  464. package/lib/command-contributions/graph/graph-cmd-undo.d.ts +36 -0
  465. package/lib/command-contributions/graph/graph-cmd-undo.js +104 -0
  466. package/lib/command-contributions/graph/graph-cmd-undo.js.map +1 -0
  467. package/lib/command-contributions/graph/graph-copy.d.ts +39 -0
  468. package/lib/command-contributions/graph/graph-copy.js +137 -0
  469. package/lib/command-contributions/graph/graph-copy.js.map +1 -0
  470. package/lib/command-contributions/graph/graph-del-tool.d.ts +47 -0
  471. package/lib/command-contributions/graph/graph-del-tool.js +101 -0
  472. package/lib/command-contributions/graph/graph-del-tool.js.map +1 -0
  473. package/lib/command-contributions/graph/graph-fulllscreen.d.ts +37 -0
  474. package/lib/command-contributions/graph/graph-fulllscreen.js +116 -0
  475. package/lib/command-contributions/graph/graph-fulllscreen.js.map +1 -0
  476. package/lib/command-contributions/graph/graph-history-redo.d.ts +33 -0
  477. package/lib/command-contributions/graph/graph-history-redo.js +106 -0
  478. package/lib/command-contributions/graph/graph-history-redo.js.map +1 -0
  479. package/lib/command-contributions/graph/graph-history-reset.d.ts +33 -0
  480. package/lib/command-contributions/graph/graph-history-reset.js +91 -0
  481. package/lib/command-contributions/graph/graph-history-reset.js.map +1 -0
  482. package/lib/command-contributions/graph/graph-history-toggle.d.ts +35 -0
  483. package/lib/command-contributions/graph/graph-history-toggle.js +112 -0
  484. package/lib/command-contributions/graph/graph-history-toggle.js.map +1 -0
  485. package/lib/command-contributions/graph/graph-history-undo.d.ts +35 -0
  486. package/lib/command-contributions/graph/graph-history-undo.js +106 -0
  487. package/lib/command-contributions/graph/graph-history-undo.js.map +1 -0
  488. package/lib/command-contributions/graph/graph-layout.d.ts +43 -0
  489. package/lib/command-contributions/graph/graph-layout.js +104 -0
  490. package/lib/command-contributions/graph/graph-layout.js.map +1 -0
  491. package/lib/command-contributions/graph/graph-load-data.d.ts +37 -0
  492. package/lib/command-contributions/graph/graph-load-data.js +104 -0
  493. package/lib/command-contributions/graph/graph-load-data.js.map +1 -0
  494. package/lib/command-contributions/graph/graph-meta.d.ts +47 -0
  495. package/lib/command-contributions/graph/graph-meta.js +116 -0
  496. package/lib/command-contributions/graph/graph-meta.js.map +1 -0
  497. package/lib/command-contributions/graph/graph-paste.d.ts +52 -0
  498. package/lib/command-contributions/graph/graph-paste.js +196 -0
  499. package/lib/command-contributions/graph/graph-paste.js.map +1 -0
  500. package/lib/command-contributions/graph/graph-render.d.ts +53 -0
  501. package/lib/command-contributions/graph/graph-render.js +360 -0
  502. package/lib/command-contributions/graph/graph-render.js.map +1 -0
  503. package/lib/command-contributions/graph/graph-resize.d.ts +40 -0
  504. package/lib/command-contributions/graph/graph-resize.js +110 -0
  505. package/lib/command-contributions/graph/graph-resize.js.map +1 -0
  506. package/lib/command-contributions/graph/graph-save-data.d.ts +43 -0
  507. package/lib/command-contributions/graph/graph-save-data.js +141 -0
  508. package/lib/command-contributions/graph/graph-save-data.js.map +1 -0
  509. package/lib/command-contributions/graph/graph-toggle-multi-select.d.ts +38 -0
  510. package/lib/command-contributions/graph/graph-toggle-multi-select.js +133 -0
  511. package/lib/command-contributions/graph/graph-toggle-multi-select.js.map +1 -0
  512. package/lib/command-contributions/graph/graph-zoom.d.ts +51 -0
  513. package/lib/command-contributions/graph/graph-zoom.js +122 -0
  514. package/lib/command-contributions/graph/graph-zoom.js.map +1 -0
  515. package/lib/command-contributions/graph/index.d.ts +114 -0
  516. package/lib/command-contributions/graph/index.js +87 -0
  517. package/lib/command-contributions/graph/index.js.map +1 -0
  518. package/lib/command-contributions/group/group-add.d.ts +56 -0
  519. package/lib/command-contributions/group/group-add.js +156 -0
  520. package/lib/command-contributions/group/group-add.js.map +1 -0
  521. package/lib/command-contributions/group/group-del.d.ts +43 -0
  522. package/lib/command-contributions/group/group-del.js +146 -0
  523. package/lib/command-contributions/group/group-del.js.map +1 -0
  524. package/lib/command-contributions/group/group-init.d.ts +40 -0
  525. package/lib/command-contributions/group/group-init.js +139 -0
  526. package/lib/command-contributions/group/group-init.js.map +1 -0
  527. package/lib/command-contributions/group/group-toggle-collapse.d.ts +47 -0
  528. package/lib/command-contributions/group/group-toggle-collapse.js +161 -0
  529. package/lib/command-contributions/group/group-toggle-collapse.js.map +1 -0
  530. package/lib/command-contributions/group/index.d.ts +39 -0
  531. package/lib/command-contributions/group/index.js +18 -0
  532. package/lib/command-contributions/group/index.js.map +1 -0
  533. package/lib/command-contributions/index.d.ts +10 -0
  534. package/lib/command-contributions/index.js +25 -0
  535. package/lib/command-contributions/index.js.map +1 -0
  536. package/lib/command-contributions/interface.d.ts +17 -0
  537. package/lib/command-contributions/interface.js +3 -0
  538. package/lib/command-contributions/interface.js.map +1 -0
  539. package/lib/command-contributions/mapping-service.d.ts +20 -0
  540. package/lib/command-contributions/mapping-service.js +96 -0
  541. package/lib/command-contributions/mapping-service.js.map +1 -0
  542. package/lib/command-contributions/models/index.d.ts +24 -0
  543. package/lib/command-contributions/models/index.js +13 -0
  544. package/lib/command-contributions/models/index.js.map +1 -0
  545. package/lib/command-contributions/models/update-model.d.ts +45 -0
  546. package/lib/command-contributions/models/update-model.js +110 -0
  547. package/lib/command-contributions/models/update-model.js.map +1 -0
  548. package/lib/command-contributions/module.d.ts +5 -0
  549. package/lib/command-contributions/module.js +49 -0
  550. package/lib/command-contributions/module.js.map +1 -0
  551. package/lib/command-contributions/node/index.d.ts +70 -0
  552. package/lib/command-contributions/node/index.js +42 -0
  553. package/lib/command-contributions/node/index.js.map +1 -0
  554. package/lib/command-contributions/node/node-add.d.ts +58 -0
  555. package/lib/command-contributions/node/node-add.js +192 -0
  556. package/lib/command-contributions/node/node-add.js.map +1 -0
  557. package/lib/command-contributions/node/node-back.d.ts +32 -0
  558. package/lib/command-contributions/node/node-back.js +109 -0
  559. package/lib/command-contributions/node/node-back.js.map +1 -0
  560. package/lib/command-contributions/node/node-center.d.ts +30 -0
  561. package/lib/command-contributions/node/node-center.js +91 -0
  562. package/lib/command-contributions/node/node-center.js.map +1 -0
  563. package/lib/command-contributions/node/node-del.d.ts +51 -0
  564. package/lib/command-contributions/node/node-del.js +145 -0
  565. package/lib/command-contributions/node/node-del.js.map +1 -0
  566. package/lib/command-contributions/node/node-front.d.ts +27 -0
  567. package/lib/command-contributions/node/node-front.js +108 -0
  568. package/lib/command-contributions/node/node-front.js.map +1 -0
  569. package/lib/command-contributions/node/node-highlight.d.ts +39 -0
  570. package/lib/command-contributions/node/node-highlight.js +116 -0
  571. package/lib/command-contributions/node/node-highlight.js.map +1 -0
  572. package/lib/command-contributions/node/node-move.d.ts +51 -0
  573. package/lib/command-contributions/node/node-move.js +130 -0
  574. package/lib/command-contributions/node/node-move.js.map +1 -0
  575. package/lib/command-contributions/node/node-select.d.ts +30 -0
  576. package/lib/command-contributions/node/node-select.js +104 -0
  577. package/lib/command-contributions/node/node-select.js.map +1 -0
  578. package/lib/command-contributions/node/node-update-port.d.ts +54 -0
  579. package/lib/command-contributions/node/node-update-port.js +147 -0
  580. package/lib/command-contributions/node/node-update-port.js.map +1 -0
  581. package/lib/command-contributions/node/node-update.d.ts +53 -0
  582. package/lib/command-contributions/node/node-update.js +159 -0
  583. package/lib/command-contributions/node/node-update.js.map +1 -0
  584. package/lib/common/deferred.d.ts +8 -0
  585. package/lib/common/deferred.js +31 -0
  586. package/lib/common/deferred.js.map +1 -0
  587. package/lib/common/delay.d.ts +1 -0
  588. package/lib/common/delay.js +9 -0
  589. package/lib/common/delay.js.map +1 -0
  590. package/lib/common/disposable.d.ts +28 -0
  591. package/lib/common/disposable.js +116 -0
  592. package/lib/common/disposable.js.map +1 -0
  593. package/lib/common/event-helper.d.ts +7 -0
  594. package/lib/common/event-helper.js +12 -0
  595. package/lib/common/event-helper.js.map +1 -0
  596. package/lib/common/graph-utils.d.ts +22 -0
  597. package/lib/common/graph-utils.js +41 -0
  598. package/lib/common/graph-utils.js.map +1 -0
  599. package/lib/common/position.d.ts +10 -0
  600. package/lib/common/position.js +18 -0
  601. package/lib/common/position.js.map +1 -0
  602. package/lib/common/rx-model-hook.d.ts +16 -0
  603. package/lib/common/rx-model-hook.js +108 -0
  604. package/lib/common/rx-model-hook.js.map +1 -0
  605. package/lib/common/rx-model.d.ts +66 -0
  606. package/lib/common/rx-model.js +112 -0
  607. package/lib/common/rx-model.js.map +1 -0
  608. package/lib/common/safe-json.d.ts +1 -0
  609. package/lib/common/safe-json.js +17 -0
  610. package/lib/common/safe-json.js.map +1 -0
  611. package/lib/common/types.d.ts +15 -0
  612. package/lib/common/types.js +3 -0
  613. package/lib/common/types.js.map +1 -0
  614. package/lib/common/utils.d.ts +11 -0
  615. package/lib/common/utils.js +58 -0
  616. package/lib/common/utils.js.map +1 -0
  617. package/lib/common/uuid.d.ts +2 -0
  618. package/lib/common/uuid.js +12 -0
  619. package/lib/common/uuid.js.map +1 -0
  620. package/lib/constants.d.ts +31 -0
  621. package/lib/constants.js +29 -0
  622. package/lib/constants.js.map +1 -0
  623. package/lib/hooks/components/index.d.ts +13 -0
  624. package/lib/hooks/components/index.js +44 -0
  625. package/lib/hooks/components/index.js.map +1 -0
  626. package/lib/hooks/config.d.ts +41 -0
  627. package/lib/hooks/config.js +45 -0
  628. package/lib/hooks/config.js.map +1 -0
  629. package/lib/hooks/contributions/default.d.ts +19 -0
  630. package/lib/hooks/contributions/default.js +60 -0
  631. package/lib/hooks/contributions/default.js.map +1 -0
  632. package/lib/hooks/contributions/graph.d.ts +19 -0
  633. package/lib/hooks/contributions/graph.js +133 -0
  634. package/lib/hooks/contributions/graph.js.map +1 -0
  635. package/lib/hooks/hook-registry.d.ts +27 -0
  636. package/lib/hooks/hook-registry.js +62 -0
  637. package/lib/hooks/hook-registry.js.map +1 -0
  638. package/lib/hooks/index.d.ts +4 -0
  639. package/lib/hooks/index.js +12 -0
  640. package/lib/hooks/index.js.map +1 -0
  641. package/lib/hooks/interface.d.ts +62 -0
  642. package/lib/hooks/interface.js +23 -0
  643. package/lib/hooks/interface.js.map +1 -0
  644. package/lib/hooks/module.d.ts +8 -0
  645. package/lib/hooks/module.js +32 -0
  646. package/lib/hooks/module.js.map +1 -0
  647. package/lib/index.d.ts +85 -0
  648. package/lib/index.js +155 -0
  649. package/lib/index.js.map +1 -0
  650. package/lib/interface.d.ts +161 -0
  651. package/lib/interface.js +24 -0
  652. package/lib/interface.js.map +1 -0
  653. package/lib/keybinding/components/index.d.ts +13 -0
  654. package/lib/keybinding/components/index.js +44 -0
  655. package/lib/keybinding/components/index.js.map +1 -0
  656. package/lib/keybinding/config.d.ts +23 -0
  657. package/lib/keybinding/config.js +48 -0
  658. package/lib/keybinding/config.js.map +1 -0
  659. package/lib/keybinding/index.d.ts +4 -0
  660. package/lib/keybinding/index.js +11 -0
  661. package/lib/keybinding/index.js.map +1 -0
  662. package/lib/keybinding/interface.d.ts +52 -0
  663. package/lib/keybinding/interface.js +9 -0
  664. package/lib/keybinding/interface.js.map +1 -0
  665. package/lib/keybinding/keybinding-registry.d.ts +52 -0
  666. package/lib/keybinding/keybinding-registry.js +166 -0
  667. package/lib/keybinding/keybinding-registry.js.map +1 -0
  668. package/lib/keybinding/module.d.ts +8 -0
  669. package/lib/keybinding/module.js +40 -0
  670. package/lib/keybinding/module.js.map +1 -0
  671. package/lib/menu/components/index.d.ts +4 -0
  672. package/lib/menu/components/index.js +28 -0
  673. package/lib/menu/components/index.js.map +1 -0
  674. package/lib/menu/index.d.ts +3 -0
  675. package/lib/menu/index.js +10 -0
  676. package/lib/menu/index.js.map +1 -0
  677. package/lib/menu/interface.d.ts +114 -0
  678. package/lib/menu/interface.js +21 -0
  679. package/lib/menu/interface.js.map +1 -0
  680. package/lib/menu/menu-registry.d.ts +32 -0
  681. package/lib/menu/menu-registry.js +72 -0
  682. package/lib/menu/menu-registry.js.map +1 -0
  683. package/lib/menu/module.d.ts +3 -0
  684. package/lib/menu/module.js +21 -0
  685. package/lib/menu/module.js.map +1 -0
  686. package/lib/model-service/components/index.d.ts +12 -0
  687. package/lib/model-service/components/index.js +48 -0
  688. package/lib/model-service/components/index.js.map +1 -0
  689. package/lib/model-service/config.d.ts +20 -0
  690. package/lib/model-service/config.js +48 -0
  691. package/lib/model-service/config.js.map +1 -0
  692. package/lib/model-service/constant.d.ts +174 -0
  693. package/lib/model-service/constant.js +186 -0
  694. package/lib/model-service/constant.js.map +1 -0
  695. package/lib/model-service/contributions/command-model.d.ts +9 -0
  696. package/lib/model-service/contributions/command-model.js +63 -0
  697. package/lib/model-service/contributions/command-model.js.map +1 -0
  698. package/lib/model-service/contributions/graph-model.d.ts +12 -0
  699. package/lib/model-service/contributions/graph-model.js +370 -0
  700. package/lib/model-service/contributions/graph-model.js.map +1 -0
  701. package/lib/model-service/index.d.ts +6 -0
  702. package/lib/model-service/index.js +17 -0
  703. package/lib/model-service/index.js.map +1 -0
  704. package/lib/model-service/interface.d.ts +66 -0
  705. package/lib/model-service/interface.js +14 -0
  706. package/lib/model-service/interface.js.map +1 -0
  707. package/lib/model-service/model-registry.d.ts +49 -0
  708. package/lib/model-service/model-registry.js +133 -0
  709. package/lib/model-service/model-registry.js.map +1 -0
  710. package/lib/model-service/module.d.ts +9 -0
  711. package/lib/model-service/module.js +49 -0
  712. package/lib/model-service/module.js.map +1 -0
  713. package/lib/model-service/utils.d.ts +5 -0
  714. package/lib/model-service/utils.js +58 -0
  715. package/lib/model-service/utils.js.map +1 -0
  716. package/lib/style/components.css +108 -0
  717. package/lib/style/components.less +1 -0
  718. package/lib/style/index.css +0 -0
  719. package/lib/style/index.less +1 -0
  720. package/lib/style/themes/default.css +0 -0
  721. package/lib/style/themes/default.less +2 -0
  722. package/lib/style/themes/index.css +0 -0
  723. package/lib/style/themes/index.less +1 -0
  724. package/lib/toolbar/components/index.d.ts +4 -0
  725. package/lib/toolbar/components/index.js +27 -0
  726. package/lib/toolbar/components/index.js.map +1 -0
  727. package/lib/toolbar/index.d.ts +3 -0
  728. package/lib/toolbar/index.js +9 -0
  729. package/lib/toolbar/index.js.map +1 -0
  730. package/lib/toolbar/interface.d.ts +104 -0
  731. package/lib/toolbar/interface.js +11 -0
  732. package/lib/toolbar/interface.js.map +1 -0
  733. package/lib/toolbar/module.d.ts +8 -0
  734. package/lib/toolbar/module.js +23 -0
  735. package/lib/toolbar/module.js.map +1 -0
  736. package/lib/toolbar/toolbar-registry.d.ts +80 -0
  737. package/lib/toolbar/toolbar-registry.js +134 -0
  738. package/lib/toolbar/toolbar-registry.js.map +1 -0
  739. package/lib/xflow-main/application-module.d.ts +8 -0
  740. package/lib/xflow-main/application-module.js +50 -0
  741. package/lib/xflow-main/application-module.js.map +1 -0
  742. package/lib/xflow-main/application.d.ts +77 -0
  743. package/lib/xflow-main/application.js +296 -0
  744. package/lib/xflow-main/application.js.map +1 -0
  745. package/lib/xflow-main/components/app-context.d.ts +14 -0
  746. package/lib/xflow-main/components/app-context.js +87 -0
  747. package/lib/xflow-main/components/app-context.js.map +1 -0
  748. package/lib/xflow-main/components/app-extension-module.d.ts +7 -0
  749. package/lib/xflow-main/components/app-extension-module.js +39 -0
  750. package/lib/xflow-main/components/app-extension-module.js.map +1 -0
  751. package/lib/xflow-main/components/canvas.d.ts +11 -0
  752. package/lib/xflow-main/components/canvas.js +69 -0
  753. package/lib/xflow-main/components/canvas.js.map +1 -0
  754. package/lib/xflow-main/components/extension-context.d.ts +5 -0
  755. package/lib/xflow-main/components/extension-context.js +14 -0
  756. package/lib/xflow-main/components/extension-context.js.map +1 -0
  757. package/lib/xflow-main/components/extension-registry.d.ts +22 -0
  758. package/lib/xflow-main/components/extension-registry.js +69 -0
  759. package/lib/xflow-main/components/extension-registry.js.map +1 -0
  760. package/lib/xflow-main/components/global-config-context.d.ts +3 -0
  761. package/lib/xflow-main/components/global-config-context.js +39 -0
  762. package/lib/xflow-main/components/global-config-context.js.map +1 -0
  763. package/lib/xflow-main/components/index.d.ts +58 -0
  764. package/lib/xflow-main/components/index.js +153 -0
  765. package/lib/xflow-main/components/index.js.map +1 -0
  766. package/lib/xflow-main/graph/config.d.ts +102 -0
  767. package/lib/xflow-main/graph/config.js +266 -0
  768. package/lib/xflow-main/graph/config.js.map +1 -0
  769. package/lib/xflow-main/graph/graph-provider.d.ts +47 -0
  770. package/lib/xflow-main/graph/graph-provider.js +259 -0
  771. package/lib/xflow-main/graph/graph-provider.js.map +1 -0
  772. package/lib/xflow-main/graph/index.d.ts +4 -0
  773. package/lib/xflow-main/graph/index.js +11 -0
  774. package/lib/xflow-main/graph/index.js.map +1 -0
  775. package/lib/xflow-main/graph/module.d.ts +4 -0
  776. package/lib/xflow-main/graph/module.js +20 -0
  777. package/lib/xflow-main/graph/module.js.map +1 -0
  778. package/lib/xflow-main/graph/react-group-node/index.css +44 -0
  779. package/lib/xflow-main/graph/react-group-node/index.d.ts +2 -0
  780. package/lib/xflow-main/graph/react-group-node/index.js +37 -0
  781. package/lib/xflow-main/graph/react-group-node/index.js.map +1 -0
  782. package/lib/xflow-main/graph/react-group-node/index.less +50 -0
  783. package/lib/xflow-main/graph/react-node/index.css +42 -0
  784. package/lib/xflow-main/graph/react-node/index.d.ts +20 -0
  785. package/lib/xflow-main/graph/react-node/index.js +56 -0
  786. package/lib/xflow-main/graph/react-node/index.js.map +1 -0
  787. package/lib/xflow-main/graph/react-node/index.less +49 -0
  788. package/lib/xflow-main/index.d.ts +19 -0
  789. package/lib/xflow-main/index.js +35 -0
  790. package/lib/xflow-main/index.js.map +1 -0
  791. package/lib/xflow-main/interface.d.ts +33 -0
  792. package/lib/xflow-main/interface.js +6 -0
  793. package/lib/xflow-main/interface.js.map +1 -0
  794. package/lib/xflow-main/style/index.css +108 -0
  795. package/lib/xflow-main/style/index.less +31 -0
  796. package/package.json +119 -0
@@ -0,0 +1,67 @@
1
+ import type { NsGraph } from '../../interface';
2
+ import type { IContext, IArgsBase } from '../../command/interface';
3
+ import { ICommandHandler } from '../../command/interface';
4
+ import type { IHooks } from '../../hooks/interface';
5
+ import type { HookHub } from '@sunspirytus/xflow-hook';
6
+ import type { Cell, Edge, Model } from '@antv/x6';
7
+ export type ICommand = ICommandHandler<NsDelEdge.IArgs, NsDelEdge.IResult, NsDelEdge.ICmdHooks>;
8
+ export declare namespace NsDelEdge {
9
+ /** Command: 用于注册named factory */
10
+ const command: import("../../command/interface").IGraphCommand;
11
+ /** hookName */
12
+ const hookKey = "delEdge";
13
+ interface IDeleteEdgeService {
14
+ (args: IArgs): Promise<boolean>;
15
+ }
16
+ /** hook 参数类型 */
17
+ interface IArgs extends IArgsBase {
18
+ /** EdgeCell */
19
+ x6Edge?: Edge<Edge.Properties>;
20
+ /** Edge元数据 */
21
+ edgeConfig?: NsGraph.IEdgeConfig;
22
+ /** X6 Model Options:https://x6.antv.vision/zh/docs/api/graph/model/#addnode */
23
+ options?: Model.RemoveOptions;
24
+ /** Edge 删除服务 */
25
+ deleteEdgeService?: IDeleteEdgeService;
26
+ }
27
+ /** hook handler 返回类型 */
28
+ interface IResult {
29
+ err: any;
30
+ edgeConfig?: {
31
+ source: string | Edge.TerminalData;
32
+ target: string | Edge.TerminalData;
33
+ sourcePortId: string;
34
+ targetPortId: string;
35
+ };
36
+ targetCell?: Cell;
37
+ sourceCell?: Cell;
38
+ sourcePortId?: string;
39
+ targetPortId?: string;
40
+ }
41
+ /** api service 类型 */
42
+ /** hooks 类型 */
43
+ interface ICmdHooks extends IHooks {
44
+ delEdge: HookHub<IArgs, IResult>;
45
+ }
46
+ enum ErrEnum {
47
+ EDGE_NOT_EXIST = "edge is not exist",
48
+ EDGE_INVALID_CELL = "this is not a valid cell",
49
+ X6_DELETE_FAILED = "x6 throw err when call delete edge",
50
+ SERVICE_REJECT = "service reject to delete"
51
+ }
52
+ }
53
+ export declare class DelEdgeCommand implements ICommand {
54
+ /** api */
55
+ contextProvider: ICommand['contextProvider'];
56
+ /** cmd context 引用 */
57
+ ctx: IContext<NsDelEdge.IArgs, NsDelEdge.IResult, NsDelEdge.ICmdHooks>;
58
+ init(): void;
59
+ /** 执行Cmd */
60
+ execute: () => Promise<this>;
61
+ private findEdgeById;
62
+ /** undo cmd */
63
+ undo: () => Promise<this>;
64
+ /** redo cmd */
65
+ redo: () => Promise<this>;
66
+ isUndoable(): boolean;
67
+ }
@@ -0,0 +1,129 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { inject, injectable, postConstruct } from 'mana-syringe';
3
+ import { ICommandHandler, ICommandContextProvider } from '../../command/interface';
4
+ import { XFlowEdgeCommands } from '../constant';
5
+ import { Disposable } from '../../common/disposable';
6
+ export var NsDelEdge;
7
+ (function (NsDelEdge) {
8
+ /** Command: 用于注册named factory */
9
+ NsDelEdge.command = XFlowEdgeCommands.DEL_EDGE;
10
+ /** hookName */
11
+ NsDelEdge.hookKey = 'delEdge';
12
+ let ErrEnum;
13
+ (function (ErrEnum) {
14
+ ErrEnum["EDGE_NOT_EXIST"] = "edge is not exist";
15
+ ErrEnum["EDGE_INVALID_CELL"] = "this is not a valid cell";
16
+ ErrEnum["X6_DELETE_FAILED"] = "x6 throw err when call delete edge";
17
+ ErrEnum["SERVICE_REJECT"] = "service reject to delete";
18
+ })(ErrEnum = NsDelEdge.ErrEnum || (NsDelEdge.ErrEnum = {}));
19
+ })(NsDelEdge || (NsDelEdge = {}));
20
+ let DelEdgeCommand = class DelEdgeCommand {
21
+ constructor() {
22
+ /** 执行Cmd */
23
+ this.execute = () => __awaiter(this, void 0, void 0, function* () {
24
+ const { args, hooks: runtimeHook } = this.ctx.getArgs();
25
+ const hooks = this.ctx.getHooks();
26
+ const result = yield hooks.delEdge.call(
27
+ /** 执行 hooks pipeline处理args */
28
+ args,
29
+ /** 执行 callback */
30
+ (handlerArgs) => __awaiter(this, void 0, void 0, function* () {
31
+ const { edgeConfig, x6Edge, deleteEdgeService, commandService, options } = handlerArgs;
32
+ let edgeCell = x6Edge;
33
+ /** 没有edgeCell时查找cell */
34
+ if (!edgeCell) {
35
+ edgeCell = yield this.findEdgeById(edgeConfig);
36
+ if (!edgeCell) {
37
+ console.error(NsDelEdge.ErrEnum.EDGE_NOT_EXIST, edgeConfig);
38
+ return { err: NsDelEdge.ErrEnum.EDGE_NOT_EXIST };
39
+ }
40
+ }
41
+ const isEdge = edgeCell && edgeCell.isEdge();
42
+ if (!isEdge) {
43
+ console.error(NsDelEdge.ErrEnum.EDGE_NOT_EXIST, edgeCell);
44
+ return { err: NsDelEdge.ErrEnum.EDGE_NOT_EXIST };
45
+ }
46
+ if (deleteEdgeService) {
47
+ /** 需要请求接口 */
48
+ const canDelete = yield deleteEdgeService(handlerArgs);
49
+ if (!canDelete) {
50
+ return { err: NsDelEdge.ErrEnum.SERVICE_REJECT };
51
+ }
52
+ }
53
+ try {
54
+ const targetCell = edgeCell.getTargetCell();
55
+ const sourceCell = edgeCell.getSourceCell();
56
+ const sourcePortId = edgeCell.getSourcePortId();
57
+ const targetPortId = edgeCell.getTargetPortId();
58
+ const source = sourceCell ? sourceCell.id : sourceCell.source;
59
+ const target = targetCell ? targetCell.id : targetCell.target;
60
+ /** 执行remove */
61
+ edgeCell.remove(Object.assign(Object.assign({}, options), { isCommand: true }));
62
+ /** 创建 undo */
63
+ const undo = Disposable.create(() => {
64
+ commandService.executeCommand(XFlowEdgeCommands.ADD_EDGE.id, {
65
+ edgeConfig: { source, target, sourcePortId, targetPortId },
66
+ });
67
+ });
68
+ /** add undo */
69
+ this.ctx.addUndo(undo);
70
+ return {
71
+ err: null,
72
+ edgeConfig: { source, target, sourcePortId, targetPortId },
73
+ targetCell,
74
+ sourceCell,
75
+ sourcePortId,
76
+ targetPortId,
77
+ };
78
+ }
79
+ catch (error) {
80
+ console.error(NsDelEdge.ErrEnum.X6_DELETE_FAILED, error);
81
+ return { err: NsDelEdge.ErrEnum.X6_DELETE_FAILED };
82
+ }
83
+ }), runtimeHook);
84
+ this.ctx.setResult(result);
85
+ return this;
86
+ });
87
+ this.findEdgeById = (edge) => __awaiter(this, void 0, void 0, function* () {
88
+ const graph = yield this.ctx.getX6Graph();
89
+ const cell = graph.getCellById(edge.id);
90
+ return cell;
91
+ });
92
+ /** undo cmd */
93
+ this.undo = () => __awaiter(this, void 0, void 0, function* () {
94
+ this.ctx.undo();
95
+ return this;
96
+ });
97
+ /** redo cmd */
98
+ this.redo = () => __awaiter(this, void 0, void 0, function* () {
99
+ if (!this.isUndoable) {
100
+ yield this.execute();
101
+ }
102
+ return this;
103
+ });
104
+ }
105
+ init() {
106
+ this.ctx = this.contextProvider();
107
+ }
108
+ isUndoable() {
109
+ return this.ctx.isUndoable();
110
+ }
111
+ };
112
+ __decorate([
113
+ inject(ICommandContextProvider),
114
+ __metadata("design:type", Object)
115
+ ], DelEdgeCommand.prototype, "contextProvider", void 0);
116
+ __decorate([
117
+ postConstruct(),
118
+ __metadata("design:type", Function),
119
+ __metadata("design:paramtypes", []),
120
+ __metadata("design:returntype", void 0)
121
+ ], DelEdgeCommand.prototype, "init", null);
122
+ DelEdgeCommand = __decorate([
123
+ injectable({
124
+ token: { token: ICommandHandler, named: NsDelEdge.command.id },
125
+ })
126
+ /** 创建节点命令 */
127
+ ], DelEdgeCommand);
128
+ export { DelEdgeCommand };
129
+ //# sourceMappingURL=edge-del.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-del.js","sourceRoot":"","sources":["../../../src/command-contributions/edge/edge-del.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAGhE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAKlF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAIpD,MAAM,KAAW,SAAS,CA6CzB;AA7CD,WAAiB,SAAS;IACxB,iCAAiC;IACpB,iBAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAA;IACjD,eAAe;IACF,iBAAO,GAAG,SAAS,CAAA;IAmChC,IAAY,OAKX;IALD,WAAY,OAAO;QACjB,+CAAoC,CAAA;QACpC,yDAA8C,CAAA;QAC9C,kEAAuD,CAAA;QACvD,sDAA2C,CAAA;IAC7C,CAAC,EALW,OAAO,GAAP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,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE;KAC/D,CAAC;IACF,aAAa;GACA,cAAc,CA4G1B;SA5GY,cAAc"}
@@ -0,0 +1,27 @@
1
+ import type { HookHub } from '@sunspirytus/xflow-hook';
2
+ import type { IHooks } from '../../hooks/interface';
3
+ import type { IContext, IArgsBase } from '../../command/interface';
4
+ import { ICommandHandler } from '../../command/interface';
5
+ type ICommand = ICommandHandler<NsFrontEdge.IArgs, NsFrontEdge.IResult, NsFrontEdge.ICmdHooks>;
6
+ export declare namespace NsFrontEdge {
7
+ const command: import("../../command/interface").IGraphCommand;
8
+ const hookKey = "frontEdge";
9
+ interface IArgs extends IArgsBase {
10
+ edgeId: string;
11
+ }
12
+ interface IResult {
13
+ }
14
+ interface ICmdHooks extends IHooks {
15
+ frontEdge: HookHub<IArgs, IResult>;
16
+ }
17
+ }
18
+ export declare class FrontEdgeCommand implements ICommand {
19
+ contextProvider: ICommand['contextProvider'];
20
+ ctx: IContext<NsFrontEdge.IArgs, NsFrontEdge.IResult, NsFrontEdge.ICmdHooks>;
21
+ init(): void;
22
+ execute: () => Promise<this>;
23
+ undo: () => Promise<this>;
24
+ redo: () => Promise<this>;
25
+ isUndoable(): boolean;
26
+ }
27
+ export {};
@@ -0,0 +1,72 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { inject, injectable, postConstruct } from 'mana-syringe';
3
+ import { ICommandHandler, ICommandContextProvider } from '../../command/interface';
4
+ import { XFlowEdgeCommands } from '../constant';
5
+ import { Disposable } from '../../common/disposable';
6
+ export var NsFrontEdge;
7
+ (function (NsFrontEdge) {
8
+ NsFrontEdge.command = XFlowEdgeCommands.FRONT_EDGE;
9
+ NsFrontEdge.hookKey = 'frontEdge';
10
+ })(NsFrontEdge || (NsFrontEdge = {}));
11
+ let FrontEdgeCommand = class FrontEdgeCommand {
12
+ constructor() {
13
+ this.execute = () => __awaiter(this, void 0, void 0, function* () {
14
+ const { args, hooks: runtimeHook } = this.ctx.getArgs();
15
+ const hooks = this.ctx.getHooks();
16
+ const result = yield hooks.frontEdge.call(args, (handlerArgs) => __awaiter(this, void 0, void 0, function* () {
17
+ const x6Graph = yield this.ctx.getX6Graph();
18
+ const { edgeId } = handlerArgs;
19
+ const x6Edge = x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.getCellById(edgeId);
20
+ if (!x6Edge) {
21
+ console.error(edgeId, 'this edgeId is not exist');
22
+ }
23
+ else {
24
+ x6Edge.toFront();
25
+ /** frontEdge undo */
26
+ this.ctx.addUndo(Disposable.create(() => __awaiter(this, void 0, void 0, function* () {
27
+ handlerArgs.commandService.executeCommand(XFlowEdgeCommands.BACK_EDGE.id, {
28
+ edgeId,
29
+ });
30
+ })));
31
+ }
32
+ return {};
33
+ }), runtimeHook);
34
+ this.ctx.setResult(result);
35
+ return this;
36
+ });
37
+ this.undo = () => __awaiter(this, void 0, void 0, function* () {
38
+ this.ctx.undo();
39
+ return this;
40
+ });
41
+ this.redo = () => __awaiter(this, void 0, void 0, function* () {
42
+ if (!this.ctx.isUndoable) {
43
+ yield this.execute();
44
+ }
45
+ return this;
46
+ });
47
+ }
48
+ init() {
49
+ this.ctx = this.contextProvider();
50
+ }
51
+ isUndoable() {
52
+ return this.ctx.isUndoable();
53
+ }
54
+ };
55
+ __decorate([
56
+ inject(ICommandContextProvider),
57
+ __metadata("design:type", Object)
58
+ ], FrontEdgeCommand.prototype, "contextProvider", void 0);
59
+ __decorate([
60
+ postConstruct(),
61
+ __metadata("design:type", Function),
62
+ __metadata("design:paramtypes", []),
63
+ __metadata("design:returntype", void 0)
64
+ ], FrontEdgeCommand.prototype, "init", null);
65
+ FrontEdgeCommand = __decorate([
66
+ injectable({
67
+ token: { token: ICommandHandler, named: NsFrontEdge.command.id },
68
+ })
69
+ /** 边前置命令(始终在画布最前方) */
70
+ ], FrontEdgeCommand);
71
+ export { FrontEdgeCommand };
72
+ //# sourceMappingURL=edge-front.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/xflow-hook';
2
+ import type { IContext, IArgsBase } from '../../command/interface';
3
+ import { ICommandHandler } from '../../command/interface';
4
+ import type { IHooks } from '../../hooks/interface';
5
+ type ICommand = ICommandHandler<NsHighlightEdge.IArgs, NsHighlightEdge.IResult, NsHighlightEdge.ICmdHooks>;
6
+ export declare namespace NsHighlightEdge {
7
+ const command: import("../../command/interface").IGraphCommand;
8
+ const hookKey = "highlightEdge";
9
+ interface IArgs extends IArgsBase {
10
+ /** 边唯一id */
11
+ edgeId: string;
12
+ /** 边高亮颜色 */
13
+ strokeColor: string;
14
+ /** 边高亮宽度 */
15
+ strokeWidth?: number;
16
+ }
17
+ interface IResult {
18
+ }
19
+ interface ICmdHooks extends IHooks {
20
+ highlightEdge: HookHub<IArgs, IResult>;
21
+ }
22
+ }
23
+ export declare class HighlightEdgeCommand implements ICommand {
24
+ contextProvider: ICommand['contextProvider'];
25
+ ctx: IContext<NsHighlightEdge.IArgs, NsHighlightEdge.IResult, NsHighlightEdge.ICmdHooks>;
26
+ init(): void;
27
+ execute: () => Promise<this>;
28
+ undo: () => Promise<this>;
29
+ redo: () => Promise<this>;
30
+ isUndoable(): boolean;
31
+ }
32
+ export {};
@@ -0,0 +1,92 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { inject, injectable, postConstruct } from 'mana-syringe';
3
+ import { ICommandHandler, ICommandContextProvider } from '../../command/interface';
4
+ import { XFlowEdgeCommands } from '../constant';
5
+ export var NsHighlightEdge;
6
+ (function (NsHighlightEdge) {
7
+ NsHighlightEdge.command = XFlowEdgeCommands.HIGHLIGHT_EDGE;
8
+ NsHighlightEdge.hookKey = 'highlightEdge';
9
+ })(NsHighlightEdge || (NsHighlightEdge = {}));
10
+ let HighlightEdgeCommand = class HighlightEdgeCommand {
11
+ constructor() {
12
+ this.execute = () => __awaiter(this, void 0, void 0, function* () {
13
+ const { args, hooks: runtimeHook } = this.ctx.getArgs();
14
+ const hooks = this.ctx.getHooks();
15
+ const result = yield hooks.highlightEdge.call(args, (handlerArgs) => __awaiter(this, void 0, void 0, function* () {
16
+ var _a, _b;
17
+ const x6Graph = yield this.ctx.getX6Graph();
18
+ const { edgeId, strokeColor, strokeWidth } = handlerArgs;
19
+ const allEdges = x6Graph.getEdges();
20
+ /** 需要高亮的连线 */
21
+ const highlightEdge = allEdges.find(edge => edge.id === edgeId);
22
+ /** 不需要高亮的连线 */
23
+ const otherEdges = allEdges.filter(edge => edge.id !== edgeId);
24
+ if (!highlightEdge) {
25
+ console.error(edgeId, 'this edgeId is not exist');
26
+ }
27
+ else {
28
+ const oldAttr = highlightEdge.getAttrs();
29
+ if (((_a = oldAttr === null || oldAttr === void 0 ? void 0 : oldAttr.line) === null || _a === void 0 ? void 0 : _a.stroke) === strokeColor && ((_b = oldAttr === null || oldAttr === void 0 ? void 0 : oldAttr.line) === null || _b === void 0 ? void 0 : _b.strokeWidth) === strokeWidth) {
30
+ /** 连线已经高亮, 不需要重复操作 */
31
+ }
32
+ else {
33
+ /** 高亮选中的连线 */
34
+ highlightEdge === null || highlightEdge === void 0 ? void 0 : highlightEdge.setAttrs({
35
+ line: {
36
+ stroke: strokeColor,
37
+ strokeWidth: strokeWidth || 2,
38
+ },
39
+ });
40
+ /** 其余连线取消高亮状态 */
41
+ otherEdges.forEach(edge => {
42
+ edge.setAttrs({
43
+ line: oldAttr === null || oldAttr === void 0 ? void 0 : oldAttr.line,
44
+ });
45
+ });
46
+ /** 高亮的连线默认前置在画布最前方 */
47
+ handlerArgs.commandService.executeCommand(XFlowEdgeCommands.FRONT_EDGE.id, {
48
+ edgeId,
49
+ });
50
+ }
51
+ }
52
+ return {};
53
+ }), runtimeHook);
54
+ this.ctx.setResult(result);
55
+ return this;
56
+ });
57
+ this.undo = () => __awaiter(this, void 0, void 0, function* () {
58
+ this.ctx.undo();
59
+ return this;
60
+ });
61
+ this.redo = () => __awaiter(this, void 0, void 0, function* () {
62
+ if (!this.ctx.isUndoable) {
63
+ yield this.execute();
64
+ }
65
+ return this;
66
+ });
67
+ }
68
+ init() {
69
+ this.ctx = this.contextProvider();
70
+ }
71
+ isUndoable() {
72
+ return this.ctx.isUndoable();
73
+ }
74
+ };
75
+ __decorate([
76
+ inject(ICommandContextProvider),
77
+ __metadata("design:type", Object)
78
+ ], HighlightEdgeCommand.prototype, "contextProvider", void 0);
79
+ __decorate([
80
+ postConstruct(),
81
+ __metadata("design:type", Function),
82
+ __metadata("design:paramtypes", []),
83
+ __metadata("design:returntype", void 0)
84
+ ], HighlightEdgeCommand.prototype, "init", null);
85
+ HighlightEdgeCommand = __decorate([
86
+ injectable({
87
+ token: { token: ICommandHandler, named: NsHighlightEdge.command.id },
88
+ })
89
+ /** 连线高亮 */
90
+ ], HighlightEdgeCommand);
91
+ export { HighlightEdgeCommand };
92
+ //# sourceMappingURL=edge-highlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-highlight.js","sourceRoot":"","sources":["../../../src/command-contributions/edge/edge-highlight.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAGhE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAS/C,MAAM,KAAW,eAAe,CAgB/B;AAhBD,WAAiB,eAAe;IACjB,uBAAO,GAAG,iBAAiB,CAAC,cAAc,CAAA;IAC1C,uBAAO,GAAG,eAAe,CAAA;AAcxC,CAAC,EAhBgB,eAAe,KAAf,eAAe,QAgB/B;AAMM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QAUL,YAAO,GAAG,GAAS,EAAE;YACnB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;YACvD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;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 import type { NsGraph } from '../../interface';
3
+ import type { IContext, IArgsBase } from '../../command/interface';
4
+ import { ICommandHandler } from '../../command/interface';
5
+ import type { IHooks } from '../../hooks/interface';
6
+ import type { HookHub } from '@sunspirytus/xflow-hook';
7
+ type ICommand = ICommandHandler<NsUpdateEdge.IArgs, NsUpdateEdge.IResult, NsUpdateEdge.ICmdHooks>;
8
+ export declare namespace NsUpdateEdge {
9
+ const command: import("../../command/interface").IGraphCommand;
10
+ const hookKey = "updateEdge";
11
+ const XFlowEdgeSetOptions: X6Edge.SetOptions;
12
+ interface IArgs extends IArgsBase {
13
+ /** edgeConfig */
14
+ edgeConfig: NsGraph.IEdgeConfig;
15
+ /** options */
16
+ options: X6Edge.SetOptions;
17
+ /** 更新的Service */
18
+ updateEdgeService?: IUpdateEdgeService;
19
+ /** 更新Label的Service */
20
+ updateEdgeLabelService?: IUpdateEdgeLabelService;
21
+ }
22
+ const XFlowUpdateLabelService: (edge: X6Edge, edgeConfig: NsGraph.IEdgeConfig, options?: X6Edge.SetOptions) => Promise<void>;
23
+ interface IResult {
24
+ edgeConfig: NsGraph.IEdgeConfig;
25
+ edgeCell: X6Edge;
26
+ }
27
+ interface IUpdateEdgeService {
28
+ (args: IArgs): Promise<NsGraph.IEdgeConfig>;
29
+ }
30
+ interface IUpdateEdgeLabelService {
31
+ (edge: X6Edge, edgeConfig: NsGraph.IEdgeConfig, options: X6Edge.SetOptions): Promise<NsGraph.IEdgeConfig>;
32
+ }
33
+ interface ICmdHooks extends IHooks {
34
+ updateEdge: HookHub<IArgs, IResult>;
35
+ }
36
+ }
37
+ export declare class UpdateEdgeCommand implements ICommand {
38
+ contextProvider: ICommand['contextProvider'];
39
+ ctx: IContext<NsUpdateEdge.IArgs, NsUpdateEdge.IResult, NsUpdateEdge.ICmdHooks>;
40
+ init(): void;
41
+ execute: () => Promise<this>;
42
+ undo: () => Promise<this>;
43
+ redo: () => Promise<this>;
44
+ isUndoable(): boolean;
45
+ }
46
+ export {};
@@ -0,0 +1,99 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { inject, injectable, postConstruct } from 'mana-syringe';
3
+ import isBoolean from 'lodash/isBoolean';
4
+ import isObject from 'lodash/isObject';
5
+ import { ICommandHandler, ICommandContextProvider } from '../../command/interface';
6
+ import { XFlowEdgeCommands } from '../constant';
7
+ export var NsUpdateEdge;
8
+ (function (NsUpdateEdge) {
9
+ NsUpdateEdge.command = XFlowEdgeCommands.UPDATE_EDGE;
10
+ NsUpdateEdge.hookKey = 'updateEdge';
11
+ NsUpdateEdge.XFlowEdgeSetOptions = { overwrite: true };
12
+ NsUpdateEdge.XFlowUpdateLabelService = (edge, edgeConfig, options = NsUpdateEdge.XFlowEdgeSetOptions) => __awaiter(this, void 0, void 0, function* () {
13
+ edge === null || edge === void 0 ? void 0 : edge.setLabelAt(0, (edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.label) || edgeConfig, options);
14
+ });
15
+ })(NsUpdateEdge || (NsUpdateEdge = {}));
16
+ let UpdateEdgeCommand = class UpdateEdgeCommand {
17
+ constructor() {
18
+ this.execute = () => __awaiter(this, void 0, void 0, function* () {
19
+ const { args, hooks: runtimeHook } = this.ctx.getArgs();
20
+ const hooks = this.ctx.getHooks();
21
+ const result = yield hooks.updateEdge.call(args, (handlerArgs) => __awaiter(this, void 0, void 0, function* () {
22
+ const x6Graph = yield this.ctx.getX6Graph();
23
+ const { updateEdgeService, updateEdgeLabelService = NsUpdateEdge.XFlowUpdateLabelService, options = NsUpdateEdge.XFlowEdgeSetOptions, } = handlerArgs;
24
+ const edgeConfig = updateEdgeService
25
+ ? yield updateEdgeService(handlerArgs)
26
+ : handlerArgs === null || handlerArgs === void 0 ? void 0 : handlerArgs.edgeConfig;
27
+ const x6Edge = x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.getCellById(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.id);
28
+ x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.setData(edgeConfig, options);
29
+ if (edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.hasOwnProperty('label')) {
30
+ // 默认更新edge的第一个label
31
+ yield updateEdgeLabelService(x6Edge, edgeConfig, options);
32
+ }
33
+ if (isBoolean(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.visible)) {
34
+ x6Edge.setVisible(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.visible);
35
+ }
36
+ if (edgeConfig.attrs) {
37
+ x6Edge.setAttrs(edgeConfig.attrs);
38
+ }
39
+ if (edgeConfig.vertices) {
40
+ x6Edge.setVertices(edgeConfig.vertices);
41
+ }
42
+ if (edgeConfig.router) {
43
+ x6Edge.setRouter(edgeConfig.router);
44
+ }
45
+ if (edgeConfig.connector) {
46
+ x6Edge.setConnector(edgeConfig.connector);
47
+ }
48
+ if (isObject(edgeConfig.source)) {
49
+ //@ts-ignore
50
+ x6Edge.setSource(edgeConfig.source);
51
+ }
52
+ if (isObject(edgeConfig.target)) {
53
+ //@ts-ignore
54
+ x6Edge.setTarget(edgeConfig.target);
55
+ }
56
+ return {
57
+ edgeConfig,
58
+ edgeCell: x6Edge,
59
+ };
60
+ }), runtimeHook);
61
+ this.ctx.setResult(result);
62
+ return this;
63
+ });
64
+ this.undo = () => __awaiter(this, void 0, void 0, function* () {
65
+ this.ctx.undo();
66
+ return this;
67
+ });
68
+ this.redo = () => __awaiter(this, void 0, void 0, function* () {
69
+ if (!this.ctx.isUndoable) {
70
+ yield this.execute();
71
+ }
72
+ return this;
73
+ });
74
+ }
75
+ init() {
76
+ this.ctx = this.contextProvider();
77
+ }
78
+ isUndoable() {
79
+ return this.ctx.isUndoable();
80
+ }
81
+ };
82
+ __decorate([
83
+ inject(ICommandContextProvider),
84
+ __metadata("design:type", Object)
85
+ ], UpdateEdgeCommand.prototype, "contextProvider", void 0);
86
+ __decorate([
87
+ postConstruct(),
88
+ __metadata("design:type", Function),
89
+ __metadata("design:paramtypes", []),
90
+ __metadata("design:returntype", void 0)
91
+ ], UpdateEdgeCommand.prototype, "init", null);
92
+ UpdateEdgeCommand = __decorate([
93
+ injectable({
94
+ token: { token: ICommandHandler, named: NsUpdateEdge.command.id },
95
+ })
96
+ /** 连线更新命令 */
97
+ ], UpdateEdgeCommand);
98
+ export { UpdateEdgeCommand };
99
+ //# sourceMappingURL=edge-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-update.js","sourceRoot":"","sources":["../../../src/command-contributions/edge/edge-update.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEhE,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AAItC,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAGlF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAI/C,MAAM,KAAW,YAAY,CA0C5B;AA1CD,WAAiB,YAAY;IACd,oBAAO,GAAG,iBAAiB,CAAC,WAAW,CAAA;IACvC,oBAAO,GAAG,YAAY,CAAA;IACtB,gCAAmB,GAAsB,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;IAY5D,oCAAuB,GAAG,CACrC,IAAY,EACZ,UAA+B,EAC/B,OAAO,GAAG,YAAY,CAAC,mBAAmB,EAC1C,EAAE;QACF,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,CAAC,CAAC,EAAE,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KAAI,UAAU,EAAE,OAAO,CAAC,CAAA;IAC/D,CAAC,CAAA,CAAA;AAqBH,CAAC,EA1CgB,YAAY,KAAZ,YAAY,QA0C5B;AAMM,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QAUL,YAAO,GAAG,GAAS,EAAE;YACnB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,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AAC;IA6ED,UAAU;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;CACF,CAAA;AAvFC;IAAC,MAAM,CAAC,uBAAuB,CAAC;;0DAA6C;AAI7E;IAAC,aAAa,EAAE;;;;6CAGf;AARU,iBAAiB;IAJ7B,UAAU,CAAC;QACV,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE;KAClE,CAAC;IACF,aAAa;GACA,iBAAiB,CAwF7B;SAxFY,iBAAiB"}
@@ -0,0 +1,50 @@
1
+ import type { Syringe } from 'mana-syringe';
2
+ import type { IGraphCommand } from '../../command/interface';
3
+ import type { HookHub } from '@sunspirytus/xflow-hook';
4
+ import type { IHooks } from '../../hooks/interface';
5
+ /** commands */
6
+ import { NsAddEdge } from './edge-add';
7
+ import { NsDelEdge } from './edge-del';
8
+ import { NsUpdateEdge } from './edge-update';
9
+ import { NsHighlightEdge } from './edge-highlight';
10
+ import { NsFrontEdge } from './edge-front';
11
+ import { NsBackEdge } from './edge-back';
12
+ import type { Simplify } from '../../common/types';
13
+ /** 注册Command Handler Class */
14
+ export declare const registerEdgeCommand: (register: Syringe.Register) => void;
15
+ /** app onStart 时, 注册 Command Hooks */
16
+ export declare const hookhubList: {
17
+ hookKey: string;
18
+ command: IGraphCommand;
19
+ createHook?: () => HookHub;
20
+ }[];
21
+ /** 扩展 Command Hooks 类型*/
22
+ export interface ICmdHooks extends NsAddEdge.ICmdHooks, NsDelEdge.ICmdHooks, NsUpdateEdge.ICmdHooks, NsHighlightEdge.ICmdHooks, NsFrontEdge.ICmdHooks, NsBackEdge.ICmdHooks, IHooks {
23
+ }
24
+ /** Command 参数类型*/
25
+ export declare namespace NsEdgeCmd {
26
+ namespace AddEdge {
27
+ type IArgs = Simplify<NsAddEdge.IArgs>;
28
+ type IResult = Simplify<NsAddEdge.IResult>;
29
+ }
30
+ namespace DelEdge {
31
+ type IArgs = Simplify<NsDelEdge.IArgs>;
32
+ type IResult = Simplify<NsDelEdge.IResult>;
33
+ }
34
+ namespace UpdateEdge {
35
+ type IArgs = Simplify<NsUpdateEdge.IArgs>;
36
+ type IResult = Simplify<NsUpdateEdge.IResult>;
37
+ }
38
+ namespace HighlightEdge {
39
+ type IArgs = Simplify<NsHighlightEdge.IArgs>;
40
+ type IResult = Simplify<NsHighlightEdge.IResult>;
41
+ }
42
+ namespace FrontEdge {
43
+ type IArgs = Simplify<NsFrontEdge.IArgs>;
44
+ type IResult = Simplify<NsFrontEdge.IResult>;
45
+ }
46
+ namespace BackEdge {
47
+ type IArgs = Simplify<NsBackEdge.IArgs>;
48
+ type IResult = Simplify<NsBackEdge.IResult>;
49
+ }
50
+ }