@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,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphDelToolCommand = exports.NsGraphDelTool = 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 NsGraphDelTool;
|
|
9
|
+
(function (NsGraphDelTool) {
|
|
10
|
+
/** Command: 用于注册named factory */
|
|
11
|
+
NsGraphDelTool.command = constant_1.XFlowGraphCommands.GRAPH_DEL_TOOL;
|
|
12
|
+
/** hookName */
|
|
13
|
+
NsGraphDelTool.hookKey = 'delTool';
|
|
14
|
+
})(NsGraphDelTool = exports.NsGraphDelTool || (exports.NsGraphDelTool = {}));
|
|
15
|
+
var GraphDelToolCommand = /** @class */ (function () {
|
|
16
|
+
/** 创建节点命令 */
|
|
17
|
+
function GraphDelToolCommand() {
|
|
18
|
+
var _this = this;
|
|
19
|
+
/** 执行Cmd */
|
|
20
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
21
|
+
var ctx, _a, args, runtimeHook, hooks, result;
|
|
22
|
+
var _this = this;
|
|
23
|
+
return tslib_1.__generator(this, function (_b) {
|
|
24
|
+
switch (_b.label) {
|
|
25
|
+
case 0:
|
|
26
|
+
ctx = this.contextProvider();
|
|
27
|
+
_a = ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
28
|
+
hooks = ctx.getHooks();
|
|
29
|
+
return [4 /*yield*/, hooks.delTool.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
30
|
+
var cellId, toolName, toolConfig, graph, cell;
|
|
31
|
+
return tslib_1.__generator(this, function (_a) {
|
|
32
|
+
switch (_a.label) {
|
|
33
|
+
case 0:
|
|
34
|
+
cellId = handlerArgs.cellId, toolName = handlerArgs.toolName, toolConfig = handlerArgs.toolConfig;
|
|
35
|
+
return [4 /*yield*/, ctx.getX6Graph()];
|
|
36
|
+
case 1:
|
|
37
|
+
graph = _a.sent();
|
|
38
|
+
cell = graph.getCellById(cellId);
|
|
39
|
+
if (cell) {
|
|
40
|
+
if (toolName === '*') {
|
|
41
|
+
cell.removeTools(toolConfig);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
cell.removeTool(toolName, toolConfig);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return [2 /*return*/, { err: null }];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}); }, runtimeHook)];
|
|
51
|
+
case 1:
|
|
52
|
+
result = _b.sent();
|
|
53
|
+
ctx.setResult(result);
|
|
54
|
+
return [2 /*return*/, this];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}); };
|
|
58
|
+
/** undo cmd */
|
|
59
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
60
|
+
var ctx;
|
|
61
|
+
return tslib_1.__generator(this, function (_a) {
|
|
62
|
+
ctx = this.contextProvider();
|
|
63
|
+
if (this.isUndoable()) {
|
|
64
|
+
ctx.undo();
|
|
65
|
+
}
|
|
66
|
+
return [2 /*return*/, this];
|
|
67
|
+
});
|
|
68
|
+
}); };
|
|
69
|
+
/** redo cmd */
|
|
70
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
71
|
+
return tslib_1.__generator(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0:
|
|
74
|
+
if (!!this.isUndoable()) return [3 /*break*/, 2];
|
|
75
|
+
return [4 /*yield*/, this.execute()];
|
|
76
|
+
case 1:
|
|
77
|
+
_a.sent();
|
|
78
|
+
_a.label = 2;
|
|
79
|
+
case 2: return [2 /*return*/, this];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}); };
|
|
83
|
+
}
|
|
84
|
+
GraphDelToolCommand.prototype.isUndoable = function () {
|
|
85
|
+
var ctx = this.contextProvider();
|
|
86
|
+
return ctx.isUndoable();
|
|
87
|
+
};
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
90
|
+
tslib_1.__metadata("design:type", Object)
|
|
91
|
+
], GraphDelToolCommand.prototype, "contextProvider", void 0);
|
|
92
|
+
GraphDelToolCommand = tslib_1.__decorate([
|
|
93
|
+
(0, mana_syringe_1.injectable)({
|
|
94
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphDelTool.command.id },
|
|
95
|
+
})
|
|
96
|
+
/** 创建节点命令 */
|
|
97
|
+
], GraphDelToolCommand);
|
|
98
|
+
return GraphDelToolCommand;
|
|
99
|
+
}());
|
|
100
|
+
exports.GraphDelToolCommand = GraphDelToolCommand;
|
|
101
|
+
//# sourceMappingURL=graph-del-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-del-tool.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-del-tool.ts"],"names":[],"mappings":";;;;AACA,6CAAiD;AAKjD,qDAAkF;AAClF,wCAAgD;AAQhD,IAAiB,cAAc,CA2B9B;AA3BD,WAAiB,cAAc;IAC7B,iCAAiC;IACpB,sBAAO,GAAG,6BAAkB,CAAC,cAAc,CAAA;IACxD,eAAe;IACF,sBAAO,GAAG,SAAS,CAAA;AAuBlC,CAAC,EA3BgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA2B9B;AAMD;IADA,aAAa;IACb;QAAA,iBAsDC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BACpB,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAApB,SAAoB,CAAA;;4BAEtB,sBAAO,IAAI,EAAA;;;aACZ,CAAA;IAMH,CAAC;IAJC,wCAAU,GAAV;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;QAClC,OAAO,GAAG,CAAC,UAAU,EAAE,CAAA;IACzB,CAAC;IAnDD;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;gEAA6C;IAFlE,mBAAmB;QAJ/B,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,EAAE;SACpE,CAAC;QACF,aAAa;OACA,mBAAmB,CAsD/B;IAAD,0BAAC;CAAA,AAtDD,IAsDC;AAtDY,kDAAmB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
2
|
+
import { ICommandHandler } from '../../command/interface';
|
|
3
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
4
|
+
import type { IHooks } from '../../hooks/interface';
|
|
5
|
+
type ICommand = ICommandHandler<NsGraphFullscreen.IArgs, NsGraphFullscreen.IResult, NsGraphFullscreen.ICmdHooks>;
|
|
6
|
+
export declare namespace NsGraphFullscreen {
|
|
7
|
+
/** Command: 用于注册named factory */
|
|
8
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
9
|
+
/** hook 参数类型 */
|
|
10
|
+
interface IArgs extends IArgsBase {
|
|
11
|
+
}
|
|
12
|
+
/** hook handler 返回类型 */
|
|
13
|
+
interface IResult {
|
|
14
|
+
fulllscreen: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** hookName */
|
|
17
|
+
const hookKey = "graphFullscreen";
|
|
18
|
+
/** hooks 类型 */
|
|
19
|
+
interface ICmdHooks extends IHooks {
|
|
20
|
+
graphFullscreen: HookHub<IArgs, IResult>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare class GraphFullscreenCommand implements ICommand {
|
|
24
|
+
/** api */
|
|
25
|
+
contextProvider: ICommand['contextProvider'];
|
|
26
|
+
ctx: IContext<NsGraphFullscreen.IArgs, NsGraphFullscreen.IResult, NsGraphFullscreen.ICmdHooks>;
|
|
27
|
+
init(): void;
|
|
28
|
+
/** 执行Cmd */
|
|
29
|
+
execute: () => Promise<this>;
|
|
30
|
+
/** undo cmd */
|
|
31
|
+
undo: () => Promise<this>;
|
|
32
|
+
/** redo cmd */
|
|
33
|
+
redo: () => Promise<this>;
|
|
34
|
+
/** isUndoable */
|
|
35
|
+
isUndoable(): boolean;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphFullscreenCommand = exports.NsGraphFullscreen = 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 NsGraphFullscreen;
|
|
9
|
+
(function (NsGraphFullscreen) {
|
|
10
|
+
/** Command: 用于注册named factory */
|
|
11
|
+
NsGraphFullscreen.command = constant_1.XFlowGraphCommands.GRAPH_FULLSCREEN;
|
|
12
|
+
/** hookName */
|
|
13
|
+
NsGraphFullscreen.hookKey = 'graphFullscreen';
|
|
14
|
+
})(NsGraphFullscreen = exports.NsGraphFullscreen || (exports.NsGraphFullscreen = {}));
|
|
15
|
+
var GraphFullscreenCommand = /** @class */ (function () {
|
|
16
|
+
/** 画布Fullscreen命令 */
|
|
17
|
+
function GraphFullscreenCommand() {
|
|
18
|
+
var _this = this;
|
|
19
|
+
/** 执行Cmd */
|
|
20
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
21
|
+
var _a, args, runtimeHook, hooks, config, appContainer, result;
|
|
22
|
+
var _this = this;
|
|
23
|
+
return tslib_1.__generator(this, function (_b) {
|
|
24
|
+
switch (_b.label) {
|
|
25
|
+
case 0:
|
|
26
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
27
|
+
hooks = this.ctx.getHooks();
|
|
28
|
+
return [4 /*yield*/, this.ctx.getGraphConfig()
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
];
|
|
31
|
+
case 1:
|
|
32
|
+
config = _b.sent();
|
|
33
|
+
appContainer = config.appContainer;
|
|
34
|
+
if (!appContainer) {
|
|
35
|
+
return [2 /*return*/];
|
|
36
|
+
}
|
|
37
|
+
return [4 /*yield*/, hooks.graphFullscreen.call(
|
|
38
|
+
/** 执行hooks pipeline处理args */
|
|
39
|
+
args,
|
|
40
|
+
/** 执行 callback */
|
|
41
|
+
function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
42
|
+
var fulllscreen;
|
|
43
|
+
var _a, _b;
|
|
44
|
+
return tslib_1.__generator(this, function (_c) {
|
|
45
|
+
fulllscreen = false;
|
|
46
|
+
if (!document.fullscreenElement) {
|
|
47
|
+
(_a = appContainer.requestFullscreen) === null || _a === void 0 ? void 0 : _a.call(appContainer);
|
|
48
|
+
fulllscreen = true;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
(_b = document.exitFullscreen) === null || _b === void 0 ? void 0 : _b.call(document);
|
|
52
|
+
}
|
|
53
|
+
return [2 /*return*/, { fulllscreen: fulllscreen }];
|
|
54
|
+
});
|
|
55
|
+
}); },
|
|
56
|
+
/** execute command 时创建的hook */
|
|
57
|
+
runtimeHook)
|
|
58
|
+
/** 设置结果 */
|
|
59
|
+
];
|
|
60
|
+
case 2:
|
|
61
|
+
result = _b.sent();
|
|
62
|
+
/** 设置结果 */
|
|
63
|
+
this.ctx.setResult(result);
|
|
64
|
+
return [2 /*return*/, this];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}); };
|
|
68
|
+
/** undo cmd */
|
|
69
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
70
|
+
return tslib_1.__generator(this, function (_a) {
|
|
71
|
+
this.ctx.undo();
|
|
72
|
+
return [2 /*return*/, this];
|
|
73
|
+
});
|
|
74
|
+
}); };
|
|
75
|
+
/** redo cmd */
|
|
76
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
77
|
+
return tslib_1.__generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
if (!!this.ctx.isUndoable) return [3 /*break*/, 2];
|
|
81
|
+
return [4 /*yield*/, this.execute()];
|
|
82
|
+
case 1:
|
|
83
|
+
_a.sent();
|
|
84
|
+
_a.label = 2;
|
|
85
|
+
case 2: return [2 /*return*/, this];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}); };
|
|
89
|
+
}
|
|
90
|
+
GraphFullscreenCommand.prototype.init = function () {
|
|
91
|
+
this.ctx = this.contextProvider();
|
|
92
|
+
};
|
|
93
|
+
/** isUndoable */
|
|
94
|
+
GraphFullscreenCommand.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
|
+
], GraphFullscreenCommand.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
|
+
], GraphFullscreenCommand.prototype, "init", null);
|
|
107
|
+
GraphFullscreenCommand = tslib_1.__decorate([
|
|
108
|
+
(0, mana_syringe_1.injectable)({
|
|
109
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphFullscreen.command.id },
|
|
110
|
+
})
|
|
111
|
+
/** 画布Fullscreen命令 */
|
|
112
|
+
], GraphFullscreenCommand);
|
|
113
|
+
return GraphFullscreenCommand;
|
|
114
|
+
}());
|
|
115
|
+
exports.GraphFullscreenCommand = GraphFullscreenCommand;
|
|
116
|
+
//# sourceMappingURL=graph-fulllscreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-fulllscreen.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-fulllscreen.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAEhE,qDAAkF;AAGlF,wCAAgD;AAQhD,IAAiB,iBAAiB,CAejC;AAfD,WAAiB,iBAAiB;IAChC,iCAAiC;IACpB,yBAAO,GAAG,6BAAkB,CAAC,gBAAgB,CAAA;IAO1D,eAAe;IACF,yBAAO,GAAG,iBAAiB,CAAA;AAK1C,CAAC,EAfgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAejC;AAMD;IADA,qBAAqB;IACrB;QAAA,iBA+DC;QApDC,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;wBAClB,qBAAM,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE;4BAE9C,aAAa;0BAFiC;;wBAAxC,MAAM,GAAG,SAA+B;wBAGtC,YAAY,GAAK,MAAM,aAAX,CAAW;wBAC/B,IAAI,CAAC,YAAY,EAAE;4BACjB,sBAAM;yBACP;wBACc,qBAAM,KAAK,CAAC,eAAe,CAAC,IAAI;4BAC7C,6BAA6B;4BAC7B,IAAI;4BACJ,kBAAkB;4BAClB;;;;oCACM,WAAW,GAAG,KAAK,CA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,sBAAsB,CA+DlC;IAAD,6BAAC;CAAA,AA/DD,IA+DC;AA/DY,wDAAsB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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<NsGraphHistoryRedo.IArgs, NsGraphHistoryRedo.IResult, NsGraphHistoryRedo.ICmdHooks>;
|
|
6
|
+
export declare namespace NsGraphHistoryRedo {
|
|
7
|
+
/** Command: 用于注册named factory */
|
|
8
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
9
|
+
/** hookName */
|
|
10
|
+
const hookKey = "historyRedo";
|
|
11
|
+
/** hook 参数类型 */
|
|
12
|
+
type IArgs = IArgsBase;
|
|
13
|
+
/** hook handler 返回类型 */
|
|
14
|
+
interface IResult {
|
|
15
|
+
err: null | string;
|
|
16
|
+
}
|
|
17
|
+
/** hooks 类型 */
|
|
18
|
+
interface ICmdHooks extends IHooks {
|
|
19
|
+
historyRedo: HookHub<IArgs, IResult>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export declare class GraphHistoryRedoCommand implements ICommand {
|
|
23
|
+
/** api */
|
|
24
|
+
contextProvider: ICommand['contextProvider'];
|
|
25
|
+
/** 执行Cmd */
|
|
26
|
+
execute: () => Promise<this>;
|
|
27
|
+
/** undo cmd */
|
|
28
|
+
undo: () => Promise<this>;
|
|
29
|
+
/** redo cmd */
|
|
30
|
+
redo: () => Promise<this>;
|
|
31
|
+
isUndoable(): boolean;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphHistoryRedoCommand = exports.NsGraphHistoryRedo = 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 NsGraphHistoryRedo;
|
|
10
|
+
(function (NsGraphHistoryRedo) {
|
|
11
|
+
/** Command: 用于注册named factory */
|
|
12
|
+
NsGraphHistoryRedo.command = constant_1.XFlowGraphCommands.GRAPH_HISTORY_REDO;
|
|
13
|
+
/** hookName */
|
|
14
|
+
NsGraphHistoryRedo.hookKey = 'historyRedo';
|
|
15
|
+
})(NsGraphHistoryRedo = exports.NsGraphHistoryRedo || (exports.NsGraphHistoryRedo = {}));
|
|
16
|
+
var GraphHistoryRedoCommand = /** @class */ (function () {
|
|
17
|
+
/** 创建节点命令 */
|
|
18
|
+
function GraphHistoryRedoCommand() {
|
|
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.historyRedo.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.redo();
|
|
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_UNDO.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
|
+
GraphHistoryRedoCommand.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
|
+
], GraphHistoryRedoCommand.prototype, "contextProvider", void 0);
|
|
97
|
+
GraphHistoryRedoCommand = tslib_1.__decorate([
|
|
98
|
+
(0, mana_syringe_1.injectable)({
|
|
99
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphHistoryRedo.command.id },
|
|
100
|
+
})
|
|
101
|
+
/** 创建节点命令 */
|
|
102
|
+
], GraphHistoryRedoCommand);
|
|
103
|
+
return GraphHistoryRedoCommand;
|
|
104
|
+
}());
|
|
105
|
+
exports.GraphHistoryRedoCommand = GraphHistoryRedoCommand;
|
|
106
|
+
//# sourceMappingURL=graph-history-redo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-history-redo.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-history-redo.ts"],"names":[],"mappings":";;;;AAAA,6CAAiD;AAIjD,qDAAkF;AAClF,wCAAgD;AAChD,sDAAoD;AAQpD,IAAiB,kBAAkB,CAelC;AAfD,WAAiB,kBAAkB;IACjC,iCAAiC;IACpB,0BAAO,GAAG,6BAAkB,CAAC,kBAAkB,CAAA;IAC5D,eAAe;IACF,0BAAO,GAAG,aAAa,CAAA;AAWtC,CAAC,EAfgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAelC;AAMD;IADA,aAAa;IACb;QAAA,iBAuDC;QAnDC,YAAY;QACZ,YAAO,GAAG;;;;;;wBACF,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;wBAC5B,KAA+B,GAAG,CAAC,OAAO,EAAE,E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AAU,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,aAAa;OACA,uBAAuB,CAuDnC;IAAD,8BAAC;CAAA,AAvDD,IAuDC;AAvDY,0DAAuB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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<NsGraphHistoryReset.IArgs, NsGraphHistoryReset.IResult, NsGraphHistoryReset.ICmdHooks>;
|
|
6
|
+
export declare namespace NsGraphHistoryReset {
|
|
7
|
+
/** Command: 用于注册named factory */
|
|
8
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
9
|
+
/** hookName */
|
|
10
|
+
const hookKey = "historyReset";
|
|
11
|
+
/** hook 参数类型 */
|
|
12
|
+
type IArgs = IArgsBase;
|
|
13
|
+
/** hook handler 返回类型 */
|
|
14
|
+
interface IResult {
|
|
15
|
+
err: null | string;
|
|
16
|
+
}
|
|
17
|
+
/** hooks 类型 */
|
|
18
|
+
interface ICmdHooks extends IHooks {
|
|
19
|
+
historyReset: HookHub<IArgs, IResult>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export declare class GraphHistoryResetCommand implements ICommand {
|
|
23
|
+
/** api */
|
|
24
|
+
contextProvider: ICommand['contextProvider'];
|
|
25
|
+
/** 执行Cmd */
|
|
26
|
+
execute: () => Promise<this>;
|
|
27
|
+
/** undo cmd */
|
|
28
|
+
undo: () => Promise<this>;
|
|
29
|
+
/** redo cmd */
|
|
30
|
+
redo: () => Promise<this>;
|
|
31
|
+
isUndoable(): boolean;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphHistoryResetCommand = exports.NsGraphHistoryReset = 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 NsGraphHistoryReset;
|
|
9
|
+
(function (NsGraphHistoryReset) {
|
|
10
|
+
/** Command: 用于注册named factory */
|
|
11
|
+
NsGraphHistoryReset.command = constant_1.XFlowGraphCommands.GRAPH_HISTORY_RESET;
|
|
12
|
+
/** hookName */
|
|
13
|
+
NsGraphHistoryReset.hookKey = 'historyReset';
|
|
14
|
+
})(NsGraphHistoryReset = exports.NsGraphHistoryReset || (exports.NsGraphHistoryReset = {}));
|
|
15
|
+
var GraphHistoryResetCommand = /** @class */ (function () {
|
|
16
|
+
/** 创建清理History命令 */
|
|
17
|
+
function GraphHistoryResetCommand() {
|
|
18
|
+
var _this = this;
|
|
19
|
+
/** 执行Cmd */
|
|
20
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
21
|
+
var ctx, _a, args, runtimeHook, hooks, result;
|
|
22
|
+
var _this = this;
|
|
23
|
+
return tslib_1.__generator(this, function (_b) {
|
|
24
|
+
switch (_b.label) {
|
|
25
|
+
case 0:
|
|
26
|
+
ctx = this.contextProvider();
|
|
27
|
+
_a = ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
28
|
+
hooks = ctx.getHooks();
|
|
29
|
+
return [4 /*yield*/, hooks.historyReset.call(args, function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
30
|
+
var graph;
|
|
31
|
+
return tslib_1.__generator(this, function (_a) {
|
|
32
|
+
switch (_a.label) {
|
|
33
|
+
case 0: return [4 /*yield*/, ctx.getX6Graph()];
|
|
34
|
+
case 1:
|
|
35
|
+
graph = _a.sent();
|
|
36
|
+
graph.cleanHistory();
|
|
37
|
+
return [2 /*return*/, { err: null }];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}); }, runtimeHook)];
|
|
41
|
+
case 1:
|
|
42
|
+
result = _b.sent();
|
|
43
|
+
ctx.setResult(result);
|
|
44
|
+
return [2 /*return*/, this];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}); };
|
|
48
|
+
/** undo cmd */
|
|
49
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
50
|
+
var ctx;
|
|
51
|
+
return tslib_1.__generator(this, function (_a) {
|
|
52
|
+
ctx = this.contextProvider();
|
|
53
|
+
if (this.isUndoable()) {
|
|
54
|
+
ctx.undo();
|
|
55
|
+
}
|
|
56
|
+
return [2 /*return*/, this];
|
|
57
|
+
});
|
|
58
|
+
}); };
|
|
59
|
+
/** redo cmd */
|
|
60
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
61
|
+
return tslib_1.__generator(this, function (_a) {
|
|
62
|
+
switch (_a.label) {
|
|
63
|
+
case 0:
|
|
64
|
+
if (!!this.isUndoable()) return [3 /*break*/, 2];
|
|
65
|
+
return [4 /*yield*/, this.execute()];
|
|
66
|
+
case 1:
|
|
67
|
+
_a.sent();
|
|
68
|
+
_a.label = 2;
|
|
69
|
+
case 2: return [2 /*return*/, this];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}); };
|
|
73
|
+
}
|
|
74
|
+
GraphHistoryResetCommand.prototype.isUndoable = function () {
|
|
75
|
+
var ctx = this.contextProvider();
|
|
76
|
+
return ctx.isUndoable();
|
|
77
|
+
};
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
80
|
+
tslib_1.__metadata("design:type", Object)
|
|
81
|
+
], GraphHistoryResetCommand.prototype, "contextProvider", void 0);
|
|
82
|
+
GraphHistoryResetCommand = tslib_1.__decorate([
|
|
83
|
+
(0, mana_syringe_1.injectable)({
|
|
84
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphHistoryReset.command.id },
|
|
85
|
+
})
|
|
86
|
+
/** 创建清理History命令 */
|
|
87
|
+
], GraphHistoryResetCommand);
|
|
88
|
+
return GraphHistoryResetCommand;
|
|
89
|
+
}());
|
|
90
|
+
exports.GraphHistoryResetCommand = GraphHistoryResetCommand;
|
|
91
|
+
//# sourceMappingURL=graph-history-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-history-reset.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-history-reset.ts"],"names":[],"mappings":";;;;AAAA,6CAAiD;AAIjD,qDAAkF;AAClF,wCAAgD;AAQhD,IAAiB,mBAAmB,CAenC;AAfD,WAAiB,mBAAmB;IAClC,iCAAiC;IACpB,2BAAO,GAAG,6BAAkB,CAAC,mBAAmB,CAAA;IAC7D,eAAe;IACF,2BAAO,GAAG,cAAc,CAAA;AAWvC,CAAC,EAfgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAenC;AAMD;IADA,oBAAoB;IACpB;QAAA,iBA2CC;QAvCC,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;wBACb,qBAAM,KAAK,CAAC,YAAY,CAAC,IAAI,CAC1C,IAAI,EACJ;;;;gDACgB,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interface';
|
|
3
|
+
import type { IArgsBase } from '../../command/interface';
|
|
4
|
+
import { ICommandHandler } from '../../command/interface';
|
|
5
|
+
type ICommand = ICommandHandler<NsGraphHistoryToggle.IArgs, NsGraphHistoryToggle.IResult, NsGraphHistoryToggle.ICmdHooks>;
|
|
6
|
+
export declare namespace NsGraphHistoryToggle {
|
|
7
|
+
/** Command: 用于注册named factory */
|
|
8
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
9
|
+
/** hookName */
|
|
10
|
+
const hookKey = "historyToggle";
|
|
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
|
+
historyToggle: HookHub<IArgs, IResult>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class GraphHistoryToggleCommand 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 {};
|