@lcap/nasl 2.22.2-beta.3 → 2.22.2-beta.4
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 +797 -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
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var SwitchCase_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.SwitchCase = void 0;
|
|
14
|
+
const translator_1 = require("../translator");
|
|
15
|
+
const decorators_1 = require("../decorators");
|
|
16
|
+
const LogicItem__1 = __importDefault(require("./LogicItem__"));
|
|
17
|
+
/**
|
|
18
|
+
* 选择分支情况
|
|
19
|
+
*/
|
|
20
|
+
let SwitchCase = SwitchCase_1 =
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
class SwitchCase extends LogicItem__1.default {
|
|
23
|
+
/** 类名 */
|
|
24
|
+
static ConceptName = 'SwitchCase';
|
|
25
|
+
/**
|
|
26
|
+
* 产品概念
|
|
27
|
+
*/
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
concept;
|
|
30
|
+
/**
|
|
31
|
+
* 条件表达式
|
|
32
|
+
*/
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
test;
|
|
35
|
+
/**
|
|
36
|
+
* then
|
|
37
|
+
*/
|
|
38
|
+
consequent = [];
|
|
39
|
+
/**
|
|
40
|
+
* @param source 需要合并的部分参数
|
|
41
|
+
*/
|
|
42
|
+
constructor(source) {
|
|
43
|
+
source = Object.assign({}, SwitchCase_1.getDefaultOptions(), source);
|
|
44
|
+
super(source);
|
|
45
|
+
super.subConstructor(source);
|
|
46
|
+
}
|
|
47
|
+
static from(source, parentNode, parentKey) {
|
|
48
|
+
return super.from(source, parentNode, parentKey);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 设置条件表达式
|
|
52
|
+
*/
|
|
53
|
+
setTest(test) {
|
|
54
|
+
test._delete();
|
|
55
|
+
const relationOptions = { parentNode: this, parentKey: 'test' };
|
|
56
|
+
Object.assign(test, relationOptions);
|
|
57
|
+
const object = {
|
|
58
|
+
test,
|
|
59
|
+
};
|
|
60
|
+
this.update({
|
|
61
|
+
...object,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
_insertItemAt(options, index) {
|
|
65
|
+
const logicItemOptions = {};
|
|
66
|
+
const relationOptions = { parentNode: this, parentKey: 'consequent' };
|
|
67
|
+
let logicItem;
|
|
68
|
+
if (options instanceof LogicItem__1.default) {
|
|
69
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
70
|
+
logicItem = options;
|
|
71
|
+
Object.assign(logicItem, relationOptions);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
logicItem = LogicItem__1.default.from({
|
|
75
|
+
...logicItemOptions,
|
|
76
|
+
...options,
|
|
77
|
+
}, this, 'consequent');
|
|
78
|
+
}
|
|
79
|
+
this.consequent.splice(index, 0, logicItem);
|
|
80
|
+
return logicItem;
|
|
81
|
+
}
|
|
82
|
+
insertItemAt(options, index) {
|
|
83
|
+
const node = this._insertItemAt(options, index);
|
|
84
|
+
node.create({
|
|
85
|
+
index,
|
|
86
|
+
parentNode: this,
|
|
87
|
+
parentKey: 'consequent',
|
|
88
|
+
});
|
|
89
|
+
return node;
|
|
90
|
+
}
|
|
91
|
+
_addItem(options) {
|
|
92
|
+
const index = this.consequent.length;
|
|
93
|
+
return this._insertItemAt(options, index);
|
|
94
|
+
}
|
|
95
|
+
addItem(options) {
|
|
96
|
+
const node = this._addItem(options);
|
|
97
|
+
const index = this.consequent.indexOf(node);
|
|
98
|
+
node.create({
|
|
99
|
+
index,
|
|
100
|
+
parentNode: this,
|
|
101
|
+
parentKey: 'consequent',
|
|
102
|
+
});
|
|
103
|
+
return node;
|
|
104
|
+
}
|
|
105
|
+
removeTest(options) {
|
|
106
|
+
let test;
|
|
107
|
+
if (typeof options === 'string') {
|
|
108
|
+
test = this.test;
|
|
109
|
+
if (!test) {
|
|
110
|
+
throw new Error('找不到逻辑项 ' + options);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
test = options;
|
|
115
|
+
}
|
|
116
|
+
return test.delete();
|
|
117
|
+
}
|
|
118
|
+
removeItemInConsequent(options) {
|
|
119
|
+
let logicItem = options;
|
|
120
|
+
return logicItem.delete();
|
|
121
|
+
}
|
|
122
|
+
__removeLogicItem(logicItem) {
|
|
123
|
+
const parentKey = logicItem.parentKey;
|
|
124
|
+
const params = {
|
|
125
|
+
parentNode: this,
|
|
126
|
+
parentKey,
|
|
127
|
+
index: -1,
|
|
128
|
+
object: null,
|
|
129
|
+
oldObject: logicItem,
|
|
130
|
+
};
|
|
131
|
+
if (parentKey) {
|
|
132
|
+
params.parentKey = parentKey;
|
|
133
|
+
if (Array.isArray(this[parentKey])) {
|
|
134
|
+
const index = this[parentKey].indexOf(logicItem);
|
|
135
|
+
~index && this[parentKey].splice(index, 1);
|
|
136
|
+
params.index = index;
|
|
137
|
+
}
|
|
138
|
+
else if (this[parentKey] === logicItem) {
|
|
139
|
+
params.index = 0;
|
|
140
|
+
this[parentKey] = undefined;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return params;
|
|
144
|
+
}
|
|
145
|
+
//================================================================================
|
|
146
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
147
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
148
|
+
//================================================================================
|
|
149
|
+
toJS(state, index, length) {
|
|
150
|
+
let code = '';
|
|
151
|
+
if (index === 0) {
|
|
152
|
+
code = 'if (';
|
|
153
|
+
code += this.test ? this.test.toJS((0, translator_1.shiftState)(state, code, {
|
|
154
|
+
tabSize: 0,
|
|
155
|
+
})) : '';
|
|
156
|
+
code += ') {\n';
|
|
157
|
+
}
|
|
158
|
+
else if (index !== length - 1) {
|
|
159
|
+
code = 'else if (';
|
|
160
|
+
code += this.test ? this.test.toJS((0, translator_1.shiftState)(state, code, {
|
|
161
|
+
tabSize: 0,
|
|
162
|
+
})) : '';
|
|
163
|
+
code += ') {\n';
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
code += 'else {\n';
|
|
167
|
+
}
|
|
168
|
+
if (Array.isArray(this.consequent)) {
|
|
169
|
+
this.consequent.forEach((logicItem) => {
|
|
170
|
+
code
|
|
171
|
+
+= logicItem.toJS((0, translator_1.shiftState)(state, code, {
|
|
172
|
+
tabSize: 0,
|
|
173
|
+
})) + '\n';
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
code += '}\n';
|
|
177
|
+
return code;
|
|
178
|
+
}
|
|
179
|
+
toEmbeddedTS(state, isLast) {
|
|
180
|
+
let code = '\n';
|
|
181
|
+
if (!isLast) {
|
|
182
|
+
code += 'if (nasl.core.ensureBoolean(';
|
|
183
|
+
code += this.test ? this.test.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
184
|
+
tabSize: (state?.tabSize || 0) + 1,
|
|
185
|
+
})) : '__IDENTIFIER__';
|
|
186
|
+
code += ')) {\n';
|
|
187
|
+
if (Array.isArray(this.consequent)) {
|
|
188
|
+
this.consequent.forEach((logicItem) => {
|
|
189
|
+
code
|
|
190
|
+
+= logicItem.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
191
|
+
tabSize: (state?.tabSize || 0) + 1,
|
|
192
|
+
})) + ';\n';
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
code += (0, translator_1.indent)((state?.tabSize || 0)) + '}\n';
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
code += 'else {\n';
|
|
199
|
+
if (Array.isArray(this.consequent)) {
|
|
200
|
+
this.consequent.forEach((logicItem) => {
|
|
201
|
+
code
|
|
202
|
+
+= logicItem.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
203
|
+
tabSize: (state?.tabSize || 0) + 1,
|
|
204
|
+
})) + ';\n';
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
code += (0, translator_1.indent)((state?.tabSize || 0)) + '}\n';
|
|
208
|
+
}
|
|
209
|
+
return code;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, decorators_1.property)('LogicItem')
|
|
214
|
+
], SwitchCase.prototype, "test", void 0);
|
|
215
|
+
__decorate([
|
|
216
|
+
(0, decorators_1.property)('LogicItem')
|
|
217
|
+
], SwitchCase.prototype, "consequent", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, translator_1.withSourceMap)()
|
|
220
|
+
], SwitchCase.prototype, "toEmbeddedTS", null);
|
|
221
|
+
SwitchCase = SwitchCase_1 = __decorate([
|
|
222
|
+
decorators_1.className,
|
|
223
|
+
(0, decorators_1.concept)('选择分支情况')
|
|
224
|
+
// @ts-ignore
|
|
225
|
+
], SwitchCase);
|
|
226
|
+
exports.SwitchCase = SwitchCase;
|
|
227
|
+
exports.default = SwitchCase;
|
|
228
|
+
//================================================================================
|
|
229
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
230
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
231
|
+
//================================================================================
|
|
232
|
+
//# sourceMappingURL=SwitchCase__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchCase__.js","sourceRoot":"","sources":["../../src/concepts/SwitchCase__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAAmF;AAMnF,8CAA6E;AAK7E,+DAAsC;AAEt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G,KAAK,CAAC;SACjD;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CAMJ,CAAA;AA5RG;IAFC,IAAA,qBAAQ,EAAC,WAAW,CAAC;wCAEL;AAMjB;IADC,IAAA,qBAAQ,EAAC,WAAW,CAAC;8CACY;AA+OlC;IADC,IAAA,0BAAa,GAAE;8CAkCf;AArSQ,UAAU;IAHtB,sBAAS;IACT,IAAA,oBAAO,EAAC,QAAQ,CAAC;IAClB,aAAa;GACA,UAAU,CA2StB;AA3SY,gCAAU;AA6SvB,kBAAe,UAAU,CAAC;AAC1B,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { TranslatorState } from '../translator';
|
|
2
|
+
import { Params } from '../common/EventEmitter';
|
|
3
|
+
import SwitchCase from './SwitchCase__';
|
|
4
|
+
import LogicItem from './LogicItem__';
|
|
5
|
+
/**
|
|
6
|
+
* 选择分支
|
|
7
|
+
*/
|
|
8
|
+
export declare class SwitchStatement extends LogicItem {
|
|
9
|
+
/** 类名 */
|
|
10
|
+
static readonly ConceptName = "SwitchStatement";
|
|
11
|
+
/**
|
|
12
|
+
* 产品概念
|
|
13
|
+
*/
|
|
14
|
+
readonly concept: 'SwitchStatement';
|
|
15
|
+
/**
|
|
16
|
+
* 选择分支情况列表
|
|
17
|
+
*/
|
|
18
|
+
cases: Array<SwitchCase>;
|
|
19
|
+
/**
|
|
20
|
+
* @param source 需要合并的部分参数
|
|
21
|
+
*/
|
|
22
|
+
constructor(source?: Partial<SwitchStatement>);
|
|
23
|
+
static from(source: any, parentNode?: any, parentKey?: string): SwitchStatement;
|
|
24
|
+
/**
|
|
25
|
+
* 插入选择分支情况
|
|
26
|
+
* @internal
|
|
27
|
+
* @param switchCaseOptions 选择分支情况参数
|
|
28
|
+
*/
|
|
29
|
+
_insertSwitchCaseAt(switchCaseOptions: Partial<SwitchCase>, index: number): SwitchCase;
|
|
30
|
+
/**
|
|
31
|
+
* 插入选择分支情况
|
|
32
|
+
* @internal
|
|
33
|
+
* @param switchCase 已有的选择分支情况实例
|
|
34
|
+
*/
|
|
35
|
+
_insertSwitchCaseAt(switchCase: SwitchCase, index: number): SwitchCase;
|
|
36
|
+
/**
|
|
37
|
+
* 插入选择分支情况
|
|
38
|
+
* @param switchCaseOptions 选择分支情况参数
|
|
39
|
+
*/
|
|
40
|
+
insertSwitchCaseAt(switchCaseOptions: Partial<SwitchCase>, index: number): SwitchCase;
|
|
41
|
+
/**
|
|
42
|
+
* 插入选择分支情况
|
|
43
|
+
* @param switchCase 已有的选择分支情况实例
|
|
44
|
+
*/
|
|
45
|
+
insertSwitchCaseAt(switchCase: SwitchCase, index: number): SwitchCase;
|
|
46
|
+
/**
|
|
47
|
+
* 添加选择分支情况
|
|
48
|
+
* @internal
|
|
49
|
+
* @param switchCaseOptions 选择分支情况参数
|
|
50
|
+
*/
|
|
51
|
+
_addSwitchCase(switchCaseOptions: Partial<SwitchCase>): SwitchCase;
|
|
52
|
+
/**
|
|
53
|
+
* 添加选择分支情况
|
|
54
|
+
* @internal
|
|
55
|
+
* @param switchCase 已有的选择分支情况实例
|
|
56
|
+
*/
|
|
57
|
+
_addSwitchCase(switchCase: SwitchCase): SwitchCase;
|
|
58
|
+
/**
|
|
59
|
+
* 添加选择分支情况
|
|
60
|
+
* @param switchCaseOptions 选择分支情况参数
|
|
61
|
+
*/
|
|
62
|
+
addSwitchCase(switchCaseOptions: Partial<SwitchCase>): SwitchCase;
|
|
63
|
+
/**
|
|
64
|
+
* 添加选择分支情况
|
|
65
|
+
* @param switchCase 已有的选择分支情况实例
|
|
66
|
+
*/
|
|
67
|
+
addSwitchCase(switchCase: SwitchCase): SwitchCase;
|
|
68
|
+
/**
|
|
69
|
+
* 删除选择分支情况
|
|
70
|
+
* @param switchCase 已有的选择分支情况实例
|
|
71
|
+
*/
|
|
72
|
+
removeSwitchCase(switchCase: SwitchCase): void;
|
|
73
|
+
__removeLogicItem(logicItem: LogicItem): Params;
|
|
74
|
+
toUI(state?: TranslatorState): string;
|
|
75
|
+
toJS(state?: TranslatorState): string;
|
|
76
|
+
static getDefaultOptions(): {
|
|
77
|
+
label: string;
|
|
78
|
+
cases: {
|
|
79
|
+
concept: string;
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
toEmbeddedTS(state?: TranslatorState): string;
|
|
83
|
+
}
|
|
84
|
+
export default SwitchStatement;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var SwitchStatement_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.SwitchStatement = void 0;
|
|
14
|
+
const translator_1 = require("../translator");
|
|
15
|
+
const decorators_1 = require("../decorators");
|
|
16
|
+
const SwitchCase__1 = __importDefault(require("./SwitchCase__"));
|
|
17
|
+
const LogicItem__1 = __importDefault(require("./LogicItem__"));
|
|
18
|
+
/**
|
|
19
|
+
* 选择分支
|
|
20
|
+
*/
|
|
21
|
+
let SwitchStatement = SwitchStatement_1 =
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
class SwitchStatement extends LogicItem__1.default {
|
|
24
|
+
/** 类名 */
|
|
25
|
+
static ConceptName = 'SwitchStatement';
|
|
26
|
+
/**
|
|
27
|
+
* 产品概念
|
|
28
|
+
*/
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
concept;
|
|
31
|
+
/**
|
|
32
|
+
* 选择分支情况列表
|
|
33
|
+
*/
|
|
34
|
+
cases = [];
|
|
35
|
+
/**
|
|
36
|
+
* @param source 需要合并的部分参数
|
|
37
|
+
*/
|
|
38
|
+
constructor(source) {
|
|
39
|
+
source = Object.assign({}, SwitchStatement_1.getDefaultOptions(), source);
|
|
40
|
+
super(source);
|
|
41
|
+
super.subConstructor(source);
|
|
42
|
+
}
|
|
43
|
+
static from(source, parentNode, parentKey) {
|
|
44
|
+
return super.from(source, parentNode, parentKey);
|
|
45
|
+
}
|
|
46
|
+
_insertSwitchCaseAt(options, index) {
|
|
47
|
+
const switchCaseOptions = {};
|
|
48
|
+
const relationOptions = { parentNode: this, parentKey: 'cases' };
|
|
49
|
+
let switchCase;
|
|
50
|
+
if (options instanceof SwitchCase__1.default) {
|
|
51
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
52
|
+
switchCase = options;
|
|
53
|
+
Object.assign(switchCase, relationOptions);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
switchCase = SwitchCase__1.default.from({
|
|
57
|
+
...switchCaseOptions,
|
|
58
|
+
...options,
|
|
59
|
+
}, this, 'cases');
|
|
60
|
+
}
|
|
61
|
+
this.cases.splice(index, 0, switchCase);
|
|
62
|
+
return switchCase;
|
|
63
|
+
}
|
|
64
|
+
insertSwitchCaseAt(options, index) {
|
|
65
|
+
const node = this._insertSwitchCaseAt(options, index);
|
|
66
|
+
node.create({
|
|
67
|
+
index,
|
|
68
|
+
parentNode: this,
|
|
69
|
+
parentKey: 'cases',
|
|
70
|
+
});
|
|
71
|
+
return node;
|
|
72
|
+
}
|
|
73
|
+
_addSwitchCase(options) {
|
|
74
|
+
const index = this.cases.length - 1;
|
|
75
|
+
return this._insertSwitchCaseAt(options, index);
|
|
76
|
+
}
|
|
77
|
+
addSwitchCase(options) {
|
|
78
|
+
const node = this._addSwitchCase(options);
|
|
79
|
+
const index = this.cases.indexOf(node);
|
|
80
|
+
node.create({
|
|
81
|
+
index,
|
|
82
|
+
parentNode: this,
|
|
83
|
+
parentKey: 'cases',
|
|
84
|
+
});
|
|
85
|
+
return node;
|
|
86
|
+
}
|
|
87
|
+
removeSwitchCase(options) {
|
|
88
|
+
let switchCase = options;
|
|
89
|
+
return switchCase.delete();
|
|
90
|
+
}
|
|
91
|
+
__removeLogicItem(logicItem) {
|
|
92
|
+
const parentKey = logicItem.parentKey;
|
|
93
|
+
const params = {
|
|
94
|
+
parentNode: this,
|
|
95
|
+
parentKey,
|
|
96
|
+
index: -1,
|
|
97
|
+
object: null,
|
|
98
|
+
oldObject: logicItem,
|
|
99
|
+
};
|
|
100
|
+
if (parentKey) {
|
|
101
|
+
params.parentKey = parentKey;
|
|
102
|
+
if (Array.isArray(this[parentKey])) {
|
|
103
|
+
const index = this[parentKey].indexOf(logicItem);
|
|
104
|
+
~index && this[parentKey].splice(index, 1);
|
|
105
|
+
params.index = index;
|
|
106
|
+
}
|
|
107
|
+
else if (this[parentKey] === logicItem) {
|
|
108
|
+
params.index = 0;
|
|
109
|
+
this[parentKey] = undefined;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return params;
|
|
113
|
+
}
|
|
114
|
+
//================================================================================
|
|
115
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
116
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
117
|
+
//================================================================================
|
|
118
|
+
toUI(state) {
|
|
119
|
+
let code = '';
|
|
120
|
+
this.cases.forEach((item, index) => {
|
|
121
|
+
// 如果是最后一项
|
|
122
|
+
if (index === this.cases.length - 1) {
|
|
123
|
+
code += item.toUI(state, true);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
code += item.toUI(state);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return code;
|
|
130
|
+
}
|
|
131
|
+
toJS(state) {
|
|
132
|
+
let code = '';
|
|
133
|
+
this.cases.forEach((item, index) => {
|
|
134
|
+
// 如果是最后一项
|
|
135
|
+
code += item.toJS(state, index, this.cases.length);
|
|
136
|
+
});
|
|
137
|
+
return code;
|
|
138
|
+
}
|
|
139
|
+
static getDefaultOptions() {
|
|
140
|
+
return {
|
|
141
|
+
label: '选择分支',
|
|
142
|
+
cases: [{ concept: 'SwitchCase' }, { concept: 'SwitchCase' }, { concept: 'SwitchCase' }, { concept: 'SwitchCase' }],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
toEmbeddedTS(state) {
|
|
146
|
+
let code = '';
|
|
147
|
+
// 最后一项是else
|
|
148
|
+
this.cases.forEach((item, index) => {
|
|
149
|
+
// 如果是最后一项
|
|
150
|
+
if (index === this.cases.length - 1) {
|
|
151
|
+
code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code), true);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code));
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return code;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, decorators_1.property)('SwitchCase')
|
|
162
|
+
], SwitchStatement.prototype, "cases", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, translator_1.withSourceMap)()
|
|
165
|
+
], SwitchStatement.prototype, "toEmbeddedTS", null);
|
|
166
|
+
SwitchStatement = SwitchStatement_1 = __decorate([
|
|
167
|
+
decorators_1.className,
|
|
168
|
+
(0, decorators_1.concept)('选择分支')
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
], SwitchStatement);
|
|
171
|
+
exports.SwitchStatement = SwitchStatement;
|
|
172
|
+
exports.default = SwitchStatement;
|
|
173
|
+
//================================================================================
|
|
174
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
175
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
176
|
+
//================================================================================
|
|
177
|
+
//# sourceMappingURL=SwitchStatement__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchStatement__.js","sourceRoot":"","sources":["../../src/concepts/SwitchStatement__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAA2E;AAO3E,8CAA6E;AAK7E,iEAAwC;AACxC,+DAAsC;AAEtC;;GAEG;AAIH,IAAa,eAAe;AAD5B,aAAa;AACb,MAAa,eAAgB,SAAQ,oBAAS;IAC1C,SAAS;IACT,MAAM,CAAU,WAAW,GAAG,iBAAiB,CAAC;IAEhD;;OAEG;IACH,aAAa;IACJ,OAAO,CAAqB;IAErC;;OAEG;IAEH,KAAK,GAAsB,EAAE,CAAC;IAI9B;;OAEG;IACH,YAAY,MAAiC;QACzC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,iBAAe,CAAC,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;QACxE,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAW,EAAE,UAAgB,EAAE,SAAkB;QACzD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAoB,CAAC;IACxE,CAAC;IAuBD,mBAAmB,CAAC,OAAyC,EAAE,KAAa;QACxE,MAAM,iBAAiB,GAAQ,EAAE,CAAC;QAClC,MAAM,eAAe,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QACjE,IAAI,UAAsB,CAAC;QAC3B,IAAI,OAAO,YAAY,qBAAU,EAAE;YAC/B,OAAO,CAAC,YAAY,EAAE,CAAC,CA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AE;mDAaf;AA9NQ,eAAe;IAH3B,sBAAS;IACT,IAAA,oBAAO,EAAC,MAAM,CAAC;IAChB,aAAa;GACA,eAAe,CAmO3B;AAnOY,0CAAe;AAqO5B,kBAAe,eAAe,CAAC;AAC/B,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Params } from '../common/EventEmitter';
|
|
2
|
+
import BaseNode from '../common/BaseNode';
|
|
3
|
+
/**
|
|
4
|
+
* 主题
|
|
5
|
+
*/
|
|
6
|
+
export declare class Theme extends BaseNode {
|
|
7
|
+
/** 类名 */
|
|
8
|
+
static readonly ConceptName = "Theme";
|
|
9
|
+
/**
|
|
10
|
+
* 产品概念
|
|
11
|
+
*/
|
|
12
|
+
readonly concept: 'Theme';
|
|
13
|
+
/**
|
|
14
|
+
* 主题标题
|
|
15
|
+
*/
|
|
16
|
+
title: string;
|
|
17
|
+
/**
|
|
18
|
+
* 主题变量 Map
|
|
19
|
+
*/
|
|
20
|
+
variableMap: {
|
|
21
|
+
[name: string]: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @param source 需要合并的部分参数
|
|
25
|
+
*/
|
|
26
|
+
constructor(source?: Partial<Theme>);
|
|
27
|
+
static from(source: any, parentNode?: any, parentKey?: string): Theme;
|
|
28
|
+
/**
|
|
29
|
+
* 从父级删除该节点
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
_delete(): Params;
|
|
33
|
+
/**
|
|
34
|
+
* 设置主题标题
|
|
35
|
+
*/
|
|
36
|
+
setTitle(title: string): void;
|
|
37
|
+
}
|
|
38
|
+
export default Theme;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var Theme_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Theme = void 0;
|
|
14
|
+
const decorators_1 = require("../decorators");
|
|
15
|
+
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
16
|
+
/**
|
|
17
|
+
* 主题
|
|
18
|
+
*/
|
|
19
|
+
let Theme = Theme_1 =
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
class Theme extends BaseNode_1.default {
|
|
22
|
+
/** 类名 */
|
|
23
|
+
static ConceptName = 'Theme';
|
|
24
|
+
/**
|
|
25
|
+
* 产品概念
|
|
26
|
+
*/
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
concept;
|
|
29
|
+
/**
|
|
30
|
+
* 主题标题
|
|
31
|
+
*/
|
|
32
|
+
title = '默认主题样式';
|
|
33
|
+
/**
|
|
34
|
+
* 主题变量 Map
|
|
35
|
+
*/
|
|
36
|
+
variableMap = {};
|
|
37
|
+
/**
|
|
38
|
+
* @param source 需要合并的部分参数
|
|
39
|
+
*/
|
|
40
|
+
constructor(source) {
|
|
41
|
+
source = Object.assign({}, Theme_1.getDefaultOptions(), source);
|
|
42
|
+
super(source);
|
|
43
|
+
super.subConstructor(source);
|
|
44
|
+
}
|
|
45
|
+
static from(source, parentNode, parentKey) {
|
|
46
|
+
return super.from(source, parentNode, parentKey);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 从父级删除该节点
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
_delete() {
|
|
53
|
+
let params = null;
|
|
54
|
+
if (this.parentNode) {
|
|
55
|
+
params = this.parentNode?.__removeTheme?.(this);
|
|
56
|
+
}
|
|
57
|
+
return params;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 设置主题标题
|
|
61
|
+
*/
|
|
62
|
+
setTitle(title) {
|
|
63
|
+
const object = {
|
|
64
|
+
title,
|
|
65
|
+
};
|
|
66
|
+
this.update({
|
|
67
|
+
...object,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, decorators_1.property)()
|
|
73
|
+
], Theme.prototype, "title", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, decorators_1.property)()
|
|
76
|
+
], Theme.prototype, "variableMap", void 0);
|
|
77
|
+
Theme = Theme_1 = __decorate([
|
|
78
|
+
decorators_1.className,
|
|
79
|
+
(0, decorators_1.concept)('主题')
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
], Theme);
|
|
82
|
+
exports.Theme = Theme;
|
|
83
|
+
exports.default = Theme;
|
|
84
|
+
//================================================================================
|
|
85
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
86
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
87
|
+
//================================================================================
|
|
88
|
+
//# sourceMappingURL=Theme__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Theme__.js","sourceRoot":"","sources":["../../src/concepts/Theme__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAKA,8CAA6E;AAI7E,kEAA0C;AAG1C;;GAEG;AAIH,IAAa,KAAK;AADlB,aAAa;AACb,MAAa,KAAM,SAAQ,kBAAQ;IAC/B,SAAS;IACT,MAAM,CAAU,WAAW,GAAG,OAAO,CAAC;IAEtC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