@lcap/nasl 2.22.2-beta.3 → 2.22.2-beta.5
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/out/automate/engine/index.d.ts +4 -0
- package/out/automate/engine/index.js +443 -0
- package/out/automate/engine/index.js.map +1 -0
- package/out/automate/engine/operators.d.ts +24 -0
- package/out/automate/engine/operators.js +252 -0
- package/out/automate/engine/operators.js.map +1 -0
- package/out/automate/engine/uniqueName.d.ts +12 -0
- package/out/automate/engine/uniqueName.js +112 -0
- package/out/automate/engine/uniqueName.js.map +1 -0
- package/out/automate/engine/utils.d.ts +25 -0
- package/out/automate/engine/utils.js +428 -0
- package/out/automate/engine/utils.js.map +1 -0
- package/out/automate/engine/viewCache.d.ts +19 -0
- package/out/automate/engine/viewCache.js +45 -0
- package/out/automate/engine/viewCache.js.map +1 -0
- package/out/automate/template/myProcess.d.ts +10 -0
- package/out/automate/template/myProcess.js +11498 -0
- package/out/automate/template/myProcess.js.map +1 -0
- package/out/bak/translator.d.ts +1 -0
- package/out/bak/translator.js +130 -0
- package/out/bak/translator.js.map +1 -0
- package/out/common/BaseNode.d.ts +306 -0
- package/out/common/BaseNode.js +1222 -0
- package/out/common/BaseNode.js.map +1 -0
- package/out/common/Command.d.ts +20 -0
- package/out/common/Command.js +66 -0
- package/out/common/Command.js.map +1 -0
- package/out/common/ComponentAPI.d.ts +110 -0
- package/out/common/ComponentAPI.js +3 -0
- package/out/common/ComponentAPI.js.map +1 -0
- package/out/common/EventEmitter.d.ts +59 -0
- package/out/common/EventEmitter.js +69 -0
- package/out/common/EventEmitter.js.map +1 -0
- package/out/common/Messager.d.ts +91 -0
- package/out/common/Messager.js +208 -0
- package/out/common/Messager.js.map +1 -0
- package/out/common/index.d.ts +3 -0
- package/out/common/index.js +20 -0
- package/out/common/index.js.map +1 -0
- package/out/concepts/Abort__.d.ts +26 -0
- package/out/concepts/Abort__.js +79 -0
- package/out/concepts/Abort__.js.map +1 -0
- package/out/concepts/Anchor__.d.ts +45 -0
- package/out/concepts/Anchor__.js +182 -0
- package/out/concepts/Anchor__.js.map +1 -0
- package/out/concepts/AnonymousFunction__.d.ts +173 -0
- package/out/concepts/AnonymousFunction__.js +484 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.d.ts +1166 -0
- package/out/concepts/App__.js +1885 -0
- package/out/concepts/App__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +66 -0
- package/out/concepts/Argument__.js +267 -0
- package/out/concepts/Argument__.js.map +1 -0
- package/out/concepts/Assignee__.d.ts +289 -0
- package/out/concepts/Assignee__.js +426 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/AssignmentLine__.d.ts +42 -0
- package/out/concepts/AssignmentLine__.js +111 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/Assignment__.d.ts +74 -0
- package/out/concepts/Assignment__.js +287 -0
- package/out/concepts/Assignment__.js.map +1 -0
- package/out/concepts/Attribute__.d.ts +98 -0
- package/out/concepts/Attribute__.js +206 -0
- package/out/concepts/Attribute__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +252 -0
- package/out/concepts/BatchAssignment__.js +806 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BinaryExpression__.d.ts +71 -0
- package/out/concepts/BinaryExpression__.js +347 -0
- package/out/concepts/BinaryExpression__.js.map +1 -0
- package/out/concepts/BindAttribute__.d.ts +319 -0
- package/out/concepts/BindAttribute__.js +896 -0
- package/out/concepts/BindAttribute__.js.map +1 -0
- package/out/concepts/BindDirective__.d.ts +162 -0
- package/out/concepts/BindDirective__.js +538 -0
- package/out/concepts/BindDirective__.js.map +1 -0
- package/out/concepts/BindEvent__.d.ts +240 -0
- package/out/concepts/BindEvent__.js +764 -0
- package/out/concepts/BindEvent__.js.map +1 -0
- package/out/concepts/BindStyle__.d.ts +140 -0
- package/out/concepts/BindStyle__.js +433 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/BooleanLiteral__.d.ts +35 -0
- package/out/concepts/BooleanLiteral__.js +100 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -0
- package/out/concepts/CallFunction__.d.ts +159 -0
- package/out/concepts/CallFunction__.js +503 -0
- package/out/concepts/CallFunction__.js.map +1 -0
- package/out/concepts/CallInterface__.d.ts +116 -0
- package/out/concepts/CallInterface__.js +570 -0
- package/out/concepts/CallInterface__.js.map +1 -0
- package/out/concepts/CallLogic__.d.ts +187 -0
- package/out/concepts/CallLogic__.js +1007 -0
- package/out/concepts/CallLogic__.js.map +1 -0
- package/out/concepts/CallQueryComponent__.d.ts +433 -0
- package/out/concepts/CallQueryComponent__.js +1267 -0
- package/out/concepts/CallQueryComponent__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +32 -0
- package/out/concepts/Comment__.js +96 -0
- package/out/concepts/Comment__.js.map +1 -0
- package/out/concepts/CompletionProperty__.d.ts +105 -0
- package/out/concepts/CompletionProperty__.js +262 -0
- package/out/concepts/CompletionProperty__.js.map +1 -0
- package/out/concepts/ConfigGroup__.d.ts +124 -0
- package/out/concepts/ConfigGroup__.js +237 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +45 -0
- package/out/concepts/ConfigPropertyValue__.js +107 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +154 -0
- package/out/concepts/ConfigProperty__.js +324 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +124 -0
- package/out/concepts/Configuration__.js +228 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +106 -0
- package/out/concepts/Constant__.js +249 -0
- package/out/concepts/Constant__.js.map +1 -0
- package/out/concepts/DataElement__.d.ts +47 -0
- package/out/concepts/DataElement__.js +119 -0
- package/out/concepts/DataElement__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +165 -0
- package/out/concepts/DataSource__.js +442 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +32 -0
- package/out/concepts/DatabaseTypeAnnotation__.js +79 -0
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
- package/out/concepts/Destination__.d.ts +157 -0
- package/out/concepts/Destination__.js +740 -0
- package/out/concepts/Destination__.js.map +1 -0
- package/out/concepts/End__.d.ts +25 -0
- package/out/concepts/End__.js +86 -0
- package/out/concepts/End__.js.map +1 -0
- package/out/concepts/EntityIndex__.d.ts +96 -0
- package/out/concepts/EntityIndex__.js +221 -0
- package/out/concepts/EntityIndex__.js.map +1 -0
- package/out/concepts/EntityProperty__.d.ts +274 -0
- package/out/concepts/EntityProperty__.js +824 -0
- package/out/concepts/EntityProperty__.js.map +1 -0
- package/out/concepts/Entity__.d.ts +339 -0
- package/out/concepts/Entity__.js +711 -0
- package/out/concepts/Entity__.js.map +1 -0
- package/out/concepts/EnumItem__.d.ts +64 -0
- package/out/concepts/EnumItem__.js +146 -0
- package/out/concepts/EnumItem__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +138 -0
- package/out/concepts/Enum__.js +322 -0
- package/out/concepts/Enum__.js.map +1 -0
- package/out/concepts/Event__.d.ts +144 -0
- package/out/concepts/Event__.js +249 -0
- package/out/concepts/Event__.js.map +1 -0
- package/out/concepts/ExternalDestination__.d.ts +76 -0
- package/out/concepts/ExternalDestination__.js +286 -0
- package/out/concepts/ExternalDestination__.js.map +1 -0
- package/out/concepts/ForEachStatement__.d.ts +189 -0
- package/out/concepts/ForEachStatement__.js +446 -0
- package/out/concepts/ForEachStatement__.js.map +1 -0
- package/out/concepts/FrontendLibrary__.d.ts +214 -0
- package/out/concepts/FrontendLibrary__.js +353 -0
- package/out/concepts/FrontendLibrary__.js.map +1 -0
- package/out/concepts/Frontend__.d.ts +374 -0
- package/out/concepts/Frontend__.js +690 -0
- package/out/concepts/Frontend__.js.map +1 -0
- package/out/concepts/Function__.d.ts +417 -0
- package/out/concepts/Function__.js +717 -0
- package/out/concepts/Function__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +52 -0
- package/out/concepts/Identifier__.js +296 -0
- package/out/concepts/Identifier__.js.map +1 -0
- package/out/concepts/IfStatement__.d.ts +158 -0
- package/out/concepts/IfStatement__.js +305 -0
- package/out/concepts/IfStatement__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +54 -0
- package/out/concepts/Integration__.js +143 -0
- package/out/concepts/Integration__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +111 -0
- package/out/concepts/InterfaceParam__.js +266 -0
- package/out/concepts/InterfaceParam__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +284 -0
- package/out/concepts/Interface__.js +749 -0
- package/out/concepts/Interface__.js.map +1 -0
- package/out/concepts/JSBlock__.d.ts +34 -0
- package/out/concepts/JSBlock__.js +106 -0
- package/out/concepts/JSBlock__.js.map +1 -0
- package/out/concepts/JavaLogic__.d.ts +43 -0
- package/out/concepts/JavaLogic__.js +124 -0
- package/out/concepts/JavaLogic__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +126 -0
- package/out/concepts/LogicItem__.js +253 -0
- package/out/concepts/LogicItem__.js.map +1 -0
- package/out/concepts/Logic__.d.ts +633 -0
- package/out/concepts/Logic__.js +1568 -0
- package/out/concepts/Logic__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +258 -0
- package/out/concepts/MatchCase__.js +591 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +124 -0
- package/out/concepts/Match__.js +628 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/MemberExpression__.d.ts +73 -0
- package/out/concepts/MemberExpression__.js +319 -0
- package/out/concepts/MemberExpression__.js.map +1 -0
- package/out/concepts/MetadataType__.d.ts +245 -0
- package/out/concepts/MetadataType__.js +473 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.d.ts +52 -0
- package/out/concepts/MicroApp__.js +119 -0
- package/out/concepts/MicroApp__.js.map +1 -0
- package/out/concepts/Module__.d.ts +978 -0
- package/out/concepts/Module__.js +1386 -0
- package/out/concepts/Module__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +1069 -0
- package/out/concepts/Namespace__.js +1380 -0
- package/out/concepts/Namespace__.js.map +1 -0
- package/out/concepts/NewComposite__.d.ts +346 -0
- package/out/concepts/NewComposite__.js +1086 -0
- package/out/concepts/NewComposite__.js.map +1 -0
- package/out/concepts/NewList__.d.ts +133 -0
- package/out/concepts/NewList__.js +385 -0
- package/out/concepts/NewList__.js.map +1 -0
- package/out/concepts/NewMap__.d.ts +224 -0
- package/out/concepts/NewMap__.js +530 -0
- package/out/concepts/NewMap__.js.map +1 -0
- package/out/concepts/New__.d.ts +21 -0
- package/out/concepts/New__.js +68 -0
- package/out/concepts/New__.js.map +1 -0
- package/out/concepts/NullLiteral__.d.ts +27 -0
- package/out/concepts/NullLiteral__.js +81 -0
- package/out/concepts/NullLiteral__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +56 -0
- package/out/concepts/NumericLiteral__.js +174 -0
- package/out/concepts/NumericLiteral__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +73 -0
- package/out/concepts/OqlQueryComponent__.js +327 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/Param__.d.ts +161 -0
- package/out/concepts/Param__.js +431 -0
- package/out/concepts/Param__.js.map +1 -0
- package/out/concepts/Point__.d.ts +32 -0
- package/out/concepts/Point__.js +79 -0
- package/out/concepts/Point__.js.map +1 -0
- package/out/concepts/ProcessComponent__.d.ts +220 -0
- package/out/concepts/ProcessComponent__.js +339 -0
- package/out/concepts/ProcessComponent__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +647 -0
- package/out/concepts/ProcessElement__.js +1220 -0
- package/out/concepts/ProcessElement__.js.map +1 -0
- package/out/concepts/ProcessOutcome__.d.ts +32 -0
- package/out/concepts/ProcessOutcome__.js +90 -0
- package/out/concepts/ProcessOutcome__.js.map +1 -0
- package/out/concepts/ProcessOutcomes__.d.ts +32 -0
- package/out/concepts/ProcessOutcomes__.js +89 -0
- package/out/concepts/ProcessOutcomes__.js.map +1 -0
- package/out/concepts/Process__.d.ts +614 -0
- package/out/concepts/Process__.js +1031 -0
- package/out/concepts/Process__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +52 -0
- package/out/concepts/QueryAggregateExpression__.js +149 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -0
- package/out/concepts/QueryFieldExpression__.d.ts +54 -0
- package/out/concepts/QueryFieldExpression__.js +160 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -0
- package/out/concepts/QueryFromExpression__.d.ts +97 -0
- package/out/concepts/QueryFromExpression__.js +197 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -0
- package/out/concepts/QueryGroupByExpression__.d.ts +47 -0
- package/out/concepts/QueryGroupByExpression__.js +142 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -0
- package/out/concepts/QueryJoinExpression__.d.ts +184 -0
- package/out/concepts/QueryJoinExpression__.js +318 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -0
- package/out/concepts/QueryLimitExpression__.d.ts +58 -0
- package/out/concepts/QueryLimitExpression__.js +160 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -0
- package/out/concepts/QueryOrderByExpression__.d.ts +69 -0
- package/out/concepts/QueryOrderByExpression__.js +173 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -0
- package/out/concepts/QuerySelectExpression__.d.ts +204 -0
- package/out/concepts/QuerySelectExpression__.js +295 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -0
- package/out/concepts/Rect__.d.ts +40 -0
- package/out/concepts/Rect__.js +95 -0
- package/out/concepts/Rect__.js.map +1 -0
- package/out/concepts/Return__.d.ts +129 -0
- package/out/concepts/Return__.js +345 -0
- package/out/concepts/Return__.js.map +1 -0
- package/out/concepts/Role__.d.ts +63 -0
- package/out/concepts/Role__.js +170 -0
- package/out/concepts/Role__.js.map +1 -0
- package/out/concepts/SelectMembers__.d.ts +143 -0
- package/out/concepts/SelectMembers__.js +293 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +75 -0
- package/out/concepts/Slot__.js +165 -0
- package/out/concepts/Slot__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +71 -0
- package/out/concepts/SqlQueryComponent__.js +271 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -0
- package/out/concepts/Start__.d.ts +25 -0
- package/out/concepts/Start__.js +73 -0
- package/out/concepts/Start__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +117 -0
- package/out/concepts/StringInterpolation__.js +252 -0
- package/out/concepts/StringInterpolation__.js.map +1 -0
- package/out/concepts/StringLiteral__.d.ts +38 -0
- package/out/concepts/StringLiteral__.js +134 -0
- package/out/concepts/StringLiteral__.js.map +1 -0
- package/out/concepts/StructureProperty__.d.ts +131 -0
- package/out/concepts/StructureProperty__.js +303 -0
- package/out/concepts/StructureProperty__.js.map +1 -0
- package/out/concepts/Structure__.d.ts +252 -0
- package/out/concepts/Structure__.js +447 -0
- package/out/concepts/Structure__.js.map +1 -0
- package/out/concepts/SwitchCase__.d.ts +94 -0
- package/out/concepts/SwitchCase__.js +232 -0
- package/out/concepts/SwitchCase__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +84 -0
- package/out/concepts/SwitchStatement__.js +177 -0
- package/out/concepts/SwitchStatement__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +38 -0
- package/out/concepts/Theme__.js +88 -0
- package/out/concepts/Theme__.js.map +1 -0
- package/out/concepts/Transactional__.d.ts +83 -0
- package/out/concepts/Transactional__.js +162 -0
- package/out/concepts/Transactional__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.d.ts +290 -0
- package/out/concepts/TypeAnnotation__.js +885 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -0
- package/out/concepts/TypeParam__.d.ts +25 -0
- package/out/concepts/TypeParam__.js +73 -0
- package/out/concepts/TypeParam__.js.map +1 -0
- package/out/concepts/UnaryExpression__.d.ts +49 -0
- package/out/concepts/UnaryExpression__.js +176 -0
- package/out/concepts/UnaryExpression__.js.map +1 -0
- package/out/concepts/Unparsed__.d.ts +32 -0
- package/out/concepts/Unparsed__.js +94 -0
- package/out/concepts/Unparsed__.js.map +1 -0
- package/out/concepts/UseComponent__.d.ts +32 -0
- package/out/concepts/UseComponent__.js +79 -0
- package/out/concepts/UseComponent__.js.map +1 -0
- package/out/concepts/ValidationRule__.d.ts +142 -0
- package/out/concepts/ValidationRule__.js +473 -0
- package/out/concepts/ValidationRule__.js.map +1 -0
- package/out/concepts/Variable__.d.ts +139 -0
- package/out/concepts/Variable__.js +386 -0
- package/out/concepts/Variable__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +36 -0
- package/out/concepts/ViewBlock__.js +87 -0
- package/out/concepts/ViewBlock__.js.map +1 -0
- package/out/concepts/ViewComponent__.d.ts +566 -0
- package/out/concepts/ViewComponent__.js +762 -0
- package/out/concepts/ViewComponent__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +597 -0
- package/out/concepts/ViewElement__.js +1777 -0
- package/out/concepts/ViewElement__.js.map +1 -0
- package/out/concepts/View__.d.ts +714 -0
- package/out/concepts/View__.js +1733 -0
- package/out/concepts/View__.js.map +1 -0
- package/out/concepts/WhileStatement__.d.ts +97 -0
- package/out/concepts/WhileStatement__.js +211 -0
- package/out/concepts/WhileStatement__.js.map +1 -0
- package/out/concepts/basics/stdlib/index.d.ts +4 -0
- package/out/concepts/basics/stdlib/index.js +29 -0
- package/out/concepts/basics/stdlib/index.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +140 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +133 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.collection.js +52 -0
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +33 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.core.js +49 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.event.js +25 -0
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +43 -0
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.io.js +52 -0
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.logging.js +56 -0
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.process.js +638 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.ui.js +1043 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.util.js +1798 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +565 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +26 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
- package/out/concepts/basics/types/coreTypeList.d.ts +2 -0
- package/out/concepts/basics/types/coreTypeList.js +15 -0
- package/out/concepts/basics/types/coreTypeList.js.map +1 -0
- package/out/concepts/basics/types/index.d.ts +15 -0
- package/out/concepts/basics/types/index.js +32 -0
- package/out/concepts/basics/types/index.js.map +1 -0
- package/out/concepts/index.d.ts +5 -0
- package/out/concepts/index.js +24 -0
- package/out/concepts/index.js.map +1 -0
- package/out/concepts/index__.d.ts +108 -0
- package/out/concepts/index__.js +125 -0
- package/out/concepts/index__.js.map +1 -0
- package/out/config.d.ts +44 -0
- package/out/config.js +73 -0
- package/out/config.js.map +1 -0
- package/out/decorators/index.d.ts +56 -0
- package/out/decorators/index.js +159 -0
- package/out/decorators/index.js.map +1 -0
- package/out/enums/KEYWORDS.d.ts +6 -0
- package/out/enums/KEYWORDS.js +1243 -0
- package/out/enums/KEYWORDS.js.map +1 -0
- package/out/enums/LEVEL_NAME_MAP.d.ts +26 -0
- package/out/enums/LEVEL_NAME_MAP.js +30 -0
- package/out/enums/LEVEL_NAME_MAP.js.map +1 -0
- package/out/eventBus.d.ts +3 -0
- package/out/eventBus.js +7 -0
- package/out/eventBus.js.map +1 -0
- package/out/generator/compileComponent.d.ts +11 -0
- package/out/generator/compileComponent.js +12 -0
- package/out/generator/compileComponent.js.map +1 -0
- package/out/generator/genBundleFiles.d.ts +33 -0
- package/out/generator/genBundleFiles.js +501 -0
- package/out/generator/genBundleFiles.js.map +1 -0
- package/out/generator/genHash.d.ts +7 -0
- package/out/generator/genHash.js +39 -0
- package/out/generator/genHash.js.map +1 -0
- package/out/generator/genMetaData.d.ts +28 -0
- package/out/generator/genMetaData.js +288 -0
- package/out/generator/genMetaData.js.map +1 -0
- package/out/generator/genReleaseBody.d.ts +60 -0
- package/out/generator/genReleaseBody.js +493 -0
- package/out/generator/genReleaseBody.js.map +1 -0
- package/out/generator/icestark.d.ts +2 -0
- package/out/generator/icestark.js +48 -0
- package/out/generator/icestark.js.map +1 -0
- package/out/generator/index.d.ts +7 -0
- package/out/generator/index.js +24 -0
- package/out/generator/index.js.map +1 -0
- package/out/generator/microApp.d.ts +2 -0
- package/out/generator/microApp.js +35 -0
- package/out/generator/microApp.js.map +1 -0
- package/out/generator/permission.d.ts +10 -0
- package/out/generator/permission.js +269 -0
- package/out/generator/permission.js.map +1 -0
- package/out/generator/qiankun.d.ts +2 -0
- package/out/generator/qiankun.js +52 -0
- package/out/generator/qiankun.js.map +1 -0
- package/out/generator/styleReplacer.d.ts +3 -0
- package/out/generator/styleReplacer.js +71 -0
- package/out/generator/styleReplacer.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.js +64 -0
- package/out/index.js.map +1 -0
- package/out/manager/diagnostic.d.ts +35 -0
- package/out/manager/diagnostic.js +63 -0
- package/out/manager/diagnostic.js.map +1 -0
- package/out/manager/stepRecorder.d.ts +20 -0
- package/out/manager/stepRecorder.js +110 -0
- package/out/manager/stepRecorder.js.map +1 -0
- package/out/sentry/index.d.ts +29 -0
- package/out/sentry/index.js +111 -0
- package/out/sentry/index.js.map +1 -0
- package/out/server/createUiTs.d.ts +16 -0
- package/out/server/createUiTs.js +248 -0
- package/out/server/createUiTs.js.map +1 -0
- package/out/server/entity2LogicNamespace.d.ts +10 -0
- package/out/server/entity2LogicNamespace.js +380 -0
- package/out/server/entity2LogicNamespace.js.map +1 -0
- package/out/server/event.d.ts +30 -0
- package/out/server/event.js +151 -0
- package/out/server/event.js.map +1 -0
- package/out/server/extendBaseNode.d.ts +1 -0
- package/out/server/extendBaseNode.js +475 -0
- package/out/server/extendBaseNode.js.map +1 -0
- package/out/server/formatTsUtils.d.ts +36 -0
- package/out/server/formatTsUtils.js +788 -0
- package/out/server/formatTsUtils.js.map +1 -0
- package/out/server/getExtensionModules.d.ts +3 -0
- package/out/server/getExtensionModules.js +20 -0
- package/out/server/getExtensionModules.js.map +1 -0
- package/out/server/getFunctions.d.ts +3 -0
- package/out/server/getFunctions.js +20 -0
- package/out/server/getFunctions.js.map +1 -0
- package/out/server/getInterfaces.d.ts +2 -0
- package/out/server/getInterfaces.js +48 -0
- package/out/server/getInterfaces.js.map +1 -0
- package/out/server/getLogging.d.ts +1 -0
- package/out/server/getLogging.js +9 -0
- package/out/server/getLogging.js.map +1 -0
- package/out/server/getLogics.d.ts +4 -0
- package/out/server/getLogics.js +352 -0
- package/out/server/getLogics.js.map +1 -0
- package/out/server/getMemberIdentifier.d.ts +15 -0
- package/out/server/getMemberIdentifier.js +290 -0
- package/out/server/getMemberIdentifier.js.map +1 -0
- package/out/server/getProcessComponents.d.ts +2 -0
- package/out/server/getProcessComponents.js +13 -0
- package/out/server/getProcessComponents.js.map +1 -0
- package/out/server/getProcesses.d.ts +33 -0
- package/out/server/getProcesses.js +599 -0
- package/out/server/getProcesses.js.map +1 -0
- package/out/server/getScope.d.ts +13 -0
- package/out/server/getScope.js +61 -0
- package/out/server/getScope.js.map +1 -0
- package/out/server/getValidates.d.ts +3 -0
- package/out/server/getValidates.js +14 -0
- package/out/server/getValidates.js.map +1 -0
- package/out/server/index.d.ts +5 -0
- package/out/server/index.js +38 -0
- package/out/server/index.js.map +1 -0
- package/out/server/naslServer.d.ts +363 -0
- package/out/server/naslServer.js +4382 -0
- package/out/server/naslServer.js.map +1 -0
- package/out/server/naslStdlibMap.d.ts +2 -0
- package/out/server/naslStdlibMap.js +50 -0
- package/out/server/naslStdlibMap.js.map +1 -0
- package/out/server/process2LogicNamespace.d.ts +26 -0
- package/out/server/process2LogicNamespace.js +109 -0
- package/out/server/process2LogicNamespace.js.map +1 -0
- package/out/server/translator.d.ts +26 -0
- package/out/server/translator.js +787 -0
- package/out/server/translator.js.map +1 -0
- package/out/service/creator/add.configs.d.ts +1 -0
- package/out/service/creator/add.configs.js +74 -0
- package/out/service/creator/add.configs.js.map +1 -0
- package/out/service/creator/errHandles.d.ts +18 -0
- package/out/service/creator/errHandles.js +75 -0
- package/out/service/creator/errHandles.js.map +1 -0
- package/out/service/creator/index.d.ts +1 -0
- package/out/service/creator/index.js +74 -0
- package/out/service/creator/index.js.map +1 -0
- package/out/service/datasource/api.d.ts +12 -0
- package/out/service/datasource/api.js +14 -0
- package/out/service/datasource/api.js.map +1 -0
- package/out/service/datasource/index.d.ts +2 -0
- package/out/service/datasource/index.js +10 -0
- package/out/service/datasource/index.js.map +1 -0
- package/out/service/defaultErrorMessage.json +98 -0
- package/out/service/logic/api.d.ts +9 -0
- package/out/service/logic/api.js +11 -0
- package/out/service/logic/api.js.map +1 -0
- package/out/service/logic/index.d.ts +2 -0
- package/out/service/logic/index.js +10 -0
- package/out/service/logic/index.js.map +1 -0
- package/out/service/storage/api.d.ts +45 -0
- package/out/service/storage/api.js +36 -0
- package/out/service/storage/api.js.map +1 -0
- package/out/service/storage/index.d.ts +2 -0
- package/out/service/storage/index.js +10 -0
- package/out/service/storage/index.js.map +1 -0
- package/out/service/storage/init.d.ts +65 -0
- package/out/service/storage/init.js +798 -0
- package/out/service/storage/init.js.map +1 -0
- package/out/service/storage/jsoner.d.ts +36 -0
- package/out/service/storage/jsoner.js +131 -0
- package/out/service/storage/jsoner.js.map +1 -0
- package/out/service/storage/map.d.ts +4 -0
- package/out/service/storage/map.js +54 -0
- package/out/service/storage/map.js.map +1 -0
- package/out/service/storage/service.d.ts +22 -0
- package/out/service/storage/service.js +70 -0
- package/out/service/storage/service.js.map +1 -0
- package/out/service/storage/storagePoint.d.ts +17 -0
- package/out/service/storage/storagePoint.js +76 -0
- package/out/service/storage/storagePoint.js.map +1 -0
- package/out/templator/genCallComponentLogic.d.ts +17 -0
- package/out/templator/genCallComponentLogic.js +30 -0
- package/out/templator/genCallComponentLogic.js.map +1 -0
- package/out/templator/genCreateBlock.d.ts +10 -0
- package/out/templator/genCreateBlock.js +338 -0
- package/out/templator/genCreateBlock.js.map +1 -0
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +516 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
- package/out/templator/genCurdMultipleKeyBlock.d.ts +34 -0
- package/out/templator/genCurdMultipleKeyBlock.js +709 -0
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
- package/out/templator/genEditTableBlock.d.ts +51 -0
- package/out/templator/genEditTableBlock.js +299 -0
- package/out/templator/genEditTableBlock.js.map +1 -0
- package/out/templator/genEnumSelectBlock.d.ts +10 -0
- package/out/templator/genEnumSelectBlock.js +26 -0
- package/out/templator/genEnumSelectBlock.js.map +1 -0
- package/out/templator/genGetBlock.d.ts +6 -0
- package/out/templator/genGetBlock.js +138 -0
- package/out/templator/genGetBlock.js.map +1 -0
- package/out/templator/genGridViewBlock.d.ts +55 -0
- package/out/templator/genGridViewBlock.js +350 -0
- package/out/templator/genGridViewBlock.js.map +1 -0
- package/out/templator/genListViewBlock.d.ts +19 -0
- package/out/templator/genListViewBlock.js +143 -0
- package/out/templator/genListViewBlock.js.map +1 -0
- package/out/templator/genQueryComponent.d.ts +34 -0
- package/out/templator/genQueryComponent.js +342 -0
- package/out/templator/genQueryComponent.js.map +1 -0
- package/out/templator/genSelectBlock.d.ts +45 -0
- package/out/templator/genSelectBlock.js +406 -0
- package/out/templator/genSelectBlock.js.map +1 -0
- package/out/templator/genTableBlock.d.ts +53 -0
- package/out/templator/genTableBlock.js +280 -0
- package/out/templator/genTableBlock.js.map +1 -0
- package/out/templator/genUpdateBlock.d.ts +6 -0
- package/out/templator/genUpdateBlock.js +380 -0
- package/out/templator/genUpdateBlock.js.map +1 -0
- package/out/templator/index.d.ts +18 -0
- package/out/templator/index.js +34 -0
- package/out/templator/index.js.map +1 -0
- package/out/templator/utils.d.ts +676 -0
- package/out/templator/utils.js +469 -0
- package/out/templator/utils.js.map +1 -0
- package/out/translator/constant.d.ts +6 -0
- package/out/translator/constant.js +10 -0
- package/out/translator/constant.js.map +1 -0
- package/out/translator/index.d.ts +3 -0
- package/out/translator/index.js +20 -0
- package/out/translator/index.js.map +1 -0
- package/out/translator/types.d.ts +32 -0
- package/out/translator/types.js +3 -0
- package/out/translator/types.js.map +1 -0
- package/out/translator/utils.d.ts +25 -0
- package/out/translator/utils.js +120 -0
- package/out/translator/utils.js.map +1 -0
- package/out/utils/index.d.ts +42 -0
- package/out/utils/index.js +213 -0
- package/out/utils/index.js.map +1 -0
- package/out/utils/logger.d.ts +7 -0
- package/out/utils/logger.js +23 -0
- package/out/utils/logger.js.map +1 -0
- package/out/utils/sortTsString.d.ts +1 -0
- package/out/utils/sortTsString.js +36 -0
- package/out/utils/sortTsString.js.map +1 -0
- package/out/utils/string.d.ts +51 -0
- package/out/utils/string.js +110 -0
- package/out/utils/string.js.map +1 -0
- package/out/utils/time.d.ts +1 -0
- package/out/utils/time.js +6 -0
- package/out/utils/time.js.map +1 -0
- package/out/utils/traverse.d.ts +36 -0
- package/out/utils/traverse.js +145 -0
- package/out/utils/traverse.js.map +1 -0
- package/out/utils/types.d.ts +1 -0
- package/out/utils/types.js +3 -0
- package/out/utils/types.js.map +1 -0
- package/out/utils/window.d.ts +7 -0
- package/out/utils/window.js +14 -0
- package/out/utils/window.js.map +1 -0
- package/package.json +1 -1
- package/src/concepts/BindEvent__.ts +5 -6
- package/src/concepts/Module__.ts +2 -2
- package/src/concepts/View__.ts +2 -2
- package/src/server/naslServer.ts +4 -4
- package/src/service/storage/init.ts +3 -2
|
@@ -0,0 +1,1220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
var ProcessElement_1;
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ProcessElement = void 0;
|
|
37
|
+
const translator_1 = require("../translator");
|
|
38
|
+
const getProcesses_1 = require("../server/getProcesses");
|
|
39
|
+
const decorators_1 = require("../decorators");
|
|
40
|
+
const utils = __importStar(require("../utils"));
|
|
41
|
+
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
42
|
+
const BindEvent__1 = __importDefault(require("./BindEvent__"));
|
|
43
|
+
const Point__1 = __importDefault(require("./Point__"));
|
|
44
|
+
const Variable__1 = __importDefault(require("./Variable__"));
|
|
45
|
+
const Return__1 = __importDefault(require("./Return__"));
|
|
46
|
+
const Constant__1 = __importDefault(require("./Constant__"));
|
|
47
|
+
const BindAttribute__1 = __importDefault(require("./BindAttribute__"));
|
|
48
|
+
/**
|
|
49
|
+
* 流程元素
|
|
50
|
+
*/
|
|
51
|
+
let ProcessElement = ProcessElement_1 =
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
class ProcessElement extends BaseNode_1.default {
|
|
54
|
+
/** 类名 */
|
|
55
|
+
static ConceptName = 'ProcessElement';
|
|
56
|
+
/**
|
|
57
|
+
* 产品概念
|
|
58
|
+
*/
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
concept;
|
|
61
|
+
/**
|
|
62
|
+
* 流程元素名称
|
|
63
|
+
*/
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
name;
|
|
66
|
+
/**
|
|
67
|
+
* 流程元素标题
|
|
68
|
+
*/
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
title;
|
|
71
|
+
/**
|
|
72
|
+
* 流程元素描述
|
|
73
|
+
*/
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
description;
|
|
76
|
+
/**
|
|
77
|
+
* 元素绑定事件列表
|
|
78
|
+
*/
|
|
79
|
+
bindEvents = [];
|
|
80
|
+
/**
|
|
81
|
+
* type
|
|
82
|
+
*/
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
type;
|
|
85
|
+
/**
|
|
86
|
+
* sourceRef
|
|
87
|
+
*/
|
|
88
|
+
// @ts-ignore
|
|
89
|
+
sourceRef;
|
|
90
|
+
/**
|
|
91
|
+
* targetRef
|
|
92
|
+
*/
|
|
93
|
+
// @ts-ignore
|
|
94
|
+
targetRef;
|
|
95
|
+
/**
|
|
96
|
+
* 矩形信息
|
|
97
|
+
*/
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
bounds;
|
|
100
|
+
/**
|
|
101
|
+
* 点信息列表
|
|
102
|
+
*/
|
|
103
|
+
waypoints = [];
|
|
104
|
+
/**
|
|
105
|
+
* flowValue
|
|
106
|
+
*/
|
|
107
|
+
// @ts-ignore
|
|
108
|
+
flowValue;
|
|
109
|
+
/**
|
|
110
|
+
* 逻辑
|
|
111
|
+
*/
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
logic;
|
|
114
|
+
/**
|
|
115
|
+
* 变量列表
|
|
116
|
+
*/
|
|
117
|
+
variables = [];
|
|
118
|
+
/**
|
|
119
|
+
* 输出参数列表
|
|
120
|
+
*/
|
|
121
|
+
returns = [];
|
|
122
|
+
/**
|
|
123
|
+
* 常量列表
|
|
124
|
+
*/
|
|
125
|
+
constants = [];
|
|
126
|
+
/**
|
|
127
|
+
* 元素绑定属性列表
|
|
128
|
+
*/
|
|
129
|
+
bindAttrs = [];
|
|
130
|
+
/**
|
|
131
|
+
* 祖先 Process
|
|
132
|
+
*/
|
|
133
|
+
get process() {
|
|
134
|
+
return this.getAncestor('Process');
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 祖先 Module
|
|
138
|
+
*/
|
|
139
|
+
get module() {
|
|
140
|
+
return this.getAncestor('Module');
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* 祖先 App
|
|
144
|
+
*/
|
|
145
|
+
get app() {
|
|
146
|
+
return this.getAncestor('App');
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @param source 需要合并的部分参数
|
|
150
|
+
*/
|
|
151
|
+
constructor(source) {
|
|
152
|
+
source = Object.assign({}, ProcessElement_1.getDefaultOptions(), source);
|
|
153
|
+
super(source);
|
|
154
|
+
super.subConstructor(source);
|
|
155
|
+
}
|
|
156
|
+
static from(source, parentNode, parentKey) {
|
|
157
|
+
return super.from(source, parentNode, parentKey);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* 从父级删除该节点
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
_delete() {
|
|
164
|
+
let params = null;
|
|
165
|
+
if (this.parentNode) {
|
|
166
|
+
params = this.parentNode?.__removeProcessElement?.(this);
|
|
167
|
+
}
|
|
168
|
+
return params;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* 设置流程元素名称
|
|
172
|
+
*/
|
|
173
|
+
setName(name) {
|
|
174
|
+
const object = {
|
|
175
|
+
name,
|
|
176
|
+
};
|
|
177
|
+
this.update({
|
|
178
|
+
...object,
|
|
179
|
+
field: 'name',
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* 设置流程元素标题
|
|
184
|
+
*/
|
|
185
|
+
setTitle(title) {
|
|
186
|
+
const object = {
|
|
187
|
+
title,
|
|
188
|
+
};
|
|
189
|
+
this.update({
|
|
190
|
+
...object,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* 设置流程元素描述
|
|
195
|
+
*/
|
|
196
|
+
setDescription(description) {
|
|
197
|
+
const object = {
|
|
198
|
+
description,
|
|
199
|
+
};
|
|
200
|
+
this.update({
|
|
201
|
+
...object,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* 设置sourceRef
|
|
206
|
+
*/
|
|
207
|
+
setSourceRef(sourceRef) {
|
|
208
|
+
const object = {
|
|
209
|
+
sourceRef,
|
|
210
|
+
};
|
|
211
|
+
this.update({
|
|
212
|
+
...object,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* 设置targetRef
|
|
217
|
+
*/
|
|
218
|
+
setTargetRef(targetRef) {
|
|
219
|
+
const object = {
|
|
220
|
+
targetRef,
|
|
221
|
+
};
|
|
222
|
+
this.update({
|
|
223
|
+
...object,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* 设置矩形信息
|
|
228
|
+
*/
|
|
229
|
+
setBounds(bounds) {
|
|
230
|
+
bounds._delete();
|
|
231
|
+
const relationOptions = { parentNode: this, parentKey: 'bounds' };
|
|
232
|
+
Object.assign(bounds, relationOptions);
|
|
233
|
+
const object = {
|
|
234
|
+
bounds,
|
|
235
|
+
};
|
|
236
|
+
this.update({
|
|
237
|
+
...object,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* 设置flowValue
|
|
242
|
+
*/
|
|
243
|
+
setFlowValue(flowValue) {
|
|
244
|
+
const object = {
|
|
245
|
+
flowValue,
|
|
246
|
+
};
|
|
247
|
+
this.update({
|
|
248
|
+
...object,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
getBindEventExistingNames(excludedList = []) {
|
|
252
|
+
const excludedSet = new Set(excludedList);
|
|
253
|
+
return (this.bindEvents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
254
|
+
}
|
|
255
|
+
getBindEventUniqueName(name = 'bindEvent1') {
|
|
256
|
+
return utils.unique(name, this.getBindEventExistingNames(), undefined, false);
|
|
257
|
+
}
|
|
258
|
+
_insertBindEventAt(options, index) {
|
|
259
|
+
const bindEventOptions = {};
|
|
260
|
+
const relationOptions = { parentNode: this, parentKey: 'bindEvents' };
|
|
261
|
+
let bindEvent;
|
|
262
|
+
if (!options) {
|
|
263
|
+
bindEvent = BindEvent__1.default.from({
|
|
264
|
+
...bindEventOptions,
|
|
265
|
+
name: this.getBindEventUniqueName(),
|
|
266
|
+
}, this, 'bindEvents');
|
|
267
|
+
}
|
|
268
|
+
else if (typeof options === 'string') {
|
|
269
|
+
bindEvent = BindEvent__1.default.from({
|
|
270
|
+
...bindEventOptions,
|
|
271
|
+
name: options,
|
|
272
|
+
}, this, 'bindEvents');
|
|
273
|
+
}
|
|
274
|
+
else if (options instanceof BindEvent__1.default) {
|
|
275
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
276
|
+
bindEvent = options;
|
|
277
|
+
Object.assign(bindEvent, relationOptions);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
bindEvent = BindEvent__1.default.from({
|
|
281
|
+
...bindEventOptions,
|
|
282
|
+
...options,
|
|
283
|
+
}, this, 'bindEvents');
|
|
284
|
+
}
|
|
285
|
+
this.bindEvents.splice(index, 0, bindEvent);
|
|
286
|
+
return bindEvent;
|
|
287
|
+
}
|
|
288
|
+
insertBindEventAt(options, index) {
|
|
289
|
+
const node = this._insertBindEventAt(options, index);
|
|
290
|
+
node.create({
|
|
291
|
+
index,
|
|
292
|
+
parentNode: this,
|
|
293
|
+
parentKey: 'bindEvents',
|
|
294
|
+
});
|
|
295
|
+
return node;
|
|
296
|
+
}
|
|
297
|
+
_addBindEvent(options) {
|
|
298
|
+
const index = this.bindEvents.length;
|
|
299
|
+
return this._insertBindEventAt(options, index);
|
|
300
|
+
}
|
|
301
|
+
addBindEvent(options) {
|
|
302
|
+
const node = this._addBindEvent(options);
|
|
303
|
+
const index = this.bindEvents.indexOf(node);
|
|
304
|
+
node.create({
|
|
305
|
+
index,
|
|
306
|
+
parentNode: this,
|
|
307
|
+
parentKey: 'bindEvents',
|
|
308
|
+
});
|
|
309
|
+
return node;
|
|
310
|
+
}
|
|
311
|
+
getPointExistingNames(excludedList = []) {
|
|
312
|
+
const excludedSet = new Set(excludedList);
|
|
313
|
+
return (this.waypoints || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
314
|
+
}
|
|
315
|
+
getPointUniqueName(name = 'point1') {
|
|
316
|
+
return utils.unique(name, this.getPointExistingNames(), undefined, false);
|
|
317
|
+
}
|
|
318
|
+
_insertPointAt(options, index) {
|
|
319
|
+
const pointOptions = {};
|
|
320
|
+
const relationOptions = { parentNode: this, parentKey: 'waypoints' };
|
|
321
|
+
let point;
|
|
322
|
+
if (!options) {
|
|
323
|
+
point = Point__1.default.from({
|
|
324
|
+
...pointOptions,
|
|
325
|
+
name: this.getPointUniqueName(),
|
|
326
|
+
}, this, 'waypoints');
|
|
327
|
+
}
|
|
328
|
+
else if (typeof options === 'string') {
|
|
329
|
+
point = Point__1.default.from({
|
|
330
|
+
...pointOptions,
|
|
331
|
+
name: options,
|
|
332
|
+
}, this, 'waypoints');
|
|
333
|
+
}
|
|
334
|
+
else if (options instanceof Point__1.default) {
|
|
335
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
336
|
+
point = options;
|
|
337
|
+
Object.assign(point, relationOptions);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
point = Point__1.default.from({
|
|
341
|
+
...pointOptions,
|
|
342
|
+
...options,
|
|
343
|
+
}, this, 'waypoints');
|
|
344
|
+
}
|
|
345
|
+
this.waypoints.splice(index, 0, point);
|
|
346
|
+
return point;
|
|
347
|
+
}
|
|
348
|
+
insertPointAt(options, index) {
|
|
349
|
+
const node = this._insertPointAt(options, index);
|
|
350
|
+
node.create({
|
|
351
|
+
index,
|
|
352
|
+
parentNode: this,
|
|
353
|
+
parentKey: 'waypoints',
|
|
354
|
+
});
|
|
355
|
+
return node;
|
|
356
|
+
}
|
|
357
|
+
_addPoint(options) {
|
|
358
|
+
const index = this.waypoints.length;
|
|
359
|
+
return this._insertPointAt(options, index);
|
|
360
|
+
}
|
|
361
|
+
addPoint(options) {
|
|
362
|
+
const node = this._addPoint(options);
|
|
363
|
+
const index = this.waypoints.indexOf(node);
|
|
364
|
+
node.create({
|
|
365
|
+
index,
|
|
366
|
+
parentNode: this,
|
|
367
|
+
parentKey: 'waypoints',
|
|
368
|
+
});
|
|
369
|
+
return node;
|
|
370
|
+
}
|
|
371
|
+
getVariableExistingNames(excludedList = []) {
|
|
372
|
+
const excludedSet = new Set(excludedList);
|
|
373
|
+
return (this.variables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
374
|
+
}
|
|
375
|
+
getVariableUniqueName(name = 'variable1') {
|
|
376
|
+
return utils.unique(name, this.getVariableExistingNames(), undefined, false);
|
|
377
|
+
}
|
|
378
|
+
_insertVariableAt(options, index) {
|
|
379
|
+
const variableOptions = {};
|
|
380
|
+
const relationOptions = { parentNode: this, parentKey: 'variables' };
|
|
381
|
+
let variable;
|
|
382
|
+
if (!options) {
|
|
383
|
+
variable = Variable__1.default.from({
|
|
384
|
+
...variableOptions,
|
|
385
|
+
name: this.getVariableUniqueName(),
|
|
386
|
+
}, this, 'variables');
|
|
387
|
+
}
|
|
388
|
+
else if (typeof options === 'string') {
|
|
389
|
+
variable = Variable__1.default.from({
|
|
390
|
+
...variableOptions,
|
|
391
|
+
name: options,
|
|
392
|
+
}, this, 'variables');
|
|
393
|
+
}
|
|
394
|
+
else if (options instanceof Variable__1.default) {
|
|
395
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
396
|
+
variable = options;
|
|
397
|
+
Object.assign(variable, relationOptions);
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
variable = Variable__1.default.from({
|
|
401
|
+
...variableOptions,
|
|
402
|
+
...options,
|
|
403
|
+
}, this, 'variables');
|
|
404
|
+
}
|
|
405
|
+
this.variables.splice(index, 0, variable);
|
|
406
|
+
return variable;
|
|
407
|
+
}
|
|
408
|
+
insertVariableAt(options, index) {
|
|
409
|
+
const node = this._insertVariableAt(options, index);
|
|
410
|
+
node.create({
|
|
411
|
+
index,
|
|
412
|
+
parentNode: this,
|
|
413
|
+
parentKey: 'variables',
|
|
414
|
+
});
|
|
415
|
+
return node;
|
|
416
|
+
}
|
|
417
|
+
_addVariable(options) {
|
|
418
|
+
const index = this.variables.length;
|
|
419
|
+
return this._insertVariableAt(options, index);
|
|
420
|
+
}
|
|
421
|
+
addVariable(options) {
|
|
422
|
+
const node = this._addVariable(options);
|
|
423
|
+
const index = this.variables.indexOf(node);
|
|
424
|
+
node.create({
|
|
425
|
+
index,
|
|
426
|
+
parentNode: this,
|
|
427
|
+
parentKey: 'variables',
|
|
428
|
+
});
|
|
429
|
+
return node;
|
|
430
|
+
}
|
|
431
|
+
getReturnExistingNames(excludedList = []) {
|
|
432
|
+
const excludedSet = new Set(excludedList);
|
|
433
|
+
return (this.returns || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
434
|
+
}
|
|
435
|
+
getReturnUniqueName(name = 'ret1') {
|
|
436
|
+
return utils.unique(name, this.getReturnExistingNames(), undefined, false);
|
|
437
|
+
}
|
|
438
|
+
_insertReturnAt(options, index) {
|
|
439
|
+
const retOptions = {};
|
|
440
|
+
const relationOptions = { parentNode: this, parentKey: 'returns' };
|
|
441
|
+
let ret;
|
|
442
|
+
if (!options) {
|
|
443
|
+
ret = Return__1.default.from({
|
|
444
|
+
...retOptions,
|
|
445
|
+
name: this.getReturnUniqueName(),
|
|
446
|
+
}, this, 'returns');
|
|
447
|
+
}
|
|
448
|
+
else if (typeof options === 'string') {
|
|
449
|
+
ret = Return__1.default.from({
|
|
450
|
+
...retOptions,
|
|
451
|
+
name: options,
|
|
452
|
+
}, this, 'returns');
|
|
453
|
+
}
|
|
454
|
+
else if (options instanceof Return__1.default) {
|
|
455
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
456
|
+
ret = options;
|
|
457
|
+
Object.assign(ret, relationOptions);
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
ret = Return__1.default.from({
|
|
461
|
+
...retOptions,
|
|
462
|
+
...options,
|
|
463
|
+
}, this, 'returns');
|
|
464
|
+
}
|
|
465
|
+
this.returns.splice(index, 0, ret);
|
|
466
|
+
return ret;
|
|
467
|
+
}
|
|
468
|
+
insertReturnAt(options, index) {
|
|
469
|
+
const node = this._insertReturnAt(options, index);
|
|
470
|
+
node.create({
|
|
471
|
+
index,
|
|
472
|
+
parentNode: this,
|
|
473
|
+
parentKey: 'returns',
|
|
474
|
+
});
|
|
475
|
+
return node;
|
|
476
|
+
}
|
|
477
|
+
_addReturn(options) {
|
|
478
|
+
const index = this.returns.length;
|
|
479
|
+
return this._insertReturnAt(options, index);
|
|
480
|
+
}
|
|
481
|
+
addReturn(options) {
|
|
482
|
+
const node = this._addReturn(options);
|
|
483
|
+
const index = this.returns.indexOf(node);
|
|
484
|
+
node.create({
|
|
485
|
+
index,
|
|
486
|
+
parentNode: this,
|
|
487
|
+
parentKey: 'returns',
|
|
488
|
+
});
|
|
489
|
+
return node;
|
|
490
|
+
}
|
|
491
|
+
getConstantExistingNames(excludedList = []) {
|
|
492
|
+
const excludedSet = new Set(excludedList);
|
|
493
|
+
return (this.constants || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
494
|
+
}
|
|
495
|
+
getConstantUniqueName(name = 'constant1') {
|
|
496
|
+
return utils.unique(name, this.getConstantExistingNames(), undefined, false);
|
|
497
|
+
}
|
|
498
|
+
_insertConstantAt(options, index) {
|
|
499
|
+
const constantOptions = {};
|
|
500
|
+
const relationOptions = { parentNode: this, parentKey: 'constants' };
|
|
501
|
+
let constant;
|
|
502
|
+
if (!options) {
|
|
503
|
+
constant = Constant__1.default.from({
|
|
504
|
+
...constantOptions,
|
|
505
|
+
name: this.getConstantUniqueName(),
|
|
506
|
+
}, this, 'constants');
|
|
507
|
+
}
|
|
508
|
+
else if (typeof options === 'string') {
|
|
509
|
+
constant = Constant__1.default.from({
|
|
510
|
+
...constantOptions,
|
|
511
|
+
name: options,
|
|
512
|
+
}, this, 'constants');
|
|
513
|
+
}
|
|
514
|
+
else if (options instanceof Constant__1.default) {
|
|
515
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
516
|
+
constant = options;
|
|
517
|
+
Object.assign(constant, relationOptions);
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
constant = Constant__1.default.from({
|
|
521
|
+
...constantOptions,
|
|
522
|
+
...options,
|
|
523
|
+
}, this, 'constants');
|
|
524
|
+
}
|
|
525
|
+
this.constants.splice(index, 0, constant);
|
|
526
|
+
return constant;
|
|
527
|
+
}
|
|
528
|
+
insertConstantAt(options, index) {
|
|
529
|
+
const node = this._insertConstantAt(options, index);
|
|
530
|
+
node.create({
|
|
531
|
+
index,
|
|
532
|
+
parentNode: this,
|
|
533
|
+
parentKey: 'constants',
|
|
534
|
+
});
|
|
535
|
+
return node;
|
|
536
|
+
}
|
|
537
|
+
_addConstant(options) {
|
|
538
|
+
const index = this.constants.length;
|
|
539
|
+
return this._insertConstantAt(options, index);
|
|
540
|
+
}
|
|
541
|
+
addConstant(options) {
|
|
542
|
+
const node = this._addConstant(options);
|
|
543
|
+
const index = this.constants.indexOf(node);
|
|
544
|
+
node.create({
|
|
545
|
+
index,
|
|
546
|
+
parentNode: this,
|
|
547
|
+
parentKey: 'constants',
|
|
548
|
+
});
|
|
549
|
+
return node;
|
|
550
|
+
}
|
|
551
|
+
getBindAttributeExistingNames(excludedList = []) {
|
|
552
|
+
const excludedSet = new Set(excludedList);
|
|
553
|
+
return (this.bindAttrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
554
|
+
}
|
|
555
|
+
getBindAttributeUniqueName(name = 'bindAttribute1') {
|
|
556
|
+
return utils.unique(name, this.getBindAttributeExistingNames(), undefined, false);
|
|
557
|
+
}
|
|
558
|
+
_insertBindAttributeAt(options, index) {
|
|
559
|
+
const bindAttributeOptions = {};
|
|
560
|
+
const relationOptions = { parentNode: this, parentKey: 'bindAttrs' };
|
|
561
|
+
let bindAttribute;
|
|
562
|
+
if (!options) {
|
|
563
|
+
bindAttribute = BindAttribute__1.default.from({
|
|
564
|
+
...bindAttributeOptions,
|
|
565
|
+
name: this.getBindAttributeUniqueName(),
|
|
566
|
+
}, this, 'bindAttrs');
|
|
567
|
+
}
|
|
568
|
+
else if (typeof options === 'string') {
|
|
569
|
+
bindAttribute = BindAttribute__1.default.from({
|
|
570
|
+
...bindAttributeOptions,
|
|
571
|
+
name: options,
|
|
572
|
+
}, this, 'bindAttrs');
|
|
573
|
+
}
|
|
574
|
+
else if (options instanceof BindAttribute__1.default) {
|
|
575
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
576
|
+
bindAttribute = options;
|
|
577
|
+
Object.assign(bindAttribute, relationOptions);
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
bindAttribute = BindAttribute__1.default.from({
|
|
581
|
+
...bindAttributeOptions,
|
|
582
|
+
...options,
|
|
583
|
+
}, this, 'bindAttrs');
|
|
584
|
+
}
|
|
585
|
+
this.bindAttrs.splice(index, 0, bindAttribute);
|
|
586
|
+
return bindAttribute;
|
|
587
|
+
}
|
|
588
|
+
insertBindAttributeAt(options, index) {
|
|
589
|
+
const node = this._insertBindAttributeAt(options, index);
|
|
590
|
+
node.create({
|
|
591
|
+
index,
|
|
592
|
+
parentNode: this,
|
|
593
|
+
parentKey: 'bindAttrs',
|
|
594
|
+
});
|
|
595
|
+
return node;
|
|
596
|
+
}
|
|
597
|
+
_addBindAttribute(options) {
|
|
598
|
+
const index = this.bindAttrs.length;
|
|
599
|
+
return this._insertBindAttributeAt(options, index);
|
|
600
|
+
}
|
|
601
|
+
addBindAttribute(options) {
|
|
602
|
+
const node = this._addBindAttribute(options);
|
|
603
|
+
const index = this.bindAttrs.indexOf(node);
|
|
604
|
+
node.create({
|
|
605
|
+
index,
|
|
606
|
+
parentNode: this,
|
|
607
|
+
parentKey: 'bindAttrs',
|
|
608
|
+
});
|
|
609
|
+
return node;
|
|
610
|
+
}
|
|
611
|
+
removeBindEvent(options) {
|
|
612
|
+
let bindEvent;
|
|
613
|
+
if (typeof options === 'string') {
|
|
614
|
+
bindEvent = this.bindEvents.find((item) => item.name === options);
|
|
615
|
+
if (!bindEvent) {
|
|
616
|
+
throw new Error('找不到元素绑定事件 ' + options);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
bindEvent = options;
|
|
621
|
+
}
|
|
622
|
+
return bindEvent.delete();
|
|
623
|
+
}
|
|
624
|
+
__removeBindEvent(bindEvent) {
|
|
625
|
+
const parentKey = bindEvent.parentKey;
|
|
626
|
+
const params = {
|
|
627
|
+
parentNode: this,
|
|
628
|
+
parentKey,
|
|
629
|
+
index: -1,
|
|
630
|
+
object: null,
|
|
631
|
+
oldObject: bindEvent,
|
|
632
|
+
};
|
|
633
|
+
if (parentKey) {
|
|
634
|
+
params.parentKey = parentKey;
|
|
635
|
+
if (Array.isArray(this[parentKey])) {
|
|
636
|
+
const index = this[parentKey].indexOf(bindEvent);
|
|
637
|
+
~index && this[parentKey].splice(index, 1);
|
|
638
|
+
params.index = index;
|
|
639
|
+
}
|
|
640
|
+
else if (this[parentKey] === bindEvent) {
|
|
641
|
+
params.index = 0;
|
|
642
|
+
this[parentKey] = undefined;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
return params;
|
|
646
|
+
}
|
|
647
|
+
removeBounds(options) {
|
|
648
|
+
let bounds;
|
|
649
|
+
if (typeof options === 'string') {
|
|
650
|
+
bounds = this.bounds;
|
|
651
|
+
if (!bounds) {
|
|
652
|
+
throw new Error('找不到矩形信息 ' + options);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
bounds = options;
|
|
657
|
+
}
|
|
658
|
+
return bounds.delete();
|
|
659
|
+
}
|
|
660
|
+
__removeRect(rect) {
|
|
661
|
+
const parentKey = rect.parentKey;
|
|
662
|
+
const params = {
|
|
663
|
+
parentNode: this,
|
|
664
|
+
parentKey,
|
|
665
|
+
index: -1,
|
|
666
|
+
object: null,
|
|
667
|
+
oldObject: rect,
|
|
668
|
+
};
|
|
669
|
+
if (parentKey) {
|
|
670
|
+
params.parentKey = parentKey;
|
|
671
|
+
if (Array.isArray(this[parentKey])) {
|
|
672
|
+
const index = this[parentKey].indexOf(rect);
|
|
673
|
+
~index && this[parentKey].splice(index, 1);
|
|
674
|
+
params.index = index;
|
|
675
|
+
}
|
|
676
|
+
else if (this[parentKey] === rect) {
|
|
677
|
+
params.index = 0;
|
|
678
|
+
this[parentKey] = undefined;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
return params;
|
|
682
|
+
}
|
|
683
|
+
removePoint(options) {
|
|
684
|
+
let point;
|
|
685
|
+
if (typeof options === 'string') {
|
|
686
|
+
point = this.waypoints.find((item) => item.name === options);
|
|
687
|
+
if (!point) {
|
|
688
|
+
throw new Error('找不到点信息 ' + options);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
692
|
+
point = options;
|
|
693
|
+
}
|
|
694
|
+
return point.delete();
|
|
695
|
+
}
|
|
696
|
+
__removePoint(point) {
|
|
697
|
+
const parentKey = point.parentKey;
|
|
698
|
+
const params = {
|
|
699
|
+
parentNode: this,
|
|
700
|
+
parentKey,
|
|
701
|
+
index: -1,
|
|
702
|
+
object: null,
|
|
703
|
+
oldObject: point,
|
|
704
|
+
};
|
|
705
|
+
if (parentKey) {
|
|
706
|
+
params.parentKey = parentKey;
|
|
707
|
+
if (Array.isArray(this[parentKey])) {
|
|
708
|
+
const index = this[parentKey].indexOf(point);
|
|
709
|
+
~index && this[parentKey].splice(index, 1);
|
|
710
|
+
params.index = index;
|
|
711
|
+
}
|
|
712
|
+
else if (this[parentKey] === point) {
|
|
713
|
+
params.index = 0;
|
|
714
|
+
this[parentKey] = undefined;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
return params;
|
|
718
|
+
}
|
|
719
|
+
removeLogic(options) {
|
|
720
|
+
let logic;
|
|
721
|
+
if (typeof options === 'string') {
|
|
722
|
+
logic = this.logic;
|
|
723
|
+
if (!logic) {
|
|
724
|
+
throw new Error('找不到逻辑 ' + options);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
logic = options;
|
|
729
|
+
}
|
|
730
|
+
return logic.delete();
|
|
731
|
+
}
|
|
732
|
+
__removeLogic(logic) {
|
|
733
|
+
const parentKey = logic.parentKey;
|
|
734
|
+
const params = {
|
|
735
|
+
parentNode: this,
|
|
736
|
+
parentKey,
|
|
737
|
+
index: -1,
|
|
738
|
+
object: null,
|
|
739
|
+
oldObject: logic,
|
|
740
|
+
};
|
|
741
|
+
if (parentKey) {
|
|
742
|
+
params.parentKey = parentKey;
|
|
743
|
+
if (Array.isArray(this[parentKey])) {
|
|
744
|
+
const index = this[parentKey].indexOf(logic);
|
|
745
|
+
~index && this[parentKey].splice(index, 1);
|
|
746
|
+
params.index = index;
|
|
747
|
+
}
|
|
748
|
+
else if (this[parentKey] === logic) {
|
|
749
|
+
params.index = 0;
|
|
750
|
+
this[parentKey] = undefined;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return params;
|
|
754
|
+
}
|
|
755
|
+
removeVariable(options) {
|
|
756
|
+
let variable;
|
|
757
|
+
if (typeof options === 'string') {
|
|
758
|
+
variable = this.variables.find((item) => item.name === options);
|
|
759
|
+
if (!variable) {
|
|
760
|
+
throw new Error('找不到变量 ' + options);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
variable = options;
|
|
765
|
+
}
|
|
766
|
+
return variable.delete();
|
|
767
|
+
}
|
|
768
|
+
__removeVariable(variable) {
|
|
769
|
+
const parentKey = variable.parentKey;
|
|
770
|
+
const params = {
|
|
771
|
+
parentNode: this,
|
|
772
|
+
parentKey,
|
|
773
|
+
index: -1,
|
|
774
|
+
object: null,
|
|
775
|
+
oldObject: variable,
|
|
776
|
+
};
|
|
777
|
+
if (parentKey) {
|
|
778
|
+
params.parentKey = parentKey;
|
|
779
|
+
if (Array.isArray(this[parentKey])) {
|
|
780
|
+
const index = this[parentKey].indexOf(variable);
|
|
781
|
+
~index && this[parentKey].splice(index, 1);
|
|
782
|
+
params.index = index;
|
|
783
|
+
}
|
|
784
|
+
else if (this[parentKey] === variable) {
|
|
785
|
+
params.index = 0;
|
|
786
|
+
this[parentKey] = undefined;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
return params;
|
|
790
|
+
}
|
|
791
|
+
removeReturn(options) {
|
|
792
|
+
let ret;
|
|
793
|
+
if (typeof options === 'string') {
|
|
794
|
+
ret = this.returns.find((item) => item.name === options);
|
|
795
|
+
if (!ret) {
|
|
796
|
+
throw new Error('找不到输出参数 ' + options);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
ret = options;
|
|
801
|
+
}
|
|
802
|
+
return ret.delete();
|
|
803
|
+
}
|
|
804
|
+
__removeReturn(ret) {
|
|
805
|
+
const parentKey = ret.parentKey;
|
|
806
|
+
const params = {
|
|
807
|
+
parentNode: this,
|
|
808
|
+
parentKey,
|
|
809
|
+
index: -1,
|
|
810
|
+
object: null,
|
|
811
|
+
oldObject: ret,
|
|
812
|
+
};
|
|
813
|
+
if (parentKey) {
|
|
814
|
+
params.parentKey = parentKey;
|
|
815
|
+
if (Array.isArray(this[parentKey])) {
|
|
816
|
+
const index = this[parentKey].indexOf(ret);
|
|
817
|
+
~index && this[parentKey].splice(index, 1);
|
|
818
|
+
params.index = index;
|
|
819
|
+
}
|
|
820
|
+
else if (this[parentKey] === ret) {
|
|
821
|
+
params.index = 0;
|
|
822
|
+
this[parentKey] = undefined;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
return params;
|
|
826
|
+
}
|
|
827
|
+
removeConstant(options) {
|
|
828
|
+
let constant;
|
|
829
|
+
if (typeof options === 'string') {
|
|
830
|
+
constant = this.constants.find((item) => item.name === options);
|
|
831
|
+
if (!constant) {
|
|
832
|
+
throw new Error('找不到常量 ' + options);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
constant = options;
|
|
837
|
+
}
|
|
838
|
+
return constant.delete();
|
|
839
|
+
}
|
|
840
|
+
__removeConstant(constant) {
|
|
841
|
+
const parentKey = constant.parentKey;
|
|
842
|
+
const params = {
|
|
843
|
+
parentNode: this,
|
|
844
|
+
parentKey,
|
|
845
|
+
index: -1,
|
|
846
|
+
object: null,
|
|
847
|
+
oldObject: constant,
|
|
848
|
+
};
|
|
849
|
+
if (parentKey) {
|
|
850
|
+
params.parentKey = parentKey;
|
|
851
|
+
if (Array.isArray(this[parentKey])) {
|
|
852
|
+
const index = this[parentKey].indexOf(constant);
|
|
853
|
+
~index && this[parentKey].splice(index, 1);
|
|
854
|
+
params.index = index;
|
|
855
|
+
}
|
|
856
|
+
else if (this[parentKey] === constant) {
|
|
857
|
+
params.index = 0;
|
|
858
|
+
this[parentKey] = undefined;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
return params;
|
|
862
|
+
}
|
|
863
|
+
removeBindAttribute(options) {
|
|
864
|
+
let bindAttribute;
|
|
865
|
+
if (typeof options === 'string') {
|
|
866
|
+
bindAttribute = this.bindAttrs.find((item) => item.name === options);
|
|
867
|
+
if (!bindAttribute) {
|
|
868
|
+
throw new Error('找不到元素绑定属性 ' + options);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
else {
|
|
872
|
+
bindAttribute = options;
|
|
873
|
+
}
|
|
874
|
+
return bindAttribute.delete();
|
|
875
|
+
}
|
|
876
|
+
__removeBindAttribute(bindAttribute) {
|
|
877
|
+
const parentKey = bindAttribute.parentKey;
|
|
878
|
+
const params = {
|
|
879
|
+
parentNode: this,
|
|
880
|
+
parentKey,
|
|
881
|
+
index: -1,
|
|
882
|
+
object: null,
|
|
883
|
+
oldObject: bindAttribute,
|
|
884
|
+
};
|
|
885
|
+
if (parentKey) {
|
|
886
|
+
params.parentKey = parentKey;
|
|
887
|
+
if (Array.isArray(this[parentKey])) {
|
|
888
|
+
const index = this[parentKey].indexOf(bindAttribute);
|
|
889
|
+
~index && this[parentKey].splice(index, 1);
|
|
890
|
+
params.index = index;
|
|
891
|
+
}
|
|
892
|
+
else if (this[parentKey] === bindAttribute) {
|
|
893
|
+
params.index = 0;
|
|
894
|
+
this[parentKey] = undefined;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
return params;
|
|
898
|
+
}
|
|
899
|
+
//================================================================================
|
|
900
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
901
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
902
|
+
//================================================================================
|
|
903
|
+
getVarExistingNames(excludedList = []) {
|
|
904
|
+
const excludedSet = new Set(excludedList);
|
|
905
|
+
return [...this.variables, ...this.returns, ...this.constants].filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
906
|
+
}
|
|
907
|
+
get isUserTask() {
|
|
908
|
+
return this.type === 'UserTask' || this.type === 'ApprovalTask' || this.type === 'InitiateTask';
|
|
909
|
+
}
|
|
910
|
+
get logics() {
|
|
911
|
+
return [...(0, getProcesses_1.genUserTaskLogic)(this)];
|
|
912
|
+
// const ns = entity2LogicNamespace(this);
|
|
913
|
+
// ns.path = this.getNamespace() + '.' + ns.name;
|
|
914
|
+
// return ns;
|
|
915
|
+
}
|
|
916
|
+
get assigneeLogics() {
|
|
917
|
+
let logics = [];
|
|
918
|
+
this.bindAttrs.forEach((bindAttr) => {
|
|
919
|
+
if (bindAttr.assignee) {
|
|
920
|
+
logics = bindAttr.assignee.logicUsers;
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
return logics;
|
|
924
|
+
}
|
|
925
|
+
getNamespace(ns) {
|
|
926
|
+
if (this.parentNode && this.parentNode.getNamespace) {
|
|
927
|
+
const parentNamespace = this.parentNode.getNamespace();
|
|
928
|
+
const parentName = this.parentNode.name;
|
|
929
|
+
const arr = [parentNamespace];
|
|
930
|
+
if (this.parentNode.concept !== 'App' && parentName) {
|
|
931
|
+
arr.push(parentName);
|
|
932
|
+
}
|
|
933
|
+
return `${arr.join('.')}.${ns || 'bindEvent'}`;
|
|
934
|
+
}
|
|
935
|
+
else
|
|
936
|
+
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
937
|
+
}
|
|
938
|
+
async cancelBindDelete(processDelete) {
|
|
939
|
+
if (!processDelete)
|
|
940
|
+
this.delete();
|
|
941
|
+
await Promise.all(this.bindAttrs.map(async ({ destination }) => {
|
|
942
|
+
if (destination && destination.viewNode) {
|
|
943
|
+
const view = destination.viewNode;
|
|
944
|
+
const name = this.uniqueTaskId(view);
|
|
945
|
+
const node = view.params.find((param) => param.name === name);
|
|
946
|
+
if (!node)
|
|
947
|
+
return;
|
|
948
|
+
const UsageMap = await node.findUsage();
|
|
949
|
+
const usageNodes = UsageMap.get(this.process);
|
|
950
|
+
// console.log(UsageMap, usageNodes)
|
|
951
|
+
if (!UsageMap.size || (UsageMap.size === 1 && usageNodes && (!usageNodes.children || usageNodes.children.length === 1)))
|
|
952
|
+
view.removeParam(name);
|
|
953
|
+
}
|
|
954
|
+
}));
|
|
955
|
+
}
|
|
956
|
+
//获取当前页面类型为String的taskId参数
|
|
957
|
+
uniqueTaskId(view) {
|
|
958
|
+
let count = 0;
|
|
959
|
+
let uniqueName = 'taskId0';
|
|
960
|
+
let param = view.params.find((param) => param.name === 'taskId');
|
|
961
|
+
if (!param || param.typeAnnotation.typeName === 'String')
|
|
962
|
+
return 'taskId';
|
|
963
|
+
do {
|
|
964
|
+
count++;
|
|
965
|
+
uniqueName = uniqueName.substring(0, uniqueName.length - 1) + count;
|
|
966
|
+
param = view.params.find((param) => param.name === uniqueName);
|
|
967
|
+
if (!param) {
|
|
968
|
+
return uniqueName;
|
|
969
|
+
}
|
|
970
|
+
} while (param.typeAnnotation.typeName !== 'String');
|
|
971
|
+
return uniqueName;
|
|
972
|
+
}
|
|
973
|
+
toEmbeddedTS(state) {
|
|
974
|
+
// this.syncLogic();
|
|
975
|
+
const tab0 = (0, translator_1.indent)((state?.tabSize || 0));
|
|
976
|
+
const tab1 = (0, translator_1.indent)((state?.tabSize || 0) + 1);
|
|
977
|
+
const tab3 = (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
978
|
+
const tab4 = (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
979
|
+
const tab5 = (0, translator_1.indent)((state?.tabSize || 0) + 4);
|
|
980
|
+
const tab6 = (0, translator_1.indent)((state?.tabSize || 0) + 5);
|
|
981
|
+
const constantsArr = [];
|
|
982
|
+
const returnsArr = [];
|
|
983
|
+
let code = `${this.name}: {\n`;
|
|
984
|
+
this.variables.forEach((property) => {
|
|
985
|
+
code += `${tab1}`;
|
|
986
|
+
code += `${property.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { inline: true }))},\n`;
|
|
987
|
+
});
|
|
988
|
+
this.returns.forEach((property, index) => {
|
|
989
|
+
code += `${tab1}`;
|
|
990
|
+
returnsArr.push(property.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { inline: true })));
|
|
991
|
+
code += `${returnsArr[index]},\n`;
|
|
992
|
+
});
|
|
993
|
+
this.constants.forEach((property, index) => {
|
|
994
|
+
code += `${tab1}`;
|
|
995
|
+
constantsArr.push(property.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { inline: true })));
|
|
996
|
+
code += `${constantsArr[index]},\n`;
|
|
997
|
+
});
|
|
998
|
+
const afterLinks = (0, getProcesses_1.getFlowAfterElements)(this);
|
|
999
|
+
const beforeLinks = (0, getProcesses_1.getFlowBeforeElements)(this);
|
|
1000
|
+
if (this.isUserTask
|
|
1001
|
+
|| this.type === 'ExclusiveGateway'
|
|
1002
|
+
|| this.type === 'AutoTask'
|
|
1003
|
+
|| this.type === 'InclusiveGateway') {
|
|
1004
|
+
const prevTasks = (0, getProcesses_1.getPreviousTask)(this);
|
|
1005
|
+
let prevCode = `${tab4}__ProcessIdentification__;\n`;
|
|
1006
|
+
prevCode += `${tab4}const ${this.process.name} = {\n`;
|
|
1007
|
+
const processName = this.process.name;
|
|
1008
|
+
this.process.params.forEach((p) => {
|
|
1009
|
+
prevCode += `${tab5}${p.name}: app.processes.${processName}.${p.name},\n`;
|
|
1010
|
+
});
|
|
1011
|
+
this.process.returns.forEach((p) => {
|
|
1012
|
+
prevCode += `${tab5}${p.name}: app.processes.${processName}.${p.name},\n`;
|
|
1013
|
+
});
|
|
1014
|
+
this.process.constants.forEach((p) => {
|
|
1015
|
+
prevCode += `${tab5}${p.name}: app.processes.${processName}.${p.name},\n`;
|
|
1016
|
+
});
|
|
1017
|
+
// prevCode += `${tab4}elements: {\n`
|
|
1018
|
+
prevCode += prevTasks.map((t) => `${tab5}${t.name}: elements.${t.name},\n`).join(``);
|
|
1019
|
+
// prevCode += `${tab4}}\n`
|
|
1020
|
+
if (this.isUserTask) {
|
|
1021
|
+
//任务完成时可以拿到输出参数,prevCodeClose包含输出参数
|
|
1022
|
+
let prevCodeClose = prevCode + `\n${tab5}${this.name}: { \n`;
|
|
1023
|
+
this.constants.forEach((c, index) => {
|
|
1024
|
+
prevCodeClose += tab6;
|
|
1025
|
+
prevCodeClose += constantsArr[index];
|
|
1026
|
+
prevCodeClose += ',';
|
|
1027
|
+
});
|
|
1028
|
+
this.returns.forEach((c, index) => {
|
|
1029
|
+
prevCodeClose += `\n${tab6}`;
|
|
1030
|
+
prevCodeClose += returnsArr[index];
|
|
1031
|
+
prevCodeClose += ',';
|
|
1032
|
+
});
|
|
1033
|
+
prevCodeClose += ` \n${tab5}}\n`;
|
|
1034
|
+
prevCodeClose += `${tab4}}\n`;
|
|
1035
|
+
prevCode += `\n${tab5}${this.name}: { \n`;
|
|
1036
|
+
this.constants.forEach((c, index) => {
|
|
1037
|
+
prevCode += `${tab6}`;
|
|
1038
|
+
prevCode += constantsArr[index];
|
|
1039
|
+
prevCode += ',';
|
|
1040
|
+
});
|
|
1041
|
+
prevCode += ` \n${tab5}}\n`;
|
|
1042
|
+
prevCode += `${tab4}}\n`;
|
|
1043
|
+
if (Array.isArray(this.bindEvents)) {
|
|
1044
|
+
this.bindEvents.forEach((bindEvent) => {
|
|
1045
|
+
//任务完成时可以拿到输出参数
|
|
1046
|
+
const currentPrevCode = bindEvent.name === 'OnClose' ? prevCodeClose : prevCode;
|
|
1047
|
+
code += `${tab1}${bindEvent.name}: () => [\n`;
|
|
1048
|
+
bindEvent.logics.forEach((logic) => {
|
|
1049
|
+
code += `${logic.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { tabSize: 0 }), currentPrevCode, true, true)}${tab3},\n`;
|
|
1050
|
+
});
|
|
1051
|
+
code += `${tab1}],\n`;
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
code += `${tab1}logics: {\n`;
|
|
1055
|
+
let destinationAttrs = this.bindAttrs.filter((attr) => attr.name === 'destination' || attr.name.startsWith('destination-'));
|
|
1056
|
+
const destinationAllEmpty = destinationAttrs.length && destinationAttrs.every((attr) => !attr.destination.viewNamespace);
|
|
1057
|
+
if (destinationAllEmpty) {
|
|
1058
|
+
code += `${destinationAttrs[0].destination.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 3 }), prevCode)},\n`;
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
destinationAttrs = destinationAttrs.filter((attr) => attr.destination.viewNamespace);
|
|
1062
|
+
destinationAttrs.forEach((attr) => {
|
|
1063
|
+
code += `${attr.destination.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 3 }), prevCode)},\n`;
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
this.bindAttrs.forEach((attr) => {
|
|
1067
|
+
if (attr.name === 'assignee') {
|
|
1068
|
+
code += `${tab3}assignee: function(): string[] {\n`;
|
|
1069
|
+
code += `${attr.assignee.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { tabSize: state.tabSize + 3 }), prevCode)}\n`;
|
|
1070
|
+
code += `${tab3}},\n`;
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
const logics = (0, getProcesses_1.genUserTaskLogic)(this);
|
|
1074
|
+
// sourceMap 映射
|
|
1075
|
+
logics.forEach((logic) => {
|
|
1076
|
+
logic.parentNode = this.process;
|
|
1077
|
+
code += logic.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 3 }));
|
|
1078
|
+
code += ',\n';
|
|
1079
|
+
});
|
|
1080
|
+
code += `${tab1}},\n`;
|
|
1081
|
+
}
|
|
1082
|
+
if (['ExclusiveGateway', 'AutoTask', 'InclusiveGateway'].includes(this.type)) {
|
|
1083
|
+
prevCode += `\n${tab5}${this.name}: elements.${this.name},\n`;
|
|
1084
|
+
prevCode += `${tab3}}\n`;
|
|
1085
|
+
code += `${tab1}logic: `;
|
|
1086
|
+
code += `${this.logic.toEmbeddedTSInProcess((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 3 }), prevCode, true)},\n`;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
if (this.isUserTask || this.type === 'AutoTask' || this.type === 'StartNoneEvent') {
|
|
1090
|
+
code += '_constraints: function() {\n';
|
|
1091
|
+
code += `${tab1}nasl.process.oneOutcomeFlow(${afterLinks.map((l) => `'${l.name}'`).join(',')})\n`;
|
|
1092
|
+
code += '},\n';
|
|
1093
|
+
}
|
|
1094
|
+
if (['ExclusiveGateway', 'ParallelGateway', 'InclusiveGateway'].includes(this.type)) {
|
|
1095
|
+
code += '_constraints: function() {\n';
|
|
1096
|
+
code += `${tab1}nasl.process.atLeastOneOutcomeFlow(${afterLinks.map((l) => `'${l.name}'`).join(',')})\n`;
|
|
1097
|
+
code += `${tab1}nasl.process.atLeastOneOutcomeFlow(${beforeLinks.map((l) => `'${l.name}'`).join(',')})\n`;
|
|
1098
|
+
if (afterLinks.length > 0 && beforeLinks.length > 0) {
|
|
1099
|
+
code += `${tab1}nasl.process.atLeastThreeOutcomeFlow(${beforeLinks.concat(afterLinks).map((l) => `'${l.name}'`).join(',')})\n`;
|
|
1100
|
+
}
|
|
1101
|
+
code += '},\n';
|
|
1102
|
+
}
|
|
1103
|
+
if (!(0, getProcesses_1.isFromStartNode)(this)) {
|
|
1104
|
+
code += '__outOfProcess__,';
|
|
1105
|
+
}
|
|
1106
|
+
code += `${tab0}\n},`;
|
|
1107
|
+
// let code = '';
|
|
1108
|
+
// this.variables.forEach((property) => {
|
|
1109
|
+
// code += `${tab0}export let `;
|
|
1110
|
+
// code += property.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1111
|
+
// code += ';\n';
|
|
1112
|
+
// });
|
|
1113
|
+
// this.returns.forEach((property) => {
|
|
1114
|
+
// code += `${tab0}export let `;
|
|
1115
|
+
// code += property.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1116
|
+
// code += ';\n';
|
|
1117
|
+
// });
|
|
1118
|
+
// this.constants.forEach((property) => {
|
|
1119
|
+
// code += `${tab0}export let `;
|
|
1120
|
+
// code += property.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1121
|
+
// code += ';\n';
|
|
1122
|
+
// });
|
|
1123
|
+
return code;
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
__decorate([
|
|
1127
|
+
(0, decorators_1.property)()
|
|
1128
|
+
], ProcessElement.prototype, "name", void 0);
|
|
1129
|
+
__decorate([
|
|
1130
|
+
(0, decorators_1.property)()
|
|
1131
|
+
], ProcessElement.prototype, "title", void 0);
|
|
1132
|
+
__decorate([
|
|
1133
|
+
(0, decorators_1.property)()
|
|
1134
|
+
], ProcessElement.prototype, "description", void 0);
|
|
1135
|
+
__decorate([
|
|
1136
|
+
(0, decorators_1.property)('BindEvent')
|
|
1137
|
+
], ProcessElement.prototype, "bindEvents", void 0);
|
|
1138
|
+
__decorate([
|
|
1139
|
+
(0, decorators_1.property)()
|
|
1140
|
+
], ProcessElement.prototype, "type", void 0);
|
|
1141
|
+
__decorate([
|
|
1142
|
+
(0, decorators_1.property)()
|
|
1143
|
+
], ProcessElement.prototype, "sourceRef", void 0);
|
|
1144
|
+
__decorate([
|
|
1145
|
+
(0, decorators_1.property)()
|
|
1146
|
+
], ProcessElement.prototype, "targetRef", void 0);
|
|
1147
|
+
__decorate([
|
|
1148
|
+
(0, decorators_1.property)('Rect')
|
|
1149
|
+
], ProcessElement.prototype, "bounds", void 0);
|
|
1150
|
+
__decorate([
|
|
1151
|
+
(0, decorators_1.property)('Point')
|
|
1152
|
+
], ProcessElement.prototype, "waypoints", void 0);
|
|
1153
|
+
__decorate([
|
|
1154
|
+
(0, decorators_1.property)()
|
|
1155
|
+
], ProcessElement.prototype, "flowValue", void 0);
|
|
1156
|
+
__decorate([
|
|
1157
|
+
(0, decorators_1.property)('Logic')
|
|
1158
|
+
], ProcessElement.prototype, "logic", void 0);
|
|
1159
|
+
__decorate([
|
|
1160
|
+
(0, decorators_1.property)('Variable')
|
|
1161
|
+
], ProcessElement.prototype, "variables", void 0);
|
|
1162
|
+
__decorate([
|
|
1163
|
+
(0, decorators_1.property)('Return')
|
|
1164
|
+
], ProcessElement.prototype, "returns", void 0);
|
|
1165
|
+
__decorate([
|
|
1166
|
+
(0, decorators_1.property)('Constant')
|
|
1167
|
+
], ProcessElement.prototype, "constants", void 0);
|
|
1168
|
+
__decorate([
|
|
1169
|
+
(0, decorators_1.property)('BindAttribute')
|
|
1170
|
+
], ProcessElement.prototype, "bindAttrs", void 0);
|
|
1171
|
+
__decorate([
|
|
1172
|
+
(0, translator_1.withSourceMap)()
|
|
1173
|
+
], ProcessElement.prototype, "toEmbeddedTS", null);
|
|
1174
|
+
ProcessElement = ProcessElement_1 = __decorate([
|
|
1175
|
+
decorators_1.className,
|
|
1176
|
+
(0, decorators_1.concept)('流程元素')
|
|
1177
|
+
// @ts-ignore
|
|
1178
|
+
], ProcessElement);
|
|
1179
|
+
exports.ProcessElement = ProcessElement;
|
|
1180
|
+
exports.default = ProcessElement;
|
|
1181
|
+
//================================================================================
|
|
1182
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1183
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
1184
|
+
//================================================================================
|
|
1185
|
+
ProcessElement.prototype.setName = function (name) {
|
|
1186
|
+
const App = this.rootNode;
|
|
1187
|
+
const oldName = this.name;
|
|
1188
|
+
const processName = this.parentNode.name;
|
|
1189
|
+
App.emit('collect:start', {
|
|
1190
|
+
actionMsg: '设置名称',
|
|
1191
|
+
});
|
|
1192
|
+
const object = {
|
|
1193
|
+
name,
|
|
1194
|
+
};
|
|
1195
|
+
this.update({
|
|
1196
|
+
...object,
|
|
1197
|
+
field: 'name',
|
|
1198
|
+
});
|
|
1199
|
+
(0, getProcesses_1.syncMemberExpression)(this, (node) => {
|
|
1200
|
+
if (node.object.name === processName && node.property.name === oldName) {
|
|
1201
|
+
node.property.update({
|
|
1202
|
+
name,
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
});
|
|
1206
|
+
const process = this.process;
|
|
1207
|
+
process.elements.forEach((el) => {
|
|
1208
|
+
if (el.sourceRef === oldName) {
|
|
1209
|
+
el.setSourceRef(name);
|
|
1210
|
+
}
|
|
1211
|
+
if (el.targetRef === oldName) {
|
|
1212
|
+
el.setTargetRef(name);
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
if (this.logic) {
|
|
1216
|
+
this.logic.setName(name);
|
|
1217
|
+
}
|
|
1218
|
+
App.emit('collect:end');
|
|
1219
|
+
};
|
|
1220
|
+
//# sourceMappingURL=ProcessElement__.js.map
|