@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.
- package/LICENSE +201 -0
- package/README.md +214 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +12 -0
- package/dist/api/workflow.d.ts +15 -0
- package/dist/api/workflow.js +36 -0
- package/dist/assets/icon-mouse.d.ts +5 -0
- package/dist/assets/icon-mouse.js +31 -0
- package/dist/assets/icon-pad.d.ts +5 -0
- package/dist/assets/icon-pad.js +50 -0
- package/dist/components/design-editor/components/base-node/index.d.ts +4 -0
- package/dist/components/design-editor/components/base-node/index.js +43 -0
- package/dist/components/design-editor/components/base-node/styles.d.ts +6 -0
- package/dist/components/design-editor/components/base-node/styles.js +32 -0
- package/dist/components/design-editor/components/branch-adder/index.d.ts +14 -0
- package/dist/components/design-editor/components/branch-adder/index.js +49 -0
- package/dist/components/design-editor/components/branch-adder/styles.d.ts +4 -0
- package/dist/components/design-editor/components/branch-adder/styles.js +27 -0
- package/dist/components/design-editor/components/collapse/index.d.ts +3 -0
- package/dist/components/design-editor/components/collapse/index.js +3 -0
- package/dist/components/design-editor/components/node-adder/index.d.ts +9 -0
- package/dist/components/design-editor/components/node-adder/index.js +55 -0
- package/dist/components/design-editor/components/node-adder/styles.d.ts +1 -0
- package/dist/components/design-editor/components/node-adder/styles.js +14 -0
- package/dist/components/design-editor/components/node-icon/index.d.ts +7 -0
- package/dist/components/design-editor/components/node-icon/index.js +62 -0
- package/dist/components/design-editor/components/node-list/index.d.ts +8 -0
- package/dist/components/design-editor/components/node-list/index.js +80 -0
- package/dist/components/design-editor/components/sidebar/index.d.ts +1 -0
- package/dist/components/design-editor/components/sidebar/index.js +2 -0
- package/dist/components/design-editor/components/sidebar/sidebar-node-renderer.d.ts +4 -0
- package/dist/components/design-editor/components/sidebar/sidebar-node-renderer.js +22 -0
- package/dist/components/design-editor/components/sidebar/sidebar-renderer.d.ts +7 -0
- package/dist/components/design-editor/components/sidebar/sidebar-renderer.js +67 -0
- package/dist/components/design-editor/context/index.d.ts +3 -0
- package/dist/components/design-editor/context/index.js +4 -0
- package/dist/components/design-editor/context/node-form-context.d.ts +8 -0
- package/dist/components/design-editor/context/node-form-context.js +3 -0
- package/dist/components/design-editor/context/node-render-context.d.ts +3 -0
- package/dist/components/design-editor/context/node-render-context.js +3 -0
- package/dist/components/design-editor/context/sidebar-context.d.ts +2 -0
- package/dist/components/design-editor/context/sidebar-context.js +3 -0
- package/dist/components/design-editor/hooks/index.d.ts +2 -0
- package/dist/components/design-editor/hooks/index.js +3 -0
- package/dist/components/design-editor/hooks/use-editor-props.d.ts +4 -0
- package/dist/components/design-editor/hooks/use-editor-props.js +124 -0
- package/dist/components/design-editor/hooks/use-is-sidebar.d.ts +1 -0
- package/dist/components/design-editor/hooks/use-is-sidebar.js +6 -0
- package/dist/components/design-editor/hooks/use-node-form.d.ts +6 -0
- package/dist/components/design-editor/hooks/use-node-form.js +6 -0
- package/dist/components/design-editor/hooks/use-node-render-context.d.ts +1 -0
- package/dist/components/design-editor/hooks/use-node-render-context.js +6 -0
- package/dist/components/design-editor/hooks/use-script-variables.d.ts +1 -0
- package/dist/components/design-editor/hooks/use-script-variables.js +10 -0
- package/dist/components/design-editor/index.css +4 -0
- package/dist/components/design-editor/index.d.ts +13 -0
- package/dist/components/design-editor/index.js +36 -0
- package/dist/components/design-editor/initial-data.d.ts +2 -0
- package/dist/components/design-editor/initial-data.js +19 -0
- package/dist/components/design-editor/node-components/action/index.d.ts +7 -0
- package/dist/components/design-editor/node-components/action/index.js +121 -0
- package/dist/components/design-editor/node-components/action/manager.d.ts +9 -0
- package/dist/components/design-editor/node-components/action/manager.js +18 -0
- package/dist/components/design-editor/node-components/action/presenter.d.ts +13 -0
- package/dist/components/design-editor/node-components/action/presenter.js +80 -0
- package/dist/components/design-editor/node-components/condition/index.d.ts +5 -0
- package/dist/components/design-editor/node-components/condition/index.js +59 -0
- package/dist/components/design-editor/node-components/header/index.d.ts +7 -0
- package/dist/components/design-editor/node-components/header/index.js +127 -0
- package/dist/components/design-editor/node-components/layout/index.d.ts +11 -0
- package/dist/components/design-editor/node-components/layout/index.js +41 -0
- package/dist/components/design-editor/node-components/node-hint/index.d.ts +6 -0
- package/dist/components/design-editor/node-components/node-hint/index.js +13 -0
- package/dist/components/design-editor/node-components/node-order/index.d.ts +1 -0
- package/dist/components/design-editor/node-components/node-order/index.js +31 -0
- package/dist/components/design-editor/node-components/panel/index.d.ts +10 -0
- package/dist/components/design-editor/node-components/panel/index.js +90 -0
- package/dist/components/design-editor/node-components/promission/index.d.ts +7 -0
- package/dist/components/design-editor/node-components/promission/index.js +108 -0
- package/dist/components/design-editor/node-components/promission/presenter.d.ts +24 -0
- package/dist/components/design-editor/node-components/promission/presenter.js +91 -0
- package/dist/components/design-editor/node-components/strategy/advice.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/advice.js +49 -0
- package/dist/components/design-editor/node-components/strategy/deplay.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/deplay.js +66 -0
- package/dist/components/design-editor/node-components/strategy/error-trigger.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/error-trigger.js +60 -0
- package/dist/components/design-editor/node-components/strategy/multi-operator-audit.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/multi-operator-audit.js +70 -0
- package/dist/components/design-editor/node-components/strategy/node-title.d.ts +5 -0
- package/dist/components/design-editor/node-components/strategy/node-title.js +59 -0
- package/dist/components/design-editor/node-components/strategy/operator-load.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/operator-load.js +60 -0
- package/dist/components/design-editor/node-components/strategy/record-merge.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/record-merge.js +31 -0
- package/dist/components/design-editor/node-components/strategy/resubmit.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/resubmit.js +39 -0
- package/dist/components/design-editor/node-components/strategy/revoke.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/revoke.js +59 -0
- package/dist/components/design-editor/node-components/strategy/router.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/router.js +59 -0
- package/dist/components/design-editor/node-components/strategy/same-operator-audit.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/same-operator-audit.js +39 -0
- package/dist/components/design-editor/node-components/strategy/sub-process.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/sub-process.js +77 -0
- package/dist/components/design-editor/node-components/strategy/timeout.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/timeout.js +63 -0
- package/dist/components/design-editor/node-components/strategy/trigger.d.ts +6 -0
- package/dist/components/design-editor/node-components/strategy/trigger.js +59 -0
- package/dist/components/design-editor/node-components/taps/action.d.ts +2 -0
- package/dist/components/design-editor/node-components/taps/action.js +12 -0
- package/dist/components/design-editor/node-components/taps/base.d.ts +6 -0
- package/dist/components/design-editor/node-components/taps/base.js +14 -0
- package/dist/components/design-editor/node-components/taps/promission.d.ts +2 -0
- package/dist/components/design-editor/node-components/taps/promission.js +12 -0
- package/dist/components/design-editor/node-components/view/index.d.ts +1 -0
- package/dist/components/design-editor/node-components/view/index.js +30 -0
- package/dist/components/design-editor/nodes/approval/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/approval/form-meta.js +65 -0
- package/dist/components/design-editor/nodes/approval/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/approval/index.js +15 -0
- package/dist/components/design-editor/nodes/condition/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/condition/form-meta.js +24 -0
- package/dist/components/design-editor/nodes/condition/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/condition/index.js +21 -0
- package/dist/components/design-editor/nodes/condition-branch/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/condition-branch/form-meta.js +42 -0
- package/dist/components/design-editor/nodes/condition-branch/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/condition-branch/index.js +29 -0
- package/dist/components/design-editor/nodes/delay/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/delay/form-meta.js +39 -0
- package/dist/components/design-editor/nodes/delay/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/delay/index.js +15 -0
- package/dist/components/design-editor/nodes/end/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/end/form-meta.js +36 -0
- package/dist/components/design-editor/nodes/end/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/end/index.js +23 -0
- package/dist/components/design-editor/nodes/handle/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/handle/form-meta.js +63 -0
- package/dist/components/design-editor/nodes/handle/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/handle/index.js +15 -0
- package/dist/components/design-editor/nodes/inclusive/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/inclusive/form-meta.js +24 -0
- package/dist/components/design-editor/nodes/inclusive/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/inclusive/index.js +21 -0
- package/dist/components/design-editor/nodes/inclusive-branch/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/inclusive-branch/form-meta.js +42 -0
- package/dist/components/design-editor/nodes/inclusive-branch/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/inclusive-branch/index.js +15 -0
- package/dist/components/design-editor/nodes/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/index.js +33 -0
- package/dist/components/design-editor/nodes/notify/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/notify/form-meta.js +52 -0
- package/dist/components/design-editor/nodes/notify/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/notify/index.js +15 -0
- package/dist/components/design-editor/nodes/parallel/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/parallel/form-meta.js +24 -0
- package/dist/components/design-editor/nodes/parallel/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/parallel/index.js +21 -0
- package/dist/components/design-editor/nodes/parallel-branch/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/parallel-branch/form-meta.js +36 -0
- package/dist/components/design-editor/nodes/parallel-branch/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/parallel-branch/index.js +33 -0
- package/dist/components/design-editor/nodes/router/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/router/form-meta.js +43 -0
- package/dist/components/design-editor/nodes/router/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/router/index.js +23 -0
- package/dist/components/design-editor/nodes/start/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/start/form-meta.js +48 -0
- package/dist/components/design-editor/nodes/start/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/start/index.js +19 -0
- package/dist/components/design-editor/nodes/sub-process/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/sub-process/form-meta.js +43 -0
- package/dist/components/design-editor/nodes/sub-process/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/sub-process/index.js +15 -0
- package/dist/components/design-editor/nodes/trigger/form-meta.d.ts +4 -0
- package/dist/components/design-editor/nodes/trigger/form-meta.js +43 -0
- package/dist/components/design-editor/nodes/trigger/index.d.ts +2 -0
- package/dist/components/design-editor/nodes/trigger/index.js +15 -0
- package/dist/components/design-editor/styles.d.ts +6 -0
- package/dist/components/design-editor/styles.js +61 -0
- package/dist/components/design-editor/tools/download.d.ts +2 -0
- package/dist/components/design-editor/tools/download.js +65 -0
- package/dist/components/design-editor/tools/fit-view.d.ts +3 -0
- package/dist/components/design-editor/tools/fit-view.js +12 -0
- package/dist/components/design-editor/tools/index.d.ts +1 -0
- package/dist/components/design-editor/tools/index.js +42 -0
- package/dist/components/design-editor/tools/interactive.d.ts +9 -0
- package/dist/components/design-editor/tools/interactive.js +69 -0
- package/dist/components/design-editor/tools/minimap-switch.d.ts +4 -0
- package/dist/components/design-editor/tools/minimap-switch.js +21 -0
- package/dist/components/design-editor/tools/minimap.d.ts +3 -0
- package/dist/components/design-editor/tools/minimap.js +26 -0
- package/dist/components/design-editor/tools/mouse-pad-selector.css +100 -0
- package/dist/components/design-editor/tools/mouse-pad-selector.d.ts +15 -0
- package/dist/components/design-editor/tools/mouse-pad-selector.js +91 -0
- package/dist/components/design-editor/tools/readonly.d.ts +1 -0
- package/dist/components/design-editor/tools/readonly.js +36 -0
- package/dist/components/design-editor/tools/redo.d.ts +1 -0
- package/dist/components/design-editor/tools/redo.js +19 -0
- package/dist/components/design-editor/tools/switch-vertical.d.ts +1 -0
- package/dist/components/design-editor/tools/switch-vertical.js +22 -0
- package/dist/components/design-editor/tools/undo.d.ts +1 -0
- package/dist/components/design-editor/tools/undo.js +19 -0
- package/dist/components/design-editor/tools/zoom-select.d.ts +1 -0
- package/dist/components/design-editor/tools/zoom-select.js +75 -0
- package/dist/components/design-editor/typings/index.d.ts +1 -0
- package/dist/components/design-editor/typings/index.js +1 -0
- package/dist/components/design-editor/typings/node.d.ts +28 -0
- package/dist/components/design-editor/typings/node.js +1 -0
- package/dist/components/design-editor/version/components/version-content.d.ts +9 -0
- package/dist/components/design-editor/version/components/version-content.js +21 -0
- package/dist/components/design-editor/version/components/version-item.d.ts +10 -0
- package/dist/components/design-editor/version/components/version-item.js +117 -0
- package/dist/components/design-editor/version/edtior-version.d.ts +1 -0
- package/dist/components/design-editor/version/edtior-version.js +41 -0
- package/dist/components/design-editor/version/hooks/use-version-presenter.d.ts +5 -0
- package/dist/components/design-editor/version/hooks/use-version-presenter.js +24 -0
- package/dist/components/design-editor/version/index.d.ts +1 -0
- package/dist/components/design-editor/version/index.js +1 -0
- package/dist/components/design-editor/version/model.d.ts +7 -0
- package/dist/components/design-editor/version/model.js +21 -0
- package/dist/components/design-editor/version/presenter.d.ts +14 -0
- package/dist/components/design-editor/version/presenter.js +33 -0
- package/dist/components/design-editor/version/types.d.ts +12 -0
- package/dist/components/design-editor/version/types.js +0 -0
- package/dist/components/design-import/index.d.ts +7 -0
- package/dist/components/design-import/index.js +36 -0
- package/dist/components/design-import/upload.d.ts +7 -0
- package/dist/components/design-import/upload.js +29 -0
- package/dist/components/design-panel/context/index.d.ts +14 -0
- package/dist/components/design-panel/context/index.js +28 -0
- package/dist/components/design-panel/hooks/use-design-context.d.ts +10 -0
- package/dist/components/design-panel/hooks/use-design-context.js +38 -0
- package/dist/components/design-panel/hooks/use-node-router-manager.d.ts +2 -0
- package/dist/components/design-panel/hooks/use-node-router-manager.js +8 -0
- package/dist/components/design-panel/index.d.ts +3 -0
- package/dist/components/design-panel/index.js +12 -0
- package/dist/components/design-panel/layout/body.d.ts +1 -0
- package/dist/components/design-panel/layout/body.js +20 -0
- package/dist/components/design-panel/layout/footer.d.ts +1 -0
- package/dist/components/design-panel/layout/footer.js +4 -0
- package/dist/components/design-panel/layout/header.d.ts +1 -0
- package/dist/components/design-panel/layout/header.js +158 -0
- package/dist/components/design-panel/layout/index.d.ts +3 -0
- package/dist/components/design-panel/layout/index.js +29 -0
- package/dist/components/design-panel/manager/form.d.ts +27 -0
- package/dist/components/design-panel/manager/form.js +89 -0
- package/dist/components/design-panel/manager/node.d.ts +71 -0
- package/dist/components/design-panel/manager/node.js +174 -0
- package/dist/components/design-panel/manager/strategy.d.ts +8 -0
- package/dist/components/design-panel/manager/strategy.js +34 -0
- package/dist/components/design-panel/model.d.ts +7 -0
- package/dist/components/design-panel/model.js +19 -0
- package/dist/components/design-panel/panels/workflow/interfere.d.ts +7 -0
- package/dist/components/design-panel/panels/workflow/interfere.js +19 -0
- package/dist/components/design-panel/panels/workflow/urge.d.ts +7 -0
- package/dist/components/design-panel/panels/workflow/urge.js +33 -0
- package/dist/components/design-panel/presenters/convertor/index.d.ts +7 -0
- package/dist/components/design-panel/presenters/convertor/index.js +13 -0
- package/dist/components/design-panel/presenters/index.d.ts +32 -0
- package/dist/components/design-panel/presenters/index.js +153 -0
- package/dist/components/design-panel/store.d.ts +15 -0
- package/dist/components/design-panel/store.js +24 -0
- package/dist/components/design-panel/tabs/base/index.d.ts +1 -0
- package/dist/components/design-panel/tabs/base/index.js +134 -0
- package/dist/components/design-panel/tabs/base/operator.d.ts +7 -0
- package/dist/components/design-panel/tabs/base/operator.js +41 -0
- package/dist/components/design-panel/tabs/flow.d.ts +1 -0
- package/dist/components/design-panel/tabs/flow.js +57 -0
- package/dist/components/design-panel/tabs/form/attrubute.d.ts +12 -0
- package/dist/components/design-panel/tabs/form/attrubute.js +122 -0
- package/dist/components/design-panel/tabs/form/form-type.d.ts +7 -0
- package/dist/components/design-panel/tabs/form/form-type.js +34 -0
- package/dist/components/design-panel/tabs/form/index.d.ts +1 -0
- package/dist/components/design-panel/tabs/form/index.js +43 -0
- package/dist/components/design-panel/tabs/form/model.d.ts +10 -0
- package/dist/components/design-panel/tabs/form/model.js +156 -0
- package/dist/components/design-panel/tabs/form/sub-form.d.ts +9 -0
- package/dist/components/design-panel/tabs/form/sub-form.js +52 -0
- package/dist/components/design-panel/tabs/form/table.d.ts +8 -0
- package/dist/components/design-panel/tabs/form/table.js +168 -0
- package/dist/components/design-panel/tabs/setting.d.ts +1 -0
- package/dist/components/design-panel/tabs/setting.js +49 -0
- package/dist/components/design-panel/types.d.ts +42 -0
- package/dist/components/design-panel/types.js +19 -0
- package/dist/components/groovy-code/index.d.ts +15 -0
- package/dist/components/groovy-code/index.js +160 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/plugins/action-custom-view-type.d.ts +7 -0
- package/dist/plugins/action-custom-view-type.js +2 -0
- package/dist/plugins/action-reject-view-type.d.ts +6 -0
- package/dist/plugins/action-reject-view-type.js +2 -0
- package/dist/plugins/condition-view-type.d.ts +12 -0
- package/dist/plugins/condition-view-type.js +2 -0
- package/dist/plugins/error-trigger-view-type.d.ts +12 -0
- package/dist/plugins/error-trigger-view-type.js +2 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.js +11 -0
- package/dist/plugins/node-title-view-type.d.ts +12 -0
- package/dist/plugins/node-title-view-type.js +2 -0
- package/dist/plugins/operator-create-view-type.d.ts +7 -0
- package/dist/plugins/operator-create-view-type.js +2 -0
- package/dist/plugins/operator-load-view-type.d.ts +7 -0
- package/dist/plugins/operator-load-view-type.js +2 -0
- package/dist/plugins/router-view-type.d.ts +12 -0
- package/dist/plugins/router-view-type.js +2 -0
- package/dist/plugins/sub-process-operator-view-type.d.ts +7 -0
- package/dist/plugins/sub-process-operator-view-type.js +2 -0
- package/dist/plugins/sub-process-view-type.d.ts +12 -0
- package/dist/plugins/sub-process-view-type.js +2 -0
- package/dist/plugins/trigger-view-type.d.ts +12 -0
- package/dist/plugins/trigger-view-type.js +2 -0
- package/dist/plugins/view/action-custom-view.d.ts +3 -0
- package/dist/plugins/view/action-custom-view.js +66 -0
- package/dist/plugins/view/action-reject-view.d.ts +3 -0
- package/dist/plugins/view/action-reject-view.js +34 -0
- package/dist/plugins/view/condition-view.d.ts +7 -0
- package/dist/plugins/view/condition-view.js +15 -0
- package/dist/plugins/view/error-trigger-view.d.ts +8 -0
- package/dist/plugins/view/error-trigger-view.js +89 -0
- package/dist/plugins/view/node-title-view.d.ts +3 -0
- package/dist/plugins/view/node-title-view.js +76 -0
- package/dist/plugins/view/operator-create-view.d.ts +3 -0
- package/dist/plugins/view/operator-create-view.js +62 -0
- package/dist/plugins/view/operator-load-view.d.ts +3 -0
- package/dist/plugins/view/operator-load-view.js +63 -0
- package/dist/plugins/view/router-view.d.ts +7 -0
- package/dist/plugins/view/router-view.js +62 -0
- package/dist/plugins/view/sub-process-opreator-view.d.ts +7 -0
- package/dist/plugins/view/sub-process-opreator-view.js +20 -0
- package/dist/plugins/view/sub-process-view.d.ts +7 -0
- package/dist/plugins/view/sub-process-view.js +45 -0
- package/dist/plugins/view/trigger-view.d.ts +3 -0
- package/dist/plugins/view/trigger-view.js +17 -0
- package/dist/script-components/components/action/components/add-audit.d.ts +3 -0
- package/dist/script-components/components/action/components/add-audit.js +26 -0
- package/dist/script-components/components/action/components/custom.d.ts +3 -0
- package/dist/script-components/components/action/components/custom.js +28 -0
- package/dist/script-components/components/action/components/delegate.d.ts +3 -0
- package/dist/script-components/components/action/components/delegate.js +26 -0
- package/dist/script-components/components/action/components/factory.d.ts +11 -0
- package/dist/script-components/components/action/components/factory.js +28 -0
- package/dist/script-components/components/action/components/reject.d.ts +3 -0
- package/dist/script-components/components/action/components/reject.js +19 -0
- package/dist/script-components/components/action/components/transfer.d.ts +3 -0
- package/dist/script-components/components/action/components/transfer.js +26 -0
- package/dist/script-components/components/action/icon.d.ts +7 -0
- package/dist/script-components/components/action/icon.js +97 -0
- package/dist/script-components/components/action/index.d.ts +3 -0
- package/dist/script-components/components/action/index.js +69 -0
- package/dist/script-components/components/action/script.d.ts +8 -0
- package/dist/script-components/components/action/script.js +68 -0
- package/dist/script-components/components/action/style.d.ts +7 -0
- package/dist/script-components/components/action/style.js +128 -0
- package/dist/script-components/components/advanced-script-editor.d.ts +25 -0
- package/dist/script-components/components/advanced-script-editor.js +76 -0
- package/dist/script-components/components/condition/components/condition-group/condition.d.ts +9 -0
- package/dist/script-components/components/condition/components/condition-group/condition.js +122 -0
- package/dist/script-components/components/condition/components/condition-group/group.d.ts +4 -0
- package/dist/script-components/components/condition/components/condition-group/group.js +93 -0
- package/dist/script-components/components/condition/components/condition-group/index.d.ts +1 -0
- package/dist/script-components/components/condition/components/condition-group/index.js +1 -0
- package/dist/script-components/components/condition/components/condition-group/type.d.ts +8 -0
- package/dist/script-components/components/condition/components/condition-group/type.js +23 -0
- package/dist/script-components/components/condition/components/condition-panel.d.ts +3 -0
- package/dist/script-components/components/condition/components/condition-panel.js +55 -0
- package/dist/script-components/components/condition/components/condition-relation/action.d.ts +3 -0
- package/dist/script-components/components/condition/components/condition-relation/action.js +24 -0
- package/dist/script-components/components/condition/components/condition-relation/and.d.ts +3 -0
- package/dist/script-components/components/condition/components/condition-relation/and.js +24 -0
- package/dist/script-components/components/condition/components/condition-relation/condition.d.ts +3 -0
- package/dist/script-components/components/condition/components/condition-relation/condition.js +24 -0
- package/dist/script-components/components/condition/components/condition-relation/domain/menu-relation.d.ts +19 -0
- package/dist/script-components/components/condition/components/condition-relation/domain/menu-relation.js +145 -0
- package/dist/script-components/components/condition/components/condition-relation/domain/relation-validate.d.ts +15 -0
- package/dist/script-components/components/condition/components/condition-relation/domain/relation-validate.js +60 -0
- package/dist/script-components/components/condition/components/condition-relation/group.d.ts +3 -0
- package/dist/script-components/components/condition/components/condition-relation/group.js +44 -0
- package/dist/script-components/components/condition/components/condition-relation/hooks/use-dropdown-menus.d.ts +2 -0
- package/dist/script-components/components/condition/components/condition-relation/hooks/use-dropdown-menus.js +15 -0
- package/dist/script-components/components/condition/components/condition-relation/index.d.ts +1 -0
- package/dist/script-components/components/condition/components/condition-relation/index.js +34 -0
- package/dist/script-components/components/condition/components/condition-relation/or.d.ts +3 -0
- package/dist/script-components/components/condition/components/condition-relation/or.js +24 -0
- package/dist/script-components/components/condition/components/condition-relation/render.d.ts +11 -0
- package/dist/script-components/components/condition/components/condition-relation/render.js +49 -0
- package/dist/script-components/components/condition/context/index.d.ts +13 -0
- package/dist/script-components/components/condition/context/index.js +23 -0
- package/dist/script-components/components/condition/convertor/groovy.d.ts +10 -0
- package/dist/script-components/components/condition/convertor/groovy.js +131 -0
- package/dist/script-components/components/condition/convertor/group.d.ts +6 -0
- package/dist/script-components/components/condition/convertor/group.js +18 -0
- package/dist/script-components/components/condition/hooks/use-condition-context.d.ts +10 -0
- package/dist/script-components/components/condition/hooks/use-condition-context.js +47 -0
- package/dist/script-components/components/condition/hooks/use-condition-script-convertor.d.ts +2 -0
- package/dist/script-components/components/condition/hooks/use-condition-script-convertor.js +14 -0
- package/dist/script-components/components/condition/index.d.ts +3 -0
- package/dist/script-components/components/condition/index.js +23 -0
- package/dist/script-components/components/condition/models/index.d.ts +3 -0
- package/dist/script-components/components/condition/models/index.js +3 -0
- package/dist/script-components/components/condition/presenters/group-presenter.d.ts +31 -0
- package/dist/script-components/components/condition/presenters/group-presenter.js +80 -0
- package/dist/script-components/components/condition/presenters/index.d.ts +21 -0
- package/dist/script-components/components/condition/presenters/index.js +36 -0
- package/dist/script-components/components/condition/presenters/relation-presenter.d.ts +13 -0
- package/dist/script-components/components/condition/presenters/relation-presenter.js +65 -0
- package/dist/script-components/components/condition/store.d.ts +15 -0
- package/dist/script-components/components/condition/store.js +24 -0
- package/dist/script-components/components/condition/typings/index.d.ts +79 -0
- package/dist/script-components/components/condition/typings/index.js +32 -0
- package/dist/script-components/components/form-data/components/list.d.ts +7 -0
- package/dist/script-components/components/form-data/components/list.js +18 -0
- package/dist/script-components/components/form-data/components/value.d.ts +7 -0
- package/dist/script-components/components/form-data/components/value.js +28 -0
- package/dist/script-components/components/form-data/context/index.d.ts +12 -0
- package/dist/script-components/components/form-data/context/index.js +20 -0
- package/dist/script-components/components/form-data/hooks/use-form-data-context.d.ts +10 -0
- package/dist/script-components/components/form-data/hooks/use-form-data-context.js +37 -0
- package/dist/script-components/components/form-data/index.d.ts +9 -0
- package/dist/script-components/components/form-data/index.js +44 -0
- package/dist/script-components/components/form-data/presenters/flow-form-presenter.d.ts +29 -0
- package/dist/script-components/components/form-data/presenters/flow-form-presenter.js +63 -0
- package/dist/script-components/components/form-data/presenters/form-data-presenter.d.ts +35 -0
- package/dist/script-components/components/form-data/presenters/form-data-presenter.js +109 -0
- package/dist/script-components/components/form-data/presenters/index.d.ts +2 -0
- package/dist/script-components/components/form-data/presenters/index.js +2 -0
- package/dist/script-components/components/form-data/store.d.ts +15 -0
- package/dist/script-components/components/form-data/store.js +21 -0
- package/dist/script-components/components/form-data/types.d.ts +24 -0
- package/dist/script-components/components/form-data/types.js +0 -0
- package/dist/script-components/components/groovy-script-modal.d.ts +35 -0
- package/dist/script-components/components/groovy-script-modal.js +43 -0
- package/dist/script-components/components/groovy-script-preview.d.ts +7 -0
- package/dist/script-components/components/groovy-script-preview.js +41 -0
- package/dist/script-components/components/sub-process/hooks/use-current-workflow-presenter.d.ts +2 -0
- package/dist/script-components/components/sub-process/hooks/use-current-workflow-presenter.js +7 -0
- package/dist/script-components/components/sub-process/hooks/use-sub-process-presenter.d.ts +3 -0
- package/dist/script-components/components/sub-process/hooks/use-sub-process-presenter.js +8 -0
- package/dist/script-components/components/sub-process/hooks/use-target-workflow-presenter.d.ts +6 -0
- package/dist/script-components/components/sub-process/hooks/use-target-workflow-presenter.js +24 -0
- package/dist/script-components/components/sub-process/index.d.ts +3 -0
- package/dist/script-components/components/sub-process/index.js +71 -0
- package/dist/script-components/components/sub-process/models/index.d.ts +5 -0
- package/dist/script-components/components/sub-process/models/index.js +14 -0
- package/dist/script-components/components/sub-process/presenters/current-workflow-presenter.d.ts +9 -0
- package/dist/script-components/components/sub-process/presenters/current-workflow-presenter.js +19 -0
- package/dist/script-components/components/sub-process/presenters/index.d.ts +3 -0
- package/dist/script-components/components/sub-process/presenters/index.js +3 -0
- package/dist/script-components/components/sub-process/presenters/sub-process-presenter.d.ts +9 -0
- package/dist/script-components/components/sub-process/presenters/sub-process-presenter.js +34 -0
- package/dist/script-components/components/sub-process/presenters/target-workflow-presenter.d.ts +11 -0
- package/dist/script-components/components/sub-process/presenters/target-workflow-presenter.js +32 -0
- package/dist/script-components/components/sub-process/typings/index.d.ts +32 -0
- package/dist/script-components/components/sub-process/typings/index.js +0 -0
- package/dist/script-components/components/variable-picker.d.ts +13 -0
- package/dist/script-components/components/variable-picker.js +134 -0
- package/dist/script-components/default-script.d.ts +9 -0
- package/dist/script-components/default-script.js +51 -0
- package/dist/script-components/hooks/use-script-meta-data.d.ts +1 -0
- package/dist/script-components/hooks/use-script-meta-data.js +7 -0
- package/dist/script-components/modal/action-config-modal.d.ts +3 -0
- package/dist/script-components/modal/action-config-modal.js +24 -0
- package/dist/script-components/modal/condition-config-modal.d.ts +15 -0
- package/dist/script-components/modal/condition-config-modal.js +34 -0
- package/dist/script-components/modal/error-trigger-config-modal.d.ts +15 -0
- package/dist/script-components/modal/error-trigger-config-modal.js +33 -0
- package/dist/script-components/modal/node-title-config-modal.d.ts +19 -0
- package/dist/script-components/modal/node-title-config-modal.js +33 -0
- package/dist/script-components/modal/operator-create-config-modal.d.ts +13 -0
- package/dist/script-components/modal/operator-create-config-modal.js +34 -0
- package/dist/script-components/modal/operator-load-config-modal.d.ts +13 -0
- package/dist/script-components/modal/operator-load-config-modal.js +34 -0
- package/dist/script-components/modal/router-config-modal.d.ts +15 -0
- package/dist/script-components/modal/router-config-modal.js +33 -0
- package/dist/script-components/modal/sub-process-config-modal.d.ts +15 -0
- package/dist/script-components/modal/sub-process-config-modal.js +33 -0
- package/dist/script-components/modal/trigger-config-modal.d.ts +15 -0
- package/dist/script-components/modal/trigger-config-modal.js +33 -0
- package/dist/script-components/services/action-custom.d.ts +4 -0
- package/dist/script-components/services/action-custom.js +23 -0
- package/dist/script-components/services/action-reject.d.ts +13 -0
- package/dist/script-components/services/action-reject.js +50 -0
- package/dist/script-components/services/node-error-trigger.d.ts +9 -0
- package/dist/script-components/services/node-error-trigger.js +10 -0
- package/dist/script-components/services/node-router.d.ts +9 -0
- package/dist/script-components/services/node-router.js +10 -0
- package/dist/script-components/services/node-title.d.ts +9 -0
- package/dist/script-components/services/node-title.js +20 -0
- package/dist/script-components/typings/action.d.ts +20 -0
- package/dist/script-components/typings/action.js +0 -0
- package/dist/script-components/typings/index.d.ts +2 -0
- package/dist/script-components/typings/index.js +2 -0
- package/dist/script-components/typings/script.d.ts +46 -0
- package/dist/script-components/typings/script.js +18 -0
- package/dist/script-components/utils/varibale.d.ts +27 -0
- package/dist/script-components/utils/varibale.js +181 -0
- package/dist/utils/id.d.ts +3 -0
- package/dist/utils/id.js +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- 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,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,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
|
+
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
|
+
}
|