@lcap/nasl 3.7.1-beta.1 → 3.7.2-alpha.1
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/common/BaseNode.js +3 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +1 -1
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.js +9 -27
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +1 -1
- package/out/concepts/Argument__.js +2 -6
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/AssigneeV2__.js +0 -2
- package/out/concepts/AssigneeV2__.js.map +1 -1
- package/out/concepts/Assignee__.js +0 -2
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.js +0 -2
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.js +2 -4
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.d.ts +1 -1
- package/out/concepts/Attribute__.js +7 -23
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.js +1 -3
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +7 -7
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +1 -3
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +2 -2
- package/out/concepts/BackendVariable__.js +3 -9
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.js +1 -3
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +1 -3
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +4 -4
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +6 -58
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +6 -6
- package/out/concepts/BindDirective__.js +7 -21
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +3 -3
- package/out/concepts/BindEvent__.js +3 -13
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.js +1 -3
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.js +1 -3
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/BusinessComponent__.js +11 -19
- package/out/concepts/BusinessComponent__.js.map +1 -1
- package/out/concepts/BusinessLogic__.js +8 -10
- package/out/concepts/BusinessLogic__.js.map +1 -1
- package/out/concepts/CallConnector__.js +2 -6
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallEvent__.js +2 -6
- package/out/concepts/CallEvent__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +1 -1
- package/out/concepts/CallFunction__.js +4 -14
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +1 -1
- package/out/concepts/CallInterface__.js +3 -9
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +4 -4
- package/out/concepts/CallLogic__.js +10 -25
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +2 -2
- package/out/concepts/CallQueryComponent__.js +2 -13
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +1 -3
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +5 -15
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +1 -3
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.d.ts +0 -1
- package/out/concepts/ConfigPropertyValue__.js +2 -13
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js +3 -9
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.js +3 -9
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ConnectorLogic__.js +1 -3
- package/out/concepts/ConnectorLogic__.js.map +1 -1
- package/out/concepts/ConnectorTriggerLauncher__.js +6 -9
- package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.js +2 -6
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.js +3 -9
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.js +2 -6
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/CountersignPolicyV2__.js +1 -3
- package/out/concepts/CountersignPolicyV2__.js.map +1 -1
- package/out/concepts/CountersignPolicy__.js +1 -3
- package/out/concepts/CountersignPolicy__.js.map +1 -1
- package/out/concepts/DataSource__.js +6 -12
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.js +6 -6
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/Destination__.js +3 -9
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +2 -2
- package/out/concepts/EntityIndex__.js +4 -13
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +10 -12
- package/out/concepts/EntityProperty__.js +27 -44
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +2 -2
- package/out/concepts/Entity__.js +11 -18
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -1
- package/out/concepts/EnumItem__.js +6 -8
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +7 -10
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/EventDeclaration__.js +4 -16
- package/out/concepts/EventDeclaration__.js.map +1 -1
- package/out/concepts/Event__.js +5 -15
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +1 -1
- package/out/concepts/ExternalDestination__.js +1 -3
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/FieldPermissionV2__.js +2 -6
- package/out/concepts/FieldPermissionV2__.js.map +1 -1
- package/out/concepts/FlowConditionV2__.js +1 -3
- package/out/concepts/FlowConditionV2__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +1 -1
- package/out/concepts/ForEachStatement__.js +1 -1
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +2 -6
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendType__.d.ts +0 -4
- package/out/concepts/FrontendType__.js +2 -15
- package/out/concepts/FrontendType__.js.map +1 -1
- package/out/concepts/FrontendVariable__.js +1 -3
- package/out/concepts/FrontendVariable__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +0 -2
- package/out/concepts/Frontend__.js +8 -31
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.js +2 -6
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/HistoryProcessV2__.js +4 -12
- package/out/concepts/HistoryProcessV2__.js.map +1 -1
- package/out/concepts/I18nInfo__.d.ts +1 -1
- package/out/concepts/I18nInfo__.js +5 -9
- package/out/concepts/I18nInfo__.js.map +1 -1
- package/out/concepts/IconSetter__.js +1 -7
- package/out/concepts/IconSetter__.js.map +1 -1
- package/out/concepts/Identifier__.js +7 -7
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +2 -2
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/ImportedInterface__.d.ts +1 -1
- package/out/concepts/ImportedInterface__.js +1 -3
- package/out/concepts/ImportedInterface__.js.map +1 -1
- package/out/concepts/InputSetter__.js +1 -7
- package/out/concepts/InputSetter__.js.map +1 -1
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +4 -12
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js +12 -19
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +1 -3
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.js +3 -9
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicDeclaration__.js +3 -13
- package/out/concepts/LogicDeclaration__.js.map +1 -1
- package/out/concepts/LogicItem__.js +5 -31
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +6 -6
- package/out/concepts/Logic__.js +27 -36
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +11 -11
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.js +1 -3
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +6 -2
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +1 -1
- package/out/concepts/MetadataType__.js +4 -12
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MicroApp__.js +7 -21
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.d.ts +2 -2
- package/out/concepts/Module__.js +8 -24
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.js +4 -12
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.js +6 -10
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +1 -1
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +1 -1
- package/out/concepts/NewMap__.js +5 -2
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/NumberInputSetter__.js +5 -35
- package/out/concepts/NumberInputSetter__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +1 -3
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OperatePermissionV2__.js +4 -12
- package/out/concepts/OperatePermissionV2__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +1 -1
- package/out/concepts/OqlQueryComponent__.js +2 -6
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.js +12 -26
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/ParamWithGroup__.js +2 -6
- package/out/concepts/ParamWithGroup__.js.map +1 -1
- package/out/concepts/Param__.d.ts +1 -1
- package/out/concepts/Param__.js +2 -14
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +2 -6
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessBindV2__.js +2 -6
- package/out/concepts/ProcessBindV2__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +4 -12
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElementV2__.js +8 -24
- package/out/concepts/ProcessElementV2__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +10 -22
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +1 -3
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.js +0 -1
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/ProcessV2__.js +6 -18
- package/out/concepts/ProcessV2__.js.map +1 -1
- package/out/concepts/Process__.js +3 -9
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/PropDeclaration__.d.ts +4 -0
- package/out/concepts/PropDeclaration__.js +19 -84
- package/out/concepts/PropDeclaration__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +2 -6
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +4 -12
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +5 -11
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +6 -14
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +12 -4
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js +6 -2
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +5 -7
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +4 -12
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.d.ts +1 -1
- package/out/concepts/Return__.js +2 -10
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +4 -4
- package/out/concepts/Role__.js +6 -14
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.js +1 -3
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SetterOption__.js +6 -34
- package/out/concepts/SetterOption__.js.map +1 -1
- package/out/concepts/SlotDeclaration__.js +5 -23
- package/out/concepts/SlotDeclaration__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.js +4 -12
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StaticString__.d.ts +1 -1
- package/out/concepts/StaticString__.js +6 -10
- package/out/concepts/StaticString__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +2 -6
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +5 -5
- package/out/concepts/StructureProperty__.js +9 -14
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +0 -4
- package/out/concepts/Structure__.js +17 -20
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/ThemeVariable__.js +1 -3
- package/out/concepts/ThemeVariable__.js.map +1 -1
- package/out/concepts/Theme__.js +2 -6
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.d.ts +2 -2
- package/out/concepts/Transactional__.js +6 -12
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +1 -3
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.js +3 -9
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -2
- package/out/concepts/TypeAnnotation__.js +24 -31
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js +1 -3
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +1 -3
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.js +1 -3
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +2 -6
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +1 -6
- package/out/concepts/ValidationRule__.js +4 -23
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +1 -1
- package/out/concepts/Variable__.js +2 -10
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlockWithImage__.js +2 -6
- package/out/concepts/ViewBlockWithImage__.js.map +1 -1
- package/out/concepts/ViewBlock__.js +3 -13
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponentDeclaration__.d.ts +1 -1
- package/out/concepts/ViewComponentDeclaration__.js +8 -36
- package/out/concepts/ViewComponentDeclaration__.js.map +1 -1
- package/out/concepts/ViewElement__.js +92 -83
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.js +22 -40
- package/out/concepts/View__.js.map +1 -1
- package/out/generator/genBundleFiles.js +1 -0
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/release-body/utils.js +2 -1
- package/out/generator/release-body/utils.js.map +1 -1
- package/out/natural/genNaturalTS.d.ts +44 -1
- package/out/natural/genNaturalTS.js +61 -5
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/getContext/index.js +3 -0
- package/out/natural/getContext/index.js.map +1 -1
- package/out/server/naslServer.js +24 -10
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +47 -0
- package/out/server/translator.js.map +1 -1
- package/out/translator/types.d.ts +4 -0
- package/out/translator/utils.d.ts +1 -0
- package/out/translator/utils.js +6 -1
- package/out/translator/utils.js.map +1 -1
- package/out/utils/env.d.ts +2 -0
- package/out/utils/env.js +3 -1
- package/out/utils/env.js.map +1 -1
- package/package.json +1 -1
- package/src/common/BaseNode.ts +3 -1
- package/src/concepts/AnonymousFunction__.ts +1 -1
- package/src/concepts/App__.ts +9 -27
- package/src/concepts/Argument__.ts +3 -7
- package/src/concepts/AssigneeV2__.ts +0 -2
- package/src/concepts/Assignee__.ts +0 -2
- package/src/concepts/AssignmentLine__.ts +0 -2
- package/src/concepts/Assignment__.ts +2 -4
- package/src/concepts/Attribute__.ts +9 -21
- package/src/concepts/AuthInterface__.ts +1 -3
- package/src/concepts/AuthLogicForCallInterface__.ts +4 -5
- package/src/concepts/AuthLogic__.ts +1 -3
- package/src/concepts/BackendVariable__.ts +5 -11
- package/src/concepts/Backend__.ts +1 -3
- package/src/concepts/BatchAssignment__.ts +4 -4
- package/src/concepts/BinaryExpression__.ts +9 -7
- package/src/concepts/BindAttribute__.ts +26 -38
- package/src/concepts/BindDirective__.ts +13 -27
- package/src/concepts/BindEvent__.ts +7 -13
- package/src/concepts/BindStyle__.ts +1 -3
- package/src/concepts/BooleanLiteral__.ts +1 -3
- package/src/concepts/BusinessComponent__.ts +16 -20
- package/src/concepts/BusinessLogic__.ts +7 -10
- package/src/concepts/CallConnector__.ts +3 -7
- package/src/concepts/CallEvent__.ts +2 -6
- package/src/concepts/CallFunction__.ts +7 -14
- package/src/concepts/CallInterface__.ts +8 -15
- package/src/concepts/CallLogic__.ts +39 -46
- package/src/concepts/CallQueryComponent__.ts +9 -22
- package/src/concepts/Comment__.ts +1 -3
- package/src/concepts/CompletionProperty__.ts +5 -15
- package/src/concepts/ConfigGroup__.ts +2 -7
- package/src/concepts/ConfigPropertyValue__.ts +3 -15
- package/src/concepts/ConfigProperty__.ts +3 -9
- package/src/concepts/Configuration__.ts +1 -4
- package/src/concepts/Connection__.ts +3 -9
- package/src/concepts/ConnectorLogic__.ts +2 -4
- package/src/concepts/ConnectorTriggerLauncher__.ts +13 -11
- package/src/concepts/ConnectorTrigger__.ts +12 -12
- package/src/concepts/Connector__.ts +3 -9
- package/src/concepts/Constant__.ts +2 -6
- package/src/concepts/CountersignPolicyV2__.ts +1 -3
- package/src/concepts/CountersignPolicy__.ts +1 -3
- package/src/concepts/DataSource__.ts +16 -18
- package/src/concepts/DatabaseTypeAnnotation__.ts +6 -11
- package/src/concepts/Destination__.ts +3 -9
- package/src/concepts/EntityIndex__.ts +6 -15
- package/src/concepts/EntityProperty__.ts +40 -56
- package/src/concepts/Entity__.ts +13 -18
- package/src/concepts/EnumItem__.ts +15 -10
- package/src/concepts/Enum__.ts +9 -10
- package/src/concepts/EventDeclaration__.ts +5 -13
- package/src/concepts/Event__.ts +5 -15
- package/src/concepts/ExternalDestination__.ts +2 -4
- package/src/concepts/FieldPermissionV2__.ts +2 -6
- package/src/concepts/FlowConditionV2__.ts +1 -3
- package/src/concepts/ForEachStatement__.ts +2 -2
- package/src/concepts/FrontendLibrary__.ts +2 -6
- package/src/concepts/FrontendType__.ts +2 -14
- package/src/concepts/FrontendVariable__.ts +1 -3
- package/src/concepts/Frontend__.ts +11 -35
- package/src/concepts/Function__.ts +2 -6
- package/src/concepts/HistoryProcessV2__.ts +4 -12
- package/src/concepts/I18nInfo__.ts +8 -15
- package/src/concepts/IconSetter__.ts +2 -4
- package/src/concepts/Identifier__.ts +9 -10
- package/src/concepts/IfStatement__.ts +2 -2
- package/src/concepts/ImportedInterface__.ts +2 -4
- package/src/concepts/InputSetter__.ts +2 -4
- package/src/concepts/Integration__.ts +0 -1
- package/src/concepts/InterfaceParam__.ts +4 -12
- package/src/concepts/InterfaceTriggerEvent__.ts +1 -1
- package/src/concepts/Interface__.ts +16 -22
- package/src/concepts/JSBlock__.ts +1 -3
- package/src/concepts/JavaLogic__.ts +3 -9
- package/src/concepts/LogicDeclaration__.ts +4 -10
- package/src/concepts/LogicItem__.ts +9 -19
- package/src/concepts/Logic__.ts +46 -47
- package/src/concepts/MatchCase__.ts +12 -12
- package/src/concepts/Match__.ts +11 -8
- package/src/concepts/MemberExpression__.ts +8 -2
- package/src/concepts/MetadataType__.ts +9 -16
- package/src/concepts/MicroApp__.ts +7 -21
- package/src/concepts/Module__.ts +10 -26
- package/src/concepts/Namespace__.ts +4 -12
- package/src/concepts/NewComposite__.ts +18 -16
- package/src/concepts/NewList__.ts +1 -1
- package/src/concepts/NewMap__.ts +15 -6
- package/src/concepts/NumberInputSetter__.ts +10 -20
- package/src/concepts/NumericLiteral__.ts +1 -3
- package/src/concepts/OperatePermissionV2__.ts +4 -12
- package/src/concepts/OqlQueryComponent__.ts +3 -7
- package/src/concepts/OverriddenLogic__.ts +15 -25
- package/src/concepts/ParamWithGroup__.ts +2 -6
- package/src/concepts/Param__.ts +5 -9
- package/src/concepts/Point__.ts +2 -6
- package/src/concepts/ProcessBindV2__.ts +2 -6
- package/src/concepts/ProcessComponent__.ts +4 -12
- package/src/concepts/ProcessElementV2__.ts +11 -27
- package/src/concepts/ProcessElement__.ts +13 -23
- package/src/concepts/ProcessOutcome__.ts +1 -3
- package/src/concepts/ProcessOutcomes__.ts +0 -1
- package/src/concepts/ProcessV2__.ts +11 -19
- package/src/concepts/Process__.ts +3 -9
- package/src/concepts/PropDeclaration__.ts +31 -57
- package/src/concepts/QueryAggregateExpression__.ts +3 -8
- package/src/concepts/QueryFieldExpression__.ts +23 -30
- package/src/concepts/QueryFromExpression__.ts +5 -11
- package/src/concepts/QueryJoinExpression__.ts +7 -16
- package/src/concepts/QueryLimitExpression__.ts +16 -4
- package/src/concepts/QueryOrderByExpression__.ts +22 -13
- package/src/concepts/QuerySelectExpression__.ts +8 -13
- package/src/concepts/Rect__.ts +4 -12
- package/src/concepts/Return__.ts +4 -8
- package/src/concepts/Role__.ts +8 -16
- package/src/concepts/SelectMembers__.ts +1 -3
- package/src/concepts/SetterOption__.ts +10 -22
- package/src/concepts/SlotDeclaration__.ts +7 -17
- package/src/concepts/SqlQueryComponent__.ts +5 -13
- package/src/concepts/StaticString__.ts +9 -16
- package/src/concepts/StringLiteral__.ts +5 -11
- package/src/concepts/StructureProperty__.ts +16 -19
- package/src/concepts/Structure__.ts +20 -20
- package/src/concepts/SwitchCase__.ts +1 -1
- package/src/concepts/SwitchStatement__.ts +1 -1
- package/src/concepts/ThemeVariable__.ts +1 -3
- package/src/concepts/Theme__.ts +2 -6
- package/src/concepts/Transactional__.ts +10 -19
- package/src/concepts/TriggerEvent__.ts +1 -3
- package/src/concepts/TriggerLauncher__.ts +11 -15
- package/src/concepts/TypeAnnotation__.ts +50 -41
- package/src/concepts/TypeParam__.ts +1 -3
- package/src/concepts/UnaryExpression__.ts +1 -3
- package/src/concepts/Unparsed__.ts +1 -3
- package/src/concepts/UseComponent__.ts +2 -6
- package/src/concepts/ValidationRule__.ts +6 -17
- package/src/concepts/Variable__.ts +4 -8
- package/src/concepts/ViewBlockWithImage__.ts +2 -6
- package/src/concepts/ViewBlock__.ts +4 -10
- package/src/concepts/ViewComponentDeclaration__.ts +11 -27
- package/src/concepts/ViewElement__.ts +232 -157
- package/src/concepts/View__.ts +40 -54
- package/src/generator/genBundleFiles.ts +2 -1
- package/src/generator/release-body/utils.ts +3 -2
- package/src/natural/genNaturalTS.ts +91 -12
- package/src/natural/getContext/index.ts +3 -0
- package/src/server/naslServer.ts +24 -10
- package/src/server/translator.ts +49 -0
- package/src/translator/types.ts +4 -0
- package/src/translator/utils.ts +6 -0
- package/src/utils/env.ts +2 -0
- package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -2
|
@@ -49,33 +49,25 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
49
49
|
/**
|
|
50
50
|
* 实体的命名空间
|
|
51
51
|
*/
|
|
52
|
-
@property(
|
|
53
|
-
objectRef: '',
|
|
54
|
-
})
|
|
52
|
+
@property()
|
|
55
53
|
entityNamespace: string;
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
56
|
* 实体名称
|
|
59
57
|
*/
|
|
60
|
-
@property(
|
|
61
|
-
objectRef: '',
|
|
62
|
-
})
|
|
58
|
+
@property()
|
|
63
59
|
entityName: string;
|
|
64
60
|
|
|
65
61
|
/**
|
|
66
62
|
* 别名
|
|
67
63
|
*/
|
|
68
|
-
@property(
|
|
69
|
-
objectRef: '',
|
|
70
|
-
})
|
|
64
|
+
@property()
|
|
71
65
|
asName: string;
|
|
72
66
|
|
|
73
67
|
/**
|
|
74
68
|
* joinType
|
|
75
69
|
*/
|
|
76
|
-
@property(
|
|
77
|
-
objectRef: '',
|
|
78
|
-
})
|
|
70
|
+
@property()
|
|
79
71
|
joinType: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL';
|
|
80
72
|
|
|
81
73
|
/**
|
|
@@ -474,7 +466,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
474
466
|
|
|
475
467
|
@withSourceMap()
|
|
476
468
|
toNaturalTS(state = createCompilerState()): string {
|
|
477
|
-
const simpleEntityKey = this.
|
|
469
|
+
const simpleEntityKey = this.entityKey + 'Entity';
|
|
478
470
|
let code = `.${this.joinType}_JOIN(${simpleEntityKey}, ${this.asName || this.entityName} => ON(() => `;
|
|
479
471
|
this.onExpressions.forEach((on) => {
|
|
480
472
|
code += on.toNaturalTS(shiftState(state, code, { inline: true }));
|
|
@@ -483,7 +475,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
483
475
|
|
|
484
476
|
if (this.joinParts.length) {
|
|
485
477
|
this.joinParts.forEach((joinPart) => {
|
|
486
|
-
code +=
|
|
478
|
+
code += `\n${indent(state.tabSize)}`;
|
|
487
479
|
code += joinPart.toNaturalTS(state);
|
|
488
480
|
});
|
|
489
481
|
}
|
|
@@ -494,8 +486,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
494
486
|
@withSourceMap()
|
|
495
487
|
toNaturalSQL(state = createCompilerState()): string {
|
|
496
488
|
let code = `${this.joinType} JOIN ${this.entityKey}`;
|
|
497
|
-
if (this.asName)
|
|
498
|
-
code += ` AS ${this.asName}`;
|
|
489
|
+
if (this.asName) code += ` AS ${this.asName}`;
|
|
499
490
|
code += ' ON ';
|
|
500
491
|
this.onExpressions.forEach((on) => {
|
|
501
492
|
code += on.toNaturalSQL(shiftState(state, code, { inline: true }));
|
|
@@ -126,15 +126,27 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
126
126
|
|
|
127
127
|
@withSourceMap()
|
|
128
128
|
toNaturalSQL(state = createCompilerState()): string {
|
|
129
|
-
let pageElement =
|
|
130
|
-
|
|
129
|
+
let pageElement =
|
|
130
|
+
this.pageElement.concept === 'Identifier'
|
|
131
|
+
? `\${${this.pageElement.toNaturalSQL(state)}}`
|
|
132
|
+
: this.pageElement.toNaturalSQL(state);
|
|
133
|
+
let pageSizeElement =
|
|
134
|
+
this.pageSizeElement.concept === 'Identifier'
|
|
135
|
+
? `\${${this.pageSizeElement.toNaturalSQL(state)}}`
|
|
136
|
+
: this.pageSizeElement.toNaturalSQL(state);
|
|
131
137
|
return `${pageElement}, ${pageSizeElement}`;
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
@withSourceMap()
|
|
135
141
|
toTextualNASL(state = createCompilerState()): string {
|
|
136
|
-
let pageElement =
|
|
137
|
-
|
|
142
|
+
let pageElement =
|
|
143
|
+
this.pageElement.concept === 'Identifier'
|
|
144
|
+
? `\${${this.pageElement.toTextualNASL(state)}}`
|
|
145
|
+
: this.pageElement.toTextualNASL(state);
|
|
146
|
+
let pageSizeElement =
|
|
147
|
+
this.pageSizeElement.concept === 'Identifier'
|
|
148
|
+
? `\${${this.pageSizeElement.toTextualNASL(state)}}`
|
|
149
|
+
: this.pageSizeElement.toTextualNASL(state);
|
|
138
150
|
return `page ${pageElement} size ${pageSizeElement}`;
|
|
139
151
|
}
|
|
140
152
|
|
|
@@ -137,30 +137,39 @@ export class QueryOrderByExpression extends LogicItem {
|
|
|
137
137
|
|
|
138
138
|
@withSourceMap()
|
|
139
139
|
toNaturalTS(state = createCompilerState()): string {
|
|
140
|
-
let orderElement =
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
let orderElement =
|
|
141
|
+
this.orderElement.concept === 'Identifier' && (this.orderElement as Identifier).namespace === 'inner'
|
|
142
|
+
? (this.orderElement as Identifier).name
|
|
143
|
+
: this.orderElement.toNaturalTS(state);
|
|
143
144
|
let order = this.order.toNaturalTS(state);
|
|
144
145
|
return `[${orderElement || '__IDENTIFIER__'}, ${order || '__IDENTIFIER__'}]`;
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
@withSourceMap()
|
|
148
149
|
toNaturalSQL(state = createCompilerState()): string {
|
|
149
|
-
let orderElement =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
let orderElement =
|
|
151
|
+
this.orderElement.concept === 'QueryOrderByExpression'
|
|
152
|
+
? this.orderElement.toTextualNASL(state)
|
|
153
|
+
: this.orderElement.concept === 'Identifier' && (this.orderElement as Identifier).namespace === 'inner'
|
|
154
|
+
? (this.orderElement as Identifier).name
|
|
155
|
+
: `\${${this.orderElement.toTextualNASL(state)}}`;
|
|
156
|
+
let order =
|
|
157
|
+
this.order.concept === 'StringLiteral'
|
|
158
|
+
? (this.order as StringLiteral).value
|
|
159
|
+
: `\${${this.order.toTextualNASL(state)}}`;
|
|
155
160
|
return `${orderElement || '__IDENTIFIER__'} ${order || '__IDENTIFIER__'}`;
|
|
156
161
|
}
|
|
157
162
|
|
|
158
163
|
@withSourceMap()
|
|
159
164
|
toTextualNASL(state = createCompilerState()): string {
|
|
160
|
-
let orderElement =
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
165
|
+
let orderElement =
|
|
166
|
+
this.orderElement.concept === 'Identifier' && (this.orderElement as Identifier).namespace === 'inner'
|
|
167
|
+
? (this.orderElement as Identifier).name
|
|
168
|
+
: this.orderElement.toNaturalSQL(state);
|
|
169
|
+
let order =
|
|
170
|
+
this.order.concept === 'StringLiteral'
|
|
171
|
+
? (this.order as StringLiteral).value.toLowerCase()
|
|
172
|
+
: `\${${this.order.toTextualNASL(state)}}`;
|
|
164
173
|
return `${orderElement || '__IDENTIFIER__'} ${order || '__IDENTIFIER__'}`;
|
|
165
174
|
}
|
|
166
175
|
|
|
@@ -48,17 +48,13 @@ export class QuerySelectExpression extends LogicItem {
|
|
|
48
48
|
/**
|
|
49
49
|
* distinct
|
|
50
50
|
*/
|
|
51
|
-
@property(
|
|
52
|
-
objectRef: '',
|
|
53
|
-
})
|
|
51
|
+
@property()
|
|
54
52
|
distinct: boolean = false;
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* star
|
|
58
56
|
*/
|
|
59
|
-
@property(
|
|
60
|
-
objectRef: '',
|
|
61
|
-
})
|
|
57
|
+
@property()
|
|
62
58
|
star: boolean = true;
|
|
63
59
|
|
|
64
60
|
/**
|
|
@@ -511,7 +507,9 @@ export class QuerySelectExpression extends LogicItem {
|
|
|
511
507
|
|
|
512
508
|
@withSourceMap()
|
|
513
509
|
toNaturalTS(state = createCompilerState()): string {
|
|
514
|
-
let code = this.distinct
|
|
510
|
+
let code = this.distinct
|
|
511
|
+
? `\n${indent(state.tabSize)}.SELECT_DISTINCT(() => ({\n`
|
|
512
|
+
: `\n${indent(state.tabSize)}.SELECT(() => ({\n`;
|
|
515
513
|
|
|
516
514
|
this.selectElements.forEach((element) => {
|
|
517
515
|
code += indent(state.tabSize + 1);
|
|
@@ -534,20 +532,17 @@ export class QuerySelectExpression extends LogicItem {
|
|
|
534
532
|
@withSourceMap()
|
|
535
533
|
toNaturalSQL(state = createCompilerState()): string {
|
|
536
534
|
let code = 'SELECT ';
|
|
537
|
-
if (this.distinct)
|
|
538
|
-
code += 'DISTINCT ';
|
|
535
|
+
if (this.distinct) code += 'DISTINCT ';
|
|
539
536
|
|
|
540
537
|
this.selectElements.forEach((element) => {
|
|
541
538
|
code += element.toNaturalSQL(state);
|
|
542
|
-
if (element !== this.selectElements[this.selectElements.length - 1])
|
|
543
|
-
code += ', ';
|
|
539
|
+
if (element !== this.selectElements[this.selectElements.length - 1]) code += ', ';
|
|
544
540
|
});
|
|
545
541
|
|
|
546
542
|
if ((this.parentNode as CallQueryComponent)?.groupBy.length) {
|
|
547
543
|
(this.parentNode as CallQueryComponent)?.groupBy.forEach((element, index) => {
|
|
548
544
|
code += element.toNaturalSQL(state);
|
|
549
|
-
if (element !== (this.parentNode as CallQueryComponent)?.groupBy[this.selectElements.length - 1])
|
|
550
|
-
code += ', ';
|
|
545
|
+
if (element !== (this.parentNode as CallQueryComponent)?.groupBy[this.selectElements.length - 1]) code += ', ';
|
|
551
546
|
});
|
|
552
547
|
}
|
|
553
548
|
|
package/src/concepts/Rect__.ts
CHANGED
|
@@ -35,33 +35,25 @@ export class Rect extends BaseNode {
|
|
|
35
35
|
/**
|
|
36
36
|
* x
|
|
37
37
|
*/
|
|
38
|
-
@property(
|
|
39
|
-
objectRef: '',
|
|
40
|
-
})
|
|
38
|
+
@property()
|
|
41
39
|
x: number;
|
|
42
40
|
|
|
43
41
|
/**
|
|
44
42
|
* y
|
|
45
43
|
*/
|
|
46
|
-
@property(
|
|
47
|
-
objectRef: '',
|
|
48
|
-
})
|
|
44
|
+
@property()
|
|
49
45
|
y: number;
|
|
50
46
|
|
|
51
47
|
/**
|
|
52
48
|
* width
|
|
53
49
|
*/
|
|
54
|
-
@property(
|
|
55
|
-
objectRef: '',
|
|
56
|
-
})
|
|
50
|
+
@property()
|
|
57
51
|
width: number;
|
|
58
52
|
|
|
59
53
|
/**
|
|
60
54
|
* height
|
|
61
55
|
*/
|
|
62
|
-
@property(
|
|
63
|
-
objectRef: '',
|
|
64
|
-
})
|
|
56
|
+
@property()
|
|
65
57
|
height: number;
|
|
66
58
|
|
|
67
59
|
/**
|
package/src/concepts/Return__.ts
CHANGED
|
@@ -69,17 +69,13 @@ export class Return extends BaseNode {
|
|
|
69
69
|
/**
|
|
70
70
|
* 输出参数名称
|
|
71
71
|
*/
|
|
72
|
-
@property(
|
|
73
|
-
objectRef: '',
|
|
74
|
-
})
|
|
72
|
+
@property()
|
|
75
73
|
name: string = '';
|
|
76
74
|
|
|
77
75
|
/**
|
|
78
76
|
* 输出参数描述
|
|
79
77
|
*/
|
|
80
|
-
@property(
|
|
81
|
-
objectRef: '',
|
|
82
|
-
})
|
|
78
|
+
@property()
|
|
83
79
|
description: string;
|
|
84
80
|
|
|
85
81
|
/**
|
|
@@ -88,7 +84,7 @@ export class Return extends BaseNode {
|
|
|
88
84
|
@property({
|
|
89
85
|
objectRef: 'TypeAnnotation',
|
|
90
86
|
})
|
|
91
|
-
typeAnnotation
|
|
87
|
+
typeAnnotation?: TypeAnnotation;
|
|
92
88
|
|
|
93
89
|
/**
|
|
94
90
|
* 默认值
|
|
@@ -96,7 +92,7 @@ export class Return extends BaseNode {
|
|
|
96
92
|
@property({
|
|
97
93
|
objectRef: 'DefaultValue',
|
|
98
94
|
})
|
|
99
|
-
defaultValue?: DefaultValue
|
|
95
|
+
defaultValue?: DefaultValue;
|
|
100
96
|
|
|
101
97
|
/**
|
|
102
98
|
* @param source 需要合并的部分参数
|
package/src/concepts/Role__.ts
CHANGED
|
@@ -48,34 +48,26 @@ export class Role extends BaseNode {
|
|
|
48
48
|
/**
|
|
49
49
|
* 角色名称
|
|
50
50
|
*/
|
|
51
|
-
@property(
|
|
52
|
-
objectRef: '',
|
|
53
|
-
})
|
|
51
|
+
@property()
|
|
54
52
|
name: string = '';
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* 唯一标识
|
|
58
56
|
*/
|
|
59
|
-
@property(
|
|
60
|
-
objectRef: '',
|
|
61
|
-
})
|
|
57
|
+
@property()
|
|
62
58
|
uuid: string = createUUID();
|
|
63
59
|
|
|
64
60
|
/**
|
|
65
|
-
*
|
|
61
|
+
* 角色描述
|
|
66
62
|
*/
|
|
67
|
-
@property(
|
|
68
|
-
|
|
69
|
-
})
|
|
70
|
-
createdTime: string;
|
|
63
|
+
@property()
|
|
64
|
+
description: string;
|
|
71
65
|
|
|
72
66
|
/**
|
|
73
|
-
*
|
|
67
|
+
* 创建时间
|
|
74
68
|
*/
|
|
75
|
-
@property(
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
description: string;
|
|
69
|
+
@property()
|
|
70
|
+
createdTime?: string;
|
|
79
71
|
|
|
80
72
|
/**
|
|
81
73
|
* @param source 需要合并的部分参数
|
|
@@ -35,50 +35,38 @@ export class SetterOption extends BaseNode {
|
|
|
35
35
|
/**
|
|
36
36
|
* 选项值
|
|
37
37
|
*/
|
|
38
|
-
@property(
|
|
39
|
-
objectRef: '',
|
|
40
|
-
})
|
|
38
|
+
@property()
|
|
41
39
|
value: string;
|
|
42
40
|
|
|
43
41
|
/**
|
|
44
42
|
* 选项标题
|
|
45
43
|
*/
|
|
46
|
-
@property(
|
|
47
|
-
objectRef: '',
|
|
48
|
-
})
|
|
44
|
+
@property()
|
|
49
45
|
title: string;
|
|
50
46
|
|
|
51
47
|
/**
|
|
52
48
|
* 选项图标
|
|
53
49
|
*/
|
|
54
|
-
@property(
|
|
55
|
-
|
|
56
|
-
})
|
|
57
|
-
icon?: string = null;
|
|
50
|
+
@property()
|
|
51
|
+
icon?: string;
|
|
58
52
|
|
|
59
53
|
/**
|
|
60
54
|
* 选项工具提示
|
|
61
55
|
*/
|
|
62
|
-
@property(
|
|
63
|
-
|
|
64
|
-
})
|
|
65
|
-
tooltip?: string = null;
|
|
56
|
+
@property()
|
|
57
|
+
tooltip?: string;
|
|
66
58
|
|
|
67
59
|
/**
|
|
68
60
|
* 是否显隐
|
|
69
61
|
*/
|
|
70
|
-
@property(
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
tsIf?: string = null;
|
|
62
|
+
@property()
|
|
63
|
+
tsIf?: string;
|
|
74
64
|
|
|
75
65
|
/**
|
|
76
66
|
* 是否禁用
|
|
77
67
|
*/
|
|
78
|
-
@property(
|
|
79
|
-
|
|
80
|
-
})
|
|
81
|
-
tsDisabledIf?: string = null;
|
|
68
|
+
@property()
|
|
69
|
+
tsDisabledIf?: string;
|
|
82
70
|
|
|
83
71
|
/**
|
|
84
72
|
* @param source 需要合并的部分参数
|
|
@@ -37,33 +37,25 @@ export class SlotDeclaration extends BaseNode {
|
|
|
37
37
|
/**
|
|
38
38
|
* 插槽名称
|
|
39
39
|
*/
|
|
40
|
-
@property(
|
|
41
|
-
objectRef: '',
|
|
42
|
-
})
|
|
40
|
+
@property()
|
|
43
41
|
name: string = '';
|
|
44
42
|
|
|
45
43
|
/**
|
|
46
44
|
* 插槽标题
|
|
47
45
|
*/
|
|
48
|
-
@property(
|
|
49
|
-
objectRef: '',
|
|
50
|
-
})
|
|
46
|
+
@property()
|
|
51
47
|
title: string;
|
|
52
48
|
|
|
53
49
|
/**
|
|
54
50
|
* 插槽描述
|
|
55
51
|
*/
|
|
56
|
-
@property(
|
|
57
|
-
|
|
58
|
-
})
|
|
59
|
-
description?: string = null;
|
|
52
|
+
@property()
|
|
53
|
+
description?: string;
|
|
60
54
|
|
|
61
55
|
/**
|
|
62
56
|
* 类型
|
|
63
57
|
*/
|
|
64
|
-
@property(
|
|
65
|
-
objectRef: '',
|
|
66
|
-
})
|
|
58
|
+
@property()
|
|
67
59
|
tsType: string;
|
|
68
60
|
|
|
69
61
|
/**
|
|
@@ -79,10 +71,8 @@ export class SlotDeclaration extends BaseNode {
|
|
|
79
71
|
/**
|
|
80
72
|
* 空的占位图
|
|
81
73
|
*/
|
|
82
|
-
@property(
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
emptyBackground?: string = null;
|
|
74
|
+
@property()
|
|
75
|
+
emptyBackground?: string;
|
|
86
76
|
|
|
87
77
|
/**
|
|
88
78
|
* 插槽代码块
|
|
@@ -52,9 +52,7 @@ export class SqlQueryComponent extends LogicItem {
|
|
|
52
52
|
/**
|
|
53
53
|
* SQL 查询
|
|
54
54
|
*/
|
|
55
|
-
@property(
|
|
56
|
-
objectRef: '',
|
|
57
|
-
})
|
|
55
|
+
@property()
|
|
58
56
|
code: string;
|
|
59
57
|
|
|
60
58
|
/**
|
|
@@ -68,17 +66,13 @@ export class SqlQueryComponent extends LogicItem {
|
|
|
68
66
|
/**
|
|
69
67
|
* 数据源
|
|
70
68
|
*/
|
|
71
|
-
@property(
|
|
72
|
-
objectRef: '',
|
|
73
|
-
})
|
|
69
|
+
@property()
|
|
74
70
|
dataSource: string;
|
|
75
71
|
|
|
76
72
|
/**
|
|
77
73
|
* 查询组件的局部版本
|
|
78
74
|
*/
|
|
79
|
-
@property(
|
|
80
|
-
objectRef: '',
|
|
81
|
-
})
|
|
75
|
+
@property()
|
|
82
76
|
ideVersion: string;
|
|
83
77
|
|
|
84
78
|
/**
|
|
@@ -238,10 +232,8 @@ export class SqlQueryComponent extends LogicItem {
|
|
|
238
232
|
|
|
239
233
|
@withSourceMap()
|
|
240
234
|
toNaturalTS(state = createCompilerState()): string {
|
|
241
|
-
const code = this.code
|
|
242
|
-
|
|
243
|
-
.replace(/`/g, '\\`'); // 处理枚举 TS 转不回来的情况 ${app.enums.NetStatusEnum.1}
|
|
244
|
-
return `nasl.oql.query(\`${code}\`)`;
|
|
235
|
+
const code = this.code.replace(/\.(\d+)\}/g, '[$1]}').replace(/`/g, '\\`'); // 处理枚举 TS 转不回来的情况 ${app.enums.NetStatusEnum.1}
|
|
236
|
+
return `nasl.oql.query(\`${code}\`)`;
|
|
245
237
|
}
|
|
246
238
|
|
|
247
239
|
/**
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
withSourceMap,
|
|
3
|
-
createCompilerState,
|
|
4
|
-
createDecoratorCode,
|
|
5
|
-
} from '../translator';
|
|
1
|
+
import { withSourceMap, createCompilerState, createDecoratorCode } from '../translator';
|
|
6
2
|
import type App from './App__';
|
|
7
3
|
import type View from './View__';
|
|
8
4
|
import type Frontend from './Frontend__';
|
|
@@ -43,18 +39,14 @@ export class StaticString extends BaseNode {
|
|
|
43
39
|
/**
|
|
44
40
|
* 字符串的值
|
|
45
41
|
*/
|
|
46
|
-
@property(
|
|
47
|
-
objectRef: '',
|
|
48
|
-
})
|
|
42
|
+
@property()
|
|
49
43
|
value: string;
|
|
50
44
|
|
|
51
45
|
/**
|
|
52
46
|
* 国际化键
|
|
53
47
|
*/
|
|
54
|
-
@property(
|
|
55
|
-
|
|
56
|
-
})
|
|
57
|
-
i18nKey: string;
|
|
48
|
+
@property()
|
|
49
|
+
i18nKey?: string;
|
|
58
50
|
|
|
59
51
|
/**
|
|
60
52
|
* @param source 需要合并的部分参数
|
|
@@ -69,6 +61,11 @@ export class StaticString extends BaseNode {
|
|
|
69
61
|
return super.from(source, parentNode, parentKey) as StaticString;
|
|
70
62
|
}
|
|
71
63
|
|
|
64
|
+
//================================================================================
|
|
65
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
66
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
67
|
+
//================================================================================
|
|
68
|
+
|
|
72
69
|
/**
|
|
73
70
|
* 设置字符串的值
|
|
74
71
|
*/
|
|
@@ -81,10 +78,6 @@ export class StaticString extends BaseNode {
|
|
|
81
78
|
});
|
|
82
79
|
}
|
|
83
80
|
|
|
84
|
-
//================================================================================
|
|
85
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
86
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
87
|
-
//================================================================================
|
|
88
81
|
/**
|
|
89
82
|
* 祖先 View
|
|
90
83
|
*/
|
|
@@ -46,18 +46,14 @@ export class StringLiteral extends LogicItem {
|
|
|
46
46
|
/**
|
|
47
47
|
* 字面量的值
|
|
48
48
|
*/
|
|
49
|
-
@property(
|
|
50
|
-
objectRef: '',
|
|
51
|
-
})
|
|
49
|
+
@property()
|
|
52
50
|
value: string = '';
|
|
53
51
|
|
|
54
52
|
/**
|
|
55
53
|
* 国际化键
|
|
56
54
|
*/
|
|
57
|
-
@property(
|
|
58
|
-
|
|
59
|
-
})
|
|
60
|
-
i18nKey: string;
|
|
55
|
+
@property()
|
|
56
|
+
i18nKey?: string;
|
|
61
57
|
|
|
62
58
|
/**
|
|
63
59
|
* @param source 需要合并的部分参数
|
|
@@ -165,10 +161,8 @@ export class StringLiteral extends LogicItem {
|
|
|
165
161
|
@withSourceMap()
|
|
166
162
|
toTextualNASL(state = createCompilerState()): string {
|
|
167
163
|
const code = this.value;
|
|
168
|
-
if (this.parentNode?.concept === 'StringInterpolation')
|
|
169
|
-
|
|
170
|
-
else
|
|
171
|
-
return `'${code}'`;
|
|
164
|
+
if (this.parentNode?.concept === 'StringInterpolation') return code;
|
|
165
|
+
else return `'${code}'`;
|
|
172
166
|
}
|
|
173
167
|
|
|
174
168
|
/**
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
TranslatorGenerator,
|
|
10
10
|
indent,
|
|
11
11
|
createDecoratorCode,
|
|
12
|
+
createDescriptionComment,
|
|
12
13
|
} from '../translator';
|
|
13
14
|
|
|
14
15
|
interface defaultCode {
|
|
@@ -56,26 +57,20 @@ export class StructureProperty extends BaseNode {
|
|
|
56
57
|
/**
|
|
57
58
|
* 数据结构属性名称
|
|
58
59
|
*/
|
|
59
|
-
@property(
|
|
60
|
-
objectRef: '',
|
|
61
|
-
})
|
|
60
|
+
@property()
|
|
62
61
|
name: string = '';
|
|
63
62
|
|
|
64
63
|
/**
|
|
65
64
|
* 数据结构属性标题
|
|
66
65
|
*/
|
|
67
|
-
@property(
|
|
68
|
-
|
|
69
|
-
})
|
|
70
|
-
label: string;
|
|
66
|
+
@property()
|
|
67
|
+
label?: string;
|
|
71
68
|
|
|
72
69
|
/**
|
|
73
70
|
* 数据结构属性描述
|
|
74
71
|
*/
|
|
75
|
-
@property(
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
description: string;
|
|
72
|
+
@property()
|
|
73
|
+
description?: string;
|
|
79
74
|
|
|
80
75
|
/**
|
|
81
76
|
* 类型
|
|
@@ -83,7 +78,7 @@ export class StructureProperty extends BaseNode {
|
|
|
83
78
|
@property({
|
|
84
79
|
objectRef: 'TypeAnnotation',
|
|
85
80
|
})
|
|
86
|
-
typeAnnotation
|
|
81
|
+
typeAnnotation?: TypeAnnotation;
|
|
87
82
|
|
|
88
83
|
/**
|
|
89
84
|
* 默认值
|
|
@@ -91,15 +86,13 @@ export class StructureProperty extends BaseNode {
|
|
|
91
86
|
@property({
|
|
92
87
|
objectRef: 'DefaultValue',
|
|
93
88
|
})
|
|
94
|
-
defaultValue
|
|
89
|
+
defaultValue?: DefaultValue;
|
|
95
90
|
|
|
96
91
|
/**
|
|
97
92
|
* 数据结构字段 JSON 的序列化别名
|
|
98
93
|
*/
|
|
99
|
-
@property(
|
|
100
|
-
|
|
101
|
-
})
|
|
102
|
-
jsonName: string;
|
|
94
|
+
@property()
|
|
95
|
+
jsonName?: string;
|
|
103
96
|
|
|
104
97
|
/**
|
|
105
98
|
* @param source 需要合并的部分参数
|
|
@@ -210,7 +203,11 @@ export class StructureProperty extends BaseNode {
|
|
|
210
203
|
|
|
211
204
|
@withSourceMap()
|
|
212
205
|
toNaturalTS(state = createCompilerState()): string {
|
|
213
|
-
let code =
|
|
206
|
+
let code = '';
|
|
207
|
+
if (state.descriptionComment)
|
|
208
|
+
code += createDescriptionComment(state, this, ['label', 'description']);
|
|
209
|
+
|
|
210
|
+
code += this.name;
|
|
214
211
|
if (this.typeAnnotation) {
|
|
215
212
|
code += ': ';
|
|
216
213
|
code += this.typeAnnotation.toNaturalTS(shiftState(state, code, { inline: true }));
|
|
@@ -294,7 +291,7 @@ export class StructureProperty extends BaseNode {
|
|
|
294
291
|
* 是否可编辑
|
|
295
292
|
* */
|
|
296
293
|
get readonly() {
|
|
297
|
-
return !!this.module ||
|
|
294
|
+
return !!this.module || this.isConnector;
|
|
298
295
|
}
|
|
299
296
|
|
|
300
297
|
//================================================================================
|