@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,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphMetaCommand = exports.NsGraphMeta = 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 model_service_1 = require("../../model-service");
|
|
9
|
+
var NsGraphMeta;
|
|
10
|
+
(function (NsGraphMeta) {
|
|
11
|
+
/** Command Id: 用于注册named factory */
|
|
12
|
+
NsGraphMeta.command = constant_1.XFlowGraphCommands.LOAD_META;
|
|
13
|
+
/** hookName */
|
|
14
|
+
NsGraphMeta.hookKey = 'graphMeta';
|
|
15
|
+
})(NsGraphMeta = exports.NsGraphMeta || (exports.NsGraphMeta = {}));
|
|
16
|
+
var GraphMetaCommand = /** @class */ (function () {
|
|
17
|
+
/** 创建节点命令 */
|
|
18
|
+
function GraphMetaCommand() {
|
|
19
|
+
var _this = this;
|
|
20
|
+
/** 执行Cmd */
|
|
21
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
22
|
+
var _a, args, runtimeHook, hooks, result, modelService, model;
|
|
23
|
+
var _this = this;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
switch (_b.label) {
|
|
26
|
+
case 0:
|
|
27
|
+
_a = this.ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
28
|
+
hooks = this.ctx.getHooks();
|
|
29
|
+
return [4 /*yield*/, hooks.graphMeta.call(
|
|
30
|
+
/** 执行hooks pipeline处理args */
|
|
31
|
+
args,
|
|
32
|
+
/** 执行 callback */
|
|
33
|
+
function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
34
|
+
var graphMetaService, meta, _a;
|
|
35
|
+
return tslib_1.__generator(this, function (_b) {
|
|
36
|
+
switch (_b.label) {
|
|
37
|
+
case 0:
|
|
38
|
+
graphMetaService = handlerArgs.graphMetaService;
|
|
39
|
+
if (!graphMetaService) return [3 /*break*/, 2];
|
|
40
|
+
return [4 /*yield*/, graphMetaService(handlerArgs)];
|
|
41
|
+
case 1:
|
|
42
|
+
_a = _b.sent();
|
|
43
|
+
return [3 /*break*/, 3];
|
|
44
|
+
case 2:
|
|
45
|
+
_a = tslib_1.__assign({}, handlerArgs === null || handlerArgs === void 0 ? void 0 : handlerArgs.meta);
|
|
46
|
+
_b.label = 3;
|
|
47
|
+
case 3:
|
|
48
|
+
meta = _a;
|
|
49
|
+
return [2 /*return*/, tslib_1.__assign({ flowId: meta === null || meta === void 0 ? void 0 : meta.flowId }, meta)];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}); },
|
|
53
|
+
/** 外部的 hook */
|
|
54
|
+
runtimeHook)];
|
|
55
|
+
case 1:
|
|
56
|
+
result = _b.sent();
|
|
57
|
+
modelService = this.ctx.getModelService();
|
|
58
|
+
return [4 /*yield*/, model_service_1.MODELS.GRAPH_META.getModel(modelService)];
|
|
59
|
+
case 2:
|
|
60
|
+
model = _b.sent();
|
|
61
|
+
model.setValue(result);
|
|
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
|
+
GraphMetaCommand.prototype.init = function () {
|
|
91
|
+
this.ctx = this.contextProvider();
|
|
92
|
+
};
|
|
93
|
+
/** isUndoable */
|
|
94
|
+
GraphMetaCommand.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
|
+
], GraphMetaCommand.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
|
+
], GraphMetaCommand.prototype, "init", null);
|
|
107
|
+
GraphMetaCommand = tslib_1.__decorate([
|
|
108
|
+
(0, mana_syringe_1.injectable)({
|
|
109
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphMeta.command.id },
|
|
110
|
+
})
|
|
111
|
+
/** 创建节点命令 */
|
|
112
|
+
], GraphMetaCommand);
|
|
113
|
+
return GraphMetaCommand;
|
|
114
|
+
}());
|
|
115
|
+
exports.GraphMetaCommand = GraphMetaCommand;
|
|
116
|
+
//# sourceMappingURL=graph-meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-meta.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-meta.ts"],"names":[],"mappings":";;;;AAAA,6CAAgE;AAGhE,qDAAkF;AAIlF,wCAAgD;AAChD,qDAA4C;AAI5C,IAAiB,WAAW,CAsB3B;AAtBD,WAAiB,WAAW;IAC1B,oCAAoC;IACvB,mBAAO,GAAG,6BAAkB,CAAC,SAAS,CAAA;IACnD,eAAe;IACF,mBAAO,GAAG,WAAW,CAAA;AAkBpC,CAAC,EAtBgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAsB3B;AAMD;IADA,aAAa;IACb;QAAA,iBA0DC;QA/CC,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,KAAK,CAAC,SAAS,CAAC,IAAI;4BACvC,6BAA6B;4BAC7B,IAAI;4BACJ,kBAAkB;4BAClB,UAAM,WAAW;;;;;4CACP,gBAAgB,GAAK,WAAW,iBAAhB,CAAgB;iDAC3B,gBAAgB,EAAhB,wBAAgB;4CACzB,qBAAM,gBAAgB,CAAC,WAAW,CAAC,EAAA;;4CAAnC,KAAA,SAAmC,CAAA;;;sEAC9B,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI;;;4CAFpB,IAAI,KAEkB;4CAC5B,yCAAS,MAAM,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,IAAK,IAAI,GAAE;;;iCACzC;4BACD,eAAe;4BACf,WAAW,CACZ,EAAA;;wBAbK,MAAM,GAA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HookHub } from '@sunspirytus/xflow-hook';
|
|
2
|
+
import type { NsGraph } from '../../interface';
|
|
3
|
+
import type { IHooks } from '../../hooks/interface';
|
|
4
|
+
import type { IArgsBase } from '../../command/interface';
|
|
5
|
+
import { ICommandHandler } from '../../command/interface';
|
|
6
|
+
import { GraphMappingHelper } from '../mapping-service';
|
|
7
|
+
type ICommand = ICommandHandler<NsGraphPasteSelection.IArgs, NsGraphPasteSelection.IResult, NsGraphPasteSelection.ICmdHooks>;
|
|
8
|
+
export declare namespace NsGraphPasteSelection {
|
|
9
|
+
/** Command: 用于注册named factory */
|
|
10
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
11
|
+
/** hookName */
|
|
12
|
+
const hookKey = "graphPasteSelection";
|
|
13
|
+
/** hook 参数类型 */
|
|
14
|
+
interface IArgs extends IArgsBase {
|
|
15
|
+
position?: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
collapsedSize?: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** hook handler 返回类型 */
|
|
25
|
+
interface IResult {
|
|
26
|
+
err: null | string;
|
|
27
|
+
}
|
|
28
|
+
/** hooks 类型 */
|
|
29
|
+
interface ICmdHooks extends IHooks {
|
|
30
|
+
graphPasteSelection: HookHub<IArgs, IResult>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export declare class GraphPasteSelectionCommand implements ICommand {
|
|
34
|
+
/** 防止多次执行 */
|
|
35
|
+
static doing: boolean;
|
|
36
|
+
/** api */
|
|
37
|
+
contextProvider: ICommand['contextProvider'];
|
|
38
|
+
/** mapping */
|
|
39
|
+
mappingHelper: GraphMappingHelper;
|
|
40
|
+
updateNodeCopiedProps: (position: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
}, nodeConfig: NsGraph.INodeConfig) => NsGraph.INodeConfig;
|
|
44
|
+
/** 执行Cmd */
|
|
45
|
+
execute: () => Promise<this>;
|
|
46
|
+
/** undo cmd */
|
|
47
|
+
undo: () => Promise<this>;
|
|
48
|
+
/** redo cmd */
|
|
49
|
+
redo: () => Promise<this>;
|
|
50
|
+
isUndoable(): boolean;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphPasteSelectionCommand = exports.NsGraphPasteSelection = 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 constants_1 = require("../../constants");
|
|
10
|
+
var safe_json_1 = require("../../common/safe-json");
|
|
11
|
+
var mapping_service_1 = require("../mapping-service");
|
|
12
|
+
var NsGraphPasteSelection;
|
|
13
|
+
(function (NsGraphPasteSelection) {
|
|
14
|
+
/** Command: 用于注册named factory */
|
|
15
|
+
NsGraphPasteSelection.command = constant_1.XFlowGraphCommands.GRAPH_PASTE;
|
|
16
|
+
/** hookName */
|
|
17
|
+
NsGraphPasteSelection.hookKey = 'graphPasteSelection';
|
|
18
|
+
})(NsGraphPasteSelection = exports.NsGraphPasteSelection || (exports.NsGraphPasteSelection = {}));
|
|
19
|
+
function randomNumber(max, min) {
|
|
20
|
+
if (min === void 0) { min = 0; }
|
|
21
|
+
return Math.floor(Math.random() * (max - min) + min);
|
|
22
|
+
}
|
|
23
|
+
var GraphPasteSelectionCommand = /** @class */ (function () {
|
|
24
|
+
/** 创建节点命令 */
|
|
25
|
+
function GraphPasteSelectionCommand() {
|
|
26
|
+
var _this = this;
|
|
27
|
+
this.updateNodeCopiedProps = function (position, nodeConfig) {
|
|
28
|
+
var dx = randomNumber(100);
|
|
29
|
+
var dy = randomNumber(100);
|
|
30
|
+
if (position) {
|
|
31
|
+
dx = nodeConfig.x - position.x + randomNumber(30);
|
|
32
|
+
dy = nodeConfig.y - position.y + randomNumber(30);
|
|
33
|
+
}
|
|
34
|
+
// 修改坐标
|
|
35
|
+
nodeConfig.x += dx;
|
|
36
|
+
nodeConfig.y += dy;
|
|
37
|
+
// 删除 id
|
|
38
|
+
nodeConfig.originId = nodeConfig.id;
|
|
39
|
+
delete nodeConfig.id;
|
|
40
|
+
// 修改label
|
|
41
|
+
nodeConfig.label = "".concat(nodeConfig.label, "_copied");
|
|
42
|
+
nodeConfig.isCollapsed = false;
|
|
43
|
+
return nodeConfig;
|
|
44
|
+
};
|
|
45
|
+
/** 执行Cmd */
|
|
46
|
+
this.execute = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
47
|
+
var ctx, _a, args, runtimeHook, hooks, result;
|
|
48
|
+
var _this = this;
|
|
49
|
+
return tslib_1.__generator(this, function (_b) {
|
|
50
|
+
switch (_b.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
ctx = this.contextProvider();
|
|
53
|
+
_a = ctx.getArgs(), args = _a.args, runtimeHook = _a.hooks;
|
|
54
|
+
hooks = ctx.getHooks();
|
|
55
|
+
if (GraphPasteSelectionCommand_1.doing) {
|
|
56
|
+
return [2 /*return*/, this];
|
|
57
|
+
}
|
|
58
|
+
GraphPasteSelectionCommand_1.doing = true;
|
|
59
|
+
return [4 /*yield*/, hooks.graphPasteSelection.call(args, function (handlerArgs) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
60
|
+
var commandService, position, jsonString, plainObject, _a, nodes, _b, edges, _c, normalNodes, groupNodes;
|
|
61
|
+
var _this = this;
|
|
62
|
+
return tslib_1.__generator(this, function (_d) {
|
|
63
|
+
switch (_d.label) {
|
|
64
|
+
case 0:
|
|
65
|
+
commandService = handlerArgs.commandService, position = handlerArgs.position;
|
|
66
|
+
jsonString = window.localStorage.getItem(constants_1.LOCAL_STORAGE_KEY);
|
|
67
|
+
plainObject = (0, safe_json_1.safeJson)(jsonString, {
|
|
68
|
+
nodes: [],
|
|
69
|
+
edges: [],
|
|
70
|
+
});
|
|
71
|
+
_a = plainObject.nodes, nodes = _a === void 0 ? [] : _a, _b = plainObject.edges, edges = _b === void 0 ? [] : _b;
|
|
72
|
+
_c = this.mappingHelper.getNodesByType(nodes), normalNodes = _c.normalNodes, groupNodes = _c.groupNodes;
|
|
73
|
+
this.mappingHelper.addNodes(nodes);
|
|
74
|
+
// 添加普通节点
|
|
75
|
+
return [4 /*yield*/, Promise.all(normalNodes.map(function (nodeConfig) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
76
|
+
var res, context, cmdResult;
|
|
77
|
+
return tslib_1.__generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowNodeCommands.ADD_NODE.id, {
|
|
80
|
+
nodeConfig: this.updateNodeCopiedProps(position, nodeConfig),
|
|
81
|
+
})];
|
|
82
|
+
case 1:
|
|
83
|
+
res = _a.sent();
|
|
84
|
+
context = res.contextProvider();
|
|
85
|
+
cmdResult = context.getResult();
|
|
86
|
+
this.mappingHelper.buildNodeMapping(nodeConfig, cmdResult.nodeConfig);
|
|
87
|
+
return [2 /*return*/];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}); }))
|
|
91
|
+
// 处理group
|
|
92
|
+
];
|
|
93
|
+
case 1:
|
|
94
|
+
// 添加普通节点
|
|
95
|
+
_d.sent();
|
|
96
|
+
// 处理group
|
|
97
|
+
return [4 /*yield*/, Promise.all(groupNodes.map(function (group) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
98
|
+
var groupNodeConfig;
|
|
99
|
+
return tslib_1.__generator(this, function (_a) {
|
|
100
|
+
switch (_a.label) {
|
|
101
|
+
case 0:
|
|
102
|
+
groupNodeConfig = this.mappingHelper.buildGroupRelations(group);
|
|
103
|
+
return [4 /*yield*/, commandService.executeCommand(constant_1.XFlowGroupCommands.ADD_GROUP.id, {
|
|
104
|
+
nodeConfig: this.updateNodeCopiedProps(position, groupNodeConfig),
|
|
105
|
+
})];
|
|
106
|
+
case 1:
|
|
107
|
+
_a.sent();
|
|
108
|
+
return [2 /*return*/];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}); }))
|
|
112
|
+
// 处理连线
|
|
113
|
+
];
|
|
114
|
+
case 2:
|
|
115
|
+
// 处理group
|
|
116
|
+
_d.sent();
|
|
117
|
+
// 处理连线
|
|
118
|
+
return [4 /*yield*/, Promise.all(edges.map(function (edgeConfig) {
|
|
119
|
+
var newEdge = _this.mappingHelper.createEdgeBetweenNodes(edgeConfig);
|
|
120
|
+
return commandService.executeCommand(constant_1.XFlowEdgeCommands.ADD_EDGE.id, {
|
|
121
|
+
edgeConfig: newEdge,
|
|
122
|
+
});
|
|
123
|
+
}))];
|
|
124
|
+
case 3:
|
|
125
|
+
// 处理连线
|
|
126
|
+
_d.sent();
|
|
127
|
+
ctx.addUndo(disposable_1.Disposable.create(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
128
|
+
return tslib_1.__generator(this, function (_a) {
|
|
129
|
+
window.localStorage.setItem(constants_1.LOCAL_STORAGE_KEY, null);
|
|
130
|
+
return [2 /*return*/];
|
|
131
|
+
});
|
|
132
|
+
}); }));
|
|
133
|
+
return [2 /*return*/, { err: null }];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}); }, runtimeHook)];
|
|
137
|
+
case 1:
|
|
138
|
+
result = _b.sent();
|
|
139
|
+
ctx.setResult(result);
|
|
140
|
+
GraphPasteSelectionCommand_1.doing = false;
|
|
141
|
+
return [2 /*return*/, this];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}); };
|
|
145
|
+
/** undo cmd */
|
|
146
|
+
this.undo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
147
|
+
var ctx;
|
|
148
|
+
return tslib_1.__generator(this, function (_a) {
|
|
149
|
+
ctx = this.contextProvider();
|
|
150
|
+
if (this.isUndoable()) {
|
|
151
|
+
ctx.undo();
|
|
152
|
+
}
|
|
153
|
+
return [2 /*return*/, this];
|
|
154
|
+
});
|
|
155
|
+
}); };
|
|
156
|
+
/** redo cmd */
|
|
157
|
+
this.redo = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
158
|
+
return tslib_1.__generator(this, function (_a) {
|
|
159
|
+
switch (_a.label) {
|
|
160
|
+
case 0:
|
|
161
|
+
if (!!this.isUndoable()) return [3 /*break*/, 2];
|
|
162
|
+
return [4 /*yield*/, this.execute()];
|
|
163
|
+
case 1:
|
|
164
|
+
_a.sent();
|
|
165
|
+
_a.label = 2;
|
|
166
|
+
case 2: return [2 /*return*/, this];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}); };
|
|
170
|
+
}
|
|
171
|
+
GraphPasteSelectionCommand_1 = GraphPasteSelectionCommand;
|
|
172
|
+
GraphPasteSelectionCommand.prototype.isUndoable = function () {
|
|
173
|
+
var ctx = this.contextProvider();
|
|
174
|
+
return ctx.isUndoable();
|
|
175
|
+
};
|
|
176
|
+
var GraphPasteSelectionCommand_1;
|
|
177
|
+
/** 防止多次执行 */
|
|
178
|
+
GraphPasteSelectionCommand.doing = false;
|
|
179
|
+
tslib_1.__decorate([
|
|
180
|
+
(0, mana_syringe_1.inject)(interface_1.ICommandContextProvider),
|
|
181
|
+
tslib_1.__metadata("design:type", Object)
|
|
182
|
+
], GraphPasteSelectionCommand.prototype, "contextProvider", void 0);
|
|
183
|
+
tslib_1.__decorate([
|
|
184
|
+
(0, mana_syringe_1.inject)(mapping_service_1.GraphMappingHelper),
|
|
185
|
+
tslib_1.__metadata("design:type", mapping_service_1.GraphMappingHelper)
|
|
186
|
+
], GraphPasteSelectionCommand.prototype, "mappingHelper", void 0);
|
|
187
|
+
GraphPasteSelectionCommand = GraphPasteSelectionCommand_1 = tslib_1.__decorate([
|
|
188
|
+
(0, mana_syringe_1.injectable)({
|
|
189
|
+
token: { token: interface_1.ICommandHandler, named: NsGraphPasteSelection.command.id },
|
|
190
|
+
})
|
|
191
|
+
/** 创建节点命令 */
|
|
192
|
+
], GraphPasteSelectionCommand);
|
|
193
|
+
return GraphPasteSelectionCommand;
|
|
194
|
+
}());
|
|
195
|
+
exports.GraphPasteSelectionCommand = GraphPasteSelectionCommand;
|
|
196
|
+
//# sourceMappingURL=graph-paste.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-paste.js","sourceRoot":"","sources":["../../../src/command-contributions/graph/graph-paste.ts"],"names":[],"mappings":";;;;AAKA,6CAAiD;AACjD,qDAAkF;AAClF,wCAKoB;AACpB,sDAAoD;AACpD,6CAAmD;AACnD,oDAAiD;AACjD,sDAAuD;AAQvD,IAAiB,qBAAqB,CAwBrC;AAxBD,WAAiB,qBAAqB;IACpC,iCAAiC;IACpB,6BAAO,GAAG,6BAAkB,CAAC,WAAW,CAAA;IACrD,eAAe;IACF,6BAAO,GAAG,qBAAqB,CAAA;AAoB9C,CAAC,EAxBgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAwBrC;AAED,SAAS,YAAY,CAAC,GAAG,EAAE,GAAO;IAAP,oBAAA,EAAA,OAAO;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;AACtD,CAAC;AAMD;IADA,aAAa;IACb;QAAA,iBAqIC;QA3HC,0BAAqB,GAAG,UAAC,QAAkC,EAAE,UAA+B;YAC1F,IAAI,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC1B,IAAI,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC1B,IAAI,QAAQ,EAAE;gBACZ,EAAE,GAAG,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,YAAY,CAAC,EA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C,OAAO,GAAG,CAAC,UAAU,EAAE,CAAA;IACzB,CAAC;;IAnID,aAAa;IACN,gCAAK,GAAG,KAAK,CAAA;IAGpB;QAAC,IAAA,qBAAM,EAAC,mCAAuB,CAAC;;uEAA6C;IAG7E;QAAC,IAAA,qBAAM,EAAC,oCAAkB,CAAC;0CAAgB,oCAAkB;qEAAA;IARlD,0BAA0B;QAJtC,IAAA,yBAAU,EAAC;YACV,KAAK,EAAE,EAAE,KAAK,EAAE,2BAAe,EAAE,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,EAAE;SAC3E,CAAC;QACF,aAAa;OACA,0BAA0B,CAqItC;IAAD,iCAAC;CAAA,AArID,IAqIC;AArIY,gEAA0B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HookHub } from '@sunspirytus/xflow-hook';
|
|
2
|
+
import type { NsGraph } from '../../interface';
|
|
3
|
+
import type { IHooks } from '../../hooks/interface';
|
|
4
|
+
import type { IContext, IArgsBase } from '../../command/interface';
|
|
5
|
+
import { ICommandHandler } from '../../command/interface';
|
|
6
|
+
type ICommand = ICommandHandler<NsGraphRender.IArgs, NsGraphRender.IResult, NsGraphRender.ICmdHooks>;
|
|
7
|
+
export declare namespace NsGraphUtils {
|
|
8
|
+
function isNodeEqual(curNodeConfig: NsGraph.INodeConfig, nextNodeConfig: NsGraph.INodeConfig): any;
|
|
9
|
+
function isEdgeEqual(curEdgeConfig: NsGraph.IEdgeConfig, nextEdgeConfig: NsGraph.IEdgeConfig): any;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace NsGraphRender {
|
|
12
|
+
/** Command: 用于注册named factory */
|
|
13
|
+
const command: import("../../command/interface").IGraphCommand;
|
|
14
|
+
/** hookName */
|
|
15
|
+
const hookKey = "graphRender";
|
|
16
|
+
interface IArgs extends IArgsBase {
|
|
17
|
+
/** 画布渲染之前的钩子(比如从服务端获取数据、对数据做布局处理等) */
|
|
18
|
+
beforeRender?: (graphMeta?: NsGraph.IGraphMeta) => Promise<NsGraph.IGraphData>;
|
|
19
|
+
/** 画布渲染完成之后的钩子 */
|
|
20
|
+
afterRender?: (graphData: NsGraph.IGraphData, graphMeta?: NsGraph.IGraphMeta) => Promise<any> | undefined;
|
|
21
|
+
/** 画布渲染数据(nodes、edges) */
|
|
22
|
+
graphData: NsGraph.IGraphData;
|
|
23
|
+
/** 用户自定义方法判断节点内容是否相等 */
|
|
24
|
+
isNodeEqual?: (curNodeConfig: NsGraph.INodeConfig, nextNodeConfig: NsGraph.INodeConfig) => boolean;
|
|
25
|
+
/** 用户自定义方法判断边内容是否相等 */
|
|
26
|
+
isEdgeEqual?: (curEdgeConfig: NsGraph.IEdgeConfig, nextEdgeConfig: NsGraph.IEdgeConfig) => boolean;
|
|
27
|
+
}
|
|
28
|
+
interface IResult {
|
|
29
|
+
}
|
|
30
|
+
/** hooks 类型 */
|
|
31
|
+
interface ICmdHooks extends IHooks {
|
|
32
|
+
graphRender: HookHub<IArgs, IResult>;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export declare class GraphRenderCommand implements ICommand {
|
|
36
|
+
contextProvider: ICommand['contextProvider'];
|
|
37
|
+
ctx: IContext<NsGraphRender.IArgs, NsGraphRender.IResult, NsGraphRender.ICmdHooks>;
|
|
38
|
+
init(): void;
|
|
39
|
+
execute: () => Promise<this>;
|
|
40
|
+
undo: () => Promise<this>;
|
|
41
|
+
redo: () => Promise<this>;
|
|
42
|
+
isUndoable(): boolean;
|
|
43
|
+
private doLoadGraph;
|
|
44
|
+
/**
|
|
45
|
+
* 画布内容Diff
|
|
46
|
+
* @param x6Graph x6画布实例
|
|
47
|
+
* @param graphData 画布数据
|
|
48
|
+
* @param isNodeEqual 允许用户自定义判断节点是否相等
|
|
49
|
+
* @param isEdgeEqual 允许用户自定义判断边是否相等
|
|
50
|
+
*/
|
|
51
|
+
private graphDataDiff;
|
|
52
|
+
}
|
|
53
|
+
export {};
|