@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 @@
|
|
|
1
|
+
{"version":3,"file":"application-module.js","sourceRoot":"","sources":["../../src/xflow-main/application-module.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,kBAAkB,CAAA;AAEzB,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAA;AAErF,iBAAiB;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,qBAAqB;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,WAAW;AACX,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE9D,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAI5B,kBAAkB;AAClB,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE;IACtC,2CAA2C;IAC3C,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,gCAAgC,CAAC,CAAA;IACjE,6BAA6B;IAC7B,QAAQ,CAAC,mBAAmB,CAAC,CAAA;AAC/B,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAe,CAAC,cAAiC,EAAE,EAAE;IACvE,MAAM,UAAU,GAAG,cAAc,CAAC,gBAAgB,EAAE,CAAA;IACpD,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAA;IAEjC,cAAc;IACd,qBAAqB;IACrB,4BAA4B;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QACtC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QACvC,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,yBAAyB;IACzB,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC7B,iCAAiC;IACjC,SAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACrC,iCAAiC;IACjC,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IAElC;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACvB,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAC9C,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Contribution } from 'mana-syringe';
|
|
2
|
+
import type { Registry } from '@antv/x6';
|
|
3
|
+
import { Node as X6Node, Edge as X6Edge } from '@antv/x6';
|
|
4
|
+
import type { IGraphPipelineCommand } from '../command/interface';
|
|
5
|
+
import type { MaybePromise } from '../common/types';
|
|
6
|
+
import type { IRuntimeHook } from '@sunspirytus/xflow-hook/es/interface';
|
|
7
|
+
import { IGraphProvider } from '../xflow-main/graph/graph-provider';
|
|
8
|
+
import { IGraphCommandService } from '../command/interface';
|
|
9
|
+
import { IModelService } from '../model-service';
|
|
10
|
+
import { IFrontendApplicationContribution } from './interface';
|
|
11
|
+
export { IFrontendApplicationContribution } from './interface';
|
|
12
|
+
export declare class FrontendApplication {
|
|
13
|
+
/** app的扩展 */
|
|
14
|
+
protected readonly contributions: Contribution.Provider<IFrontendApplicationContribution>;
|
|
15
|
+
/** graphProvider */
|
|
16
|
+
readonly graphProvider: IGraphProvider;
|
|
17
|
+
/** commandService */
|
|
18
|
+
readonly commandService: IGraphCommandService;
|
|
19
|
+
/** modelService */
|
|
20
|
+
readonly modelService: IModelService;
|
|
21
|
+
/** 启动app */
|
|
22
|
+
start(): Promise<void>;
|
|
23
|
+
/** 获取画布实例 */
|
|
24
|
+
getGraphInstance: () => Promise<import("@antv/x6").Graph>;
|
|
25
|
+
/** 获取画布配置项 */
|
|
26
|
+
getGraphConfig: () => Promise<import("./graph").IGraphConfig>;
|
|
27
|
+
/** 获取画布配置项 */
|
|
28
|
+
getGraphData: () => Promise<{
|
|
29
|
+
nodes: import("..").NsGraph.INodeConfig[];
|
|
30
|
+
edges: import("..").NsGraph.IEdgeConfig[];
|
|
31
|
+
}>;
|
|
32
|
+
/** 获取画布所有节点 */
|
|
33
|
+
getAllNodes: () => Promise<X6Node<X6Node.Properties>[]>;
|
|
34
|
+
/** 获取画布节点 */
|
|
35
|
+
getNodeById: (nodeId: string) => Promise<X6Node<X6Node.Properties>>;
|
|
36
|
+
/** 获取画布所有连线 */
|
|
37
|
+
getAllEdges: () => Promise<X6Edge<X6Edge.Properties>[]>;
|
|
38
|
+
/** 获取画布连线 */
|
|
39
|
+
getEdgeById: (edgeId: string) => Promise<X6Edge<X6Edge.Properties>>;
|
|
40
|
+
/** 更新节点样式 */
|
|
41
|
+
updateNodeAttrs: (node: string | X6Node, attrs: Registry.Attr.CellAttrs) => Promise<void>;
|
|
42
|
+
/** 更新连线样式 */
|
|
43
|
+
updateEdgeAttrs: (edge: string | X6Edge, attrs: Registry.Attr.CellAttrs) => Promise<void>;
|
|
44
|
+
/** 平移画布 */
|
|
45
|
+
translateGraph: (tx: number, ty: number) => Promise<void>;
|
|
46
|
+
/** 暴露命令的执行接口 */
|
|
47
|
+
executeCommand<Args = any, Result = any>(commandId: string, cmdArgs: Args, hook?: IRuntimeHook<Args, Result>): Promise<import("../command/interface").ICommandHandler<Args, Result, {
|
|
48
|
+
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
49
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, React.ComponentType<import("..").NsGraph.IReactNodeProps<T>>>, Map<string, React.ComponentType<import("..").NsGraph.IReactNodeProps<T>>>>;
|
|
50
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, React.ComponentType<import("..").NsGraph.IReactEdgeProps<T_1>>>, Map<string, React.ComponentType<import("..").NsGraph.IReactEdgeProps<T_1>>>>;
|
|
51
|
+
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
52
|
+
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
53
|
+
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
54
|
+
}>>;
|
|
55
|
+
/** 暴露命令的批量执行接口 */
|
|
56
|
+
executeCommandPipeline(cmdOptions: IGraphPipelineCommand[]): Promise<import("../command/interface").ICommandHandler<any, any, {
|
|
57
|
+
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
58
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, React.ComponentType<import("..").NsGraph.IReactNodeProps<T>>>, Map<string, React.ComponentType<import("..").NsGraph.IReactNodeProps<T>>>>;
|
|
59
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, React.ComponentType<import("..").NsGraph.IReactEdgeProps<T_1>>>, Map<string, React.ComponentType<import("..").NsGraph.IReactEdgeProps<T_1>>>>;
|
|
60
|
+
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
61
|
+
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
62
|
+
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
63
|
+
}>>;
|
|
64
|
+
/**
|
|
65
|
+
* Register global event listeners.
|
|
66
|
+
*/
|
|
67
|
+
protected registerEventListeners(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Initialize and start the frontend application contributions.
|
|
70
|
+
*/
|
|
71
|
+
protected startContributions(): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Stop the frontend application contributions. This is called when the window is unloaded.
|
|
74
|
+
*/
|
|
75
|
+
protected stopContributions(): void;
|
|
76
|
+
protected measure<T>(name: string, fn: () => MaybePromise<T>): Promise<T>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { __awaiter, __decorate, __metadata } from "tslib";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
3
|
+
/* eslint-disable no-await-in-loop */
|
|
4
|
+
/* eslint-disable max-classes-per-file */
|
|
5
|
+
import { inject, singleton, contrib, Contribution } from 'mana-syringe';
|
|
6
|
+
import { Node as X6Node, Edge as X6Edge } from '@antv/x6';
|
|
7
|
+
import { IGraphProvider } from '../xflow-main/graph/graph-provider';
|
|
8
|
+
import { IGraphCommandService } from '../command/interface';
|
|
9
|
+
import { IModelService } from '../model-service';
|
|
10
|
+
import { IFrontendApplicationContribution } from './interface';
|
|
11
|
+
import { cellsToJson } from '../common/graph-utils';
|
|
12
|
+
export { IFrontendApplicationContribution } from './interface';
|
|
13
|
+
const TIMER_WARNING_THRESHOLD = 100;
|
|
14
|
+
let FrontendApplication = class FrontendApplication {
|
|
15
|
+
constructor() {
|
|
16
|
+
/** 获取画布实例 */
|
|
17
|
+
this.getGraphInstance = () => {
|
|
18
|
+
return this.graphProvider.getGraphInstance();
|
|
19
|
+
};
|
|
20
|
+
/** 获取画布配置项 */
|
|
21
|
+
this.getGraphConfig = () => {
|
|
22
|
+
return this.graphProvider.getGraphOptions();
|
|
23
|
+
};
|
|
24
|
+
/** 获取画布配置项 */
|
|
25
|
+
this.getGraphData = () => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const graph = yield this.graphProvider.getGraphInstance();
|
|
27
|
+
const cells = graph.getCells();
|
|
28
|
+
return cellsToJson(cells);
|
|
29
|
+
});
|
|
30
|
+
/** 获取画布所有节点 */
|
|
31
|
+
this.getAllNodes = () => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const graph = yield this.graphProvider.getGraphInstance();
|
|
33
|
+
return graph.getNodes();
|
|
34
|
+
});
|
|
35
|
+
/** 获取画布节点 */
|
|
36
|
+
this.getNodeById = (nodeId) => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const graph = yield this.graphProvider.getGraphInstance();
|
|
38
|
+
return graph.getCellById(nodeId);
|
|
39
|
+
});
|
|
40
|
+
/** 获取画布所有连线 */
|
|
41
|
+
this.getAllEdges = () => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const graph = yield this.graphProvider.getGraphInstance();
|
|
43
|
+
return graph.getEdges();
|
|
44
|
+
});
|
|
45
|
+
/** 获取画布连线 */
|
|
46
|
+
this.getEdgeById = (edgeId) => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const graph = yield this.graphProvider.getGraphInstance();
|
|
48
|
+
return graph.getCellById(edgeId);
|
|
49
|
+
});
|
|
50
|
+
/** 更新节点样式 */
|
|
51
|
+
this.updateNodeAttrs = (node, attrs) => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
if (node instanceof X6Node) {
|
|
53
|
+
node.setAttrs(attrs);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const x6Node = yield this.getNodeById(node);
|
|
57
|
+
x6Node.setAttrs(attrs);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
/** 更新连线样式 */
|
|
61
|
+
this.updateEdgeAttrs = (edge, attrs) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
if (edge instanceof X6Edge) {
|
|
63
|
+
edge.setAttrs(attrs);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const x6Edge = yield this.getEdgeById(edge);
|
|
67
|
+
x6Edge.setAttrs(attrs);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
/** 平移画布 */
|
|
71
|
+
this.translateGraph = (tx, ty) => __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const graph = yield this.graphProvider.getGraphInstance();
|
|
73
|
+
const currentTranslate = graph.translate();
|
|
74
|
+
graph.translate(currentTranslate.tx + tx, currentTranslate.ty + ty);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/** 启动app */
|
|
78
|
+
start() {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
yield this.startContributions();
|
|
81
|
+
this.registerEventListeners();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** 暴露命令的执行接口 */
|
|
85
|
+
executeCommand(commandId, cmdArgs, hook = []) {
|
|
86
|
+
return this.commandService.executeCommand(commandId, cmdArgs, hook);
|
|
87
|
+
}
|
|
88
|
+
/** 暴露命令的批量执行接口 */
|
|
89
|
+
executeCommandPipeline(cmdOptions) {
|
|
90
|
+
return this.commandService.executeCommandPipeline(cmdOptions);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Register global event listeners.
|
|
94
|
+
*/
|
|
95
|
+
registerEventListeners() {
|
|
96
|
+
/** 触发app的卸载逻辑 */
|
|
97
|
+
window.addEventListener('unload', () => {
|
|
98
|
+
this.stopContributions();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Initialize and start the frontend application contributions.
|
|
103
|
+
*/
|
|
104
|
+
startContributions() {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
console.log(this.contributions.getContributions());
|
|
107
|
+
for (const contribution of this.contributions.getContributions()) {
|
|
108
|
+
if (contribution.onStart) {
|
|
109
|
+
try {
|
|
110
|
+
yield this.measure(`${contribution.constructor.name}.onStart`, () => contribution.onStart(this));
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
console.error('Could not start contribution', error);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Stop the frontend application contributions. This is called when the window is unloaded.
|
|
121
|
+
*/
|
|
122
|
+
stopContributions() {
|
|
123
|
+
console.info('>>> Stopping frontend contributions...');
|
|
124
|
+
for (const contribution of this.contributions.getContributions()) {
|
|
125
|
+
if (contribution.onStop) {
|
|
126
|
+
try {
|
|
127
|
+
contribution.onStop(this);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.error('Could not stop contribution', error);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
console.info('<<< All frontend contributions have been stopped.');
|
|
135
|
+
}
|
|
136
|
+
measure(name, fn) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const startMark = `${name}-start`;
|
|
139
|
+
const endMark = `${name}-end`;
|
|
140
|
+
performance.mark(startMark);
|
|
141
|
+
const result = yield fn();
|
|
142
|
+
performance.mark(endMark);
|
|
143
|
+
performance.measure(name, startMark, endMark);
|
|
144
|
+
for (const item of performance.getEntriesByName(name)) {
|
|
145
|
+
const contribution = `Frontend ${item.name}`;
|
|
146
|
+
if (item.duration > TIMER_WARNING_THRESHOLD) {
|
|
147
|
+
console.warn(`${contribution} is slow, took: ${item.duration.toFixed(1)} ms`);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
console.debug(`${contribution} took: ${item.duration.toFixed(1)} ms`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
performance.clearMeasures(name);
|
|
154
|
+
return result;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
__decorate([
|
|
159
|
+
contrib(IFrontendApplicationContribution),
|
|
160
|
+
__metadata("design:type", Object)
|
|
161
|
+
], FrontendApplication.prototype, "contributions", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
inject(IGraphProvider),
|
|
164
|
+
__metadata("design:type", Object)
|
|
165
|
+
], FrontendApplication.prototype, "graphProvider", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
inject(IGraphCommandService),
|
|
168
|
+
__metadata("design:type", Object)
|
|
169
|
+
], FrontendApplication.prototype, "commandService", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
inject(IModelService),
|
|
172
|
+
__metadata("design:type", Object)
|
|
173
|
+
], FrontendApplication.prototype, "modelService", void 0);
|
|
174
|
+
FrontendApplication = __decorate([
|
|
175
|
+
singleton()
|
|
176
|
+
], FrontendApplication);
|
|
177
|
+
export { FrontendApplication };
|
|
178
|
+
//# sourceMappingURL=application.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/xflow-main/application.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,qCAAqC;AACrC,yCAAyC;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAIzD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;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uB;AAG9C;IAAC,MAAM,CAAC,oBAAoB,CAAC;;2DACwB;AAGrD;IAAC,MAAM,CAAC,aAAa,CAAC;;yDACsB;AAfjC,mBAAmB;IAD/B,SAAS,EAAE;GACC,mBAAmB,CAwK/B;SAxKY,mBAAmB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FrontendApplication } from '../application';
|
|
3
|
+
/** AppContext */
|
|
4
|
+
export declare const XFlowAppContext: any;
|
|
5
|
+
/** AppContext:获取 app */
|
|
6
|
+
export declare const useXFlowApp: () => any;
|
|
7
|
+
/** AppContext: 获取 appContainer */
|
|
8
|
+
export declare const useXFlowAppContainer: () => any;
|
|
9
|
+
/** XFlow内部使用 */
|
|
10
|
+
export declare const XFlowAppInternalProvider: React.FC<{
|
|
11
|
+
app: FrontendApplication;
|
|
12
|
+
}>;
|
|
13
|
+
/** XFlow外部使用 */
|
|
14
|
+
export declare const XFlowAppProvider: React.FC;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** AppContext */
|
|
3
|
+
export const XFlowAppContext = React.createContext(null);
|
|
4
|
+
XFlowAppContext.displayName = 'XFlowAppContext';
|
|
5
|
+
/** AppContext:获取 app */
|
|
6
|
+
export const useXFlowApp = () => {
|
|
7
|
+
const container = React.useContext(XFlowAppContext);
|
|
8
|
+
return container && container.getApp ? container.getApp() : null;
|
|
9
|
+
};
|
|
10
|
+
/** AppContext: 获取 appContainer */
|
|
11
|
+
export const useXFlowAppContainer = () => {
|
|
12
|
+
return React.useContext(XFlowAppContext);
|
|
13
|
+
};
|
|
14
|
+
class AppContainer {
|
|
15
|
+
constructor(isUserDefined = false) {
|
|
16
|
+
this.cache = null;
|
|
17
|
+
this.setApp = (app) => {
|
|
18
|
+
this.cache = app;
|
|
19
|
+
if (this.onAppChangeCallback) {
|
|
20
|
+
this.onAppChangeCallback(app);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.isUserDefined = () => this.isUserDefinedFlag;
|
|
24
|
+
this.getApp = () => {
|
|
25
|
+
return this.cache;
|
|
26
|
+
};
|
|
27
|
+
this.onAppChange = cb => {
|
|
28
|
+
this.onAppChangeCallback = cb;
|
|
29
|
+
};
|
|
30
|
+
this.dispose = () => {
|
|
31
|
+
this.cache = null;
|
|
32
|
+
};
|
|
33
|
+
this.isUserDefinedFlag = isUserDefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** XFlow内部使用 */
|
|
37
|
+
export const XFlowAppInternalProvider = props => {
|
|
38
|
+
const userDefinedAppContainer = useXFlowAppContainer();
|
|
39
|
+
const [, setTick] = React.useState(null);
|
|
40
|
+
const appContainer = React.useMemo(() => {
|
|
41
|
+
return userDefinedAppContainer && userDefinedAppContainer.isUserDefined()
|
|
42
|
+
? userDefinedAppContainer
|
|
43
|
+
: new AppContainer(false);
|
|
44
|
+
// 不要移除:保证config只生成一次
|
|
45
|
+
// eslint-disable-next-line
|
|
46
|
+
}, []);
|
|
47
|
+
// set appChange callback
|
|
48
|
+
if (!appContainer.isUserDefined()) {
|
|
49
|
+
appContainer.onAppChange(() => setTick(0));
|
|
50
|
+
}
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
if (props.app) {
|
|
53
|
+
appContainer.setApp(props.app);
|
|
54
|
+
}
|
|
55
|
+
// 不要移除:只关心 props.app
|
|
56
|
+
// eslint-disable-next-line
|
|
57
|
+
}, [props.app]);
|
|
58
|
+
if (appContainer.isUserDefined()) {
|
|
59
|
+
return React.createElement(React.Fragment, null, props.children);
|
|
60
|
+
}
|
|
61
|
+
return (React.createElement(XFlowAppContext.Provider, { value: Object.assign({}, appContainer) }, props.children));
|
|
62
|
+
};
|
|
63
|
+
XFlowAppInternalProvider.displayName = 'XFlowAppInternalProvider';
|
|
64
|
+
/** XFlow外部使用 */
|
|
65
|
+
export const XFlowAppProvider = ({ children }) => {
|
|
66
|
+
const [, setTick] = React.useState(null);
|
|
67
|
+
const appContainer = React.useMemo(() => {
|
|
68
|
+
return new AppContainer(true);
|
|
69
|
+
}, []);
|
|
70
|
+
// add callback
|
|
71
|
+
appContainer.onAppChange(() => setTick(0));
|
|
72
|
+
return React.createElement(XFlowAppContext.Provider, { value: Object.assign({}, appContainer) }, children);
|
|
73
|
+
};
|
|
74
|
+
XFlowAppProvider.displayName = 'XFlowAppProvider';
|
|
75
|
+
//# sourceMappingURL=app-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-context.js","sourceRoot":"","sources":["../../../src/xflow-main/components/app-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,iBAAiB;AACjB,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAgB,IAAI,CAAC,CAAA;AACvE,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,wBAAwB;AACxB,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IACnD,OAAO,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAClE,CAAC,CAAA;AAED,kCAAkC;AAClC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,OAAO,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;AAC1C,CAAC,CAAA;AAUD,MAAM,YAAY;IAKhB,YAAY,gBAAyB,KAAK;QAJlC,UAAK,GAA+B,IAAI,CAAA;QAQhD,WAAM,GAAG,CAAC,GAAwB,EAAE,EAAE;YACpC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAA;YAChB,IAAI,IAAI,CAAC,mBAAmB,EAAE;gBAC5B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;aAC9B;QACH,C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AAC,GAAG,CAAC,CAAC,CAAA;IAEf,IAAI,YAAY,CAAC,aAAa,EAAE,EAAE;QAChC,OAAO,0CAAG,KAAK,CAAC,QAAQ,CAAI,CAAA;KAC7B;IAED,OAAO,CACL,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,oBAAO,YAAY,KAC/C,KAAK,CAAC,QAAQ,CACU,CAC5B,CAAA;AACH,CAAC,CAAA;AAED,wBAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAA;AAEjE,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,IAAI,CAAC,CAAA;IAChD,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACtC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,eAAe;IACf,YAAY,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IAE1C,OAAO,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,oBAAO,YAAY,KAAK,QAAQ,CAA4B,CAAA;AACpG,CAAC,CAAA;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { IExtensionModule } from '../interface';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
config: IExtensionModule['config'];
|
|
5
|
+
createModule: IExtensionModule['createModule'];
|
|
6
|
+
}
|
|
7
|
+
export declare function XFlowAppExtensionModule<T>(props: PropsWithChildren<IProps>): any;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useExtensionRegistry } from './extension-context';
|
|
4
|
+
export function XFlowAppExtensionModule(props) {
|
|
5
|
+
const { createModule, children } = props;
|
|
6
|
+
/** 获取扩展Registry */
|
|
7
|
+
const extensionRegistry = useExtensionRegistry();
|
|
8
|
+
/** Config */
|
|
9
|
+
const config = React.useMemo(() => props.config || { CONFIG_TYPE: '', getConfig: () => __awaiter(this, void 0, void 0, function* () { return ({}); }) },
|
|
10
|
+
/* eslint-disable-next-line */
|
|
11
|
+
[]);
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
/** 注册 extension 到 Registry */
|
|
14
|
+
const disposable = extensionRegistry.addExtension({
|
|
15
|
+
config: config,
|
|
16
|
+
createModule,
|
|
17
|
+
});
|
|
18
|
+
return () => {
|
|
19
|
+
disposable.dispose();
|
|
20
|
+
};
|
|
21
|
+
/* eslint-disable-next-line */
|
|
22
|
+
}, []);
|
|
23
|
+
/** 可以 Wrap Children组件 */
|
|
24
|
+
if (Array.isArray(children) || React.isValidElement(children)) {
|
|
25
|
+
return React.createElement(React.Fragment, null,
|
|
26
|
+
" ",
|
|
27
|
+
children,
|
|
28
|
+
" ");
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=app-extension-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-extension-module.js","sourceRoot":"","sources":["../../../src/xflow-main/components/app-extension-module.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAO1D,MAAM,UAAU,uBAAuB,CAAI,KAAgC;IACzE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IACxC,mBAAmB;IACnB,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAA;IAEhD,aAAa;IACb,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,GAAS,EAAE,gDAAC,OAAA,CAAC,EAAQ,CAAA,CAAA,GAAA,EAAE;IAC3E,+BAA+B;IAC/B,EAAE,CACH,CAAA;IAED,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,8BAA8B;QAC9B,MAAM,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC;YAChD,MAAM,EAAE,MAAM;YACd,YAAY;SACb,CAAC,CAAA;QACF,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,OAAO,EAAE,CAAA;QACtB,CAAC,CAAA;QACD,+BAA+B;IACjC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,yBAAyB;IACzB,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QAC7D,OAAO;;YAAI,QAAQ;gBAAK,CAAA;KACzB;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IPosition } from '../../common/position';
|
|
3
|
+
import { GraphConfig } from '../graph';
|
|
4
|
+
export interface IProps {
|
|
5
|
+
config?: GraphConfig;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
className?: string;
|
|
8
|
+
isXFlowCanvas?: boolean;
|
|
9
|
+
position?: IPosition;
|
|
10
|
+
}
|
|
11
|
+
export declare const XFlowCanvas: React.FC<IProps>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { usePositionStyle } from '../../common/position';
|
|
4
|
+
import { GraphConfig, createX6GraphModule } from '../graph';
|
|
5
|
+
import { useExtensionRegistry } from './extension-context';
|
|
6
|
+
import { useXflowPrefixCls } from './global-config-context';
|
|
7
|
+
import { usePortal } from '@antv/x6-react-shape';
|
|
8
|
+
import { useXFlowApp } from './app-context';
|
|
9
|
+
export const XFlowCanvas = props => {
|
|
10
|
+
const app = useXFlowApp();
|
|
11
|
+
/** x6画布parent的dom节点 */
|
|
12
|
+
const rootRef = React.useRef(null);
|
|
13
|
+
/** x6画布的dom节点 */
|
|
14
|
+
const canvasRef = React.useRef(null);
|
|
15
|
+
/** 生成配置中心 */
|
|
16
|
+
const extensionRegistry = useExtensionRegistry();
|
|
17
|
+
/** 获取ContextService的配置 */
|
|
18
|
+
const graphConfig = React.useMemo(() => {
|
|
19
|
+
const config = props.config ? props.config : new GraphConfig();
|
|
20
|
+
config.setX6Config();
|
|
21
|
+
return config;
|
|
22
|
+
/** 保证只生成一次 */
|
|
23
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
|
+
}, []);
|
|
25
|
+
/** X6_NODE_PORTAL_NODE_VIEW */
|
|
26
|
+
const [Portal, setGraph] = usePortal(graphConfig.graphId);
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
app &&
|
|
29
|
+
app.getGraphInstance().then(graph => {
|
|
30
|
+
setGraph(graph);
|
|
31
|
+
});
|
|
32
|
+
}, [app, setGraph]);
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
/** 设置画布parent dom节点、画布dom节点 */
|
|
35
|
+
graphConfig.setRootContainer(rootRef.current);
|
|
36
|
+
graphConfig.setGraphContainer(canvasRef.current);
|
|
37
|
+
/** 关联XflowApp和Graph*/
|
|
38
|
+
graphConfig.xflowInstanceId = extensionRegistry.getInstanceId();
|
|
39
|
+
extensionRegistry.addCoreModule({ config: graphConfig, createModule: createX6GraphModule });
|
|
40
|
+
/** unmount */
|
|
41
|
+
const destroy = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
+
graphConfig.dispose();
|
|
43
|
+
});
|
|
44
|
+
return () => {
|
|
45
|
+
destroy();
|
|
46
|
+
};
|
|
47
|
+
/** 保证只生成一次 */
|
|
48
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
|
+
}, []);
|
|
50
|
+
const style = usePositionStyle(props.position);
|
|
51
|
+
const rootClz = useXflowPrefixCls('canvas-root');
|
|
52
|
+
const canvasClz = useXflowPrefixCls('x6-canvas');
|
|
53
|
+
return (React.createElement(React.Fragment, null,
|
|
54
|
+
React.createElement("div", { ref: rootRef, className: rootClz, style: style, id: graphConfig.graphId, tabIndex: 0 },
|
|
55
|
+
React.createElement("div", { ref: canvasRef, className: canvasClz }),
|
|
56
|
+
props.children),
|
|
57
|
+
React.createElement(Portal, null)));
|
|
58
|
+
};
|
|
59
|
+
XFlowCanvas.defaultProps = {
|
|
60
|
+
isXFlowCanvas: true,
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=canvas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas.js","sourceRoot":"","sources":["../../../src/xflow-main/components/canvas.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAU3C,MAAM,CAAC,MAAM,WAAW,GAAqB,KAAK,CAAC,EAAE;IACnD,MAAM,GAAG,GAAG,WAAW,EAAE,CAAA;IAEzB,uBAAuB;IACvB,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAA;IAClD,iBAAiB;IACjB,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAA;IAEpD,aAAa;IACb,MAAM,iBAAiB,GAA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ACD,cAAc;QACd,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC9C,MAAM,OAAO,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAA;IAChD,MAAM,SAAS,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEhD,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ;QACb,6BAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;YACvF,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAI;YAE5C,KAAK,CAAC,QAAQ,CACX;QACN,oBAAC,MAAM,OAAG,CACK,CAClB,CAAA;AACH,CAAC,CAAA;AAED,WAAW,CAAC,YAAY,GAAG;IACzB,aAAa,EAAE,IAAI;CACpB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtensionRegistry } from './extension-registry';
|
|
3
|
+
/** 通过context收集extension的配置 */
|
|
4
|
+
export const ExtensionRegistryContext = React.createContext({});
|
|
5
|
+
export const useExtensionRegistry = () => {
|
|
6
|
+
return React.useContext(ExtensionRegistryContext);
|
|
7
|
+
};
|
|
8
|
+
export { ExtensionRegistry };
|
|
9
|
+
//# sourceMappingURL=extension-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-context.js","sourceRoot":"","sources":["../../../src/xflow-main/components/extension-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,8BAA8B;AAC9B,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CACzD,EAAuB,CACxB,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,OAAO,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAA;AACnD,CAAC,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Disposable } from '../../common/disposable';
|
|
2
|
+
import type { IExtensionModule } from '../interface';
|
|
3
|
+
/** 保存组件上的配置 */
|
|
4
|
+
export declare class ExtensionRegistry {
|
|
5
|
+
/** 标记xflow app instance */
|
|
6
|
+
private instanceId;
|
|
7
|
+
readonly extensions: IExtensionModule[];
|
|
8
|
+
readonly containerClassNames: Set<string>;
|
|
9
|
+
constructor();
|
|
10
|
+
addCoreModule: (extension: IExtensionModule) => Disposable;
|
|
11
|
+
addExtension: (extension: IExtensionModule) => Disposable;
|
|
12
|
+
getExtension: (config_type: string) => any;
|
|
13
|
+
removeExtension: (extension: IExtensionModule) => void;
|
|
14
|
+
getInstanceId: () => string;
|
|
15
|
+
addContainerClassNames: (clz: string) => Set<string>;
|
|
16
|
+
getContainerClassNames: () => string[];
|
|
17
|
+
has(name: string): boolean;
|
|
18
|
+
getAllExtensions: () => IExtensionModule<any>[];
|
|
19
|
+
getAllExtensionConfigs: () => import("../interface").IModuleConfig<any>[];
|
|
20
|
+
}
|
|
21
|
+
/** 获取Xflow extension,用于收集React组件的配置 */
|
|
22
|
+
export declare const createExtensionRegistry: () => any;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { find, get } from 'lodash';
|
|
3
|
+
import { Disposable } from '../../common/disposable';
|
|
4
|
+
import { uuidv4 } from '../../common/uuid';
|
|
5
|
+
/** 保存组件上的配置 */
|
|
6
|
+
export class ExtensionRegistry {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.extensions = [];
|
|
9
|
+
this.containerClassNames = new Set();
|
|
10
|
+
this.addCoreModule = (extension) => {
|
|
11
|
+
// core module 添加在前面
|
|
12
|
+
this.extensions.unshift(extension);
|
|
13
|
+
return Disposable.create(() => {
|
|
14
|
+
this.removeExtension(extension);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
this.addExtension = (extension) => {
|
|
18
|
+
this.extensions.push(extension);
|
|
19
|
+
return Disposable.create(() => {
|
|
20
|
+
this.removeExtension(extension);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
this.getExtension = (config_type) => {
|
|
24
|
+
return find(this.extensions, extension => get(extension, 'config.CONFIG_TYPE') === config_type);
|
|
25
|
+
};
|
|
26
|
+
this.removeExtension = (extension) => {
|
|
27
|
+
const idx = this.extensions.indexOf(extension);
|
|
28
|
+
if (idx > -1) {
|
|
29
|
+
this.extensions.splice(idx, 1);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.getInstanceId = () => {
|
|
33
|
+
return this.instanceId;
|
|
34
|
+
};
|
|
35
|
+
this.addContainerClassNames = (clz) => {
|
|
36
|
+
return this.containerClassNames.add(clz);
|
|
37
|
+
};
|
|
38
|
+
this.getContainerClassNames = () => {
|
|
39
|
+
return Array.from(this.containerClassNames);
|
|
40
|
+
};
|
|
41
|
+
this.getAllExtensions = () => {
|
|
42
|
+
return this.extensions;
|
|
43
|
+
};
|
|
44
|
+
this.getAllExtensionConfigs = () => {
|
|
45
|
+
return this.extensions.map(i => i.config);
|
|
46
|
+
};
|
|
47
|
+
this.instanceId = uuidv4();
|
|
48
|
+
}
|
|
49
|
+
has(name) {
|
|
50
|
+
return this.extensions.some(ext => ext.config.CONFIG_TYPE === name);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** 获取Xflow extension,用于收集React组件的配置 */
|
|
54
|
+
export const createExtensionRegistry = () => {
|
|
55
|
+
/* eslint-disable-next-line react-hooks/rules-of-hooks */
|
|
56
|
+
const registry = React.useMemo(() => {
|
|
57
|
+
return new ExtensionRegistry();
|
|
58
|
+
}, []);
|
|
59
|
+
return registry;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=extension-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-registry.js","sourceRoot":"","sources":["../../../src/xflow-main/components/extension-registry.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,eAAe;AACf,MAAM,OAAO,iBAAiB;IAQ5B;QAJS,eAAU,GAAuB,EAAE,CAAA;QAEnC,wBAAmB,GAAgB,IAAI,GAAG,EAAE,CAAA;QAMrD,kBAAa,GAAG,CAAC,SAA2B,EAAE,EAAE;YAC9C,oBAAoB;YACpB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;YAClC,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE;gBAC5B,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;YACjC,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA;QAED,iBAAY,GAAG,CAAC,SAA2B,EAAE,EAAE;YAC7C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YAC/B,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE;gBAC5B,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;YACjC,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA;QAED,iBAAY,GAAG,CAAC,WAAmB,EAAE,EAAE;YACrC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,oBAAoB,CAAC,KAAK,WAAW,CAAC,CAAA;QACjG,CAAC,CAAA;QAED,oBAAe,GAAG,CAAC,SAA2B,EA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