@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,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphHistoryToggleCommand = exports.NsGraphHistoryToggle = 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 NsGraphHistoryToggle;
|
|
10
|
+
(function (NsGraphHistoryToggle) {
|
|
11
|
+
/** Command: 用于注册named factory */
|
|
12
|
+
NsGraphHistoryToggle.command = constant_1.XFlowGraphCommands.GRAPH_HISTORY_TOGGLE;
|
|
13
|
+
/** hookName */
|
|
14
|
+
NsGraphHistoryToggle.hookKey = 'historyToggle';
|
|
15
|
+
})(NsGraphHistoryToggle = exports.NsGraphHistoryToggle || (exports.NsGraphHistoryToggle = {}));
|
|
16
|
+
var GraphHistoryToggleCommand = /** @class */ (function () {
|
|
17
|
+
/** 创建节点命令 */
|
|
18
|
+
function GraphHistoryToggleCommand() {
|
|
19
|
+
var _this = this;
|
|
20
|
+
/** 执行Cmd */
|
|
21
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
22
|
+
var ctx, _a, args, runtimeHook, hooks, result;
|
|
23
|
+
var _this = this;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
switch (_b.label) {
|
|
26
|
+
case 0:
|
|
27
|
+
ctx = this.contextProvider();
|
|
28
|
+
_a = ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
29
|
+
hooks = ctx.getHooks();
|
|
30
|
+
return [4 /*yield*/, hooks.historyToggle.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
31
|
+
var graph, isEnable, enabled;
|
|
32
|
+
var _this = this;
|
|
33
|
+
return tslib_1.__generator(this, function (_a) {
|
|
34
|
+
switch (_a.label) {
|
|
35
|
+
case 0: return [4 /*yield*/, ctx.getX6Graph()];
|
|
36
|
+
case 1:
|
|
37
|
+
graph = _a.sent();
|
|
38
|
+
if (graph.isHistoryEnabled() === false) {
|
|
39
|
+
return [2 /*return*/, {
|
|
40
|
+
err: 'history is disabled',
|
|
41
|
+
}];
|
|
42
|
+
}
|
|
43
|
+
isEnable = graph.isHistoryEnabled();
|
|
44
|
+
enabled = handlerArgs.enabled;
|
|
45
|
+
// 执行graph命令
|
|
46
|
+
graph.toggleHistory(enabled);
|
|
47
|
+
// 添加undo
|
|
48
|
+
ctx.addUndo(disposable_1.Disposable.create(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
49
|
+
var commandService;
|
|
50
|
+
return tslib_1.__generator(this, function (_a) {
|
|
51
|
+
commandService = handlerArgs.commandService;
|
|
52
|
+
commandService.executeCommand(constant_1.XFlowGraphCommands.GRAPH_HISTORY_TOGGLE.id, {
|
|
53
|
+
enabled: isEnable,
|
|
54
|
+
});
|
|
55
|
+
return [2 /*return*/];
|
|
56
|
+
});
|
|
57
|
+
}); }));
|
|
58
|
+
return [2 /*return*/, { err: null }];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); }, runtimeHook)];
|
|
62
|
+
case 1:
|
|
63
|
+
result = _b.sent();
|
|
64
|
+
ctx.setResult(result);
|
|
65
|
+
return [2 /*return*/, this];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}); };
|
|
69
|
+
/** undo cmd */
|
|
70
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
71
|
+
var ctx;
|
|
72
|
+
return tslib_1.__generator(this, function (_a) {
|
|
73
|
+
ctx = this.contextProvider();
|
|
74
|
+
if (this.isUndoable()) {
|
|
75
|
+
ctx.undo();
|
|
76
|
+
}
|
|
77
|
+
return [2 /*return*/, this];
|
|
78
|
+
});
|
|
79
|
+
}); };
|
|
80
|
+
/** redo cmd */
|
|
81
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
82
|
+
return tslib_1.__generator(this, function (_a) {
|
|
83
|
+
switch (_a.label) {
|
|
84
|
+
case 0:
|
|
85
|
+
if (!!this.isUndoable()) return [3 /*break*/, 2];
|
|
86
|
+
return [4 /*yield*/, this.execute()];
|
|
87
|
+
case 1:
|
|
88
|
+
_a.sent();
|
|
89
|
+
_a.label = 2;
|
|
90
|
+
case 2: return [2 /*return*/, this];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}); };
|
|
94
|
+
}
|
|
95
|
+
GraphHistoryToggleCommand.prototype.isUndoable = function () {
|
|
96
|
+
var ctx = this.contextProvider();
|
|
97
|
+
return ctx.isUndoable();
|
|
98
|
+
};
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
101
|
+
tslib_1.__metadata("design:type", Object)
|
|
102
|
+
], GraphHistoryToggleCommand.prototype, "contextProvider", void 0);
|
|
103
|
+
GraphHistoryToggleCommand = tslib_1.__decorate([
|
|
104
|
+
(0, mana_syringe_1.injectable)({
|
|
105
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphHistoryToggle.command.id },
|
|
106
|
+
})
|
|
107
|
+
/** 创建节点命令 */
|
|
108
|
+
], GraphHistoryToggleCommand);
|
|
109
|
+
return GraphHistoryToggleCommand;
|
|
110
|
+
}());
|
|
111
|
+
exports.GraphHistoryToggleCommand = GraphHistoryToggleCommand;
|
|
112
|
+
//# sourceMappingURL=graph-history-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-history-toggle.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-history-toggle.ts"],"names":[],"mappings":";;;;AAAA,6CAAiD;AAIjD,qDAAkF;AAClF,wCAAgD;AAChD,sDAAoD;AAQpD,IAAiB,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;IACnC,iCAAiC;IACpB,4BAAO,GAAG,6BAAkB,CAAC,oBAAoB,CAAA;IAC9D,eAAe;IACF,4BAAO,GAAG,eAAe,CAAA;AAaxC,CAAC,EAjBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAiBpC;AAMD;IADA,aAAa;IACb;QAAA,iBAgEC;QA5DC,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,aAAa,CAAC,IAAI,CAC3C,IAAI,EACJ,UAAM,WAAW;;;;;gDACD,qBAAM,GAAG,CAAC,UAAU,EAAE,EAAA;;4CAA9B,KAAK,GAAG,SAAsB;4CACpC,IAAI,KAAK,CAAC,gBAAgB,EAAE,KAAK,KAAK,EAAE;gDACtC,sBAAO;wDACL,GAAG,EAAE,qBAAqB;qDAC3B,EAAA;6CACF;4CACK,QAAQ,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAA;4CACjC,OAAO,GAAK,WAAW,QAAhB,CAAgB;4CAC/B,YAAY;4CACZ,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;4CAC5B,SAAS;4CACT,GAAG,CAAC,OAAO,CACT,uBAAU,CAAC,MAAM,CAAC;;;oDACR,cAAc,GAAK,WAAW,eAAhB,CAAgB;oDACtC,cAAc,CAAC,cAAc,CAC3B,6BAAkB,CAAC,oBAAoB,CAAC,EAAE,EAC1C;wDACE,OAAO,EAAE,QAAQ;qDAClB,CACF,CAAA;;;iDACF,CAAC,CACH,CAAA;4CACD,sBAAO,EAAE,GAAG,EAAE,IAAI,EAAE,EAAA;;;iCACrB,EACD,WAAW,CACZ,EAAA;;wBA5BK,MAAM,GAAG,SA4Bd;wBACD,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;wBACrB,sBAAO,IAAI,EAAA;;;aACZ,CAAA;QAED,eAAe;QACf,SAAI,GAAG;;;gBACC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;gBAClC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;oBACrB,GAAG,CAAC,IAAI,EAAE,CAAA;iBACX;gBACD,sBAAO,IAAI,EAAA;;aACZ,CAAA;QAED,eAAe;QACf,SAAI,GAAG;;;;6BACD,CAAC,IAAI,CAAC,UAAU,EAAE,EAAlB,wBAAkB;wBACpB,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAApB,SAAoB,CAAA;;4BAEtB,sBAAO,IAAI,EAAA;;;aACZ,CAAA;IAMH,CAAC;IAJC,8CAAU,GAAV;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;QAClC,OAAO,GAAG,CAAC,UAAU,EAAE,CAAA;IACzB,CAAC;IA7DD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;sEAA6C;IAFlE,yBAAyB;QAJrC,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAAE,EAAE;SAC1E,CAAC;QACF,aAAa;OACA,yBAAyB,CAgErC;IAAD,gCAAC;CAAA,AAhED,IAgEC;AAhEY,8DAAyB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
2
|
+
import type { IHooks } from '../../hooks/interface';
|
|
3
|
+
import type { IArgsBase } from '../../command/interface';
|
|
4
|
+
import { ICommandHandler } from '../../command/interface';
|
|
5
|
+
type ICommand = ICommandHandler<NsGraphHistoryUndo.IArgs, NsGraphHistoryUndo.IResult, NsGraphHistoryUndo.ICmdHooks>;
|
|
6
|
+
export declare namespace NsGraphHistoryUndo {
|
|
7
|
+
/** Command: 用于注册named factory */
|
|
8
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
9
|
+
/** hookName */
|
|
10
|
+
const hookKey = "historyUndo";
|
|
11
|
+
/** hook 参数类型 */
|
|
12
|
+
interface IArgs extends IArgsBase {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** hook handler 返回类型 */
|
|
16
|
+
interface IResult {
|
|
17
|
+
err: null | string;
|
|
18
|
+
}
|
|
19
|
+
/** hooks 类型 */
|
|
20
|
+
interface ICmdHooks extends IHooks {
|
|
21
|
+
historyUndo: HookHub<IArgs, IResult>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class GraphHistoryUndoCommand implements ICommand {
|
|
25
|
+
/** api */
|
|
26
|
+
contextProvider: ICommand['contextProvider'];
|
|
27
|
+
/** 执行Cmd */
|
|
28
|
+
execute: () => Promise<this>;
|
|
29
|
+
/** undo cmd */
|
|
30
|
+
undo: () => Promise<this>;
|
|
31
|
+
/** redo cmd */
|
|
32
|
+
redo: () => Promise<this>;
|
|
33
|
+
isUndoable(): boolean;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphHistoryUndoCommand = exports.NsGraphHistoryUndo = 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 NsGraphHistoryUndo;
|
|
10
|
+
(function (NsGraphHistoryUndo) {
|
|
11
|
+
/** Command: 用于注册named factory */
|
|
12
|
+
NsGraphHistoryUndo.command = constant_1.XFlowGraphCommands.GRAPH_HISTORY_UNDO;
|
|
13
|
+
/** hookName */
|
|
14
|
+
NsGraphHistoryUndo.hookKey = 'historyUndo';
|
|
15
|
+
})(NsGraphHistoryUndo = exports.NsGraphHistoryUndo || (exports.NsGraphHistoryUndo = {}));
|
|
16
|
+
var GraphHistoryUndoCommand = /** @class */ (function () {
|
|
17
|
+
/** 开启history命令 */
|
|
18
|
+
function GraphHistoryUndoCommand() {
|
|
19
|
+
var _this = this;
|
|
20
|
+
/** 执行Cmd */
|
|
21
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
22
|
+
var ctx, _a, args, runtimeHook, hooks, result;
|
|
23
|
+
var _this = this;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
switch (_b.label) {
|
|
26
|
+
case 0:
|
|
27
|
+
ctx = this.contextProvider();
|
|
28
|
+
_a = ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
29
|
+
hooks = ctx.getHooks();
|
|
30
|
+
return [4 /*yield*/, hooks.historyUndo.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
31
|
+
var graph;
|
|
32
|
+
var _this = this;
|
|
33
|
+
return tslib_1.__generator(this, function (_a) {
|
|
34
|
+
switch (_a.label) {
|
|
35
|
+
case 0: return [4 /*yield*/, ctx.getX6Graph()];
|
|
36
|
+
case 1:
|
|
37
|
+
graph = _a.sent();
|
|
38
|
+
if (graph.isHistoryEnabled() === false) {
|
|
39
|
+
return [2 /*return*/, {
|
|
40
|
+
err: 'history is disabled',
|
|
41
|
+
}];
|
|
42
|
+
}
|
|
43
|
+
graph.undo();
|
|
44
|
+
ctx.addUndo(disposable_1.Disposable.create(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
45
|
+
var commandService;
|
|
46
|
+
return tslib_1.__generator(this, function (_a) {
|
|
47
|
+
commandService = handlerArgs.commandService;
|
|
48
|
+
commandService.executeCommand(constant_1.XFlowGraphCommands.GRAPH_HISTORY_REDO.id, {});
|
|
49
|
+
return [2 /*return*/];
|
|
50
|
+
});
|
|
51
|
+
}); }));
|
|
52
|
+
return [2 /*return*/, { err: null }];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}); }, runtimeHook)];
|
|
56
|
+
case 1:
|
|
57
|
+
result = _b.sent();
|
|
58
|
+
ctx.setResult(result);
|
|
59
|
+
return [2 /*return*/, this];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}); };
|
|
63
|
+
/** undo cmd */
|
|
64
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
65
|
+
var ctx;
|
|
66
|
+
return tslib_1.__generator(this, function (_a) {
|
|
67
|
+
ctx = this.contextProvider();
|
|
68
|
+
if (this.isUndoable()) {
|
|
69
|
+
ctx.undo();
|
|
70
|
+
}
|
|
71
|
+
return [2 /*return*/, this];
|
|
72
|
+
});
|
|
73
|
+
}); };
|
|
74
|
+
/** redo cmd */
|
|
75
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
76
|
+
return tslib_1.__generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
if (!!this.isUndoable()) return [3 /*break*/, 2];
|
|
80
|
+
return [4 /*yield*/, this.execute()];
|
|
81
|
+
case 1:
|
|
82
|
+
_a.sent();
|
|
83
|
+
_a.label = 2;
|
|
84
|
+
case 2: return [2 /*return*/, this];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}); };
|
|
88
|
+
}
|
|
89
|
+
GraphHistoryUndoCommand.prototype.isUndoable = function () {
|
|
90
|
+
var ctx = this.contextProvider();
|
|
91
|
+
return ctx.isUndoable();
|
|
92
|
+
};
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
95
|
+
tslib_1.__metadata("design:type", Object)
|
|
96
|
+
], GraphHistoryUndoCommand.prototype, "contextProvider", void 0);
|
|
97
|
+
GraphHistoryUndoCommand = tslib_1.__decorate([
|
|
98
|
+
(0, mana_syringe_1.injectable)({
|
|
99
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphHistoryUndo.command.id },
|
|
100
|
+
})
|
|
101
|
+
/** 开启history命令 */
|
|
102
|
+
], GraphHistoryUndoCommand);
|
|
103
|
+
return GraphHistoryUndoCommand;
|
|
104
|
+
}());
|
|
105
|
+
exports.GraphHistoryUndoCommand = GraphHistoryUndoCommand;
|
|
106
|
+
//# sourceMappingURL=graph-history-undo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-history-undo.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-history-undo.ts"],"names":[],"mappings":";;;;AAAA,6CAAiD;AAIjD,qDAAkF;AAClF,wCAAgD;AAChD,sDAAoD;AAQpD,IAAiB,kBAAkB,CAiBlC;AAjBD,WAAiB,kBAAkB;IACjC,iCAAiC;IACpB,0BAAO,GAAG,6BAAkB,CAAC,kBAAkB,CAAA;IAC5D,eAAe;IACF,0BAAO,GAAG,aAAa,CAAA;AAatC,CAAC,EAjBgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAiBlC;AAMD;IADA,kBAAkB;IAClB;QAAA,iBAuDC;QAnDC,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,WAAW,CAAC,IAAI,CACzC,IAAI,EACJ,UAAM,WAAW;;;;;gDACD,qBAAM,GAAG,CAAC,UAAU,EAAE,EAAA;;4CAA9B,KAAK,GAAG,SAAsB;4CACpC,IAAI,KAAK,CAAC,gBAAgB,EAAE,KAAK,KAAK,EAAE;gDACtC,sBAAO;wDACL,GAAG,EAAE,qBAAqB;qDAC3B,EAAA;6CACF;4CACD,KAAK,CAAC,IAAI,EAAE,CAAA;4CACZ,GAAG,CAAC,OAAO,CACT,uBAAU,CAAC,MAAM,CAAC;;;oDACR,cAAc,GAAK,WAAW,eAAhB,CAAgB;oDACtC,cAAc,CAAC,cAAc,CAAC,6BAAkB,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;;iDAC5E,CAAC,CACH,CAAA;4CACD,sBAAO,EAAE,GAAG,EAAE,IAAI,EAAE,EAAA;;;iCACrB,EACD,WAAW,CACZ,EAAA;;wBAnBK,MAAM,GAAG,SAmBd;wBACD,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;wBACrB,sBAAO,IAAI,EAAA;;;aACZ,CAAA;QAED,eAAe;QACf,SAAI,GAAG;;;gBACC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;gBAClC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;oBACrB,GAAG,CAAC,IAAI,EAAE,CAAA;iBACX;gBACD,sBAAO,IAAI,EAAA;;aACZ,CAAA;QAED,eAAe;QACf,SAAI,GAAG;;;;6BACD,CAAC,IAAI,CAAC,UAAU,EAAE,EAAlB,wBAAkB;wBACpB,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAApB,SAAoB,CAAA;;4BAEtB,sBAAO,IAAI,EAAA;;;aACZ,CAAA;IAMH,CAAC;IAJC,4CAAU,GAAV;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;QAClC,OAAO,GAAG,CAAC,UAAU,EAAE,CAAA;IACzB,CAAC;IApDD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;oEAA6C;IAFlE,uBAAuB;QAJnC,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE;SACxE,CAAC;QACF,kBAAkB;OACL,uBAAuB,CAuDnC;IAAD,8BAAC;CAAA,AAvDD,IAuDC;AAvDY,0DAAuB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ILayout } from '@antv/layout/es/layout/types';
|
|
2
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
3
|
+
import type { IHooks } from '../../hooks/interface';
|
|
4
|
+
import type { NsGraph } from '../../interface';
|
|
5
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
6
|
+
import { ICommandHandler } from '../../command/interface';
|
|
7
|
+
type ICommand = ICommandHandler<NsGraphLayout.IArgs, NsGraphLayout.IResult, NsGraphLayout.ICmdHooks>;
|
|
8
|
+
/** 画布图数据执行布局算法命令 */
|
|
9
|
+
export declare namespace NsGraphLayout {
|
|
10
|
+
/** Command: 用于注册named factory */
|
|
11
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
12
|
+
/** hookName */
|
|
13
|
+
const hookKey = "graphLayout";
|
|
14
|
+
interface IArgs extends IArgsBase {
|
|
15
|
+
/** XFlow自带AntV布局类型 */
|
|
16
|
+
layoutType?: ILayout.LayoutTypes;
|
|
17
|
+
/** XFlow自带AntV布局对应参数 */
|
|
18
|
+
layoutOptions?: ILayout.LayoutOptions;
|
|
19
|
+
/** 需要执行布局算法的数据 */
|
|
20
|
+
graphData?: NsGraph.IGraphData;
|
|
21
|
+
/** 用户自定义布局 */
|
|
22
|
+
customLayout?: (graphData: NsGraph.IGraphData) => Promise<NsGraph.IGraphData>;
|
|
23
|
+
}
|
|
24
|
+
interface IResult {
|
|
25
|
+
/** 执行完布局算法后的画布图数据(每一个节点拥有x,y) */
|
|
26
|
+
graphData: NsGraph.IGraphData;
|
|
27
|
+
}
|
|
28
|
+
/** hooks 类型 */
|
|
29
|
+
interface ICmdHooks extends IHooks {
|
|
30
|
+
graphLayout: HookHub<IArgs, IResult>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export declare class GraphLayoutCommand implements ICommand {
|
|
34
|
+
contextProvider: ICommand['contextProvider'];
|
|
35
|
+
ctx: IContext<NsGraphLayout.IArgs, NsGraphLayout.IResult, NsGraphLayout.ICmdHooks>;
|
|
36
|
+
init(): void;
|
|
37
|
+
/** 执行cmd */
|
|
38
|
+
execute: () => Promise<this>;
|
|
39
|
+
undo: () => Promise<this>;
|
|
40
|
+
redo: () => Promise<this>;
|
|
41
|
+
isUndoable(): boolean;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphLayoutCommand = exports.NsGraphLayout = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var mana_syringe_1 = require("mana-syringe");
|
|
6
|
+
var AntvLayout = tslib_1.__importStar(require("@antv/layout"));
|
|
7
|
+
var interface_1 = require("../../command/interface");
|
|
8
|
+
var constant_1 = require("../constant");
|
|
9
|
+
/** 画布图数据执行布局算法命令 */
|
|
10
|
+
var NsGraphLayout;
|
|
11
|
+
(function (NsGraphLayout) {
|
|
12
|
+
/** Command: 用于注册named factory */
|
|
13
|
+
NsGraphLayout.command = constant_1.XFlowGraphCommands.GRAPH_LAYOUT;
|
|
14
|
+
/** hookName */
|
|
15
|
+
NsGraphLayout.hookKey = 'graphLayout';
|
|
16
|
+
})(NsGraphLayout = exports.NsGraphLayout || (exports.NsGraphLayout = {}));
|
|
17
|
+
var GraphLayoutCommand = /** @class */ (function () {
|
|
18
|
+
/** 画布布局命令 */
|
|
19
|
+
function GraphLayoutCommand() {
|
|
20
|
+
var _this = this;
|
|
21
|
+
/** 执行cmd */
|
|
22
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
23
|
+
var _a, args, runtimeHook, hooks, result;
|
|
24
|
+
var _this = this;
|
|
25
|
+
return tslib_1.__generator(this, function (_b) {
|
|
26
|
+
switch (_b.label) {
|
|
27
|
+
case 0:
|
|
28
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
29
|
+
hooks = this.ctx.getHooks();
|
|
30
|
+
return [4 /*yield*/, hooks.graphLayout.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
31
|
+
var layoutType, layoutOptions, customLayout, innerLayout, layoutFunc;
|
|
32
|
+
return tslib_1.__generator(this, function (_a) {
|
|
33
|
+
switch (_a.label) {
|
|
34
|
+
case 0:
|
|
35
|
+
layoutType = handlerArgs.layoutType, layoutOptions = handlerArgs.layoutOptions, customLayout = handlerArgs.customLayout;
|
|
36
|
+
innerLayout = function (graphData) {
|
|
37
|
+
var clz = AntvLayout.Layouts[layoutType];
|
|
38
|
+
var antVLayout = new clz(tslib_1.__assign({}, layoutOptions));
|
|
39
|
+
return antVLayout.layout(graphData);
|
|
40
|
+
};
|
|
41
|
+
layoutFunc = customLayout || innerLayout;
|
|
42
|
+
return [4 /*yield*/, layoutFunc(handlerArgs.graphData)];
|
|
43
|
+
case 1:
|
|
44
|
+
_a.sent();
|
|
45
|
+
return [2 /*return*/, { graphData: handlerArgs.graphData }];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}); }, runtimeHook)
|
|
49
|
+
/** 设置结果 */
|
|
50
|
+
];
|
|
51
|
+
case 1:
|
|
52
|
+
result = _b.sent();
|
|
53
|
+
/** 设置结果 */
|
|
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
|
+
GraphLayoutCommand.prototype.init = function () {
|
|
80
|
+
this.ctx = this.contextProvider();
|
|
81
|
+
};
|
|
82
|
+
GraphLayoutCommand.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
|
+
], GraphLayoutCommand.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
|
+
], GraphLayoutCommand.prototype, "init", null);
|
|
95
|
+
GraphLayoutCommand = tslib_1.__decorate([
|
|
96
|
+
(0, mana_syringe_1.injectable)({
|
|
97
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphLayout.command.id },
|
|
98
|
+
})
|
|
99
|
+
/** 画布布局命令 */
|
|
100
|
+
], GraphLayoutCommand);
|
|
101
|
+
return GraphLayoutCommand;
|
|
102
|
+
}());
|
|
103
|
+
exports.GraphLayoutCommand = GraphLayoutCommand;
|
|
104
|
+
//# sourceMappingURL=graph-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-layout.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-layout.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAMhE,+DAA0C;AAC1C,qDAAkF;AAClF,wCAAgD;AAIhD,oBAAoB;AACpB,IAAiB,aAAa,CA0B7B;AA1BD,WAAiB,aAAa;IAC5B,iCAAiC;IACpB,qBAAO,GAAG,6BAAkB,CAAC,YAAY,CAAA;IACtD,eAAe;IACF,qBAAO,GAAG,aAAa,CAAA;AAsBtC,CAAC,EA1BgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA0B7B;AAMD;IADA,aAAa;IACb;QAAA,iBAwDC;QA9CC,YAAY;QACZ,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,WAAW,CAAC,IAAI,CACzC,IAAI,EACJ,UAAM,WAAW;;;;;4CACP,UAAU,GAAkC,WAAW,WAA7C,EAAE,aAAa,GAAmB,WAAW,cAA9B,EAAE,YAAY,GAAK,WAAW,aAAhB,CAAgB;4CAEzD,WAAW,GAAG,UAAC,SAA6B;gDAChD,IAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;gDAC1C,IAAM,UAAU,GAAG,IAAI,GAAG,sBACrB,aAAa,EAChB,CAAA;gDACF,OAAO,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;4CACrC,CAAC,CAAA;4CACK,UAAU,GAAG,YAAY,IAAI,WAAW,CAAA;4CAC9C,qBAAM,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,EAAA;;4CAAvC,SAAuC,CAAA;4CAEvC,sBAAO,EAAE,SAAS,EAAE,WAAW,CAAC,SAAS,EAAE,EAAA;;;iCAC5C,EACD,WAAW,CACZ;4BAED,WAAW;0BAFV;;wBAlBK,MAAM,GAAG,SAkBd;wBAED,WAAW;wBACX,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;wBAE1B,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,iCAAI,GADJ;QAEE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IACnC,CAAC;IA6CD,uCAAU,GAAV;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;IAtDD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;+DAA6C;IAI7E;QAAC,IAAA,4BAAa,GAAE;;;;kDAGf;IARU,kBAAkB;QAJ9B,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE;SACnE,CAAC;QACF,aAAa;OACA,kBAAkB,CAwD9B;IAAD,yBAAC;CAAA,AAxDD,IAwDC;AAxDY,gDAAkB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HookHub } from '@sunspirytus/xflow-hook';
|
|
2
|
+
import type { IHooks } from '../../hooks/interface';
|
|
3
|
+
import type { NsGraph } from '../../interface';
|
|
4
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
5
|
+
import { ICommandHandler } from '../../command/interface';
|
|
6
|
+
type ICommand = ICommandHandler<NsGraphLoadData.IArgs, NsGraphLoadData.IResult, NsGraphLoadData.ICmdHooks>;
|
|
7
|
+
/** 从服务端获取画布数据命令 */
|
|
8
|
+
export declare namespace NsGraphLoadData {
|
|
9
|
+
/** Command: 用于注册named factory */
|
|
10
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
11
|
+
/** hookName */
|
|
12
|
+
const hookKey = "loadData";
|
|
13
|
+
const createHook: () => HookHub<IArgs, IResult>;
|
|
14
|
+
interface IArgs extends IArgsBase {
|
|
15
|
+
loadDataService: (meta?: NsGraph.IGraphMeta) => Promise<NsGraph.IGraphData>;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
interface IResult {
|
|
19
|
+
/** 从服务端返回的数据 */
|
|
20
|
+
graphData: NsGraph.IGraphData;
|
|
21
|
+
}
|
|
22
|
+
/** hooks 类型 */
|
|
23
|
+
interface ICmdHooks extends IHooks {
|
|
24
|
+
loadData: HookHub<IArgs, IResult>;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export declare class GraphLoadDataCommand implements ICommand {
|
|
28
|
+
contextProvider: ICommand['contextProvider'];
|
|
29
|
+
ctx: IContext<NsGraphLoadData.IArgs, NsGraphLoadData.IResult, NsGraphLoadData.ICmdHooks>;
|
|
30
|
+
init(): void;
|
|
31
|
+
/** 执行cmd */
|
|
32
|
+
execute: () => Promise<this>;
|
|
33
|
+
undo: () => Promise<this>;
|
|
34
|
+
redo: () => Promise<this>;
|
|
35
|
+
isUndoable(): boolean;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphLoadDataCommand = exports.NsGraphLoadData = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var mana_syringe_1 = require("mana-syringe");
|
|
6
|
+
var xflow_hook_1 = require("@sunspirytus/xflow-hook");
|
|
7
|
+
var interface_1 = require("../../command/interface");
|
|
8
|
+
var constant_1 = require("../constant");
|
|
9
|
+
/** 从服务端获取画布数据命令 */
|
|
10
|
+
var NsGraphLoadData;
|
|
11
|
+
(function (NsGraphLoadData) {
|
|
12
|
+
/** Command: 用于注册named factory */
|
|
13
|
+
NsGraphLoadData.command = constant_1.XFlowGraphCommands.LOAD_DATA;
|
|
14
|
+
/** hookName */
|
|
15
|
+
NsGraphLoadData.hookKey = 'loadData';
|
|
16
|
+
NsGraphLoadData.createHook = function () {
|
|
17
|
+
return new xflow_hook_1.HookHub();
|
|
18
|
+
};
|
|
19
|
+
})(NsGraphLoadData = exports.NsGraphLoadData || (exports.NsGraphLoadData = {}));
|
|
20
|
+
var GraphLoadDataCommand = /** @class */ (function () {
|
|
21
|
+
/** 画布数据获取命令 */
|
|
22
|
+
function GraphLoadDataCommand() {
|
|
23
|
+
var _this = this;
|
|
24
|
+
/** 执行cmd */
|
|
25
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
26
|
+
var _a, args, runtimeHook, hooks, result;
|
|
27
|
+
var _this = this;
|
|
28
|
+
return tslib_1.__generator(this, function (_b) {
|
|
29
|
+
switch (_b.label) {
|
|
30
|
+
case 0:
|
|
31
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
32
|
+
hooks = this.ctx.getHooks();
|
|
33
|
+
return [4 /*yield*/, hooks.loadData.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
34
|
+
var loadDataService, graphMeta, graphData;
|
|
35
|
+
return tslib_1.__generator(this, function (_a) {
|
|
36
|
+
switch (_a.label) {
|
|
37
|
+
case 0:
|
|
38
|
+
loadDataService = handlerArgs.loadDataService;
|
|
39
|
+
return [4 /*yield*/, this.ctx.getGraphMeta()];
|
|
40
|
+
case 1:
|
|
41
|
+
graphMeta = _a.sent();
|
|
42
|
+
return [4 /*yield*/, loadDataService(graphMeta)];
|
|
43
|
+
case 2:
|
|
44
|
+
graphData = _a.sent();
|
|
45
|
+
return [2 /*return*/, { graphData: graphData }];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}); }, runtimeHook)
|
|
49
|
+
/** 设置结果 */
|
|
50
|
+
];
|
|
51
|
+
case 1:
|
|
52
|
+
result = _b.sent();
|
|
53
|
+
/** 设置结果 */
|
|
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
|
+
GraphLoadDataCommand.prototype.init = function () {
|
|
80
|
+
this.ctx = this.contextProvider();
|
|
81
|
+
};
|
|
82
|
+
GraphLoadDataCommand.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
|
+
], GraphLoadDataCommand.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
|
+
], GraphLoadDataCommand.prototype, "init", null);
|
|
95
|
+
GraphLoadDataCommand = tslib_1.__decorate([
|
|
96
|
+
(0, mana_syringe_1.injectable)({
|
|
97
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphLoadData.command.id },
|
|
98
|
+
})
|
|
99
|
+
/** 画布数据获取命令 */
|
|
100
|
+
], GraphLoadDataCommand);
|
|
101
|
+
return GraphLoadDataCommand;
|
|
102
|
+
}());
|
|
103
|
+
exports.GraphLoadDataCommand = GraphLoadDataCommand;
|
|
104
|
+
//# sourceMappingURL=graph-load-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-load-data.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-load-data.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAChE,sDAAiD;AAIjD,qDAAkF;AAClF,wCAAgD;AAQhD,mBAAmB;AACnB,IAAiB,eAAe,CAuB/B;AAvBD,WAAiB,eAAe;IAC9B,iCAAiC;IACpB,uBAAO,GAAG,6BAAkB,CAAC,SAAS,CAAA;IACnD,eAAe;IACF,uBAAO,GAAG,UAAU,CAAA;IACpB,0BAAU,GAAG;QACxB,OAAO,IAAI,oBAAO,EAAkB,CAAA;IACtC,CAAC,CAAA;AAgBH,CAAC,EAvBgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAuB/B;AAMD;IADA,eAAe;IACf;QAAA,iBA+CC;QArCC,YAAY;QACZ,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,QAAQ,CAAC,IAAI,CACtC,IAAI,EACJ,UAAM,WAAW;;;;;4CACP,eAAe,GAAK,WAAW,gBAAhB,CAAgB;4CACrB,qBAAM,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAA;;4CAAzC,SAAS,GAAG,SAA6B;4CAC7B,qBAAM,eAAe,CAAC,SAAS,CAAC,EAAA;;4CAA5C,SAAS,GAAG,SAAgC;4CAClD,sBAAO,EAAE,SAAS,WAAA,EAAE,EAAA;;;iCACrB,EACD,WAAW,CACZ;4BAED,WAAW;0BAFV;;wBATK,MAAM,GAAG,SASd;wBAED,WAAW;wBACX,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;wBAE1B,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;IAzCC,mCAAI,GADJ;QAEE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;IACnC,CAAC;IAoCD,yCAAU,GAAV;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;IAC9B,CAAC;IA7CD;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,eAAe;OACF,oBAAoB,CA+ChC;IAAD,2BAAC;CAAA,AA/CD,IA+CC;AA/CY,oDAAoB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { NsGraph } from '../../interface';
|
|
2
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
3
|
+
import { ICommandHandler } from '../../command/interface';
|
|
4
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
5
|
+
import type { IHooks } from '../../hooks/interface';
|
|
6
|
+
type ICommand = ICommandHandler<NsGraphMeta.IArgs, NsGraphMeta.IResult, NsGraphMeta.ICmdHooks>;
|
|
7
|
+
export declare namespace NsGraphMeta {
|
|
8
|
+
/** Command Id: 用于注册named factory */
|
|
9
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
10
|
+
/** hookName */
|
|
11
|
+
const hookKey = "graphMeta";
|
|
12
|
+
/** hook 参数类型 */
|
|
13
|
+
interface IArgs extends IArgsBase {
|
|
14
|
+
meta?: {
|
|
15
|
+
flowId: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
graphMetaService?: IGraphMetaService;
|
|
19
|
+
}
|
|
20
|
+
/** hook handler 返回类型 */
|
|
21
|
+
interface IResult extends NsGraph.IGraphMeta {
|
|
22
|
+
flowId: string;
|
|
23
|
+
}
|
|
24
|
+
/** api service 类型 */
|
|
25
|
+
interface IGraphMetaService {
|
|
26
|
+
(args: IArgs): Promise<NsGraph.IGraphMeta>;
|
|
27
|
+
}
|
|
28
|
+
/** hooks 类型 */
|
|
29
|
+
interface ICmdHooks extends IHooks {
|
|
30
|
+
graphMeta: HookHub<IArgs, IResult>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export declare class GraphMetaCommand implements ICommand {
|
|
34
|
+
/** api */
|
|
35
|
+
contextProvider: ICommand['contextProvider'];
|
|
36
|
+
ctx: IContext<NsGraphMeta.IArgs, NsGraphMeta.IResult, NsGraphMeta.ICmdHooks>;
|
|
37
|
+
init(): void;
|
|
38
|
+
/** 执行Cmd */
|
|
39
|
+
execute: () => Promise<this>;
|
|
40
|
+
/** undo cmd */
|
|
41
|
+
undo: () => Promise<this>;
|
|
42
|
+
/** redo cmd */
|
|
43
|
+
redo: () => Promise<this>;
|
|
44
|
+
/** isUndoable */
|
|
45
|
+
isUndoable(): boolean;
|
|
46
|
+
}
|
|
47
|
+
export {};
|