@sunspirytus/xflow-core 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/index.css +108 -0
- package/dist/index.umd.js +35 -0
- package/dist/index.umd.js.map +1 -0
- package/es/antd-icons/index.d.ts +20 -0
- package/es/antd-icons/index.js +29 -0
- package/es/antd-icons/index.js.map +1 -0
- package/es/command/__test__/graph-command.spec.d.ts +1 -0
- package/es/command/__test__/graph-command.spec.js +109 -0
- package/es/command/__test__/graph-command.spec.js.map +1 -0
- package/es/command/graph-command.d.ts +177 -0
- package/es/command/graph-command.js +300 -0
- package/es/command/graph-command.js.map +1 -0
- package/es/command/index.d.ts +7 -0
- package/es/command/index.js +6 -0
- package/es/command/index.js.map +1 -0
- package/es/command/interface.d.ts +221 -0
- package/es/command/interface.js +23 -0
- package/es/command/interface.js.map +1 -0
- package/es/command/module.d.ts +2 -0
- package/es/command/module.js +15 -0
- package/es/command/module.js.map +1 -0
- package/es/command-contributions/cmd-context.d.ts +76 -0
- package/es/command-contributions/cmd-context.js +123 -0
- package/es/command-contributions/cmd-context.js.map +1 -0
- package/es/command-contributions/command-contribution.d.ts +23 -0
- package/es/command-contributions/command-contribution.js +182 -0
- package/es/command-contributions/command-contribution.js.map +1 -0
- package/es/command-contributions/components/context.d.ts +11 -0
- package/es/command-contributions/components/context.js +86 -0
- package/es/command-contributions/components/context.js.map +1 -0
- package/es/command-contributions/components/index.d.ts +11 -0
- package/es/command-contributions/components/index.js +32 -0
- package/es/command-contributions/components/index.js.map +1 -0
- package/es/command-contributions/config.d.ts +39 -0
- package/es/command-contributions/config.js +64 -0
- package/es/command-contributions/config.js.map +1 -0
- package/es/command-contributions/constant.d.ts +98 -0
- package/es/command-contributions/constant.js +272 -0
- package/es/command-contributions/constant.js.map +1 -0
- package/es/command-contributions/edge/edge-add.d.ts +83 -0
- package/es/command-contributions/edge/edge-add.js +134 -0
- package/es/command-contributions/edge/edge-add.js.map +1 -0
- package/es/command-contributions/edge/edge-back.d.ts +27 -0
- package/es/command-contributions/edge/edge-back.js +72 -0
- package/es/command-contributions/edge/edge-back.js.map +1 -0
- package/es/command-contributions/edge/edge-del.d.ts +67 -0
- package/es/command-contributions/edge/edge-del.js +129 -0
- package/es/command-contributions/edge/edge-del.js.map +1 -0
- package/es/command-contributions/edge/edge-front.d.ts +27 -0
- package/es/command-contributions/edge/edge-front.js +72 -0
- package/es/command-contributions/edge/edge-front.js.map +1 -0
- package/es/command-contributions/edge/edge-highlight.d.ts +32 -0
- package/es/command-contributions/edge/edge-highlight.js +92 -0
- package/es/command-contributions/edge/edge-highlight.js.map +1 -0
- package/es/command-contributions/edge/edge-update.d.ts +46 -0
- package/es/command-contributions/edge/edge-update.js +99 -0
- package/es/command-contributions/edge/edge-update.js.map +1 -0
- package/es/command-contributions/edge/index.d.ts +50 -0
- package/es/command-contributions/edge/index.js +19 -0
- package/es/command-contributions/edge/index.js.map +1 -0
- package/es/command-contributions/graph/graph-add-tool.d.ts +49 -0
- package/es/command-contributions/graph/graph-add-tool.js +74 -0
- package/es/command-contributions/graph/graph-add-tool.js.map +1 -0
- package/es/command-contributions/graph/graph-cmd-redo.d.ts +40 -0
- package/es/command-contributions/graph/graph-cmd-redo.js +77 -0
- package/es/command-contributions/graph/graph-cmd-redo.js.map +1 -0
- package/es/command-contributions/graph/graph-cmd-undo.d.ts +36 -0
- package/es/command-contributions/graph/graph-cmd-undo.js +77 -0
- package/es/command-contributions/graph/graph-cmd-undo.js.map +1 -0
- package/es/command-contributions/graph/graph-copy.d.ts +39 -0
- package/es/command-contributions/graph/graph-copy.js +102 -0
- package/es/command-contributions/graph/graph-copy.js.map +1 -0
- package/es/command-contributions/graph/graph-del-tool.d.ts +47 -0
- package/es/command-contributions/graph/graph-del-tool.js +68 -0
- package/es/command-contributions/graph/graph-del-tool.js.map +1 -0
- package/es/command-contributions/graph/graph-fulllscreen.d.ts +37 -0
- package/es/command-contributions/graph/graph-fulllscreen.js +84 -0
- package/es/command-contributions/graph/graph-fulllscreen.js.map +1 -0
- package/es/command-contributions/graph/graph-history-redo.d.ts +33 -0
- package/es/command-contributions/graph/graph-history-redo.js +69 -0
- package/es/command-contributions/graph/graph-history-redo.js.map +1 -0
- package/es/command-contributions/graph/graph-history-reset.d.ts +33 -0
- package/es/command-contributions/graph/graph-history-reset.js +59 -0
- package/es/command-contributions/graph/graph-history-reset.js.map +1 -0
- package/es/command-contributions/graph/graph-history-toggle.d.ts +35 -0
- package/es/command-contributions/graph/graph-history-toggle.js +75 -0
- package/es/command-contributions/graph/graph-history-toggle.js.map +1 -0
- package/es/command-contributions/graph/graph-history-undo.d.ts +35 -0
- package/es/command-contributions/graph/graph-history-undo.js +69 -0
- package/es/command-contributions/graph/graph-history-undo.js.map +1 -0
- package/es/command-contributions/graph/graph-layout.d.ts +43 -0
- package/es/command-contributions/graph/graph-layout.js +71 -0
- package/es/command-contributions/graph/graph-layout.js.map +1 -0
- package/es/command-contributions/graph/graph-load-data.d.ts +37 -0
- package/es/command-contributions/graph/graph-load-data.js +68 -0
- package/es/command-contributions/graph/graph-load-data.js.map +1 -0
- package/es/command-contributions/graph/graph-meta.d.ts +47 -0
- package/es/command-contributions/graph/graph-meta.js +78 -0
- package/es/command-contributions/graph/graph-meta.js.map +1 -0
- package/es/command-contributions/graph/graph-paste.d.ts +52 -0
- package/es/command-contributions/graph/graph-paste.js +129 -0
- package/es/command-contributions/graph/graph-paste.js.map +1 -0
- package/es/command-contributions/graph/graph-render.d.ts +53 -0
- package/es/command-contributions/graph/graph-render.js +249 -0
- package/es/command-contributions/graph/graph-render.js.map +1 -0
- package/es/command-contributions/graph/graph-resize.d.ts +40 -0
- package/es/command-contributions/graph/graph-resize.js +75 -0
- package/es/command-contributions/graph/graph-resize.js.map +1 -0
- package/es/command-contributions/graph/graph-save-data.d.ts +43 -0
- package/es/command-contributions/graph/graph-save-data.js +101 -0
- package/es/command-contributions/graph/graph-save-data.js.map +1 -0
- package/es/command-contributions/graph/graph-toggle-multi-select.d.ts +38 -0
- package/es/command-contributions/graph/graph-toggle-multi-select.js +96 -0
- package/es/command-contributions/graph/graph-toggle-multi-select.js.map +1 -0
- package/es/command-contributions/graph/graph-zoom.d.ts +51 -0
- package/es/command-contributions/graph/graph-zoom.js +89 -0
- package/es/command-contributions/graph/graph-zoom.js.map +1 -0
- package/es/command-contributions/graph/index.d.ts +114 -0
- package/es/command-contributions/graph/index.js +83 -0
- package/es/command-contributions/graph/index.js.map +1 -0
- package/es/command-contributions/group/group-add.d.ts +56 -0
- package/es/command-contributions/group/group-add.js +114 -0
- package/es/command-contributions/group/group-add.js.map +1 -0
- package/es/command-contributions/group/group-del.d.ts +43 -0
- package/es/command-contributions/group/group-del.js +100 -0
- package/es/command-contributions/group/group-del.js.map +1 -0
- package/es/command-contributions/group/group-init.d.ts +40 -0
- package/es/command-contributions/group/group-init.js +97 -0
- package/es/command-contributions/group/group-init.js.map +1 -0
- package/es/command-contributions/group/group-toggle-collapse.d.ts +47 -0
- package/es/command-contributions/group/group-toggle-collapse.js +123 -0
- package/es/command-contributions/group/group-toggle-collapse.js.map +1 -0
- package/es/command-contributions/group/index.d.ts +39 -0
- package/es/command-contributions/group/index.js +14 -0
- package/es/command-contributions/group/index.js.map +1 -0
- package/es/command-contributions/index.d.ts +10 -0
- package/es/command-contributions/index.js +13 -0
- package/es/command-contributions/index.js.map +1 -0
- package/es/command-contributions/interface.d.ts +17 -0
- package/es/command-contributions/interface.js +2 -0
- package/es/command-contributions/interface.js.map +1 -0
- package/es/command-contributions/mapping-service.d.ts +20 -0
- package/es/command-contributions/mapping-service.js +91 -0
- package/es/command-contributions/mapping-service.js.map +1 -0
- package/es/command-contributions/models/index.d.ts +24 -0
- package/es/command-contributions/models/index.js +9 -0
- package/es/command-contributions/models/index.js.map +1 -0
- package/es/command-contributions/models/update-model.d.ts +45 -0
- package/es/command-contributions/models/update-model.js +70 -0
- package/es/command-contributions/models/update-model.js.map +1 -0
- package/es/command-contributions/module.d.ts +5 -0
- package/es/command-contributions/module.js +45 -0
- package/es/command-contributions/module.js.map +1 -0
- package/es/command-contributions/node/index.d.ts +70 -0
- package/es/command-contributions/node/index.js +38 -0
- package/es/command-contributions/node/index.js.map +1 -0
- package/es/command-contributions/node/node-add.d.ts +58 -0
- package/es/command-contributions/node/node-add.js +131 -0
- package/es/command-contributions/node/node-add.js.map +1 -0
- package/es/command-contributions/node/node-back.d.ts +32 -0
- package/es/command-contributions/node/node-back.js +74 -0
- package/es/command-contributions/node/node-back.js.map +1 -0
- package/es/command-contributions/node/node-center.d.ts +30 -0
- package/es/command-contributions/node/node-center.js +60 -0
- package/es/command-contributions/node/node-center.js.map +1 -0
- package/es/command-contributions/node/node-del.d.ts +51 -0
- package/es/command-contributions/node/node-del.js +102 -0
- package/es/command-contributions/node/node-del.js.map +1 -0
- package/es/command-contributions/node/node-front.d.ts +27 -0
- package/es/command-contributions/node/node-front.js +73 -0
- package/es/command-contributions/node/node-front.js.map +1 -0
- package/es/command-contributions/node/node-highlight.d.ts +39 -0
- package/es/command-contributions/node/node-highlight.js +85 -0
- package/es/command-contributions/node/node-highlight.js.map +1 -0
- package/es/command-contributions/node/node-move.d.ts +51 -0
- package/es/command-contributions/node/node-move.js +94 -0
- package/es/command-contributions/node/node-move.js.map +1 -0
- package/es/command-contributions/node/node-select.d.ts +30 -0
- package/es/command-contributions/node/node-select.js +73 -0
- package/es/command-contributions/node/node-select.js.map +1 -0
- package/es/command-contributions/node/node-update-port.d.ts +54 -0
- package/es/command-contributions/node/node-update-port.js +105 -0
- package/es/command-contributions/node/node-update-port.js.map +1 -0
- package/es/command-contributions/node/node-update.d.ts +53 -0
- package/es/command-contributions/node/node-update.js +122 -0
- package/es/command-contributions/node/node-update.js.map +1 -0
- package/es/common/deferred.d.ts +8 -0
- package/es/common/deferred.js +17 -0
- package/es/common/deferred.js.map +1 -0
- package/es/common/delay.d.ts +1 -0
- package/es/common/delay.js +5 -0
- package/es/common/delay.js.map +1 -0
- package/es/common/disposable.d.ts +28 -0
- package/es/common/disposable.js +81 -0
- package/es/common/disposable.js.map +1 -0
- package/es/common/event-helper.d.ts +7 -0
- package/es/common/event-helper.js +8 -0
- package/es/common/event-helper.js.map +1 -0
- package/es/common/graph-utils.d.ts +22 -0
- package/es/common/graph-utils.js +34 -0
- package/es/common/graph-utils.js.map +1 -0
- package/es/common/position.d.ts +10 -0
- package/es/common/position.js +12 -0
- package/es/common/position.js.map +1 -0
- package/es/common/rx-model-hook.d.ts +16 -0
- package/es/common/rx-model-hook.js +92 -0
- package/es/common/rx-model-hook.js.map +1 -0
- package/es/common/rx-model.d.ts +66 -0
- package/es/common/rx-model.js +101 -0
- package/es/common/rx-model.js.map +1 -0
- package/es/common/safe-json.d.ts +1 -0
- package/es/common/safe-json.js +12 -0
- package/es/common/safe-json.js.map +1 -0
- package/es/common/types.d.ts +15 -0
- package/es/common/types.js +2 -0
- package/es/common/types.js.map +1 -0
- package/es/common/utils.d.ts +11 -0
- package/es/common/utils.js +48 -0
- package/es/common/utils.js.map +1 -0
- package/es/common/uuid.d.ts +2 -0
- package/es/common/uuid.js +8 -0
- package/es/common/uuid.js.map +1 -0
- package/es/constants.d.ts +31 -0
- package/es/constants.js +26 -0
- package/es/constants.js.map +1 -0
- package/es/hooks/components/index.d.ts +13 -0
- package/es/hooks/components/index.js +36 -0
- package/es/hooks/components/index.js.map +1 -0
- package/es/hooks/config.d.ts +41 -0
- package/es/hooks/config.js +35 -0
- package/es/hooks/config.js.map +1 -0
- package/es/hooks/contributions/default.d.ts +19 -0
- package/es/hooks/contributions/default.js +41 -0
- package/es/hooks/contributions/default.js.map +1 -0
- package/es/hooks/contributions/graph.d.ts +19 -0
- package/es/hooks/contributions/graph.js +96 -0
- package/es/hooks/contributions/graph.js.map +1 -0
- package/es/hooks/hook-registry.d.ts +27 -0
- package/es/hooks/hook-registry.js +51 -0
- package/es/hooks/hook-registry.js.map +1 -0
- package/es/hooks/index.d.ts +4 -0
- package/es/hooks/index.js +9 -0
- package/es/hooks/index.js.map +1 -0
- package/es/hooks/interface.d.ts +62 -0
- package/es/hooks/interface.js +19 -0
- package/es/hooks/interface.js.map +1 -0
- package/es/hooks/module.d.ts +8 -0
- package/es/hooks/module.js +26 -0
- package/es/hooks/module.js.map +1 -0
- package/es/index.d.ts +85 -0
- package/es/index.js +97 -0
- package/es/index.js.map +1 -0
- package/es/interface.d.ts +161 -0
- package/es/interface.js +21 -0
- package/es/interface.js.map +1 -0
- package/es/keybinding/components/index.d.ts +13 -0
- package/es/keybinding/components/index.js +36 -0
- package/es/keybinding/components/index.js.map +1 -0
- package/es/keybinding/config.d.ts +23 -0
- package/es/keybinding/config.js +36 -0
- package/es/keybinding/config.js.map +1 -0
- package/es/keybinding/index.d.ts +4 -0
- package/es/keybinding/index.js +5 -0
- package/es/keybinding/index.js.map +1 -0
- package/es/keybinding/interface.d.ts +52 -0
- package/es/keybinding/interface.js +6 -0
- package/es/keybinding/interface.js.map +1 -0
- package/es/keybinding/keybinding-registry.d.ts +52 -0
- package/es/keybinding/keybinding-registry.js +129 -0
- package/es/keybinding/keybinding-registry.js.map +1 -0
- package/es/keybinding/module.d.ts +8 -0
- package/es/keybinding/module.js +33 -0
- package/es/keybinding/module.js.map +1 -0
- package/es/menu/components/index.d.ts +4 -0
- package/es/menu/components/index.js +22 -0
- package/es/menu/components/index.js.map +1 -0
- package/es/menu/index.d.ts +3 -0
- package/es/menu/index.js +10 -0
- package/es/menu/index.js.map +1 -0
- package/es/menu/interface.d.ts +114 -0
- package/es/menu/interface.js +18 -0
- package/es/menu/interface.js.map +1 -0
- package/es/menu/menu-registry.d.ts +32 -0
- package/es/menu/menu-registry.js +65 -0
- package/es/menu/menu-registry.js.map +1 -0
- package/es/menu/module.d.ts +3 -0
- package/es/menu/module.js +17 -0
- package/es/menu/module.js.map +1 -0
- package/es/model-service/components/index.d.ts +12 -0
- package/es/model-service/components/index.js +40 -0
- package/es/model-service/components/index.js.map +1 -0
- package/es/model-service/config.d.ts +20 -0
- package/es/model-service/config.js +36 -0
- package/es/model-service/config.js.map +1 -0
- package/es/model-service/constant.d.ts +174 -0
- package/es/model-service/constant.js +162 -0
- package/es/model-service/constant.js.map +1 -0
- package/es/model-service/contributions/command-model.d.ts +9 -0
- package/es/model-service/contributions/command-model.js +48 -0
- package/es/model-service/contributions/command-model.js.map +1 -0
- package/es/model-service/contributions/graph-model.d.ts +12 -0
- package/es/model-service/contributions/graph-model.js +250 -0
- package/es/model-service/contributions/graph-model.js.map +1 -0
- package/es/model-service/index.d.ts +6 -0
- package/es/model-service/index.js +7 -0
- package/es/model-service/index.js.map +1 -0
- package/es/model-service/interface.d.ts +66 -0
- package/es/model-service/interface.js +11 -0
- package/es/model-service/interface.js.map +1 -0
- package/es/model-service/model-registry.d.ts +49 -0
- package/es/model-service/model-registry.js +117 -0
- package/es/model-service/model-registry.js.map +1 -0
- package/es/model-service/module.d.ts +9 -0
- package/es/model-service/module.js +42 -0
- package/es/model-service/module.js.map +1 -0
- package/es/model-service/utils.d.ts +5 -0
- package/es/model-service/utils.js +52 -0
- package/es/model-service/utils.js.map +1 -0
- package/es/style/components.css +108 -0
- package/es/style/components.less +1 -0
- package/es/style/index.css +0 -0
- package/es/style/index.less +1 -0
- package/es/style/themes/default.css +0 -0
- package/es/style/themes/default.less +2 -0
- package/es/style/themes/index.css +0 -0
- package/es/style/themes/index.less +1 -0
- package/es/toolbar/components/index.d.ts +4 -0
- package/es/toolbar/components/index.js +21 -0
- package/es/toolbar/components/index.js.map +1 -0
- package/es/toolbar/index.d.ts +3 -0
- package/es/toolbar/index.js +8 -0
- package/es/toolbar/index.js.map +1 -0
- package/es/toolbar/interface.d.ts +104 -0
- package/es/toolbar/interface.js +8 -0
- package/es/toolbar/interface.js.map +1 -0
- package/es/toolbar/module.d.ts +8 -0
- package/es/toolbar/module.js +18 -0
- package/es/toolbar/module.js.map +1 -0
- package/es/toolbar/toolbar-registry.d.ts +80 -0
- package/es/toolbar/toolbar-registry.js +127 -0
- package/es/toolbar/toolbar-registry.js.map +1 -0
- package/es/xflow-main/application-module.d.ts +8 -0
- package/es/xflow-main/application-module.js +46 -0
- package/es/xflow-main/application-module.js.map +1 -0
- package/es/xflow-main/application.d.ts +77 -0
- package/es/xflow-main/application.js +178 -0
- package/es/xflow-main/application.js.map +1 -0
- package/es/xflow-main/components/app-context.d.ts +14 -0
- package/es/xflow-main/components/app-context.js +75 -0
- package/es/xflow-main/components/app-context.js.map +1 -0
- package/es/xflow-main/components/app-extension-module.d.ts +7 -0
- package/es/xflow-main/components/app-extension-module.js +32 -0
- package/es/xflow-main/components/app-extension-module.js.map +1 -0
- package/es/xflow-main/components/canvas.d.ts +11 -0
- package/es/xflow-main/components/canvas.js +62 -0
- package/es/xflow-main/components/canvas.js.map +1 -0
- package/es/xflow-main/components/extension-context.d.ts +5 -0
- package/es/xflow-main/components/extension-context.js +9 -0
- package/es/xflow-main/components/extension-context.js.map +1 -0
- package/es/xflow-main/components/extension-registry.d.ts +22 -0
- package/es/xflow-main/components/extension-registry.js +61 -0
- package/es/xflow-main/components/extension-registry.js.map +1 -0
- package/es/xflow-main/components/global-config-context.d.ts +3 -0
- package/es/xflow-main/components/global-config-context.js +31 -0
- package/es/xflow-main/components/global-config-context.js.map +1 -0
- package/es/xflow-main/components/index.d.ts +58 -0
- package/es/xflow-main/components/index.js +116 -0
- package/es/xflow-main/components/index.js.map +1 -0
- package/es/xflow-main/graph/config.d.ts +102 -0
- package/es/xflow-main/graph/config.js +233 -0
- package/es/xflow-main/graph/config.js.map +1 -0
- package/es/xflow-main/graph/graph-provider.d.ts +47 -0
- package/es/xflow-main/graph/graph-provider.js +196 -0
- package/es/xflow-main/graph/graph-provider.js.map +1 -0
- package/es/xflow-main/graph/index.d.ts +4 -0
- package/es/xflow-main/graph/index.js +5 -0
- package/es/xflow-main/graph/index.js.map +1 -0
- package/es/xflow-main/graph/module.d.ts +4 -0
- package/es/xflow-main/graph/module.js +16 -0
- package/es/xflow-main/graph/module.js.map +1 -0
- package/es/xflow-main/graph/react-group-node/index.css +44 -0
- package/es/xflow-main/graph/react-group-node/index.d.ts +2 -0
- package/es/xflow-main/graph/react-group-node/index.js +32 -0
- package/es/xflow-main/graph/react-group-node/index.js.map +1 -0
- package/es/xflow-main/graph/react-group-node/index.less +50 -0
- package/es/xflow-main/graph/react-node/index.css +42 -0
- package/es/xflow-main/graph/react-node/index.d.ts +20 -0
- package/es/xflow-main/graph/react-node/index.js +50 -0
- package/es/xflow-main/graph/react-node/index.js.map +1 -0
- package/es/xflow-main/graph/react-node/index.less +49 -0
- package/es/xflow-main/index.d.ts +19 -0
- package/es/xflow-main/index.js +26 -0
- package/es/xflow-main/index.js.map +1 -0
- package/es/xflow-main/interface.d.ts +33 -0
- package/es/xflow-main/interface.js +3 -0
- package/es/xflow-main/interface.js.map +1 -0
- package/es/xflow-main/style/index.css +108 -0
- package/es/xflow-main/style/index.less +31 -0
- package/lib/antd-icons/index.d.ts +20 -0
- package/lib/antd-icons/index.js +34 -0
- package/lib/antd-icons/index.js.map +1 -0
- package/lib/command/__test__/graph-command.spec.d.ts +1 -0
- package/lib/command/__test__/graph-command.spec.js +136 -0
- package/lib/command/__test__/graph-command.spec.js.map +1 -0
- package/lib/command/graph-command.d.ts +177 -0
- package/lib/command/graph-command.js +390 -0
- package/lib/command/graph-command.js.map +1 -0
- package/lib/command/index.d.ts +7 -0
- package/lib/command/index.js +15 -0
- package/lib/command/index.js.map +1 -0
- package/lib/command/interface.d.ts +221 -0
- package/lib/command/interface.js +26 -0
- package/lib/command/interface.js.map +1 -0
- package/lib/command/module.d.ts +2 -0
- package/lib/command/module.js +18 -0
- package/lib/command/module.js.map +1 -0
- package/lib/command-contributions/cmd-context.d.ts +76 -0
- package/lib/command-contributions/cmd-context.js +160 -0
- package/lib/command-contributions/cmd-context.js.map +1 -0
- package/lib/command-contributions/command-contribution.d.ts +23 -0
- package/lib/command-contributions/command-contribution.js +205 -0
- package/lib/command-contributions/command-contribution.js.map +1 -0
- package/lib/command-contributions/components/context.d.ts +11 -0
- package/lib/command-contributions/components/context.js +95 -0
- package/lib/command-contributions/components/context.js.map +1 -0
- package/lib/command-contributions/components/index.d.ts +11 -0
- package/lib/command-contributions/components/index.js +40 -0
- package/lib/command-contributions/components/index.js.map +1 -0
- package/lib/command-contributions/config.d.ts +39 -0
- package/lib/command-contributions/config.js +79 -0
- package/lib/command-contributions/config.js.map +1 -0
- package/lib/command-contributions/constant.d.ts +98 -0
- package/lib/command-contributions/constant.js +275 -0
- package/lib/command-contributions/constant.js.map +1 -0
- package/lib/command-contributions/edge/edge-add.d.ts +83 -0
- package/lib/command-contributions/edge/edge-add.js +179 -0
- package/lib/command-contributions/edge/edge-add.js.map +1 -0
- package/lib/command-contributions/edge/edge-back.d.ts +27 -0
- package/lib/command-contributions/edge/edge-back.js +107 -0
- package/lib/command-contributions/edge/edge-back.js.map +1 -0
- package/lib/command-contributions/edge/edge-del.d.ts +67 -0
- package/lib/command-contributions/edge/edge-del.js +170 -0
- package/lib/command-contributions/edge/edge-del.js.map +1 -0
- package/lib/command-contributions/edge/edge-front.d.ts +27 -0
- package/lib/command-contributions/edge/edge-front.js +107 -0
- package/lib/command-contributions/edge/edge-front.js.map +1 -0
- package/lib/command-contributions/edge/edge-highlight.d.ts +32 -0
- package/lib/command-contributions/edge/edge-highlight.js +121 -0
- package/lib/command-contributions/edge/edge-highlight.js.map +1 -0
- package/lib/command-contributions/edge/edge-update.d.ts +46 -0
- package/lib/command-contributions/edge/edge-update.js +148 -0
- package/lib/command-contributions/edge/edge-update.js.map +1 -0
- package/lib/command-contributions/edge/index.d.ts +50 -0
- package/lib/command-contributions/edge/index.js +23 -0
- package/lib/command-contributions/edge/index.js.map +1 -0
- package/lib/command-contributions/graph/graph-add-tool.d.ts +49 -0
- package/lib/command-contributions/graph/graph-add-tool.js +111 -0
- package/lib/command-contributions/graph/graph-add-tool.js.map +1 -0
- package/lib/command-contributions/graph/graph-cmd-redo.d.ts +40 -0
- package/lib/command-contributions/graph/graph-cmd-redo.js +104 -0
- package/lib/command-contributions/graph/graph-cmd-redo.js.map +1 -0
- package/lib/command-contributions/graph/graph-cmd-undo.d.ts +36 -0
- package/lib/command-contributions/graph/graph-cmd-undo.js +104 -0
- package/lib/command-contributions/graph/graph-cmd-undo.js.map +1 -0
- package/lib/command-contributions/graph/graph-copy.d.ts +39 -0
- package/lib/command-contributions/graph/graph-copy.js +137 -0
- package/lib/command-contributions/graph/graph-copy.js.map +1 -0
- package/lib/command-contributions/graph/graph-del-tool.d.ts +47 -0
- package/lib/command-contributions/graph/graph-del-tool.js +101 -0
- package/lib/command-contributions/graph/graph-del-tool.js.map +1 -0
- package/lib/command-contributions/graph/graph-fulllscreen.d.ts +37 -0
- package/lib/command-contributions/graph/graph-fulllscreen.js +116 -0
- package/lib/command-contributions/graph/graph-fulllscreen.js.map +1 -0
- package/lib/command-contributions/graph/graph-history-redo.d.ts +33 -0
- package/lib/command-contributions/graph/graph-history-redo.js +106 -0
- package/lib/command-contributions/graph/graph-history-redo.js.map +1 -0
- package/lib/command-contributions/graph/graph-history-reset.d.ts +33 -0
- package/lib/command-contributions/graph/graph-history-reset.js +91 -0
- package/lib/command-contributions/graph/graph-history-reset.js.map +1 -0
- package/lib/command-contributions/graph/graph-history-toggle.d.ts +35 -0
- package/lib/command-contributions/graph/graph-history-toggle.js +112 -0
- package/lib/command-contributions/graph/graph-history-toggle.js.map +1 -0
- package/lib/command-contributions/graph/graph-history-undo.d.ts +35 -0
- package/lib/command-contributions/graph/graph-history-undo.js +106 -0
- package/lib/command-contributions/graph/graph-history-undo.js.map +1 -0
- package/lib/command-contributions/graph/graph-layout.d.ts +43 -0
- package/lib/command-contributions/graph/graph-layout.js +104 -0
- package/lib/command-contributions/graph/graph-layout.js.map +1 -0
- package/lib/command-contributions/graph/graph-load-data.d.ts +37 -0
- package/lib/command-contributions/graph/graph-load-data.js +104 -0
- package/lib/command-contributions/graph/graph-load-data.js.map +1 -0
- package/lib/command-contributions/graph/graph-meta.d.ts +47 -0
- package/lib/command-contributions/graph/graph-meta.js +116 -0
- package/lib/command-contributions/graph/graph-meta.js.map +1 -0
- package/lib/command-contributions/graph/graph-paste.d.ts +52 -0
- package/lib/command-contributions/graph/graph-paste.js +196 -0
- package/lib/command-contributions/graph/graph-paste.js.map +1 -0
- package/lib/command-contributions/graph/graph-render.d.ts +53 -0
- package/lib/command-contributions/graph/graph-render.js +360 -0
- package/lib/command-contributions/graph/graph-render.js.map +1 -0
- package/lib/command-contributions/graph/graph-resize.d.ts +40 -0
- package/lib/command-contributions/graph/graph-resize.js +110 -0
- package/lib/command-contributions/graph/graph-resize.js.map +1 -0
- package/lib/command-contributions/graph/graph-save-data.d.ts +43 -0
- package/lib/command-contributions/graph/graph-save-data.js +141 -0
- package/lib/command-contributions/graph/graph-save-data.js.map +1 -0
- package/lib/command-contributions/graph/graph-toggle-multi-select.d.ts +38 -0
- package/lib/command-contributions/graph/graph-toggle-multi-select.js +133 -0
- package/lib/command-contributions/graph/graph-toggle-multi-select.js.map +1 -0
- package/lib/command-contributions/graph/graph-zoom.d.ts +51 -0
- package/lib/command-contributions/graph/graph-zoom.js +122 -0
- package/lib/command-contributions/graph/graph-zoom.js.map +1 -0
- package/lib/command-contributions/graph/index.d.ts +114 -0
- package/lib/command-contributions/graph/index.js +87 -0
- package/lib/command-contributions/graph/index.js.map +1 -0
- package/lib/command-contributions/group/group-add.d.ts +56 -0
- package/lib/command-contributions/group/group-add.js +156 -0
- package/lib/command-contributions/group/group-add.js.map +1 -0
- package/lib/command-contributions/group/group-del.d.ts +43 -0
- package/lib/command-contributions/group/group-del.js +146 -0
- package/lib/command-contributions/group/group-del.js.map +1 -0
- package/lib/command-contributions/group/group-init.d.ts +40 -0
- package/lib/command-contributions/group/group-init.js +139 -0
- package/lib/command-contributions/group/group-init.js.map +1 -0
- package/lib/command-contributions/group/group-toggle-collapse.d.ts +47 -0
- package/lib/command-contributions/group/group-toggle-collapse.js +161 -0
- package/lib/command-contributions/group/group-toggle-collapse.js.map +1 -0
- package/lib/command-contributions/group/index.d.ts +39 -0
- package/lib/command-contributions/group/index.js +18 -0
- package/lib/command-contributions/group/index.js.map +1 -0
- package/lib/command-contributions/index.d.ts +10 -0
- package/lib/command-contributions/index.js +25 -0
- package/lib/command-contributions/index.js.map +1 -0
- package/lib/command-contributions/interface.d.ts +17 -0
- package/lib/command-contributions/interface.js +3 -0
- package/lib/command-contributions/interface.js.map +1 -0
- package/lib/command-contributions/mapping-service.d.ts +20 -0
- package/lib/command-contributions/mapping-service.js +96 -0
- package/lib/command-contributions/mapping-service.js.map +1 -0
- package/lib/command-contributions/models/index.d.ts +24 -0
- package/lib/command-contributions/models/index.js +13 -0
- package/lib/command-contributions/models/index.js.map +1 -0
- package/lib/command-contributions/models/update-model.d.ts +45 -0
- package/lib/command-contributions/models/update-model.js +110 -0
- package/lib/command-contributions/models/update-model.js.map +1 -0
- package/lib/command-contributions/module.d.ts +5 -0
- package/lib/command-contributions/module.js +49 -0
- package/lib/command-contributions/module.js.map +1 -0
- package/lib/command-contributions/node/index.d.ts +70 -0
- package/lib/command-contributions/node/index.js +42 -0
- package/lib/command-contributions/node/index.js.map +1 -0
- package/lib/command-contributions/node/node-add.d.ts +58 -0
- package/lib/command-contributions/node/node-add.js +192 -0
- package/lib/command-contributions/node/node-add.js.map +1 -0
- package/lib/command-contributions/node/node-back.d.ts +32 -0
- package/lib/command-contributions/node/node-back.js +109 -0
- package/lib/command-contributions/node/node-back.js.map +1 -0
- package/lib/command-contributions/node/node-center.d.ts +30 -0
- package/lib/command-contributions/node/node-center.js +91 -0
- package/lib/command-contributions/node/node-center.js.map +1 -0
- package/lib/command-contributions/node/node-del.d.ts +51 -0
- package/lib/command-contributions/node/node-del.js +145 -0
- package/lib/command-contributions/node/node-del.js.map +1 -0
- package/lib/command-contributions/node/node-front.d.ts +27 -0
- package/lib/command-contributions/node/node-front.js +108 -0
- package/lib/command-contributions/node/node-front.js.map +1 -0
- package/lib/command-contributions/node/node-highlight.d.ts +39 -0
- package/lib/command-contributions/node/node-highlight.js +116 -0
- package/lib/command-contributions/node/node-highlight.js.map +1 -0
- package/lib/command-contributions/node/node-move.d.ts +51 -0
- package/lib/command-contributions/node/node-move.js +130 -0
- package/lib/command-contributions/node/node-move.js.map +1 -0
- package/lib/command-contributions/node/node-select.d.ts +30 -0
- package/lib/command-contributions/node/node-select.js +104 -0
- package/lib/command-contributions/node/node-select.js.map +1 -0
- package/lib/command-contributions/node/node-update-port.d.ts +54 -0
- package/lib/command-contributions/node/node-update-port.js +147 -0
- package/lib/command-contributions/node/node-update-port.js.map +1 -0
- package/lib/command-contributions/node/node-update.d.ts +53 -0
- package/lib/command-contributions/node/node-update.js +159 -0
- package/lib/command-contributions/node/node-update.js.map +1 -0
- package/lib/common/deferred.d.ts +8 -0
- package/lib/common/deferred.js +31 -0
- package/lib/common/deferred.js.map +1 -0
- package/lib/common/delay.d.ts +1 -0
- package/lib/common/delay.js +9 -0
- package/lib/common/delay.js.map +1 -0
- package/lib/common/disposable.d.ts +28 -0
- package/lib/common/disposable.js +116 -0
- package/lib/common/disposable.js.map +1 -0
- package/lib/common/event-helper.d.ts +7 -0
- package/lib/common/event-helper.js +12 -0
- package/lib/common/event-helper.js.map +1 -0
- package/lib/common/graph-utils.d.ts +22 -0
- package/lib/common/graph-utils.js +41 -0
- package/lib/common/graph-utils.js.map +1 -0
- package/lib/common/position.d.ts +10 -0
- package/lib/common/position.js +18 -0
- package/lib/common/position.js.map +1 -0
- package/lib/common/rx-model-hook.d.ts +16 -0
- package/lib/common/rx-model-hook.js +108 -0
- package/lib/common/rx-model-hook.js.map +1 -0
- package/lib/common/rx-model.d.ts +66 -0
- package/lib/common/rx-model.js +112 -0
- package/lib/common/rx-model.js.map +1 -0
- package/lib/common/safe-json.d.ts +1 -0
- package/lib/common/safe-json.js +17 -0
- package/lib/common/safe-json.js.map +1 -0
- package/lib/common/types.d.ts +15 -0
- package/lib/common/types.js +3 -0
- package/lib/common/types.js.map +1 -0
- package/lib/common/utils.d.ts +11 -0
- package/lib/common/utils.js +58 -0
- package/lib/common/utils.js.map +1 -0
- package/lib/common/uuid.d.ts +2 -0
- package/lib/common/uuid.js +12 -0
- package/lib/common/uuid.js.map +1 -0
- package/lib/constants.d.ts +31 -0
- package/lib/constants.js +29 -0
- package/lib/constants.js.map +1 -0
- package/lib/hooks/components/index.d.ts +13 -0
- package/lib/hooks/components/index.js +44 -0
- package/lib/hooks/components/index.js.map +1 -0
- package/lib/hooks/config.d.ts +41 -0
- package/lib/hooks/config.js +45 -0
- package/lib/hooks/config.js.map +1 -0
- package/lib/hooks/contributions/default.d.ts +19 -0
- package/lib/hooks/contributions/default.js +60 -0
- package/lib/hooks/contributions/default.js.map +1 -0
- package/lib/hooks/contributions/graph.d.ts +19 -0
- package/lib/hooks/contributions/graph.js +133 -0
- package/lib/hooks/contributions/graph.js.map +1 -0
- package/lib/hooks/hook-registry.d.ts +27 -0
- package/lib/hooks/hook-registry.js +62 -0
- package/lib/hooks/hook-registry.js.map +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.js +12 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/interface.d.ts +62 -0
- package/lib/hooks/interface.js +23 -0
- package/lib/hooks/interface.js.map +1 -0
- package/lib/hooks/module.d.ts +8 -0
- package/lib/hooks/module.js +32 -0
- package/lib/hooks/module.js.map +1 -0
- package/lib/index.d.ts +85 -0
- package/lib/index.js +155 -0
- package/lib/index.js.map +1 -0
- package/lib/interface.d.ts +161 -0
- package/lib/interface.js +24 -0
- package/lib/interface.js.map +1 -0
- package/lib/keybinding/components/index.d.ts +13 -0
- package/lib/keybinding/components/index.js +44 -0
- package/lib/keybinding/components/index.js.map +1 -0
- package/lib/keybinding/config.d.ts +23 -0
- package/lib/keybinding/config.js +48 -0
- package/lib/keybinding/config.js.map +1 -0
- package/lib/keybinding/index.d.ts +4 -0
- package/lib/keybinding/index.js +11 -0
- package/lib/keybinding/index.js.map +1 -0
- package/lib/keybinding/interface.d.ts +52 -0
- package/lib/keybinding/interface.js +9 -0
- package/lib/keybinding/interface.js.map +1 -0
- package/lib/keybinding/keybinding-registry.d.ts +52 -0
- package/lib/keybinding/keybinding-registry.js +166 -0
- package/lib/keybinding/keybinding-registry.js.map +1 -0
- package/lib/keybinding/module.d.ts +8 -0
- package/lib/keybinding/module.js +40 -0
- package/lib/keybinding/module.js.map +1 -0
- package/lib/menu/components/index.d.ts +4 -0
- package/lib/menu/components/index.js +28 -0
- package/lib/menu/components/index.js.map +1 -0
- package/lib/menu/index.d.ts +3 -0
- package/lib/menu/index.js +10 -0
- package/lib/menu/index.js.map +1 -0
- package/lib/menu/interface.d.ts +114 -0
- package/lib/menu/interface.js +21 -0
- package/lib/menu/interface.js.map +1 -0
- package/lib/menu/menu-registry.d.ts +32 -0
- package/lib/menu/menu-registry.js +72 -0
- package/lib/menu/menu-registry.js.map +1 -0
- package/lib/menu/module.d.ts +3 -0
- package/lib/menu/module.js +21 -0
- package/lib/menu/module.js.map +1 -0
- package/lib/model-service/components/index.d.ts +12 -0
- package/lib/model-service/components/index.js +48 -0
- package/lib/model-service/components/index.js.map +1 -0
- package/lib/model-service/config.d.ts +20 -0
- package/lib/model-service/config.js +48 -0
- package/lib/model-service/config.js.map +1 -0
- package/lib/model-service/constant.d.ts +174 -0
- package/lib/model-service/constant.js +186 -0
- package/lib/model-service/constant.js.map +1 -0
- package/lib/model-service/contributions/command-model.d.ts +9 -0
- package/lib/model-service/contributions/command-model.js +63 -0
- package/lib/model-service/contributions/command-model.js.map +1 -0
- package/lib/model-service/contributions/graph-model.d.ts +12 -0
- package/lib/model-service/contributions/graph-model.js +370 -0
- package/lib/model-service/contributions/graph-model.js.map +1 -0
- package/lib/model-service/index.d.ts +6 -0
- package/lib/model-service/index.js +17 -0
- package/lib/model-service/index.js.map +1 -0
- package/lib/model-service/interface.d.ts +66 -0
- package/lib/model-service/interface.js +14 -0
- package/lib/model-service/interface.js.map +1 -0
- package/lib/model-service/model-registry.d.ts +49 -0
- package/lib/model-service/model-registry.js +133 -0
- package/lib/model-service/model-registry.js.map +1 -0
- package/lib/model-service/module.d.ts +9 -0
- package/lib/model-service/module.js +49 -0
- package/lib/model-service/module.js.map +1 -0
- package/lib/model-service/utils.d.ts +5 -0
- package/lib/model-service/utils.js +58 -0
- package/lib/model-service/utils.js.map +1 -0
- package/lib/style/components.css +108 -0
- package/lib/style/components.less +1 -0
- package/lib/style/index.css +0 -0
- package/lib/style/index.less +1 -0
- package/lib/style/themes/default.css +0 -0
- package/lib/style/themes/default.less +2 -0
- package/lib/style/themes/index.css +0 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/toolbar/components/index.d.ts +4 -0
- package/lib/toolbar/components/index.js +27 -0
- package/lib/toolbar/components/index.js.map +1 -0
- package/lib/toolbar/index.d.ts +3 -0
- package/lib/toolbar/index.js +9 -0
- package/lib/toolbar/index.js.map +1 -0
- package/lib/toolbar/interface.d.ts +104 -0
- package/lib/toolbar/interface.js +11 -0
- package/lib/toolbar/interface.js.map +1 -0
- package/lib/toolbar/module.d.ts +8 -0
- package/lib/toolbar/module.js +23 -0
- package/lib/toolbar/module.js.map +1 -0
- package/lib/toolbar/toolbar-registry.d.ts +80 -0
- package/lib/toolbar/toolbar-registry.js +134 -0
- package/lib/toolbar/toolbar-registry.js.map +1 -0
- package/lib/xflow-main/application-module.d.ts +8 -0
- package/lib/xflow-main/application-module.js +50 -0
- package/lib/xflow-main/application-module.js.map +1 -0
- package/lib/xflow-main/application.d.ts +77 -0
- package/lib/xflow-main/application.js +296 -0
- package/lib/xflow-main/application.js.map +1 -0
- package/lib/xflow-main/components/app-context.d.ts +14 -0
- package/lib/xflow-main/components/app-context.js +87 -0
- package/lib/xflow-main/components/app-context.js.map +1 -0
- package/lib/xflow-main/components/app-extension-module.d.ts +7 -0
- package/lib/xflow-main/components/app-extension-module.js +39 -0
- package/lib/xflow-main/components/app-extension-module.js.map +1 -0
- package/lib/xflow-main/components/canvas.d.ts +11 -0
- package/lib/xflow-main/components/canvas.js +69 -0
- package/lib/xflow-main/components/canvas.js.map +1 -0
- package/lib/xflow-main/components/extension-context.d.ts +5 -0
- package/lib/xflow-main/components/extension-context.js +14 -0
- package/lib/xflow-main/components/extension-context.js.map +1 -0
- package/lib/xflow-main/components/extension-registry.d.ts +22 -0
- package/lib/xflow-main/components/extension-registry.js +69 -0
- package/lib/xflow-main/components/extension-registry.js.map +1 -0
- package/lib/xflow-main/components/global-config-context.d.ts +3 -0
- package/lib/xflow-main/components/global-config-context.js +39 -0
- package/lib/xflow-main/components/global-config-context.js.map +1 -0
- package/lib/xflow-main/components/index.d.ts +58 -0
- package/lib/xflow-main/components/index.js +153 -0
- package/lib/xflow-main/components/index.js.map +1 -0
- package/lib/xflow-main/graph/config.d.ts +102 -0
- package/lib/xflow-main/graph/config.js +266 -0
- package/lib/xflow-main/graph/config.js.map +1 -0
- package/lib/xflow-main/graph/graph-provider.d.ts +47 -0
- package/lib/xflow-main/graph/graph-provider.js +259 -0
- package/lib/xflow-main/graph/graph-provider.js.map +1 -0
- package/lib/xflow-main/graph/index.d.ts +4 -0
- package/lib/xflow-main/graph/index.js +11 -0
- package/lib/xflow-main/graph/index.js.map +1 -0
- package/lib/xflow-main/graph/module.d.ts +4 -0
- package/lib/xflow-main/graph/module.js +20 -0
- package/lib/xflow-main/graph/module.js.map +1 -0
- package/lib/xflow-main/graph/react-group-node/index.css +44 -0
- package/lib/xflow-main/graph/react-group-node/index.d.ts +2 -0
- package/lib/xflow-main/graph/react-group-node/index.js +37 -0
- package/lib/xflow-main/graph/react-group-node/index.js.map +1 -0
- package/lib/xflow-main/graph/react-group-node/index.less +50 -0
- package/lib/xflow-main/graph/react-node/index.css +42 -0
- package/lib/xflow-main/graph/react-node/index.d.ts +20 -0
- package/lib/xflow-main/graph/react-node/index.js +56 -0
- package/lib/xflow-main/graph/react-node/index.js.map +1 -0
- package/lib/xflow-main/graph/react-node/index.less +49 -0
- package/lib/xflow-main/index.d.ts +19 -0
- package/lib/xflow-main/index.js +35 -0
- package/lib/xflow-main/index.js.map +1 -0
- package/lib/xflow-main/interface.d.ts +33 -0
- package/lib/xflow-main/interface.js +6 -0
- package/lib/xflow-main/interface.js.map +1 -0
- package/lib/xflow-main/style/index.css +108 -0
- package/lib/xflow-main/style/index.less +31 -0
- package/package.json +119 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FrontEdgeCommand = exports.NsFrontEdge = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var mana_syringe_1 = require("mana-syringe");
|
|
6
|
+
var interface_1 = require("../../command/interface");
|
|
7
|
+
var constant_1 = require("../constant");
|
|
8
|
+
var disposable_1 = require("../../common/disposable");
|
|
9
|
+
var NsFrontEdge;
|
|
10
|
+
(function (NsFrontEdge) {
|
|
11
|
+
NsFrontEdge.command = constant_1.XFlowEdgeCommands.FRONT_EDGE;
|
|
12
|
+
NsFrontEdge.hookKey = 'frontEdge';
|
|
13
|
+
})(NsFrontEdge = exports.NsFrontEdge || (exports.NsFrontEdge = {}));
|
|
14
|
+
var FrontEdgeCommand = /** @class */ (function () {
|
|
15
|
+
/** 边前置命令(始终在画布最前方) */
|
|
16
|
+
function FrontEdgeCommand() {
|
|
17
|
+
var _this = this;
|
|
18
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
19
|
+
var _a, args, runtimeHook, hooks, result;
|
|
20
|
+
var _this = this;
|
|
21
|
+
return tslib_1.__generator(this, function (_b) {
|
|
22
|
+
switch (_b.label) {
|
|
23
|
+
case 0:
|
|
24
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
25
|
+
hooks = this.ctx.getHooks();
|
|
26
|
+
return [4 /*yield*/, hooks.frontEdge.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
27
|
+
var x6Graph, edgeId, x6Edge;
|
|
28
|
+
var _this = this;
|
|
29
|
+
return tslib_1.__generator(this, function (_a) {
|
|
30
|
+
switch (_a.label) {
|
|
31
|
+
case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
|
|
32
|
+
case 1:
|
|
33
|
+
x6Graph = _a.sent();
|
|
34
|
+
edgeId = handlerArgs.edgeId;
|
|
35
|
+
x6Edge = x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.getCellById(edgeId);
|
|
36
|
+
if (!x6Edge) {
|
|
37
|
+
console.error(edgeId, 'this edgeId is not exist');
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
x6Edge.toFront();
|
|
41
|
+
/** frontEdge undo */
|
|
42
|
+
this.ctx.addUndo(disposable_1.Disposable.create(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
43
|
+
return tslib_1.__generator(this, function (_a) {
|
|
44
|
+
handlerArgs.commandService.executeCommand(constant_1.XFlowEdgeCommands.BACK_EDGE.id, {
|
|
45
|
+
edgeId: edgeId,
|
|
46
|
+
});
|
|
47
|
+
return [2 /*return*/];
|
|
48
|
+
});
|
|
49
|
+
}); }));
|
|
50
|
+
}
|
|
51
|
+
return [2 /*return*/, {}];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}); }, runtimeHook)];
|
|
55
|
+
case 1:
|
|
56
|
+
result = _b.sent();
|
|
57
|
+
this.ctx.setResult(result);
|
|
58
|
+
return [2 /*return*/, this];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); };
|
|
62
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
63
|
+
return tslib_1.__generator(this, function (_a) {
|
|
64
|
+
this.ctx.undo();
|
|
65
|
+
return [2 /*return*/, this];
|
|
66
|
+
});
|
|
67
|
+
}); };
|
|
68
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
69
|
+
return tslib_1.__generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0:
|
|
72
|
+
if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
|
|
73
|
+
return [4 /*yield*/, this.execute()];
|
|
74
|
+
case 1:
|
|
75
|
+
_a.sent();
|
|
76
|
+
_a.label = 2;
|
|
77
|
+
case 2: return [2 /*return*/, this];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}); };
|
|
81
|
+
}
|
|
82
|
+
FrontEdgeCommand.prototype.init = function () {
|
|
83
|
+
this.ctx = this.contextProvider();
|
|
84
|
+
};
|
|
85
|
+
FrontEdgeCommand.prototype.isUndoable = function () {
|
|
86
|
+
return this.ctx.isUndoable();
|
|
87
|
+
};
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
90
|
+
tslib_1.__metadata("design:type", Object)
|
|
91
|
+
], FrontEdgeCommand.prototype, "contextProvider", void 0);
|
|
92
|
+
tslib_1.__decorate([
|
|
93
|
+
(0, mana_syringe_1.postConstruct)(),
|
|
94
|
+
tslib_1.__metadata("design:type", Function),
|
|
95
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
96
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
97
|
+
], FrontEdgeCommand.prototype, "init", null);
|
|
98
|
+
FrontEdgeCommand = tslib_1.__decorate([
|
|
99
|
+
(0, mana_syringe_1.injectable)({
|
|
100
|
+
token: { token: interface_1.ICommandHandler, named: NsFrontEdge.command.id },
|
|
101
|
+
})
|
|
102
|
+
/** 边前置命令(始终在画布最前方) */
|
|
103
|
+
], FrontEdgeCommand);
|
|
104
|
+
return FrontEdgeCommand;
|
|
105
|
+
}());
|
|
106
|
+
exports.FrontEdgeCommand = FrontEdgeCommand;
|
|
107
|
+
//# sourceMappingURL=edge-front.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-front.js","sourceRoot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CACZ,EAAA;;wBAtBK,MAAM,GAAG,SAsBd;wBACD,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;wBAC1B,sBAAO,IAAI,EAAA;;;aACZ,CAAA;QAED,SAAI,GAAG;;gBACL,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;gBACf,sBAAO,IAAI,EAAA;;aACZ,CAAA;QAED,SAAI,GAAG;;;;6BACD,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAApB,wBAAoB;wBACtB,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAApB,SAAoB,CAAA;;4BAEtB,sBAAO,IAAI,EAAA;;;aACZ,CAAA;IAKH,CAAC;IAlDC,+BAAI,GADJ;QAEE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IACnC,CAAC;IA6CD,qCAAU,GAAV;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;IAtDD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;6DAA6C;IAI7E;QAAC,IAAA,4BAAa,GAAE;;;;gDAGf;IARU,gBAAgB;QAJ5B,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE;SACjE,CAAC;QACF,sBAAsB;OACT,gBAAgB,CAwD5B;IAAD,uBAAC;CAAA,AAxDD,IAwDC;AAxDY,4CAAgB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
2
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
3
|
+
import { ICommandHandler } from '../../command/interface';
|
|
4
|
+
import type { IHooks } from '../../hooks/interface';
|
|
5
|
+
type ICommand = ICommandHandler<NsHighlightEdge.IArgs, NsHighlightEdge.IResult, NsHighlightEdge.ICmdHooks>;
|
|
6
|
+
export declare namespace NsHighlightEdge {
|
|
7
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
8
|
+
const hookKey = "highlightEdge";
|
|
9
|
+
interface IArgs extends IArgsBase {
|
|
10
|
+
/** 边唯一id */
|
|
11
|
+
edgeId: string;
|
|
12
|
+
/** 边高亮颜色 */
|
|
13
|
+
strokeColor: string;
|
|
14
|
+
/** 边高亮宽度 */
|
|
15
|
+
strokeWidth?: number;
|
|
16
|
+
}
|
|
17
|
+
interface IResult {
|
|
18
|
+
}
|
|
19
|
+
interface ICmdHooks extends IHooks {
|
|
20
|
+
highlightEdge: HookHub<IArgs, IResult>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare class HighlightEdgeCommand implements ICommand {
|
|
24
|
+
contextProvider: ICommand['contextProvider'];
|
|
25
|
+
ctx: IContext<NsHighlightEdge.IArgs, NsHighlightEdge.IResult, NsHighlightEdge.ICmdHooks>;
|
|
26
|
+
init(): void;
|
|
27
|
+
execute: () => Promise<this>;
|
|
28
|
+
undo: () => Promise<this>;
|
|
29
|
+
redo: () => Promise<this>;
|
|
30
|
+
isUndoable(): boolean;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightEdgeCommand = exports.NsHighlightEdge = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var mana_syringe_1 = require("mana-syringe");
|
|
6
|
+
var interface_1 = require("../../command/interface");
|
|
7
|
+
var constant_1 = require("../constant");
|
|
8
|
+
var NsHighlightEdge;
|
|
9
|
+
(function (NsHighlightEdge) {
|
|
10
|
+
NsHighlightEdge.command = constant_1.XFlowEdgeCommands.HIGHLIGHT_EDGE;
|
|
11
|
+
NsHighlightEdge.hookKey = 'highlightEdge';
|
|
12
|
+
})(NsHighlightEdge = exports.NsHighlightEdge || (exports.NsHighlightEdge = {}));
|
|
13
|
+
var HighlightEdgeCommand = /** @class */ (function () {
|
|
14
|
+
/** 连线高亮 */
|
|
15
|
+
function HighlightEdgeCommand() {
|
|
16
|
+
var _this = this;
|
|
17
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
18
|
+
var _a, args, runtimeHook, hooks, result;
|
|
19
|
+
var _this = this;
|
|
20
|
+
return tslib_1.__generator(this, function (_b) {
|
|
21
|
+
switch (_b.label) {
|
|
22
|
+
case 0:
|
|
23
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
24
|
+
hooks = this.ctx.getHooks();
|
|
25
|
+
return [4 /*yield*/, hooks.highlightEdge.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
26
|
+
var x6Graph, edgeId, strokeColor, strokeWidth, allEdges, highlightEdge, otherEdges, oldAttr_1;
|
|
27
|
+
var _a, _b;
|
|
28
|
+
return tslib_1.__generator(this, function (_c) {
|
|
29
|
+
switch (_c.label) {
|
|
30
|
+
case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
|
|
31
|
+
case 1:
|
|
32
|
+
x6Graph = _c.sent();
|
|
33
|
+
edgeId = handlerArgs.edgeId, strokeColor = handlerArgs.strokeColor, strokeWidth = handlerArgs.strokeWidth;
|
|
34
|
+
allEdges = x6Graph.getEdges();
|
|
35
|
+
highlightEdge = allEdges.find(function (edge) { return edge.id === edgeId; });
|
|
36
|
+
otherEdges = allEdges.filter(function (edge) { return edge.id !== edgeId; });
|
|
37
|
+
if (!highlightEdge) {
|
|
38
|
+
console.error(edgeId, 'this edgeId is not exist');
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
oldAttr_1 = highlightEdge.getAttrs();
|
|
42
|
+
if (((_a = oldAttr_1 === null || oldAttr_1 === void 0 ? void 0 : oldAttr_1.line) === null || _a === void 0 ? void 0 : _a.stroke) === strokeColor && ((_b = oldAttr_1 === null || oldAttr_1 === void 0 ? void 0 : oldAttr_1.line) === null || _b === void 0 ? void 0 : _b.strokeWidth) === strokeWidth) {
|
|
43
|
+
/** 连线已经高亮, 不需要重复操作 */
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
/** 高亮选中的连线 */
|
|
47
|
+
highlightEdge === null || highlightEdge === void 0 ? void 0 : highlightEdge.setAttrs({
|
|
48
|
+
line: {
|
|
49
|
+
stroke: strokeColor,
|
|
50
|
+
strokeWidth: strokeWidth || 2,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
/** 其余连线取消高亮状态 */
|
|
54
|
+
otherEdges.forEach(function (edge) {
|
|
55
|
+
edge.setAttrs({
|
|
56
|
+
line: oldAttr_1 === null || oldAttr_1 === void 0 ? void 0 : oldAttr_1.line,
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
/** 高亮的连线默认前置在画布最前方 */
|
|
60
|
+
handlerArgs.commandService.executeCommand(constant_1.XFlowEdgeCommands.FRONT_EDGE.id, {
|
|
61
|
+
edgeId: edgeId,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return [2 /*return*/, {}];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}); }, runtimeHook)];
|
|
69
|
+
case 1:
|
|
70
|
+
result = _b.sent();
|
|
71
|
+
this.ctx.setResult(result);
|
|
72
|
+
return [2 /*return*/, this];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}); };
|
|
76
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
77
|
+
return tslib_1.__generator(this, function (_a) {
|
|
78
|
+
this.ctx.undo();
|
|
79
|
+
return [2 /*return*/, this];
|
|
80
|
+
});
|
|
81
|
+
}); };
|
|
82
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
83
|
+
return tslib_1.__generator(this, function (_a) {
|
|
84
|
+
switch (_a.label) {
|
|
85
|
+
case 0:
|
|
86
|
+
if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
|
|
87
|
+
return [4 /*yield*/, this.execute()];
|
|
88
|
+
case 1:
|
|
89
|
+
_a.sent();
|
|
90
|
+
_a.label = 2;
|
|
91
|
+
case 2: return [2 /*return*/, this];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}); };
|
|
95
|
+
}
|
|
96
|
+
HighlightEdgeCommand.prototype.init = function () {
|
|
97
|
+
this.ctx = this.contextProvider();
|
|
98
|
+
};
|
|
99
|
+
HighlightEdgeCommand.prototype.isUndoable = function () {
|
|
100
|
+
return this.ctx.isUndoable();
|
|
101
|
+
};
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
104
|
+
tslib_1.__metadata("design:type", Object)
|
|
105
|
+
], HighlightEdgeCommand.prototype, "contextProvider", void 0);
|
|
106
|
+
tslib_1.__decorate([
|
|
107
|
+
(0, mana_syringe_1.postConstruct)(),
|
|
108
|
+
tslib_1.__metadata("design:type", Function),
|
|
109
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
110
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
111
|
+
], HighlightEdgeCommand.prototype, "init", null);
|
|
112
|
+
HighlightEdgeCommand = tslib_1.__decorate([
|
|
113
|
+
(0, mana_syringe_1.injectable)({
|
|
114
|
+
token: { token: interface_1.ICommandHandler, named: NsHighlightEdge.command.id },
|
|
115
|
+
})
|
|
116
|
+
/** 连线高亮 */
|
|
117
|
+
], HighlightEdgeCommand);
|
|
118
|
+
return HighlightEdgeCommand;
|
|
119
|
+
}());
|
|
120
|
+
exports.HighlightEdgeCommand = HighlightEdgeCommand;
|
|
121
|
+
//# sourceMappingURL=edge-highlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-highlight.js","sourceRoot":"","sources":["../../../src/command-contributions/edge/edge-highlight.ts"],"names":[],"mappings":";;;;AAAA,6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C,eAAe,EAAE,CAAA;IACnC,CAAC;IAiED,yCAAU,GAAV;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;IA1ED;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;iEAA6C;IAI7E;QAAC,IAAA,4BAAa,GAAE;;;;oDAGf;IARU,oBAAoB;QAJhC,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,EAAE;SACrE,CAAC;QACF,WAAW;OACE,oBAAoB,CA4EhC;IAAD,2BAAC;CAAA,AA5ED,IA4EC;AA5EY,oDAAoB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Edge as X6Edge } from '@antv/x6';
|
|
2
|
+
import type { NsGraph } from '../../interface';
|
|
3
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
4
|
+
import { ICommandHandler } from '../../command/interface';
|
|
5
|
+
import type { IHooks } from '../../hooks/interface';
|
|
6
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
7
|
+
type ICommand = ICommandHandler<NsUpdateEdge.IArgs, NsUpdateEdge.IResult, NsUpdateEdge.ICmdHooks>;
|
|
8
|
+
export declare namespace NsUpdateEdge {
|
|
9
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
10
|
+
const hookKey = "updateEdge";
|
|
11
|
+
const XFlowEdgeSetOptions: X6Edge.SetOptions;
|
|
12
|
+
interface IArgs extends IArgsBase {
|
|
13
|
+
/** edgeConfig */
|
|
14
|
+
edgeConfig: NsGraph.IEdgeConfig;
|
|
15
|
+
/** options */
|
|
16
|
+
options: X6Edge.SetOptions;
|
|
17
|
+
/** 更新的Service */
|
|
18
|
+
updateEdgeService?: IUpdateEdgeService;
|
|
19
|
+
/** 更新Label的Service */
|
|
20
|
+
updateEdgeLabelService?: IUpdateEdgeLabelService;
|
|
21
|
+
}
|
|
22
|
+
const XFlowUpdateLabelService: (edge: X6Edge, edgeConfig: NsGraph.IEdgeConfig, options?: X6Edge.SetOptions) => Promise<void>;
|
|
23
|
+
interface IResult {
|
|
24
|
+
edgeConfig: NsGraph.IEdgeConfig;
|
|
25
|
+
edgeCell: X6Edge;
|
|
26
|
+
}
|
|
27
|
+
interface IUpdateEdgeService {
|
|
28
|
+
(args: IArgs): Promise<NsGraph.IEdgeConfig>;
|
|
29
|
+
}
|
|
30
|
+
interface IUpdateEdgeLabelService {
|
|
31
|
+
(edge: X6Edge, edgeConfig: NsGraph.IEdgeConfig, options: X6Edge.SetOptions): Promise<NsGraph.IEdgeConfig>;
|
|
32
|
+
}
|
|
33
|
+
interface ICmdHooks extends IHooks {
|
|
34
|
+
updateEdge: HookHub<IArgs, IResult>;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export declare class UpdateEdgeCommand implements ICommand {
|
|
38
|
+
contextProvider: ICommand['contextProvider'];
|
|
39
|
+
ctx: IContext<NsUpdateEdge.IArgs, NsUpdateEdge.IResult, NsUpdateEdge.ICmdHooks>;
|
|
40
|
+
init(): void;
|
|
41
|
+
execute: () => Promise<this>;
|
|
42
|
+
undo: () => Promise<this>;
|
|
43
|
+
redo: () => Promise<this>;
|
|
44
|
+
isUndoable(): boolean;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateEdgeCommand = exports.NsUpdateEdge = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var mana_syringe_1 = require("mana-syringe");
|
|
6
|
+
var isBoolean_1 = tslib_1.__importDefault(require("lodash/isBoolean"));
|
|
7
|
+
var isObject_1 = tslib_1.__importDefault(require("lodash/isObject"));
|
|
8
|
+
var interface_1 = require("../../command/interface");
|
|
9
|
+
var constant_1 = require("../constant");
|
|
10
|
+
var NsUpdateEdge;
|
|
11
|
+
(function (NsUpdateEdge) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
NsUpdateEdge.command = constant_1.XFlowEdgeCommands.UPDATE_EDGE;
|
|
14
|
+
NsUpdateEdge.hookKey = 'updateEdge';
|
|
15
|
+
NsUpdateEdge.XFlowEdgeSetOptions = { overwrite: true };
|
|
16
|
+
NsUpdateEdge.XFlowUpdateLabelService = function (edge, edgeConfig, options) {
|
|
17
|
+
if (options === void 0) { options = NsUpdateEdge.XFlowEdgeSetOptions; }
|
|
18
|
+
return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
19
|
+
return tslib_1.__generator(this, function (_a) {
|
|
20
|
+
edge === null || edge === void 0 ? void 0 : edge.setLabelAt(0, (edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.label) || edgeConfig, options);
|
|
21
|
+
return [2 /*return*/];
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})(NsUpdateEdge = exports.NsUpdateEdge || (exports.NsUpdateEdge = {}));
|
|
26
|
+
var UpdateEdgeCommand = /** @class */ (function () {
|
|
27
|
+
/** 连线更新命令 */
|
|
28
|
+
function UpdateEdgeCommand() {
|
|
29
|
+
var _this = this;
|
|
30
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
31
|
+
var _a, args, runtimeHook, hooks, result;
|
|
32
|
+
var _this = this;
|
|
33
|
+
return tslib_1.__generator(this, function (_b) {
|
|
34
|
+
switch (_b.label) {
|
|
35
|
+
case 0:
|
|
36
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
37
|
+
hooks = this.ctx.getHooks();
|
|
38
|
+
return [4 /*yield*/, hooks.updateEdge.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
39
|
+
var x6Graph, updateEdgeService, _a, updateEdgeLabelService, _b, options, edgeConfig, _c, x6Edge;
|
|
40
|
+
return tslib_1.__generator(this, function (_d) {
|
|
41
|
+
switch (_d.label) {
|
|
42
|
+
case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
|
|
43
|
+
case 1:
|
|
44
|
+
x6Graph = _d.sent();
|
|
45
|
+
updateEdgeService = handlerArgs.updateEdgeService, _a = handlerArgs.updateEdgeLabelService, updateEdgeLabelService = _a === void 0 ? NsUpdateEdge.XFlowUpdateLabelService : _a, _b = handlerArgs.options, options = _b === void 0 ? NsUpdateEdge.XFlowEdgeSetOptions : _b;
|
|
46
|
+
if (!updateEdgeService) return [3 /*break*/, 3];
|
|
47
|
+
return [4 /*yield*/, updateEdgeService(handlerArgs)];
|
|
48
|
+
case 2:
|
|
49
|
+
_c = _d.sent();
|
|
50
|
+
return [3 /*break*/, 4];
|
|
51
|
+
case 3:
|
|
52
|
+
_c = handlerArgs === null || handlerArgs === void 0 ? void 0 : handlerArgs.edgeConfig;
|
|
53
|
+
_d.label = 4;
|
|
54
|
+
case 4:
|
|
55
|
+
edgeConfig = _c;
|
|
56
|
+
x6Edge = x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.getCellById(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.id);
|
|
57
|
+
x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.setData(edgeConfig, options);
|
|
58
|
+
if (!(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.hasOwnProperty('label'))) return [3 /*break*/, 6];
|
|
59
|
+
// 默认更新edge的第一个label
|
|
60
|
+
return [4 /*yield*/, updateEdgeLabelService(x6Edge, edgeConfig, options)];
|
|
61
|
+
case 5:
|
|
62
|
+
// 默认更新edge的第一个label
|
|
63
|
+
_d.sent();
|
|
64
|
+
_d.label = 6;
|
|
65
|
+
case 6:
|
|
66
|
+
if ((0, isBoolean_1.default)(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.visible)) {
|
|
67
|
+
x6Edge.setVisible(edgeConfig === null || edgeConfig === void 0 ? void 0 : edgeConfig.visible);
|
|
68
|
+
}
|
|
69
|
+
if (edgeConfig.attrs) {
|
|
70
|
+
x6Edge.setAttrs(edgeConfig.attrs);
|
|
71
|
+
}
|
|
72
|
+
if (edgeConfig.vertices) {
|
|
73
|
+
x6Edge.setVertices(edgeConfig.vertices);
|
|
74
|
+
}
|
|
75
|
+
if (edgeConfig.router) {
|
|
76
|
+
x6Edge.setRouter(edgeConfig.router);
|
|
77
|
+
}
|
|
78
|
+
if (edgeConfig.connector) {
|
|
79
|
+
x6Edge.setConnector(edgeConfig.connector);
|
|
80
|
+
}
|
|
81
|
+
if ((0, isObject_1.default)(edgeConfig.source)) {
|
|
82
|
+
//@ts-ignore
|
|
83
|
+
x6Edge.setSource(edgeConfig.source);
|
|
84
|
+
}
|
|
85
|
+
if ((0, isObject_1.default)(edgeConfig.target)) {
|
|
86
|
+
//@ts-ignore
|
|
87
|
+
x6Edge.setTarget(edgeConfig.target);
|
|
88
|
+
}
|
|
89
|
+
return [2 /*return*/, {
|
|
90
|
+
edgeConfig: edgeConfig,
|
|
91
|
+
edgeCell: x6Edge,
|
|
92
|
+
}];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}); }, runtimeHook)];
|
|
96
|
+
case 1:
|
|
97
|
+
result = _b.sent();
|
|
98
|
+
this.ctx.setResult(result);
|
|
99
|
+
return [2 /*return*/, this];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}); };
|
|
103
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
104
|
+
return tslib_1.__generator(this, function (_a) {
|
|
105
|
+
this.ctx.undo();
|
|
106
|
+
return [2 /*return*/, this];
|
|
107
|
+
});
|
|
108
|
+
}); };
|
|
109
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
110
|
+
return tslib_1.__generator(this, function (_a) {
|
|
111
|
+
switch (_a.label) {
|
|
112
|
+
case 0:
|
|
113
|
+
if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
|
|
114
|
+
return [4 /*yield*/, this.execute()];
|
|
115
|
+
case 1:
|
|
116
|
+
_a.sent();
|
|
117
|
+
_a.label = 2;
|
|
118
|
+
case 2: return [2 /*return*/, this];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}); };
|
|
122
|
+
}
|
|
123
|
+
UpdateEdgeCommand.prototype.init = function () {
|
|
124
|
+
this.ctx = this.contextProvider();
|
|
125
|
+
};
|
|
126
|
+
UpdateEdgeCommand.prototype.isUndoable = function () {
|
|
127
|
+
return this.ctx.isUndoable();
|
|
128
|
+
};
|
|
129
|
+
tslib_1.__decorate([
|
|
130
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
131
|
+
tslib_1.__metadata("design:type", Object)
|
|
132
|
+
], UpdateEdgeCommand.prototype, "contextProvider", void 0);
|
|
133
|
+
tslib_1.__decorate([
|
|
134
|
+
(0, mana_syringe_1.postConstruct)(),
|
|
135
|
+
tslib_1.__metadata("design:type", Function),
|
|
136
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
137
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
138
|
+
], UpdateEdgeCommand.prototype, "init", null);
|
|
139
|
+
UpdateEdgeCommand = tslib_1.__decorate([
|
|
140
|
+
(0, mana_syringe_1.injectable)({
|
|
141
|
+
token: { token: interface_1.ICommandHandler, named: NsUpdateEdge.command.id },
|
|
142
|
+
})
|
|
143
|
+
/** 连线更新命令 */
|
|
144
|
+
], UpdateEdgeCommand);
|
|
145
|
+
return UpdateEdgeCommand;
|
|
146
|
+
}());
|
|
147
|
+
exports.UpdateEdgeCommand = UpdateEdgeCommand;
|
|
148
|
+
//# sourceMappingURL=edge-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-update.js","sourceRoot":"","sources":["../../../src/command-contributions/edge/edge-update.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAEhE,uEAAwC;AACxC,qEAAsC;AAItC,qDAAkF;AAG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@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Syringe } from 'mana-syringe';
|
|
2
|
+
import type { IGraphCommand } from '../../command/interface';
|
|
3
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
4
|
+
import type { IHooks } from '../../hooks/interface';
|
|
5
|
+
/** commands */
|
|
6
|
+
import { NsAddEdge } from './edge-add';
|
|
7
|
+
import { NsDelEdge } from './edge-del';
|
|
8
|
+
import { NsUpdateEdge } from './edge-update';
|
|
9
|
+
import { NsHighlightEdge } from './edge-highlight';
|
|
10
|
+
import { NsFrontEdge } from './edge-front';
|
|
11
|
+
import { NsBackEdge } from './edge-back';
|
|
12
|
+
import type { Simplify } from '../../common/types';
|
|
13
|
+
/** 注册Command Handler Class */
|
|
14
|
+
export declare const registerEdgeCommand: (register: Syringe.Register) => void;
|
|
15
|
+
/** app onStart 时, 注册 Command Hooks */
|
|
16
|
+
export declare const hookhubList: {
|
|
17
|
+
hookKey: string;
|
|
18
|
+
command: IGraphCommand;
|
|
19
|
+
createHook?: () => HookHub;
|
|
20
|
+
}[];
|
|
21
|
+
/** 扩展 Command Hooks 类型*/
|
|
22
|
+
export interface ICmdHooks extends NsAddEdge.ICmdHooks, NsDelEdge.ICmdHooks, NsUpdateEdge.ICmdHooks, NsHighlightEdge.ICmdHooks, NsFrontEdge.ICmdHooks, NsBackEdge.ICmdHooks, IHooks {
|
|
23
|
+
}
|
|
24
|
+
/** Command 参数类型*/
|
|
25
|
+
export declare namespace NsEdgeCmd {
|
|
26
|
+
namespace AddEdge {
|
|
27
|
+
type IArgs = Simplify<NsAddEdge.IArgs>;
|
|
28
|
+
type IResult = Simplify<NsAddEdge.IResult>;
|
|
29
|
+
}
|
|
30
|
+
namespace DelEdge {
|
|
31
|
+
type IArgs = Simplify<NsDelEdge.IArgs>;
|
|
32
|
+
type IResult = Simplify<NsDelEdge.IResult>;
|
|
33
|
+
}
|
|
34
|
+
namespace UpdateEdge {
|
|
35
|
+
type IArgs = Simplify<NsUpdateEdge.IArgs>;
|
|
36
|
+
type IResult = Simplify<NsUpdateEdge.IResult>;
|
|
37
|
+
}
|
|
38
|
+
namespace HighlightEdge {
|
|
39
|
+
type IArgs = Simplify<NsHighlightEdge.IArgs>;
|
|
40
|
+
type IResult = Simplify<NsHighlightEdge.IResult>;
|
|
41
|
+
}
|
|
42
|
+
namespace FrontEdge {
|
|
43
|
+
type IArgs = Simplify<NsFrontEdge.IArgs>;
|
|
44
|
+
type IResult = Simplify<NsFrontEdge.IResult>;
|
|
45
|
+
}
|
|
46
|
+
namespace BackEdge {
|
|
47
|
+
type IArgs = Simplify<NsBackEdge.IArgs>;
|
|
48
|
+
type IResult = Simplify<NsBackEdge.IResult>;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hookhubList = exports.registerEdgeCommand = void 0;
|
|
4
|
+
/** commands */
|
|
5
|
+
var edge_add_1 = require("./edge-add");
|
|
6
|
+
var edge_del_1 = require("./edge-del");
|
|
7
|
+
var edge_update_1 = require("./edge-update");
|
|
8
|
+
var edge_highlight_1 = require("./edge-highlight");
|
|
9
|
+
var edge_front_1 = require("./edge-front");
|
|
10
|
+
var edge_back_1 = require("./edge-back");
|
|
11
|
+
/** 注册Command Handler Class */
|
|
12
|
+
var registerEdgeCommand = function (register) {
|
|
13
|
+
register(edge_add_1.AddEdgeCommand);
|
|
14
|
+
register(edge_del_1.DelEdgeCommand);
|
|
15
|
+
register(edge_update_1.UpdateEdgeCommand);
|
|
16
|
+
register(edge_highlight_1.HighlightEdgeCommand);
|
|
17
|
+
register(edge_front_1.FrontEdgeCommand);
|
|
18
|
+
register(edge_back_1.BackEdgeCommand);
|
|
19
|
+
};
|
|
20
|
+
exports.registerEdgeCommand = registerEdgeCommand;
|
|
21
|
+
/** app onStart 时, 注册 Command Hooks */
|
|
22
|
+
exports.hookhubList = [edge_add_1.NsAddEdge, edge_del_1.NsDelEdge, edge_update_1.NsUpdateEdge, edge_highlight_1.NsHighlightEdge, edge_front_1.NsFrontEdge, edge_back_1.NsBackEdge];
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/command-contributions/edge/index.ts"],"names":[],"mappings":";;;AAKA,eAAe;AACf,uCAAsD;AACtD,uCAAsD;AACtD,6CAA+D;AAC/D,mDAAwE;AACxE,2CAA4D;AAC5D,yCAAyD;AAEzD,8BAA8B;AACvB,IAAM,mBAAmB,GAAG,UAAC,QAA0B;IAC5D,QAAQ,CAAC,yBAAc,CAAC,CAAA;IACxB,QAAQ,CAAC,yBAAc,CAAC,CAAA;IACxB,QAAQ,CAAC,+BAAiB,CAAC,CAAA;IAC3B,QAAQ,CAAC,qCAAoB,CAAC,CAAA;IAC9B,QAAQ,CAAC,6BAAgB,CAAC,CAAA;IAC1B,QAAQ,CAAC,2BAAe,CAAC,CAAA;AAC3B,CAAC,CAAA;AAPY,QAAA,mBAAmB,uBAO/B;AAED,sCAAsC;AACzB,QAAA,WAAW,GAIlB,CAAC,oBAAS,EAAE,oBAAS,EAAE,0BAAY,EAAE,gCAAe,EAAE,wBAAW,EAAE,sBAAU,CAAC,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Cell, Node } from '@antv/x6';
|
|
2
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
3
|
+
import type { NsGraph } from '../../interface';
|
|
4
|
+
import type { IHooks } from '../../hooks/interface';
|
|
5
|
+
import type { IArgsBase } from '../../command/interface';
|
|
6
|
+
import { ICommandHandler } from '../../command/interface';
|
|
7
|
+
type ICommand = ICommandHandler<NsGraphAddTool.IArgs, NsGraphAddTool.IResult, NsGraphAddTool.ICmdHooks>;
|
|
8
|
+
export declare namespace NsGraphAddTool {
|
|
9
|
+
/** Command: 用于注册named factory */
|
|
10
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
11
|
+
/** hookName */
|
|
12
|
+
const hookKey = "addTool";
|
|
13
|
+
/** hook 参数类型 */
|
|
14
|
+
interface IArgs extends IArgsBase {
|
|
15
|
+
cellId: string;
|
|
16
|
+
toolConfig: {
|
|
17
|
+
items: Cell.ToolItem | Cell.ToolItem[];
|
|
18
|
+
options?: Cell.AddToolOptions;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** hook handler 返回类型 */
|
|
22
|
+
interface IResult {
|
|
23
|
+
err: null | string;
|
|
24
|
+
}
|
|
25
|
+
/** add node api service 类型 */
|
|
26
|
+
interface ICreateNodeService {
|
|
27
|
+
(args: IArgs): Promise<NsGraph.INodeConfig>;
|
|
28
|
+
}
|
|
29
|
+
/** 创建X6 Node Cell的工厂方法 */
|
|
30
|
+
interface INodeCellFactory {
|
|
31
|
+
(args: NsGraph.INodeConfig, self: GraphAddToolCommand): Promise<Node>;
|
|
32
|
+
}
|
|
33
|
+
/** hooks 类型 */
|
|
34
|
+
interface ICmdHooks extends IHooks {
|
|
35
|
+
addTool: HookHub<IArgs, IResult>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export declare class GraphAddToolCommand implements ICommand {
|
|
39
|
+
/** api */
|
|
40
|
+
contextProvider: ICommand['contextProvider'];
|
|
41
|
+
/** 执行Cmd */
|
|
42
|
+
execute: () => Promise<this>;
|
|
43
|
+
/** undo cmd */
|
|
44
|
+
undo: () => Promise<this>;
|
|
45
|
+
/** redo cmd */
|
|
46
|
+
redo: () => Promise<this>;
|
|
47
|
+
isUndoable(): boolean;
|
|
48
|
+
}
|
|
49
|
+
export {};
|