liteflow-editor-process 1.0.0

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 (281) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1020 -0
  3. package/dist/LiteFlowEditor/assets/and-icon.svg +20 -0
  4. package/dist/LiteFlowEditor/assets/catch-icon.svg +14 -0
  5. package/dist/LiteFlowEditor/assets/chain-icon.svg +11 -0
  6. package/dist/LiteFlowEditor/assets/common-icon.svg +18 -0
  7. package/dist/LiteFlowEditor/assets/end-icon.svg +14 -0
  8. package/dist/LiteFlowEditor/assets/for-icon.svg +20 -0
  9. package/dist/LiteFlowEditor/assets/if-icon.svg +14 -0
  10. package/dist/LiteFlowEditor/assets/indicator-icons.svg +16 -0
  11. package/dist/LiteFlowEditor/assets/intermediate-end-icon.svg +20 -0
  12. package/dist/LiteFlowEditor/assets/intermediate-event-catch-error.svg +40 -0
  13. package/dist/LiteFlowEditor/assets/iterator-icon.svg +7 -0
  14. package/dist/LiteFlowEditor/assets/little-warning-icon.svg +1 -0
  15. package/dist/LiteFlowEditor/assets/not-icon.svg +20 -0
  16. package/dist/LiteFlowEditor/assets/or-icon.svg +20 -0
  17. package/dist/LiteFlowEditor/assets/start-icon.svg +16 -0
  18. package/dist/LiteFlowEditor/assets/switch-icon.svg +15 -0
  19. package/dist/LiteFlowEditor/assets/then-icon.svg +23 -0
  20. package/dist/LiteFlowEditor/assets/virtual-icon.svg +21 -0
  21. package/dist/LiteFlowEditor/assets/warning-icon.svg +1 -0
  22. package/dist/LiteFlowEditor/assets/when-icon.svg +21 -0
  23. package/dist/LiteFlowEditor/assets/while-icon.svg +24 -0
  24. package/dist/LiteFlowEditor/cells/and.d.ts +2 -0
  25. package/dist/LiteFlowEditor/cells/and.js +8 -0
  26. package/dist/LiteFlowEditor/cells/catch.d.ts +2 -0
  27. package/dist/LiteFlowEditor/cells/catch.js +8 -0
  28. package/dist/LiteFlowEditor/cells/chain.d.ts +2 -0
  29. package/dist/LiteFlowEditor/cells/chain.js +8 -0
  30. package/dist/LiteFlowEditor/cells/common.d.ts +2 -0
  31. package/dist/LiteFlowEditor/cells/common.js +8 -0
  32. package/dist/LiteFlowEditor/cells/end.d.ts +2 -0
  33. package/dist/LiteFlowEditor/cells/end.js +11 -0
  34. package/dist/LiteFlowEditor/cells/for.d.ts +2 -0
  35. package/dist/LiteFlowEditor/cells/for.js +8 -0
  36. package/dist/LiteFlowEditor/cells/if.d.ts +2 -0
  37. package/dist/LiteFlowEditor/cells/if.js +9 -0
  38. package/dist/LiteFlowEditor/cells/index.d.ts +25 -0
  39. package/dist/LiteFlowEditor/cells/index.js +219 -0
  40. package/dist/LiteFlowEditor/cells/intermediate-end.d.ts +2 -0
  41. package/dist/LiteFlowEditor/cells/intermediate-end.js +11 -0
  42. package/dist/LiteFlowEditor/cells/iterator.d.ts +2 -0
  43. package/dist/LiteFlowEditor/cells/iterator.js +8 -0
  44. package/dist/LiteFlowEditor/cells/not.d.ts +2 -0
  45. package/dist/LiteFlowEditor/cells/not.js +8 -0
  46. package/dist/LiteFlowEditor/cells/or.d.ts +2 -0
  47. package/dist/LiteFlowEditor/cells/or.js +8 -0
  48. package/dist/LiteFlowEditor/cells/start.d.ts +2 -0
  49. package/dist/LiteFlowEditor/cells/start.js +11 -0
  50. package/dist/LiteFlowEditor/cells/switch.d.ts +2 -0
  51. package/dist/LiteFlowEditor/cells/switch.js +9 -0
  52. package/dist/LiteFlowEditor/cells/then.d.ts +2 -0
  53. package/dist/LiteFlowEditor/cells/then.js +11 -0
  54. package/dist/LiteFlowEditor/cells/virtual.d.ts +2 -0
  55. package/dist/LiteFlowEditor/cells/virtual.js +8 -0
  56. package/dist/LiteFlowEditor/cells/when.d.ts +2 -0
  57. package/dist/LiteFlowEditor/cells/when.js +11 -0
  58. package/dist/LiteFlowEditor/cells/while.d.ts +2 -0
  59. package/dist/LiteFlowEditor/cells/while.js +8 -0
  60. package/dist/LiteFlowEditor/common/anchor.d.ts +2 -0
  61. package/dist/LiteFlowEditor/common/anchor.js +10 -0
  62. package/dist/LiteFlowEditor/common/connector.d.ts +2 -0
  63. package/dist/LiteFlowEditor/common/connector.js +20 -0
  64. package/dist/LiteFlowEditor/common/edge.d.ts +61 -0
  65. package/dist/LiteFlowEditor/common/edge.js +57 -0
  66. package/dist/LiteFlowEditor/common/events.d.ts +4 -0
  67. package/dist/LiteFlowEditor/common/events.js +97 -0
  68. package/dist/LiteFlowEditor/common/index.d.ts +4 -0
  69. package/dist/LiteFlowEditor/common/index.js +11 -0
  70. package/dist/LiteFlowEditor/common/layout.d.ts +12 -0
  71. package/dist/LiteFlowEditor/common/layout.js +308 -0
  72. package/dist/LiteFlowEditor/common/router.d.ts +2 -0
  73. package/dist/LiteFlowEditor/common/router.js +40 -0
  74. package/dist/LiteFlowEditor/common/shortcuts.d.ts +10 -0
  75. package/dist/LiteFlowEditor/common/shortcuts.js +183 -0
  76. package/dist/LiteFlowEditor/components/NodeBadge/index.d.ts +6 -0
  77. package/dist/LiteFlowEditor/components/NodeBadge/index.js +24 -0
  78. package/dist/LiteFlowEditor/components/NodeBadge/index.module.less +10 -0
  79. package/dist/LiteFlowEditor/components/NodeToolBar/index.d.ts +6 -0
  80. package/dist/LiteFlowEditor/components/NodeToolBar/index.js +121 -0
  81. package/dist/LiteFlowEditor/components/NodeToolBar/index.module.less +133 -0
  82. package/dist/LiteFlowEditor/components/NodeView/index.d.ts +7 -0
  83. package/dist/LiteFlowEditor/components/NodeView/index.js +14 -0
  84. package/dist/LiteFlowEditor/components/NodeView/index.module.less +14 -0
  85. package/dist/LiteFlowEditor/components/index.d.ts +3 -0
  86. package/dist/LiteFlowEditor/components/index.js +3 -0
  87. package/dist/LiteFlowEditor/constant/index.d.ts +79 -0
  88. package/dist/LiteFlowEditor/constant/index.js +215 -0
  89. package/dist/LiteFlowEditor/context/GraphContext.d.ts +13 -0
  90. package/dist/LiteFlowEditor/context/GraphContext.js +10 -0
  91. package/dist/LiteFlowEditor/context/ScriptContext.d.ts +37 -0
  92. package/dist/LiteFlowEditor/context/ScriptContext.js +15 -0
  93. package/dist/LiteFlowEditor/hooks/index.d.ts +5 -0
  94. package/dist/LiteFlowEditor/hooks/index.js +5 -0
  95. package/dist/LiteFlowEditor/hooks/useClickAway.d.ts +5 -0
  96. package/dist/LiteFlowEditor/hooks/useClickAway.js +38 -0
  97. package/dist/LiteFlowEditor/hooks/useGraph.d.ts +1 -0
  98. package/dist/LiteFlowEditor/hooks/useGraph.js +7 -0
  99. package/dist/LiteFlowEditor/hooks/useGraphWrapper.d.ts +2 -0
  100. package/dist/LiteFlowEditor/hooks/useGraphWrapper.js +7 -0
  101. package/dist/LiteFlowEditor/hooks/useHistory.d.ts +2 -0
  102. package/dist/LiteFlowEditor/hooks/useHistory.js +69 -0
  103. package/dist/LiteFlowEditor/hooks/useModel.d.ts +3 -0
  104. package/dist/LiteFlowEditor/hooks/useModel.js +7 -0
  105. package/dist/LiteFlowEditor/hooks/useUpdateEffect.d.ts +7 -0
  106. package/dist/LiteFlowEditor/hooks/useUpdateEffect.js +17 -0
  107. package/dist/LiteFlowEditor/i18n/en_US/translation.json +138 -0
  108. package/dist/LiteFlowEditor/i18n/index.d.ts +2 -0
  109. package/dist/LiteFlowEditor/i18n/index.js +28 -0
  110. package/dist/LiteFlowEditor/i18n/zh_CN/translation.json +139 -0
  111. package/dist/LiteFlowEditor/i18n/zh_TW/translation.json +139 -0
  112. package/dist/LiteFlowEditor/index.d.ts +37 -0
  113. package/dist/LiteFlowEditor/index.js +299 -0
  114. package/dist/LiteFlowEditor/index.module.less +127 -0
  115. package/dist/LiteFlowEditor/mock/index.d.ts +2 -0
  116. package/dist/LiteFlowEditor/mock/index.js +272 -0
  117. package/dist/LiteFlowEditor/model/builder.d.ts +43 -0
  118. package/dist/LiteFlowEditor/model/builder.js +239 -0
  119. package/dist/LiteFlowEditor/model/chain.d.ts +83 -0
  120. package/dist/LiteFlowEditor/model/chain.js +278 -0
  121. package/dist/LiteFlowEditor/model/el/and-operator.d.ts +53 -0
  122. package/dist/LiteFlowEditor/model/el/and-operator.js +178 -0
  123. package/dist/LiteFlowEditor/model/el/catch-operator.d.ts +81 -0
  124. package/dist/LiteFlowEditor/model/el/catch-operator.js +338 -0
  125. package/dist/LiteFlowEditor/model/el/chain-operator.d.ts +53 -0
  126. package/dist/LiteFlowEditor/model/el/chain-operator.js +170 -0
  127. package/dist/LiteFlowEditor/model/el/for-operator.d.ts +56 -0
  128. package/dist/LiteFlowEditor/model/el/for-operator.js +171 -0
  129. package/dist/LiteFlowEditor/model/el/if-operator.d.ts +64 -0
  130. package/dist/LiteFlowEditor/model/el/if-operator.js +265 -0
  131. package/dist/LiteFlowEditor/model/el/index.d.ts +40 -0
  132. package/dist/LiteFlowEditor/model/el/index.js +47 -0
  133. package/dist/LiteFlowEditor/model/el/iterator-operator.d.ts +56 -0
  134. package/dist/LiteFlowEditor/model/el/iterator-operator.js +183 -0
  135. package/dist/LiteFlowEditor/model/el/node-operator.d.ts +62 -0
  136. package/dist/LiteFlowEditor/model/el/node-operator.js +136 -0
  137. package/dist/LiteFlowEditor/model/el/not-operator.d.ts +68 -0
  138. package/dist/LiteFlowEditor/model/el/not-operator.js +231 -0
  139. package/dist/LiteFlowEditor/model/el/or-operator.d.ts +53 -0
  140. package/dist/LiteFlowEditor/model/el/or-operator.js +178 -0
  141. package/dist/LiteFlowEditor/model/el/switch-operator.d.ts +56 -0
  142. package/dist/LiteFlowEditor/model/el/switch-operator.js +173 -0
  143. package/dist/LiteFlowEditor/model/el/then-operator.d.ts +66 -0
  144. package/dist/LiteFlowEditor/model/el/then-operator.js +159 -0
  145. package/dist/LiteFlowEditor/model/el/when-operator.d.ts +58 -0
  146. package/dist/LiteFlowEditor/model/el/when-operator.js +181 -0
  147. package/dist/LiteFlowEditor/model/el/while-operator.d.ts +56 -0
  148. package/dist/LiteFlowEditor/model/el/while-operator.js +171 -0
  149. package/dist/LiteFlowEditor/model/node.d.ts +182 -0
  150. package/dist/LiteFlowEditor/model/node.js +463 -0
  151. package/dist/LiteFlowEditor/model/utils/createTag.d.ts +1 -0
  152. package/dist/LiteFlowEditor/model/utils/createTag.js +5 -0
  153. package/dist/LiteFlowEditor/model/utils/end.d.ts +87 -0
  154. package/dist/LiteFlowEditor/model/utils/end.js +185 -0
  155. package/dist/LiteFlowEditor/model/utils/index.d.ts +7 -0
  156. package/dist/LiteFlowEditor/model/utils/index.js +10 -0
  157. package/dist/LiteFlowEditor/model/utils/start.d.ts +87 -0
  158. package/dist/LiteFlowEditor/model/utils/start.js +185 -0
  159. package/dist/LiteFlowEditor/model/utils/virtual.d.ts +78 -0
  160. package/dist/LiteFlowEditor/model/utils/virtual.js +167 -0
  161. package/dist/LiteFlowEditor/model-checker/checkers/AnalysisNodeChecker.d.ts +7 -0
  162. package/dist/LiteFlowEditor/model-checker/checkers/AnalysisNodeChecker.js +44 -0
  163. package/dist/LiteFlowEditor/model-checker/checkers/CurScheduleSetChecker.d.ts +7 -0
  164. package/dist/LiteFlowEditor/model-checker/checkers/CurScheduleSetChecker.js +26 -0
  165. package/dist/LiteFlowEditor/model-checker/checkers/InputListChecker.d.ts +7 -0
  166. package/dist/LiteFlowEditor/model-checker/checkers/InputListChecker.js +39 -0
  167. package/dist/LiteFlowEditor/model-checker/checkers/InputListValueChecker.d.ts +7 -0
  168. package/dist/LiteFlowEditor/model-checker/checkers/InputListValueChecker.js +154 -0
  169. package/dist/LiteFlowEditor/model-checker/checkers/IteratorBindChecker.d.ts +7 -0
  170. package/dist/LiteFlowEditor/model-checker/checkers/IteratorBindChecker.js +27 -0
  171. package/dist/LiteFlowEditor/model-checker/checkers/QueryDimensionChecker.d.ts +7 -0
  172. package/dist/LiteFlowEditor/model-checker/checkers/QueryDimensionChecker.js +33 -0
  173. package/dist/LiteFlowEditor/model-checker/checkers/QueryLogChecker.d.ts +7 -0
  174. package/dist/LiteFlowEditor/model-checker/checkers/QueryLogChecker.js +27 -0
  175. package/dist/LiteFlowEditor/model-checker/checkers/ReportTemplateChecker.d.ts +7 -0
  176. package/dist/LiteFlowEditor/model-checker/checkers/ReportTemplateChecker.js +27 -0
  177. package/dist/LiteFlowEditor/model-checker/checkers/UnconfiguredComponentChecker.d.ts +7 -0
  178. package/dist/LiteFlowEditor/model-checker/checkers/UnconfiguredComponentChecker.js +27 -0
  179. package/dist/LiteFlowEditor/model-checker/checkers/index.d.ts +14 -0
  180. package/dist/LiteFlowEditor/model-checker/checkers/index.js +38 -0
  181. package/dist/LiteFlowEditor/model-checker/index.d.ts +22 -0
  182. package/dist/LiteFlowEditor/model-checker/index.js +43 -0
  183. package/dist/LiteFlowEditor/model-checker/types.d.ts +11 -0
  184. package/dist/LiteFlowEditor/model-checker/types.js +1 -0
  185. package/dist/LiteFlowEditor/panels/breadcrumb/index.d.ts +7 -0
  186. package/dist/LiteFlowEditor/panels/breadcrumb/index.js +67 -0
  187. package/dist/LiteFlowEditor/panels/breadcrumb/index.module.less +23 -0
  188. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/index.d.ts +11 -0
  189. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/index.js +98 -0
  190. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/index.module.less +7 -0
  191. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/blank.d.ts +8 -0
  192. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/blank.js +18 -0
  193. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/index.d.ts +3 -0
  194. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/index.js +3 -0
  195. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/node.d.ts +9 -0
  196. package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/node.js +10 -0
  197. package/dist/LiteFlowEditor/panels/flowGraph/contextPad/index.d.ts +14 -0
  198. package/dist/LiteFlowEditor/panels/flowGraph/contextPad/index.js +108 -0
  199. package/dist/LiteFlowEditor/panels/flowGraph/contextPad/index.module.less +81 -0
  200. package/dist/LiteFlowEditor/panels/flowGraph/createFlowGraph.d.ts +3 -0
  201. package/dist/LiteFlowEditor/panels/flowGraph/createFlowGraph.js +199 -0
  202. package/dist/LiteFlowEditor/panels/flowGraph/miniMapSimpleNode/index.d.ts +7 -0
  203. package/dist/LiteFlowEditor/panels/flowGraph/miniMapSimpleNode/index.js +42 -0
  204. package/dist/LiteFlowEditor/panels/flowGraph/nodeEditorModal/index.d.ts +8 -0
  205. package/dist/LiteFlowEditor/panels/flowGraph/nodeEditorModal/index.js +110 -0
  206. package/dist/LiteFlowEditor/panels/flowGraph/nodeEditorModal/index.module.less +11 -0
  207. package/dist/LiteFlowEditor/panels/layout/index.d.ts +16 -0
  208. package/dist/LiteFlowEditor/panels/layout/index.js +117 -0
  209. package/dist/LiteFlowEditor/panels/layout/index.module.less +30 -0
  210. package/dist/LiteFlowEditor/panels/settingBar/basic/index.d.ts +7 -0
  211. package/dist/LiteFlowEditor/panels/settingBar/basic/index.js +50 -0
  212. package/dist/LiteFlowEditor/panels/settingBar/basic/index.module.less +17 -0
  213. package/dist/LiteFlowEditor/panels/settingBar/index.d.ts +7 -0
  214. package/dist/LiteFlowEditor/panels/settingBar/index.js +219 -0
  215. package/dist/LiteFlowEditor/panels/settingBar/index.module.less +45 -0
  216. package/dist/LiteFlowEditor/panels/settingBar/outline/index.d.ts +7 -0
  217. package/dist/LiteFlowEditor/panels/settingBar/outline/index.js +124 -0
  218. package/dist/LiteFlowEditor/panels/settingBar/outline/index.module.less +39 -0
  219. package/dist/LiteFlowEditor/panels/settingBar/parameters/index.d.ts +6 -0
  220. package/dist/LiteFlowEditor/panels/settingBar/parameters/index.js +415 -0
  221. package/dist/LiteFlowEditor/panels/settingBar/parameters/index.module.less +4 -0
  222. package/dist/LiteFlowEditor/panels/settingBar/properties/CustomDropdown.d.ts +13 -0
  223. package/dist/LiteFlowEditor/panels/settingBar/properties/CustomDropdown.js +62 -0
  224. package/dist/LiteFlowEditor/panels/settingBar/properties/DraggableWrapper.d.ts +48 -0
  225. package/dist/LiteFlowEditor/panels/settingBar/properties/DraggableWrapper.js +94 -0
  226. package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor-new.d.ts +33 -0
  227. package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor-new.js +433 -0
  228. package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor.d.ts +33 -0
  229. package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor.js +195 -0
  230. package/dist/LiteFlowEditor/panels/settingBar/properties/component.d.ts +10 -0
  231. package/dist/LiteFlowEditor/panels/settingBar/properties/component.js +2780 -0
  232. package/dist/LiteFlowEditor/panels/settingBar/properties/condition.d.ts +7 -0
  233. package/dist/LiteFlowEditor/panels/settingBar/properties/condition.js +54 -0
  234. package/dist/LiteFlowEditor/panels/settingBar/properties/index.d.ts +2 -0
  235. package/dist/LiteFlowEditor/panels/settingBar/properties/index.js +2 -0
  236. package/dist/LiteFlowEditor/panels/settingBar/properties/index.module.less +149 -0
  237. package/dist/LiteFlowEditor/panels/sideBar/index.d.ts +7 -0
  238. package/dist/LiteFlowEditor/panels/sideBar/index.js +153 -0
  239. package/dist/LiteFlowEditor/panels/sideBar/index.module.less +48 -0
  240. package/dist/LiteFlowEditor/panels/toolBar/index.d.ts +8 -0
  241. package/dist/LiteFlowEditor/panels/toolBar/index.js +42 -0
  242. package/dist/LiteFlowEditor/panels/toolBar/index.module.less +19 -0
  243. package/dist/LiteFlowEditor/panels/toolBar/widgets/check.d.ts +7 -0
  244. package/dist/LiteFlowEditor/panels/toolBar/widgets/check.js +40 -0
  245. package/dist/LiteFlowEditor/panels/toolBar/widgets/common/badge.d.ts +12 -0
  246. package/dist/LiteFlowEditor/panels/toolBar/widgets/common/badge.js +46 -0
  247. package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeBtnWidget.d.ts +15 -0
  248. package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeBtnWidget.js +133 -0
  249. package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeDropdownWidget.d.ts +14 -0
  250. package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeDropdownWidget.js +38 -0
  251. package/dist/LiteFlowEditor/panels/toolBar/widgets/fitWindow.d.ts +7 -0
  252. package/dist/LiteFlowEditor/panels/toolBar/widgets/fitWindow.js +17 -0
  253. package/dist/LiteFlowEditor/panels/toolBar/widgets/fullscreen.d.ts +4 -0
  254. package/dist/LiteFlowEditor/panels/toolBar/widgets/fullscreen.js +104 -0
  255. package/dist/LiteFlowEditor/panels/toolBar/widgets/global.less +6 -0
  256. package/dist/LiteFlowEditor/panels/toolBar/widgets/index.d.ts +7 -0
  257. package/dist/LiteFlowEditor/panels/toolBar/widgets/index.js +12 -0
  258. package/dist/LiteFlowEditor/panels/toolBar/widgets/index.module.less +169 -0
  259. package/dist/LiteFlowEditor/panels/toolBar/widgets/mock.d.ts +7 -0
  260. package/dist/LiteFlowEditor/panels/toolBar/widgets/mock.js +83 -0
  261. package/dist/LiteFlowEditor/panels/toolBar/widgets/redo.d.ts +7 -0
  262. package/dist/LiteFlowEditor/panels/toolBar/widgets/redo.js +16 -0
  263. package/dist/LiteFlowEditor/panels/toolBar/widgets/save.d.ts +7 -0
  264. package/dist/LiteFlowEditor/panels/toolBar/widgets/save.js +12 -0
  265. package/dist/LiteFlowEditor/panels/toolBar/widgets/selection.d.ts +7 -0
  266. package/dist/LiteFlowEditor/panels/toolBar/widgets/selection.js +23 -0
  267. package/dist/LiteFlowEditor/panels/toolBar/widgets/undo.d.ts +7 -0
  268. package/dist/LiteFlowEditor/panels/toolBar/widgets/undo.js +16 -0
  269. package/dist/LiteFlowEditor/panels/toolBar/widgets/view.d.ts +7 -0
  270. package/dist/LiteFlowEditor/panels/toolBar/widgets/view.js +37 -0
  271. package/dist/LiteFlowEditor/panels/toolBar/widgets/zoom.d.ts +7 -0
  272. package/dist/LiteFlowEditor/panels/toolBar/widgets/zoom.js +67 -0
  273. package/dist/LiteFlowEditor/utils/eventBus.d.ts +34 -0
  274. package/dist/LiteFlowEditor/utils/eventBus.js +86 -0
  275. package/dist/LiteFlowEditor/utils/flowChartUtils.d.ts +9 -0
  276. package/dist/LiteFlowEditor/utils/flowChartUtils.js +34 -0
  277. package/dist/LiteFlowEditor/utils/index.d.ts +33 -0
  278. package/dist/LiteFlowEditor/utils/index.js +245 -0
  279. package/dist/index.d.ts +4 -0
  280. package/dist/index.js +4 -0
  281. package/package.json +97 -0
