liteflow-editor-process 1.0.0
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 +1020 -0
- package/dist/LiteFlowEditor/assets/and-icon.svg +20 -0
- package/dist/LiteFlowEditor/assets/catch-icon.svg +14 -0
- package/dist/LiteFlowEditor/assets/chain-icon.svg +11 -0
- package/dist/LiteFlowEditor/assets/common-icon.svg +18 -0
- package/dist/LiteFlowEditor/assets/end-icon.svg +14 -0
- package/dist/LiteFlowEditor/assets/for-icon.svg +20 -0
- package/dist/LiteFlowEditor/assets/if-icon.svg +14 -0
- package/dist/LiteFlowEditor/assets/indicator-icons.svg +16 -0
- package/dist/LiteFlowEditor/assets/intermediate-end-icon.svg +20 -0
- package/dist/LiteFlowEditor/assets/intermediate-event-catch-error.svg +40 -0
- package/dist/LiteFlowEditor/assets/iterator-icon.svg +7 -0
- package/dist/LiteFlowEditor/assets/little-warning-icon.svg +1 -0
- package/dist/LiteFlowEditor/assets/not-icon.svg +20 -0
- package/dist/LiteFlowEditor/assets/or-icon.svg +20 -0
- package/dist/LiteFlowEditor/assets/start-icon.svg +16 -0
- package/dist/LiteFlowEditor/assets/switch-icon.svg +15 -0
- package/dist/LiteFlowEditor/assets/then-icon.svg +23 -0
- package/dist/LiteFlowEditor/assets/virtual-icon.svg +21 -0
- package/dist/LiteFlowEditor/assets/warning-icon.svg +1 -0
- package/dist/LiteFlowEditor/assets/when-icon.svg +21 -0
- package/dist/LiteFlowEditor/assets/while-icon.svg +24 -0
- package/dist/LiteFlowEditor/cells/and.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/and.js +8 -0
- package/dist/LiteFlowEditor/cells/catch.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/catch.js +8 -0
- package/dist/LiteFlowEditor/cells/chain.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/chain.js +8 -0
- package/dist/LiteFlowEditor/cells/common.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/common.js +8 -0
- package/dist/LiteFlowEditor/cells/end.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/end.js +11 -0
- package/dist/LiteFlowEditor/cells/for.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/for.js +8 -0
- package/dist/LiteFlowEditor/cells/if.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/if.js +9 -0
- package/dist/LiteFlowEditor/cells/index.d.ts +25 -0
- package/dist/LiteFlowEditor/cells/index.js +219 -0
- package/dist/LiteFlowEditor/cells/intermediate-end.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/intermediate-end.js +11 -0
- package/dist/LiteFlowEditor/cells/iterator.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/iterator.js +8 -0
- package/dist/LiteFlowEditor/cells/not.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/not.js +8 -0
- package/dist/LiteFlowEditor/cells/or.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/or.js +8 -0
- package/dist/LiteFlowEditor/cells/start.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/start.js +11 -0
- package/dist/LiteFlowEditor/cells/switch.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/switch.js +9 -0
- package/dist/LiteFlowEditor/cells/then.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/then.js +11 -0
- package/dist/LiteFlowEditor/cells/virtual.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/virtual.js +8 -0
- package/dist/LiteFlowEditor/cells/when.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/when.js +11 -0
- package/dist/LiteFlowEditor/cells/while.d.ts +2 -0
- package/dist/LiteFlowEditor/cells/while.js +8 -0
- package/dist/LiteFlowEditor/common/anchor.d.ts +2 -0
- package/dist/LiteFlowEditor/common/anchor.js +10 -0
- package/dist/LiteFlowEditor/common/connector.d.ts +2 -0
- package/dist/LiteFlowEditor/common/connector.js +20 -0
- package/dist/LiteFlowEditor/common/edge.d.ts +61 -0
- package/dist/LiteFlowEditor/common/edge.js +57 -0
- package/dist/LiteFlowEditor/common/events.d.ts +4 -0
- package/dist/LiteFlowEditor/common/events.js +97 -0
- package/dist/LiteFlowEditor/common/index.d.ts +4 -0
- package/dist/LiteFlowEditor/common/index.js +11 -0
- package/dist/LiteFlowEditor/common/layout.d.ts +12 -0
- package/dist/LiteFlowEditor/common/layout.js +308 -0
- package/dist/LiteFlowEditor/common/router.d.ts +2 -0
- package/dist/LiteFlowEditor/common/router.js +40 -0
- package/dist/LiteFlowEditor/common/shortcuts.d.ts +10 -0
- package/dist/LiteFlowEditor/common/shortcuts.js +183 -0
- package/dist/LiteFlowEditor/components/NodeBadge/index.d.ts +6 -0
- package/dist/LiteFlowEditor/components/NodeBadge/index.js +24 -0
- package/dist/LiteFlowEditor/components/NodeBadge/index.module.less +10 -0
- package/dist/LiteFlowEditor/components/NodeToolBar/index.d.ts +6 -0
- package/dist/LiteFlowEditor/components/NodeToolBar/index.js +121 -0
- package/dist/LiteFlowEditor/components/NodeToolBar/index.module.less +133 -0
- package/dist/LiteFlowEditor/components/NodeView/index.d.ts +7 -0
- package/dist/LiteFlowEditor/components/NodeView/index.js +14 -0
- package/dist/LiteFlowEditor/components/NodeView/index.module.less +14 -0
- package/dist/LiteFlowEditor/components/index.d.ts +3 -0
- package/dist/LiteFlowEditor/components/index.js +3 -0
- package/dist/LiteFlowEditor/constant/index.d.ts +79 -0
- package/dist/LiteFlowEditor/constant/index.js +215 -0
- package/dist/LiteFlowEditor/context/GraphContext.d.ts +13 -0
- package/dist/LiteFlowEditor/context/GraphContext.js +10 -0
- package/dist/LiteFlowEditor/context/ScriptContext.d.ts +37 -0
- package/dist/LiteFlowEditor/context/ScriptContext.js +15 -0
- package/dist/LiteFlowEditor/hooks/index.d.ts +5 -0
- package/dist/LiteFlowEditor/hooks/index.js +5 -0
- package/dist/LiteFlowEditor/hooks/useClickAway.d.ts +5 -0
- package/dist/LiteFlowEditor/hooks/useClickAway.js +38 -0
- package/dist/LiteFlowEditor/hooks/useGraph.d.ts +1 -0
- package/dist/LiteFlowEditor/hooks/useGraph.js +7 -0
- package/dist/LiteFlowEditor/hooks/useGraphWrapper.d.ts +2 -0
- package/dist/LiteFlowEditor/hooks/useGraphWrapper.js +7 -0
- package/dist/LiteFlowEditor/hooks/useHistory.d.ts +2 -0
- package/dist/LiteFlowEditor/hooks/useHistory.js +69 -0
- package/dist/LiteFlowEditor/hooks/useModel.d.ts +3 -0
- package/dist/LiteFlowEditor/hooks/useModel.js +7 -0
- package/dist/LiteFlowEditor/hooks/useUpdateEffect.d.ts +7 -0
- package/dist/LiteFlowEditor/hooks/useUpdateEffect.js +17 -0
- package/dist/LiteFlowEditor/i18n/en_US/translation.json +138 -0
- package/dist/LiteFlowEditor/i18n/index.d.ts +2 -0
- package/dist/LiteFlowEditor/i18n/index.js +28 -0
- package/dist/LiteFlowEditor/i18n/zh_CN/translation.json +139 -0
- package/dist/LiteFlowEditor/i18n/zh_TW/translation.json +139 -0
- package/dist/LiteFlowEditor/index.d.ts +37 -0
- package/dist/LiteFlowEditor/index.js +299 -0
- package/dist/LiteFlowEditor/index.module.less +127 -0
- package/dist/LiteFlowEditor/mock/index.d.ts +2 -0
- package/dist/LiteFlowEditor/mock/index.js +272 -0
- package/dist/LiteFlowEditor/model/builder.d.ts +43 -0
- package/dist/LiteFlowEditor/model/builder.js +239 -0
- package/dist/LiteFlowEditor/model/chain.d.ts +83 -0
- package/dist/LiteFlowEditor/model/chain.js +278 -0
- package/dist/LiteFlowEditor/model/el/and-operator.d.ts +53 -0
- package/dist/LiteFlowEditor/model/el/and-operator.js +178 -0
- package/dist/LiteFlowEditor/model/el/catch-operator.d.ts +81 -0
- package/dist/LiteFlowEditor/model/el/catch-operator.js +338 -0
- package/dist/LiteFlowEditor/model/el/chain-operator.d.ts +53 -0
- package/dist/LiteFlowEditor/model/el/chain-operator.js +170 -0
- package/dist/LiteFlowEditor/model/el/for-operator.d.ts +56 -0
- package/dist/LiteFlowEditor/model/el/for-operator.js +171 -0
- package/dist/LiteFlowEditor/model/el/if-operator.d.ts +64 -0
- package/dist/LiteFlowEditor/model/el/if-operator.js +265 -0
- package/dist/LiteFlowEditor/model/el/index.d.ts +40 -0
- package/dist/LiteFlowEditor/model/el/index.js +47 -0
- package/dist/LiteFlowEditor/model/el/iterator-operator.d.ts +56 -0
- package/dist/LiteFlowEditor/model/el/iterator-operator.js +183 -0
- package/dist/LiteFlowEditor/model/el/node-operator.d.ts +62 -0
- package/dist/LiteFlowEditor/model/el/node-operator.js +136 -0
- package/dist/LiteFlowEditor/model/el/not-operator.d.ts +68 -0
- package/dist/LiteFlowEditor/model/el/not-operator.js +231 -0
- package/dist/LiteFlowEditor/model/el/or-operator.d.ts +53 -0
- package/dist/LiteFlowEditor/model/el/or-operator.js +178 -0
- package/dist/LiteFlowEditor/model/el/switch-operator.d.ts +56 -0
- package/dist/LiteFlowEditor/model/el/switch-operator.js +173 -0
- package/dist/LiteFlowEditor/model/el/then-operator.d.ts +66 -0
- package/dist/LiteFlowEditor/model/el/then-operator.js +159 -0
- package/dist/LiteFlowEditor/model/el/when-operator.d.ts +58 -0
- package/dist/LiteFlowEditor/model/el/when-operator.js +181 -0
- package/dist/LiteFlowEditor/model/el/while-operator.d.ts +56 -0
- package/dist/LiteFlowEditor/model/el/while-operator.js +171 -0
- package/dist/LiteFlowEditor/model/node.d.ts +182 -0
- package/dist/LiteFlowEditor/model/node.js +463 -0
- package/dist/LiteFlowEditor/model/utils/createTag.d.ts +1 -0
- package/dist/LiteFlowEditor/model/utils/createTag.js +5 -0
- package/dist/LiteFlowEditor/model/utils/end.d.ts +87 -0
- package/dist/LiteFlowEditor/model/utils/end.js +185 -0
- package/dist/LiteFlowEditor/model/utils/index.d.ts +7 -0
- package/dist/LiteFlowEditor/model/utils/index.js +10 -0
- package/dist/LiteFlowEditor/model/utils/start.d.ts +87 -0
- package/dist/LiteFlowEditor/model/utils/start.js +185 -0
- package/dist/LiteFlowEditor/model/utils/virtual.d.ts +78 -0
- package/dist/LiteFlowEditor/model/utils/virtual.js +167 -0
- package/dist/LiteFlowEditor/model-checker/checkers/AnalysisNodeChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/AnalysisNodeChecker.js +44 -0
- package/dist/LiteFlowEditor/model-checker/checkers/CurScheduleSetChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/CurScheduleSetChecker.js +26 -0
- package/dist/LiteFlowEditor/model-checker/checkers/InputListChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/InputListChecker.js +39 -0
- package/dist/LiteFlowEditor/model-checker/checkers/InputListValueChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/InputListValueChecker.js +154 -0
- package/dist/LiteFlowEditor/model-checker/checkers/IteratorBindChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/IteratorBindChecker.js +27 -0
- package/dist/LiteFlowEditor/model-checker/checkers/QueryDimensionChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/QueryDimensionChecker.js +33 -0
- package/dist/LiteFlowEditor/model-checker/checkers/QueryLogChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/QueryLogChecker.js +27 -0
- package/dist/LiteFlowEditor/model-checker/checkers/ReportTemplateChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/ReportTemplateChecker.js +27 -0
- package/dist/LiteFlowEditor/model-checker/checkers/UnconfiguredComponentChecker.d.ts +7 -0
- package/dist/LiteFlowEditor/model-checker/checkers/UnconfiguredComponentChecker.js +27 -0
- package/dist/LiteFlowEditor/model-checker/checkers/index.d.ts +14 -0
- package/dist/LiteFlowEditor/model-checker/checkers/index.js +38 -0
- package/dist/LiteFlowEditor/model-checker/index.d.ts +22 -0
- package/dist/LiteFlowEditor/model-checker/index.js +43 -0
- package/dist/LiteFlowEditor/model-checker/types.d.ts +11 -0
- package/dist/LiteFlowEditor/model-checker/types.js +1 -0
- package/dist/LiteFlowEditor/panels/breadcrumb/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/breadcrumb/index.js +67 -0
- package/dist/LiteFlowEditor/panels/breadcrumb/index.module.less +23 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/index.d.ts +11 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/index.js +98 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/index.module.less +7 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/blank.d.ts +8 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/blank.js +18 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/index.d.ts +3 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/index.js +3 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/node.d.ts +9 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextMenu/menuConfig/node.js +10 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextPad/index.d.ts +14 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextPad/index.js +108 -0
- package/dist/LiteFlowEditor/panels/flowGraph/contextPad/index.module.less +81 -0
- package/dist/LiteFlowEditor/panels/flowGraph/createFlowGraph.d.ts +3 -0
- package/dist/LiteFlowEditor/panels/flowGraph/createFlowGraph.js +199 -0
- package/dist/LiteFlowEditor/panels/flowGraph/miniMapSimpleNode/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/flowGraph/miniMapSimpleNode/index.js +42 -0
- package/dist/LiteFlowEditor/panels/flowGraph/nodeEditorModal/index.d.ts +8 -0
- package/dist/LiteFlowEditor/panels/flowGraph/nodeEditorModal/index.js +110 -0
- package/dist/LiteFlowEditor/panels/flowGraph/nodeEditorModal/index.module.less +11 -0
- package/dist/LiteFlowEditor/panels/layout/index.d.ts +16 -0
- package/dist/LiteFlowEditor/panels/layout/index.js +117 -0
- package/dist/LiteFlowEditor/panels/layout/index.module.less +30 -0
- package/dist/LiteFlowEditor/panels/settingBar/basic/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/settingBar/basic/index.js +50 -0
- package/dist/LiteFlowEditor/panels/settingBar/basic/index.module.less +17 -0
- package/dist/LiteFlowEditor/panels/settingBar/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/settingBar/index.js +219 -0
- package/dist/LiteFlowEditor/panels/settingBar/index.module.less +45 -0
- package/dist/LiteFlowEditor/panels/settingBar/outline/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/settingBar/outline/index.js +124 -0
- package/dist/LiteFlowEditor/panels/settingBar/outline/index.module.less +39 -0
- package/dist/LiteFlowEditor/panels/settingBar/parameters/index.d.ts +6 -0
- package/dist/LiteFlowEditor/panels/settingBar/parameters/index.js +415 -0
- package/dist/LiteFlowEditor/panels/settingBar/parameters/index.module.less +4 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/CustomDropdown.d.ts +13 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/CustomDropdown.js +62 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/DraggableWrapper.d.ts +48 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/DraggableWrapper.js +94 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor-new.d.ts +33 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor-new.js +433 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor.d.ts +33 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/RichParamEditor.js +195 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/component.d.ts +10 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/component.js +2780 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/condition.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/condition.js +54 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/index.d.ts +2 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/index.js +2 -0
- package/dist/LiteFlowEditor/panels/settingBar/properties/index.module.less +149 -0
- package/dist/LiteFlowEditor/panels/sideBar/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/sideBar/index.js +153 -0
- package/dist/LiteFlowEditor/panels/sideBar/index.module.less +48 -0
- package/dist/LiteFlowEditor/panels/toolBar/index.d.ts +8 -0
- package/dist/LiteFlowEditor/panels/toolBar/index.js +42 -0
- package/dist/LiteFlowEditor/panels/toolBar/index.module.less +19 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/check.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/check.js +40 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/common/badge.d.ts +12 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/common/badge.js +46 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeBtnWidget.d.ts +15 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeBtnWidget.js +133 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeDropdownWidget.d.ts +14 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/common/makeDropdownWidget.js +38 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/fitWindow.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/fitWindow.js +17 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/fullscreen.d.ts +4 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/fullscreen.js +104 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/global.less +6 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/index.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/index.js +12 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/index.module.less +169 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/mock.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/mock.js +83 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/redo.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/redo.js +16 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/save.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/save.js +12 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/selection.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/selection.js +23 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/undo.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/undo.js +16 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/view.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/view.js +37 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/zoom.d.ts +7 -0
- package/dist/LiteFlowEditor/panels/toolBar/widgets/zoom.js +67 -0
- package/dist/LiteFlowEditor/utils/eventBus.d.ts +34 -0
- package/dist/LiteFlowEditor/utils/eventBus.js +86 -0
- package/dist/LiteFlowEditor/utils/flowChartUtils.d.ts +9 -0
- package/dist/LiteFlowEditor/utils/flowChartUtils.js +34 -0
- package/dist/LiteFlowEditor/utils/index.d.ts +33 -0
- package/dist/LiteFlowEditor/utils/index.js +245 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/package.json +97 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
import ELNode from "../node";
|
|
8
|
+
import { NodeTypeEnum } from "../../constant";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 操作符中结束节点的模型(作为操作符模型的代理),
|
|
12
|
+
* 操作符包括WHEN、SWITCH、IF、FOR、WHILE、CATCH、AND、OR、NOT等等。
|
|
13
|
+
*/
|
|
14
|
+
var ELEndNode = /*#__PURE__*/function (_ELNode) {
|
|
15
|
+
_inherits(ELEndNode, _ELNode);
|
|
16
|
+
var _super = _createSuper(ELEndNode);
|
|
17
|
+
function ELEndNode(proxy) {
|
|
18
|
+
var _this;
|
|
19
|
+
_classCallCheck(this, ELEndNode);
|
|
20
|
+
_this = _super.call(this);
|
|
21
|
+
_defineProperty(_assertThisInitialized(_this), "type", NodeTypeEnum.VIRTUAL);
|
|
22
|
+
/** 代理的节点组件 */
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "proxy", void 0);
|
|
24
|
+
/** 代理节点组件的相关属性 */
|
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "parent", void 0);
|
|
26
|
+
_this.proxy = proxy;
|
|
27
|
+
_this.parent = proxy.parent;
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 在结束节点的前面、插入新节点
|
|
33
|
+
* @param newNode 新节点
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
_createClass(ELEndNode, [{
|
|
37
|
+
key: "prepend",
|
|
38
|
+
value: function prepend(newNode) {
|
|
39
|
+
return this.proxy.appendChild(newNode);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 在结束节点的后面、插入新节点
|
|
44
|
+
* @param newNode 新节点
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
}, {
|
|
48
|
+
key: "append",
|
|
49
|
+
value: function append(newNode) {
|
|
50
|
+
return this.proxy.append(newNode);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 删除结束节点
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "remove",
|
|
58
|
+
value: function remove() {
|
|
59
|
+
return this.proxy.remove();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 替换当前节点为新节点
|
|
64
|
+
* @param newNode 新节点
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "replace",
|
|
69
|
+
value: function replace(newNode) {
|
|
70
|
+
return this.proxy.replace(newNode);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 转换为X6的图数据格式
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "toCells",
|
|
78
|
+
value: function toCells() {
|
|
79
|
+
throw new Error('Method not implemented.');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 获取当前X6 Cell内容
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "getCells",
|
|
87
|
+
value: function getCells() {
|
|
88
|
+
return this.proxy.getCells();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 获取当前X6 节点内容
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "getNodes",
|
|
96
|
+
value: function getNodes() {
|
|
97
|
+
return this.proxy.getNodes();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 获取当前节点的开始节点
|
|
102
|
+
*/
|
|
103
|
+
}, {
|
|
104
|
+
key: "getStartNode",
|
|
105
|
+
value: function getStartNode() {
|
|
106
|
+
return this.proxy.getStartNode();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 获取当前节点的结束节点
|
|
111
|
+
*/
|
|
112
|
+
}, {
|
|
113
|
+
key: "getEndNode",
|
|
114
|
+
value: function getEndNode() {
|
|
115
|
+
return this.proxy.getEndNode();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 获取属性
|
|
120
|
+
* @returns 属性
|
|
121
|
+
*/
|
|
122
|
+
}, {
|
|
123
|
+
key: "getProperties",
|
|
124
|
+
value: function getProperties() {
|
|
125
|
+
return this.proxy.getProperties();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 设置属性
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "setProperties",
|
|
133
|
+
value: function setProperties(properties) {
|
|
134
|
+
this.proxy.setProperties(properties);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 获取属性的EL表达式
|
|
139
|
+
* @returns 属性的EL表达式
|
|
140
|
+
*/
|
|
141
|
+
}, {
|
|
142
|
+
key: "propertiesToEL",
|
|
143
|
+
value: function propertiesToEL() {
|
|
144
|
+
return this.proxy.propertiesToEL();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 转换为EL表达式字符串
|
|
149
|
+
*/
|
|
150
|
+
}, {
|
|
151
|
+
key: "toEL",
|
|
152
|
+
value: function toEL(prefix) {
|
|
153
|
+
return this.proxy.toEL(prefix);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 转换为JSON格式
|
|
158
|
+
*/
|
|
159
|
+
}, {
|
|
160
|
+
key: "toJSON",
|
|
161
|
+
value: function toJSON() {
|
|
162
|
+
return this.proxy.toJSON();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 是否折叠
|
|
167
|
+
*/
|
|
168
|
+
}, {
|
|
169
|
+
key: "isCollapsed",
|
|
170
|
+
value: function isCollapsed() {
|
|
171
|
+
return this.proxy.isCollapsed();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* 折叠:展开、收起
|
|
176
|
+
*/
|
|
177
|
+
}, {
|
|
178
|
+
key: "toggleCollapse",
|
|
179
|
+
value: function toggleCollapse(collapsed) {
|
|
180
|
+
this.proxy.toggleCollapse(collapsed);
|
|
181
|
+
}
|
|
182
|
+
}]);
|
|
183
|
+
return ELEndNode;
|
|
184
|
+
}(ELNode);
|
|
185
|
+
export { ELEndNode as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EL表达式各个操作符的辅助模型。
|
|
3
|
+
*/
|
|
4
|
+
// 操作符中开始节点的模型(作为操作符模型的代理)
|
|
5
|
+
export { default as ELStartNode } from "./start";
|
|
6
|
+
// 操作符中结束节点的模型(作为操作符模型的代理)
|
|
7
|
+
export { default as ELEndNode } from "./end";
|
|
8
|
+
// 操作符中占位节点的模型(作为占位节点的代理)
|
|
9
|
+
export { default as ELVirtualNode } from "./virtual";
|
|
10
|
+
export { generateUniqueId } from "./createTag";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Cell, Node } from '@antv/x6';
|
|
2
|
+
import ELNode, { Properties } from '../node';
|
|
3
|
+
import { NodeTypeEnum } from '../../constant';
|
|
4
|
+
/**
|
|
5
|
+
* 操作符中开始节点的模型(作为操作符模型的代理),
|
|
6
|
+
* 操作符包括WHEN、CATCH、AND、OR、NOT等等。
|
|
7
|
+
*/
|
|
8
|
+
export default class ELStartNode extends ELNode {
|
|
9
|
+
type: NodeTypeEnum;
|
|
10
|
+
/** 代理的节点组件 */
|
|
11
|
+
proxy: ELNode;
|
|
12
|
+
/** 代理节点组件的相关属性 */
|
|
13
|
+
parent?: ELNode;
|
|
14
|
+
constructor(proxy: ELNode);
|
|
15
|
+
/**
|
|
16
|
+
* 在开始节点的前面、插入新节点
|
|
17
|
+
* @param newNode 新节点
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
prepend(newNode: ELNode): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 在开始节点的后面、插入新节点
|
|
23
|
+
* @param newNode 新节点
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
append(newNode: ELNode): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 删除开始节点
|
|
29
|
+
*/
|
|
30
|
+
remove(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 替换当前节点为新节点
|
|
33
|
+
* @param newNode 新节点
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
replace(newNode: ELNode): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 转换为X6的图数据格式
|
|
39
|
+
*/
|
|
40
|
+
toCells(): Cell[];
|
|
41
|
+
/**
|
|
42
|
+
* 获取当前X6 Cell内容
|
|
43
|
+
*/
|
|
44
|
+
getCells(): Cell[];
|
|
45
|
+
/**
|
|
46
|
+
* 获取当前X6 节点内容
|
|
47
|
+
*/
|
|
48
|
+
getNodes(): Node[];
|
|
49
|
+
/**
|
|
50
|
+
* 获取当前节点的开始节点
|
|
51
|
+
*/
|
|
52
|
+
getStartNode(): Node;
|
|
53
|
+
/**
|
|
54
|
+
* 获取当前节点的结束节点
|
|
55
|
+
*/
|
|
56
|
+
getEndNode(): Node;
|
|
57
|
+
/**
|
|
58
|
+
* 获取属性
|
|
59
|
+
* @returns 属性
|
|
60
|
+
*/
|
|
61
|
+
getProperties(): Properties;
|
|
62
|
+
/**
|
|
63
|
+
* 设置属性
|
|
64
|
+
*/
|
|
65
|
+
setProperties(properties: Properties): void;
|
|
66
|
+
/**
|
|
67
|
+
* 获取属性的EL表达式
|
|
68
|
+
* @returns 属性的EL表达式
|
|
69
|
+
*/
|
|
70
|
+
propertiesToEL(): string;
|
|
71
|
+
/**
|
|
72
|
+
* 转换为EL表达式字符串
|
|
73
|
+
*/
|
|
74
|
+
toEL(prefix?: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* 转换为JSON格式
|
|
77
|
+
*/
|
|
78
|
+
toJSON(): Record<string, any>;
|
|
79
|
+
/**
|
|
80
|
+
* 是否折叠
|
|
81
|
+
*/
|
|
82
|
+
isCollapsed(): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* 折叠:展开、收起
|
|
85
|
+
*/
|
|
86
|
+
toggleCollapse(collapsed?: boolean): void;
|
|
87
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
import ELNode from "../node";
|
|
8
|
+
import { NodeTypeEnum } from "../../constant";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 操作符中开始节点的模型(作为操作符模型的代理),
|
|
12
|
+
* 操作符包括WHEN、CATCH、AND、OR、NOT等等。
|
|
13
|
+
*/
|
|
14
|
+
var ELStartNode = /*#__PURE__*/function (_ELNode) {
|
|
15
|
+
_inherits(ELStartNode, _ELNode);
|
|
16
|
+
var _super = _createSuper(ELStartNode);
|
|
17
|
+
function ELStartNode(proxy) {
|
|
18
|
+
var _this;
|
|
19
|
+
_classCallCheck(this, ELStartNode);
|
|
20
|
+
_this = _super.call(this);
|
|
21
|
+
_defineProperty(_assertThisInitialized(_this), "type", NodeTypeEnum.VIRTUAL);
|
|
22
|
+
/** 代理的节点组件 */
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "proxy", void 0);
|
|
24
|
+
/** 代理节点组件的相关属性 */
|
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "parent", void 0);
|
|
26
|
+
_this.proxy = proxy;
|
|
27
|
+
_this.parent = proxy.parent;
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 在开始节点的前面、插入新节点
|
|
33
|
+
* @param newNode 新节点
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
_createClass(ELStartNode, [{
|
|
37
|
+
key: "prepend",
|
|
38
|
+
value: function prepend(newNode) {
|
|
39
|
+
return this.proxy.prepend(newNode);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 在开始节点的后面、插入新节点
|
|
44
|
+
* @param newNode 新节点
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
}, {
|
|
48
|
+
key: "append",
|
|
49
|
+
value: function append(newNode) {
|
|
50
|
+
return this.proxy.prependChild(newNode);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 删除开始节点
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "remove",
|
|
58
|
+
value: function remove() {
|
|
59
|
+
return this.proxy.remove();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 替换当前节点为新节点
|
|
64
|
+
* @param newNode 新节点
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "replace",
|
|
69
|
+
value: function replace(newNode) {
|
|
70
|
+
return this.proxy.replace(newNode);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 转换为X6的图数据格式
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "toCells",
|
|
78
|
+
value: function toCells() {
|
|
79
|
+
throw new Error('Method not implemented.');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 获取当前X6 Cell内容
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "getCells",
|
|
87
|
+
value: function getCells() {
|
|
88
|
+
return this.proxy.getCells();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 获取当前X6 节点内容
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "getNodes",
|
|
96
|
+
value: function getNodes() {
|
|
97
|
+
return this.proxy.getNodes();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 获取当前节点的开始节点
|
|
102
|
+
*/
|
|
103
|
+
}, {
|
|
104
|
+
key: "getStartNode",
|
|
105
|
+
value: function getStartNode() {
|
|
106
|
+
return this.proxy.getStartNode();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 获取当前节点的结束节点
|
|
111
|
+
*/
|
|
112
|
+
}, {
|
|
113
|
+
key: "getEndNode",
|
|
114
|
+
value: function getEndNode() {
|
|
115
|
+
return this.proxy.getEndNode();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 获取属性
|
|
120
|
+
* @returns 属性
|
|
121
|
+
*/
|
|
122
|
+
}, {
|
|
123
|
+
key: "getProperties",
|
|
124
|
+
value: function getProperties() {
|
|
125
|
+
return this.proxy.getProperties();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 设置属性
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "setProperties",
|
|
133
|
+
value: function setProperties(properties) {
|
|
134
|
+
this.proxy.setProperties(properties);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 获取属性的EL表达式
|
|
139
|
+
* @returns 属性的EL表达式
|
|
140
|
+
*/
|
|
141
|
+
}, {
|
|
142
|
+
key: "propertiesToEL",
|
|
143
|
+
value: function propertiesToEL() {
|
|
144
|
+
return this.proxy.propertiesToEL();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 转换为EL表达式字符串
|
|
149
|
+
*/
|
|
150
|
+
}, {
|
|
151
|
+
key: "toEL",
|
|
152
|
+
value: function toEL(prefix) {
|
|
153
|
+
return this.proxy.toEL(prefix);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 转换为JSON格式
|
|
158
|
+
*/
|
|
159
|
+
}, {
|
|
160
|
+
key: "toJSON",
|
|
161
|
+
value: function toJSON() {
|
|
162
|
+
return this.proxy.toJSON();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 是否折叠
|
|
167
|
+
*/
|
|
168
|
+
}, {
|
|
169
|
+
key: "isCollapsed",
|
|
170
|
+
value: function isCollapsed() {
|
|
171
|
+
return this.proxy.isCollapsed();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* 折叠:展开、收起
|
|
176
|
+
*/
|
|
177
|
+
}, {
|
|
178
|
+
key: "toggleCollapse",
|
|
179
|
+
value: function toggleCollapse(collapsed) {
|
|
180
|
+
this.proxy.toggleCollapse(collapsed);
|
|
181
|
+
}
|
|
182
|
+
}]);
|
|
183
|
+
return ELStartNode;
|
|
184
|
+
}(ELNode);
|
|
185
|
+
export { ELStartNode as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Cell, Node } from '@antv/x6';
|
|
2
|
+
import ELNode, { Properties } from '../node';
|
|
3
|
+
import { NodeTypeEnum } from '../../constant';
|
|
4
|
+
/**
|
|
5
|
+
* 操作符中占位节点的模型(作为占位节点的代理),
|
|
6
|
+
* 操作符包括IF等等
|
|
7
|
+
*/
|
|
8
|
+
export default class ELVirtualNode extends ELNode {
|
|
9
|
+
type: NodeTypeEnum;
|
|
10
|
+
index: number;
|
|
11
|
+
parent: ELNode;
|
|
12
|
+
proxy: ELNode;
|
|
13
|
+
constructor(parent: ELNode, index: number, proxy: ELNode);
|
|
14
|
+
/**
|
|
15
|
+
* 在结束节点的前面、插入新节点
|
|
16
|
+
* @param newNode 新节点
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
prepend(newNode: ELNode): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 在结束节点的后面、插入新节点
|
|
22
|
+
* @param newNode 新节点
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
append(newNode: ELNode): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 删除结束节点
|
|
28
|
+
*/
|
|
29
|
+
remove(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 替换当前节点为新节点
|
|
32
|
+
* @param newNode 新节点
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
replace(newNode: ELNode): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 转换为X6的图数据格式
|
|
38
|
+
*/
|
|
39
|
+
toCells(): Cell[];
|
|
40
|
+
/**
|
|
41
|
+
* 获取当前X6 Cell内容
|
|
42
|
+
*/
|
|
43
|
+
getCells(): Cell[];
|
|
44
|
+
/**
|
|
45
|
+
* 获取当前X6 节点内容
|
|
46
|
+
*/
|
|
47
|
+
getNodes(): Node[];
|
|
48
|
+
/**
|
|
49
|
+
* 获取当前节点的开始节点
|
|
50
|
+
*/
|
|
51
|
+
getStartNode(): Node;
|
|
52
|
+
/**
|
|
53
|
+
* 获取当前节点的结束节点
|
|
54
|
+
*/
|
|
55
|
+
getEndNode(): Node;
|
|
56
|
+
/**
|
|
57
|
+
* 获取属性
|
|
58
|
+
* @returns 属性
|
|
59
|
+
*/
|
|
60
|
+
getProperties(): Properties;
|
|
61
|
+
/**
|
|
62
|
+
* 设置属性
|
|
63
|
+
*/
|
|
64
|
+
setProperties(properties: Properties): void;
|
|
65
|
+
/**
|
|
66
|
+
* 获取属性的EL表达式
|
|
67
|
+
* @returns 属性的EL表达式
|
|
68
|
+
*/
|
|
69
|
+
propertiesToEL(): string;
|
|
70
|
+
/**
|
|
71
|
+
* 转换为EL表达式字符串
|
|
72
|
+
*/
|
|
73
|
+
toEL(prefix?: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* 转换为JSON格式
|
|
76
|
+
*/
|
|
77
|
+
toJSON(): Record<string, any>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
import ELNode from "../node";
|
|
8
|
+
import { NodeTypeEnum } from "../../constant";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 操作符中占位节点的模型(作为占位节点的代理),
|
|
12
|
+
* 操作符包括IF等等
|
|
13
|
+
*/
|
|
14
|
+
var ELVirtualNode = /*#__PURE__*/function (_ELNode) {
|
|
15
|
+
_inherits(ELVirtualNode, _ELNode);
|
|
16
|
+
var _super = _createSuper(ELVirtualNode);
|
|
17
|
+
function ELVirtualNode(parent, index, proxy) {
|
|
18
|
+
var _this;
|
|
19
|
+
_classCallCheck(this, ELVirtualNode);
|
|
20
|
+
_this = _super.call(this);
|
|
21
|
+
_defineProperty(_assertThisInitialized(_this), "type", NodeTypeEnum.VIRTUAL);
|
|
22
|
+
_defineProperty(_assertThisInitialized(_this), "index", 0);
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "parent", void 0);
|
|
24
|
+
_defineProperty(_assertThisInitialized(_this), "proxy", void 0);
|
|
25
|
+
_this.parent = parent;
|
|
26
|
+
_this.index = index;
|
|
27
|
+
_this.proxy = proxy;
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 在结束节点的前面、插入新节点
|
|
33
|
+
* @param newNode 新节点
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
_createClass(ELVirtualNode, [{
|
|
37
|
+
key: "prepend",
|
|
38
|
+
value: function prepend(newNode) {
|
|
39
|
+
return this.replace(newNode);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 在结束节点的后面、插入新节点
|
|
44
|
+
* @param newNode 新节点
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
}, {
|
|
48
|
+
key: "append",
|
|
49
|
+
value: function append(newNode) {
|
|
50
|
+
return this.replace(newNode);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 删除结束节点
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "remove",
|
|
58
|
+
value: function remove() {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 替换当前节点为新节点
|
|
64
|
+
* @param newNode 新节点
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "replace",
|
|
69
|
+
value: function replace(newNode) {
|
|
70
|
+
return this.parent.appendChild(newNode, this.index);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 转换为X6的图数据格式
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "toCells",
|
|
78
|
+
value: function toCells() {
|
|
79
|
+
return this.proxy.toCells();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 获取当前X6 Cell内容
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "getCells",
|
|
87
|
+
value: function getCells() {
|
|
88
|
+
return this.proxy.getCells();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 获取当前X6 节点内容
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "getNodes",
|
|
96
|
+
value: function getNodes() {
|
|
97
|
+
return this.proxy.getNodes();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 获取当前节点的开始节点
|
|
102
|
+
*/
|
|
103
|
+
}, {
|
|
104
|
+
key: "getStartNode",
|
|
105
|
+
value: function getStartNode() {
|
|
106
|
+
return this.proxy.getStartNode();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 获取当前节点的结束节点
|
|
111
|
+
*/
|
|
112
|
+
}, {
|
|
113
|
+
key: "getEndNode",
|
|
114
|
+
value: function getEndNode() {
|
|
115
|
+
return this.proxy.getEndNode();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 获取属性
|
|
120
|
+
* @returns 属性
|
|
121
|
+
*/
|
|
122
|
+
}, {
|
|
123
|
+
key: "getProperties",
|
|
124
|
+
value: function getProperties() {
|
|
125
|
+
return this.proxy.getProperties();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 设置属性
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "setProperties",
|
|
133
|
+
value: function setProperties(properties) {
|
|
134
|
+
this.proxy.setProperties(properties);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 获取属性的EL表达式
|
|
139
|
+
* @returns 属性的EL表达式
|
|
140
|
+
*/
|
|
141
|
+
}, {
|
|
142
|
+
key: "propertiesToEL",
|
|
143
|
+
value: function propertiesToEL() {
|
|
144
|
+
return this.proxy.propertiesToEL();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 转换为EL表达式字符串
|
|
149
|
+
*/
|
|
150
|
+
}, {
|
|
151
|
+
key: "toEL",
|
|
152
|
+
value: function toEL(prefix) {
|
|
153
|
+
return this.proxy.toEL(prefix);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 转换为JSON格式
|
|
158
|
+
*/
|
|
159
|
+
}, {
|
|
160
|
+
key: "toJSON",
|
|
161
|
+
value: function toJSON() {
|
|
162
|
+
return this.proxy.toJSON();
|
|
163
|
+
}
|
|
164
|
+
}]);
|
|
165
|
+
return ELVirtualNode;
|
|
166
|
+
}(ELNode);
|
|
167
|
+
export { ELVirtualNode as default };
|