@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.
Files changed (368) hide show
  1. package/out/automate/engine/index.d.ts +1 -0
  2. package/out/automate/engine/index.js +23 -12
  3. package/out/automate/engine/index.js.map +1 -1
  4. package/out/automate/engine/operators.d.ts +10 -2
  5. package/out/automate/engine/operators.js +105 -7
  6. package/out/automate/engine/operators.js.map +1 -1
  7. package/out/automate/engine/uniqueName.d.ts +8 -2
  8. package/out/automate/engine/uniqueName.js +72 -4
  9. package/out/automate/engine/uniqueName.js.map +1 -1
  10. package/out/automate/engine/utils.js +4 -1
  11. package/out/automate/engine/utils.js.map +1 -1
  12. package/out/automate/template/process.d.ts +9 -0
  13. package/out/automate/template/process.js +10976 -0
  14. package/out/automate/template/process.js.map +1 -0
  15. package/out/bak/translator.js +1 -0
  16. package/out/bak/translator.js.map +1 -1
  17. package/out/common/BaseNode.d.ts +5 -0
  18. package/out/common/BaseNode.js +24 -3
  19. package/out/common/BaseNode.js.map +1 -1
  20. package/out/concepts/App__.js +3 -2
  21. package/out/concepts/App__.js.map +1 -1
  22. package/out/concepts/Argument__.js +1 -1
  23. package/out/concepts/Argument__.js.map +1 -1
  24. package/out/concepts/Assignee__.js +1 -1
  25. package/out/concepts/Assignee__.js.map +1 -1
  26. package/out/concepts/Assignment__.js +1 -1
  27. package/out/concepts/Assignment__.js.map +1 -1
  28. package/out/concepts/Attribute__.js +1 -1
  29. package/out/concepts/Attribute__.js.map +1 -1
  30. package/out/concepts/BinaryExpression__.js +1 -1
  31. package/out/concepts/BinaryExpression__.js.map +1 -1
  32. package/out/concepts/BindAttribute__.js +1 -1
  33. package/out/concepts/BindAttribute__.js.map +1 -1
  34. package/out/concepts/BindDirective__.js +9 -2
  35. package/out/concepts/BindDirective__.js.map +1 -1
  36. package/out/concepts/BindEvent__.js +6 -2
  37. package/out/concepts/BindEvent__.js.map +1 -1
  38. package/out/concepts/BooleanLiteral__.d.ts +4 -0
  39. package/out/concepts/BooleanLiteral__.js +12 -1
  40. package/out/concepts/BooleanLiteral__.js.map +1 -1
  41. package/out/concepts/CallFunction__.js +2 -1
  42. package/out/concepts/CallFunction__.js.map +1 -1
  43. package/out/concepts/CallInterface__.js +1 -1
  44. package/out/concepts/CallInterface__.js.map +1 -1
  45. package/out/concepts/CallLogic__.js +27 -11
  46. package/out/concepts/CallLogic__.js.map +1 -1
  47. package/out/concepts/CallQueryComponent__.d.ts +1 -1
  48. package/out/concepts/CallQueryComponent__.js +3 -3
  49. package/out/concepts/CallQueryComponent__.js.map +1 -1
  50. package/out/concepts/Comment__.js +1 -1
  51. package/out/concepts/Comment__.js.map +1 -1
  52. package/out/concepts/CompletionProperty__.js +1 -1
  53. package/out/concepts/CompletionProperty__.js.map +1 -1
  54. package/out/concepts/ConfigGroup__.js +1 -1
  55. package/out/concepts/ConfigGroup__.js.map +1 -1
  56. package/out/concepts/ConfigPropertyValue__.js +1 -1
  57. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  58. package/out/concepts/ConfigProperty__.js +1 -1
  59. package/out/concepts/ConfigProperty__.js.map +1 -1
  60. package/out/concepts/Configuration__.js +1 -1
  61. package/out/concepts/Configuration__.js.map +1 -1
  62. package/out/concepts/Constant__.js +1 -1
  63. package/out/concepts/Constant__.js.map +1 -1
  64. package/out/concepts/DataElement__.js +1 -1
  65. package/out/concepts/DataElement__.js.map +1 -1
  66. package/out/concepts/DataSource__.js +2 -0
  67. package/out/concepts/DataSource__.js.map +1 -1
  68. package/out/concepts/End__.js +1 -1
  69. package/out/concepts/End__.js.map +1 -1
  70. package/out/concepts/EntityIndex__.js +1 -1
  71. package/out/concepts/EntityIndex__.js.map +1 -1
  72. package/out/concepts/EntityProperty__.js +1 -1
  73. package/out/concepts/EntityProperty__.js.map +1 -1
  74. package/out/concepts/Entity__.js +1 -1
  75. package/out/concepts/Entity__.js.map +1 -1
  76. package/out/concepts/EnumItem__.js +1 -1
  77. package/out/concepts/EnumItem__.js.map +1 -1
  78. package/out/concepts/Enum__.js +1 -1
  79. package/out/concepts/Enum__.js.map +1 -1
  80. package/out/concepts/Event__.js +1 -1
  81. package/out/concepts/Event__.js.map +1 -1
  82. package/out/concepts/ForEachStatement__.js +1 -1
  83. package/out/concepts/ForEachStatement__.js.map +1 -1
  84. package/out/concepts/Function__.js +2 -2
  85. package/out/concepts/Function__.js.map +1 -1
  86. package/out/concepts/Identifier__.js +3 -2
  87. package/out/concepts/Identifier__.js.map +1 -1
  88. package/out/concepts/IfStatement__.js +1 -1
  89. package/out/concepts/IfStatement__.js.map +1 -1
  90. package/out/concepts/InterfaceParam__.js +1 -1
  91. package/out/concepts/InterfaceParam__.js.map +1 -1
  92. package/out/concepts/Interface__.js +2 -2
  93. package/out/concepts/Interface__.js.map +1 -1
  94. package/out/concepts/JSBlock__.js +2 -4
  95. package/out/concepts/JSBlock__.js.map +1 -1
  96. package/out/concepts/LogicItem__.js +1 -1
  97. package/out/concepts/LogicItem__.js.map +1 -1
  98. package/out/concepts/Logic__.js +7 -6
  99. package/out/concepts/Logic__.js.map +1 -1
  100. package/out/concepts/MemberExpression__.js +1 -1
  101. package/out/concepts/MemberExpression__.js.map +1 -1
  102. package/out/concepts/Module__.d.ts +118 -112
  103. package/out/concepts/Module__.js +25 -7
  104. package/out/concepts/Module__.js.map +1 -1
  105. package/out/concepts/Namespace__.js +2 -2
  106. package/out/concepts/Namespace__.js.map +1 -1
  107. package/out/concepts/NullLiteral__.js +1 -1
  108. package/out/concepts/NullLiteral__.js.map +1 -1
  109. package/out/concepts/NumericLiteral__.js +1 -1
  110. package/out/concepts/NumericLiteral__.js.map +1 -1
  111. package/out/concepts/Param__.js +2 -2
  112. package/out/concepts/Param__.js.map +1 -1
  113. package/out/concepts/Point__.js +1 -1
  114. package/out/concepts/Point__.js.map +1 -1
  115. package/out/concepts/ProcessComponent__.js +1 -1
  116. package/out/concepts/ProcessComponent__.js.map +1 -1
  117. package/out/concepts/ProcessElement__.js +7 -2
  118. package/out/concepts/ProcessElement__.js.map +1 -1
  119. package/out/concepts/ProcessOutcome__.js +1 -1
  120. package/out/concepts/ProcessOutcome__.js.map +1 -1
  121. package/out/concepts/Process__.d.ts +1 -1
  122. package/out/concepts/Process__.js +2 -2
  123. package/out/concepts/Process__.js.map +1 -1
  124. package/out/concepts/QueryAggregateExpression__.js +1 -1
  125. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  126. package/out/concepts/QueryFieldExpression__.js +1 -1
  127. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  128. package/out/concepts/QueryFromExpression__.js +1 -1
  129. package/out/concepts/QueryFromExpression__.js.map +1 -1
  130. package/out/concepts/QueryGroupByExpression__.js +1 -1
  131. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  132. package/out/concepts/QueryJoinExpression__.js +1 -1
  133. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  134. package/out/concepts/QueryLimitExpression__.js +1 -1
  135. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  136. package/out/concepts/QueryOrderByExpression__.js +1 -1
  137. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  138. package/out/concepts/QuerySelectExpression__.js +1 -1
  139. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  140. package/out/concepts/Rect__.js +1 -1
  141. package/out/concepts/Rect__.js.map +1 -1
  142. package/out/concepts/Return__.js +2 -2
  143. package/out/concepts/Return__.js.map +1 -1
  144. package/out/concepts/Role__.js +1 -1
  145. package/out/concepts/Role__.js.map +1 -1
  146. package/out/concepts/Slot__.js +1 -1
  147. package/out/concepts/Slot__.js.map +1 -1
  148. package/out/concepts/SqlQueryComponent__.d.ts +4 -0
  149. package/out/concepts/SqlQueryComponent__.js +16 -0
  150. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  151. package/out/concepts/Start__.js +1 -1
  152. package/out/concepts/Start__.js.map +1 -1
  153. package/out/concepts/StringLiteral__.d.ts +1 -1
  154. package/out/concepts/StringLiteral__.js +2 -2
  155. package/out/concepts/StringLiteral__.js.map +1 -1
  156. package/out/concepts/StructureProperty__.js +5 -4
  157. package/out/concepts/StructureProperty__.js.map +1 -1
  158. package/out/concepts/Structure__.js +1 -1
  159. package/out/concepts/Structure__.js.map +1 -1
  160. package/out/concepts/SwitchCase__.d.ts +1 -1
  161. package/out/concepts/SwitchCase__.js +19 -21
  162. package/out/concepts/SwitchCase__.js.map +1 -1
  163. package/out/concepts/SwitchStatement__.js +2 -7
  164. package/out/concepts/SwitchStatement__.js.map +1 -1
  165. package/out/concepts/Theme__.js +1 -1
  166. package/out/concepts/Theme__.js.map +1 -1
  167. package/out/concepts/Transactional__.js +1 -1
  168. package/out/concepts/Transactional__.js.map +1 -1
  169. package/out/concepts/TypeAnnotation__.js +2 -2
  170. package/out/concepts/TypeAnnotation__.js.map +1 -1
  171. package/out/concepts/TypeParam__.js +1 -1
  172. package/out/concepts/TypeParam__.js.map +1 -1
  173. package/out/concepts/UnaryExpression__.js +1 -1
  174. package/out/concepts/UnaryExpression__.js.map +1 -1
  175. package/out/concepts/Unparsed__.js +1 -1
  176. package/out/concepts/Unparsed__.js.map +1 -1
  177. package/out/concepts/UseComponent__.js +1 -1
  178. package/out/concepts/UseComponent__.js.map +1 -1
  179. package/out/concepts/ValidationRule__.js +1 -1
  180. package/out/concepts/ValidationRule__.js.map +1 -1
  181. package/out/concepts/Variable__.js +2 -2
  182. package/out/concepts/Variable__.js.map +1 -1
  183. package/out/concepts/ViewComponent__.js +1 -1
  184. package/out/concepts/ViewComponent__.js.map +1 -1
  185. package/out/concepts/ViewElement__.js +9 -4
  186. package/out/concepts/ViewElement__.js.map +1 -1
  187. package/out/concepts/View__.d.ts +0 -2
  188. package/out/concepts/View__.js +4 -11
  189. package/out/concepts/View__.js.map +1 -1
  190. package/out/concepts/WhileStatement__.js +1 -1
  191. package/out/concepts/WhileStatement__.js.map +1 -1
  192. package/out/concepts/basics/stdlib/nasl.auth.js +20 -0
  193. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
  194. package/out/concepts/basics/stdlib/nasl.process.d.ts +4 -0
  195. package/out/concepts/basics/stdlib/nasl.process.js +410 -0
  196. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
  197. package/out/concepts/basics/stdlib/nasl.ui.js +1 -11
  198. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  199. package/out/concepts/basics/stdlib/nasl.util.js +25 -25
  200. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  201. package/out/concepts/basics/types/index.d.ts +1 -0
  202. package/out/concepts/basics/types/index.js +4 -1
  203. package/out/concepts/basics/types/index.js.map +1 -1
  204. package/out/generator/genBundleFiles.d.ts +3 -1
  205. package/out/generator/genBundleFiles.js +16 -3
  206. package/out/generator/genBundleFiles.js.map +1 -1
  207. package/out/generator/genMetaData.d.ts +1 -0
  208. package/out/generator/genMetaData.js +7 -0
  209. package/out/generator/genMetaData.js.map +1 -1
  210. package/out/index.d.ts +1 -1
  211. package/out/index.js +2 -1
  212. package/out/index.js.map +1 -1
  213. package/out/server/getLogics.js +18 -0
  214. package/out/server/getLogics.js.map +1 -1
  215. package/out/server/getMemberIdentifier.js +5 -0
  216. package/out/server/getMemberIdentifier.js.map +1 -1
  217. package/out/server/getProcesses.d.ts +1 -0
  218. package/out/server/getProcesses.js +9 -1
  219. package/out/server/getProcesses.js.map +1 -1
  220. package/out/server/naslServer.d.ts +1 -0
  221. package/out/server/naslServer.js +98 -23
  222. package/out/server/naslServer.js.map +1 -1
  223. package/out/server/translator.js +21 -3
  224. package/out/server/translator.js.map +1 -1
  225. package/out/service/creator/errHandles.js +5 -0
  226. package/out/service/creator/errHandles.js.map +1 -1
  227. package/out/service/storage/init.d.ts +1 -0
  228. package/out/service/storage/init.js +94 -83
  229. package/out/service/storage/init.js.map +1 -1
  230. package/out/templator/genCreateBlock.js +20 -14
  231. package/out/templator/genCreateBlock.js.map +1 -1
  232. package/out/templator/genCurdEditMultipleKeyBlock.js +13 -6
  233. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  234. package/out/templator/genCurdMultipleKeyBlock.js +20 -8
  235. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  236. package/out/templator/genEditTableBlock.js +3 -1
  237. package/out/templator/genEditTableBlock.js.map +1 -1
  238. package/out/templator/genEnumSelectBlock.js +1 -1
  239. package/out/templator/genEnumSelectBlock.js.map +1 -1
  240. package/out/templator/genGridViewBlock.js +8 -4
  241. package/out/templator/genGridViewBlock.js.map +1 -1
  242. package/out/templator/genListViewBlock.js +1 -2
  243. package/out/templator/genListViewBlock.js.map +1 -1
  244. package/out/templator/genQueryComponent.js +20 -21
  245. package/out/templator/genQueryComponent.js.map +1 -1
  246. package/out/templator/genTableBlock.js +14 -6
  247. package/out/templator/genTableBlock.js.map +1 -1
  248. package/out/templator/genUpdateBlock.js +20 -14
  249. package/out/templator/genUpdateBlock.js.map +1 -1
  250. package/out/utils/index.d.ts +1 -0
  251. package/out/utils/index.js +19 -1
  252. package/out/utils/index.js.map +1 -1
  253. package/package.json +1 -1
  254. package/src/automate/engine/index.js +21 -7
  255. package/src/automate/engine/operators.js +114 -17
  256. package/src/automate/engine/uniqueName.js +77 -9
  257. package/src/automate/engine/utils.js +4 -2
  258. package/src/automate/template/process.js +10999 -0
  259. package/src/bak/translator.js +1 -0
  260. package/src/common/BaseNode.ts +21 -4
  261. package/src/concepts/App__.ts +4 -40
  262. package/src/concepts/Argument__.ts +1 -1
  263. package/src/concepts/Assignee__.ts +1 -1
  264. package/src/concepts/Assignment__.ts +1 -1
  265. package/src/concepts/Attribute__.ts +1 -1
  266. package/src/concepts/BinaryExpression__.ts +1 -1
  267. package/src/concepts/BindAttribute__.ts +1 -1
  268. package/src/concepts/BindDirective__.ts +8 -6
  269. package/src/concepts/BindEvent__.ts +6 -2
  270. package/src/concepts/BooleanLiteral__.ts +13 -1
  271. package/src/concepts/CallFunction__.ts +15 -14
  272. package/src/concepts/CallInterface__.ts +1 -1
  273. package/src/concepts/CallLogic__.ts +26 -11
  274. package/src/concepts/CallQueryComponent__.ts +32 -4
  275. package/src/concepts/Comment__.ts +1 -1
  276. package/src/concepts/CompletionProperty__.ts +1 -1
  277. package/src/concepts/ConfigGroup__.ts +1 -1
  278. package/src/concepts/ConfigPropertyValue__.ts +1 -1
  279. package/src/concepts/ConfigProperty__.ts +1 -1
  280. package/src/concepts/Configuration__.ts +1 -1
  281. package/src/concepts/Constant__.ts +1 -1
  282. package/src/concepts/DataElement__.ts +1 -1
  283. package/src/concepts/DataSource__.ts +2 -0
  284. package/src/concepts/End__.ts +1 -1
  285. package/src/concepts/EntityIndex__.ts +1 -1
  286. package/src/concepts/EntityProperty__.ts +1 -1
  287. package/src/concepts/Entity__.ts +1 -1
  288. package/src/concepts/EnumItem__.ts +1 -1
  289. package/src/concepts/Enum__.ts +1 -1
  290. package/src/concepts/Event__.ts +1 -1
  291. package/src/concepts/ForEachStatement__.ts +1 -1
  292. package/src/concepts/Function__.ts +5 -5
  293. package/src/concepts/Identifier__.ts +3 -2
  294. package/src/concepts/IfStatement__.ts +1 -1
  295. package/src/concepts/InterfaceParam__.ts +1 -1
  296. package/src/concepts/Interface__.ts +2 -2
  297. package/src/concepts/JSBlock__.ts +2 -11
  298. package/src/concepts/LogicItem__.ts +1 -1
  299. package/src/concepts/Logic__.ts +8 -44
  300. package/src/concepts/MemberExpression__.ts +1 -1
  301. package/src/concepts/Module__.ts +141 -147
  302. package/src/concepts/Namespace__.ts +2 -2
  303. package/src/concepts/NullLiteral__.ts +1 -1
  304. package/src/concepts/NumericLiteral__.ts +1 -1
  305. package/src/concepts/Param__.ts +2 -2
  306. package/src/concepts/Point__.ts +1 -1
  307. package/src/concepts/ProcessComponent__.ts +1 -1
  308. package/src/concepts/ProcessElement__.ts +8 -3
  309. package/src/concepts/ProcessOutcome__.ts +1 -1
  310. package/src/concepts/Process__.ts +3 -3
  311. package/src/concepts/QueryAggregateExpression__.ts +1 -1
  312. package/src/concepts/QueryFieldExpression__.ts +1 -1
  313. package/src/concepts/QueryFromExpression__.ts +1 -1
  314. package/src/concepts/QueryGroupByExpression__.ts +1 -1
  315. package/src/concepts/QueryJoinExpression__.ts +1 -1
  316. package/src/concepts/QueryLimitExpression__.ts +1 -1
  317. package/src/concepts/QueryOrderByExpression__.ts +1 -1
  318. package/src/concepts/QuerySelectExpression__.ts +1 -1
  319. package/src/concepts/Rect__.ts +1 -1
  320. package/src/concepts/Return__.ts +2 -2
  321. package/src/concepts/Role__.ts +1 -1
  322. package/src/concepts/Slot__.ts +1 -1
  323. package/src/concepts/SqlQueryComponent__.ts +17 -0
  324. package/src/concepts/Start__.ts +1 -1
  325. package/src/concepts/StringLiteral__.ts +2 -2
  326. package/src/concepts/StructureProperty__.ts +5 -8
  327. package/src/concepts/Structure__.ts +1 -1
  328. package/src/concepts/SwitchCase__.ts +19 -23
  329. package/src/concepts/SwitchStatement__.ts +2 -6
  330. package/src/concepts/Theme__.ts +1 -1
  331. package/src/concepts/Transactional__.ts +1 -1
  332. package/src/concepts/TypeAnnotation__.ts +21 -2
  333. package/src/concepts/TypeParam__.ts +1 -1
  334. package/src/concepts/UnaryExpression__.ts +1 -1
  335. package/src/concepts/Unparsed__.ts +1 -1
  336. package/src/concepts/UseComponent__.ts +1 -1
  337. package/src/concepts/ValidationRule__.ts +1 -1
  338. package/src/concepts/Variable__.ts +2 -2
  339. package/src/concepts/ViewComponent__.ts +1 -1
  340. package/src/concepts/ViewElement__.ts +10 -23
  341. package/src/concepts/View__.ts +6 -13
  342. package/src/concepts/WhileStatement__.ts +1 -1
  343. package/src/concepts/basics/stdlib/nasl.auth.ts +20 -0
  344. package/src/concepts/basics/stdlib/nasl.process.ts +406 -0
  345. package/src/concepts/basics/stdlib/nasl.ui.ts +1 -11
  346. package/src/concepts/basics/stdlib/nasl.util.ts +25 -25
  347. package/src/concepts/basics/types/index.ts +1 -0
  348. package/src/generator/genBundleFiles.ts +21 -5
  349. package/src/generator/genMetaData.ts +10 -1
  350. package/src/index.ts +1 -1
  351. package/src/server/getLogics.ts +18 -1
  352. package/src/server/getMemberIdentifier.ts +4 -0
  353. package/src/server/getProcesses.ts +8 -1
  354. package/src/server/naslServer.ts +107 -28
  355. package/src/server/translator.ts +20 -3
  356. package/src/service/creator/errHandles.js +6 -0
  357. package/src/service/storage/init.ts +96 -85
  358. package/src/templator/genCreateBlock.ts +20 -14
  359. package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -8
  360. package/src/templator/genCurdMultipleKeyBlock.ts +20 -9
  361. package/src/templator/genEditTableBlock.ts +3 -1
  362. package/src/templator/genEnumSelectBlock.ts +1 -1
  363. package/src/templator/genGridViewBlock.ts +8 -4
  364. package/src/templator/genListViewBlock.ts +1 -2
  365. package/src/templator/genQueryComponent.ts +22 -21
  366. package/src/templator/genTableBlock.ts +14 -7
  367. package/src/templator/genUpdateBlock.ts +20 -14
  368. package/src/utils/index.ts +19 -0
