@coding-flow/flow-design 0.0.1

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 (503) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +214 -0
  3. package/dist/api/index.d.ts +2 -0
  4. package/dist/api/index.js +12 -0
  5. package/dist/api/workflow.d.ts +15 -0
  6. package/dist/api/workflow.js +36 -0
  7. package/dist/assets/icon-mouse.d.ts +5 -0
  8. package/dist/assets/icon-mouse.js +31 -0
  9. package/dist/assets/icon-pad.d.ts +5 -0
  10. package/dist/assets/icon-pad.js +50 -0
  11. package/dist/components/design-editor/components/base-node/index.d.ts +4 -0
  12. package/dist/components/design-editor/components/base-node/index.js +43 -0
  13. package/dist/components/design-editor/components/base-node/styles.d.ts +6 -0
  14. package/dist/components/design-editor/components/base-node/styles.js +32 -0
  15. package/dist/components/design-editor/components/branch-adder/index.d.ts +14 -0
  16. package/dist/components/design-editor/components/branch-adder/index.js +49 -0
  17. package/dist/components/design-editor/components/branch-adder/styles.d.ts +4 -0
  18. package/dist/components/design-editor/components/branch-adder/styles.js +27 -0
  19. package/dist/components/design-editor/components/collapse/index.d.ts +3 -0
  20. package/dist/components/design-editor/components/collapse/index.js +3 -0
  21. package/dist/components/design-editor/components/node-adder/index.d.ts +9 -0
  22. package/dist/components/design-editor/components/node-adder/index.js +55 -0
  23. package/dist/components/design-editor/components/node-adder/styles.d.ts +1 -0
  24. package/dist/components/design-editor/components/node-adder/styles.js +14 -0
  25. package/dist/components/design-editor/components/node-icon/index.d.ts +7 -0
  26. package/dist/components/design-editor/components/node-icon/index.js +62 -0
  27. package/dist/components/design-editor/components/node-list/index.d.ts +8 -0
  28. package/dist/components/design-editor/components/node-list/index.js +80 -0
  29. package/dist/components/design-editor/components/sidebar/index.d.ts +1 -0
  30. package/dist/components/design-editor/components/sidebar/index.js +2 -0
  31. package/dist/components/design-editor/components/sidebar/sidebar-node-renderer.d.ts +4 -0
  32. package/dist/components/design-editor/components/sidebar/sidebar-node-renderer.js +22 -0
  33. package/dist/components/design-editor/components/sidebar/sidebar-renderer.d.ts +7 -0
  34. package/dist/components/design-editor/components/sidebar/sidebar-renderer.js +67 -0
  35. package/dist/components/design-editor/context/index.d.ts +3 -0
  36. package/dist/components/design-editor/context/index.js +4 -0
  37. package/dist/components/design-editor/context/node-form-context.d.ts +8 -0
  38. package/dist/components/design-editor/context/node-form-context.js +3 -0
  39. package/dist/components/design-editor/context/node-render-context.d.ts +3 -0
  40. package/dist/components/design-editor/context/node-render-context.js +3 -0
  41. package/dist/components/design-editor/context/sidebar-context.d.ts +2 -0
  42. package/dist/components/design-editor/context/sidebar-context.js +3 -0
  43. package/dist/components/design-editor/hooks/index.d.ts +2 -0
  44. package/dist/components/design-editor/hooks/index.js +3 -0
  45. package/dist/components/design-editor/hooks/use-editor-props.d.ts +4 -0
  46. package/dist/components/design-editor/hooks/use-editor-props.js +124 -0
  47. package/dist/components/design-editor/hooks/use-is-sidebar.d.ts +1 -0
  48. package/dist/components/design-editor/hooks/use-is-sidebar.js +6 -0
  49. package/dist/components/design-editor/hooks/use-node-form.d.ts +6 -0
  50. package/dist/components/design-editor/hooks/use-node-form.js +6 -0
  51. package/dist/components/design-editor/hooks/use-node-render-context.d.ts +1 -0
  52. package/dist/components/design-editor/hooks/use-node-render-context.js +6 -0
  53. package/dist/components/design-editor/hooks/use-script-variables.d.ts +1 -0
  54. package/dist/components/design-editor/hooks/use-script-variables.js +10 -0
  55. package/dist/components/design-editor/index.css +4 -0
  56. package/dist/components/design-editor/index.d.ts +13 -0
  57. package/dist/components/design-editor/index.js +36 -0
  58. package/dist/components/design-editor/initial-data.d.ts +2 -0
  59. package/dist/components/design-editor/initial-data.js +19 -0
  60. package/dist/components/design-editor/node-components/action/index.d.ts +7 -0
  61. package/dist/components/design-editor/node-components/action/index.js +121 -0
  62. package/dist/components/design-editor/node-components/action/manager.d.ts +9 -0
  63. package/dist/components/design-editor/node-components/action/manager.js +18 -0
  64. package/dist/components/design-editor/node-components/action/presenter.d.ts +13 -0
  65. package/dist/components/design-editor/node-components/action/presenter.js +80 -0
  66. package/dist/components/design-editor/node-components/condition/index.d.ts +5 -0
  67. package/dist/components/design-editor/node-components/condition/index.js +59 -0
  68. package/dist/components/design-editor/node-components/header/index.d.ts +7 -0
  69. package/dist/components/design-editor/node-components/header/index.js +127 -0
  70. package/dist/components/design-editor/node-components/layout/index.d.ts +11 -0
  71. package/dist/components/design-editor/node-components/layout/index.js +41 -0
  72. package/dist/components/design-editor/node-components/node-hint/index.d.ts +6 -0
  73. package/dist/components/design-editor/node-components/node-hint/index.js +13 -0
  74. package/dist/components/design-editor/node-components/node-order/index.d.ts +1 -0
  75. package/dist/components/design-editor/node-components/node-order/index.js +31 -0
  76. package/dist/components/design-editor/node-components/panel/index.d.ts +10 -0
  77. package/dist/components/design-editor/node-components/panel/index.js +90 -0
  78. package/dist/components/design-editor/node-components/promission/index.d.ts +7 -0
  79. package/dist/components/design-editor/node-components/promission/index.js +108 -0
  80. package/dist/components/design-editor/node-components/promission/presenter.d.ts +24 -0
  81. package/dist/components/design-editor/node-components/promission/presenter.js +91 -0
  82. package/dist/components/design-editor/node-components/strategy/advice.d.ts +6 -0
  83. package/dist/components/design-editor/node-components/strategy/advice.js +49 -0
  84. package/dist/components/design-editor/node-components/strategy/deplay.d.ts +6 -0
  85. package/dist/components/design-editor/node-components/strategy/deplay.js +66 -0
  86. package/dist/components/design-editor/node-components/strategy/error-trigger.d.ts +6 -0
  87. package/dist/components/design-editor/node-components/strategy/error-trigger.js +60 -0
  88. package/dist/components/design-editor/node-components/strategy/multi-operator-audit.d.ts +6 -0
  89. package/dist/components/design-editor/node-components/strategy/multi-operator-audit.js +70 -0
  90. package/dist/components/design-editor/node-components/strategy/node-title.d.ts +5 -0
  91. package/dist/components/design-editor/node-components/strategy/node-title.js +59 -0
  92. package/dist/components/design-editor/node-components/strategy/operator-load.d.ts +6 -0
  93. package/dist/components/design-editor/node-components/strategy/operator-load.js +60 -0
  94. package/dist/components/design-editor/node-components/strategy/record-merge.d.ts +6 -0
  95. package/dist/components/design-editor/node-components/strategy/record-merge.js +31 -0
  96. package/dist/components/design-editor/node-components/strategy/resubmit.d.ts +6 -0
  97. package/dist/components/design-editor/node-components/strategy/resubmit.js +39 -0
  98. package/dist/components/design-editor/node-components/strategy/revoke.d.ts +6 -0
  99. package/dist/components/design-editor/node-components/strategy/revoke.js +59 -0
  100. package/dist/components/design-editor/node-components/strategy/router.d.ts +6 -0
  101. package/dist/components/design-editor/node-components/strategy/router.js +59 -0
  102. package/dist/components/design-editor/node-components/strategy/same-operator-audit.d.ts +6 -0
  103. package/dist/components/design-editor/node-components/strategy/same-operator-audit.js +39 -0
  104. package/dist/components/design-editor/node-components/strategy/sub-process.d.ts +6 -0
  105. package/dist/components/design-editor/node-components/strategy/sub-process.js +77 -0
  106. package/dist/components/design-editor/node-components/strategy/timeout.d.ts +6 -0
  107. package/dist/components/design-editor/node-components/strategy/timeout.js +63 -0
  108. package/dist/components/design-editor/node-components/strategy/trigger.d.ts +6 -0
  109. package/dist/components/design-editor/node-components/strategy/trigger.js +59 -0
  110. package/dist/components/design-editor/node-components/taps/action.d.ts +2 -0
  111. package/dist/components/design-editor/node-components/taps/action.js +12 -0
  112. package/dist/components/design-editor/node-components/taps/base.d.ts +6 -0
  113. package/dist/components/design-editor/node-components/taps/base.js +14 -0
  114. package/dist/components/design-editor/node-components/taps/promission.d.ts +2 -0
  115. package/dist/components/design-editor/node-components/taps/promission.js +12 -0
  116. package/dist/components/design-editor/node-components/view/index.d.ts +1 -0
  117. package/dist/components/design-editor/node-components/view/index.js +30 -0
  118. package/dist/components/design-editor/nodes/approval/form-meta.d.ts +4 -0
  119. package/dist/components/design-editor/nodes/approval/form-meta.js +65 -0
  120. package/dist/components/design-editor/nodes/approval/index.d.ts +2 -0
  121. package/dist/components/design-editor/nodes/approval/index.js +15 -0
  122. package/dist/components/design-editor/nodes/condition/form-meta.d.ts +4 -0
  123. package/dist/components/design-editor/nodes/condition/form-meta.js +24 -0
  124. package/dist/components/design-editor/nodes/condition/index.d.ts +2 -0
  125. package/dist/components/design-editor/nodes/condition/index.js +21 -0
  126. package/dist/components/design-editor/nodes/condition-branch/form-meta.d.ts +4 -0
  127. package/dist/components/design-editor/nodes/condition-branch/form-meta.js +42 -0
  128. package/dist/components/design-editor/nodes/condition-branch/index.d.ts +2 -0
  129. package/dist/components/design-editor/nodes/condition-branch/index.js +29 -0
  130. package/dist/components/design-editor/nodes/delay/form-meta.d.ts +4 -0
  131. package/dist/components/design-editor/nodes/delay/form-meta.js +39 -0
  132. package/dist/components/design-editor/nodes/delay/index.d.ts +2 -0
  133. package/dist/components/design-editor/nodes/delay/index.js +15 -0
  134. package/dist/components/design-editor/nodes/end/form-meta.d.ts +4 -0
  135. package/dist/components/design-editor/nodes/end/form-meta.js +36 -0
  136. package/dist/components/design-editor/nodes/end/index.d.ts +2 -0
  137. package/dist/components/design-editor/nodes/end/index.js +23 -0
  138. package/dist/components/design-editor/nodes/handle/form-meta.d.ts +4 -0
  139. package/dist/components/design-editor/nodes/handle/form-meta.js +63 -0
  140. package/dist/components/design-editor/nodes/handle/index.d.ts +2 -0
  141. package/dist/components/design-editor/nodes/handle/index.js +15 -0
  142. package/dist/components/design-editor/nodes/inclusive/form-meta.d.ts +4 -0
  143. package/dist/components/design-editor/nodes/inclusive/form-meta.js +24 -0
  144. package/dist/components/design-editor/nodes/inclusive/index.d.ts +2 -0
  145. package/dist/components/design-editor/nodes/inclusive/index.js +21 -0
  146. package/dist/components/design-editor/nodes/inclusive-branch/form-meta.d.ts +4 -0
  147. package/dist/components/design-editor/nodes/inclusive-branch/form-meta.js +42 -0
  148. package/dist/components/design-editor/nodes/inclusive-branch/index.d.ts +2 -0
  149. package/dist/components/design-editor/nodes/inclusive-branch/index.js +15 -0
  150. package/dist/components/design-editor/nodes/index.d.ts +2 -0
  151. package/dist/components/design-editor/nodes/index.js +33 -0
  152. package/dist/components/design-editor/nodes/notify/form-meta.d.ts +4 -0
  153. package/dist/components/design-editor/nodes/notify/form-meta.js +52 -0
  154. package/dist/components/design-editor/nodes/notify/index.d.ts +2 -0
  155. package/dist/components/design-editor/nodes/notify/index.js +15 -0
  156. package/dist/components/design-editor/nodes/parallel/form-meta.d.ts +4 -0
  157. package/dist/components/design-editor/nodes/parallel/form-meta.js +24 -0
  158. package/dist/components/design-editor/nodes/parallel/index.d.ts +2 -0
  159. package/dist/components/design-editor/nodes/parallel/index.js +21 -0
  160. package/dist/components/design-editor/nodes/parallel-branch/form-meta.d.ts +4 -0
  161. package/dist/components/design-editor/nodes/parallel-branch/form-meta.js +36 -0
  162. package/dist/components/design-editor/nodes/parallel-branch/index.d.ts +2 -0
  163. package/dist/components/design-editor/nodes/parallel-branch/index.js +33 -0
  164. package/dist/components/design-editor/nodes/router/form-meta.d.ts +4 -0
  165. package/dist/components/design-editor/nodes/router/form-meta.js +43 -0
  166. package/dist/components/design-editor/nodes/router/index.d.ts +2 -0
  167. package/dist/components/design-editor/nodes/router/index.js +23 -0
  168. package/dist/components/design-editor/nodes/start/form-meta.d.ts +4 -0
  169. package/dist/components/design-editor/nodes/start/form-meta.js +48 -0
  170. package/dist/components/design-editor/nodes/start/index.d.ts +2 -0
  171. package/dist/components/design-editor/nodes/start/index.js +19 -0
  172. package/dist/components/design-editor/nodes/sub-process/form-meta.d.ts +4 -0
  173. package/dist/components/design-editor/nodes/sub-process/form-meta.js +43 -0
  174. package/dist/components/design-editor/nodes/sub-process/index.d.ts +2 -0
  175. package/dist/components/design-editor/nodes/sub-process/index.js +15 -0
  176. package/dist/components/design-editor/nodes/trigger/form-meta.d.ts +4 -0
  177. package/dist/components/design-editor/nodes/trigger/form-meta.js +43 -0
  178. package/dist/components/design-editor/nodes/trigger/index.d.ts +2 -0
  179. package/dist/components/design-editor/nodes/trigger/index.js +15 -0
  180. package/dist/components/design-editor/styles.d.ts +6 -0
  181. package/dist/components/design-editor/styles.js +61 -0
  182. package/dist/components/design-editor/tools/download.d.ts +2 -0
  183. package/dist/components/design-editor/tools/download.js +65 -0
  184. package/dist/components/design-editor/tools/fit-view.d.ts +3 -0
  185. package/dist/components/design-editor/tools/fit-view.js +12 -0
  186. package/dist/components/design-editor/tools/index.d.ts +1 -0
  187. package/dist/components/design-editor/tools/index.js +42 -0
  188. package/dist/components/design-editor/tools/interactive.d.ts +9 -0
  189. package/dist/components/design-editor/tools/interactive.js +69 -0
  190. package/dist/components/design-editor/tools/minimap-switch.d.ts +4 -0
  191. package/dist/components/design-editor/tools/minimap-switch.js +21 -0
  192. package/dist/components/design-editor/tools/minimap.d.ts +3 -0
  193. package/dist/components/design-editor/tools/minimap.js +26 -0
  194. package/dist/components/design-editor/tools/mouse-pad-selector.css +100 -0
  195. package/dist/components/design-editor/tools/mouse-pad-selector.d.ts +15 -0
  196. package/dist/components/design-editor/tools/mouse-pad-selector.js +91 -0
  197. package/dist/components/design-editor/tools/readonly.d.ts +1 -0
  198. package/dist/components/design-editor/tools/readonly.js +36 -0
  199. package/dist/components/design-editor/tools/redo.d.ts +1 -0
  200. package/dist/components/design-editor/tools/redo.js +19 -0
  201. package/dist/components/design-editor/tools/switch-vertical.d.ts +1 -0
  202. package/dist/components/design-editor/tools/switch-vertical.js +22 -0
  203. package/dist/components/design-editor/tools/undo.d.ts +1 -0
  204. package/dist/components/design-editor/tools/undo.js +19 -0
  205. package/dist/components/design-editor/tools/zoom-select.d.ts +1 -0
  206. package/dist/components/design-editor/tools/zoom-select.js +75 -0
  207. package/dist/components/design-editor/typings/index.d.ts +1 -0
  208. package/dist/components/design-editor/typings/index.js +1 -0
  209. package/dist/components/design-editor/typings/node.d.ts +28 -0
  210. package/dist/components/design-editor/typings/node.js +1 -0
  211. package/dist/components/design-editor/version/components/version-content.d.ts +9 -0
  212. package/dist/components/design-editor/version/components/version-content.js +21 -0
  213. package/dist/components/design-editor/version/components/version-item.d.ts +10 -0
  214. package/dist/components/design-editor/version/components/version-item.js +117 -0
  215. package/dist/components/design-editor/version/edtior-version.d.ts +1 -0
  216. package/dist/components/design-editor/version/edtior-version.js +41 -0
  217. package/dist/components/design-editor/version/hooks/use-version-presenter.d.ts +5 -0
  218. package/dist/components/design-editor/version/hooks/use-version-presenter.js +24 -0
  219. package/dist/components/design-editor/version/index.d.ts +1 -0
  220. package/dist/components/design-editor/version/index.js +1 -0
  221. package/dist/components/design-editor/version/model.d.ts +7 -0
  222. package/dist/components/design-editor/version/model.js +21 -0
  223. package/dist/components/design-editor/version/presenter.d.ts +14 -0
  224. package/dist/components/design-editor/version/presenter.js +33 -0
  225. package/dist/components/design-editor/version/types.d.ts +12 -0
  226. package/dist/components/design-editor/version/types.js +0 -0
  227. package/dist/components/design-import/index.d.ts +7 -0
  228. package/dist/components/design-import/index.js +36 -0
  229. package/dist/components/design-import/upload.d.ts +7 -0
  230. package/dist/components/design-import/upload.js +29 -0
  231. package/dist/components/design-panel/context/index.d.ts +14 -0
  232. package/dist/components/design-panel/context/index.js +28 -0
  233. package/dist/components/design-panel/hooks/use-design-context.d.ts +10 -0
  234. package/dist/components/design-panel/hooks/use-design-context.js +38 -0
  235. package/dist/components/design-panel/hooks/use-node-router-manager.d.ts +2 -0
  236. package/dist/components/design-panel/hooks/use-node-router-manager.js +8 -0
  237. package/dist/components/design-panel/index.d.ts +3 -0
  238. package/dist/components/design-panel/index.js +12 -0
  239. package/dist/components/design-panel/layout/body.d.ts +1 -0
  240. package/dist/components/design-panel/layout/body.js +20 -0
  241. package/dist/components/design-panel/layout/footer.d.ts +1 -0
  242. package/dist/components/design-panel/layout/footer.js +4 -0
  243. package/dist/components/design-panel/layout/header.d.ts +1 -0
  244. package/dist/components/design-panel/layout/header.js +158 -0
  245. package/dist/components/design-panel/layout/index.d.ts +3 -0
  246. package/dist/components/design-panel/layout/index.js +29 -0
  247. package/dist/components/design-panel/manager/form.d.ts +27 -0
  248. package/dist/components/design-panel/manager/form.js +89 -0
  249. package/dist/components/design-panel/manager/node.d.ts +71 -0
  250. package/dist/components/design-panel/manager/node.js +174 -0
  251. package/dist/components/design-panel/manager/strategy.d.ts +8 -0
  252. package/dist/components/design-panel/manager/strategy.js +34 -0
  253. package/dist/components/design-panel/model.d.ts +7 -0
  254. package/dist/components/design-panel/model.js +19 -0
  255. package/dist/components/design-panel/panels/workflow/interfere.d.ts +7 -0
  256. package/dist/components/design-panel/panels/workflow/interfere.js +19 -0
  257. package/dist/components/design-panel/panels/workflow/urge.d.ts +7 -0
  258. package/dist/components/design-panel/panels/workflow/urge.js +33 -0
  259. package/dist/components/design-panel/presenters/convertor/index.d.ts +7 -0
  260. package/dist/components/design-panel/presenters/convertor/index.js +13 -0
  261. package/dist/components/design-panel/presenters/index.d.ts +32 -0
  262. package/dist/components/design-panel/presenters/index.js +153 -0
  263. package/dist/components/design-panel/store.d.ts +15 -0
  264. package/dist/components/design-panel/store.js +24 -0
  265. package/dist/components/design-panel/tabs/base/index.d.ts +1 -0
  266. package/dist/components/design-panel/tabs/base/index.js +134 -0
  267. package/dist/components/design-panel/tabs/base/operator.d.ts +7 -0
  268. package/dist/components/design-panel/tabs/base/operator.js +41 -0
  269. package/dist/components/design-panel/tabs/flow.d.ts +1 -0
  270. package/dist/components/design-panel/tabs/flow.js +57 -0
  271. package/dist/components/design-panel/tabs/form/attrubute.d.ts +12 -0
  272. package/dist/components/design-panel/tabs/form/attrubute.js +122 -0
  273. package/dist/components/design-panel/tabs/form/form-type.d.ts +7 -0
  274. package/dist/components/design-panel/tabs/form/form-type.js +34 -0
  275. package/dist/components/design-panel/tabs/form/index.d.ts +1 -0
  276. package/dist/components/design-panel/tabs/form/index.js +43 -0
  277. package/dist/components/design-panel/tabs/form/model.d.ts +10 -0
  278. package/dist/components/design-panel/tabs/form/model.js +156 -0
  279. package/dist/components/design-panel/tabs/form/sub-form.d.ts +9 -0
  280. package/dist/components/design-panel/tabs/form/sub-form.js +52 -0
  281. package/dist/components/design-panel/tabs/form/table.d.ts +8 -0
  282. package/dist/components/design-panel/tabs/form/table.js +168 -0
  283. package/dist/components/design-panel/tabs/setting.d.ts +1 -0
  284. package/dist/components/design-panel/tabs/setting.js +49 -0
  285. package/dist/components/design-panel/types.d.ts +42 -0
  286. package/dist/components/design-panel/types.js +19 -0
  287. package/dist/components/groovy-code/index.d.ts +15 -0
  288. package/dist/components/groovy-code/index.js +160 -0
  289. package/dist/index.d.ts +3 -0
  290. package/dist/index.js +3 -0
  291. package/dist/plugins/action-custom-view-type.d.ts +7 -0
  292. package/dist/plugins/action-custom-view-type.js +2 -0
  293. package/dist/plugins/action-reject-view-type.d.ts +6 -0
  294. package/dist/plugins/action-reject-view-type.js +2 -0
  295. package/dist/plugins/condition-view-type.d.ts +12 -0
  296. package/dist/plugins/condition-view-type.js +2 -0
  297. package/dist/plugins/error-trigger-view-type.d.ts +12 -0
  298. package/dist/plugins/error-trigger-view-type.js +2 -0
  299. package/dist/plugins/index.d.ts +10 -0
  300. package/dist/plugins/index.js +11 -0
  301. package/dist/plugins/node-title-view-type.d.ts +12 -0
  302. package/dist/plugins/node-title-view-type.js +2 -0
  303. package/dist/plugins/operator-create-view-type.d.ts +7 -0
  304. package/dist/plugins/operator-create-view-type.js +2 -0
  305. package/dist/plugins/operator-load-view-type.d.ts +7 -0
  306. package/dist/plugins/operator-load-view-type.js +2 -0
  307. package/dist/plugins/router-view-type.d.ts +12 -0
  308. package/dist/plugins/router-view-type.js +2 -0
  309. package/dist/plugins/sub-process-operator-view-type.d.ts +7 -0
  310. package/dist/plugins/sub-process-operator-view-type.js +2 -0
  311. package/dist/plugins/sub-process-view-type.d.ts +12 -0
  312. package/dist/plugins/sub-process-view-type.js +2 -0
  313. package/dist/plugins/trigger-view-type.d.ts +12 -0
  314. package/dist/plugins/trigger-view-type.js +2 -0
  315. package/dist/plugins/view/action-custom-view.d.ts +3 -0
  316. package/dist/plugins/view/action-custom-view.js +66 -0
  317. package/dist/plugins/view/action-reject-view.d.ts +3 -0
  318. package/dist/plugins/view/action-reject-view.js +34 -0
  319. package/dist/plugins/view/condition-view.d.ts +7 -0
  320. package/dist/plugins/view/condition-view.js +15 -0
  321. package/dist/plugins/view/error-trigger-view.d.ts +8 -0
  322. package/dist/plugins/view/error-trigger-view.js +89 -0
  323. package/dist/plugins/view/node-title-view.d.ts +3 -0
  324. package/dist/plugins/view/node-title-view.js +76 -0
  325. package/dist/plugins/view/operator-create-view.d.ts +3 -0
  326. package/dist/plugins/view/operator-create-view.js +62 -0
  327. package/dist/plugins/view/operator-load-view.d.ts +3 -0
  328. package/dist/plugins/view/operator-load-view.js +63 -0
  329. package/dist/plugins/view/router-view.d.ts +7 -0
  330. package/dist/plugins/view/router-view.js +62 -0
  331. package/dist/plugins/view/sub-process-opreator-view.d.ts +7 -0
  332. package/dist/plugins/view/sub-process-opreator-view.js +20 -0
  333. package/dist/plugins/view/sub-process-view.d.ts +7 -0
  334. package/dist/plugins/view/sub-process-view.js +45 -0
  335. package/dist/plugins/view/trigger-view.d.ts +3 -0
  336. package/dist/plugins/view/trigger-view.js +17 -0
  337. package/dist/script-components/components/action/components/add-audit.d.ts +3 -0
  338. package/dist/script-components/components/action/components/add-audit.js +26 -0
  339. package/dist/script-components/components/action/components/custom.d.ts +3 -0
  340. package/dist/script-components/components/action/components/custom.js +28 -0
  341. package/dist/script-components/components/action/components/delegate.d.ts +3 -0
  342. package/dist/script-components/components/action/components/delegate.js +26 -0
  343. package/dist/script-components/components/action/components/factory.d.ts +11 -0
  344. package/dist/script-components/components/action/components/factory.js +28 -0
  345. package/dist/script-components/components/action/components/reject.d.ts +3 -0
  346. package/dist/script-components/components/action/components/reject.js +19 -0
  347. package/dist/script-components/components/action/components/transfer.d.ts +3 -0
  348. package/dist/script-components/components/action/components/transfer.js +26 -0
  349. package/dist/script-components/components/action/icon.d.ts +7 -0
  350. package/dist/script-components/components/action/icon.js +97 -0
  351. package/dist/script-components/components/action/index.d.ts +3 -0
  352. package/dist/script-components/components/action/index.js +69 -0
  353. package/dist/script-components/components/action/script.d.ts +8 -0
  354. package/dist/script-components/components/action/script.js +68 -0
  355. package/dist/script-components/components/action/style.d.ts +7 -0
  356. package/dist/script-components/components/action/style.js +128 -0
  357. package/dist/script-components/components/advanced-script-editor.d.ts +25 -0
  358. package/dist/script-components/components/advanced-script-editor.js +76 -0
  359. package/dist/script-components/components/condition/components/condition-group/condition.d.ts +9 -0
  360. package/dist/script-components/components/condition/components/condition-group/condition.js +122 -0
  361. package/dist/script-components/components/condition/components/condition-group/group.d.ts +4 -0
  362. package/dist/script-components/components/condition/components/condition-group/group.js +93 -0
  363. package/dist/script-components/components/condition/components/condition-group/index.d.ts +1 -0
  364. package/dist/script-components/components/condition/components/condition-group/index.js +1 -0
  365. package/dist/script-components/components/condition/components/condition-group/type.d.ts +8 -0
  366. package/dist/script-components/components/condition/components/condition-group/type.js +23 -0
  367. package/dist/script-components/components/condition/components/condition-panel.d.ts +3 -0
  368. package/dist/script-components/components/condition/components/condition-panel.js +55 -0
  369. package/dist/script-components/components/condition/components/condition-relation/action.d.ts +3 -0
  370. package/dist/script-components/components/condition/components/condition-relation/action.js +24 -0
  371. package/dist/script-components/components/condition/components/condition-relation/and.d.ts +3 -0
  372. package/dist/script-components/components/condition/components/condition-relation/and.js +24 -0
  373. package/dist/script-components/components/condition/components/condition-relation/condition.d.ts +3 -0
  374. package/dist/script-components/components/condition/components/condition-relation/condition.js +24 -0
  375. package/dist/script-components/components/condition/components/condition-relation/domain/menu-relation.d.ts +19 -0
  376. package/dist/script-components/components/condition/components/condition-relation/domain/menu-relation.js +145 -0
  377. package/dist/script-components/components/condition/components/condition-relation/domain/relation-validate.d.ts +15 -0
  378. package/dist/script-components/components/condition/components/condition-relation/domain/relation-validate.js +60 -0
  379. package/dist/script-components/components/condition/components/condition-relation/group.d.ts +3 -0
  380. package/dist/script-components/components/condition/components/condition-relation/group.js +44 -0
  381. package/dist/script-components/components/condition/components/condition-relation/hooks/use-dropdown-menus.d.ts +2 -0
  382. package/dist/script-components/components/condition/components/condition-relation/hooks/use-dropdown-menus.js +15 -0
  383. package/dist/script-components/components/condition/components/condition-relation/index.d.ts +1 -0
  384. package/dist/script-components/components/condition/components/condition-relation/index.js +34 -0
  385. package/dist/script-components/components/condition/components/condition-relation/or.d.ts +3 -0
  386. package/dist/script-components/components/condition/components/condition-relation/or.js +24 -0
  387. package/dist/script-components/components/condition/components/condition-relation/render.d.ts +11 -0
  388. package/dist/script-components/components/condition/components/condition-relation/render.js +49 -0
  389. package/dist/script-components/components/condition/context/index.d.ts +13 -0
  390. package/dist/script-components/components/condition/context/index.js +23 -0
  391. package/dist/script-components/components/condition/convertor/groovy.d.ts +10 -0
  392. package/dist/script-components/components/condition/convertor/groovy.js +131 -0
  393. package/dist/script-components/components/condition/convertor/group.d.ts +6 -0
  394. package/dist/script-components/components/condition/convertor/group.js +18 -0
  395. package/dist/script-components/components/condition/hooks/use-condition-context.d.ts +10 -0
  396. package/dist/script-components/components/condition/hooks/use-condition-context.js +47 -0
  397. package/dist/script-components/components/condition/hooks/use-condition-script-convertor.d.ts +2 -0
  398. package/dist/script-components/components/condition/hooks/use-condition-script-convertor.js +14 -0
  399. package/dist/script-components/components/condition/index.d.ts +3 -0
  400. package/dist/script-components/components/condition/index.js +23 -0
  401. package/dist/script-components/components/condition/models/index.d.ts +3 -0
  402. package/dist/script-components/components/condition/models/index.js +3 -0
  403. package/dist/script-components/components/condition/presenters/group-presenter.d.ts +31 -0
  404. package/dist/script-components/components/condition/presenters/group-presenter.js +80 -0
  405. package/dist/script-components/components/condition/presenters/index.d.ts +21 -0
  406. package/dist/script-components/components/condition/presenters/index.js +36 -0
  407. package/dist/script-components/components/condition/presenters/relation-presenter.d.ts +13 -0
  408. package/dist/script-components/components/condition/presenters/relation-presenter.js +65 -0
  409. package/dist/script-components/components/condition/store.d.ts +15 -0
  410. package/dist/script-components/components/condition/store.js +24 -0
  411. package/dist/script-components/components/condition/typings/index.d.ts +79 -0
  412. package/dist/script-components/components/condition/typings/index.js +32 -0
  413. package/dist/script-components/components/form-data/components/list.d.ts +7 -0
  414. package/dist/script-components/components/form-data/components/list.js +18 -0
  415. package/dist/script-components/components/form-data/components/value.d.ts +7 -0
  416. package/dist/script-components/components/form-data/components/value.js +28 -0
  417. package/dist/script-components/components/form-data/context/index.d.ts +12 -0
  418. package/dist/script-components/components/form-data/context/index.js +20 -0
  419. package/dist/script-components/components/form-data/hooks/use-form-data-context.d.ts +10 -0
  420. package/dist/script-components/components/form-data/hooks/use-form-data-context.js +37 -0
  421. package/dist/script-components/components/form-data/index.d.ts +9 -0
  422. package/dist/script-components/components/form-data/index.js +44 -0
  423. package/dist/script-components/components/form-data/presenters/flow-form-presenter.d.ts +29 -0
  424. package/dist/script-components/components/form-data/presenters/flow-form-presenter.js +63 -0
  425. package/dist/script-components/components/form-data/presenters/form-data-presenter.d.ts +35 -0
  426. package/dist/script-components/components/form-data/presenters/form-data-presenter.js +109 -0
  427. package/dist/script-components/components/form-data/presenters/index.d.ts +2 -0
  428. package/dist/script-components/components/form-data/presenters/index.js +2 -0
  429. package/dist/script-components/components/form-data/store.d.ts +15 -0
  430. package/dist/script-components/components/form-data/store.js +21 -0
  431. package/dist/script-components/components/form-data/types.d.ts +24 -0
  432. package/dist/script-components/components/form-data/types.js +0 -0
  433. package/dist/script-components/components/groovy-script-modal.d.ts +35 -0
  434. package/dist/script-components/components/groovy-script-modal.js +43 -0
  435. package/dist/script-components/components/groovy-script-preview.d.ts +7 -0
  436. package/dist/script-components/components/groovy-script-preview.js +41 -0
  437. package/dist/script-components/components/sub-process/hooks/use-current-workflow-presenter.d.ts +2 -0
  438. package/dist/script-components/components/sub-process/hooks/use-current-workflow-presenter.js +7 -0
  439. package/dist/script-components/components/sub-process/hooks/use-sub-process-presenter.d.ts +3 -0
  440. package/dist/script-components/components/sub-process/hooks/use-sub-process-presenter.js +8 -0
  441. package/dist/script-components/components/sub-process/hooks/use-target-workflow-presenter.d.ts +6 -0
  442. package/dist/script-components/components/sub-process/hooks/use-target-workflow-presenter.js +24 -0
  443. package/dist/script-components/components/sub-process/index.d.ts +3 -0
  444. package/dist/script-components/components/sub-process/index.js +71 -0
  445. package/dist/script-components/components/sub-process/models/index.d.ts +5 -0
  446. package/dist/script-components/components/sub-process/models/index.js +14 -0
  447. package/dist/script-components/components/sub-process/presenters/current-workflow-presenter.d.ts +9 -0
  448. package/dist/script-components/components/sub-process/presenters/current-workflow-presenter.js +19 -0
  449. package/dist/script-components/components/sub-process/presenters/index.d.ts +3 -0
  450. package/dist/script-components/components/sub-process/presenters/index.js +3 -0
  451. package/dist/script-components/components/sub-process/presenters/sub-process-presenter.d.ts +9 -0
  452. package/dist/script-components/components/sub-process/presenters/sub-process-presenter.js +34 -0
  453. package/dist/script-components/components/sub-process/presenters/target-workflow-presenter.d.ts +11 -0
  454. package/dist/script-components/components/sub-process/presenters/target-workflow-presenter.js +32 -0
  455. package/dist/script-components/components/sub-process/typings/index.d.ts +32 -0
  456. package/dist/script-components/components/sub-process/typings/index.js +0 -0
  457. package/dist/script-components/components/variable-picker.d.ts +13 -0
  458. package/dist/script-components/components/variable-picker.js +134 -0
  459. package/dist/script-components/default-script.d.ts +9 -0
  460. package/dist/script-components/default-script.js +51 -0
  461. package/dist/script-components/hooks/use-script-meta-data.d.ts +1 -0
  462. package/dist/script-components/hooks/use-script-meta-data.js +7 -0
  463. package/dist/script-components/modal/action-config-modal.d.ts +3 -0
  464. package/dist/script-components/modal/action-config-modal.js +24 -0
  465. package/dist/script-components/modal/condition-config-modal.d.ts +15 -0
  466. package/dist/script-components/modal/condition-config-modal.js +34 -0
  467. package/dist/script-components/modal/error-trigger-config-modal.d.ts +15 -0
  468. package/dist/script-components/modal/error-trigger-config-modal.js +33 -0
  469. package/dist/script-components/modal/node-title-config-modal.d.ts +19 -0
  470. package/dist/script-components/modal/node-title-config-modal.js +33 -0
  471. package/dist/script-components/modal/operator-create-config-modal.d.ts +13 -0
  472. package/dist/script-components/modal/operator-create-config-modal.js +34 -0
  473. package/dist/script-components/modal/operator-load-config-modal.d.ts +13 -0
  474. package/dist/script-components/modal/operator-load-config-modal.js +34 -0
  475. package/dist/script-components/modal/router-config-modal.d.ts +15 -0
  476. package/dist/script-components/modal/router-config-modal.js +33 -0
  477. package/dist/script-components/modal/sub-process-config-modal.d.ts +15 -0
  478. package/dist/script-components/modal/sub-process-config-modal.js +33 -0
  479. package/dist/script-components/modal/trigger-config-modal.d.ts +15 -0
  480. package/dist/script-components/modal/trigger-config-modal.js +33 -0
  481. package/dist/script-components/services/action-custom.d.ts +4 -0
  482. package/dist/script-components/services/action-custom.js +23 -0
  483. package/dist/script-components/services/action-reject.d.ts +13 -0
  484. package/dist/script-components/services/action-reject.js +50 -0
  485. package/dist/script-components/services/node-error-trigger.d.ts +9 -0
  486. package/dist/script-components/services/node-error-trigger.js +10 -0
  487. package/dist/script-components/services/node-router.d.ts +9 -0
  488. package/dist/script-components/services/node-router.js +10 -0
  489. package/dist/script-components/services/node-title.d.ts +9 -0
  490. package/dist/script-components/services/node-title.js +20 -0
  491. package/dist/script-components/typings/action.d.ts +20 -0
  492. package/dist/script-components/typings/action.js +0 -0
  493. package/dist/script-components/typings/index.d.ts +2 -0
  494. package/dist/script-components/typings/index.js +2 -0
  495. package/dist/script-components/typings/script.d.ts +46 -0
  496. package/dist/script-components/typings/script.js +18 -0
  497. package/dist/script-components/utils/varibale.d.ts +27 -0
  498. package/dist/script-components/utils/varibale.js +181 -0
  499. package/dist/utils/id.d.ts +3 -0
  500. package/dist/utils/id.js +7 -0
  501. package/dist/utils/index.d.ts +1 -0
  502. package/dist/utils/index.js +1 -0
  503. package/package.json +74 -0
