@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
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025-2026 copyright codingapi
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# @coding-flow/flow-pc-design
|
|
2
|
+
|
|
3
|
+
Flow Engine PC 端流程设计器组件库,提供节点配置、属性面板、脚本配置等功能。
|
|
4
|
+
|
|
5
|
+
## 简介
|
|
6
|
+
|
|
7
|
+
`flow-pc-design` 是 Flow Engine PC 端的流程设计器组件库,提供:
|
|
8
|
+
|
|
9
|
+
- 流程设计器(可视化流程设计)
|
|
10
|
+
- 节点配置面板(15 种节点类型配置)
|
|
11
|
+
- 属性面板(节点属性编辑)
|
|
12
|
+
- 脚本配置器(Groovy 脚本编辑)
|
|
13
|
+
- 变量选择器
|
|
14
|
+
- 策略配置组件
|
|
15
|
+
|
|
16
|
+
### 依赖关系
|
|
17
|
+
|
|
18
|
+
- **依赖**: `@coding-flow/flow-core`, `@coding-flow/flow-types`, `@coding-flow/flow-pc-ui`
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
安装依赖:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 开发
|
|
29
|
+
|
|
30
|
+
构建组件库:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm run build
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
监听模式构建:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm run dev
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 核心功能
|
|
43
|
+
|
|
44
|
+
### 流程设计器
|
|
45
|
+
|
|
46
|
+
可视化流程设计器,支持:
|
|
47
|
+
|
|
48
|
+
- 节点拖拽添加
|
|
49
|
+
- 节点连线
|
|
50
|
+
- 节点配置
|
|
51
|
+
- 流程预览
|
|
52
|
+
- 流程校验
|
|
53
|
+
- 流程导入/导出
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { WorkflowDesigner } from '@coding-flow/flow-pc-design';
|
|
57
|
+
|
|
58
|
+
<WorkflowDesigner
|
|
59
|
+
workflow={workflow}
|
|
60
|
+
onChange={handleWorkflowChange}
|
|
61
|
+
onValidate={handleValidate}
|
|
62
|
+
/>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 节点配置
|
|
66
|
+
|
|
67
|
+
支持 15 种节点类型的配置:
|
|
68
|
+
|
|
69
|
+
**基础节点 (9 种)**:
|
|
70
|
+
- `StartNode` - 开始节点
|
|
71
|
+
- `EndNode` - 结束节点
|
|
72
|
+
- `ApprovalNode` - 审批节点
|
|
73
|
+
- `HandleNode` - 办理节点
|
|
74
|
+
- `NotifyNode` - 通知节点
|
|
75
|
+
- `RouterNode` - 路由节点
|
|
76
|
+
- `SubProcessNode` - 子流程节点
|
|
77
|
+
- `DelayNode` - 延迟节点
|
|
78
|
+
- `TriggerNode` - 触发节点
|
|
79
|
+
|
|
80
|
+
**块节点 (3 种)**:
|
|
81
|
+
- `ConditionNode` - 条件节点
|
|
82
|
+
- `ParallelNode` - 并行节点
|
|
83
|
+
- `InclusiveNode` - 包容节点
|
|
84
|
+
|
|
85
|
+
**分支节点 (3 种)**:
|
|
86
|
+
- `ConditionBranchNode` - 条件分支
|
|
87
|
+
- `ParallelBranchNode` - 并行分支
|
|
88
|
+
- `InclusiveBranchNode` - 包容分支
|
|
89
|
+
|
|
90
|
+
### 属性面板
|
|
91
|
+
|
|
92
|
+
节点属性编辑:
|
|
93
|
+
|
|
94
|
+
- 基本信息配置
|
|
95
|
+
- 审批人配置
|
|
96
|
+
- 表单权限配置
|
|
97
|
+
- 通知配置
|
|
98
|
+
- 超时策略配置
|
|
99
|
+
|
|
100
|
+
### 脚本配置器
|
|
101
|
+
|
|
102
|
+
Groovy 脚本编辑支持:
|
|
103
|
+
|
|
104
|
+
- 语法高亮
|
|
105
|
+
- 代码补全
|
|
106
|
+
- 语法检查
|
|
107
|
+
- 变量提示
|
|
108
|
+
- TypeScript/Groovy 转换
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { ScriptEditor } from '@coding-flow/flow-pc-design';
|
|
112
|
+
|
|
113
|
+
<ScriptEditor
|
|
114
|
+
value={script}
|
|
115
|
+
onChange={handleScriptChange}
|
|
116
|
+
scriptType="CONDITION"
|
|
117
|
+
variables={availableVariables}
|
|
118
|
+
/>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 变量选择器
|
|
122
|
+
|
|
123
|
+
流程变量选择:
|
|
124
|
+
|
|
125
|
+
- 表单字段变量
|
|
126
|
+
- 流程实例变量
|
|
127
|
+
- 系统内置变量
|
|
128
|
+
- 自定义变量
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
import { VariablePicker } from '@coding-flow/flow-pc-design';
|
|
132
|
+
|
|
133
|
+
<VariablePicker
|
|
134
|
+
variables={variables}
|
|
135
|
+
onSelect={handleVariableSelect}
|
|
136
|
+
filterTypes={['FORM_FIELD', 'INSTANCE']}
|
|
137
|
+
/>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 策略配置
|
|
141
|
+
|
|
142
|
+
节点策略配置:
|
|
143
|
+
|
|
144
|
+
- 多人审批策略(会签/或签)
|
|
145
|
+
- 超时策略
|
|
146
|
+
- 通知策略
|
|
147
|
+
- 权限策略
|
|
148
|
+
|
|
149
|
+
## 模块结构
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
flow-pc-design/
|
|
153
|
+
├── src/
|
|
154
|
+
│ ├── designer/ # 流程设计器
|
|
155
|
+
│ ├── node-config/ # 节点配置组件
|
|
156
|
+
│ ├── property-panel/ # 属性面板
|
|
157
|
+
│ ├── script/ # 脚本编辑器
|
|
158
|
+
│ ├── variable/ # 变量选择器
|
|
159
|
+
│ ├── strategy/ # 策略配置
|
|
160
|
+
│ ├── components/ # 公共组件
|
|
161
|
+
│ └── index.ts # 统一导出
|
|
162
|
+
└── README.md
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## 使用示例
|
|
166
|
+
|
|
167
|
+
### 流程设计器
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
import { WorkflowDesigner } from '@coding-flow/flow-pc-design';
|
|
171
|
+
import type { Workflow } from '@coding-flow/flow-types';
|
|
172
|
+
|
|
173
|
+
const MyWorkflowDesigner = () => {
|
|
174
|
+
const [workflow, setWorkflow] = useState<Workflow>({ ... });
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<WorkflowDesigner
|
|
178
|
+
workflow={workflow}
|
|
179
|
+
onChange={setWorkflow}
|
|
180
|
+
onSave={handleSave}
|
|
181
|
+
onPreview={handlePreview}
|
|
182
|
+
/>
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 脚本编辑器
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import { ScriptEditor } from '@coding-flow/flow-pc-design';
|
|
191
|
+
import type { ScriptType } from '@coding-flow/flow-pc-design';
|
|
192
|
+
|
|
193
|
+
const MyScriptEditor = () => {
|
|
194
|
+
const [script, setScript] = useState('');
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<ScriptEditor
|
|
198
|
+
value={script}
|
|
199
|
+
onChange={setScript}
|
|
200
|
+
scriptType="CONDITION"
|
|
201
|
+
variables={variables}
|
|
202
|
+
onInsertVariable={(variable) => {
|
|
203
|
+
setScript(prev => prev + variable);
|
|
204
|
+
}}
|
|
205
|
+
/>
|
|
206
|
+
);
|
|
207
|
+
};
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Learn more
|
|
211
|
+
|
|
212
|
+
- [Rslib documentation](https://lib.rsbuild.io/) - Rslib 特性和 API
|
|
213
|
+
- [Flow Engine Docs](https://github.com/codingapi/flow-engine) - 完整文档
|
|
214
|
+
- [CLAUDE.md](../../CLAUDE.md) - 开发指南
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from "@coding-flow/flow-core";
|
|
2
|
+
import { message } from "antd";
|
|
3
|
+
const httpClient = new HttpClient(10000, {
|
|
4
|
+
success: (msg)=>{
|
|
5
|
+
message.success(msg);
|
|
6
|
+
},
|
|
7
|
+
error: (msg)=>{
|
|
8
|
+
console.log(msg);
|
|
9
|
+
message.error(msg);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export { httpClient };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const list: (request: any) => Promise<import("@coding-flow/flow-core").Response>;
|
|
2
|
+
export declare const versions: (workId: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
3
|
+
export declare const options: () => Promise<import("@coding-flow/flow-core").Response>;
|
|
4
|
+
export declare const meta: (workId: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
5
|
+
export declare const remove: (id: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
6
|
+
export declare const updateVersionName: (body: any) => Promise<import("@coding-flow/flow-core").Response>;
|
|
7
|
+
export declare const changeVersion: (id: any) => Promise<import("@coding-flow/flow-core").Response>;
|
|
8
|
+
export declare const deleteVersion: (id: any) => Promise<import("@coding-flow/flow-core").Response>;
|
|
9
|
+
export declare const changeState: (id: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
10
|
+
export declare const create: () => Promise<import("@coding-flow/flow-core").Response>;
|
|
11
|
+
export declare const createNode: (type: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
12
|
+
export declare const save: (body: any) => Promise<import("@coding-flow/flow-core").Response>;
|
|
13
|
+
export declare const load: (id: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
14
|
+
export declare const exportWorkflow: (id: string) => Promise<void>;
|
|
15
|
+
export declare const importWorkflow: (file: string) => Promise<import("@coding-flow/flow-core").Response>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { httpClient } from "./index.js";
|
|
2
|
+
const list = (request)=>httpClient.page('/api/query/workflow/list', request, {}, {}, []);
|
|
3
|
+
const versions = (workId)=>httpClient.get('/api/query/workflow/versions', {
|
|
4
|
+
id: workId
|
|
5
|
+
});
|
|
6
|
+
const options = ()=>httpClient.get('/api/query/workflow/options');
|
|
7
|
+
const meta = (workId)=>httpClient.get('/api/cmd/workflow/meta', {
|
|
8
|
+
id: workId
|
|
9
|
+
});
|
|
10
|
+
const remove = (id)=>httpClient.post('/api/cmd/workflow/remove', {
|
|
11
|
+
id
|
|
12
|
+
});
|
|
13
|
+
const updateVersionName = (body)=>httpClient.post('/api/cmd/workflow/updateVersionName', body);
|
|
14
|
+
const changeVersion = (id)=>httpClient.post('/api/cmd/workflow/changeVersion', {
|
|
15
|
+
id
|
|
16
|
+
});
|
|
17
|
+
const deleteVersion = (id)=>httpClient.post('/api/cmd/workflow/deleteVersion', {
|
|
18
|
+
id
|
|
19
|
+
});
|
|
20
|
+
const changeState = (id)=>httpClient.post('/api/cmd/workflow/changeState', {
|
|
21
|
+
id
|
|
22
|
+
});
|
|
23
|
+
const create = ()=>httpClient.post('/api/cmd/workflow/create', {});
|
|
24
|
+
const createNode = (type)=>httpClient.post('/api/cmd/workflow/create-node', {
|
|
25
|
+
type
|
|
26
|
+
});
|
|
27
|
+
const save = (body)=>httpClient.post('/api/cmd/workflow/save', body);
|
|
28
|
+
const load = (id)=>httpClient.get('/api/cmd/workflow/load', {
|
|
29
|
+
id
|
|
30
|
+
});
|
|
31
|
+
const exportWorkflow = (id)=>{
|
|
32
|
+
const filename = `workflow_${id}.json`;
|
|
33
|
+
return httpClient.download('/api/cmd/workflow/export?id=' + id, filename);
|
|
34
|
+
};
|
|
35
|
+
const importWorkflow = (file)=>httpClient.post('/api/cmd/workflow/import', file);
|
|
36
|
+
export { changeState, changeVersion, create, createNode, deleteVersion, exportWorkflow, importWorkflow, list, load, meta, options, remove, save, updateVersionName, versions };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function IconMouse(props) {
|
|
3
|
+
const { width, height } = props;
|
|
4
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
5
|
+
width: width || 34,
|
|
6
|
+
height: height || 52,
|
|
7
|
+
viewBox: "0 0 34 52",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
11
|
+
fillRule: "evenodd",
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M30.9998 16.6666V35.3333C30.9998 37.5748 30.9948 38.4695 30.9 39.1895C30.2108 44.4247 26.0912 48.5443 20.856 49.2335C20.1361 49.3283 19.2413 49.3333 16.9998 49.3333C14.7584 49.3333 13.8636 49.3283 13.1437 49.2335C7.90847 48.5443 3.78888 44.4247 3.09965 39.1895C3.00487 38.4695 2.99984 37.5748 2.99984 35.3333V16.6666C2.99984 14.4252 3.00487 13.5304 3.09965 12.8105C3.78888 7.57528 7.90847 3.45569 13.1437 2.76646C13.7232 2.69017 14.4159 2.67202 15.8332 2.66785V9.86573C14.4738 10.3462 13.4998 11.6426 13.4998 13.1666V17.8332C13.4998 19.3571 14.4738 20.6536 15.8332 21.1341V23.6666C15.8332 24.3109 16.3555 24.8333 16.9998 24.8333C17.6442 24.8333 18.1665 24.3109 18.1665 23.6666V21.1341C19.5259 20.6536 20.4998 19.3572 20.4998 17.8332V13.1666C20.4998 11.6426 19.5259 10.3462 18.1665 9.86571V2.66785C19.5837 2.67202 20.2765 2.69017 20.856 2.76646C26.0912 3.45569 30.2108 7.57528 30.9 12.8105C30.9948 13.5304 30.9998 14.4252 30.9998 16.6666ZM0.666504 16.6666C0.666504 14.4993 0.666504 13.4157 0.786276 12.5059C1.61335 6.22368 6.55687 1.28016 12.8391 0.453085C13.7489 0.333313 14.8325 0.333313 16.9998 0.333313C19.1671 0.333313 20.2508 0.333313 21.1605 0.453085C27.4428 1.28016 32.3863 6.22368 33.2134 12.5059C33.3332 13.4157 33.3332 14.4994 33.3332 16.6666V35.3333C33.3332 37.5006 33.3332 38.5843 33.2134 39.494C32.3863 45.7763 27.4428 50.7198 21.1605 51.5469C20.2508 51.6666 19.1671 51.6666 16.9998 51.6666C14.8325 51.6666 13.7489 51.6666 12.8391 51.5469C6.55687 50.7198 1.61335 45.7763 0.786276 39.494C0.666504 38.5843 0.666504 37.5006 0.666504 35.3333V16.6666ZM15.8332 13.1666C15.8332 13.0011 15.8676 12.8437 15.9297 12.7011C15.9886 12.566 16.0722 12.4443 16.1749 12.3416C16.386 12.1305 16.6777 11.9999 16.9998 11.9999C17.6435 11.9999 18.1654 12.5212 18.1665 13.1646L18.1665 13.1666V17.8332L18.1665 17.8353C18.1665 17.8364 18.1665 17.8376 18.1665 17.8387C18.1661 17.9132 18.1588 17.986 18.1452 18.0565C18.0853 18.3656 17.9033 18.6312 17.6515 18.8011C17.4655 18.9266 17.2412 18.9999 16.9998 18.9999C16.3555 18.9999 15.8332 18.4776 15.8332 17.8332V13.1666Z",
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
fillOpacity: "0.8"
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const IconMouseTool = ()=>/*#__PURE__*/ jsx("svg", {
|
|
20
|
+
width: "1em",
|
|
21
|
+
height: "1em",
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
fill: "currentColor",
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
26
|
+
fillRule: "evenodd",
|
|
27
|
+
clipRule: "evenodd",
|
|
28
|
+
d: "M4.5 8C4.5 4.13401 7.63401 1 11.5 1H12.5C16.366 1 19.5 4.13401 19.5 8V17C19.5 20.3137 16.8137 23 13.5 23H10.5C7.18629 23 4.5 20.3137 4.5 17V8ZM11.2517 3.00606C8.60561 3.13547 6.5 5.32184 6.5 8V17C6.5 19.2091 8.29086 21 10.5 21H13.5C15.7091 21 17.5 19.2091 17.5 17V8C17.5 5.32297 15.3962 3.13732 12.7517 3.00622V5.28013C13.2606 5.54331 13.6074 6.06549 13.6074 6.66669V8.75759C13.6074 9.35879 13.2606 9.88097 12.7517 10.1441V11.4091C12.7517 11.8233 12.4159 12.1591 12.0017 12.1591C11.5875 12.1591 11.2517 11.8233 11.2517 11.4091V10.1457C10.7411 9.88298 10.3931 9.35994 10.3931 8.75759V6.66669C10.3931 6.06433 10.7411 5.5413 11.2517 5.27862V3.00606ZM12.0017 6.14397C11.7059 6.14397 11.466 6.38381 11.466 6.67968V8.74462C11.466 9.03907 11.7036 9.27804 11.9975 9.28031L12.0002 9.28032C12.0456 9.28032 12.0896 9.27482 12.1316 9.26447C12.3401 9.21256 12.5002 9.0386 12.5318 8.82287C12.5345 8.80149 12.5359 8.7797 12.5359 8.75759V6.66669C12.5359 6.64463 12.5345 6.62288 12.5318 6.60154C12.4999 6.38354 12.3368 6.20817 12.1252 6.15826C12.0856 6.14891 12.0442 6.14397 12.0017 6.14397Z"
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
export { IconMouse, IconMouseTool };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function IconPad(props) {
|
|
3
|
+
const { width, height } = props;
|
|
4
|
+
return /*#__PURE__*/ jsxs("svg", {
|
|
5
|
+
width: width || 48,
|
|
6
|
+
height: height || 38,
|
|
7
|
+
viewBox: "0 0 48 38",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx("rect", {
|
|
12
|
+
x: "1.83317",
|
|
13
|
+
y: "1.49998",
|
|
14
|
+
width: "44.3333",
|
|
15
|
+
height: "35",
|
|
16
|
+
rx: "3.5",
|
|
17
|
+
stroke: "currentColor",
|
|
18
|
+
strokeOpacity: "0.8",
|
|
19
|
+
strokeWidth: "2.33333"
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsx("path", {
|
|
22
|
+
d: "M14.6665 30.6667H33.3332",
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeOpacity: "0.8",
|
|
25
|
+
strokeWidth: "2.33333",
|
|
26
|
+
strokeLinecap: "round"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const IconPadTool = ()=>/*#__PURE__*/ jsxs("svg", {
|
|
32
|
+
width: "1em",
|
|
33
|
+
height: "1em",
|
|
34
|
+
viewBox: "0 0 24 24",
|
|
35
|
+
fill: "currentColor",
|
|
36
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ jsx("path", {
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
clipRule: "evenodd",
|
|
41
|
+
d: "M20.8549 5H3.1451C3.06496 5 3 5.06496 3 5.1451V18.8549C3 18.935 3.06496 19 3.1451 19H20.8549C20.935 19 21 18.935 21 18.8549V5.1451C21 5.06496 20.935 5 20.8549 5ZM3.1451 3C1.96039 3 1 3.96039 1 5.1451V18.8549C1 20.0396 1.96039 21 3.1451 21H20.8549C22.0396 21 23 20.0396 23 18.8549V5.1451C23 3.96039 22.0396 3 20.8549 3H3.1451Z"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ jsx("path", {
|
|
44
|
+
fillRule: "evenodd",
|
|
45
|
+
clipRule: "evenodd",
|
|
46
|
+
d: "M6.99991 16C6.99991 15.4477 7.44762 15 7.99991 15H15.9999C16.5522 15 16.9999 15.4477 16.9999 16C16.9999 16.5523 16.5522 17 15.9999 17H7.99991C7.44762 17 6.99991 16.5523 6.99991 16Z"
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
export { IconPad, IconPadTool };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { usePanelManager } from "@flowgram.ai/panel-manager-plugin";
|
|
3
|
+
import { useNodeRender } from "@flowgram.ai/fixed-layout-editor";
|
|
4
|
+
import { theme } from "antd";
|
|
5
|
+
import { NodeRenderContext } from "../../context/index.js";
|
|
6
|
+
import { BaseNodeStyle, ErrorIcon } from "./styles.js";
|
|
7
|
+
import { nodeFormPanelFactory } from "../sidebar/index.js";
|
|
8
|
+
const BaseNode = ({ node })=>{
|
|
9
|
+
const nodeRender = useNodeRender();
|
|
10
|
+
const form = nodeRender.form;
|
|
11
|
+
const { token } = theme.useToken();
|
|
12
|
+
const panelManager = usePanelManager();
|
|
13
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
14
|
+
children: [
|
|
15
|
+
form?.state.invalid && /*#__PURE__*/ jsx(ErrorIcon, {}),
|
|
16
|
+
/*#__PURE__*/ jsx(BaseNodeStyle, {
|
|
17
|
+
primaryColor: token.colorPrimary,
|
|
18
|
+
onMouseEnter: nodeRender.onMouseEnter,
|
|
19
|
+
onMouseLeave: nodeRender.onMouseLeave,
|
|
20
|
+
className: nodeRender.activated ? 'activated' : '',
|
|
21
|
+
onClick: ()=>{
|
|
22
|
+
if (nodeRender.dragging) return;
|
|
23
|
+
panelManager.open(nodeFormPanelFactory.key, 'right', {
|
|
24
|
+
props: {
|
|
25
|
+
nodeId: nodeRender.node.id
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
style: {
|
|
30
|
+
...nodeRender.isBlockOrderIcon || nodeRender.isBlockIcon ? {} : {},
|
|
31
|
+
...nodeRender.node.getNodeRegistry().meta.style,
|
|
32
|
+
opacity: nodeRender.dragging ? 0.3 : 1,
|
|
33
|
+
outline: form?.state.invalid ? '1px solid red' : 'none'
|
|
34
|
+
},
|
|
35
|
+
children: /*#__PURE__*/ jsx(NodeRenderContext.Provider, {
|
|
36
|
+
value: nodeRender,
|
|
37
|
+
children: form?.render()
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export { BaseNode };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface BaseNodeStyleProps {
|
|
2
|
+
primaryColor?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const BaseNodeStyle: import("styled-components").StyledComponent<"div", any, BaseNodeStyleProps, never>;
|
|
5
|
+
export declare const ErrorIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InfoCircleOutlined } from "@ant-design/icons";
|
|
3
|
+
import styled_components from "styled-components";
|
|
4
|
+
const BaseNodeStyle = styled_components.div`
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
background-color: #fff;
|
|
7
|
+
border: 1px solid rgba(6, 7, 9, 0.15);
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.04), 0 4px 12px 0 rgba(0, 0, 0, 0.02);
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
position: relative;
|
|
14
|
+
width: 260px;
|
|
15
|
+
cursor: default;
|
|
16
|
+
|
|
17
|
+
&.activated {
|
|
18
|
+
border: 1px solid ${(props)=>props.primaryColor || '#82a7fc'};
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
const ErrorIcon = ()=>/*#__PURE__*/ jsx(InfoCircleOutlined, {
|
|
22
|
+
style: {
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
color: 'red',
|
|
25
|
+
left: -6,
|
|
26
|
+
top: -6,
|
|
27
|
+
zIndex: 1,
|
|
28
|
+
background: 'white',
|
|
29
|
+
borderRadius: 8
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export { BaseNodeStyle, ErrorIcon };
|