@lcap/nasl 2.12.0-beta → 2.12.0-beta.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/automate/engine/index.d.ts +1 -0
- package/out/automate/engine/index.js +23 -12
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/operators.d.ts +10 -2
- package/out/automate/engine/operators.js +105 -7
- package/out/automate/engine/operators.js.map +1 -1
- package/out/automate/engine/uniqueName.d.ts +8 -2
- package/out/automate/engine/uniqueName.js +72 -4
- package/out/automate/engine/uniqueName.js.map +1 -1
- package/out/automate/engine/utils.js +4 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/automate/template/process.d.ts +9 -0
- package/out/automate/template/process.js +10976 -0
- package/out/automate/template/process.js.map +1 -0
- package/out/bak/translator.js +1 -0
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +5 -0
- package/out/common/BaseNode.js +24 -3
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.js +3 -2
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +1 -1
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.js +1 -1
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/Assignment__.js +1 -1
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +1 -1
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +1 -1
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +1 -1
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +9 -2
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +6 -2
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +4 -0
- package/out/concepts/BooleanLiteral__.js +12 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.js +2 -1
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.js +1 -1
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +27 -11
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +1 -1
- package/out/concepts/CallQueryComponent__.js +3 -3
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +1 -1
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +1 -1
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +1 -1
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.js +1 -1
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js +1 -1
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +1 -1
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Constant__.js +1 -1
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataElement__.js +1 -1
- package/out/concepts/DataElement__.js.map +1 -1
- package/out/concepts/DataSource__.js +2 -0
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/End__.js +1 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.js +1 -1
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +1 -1
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.js +1 -1
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.js +1 -1
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +1 -1
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +1 -1
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +1 -1
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.js +2 -2
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +3 -2
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +1 -1
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +1 -1
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js +2 -2
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +2 -4
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/LogicItem__.js +1 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +7 -6
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +1 -1
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +118 -112
- package/out/concepts/Module__.js +25 -7
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.js +2 -2
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NullLiteral__.js +1 -1
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +1 -1
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/Param__.js +2 -2
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +1 -1
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +1 -1
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +7 -2
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +1 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/Process__.d.ts +1 -1
- package/out/concepts/Process__.js +2 -2
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +1 -1
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +1 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +1 -1
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.js +1 -1
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +1 -1
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +1 -1
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js +1 -1
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +1 -1
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +1 -1
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.js +2 -2
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +1 -1
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/Slot__.js +1 -1
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +4 -0
- package/out/concepts/SqlQueryComponent__.js +16 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.js +1 -1
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +2 -2
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +5 -4
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +1 -1
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js +19 -21
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +2 -7
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.js +1 -1
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.js +1 -1
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.js +2 -2
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js +1 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +1 -1
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.js +1 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +1 -1
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +1 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +2 -2
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewComponent__.js +1 -1
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.js +9 -4
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +0 -2
- package/out/concepts/View__.js +4 -11
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +1 -1
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.js +20 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.d.ts +4 -0
- package/out/concepts/basics/stdlib/nasl.process.js +410 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.js +1 -11
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +25 -25
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -0
- package/out/concepts/basics/types/index.js +4 -1
- package/out/concepts/basics/types/index.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +3 -1
- package/out/generator/genBundleFiles.js +16 -3
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.d.ts +1 -0
- package/out/generator/genMetaData.js +7 -0
- package/out/generator/genMetaData.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +2 -1
- package/out/index.js.map +1 -1
- package/out/server/getLogics.js +18 -0
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +5 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +1 -0
- package/out/server/getProcesses.js +9 -1
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.d.ts +1 -0
- package/out/server/naslServer.js +98 -23
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +21 -3
- package/out/server/translator.js.map +1 -1
- package/out/service/creator/errHandles.js +5 -0
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -0
- package/out/service/storage/init.js +94 -83
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +20 -14
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +13 -6
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +20 -8
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +3 -1
- 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/genGridViewBlock.js +8 -4
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +1 -2
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +20 -21
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genTableBlock.js +14 -6
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +20 -14
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.js +19 -1
- package/out/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/index.js +21 -7
- package/src/automate/engine/operators.js +114 -17
- package/src/automate/engine/uniqueName.js +77 -9
- package/src/automate/engine/utils.js +4 -2
- package/src/automate/template/process.js +10999 -0
- package/src/bak/translator.js +1 -0
- package/src/common/BaseNode.ts +21 -4
- package/src/concepts/App__.ts +4 -40
- package/src/concepts/Argument__.ts +1 -1
- package/src/concepts/Assignee__.ts +1 -1
- package/src/concepts/Assignment__.ts +1 -1
- package/src/concepts/Attribute__.ts +1 -1
- package/src/concepts/BinaryExpression__.ts +1 -1
- package/src/concepts/BindAttribute__.ts +1 -1
- package/src/concepts/BindDirective__.ts +8 -6
- package/src/concepts/BindEvent__.ts +6 -2
- package/src/concepts/BooleanLiteral__.ts +13 -1
- package/src/concepts/CallFunction__.ts +15 -14
- package/src/concepts/CallInterface__.ts +1 -1
- package/src/concepts/CallLogic__.ts +26 -11
- package/src/concepts/CallQueryComponent__.ts +32 -4
- package/src/concepts/Comment__.ts +1 -1
- package/src/concepts/CompletionProperty__.ts +1 -1
- package/src/concepts/ConfigGroup__.ts +1 -1
- package/src/concepts/ConfigPropertyValue__.ts +1 -1
- package/src/concepts/ConfigProperty__.ts +1 -1
- package/src/concepts/Configuration__.ts +1 -1
- package/src/concepts/Constant__.ts +1 -1
- package/src/concepts/DataElement__.ts +1 -1
- package/src/concepts/DataSource__.ts +2 -0
- package/src/concepts/End__.ts +1 -1
- package/src/concepts/EntityIndex__.ts +1 -1
- package/src/concepts/EntityProperty__.ts +1 -1
- package/src/concepts/Entity__.ts +1 -1
- package/src/concepts/EnumItem__.ts +1 -1
- package/src/concepts/Enum__.ts +1 -1
- package/src/concepts/Event__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +1 -1
- package/src/concepts/Function__.ts +5 -5
- package/src/concepts/Identifier__.ts +3 -2
- package/src/concepts/IfStatement__.ts +1 -1
- package/src/concepts/InterfaceParam__.ts +1 -1
- package/src/concepts/Interface__.ts +2 -2
- package/src/concepts/JSBlock__.ts +2 -11
- package/src/concepts/LogicItem__.ts +1 -1
- package/src/concepts/Logic__.ts +8 -44
- package/src/concepts/MemberExpression__.ts +1 -1
- package/src/concepts/Module__.ts +141 -147
- package/src/concepts/Namespace__.ts +2 -2
- package/src/concepts/NullLiteral__.ts +1 -1
- package/src/concepts/NumericLiteral__.ts +1 -1
- package/src/concepts/Param__.ts +2 -2
- package/src/concepts/Point__.ts +1 -1
- package/src/concepts/ProcessComponent__.ts +1 -1
- package/src/concepts/ProcessElement__.ts +8 -3
- package/src/concepts/ProcessOutcome__.ts +1 -1
- package/src/concepts/Process__.ts +3 -3
- package/src/concepts/QueryAggregateExpression__.ts +1 -1
- package/src/concepts/QueryFieldExpression__.ts +1 -1
- package/src/concepts/QueryFromExpression__.ts +1 -1
- package/src/concepts/QueryGroupByExpression__.ts +1 -1
- package/src/concepts/QueryJoinExpression__.ts +1 -1
- package/src/concepts/QueryLimitExpression__.ts +1 -1
- package/src/concepts/QueryOrderByExpression__.ts +1 -1
- package/src/concepts/QuerySelectExpression__.ts +1 -1
- package/src/concepts/Rect__.ts +1 -1
- package/src/concepts/Return__.ts +2 -2
- package/src/concepts/Role__.ts +1 -1
- package/src/concepts/Slot__.ts +1 -1
- package/src/concepts/SqlQueryComponent__.ts +17 -0
- package/src/concepts/Start__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +2 -2
- package/src/concepts/StructureProperty__.ts +5 -8
- package/src/concepts/Structure__.ts +1 -1
- package/src/concepts/SwitchCase__.ts +19 -23
- package/src/concepts/SwitchStatement__.ts +2 -6
- package/src/concepts/Theme__.ts +1 -1
- package/src/concepts/Transactional__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +21 -2
- package/src/concepts/TypeParam__.ts +1 -1
- package/src/concepts/UnaryExpression__.ts +1 -1
- package/src/concepts/Unparsed__.ts +1 -1
- package/src/concepts/UseComponent__.ts +1 -1
- package/src/concepts/ValidationRule__.ts +1 -1
- package/src/concepts/Variable__.ts +2 -2
- package/src/concepts/ViewComponent__.ts +1 -1
- package/src/concepts/ViewElement__.ts +10 -23
- package/src/concepts/View__.ts +6 -13
- package/src/concepts/WhileStatement__.ts +1 -1
- package/src/concepts/basics/stdlib/nasl.auth.ts +20 -0
- package/src/concepts/basics/stdlib/nasl.process.ts +406 -0
- package/src/concepts/basics/stdlib/nasl.ui.ts +1 -11
- package/src/concepts/basics/stdlib/nasl.util.ts +25 -25
- package/src/concepts/basics/types/index.ts +1 -0
- package/src/generator/genBundleFiles.ts +21 -5
- package/src/generator/genMetaData.ts +10 -1
- package/src/index.ts +1 -1
- package/src/server/getLogics.ts +18 -1
- package/src/server/getMemberIdentifier.ts +4 -0
- package/src/server/getProcesses.ts +8 -1
- package/src/server/naslServer.ts +107 -28
- package/src/server/translator.ts +20 -3
- package/src/service/creator/errHandles.js +6 -0
- package/src/service/storage/init.ts +96 -85
- package/src/templator/genCreateBlock.ts +20 -14
- package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -8
- package/src/templator/genCurdMultipleKeyBlock.ts +20 -9
- package/src/templator/genEditTableBlock.ts +3 -1
- package/src/templator/genEnumSelectBlock.ts +1 -1
- package/src/templator/genGridViewBlock.ts +8 -4
- package/src/templator/genListViewBlock.ts +1 -2
- package/src/templator/genQueryComponent.ts +22 -21
- package/src/templator/genTableBlock.ts +14 -7
- package/src/templator/genUpdateBlock.ts +20 -14
- package/src/utils/index.ts +19 -0
|
@@ -259,7 +259,7 @@ export class QueryFromExpression extends LogicItem {
|
|
|
259
259
|
//================================================================================
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
classMap
|
|
262
|
+
classMap['QueryFromExpression'] = QueryFromExpression;
|
|
263
263
|
export default QueryFromExpression;
|
|
264
264
|
//================================================================================
|
|
265
265
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -154,7 +154,7 @@ export class QueryGroupByExpression extends LogicItem {
|
|
|
154
154
|
//================================================================================
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
classMap
|
|
157
|
+
classMap['QueryGroupByExpression'] = QueryGroupByExpression;
|
|
158
158
|
export default QueryGroupByExpression;
|
|
159
159
|
//================================================================================
|
|
160
160
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -446,7 +446,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
446
446
|
//================================================================================
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
classMap
|
|
449
|
+
classMap['QueryJoinExpression'] = QueryJoinExpression;
|
|
450
450
|
export default QueryJoinExpression;
|
|
451
451
|
//================================================================================
|
|
452
452
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -180,7 +180,7 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
180
180
|
//================================================================================
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
classMap
|
|
183
|
+
classMap['QueryLimitExpression'] = QueryLimitExpression;
|
|
184
184
|
export default QueryLimitExpression;
|
|
185
185
|
//================================================================================
|
|
186
186
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -194,7 +194,7 @@ export class QueryOrderByExpression extends LogicItem {
|
|
|
194
194
|
//================================================================================
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
classMap
|
|
197
|
+
classMap['QueryOrderByExpression'] = QueryOrderByExpression;
|
|
198
198
|
export default QueryOrderByExpression;
|
|
199
199
|
//================================================================================
|
|
200
200
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -272,7 +272,7 @@ export class QuerySelectExpression extends LogicItem {
|
|
|
272
272
|
//================================================================================
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
classMap
|
|
275
|
+
classMap['QuerySelectExpression'] = QuerySelectExpression;
|
|
276
276
|
export default QuerySelectExpression;
|
|
277
277
|
//================================================================================
|
|
278
278
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Rect__.ts
CHANGED
|
@@ -89,7 +89,7 @@ export class Rect extends BaseNode {
|
|
|
89
89
|
//================================================================================
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
classMap
|
|
92
|
+
classMap['Rect'] = Rect;
|
|
93
93
|
export default Rect;
|
|
94
94
|
//================================================================================
|
|
95
95
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Return__.ts
CHANGED
|
@@ -332,7 +332,7 @@ export class Return extends BaseNode {
|
|
|
332
332
|
const { typeName, typeKind, typeNamespace } = newTypeAnnotation || this.typeAnnotation;
|
|
333
333
|
let completionChildren;
|
|
334
334
|
if (typeKind === 'reference') {
|
|
335
|
-
if (typeNamespace === 'nasl.ui') {
|
|
335
|
+
if (typeNamespace === 'nasl.ui' || typeNamespace === 'nasl.process') {
|
|
336
336
|
const node = getNaslNodeByNodeCallee(typeNamespace, typeName);
|
|
337
337
|
const properties = node.properties || [];
|
|
338
338
|
completionChildren = properties;
|
|
@@ -368,7 +368,7 @@ export class Return extends BaseNode {
|
|
|
368
368
|
//================================================================================
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
classMap
|
|
371
|
+
classMap['Return'] = Return;
|
|
372
372
|
export default Return;
|
|
373
373
|
//================================================================================
|
|
374
374
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Role__.ts
CHANGED
|
@@ -161,7 +161,7 @@ export class Role extends BaseNode {
|
|
|
161
161
|
//================================================================================
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
classMap
|
|
164
|
+
classMap['Role'] = Role;
|
|
165
165
|
export default Role;
|
|
166
166
|
//================================================================================
|
|
167
167
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Slot__.ts
CHANGED
|
@@ -114,7 +114,7 @@ export class Slot extends BaseNode {
|
|
|
114
114
|
//================================================================================
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
classMap
|
|
117
|
+
classMap['Slot'] = Slot;
|
|
118
118
|
export default Slot;
|
|
119
119
|
//================================================================================
|
|
120
120
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -129,6 +129,18 @@ export class SqlQueryComponent extends LogicItem {
|
|
|
129
129
|
@property()
|
|
130
130
|
dataSource: string = undefined;
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* 设置SQL 查询
|
|
134
|
+
*/
|
|
135
|
+
setDataSource(dataSource: string) {
|
|
136
|
+
const object = {
|
|
137
|
+
dataSource,
|
|
138
|
+
};
|
|
139
|
+
this.update({
|
|
140
|
+
...object,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
132
144
|
@withSourceMap()
|
|
133
145
|
toEmbeddedTS(state?: TranslatorState): string {
|
|
134
146
|
let code;
|
|
@@ -139,6 +151,11 @@ export class SqlQueryComponent extends LogicItem {
|
|
|
139
151
|
code = `(function(): nasl.collection.List<`;
|
|
140
152
|
code += `${this.typeAnnotation ? this.typeAnnotation.toEmbeddedTS(shiftState(state, code)) : '__IDENTIFIER__'}> {\n`;
|
|
141
153
|
}
|
|
154
|
+
// app.dataSources.defaultDS;
|
|
155
|
+
if (this.dataSource) {
|
|
156
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
157
|
+
code += `const dataSource = app.dataSources.${this.dataSource};`;
|
|
158
|
+
}
|
|
142
159
|
code += '\n';
|
|
143
160
|
code += indent((state?.tabSize || 0) + 1) + 'return;\n';
|
|
144
161
|
code += indent((state?.tabSize || 0)) + '})();\n';
|
package/src/concepts/Start__.ts
CHANGED
|
@@ -71,7 +71,7 @@ export class Start extends LogicItem {
|
|
|
71
71
|
//================================================================================
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
classMap
|
|
74
|
+
classMap['Start'] = Start;
|
|
75
75
|
export default Start;
|
|
76
76
|
//================================================================================
|
|
77
77
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -102,7 +102,7 @@ export class StringLiteral extends LogicItem {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* 设置字符串内容
|
|
106
106
|
*/
|
|
107
107
|
setValue(value: string) {
|
|
108
108
|
const object = {
|
|
@@ -125,7 +125,7 @@ export class StringLiteral extends LogicItem {
|
|
|
125
125
|
//================================================================================
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
classMap
|
|
128
|
+
classMap['StringLiteral'] = StringLiteral;
|
|
129
129
|
export default StringLiteral;
|
|
130
130
|
//================================================================================
|
|
131
131
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -171,10 +171,6 @@ export class StructureProperty extends BaseNode {
|
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
174
|
/**
|
|
179
175
|
* 删除类型标注
|
|
180
176
|
* @param name 类型标注名称
|
|
@@ -251,7 +247,7 @@ export class StructureProperty extends BaseNode {
|
|
|
251
247
|
const { typeName, typeKind, typeNamespace } = this.typeAnnotation;
|
|
252
248
|
let completionChildren;
|
|
253
249
|
if (typeKind === 'reference') {
|
|
254
|
-
if (typeNamespace === 'nasl.ui') {
|
|
250
|
+
if (typeNamespace === 'nasl.ui' || typeNamespace === 'nasl.process') {
|
|
255
251
|
const node = getNaslNodeByNodeCallee(typeNamespace, typeName);
|
|
256
252
|
const properties = node.properties || [];
|
|
257
253
|
completionChildren = properties;
|
|
@@ -284,9 +280,10 @@ export class StructureProperty extends BaseNode {
|
|
|
284
280
|
code += ': ';
|
|
285
281
|
code += this.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
286
282
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
283
|
+
// StructureProperty 暂不支持默认值
|
|
284
|
+
// if (this.defaultValue) {
|
|
285
|
+
// code += ` = ${this.defaultValue}`;
|
|
286
|
+
// }
|
|
290
287
|
return code;
|
|
291
288
|
}
|
|
292
289
|
|
|
@@ -603,7 +603,7 @@ export class Structure extends BaseNode {
|
|
|
603
603
|
//================================================================================
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
classMap
|
|
606
|
+
classMap['Structure'] = Structure;
|
|
607
607
|
export default Structure;
|
|
608
608
|
//================================================================================
|
|
609
609
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -241,37 +241,33 @@ export class SwitchCase extends LogicItem {
|
|
|
241
241
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
242
242
|
//================================================================================
|
|
243
243
|
|
|
244
|
-
toJS(state?: TranslatorState,
|
|
244
|
+
toJS(state?: TranslatorState, index?: number, length?: number): string {
|
|
245
245
|
let code = '';
|
|
246
|
-
if (
|
|
246
|
+
if (index === 0) {
|
|
247
247
|
code = 'if (';
|
|
248
248
|
code += this.test ? this.test.toJS(shiftState(state, code, {
|
|
249
249
|
tabSize: 0,
|
|
250
250
|
})) : '';
|
|
251
|
-
|
|
252
251
|
code += ') {\n';
|
|
253
|
-
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
})) + '\n';
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
code += '}\n';
|
|
252
|
+
} else if (index !== length - 1) {
|
|
253
|
+
code = 'else if (';
|
|
254
|
+
code += this.test ? this.test.toJS(shiftState(state, code, {
|
|
255
|
+
tabSize: 0,
|
|
256
|
+
})) : '';
|
|
257
|
+
code += ') {\n';
|
|
263
258
|
} else {
|
|
264
259
|
code += 'else {\n';
|
|
265
|
-
if (Array.isArray(this.consequent)) {
|
|
266
|
-
this.consequent.forEach((logicItem) => {
|
|
267
|
-
code
|
|
268
|
-
+= logicItem.toJS(shiftState(state, code, {
|
|
269
|
-
tabSize: 0,
|
|
270
|
-
})) + '\n';
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
code += '}\n';
|
|
274
260
|
}
|
|
261
|
+
if (Array.isArray(this.consequent)) {
|
|
262
|
+
this.consequent.forEach((logicItem) => {
|
|
263
|
+
code
|
|
264
|
+
+= logicItem.toJS(shiftState(state, code, {
|
|
265
|
+
tabSize: 0,
|
|
266
|
+
})) + '\n';
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
code += '}\n';
|
|
270
|
+
|
|
275
271
|
return code;
|
|
276
272
|
}
|
|
277
273
|
|
|
@@ -317,7 +313,7 @@ export class SwitchCase extends LogicItem {
|
|
|
317
313
|
//================================================================================
|
|
318
314
|
}
|
|
319
315
|
|
|
320
|
-
classMap
|
|
316
|
+
classMap['SwitchCase'] = SwitchCase;
|
|
321
317
|
export default SwitchCase;
|
|
322
318
|
//================================================================================
|
|
323
319
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -213,11 +213,7 @@ export class SwitchStatement extends LogicItem {
|
|
|
213
213
|
let code = '';
|
|
214
214
|
this.cases.forEach((item, index) => {
|
|
215
215
|
// 如果是最后一项
|
|
216
|
-
|
|
217
|
-
code += item.toJS(state, true);
|
|
218
|
-
} else {
|
|
219
|
-
code += item.toJS(state);
|
|
220
|
-
}
|
|
216
|
+
code += item.toJS(state, index, this.cases.length);
|
|
221
217
|
});
|
|
222
218
|
return code;
|
|
223
219
|
}
|
|
@@ -248,7 +244,7 @@ export class SwitchStatement extends LogicItem {
|
|
|
248
244
|
//================================================================================
|
|
249
245
|
}
|
|
250
246
|
|
|
251
|
-
classMap
|
|
247
|
+
classMap['SwitchStatement'] = SwitchStatement;
|
|
252
248
|
export default SwitchStatement;
|
|
253
249
|
//================================================================================
|
|
254
250
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Theme__.ts
CHANGED
|
@@ -87,7 +87,7 @@ export class Theme extends BaseNode {
|
|
|
87
87
|
//================================================================================
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
classMap
|
|
90
|
+
classMap['Theme'] = Theme;
|
|
91
91
|
export default Theme;
|
|
92
92
|
//================================================================================
|
|
93
93
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -157,7 +157,7 @@ export class Transactional extends BaseNode {
|
|
|
157
157
|
//================================================================================
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
classMap
|
|
160
|
+
classMap['Transactional'] = Transactional;
|
|
161
161
|
export default Transactional;
|
|
162
162
|
//================================================================================
|
|
163
163
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -40,6 +40,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
40
40
|
import BaseNode from '../common/BaseNode';
|
|
41
41
|
import classMap from '../common/classMap';
|
|
42
42
|
|
|
43
|
+
|
|
43
44
|
/**
|
|
44
45
|
* 类型标注
|
|
45
46
|
*/
|
|
@@ -81,6 +82,8 @@ export class TypeAnnotation extends BaseNode {
|
|
|
81
82
|
@property()
|
|
82
83
|
inferred?: boolean = undefined;
|
|
83
84
|
|
|
85
|
+
|
|
86
|
+
|
|
84
87
|
/**
|
|
85
88
|
* @param source 需要合并的部分参数
|
|
86
89
|
*/
|
|
@@ -94,6 +97,13 @@ export class TypeAnnotation extends BaseNode {
|
|
|
94
97
|
return super.from(source, parentNode, parentKey) as TypeAnnotation;
|
|
95
98
|
}
|
|
96
99
|
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
97
107
|
/**
|
|
98
108
|
* 插入类型标注
|
|
99
109
|
* @internal
|
|
@@ -126,6 +136,8 @@ export class TypeAnnotation extends BaseNode {
|
|
|
126
136
|
return typeAnnotation;
|
|
127
137
|
}
|
|
128
138
|
|
|
139
|
+
|
|
140
|
+
|
|
129
141
|
/**
|
|
130
142
|
* 插入类型标注
|
|
131
143
|
* @param typeAnnotationOptions 类型标注参数
|
|
@@ -148,6 +160,8 @@ export class TypeAnnotation extends BaseNode {
|
|
|
148
160
|
return node;
|
|
149
161
|
}
|
|
150
162
|
|
|
163
|
+
|
|
164
|
+
|
|
151
165
|
/**
|
|
152
166
|
* 添加类型标注
|
|
153
167
|
* @internal
|
|
@@ -167,6 +181,8 @@ export class TypeAnnotation extends BaseNode {
|
|
|
167
181
|
return this._insertTypeAnnotationAt(options as any, index);
|
|
168
182
|
}
|
|
169
183
|
|
|
184
|
+
|
|
185
|
+
|
|
170
186
|
/**
|
|
171
187
|
* 添加类型标注
|
|
172
188
|
* @param typeAnnotationOptions 类型标注参数
|
|
@@ -190,6 +206,9 @@ export class TypeAnnotation extends BaseNode {
|
|
|
190
206
|
return node;
|
|
191
207
|
}
|
|
192
208
|
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
193
212
|
/**
|
|
194
213
|
* 删除类型标注
|
|
195
214
|
* @param typeAnnotation 已有的类型标注实例
|
|
@@ -197,7 +216,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
197
216
|
removeTypeAnnotation(typeAnnotation: TypeAnnotation): void;
|
|
198
217
|
|
|
199
218
|
removeTypeAnnotation(options: TypeAnnotation) {
|
|
200
|
-
|
|
219
|
+
let typeAnnotation: TypeAnnotation = options;
|
|
201
220
|
return typeAnnotation.delete();
|
|
202
221
|
}
|
|
203
222
|
|
|
@@ -452,7 +471,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
452
471
|
//================================================================================
|
|
453
472
|
}
|
|
454
473
|
|
|
455
|
-
classMap
|
|
474
|
+
classMap['TypeAnnotation'] = TypeAnnotation;
|
|
456
475
|
export default TypeAnnotation;
|
|
457
476
|
//================================================================================
|
|
458
477
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -61,7 +61,7 @@ export class TypeParam extends BaseNode {
|
|
|
61
61
|
//================================================================================
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
classMap
|
|
64
|
+
classMap['TypeParam'] = TypeParam;
|
|
65
65
|
export default TypeParam;
|
|
66
66
|
//================================================================================
|
|
67
67
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -176,7 +176,7 @@ export class UnaryExpression extends LogicItem {
|
|
|
176
176
|
//================================================================================
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
classMap
|
|
179
|
+
classMap['UnaryExpression'] = UnaryExpression;
|
|
180
180
|
export default UnaryExpression;
|
|
181
181
|
//================================================================================
|
|
182
182
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -90,7 +90,7 @@ export class Unparsed extends LogicItem {
|
|
|
90
90
|
//================================================================================
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
classMap
|
|
93
|
+
classMap['Unparsed'] = Unparsed;
|
|
94
94
|
export default Unparsed;
|
|
95
95
|
//================================================================================
|
|
96
96
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -77,7 +77,7 @@ export class UseComponent extends BaseNode {
|
|
|
77
77
|
//================================================================================
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
classMap
|
|
80
|
+
classMap['UseComponent'] = UseComponent;
|
|
81
81
|
export default UseComponent;
|
|
82
82
|
//================================================================================
|
|
83
83
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -324,7 +324,7 @@ export class ValidationRule extends LogicItem {
|
|
|
324
324
|
//================================================================================
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
classMap
|
|
327
|
+
classMap['ValidationRule'] = ValidationRule;
|
|
328
328
|
export default ValidationRule;
|
|
329
329
|
//================================================================================
|
|
330
330
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -329,7 +329,7 @@ export class Variable extends BaseNode {
|
|
|
329
329
|
const { typeName, typeKind, typeNamespace } = newTypeAnnotation || this.typeAnnotation;
|
|
330
330
|
let completionChildren;
|
|
331
331
|
if (typeKind === 'reference') {
|
|
332
|
-
if (typeNamespace === 'nasl.ui') {
|
|
332
|
+
if (typeNamespace === 'nasl.ui' || typeNamespace === 'nasl.process') {
|
|
333
333
|
const node = getNaslNodeByNodeCallee(typeNamespace, typeName);
|
|
334
334
|
const properties = node.properties || [];
|
|
335
335
|
completionChildren = properties;
|
|
@@ -365,7 +365,7 @@ export class Variable extends BaseNode {
|
|
|
365
365
|
//================================================================================
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
classMap
|
|
368
|
+
classMap['Variable'] = Variable;
|
|
369
369
|
export default Variable;
|
|
370
370
|
//================================================================================
|
|
371
371
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -1091,7 +1091,7 @@ export class ViewComponent extends BaseNode {
|
|
|
1091
1091
|
//================================================================================
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
|
-
classMap
|
|
1094
|
+
classMap['ViewComponent'] = ViewComponent;
|
|
1095
1095
|
export default ViewComponent;
|
|
1096
1096
|
//================================================================================
|
|
1097
1097
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -262,8 +262,6 @@ export class ViewElement extends BaseNode {
|
|
|
262
262
|
super.subConstructor(source);
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
|
|
266
|
-
|
|
267
265
|
/**
|
|
268
266
|
* 从父级删除该节点
|
|
269
267
|
* @internal
|
|
@@ -300,7 +298,7 @@ export class ViewElement extends BaseNode {
|
|
|
300
298
|
});
|
|
301
299
|
}
|
|
302
300
|
|
|
303
|
-
|
|
301
|
+
getBindAttributeExistingNames(excludedList: Array<BindAttribute> = []) {
|
|
304
302
|
const excludedSet = new Set(excludedList);
|
|
305
303
|
return (this.bindAttrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
306
304
|
}
|
|
@@ -441,7 +439,6 @@ export class ViewElement extends BaseNode {
|
|
|
441
439
|
return node;
|
|
442
440
|
}
|
|
443
441
|
|
|
444
|
-
|
|
445
442
|
getBindEventExistingNames(excludedList: Array<BindEvent> = []) {
|
|
446
443
|
const excludedSet = new Set(excludedList);
|
|
447
444
|
return (this.bindEvents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
@@ -583,7 +580,6 @@ export class ViewElement extends BaseNode {
|
|
|
583
580
|
return node;
|
|
584
581
|
}
|
|
585
582
|
|
|
586
|
-
|
|
587
583
|
getBindDirectiveExistingNames(excludedList: Array<BindDirective> = []) {
|
|
588
584
|
const excludedSet = new Set(excludedList);
|
|
589
585
|
return (this.bindDirectives || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
@@ -725,11 +721,6 @@ export class ViewElement extends BaseNode {
|
|
|
725
721
|
return node;
|
|
726
722
|
}
|
|
727
723
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
724
|
/**
|
|
734
725
|
* 插入页面元素
|
|
735
726
|
* @internal
|
|
@@ -863,9 +854,6 @@ export class ViewElement extends BaseNode {
|
|
|
863
854
|
return node;
|
|
864
855
|
}
|
|
865
856
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
857
|
/**
|
|
870
858
|
* 删除元素绑定属性
|
|
871
859
|
* @param name 元素绑定属性名称
|
|
@@ -914,8 +902,6 @@ export class ViewElement extends BaseNode {
|
|
|
914
902
|
return params;
|
|
915
903
|
}
|
|
916
904
|
|
|
917
|
-
|
|
918
|
-
|
|
919
905
|
/**
|
|
920
906
|
* 删除元素绑定事件
|
|
921
907
|
* @param name 元素绑定事件名称
|
|
@@ -964,8 +950,6 @@ export class ViewElement extends BaseNode {
|
|
|
964
950
|
return params;
|
|
965
951
|
}
|
|
966
952
|
|
|
967
|
-
|
|
968
|
-
|
|
969
953
|
/**
|
|
970
954
|
* 删除元素指令
|
|
971
955
|
* @param name 元素指令名称
|
|
@@ -1014,8 +998,6 @@ export class ViewElement extends BaseNode {
|
|
|
1014
998
|
return params;
|
|
1015
999
|
}
|
|
1016
1000
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
1001
|
/**
|
|
1020
1002
|
* 删除页面元素
|
|
1021
1003
|
* @param name 页面元素名称
|
|
@@ -1120,7 +1102,7 @@ export class ViewElement extends BaseNode {
|
|
|
1120
1102
|
|
|
1121
1103
|
haveScope(node: ViewElement): boolean {
|
|
1122
1104
|
// uGallery 没有子集不需要scope
|
|
1123
|
-
const dataSourcePcList = ['uTableView', 'uListView', 'uGridView', 'uCalendarView', 'uListComponents', 'uSelect', 'devopsDragTable', 'uTreeViewNew'];
|
|
1105
|
+
const dataSourcePcList = ['uTableView', 'uListView', 'uGridView', 'uCalendarView', 'uListComponents', 'uSelect', 'devopsDragTable', 'uTreeViewNew', 'uTreeSelectNew'];
|
|
1124
1106
|
const dataSourceH5List = ['vanRadioGroup', 'vanCheckboxGroup', 'vanListView', 'vanGridView', 'vanForComponents', 'lcapEchartsLine', 'lcapEchartsBar', 'lcapEchartsPie'];
|
|
1125
1107
|
const dataSourceList = [...dataSourcePcList, ...dataSourceH5List];
|
|
1126
1108
|
return dataSourceList.includes(node.toHump(node.tag));
|
|
@@ -1550,7 +1532,7 @@ export class ViewElement extends BaseNode {
|
|
|
1550
1532
|
tag: tagName,
|
|
1551
1533
|
name: view.getViewElementUniqueName(`${baseName}1`),
|
|
1552
1534
|
});
|
|
1553
|
-
const value = astNode.text
|
|
1535
|
+
const value = astNode.text?.match(/{{(.*?)}}/)[1].trim();
|
|
1554
1536
|
const expression = <any> this._parseExpression(value);
|
|
1555
1537
|
element.addBindAttribute(new BindAttribute({
|
|
1556
1538
|
type: 'dynamic',
|
|
@@ -1568,7 +1550,7 @@ export class ViewElement extends BaseNode {
|
|
|
1568
1550
|
element.addBindAttribute(new BindAttribute({
|
|
1569
1551
|
name: 'text',
|
|
1570
1552
|
type: 'string',
|
|
1571
|
-
value: astNode.text,
|
|
1553
|
+
value: astNode.text?.trim(),
|
|
1572
1554
|
}));
|
|
1573
1555
|
}
|
|
1574
1556
|
return element;
|
|
@@ -1615,6 +1597,11 @@ export class ViewElement extends BaseNode {
|
|
|
1615
1597
|
const apiOfAttr = api && api.attrs && api.attrs.find((_attr) => _attr.name === attr.name);
|
|
1616
1598
|
if (apiOfAttr && apiOfAttr['designer-value'] !== undefined) {
|
|
1617
1599
|
let designerValue = apiOfAttr['designer-value'];
|
|
1600
|
+
//对流程模板拖拽进行特判
|
|
1601
|
+
element.bindAttrs.forEach((property) => {
|
|
1602
|
+
if (property.name === 'repeat' && property.value === '1')
|
|
1603
|
+
designerValue = '[{}, {}]';
|
|
1604
|
+
});
|
|
1618
1605
|
if (typeof designerValue === 'string') {
|
|
1619
1606
|
designerValue = designerValue.replace(/"/g, "'");
|
|
1620
1607
|
}
|
|
@@ -1673,7 +1660,7 @@ export class ViewElement extends BaseNode {
|
|
|
1673
1660
|
if (hasAuto)
|
|
1674
1661
|
addEmpty = false;
|
|
1675
1662
|
}
|
|
1676
|
-
if (['u-select', 'u-dropdown', 'u-panel','u-toc','u-toc-item', 'u-tree-view-new','u-tree-view-node-new', 'u-tree-select', 'u-anchor'].includes(el.tag)) {
|
|
1663
|
+
if (['u-select', 'u-dropdown', 'u-panel', 'u-toc', 'u-toc-item', 'u-tree-view-new', 'u-tree-view-node-new', 'u-tree-select', 'u-tree-select-new', 'u-anchor'].includes(el.tag)) {
|
|
1677
1664
|
addEmpty = false;
|
|
1678
1665
|
}
|
|
1679
1666
|
const background = (emptySlot && emptySlot['empty-background']) || (hasSupport ? 'add-sub' : '');
|