@@ -0,0 +1,51 @@
1
+ const SCRIPT_DEFAULT_OPERATOR_CREATE = `// @SCRIPT_TITLE 任意人员
2
+ // @SCRIPT_META {"type":"any"}
3
+ def run(request){
4
+ return true;
5
+ }
6
+ `;
7
+ const SCRIPT_DEFAULT_OPERATOR_LOAD = `// @SCRIPT_TITLE 流程创建者
8
+ // @SCRIPT_META {"type":"creator"}
9
+ def run(request){
10
+ return [request.getCreatedOperatorId()]
11
+ }
12
+ `;
13
+ const SCRIPT_DEFAULT_NODE_TITLE = `// @SCRIPT_TITLE 您有一条待办消息
14
+ def run(request){
15
+ return "您有一条待办消息"
16
+ }
17
+ `;
18
+ const SCRIPT_DEFAULT_ERROR_TRIGGER = `// @SCRIPT_TITLE 回退至开始节点
19
+ // @SCRIPT_META {"type":"node","node":"START"}
20
+ def run(request){
21
+ return request.getStartNode().getId();
22
+ }
23
+ `;
24
+ const SCRIPT_DEFAULT_CONDITION = `// @SCRIPT_TITLE 默认条件(允许执行)
25
+ def run(request){
26
+ return true;
27
+ }
28
+ `;
29
+ const SCRIPT_DEFAULT_ROUTER = `// @SCRIPT_TITLE 发起节点
30
+ // @SCRIPT_META {"node":"START"}
31
+ def run(request){
32
+ return request.getStartNode().getId();
33
+ }
34
+ `;
35
+ const SCRIPT_DEFAULT_TRIGGER = `// @SCRIPT_TITLE 示例触发节点(打印触发日志)
36
+ def run(request){
37
+ print('hello trigger node.\\n');
38
+ }
39
+ `;
40
+ const SCRIPT_DEFAULT_CUSTOM = `// @SCRIPT_TITLE 默认条件 触发通过
41
+ // @SCRIPT_META {"trigger":"PASS"}
42
+ def run(request){
43
+ return 'PASS';
44
+ }
45
+ `;
46
+ const SCRIPT_DEFAULT_SUB_PROCESS = `// @SCRIPT_TITLE 创建当前流程
47
+ def run(request){
48
+ return request.toCreateRequest()
49
+ }
50
+ `;
51
+ export { SCRIPT_DEFAULT_CONDITION, SCRIPT_DEFAULT_CUSTOM, SCRIPT_DEFAULT_ERROR_TRIGGER, SCRIPT_DEFAULT_NODE_TITLE, SCRIPT_DEFAULT_OPERATOR_CREATE, SCRIPT_DEFAULT_OPERATOR_LOAD, SCRIPT_DEFAULT_ROUTER, SCRIPT_DEFAULT_SUB_PROCESS, SCRIPT_DEFAULT_TRIGGER };
@@ -0,0 +1 @@
1
+ export declare const useScriptMetaData: (script: string) => any;
@@ -0,0 +1,7 @@
1
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
2
+ const useScriptMetaData = (script)=>{
3
+ const meta = GroovyScriptConvertorUtil.getScriptMeta(script);
4
+ if (meta) return JSON.parse(meta);
5
+ return {};
6
+ };
7
+ export { useScriptMetaData };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { ActionModalProps } from "../typings";
3
+ export declare const ActionConfigModal: React.FC<ActionModalProps>;
@@ -0,0 +1,24 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Modal } from "antd";
4
+ import { ActionForm } from "../components/action/index.js";
5
+ const ActionConfigModal = (props)=>/*#__PURE__*/ jsx(Modal, {
6
+ open: props.open,
7
+ onCancel: props.onCancel,
8
+ title: "编辑按钮",
9
+ width: "65%",
10
+ destroyOnHidden: true,
11
+ onOk: ()=>{
12
+ props.form.submit();
13
+ },
14
+ children: /*#__PURE__*/ jsx(ActionForm, {
15
+ nodeId: props.nodeId,
16
+ form: props.form,
17
+ manager: props.manager,
18
+ onFinish: (values)=>{
19
+ props.onFinish(values);
20
+ props.onCancel();
21
+ }
22
+ })
23
+ });
24
+ export { ActionConfigModal };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { GroovyVariableMapping } from "../typings";
3
+ export interface ConditionConfigModalProps {
4
+ /** 是否展示 **/
5
+ open: boolean;
6
+ /** 当前脚本 */
7
+ script: string;
8
+ /** 表单字段(用于动态生成变量) */
9
+ variables?: GroovyVariableMapping[];
10
+ /** 取消回调 */
11
+ onCancel: () => void;
12
+ /** 确认回调 */
13
+ onConfirm: (script: string) => void;
14
+ }
15
+ export declare const ConditionConfigModal: React.FC<ConditionConfigModalProps>;
@@ -0,0 +1,34 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ScriptType } from "../typings/index.js";
4
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { SCRIPT_DEFAULT_CONDITION } from "../default-script.js";
8
+ import { ConditionPluginView } from "../../plugins/view/condition-view.js";
9
+ const ConditionConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_CONDITION
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(ConditionPluginView, {
18
+ ...props
19
+ })
20
+ ]
21
+ });
22
+ };
23
+ const ConditionConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
24
+ type: ScriptType.CONDITION,
25
+ open: props.open,
26
+ script: props.script,
27
+ variables: props.variables || [],
28
+ onConfirm: props.onConfirm,
29
+ onCancel: props.onCancel,
30
+ title: "条件配置",
31
+ width: "70%",
32
+ content: ConditionConfigContent
33
+ });
34
+ export { ConditionConfigModal };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { GroovyVariableMapping } from "../typings";
3
+ export interface ErrorTriggerConfigModalProps {
4
+ /** 是否展示 **/
5
+ open: boolean;
6
+ /** 当前脚本 */
7
+ script: string;
8
+ /** 表单字段(用于动态生成变量) */
9
+ variables?: GroovyVariableMapping[];
10
+ /** 取消回调 */
11
+ onCancel: () => void;
12
+ /** 确认回调 */
13
+ onConfirm: (script: string) => void;
14
+ }
15
+ export declare const ErrorTriggerConfigModal: React.FC<ErrorTriggerConfigModalProps>;
@@ -0,0 +1,33 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ScriptType } from "../typings/index.js";
4
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { SCRIPT_DEFAULT_ERROR_TRIGGER } from "../default-script.js";
8
+ import { ErrorTriggerPluginView } from "../../plugins/view/error-trigger-view.js";
9
+ const ErrorTriggerConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_ERROR_TRIGGER
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(ErrorTriggerPluginView, {
18
+ ...props
19
+ })
20
+ ]
21
+ });
22
+ };
23
+ const ErrorTriggerConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
24
+ type: ScriptType.ERROR_TRIGGER,
25
+ open: props.open,
26
+ script: props.script,
27
+ variables: props.variables || [],
28
+ onConfirm: props.onConfirm,
29
+ onCancel: props.onCancel,
30
+ title: "异常配置",
31
+ content: ErrorTriggerConfigContent
32
+ });
33
+ export { ErrorTriggerConfigModal };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { GroovyVariableMapping } from "../typings";
3
+ export interface NodeTitleConfigModalProps {
4
+ /** 是否展示 **/
5
+ open: boolean;
6
+ /** 当前脚本 */
7
+ script: string;
8
+ /** 表单字段(用于动态生成变量) */
9
+ variables?: GroovyVariableMapping[];
10
+ /** 取消回调 */
11
+ onCancel: () => void;
12
+ /** 确认回调 */
13
+ onConfirm: (script: string) => void;
14
+ }
15
+ /**
16
+ * 标题配置弹框
17
+ * 支持普通模式和高级模式
18
+ */
19
+ export declare const NodeTitleConfigModal: React.FC<NodeTitleConfigModalProps>;
@@ -0,0 +1,33 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
4
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
5
+ import { ScriptType } from "../typings/index.js";
6
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
7
+ import { NodeTitlePluginView } from "../../plugins/view/node-title-view.js";
8
+ import { SCRIPT_DEFAULT_NODE_TITLE } from "../default-script.js";
9
+ const NodeTitleConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_NODE_TITLE
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(NodeTitlePluginView, {
18
+ ...props
19
+ })
20
+ ]
21
+ });
22
+ };
23
+ const NodeTitleConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
24
+ type: ScriptType.TITLE,
25
+ open: props.open,
26
+ script: props.script,
27
+ variables: props.variables || [],
28
+ onConfirm: props.onConfirm,
29
+ onCancel: props.onCancel,
30
+ title: "标题配置",
31
+ content: NodeTitleConfigContent
32
+ });
33
+ export { NodeTitleConfigModal };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface OperatorCreateConfigModalProps {
3
+ /** 是否展示 **/
4
+ open: boolean;
5
+ /** 当前脚本 */
6
+ script: string;
7
+ /** 取消回调 */
8
+ onCancel: () => void;
9
+ /** 确认回调 */
10
+ onConfirm: (script: string) => void;
11
+ }
12
+ export declare const OperatorCreateConfigModal: React.FC<OperatorCreateConfigModalProps>;
13
+ export {};
@@ -0,0 +1,34 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
4
+ import { ScriptType } from "../typings/index.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { OperatorCreatePluginView } from "../../plugins/view/operator-create-view.js";
8
+ import { SCRIPT_DEFAULT_OPERATOR_CREATE } from "../default-script.js";
9
+ const OperatorCreateConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_OPERATOR_CREATE
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(OperatorCreatePluginView, {
18
+ script: props.script,
19
+ onChange: props.onChange
20
+ })
21
+ ]
22
+ });
23
+ };
24
+ const OperatorCreateConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
25
+ title: "发起人员配置",
26
+ type: ScriptType.OPERATOR_CREATE,
27
+ variables: [],
28
+ script: props.script,
29
+ content: OperatorCreateConfigContent,
30
+ open: props.open,
31
+ onCancel: props.onCancel,
32
+ onConfirm: props.onConfirm
33
+ });
34
+ export { OperatorCreateConfigModal };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface OperatorLoadConfigModalProps {
3
+ /** 是否展示 **/
4
+ open: boolean;
5
+ /** 当前脚本 */
6
+ script: string;
7
+ /** 取消回调 */
8
+ onCancel: () => void;
9
+ /** 确认回调 */
10
+ onConfirm: (script: string) => void;
11
+ }
12
+ export declare const OperatorLoadConfigModal: React.FC<OperatorLoadConfigModalProps>;
13
+ export {};
@@ -0,0 +1,34 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
4
+ import { ScriptType } from "../typings/index.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { OperatorLoadPluginView } from "../../plugins/view/operator-load-view.js";
8
+ import { SCRIPT_DEFAULT_OPERATOR_LOAD } from "../default-script.js";
9
+ const OperatorLoadConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_OPERATOR_LOAD
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(OperatorLoadPluginView, {
18
+ script: props.script,
19
+ onChange: props.onChange
20
+ })
21
+ ]
22
+ });
23
+ };
24
+ const OperatorLoadConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
25
+ title: "操作人配置",
26
+ type: ScriptType.OPERATOR_LOAD,
27
+ variables: [],
28
+ script: props.script,
29
+ content: OperatorLoadConfigContent,
30
+ open: props.open,
31
+ onCancel: props.onCancel,
32
+ onConfirm: props.onConfirm
33
+ });
34
+ export { OperatorLoadConfigModal };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { GroovyVariableMapping } from "../typings";
3
+ export interface RouterConfigModalProps {
4
+ /** 是否展示 **/
5
+ open: boolean;
6
+ /** 当前脚本 */
7
+ script: string;
8
+ /** 表单字段(用于动态生成变量) */
9
+ variables?: GroovyVariableMapping[];
10
+ /** 取消回调 */
11
+ onCancel: () => void;
12
+ /** 确认回调 */
13
+ onConfirm: (script: string) => void;
14
+ }
15
+ export declare const RouterConfigModal: React.FC<RouterConfigModalProps>;
@@ -0,0 +1,33 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ScriptType } from "../typings/index.js";
4
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { SCRIPT_DEFAULT_ROUTER } from "../default-script.js";
8
+ import { RouterPluginView } from "../../plugins/view/router-view.js";
9
+ const RouterConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_ROUTER
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(RouterPluginView, {
18
+ ...props
19
+ })
20
+ ]
21
+ });
22
+ };
23
+ const RouterConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
24
+ type: ScriptType.ROUTER,
25
+ open: props.open,
26
+ script: props.script,
27
+ variables: props.variables || [],
28
+ onConfirm: props.onConfirm,
29
+ onCancel: props.onCancel,
30
+ title: "路由配置",
31
+ content: RouterConfigContent
32
+ });
33
+ export { RouterConfigModal };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { GroovyVariableMapping } from "../typings";
3
+ export interface SubProcessConfigModalProps {
4
+ /** 是否展示 **/
5
+ open: boolean;
6
+ /** 当前脚本 */
7
+ script: string;
8
+ /** 表单字段(用于动态生成变量) */
9
+ variables?: GroovyVariableMapping[];
10
+ /** 取消回调 */
11
+ onCancel: () => void;
12
+ /** 确认回调 */
13
+ onConfirm: (script: string) => void;
14
+ }
15
+ export declare const SubProcessConfigModal: React.FC<SubProcessConfigModalProps>;
@@ -0,0 +1,33 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ScriptType } from "../typings/index.js";
4
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { SCRIPT_DEFAULT_SUB_PROCESS } from "../default-script.js";
8
+ import { SubProcessPluginView } from "../../plugins/view/sub-process-view.js";
9
+ const SubProcessConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_SUB_PROCESS
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(SubProcessPluginView, {
18
+ ...props
19
+ })
20
+ ]
21
+ });
22
+ };
23
+ const SubProcessConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
24
+ type: ScriptType.SUB_PROCESS,
25
+ open: props.open,
26
+ script: props.script,
27
+ variables: props.variables || [],
28
+ onConfirm: props.onConfirm,
29
+ onCancel: props.onCancel,
30
+ title: "子流程配置",
31
+ content: SubProcessConfigContent
32
+ });
33
+ export { SubProcessConfigModal };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { GroovyVariableMapping } from "../typings";
3
+ export interface TriggerConfigModalProps {
4
+ /** 是否展示 **/
5
+ open: boolean;
6
+ /** 当前脚本 */
7
+ script: string;
8
+ /** 表单字段(用于动态生成变量) */
9
+ variables?: GroovyVariableMapping[];
10
+ /** 取消回调 */
11
+ onCancel: () => void;
12
+ /** 确认回调 */
13
+ onConfirm: (script: string) => void;
14
+ }
15
+ export declare const TriggerConfigModal: React.FC<TriggerConfigModalProps>;
@@ -0,0 +1,33 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ScriptType } from "../typings/index.js";
4
+ import { GroovyScriptModal } from "../components/groovy-script-modal.js";
5
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
6
+ import { AdvancedScriptEditor } from "../components/advanced-script-editor.js";
7
+ import { SCRIPT_DEFAULT_TRIGGER } from "../default-script.js";
8
+ import { TriggerPluginView } from "../../plugins/view/trigger-view.js";
9
+ const TriggerConfigContent = (props)=>{
10
+ const isAdvance = GroovyScriptConvertorUtil.isCustomScript(props.script);
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ isAdvance && /*#__PURE__*/ jsx(AdvancedScriptEditor, {
14
+ ...props,
15
+ resetScript: ()=>SCRIPT_DEFAULT_TRIGGER
16
+ }),
17
+ !isAdvance && /*#__PURE__*/ jsx(TriggerPluginView, {
18
+ ...props
19
+ })
20
+ ]
21
+ });
22
+ };
23
+ const TriggerConfigModal = (props)=>/*#__PURE__*/ jsx(GroovyScriptModal, {
24
+ type: ScriptType.TRIGGER,
25
+ open: props.open,
26
+ script: props.script,
27
+ variables: props.variables || [],
28
+ onConfirm: props.onConfirm,
29
+ onCancel: props.onCancel,
30
+ title: "触发配置",
31
+ content: TriggerConfigContent
32
+ });
33
+ export { TriggerConfigModal };
@@ -0,0 +1,4 @@
1
+ export declare class ActionCustomScriptUtils {
2
+ static update(trigger: string, script: string): string;
3
+ static getTrigger(script: string): any;
4
+ }
@@ -0,0 +1,23 @@
1
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
2
+ class ActionCustomScriptUtils {
3
+ static update(trigger, script) {
4
+ let groovy;
5
+ if (script) {
6
+ const returnData = GroovyScriptConvertorUtil.getReturnScript(script).trim();
7
+ groovy = script.replace(returnData, `'${trigger}'`);
8
+ groovy = GroovyScriptConvertorUtil.updateScriptMeta(groovy, `{"trigger":"${trigger}"}`);
9
+ } else groovy = `// @CUSTOM_SCRIPT 自定义脚本,返回的数据为动作类型
10
+ // @SCRIPT_META {"trigger":"${trigger}"}
11
+ def run(request){
12
+ return '${trigger}';
13
+ }
14
+ `;
15
+ return GroovyScriptConvertorUtil.formatScript(groovy);
16
+ }
17
+ static getTrigger(script) {
18
+ const meta = GroovyScriptConvertorUtil.getScriptMeta(script);
19
+ const data = JSON.parse(meta);
20
+ if (data) return data.trigger;
21
+ }
22
+ }
23
+ export { ActionCustomScriptUtils };
@@ -0,0 +1,13 @@
1
+ import { ActionSelectOption } from "../typings";
2
+ import { NodeManger } from "../../components/design-panel/manager/node";
3
+ export declare class ActionRejectService {
4
+ private readonly nodeManger;
5
+ constructor(nodeManger: NodeManger);
6
+ getOptions(nodeId: string): ActionSelectOption[];
7
+ getValue(script?: string): any;
8
+ getScript(option: ActionSelectOption): string;
9
+ }
10
+ export declare class ActionRejectScriptUtils {
11
+ static update(option: ActionSelectOption): string;
12
+ static getType(script?: string): any;
13
+ }
@@ -0,0 +1,50 @@
1
+ import { GroovyScriptConvertorUtil } from "@coding-flow/flow-core";
2
+ class ActionRejectService {
3
+ nodeManger;
4
+ constructor(nodeManger){
5
+ this.nodeManger = nodeManger;
6
+ }
7
+ getOptions(nodeId) {
8
+ const options = [];
9
+ const backNodes = this.nodeManger.getBackNodes(nodeId);
10
+ for (const node of backNodes)options.push({
11
+ label: node.name,
12
+ value: node.id
13
+ });
14
+ options.push({
15
+ label: '终止流程',
16
+ value: 'TERMINATE'
17
+ });
18
+ return options;
19
+ }
20
+ getValue(script) {
21
+ const type = ActionRejectScriptUtils.getType(script);
22
+ const node = this.nodeManger.getNodeByType(type);
23
+ if (node) return node.id;
24
+ return type;
25
+ }
26
+ getScript(option) {
27
+ return ActionRejectScriptUtils.update(option);
28
+ }
29
+ }
30
+ class ActionRejectScriptUtils {
31
+ static update(option) {
32
+ const groovy = `// @CUSTOM_SCRIPT 跳转到 ${option.label}
33
+ // @SCRIPT_META {"type":"${option.value}"}
34
+ def run(request){
35
+ return '${option.value}';
36
+ }
37
+ `;
38
+ return GroovyScriptConvertorUtil.formatScript(groovy);
39
+ }
40
+ static getType(script) {
41
+ if (script) {
42
+ const meta = GroovyScriptConvertorUtil.getScriptMeta(script);
43
+ if (meta) {
44
+ const data = JSON.parse(meta);
45
+ if (data) return data.type;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ export { ActionRejectScriptUtils, ActionRejectService };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 错误异常处理脚本
3
+ */
4
+ export declare class ErrorTriggerScriptUtils {
5
+ static setNode(node: {
6
+ label: string;
7
+ value: string;
8
+ }): string;
9
+ }
@@ -0,0 +1,10 @@
1
+ class ErrorTriggerScriptUtils {
2
+ static setNode(node) {
3
+ return `// @SCRIPT_TITLE 回退至${node.label}
4
+ // @SCRIPT_META {"type":"node","node":"${node.value}"}
5
+ def run(request){
6
+ return '${node.value}';
7
+ }`;
8
+ }
9
+ }
10
+ export { ErrorTriggerScriptUtils };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 路由脚本工具
3
+ */
4
+ export declare class RouterScriptUtils {
5
+ static update(node: {
6
+ label: string;
7
+ value: string;
8
+ }): string;
9
+ }
@@ -0,0 +1,10 @@
1
+ class RouterScriptUtils {
2
+ static update(node) {
3
+ return `// @SCRIPT_TITLE ${node.label}
4
+ // @SCRIPT_META {"node":"${node.value}"}
5
+ def run(request){
6
+ return '${node.value}';
7
+ }`;
8
+ }
9
+ }
10
+ export { RouterScriptUtils };
@@ -0,0 +1,9 @@
1
+ import { GroovyVariableMapping } from "../typings";
2
+ /**
3
+ * 标题脚本工具
4
+ * 针对脚本的使用,只是用了@SCRIPT_TITLE 属性
5
+ */
6
+ export declare class NodeTitleScriptUtils {
7
+ static addVariable(script: string, variable: GroovyVariableMapping, variables: GroovyVariableMapping[]): string;
8
+ static updateExpression(script: string, expression: string, variables: GroovyVariableMapping[]): string;
9
+ }