@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,39 @@
|
|
|
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<NsHighlightNode.IArgs, NsHighlightNode.IResult, NsHighlightNode.ICmdHooks>;
|
|
6
|
+
export declare namespace NsHighlightNode {
|
|
7
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
8
|
+
const hookKey = "highlightNode";
|
|
9
|
+
interface IArgs extends IArgsBase {
|
|
10
|
+
/** 节点唯一id */
|
|
11
|
+
nodeId: string;
|
|
12
|
+
/** 节点高亮边框颜色 */
|
|
13
|
+
stroke: string;
|
|
14
|
+
/** 节点高亮边框宽度 */
|
|
15
|
+
strokeWidth?: number;
|
|
16
|
+
/** 是否联动高亮节点的关联边 */
|
|
17
|
+
isHighlightRelatedLines?: boolean;
|
|
18
|
+
/** 边高亮颜色 */
|
|
19
|
+
edgeStroke?: string;
|
|
20
|
+
/** 边高亮宽度 */
|
|
21
|
+
edgeStrokeWidth?: number;
|
|
22
|
+
}
|
|
23
|
+
interface IResult {
|
|
24
|
+
err: string | null;
|
|
25
|
+
}
|
|
26
|
+
interface ICmdHooks extends IHooks {
|
|
27
|
+
highlightNode: HookHub<IArgs, IResult>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class HighlightNodeCommand implements ICommand {
|
|
31
|
+
contextProvider: ICommand['contextProvider'];
|
|
32
|
+
ctx: IContext<NsHighlightNode.IArgs, NsHighlightNode.IResult, NsHighlightNode.ICmdHooks>;
|
|
33
|
+
init(): void;
|
|
34
|
+
execute: () => Promise<this>;
|
|
35
|
+
undo: () => Promise<this>;
|
|
36
|
+
redo: () => Promise<this>;
|
|
37
|
+
isUndoable(): boolean;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightNodeCommand = exports.NsHighlightNode = 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 NsHighlightNode;
|
|
9
|
+
(function (NsHighlightNode) {
|
|
10
|
+
NsHighlightNode.command = constant_1.XFlowNodeCommands.HIGHLIGHT_NODE;
|
|
11
|
+
NsHighlightNode.hookKey = 'highlightNode';
|
|
12
|
+
})(NsHighlightNode = exports.NsHighlightNode || (exports.NsHighlightNode = {}));
|
|
13
|
+
var HighlightNodeCommand = /** @class */ (function () {
|
|
14
|
+
/** 节点高亮 */
|
|
15
|
+
function HighlightNodeCommand() {
|
|
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.highlightNode.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
26
|
+
var x6Graph, nodeId, stroke, strokeWidth, x6Node, edgeStroke_1, edgeStrokeWidth_1, allEdges;
|
|
27
|
+
return tslib_1.__generator(this, function (_a) {
|
|
28
|
+
switch (_a.label) {
|
|
29
|
+
case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
|
|
30
|
+
case 1:
|
|
31
|
+
x6Graph = _a.sent();
|
|
32
|
+
nodeId = handlerArgs.nodeId, stroke = handlerArgs.stroke, strokeWidth = handlerArgs.strokeWidth;
|
|
33
|
+
x6Node = x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.getCellById(nodeId);
|
|
34
|
+
if (!x6Node) {
|
|
35
|
+
console.error(nodeId, 'this nodeId is not exist');
|
|
36
|
+
return [2 /*return*/, { err: 'this nodeId is not exist' }];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
/** 高亮节点 */
|
|
40
|
+
x6Node === null || x6Node === void 0 ? void 0 : x6Node.setAttrs({
|
|
41
|
+
body: {
|
|
42
|
+
stroke: stroke || '#7c68fc',
|
|
43
|
+
strokeWidth: strokeWidth || 2,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
/** 节点关联的连线, 联动高亮 */
|
|
47
|
+
if (handlerArgs === null || handlerArgs === void 0 ? void 0 : handlerArgs.isHighlightRelatedLines) {
|
|
48
|
+
edgeStroke_1 = handlerArgs.edgeStroke, edgeStrokeWidth_1 = handlerArgs.edgeStrokeWidth;
|
|
49
|
+
allEdges = x6Graph === null || x6Graph === void 0 ? void 0 : x6Graph.getEdges();
|
|
50
|
+
allEdges.forEach(function (x6Edge) {
|
|
51
|
+
var x6EdgeData = x6Edge === null || x6Edge === void 0 ? void 0 : x6Edge.getData();
|
|
52
|
+
handlerArgs === null || handlerArgs === void 0 ? void 0 : handlerArgs.commandService.executeCommand(constant_1.XFlowEdgeCommands.HIGHLIGHT_EDGE.id, {
|
|
53
|
+
edgeId: x6EdgeData === null || x6EdgeData === void 0 ? void 0 : x6EdgeData.id,
|
|
54
|
+
strokeColor: edgeStroke_1,
|
|
55
|
+
strokeWidth: edgeStrokeWidth_1,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return [2 /*return*/, { err: null }];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}); }, runtimeHook)];
|
|
64
|
+
case 1:
|
|
65
|
+
result = _b.sent();
|
|
66
|
+
this.ctx.setResult(result);
|
|
67
|
+
return [2 /*return*/, this];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}); };
|
|
71
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
72
|
+
return tslib_1.__generator(this, function (_a) {
|
|
73
|
+
this.ctx.undo();
|
|
74
|
+
return [2 /*return*/, this];
|
|
75
|
+
});
|
|
76
|
+
}); };
|
|
77
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
78
|
+
return tslib_1.__generator(this, function (_a) {
|
|
79
|
+
switch (_a.label) {
|
|
80
|
+
case 0:
|
|
81
|
+
if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
|
|
82
|
+
return [4 /*yield*/, this.execute()];
|
|
83
|
+
case 1:
|
|
84
|
+
_a.sent();
|
|
85
|
+
_a.label = 2;
|
|
86
|
+
case 2: return [2 /*return*/, this];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}); };
|
|
90
|
+
}
|
|
91
|
+
HighlightNodeCommand.prototype.init = function () {
|
|
92
|
+
this.ctx = this.contextProvider();
|
|
93
|
+
};
|
|
94
|
+
HighlightNodeCommand.prototype.isUndoable = function () {
|
|
95
|
+
return this.ctx.isUndoable();
|
|
96
|
+
};
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
99
|
+
tslib_1.__metadata("design:type", Object)
|
|
100
|
+
], HighlightNodeCommand.prototype, "contextProvider", void 0);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, mana_syringe_1.postConstruct)(),
|
|
103
|
+
tslib_1.__metadata("design:type", Function),
|
|
104
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
105
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
106
|
+
], HighlightNodeCommand.prototype, "init", null);
|
|
107
|
+
HighlightNodeCommand = tslib_1.__decorate([
|
|
108
|
+
(0, mana_syringe_1.injectable)({
|
|
109
|
+
token: { token: interface_1.ICommandHandler, named: NsHighlightNode.command.id },
|
|
110
|
+
})
|
|
111
|
+
/** 节点高亮 */
|
|
112
|
+
], HighlightNodeCommand);
|
|
113
|
+
return HighlightNodeCommand;
|
|
114
|
+
}());
|
|
115
|
+
exports.HighlightNodeCommand = HighlightNodeCommand;
|
|
116
|
+
//# sourceMappingURL=node-highlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-highlight.js","sourceRoot":"","sources":["../../../src/command-contributions/node/node-highlight.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAIhE,qDAAkF;AAElF,wCAAkE;AASlE,IAAiB,eAAe,CAwB/B;AAxBD,WAAiB,eAAe;IACjB,uBAAO,GAAG,4BAAiB,CAAC,cAAc,CAAA;IAC1C,uBAAO,GAAG,eAAe,CAAA;AAsBxC,CAAC,EAxBgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAwB/B;AAMD;IADA,WAAW;IACX;QAAA,iBAoEC;QA1DC,YAAO,GAAG;;;;;;wBACF,KAA+B,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAA/C,IAAI,UAAA,EAAS,WAAW,WAAA,CAAuB;wBACjD,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;wBAElB,qBAAM,KAAK,CAAC,aAAa,CAAC,IAAI,CAC3C,IAAI,EACJ,UAAM,WAAW;;;;gDACC,qBAAM,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,EAAA;;4CAArC,OAAO,GAAG,SAA2B;4CACnC,MAAM,GAA0B,WAA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CK,MAAM,GAAG,SAkCd;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;IA9DC,mCAAI,GADJ;QAEE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IACnC,CAAC;IAyDD,yCAAU,GAAV;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;IAlED;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,CAoEhC;IAAD,2BAAC;CAAA,AApED,IAoEC;AApEY,oDAAoB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { IArgsBase } from '../../command/interface';
|
|
2
|
+
import { ICommandHandler } from '../../command/interface';
|
|
3
|
+
import type { IHooks } from '../../hooks/interface';
|
|
4
|
+
import { HookHub } from '@sunspirytus/xflow-hook';
|
|
5
|
+
type ICommand = ICommandHandler<NsMoveNode.IArgs, NsMoveNode.IResult, NsMoveNode.ICmdHooks>;
|
|
6
|
+
export declare namespace NsMoveNode {
|
|
7
|
+
/** Command: 用于注册named factory */
|
|
8
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
9
|
+
/** hookName */
|
|
10
|
+
const hookKey = "moveNode";
|
|
11
|
+
/** 创建 hook */
|
|
12
|
+
const createHook: () => HookHub<IArgs, IResult>;
|
|
13
|
+
/** hook 参数类型 */
|
|
14
|
+
interface IArgs extends IArgsBase {
|
|
15
|
+
id: string;
|
|
16
|
+
position: {
|
|
17
|
+
x?: number;
|
|
18
|
+
y?: number;
|
|
19
|
+
dx?: number;
|
|
20
|
+
dy?: number;
|
|
21
|
+
duration?: number;
|
|
22
|
+
};
|
|
23
|
+
nodePositionService?: INodePositionService;
|
|
24
|
+
}
|
|
25
|
+
/** hook handler 返回类型 */
|
|
26
|
+
interface IResult {
|
|
27
|
+
err: null | string;
|
|
28
|
+
nextY?: number;
|
|
29
|
+
nextX?: number;
|
|
30
|
+
}
|
|
31
|
+
/** api service 类型 */
|
|
32
|
+
interface INodePositionService {
|
|
33
|
+
(args: IArgs): Promise<boolean>;
|
|
34
|
+
}
|
|
35
|
+
/** hooks 类型 */
|
|
36
|
+
interface ICmdHooks extends IHooks {
|
|
37
|
+
moveNode: HookHub<IArgs, IResult>;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export declare class MoveNodeCommand implements ICommand {
|
|
41
|
+
/** command api */
|
|
42
|
+
contextProvider: ICommand['contextProvider'];
|
|
43
|
+
/** 执行Cmd */
|
|
44
|
+
execute: () => Promise<this>;
|
|
45
|
+
/** undo cmd */
|
|
46
|
+
undo: () => Promise<this>;
|
|
47
|
+
/** redo cmd */
|
|
48
|
+
redo: () => Promise<this>;
|
|
49
|
+
isUndoable(): boolean;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveNodeCommand = exports.NsMoveNode = 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 xflow_hook_1 = require("@sunspirytus/xflow-hook");
|
|
8
|
+
var constant_1 = require("../constant");
|
|
9
|
+
var disposable_1 = require("../../common/disposable");
|
|
10
|
+
var NsMoveNode;
|
|
11
|
+
(function (NsMoveNode) {
|
|
12
|
+
/** Command: 用于注册named factory */
|
|
13
|
+
NsMoveNode.command = constant_1.XFlowNodeCommands.MOVE_NODE;
|
|
14
|
+
/** hookName */
|
|
15
|
+
NsMoveNode.hookKey = 'moveNode';
|
|
16
|
+
/** 创建 hook */
|
|
17
|
+
NsMoveNode.createHook = function () {
|
|
18
|
+
return new xflow_hook_1.HookHub();
|
|
19
|
+
};
|
|
20
|
+
})(NsMoveNode = exports.NsMoveNode || (exports.NsMoveNode = {}));
|
|
21
|
+
var MoveNodeCommand = /** @class */ (function () {
|
|
22
|
+
/** 创建节点命令 */
|
|
23
|
+
function MoveNodeCommand() {
|
|
24
|
+
var _this = this;
|
|
25
|
+
/** 执行Cmd */
|
|
26
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
27
|
+
var ctx, _a, args, runtimeHook, hooks, result;
|
|
28
|
+
var _this = this;
|
|
29
|
+
return tslib_1.__generator(this, function (_b) {
|
|
30
|
+
switch (_b.label) {
|
|
31
|
+
case 0:
|
|
32
|
+
ctx = this.contextProvider();
|
|
33
|
+
_a = ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
34
|
+
hooks = ctx.getHooks();
|
|
35
|
+
return [4 /*yield*/, hooks.moveNode.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
36
|
+
var nodePositionService, canMove, _a, _b, dx, _c, dy, x, y, _d, duration, x6Graph, node, nextX, nextY, _e, preX_1, preY_1, undo_1;
|
|
37
|
+
return tslib_1.__generator(this, function (_f) {
|
|
38
|
+
switch (_f.label) {
|
|
39
|
+
case 0:
|
|
40
|
+
nodePositionService = handlerArgs.nodePositionService;
|
|
41
|
+
if (!nodePositionService) return [3 /*break*/, 2];
|
|
42
|
+
return [4 /*yield*/, nodePositionService(handlerArgs)];
|
|
43
|
+
case 1:
|
|
44
|
+
canMove = _f.sent();
|
|
45
|
+
if (!canMove)
|
|
46
|
+
return [2 /*return*/, { err: 'service rejected' }];
|
|
47
|
+
_f.label = 2;
|
|
48
|
+
case 2:
|
|
49
|
+
_a = handlerArgs.position, _b = _a.dx, dx = _b === void 0 ? 0 : _b, _c = _a.dy, dy = _c === void 0 ? 0 : _c, x = _a.x, y = _a.y, _d = _a.duration, duration = _d === void 0 ? 150 : _d;
|
|
50
|
+
return [4 /*yield*/, ctx.getX6Graph()];
|
|
51
|
+
case 3:
|
|
52
|
+
x6Graph = _f.sent();
|
|
53
|
+
node = x6Graph.getCellById(handlerArgs.id);
|
|
54
|
+
if (node) {
|
|
55
|
+
nextX = x;
|
|
56
|
+
nextY = y;
|
|
57
|
+
_e = node.position(), preX_1 = _e.x, preY_1 = _e.y;
|
|
58
|
+
undo_1 = function () {
|
|
59
|
+
node.position(preX_1, preY_1, { silent: false });
|
|
60
|
+
};
|
|
61
|
+
if (dx || dy) {
|
|
62
|
+
nextX = dx + preX_1;
|
|
63
|
+
nextY = dy + preY_1;
|
|
64
|
+
node.translate(dx, dy, { transition: { duration: duration } });
|
|
65
|
+
undo_1 = function () { return node.translate(-dx, -dy, { transition: { duration: duration } }); };
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
node.position(nextX, nextY, { silent: false });
|
|
69
|
+
}
|
|
70
|
+
/** add undo */
|
|
71
|
+
ctx.addUndo(disposable_1.Disposable.create(function () {
|
|
72
|
+
undo_1();
|
|
73
|
+
}));
|
|
74
|
+
return [2 /*return*/, { err: null, nextX: nextX, nextY: nextY }];
|
|
75
|
+
}
|
|
76
|
+
return [2 /*return*/];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}); }, runtimeHook)];
|
|
80
|
+
case 1:
|
|
81
|
+
result = _b.sent();
|
|
82
|
+
ctx.setResult(result);
|
|
83
|
+
return [2 /*return*/, this];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}); };
|
|
87
|
+
/** undo cmd */
|
|
88
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
89
|
+
var ctx;
|
|
90
|
+
return tslib_1.__generator(this, function (_a) {
|
|
91
|
+
ctx = this.contextProvider();
|
|
92
|
+
if (this.isUndoable()) {
|
|
93
|
+
ctx.undo();
|
|
94
|
+
}
|
|
95
|
+
return [2 /*return*/, this];
|
|
96
|
+
});
|
|
97
|
+
}); };
|
|
98
|
+
/** redo cmd */
|
|
99
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
100
|
+
return tslib_1.__generator(this, function (_a) {
|
|
101
|
+
switch (_a.label) {
|
|
102
|
+
case 0:
|
|
103
|
+
if (!!this.isUndoable()) return [3 /*break*/, 2];
|
|
104
|
+
return [4 /*yield*/, this.execute()];
|
|
105
|
+
case 1:
|
|
106
|
+
_a.sent();
|
|
107
|
+
_a.label = 2;
|
|
108
|
+
case 2: return [2 /*return*/, this];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}); };
|
|
112
|
+
}
|
|
113
|
+
MoveNodeCommand.prototype.isUndoable = function () {
|
|
114
|
+
var ctx = this.contextProvider();
|
|
115
|
+
return ctx.isUndoable();
|
|
116
|
+
};
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
119
|
+
tslib_1.__metadata("design:type", Object)
|
|
120
|
+
], MoveNodeCommand.prototype, "contextProvider", void 0);
|
|
121
|
+
MoveNodeCommand = tslib_1.__decorate([
|
|
122
|
+
(0, mana_syringe_1.injectable)({
|
|
123
|
+
token: { token: interface_1.ICommandHandler, named: NsMoveNode.command.id },
|
|
124
|
+
})
|
|
125
|
+
/** 创建节点命令 */
|
|
126
|
+
], MoveNodeCommand);
|
|
127
|
+
return MoveNodeCommand;
|
|
128
|
+
}());
|
|
129
|
+
exports.MoveNodeCommand = MoveNodeCommand;
|
|
130
|
+
//# sourceMappingURL=node-move.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-move.js","sourceRoot":"","sources":["../../../src/command-contributions/node/node-move.ts"],"names":[],"mappings":";;;;AAAA,6CAAiD;AAEjD,qDAAkF;AAGlF,sDAAiD;AACjD,wCAA+C;AAC/C,sDAAoD;AAIpD,IAAiB,UAAU,CAmC1B;AAnCD,WAAiB,UAAU;IACzB,iCAAiC;IACpB,kBAAO,GAAG,4BAAiB,CAAC,SAAS,CAAA;IAClD,eAAe;IACF,kBAAO,GAAG,UAAU,CAAA;IACjC,cAAc;IACD,qBAAU,GAAG;QACxB,OAAO,IAAI,oBAAO,EAAkB,CAAA;IACtC,CAAC,CAAA;AA2BH,CAAC,EAnCgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAmC1B;AAMD;IADA,aAAa;IACb;QAAA,iBA6EC;QAzEC,YAAY;QACZ,YAAO,GAAG;;;;;;wBACF,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;wBAC5B,KAA+B,GAAG,CAAC,OAAO,EAAE,EAA1C,IAAI,UAAA,EAAS,WAAW,WAAA,CAAkB;wBAC5C,KAAK,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAA;wBAEb,qBAAM,KAAK,CAAC,QAAQ,CAAC,IAAI,CACtC,IAAI,EACJ,UAAM,WAAW;;;;;4CACP,mBAAmB,GAAK,WAAW,oBAAhB,CAAgB;iDAGvC,mBAAmB,EAAnB,wBAAmB;4CACL,qBAAM,mBAAmB,CAAC,WAAW,CAAC,EAAA;;4CAAhD,OAAO,GAAG,SAAsC;4CACtD,IAAI,CAAC,OAAO;gDAAE,sBAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,EAAA;;;4CAG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|
3
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
4
|
+
import { ICommandHandler } from '../../command/interface';
|
|
5
|
+
type ICommand = ICommandHandler<NsSelectNode.IArgs, NsSelectNode.IResult, NsSelectNode.ICmdHooks>;
|
|
6
|
+
export declare namespace NsSelectNode {
|
|
7
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
8
|
+
const hookKey = "selectNode";
|
|
9
|
+
interface IArgs extends IArgsBase {
|
|
10
|
+
/** 选中的节点id */
|
|
11
|
+
nodeIds: string[];
|
|
12
|
+
/** 取消所有节点的选中状态 */
|
|
13
|
+
resetSelection?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface IResult {
|
|
16
|
+
}
|
|
17
|
+
interface ICmdHooks extends IHooks {
|
|
18
|
+
selectNode: HookHub<IArgs, IResult>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare class SelectNodeCommand implements ICommand {
|
|
22
|
+
contextProvider: ICommand['contextProvider'];
|
|
23
|
+
ctx: IContext<NsSelectNode.IArgs, NsSelectNode.IResult, NsSelectNode.ICmdHooks>;
|
|
24
|
+
init(): void;
|
|
25
|
+
execute: () => Promise<this>;
|
|
26
|
+
undo: () => Promise<this>;
|
|
27
|
+
redo: () => Promise<this>;
|
|
28
|
+
isUndoable(): boolean;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectNodeCommand = exports.NsSelectNode = 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 NsSelectNode;
|
|
9
|
+
(function (NsSelectNode) {
|
|
10
|
+
NsSelectNode.command = constant_1.XFlowNodeCommands.SELECT_NODE;
|
|
11
|
+
NsSelectNode.hookKey = 'selectNode';
|
|
12
|
+
})(NsSelectNode = exports.NsSelectNode || (exports.NsSelectNode = {}));
|
|
13
|
+
var SelectNodeCommand = /** @class */ (function () {
|
|
14
|
+
/** 节点更新命令 */
|
|
15
|
+
function SelectNodeCommand() {
|
|
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.selectNode.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
26
|
+
var x6Graph, currentSelectionIds, nodeIds, resetSelection, commandService;
|
|
27
|
+
return tslib_1.__generator(this, function (_a) {
|
|
28
|
+
switch (_a.label) {
|
|
29
|
+
case 0: return [4 /*yield*/, this.ctx.getX6Graph()];
|
|
30
|
+
case 1:
|
|
31
|
+
x6Graph = _a.sent();
|
|
32
|
+
currentSelectionIds = x6Graph.getSelectedCells().map(function (node) { return node.id; });
|
|
33
|
+
nodeIds = handlerArgs.nodeIds, resetSelection = handlerArgs.resetSelection, commandService = handlerArgs.commandService;
|
|
34
|
+
if (resetSelection) {
|
|
35
|
+
x6Graph.resetSelection(nodeIds);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
x6Graph.select(nodeIds);
|
|
39
|
+
}
|
|
40
|
+
this.ctx.addUndo({
|
|
41
|
+
dispose: function () {
|
|
42
|
+
commandService.executeUndoCommand(constant_1.XFlowNodeCommands.SELECT_NODE.id, {
|
|
43
|
+
nodeIds: currentSelectionIds,
|
|
44
|
+
resetSelection: true,
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
return [2 /*return*/, {}];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}); }, runtimeHook)];
|
|
52
|
+
case 1:
|
|
53
|
+
result = _b.sent();
|
|
54
|
+
this.ctx.setResult(result);
|
|
55
|
+
return [2 /*return*/, this];
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}); };
|
|
59
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
60
|
+
return tslib_1.__generator(this, function (_a) {
|
|
61
|
+
this.ctx.undo();
|
|
62
|
+
return [2 /*return*/, this];
|
|
63
|
+
});
|
|
64
|
+
}); };
|
|
65
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
66
|
+
return tslib_1.__generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
|
|
70
|
+
return [4 /*yield*/, this.execute()];
|
|
71
|
+
case 1:
|
|
72
|
+
_a.sent();
|
|
73
|
+
_a.label = 2;
|
|
74
|
+
case 2: return [2 /*return*/, this];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}); };
|
|
78
|
+
}
|
|
79
|
+
SelectNodeCommand.prototype.init = function () {
|
|
80
|
+
this.ctx = this.contextProvider();
|
|
81
|
+
};
|
|
82
|
+
SelectNodeCommand.prototype.isUndoable = function () {
|
|
83
|
+
return this.ctx.isUndoable();
|
|
84
|
+
};
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
87
|
+
tslib_1.__metadata("design:type", Object)
|
|
88
|
+
], SelectNodeCommand.prototype, "contextProvider", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, mana_syringe_1.postConstruct)(),
|
|
91
|
+
tslib_1.__metadata("design:type", Function),
|
|
92
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
93
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
94
|
+
], SelectNodeCommand.prototype, "init", null);
|
|
95
|
+
SelectNodeCommand = tslib_1.__decorate([
|
|
96
|
+
(0, mana_syringe_1.injectable)({
|
|
97
|
+
token: { token: interface_1.ICommandHandler, named: NsSelectNode.command.id },
|
|
98
|
+
})
|
|
99
|
+
/** 节点更新命令 */
|
|
100
|
+
], SelectNodeCommand);
|
|
101
|
+
return SelectNodeCommand;
|
|
102
|
+
}());
|
|
103
|
+
exports.SelectNodeCommand = SelectNodeCommand;
|
|
104
|
+
//# sourceMappingURL=node-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-select.js","sourceRoot":"","sources":["../../../src/command-contributions/node/node-select.ts"],"names":[],"mappings":";;;;AAGA,6CAAgE;AAChE,qDAAkF;AAClF,wCAA+C;AAI/C,IAAiB,YAAY,CAgB5B;AAhBD,WAAiB,YAAY;IACd,oBAAO,GAAG,4BAAiB,CAAC,WAAW,CAAA;IACvC,oBAAO,GAAG,YAAY,CAAA;AAcrC,CAAC,EAhBgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAgB5B;AAMD;IADA,aAAa;IACb;QAAA,iBA4DC;QAlDC,YAAO,GAAG;;;;;;wBACF,KAA+B,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAA/C,IAAI,UAAA,EAAS,WAAW,WAAA,CAAuB;wBACjD,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;wBAElB,qBAAM,KAAK,CAAC,UAAU,CAAC,IAAI,CACxC,IAAI,EACJ,UAAM,WAAW;;;;gDACC,qBAAM,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,EAAA;;4CAArC,OAAO,GAAG,SAA2B;4CACrC,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,EAAE,EAAP,CAAO,CA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,IAAA,4BAAa,GAAE;;;;iDAGf;IARU,iBAAiB;QAJ7B,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE;SAClE,CAAC;QACF,aAAa;OACA,iBAAiB,CA4D7B;IAAD,wBAAC;CAAA,AA5DD,IA4DC;AA5DY,8CAAiB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Node as X6Node, Graph as X6Graph } 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 type { PortManager } from '@antv/x6/es/model/port';
|
|
7
|
+
import { ICommandHandler } from '../../command/interface';
|
|
8
|
+
type ICommand = ICommandHandler<NsUpdateNodePort.IArgs, NsUpdateNodePort.IResult, NsUpdateNodePort.ICmdHooks>;
|
|
9
|
+
export declare namespace NsUpdateNodePort {
|
|
10
|
+
/** Command: 用于注册named factory */
|
|
11
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
12
|
+
/** hookName */
|
|
13
|
+
const hookKey = "updateNodePort";
|
|
14
|
+
/** hook 参数类型 */
|
|
15
|
+
interface IArgs extends IArgsBase {
|
|
16
|
+
node: X6Node | string;
|
|
17
|
+
options?: X6Node.SetOptions;
|
|
18
|
+
updatePorts: (ports: PortManager.PortMetadata[], node: X6Node, graph: X6Graph) => Promise<PortManager.PortMetadata[] | false>;
|
|
19
|
+
}
|
|
20
|
+
/** hook handler 返回类型 */
|
|
21
|
+
interface IResult {
|
|
22
|
+
err?: string;
|
|
23
|
+
ports?: PortManager.PortMetadata[];
|
|
24
|
+
}
|
|
25
|
+
/** add node api service 类型 */
|
|
26
|
+
interface ICreateNodeService {
|
|
27
|
+
(args: IArgs): Promise<NsGraph.INodeConfig | boolean>;
|
|
28
|
+
}
|
|
29
|
+
/** 创建X6 Node Cell的工厂方法 */
|
|
30
|
+
interface INodeCellFactory {
|
|
31
|
+
(args: NsGraph.INodeConfig, self: UpdateNodePort): Promise<Node>;
|
|
32
|
+
}
|
|
33
|
+
/** hooks 类型 */
|
|
34
|
+
interface ICmdHooks extends IHooks {
|
|
35
|
+
updateNodePort: HookHub<IArgs, IResult>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export declare class UpdateNodePort implements ICommand {
|
|
39
|
+
/** api */
|
|
40
|
+
contextProvider: ICommand['contextProvider'];
|
|
41
|
+
getCell: (graph: X6Graph, node: string | X6Node) => X6Node<X6Node.Properties> | import("@antv/x6").Cell<import("@antv/x6").Cell.Properties>;
|
|
42
|
+
getNodeConfig: (x6Node: X6Node) => NsGraph.INodeConfig;
|
|
43
|
+
isNodeAnchors(ports: any): ports is NsGraph.INodeAnchor;
|
|
44
|
+
isPortMetaData(ports: any): ports is NsGraph.INodePortMeta;
|
|
45
|
+
updatePortsOfNodeConfig: (cell: X6Node, ports: NsGraph.INodeAnchor[], options: X6Node.SetOptions) => void;
|
|
46
|
+
/** 执行Cmd */
|
|
47
|
+
execute: () => Promise<this>;
|
|
48
|
+
/** undo cmd */
|
|
49
|
+
undo: () => Promise<this>;
|
|
50
|
+
/** redo cmd */
|
|
51
|
+
redo: () => Promise<this>;
|
|
52
|
+
isUndoable(): boolean;
|
|
53
|
+
}
|
|
54
|
+
export {};
|