@lcap/nasl 3.2.0-beta.4 → 3.3.0-alpha
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/upgrader/2.20.js +1 -1
- package/out/automate/upgrader/2.20.js.map +1 -1
- package/out/bak/translator.js +11 -15
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/generator/AfterStartNode.js +3 -1
- package/out/breakpoint/generator/AfterStartNode.js.map +1 -1
- package/out/breakpoint/generator/BeforeEndNode.js.map +1 -1
- package/out/breakpoint/generator/BreakpointNode.d.ts +1 -0
- package/out/breakpoint/generator/BreakpointNode.js +48 -15
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
- package/out/breakpoint/generator/CallbackNode.d.ts +4 -0
- package/out/breakpoint/generator/CallbackNode.js +22 -0
- package/out/breakpoint/generator/CallbackNode.js.map +1 -0
- package/out/breakpoint/generator/FragmentNode.d.ts +4 -0
- package/out/breakpoint/generator/FragmentNode.js +18 -0
- package/out/breakpoint/generator/FragmentNode.js.map +1 -0
- package/out/breakpoint/generator/index.js +25 -4
- package/out/breakpoint/generator/index.js.map +1 -1
- package/out/breakpoint/shared/constants.d.ts +3 -0
- package/out/breakpoint/shared/constants.js +6 -1
- package/out/breakpoint/shared/constants.js.map +1 -1
- package/out/breakpoint/shared/operations.js.map +1 -1
- package/out/breakpoint/shared/socket.d.ts +1 -1
- package/out/breakpoint/shared/socket.js +36 -7
- package/out/breakpoint/shared/socket.js.map +1 -1
- package/out/breakpoint/shared/utils.d.ts +2 -0
- package/out/breakpoint/shared/utils.js +15 -2
- package/out/breakpoint/shared/utils.js.map +1 -1
- package/out/breakpoint/store/core.d.ts +48 -2
- package/out/breakpoint/store/core.js +58 -32
- package/out/breakpoint/store/core.js.map +1 -1
- package/out/breakpoint/store/dock.js +1 -1
- package/out/breakpoint/store/dock.js.map +1 -1
- package/out/common/BaseNode.d.ts +1 -1
- package/out/common/BaseNode.js +105 -51
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/Command.d.ts +13 -2
- package/out/common/Command.js +37 -9
- package/out/common/Command.js.map +1 -1
- package/out/common/EventEmitter.js.map +1 -1
- package/out/common/Messager.d.ts +3 -3
- package/out/common/Messager.js +6 -7
- package/out/common/Messager.js.map +1 -1
- package/out/common/asyncFuncMap.js.map +1 -1
- package/out/concepts/Abort__.js +6 -5
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +4 -3
- package/out/concepts/Anchor__.js +24 -7
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +22 -21
- package/out/concepts/AnonymousFunction__.js +48 -22
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.d.ts +421 -247
- package/out/concepts/App__.js +286 -54
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +4 -3
- package/out/concepts/Argument__.js +42 -11
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +45 -45
- package/out/concepts/Assignee__.js +15 -15
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.js +6 -5
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +7 -6
- package/out/concepts/Assignment__.js +40 -22
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.d.ts +3 -3
- package/out/concepts/Attribute__.js +8 -7
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.js +4 -3
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +15 -15
- package/out/concepts/AuthLogicForCallInterface__.js +46 -27
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +27 -13
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +5 -5
- package/out/concepts/BackendVariable__.js +23 -26
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +18 -18
- package/out/concepts/Backend__.js +13 -13
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +34 -33
- package/out/concepts/BatchAssignment__.js +83 -43
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +7 -6
- package/out/concepts/BinaryExpression__.js +60 -24
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +37 -37
- package/out/concepts/BindAttribute__.js +101 -48
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +13 -13
- package/out/concepts/BindDirective__.js +23 -21
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +28 -28
- package/out/concepts/BindEvent__.js +99 -48
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +14 -15
- package/out/concepts/BindStyle__.js +16 -16
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +1 -0
- package/out/concepts/BooleanLiteral__.js +12 -5
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +15 -15
- package/out/concepts/CallAuthInterface__.js +23 -22
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +11 -9
- package/out/concepts/CallConnector__.js +79 -36
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +17 -16
- package/out/concepts/CallFunction__.js +95 -63
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +9 -8
- package/out/concepts/CallInterface__.js +71 -30
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +20 -19
- package/out/concepts/CallLogic__.js +155 -52
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +51 -51
- package/out/concepts/CallQueryComponent__.js +66 -63
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.d.ts +1 -0
- package/out/concepts/Comment__.js +13 -6
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.d.ts +3 -3
- package/out/concepts/CompletionProperty__.js +8 -7
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +15 -15
- package/out/concepts/ConfigGroup__.js +9 -9
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.js +4 -3
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +15 -15
- package/out/concepts/ConfigProperty__.js +10 -10
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +15 -15
- package/out/concepts/Configuration__.js +9 -9
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +166 -0
- package/out/concepts/Connection__.js +332 -0
- package/out/concepts/Connection__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.js +4 -3
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.d.ts +66 -66
- package/out/concepts/Connector__.js +16 -15
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +3 -3
- package/out/concepts/Constant__.js +8 -7
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataElement__.d.ts +3 -3
- package/out/concepts/DataElement__.js +6 -5
- package/out/concepts/DataElement__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +15 -15
- package/out/concepts/DataSource__.js +55 -39
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.js +4 -3
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +12 -11
- package/out/concepts/Destination__.js +93 -36
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js +15 -13
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +1 -1
- package/out/concepts/EntityIndex__.js +6 -5
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +8 -7
- package/out/concepts/EntityProperty__.js +39 -24
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +31 -30
- package/out/concepts/Entity__.js +40 -16
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -0
- package/out/concepts/EnumItem__.js +12 -5
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +9 -8
- package/out/concepts/Enum__.js +24 -11
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.d.ts +15 -15
- package/out/concepts/Event__.js +6 -5
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +6 -6
- package/out/concepts/ExternalDestination__.js +12 -11
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +25 -24
- package/out/concepts/ForEachStatement__.js +101 -36
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.d.ts +30 -30
- package/out/concepts/FrontendLibrary__.js +12 -13
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendVariable__.js +4 -3
- package/out/concepts/FrontendVariable__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +64 -65
- package/out/concepts/Frontend__.js +23 -27
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +64 -63
- package/out/concepts/Function__.js +49 -21
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +37 -31
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +20 -19
- package/out/concepts/IfStatement__.js +64 -34
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Integration__.d.ts +3 -3
- package/out/concepts/Integration__.js +8 -7
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +3 -3
- package/out/concepts/InterfaceParam__.js +7 -6
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +33 -33
- package/out/concepts/Interface__.js +19 -20
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +1 -0
- package/out/concepts/JSBlock__.js +12 -5
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.js +10 -9
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +6 -0
- package/out/concepts/LogicItem__.js +14 -5
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +80 -79
- package/out/concepts/Logic__.js +204 -58
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +39 -38
- package/out/concepts/MatchCase__.js +122 -37
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +13 -11
- package/out/concepts/Match__.js +128 -60
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +7 -6
- package/out/concepts/MemberExpression__.js +52 -22
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MicroApp__.js +4 -3
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.d.ts +239 -155
- package/out/concepts/Module__.js +139 -33
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.d.ts +15 -15
- package/out/concepts/MsgTriggerEvent__.js +6 -5
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.d.ts +23 -15
- package/out/concepts/MsgTriggerLauncher__.js +24 -5
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/Namespace__.d.ts +180 -180
- package/out/concepts/Namespace__.js +33 -34
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +49 -48
- package/out/concepts/NewComposite__.js +164 -49
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +19 -18
- package/out/concepts/NewList__.js +29 -12
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +34 -33
- package/out/concepts/NewMap__.js +81 -72
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.js +6 -5
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.js +6 -5
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +4 -3
- package/out/concepts/NumericLiteral__.js +15 -8
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +4 -3
- package/out/concepts/OqlQueryComponent__.js +25 -16
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +79 -79
- package/out/concepts/OverriddenLogic__.js +79 -58
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.d.ts +6 -5
- package/out/concepts/Param__.js +66 -29
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +4 -3
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.d.ts +30 -30
- package/out/concepts/ProcessComponent__.js +8 -7
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +96 -96
- package/out/concepts/ProcessElement__.js +34 -34
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +6 -5
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.js +6 -5
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +75 -75
- package/out/concepts/Process__.js +33 -30
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +3 -3
- package/out/concepts/QueryAggregateExpression__.js +8 -7
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +7 -6
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +8 -8
- package/out/concepts/QueryFromExpression__.js +8 -7
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +3 -3
- package/out/concepts/QueryGroupByExpression__.js +9 -10
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +23 -23
- package/out/concepts/QueryJoinExpression__.js +11 -10
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +6 -6
- package/out/concepts/QueryLimitExpression__.js +9 -8
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +6 -6
- package/out/concepts/QueryOrderByExpression__.js +9 -8
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.d.ts +30 -30
- package/out/concepts/QuerySelectExpression__.js +9 -8
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +4 -3
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.d.ts +4 -3
- package/out/concepts/Return__.js +37 -18
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +9 -9
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +18 -18
- package/out/concepts/SelectMembers__.js +10 -9
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/Slot__.d.ts +3 -3
- package/out/concepts/Slot__.js +6 -5
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +4 -3
- package/out/concepts/SqlQueryComponent__.js +21 -12
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.js +6 -5
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +16 -15
- package/out/concepts/StringInterpolation__.js +37 -14
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -0
- package/out/concepts/StringLiteral__.js +13 -8
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +4 -3
- package/out/concepts/StructureProperty__.js +22 -9
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +31 -30
- package/out/concepts/Structure__.js +27 -15
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +12 -11
- package/out/concepts/SwitchCase__.js +69 -31
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.d.ts +9 -8
- package/out/concepts/SwitchStatement__.js +27 -7
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.js +4 -3
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.js +4 -3
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +15 -15
- package/out/concepts/TriggerEvent__.js +6 -5
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +15 -10
- package/out/concepts/TriggerLauncher__.js +54 -32
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +28 -27
- package/out/concepts/TypeAnnotation__.js +144 -124
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +1 -0
- package/out/concepts/TypeParam__.js +12 -5
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +4 -3
- package/out/concepts/UnaryExpression__.js +31 -20
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +1 -0
- package/out/concepts/Unparsed__.js +12 -5
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +4 -3
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +14 -14
- package/out/concepts/ValidationRule__.js +19 -17
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +4 -3
- package/out/concepts/Variable__.js +39 -23
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlock__.js +4 -3
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponent__.d.ts +90 -90
- package/out/concepts/ViewComponent__.js +16 -15
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +91 -86
- package/out/concepts/ViewElement__.js +218 -146
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +92 -92
- package/out/concepts/View__.js +135 -60
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +12 -11
- package/out/concepts/WhileStatement__.js +46 -23
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/index__.d.ts +2 -1
- package/out/concepts/index__.js +2 -1
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/types__.d.ts +2 -1
- package/out/decorators/index.d.ts +1 -1
- package/out/decorators/index.js +20 -7
- package/out/decorators/index.js.map +1 -1
- package/out/decorators/promise.d.ts +7 -0
- package/out/decorators/promise.js +28 -0
- package/out/decorators/promise.js.map +1 -0
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/enums/LEVEL_NAME_MAP.js.map +1 -1
- package/out/generator/compileComponent.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +4 -1
- package/out/generator/genBundleFiles.js +15 -11
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genHash.js.map +1 -1
- package/out/generator/genMetaData.js +12 -8
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/genReleaseBody.js +33 -35
- package/out/generator/genReleaseBody.js.map +1 -1
- package/out/generator/microApp.js +2 -1
- package/out/generator/microApp.js.map +1 -1
- package/out/generator/permission.js +16 -14
- package/out/generator/permission.js.map +1 -1
- package/out/generator/styleReplacer.js +4 -7
- package/out/generator/styleReplacer.js.map +1 -1
- package/out/index.d.ts +0 -2
- package/out/index.js +0 -3
- package/out/index.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/manager/diagnostic.js.map +1 -1
- package/out/manager/stepRecorder.js +13 -9
- package/out/manager/stepRecorder.js.map +1 -1
- package/out/natural/RequirementAnalyzer.d.ts +22 -0
- package/out/natural/RequirementAnalyzer.js +196 -0
- package/out/natural/RequirementAnalyzer.js.map +1 -0
- package/out/natural/RequirementExecutor.d.ts +51 -0
- package/out/natural/RequirementExecutor.js +692 -0
- package/out/natural/RequirementExecutor.js.map +1 -0
- package/out/natural/componentData.d.ts +31 -0
- package/out/natural/componentData.js +85 -0
- package/out/natural/componentData.js.map +1 -0
- package/out/natural/genNaturalTS.d.ts +3 -0
- package/out/natural/genNaturalTS.js +76 -0
- package/out/natural/genNaturalTS.js.map +1 -0
- package/out/natural/index.d.ts +4 -0
- package/out/natural/index.js +21 -0
- package/out/natural/index.js.map +1 -0
- package/out/natural/knowledgeMap.d.ts +4 -0
- package/out/natural/knowledgeMap.js +40 -0
- package/out/natural/knowledgeMap.js.map +1 -0
- package/out/natural/naslStdlibMap.d.ts +2 -0
- package/out/natural/naslStdlibMap.js +26 -0
- package/out/natural/naslStdlibMap.js.map +1 -0
- package/out/natural/transformTSCode.d.ts +7 -0
- package/out/natural/transformTSCode.js +760 -0
- package/out/natural/transformTSCode.js.map +1 -0
- package/out/sentry/index.d.ts +2 -1
- package/out/sentry/index.js.map +1 -1
- package/out/server/createUiTs.js +28 -16
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/entity2LogicNamespace.js +24 -22
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/event.js.map +1 -1
- package/out/server/extendBaseNode.js +55 -70
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.js +46 -50
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getConnector.d.ts +3 -3
- package/out/server/getConnector.js +7 -8
- package/out/server/getConnector.js.map +1 -1
- package/out/server/getExtensionModules.js +2 -2
- package/out/server/getExtensionModules.js.map +1 -1
- package/out/server/getFunctions.js.map +1 -1
- package/out/server/getInterfaces.js.map +1 -1
- package/out/server/getLogging.js.map +1 -1
- package/out/server/getLogics.d.ts +1 -1
- package/out/server/getLogics.js +34 -16
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +13 -10
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcessComponents.js.map +1 -1
- package/out/server/getProcesses.js +21 -29
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/getScope.js.map +1 -1
- package/out/server/getValidates.js.map +1 -1
- package/out/server/index.js +0 -1
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +99 -94
- package/out/server/naslServer.js +485 -465
- package/out/server/naslServer.js.map +1 -1
- package/out/server/naslStdlibMap.js +4 -2
- package/out/server/naslStdlibMap.js.map +1 -1
- package/out/server/process2LogicNamespace.js.map +1 -1
- package/out/server/translator.d.ts +1 -1
- package/out/server/translator.js +52 -47
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.d.ts +15 -1
- package/out/service/storage/init.js +65 -56
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCallComponentLogic.js +1 -2
- package/out/templator/genCallComponentLogic.js.map +1 -1
- package/out/templator/genCreateBlock.js +13 -8
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +19 -10
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +22 -26
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +11 -12
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genEnumSelectBlock.js +1 -1
- package/out/templator/genEnumSelectBlock.js.map +1 -1
- package/out/templator/genGetBlock.js +2 -2
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +10 -14
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +4 -7
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +22 -15
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genSelectBlock.js +12 -33
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +8 -10
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +12 -7
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/index.d.ts +4 -2
- package/out/templator/index.js +2 -2
- package/out/templator/index.js.map +1 -1
- package/out/templator/utils.d.ts +2 -2
- package/out/templator/utils.js +21 -22
- package/out/templator/utils.js.map +1 -1
- package/out/translator/index.js +27 -28
- package/out/translator/index.js.map +1 -1
- package/out/utils/index.d.ts +2 -1
- package/out/utils/index.js +8 -14
- package/out/utils/index.js.map +1 -1
- package/out/utils/logger.js.map +1 -1
- package/out/utils/sortTsString.js +3 -1
- package/out/utils/sortTsString.js.map +1 -1
- package/out/utils/string.js +8 -11
- package/out/utils/string.js.map +1 -1
- package/out/utils/time-slicing.d.ts +41 -0
- package/out/utils/time-slicing.js +81 -0
- package/out/utils/time-slicing.js.map +1 -0
- package/out/utils/traverse.js +4 -6
- package/out/utils/traverse.js.map +1 -1
- package/package.json +11 -7
- package/sandbox/stdlib/nasl.auth.ts +49 -46
- package/sandbox/stdlib/nasl.http.ts +29 -31
- package/sandbox/stdlib/nasl.ui.definition.ts +13 -1
- package/sandbox-natural/stdlib/nasl.core.ts +36 -0
- package/sandbox-natural/stdlib/nasl.oql.ts +8 -0
- package/sandbox-natural/stdlib/nasl.ui.ts +56 -0
- package/sandbox-natural/stdlib/nasl.util.ts +26 -0
- package/sandbox-natural/tsconfig.json +12 -0
- package/src/automate/upgrader/2.20.js +1 -1
- package/src/bak/translator.js +92 -99
- package/src/breakpoint/generator/AfterStartNode.ts +19 -17
- package/src/breakpoint/generator/BeforeEndNode.ts +17 -17
- package/src/breakpoint/generator/BreakpointNode.ts +243 -195
- package/src/breakpoint/generator/CallbackNode.ts +20 -0
- package/src/breakpoint/generator/FragmentNode.ts +14 -0
- package/src/breakpoint/generator/index.ts +107 -80
- package/src/breakpoint/shared/constants.ts +59 -53
- package/src/breakpoint/shared/operations.ts +6 -6
- package/src/breakpoint/shared/socket.ts +277 -223
- package/src/breakpoint/shared/utils.ts +166 -146
- package/src/breakpoint/store/core.ts +326 -297
- package/src/breakpoint/store/dock.ts +103 -103
- package/src/breakpoint/types/index.d.ts +11 -11
- package/src/common/BaseNode.ts +1102 -1024
- package/src/common/Command.ts +46 -16
- package/src/common/ComponentAPI.ts +72 -72
- package/src/common/EventEmitter.ts +80 -76
- package/src/common/Messager.ts +223 -224
- package/src/common/asyncFuncMap.ts +12 -12
- package/src/concepts/Abort__.ts +53 -60
- package/src/concepts/Anchor__.ts +158 -149
- package/src/concepts/AnonymousFunction__.ts +584 -551
- package/src/concepts/App__.ts +4278 -3671
- package/src/concepts/Argument__.ts +234 -210
- package/src/concepts/Assignee__.ts +680 -656
- package/src/concepts/AssignmentLine__.ts +80 -84
- package/src/concepts/Assignment__.ts +275 -264
- package/src/concepts/Attribute__.ts +183 -184
- package/src/concepts/AuthInterface__.ts +61 -63
- package/src/concepts/AuthLogicForCallInterface__.ts +540 -511
- package/src/concepts/AuthLogic__.ts +210 -194
- package/src/concepts/BackendVariable__.ts +414 -415
- package/src/concepts/Backend__.ts +317 -303
- package/src/concepts/BatchAssignment__.ts +987 -939
- package/src/concepts/BinaryExpression__.ts +370 -341
- package/src/concepts/BindAttribute__.ts +1057 -1007
- package/src/concepts/BindDirective__.ts +540 -542
- package/src/concepts/BindEvent__.ts +992 -911
- package/src/concepts/BindStyle__.ts +442 -451
- package/src/concepts/BooleanLiteral__.ts +89 -90
- package/src/concepts/CallAuthInterface__.ts +458 -433
- package/src/concepts/CallConnector__.ts +209 -164
- package/src/concepts/CallFunction__.ts +600 -600
- package/src/concepts/CallInterface__.ts +752 -721
- package/src/concepts/CallLogic__.ts +1324 -1200
- package/src/concepts/CallQueryComponent__.ts +1580 -1501
- package/src/concepts/Comment__.ts +69 -68
- package/src/concepts/CompletionProperty__.ts +250 -255
- package/src/concepts/ConfigGroup__.ts +312 -296
- package/src/concepts/ConfigPropertyValue__.ts +92 -93
- package/src/concepts/ConfigProperty__.ts +374 -357
- package/src/concepts/Configuration__.ts +288 -276
- package/src/concepts/Connection__.ts +426 -0
- package/src/concepts/ConnectorTrigger__.ts +146 -142
- package/src/concepts/Connector__.ts +1090 -1048
- package/src/concepts/Constant__.ts +226 -219
- package/src/concepts/DataElement__.ts +108 -115
- package/src/concepts/DataSource__.ts +508 -472
- package/src/concepts/DatabaseTypeAnnotation__.ts +53 -59
- package/src/concepts/Destination__.ts +808 -746
- package/src/concepts/End__.ts +85 -89
- package/src/concepts/EntityIndex__.ts +206 -202
- package/src/concepts/EntityProperty__.ts +825 -791
- package/src/concepts/Entity__.ts +921 -864
- package/src/concepts/EnumItem__.ts +133 -125
- package/src/concepts/Enum__.ts +347 -337
- package/src/concepts/Event__.ts +305 -292
- package/src/concepts/ExternalDestination__.ts +269 -280
- package/src/concepts/ForEachStatement__.ts +583 -531
- package/src/concepts/FrontendLibrary__.ts +507 -485
- package/src/concepts/FrontendVariable__.ts +44 -49
- package/src/concepts/Frontend__.ts +1239 -1187
- package/src/concepts/Function__.ts +1110 -1045
- package/src/concepts/Identifier__.ts +276 -272
- package/src/concepts/IfStatement__.ts +467 -436
- package/src/concepts/Integration__.ts +136 -137
- package/src/concepts/InterfaceParam__.ts +239 -238
- package/src/concepts/Interface__.ts +969 -948
- package/src/concepts/JSBlock__.ts +83 -83
- package/src/concepts/JavaLogic__.ts +101 -106
- package/src/concepts/LogicItem__.ts +307 -237
- package/src/concepts/Logic__.ts +2301 -2088
- package/src/concepts/MatchCase__.ts +886 -779
- package/src/concepts/Match__.ts +728 -659
- package/src/concepts/MemberExpression__.ts +330 -311
- package/src/concepts/MicroApp__.ts +91 -97
- package/src/concepts/Module__.ts +2590 -2278
- package/src/concepts/MsgTriggerEvent__.ts +297 -281
- package/src/concepts/MsgTriggerLauncher__.ts +286 -256
- package/src/concepts/Namespace__.ts +2579 -2466
- package/src/concepts/NewComposite__.ts +1487 -1350
- package/src/concepts/NewList__.ts +464 -450
- package/src/concepts/NewMap__.ts +691 -674
- package/src/concepts/New__.ts +42 -49
- package/src/concepts/NullLiteral__.ts +66 -72
- package/src/concepts/NumericLiteral__.ts +169 -169
- package/src/concepts/OqlQueryComponent__.ts +282 -279
- package/src/concepts/OverriddenLogic__.ts +2142 -2097
- package/src/concepts/Param__.ts +500 -442
- package/src/concepts/Point__.ts +53 -59
- package/src/concepts/ProcessComponent__.ts +497 -475
- package/src/concepts/ProcessElement__.ts +1852 -1780
- package/src/concepts/ProcessOutcome__.ts +59 -64
- package/src/concepts/ProcessOutcomes__.ts +59 -64
- package/src/concepts/Process__.ts +1491 -1428
- package/src/concepts/QueryAggregateExpression__.ts +135 -142
- package/src/concepts/QueryFieldExpression__.ts +138 -142
- package/src/concepts/QueryFromExpression__.ts +246 -254
- package/src/concepts/QueryGroupByExpression__.ts +130 -136
- package/src/concepts/QueryJoinExpression__.ts +441 -438
- package/src/concepts/QueryLimitExpression__.ts +159 -166
- package/src/concepts/QueryOrderByExpression__.ts +173 -180
- package/src/concepts/QuerySelectExpression__.ts +464 -439
- package/src/concepts/Rect__.ts +73 -79
- package/src/concepts/Return__.ts +366 -345
- package/src/concepts/Role__.ts +146 -147
- package/src/concepts/SelectMembers__.ts +358 -350
- package/src/concepts/Slot__.ts +152 -153
- package/src/concepts/SqlQueryComponent__.ts +230 -228
- package/src/concepts/Start__.ts +45 -52
- package/src/concepts/StringInterpolation__.ts +323 -296
- package/src/concepts/StringLiteral__.ts +113 -115
- package/src/concepts/StructureProperty__.ts +306 -295
- package/src/concepts/Structure__.ts +615 -578
- package/src/concepts/SwitchCase__.ts +326 -290
- package/src/concepts/SwitchStatement__.ts +236 -229
- package/src/concepts/Theme__.ts +64 -68
- package/src/concepts/Transactional__.ts +159 -153
- package/src/concepts/TriggerEvent__.ts +285 -274
- package/src/concepts/TriggerLauncher__.ts +232 -196
- package/src/concepts/TypeAnnotation__.ts +1049 -1011
- package/src/concepts/TypeParam__.ts +48 -50
- package/src/concepts/UnaryExpression__.ts +163 -153
- package/src/concepts/Unparsed__.ts +81 -82
- package/src/concepts/UseComponent__.ts +53 -59
- package/src/concepts/ValidationRule__.ts +524 -544
- package/src/concepts/Variable__.ts +419 -397
- package/src/concepts/ViewBlock__.ts +58 -64
- package/src/concepts/ViewComponent__.ts +1323 -1261
- package/src/concepts/ViewElement__.ts +2538 -2350
- package/src/concepts/View__.ts +2447 -2268
- package/src/concepts/WhileStatement__.ts +293 -272
- package/src/concepts/index__.ts +2 -1
- package/src/concepts/types__.ts +123 -121
- package/src/decorators/index.ts +75 -77
- package/src/decorators/promise.ts +28 -0
- package/src/enums/KEYWORDS.ts +1228 -1228
- package/src/enums/LEVEL_NAME_MAP.ts +24 -24
- package/src/generator/compileComponent.ts +10 -10
- package/src/generator/genBundleFiles.ts +300 -291
- package/src/generator/genHash.ts +2 -2
- package/src/generator/genMetaData.ts +280 -261
- package/src/generator/genReleaseBody.ts +312 -291
- package/src/generator/icestark.ts +1 -1
- package/src/generator/microApp.ts +17 -20
- package/src/generator/permission.ts +227 -218
- package/src/generator/qiankun.ts +1 -1
- package/src/generator/styleReplacer.ts +28 -31
- package/src/index.ts +0 -3
- package/src/manager/diagnostic.ts +84 -82
- package/src/manager/stepRecorder.ts +106 -94
- package/src/natural/RequirementAnalyzer.ts +208 -0
- package/src/natural/RequirementExecutor.ts +685 -0
- package/src/natural/componentData.ts +81 -0
- package/src/natural/genNaturalTS.ts +77 -0
- package/src/natural/index.ts +4 -0
- package/src/natural/knowledgeMap.ts +39 -0
- package/src/natural/naslStdlibMap.ts +24 -0
- package/src/natural/transformTSCode.ts +692 -0
- package/src/sentry/index.ts +109 -104
- package/src/server/createUiTs.ts +190 -184
- package/src/server/entity2LogicNamespace.ts +379 -359
- package/src/server/event.js +145 -145
- package/src/server/extendBaseNode.ts +461 -456
- package/src/server/formatTsUtils.ts +712 -713
- package/src/server/getConnector.ts +33 -33
- package/src/server/getExtensionModules.ts +23 -22
- package/src/server/getFunctions.ts +6 -6
- package/src/server/getInterfaces.ts +38 -37
- package/src/server/getLogging.ts +1 -1
- package/src/server/getLogics.ts +390 -344
- package/src/server/getMemberIdentifier.ts +286 -281
- package/src/server/getProcessComponents.ts +2 -2
- package/src/server/getProcesses.ts +548 -534
- package/src/server/getScope.ts +51 -51
- package/src/server/getValidates.ts +3 -3
- package/src/server/index.ts +29 -30
- package/src/server/naslServer.ts +4302 -4225
- package/src/server/naslStdlibMap.ts +43 -41
- package/src/server/process2LogicNamespace.ts +97 -97
- package/src/server/translator.ts +740 -746
- package/src/service/storage/init.ts +761 -728
- package/src/templator/genCallComponentLogic.ts +14 -15
- package/src/templator/genCreateBlock.ts +257 -229
- package/src/templator/genCurdEditMultipleKeyBlock.ts +332 -316
- package/src/templator/genCurdMultipleKeyBlock.ts +501 -473
- package/src/templator/genEditTableBlock.ts +192 -182
- package/src/templator/genEnumSelectBlock.ts +13 -7
- package/src/templator/genGetBlock.ts +57 -55
- package/src/templator/genGridViewBlock.ts +191 -201
- package/src/templator/genListViewBlock.ts +59 -64
- package/src/templator/genQueryComponent.ts +337 -287
- package/src/templator/genSelectBlock.ts +276 -285
- package/src/templator/genTableBlock.ts +157 -160
- package/src/templator/genUpdateBlock.ts +269 -255
- package/src/templator/index.ts +4 -4
- package/src/templator/utils.ts +490 -464
- package/src/translator/index.ts +84 -84
- package/src/translator/lsp.ts +22 -22
- package/src/translator/tsp.ts +6 -6
- package/src/utils/index.ts +115 -117
- package/src/utils/logger.ts +3 -4
- package/src/utils/sortTsString.ts +34 -32
- package/src/utils/string.ts +47 -48
- package/src/utils/time-slicing.ts +109 -0
- package/src/utils/traverse.ts +114 -126
- package/test/concepts/match/__snapshots__/toEmbeddedTS.spec.ts.snap +66 -0
- package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +40 -0
- package/test/concepts/match/constant.ts +5 -0
- package/test/concepts/match/fixtures/isExpression.json +259 -0
- package/test/concepts/match/fixtures/lastBodyIf.json +268 -0
- package/test/concepts/match/fixtures/noExpression.json +176 -0
- package/test/concepts/match/toEmbeddedTS.spec.ts +14 -0
- package/test/concepts/match/toJS.spec.ts +14 -0
- package/test/setup.ts +2 -1
- package/ts-worker/src/index.js +0 -2
- package/tsconfig.json +21 -21
package/src/concepts/Module__.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
const moduleNameSpace = {
|
|
3
|
-
dependencies: 'extensions',
|
|
4
|
-
interfaceDependencies: 'apis',
|
|
5
|
-
componentDependencies: 'components',
|
|
6
|
-
};
|
|
7
|
-
type ModuleKeyType = 'dependencies' | 'interfaceDependencies' | 'componentDependencies';
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
8
2
|
import ConfigProperty from './ConfigProperty__';
|
|
9
|
-
|
|
3
|
+
//= ===============================================================================
|
|
10
4
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
11
5
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
12
|
-
|
|
6
|
+
//= ===============================================================================
|
|
13
7
|
import { EventPayload, Params } from '../common/EventEmitter';
|
|
14
8
|
import { concept, excludedInJSON, property } from '../decorators';
|
|
15
9
|
|
|
16
10
|
import * as utils from '../utils';
|
|
17
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
18
11
|
import BaseNode from '../common/BaseNode';
|
|
19
12
|
import classMap from '../common/classMap';
|
|
20
13
|
import DataSource from './DataSource__';
|
|
@@ -28,2287 +21,2606 @@ import Process from './Process__';
|
|
|
28
21
|
import FrontendLibrary from './FrontendLibrary__';
|
|
29
22
|
import Configuration from './Configuration__';
|
|
30
23
|
import TriggerLauncher from './TriggerLauncher__';
|
|
24
|
+
import Connection from './Connection__';
|
|
31
25
|
import App from './App__';
|
|
32
26
|
|
|
27
|
+
type PropertyType = 'structures' | 'enums' | 'entities' | 'interfaces' | 'processes' | 'views';
|
|
28
|
+
const moduleNameSpace = {
|
|
29
|
+
dependencies: 'extensions',
|
|
30
|
+
interfaceDependencies: 'apis',
|
|
31
|
+
componentDependencies: 'components',
|
|
32
|
+
};
|
|
33
|
+
type ModuleKeyType = 'dependencies' | 'interfaceDependencies' | 'componentDependencies';
|
|
34
|
+
|
|
33
35
|
/**
|
|
34
36
|
* 模块
|
|
35
37
|
*/
|
|
36
38
|
@concept('模块')
|
|
37
39
|
export class Module extends BaseNode {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
40
|
+
/**
|
|
41
|
+
* 产品概念
|
|
42
|
+
*/
|
|
43
|
+
@property()
|
|
44
|
+
concept: 'Module' | 'Connector' = 'Module';
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* type
|
|
48
|
+
*/
|
|
49
|
+
@property()
|
|
50
|
+
type: 'extension' | 'interface' | 'component' | 'connector' = undefined;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* version
|
|
54
|
+
*/
|
|
55
|
+
@property()
|
|
56
|
+
version: string = undefined;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 模块名称
|
|
60
|
+
*/
|
|
61
|
+
@property()
|
|
62
|
+
name: string = undefined;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 模块标题
|
|
66
|
+
*/
|
|
67
|
+
@property()
|
|
68
|
+
title: string = undefined;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 模块描述
|
|
72
|
+
*/
|
|
73
|
+
@property()
|
|
74
|
+
description: string = undefined;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* provider
|
|
78
|
+
*/
|
|
79
|
+
@property()
|
|
80
|
+
provider: string = undefined;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 外部语言依赖
|
|
84
|
+
*/
|
|
85
|
+
@property()
|
|
86
|
+
externalDependencyMap: { maven?: Array<{ groupId: string; artifactId: string; version: string }> } = undefined;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 外部语言依赖
|
|
90
|
+
*/
|
|
91
|
+
@property()
|
|
92
|
+
compilerInfoMap: {
|
|
93
|
+
java?: Array<{ packageName: string; className: string; naslName: string; type: string; javaTypes: any }>;
|
|
94
|
+
js?: { prefix: string };
|
|
95
|
+
} = undefined;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 数据源列表
|
|
99
|
+
*/
|
|
100
|
+
@property('DataSource')
|
|
101
|
+
dataSources: Array<DataSource> = [];
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 数据结构列表
|
|
105
|
+
*/
|
|
106
|
+
@property('Structure')
|
|
107
|
+
structures: Array<Structure> = [];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 枚举列表
|
|
111
|
+
*/
|
|
112
|
+
@property('Enum')
|
|
113
|
+
enums: Array<Enum> = [];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 逻辑列表
|
|
117
|
+
*/
|
|
118
|
+
@property('Logic')
|
|
119
|
+
logics: Array<Logic> = [];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 接口列表
|
|
123
|
+
*/
|
|
124
|
+
@property('Interface')
|
|
125
|
+
interfaces: Array<Interface> = [];
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 页面列表
|
|
129
|
+
*/
|
|
130
|
+
@property('View')
|
|
131
|
+
views: Array<View> = [];
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 变量列表
|
|
135
|
+
*/
|
|
136
|
+
@property('Variable')
|
|
137
|
+
frontendVariables: Array<Variable> = [];
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 流程列表
|
|
141
|
+
*/
|
|
142
|
+
@property('Process')
|
|
143
|
+
processes: Array<Process> = [];
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 端包列表
|
|
147
|
+
*/
|
|
148
|
+
@property('FrontendLibrary')
|
|
149
|
+
frontends: Array<FrontendLibrary> = [];
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* 配置管理
|
|
153
|
+
*/
|
|
154
|
+
@property('Configuration')
|
|
155
|
+
configuration: Configuration = undefined;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 触发器启动器列表
|
|
159
|
+
*/
|
|
160
|
+
@property('TriggerLauncher')
|
|
161
|
+
triggerLaunchers: Array<TriggerLauncher> = [];
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* 连接列表
|
|
165
|
+
*/
|
|
166
|
+
@property('Connection')
|
|
167
|
+
connections: Array<Connection> = [];
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 祖先 App
|
|
171
|
+
*/
|
|
172
|
+
get app() {
|
|
173
|
+
return this.getAncestor('App') as App;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @param source 需要合并的部分参数
|
|
178
|
+
*/
|
|
179
|
+
constructor(source?: Partial<Module>) {
|
|
180
|
+
// @ts-ignore
|
|
181
|
+
source = { ...Module.getDefaultOptions(), ...source };
|
|
182
|
+
super(source);
|
|
183
|
+
super.subConstructor(source);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
getClassName() {
|
|
187
|
+
return 'Module';
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
static from(source: any, parentNode?: any, parentKey?: string): Module {
|
|
191
|
+
return super.from(source, parentNode, parentKey) as Module;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* 从父级删除该节点
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
_delete() {
|
|
199
|
+
let params: Params = null;
|
|
200
|
+
if (this.parentNode) {
|
|
201
|
+
params = (this.parentNode as any)?.__removeModule?.(this);
|
|
202
|
+
}
|
|
203
|
+
return params;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
getDataSourceExistingNames(excludedList: Array<DataSource> = []) {
|
|
207
|
+
const excludedSet = new Set(excludedList);
|
|
208
|
+
return ((this.dataSources as DataSource[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
getDataSourceUniqueName(name = 'dataSource1') {
|
|
212
|
+
return utils.unique(name, this.getDataSourceExistingNames(), undefined, false);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* 插入数据源
|
|
217
|
+
* @internal
|
|
218
|
+
* @param name 数据源名称,如果不填会自动生成一个唯一名称
|
|
219
|
+
*/
|
|
220
|
+
_insertDataSourceAt(name: string, index: number): DataSource;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* 插入数据源
|
|
224
|
+
* @internal
|
|
225
|
+
* @param dataSourceOptions 数据源参数
|
|
226
|
+
*/
|
|
227
|
+
_insertDataSourceAt(dataSourceOptions: Partial<DataSource>, index: number): DataSource;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* 插入数据源
|
|
231
|
+
* @internal
|
|
232
|
+
* @param dataSource 已有的数据源实例
|
|
233
|
+
*/
|
|
234
|
+
_insertDataSourceAt(dataSource: DataSource, index: number): DataSource;
|
|
235
|
+
|
|
236
|
+
_insertDataSourceAt(options: string | Partial<DataSource> | DataSource, index: number) {
|
|
237
|
+
const dataSourceOptions: any = {};
|
|
238
|
+
const relationOptions = { parentNode: this, parentKey: 'dataSources' };
|
|
239
|
+
let dataSource: DataSource;
|
|
240
|
+
if (!options) {
|
|
241
|
+
dataSource = DataSource.from(
|
|
242
|
+
{
|
|
243
|
+
...dataSourceOptions,
|
|
244
|
+
name: this.getDataSourceUniqueName(),
|
|
245
|
+
},
|
|
246
|
+
this,
|
|
247
|
+
'dataSources'
|
|
248
|
+
);
|
|
249
|
+
} else if (typeof options === 'string') {
|
|
250
|
+
dataSource = DataSource.from(
|
|
251
|
+
{
|
|
252
|
+
...dataSourceOptions,
|
|
253
|
+
name: options,
|
|
254
|
+
},
|
|
255
|
+
this,
|
|
256
|
+
'dataSources'
|
|
257
|
+
);
|
|
258
|
+
} else if (options instanceof DataSource) {
|
|
259
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
260
|
+
dataSource = options;
|
|
261
|
+
Object.assign(dataSource, relationOptions);
|
|
262
|
+
} else {
|
|
263
|
+
dataSource = DataSource.from(
|
|
264
|
+
{
|
|
265
|
+
...dataSourceOptions,
|
|
266
|
+
...options,
|
|
267
|
+
},
|
|
268
|
+
this,
|
|
269
|
+
'dataSources'
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
this.dataSources.splice(index, 0, dataSource);
|
|
273
|
+
return dataSource;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* 插入数据源
|
|
278
|
+
* @param name 数据源名称,如果不填会自动生成一个唯一名称
|
|
279
|
+
*/
|
|
280
|
+
insertDataSourceAt(name: string, index: number): DataSource;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* 插入数据源
|
|
284
|
+
* @param dataSourceOptions 数据源参数
|
|
285
|
+
*/
|
|
286
|
+
insertDataSourceAt(dataSourceOptions: Partial<DataSource>, index: number): DataSource;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* 插入数据源
|
|
290
|
+
* @param dataSource 已有的数据源实例
|
|
291
|
+
*/
|
|
292
|
+
insertDataSourceAt(dataSource: DataSource, index: number): DataSource;
|
|
293
|
+
|
|
294
|
+
insertDataSourceAt(options: string | Partial<DataSource> | DataSource, index: number) {
|
|
295
|
+
const node = this._insertDataSourceAt(options as any, index);
|
|
296
|
+
node.create({
|
|
297
|
+
index,
|
|
298
|
+
parentNode: this,
|
|
299
|
+
parentKey: 'dataSources',
|
|
300
|
+
});
|
|
301
|
+
return node;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* 添加数据源
|
|
306
|
+
* @internal
|
|
307
|
+
* @param name 数据源名称,如果不填会自动生成一个唯一名称
|
|
308
|
+
*/
|
|
309
|
+
_addDataSource(name?: string): DataSource;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* 添加数据源
|
|
313
|
+
* @internal
|
|
314
|
+
* @param dataSourceOptions 数据源参数
|
|
315
|
+
*/
|
|
316
|
+
_addDataSource(dataSourceOptions: Partial<DataSource>): DataSource;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* 添加数据源
|
|
320
|
+
* @internal
|
|
321
|
+
* @param dataSource 已有的数据源实例
|
|
322
|
+
*/
|
|
323
|
+
_addDataSource(dataSource: DataSource): DataSource;
|
|
324
|
+
|
|
325
|
+
_addDataSource(options?: string | Partial<DataSource> | DataSource) {
|
|
326
|
+
const index = 0;
|
|
327
|
+
return this._insertDataSourceAt(options as any, index);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* 添加数据源
|
|
332
|
+
* @internal
|
|
333
|
+
* @param name 数据源名称,如果不填会自动生成一个唯一名称
|
|
334
|
+
*/
|
|
335
|
+
addDataSource(name?: string): DataSource;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* 添加数据源
|
|
339
|
+
* @param dataSourceOptions 数据源参数
|
|
340
|
+
*/
|
|
341
|
+
addDataSource(dataSourceOptions: Partial<DataSource>): DataSource;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 添加数据源
|
|
345
|
+
* @param dataSource 已有的数据源实例
|
|
346
|
+
*/
|
|
347
|
+
addDataSource(dataSource: DataSource): DataSource;
|
|
348
|
+
|
|
349
|
+
addDataSource(options?: string | Partial<DataSource> | DataSource) {
|
|
350
|
+
const node = this._addDataSource(options as any);
|
|
351
|
+
const index = this.dataSources.indexOf(node);
|
|
352
|
+
node.create({
|
|
353
|
+
index,
|
|
354
|
+
parentNode: this,
|
|
355
|
+
parentKey: 'dataSources',
|
|
356
|
+
});
|
|
357
|
+
return node;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
getStructureExistingNames(excludedList: Array<Structure> = []) {
|
|
361
|
+
const excludedSet = new Set(excludedList);
|
|
362
|
+
return ((this.structures as Structure[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
getStructureUniqueName(name = 'Structure1') {
|
|
366
|
+
return utils.unique(name, this.getStructureExistingNames(), undefined, false);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* 插入数据结构
|
|
371
|
+
* @internal
|
|
372
|
+
* @param name 数据结构名称,如果不填会自动生成一个唯一名称
|
|
373
|
+
*/
|
|
374
|
+
_insertStructureAt(name: string, index: number): Structure;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* 插入数据结构
|
|
378
|
+
* @internal
|
|
379
|
+
* @param structureOptions 数据结构参数
|
|
380
|
+
*/
|
|
381
|
+
_insertStructureAt(structureOptions: Partial<Structure>, index: number): Structure;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* 插入数据结构
|
|
385
|
+
* @internal
|
|
386
|
+
* @param structure 已有的数据结构实例
|
|
387
|
+
*/
|
|
388
|
+
_insertStructureAt(structure: Structure, index: number): Structure;
|
|
389
|
+
|
|
390
|
+
_insertStructureAt(options: string | Partial<Structure> | Structure, index: number) {
|
|
391
|
+
const structureOptions: any = {};
|
|
392
|
+
const relationOptions = { parentNode: this, parentKey: 'structures' };
|
|
393
|
+
let structure: Structure;
|
|
394
|
+
if (!options) {
|
|
395
|
+
structure = Structure.from(
|
|
396
|
+
{
|
|
397
|
+
...structureOptions,
|
|
398
|
+
name: this.getStructureUniqueName(),
|
|
399
|
+
},
|
|
400
|
+
this,
|
|
401
|
+
'structures'
|
|
402
|
+
);
|
|
403
|
+
} else if (typeof options === 'string') {
|
|
404
|
+
structure = Structure.from(
|
|
405
|
+
{
|
|
406
|
+
...structureOptions,
|
|
407
|
+
name: options,
|
|
408
|
+
},
|
|
409
|
+
this,
|
|
410
|
+
'structures'
|
|
411
|
+
);
|
|
412
|
+
} else if (options instanceof Structure) {
|
|
413
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
414
|
+
structure = options;
|
|
415
|
+
Object.assign(structure, relationOptions);
|
|
416
|
+
} else {
|
|
417
|
+
structure = Structure.from(
|
|
418
|
+
{
|
|
419
|
+
...structureOptions,
|
|
420
|
+
...options,
|
|
421
|
+
},
|
|
422
|
+
this,
|
|
423
|
+
'structures'
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
this.structures.splice(index, 0, structure);
|
|
427
|
+
return structure;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* 插入数据结构
|
|
432
|
+
* @param name 数据结构名称,如果不填会自动生成一个唯一名称
|
|
433
|
+
*/
|
|
434
|
+
insertStructureAt(name: string, index: number): Structure;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* 插入数据结构
|
|
438
|
+
* @param structureOptions 数据结构参数
|
|
439
|
+
*/
|
|
440
|
+
insertStructureAt(structureOptions: Partial<Structure>, index: number): Structure;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* 插入数据结构
|
|
444
|
+
* @param structure 已有的数据结构实例
|
|
445
|
+
*/
|
|
446
|
+
insertStructureAt(structure: Structure, index: number): Structure;
|
|
447
|
+
|
|
448
|
+
insertStructureAt(options: string | Partial<Structure> | Structure, index: number) {
|
|
449
|
+
const node = this._insertStructureAt(options as any, index);
|
|
450
|
+
node.create({
|
|
451
|
+
index,
|
|
452
|
+
parentNode: this,
|
|
453
|
+
parentKey: 'structures',
|
|
454
|
+
});
|
|
455
|
+
return node;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* 添加数据结构
|
|
460
|
+
* @internal
|
|
461
|
+
* @param name 数据结构名称,如果不填会自动生成一个唯一名称
|
|
462
|
+
*/
|
|
463
|
+
_addStructure(name?: string): Structure;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* 添加数据结构
|
|
467
|
+
* @internal
|
|
468
|
+
* @param structureOptions 数据结构参数
|
|
469
|
+
*/
|
|
470
|
+
_addStructure(structureOptions: Partial<Structure>): Structure;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* 添加数据结构
|
|
474
|
+
* @internal
|
|
475
|
+
* @param structure 已有的数据结构实例
|
|
476
|
+
*/
|
|
477
|
+
_addStructure(structure: Structure): Structure;
|
|
478
|
+
|
|
479
|
+
_addStructure(options?: string | Partial<Structure> | Structure) {
|
|
480
|
+
const index = 0;
|
|
481
|
+
return this._insertStructureAt(options as any, index);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* 添加数据结构
|
|
486
|
+
* @internal
|
|
487
|
+
* @param name 数据结构名称,如果不填会自动生成一个唯一名称
|
|
488
|
+
*/
|
|
489
|
+
addStructure(name?: string): Structure;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* 添加数据结构
|
|
493
|
+
* @param structureOptions 数据结构参数
|
|
494
|
+
*/
|
|
495
|
+
addStructure(structureOptions: Partial<Structure>): Structure;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* 添加数据结构
|
|
499
|
+
* @param structure 已有的数据结构实例
|
|
500
|
+
*/
|
|
501
|
+
addStructure(structure: Structure): Structure;
|
|
502
|
+
|
|
503
|
+
addStructure(options?: string | Partial<Structure> | Structure) {
|
|
504
|
+
const node = this._addStructure(options as any);
|
|
505
|
+
const index = this.structures.indexOf(node);
|
|
506
|
+
node.create({
|
|
507
|
+
index,
|
|
508
|
+
parentNode: this,
|
|
509
|
+
parentKey: 'structures',
|
|
510
|
+
});
|
|
511
|
+
return node;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
getEnumExistingNames(excludedList: Array<Enum> = []) {
|
|
515
|
+
const excludedSet = new Set(excludedList);
|
|
516
|
+
return ((this.enums as Enum[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
getEnumUniqueName(name = 'Enum1') {
|
|
520
|
+
return utils.unique(name, this.getEnumExistingNames(), undefined, false);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* 插入枚举
|
|
525
|
+
* @internal
|
|
526
|
+
* @param name 枚举名称,如果不填会自动生成一个唯一名称
|
|
527
|
+
*/
|
|
528
|
+
_insertEnumAt(name: string, index: number): Enum;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* 插入枚举
|
|
532
|
+
* @internal
|
|
533
|
+
* @param enumerationOptions 枚举参数
|
|
534
|
+
*/
|
|
535
|
+
_insertEnumAt(enumerationOptions: Partial<Enum>, index: number): Enum;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* 插入枚举
|
|
539
|
+
* @internal
|
|
540
|
+
* @param enumeration 已有的枚举实例
|
|
541
|
+
*/
|
|
542
|
+
_insertEnumAt(enumeration: Enum, index: number): Enum;
|
|
543
|
+
|
|
544
|
+
_insertEnumAt(options: string | Partial<Enum> | Enum, index: number) {
|
|
545
|
+
const enumerationOptions: any = {};
|
|
546
|
+
const relationOptions = { parentNode: this, parentKey: 'enums' };
|
|
547
|
+
let enumeration: Enum;
|
|
548
|
+
if (!options) {
|
|
549
|
+
enumeration = Enum.from(
|
|
550
|
+
{
|
|
551
|
+
...enumerationOptions,
|
|
552
|
+
name: this.getEnumUniqueName(),
|
|
553
|
+
},
|
|
554
|
+
this,
|
|
555
|
+
'enums'
|
|
556
|
+
);
|
|
557
|
+
} else if (typeof options === 'string') {
|
|
558
|
+
enumeration = Enum.from(
|
|
559
|
+
{
|
|
560
|
+
...enumerationOptions,
|
|
561
|
+
name: options,
|
|
562
|
+
},
|
|
563
|
+
this,
|
|
564
|
+
'enums'
|
|
565
|
+
);
|
|
566
|
+
} else if (options instanceof Enum) {
|
|
567
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
568
|
+
enumeration = options;
|
|
569
|
+
Object.assign(enumeration, relationOptions);
|
|
570
|
+
} else {
|
|
571
|
+
enumeration = Enum.from(
|
|
572
|
+
{
|
|
573
|
+
...enumerationOptions,
|
|
574
|
+
...options,
|
|
575
|
+
},
|
|
576
|
+
this,
|
|
577
|
+
'enums'
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
this.enums.splice(index, 0, enumeration);
|
|
581
|
+
return enumeration;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* 插入枚举
|
|
586
|
+
* @param name 枚举名称,如果不填会自动生成一个唯一名称
|
|
587
|
+
*/
|
|
588
|
+
insertEnumAt(name: string, index: number): Enum;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* 插入枚举
|
|
592
|
+
* @param enumerationOptions 枚举参数
|
|
593
|
+
*/
|
|
594
|
+
insertEnumAt(enumerationOptions: Partial<Enum>, index: number): Enum;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* 插入枚举
|
|
598
|
+
* @param enumeration 已有的枚举实例
|
|
599
|
+
*/
|
|
600
|
+
insertEnumAt(enumeration: Enum, index: number): Enum;
|
|
601
|
+
|
|
602
|
+
insertEnumAt(options: string | Partial<Enum> | Enum, index: number) {
|
|
603
|
+
const node = this._insertEnumAt(options as any, index);
|
|
604
|
+
node.create({
|
|
605
|
+
index,
|
|
606
|
+
parentNode: this,
|
|
607
|
+
parentKey: 'enums',
|
|
608
|
+
});
|
|
609
|
+
return node;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* 添加枚举
|
|
614
|
+
* @internal
|
|
615
|
+
* @param name 枚举名称,如果不填会自动生成一个唯一名称
|
|
616
|
+
*/
|
|
617
|
+
_addEnum(name?: string): Enum;
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* 添加枚举
|
|
621
|
+
* @internal
|
|
622
|
+
* @param enumerationOptions 枚举参数
|
|
623
|
+
*/
|
|
624
|
+
_addEnum(enumerationOptions: Partial<Enum>): Enum;
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* 添加枚举
|
|
628
|
+
* @internal
|
|
629
|
+
* @param enumeration 已有的枚举实例
|
|
630
|
+
*/
|
|
631
|
+
_addEnum(enumeration: Enum): Enum;
|
|
632
|
+
|
|
633
|
+
_addEnum(options?: string | Partial<Enum> | Enum) {
|
|
634
|
+
const index = 0;
|
|
635
|
+
return this._insertEnumAt(options as any, index);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* 添加枚举
|
|
640
|
+
* @internal
|
|
641
|
+
* @param name 枚举名称,如果不填会自动生成一个唯一名称
|
|
642
|
+
*/
|
|
643
|
+
addEnum(name?: string): Enum;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* 添加枚举
|
|
647
|
+
* @param enumerationOptions 枚举参数
|
|
648
|
+
*/
|
|
649
|
+
addEnum(enumerationOptions: Partial<Enum>): Enum;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* 添加枚举
|
|
653
|
+
* @param enumeration 已有的枚举实例
|
|
654
|
+
*/
|
|
655
|
+
addEnum(enumeration: Enum): Enum;
|
|
656
|
+
|
|
657
|
+
addEnum(options?: string | Partial<Enum> | Enum) {
|
|
658
|
+
const node = this._addEnum(options as any);
|
|
659
|
+
const index = this.enums.indexOf(node);
|
|
660
|
+
node.create({
|
|
661
|
+
index,
|
|
662
|
+
parentNode: this,
|
|
663
|
+
parentKey: 'enums',
|
|
664
|
+
});
|
|
665
|
+
return node;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
getLogicExistingNames(excludedList: Array<Logic> = []) {
|
|
669
|
+
const excludedSet = new Set(excludedList);
|
|
670
|
+
return ((this.logics as Logic[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
getLogicUniqueName(name = 'logic1') {
|
|
674
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* 插入逻辑
|
|
679
|
+
* @internal
|
|
680
|
+
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
681
|
+
*/
|
|
682
|
+
_insertLogicAt(name: string, index: number): Logic;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* 插入逻辑
|
|
686
|
+
* @internal
|
|
687
|
+
* @param logicOptions 逻辑参数
|
|
688
|
+
*/
|
|
689
|
+
_insertLogicAt(logicOptions: Partial<Logic>, index: number): Logic;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* 插入逻辑
|
|
693
|
+
* @internal
|
|
694
|
+
* @param logic 已有的逻辑实例
|
|
695
|
+
*/
|
|
696
|
+
_insertLogicAt(logic: Logic, index: number): Logic;
|
|
697
|
+
|
|
698
|
+
_insertLogicAt(options: string | Partial<Logic> | Logic, index: number) {
|
|
699
|
+
const logicOptions: any = {};
|
|
700
|
+
const relationOptions = { parentNode: this, parentKey: 'logics' };
|
|
701
|
+
let logic: Logic;
|
|
702
|
+
if (!options) {
|
|
703
|
+
logic = Logic.from(
|
|
704
|
+
{
|
|
705
|
+
...logicOptions,
|
|
706
|
+
name: this.getLogicUniqueName(),
|
|
707
|
+
},
|
|
708
|
+
this,
|
|
709
|
+
'logics'
|
|
710
|
+
);
|
|
711
|
+
} else if (typeof options === 'string') {
|
|
712
|
+
logic = Logic.from(
|
|
713
|
+
{
|
|
714
|
+
...logicOptions,
|
|
715
|
+
name: options,
|
|
716
|
+
},
|
|
717
|
+
this,
|
|
718
|
+
'logics'
|
|
719
|
+
);
|
|
720
|
+
} else if (options instanceof Logic) {
|
|
721
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
722
|
+
logic = options;
|
|
723
|
+
Object.assign(logic, relationOptions);
|
|
724
|
+
} else {
|
|
725
|
+
logic = Logic.from(
|
|
726
|
+
{
|
|
727
|
+
...logicOptions,
|
|
728
|
+
...options,
|
|
729
|
+
},
|
|
730
|
+
this,
|
|
731
|
+
'logics'
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
this.logics.splice(index, 0, logic);
|
|
735
|
+
return logic;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* 插入逻辑
|
|
740
|
+
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
741
|
+
*/
|
|
742
|
+
insertLogicAt(name: string, index: number): Logic;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* 插入逻辑
|
|
746
|
+
* @param logicOptions 逻辑参数
|
|
747
|
+
*/
|
|
748
|
+
insertLogicAt(logicOptions: Partial<Logic>, index: number): Logic;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* 插入逻辑
|
|
752
|
+
* @param logic 已有的逻辑实例
|
|
753
|
+
*/
|
|
754
|
+
insertLogicAt(logic: Logic, index: number): Logic;
|
|
755
|
+
|
|
756
|
+
insertLogicAt(options: string | Partial<Logic> | Logic, index: number) {
|
|
757
|
+
const node = this._insertLogicAt(options as any, index);
|
|
758
|
+
node.create({
|
|
759
|
+
index,
|
|
760
|
+
parentNode: this,
|
|
761
|
+
parentKey: 'logics',
|
|
762
|
+
});
|
|
763
|
+
return node;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* 添加逻辑
|
|
768
|
+
* @internal
|
|
769
|
+
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
770
|
+
*/
|
|
771
|
+
_addLogic(name?: string): Logic;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* 添加逻辑
|
|
775
|
+
* @internal
|
|
776
|
+
* @param logicOptions 逻辑参数
|
|
777
|
+
*/
|
|
778
|
+
_addLogic(logicOptions: Partial<Logic>): Logic;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* 添加逻辑
|
|
782
|
+
* @internal
|
|
783
|
+
* @param logic 已有的逻辑实例
|
|
784
|
+
*/
|
|
785
|
+
_addLogic(logic: Logic): Logic;
|
|
786
|
+
|
|
787
|
+
_addLogic(options?: string | Partial<Logic> | Logic) {
|
|
788
|
+
const index = 0;
|
|
789
|
+
return this._insertLogicAt(options as any, index);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* 添加逻辑
|
|
794
|
+
* @internal
|
|
795
|
+
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
796
|
+
*/
|
|
797
|
+
addLogic(name?: string): Logic;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* 添加逻辑
|
|
801
|
+
* @param logicOptions 逻辑参数
|
|
802
|
+
*/
|
|
803
|
+
addLogic(logicOptions: Partial<Logic>): Logic;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* 添加逻辑
|
|
807
|
+
* @param logic 已有的逻辑实例
|
|
808
|
+
*/
|
|
809
|
+
addLogic(logic: Logic): Logic;
|
|
810
|
+
|
|
811
|
+
addLogic(options?: string | Partial<Logic> | Logic) {
|
|
812
|
+
const node = this._addLogic(options as any);
|
|
813
|
+
const index = this.logics.indexOf(node);
|
|
814
|
+
node.create({
|
|
815
|
+
index,
|
|
816
|
+
parentNode: this,
|
|
817
|
+
parentKey: 'logics',
|
|
818
|
+
});
|
|
819
|
+
return node;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
getInterfaceExistingNames(excludedList: Array<Interface> = []) {
|
|
823
|
+
const excludedSet = new Set(excludedList);
|
|
824
|
+
return ((this.interfaces as Interface[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
getInterfaceUniqueName(name = 'Interface1') {
|
|
828
|
+
return utils.unique(name, this.getInterfaceExistingNames(), undefined, false);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* 插入接口
|
|
833
|
+
* @internal
|
|
834
|
+
* @param name 接口名称,如果不填会自动生成一个唯一名称
|
|
835
|
+
*/
|
|
836
|
+
_insertInterfaceAt(name: string, index: number): Interface;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* 插入接口
|
|
840
|
+
* @internal
|
|
841
|
+
* @param itfaceOptions 接口参数
|
|
842
|
+
*/
|
|
843
|
+
_insertInterfaceAt(itfaceOptions: Partial<Interface>, index: number): Interface;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* 插入接口
|
|
847
|
+
* @internal
|
|
848
|
+
* @param itface 已有的接口实例
|
|
849
|
+
*/
|
|
850
|
+
_insertInterfaceAt(itface: Interface, index: number): Interface;
|
|
851
|
+
|
|
852
|
+
_insertInterfaceAt(options: string | Partial<Interface> | Interface, index: number) {
|
|
853
|
+
const itfaceOptions: any = {};
|
|
854
|
+
const relationOptions = { parentNode: this, parentKey: 'interfaces' };
|
|
855
|
+
let itface: Interface;
|
|
856
|
+
if (!options) {
|
|
857
|
+
itface = Interface.from(
|
|
858
|
+
{
|
|
859
|
+
...itfaceOptions,
|
|
860
|
+
name: this.getInterfaceUniqueName(),
|
|
861
|
+
},
|
|
862
|
+
this,
|
|
863
|
+
'interfaces'
|
|
864
|
+
);
|
|
865
|
+
} else if (typeof options === 'string') {
|
|
866
|
+
itface = Interface.from(
|
|
867
|
+
{
|
|
868
|
+
...itfaceOptions,
|
|
869
|
+
name: options,
|
|
870
|
+
},
|
|
871
|
+
this,
|
|
872
|
+
'interfaces'
|
|
873
|
+
);
|
|
874
|
+
} else if (options instanceof Interface) {
|
|
875
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
876
|
+
itface = options;
|
|
877
|
+
Object.assign(itface, relationOptions);
|
|
878
|
+
} else {
|
|
879
|
+
itface = Interface.from(
|
|
880
|
+
{
|
|
881
|
+
...itfaceOptions,
|
|
882
|
+
...options,
|
|
883
|
+
},
|
|
884
|
+
this,
|
|
885
|
+
'interfaces'
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
this.interfaces.splice(index, 0, itface);
|
|
889
|
+
return itface;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* 插入接口
|
|
894
|
+
* @param name 接口名称,如果不填会自动生成一个唯一名称
|
|
895
|
+
*/
|
|
896
|
+
insertInterfaceAt(name: string, index: number): Interface;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* 插入接口
|
|
900
|
+
* @param itfaceOptions 接口参数
|
|
901
|
+
*/
|
|
902
|
+
insertInterfaceAt(itfaceOptions: Partial<Interface>, index: number): Interface;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* 插入接口
|
|
906
|
+
* @param itface 已有的接口实例
|
|
907
|
+
*/
|
|
908
|
+
insertInterfaceAt(itface: Interface, index: number): Interface;
|
|
909
|
+
|
|
910
|
+
insertInterfaceAt(options: string | Partial<Interface> | Interface, index: number) {
|
|
911
|
+
const node = this._insertInterfaceAt(options as any, index);
|
|
912
|
+
node.create({
|
|
913
|
+
index,
|
|
914
|
+
parentNode: this,
|
|
915
|
+
parentKey: 'interfaces',
|
|
916
|
+
});
|
|
917
|
+
return node;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* 添加接口
|
|
922
|
+
* @internal
|
|
923
|
+
* @param name 接口名称,如果不填会自动生成一个唯一名称
|
|
924
|
+
*/
|
|
925
|
+
_addInterface(name?: string): Interface;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* 添加接口
|
|
929
|
+
* @internal
|
|
930
|
+
* @param itfaceOptions 接口参数
|
|
931
|
+
*/
|
|
932
|
+
_addInterface(itfaceOptions: Partial<Interface>): Interface;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* 添加接口
|
|
936
|
+
* @internal
|
|
937
|
+
* @param itface 已有的接口实例
|
|
938
|
+
*/
|
|
939
|
+
_addInterface(itface: Interface): Interface;
|
|
940
|
+
|
|
941
|
+
_addInterface(options?: string | Partial<Interface> | Interface) {
|
|
942
|
+
const index = 0;
|
|
943
|
+
return this._insertInterfaceAt(options as any, index);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* 添加接口
|
|
948
|
+
* @internal
|
|
949
|
+
* @param name 接口名称,如果不填会自动生成一个唯一名称
|
|
950
|
+
*/
|
|
951
|
+
addInterface(name?: string): Interface;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* 添加接口
|
|
955
|
+
* @param itfaceOptions 接口参数
|
|
956
|
+
*/
|
|
957
|
+
addInterface(itfaceOptions: Partial<Interface>): Interface;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* 添加接口
|
|
961
|
+
* @param itface 已有的接口实例
|
|
962
|
+
*/
|
|
963
|
+
addInterface(itface: Interface): Interface;
|
|
964
|
+
|
|
965
|
+
addInterface(options?: string | Partial<Interface> | Interface) {
|
|
966
|
+
const node = this._addInterface(options as any);
|
|
967
|
+
const index = this.interfaces.indexOf(node);
|
|
968
|
+
node.create({
|
|
969
|
+
index,
|
|
970
|
+
parentNode: this,
|
|
971
|
+
parentKey: 'interfaces',
|
|
972
|
+
});
|
|
973
|
+
return node;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
getViewExistingNames(excludedList: Array<View> = []) {
|
|
977
|
+
const excludedSet = new Set(excludedList);
|
|
978
|
+
return ((this.views as View[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
getViewUniqueName(name = 'view1') {
|
|
982
|
+
return utils.unique(name, this.getViewExistingNames(), undefined, false);
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* 插入页面
|
|
987
|
+
* @internal
|
|
988
|
+
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
989
|
+
*/
|
|
990
|
+
_insertViewAt(name: string, index: number): View;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* 插入页面
|
|
994
|
+
* @internal
|
|
995
|
+
* @param viewOptions 页面参数
|
|
996
|
+
*/
|
|
997
|
+
_insertViewAt(viewOptions: Partial<View>, index: number): View;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* 插入页面
|
|
1001
|
+
* @internal
|
|
1002
|
+
* @param view 已有的页面实例
|
|
1003
|
+
*/
|
|
1004
|
+
_insertViewAt(view: View, index: number): View;
|
|
1005
|
+
|
|
1006
|
+
_insertViewAt(options: string | Partial<View> | View, index: number) {
|
|
1007
|
+
const viewOptions: any = {};
|
|
1008
|
+
const relationOptions = { parentNode: this, parentKey: 'views' };
|
|
1009
|
+
let view: View;
|
|
1010
|
+
if (!options) {
|
|
1011
|
+
view = View.from(
|
|
1012
|
+
{
|
|
1013
|
+
...viewOptions,
|
|
1014
|
+
name: this.getViewUniqueName(),
|
|
1015
|
+
},
|
|
1016
|
+
this,
|
|
1017
|
+
'views'
|
|
1018
|
+
);
|
|
1019
|
+
} else if (typeof options === 'string') {
|
|
1020
|
+
view = View.from(
|
|
1021
|
+
{
|
|
1022
|
+
...viewOptions,
|
|
1023
|
+
name: options,
|
|
1024
|
+
},
|
|
1025
|
+
this,
|
|
1026
|
+
'views'
|
|
1027
|
+
);
|
|
1028
|
+
} else if (options instanceof View) {
|
|
1029
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1030
|
+
view = options;
|
|
1031
|
+
Object.assign(view, relationOptions);
|
|
1032
|
+
} else {
|
|
1033
|
+
view = View.from(
|
|
1034
|
+
{
|
|
1035
|
+
...viewOptions,
|
|
1036
|
+
...options,
|
|
1037
|
+
},
|
|
1038
|
+
this,
|
|
1039
|
+
'views'
|
|
1040
|
+
);
|
|
1041
|
+
}
|
|
1042
|
+
this.views.splice(index, 0, view);
|
|
1043
|
+
return view;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* 插入页面
|
|
1048
|
+
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
1049
|
+
*/
|
|
1050
|
+
insertViewAt(name: string, index: number): View;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* 插入页面
|
|
1054
|
+
* @param viewOptions 页面参数
|
|
1055
|
+
*/
|
|
1056
|
+
insertViewAt(viewOptions: Partial<View>, index: number): View;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* 插入页面
|
|
1060
|
+
* @param view 已有的页面实例
|
|
1061
|
+
*/
|
|
1062
|
+
insertViewAt(view: View, index: number): View;
|
|
1063
|
+
|
|
1064
|
+
insertViewAt(options: string | Partial<View> | View, index: number) {
|
|
1065
|
+
const node = this._insertViewAt(options as any, index);
|
|
1066
|
+
node.create({
|
|
1067
|
+
index,
|
|
1068
|
+
parentNode: this,
|
|
1069
|
+
parentKey: 'views',
|
|
1070
|
+
});
|
|
1071
|
+
return node;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* 添加页面
|
|
1076
|
+
* @internal
|
|
1077
|
+
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
1078
|
+
*/
|
|
1079
|
+
_addView(name?: string): View;
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* 添加页面
|
|
1083
|
+
* @internal
|
|
1084
|
+
* @param viewOptions 页面参数
|
|
1085
|
+
*/
|
|
1086
|
+
_addView(viewOptions: Partial<View>): View;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* 添加页面
|
|
1090
|
+
* @internal
|
|
1091
|
+
* @param view 已有的页面实例
|
|
1092
|
+
*/
|
|
1093
|
+
_addView(view: View): View;
|
|
1094
|
+
|
|
1095
|
+
_addView(options?: string | Partial<View> | View) {
|
|
1096
|
+
const index = this.views.length;
|
|
1097
|
+
return this._insertViewAt(options as any, index);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* 添加页面
|
|
1102
|
+
* @internal
|
|
1103
|
+
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
1104
|
+
*/
|
|
1105
|
+
addView(name?: string): View;
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* 添加页面
|
|
1109
|
+
* @param viewOptions 页面参数
|
|
1110
|
+
*/
|
|
1111
|
+
addView(viewOptions: Partial<View>): View;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* 添加页面
|
|
1115
|
+
* @param view 已有的页面实例
|
|
1116
|
+
*/
|
|
1117
|
+
addView(view: View): View;
|
|
1118
|
+
|
|
1119
|
+
addView(options?: string | Partial<View> | View) {
|
|
1120
|
+
const node = this._addView(options as any);
|
|
1121
|
+
const index = this.views.indexOf(node);
|
|
1122
|
+
node.create({
|
|
1123
|
+
index,
|
|
1124
|
+
parentNode: this,
|
|
1125
|
+
parentKey: 'views',
|
|
1126
|
+
});
|
|
1127
|
+
return node;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
getVarExistingNames(excludedList: Array<Variable> = []) {
|
|
1131
|
+
const excludedSet = new Set(excludedList);
|
|
1132
|
+
return ((this.frontendVariables as Variable[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
getVariableUniqueName(name = 'variable1') {
|
|
1136
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, true);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* 插入变量
|
|
1141
|
+
* @internal
|
|
1142
|
+
* @param name 变量名称,如果不填会自动生成一个唯一名称
|
|
1143
|
+
*/
|
|
1144
|
+
_insertVariableAt(name: string, index: number): Variable;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* 插入变量
|
|
1148
|
+
* @internal
|
|
1149
|
+
* @param variableOptions 变量参数
|
|
1150
|
+
*/
|
|
1151
|
+
_insertVariableAt(variableOptions: Partial<Variable>, index: number): Variable;
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* 插入变量
|
|
1155
|
+
* @internal
|
|
1156
|
+
* @param variable 已有的变量实例
|
|
1157
|
+
*/
|
|
1158
|
+
_insertVariableAt(variable: Variable, index: number): Variable;
|
|
1159
|
+
|
|
1160
|
+
_insertVariableAt(options: string | Partial<Variable> | Variable, index: number) {
|
|
1161
|
+
const variableOptions: any = {};
|
|
1162
|
+
const relationOptions = { parentNode: this, parentKey: 'frontendVariables' };
|
|
1163
|
+
let variable: Variable;
|
|
1164
|
+
if (!options) {
|
|
1165
|
+
variable = Variable.from(
|
|
1166
|
+
{
|
|
1167
|
+
...variableOptions,
|
|
1168
|
+
name: this.getVariableUniqueName(),
|
|
1169
|
+
},
|
|
1170
|
+
this,
|
|
1171
|
+
'frontendVariables'
|
|
1172
|
+
);
|
|
1173
|
+
} else if (typeof options === 'string') {
|
|
1174
|
+
variable = Variable.from(
|
|
1175
|
+
{
|
|
1176
|
+
...variableOptions,
|
|
1177
|
+
name: options,
|
|
1178
|
+
},
|
|
1179
|
+
this,
|
|
1180
|
+
'frontendVariables'
|
|
1181
|
+
);
|
|
1182
|
+
} else if (options instanceof Variable) {
|
|
1183
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1184
|
+
variable = options;
|
|
1185
|
+
Object.assign(variable, relationOptions);
|
|
1186
|
+
} else {
|
|
1187
|
+
variable = Variable.from(
|
|
1188
|
+
{
|
|
1189
|
+
...variableOptions,
|
|
1190
|
+
...options,
|
|
1191
|
+
},
|
|
1192
|
+
this,
|
|
1193
|
+
'frontendVariables'
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
this.frontendVariables.splice(index, 0, variable);
|
|
1197
|
+
return variable;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* 插入变量
|
|
1202
|
+
* @param name 变量名称,如果不填会自动生成一个唯一名称
|
|
1203
|
+
*/
|
|
1204
|
+
insertVariableAt(name: string, index: number): Variable;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* 插入变量
|
|
1208
|
+
* @param variableOptions 变量参数
|
|
1209
|
+
*/
|
|
1210
|
+
insertVariableAt(variableOptions: Partial<Variable>, index: number): Variable;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* 插入变量
|
|
1214
|
+
* @param variable 已有的变量实例
|
|
1215
|
+
*/
|
|
1216
|
+
insertVariableAt(variable: Variable, index: number): Variable;
|
|
1217
|
+
|
|
1218
|
+
insertVariableAt(options: string | Partial<Variable> | Variable, index: number) {
|
|
1219
|
+
const node = this._insertVariableAt(options as any, index);
|
|
1220
|
+
node.create({
|
|
1221
|
+
index,
|
|
1222
|
+
parentNode: this,
|
|
1223
|
+
parentKey: 'frontendVariables',
|
|
1224
|
+
});
|
|
1225
|
+
return node;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* 添加变量
|
|
1230
|
+
* @internal
|
|
1231
|
+
* @param name 变量名称,如果不填会自动生成一个唯一名称
|
|
1232
|
+
*/
|
|
1233
|
+
_addVariable(name?: string): Variable;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* 添加变量
|
|
1237
|
+
* @internal
|
|
1238
|
+
* @param variableOptions 变量参数
|
|
1239
|
+
*/
|
|
1240
|
+
_addVariable(variableOptions: Partial<Variable>): Variable;
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* 添加变量
|
|
1244
|
+
* @internal
|
|
1245
|
+
* @param variable 已有的变量实例
|
|
1246
|
+
*/
|
|
1247
|
+
_addVariable(variable: Variable): Variable;
|
|
1248
|
+
|
|
1249
|
+
_addVariable(options?: string | Partial<Variable> | Variable) {
|
|
1250
|
+
const index = this.frontendVariables.length;
|
|
1251
|
+
return this._insertVariableAt(options as any, index);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* 添加变量
|
|
1256
|
+
* @internal
|
|
1257
|
+
* @param name 变量名称,如果不填会自动生成一个唯一名称
|
|
1258
|
+
*/
|
|
1259
|
+
addVariable(name?: string): Variable;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* 添加变量
|
|
1263
|
+
* @param variableOptions 变量参数
|
|
1264
|
+
*/
|
|
1265
|
+
addVariable(variableOptions: Partial<Variable>): Variable;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* 添加变量
|
|
1269
|
+
* @param variable 已有的变量实例
|
|
1270
|
+
*/
|
|
1271
|
+
addVariable(variable: Variable): Variable;
|
|
1272
|
+
|
|
1273
|
+
addVariable(options?: string | Partial<Variable> | Variable) {
|
|
1274
|
+
const node = this._addVariable(options as any);
|
|
1275
|
+
const index = this.frontendVariables.indexOf(node);
|
|
1276
|
+
node.create({
|
|
1277
|
+
index,
|
|
1278
|
+
parentNode: this,
|
|
1279
|
+
parentKey: 'frontendVariables',
|
|
1280
|
+
});
|
|
1281
|
+
return node;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
getProcessExistingNames(excludedList: Array<Process> = []) {
|
|
1285
|
+
const excludedSet = new Set(excludedList);
|
|
1286
|
+
return ((this.processes as Process[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
getProcessUniqueName(name = 'Process1') {
|
|
1290
|
+
return utils.unique(name, this.getProcessExistingNames(), undefined, false);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* 插入流程
|
|
1295
|
+
* @internal
|
|
1296
|
+
* @param name 流程名称,如果不填会自动生成一个唯一名称
|
|
1297
|
+
*/
|
|
1298
|
+
_insertProcessAt(name: string, index: number): Process;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* 插入流程
|
|
1302
|
+
* @internal
|
|
1303
|
+
* @param processOptions 流程参数
|
|
1304
|
+
*/
|
|
1305
|
+
_insertProcessAt(processOptions: Partial<Process>, index: number): Process;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* 插入流程
|
|
1309
|
+
* @internal
|
|
1310
|
+
* @param process 已有的流程实例
|
|
1311
|
+
*/
|
|
1312
|
+
_insertProcessAt(process: Process, index: number): Process;
|
|
1313
|
+
|
|
1314
|
+
_insertProcessAt(options: string | Partial<Process> | Process, index: number) {
|
|
1315
|
+
const processOptions: any = {};
|
|
1316
|
+
const relationOptions = { parentNode: this, parentKey: 'processes' };
|
|
1317
|
+
let process: Process;
|
|
1318
|
+
if (!options) {
|
|
1319
|
+
process = Process.from(
|
|
1320
|
+
{
|
|
1321
|
+
...processOptions,
|
|
1322
|
+
name: this.getProcessUniqueName(),
|
|
1323
|
+
},
|
|
1324
|
+
this,
|
|
1325
|
+
'processes'
|
|
1326
|
+
);
|
|
1327
|
+
} else if (typeof options === 'string') {
|
|
1328
|
+
process = Process.from(
|
|
1329
|
+
{
|
|
1330
|
+
...processOptions,
|
|
1331
|
+
name: options,
|
|
1332
|
+
},
|
|
1333
|
+
this,
|
|
1334
|
+
'processes'
|
|
1335
|
+
);
|
|
1336
|
+
} else if (options instanceof Process) {
|
|
1337
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1338
|
+
process = options;
|
|
1339
|
+
Object.assign(process, relationOptions);
|
|
1340
|
+
} else {
|
|
1341
|
+
process = Process.from(
|
|
1342
|
+
{
|
|
1343
|
+
...processOptions,
|
|
1344
|
+
...options,
|
|
1345
|
+
},
|
|
1346
|
+
this,
|
|
1347
|
+
'processes'
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
this.processes.splice(index, 0, process);
|
|
1351
|
+
return process;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* 插入流程
|
|
1356
|
+
* @param name 流程名称,如果不填会自动生成一个唯一名称
|
|
1357
|
+
*/
|
|
1358
|
+
insertProcessAt(name: string, index: number): Process;
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* 插入流程
|
|
1362
|
+
* @param processOptions 流程参数
|
|
1363
|
+
*/
|
|
1364
|
+
insertProcessAt(processOptions: Partial<Process>, index: number): Process;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* 插入流程
|
|
1368
|
+
* @param process 已有的流程实例
|
|
1369
|
+
*/
|
|
1370
|
+
insertProcessAt(process: Process, index: number): Process;
|
|
1371
|
+
|
|
1372
|
+
insertProcessAt(options: string | Partial<Process> | Process, index: number) {
|
|
1373
|
+
const node = this._insertProcessAt(options as any, index);
|
|
1374
|
+
node.create({
|
|
1375
|
+
index,
|
|
1376
|
+
parentNode: this,
|
|
1377
|
+
parentKey: 'processes',
|
|
1378
|
+
});
|
|
1379
|
+
return node;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* 添加流程
|
|
1384
|
+
* @internal
|
|
1385
|
+
* @param name 流程名称,如果不填会自动生成一个唯一名称
|
|
1386
|
+
*/
|
|
1387
|
+
_addProcess(name?: string): Process;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* 添加流程
|
|
1391
|
+
* @internal
|
|
1392
|
+
* @param processOptions 流程参数
|
|
1393
|
+
*/
|
|
1394
|
+
_addProcess(processOptions: Partial<Process>): Process;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* 添加流程
|
|
1398
|
+
* @internal
|
|
1399
|
+
* @param process 已有的流程实例
|
|
1400
|
+
*/
|
|
1401
|
+
_addProcess(process: Process): Process;
|
|
1402
|
+
|
|
1403
|
+
_addProcess(options?: string | Partial<Process> | Process) {
|
|
1404
|
+
const index = 0;
|
|
1405
|
+
return this._insertProcessAt(options as any, index);
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* 添加流程
|
|
1410
|
+
* @internal
|
|
1411
|
+
* @param name 流程名称,如果不填会自动生成一个唯一名称
|
|
1412
|
+
*/
|
|
1413
|
+
addProcess(name?: string): Process;
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* 添加流程
|
|
1417
|
+
* @param processOptions 流程参数
|
|
1418
|
+
*/
|
|
1419
|
+
addProcess(processOptions: Partial<Process>): Process;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* 添加流程
|
|
1423
|
+
* @param process 已有的流程实例
|
|
1424
|
+
*/
|
|
1425
|
+
addProcess(process: Process): Process;
|
|
1426
|
+
|
|
1427
|
+
addProcess(options?: string | Partial<Process> | Process) {
|
|
1428
|
+
const node = this._addProcess(options as any);
|
|
1429
|
+
const index = this.processes.indexOf(node);
|
|
1430
|
+
node.create({
|
|
1431
|
+
index,
|
|
1432
|
+
parentNode: this,
|
|
1433
|
+
parentKey: 'processes',
|
|
1434
|
+
});
|
|
1435
|
+
return node;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
getFrontendLibraryExistingNames(excludedList: Array<FrontendLibrary> = []) {
|
|
1439
|
+
const excludedSet = new Set(excludedList);
|
|
1440
|
+
return ((this.frontends as FrontendLibrary[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
getFrontendLibraryUniqueName(name = 'frontendLibrary1') {
|
|
1444
|
+
return utils.unique(name, this.getFrontendLibraryExistingNames(), undefined, false);
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* 插入端包
|
|
1449
|
+
* @internal
|
|
1450
|
+
* @param name 端包名称,如果不填会自动生成一个唯一名称
|
|
1451
|
+
*/
|
|
1452
|
+
_insertFrontendLibraryAt(name: string, index: number): FrontendLibrary;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* 插入端包
|
|
1456
|
+
* @internal
|
|
1457
|
+
* @param frontendLibraryOptions 端包参数
|
|
1458
|
+
*/
|
|
1459
|
+
_insertFrontendLibraryAt(frontendLibraryOptions: Partial<FrontendLibrary>, index: number): FrontendLibrary;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* 插入端包
|
|
1463
|
+
* @internal
|
|
1464
|
+
* @param frontendLibrary 已有的端包实例
|
|
1465
|
+
*/
|
|
1466
|
+
_insertFrontendLibraryAt(frontendLibrary: FrontendLibrary, index: number): FrontendLibrary;
|
|
1467
|
+
|
|
1468
|
+
_insertFrontendLibraryAt(options: string | Partial<FrontendLibrary> | FrontendLibrary, index: number) {
|
|
1469
|
+
const frontendLibraryOptions: any = {};
|
|
1470
|
+
const relationOptions = { parentNode: this, parentKey: 'frontends' };
|
|
1471
|
+
let frontendLibrary: FrontendLibrary;
|
|
1472
|
+
if (!options) {
|
|
1473
|
+
frontendLibrary = FrontendLibrary.from(
|
|
1474
|
+
{
|
|
1475
|
+
...frontendLibraryOptions,
|
|
1476
|
+
name: this.getFrontendLibraryUniqueName(),
|
|
1477
|
+
},
|
|
1478
|
+
this,
|
|
1479
|
+
'frontends'
|
|
1480
|
+
);
|
|
1481
|
+
} else if (typeof options === 'string') {
|
|
1482
|
+
frontendLibrary = FrontendLibrary.from(
|
|
1483
|
+
{
|
|
1484
|
+
...frontendLibraryOptions,
|
|
1485
|
+
name: options,
|
|
1486
|
+
},
|
|
1487
|
+
this,
|
|
1488
|
+
'frontends'
|
|
1489
|
+
);
|
|
1490
|
+
} else if (options instanceof FrontendLibrary) {
|
|
1491
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1492
|
+
frontendLibrary = options;
|
|
1493
|
+
Object.assign(frontendLibrary, relationOptions);
|
|
1494
|
+
} else {
|
|
1495
|
+
frontendLibrary = FrontendLibrary.from(
|
|
1496
|
+
{
|
|
1497
|
+
...frontendLibraryOptions,
|
|
1498
|
+
...options,
|
|
1499
|
+
},
|
|
1500
|
+
this,
|
|
1501
|
+
'frontends'
|
|
1502
|
+
);
|
|
1503
|
+
}
|
|
1504
|
+
this.frontends.splice(index, 0, frontendLibrary);
|
|
1505
|
+
return frontendLibrary;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* 插入端包
|
|
1510
|
+
* @param name 端包名称,如果不填会自动生成一个唯一名称
|
|
1511
|
+
*/
|
|
1512
|
+
insertFrontendLibraryAt(name: string, index: number): FrontendLibrary;
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* 插入端包
|
|
1516
|
+
* @param frontendLibraryOptions 端包参数
|
|
1517
|
+
*/
|
|
1518
|
+
insertFrontendLibraryAt(frontendLibraryOptions: Partial<FrontendLibrary>, index: number): FrontendLibrary;
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* 插入端包
|
|
1522
|
+
* @param frontendLibrary 已有的端包实例
|
|
1523
|
+
*/
|
|
1524
|
+
insertFrontendLibraryAt(frontendLibrary: FrontendLibrary, index: number): FrontendLibrary;
|
|
1525
|
+
|
|
1526
|
+
insertFrontendLibraryAt(options: string | Partial<FrontendLibrary> | FrontendLibrary, index: number) {
|
|
1527
|
+
const node = this._insertFrontendLibraryAt(options as any, index);
|
|
1528
|
+
node.create({
|
|
1529
|
+
index,
|
|
1530
|
+
parentNode: this,
|
|
1531
|
+
parentKey: 'frontends',
|
|
1532
|
+
});
|
|
1533
|
+
return node;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* 添加端包
|
|
1538
|
+
* @internal
|
|
1539
|
+
* @param name 端包名称,如果不填会自动生成一个唯一名称
|
|
1540
|
+
*/
|
|
1541
|
+
_addFrontendLibrary(name?: string): FrontendLibrary;
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* 添加端包
|
|
1545
|
+
* @internal
|
|
1546
|
+
* @param frontendLibraryOptions 端包参数
|
|
1547
|
+
*/
|
|
1548
|
+
_addFrontendLibrary(frontendLibraryOptions: Partial<FrontendLibrary>): FrontendLibrary;
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* 添加端包
|
|
1552
|
+
* @internal
|
|
1553
|
+
* @param frontendLibrary 已有的端包实例
|
|
1554
|
+
*/
|
|
1555
|
+
_addFrontendLibrary(frontendLibrary: FrontendLibrary): FrontendLibrary;
|
|
1556
|
+
|
|
1557
|
+
_addFrontendLibrary(options?: string | Partial<FrontendLibrary> | FrontendLibrary) {
|
|
1558
|
+
const index = this.frontends.length;
|
|
1559
|
+
return this._insertFrontendLibraryAt(options as any, index);
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* 添加端包
|
|
1564
|
+
* @internal
|
|
1565
|
+
* @param name 端包名称,如果不填会自动生成一个唯一名称
|
|
1566
|
+
*/
|
|
1567
|
+
addFrontendLibrary(name?: string): FrontendLibrary;
|
|
1568
|
+
|
|
1569
|
+
/**
|
|
1570
|
+
* 添加端包
|
|
1571
|
+
* @param frontendLibraryOptions 端包参数
|
|
1572
|
+
*/
|
|
1573
|
+
addFrontendLibrary(frontendLibraryOptions: Partial<FrontendLibrary>): FrontendLibrary;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* 添加端包
|
|
1577
|
+
* @param frontendLibrary 已有的端包实例
|
|
1578
|
+
*/
|
|
1579
|
+
addFrontendLibrary(frontendLibrary: FrontendLibrary): FrontendLibrary;
|
|
1580
|
+
|
|
1581
|
+
addFrontendLibrary(options?: string | Partial<FrontendLibrary> | FrontendLibrary) {
|
|
1582
|
+
const node = this._addFrontendLibrary(options as any);
|
|
1583
|
+
const index = this.frontends.indexOf(node);
|
|
1584
|
+
node.create({
|
|
1585
|
+
index,
|
|
1586
|
+
parentNode: this,
|
|
1587
|
+
parentKey: 'frontends',
|
|
1588
|
+
});
|
|
1589
|
+
return node;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
getTriggerLauncherExistingNames(excludedList: Array<TriggerLauncher> = []) {
|
|
1593
|
+
const excludedSet = new Set(excludedList);
|
|
1594
|
+
return ((this.triggerLaunchers as TriggerLauncher[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
getTriggerLauncherUniqueName(name = 'triggerLauncher1') {
|
|
1598
|
+
return utils.unique(name, this.getTriggerLauncherExistingNames(), undefined, false);
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* 插入触发器启动器
|
|
1603
|
+
* @internal
|
|
1604
|
+
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1605
|
+
*/
|
|
1606
|
+
_insertTriggerLauncherAt(name: string, index: number): TriggerLauncher;
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* 插入触发器启动器
|
|
1610
|
+
* @internal
|
|
1611
|
+
* @param triggerLauncherOptions 触发器启动器参数
|
|
1612
|
+
*/
|
|
1613
|
+
_insertTriggerLauncherAt(triggerLauncherOptions: Partial<TriggerLauncher>, index: number): TriggerLauncher;
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* 插入触发器启动器
|
|
1617
|
+
* @internal
|
|
1618
|
+
* @param triggerLauncher 已有的触发器启动器实例
|
|
1619
|
+
*/
|
|
1620
|
+
_insertTriggerLauncherAt(triggerLauncher: TriggerLauncher, index: number): TriggerLauncher;
|
|
1621
|
+
|
|
1622
|
+
_insertTriggerLauncherAt(options: string | Partial<TriggerLauncher> | TriggerLauncher, index: number) {
|
|
1623
|
+
const triggerLauncherOptions: any = {};
|
|
1624
|
+
const relationOptions = { parentNode: this, parentKey: 'triggerLaunchers' };
|
|
1625
|
+
let triggerLauncher: TriggerLauncher;
|
|
1626
|
+
if (!options) {
|
|
1627
|
+
triggerLauncher = TriggerLauncher.from(
|
|
1628
|
+
{
|
|
1629
|
+
...triggerLauncherOptions,
|
|
1630
|
+
name: this.getTriggerLauncherUniqueName(),
|
|
1631
|
+
},
|
|
1632
|
+
this,
|
|
1633
|
+
'triggerLaunchers'
|
|
1634
|
+
);
|
|
1635
|
+
} else if (typeof options === 'string') {
|
|
1636
|
+
triggerLauncher = TriggerLauncher.from(
|
|
1637
|
+
{
|
|
1638
|
+
...triggerLauncherOptions,
|
|
1639
|
+
name: options,
|
|
1640
|
+
},
|
|
1641
|
+
this,
|
|
1642
|
+
'triggerLaunchers'
|
|
1643
|
+
);
|
|
1644
|
+
} else if (options instanceof TriggerLauncher) {
|
|
1645
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1646
|
+
triggerLauncher = options;
|
|
1647
|
+
Object.assign(triggerLauncher, relationOptions);
|
|
1648
|
+
} else {
|
|
1649
|
+
triggerLauncher = TriggerLauncher.from(
|
|
1650
|
+
{
|
|
1651
|
+
...triggerLauncherOptions,
|
|
1652
|
+
...options,
|
|
1653
|
+
},
|
|
1654
|
+
this,
|
|
1655
|
+
'triggerLaunchers'
|
|
1656
|
+
);
|
|
1657
|
+
}
|
|
1658
|
+
this.triggerLaunchers.splice(index, 0, triggerLauncher);
|
|
1659
|
+
return triggerLauncher;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* 插入触发器启动器
|
|
1664
|
+
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1665
|
+
*/
|
|
1666
|
+
insertTriggerLauncherAt(name: string, index: number): TriggerLauncher;
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* 插入触发器启动器
|
|
1670
|
+
* @param triggerLauncherOptions 触发器启动器参数
|
|
1671
|
+
*/
|
|
1672
|
+
insertTriggerLauncherAt(triggerLauncherOptions: Partial<TriggerLauncher>, index: number): TriggerLauncher;
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* 插入触发器启动器
|
|
1676
|
+
* @param triggerLauncher 已有的触发器启动器实例
|
|
1677
|
+
*/
|
|
1678
|
+
insertTriggerLauncherAt(triggerLauncher: TriggerLauncher, index: number): TriggerLauncher;
|
|
1679
|
+
|
|
1680
|
+
insertTriggerLauncherAt(options: string | Partial<TriggerLauncher> | TriggerLauncher, index: number) {
|
|
1681
|
+
const node = this._insertTriggerLauncherAt(options as any, index);
|
|
1682
|
+
node.create({
|
|
1683
|
+
index,
|
|
1684
|
+
parentNode: this,
|
|
1685
|
+
parentKey: 'triggerLaunchers',
|
|
1686
|
+
});
|
|
1687
|
+
return node;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* 添加触发器启动器
|
|
1692
|
+
* @internal
|
|
1693
|
+
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1694
|
+
*/
|
|
1695
|
+
_addTriggerLauncher(name?: string): TriggerLauncher;
|
|
1696
|
+
|
|
1697
|
+
/**
|
|
1698
|
+
* 添加触发器启动器
|
|
1699
|
+
* @internal
|
|
1700
|
+
* @param triggerLauncherOptions 触发器启动器参数
|
|
1701
|
+
*/
|
|
1702
|
+
_addTriggerLauncher(triggerLauncherOptions: Partial<TriggerLauncher>): TriggerLauncher;
|
|
1703
|
+
|
|
1704
|
+
/**
|
|
1705
|
+
* 添加触发器启动器
|
|
1706
|
+
* @internal
|
|
1707
|
+
* @param triggerLauncher 已有的触发器启动器实例
|
|
1708
|
+
*/
|
|
1709
|
+
_addTriggerLauncher(triggerLauncher: TriggerLauncher): TriggerLauncher;
|
|
1710
|
+
|
|
1711
|
+
_addTriggerLauncher(options?: string | Partial<TriggerLauncher> | TriggerLauncher) {
|
|
1712
|
+
const index = 0;
|
|
1713
|
+
return this._insertTriggerLauncherAt(options as any, index);
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* 添加触发器启动器
|
|
1718
|
+
* @internal
|
|
1719
|
+
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1720
|
+
*/
|
|
1721
|
+
addTriggerLauncher(name?: string): TriggerLauncher;
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* 添加触发器启动器
|
|
1725
|
+
* @param triggerLauncherOptions 触发器启动器参数
|
|
1726
|
+
*/
|
|
1727
|
+
addTriggerLauncher(triggerLauncherOptions: Partial<TriggerLauncher>): TriggerLauncher;
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* 添加触发器启动器
|
|
1731
|
+
* @param triggerLauncher 已有的触发器启动器实例
|
|
1732
|
+
*/
|
|
1733
|
+
addTriggerLauncher(triggerLauncher: TriggerLauncher): TriggerLauncher;
|
|
1734
|
+
|
|
1735
|
+
addTriggerLauncher(options?: string | Partial<TriggerLauncher> | TriggerLauncher) {
|
|
1736
|
+
const node = this._addTriggerLauncher(options as any);
|
|
1737
|
+
const index = this.triggerLaunchers.indexOf(node);
|
|
1738
|
+
node.create({
|
|
1739
|
+
index,
|
|
1740
|
+
parentNode: this,
|
|
1741
|
+
parentKey: 'triggerLaunchers',
|
|
1742
|
+
});
|
|
1743
|
+
return node;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
getConnectionExistingNames(excludedList: Array<Connection> = []) {
|
|
1747
|
+
const excludedSet = new Set(excludedList);
|
|
1748
|
+
return ((this.connections as Connection[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
getConnectionUniqueName(name = 'connection1') {
|
|
1752
|
+
return utils.unique(name, this.getConnectionExistingNames(), undefined, false);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* 插入连接
|
|
1757
|
+
* @internal
|
|
1758
|
+
* @param name 连接名称,如果不填会自动生成一个唯一名称
|
|
1759
|
+
*/
|
|
1760
|
+
_insertConnectionAt(name: string, index: number): Connection;
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* 插入连接
|
|
1764
|
+
* @internal
|
|
1765
|
+
* @param connectionOptions 连接参数
|
|
1766
|
+
*/
|
|
1767
|
+
_insertConnectionAt(connectionOptions: Partial<Connection>, index: number): Connection;
|
|
1768
|
+
|
|
1769
|
+
/**
|
|
1770
|
+
* 插入连接
|
|
1771
|
+
* @internal
|
|
1772
|
+
* @param connection 已有的连接实例
|
|
1773
|
+
*/
|
|
1774
|
+
_insertConnectionAt(connection: Connection, index: number): Connection;
|
|
1775
|
+
|
|
1776
|
+
_insertConnectionAt(options: string | Partial<Connection> | Connection, index: number) {
|
|
1777
|
+
const connectionOptions: any = {};
|
|
1778
|
+
const relationOptions = { parentNode: this, parentKey: 'connections' };
|
|
1779
|
+
let connection: Connection;
|
|
1780
|
+
if (!options) {
|
|
1781
|
+
connection = Connection.from(
|
|
1782
|
+
{
|
|
1783
|
+
...connectionOptions,
|
|
1784
|
+
name: this.getConnectionUniqueName(),
|
|
1785
|
+
},
|
|
1786
|
+
this,
|
|
1787
|
+
'connections'
|
|
1788
|
+
);
|
|
1789
|
+
} else if (typeof options === 'string') {
|
|
1790
|
+
connection = Connection.from(
|
|
1791
|
+
{
|
|
1792
|
+
...connectionOptions,
|
|
1793
|
+
name: options,
|
|
1794
|
+
},
|
|
1795
|
+
this,
|
|
1796
|
+
'connections'
|
|
1797
|
+
);
|
|
1798
|
+
} else if (options instanceof Connection) {
|
|
1799
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1800
|
+
connection = options;
|
|
1801
|
+
Object.assign(connection, relationOptions);
|
|
1802
|
+
} else {
|
|
1803
|
+
connection = Connection.from(
|
|
1804
|
+
{
|
|
1805
|
+
...connectionOptions,
|
|
1806
|
+
...options,
|
|
1807
|
+
},
|
|
1808
|
+
this,
|
|
1809
|
+
'connections'
|
|
1810
|
+
);
|
|
1811
|
+
}
|
|
1812
|
+
this.connections.splice(index, 0, connection);
|
|
1813
|
+
return connection;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
* 插入连接
|
|
1818
|
+
* @param name 连接名称,如果不填会自动生成一个唯一名称
|
|
1819
|
+
*/
|
|
1820
|
+
insertConnectionAt(name: string, index: number): Connection;
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* 插入连接
|
|
1824
|
+
* @param connectionOptions 连接参数
|
|
1825
|
+
*/
|
|
1826
|
+
insertConnectionAt(connectionOptions: Partial<Connection>, index: number): Connection;
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* 插入连接
|
|
1830
|
+
* @param connection 已有的连接实例
|
|
1831
|
+
*/
|
|
1832
|
+
insertConnectionAt(connection: Connection, index: number): Connection;
|
|
1833
|
+
|
|
1834
|
+
insertConnectionAt(options: string | Partial<Connection> | Connection, index: number) {
|
|
1835
|
+
const node = this._insertConnectionAt(options as any, index);
|
|
1836
|
+
node.create({
|
|
1837
|
+
index,
|
|
1838
|
+
parentNode: this,
|
|
1839
|
+
parentKey: 'connections',
|
|
1840
|
+
});
|
|
1841
|
+
return node;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* 添加连接
|
|
1846
|
+
* @internal
|
|
1847
|
+
* @param name 连接名称,如果不填会自动生成一个唯一名称
|
|
1848
|
+
*/
|
|
1849
|
+
_addConnection(name?: string): Connection;
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* 添加连接
|
|
1853
|
+
* @internal
|
|
1854
|
+
* @param connectionOptions 连接参数
|
|
1855
|
+
*/
|
|
1856
|
+
_addConnection(connectionOptions: Partial<Connection>): Connection;
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* 添加连接
|
|
1860
|
+
* @internal
|
|
1861
|
+
* @param connection 已有的连接实例
|
|
1862
|
+
*/
|
|
1863
|
+
_addConnection(connection: Connection): Connection;
|
|
1864
|
+
|
|
1865
|
+
_addConnection(options?: string | Partial<Connection> | Connection) {
|
|
1866
|
+
const index = 0;
|
|
1867
|
+
return this._insertConnectionAt(options as any, index);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
/**
|
|
1871
|
+
* 添加连接
|
|
1872
|
+
* @internal
|
|
1873
|
+
* @param name 连接名称,如果不填会自动生成一个唯一名称
|
|
1874
|
+
*/
|
|
1875
|
+
addConnection(name?: string): Connection;
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* 添加连接
|
|
1879
|
+
* @param connectionOptions 连接参数
|
|
1880
|
+
*/
|
|
1881
|
+
addConnection(connectionOptions: Partial<Connection>): Connection;
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* 添加连接
|
|
1885
|
+
* @param connection 已有的连接实例
|
|
1886
|
+
*/
|
|
1887
|
+
addConnection(connection: Connection): Connection;
|
|
1888
|
+
|
|
1889
|
+
addConnection(options?: string | Partial<Connection> | Connection) {
|
|
1890
|
+
const node = this._addConnection(options as any);
|
|
1891
|
+
const index = this.connections.indexOf(node);
|
|
1892
|
+
node.create({
|
|
1893
|
+
index,
|
|
1894
|
+
parentNode: this,
|
|
1895
|
+
parentKey: 'connections',
|
|
1896
|
+
});
|
|
1897
|
+
return node;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* 删除数据源
|
|
1902
|
+
* @param name 数据源名称
|
|
1903
|
+
*/
|
|
1904
|
+
removeDataSource(name: string): void;
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* 删除数据源
|
|
1908
|
+
* @param dataSource 已有的数据源实例
|
|
1909
|
+
*/
|
|
1910
|
+
removeDataSource(dataSource: DataSource): void;
|
|
1911
|
+
|
|
1912
|
+
removeDataSource(options: string | DataSource) {
|
|
1913
|
+
let dataSource: DataSource;
|
|
1914
|
+
if (typeof options === 'string') {
|
|
1915
|
+
dataSource = (this.dataSources as DataSource[]).find((item) => item.name === options);
|
|
1916
|
+
if (!dataSource) {
|
|
1917
|
+
throw new Error(`找不到数据源 ${options}`);
|
|
1918
|
+
}
|
|
1919
|
+
} else {
|
|
1920
|
+
dataSource = options;
|
|
1921
|
+
}
|
|
1922
|
+
return dataSource.delete();
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
__removeDataSource(dataSource: DataSource) {
|
|
1926
|
+
const { parentKey } = dataSource;
|
|
1927
|
+
const params: Params = {
|
|
1928
|
+
parentNode: this,
|
|
1929
|
+
parentKey,
|
|
1930
|
+
index: -1,
|
|
1931
|
+
object: null,
|
|
1932
|
+
oldObject: dataSource,
|
|
1933
|
+
};
|
|
1934
|
+
if (parentKey) {
|
|
1935
|
+
params.parentKey = parentKey;
|
|
1936
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
1937
|
+
const index = (this as any)[parentKey].indexOf(dataSource);
|
|
1938
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
1939
|
+
params.index = index;
|
|
1940
|
+
} else if ((this as any)[parentKey] === dataSource) {
|
|
1941
|
+
params.index = 0;
|
|
1942
|
+
(this as any)[parentKey] = undefined;
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
return params;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* 删除数据结构
|
|
1950
|
+
* @param name 数据结构名称
|
|
1951
|
+
*/
|
|
1952
|
+
removeStructure(name: string): void;
|
|
1953
|
+
|
|
1954
|
+
/**
|
|
1955
|
+
* 删除数据结构
|
|
1956
|
+
* @param structure 已有的数据结构实例
|
|
1957
|
+
*/
|
|
1958
|
+
removeStructure(structure: Structure): void;
|
|
1959
|
+
|
|
1960
|
+
removeStructure(options: string | Structure) {
|
|
1961
|
+
let structure: Structure;
|
|
1962
|
+
if (typeof options === 'string') {
|
|
1963
|
+
structure = (this.structures as Structure[]).find((item) => item.name === options);
|
|
1964
|
+
if (!structure) {
|
|
1965
|
+
throw new Error(`找不到数据结构 ${options}`);
|
|
1966
|
+
}
|
|
1967
|
+
} else {
|
|
1968
|
+
structure = options;
|
|
1969
|
+
}
|
|
1970
|
+
return structure.delete();
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
__removeStructure(structure: Structure) {
|
|
1974
|
+
const { parentKey } = structure;
|
|
1975
|
+
const params: Params = {
|
|
1976
|
+
parentNode: this,
|
|
1977
|
+
parentKey,
|
|
1978
|
+
index: -1,
|
|
1979
|
+
object: null,
|
|
1980
|
+
oldObject: structure,
|
|
1981
|
+
};
|
|
1982
|
+
if (parentKey) {
|
|
1983
|
+
params.parentKey = parentKey;
|
|
1984
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
1985
|
+
const index = (this as any)[parentKey].indexOf(structure);
|
|
1986
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
1987
|
+
params.index = index;
|
|
1988
|
+
} else if ((this as any)[parentKey] === structure) {
|
|
1989
|
+
params.index = 0;
|
|
1990
|
+
(this as any)[parentKey] = undefined;
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
return params;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* 删除枚举
|
|
1998
|
+
* @param name 枚举名称
|
|
1999
|
+
*/
|
|
2000
|
+
removeEnum(name: string): void;
|
|
2001
|
+
|
|
2002
|
+
/**
|
|
2003
|
+
* 删除枚举
|
|
2004
|
+
* @param enumeration 已有的枚举实例
|
|
2005
|
+
*/
|
|
2006
|
+
removeEnum(enumeration: Enum): void;
|
|
2007
|
+
|
|
2008
|
+
removeEnum(options: string | Enum) {
|
|
2009
|
+
let enumeration: Enum;
|
|
2010
|
+
if (typeof options === 'string') {
|
|
2011
|
+
enumeration = (this.enums as Enum[]).find((item) => item.name === options);
|
|
2012
|
+
if (!enumeration) {
|
|
2013
|
+
throw new Error(`找不到枚举 ${options}`);
|
|
2014
|
+
}
|
|
2015
|
+
} else {
|
|
2016
|
+
enumeration = options;
|
|
2017
|
+
}
|
|
2018
|
+
return enumeration.delete();
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
__removeEnum(enumeration: Enum) {
|
|
2022
|
+
const { parentKey } = enumeration;
|
|
2023
|
+
const params: Params = {
|
|
2024
|
+
parentNode: this,
|
|
2025
|
+
parentKey,
|
|
2026
|
+
index: -1,
|
|
2027
|
+
object: null,
|
|
2028
|
+
oldObject: enumeration,
|
|
2029
|
+
};
|
|
2030
|
+
if (parentKey) {
|
|
2031
|
+
params.parentKey = parentKey;
|
|
2032
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2033
|
+
const index = (this as any)[parentKey].indexOf(enumeration);
|
|
2034
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2035
|
+
params.index = index;
|
|
2036
|
+
} else if ((this as any)[parentKey] === enumeration) {
|
|
2037
|
+
params.index = 0;
|
|
2038
|
+
(this as any)[parentKey] = undefined;
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
return params;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* 删除逻辑
|
|
2046
|
+
* @param name 逻辑名称
|
|
2047
|
+
*/
|
|
2048
|
+
removeLogic(name: string): void;
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* 删除逻辑
|
|
2052
|
+
* @param logic 已有的逻辑实例
|
|
2053
|
+
*/
|
|
2054
|
+
removeLogic(logic: Logic): void;
|
|
2055
|
+
|
|
2056
|
+
removeLogic(options: string | Logic) {
|
|
2057
|
+
let logic: Logic;
|
|
2058
|
+
if (typeof options === 'string') {
|
|
2059
|
+
logic = (this.logics as Logic[]).find((item) => item.name === options);
|
|
2060
|
+
if (!logic) {
|
|
2061
|
+
throw new Error(`找不到逻辑 ${options}`);
|
|
2062
|
+
}
|
|
2063
|
+
} else {
|
|
2064
|
+
logic = options;
|
|
2065
|
+
}
|
|
2066
|
+
return logic.delete();
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
__removeLogic(logic: Logic) {
|
|
2070
|
+
const { parentKey } = logic;
|
|
2071
|
+
const params: Params = {
|
|
2072
|
+
parentNode: this,
|
|
2073
|
+
parentKey,
|
|
2074
|
+
index: -1,
|
|
2075
|
+
object: null,
|
|
2076
|
+
oldObject: logic,
|
|
2077
|
+
};
|
|
2078
|
+
if (parentKey) {
|
|
2079
|
+
params.parentKey = parentKey;
|
|
2080
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2081
|
+
const index = (this as any)[parentKey].indexOf(logic);
|
|
2082
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2083
|
+
params.index = index;
|
|
2084
|
+
} else if ((this as any)[parentKey] === logic) {
|
|
2085
|
+
params.index = 0;
|
|
2086
|
+
(this as any)[parentKey] = undefined;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
return params;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
/**
|
|
2093
|
+
* 删除接口
|
|
2094
|
+
* @param name 接口名称
|
|
2095
|
+
*/
|
|
2096
|
+
removeInterface(name: string): void;
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* 删除接口
|
|
2100
|
+
* @param itface 已有的接口实例
|
|
2101
|
+
*/
|
|
2102
|
+
removeInterface(itface: Interface): void;
|
|
2103
|
+
|
|
2104
|
+
removeInterface(options: string | Interface) {
|
|
2105
|
+
let itface: Interface;
|
|
2106
|
+
if (typeof options === 'string') {
|
|
2107
|
+
itface = (this.interfaces as Interface[]).find((item) => item.name === options);
|
|
2108
|
+
if (!itface) {
|
|
2109
|
+
throw new Error(`找不到接口 ${options}`);
|
|
2110
|
+
}
|
|
2111
|
+
} else {
|
|
2112
|
+
itface = options;
|
|
2113
|
+
}
|
|
2114
|
+
return itface.delete();
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
__removeInterface(itface: Interface) {
|
|
2118
|
+
const { parentKey } = itface;
|
|
2119
|
+
const params: Params = {
|
|
2120
|
+
parentNode: this,
|
|
2121
|
+
parentKey,
|
|
2122
|
+
index: -1,
|
|
2123
|
+
object: null,
|
|
2124
|
+
oldObject: itface,
|
|
2125
|
+
};
|
|
2126
|
+
if (parentKey) {
|
|
2127
|
+
params.parentKey = parentKey;
|
|
2128
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2129
|
+
const index = (this as any)[parentKey].indexOf(itface);
|
|
2130
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2131
|
+
params.index = index;
|
|
2132
|
+
} else if ((this as any)[parentKey] === itface) {
|
|
2133
|
+
params.index = 0;
|
|
2134
|
+
(this as any)[parentKey] = undefined;
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
return params;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* 删除页面
|
|
2142
|
+
* @param name 页面名称
|
|
2143
|
+
*/
|
|
2144
|
+
removeView(name: string): void;
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* 删除页面
|
|
2148
|
+
* @param view 已有的页面实例
|
|
2149
|
+
*/
|
|
2150
|
+
removeView(view: View): void;
|
|
2151
|
+
|
|
2152
|
+
removeView(options: string | View) {
|
|
2153
|
+
let view: View;
|
|
2154
|
+
if (typeof options === 'string') {
|
|
2155
|
+
view = (this.views as View[]).find((item) => item.name === options);
|
|
2156
|
+
if (!view) {
|
|
2157
|
+
throw new Error(`找不到页面 ${options}`);
|
|
2158
|
+
}
|
|
2159
|
+
} else {
|
|
2160
|
+
view = options;
|
|
2161
|
+
}
|
|
2162
|
+
return view.delete();
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
__removeView(view: View) {
|
|
2166
|
+
const { parentKey } = view;
|
|
2167
|
+
const params: Params = {
|
|
2168
|
+
parentNode: this,
|
|
2169
|
+
parentKey,
|
|
2170
|
+
index: -1,
|
|
2171
|
+
object: null,
|
|
2172
|
+
oldObject: view,
|
|
2173
|
+
};
|
|
2174
|
+
if (parentKey) {
|
|
2175
|
+
params.parentKey = parentKey;
|
|
2176
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2177
|
+
const index = (this as any)[parentKey].indexOf(view);
|
|
2178
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2179
|
+
params.index = index;
|
|
2180
|
+
} else if ((this as any)[parentKey] === view) {
|
|
2181
|
+
params.index = 0;
|
|
2182
|
+
(this as any)[parentKey] = undefined;
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
return params;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* 删除变量
|
|
2190
|
+
* @param name 变量名称
|
|
2191
|
+
*/
|
|
2192
|
+
removeVariable(name: string): void;
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* 删除变量
|
|
2196
|
+
* @param variable 已有的变量实例
|
|
2197
|
+
*/
|
|
2198
|
+
removeVariable(variable: Variable): void;
|
|
2199
|
+
|
|
2200
|
+
removeVariable(options: string | Variable) {
|
|
2201
|
+
let variable: Variable;
|
|
2202
|
+
if (typeof options === 'string') {
|
|
2203
|
+
variable = (this.frontendVariables as Variable[]).find((item) => item.name === options);
|
|
2204
|
+
if (!variable) {
|
|
2205
|
+
throw new Error(`找不到变量 ${options}`);
|
|
2206
|
+
}
|
|
2207
|
+
} else {
|
|
2208
|
+
variable = options;
|
|
2209
|
+
}
|
|
2210
|
+
return variable.delete();
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
__removeVariable(variable: Variable) {
|
|
2214
|
+
const { parentKey } = variable;
|
|
2215
|
+
const params: Params = {
|
|
2216
|
+
parentNode: this,
|
|
2217
|
+
parentKey,
|
|
2218
|
+
index: -1,
|
|
2219
|
+
object: null,
|
|
2220
|
+
oldObject: variable,
|
|
2221
|
+
};
|
|
2222
|
+
if (parentKey) {
|
|
2223
|
+
params.parentKey = parentKey;
|
|
2224
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2225
|
+
const index = (this as any)[parentKey].indexOf(variable);
|
|
2226
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2227
|
+
params.index = index;
|
|
2228
|
+
} else if ((this as any)[parentKey] === variable) {
|
|
2229
|
+
params.index = 0;
|
|
2230
|
+
(this as any)[parentKey] = undefined;
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
return params;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
/**
|
|
2237
|
+
* 删除流程
|
|
2238
|
+
* @param name 流程名称
|
|
2239
|
+
*/
|
|
2240
|
+
removeProcess(name: string): void;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* 删除流程
|
|
2244
|
+
* @param process 已有的流程实例
|
|
2245
|
+
*/
|
|
2246
|
+
removeProcess(process: Process): void;
|
|
2247
|
+
|
|
2248
|
+
removeProcess(options: string | Process) {
|
|
2249
|
+
let process: Process;
|
|
2250
|
+
if (typeof options === 'string') {
|
|
2251
|
+
process = (this.processes as Process[]).find((item) => item.name === options);
|
|
2252
|
+
if (!process) {
|
|
2253
|
+
throw new Error(`找不到流程 ${options}`);
|
|
2254
|
+
}
|
|
2255
|
+
} else {
|
|
2256
|
+
process = options;
|
|
2257
|
+
}
|
|
2258
|
+
return process.delete();
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
__removeProcess(process: Process) {
|
|
2262
|
+
const { parentKey } = process;
|
|
2263
|
+
const params: Params = {
|
|
2264
|
+
parentNode: this,
|
|
2265
|
+
parentKey,
|
|
2266
|
+
index: -1,
|
|
2267
|
+
object: null,
|
|
2268
|
+
oldObject: process,
|
|
2269
|
+
};
|
|
2270
|
+
if (parentKey) {
|
|
2271
|
+
params.parentKey = parentKey;
|
|
2272
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2273
|
+
const index = (this as any)[parentKey].indexOf(process);
|
|
2274
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2275
|
+
params.index = index;
|
|
2276
|
+
} else if ((this as any)[parentKey] === process) {
|
|
2277
|
+
params.index = 0;
|
|
2278
|
+
(this as any)[parentKey] = undefined;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
return params;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
/**
|
|
2285
|
+
* 删除端包
|
|
2286
|
+
* @param name 端包名称
|
|
2287
|
+
*/
|
|
2288
|
+
removeFrontendLibrary(name: string): void;
|
|
2289
|
+
|
|
2290
|
+
/**
|
|
2291
|
+
* 删除端包
|
|
2292
|
+
* @param frontendLibrary 已有的端包实例
|
|
2293
|
+
*/
|
|
2294
|
+
removeFrontendLibrary(frontendLibrary: FrontendLibrary): void;
|
|
2295
|
+
|
|
2296
|
+
removeFrontendLibrary(options: string | FrontendLibrary) {
|
|
2297
|
+
let frontendLibrary: FrontendLibrary;
|
|
2298
|
+
if (typeof options === 'string') {
|
|
2299
|
+
frontendLibrary = (this.frontends as FrontendLibrary[]).find((item) => item.name === options);
|
|
2300
|
+
if (!frontendLibrary) {
|
|
2301
|
+
throw new Error(`找不到端包 ${options}`);
|
|
2302
|
+
}
|
|
2303
|
+
} else {
|
|
2304
|
+
frontendLibrary = options;
|
|
2305
|
+
}
|
|
2306
|
+
return frontendLibrary.delete();
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
__removeFrontendLibrary(frontendLibrary: FrontendLibrary) {
|
|
2310
|
+
const { parentKey } = frontendLibrary;
|
|
2311
|
+
const params: Params = {
|
|
2312
|
+
parentNode: this,
|
|
2313
|
+
parentKey,
|
|
2314
|
+
index: -1,
|
|
2315
|
+
object: null,
|
|
2316
|
+
oldObject: frontendLibrary,
|
|
2317
|
+
};
|
|
2318
|
+
if (parentKey) {
|
|
2319
|
+
params.parentKey = parentKey;
|
|
2320
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2321
|
+
const index = (this as any)[parentKey].indexOf(frontendLibrary);
|
|
2322
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2323
|
+
params.index = index;
|
|
2324
|
+
} else if ((this as any)[parentKey] === frontendLibrary) {
|
|
2325
|
+
params.index = 0;
|
|
2326
|
+
(this as any)[parentKey] = undefined;
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
return params;
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
/**
|
|
2333
|
+
* 删除配置管理
|
|
2334
|
+
* @param name 配置管理名称
|
|
2335
|
+
*/
|
|
2336
|
+
removeConfiguration(name: string): void;
|
|
2337
|
+
|
|
2338
|
+
/**
|
|
2339
|
+
* 删除配置管理
|
|
2340
|
+
* @param configuration 已有的配置管理实例
|
|
2341
|
+
*/
|
|
2342
|
+
removeConfiguration(configuration: Configuration): void;
|
|
2343
|
+
|
|
2344
|
+
removeConfiguration(options: string | Configuration) {
|
|
2345
|
+
let configuration: Configuration;
|
|
2346
|
+
if (typeof options === 'string') {
|
|
2347
|
+
configuration = this.configuration;
|
|
2348
|
+
if (!configuration) {
|
|
2349
|
+
throw new Error(`找不到配置管理 ${options}`);
|
|
2350
|
+
}
|
|
2351
|
+
} else {
|
|
2352
|
+
configuration = options;
|
|
2353
|
+
}
|
|
2354
|
+
return configuration.delete();
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
__removeConfiguration(configuration: Configuration) {
|
|
2358
|
+
const { parentKey } = configuration;
|
|
2359
|
+
const params: Params = {
|
|
2360
|
+
parentNode: this,
|
|
2361
|
+
parentKey,
|
|
2362
|
+
index: -1,
|
|
2363
|
+
object: null,
|
|
2364
|
+
oldObject: configuration,
|
|
2365
|
+
};
|
|
2366
|
+
if (parentKey) {
|
|
2367
|
+
params.parentKey = parentKey;
|
|
2368
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2369
|
+
const index = (this as any)[parentKey].indexOf(configuration);
|
|
2370
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2371
|
+
params.index = index;
|
|
2372
|
+
} else if ((this as any)[parentKey] === configuration) {
|
|
2373
|
+
params.index = 0;
|
|
2374
|
+
(this as any)[parentKey] = undefined;
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
return params;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
/**
|
|
2381
|
+
* 删除触发器启动器
|
|
2382
|
+
* @param name 触发器启动器名称
|
|
2383
|
+
*/
|
|
2384
|
+
removeTriggerLauncher(name: string): void;
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* 删除触发器启动器
|
|
2388
|
+
* @param triggerLauncher 已有的触发器启动器实例
|
|
2389
|
+
*/
|
|
2390
|
+
removeTriggerLauncher(triggerLauncher: TriggerLauncher): void;
|
|
2391
|
+
|
|
2392
|
+
removeTriggerLauncher(options: string | TriggerLauncher) {
|
|
2393
|
+
let triggerLauncher: TriggerLauncher;
|
|
2394
|
+
if (typeof options === 'string') {
|
|
2395
|
+
triggerLauncher = (this.triggerLaunchers as TriggerLauncher[]).find((item) => item.name === options);
|
|
2396
|
+
if (!triggerLauncher) {
|
|
2397
|
+
throw new Error(`找不到触发器启动器 ${options}`);
|
|
2398
|
+
}
|
|
2399
|
+
} else {
|
|
2400
|
+
triggerLauncher = options;
|
|
2401
|
+
}
|
|
2402
|
+
return triggerLauncher.delete();
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
__removeTriggerLauncher(triggerLauncher: TriggerLauncher) {
|
|
2406
|
+
const { parentKey } = triggerLauncher;
|
|
2407
|
+
const params: Params = {
|
|
2408
|
+
parentNode: this,
|
|
2409
|
+
parentKey,
|
|
2410
|
+
index: -1,
|
|
2411
|
+
object: null,
|
|
2412
|
+
oldObject: triggerLauncher,
|
|
2413
|
+
};
|
|
2414
|
+
if (parentKey) {
|
|
2415
|
+
params.parentKey = parentKey;
|
|
2416
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2417
|
+
const index = (this as any)[parentKey].indexOf(triggerLauncher);
|
|
2418
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2419
|
+
params.index = index;
|
|
2420
|
+
} else if ((this as any)[parentKey] === triggerLauncher) {
|
|
2421
|
+
params.index = 0;
|
|
2422
|
+
(this as any)[parentKey] = undefined;
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
return params;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
/**
|
|
2429
|
+
* 删除连接
|
|
2430
|
+
* @param name 连接名称
|
|
2431
|
+
*/
|
|
2432
|
+
removeConnection(name: string): void;
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* 删除连接
|
|
2436
|
+
* @param connection 已有的连接实例
|
|
2437
|
+
*/
|
|
2438
|
+
removeConnection(connection: Connection): void;
|
|
2439
|
+
|
|
2440
|
+
removeConnection(options: string | Connection) {
|
|
2441
|
+
let connection: Connection;
|
|
2442
|
+
if (typeof options === 'string') {
|
|
2443
|
+
connection = (this.connections as Connection[]).find((item) => item.name === options);
|
|
2444
|
+
if (!connection) {
|
|
2445
|
+
throw new Error(`找不到连接 ${options}`);
|
|
2446
|
+
}
|
|
2447
|
+
} else {
|
|
2448
|
+
connection = options;
|
|
2449
|
+
}
|
|
2450
|
+
return connection.delete();
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
__removeConnection(connection: Connection) {
|
|
2454
|
+
const { parentKey } = connection;
|
|
2455
|
+
const params: Params = {
|
|
2456
|
+
parentNode: this,
|
|
2457
|
+
parentKey,
|
|
2458
|
+
index: -1,
|
|
2459
|
+
object: null,
|
|
2460
|
+
oldObject: connection,
|
|
2461
|
+
};
|
|
2462
|
+
if (parentKey) {
|
|
2463
|
+
params.parentKey = parentKey;
|
|
2464
|
+
if (Array.isArray((this as any)[parentKey])) {
|
|
2465
|
+
const index = (this as any)[parentKey].indexOf(connection);
|
|
2466
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
2467
|
+
params.index = index;
|
|
2468
|
+
} else if ((this as any)[parentKey] === connection) {
|
|
2469
|
+
params.index = 0;
|
|
2470
|
+
(this as any)[parentKey] = undefined;
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
return params;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
//= ===============================================================================
|
|
2477
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
2478
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
2479
|
+
//= ===============================================================================
|
|
2480
|
+
/**
|
|
2481
|
+
* 用于区分存量应用新导入模块,存量应用替换数据结构使用
|
|
2482
|
+
*/
|
|
2483
|
+
@property()
|
|
2484
|
+
isAdd: boolean;
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* 是否启动
|
|
2488
|
+
*/
|
|
2489
|
+
@property()
|
|
2490
|
+
enable: boolean;
|
|
2491
|
+
|
|
2492
|
+
/**
|
|
2493
|
+
* 依赖列表
|
|
2494
|
+
*/
|
|
2495
|
+
@property()
|
|
2496
|
+
dependencies: Array<string> = [];
|
|
2497
|
+
|
|
2498
|
+
setIsAdd(isAdd: boolean) {
|
|
2499
|
+
const object = {
|
|
2500
|
+
isAdd,
|
|
2501
|
+
};
|
|
2502
|
+
this.update({
|
|
2503
|
+
...object,
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* 生成宿主语言的文件路径
|
|
2509
|
+
* @param name 一般不用传,用于 rename
|
|
2510
|
+
*/
|
|
2511
|
+
getEmbeddedFilePath(name = this.name) {
|
|
2512
|
+
return `/embedded/${this.app.name}/${this.parentKey}/${this.name}`;
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
/**
|
|
2516
|
+
* 获取命名空间和
|
|
2517
|
+
* 暂时不考虑 Module 嵌套的情况
|
|
2518
|
+
*/
|
|
2519
|
+
getNamespace() {
|
|
2520
|
+
// connector namespace 为 connector + connectorName
|
|
2521
|
+
if (this.type === 'connector') {
|
|
2522
|
+
return `connector.${this.name}`;
|
|
2523
|
+
}
|
|
2524
|
+
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}`;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
getTsNamespace() {
|
|
2528
|
+
if (this.type === 'connector') {
|
|
2529
|
+
return 'connector';
|
|
2530
|
+
}
|
|
2531
|
+
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}`;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
getTsNamespaceAndName() {
|
|
2535
|
+
if (this.type === 'connector') {
|
|
2536
|
+
return 'connector';
|
|
2537
|
+
}
|
|
2538
|
+
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}.${this.name}`;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
findEnumByName(name: string) {
|
|
2542
|
+
return this.enums.find((enumItem) => enumItem.name === name);
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
/**
|
|
2546
|
+
* 获取属性节点是否存在
|
|
2547
|
+
*/
|
|
2548
|
+
|
|
2549
|
+
findProperty(name: string, propertyType: PropertyType): any {
|
|
2550
|
+
return ((this as any)[propertyType] as Array<any>).find((item) => item.name === name);
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
delete() {
|
|
2554
|
+
this.parentNode?.emit('collect:start', {
|
|
2555
|
+
actionMsg: '移除依赖库',
|
|
2556
|
+
});
|
|
2557
|
+
super.delete();
|
|
2558
|
+
this._delete();
|
|
2559
|
+
// if (this.dependencies) {
|
|
2560
|
+
// // 删除依赖链中的依赖
|
|
2561
|
+
// this.dependencies.forEach((tag) => {
|
|
2562
|
+
// const [name, version] = tag.split('-');
|
|
2563
|
+
// const existNode = this.app.dependencies.find((m) => m.name === name && m.version === version);
|
|
2564
|
+
// existNode?.delete();
|
|
2565
|
+
// });
|
|
2566
|
+
// }
|
|
2567
|
+
// 处理同名依赖 重新生成文件
|
|
2568
|
+
// if (this.enable) {
|
|
2569
|
+
// 删[数据源]
|
|
2570
|
+
const dataSourceGroup = (this.parentNode as any)?.configuration?.getGroup('dataSource');
|
|
2571
|
+
if (this.dataSources && dataSourceGroup) {
|
|
2572
|
+
this.dataSources.forEach((datasource) => {
|
|
2573
|
+
this.parentNode?.emit('clear:datasourceError', datasource as any);
|
|
2574
|
+
try {
|
|
2575
|
+
dataSourceGroup.removeConfigProperty(datasource.name);
|
|
2576
|
+
} catch (e) {}
|
|
2577
|
+
});
|
|
2578
|
+
}
|
|
2579
|
+
// // 已启用的依赖库被删除时,将后续被禁用的同名依赖库 切换为启用
|
|
2580
|
+
// const index = this.app.dependencies.findIndex((m) => m.enable === false && m.name === this.name);
|
|
2581
|
+
// if (index >= 0) {
|
|
2582
|
+
// const nextMainModule = this.app.dependencies[index];
|
|
2583
|
+
// // 更新[禁用的依赖]enable:true
|
|
2584
|
+
// nextMainModule.update({ enable: true });
|
|
2585
|
+
// nextMainModule.softDelete({ index });
|
|
2586
|
+
// }
|
|
2587
|
+
// }
|
|
2588
|
+
this.parentNode?.emit('collect:end');
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
// 删除再添加 触发文件生成
|
|
2592
|
+
softDelete(options: { index: number }) {
|
|
2593
|
+
// 删[禁用的依赖]
|
|
2594
|
+
super.delete();
|
|
2595
|
+
// 创建[禁用的依赖]
|
|
2596
|
+
this.app.insertModuleInDependenciesAt(this, options.index);
|
|
2597
|
+
// 创建[禁用的依赖]的数据源
|
|
2598
|
+
const dataSourceGroup = (this.parentNode as any)?.configuration?.getGroup('dataSource');
|
|
2599
|
+
if (this.dataSources && dataSourceGroup) {
|
|
2600
|
+
this.dataSources.forEach((datasource) => {
|
|
2601
|
+
const body: ConfigProperty = ConfigProperty.from({
|
|
2602
|
+
name: datasource.name,
|
|
2603
|
+
description: '',
|
|
2604
|
+
isPrivate: false,
|
|
2605
|
+
values: [
|
|
2606
|
+
{ env: 'dev', value: '', concept: 'ConfigPropertyValue' },
|
|
2607
|
+
{ env: 'online', value: '', concept: 'ConfigPropertyValue' },
|
|
2608
|
+
],
|
|
2196
2609
|
});
|
|
2610
|
+
dataSourceGroup.addConfigProperty(body);
|
|
2611
|
+
});
|
|
2197
2612
|
}
|
|
2198
|
-
|
|
2199
|
-
* 生成宿主语言的文件路径
|
|
2200
|
-
* @param name 一般不用传,用于 rename
|
|
2201
|
-
*/
|
|
2202
|
-
getEmbeddedFilePath(name = this.name) {
|
|
2203
|
-
return `/embedded/${this.app.name}/${this.parentKey}/${this.name}`;
|
|
2204
|
-
}
|
|
2205
|
-
/**
|
|
2206
|
-
* 获取命名空间和
|
|
2207
|
-
* 暂时不考虑 Module 嵌套的情况
|
|
2208
|
-
*/
|
|
2209
|
-
getNamespace() {
|
|
2210
|
-
if (this.type === 'connector') {
|
|
2211
|
-
return 'connector';
|
|
2212
|
-
}
|
|
2213
|
-
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}`;
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
getTsNamespace() {
|
|
2217
|
-
if (this.type === 'connector') {
|
|
2218
|
-
return 'connector';
|
|
2219
|
-
}
|
|
2220
|
-
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}`;
|
|
2221
|
-
}
|
|
2222
|
-
getTsNamespaceAndName() {
|
|
2223
|
-
if (this.type === 'connector') {
|
|
2224
|
-
return 'connector';
|
|
2225
|
-
}
|
|
2226
|
-
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}.${this.name}`;
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
findEnumByName(name: string) {
|
|
2230
|
-
return this.enums.find((enumItem) => enumItem.name === name);
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
/**
|
|
2234
|
-
* 获取属性节点是否存在
|
|
2235
|
-
*/
|
|
2236
|
-
|
|
2237
|
-
findProperty(name: string, propertyType: PropertyType): any {
|
|
2238
|
-
return ((this as any)[propertyType] as Array<any>).find((item) => item.name === name);
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
delete() {
|
|
2242
|
-
this.parentNode?.emit('collect:start', {
|
|
2243
|
-
actionMsg: '移除依赖库',
|
|
2244
|
-
});
|
|
2245
|
-
super.delete();
|
|
2246
|
-
this._delete();
|
|
2247
|
-
// if (this.dependencies) {
|
|
2248
|
-
// // 删除依赖链中的依赖
|
|
2249
|
-
// this.dependencies.forEach((tag) => {
|
|
2250
|
-
// const [name, version] = tag.split('-');
|
|
2251
|
-
// const existNode = this.app.dependencies.find((m) => m.name === name && m.version === version);
|
|
2252
|
-
// existNode?.delete();
|
|
2253
|
-
// });
|
|
2254
|
-
// }
|
|
2255
|
-
// 处理同名依赖 重新生成文件
|
|
2256
|
-
// if (this.enable) {
|
|
2257
|
-
// 删[数据源]
|
|
2258
|
-
const dataSourceGroup = (this.parentNode as any)?.configuration?.getGroup('dataSource');
|
|
2259
|
-
if (this.dataSources && dataSourceGroup) {
|
|
2260
|
-
this.dataSources.forEach((datasource) => {
|
|
2261
|
-
this.parentNode?.emit('clear:datasourceError', datasource as any);
|
|
2262
|
-
try {
|
|
2263
|
-
dataSourceGroup.removeConfigProperty(datasource.name);
|
|
2264
|
-
} catch (e) {}
|
|
2265
|
-
});
|
|
2266
|
-
}
|
|
2267
|
-
// // 已启用的依赖库被删除时,将后续被禁用的同名依赖库 切换为启用
|
|
2268
|
-
// const index = this.app.dependencies.findIndex((m) => m.enable === false && m.name === this.name);
|
|
2269
|
-
// if (index >= 0) {
|
|
2270
|
-
// const nextMainModule = this.app.dependencies[index];
|
|
2271
|
-
// // 更新[禁用的依赖]enable:true
|
|
2272
|
-
// nextMainModule.update({ enable: true });
|
|
2273
|
-
// nextMainModule.softDelete({ index });
|
|
2274
|
-
// }
|
|
2275
|
-
// }
|
|
2276
|
-
this.parentNode?.emit('collect:end');
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
// 删除再添加 触发文件生成
|
|
2280
|
-
softDelete(options: { index: number }) {
|
|
2281
|
-
// 删[禁用的依赖]
|
|
2282
|
-
super.delete();
|
|
2283
|
-
// 创建[禁用的依赖]
|
|
2284
|
-
this.app.insertModuleInDependenciesAt(this, options.index);
|
|
2285
|
-
// 创建[禁用的依赖]的数据源
|
|
2286
|
-
const dataSourceGroup = (this.parentNode as any)?.configuration?.getGroup('dataSource');
|
|
2287
|
-
if (this.dataSources && dataSourceGroup) {
|
|
2288
|
-
this.dataSources.forEach((datasource) => {
|
|
2289
|
-
const body: ConfigProperty = ConfigProperty.from({
|
|
2290
|
-
name: datasource.name,
|
|
2291
|
-
description: '',
|
|
2292
|
-
isPrivate: false,
|
|
2293
|
-
values: [
|
|
2294
|
-
{ env: 'dev', value: '', concept: 'ConfigPropertyValue' },
|
|
2295
|
-
{ env: 'online', value: '', concept: 'ConfigPropertyValue' },
|
|
2296
|
-
],
|
|
2297
|
-
});
|
|
2298
|
-
dataSourceGroup.addConfigProperty(body);
|
|
2299
|
-
});
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2613
|
+
}
|
|
2302
2614
|
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2615
|
+
//= ===============================================================================
|
|
2616
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
2617
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
2618
|
+
//= ===============================================================================
|
|
2307
2619
|
}
|
|
2308
2620
|
|
|
2309
2621
|
classMap.Module = Module;
|
|
2310
2622
|
export default Module;
|
|
2311
|
-
|
|
2623
|
+
//= ===============================================================================
|
|
2312
2624
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
2313
2625
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
2314
|
-
|
|
2626
|
+
//= ===============================================================================
|