@@ -0,0 +1,463 @@
1
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
+ /**
7
+ * EL表达式的模型表示:数据结构本质上是一个树形结构。
8
+ * 例如一个串行编排(THEN):
9
+ * (1) EL表达式形式:THEN(a, b, c, d)
10
+ * (2) JSON表示形式:
11
+ * {
12
+ type: ConditionTypeEnum.THEN,
13
+ children: [
14
+ { type: NodeTypeEnum.COMMON, id: 'a' },
15
+ { type: NodeTypeEnum.COMMON, id: 'b' },
16
+ { type: NodeTypeEnum.COMMON, id: 'c' },
17
+ { type: NodeTypeEnum.COMMON, id: 'd' },
18
+ ],
19
+ }
20
+ * (3) 通过ELNode节点模型表示为:
21
+ ┌─────────────────┐
22
+ ┌──▶│ NodeOperator │
23
+ │ └─────────────────┘
24
+ │ ┌─────────────────┐
25
+ ├──▶│ NodeOperator │
26
+ ┌─────────┐ ┌─────────────────┐ │ └─────────────────┘
27
+ │ Chain │───▶│ ThenOperator │──┤ ┌─────────────────┐
28
+ └─────────┘ └─────────────────┘ ├──▶│ NodeOperator │
29
+ │ └─────────────────┘
30
+ │ ┌─────────────────┐
31
+ └──▶│ NodeOperator │
32
+ └─────────────────┘
33
+ */
34
+ var ELNode = /*#__PURE__*/function () {
35
+ function ELNode() {
36
+ _classCallCheck(this, ELNode);
37
+ // 节点类型:可以是编排类型,也可以是组件类型
38
+ // 当前节点的子节点:编排类型有子节点,组件类型没有子节点
39
+ _defineProperty(this, "children", void 0);
40
+ // 当前节点的父节点
41
+ _defineProperty(this, "parent", void 0);
42
+ // 判断类节点类型:主要用于SWITCH/IF/FOR/WHILE等编排类型
43
+ _defineProperty(this, "condition", void 0);
44
+ // 组件节点的id
45
+ _defineProperty(this, "id", void 0);
46
+ // 编排节点的属性:可以设置id/tag等等
47
+ _defineProperty(this, "properties", void 0);
48
+ // 当前节点的X6 Cell内容
49
+ _defineProperty(this, "cells", []);
50
+ // 当前节点的X6 Node内容
51
+ _defineProperty(this, "nodes", []);
52
+ // 代理节点
53
+ _defineProperty(this, "proxy", void 0);
54
+ // 当前操作符节点的开始节点
55
+ _defineProperty(this, "startNode", void 0);
56
+ // 当前操作符节点的结束节点
57
+ _defineProperty(this, "endNode", void 0);
58
+ // 是否折叠
59
+ _defineProperty(this, "collapsed", false);
60
+ }
61
+ _createClass(ELNode, [{
62
+ key: "appendChild",
63
+ value: function appendChild(newNode, index) {
64
+ newNode.parent = this;
65
+ if (this.children) {
66
+ // 尝试在父节点中添加新节点
67
+ if (typeof index === 'number') {
68
+ // 1. 如果有索引
69
+ this.children.splice(index, 0, newNode);
70
+ return true;
71
+ }
72
+ if (index) {
73
+ // 2. 如果有目标节点
74
+ var _index = this.children.indexOf(index);
75
+ if (_index !== -1) {
76
+ this.children.splice(_index + 1, 0, newNode);
77
+ return true;
78
+ }
79
+ if (this.condition === index) {
80
+ // 3. 如果是在condition之后追加
81
+ return this.appendChild(newNode, 0);
82
+ }
83
+ }
84
+ // 4. 否则直接插入
85
+ this.children.push(newNode);
86
+ return true;
87
+ }
88
+ return false;
89
+ }
90
+
91
+ /**
92
+ * 在后面添加子节点
93
+ * @param newNode 子节点
94
+ * @param index 指定位置:可以是索引,也可以是兄弟节点
95
+ */
96
+ }, {
97
+ key: "prependChild",
98
+ value: function prependChild(newNode, index) {
99
+ newNode.parent = this;
100
+ if (this.children) {
101
+ // 尝试在父节点中添加新节点
102
+ if (typeof index === 'number') {
103
+ // 1. 如果有索引
104
+ this.children.splice(index, 0, newNode);
105
+ return true;
106
+ }
107
+ if (index) {
108
+ // 2. 如果有目标节点
109
+ var _index = this.children.indexOf(index);
110
+ if (_index !== -1) {
111
+ this.children.splice(_index, 0, newNode);
112
+ return true;
113
+ }
114
+ if (this.condition === index) {
115
+ // 3. 如果是在condition之前追加
116
+ return this.prepend(newNode);
117
+ }
118
+ }
119
+ // 4. 否则直接插入
120
+ this.children.splice(0, 0, newNode);
121
+ return true;
122
+ }
123
+ return false;
124
+ }
125
+
126
+ /**
127
+ * 删除指定的子节点
128
+ * @param child 子节点
129
+ */
130
+ }, {
131
+ key: "removeChild",
132
+ value: function removeChild(child) {
133
+ if (this.children) {
134
+ var _index2 = this.children.indexOf(child);
135
+ if (_index2 !== -1) {
136
+ this.children.splice(_index2, 1);
137
+ return true;
138
+ }
139
+ }
140
+ if (this.condition && this.condition === child) {
141
+ return this.remove();
142
+ }
143
+ return false;
144
+ }
145
+
146
+ /**
147
+ * 在当前节点的前面、插入新节点
148
+ * @param newNode 新节点
149
+ * @returns
150
+ */
151
+ }, {
152
+ key: "prepend",
153
+ value: function prepend(newNode) {
154
+ if (this.parent) {
155
+ if (this.parent.prependChild(newNode, this)) {
156
+ return true;
157
+ }
158
+ } else {
159
+ return this.prependChild(newNode);
160
+ }
161
+ return false;
162
+ }
163
+
164
+ /**
165
+ * 在当前节点的后面、插入新节点
166
+ * @param newNode 新节点
167
+ * @returns
168
+ */
169
+ }, {
170
+ key: "append",
171
+ value: function append(newNode) {
172
+ if (this.parent) {
173
+ if (this.parent.appendChild(newNode, this)) {
174
+ return true;
175
+ }
176
+ } else {
177
+ return this.appendChild(newNode);
178
+ }
179
+ return false;
180
+ }
181
+
182
+ /**
183
+ * 删除当前节点
184
+ */
185
+ }, {
186
+ key: "remove",
187
+ value: function remove() {
188
+ if (this.parent) {
189
+ return this.parent.removeChild(this);
190
+ }
191
+ return false;
192
+ }
193
+
194
+ /**
195
+ * 替换当前节点为新节点
196
+ * @param newNode 新节点
197
+ * @returns
198
+ */
199
+ }, {
200
+ key: "replace",
201
+ value: function replace(newNode) {
202
+ if (this.parent) {
203
+ this.parent.replaceChild(this, newNode);
204
+ }
205
+ return false;
206
+ }
207
+
208
+ /**
209
+ * 替换老节点为新节点
210
+ * @param oldNode 老节点
211
+ * @param newNode 新节点
212
+ */
213
+ }, {
214
+ key: "replaceChild",
215
+ value: function replaceChild(oldNode, newNode) {
216
+ newNode.parent = this;
217
+ if (this.children) {
218
+ // 尝试在子节点中查找老节点位置
219
+ var _index3 = this.children.indexOf(oldNode);
220
+ if (_index3 !== -1) {
221
+ this.children.splice(_index3, 1, newNode);
222
+ return true;
223
+ }
224
+ }
225
+ if (this.condition === oldNode) {
226
+ // 3. 如果是在condition之后追加
227
+ this.condition = newNode;
228
+ return true;
229
+ }
230
+ return false;
231
+ }
232
+
233
+ /**
234
+ * 转换为X6的图数据格式
235
+ */
236
+ }, {
237
+ key: "selectNodes",
238
+ value:
239
+ /**
240
+ * 获取需要选中的X6 Cell
241
+ */
242
+ function selectNodes() {
243
+ var _this$parent;
244
+ if (((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.condition) === this) {
245
+ return this.parent.getNodes();
246
+ }
247
+ return this.getNodes();
248
+ }
249
+
250
+ /**
251
+ * 获取当前X6 Node内容
252
+ */
253
+ }, {
254
+ key: "getNodes",
255
+ value: function getNodes() {
256
+ var nodes = _toConsumableArray(this.nodes);
257
+ if (this.condition) {
258
+ nodes = nodes.concat(this.condition.getNodes());
259
+ }
260
+ if (this.children && this.children.length) {
261
+ this.children.forEach(function (child) {
262
+ nodes = nodes.concat(child.getNodes());
263
+ });
264
+ }
265
+ return nodes;
266
+ }
267
+
268
+ /**
269
+ * 获取当前X6 Cell内容
270
+ */
271
+ }, {
272
+ key: "getCells",
273
+ value: function getCells() {
274
+ var cells = _toConsumableArray(this.cells);
275
+ if (this.condition) {
276
+ cells = cells.concat(this.condition.getCells());
277
+ }
278
+ if (this.children && this.children.length && !this.collapsed) {
279
+ this.children.forEach(function (child) {
280
+ cells = cells.concat(child.getCells());
281
+ });
282
+ }
283
+ return cells;
284
+ }
285
+
286
+ /**
287
+ * 重置当前存储的X6 Cell内容
288
+ */
289
+ }, {
290
+ key: "resetCells",
291
+ value: function resetCells(cells, nodes) {
292
+ this.cells = cells || [];
293
+ this.nodes = nodes || [];
294
+ }
295
+
296
+ /**
297
+ * 获取当前节点的开始节点
298
+ */
299
+ }, {
300
+ key: "getStartNode",
301
+ value: function getStartNode() {
302
+ return this.startNode;
303
+ }
304
+
305
+ /**
306
+ * 获取当前节点的结束节点
307
+ */
308
+ }, {
309
+ key: "getEndNode",
310
+ value: function getEndNode() {
311
+ return this.collapsed ? this.startNode : this.endNode;
312
+ }
313
+
314
+ /**
315
+ * 添加X6 Node相关内容
316
+ * @param node X6 节点
317
+ */
318
+ }, {
319
+ key: "addNode",
320
+ value: function addNode(node) {
321
+ this.nodes.push(node);
322
+ return node;
323
+ }
324
+
325
+ /**
326
+ * 获取属性
327
+ * @returns 属性
328
+ */
329
+ }, {
330
+ key: "getProperties",
331
+ value: function getProperties() {
332
+ var properties = this.properties || {};
333
+ Object.keys(properties).filter(function (key) {
334
+ return properties[key] === '' || properties[key] === null || key === 'logList' || key === 'inputParams';
335
+ }).forEach(function (key) {
336
+ return properties[key] = undefined;
337
+ });
338
+ return properties;
339
+ }
340
+
341
+ /**
342
+ * 设置属性
343
+ */
344
+ }, {
345
+ key: "setProperties",
346
+ value: function setProperties(properties) {
347
+ this.properties = properties;
348
+ }
349
+
350
+ /**
351
+ * 获取属性的EL表达式
352
+ * @returns 属性的EL表达式
353
+ */
354
+ }, {
355
+ key: "propertiesToEL",
356
+ value: function propertiesToEL() {
357
+ var properties = this.getProperties();
358
+ var noConcatList = ['scriptName', 'outputParams', 'reportMinioName', 'inputList', 'inputParams', 'logId', 'dataSetId', 'modelType', 'simpleQueryModel', 'aggList', 'knowledgeTreeData', 'aiKnowledgeFileList', 'aiKnowledgeFileId', 'filterParam', 'nodeFilters', 'applyList', 'sortCriteria', 'fieldSetting', 'filedSetting', 'aiNetSearch', 'logList', 'forecastId', 'curScheduleSet', 'propValue', 'rootCauseNode', 'rootCauseParam', 'analysisFieldTemplate'];
359
+ var propertiesFilter = Object.keys(properties).filter(function (key) {
360
+ return properties[key] !== undefined && !noConcatList.includes(key);
361
+ });
362
+ return propertiesFilter.map(function (key) {
363
+ if (key === 'bind') {
364
+ return ".".concat(key, "(\"set\",").concat(JSON.stringify(properties[key]), ")");
365
+ } else {
366
+ return ".".concat(key, "(").concat(propertyToString(properties[key]), ")");
367
+ }
368
+ }).join('');
369
+ }
370
+
371
+ /**
372
+ * 转换为EL表达式字符串
373
+ */
374
+ }, {
375
+ key: "toJSON",
376
+ value:
377
+ /**
378
+ * 转换为JSON格式
379
+ */
380
+ function toJSON() {
381
+ var type = this.type,
382
+ condition = this.condition,
383
+ children = this.children,
384
+ properties = this.properties,
385
+ id = this.id;
386
+ return Object.assign({
387
+ type: type
388
+ }, condition ? {
389
+ condition: condition.toJSON()
390
+ } : {}, children ? {
391
+ children: children.filter(function (x) {
392
+ return x;
393
+ }).map(function (child) {
394
+ return child.toJSON();
395
+ })
396
+ } : {}, id ? {
397
+ id: id
398
+ } : {}, properties ? {
399
+ properties: this.getProperties()
400
+ } : {});
401
+ }
402
+
403
+ /**
404
+ * 当前模型,是否是参数模型的父节点
405
+ * @param model 模型
406
+ * @returns
407
+ */
408
+ }, {
409
+ key: "isParentOf",
410
+ value: function isParentOf(model) {
411
+ var thisModel = this.proxy || this;
412
+ var nextModel = model.proxy || model;
413
+ while (nextModel) {
414
+ if (nextModel.parent === thisModel) {
415
+ return true;
416
+ }
417
+ nextModel = nextModel.parent;
418
+ }
419
+ return false;
420
+ }
421
+
422
+ /**
423
+ * 是否折叠
424
+ */
425
+ }, {
426
+ key: "isCollapsed",
427
+ value: function isCollapsed() {
428
+ var _this$parent2;
429
+ if (((_this$parent2 = this.parent) === null || _this$parent2 === void 0 ? void 0 : _this$parent2.condition) === this) {
430
+ return this.parent.isCollapsed();
431
+ }
432
+ return this.collapsed;
433
+ }
434
+
435
+ /**
436
+ * 折叠:展开、收起
437
+ */
438
+ }, {
439
+ key: "toggleCollapse",
440
+ value: function toggleCollapse(collapsed) {
441
+ var _this$parent3;
442
+ if (((_this$parent3 = this.parent) === null || _this$parent3 === void 0 ? void 0 : _this$parent3.condition) === this) {
443
+ this.parent.toggleCollapse(collapsed);
444
+ }
445
+ var target = typeof collapsed !== 'boolean' ? !this.collapsed : collapsed;
446
+ this.collapsed = !!target;
447
+ }
448
+ }]);
449
+ return ELNode;
450
+ }();
451
+ /**
452
+ * EL表达式操作符可以设置的id和tag等等属性。
453
+ */
454
+ export { ELNode as default };
455
+ function propertyToString(propertyValue) {
456
+ if (typeof propertyValue === 'string') {
457
+ return "'".concat(propertyValue, "'");
458
+ }
459
+ if (_typeof(propertyValue) === 'object') {
460
+ return propertyValue.name || propertyValue;
461
+ }
462
+ return propertyValue;
463
+ }
@@ -0,0 +1 @@
1
+ export declare const generateUniqueId: () => string;
@@ -0,0 +1,5 @@
1
+ export var generateUniqueId = function generateUniqueId() {
2
+ var timestamp = Date.now().toString(36).slice(-4);
3
+ var randomStr = Math.random().toString(36).slice(2, 6);
4
+ return timestamp + randomStr;
5
+ };
@@ -0,0 +1,87 @@
1
+ import { Cell, Node } from '@antv/x6';
2
+ import ELNode, { Properties } from '../node';
3
+ import { NodeTypeEnum } from '../../constant';
4
+ /**
5
+ * 操作符中结束节点的模型(作为操作符模型的代理),
6
+ * 操作符包括WHEN、SWITCH、IF、FOR、WHILE、CATCH、AND、OR、NOT等等。
7
+ */
8
+ export default class ELEndNode extends ELNode {
9
+ type: NodeTypeEnum;
10
+ /** 代理的节点组件 */
11
+ proxy: ELNode;
12
+ /** 代理节点组件的相关属性 */
13
+ parent?: ELNode;
14
+ constructor(proxy: ELNode);
15
+ /**
16
+ * 在结束节点的前面、插入新节点
17
+ * @param newNode 新节点
18
+ * @returns
19
+ */
20
+ prepend(newNode: ELNode): boolean;
21
+ /**
22
+ * 在结束节点的后面、插入新节点
23
+ * @param newNode 新节点
24
+ * @returns
25
+ */
26
+ append(newNode: ELNode): boolean;
27
+ /**
28
+ * 删除结束节点
29
+ */
30
+ remove(): boolean;
31
+ /**
32
+ * 替换当前节点为新节点
33
+ * @param newNode 新节点
34
+ * @returns
35
+ */
36
+ replace(newNode: ELNode): boolean;
37
+ /**
38
+ * 转换为X6的图数据格式
39
+ */
40
+ toCells(): Cell[];
41
+ /**
42
+ * 获取当前X6 Cell内容
43
+ */
44
+ getCells(): Cell[];
45
+ /**
46
+ * 获取当前X6 节点内容
47
+ */
48
+ getNodes(): Node[];
49
+ /**
50
+ * 获取当前节点的开始节点
51
+ */
52
+ getStartNode(): Node;
53
+ /**
54
+ * 获取当前节点的结束节点
55
+ */
56
+ getEndNode(): Node;
57
+ /**
58
+ * 获取属性
59
+ * @returns 属性
60
+ */
61
+ getProperties(): Properties;
62
+ /**
63
+ * 设置属性
64
+ */
65
+ setProperties(properties: Properties): void;
66
+ /**
67
+ * 获取属性的EL表达式
68
+ * @returns 属性的EL表达式
69
+ */
70
+ propertiesToEL(): string;
71
+ /**
72
+ * 转换为EL表达式字符串
73
+ */
74
+ toEL(prefix?: string): string;
75
+ /**
76
+ * 转换为JSON格式
77
+ */
78
+ toJSON(): Record<string, any>;
79
+ /**
80
+ * 是否折叠
81
+ */
82
+ isCollapsed(): boolean;
83
+ /**
84
+ * 折叠:展开、收起
85
+ */
86
+ toggleCollapse(collapsed?: boolean): void;
87
+ }