@@ -259,7 +259,7 @@ export class QueryFromExpression extends LogicItem {
259
259
  //================================================================================
260
260
  }
261
261
 
262
- classMap.QueryFromExpression = QueryFromExpression;
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.QueryGroupByExpression = QueryGroupByExpression;
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.QueryJoinExpression = QueryJoinExpression;
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.QueryLimitExpression = QueryLimitExpression;
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.QueryOrderByExpression = QueryOrderByExpression;
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.QuerySelectExpression = QuerySelectExpression;
275
+ classMap['QuerySelectExpression'] = QuerySelectExpression;
276
276
  export default QuerySelectExpression;
277
277
  //================================================================================
278
278
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -89,7 +89,7 @@ export class Rect extends BaseNode {
89
89
  //================================================================================
90
90
  }
91
91
 
92
- classMap.Rect = Rect;
92
+ classMap['Rect'] = Rect;
93
93
  export default Rect;
94
94
  //================================================================================
95
95
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -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.Return = Return;
371
+ classMap['Return'] = Return;
372
372
  export default Return;
373
373
  //================================================================================
374
374
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -161,7 +161,7 @@ export class Role extends BaseNode {
161
161
  //================================================================================
162
162
  }
163
163
 
164
- classMap.Role = Role;
164
+ classMap['Role'] = Role;
165
165
  export default Role;
