@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,360 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GraphRenderCommand = exports.NsGraphRender = exports.NsGraphUtils = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var lodash_1 = require("lodash");
6
+ var mana_syringe_1 = require("mana-syringe");
7
+ var constant_1 = require("../constant");
8
+ var interface_1 = require("../../command/interface");
9
+ var NsGraphUtils;
10
+ (function (NsGraphUtils) {
11
+ function isNodeEqual(curNodeConfig, nextNodeConfig) {
12
+ /** XFlow默认的判断节点是否相等的逻辑 */
13
+ return (0, lodash_1.isEqual)(curNodeConfig, nextNodeConfig);
14
+ }
15
+ NsGraphUtils.isNodeEqual = isNodeEqual;
16
+ function isEdgeEqual(curEdgeConfig, nextEdgeConfig) {
17
+ /** XFlow默认的判断边是否相等的逻辑 */
18
+ return (0, lodash_1.isEqual)(curEdgeConfig, nextEdgeConfig);
19
+ }
20
+ NsGraphUtils.isEdgeEqual = isEdgeEqual;
21
+ })(NsGraphUtils = exports.NsGraphUtils || (exports.NsGraphUtils = {}));
22
+ var NsGraphRender;
23
+ (function (NsGraphRender) {
24
+ /** Command: 用于注册named factory */
25
+ NsGraphRender.command = constant_1.XFlowGraphCommands.GRAPH_RENDER;
26
+ /** hookName */
27
+ NsGraphRender.hookKey = 'graphRender';
28
+ })(NsGraphRender = exports.NsGraphRender || (exports.NsGraphRender = {}));
29
+ var GraphRenderCommand = /** @class */ (function () {
30
+ /** 画布渲染命令 */
31
+ function GraphRenderCommand() {
32
+ var _this = this;
33
+ this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
34
+ var _a, args, runtimeHook, hooks, result;
35
+ var _this = this;
36
+ return tslib_1.__generator(this, function (_b) {
37
+ switch (_b.label) {
38
+ case 0:
39
+ _a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
40
+ hooks = this.ctx.getHooks();
41
+ return [4 /*yield*/, hooks.graphRender.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
42
+ var x6Graph, graphMeta, beforeRender, graphData, isNodeEqual, isEdgeEqual, afterRender;
43
+ return tslib_1.__generator(this, function (_a) {
44
+ switch (_a.label) {
45
+ case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
46
+ case 1:
47
+ x6Graph = _a.sent();
48
+ return [4 /*yield*/, this.ctx.getGraphMeta()];
49
+ case 2:
50
+ graphMeta = _a.sent();
51
+ beforeRender = handlerArgs.beforeRender, graphData = handlerArgs.graphData, isNodeEqual = handlerArgs.isNodeEqual, isEdgeEqual = handlerArgs.isEdgeEqual, afterRender = handlerArgs.afterRender;
52
+ /** 如果用户自定义beforeRender方法 */
53
+ beforeRender && beforeRender(graphMeta);
54
+ return [4 /*yield*/, this.doLoadGraph(x6Graph, graphData, isNodeEqual, isEdgeEqual)
55
+ /** 如果用户自定义afterRender方法 */
56
+ ];
57
+ case 3:
58
+ _a.sent();
59
+ /** 如果用户自定义afterRender方法 */
60
+ afterRender && afterRender(graphData, graphMeta);
61
+ return [2 /*return*/, {}];
62
+ }
63
+ });
64
+ }); }, runtimeHook)
65
+ /** 设置结果 */
66
+ ];
67
+ case 1:
68
+ result = _b.sent();
69
+ /** 设置结果 */
70
+ this.ctx.setResult(result);
71
+ return [2 /*return*/, this];
72
+ }
73
+ });
74
+ }); };
75
+ this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
76
+ return tslib_1.__generator(this, function (_a) {
77
+ this.ctx.undo();
78
+ return [2 /*return*/, this];
79
+ });
80
+ }); };
81
+ this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
82
+ return tslib_1.__generator(this, function (_a) {
83
+ switch (_a.label) {
84
+ case 0:
85
+ if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
86
+ return [4 /*yield*/, this.execute()];
87
+ case 1:
88
+ _a.sent();
89
+ _a.label = 2;
90
+ case 2: return [2 /*return*/, this];
91
+ }
92
+ });
93
+ }); };
94
+ this.doLoadGraph = function (x6Graph, graphData, isNodeEqual, isEdgeEqual) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
95
+ var commandService, _a, addNodeConfigs, addEdgeConfigs,
96
+ // retainNodes,
97
+ // retainEdges,
98
+ removeNodes, removeEdges, updateNodes, updateEdges, _i, updateNodes_1, updateNode, nodeData, _b, updateEdges_1, updateEdge, edgeData, _c, addNodeConfigs_1, nodeConfig, _d, addEdgeConfigs_1, edgeConfig, _e, removeNodes_1, removeNode, nodeData, _f, removeEdges_1, removeEdge, edgeData;
99
+ var _this = this;
100
+ return tslib_1.__generator(this, function (_g) {
101
+ switch (_g.label) {
102
+ case 0:
103
+ if (!(x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.isFrozen())) {
104
+ x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.freeze();
105
+ }
106
+ commandService = this.ctx.getCommands();
107
+ _a = this.graphDataDiff(x6Graph, graphData, isNodeEqual, isEdgeEqual), addNodeConfigs = _a.addNodeConfigs, addEdgeConfigs = _a.addEdgeConfigs, removeNodes = _a.removeNodes, removeEdges = _a.removeEdges, updateNodes = _a.updateNodes, updateEdges = _a.updateEdges;
108
+ _i = 0, updateNodes_1 = updateNodes;
109
+ _g.label = 1;
110
+ case 1:
111
+ if (!(_i < updateNodes_1.length)) return [3 /*break*/, 4];
112
+ updateNode = updateNodes_1[_i];
113
+ nodeData = updateNode === null || updateNode === void 0 ? void 0 : updateNode.getData();
114
+ return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowNodeCommands.UPDATE_NODE.id, {
115
+ nodeConfig: nodeData,
116
+ })];
117
+ case 2:
118
+ _g.sent();
119
+ _g.label = 3;
120
+ case 3:
121
+ _i++;
122
+ return [3 /*break*/, 1];
123
+ case 4:
124
+ _b = 0, updateEdges_1 = updateEdges;
125
+ _g.label = 5;
126
+ case 5:
127
+ if (!(_b < updateEdges_1.length)) return [3 /*break*/, 8];
128
+ updateEdge = updateEdges_1[_b];
129
+ edgeData = updateEdge === null || updateEdge === void 0 ? void 0 : updateEdge.getData();
130
+ return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowEdgeCommands.UPDATE_EDGE.id, {
131
+ edgeConfig: edgeData,
132
+ })];
133
+ case 6:
134
+ _g.sent();
135
+ _g.label = 7;
136
+ case 7:
137
+ _b++;
138
+ return [3 /*break*/, 5];
139
+ case 8:
140
+ _c = 0, addNodeConfigs_1 = addNodeConfigs;
141
+ _g.label = 9;
142
+ case 9:
143
+ if (!(_c < addNodeConfigs_1.length)) return [3 /*break*/, 12];
144
+ nodeConfig = addNodeConfigs_1[_c];
145
+ return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowNodeCommands.ADD_NODE.id, {
146
+ nodeConfig: nodeConfig,
147
+ options: {
148
+ isRenderGraph: true,
149
+ },
150
+ }, {
151
+ name: 'remove servcie',
152
+ handler: function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
153
+ return tslib_1.__generator(this, function (_a) {
154
+ delete args.createNodeService;
155
+ return [2 /*return*/];
156
+ });
157
+ }); },
158
+ })];
159
+ case 10:
160
+ _g.sent();
161
+ _g.label = 11;
162
+ case 11:
163
+ _c++;
164
+ return [3 /*break*/, 9];
165
+ case 12: return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowGroupCommands.INIT_GROUP.id, {
166
+ graphData: { nodes: addNodeConfigs, edges: [] },
167
+ })];
168
+ case 13:
169
+ _g.sent();
170
+ _d = 0, addEdgeConfigs_1 = addEdgeConfigs;
171
+ _g.label = 14;
172
+ case 14:
173
+ if (!(_d < addEdgeConfigs_1.length)) return [3 /*break*/, 17];
174
+ edgeConfig = addEdgeConfigs_1[_d];
175
+ return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowEdgeCommands.ADD_EDGE.id, {
176
+ edgeConfig: edgeConfig,
177
+ options: {
178
+ isRenderGraph: true,
179
+ },
180
+ }, {
181
+ name: 'remove servcie',
182
+ handler: function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
183
+ return tslib_1.__generator(this, function (_a) {
184
+ delete args.createEdgeService;
185
+ return [2 /*return*/];
186
+ });
187
+ }); },
188
+ })];
189
+ case 15:
190
+ _g.sent();
191
+ _g.label = 16;
192
+ case 16:
193
+ _d++;
194
+ return [3 /*break*/, 14];
195
+ case 17:
196
+ _e = 0, removeNodes_1 = removeNodes;
197
+ _g.label = 18;
198
+ case 18:
199
+ if (!(_e < removeNodes_1.length)) return [3 /*break*/, 23];
200
+ removeNode = removeNodes_1[_e];
201
+ nodeData = removeNode === null || removeNode === void 0 ? void 0 : removeNode.getData();
202
+ if (!nodeData.isGroup) return [3 /*break*/, 20];
203
+ return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowGroupCommands.DEL_GROUP.id, {
204
+ nodeConfig: nodeData,
205
+ })];
206
+ case 19:
207
+ _g.sent();
208
+ return [3 /*break*/, 22];
209
+ case 20: return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowNodeCommands.DEL_NODE.id, { nodeConfig: nodeData })];
210
+ case 21:
211
+ _g.sent();
212
+ _g.label = 22;
213
+ case 22:
214
+ _e++;
215
+ return [3 /*break*/, 18];
216
+ case 23:
217
+ _f = 0, removeEdges_1 = removeEdges;
218
+ _g.label = 24;
219
+ case 24:
220
+ if (!(_f < removeEdges_1.length)) return [3 /*break*/, 27];
221
+ removeEdge = removeEdges_1[_f];
222
+ edgeData = removeEdge === null || removeEdge === void 0 ? void 0 : removeEdge.getData();
223
+ return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowEdgeCommands.DEL_EDGE.id, { edgeConfig: edgeData })];
224
+ case 25:
225
+ _g.sent();
226
+ _g.label = 26;
227
+ case 26:
228
+ _f++;
229
+ return [3 /*break*/, 24];
230
+ case 27:
231
+ if (x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.isFrozen()) {
232
+ x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.unfreeze();
233
+ }
234
+ return [2 /*return*/];
235
+ }
236
+ });
237
+ }); };
238
+ }
239
+ GraphRenderCommand.prototype.init = function () {
240
+ this.ctx = this.contextProvider();
241
+ };
242
+ GraphRenderCommand.prototype.isUndoable = function () {
243
+ return this.ctx.isUndoable();
244
+ };
245
+ /**
246
+ * 画布内容Diff
247
+ * @param x6Graph x6画布实例
248
+ * @param graphData 画布数据
249
+ * @param isNodeEqual 允许用户自定义判断节点是否相等
250
+ * @param isEdgeEqual 允许用户自定义判断边是否相等
251
+ */
252
+ GraphRenderCommand.prototype.graphDataDiff = function (x6Graph, graphData, isNodeEqual, isEdgeEqual) {
253
+ var nodeConfigs = graphData.nodes, edgeConfigs = graphData.edges;
254
+ /** 新增节点数据 */
255
+ var addNodeConfigs = [];
256
+ nodeConfigs.forEach(function (nodeConfig) {
257
+ var findNode = x6Graph.getCellById(nodeConfig === null || nodeConfig === void 0 ? void 0 : nodeConfig.id);
258
+ if (!findNode) {
259
+ addNodeConfigs.push(nodeConfig);
260
+ }
261
+ });
262
+ /** 保持、更新、移除节点 */
263
+ var retainNodes = [];
264
+ var updateNodes = [];
265
+ var removeNodes = [];
266
+ var allNodes = x6Graph.getNodes();
267
+ allNodes.forEach(function (x6Node) {
268
+ var findNodeConfig = nodeConfigs.find(function (nodeConfig) { return (nodeConfig === null || nodeConfig === void 0 ? void 0 : nodeConfig.id) === (x6Node === null || x6Node === void 0 ? void 0 : x6Node.id); });
269
+ if (!findNodeConfig) {
270
+ removeNodes.push(x6Node);
271
+ }
272
+ else {
273
+ var judgeResult = true;
274
+ if (isNodeEqual) {
275
+ /** 如果用户自定义节点是否相等的方法 */
276
+ judgeResult = isNodeEqual(x6Node === null || x6Node === void 0 ? void 0 : x6Node.data, findNodeConfig);
277
+ }
278
+ else {
279
+ /** XFlow默认的判断节点是否相等的逻辑 */
280
+ if ((x6Node === null || x6Node === void 0 ? void 0 : x6Node.data) && findNodeConfig) {
281
+ judgeResult = NsGraphUtils.isNodeEqual(x6Node === null || x6Node === void 0 ? void 0 : x6Node.data, findNodeConfig);
282
+ }
283
+ }
284
+ if (!judgeResult) {
285
+ x6Node.setData(findNodeConfig, {
286
+ deep: false,
287
+ });
288
+ }
289
+ judgeResult === true ? retainNodes.push(x6Node) : updateNodes.push(x6Node);
290
+ }
291
+ });
292
+ /** 新增边数据 */
293
+ var addEdgeConfigs = [];
294
+ edgeConfigs.forEach(function (edgeConfig) {
295
+ var findEdge = x6Graph.getCellById(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.id);
296
+ if (!findEdge) {
297
+ addEdgeConfigs.push(edgeConfig);
298
+ }
299
+ });
300
+ /** 保持、更新、移除节点 */
301
+ var retainEdges = [];
302
+ var updateEdges = [];
303
+ var removeEdges = [];
304
+ var allEdges = x6Graph.getEdges();
305
+ allEdges.forEach(function (x6Edge) {
306
+ var findEdgeConfig = edgeConfigs.find(function (edgeConfig) { return (edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.id) === (x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.id); });
307
+ if (!findEdgeConfig) {
308
+ removeEdges.push(x6Edge);
309
+ }
310
+ else {
311
+ var judgeResult = true;
312
+ if (isEdgeEqual) {
313
+ /** 如果用户自定义边是否相等的方法 */
314
+ judgeResult = isEdgeEqual(x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.data, findEdgeConfig);
315
+ }
316
+ else {
317
+ /** XFlow默认的判断边是否相等的逻辑 */
318
+ if ((x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.data) && findEdgeConfig) {
319
+ judgeResult = NsGraphUtils.isEdgeEqual(x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.data, findEdgeConfig);
320
+ }
321
+ }
322
+ if (!judgeResult) {
323
+ x6Edge.setData(findEdgeConfig, {
324
+ deep: false,
325
+ });
326
+ }
327
+ judgeResult === true ? retainEdges.push(x6Edge) : updateEdges.push(x6Edge);
328
+ }
329
+ });
330
+ return {
331
+ addNodeConfigs: addNodeConfigs,
332
+ addEdgeConfigs: addEdgeConfigs,
333
+ retainNodes: retainNodes,
334
+ retainEdges: retainEdges,
335
+ removeNodes: removeNodes,
336
+ removeEdges: removeEdges,
337
+ updateNodes: updateNodes,
338
+ updateEdges: updateEdges,
339
+ };
340
+ };
341
+ tslib_1.__decorate([
342
+ (0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
343
+ tslib_1.__metadata("design:type", Object)
344
+ ], GraphRenderCommand.prototype, "contextProvider", void 0);
345
+ tslib_1.__decorate([
346
+ (0, mana_syringe_1.postConstruct)(),
347
+ tslib_1.__metadata("design:type", Function),
348
+ tslib_1.__metadata("design:paramtypes", []),
349
+ tslib_1.__metadata("design:returntype", void 0)
350
+ ], GraphRenderCommand.prototype, "init", null);
351
+ GraphRenderCommand = tslib_1.__decorate([
352
+ (0, mana_syringe_1.injectable)({
353
+ token: { token: interface_1.ICommandHandler, named: NsGraphRender.command.id },
354
+ })
355
+ /** 画布渲染命令 */
356
+ ], GraphRenderCommand);
357
+ return GraphRenderCommand;
358
+ }());
359
+ exports.GraphRenderCommand = GraphRenderCommand;
360
+ //# sourceMappingURL=graph-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-render.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-render.ts"],"names":[],"mappings":";;;;AAMA,iCAAgC;AAChC,6CAAgE;AAChE,wCAKoB;AACpB,qDAAkF;AAIlF,IAAiB,YAAY,CAgB5B;AAhBD,WAAiB,YAAY;IAC3B,SAAgB,WAAW,CACzB,aAAkC,EAClC,cAAmC;QAEnC,0BAA0B;QAC1B,OAAO,IAAA,gBAAO,EAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IAC/C,CAAC;IANe,wBAAW,cAM1B,CAAA;IAED,SAAgB,WAAW,CACzB,aAAkC,EAClC,cAAmC;QAEnC,yBAAyB;QACzB,OAAO,IAAA,gBAAO,EAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IAC/C,CAAC;IANe,wBAAW,cAM1B,CAAA;AACH,CAAC,EAhBgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAgB5B;AAED,IAAiB,aAAa,CAoC7B;AApCD,WAAiB,aAAa;IAC5B,iCAAiC;IACpB,qBAAO,GAAG,6BAAkB,CAAC,YAAY,CAAA;IACtD,eAAe;IACF,qBAAO,GAAG,aAAa,CAAA;AAgCtC,CAAC,EApCgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAoC7B;AAMD;IADA,aAAa;IACb;QAAA,iBAmQC;QAzPC,YAAO,GAAG;;;;;;wBACF,KAA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,EAAE;wBAClC,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,cAAc,CAAC,CAAA;qBACrE;iBACF;gBACD,IAAI,CAAC,WAAW,EAAE;oBAChB,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE;wBAC7B,IAAI,EAAE,KAAK;qBACZ,CAAC,CAAA;iBACH;gBACD,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;aAC3E;QACH,CAAC,CAAC,CAAA;QAEF,OAAO;YACL,cAAc,gBAAA;YACd,cAAc,gBAAA;YACd,WAAW,aAAA;YACX,WAAW,aAAA;YACX,WAAW,aAAA;YACX,WAAW,aAAA;YACX,WAAW,aAAA;YACX,WAAW,aAAA;SACZ,CAAA;IACH,CAAC;IAjQD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;+DAA6C;IAI7E;QAAC,IAAA,4BAAa,GAAE;;;;kDAGf;IARU,kBAAkB;QAJ9B,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE;SACnE,CAAC;QACF,aAAa;OACA,kBAAkB,CAmQ9B;IAAD,yBAAC;CAAA,AAnQD,IAmQC;AAnQY,gDAAkB"}
@@ -0,0 +1,40 @@
1
+ import type { IContext, IArgsBase } from '../../command/interface';
2
+ import { ICommandHandler } from '../../command/interface';
3
+ import type { HookHub } from '@sunspirytus/xflow-hook';
4
+ import type { IHooks } from '../../hooks/interface';
5
+ type ICommand = ICommandHandler<NsGraphResize.IArgs, NsGraphResize.IResult, NsGraphResize.ICmdHooks>;
6
+ export declare namespace NsGraphResize {
7
+ /** Command: 用于注册named factory */
8
+ const command: import("../../command/interface").IGraphCommand;
9
+ /** hook 参数类型 */
10
+ interface IArgs extends IArgsBase {
11
+ /** 宽度 */
12
+ width?: number;
13
+ /** 高度 */
14
+ height?: number;
15
+ }
16
+ /** hook handler 返回类型 */
17
+ interface IResult {
18
+ }
19
+ /** hookName */
20
+ const hookKey = "graphResize";
21
+ /** hooks 类型 */
22
+ interface ICmdHooks extends IHooks {
23
+ graphResize: HookHub<IArgs, IResult>;
24
+ }
25
+ }
26
+ export declare class GraphResizeCommand implements ICommand {
27
+ /** api */
28
+ contextProvider: ICommand['contextProvider'];
29
+ ctx: IContext<NsGraphResize.IArgs, NsGraphResize.IResult, NsGraphResize.ICmdHooks>;
30
+ init(): void;
31
+ /** 执行Cmd */
32
+ execute: () => Promise<this>;
33
+ /** undo cmd */
34
+ undo: () => Promise<this>;
35
+ /** redo cmd */
36
+ redo: () => Promise<this>;
37
+ /** isUndoable */
38
+ isUndoable(): boolean;
39
+ }
40
+ export {};
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GraphResizeCommand = exports.NsGraphResize = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var mana_syringe_1 = require("mana-syringe");
6
+ var interface_1 = require("../../command/interface");
7
+ var constant_1 = require("../constant");
8
+ var NsGraphResize;
9
+ (function (NsGraphResize) {
10
+ /** Command: 用于注册named factory */
11
+ NsGraphResize.command = constant_1.XFlowGraphCommands.GRAPH_RESIZE;
12
+ /** hookName */
13
+ NsGraphResize.hookKey = 'graphResize';
14
+ })(NsGraphResize = exports.NsGraphResize || (exports.NsGraphResize = {}));
15
+ var GraphResizeCommand = /** @class */ (function () {
16
+ /** 画布resize命令 */
17
+ function GraphResizeCommand() {
18
+ var _this = this;
19
+ /** 执行Cmd */
20
+ this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
21
+ var _a, args, runtimeHook, hooks, config, clientHeight, clientWidth, result;
22
+ var _this = this;
23
+ return tslib_1.__generator(this, function (_b) {
24
+ switch (_b.label) {
25
+ case 0:
26
+ _a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
27
+ hooks = this.ctx.getHooks();
28
+ return [4 /*yield*/, this.ctx.getGraphConfig()];
29
+ case 1:
30
+ config = _b.sent();
31
+ clientHeight = config.rootContainer.clientHeight;
32
+ clientWidth = config.rootContainer.clientWidth;
33
+ return [4 /*yield*/, hooks.graphResize.call(
34
+ /** 执行hooks pipeline处理args */
35
+ args,
36
+ /** 执行 callback */
37
+ function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
38
+ var x6Graph, _a, width, _b, height;
39
+ return tslib_1.__generator(this, function (_c) {
40
+ switch (_c.label) {
41
+ case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
42
+ case 1:
43
+ x6Graph = _c.sent();
44
+ _a = handlerArgs.width, width = _a === void 0 ? clientWidth : _a, _b = handlerArgs.height, height = _b === void 0 ? clientHeight : _b;
45
+ x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.resize(width, height);
46
+ return [2 /*return*/, {}];
47
+ }
48
+ });
49
+ }); },
50
+ /** execute command 时创建的hook */
51
+ runtimeHook)
52
+ /** 设置结果 */
53
+ ];
54
+ case 2:
55
+ result = _b.sent();
56
+ /** 设置结果 */
57
+ this.ctx.setResult(result);
58
+ return [2 /*return*/, this];
59
+ }
60
+ });
61
+ }); };
62
+ /** undo cmd */
63
+ this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
64
+ return tslib_1.__generator(this, function (_a) {
65
+ this.ctx.undo();
66
+ return [2 /*return*/, this];
67
+ });
68
+ }); };
69
+ /** redo cmd */
70
+ this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
71
+ return tslib_1.__generator(this, function (_a) {
72
+ switch (_a.label) {
73
+ case 0:
74
+ if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
75
+ return [4 /*yield*/, this.execute()];
76
+ case 1:
77
+ _a.sent();
78
+ _a.label = 2;
79
+ case 2: return [2 /*return*/, this];
80
+ }
81
+ });
82
+ }); };
83
+ }
84
+ GraphResizeCommand.prototype.init = function () {
85
+ this.ctx = this.contextProvider();
86
+ };
87
+ /** isUndoable */
88
+ GraphResizeCommand.prototype.isUndoable = function () {
89
+ return this.ctx.isUndoable();
90
+ };
91
+ tslib_1.__decorate([
92
+ (0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
93
+ tslib_1.__metadata("design:type", Object)
94
+ ], GraphResizeCommand.prototype, "contextProvider", void 0);
95
+ tslib_1.__decorate([
96
+ (0, mana_syringe_1.postConstruct)(),
97
+ tslib_1.__metadata("design:type", Function),
98
+ tslib_1.__metadata("design:paramtypes", []),
99
+ tslib_1.__metadata("design:returntype", void 0)
100
+ ], GraphResizeCommand.prototype, "init", null);
101
+ GraphResizeCommand = tslib_1.__decorate([
102
+ (0, mana_syringe_1.injectable)({
103
+ token: { token: interface_1.ICommandHandler, named: NsGraphResize.command.id },
104
+ })
105
+ /** 画布resize命令 */
106
+ ], GraphResizeCommand);
107
+ return GraphResizeCommand;
108
+ }());
109
+ exports.GraphResizeCommand = GraphResizeCommand;
110
+ //# sourceMappingURL=graph-resize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-resize.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-resize.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAEhE,qDAAkF;AAIlF,wCAAgD;AAIhD,IAAiB,aAAa,CAkB7B;AAlBD,WAAiB,aAAa;IAC5B,iCAAiC;IACpB,qBAAO,GAAG,6BAAkB,CAAC,YAAY,CAAA;IAUtD,eAAe;IACF,qBAAO,GAAG,aAAa,CAAA;AAKtC,CAAC,EAlBgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAkB7B;AAMD;IADA,iBAAiB;IACjB;QAAA,iBAuDC;QA5CC,YAAY;QACZ,YAAO,GAAG;;;;;;wBACF,KAA+B,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAA/C,IAAI,UAAA,EA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;IAMH,CAAC;IAhDC,iCAAI,GADJ;QAEE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IACnC,CAAC;IA0CD,iBAAiB;IACjB,uCAAU,GAAV;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;IApDD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;+DAA6C;IAI7E;QAAC,IAAA,4BAAa,GAAE;;;;kDAGf;IATU,kBAAkB;QAJ9B,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE;SACnE,CAAC;QACF,iBAAiB;OACJ,kBAAkB,CAuD9B;IAAD,yBAAC;CAAA,AAvDD,IAuDC;AAvDY,gDAAkB"}
@@ -0,0 +1,43 @@
1
+ import type { NsGraph } from '../../interface';
2
+ import type { IContext, IArgsBase } from '../../command/interface';
3
+ import type { HookHub } from '@sunspirytus/xflow-hook';
4
+ import type { IHooks } from '../../hooks/interface';
5
+ import { ICommandHandler } from '../../command/interface';
6
+ type ICommand = ICommandHandler<NsGraphSaveData.IArgs, NsGraphSaveData.IResult, NsGraphSaveData.ICmdHooks>;
7
+ export declare namespace NsGraphSaveData {
8
+ /** Command Id: 用于注册named factory */
9
+ const command: import("../../command/interface").IGraphCommand;
10
+ /** hookName */
11
+ const hookKey = "saveGraphData";
12
+ /** hook 参数类型 */
13
+ interface IArgs extends IArgsBase {
14
+ includeAttrs?: boolean;
15
+ saveGraphDataService?: ISaveGraphDataService;
16
+ }
17
+ /** hook handler 返回类型 */
18
+ interface IResult {
19
+ }
20
+ /** api service 类型 */
21
+ interface ISaveGraphDataService {
22
+ (graphMeta: NsGraph.IGraphMeta, graphData: NsGraph.IGraphData): Promise<IResult | void>;
23
+ }
24
+ /** hooks 类型 */
25
+ interface ICmdHooks extends IHooks {
26
+ saveGraphData: HookHub<IArgs, IResult>;
27
+ }
28
+ }
29
+ export declare class GraphSaveDataCommand implements ICommand {
30
+ /** api */
31
+ contextProvider: ICommand['contextProvider'];
32
+ ctx: IContext<NsGraphSaveData.IArgs, NsGraphSaveData.IResult, NsGraphSaveData.ICmdHooks>;
33
+ init(): void;
34
+ /** 执行Cmd */
35
+ execute: () => Promise<this>;
36
+ /** undo cmd */
37
+ undo: () => Promise<this>;
38
+ /** redo cmd */
39
+ redo: () => Promise<this>;
40
+ /** isUndoable */
41
+ isUndoable(): boolean;
42
+ }
43
+ export {};