166
166
  //================================================================================
167
167
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -114,7 +114,7 @@ export class Slot extends BaseNode {
114
114
  //================================================================================
115
115
  }
116
116
 
117
- classMap.Slot = Slot;
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';
@@ -71,7 +71,7 @@ export class Start extends LogicItem {
71
71
  //================================================================================
72
72
  }
73
73
 
74
- classMap.Start = Start;
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.StringLiteral = StringLiteral;
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
- if (this.defaultValue) {
288
- code += ` = ${this.defaultValue}`;
289
- } // else
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.Structure = Structure;
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, isLast?: boolean): string {
244
+ toJS(state?: TranslatorState, index?: number, length?: number): string {
245
245
  let code = '';
246
- if (!isLast) {
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 (Array.isArray(this.consequent)) {
255
- this.consequent.forEach((logicItem) => {
256
- code
257
- += logicItem.toJS(shiftState(state, code, {
258
- tabSize: 0,
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.SwitchCase = SwitchCase;
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
- if (index === this.cases.length - 1) {
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.SwitchStatement = SwitchStatement;
247
+ classMap['SwitchStatement'] = SwitchStatement;
252
248
  export default SwitchStatement;
253
249
  //================================================================================
254
250
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -87,7 +87,7 @@ export class Theme extends BaseNode {
87
87
  //================================================================================
88
88
  }
89
89
 
90
- classMap.Theme = Theme;
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.Transactional = Transactional;
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
- const typeAnnotation: TypeAnnotation = options;
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.TypeAnnotation = TypeAnnotation;
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.TypeParam = TypeParam;
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.UnaryExpression = UnaryExpression;
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.Unparsed = Unparsed;
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.UseComponent = UseComponent;
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.ValidationRule = ValidationRule;
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.Variable = Variable;
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.ViewComponent = ViewComponent;
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
- getBindAttributeExistingNames(excludedList: Array<BindAttribute> = []) {
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.match(/{{(.*?)}}/)[1].trim();
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' : '');