@lcap/nasl 1.0.0-alpha.9 → 1.0.2

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 (481) hide show
  1. package/out/automate/engine/index.d.ts +3 -0
  2. package/out/automate/engine/index.js +414 -0
  3. package/out/automate/engine/index.js.map +1 -0
  4. package/out/automate/engine/operators.d.ts +13 -0
  5. package/out/automate/engine/operators.js +63 -0
  6. package/out/automate/engine/operators.js.map +1 -0
  7. package/out/automate/engine/uniqueName.d.ts +6 -0
  8. package/out/automate/engine/uniqueName.js +39 -0
  9. package/out/automate/engine/uniqueName.js.map +1 -0
  10. package/out/automate/engine/utils.d.ts +24 -0
  11. package/out/automate/engine/utils.js +379 -0
  12. package/out/automate/engine/utils.js.map +1 -0
  13. package/out/common/BaseNode.d.ts +21 -1
  14. package/out/common/BaseNode.js +232 -84
  15. package/out/common/BaseNode.js.map +1 -1
  16. package/out/concepts/App__.d.ts +19 -1
  17. package/out/concepts/App__.js +88 -45
  18. package/out/concepts/App__.js.map +1 -1
  19. package/out/concepts/Argument__.d.ts +5 -1
  20. package/out/concepts/Argument__.js +21 -3
  21. package/out/concepts/Argument__.js.map +1 -1
  22. package/out/concepts/Assignee__.d.ts +201 -0
  23. package/out/concepts/Assignee__.js +298 -0
  24. package/out/concepts/Assignee__.js.map +1 -0
  25. package/out/concepts/Assignment__.js +5 -0
  26. package/out/concepts/Assignment__.js.map +1 -1
  27. package/out/concepts/BinaryExpression__.js +8 -7
  28. package/out/concepts/BinaryExpression__.js.map +1 -1
  29. package/out/concepts/BindAttribute__.d.ts +19 -0
  30. package/out/concepts/BindAttribute__.js +55 -10
  31. package/out/concepts/BindAttribute__.js.map +1 -1
  32. package/out/concepts/BindDirective__.js +23 -3
  33. package/out/concepts/BindDirective__.js.map +1 -1
  34. package/out/concepts/BindEvent__.d.ts +2 -2
  35. package/out/concepts/BindEvent__.js +67 -34
  36. package/out/concepts/BindEvent__.js.map +1 -1
  37. package/out/concepts/BooleanLiteral__.d.ts +2 -0
  38. package/out/concepts/BooleanLiteral__.js +10 -0
  39. package/out/concepts/BooleanLiteral__.js.map +1 -1
  40. package/out/concepts/CallFunction__.js +58 -25
  41. package/out/concepts/CallFunction__.js.map +1 -1
  42. package/out/concepts/CallInterface__.d.ts +5 -0
  43. package/out/concepts/CallInterface__.js +238 -31
  44. package/out/concepts/CallInterface__.js.map +1 -1
  45. package/out/concepts/CallLogic__.d.ts +4 -4
  46. package/out/concepts/CallLogic__.js +107 -50
  47. package/out/concepts/CallLogic__.js.map +1 -1
  48. package/out/concepts/CallQueryComponent__.d.ts +38 -3
  49. package/out/concepts/CallQueryComponent__.js +329 -75
  50. package/out/concepts/CallQueryComponent__.js.map +1 -1
  51. package/out/concepts/Comment__.js +6 -2
  52. package/out/concepts/Comment__.js.map +1 -1
  53. package/out/concepts/CompletionProperty__.d.ts +3 -1
  54. package/out/concepts/CompletionProperty__.js +2 -0
  55. package/out/concepts/CompletionProperty__.js.map +1 -1
  56. package/out/concepts/ConfigGroup__.js +3 -3
  57. package/out/concepts/ConfigGroup__.js.map +1 -1
  58. package/out/concepts/ConfigProperty__.js +3 -3
  59. package/out/concepts/ConfigProperty__.js.map +1 -1
  60. package/out/concepts/Configuration__.js +3 -3
  61. package/out/concepts/Configuration__.js.map +1 -1
  62. package/out/concepts/Constant__.d.ts +1 -0
  63. package/out/concepts/Constant__.js +16 -2
  64. package/out/concepts/Constant__.js.map +1 -1
  65. package/out/concepts/Destination__.d.ts +12 -0
  66. package/out/concepts/Destination__.js +115 -22
  67. package/out/concepts/Destination__.js.map +1 -1
  68. package/out/concepts/End__.js +9 -1
  69. package/out/concepts/End__.js.map +1 -1
  70. package/out/concepts/EntityIndex__.js +4 -2
  71. package/out/concepts/EntityIndex__.js.map +1 -1
  72. package/out/concepts/EntityProperty__.d.ts +11 -0
  73. package/out/concepts/EntityProperty__.js +71 -5
  74. package/out/concepts/EntityProperty__.js.map +1 -1
  75. package/out/concepts/Entity__.d.ts +5 -4
  76. package/out/concepts/Entity__.js +35 -19
  77. package/out/concepts/Entity__.js.map +1 -1
  78. package/out/concepts/Enum__.d.ts +5 -0
  79. package/out/concepts/Enum__.js +24 -12
  80. package/out/concepts/Enum__.js.map +1 -1
  81. package/out/concepts/Event__.js +3 -3
  82. package/out/concepts/Event__.js.map +1 -1
  83. package/out/concepts/ForEachStatement__.d.ts +1 -1
  84. package/out/concepts/ForEachStatement__.js +11 -15
  85. package/out/concepts/ForEachStatement__.js.map +1 -1
  86. package/out/concepts/Function__.js +13 -13
  87. package/out/concepts/Function__.js.map +1 -1
  88. package/out/concepts/Identifier__.d.ts +3 -0
  89. package/out/concepts/Identifier__.js +77 -30
  90. package/out/concepts/Identifier__.js.map +1 -1
  91. package/out/concepts/IfStatement__.js +4 -4
  92. package/out/concepts/IfStatement__.js.map +1 -1
  93. package/out/concepts/InterfaceParam__.d.ts +6 -4
  94. package/out/concepts/InterfaceParam__.js +57 -19
  95. package/out/concepts/InterfaceParam__.js.map +1 -1
  96. package/out/concepts/Interface__.d.ts +42 -30
  97. package/out/concepts/Interface__.js +133 -17
  98. package/out/concepts/Interface__.js.map +1 -1
  99. package/out/concepts/JSBlock__.d.ts +1 -0
  100. package/out/concepts/JSBlock__.js +3 -0
  101. package/out/concepts/JSBlock__.js.map +1 -1
  102. package/out/concepts/LogicItem__.d.ts +2 -1
  103. package/out/concepts/LogicItem__.js +14 -0
  104. package/out/concepts/LogicItem__.js.map +1 -1
  105. package/out/concepts/Logic__.d.ts +20 -1
  106. package/out/concepts/Logic__.js +194 -37
  107. package/out/concepts/Logic__.js.map +1 -1
  108. package/out/concepts/MemberExpression__.d.ts +2 -0
  109. package/out/concepts/MemberExpression__.js +49 -13
  110. package/out/concepts/MemberExpression__.js.map +1 -1
  111. package/out/concepts/Module__.d.ts +126 -120
  112. package/out/concepts/Module__.js +36 -26
  113. package/out/concepts/Module__.js.map +1 -1
  114. package/out/concepts/Namespace__.d.ts +5 -1
  115. package/out/concepts/Namespace__.js +48 -37
  116. package/out/concepts/Namespace__.js.map +1 -1
  117. package/out/concepts/NullLiteral__.d.ts +3 -0
  118. package/out/concepts/NullLiteral__.js +11 -1
  119. package/out/concepts/NullLiteral__.js.map +1 -1
  120. package/out/concepts/NumericLiteral__.d.ts +1 -1
  121. package/out/concepts/NumericLiteral__.js +17 -6
  122. package/out/concepts/NumericLiteral__.js.map +1 -1
  123. package/out/concepts/Param__.d.ts +7 -3
  124. package/out/concepts/Param__.js +64 -28
  125. package/out/concepts/Param__.js.map +1 -1
  126. package/out/concepts/ProcessComponent__.js +6 -6
  127. package/out/concepts/ProcessComponent__.js.map +1 -1
  128. package/out/concepts/ProcessElement__.d.ts +0 -4
  129. package/out/concepts/ProcessElement__.js +123 -54
  130. package/out/concepts/ProcessElement__.js.map +1 -1
  131. package/out/concepts/ProcessOutcome__.js +1 -1
  132. package/out/concepts/ProcessOutcome__.js.map +1 -1
  133. package/out/concepts/Process__.d.ts +7 -1
  134. package/out/concepts/Process__.js +81 -85
  135. package/out/concepts/Process__.js.map +1 -1
  136. package/out/concepts/QueryAggregateExpression__.js +1 -1
  137. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  138. package/out/concepts/QueryFieldExpression__.d.ts +1 -0
  139. package/out/concepts/QueryFieldExpression__.js +3 -0
  140. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  141. package/out/concepts/QueryFromExpression__.js +2 -2
  142. package/out/concepts/QueryFromExpression__.js.map +1 -1
  143. package/out/concepts/QueryGroupByExpression__.d.ts +3 -0
  144. package/out/concepts/QueryGroupByExpression__.js +20 -0
  145. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  146. package/out/concepts/QueryJoinExpression__.js +5 -5
  147. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  148. package/out/concepts/QueryLimitExpression__.js +2 -2
  149. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  150. package/out/concepts/QuerySelectExpression__.js +3 -3
  151. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  152. package/out/concepts/Return__.d.ts +4 -1
  153. package/out/concepts/Return__.js +74 -23
  154. package/out/concepts/Return__.js.map +1 -1
  155. package/out/concepts/Role__.d.ts +4 -0
  156. package/out/concepts/Role__.js +13 -4
  157. package/out/concepts/Role__.js.map +1 -1
  158. package/out/concepts/SqlQueryComponent__.js +2 -2
  159. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  160. package/out/concepts/StringLiteral__.d.ts +1 -1
  161. package/out/concepts/StringLiteral__.js +22 -39
  162. package/out/concepts/StringLiteral__.js.map +1 -1
  163. package/out/concepts/StructureProperty__.d.ts +5 -4
  164. package/out/concepts/StructureProperty__.js +55 -26
  165. package/out/concepts/StructureProperty__.js.map +1 -1
  166. package/out/concepts/Structure__.d.ts +44 -30
  167. package/out/concepts/Structure__.js +44 -12
  168. package/out/concepts/Structure__.js.map +1 -1
  169. package/out/concepts/SwitchCase__.js +4 -4
  170. package/out/concepts/SwitchCase__.js.map +1 -1
  171. package/out/concepts/SwitchStatement__.js +2 -2
  172. package/out/concepts/SwitchStatement__.js.map +1 -1
  173. package/out/concepts/TypeAnnotation__.d.ts +5 -5
  174. package/out/concepts/TypeAnnotation__.js +82 -20
  175. package/out/concepts/TypeAnnotation__.js.map +1 -1
  176. package/out/concepts/UnaryExpression__.js +10 -8
  177. package/out/concepts/UnaryExpression__.js.map +1 -1
  178. package/out/concepts/Unparsed__.js +1 -1
  179. package/out/concepts/Unparsed__.js.map +1 -1
  180. package/out/concepts/ValidationRule__.d.ts +1 -0
  181. package/out/concepts/ValidationRule__.js +48 -13
  182. package/out/concepts/ValidationRule__.js.map +1 -1
  183. package/out/concepts/Variable__.d.ts +10 -1
  184. package/out/concepts/Variable__.js +77 -20
  185. package/out/concepts/Variable__.js.map +1 -1
  186. package/out/concepts/ViewComponent__.js +15 -15
  187. package/out/concepts/ViewComponent__.js.map +1 -1
  188. package/out/concepts/ViewElement__.d.ts +17 -11
  189. package/out/concepts/ViewElement__.js +302 -204
  190. package/out/concepts/ViewElement__.js.map +1 -1
  191. package/out/concepts/View__.d.ts +13 -12
  192. package/out/concepts/View__.js +124 -102
  193. package/out/concepts/View__.js.map +1 -1
  194. package/out/concepts/WhileStatement__.js +3 -3
  195. package/out/concepts/WhileStatement__.js.map +1 -1
  196. package/out/concepts/basics/stdlib/index.js +4 -1
  197. package/out/concepts/basics/stdlib/index.js.map +1 -1
  198. package/out/concepts/basics/stdlib/{nasl.validate.d.ts → nasl.auth.d.ts} +0 -0
  199. package/out/concepts/basics/stdlib/nasl.auth.js +30 -0
  200. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
  201. package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
  202. package/out/concepts/basics/stdlib/nasl.browser.js +41 -0
  203. package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
  204. package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
  205. package/out/concepts/basics/stdlib/nasl.configuration.js +25 -0
  206. package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
  207. package/out/concepts/basics/stdlib/nasl.interface.d.ts +2 -0
  208. package/out/concepts/basics/stdlib/nasl.interface.js +4 -4
  209. package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -1
  210. package/out/concepts/basics/stdlib/nasl.ui.js +20 -0
  211. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  212. package/out/concepts/basics/stdlib/nasl.util.js +138 -18
  213. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  214. package/out/concepts/basics/stdlib/nasl.validation.js +54 -20
  215. package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -1
  216. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +1 -1
  217. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -1
  218. package/out/concepts/basics/types/coreTypeList.js +11 -10
  219. package/out/concepts/basics/types/coreTypeList.js.map +1 -1
  220. package/out/concepts/basics/types/index.d.ts +1 -0
  221. package/out/concepts/basics/types/index.js +3 -1
  222. package/out/concepts/basics/types/index.js.map +1 -1
  223. package/out/concepts/index__.d.ts +1 -0
  224. package/out/concepts/index__.js +1 -0
  225. package/out/concepts/index__.js.map +1 -1
  226. package/out/config.d.ts +1 -2
  227. package/out/config.js +1 -2
  228. package/out/config.js.map +1 -1
  229. package/out/enums/KEYWORDS.d.ts +3 -0
  230. package/out/enums/KEYWORDS.js +1199 -0
  231. package/out/enums/KEYWORDS.js.map +1 -0
  232. package/out/{terms → enums}/LEVEL_NAME_MAP.d.ts +0 -0
  233. package/out/{terms → enums}/LEVEL_NAME_MAP.js +0 -0
  234. package/out/{terms → enums}/LEVEL_NAME_MAP.js.map +1 -1
  235. package/out/eventBus.d.ts +3 -0
  236. package/out/eventBus.js +7 -0
  237. package/out/eventBus.js.map +1 -0
  238. package/out/generator/genBundleFiles.d.ts +7 -2
  239. package/out/generator/genBundleFiles.js +168 -27
  240. package/out/generator/genBundleFiles.js.map +1 -1
  241. package/out/generator/genMetaData.d.ts +20 -20
  242. package/out/generator/genMetaData.js +50 -15
  243. package/out/generator/genMetaData.js.map +1 -1
  244. package/out/index.d.ts +2 -0
  245. package/out/index.js +2 -0
  246. package/out/index.js.map +1 -1
  247. package/out/manager/diagnostic.d.ts +2 -2
  248. package/out/server/createUiTs.d.ts +1 -0
  249. package/out/server/createUiTs.js +49 -5
  250. package/out/server/createUiTs.js.map +1 -1
  251. package/out/server/entity2LogicNamespace.js +38 -23
  252. package/out/server/entity2LogicNamespace.js.map +1 -1
  253. package/out/server/extendBaseNode.d.ts +1 -0
  254. package/out/server/extendBaseNode.js +323 -0
  255. package/out/server/extendBaseNode.js.map +1 -0
  256. package/out/server/getExtensionModules.js +2 -0
  257. package/out/server/getExtensionModules.js.map +1 -1
  258. package/out/server/getFunctions.d.ts +1 -0
  259. package/out/server/getFunctions.js +7 -1
  260. package/out/server/getFunctions.js.map +1 -1
  261. package/out/server/getLogics.js +84 -18
  262. package/out/server/getLogics.js.map +1 -1
  263. package/out/server/getMemberIdentifier.d.ts +16 -1
  264. package/out/server/getMemberIdentifier.js +326 -38
  265. package/out/server/getMemberIdentifier.js.map +1 -1
  266. package/out/server/getProcesses.d.ts +8 -1
  267. package/out/server/getProcesses.js +383 -1
  268. package/out/server/getProcesses.js.map +1 -1
  269. package/out/server/getScope.d.ts +13 -0
  270. package/out/server/getScope.js +61 -0
  271. package/out/server/getScope.js.map +1 -0
  272. package/out/server/index.d.ts +1 -0
  273. package/out/server/index.js +5 -0
  274. package/out/server/index.js.map +1 -1
  275. package/out/server/naslServer.d.ts +36 -57
  276. package/out/server/naslServer.js +689 -615
  277. package/out/server/naslServer.js.map +1 -1
  278. package/out/server/process2LogicNamespace.d.ts +10 -0
  279. package/out/server/process2LogicNamespace.js +29 -1
  280. package/out/server/process2LogicNamespace.js.map +1 -1
  281. package/out/server/translator.d.ts +22 -3
  282. package/out/server/translator.js +369 -123
  283. package/out/server/translator.js.map +1 -1
  284. package/out/service/creator/add.configs.d.ts +1 -0
  285. package/out/service/creator/add.configs.js +68 -0
  286. package/out/service/creator/add.configs.js.map +1 -0
  287. package/out/service/creator/errHandles.d.ts +18 -0
  288. package/out/service/creator/errHandles.js +60 -0
  289. package/out/service/creator/errHandles.js.map +1 -0
  290. package/out/service/creator/index.d.ts +1 -0
  291. package/out/service/creator/index.js +72 -0
  292. package/out/service/creator/index.js.map +1 -0
  293. package/out/service/storage/api.d.ts +18 -0
  294. package/out/service/storage/api.js +17 -0
  295. package/out/service/storage/api.js.map +1 -0
  296. package/out/service/storage/init.js +221 -37
  297. package/out/service/storage/init.js.map +1 -1
  298. package/out/service/storage/service.d.ts +2 -0
  299. package/out/service/storage/service.js +10 -0
  300. package/out/service/storage/service.js.map +1 -0
  301. package/out/service/storage/storagePoint.d.ts +1 -14
  302. package/out/service/storage/storagePoint.js +16 -16
  303. package/out/service/storage/storagePoint.js.map +1 -1
  304. package/out/templator/genCreateBlock.js +6 -6
  305. package/out/templator/genCreateBlock.js.map +1 -1
  306. package/out/templator/genCurdEditMultipleKeyBlock.js +13 -17
  307. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  308. package/out/templator/genCurdMultipleKeyBlock.js +11 -11
  309. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  310. package/out/templator/genEditTableBlock.js +5 -5
  311. package/out/templator/genEditTableBlock.js.map +1 -1
  312. package/out/templator/genEnumSelectBlock.js +2 -2
  313. package/out/templator/genEnumSelectBlock.js.map +1 -1
  314. package/out/templator/genGetBlock.js +6 -4
  315. package/out/templator/genGetBlock.js.map +1 -1
  316. package/out/templator/genGridViewBlock.d.ts +3 -1
  317. package/out/templator/genGridViewBlock.js +61 -6
  318. package/out/templator/genGridViewBlock.js.map +1 -1
  319. package/out/templator/genQueryComponent.d.ts +2 -0
  320. package/out/templator/genQueryComponent.js +34 -18
  321. package/out/templator/genQueryComponent.js.map +1 -1
  322. package/out/templator/genSelectBlock.js +5 -15
  323. package/out/templator/genSelectBlock.js.map +1 -1
  324. package/out/templator/genTableBlock.d.ts +1 -1
  325. package/out/templator/genTableBlock.js +4 -5
  326. package/out/templator/genTableBlock.js.map +1 -1
  327. package/out/templator/genUpdateBlock.js +10 -11
  328. package/out/templator/genUpdateBlock.js.map +1 -1
  329. package/out/templator/utils.d.ts +16 -5
  330. package/out/templator/utils.js +10 -5
  331. package/out/templator/utils.js.map +1 -1
  332. package/out/test/fixtures/env.js +0 -1
  333. package/out/test/fixtures/env.js.map +1 -1
  334. package/out/test/units/page/Element.spec.js +3 -3
  335. package/out/test/units/page/Element.spec.js.map +1 -1
  336. package/out/test/units/temp/temp.spec.js +1 -1
  337. package/out/test/units/temp/temp.spec.js.map +1 -1
  338. package/out/utils/index.d.ts +6 -0
  339. package/out/utils/index.js +25 -1
  340. package/out/utils/index.js.map +1 -1
  341. package/out/utils/string.d.ts +1 -1
  342. package/out/utils/string.js +38 -9
  343. package/out/utils/string.js.map +1 -1
  344. package/package.json +2 -2
  345. package/src/automate/engine/index.js +95 -119
  346. package/src/automate/engine/operators.js +63 -0
  347. package/src/automate/engine/uniqueName.js +36 -0
  348. package/src/automate/engine/utils.js +63 -19
  349. package/src/common/BaseNode.ts +229 -74
  350. package/src/concepts/App__.ts +92 -85
  351. package/src/concepts/Argument__.ts +23 -3
  352. package/src/concepts/Assignee__.ts +467 -0
  353. package/src/concepts/Assignment__.ts +4 -1
  354. package/src/concepts/BinaryExpression__.ts +9 -7
  355. package/src/concepts/BindAttribute__.ts +69 -9
  356. package/src/concepts/BindDirective__.ts +22 -3
  357. package/src/concepts/BindEvent__.ts +67 -23
  358. package/src/concepts/BooleanLiteral__.ts +8 -0
  359. package/src/concepts/CallFunction__.ts +55 -23
  360. package/src/concepts/CallInterface__.ts +236 -26
  361. package/src/concepts/CallLogic__.ts +111 -52
  362. package/src/concepts/CallQueryComponent__.ts +315 -67
  363. package/src/concepts/Comment__.ts +6 -2
  364. package/src/concepts/CompletionProperty__.ts +5 -1
  365. package/src/concepts/ConfigGroup__.ts +3 -3
  366. package/src/concepts/ConfigProperty__.ts +3 -3
  367. package/src/concepts/Configuration__.ts +3 -3
  368. package/src/concepts/Constant__.ts +14 -2
  369. package/src/concepts/Destination__.ts +123 -37
  370. package/src/concepts/End__.ts +8 -1
  371. package/src/concepts/EntityIndex__.ts +4 -2
  372. package/src/concepts/EntityProperty__.ts +56 -5
  373. package/src/concepts/Entity__.ts +38 -21
  374. package/src/concepts/Enum__.ts +23 -26
  375. package/src/concepts/Event__.ts +3 -3
  376. package/src/concepts/ForEachStatement__.ts +16 -21
  377. package/src/concepts/Function__.ts +13 -13
  378. package/src/concepts/Identifier__.ts +84 -42
  379. package/src/concepts/IfStatement__.ts +4 -4
  380. package/src/concepts/InterfaceParam__.ts +57 -16
  381. package/src/concepts/Interface__.ts +130 -16
  382. package/src/concepts/JSBlock__.ts +4 -0
  383. package/src/concepts/LogicItem__.ts +16 -1
  384. package/src/concepts/Logic__.ts +192 -39
  385. package/src/concepts/MemberExpression__.ts +58 -15
  386. package/src/concepts/Module__.ts +35 -24
  387. package/src/concepts/Namespace__.ts +49 -37
  388. package/src/concepts/NullLiteral__.ts +8 -1
  389. package/src/concepts/NumericLiteral__.ts +17 -6
  390. package/src/concepts/Param__.ts +64 -16
  391. package/src/concepts/ProcessComponent__.ts +6 -6
  392. package/src/concepts/ProcessElement__.ts +149 -44
  393. package/src/concepts/ProcessOutcome__.ts +1 -1
  394. package/src/concepts/Process__.ts +85 -98
  395. package/src/concepts/QueryAggregateExpression__.ts +1 -1
  396. package/src/concepts/QueryFieldExpression__.ts +4 -0
  397. package/src/concepts/QueryFromExpression__.ts +2 -2
  398. package/src/concepts/QueryGroupByExpression__.ts +23 -0
  399. package/src/concepts/QueryJoinExpression__.ts +5 -5
  400. package/src/concepts/QueryLimitExpression__.ts +2 -2
  401. package/src/concepts/QuerySelectExpression__.ts +3 -3
  402. package/src/concepts/Return__.ts +69 -17
  403. package/src/concepts/Role__.ts +5 -4
  404. package/src/concepts/SqlQueryComponent__.ts +2 -2
  405. package/src/concepts/StringLiteral__.ts +21 -39
  406. package/src/concepts/StructureProperty__.ts +50 -18
  407. package/src/concepts/Structure__.ts +32 -10
  408. package/src/concepts/SwitchCase__.ts +4 -4
  409. package/src/concepts/SwitchStatement__.ts +2 -2
  410. package/src/concepts/TypeAnnotation__.ts +66 -15
  411. package/src/concepts/UnaryExpression__.ts +10 -8
  412. package/src/concepts/Unparsed__.ts +1 -1
  413. package/src/concepts/ValidationRule__.ts +44 -14
  414. package/src/concepts/Variable__.ts +70 -16
  415. package/src/concepts/ViewComponent__.ts +15 -15
  416. package/src/concepts/ViewElement__.ts +289 -166
  417. package/src/concepts/View__.ts +135 -69
  418. package/src/concepts/WhileStatement__.ts +4 -4
  419. package/src/concepts/basics/stdlib/index.ts +4 -2
  420. package/src/concepts/basics/stdlib/nasl.auth.ts +26 -0
  421. package/src/concepts/basics/stdlib/nasl.browser.ts +37 -0
  422. package/src/concepts/basics/stdlib/nasl.configuration.ts +21 -0
  423. package/src/concepts/basics/stdlib/nasl.interface.ts +1 -1
  424. package/src/concepts/basics/stdlib/nasl.ui.ts +20 -1
  425. package/src/concepts/basics/stdlib/nasl.util.ts +140 -18
  426. package/src/concepts/basics/stdlib/nasl.validation.ts +45 -11
  427. package/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts +1 -1
  428. package/src/concepts/basics/types/coreTypeList.ts +11 -11
  429. package/src/concepts/basics/types/index.ts +1 -0
  430. package/src/concepts/index__.ts +1 -0
  431. package/src/config.ts +1 -2
  432. package/src/enums/KEYWORDS.ts +1197 -0
  433. package/src/{terms → enums}/LEVEL_NAME_MAP.ts +0 -0
  434. package/src/eventBus.ts +5 -0
  435. package/src/generator/genBundleFiles.ts +182 -30
  436. package/src/generator/genMetaData.ts +72 -21
  437. package/src/index.ts +2 -0
  438. package/src/manager/diagnostic.ts +2 -2
  439. package/src/server/createUiTs.ts +45 -7
  440. package/src/server/entity2LogicNamespace.ts +41 -25
  441. package/src/server/extendBaseNode.ts +318 -0
  442. package/src/server/getExtensionModules.ts +2 -0
  443. package/src/server/getFunctions.ts +6 -0
  444. package/src/server/getLogics.ts +87 -19
  445. package/src/server/getMemberIdentifier.ts +282 -65
  446. package/src/server/getProcesses.ts +397 -4
  447. package/src/server/getScope.ts +67 -0
  448. package/src/server/index.ts +13 -1
  449. package/src/server/naslServer.ts +694 -632
  450. package/src/server/process2LogicNamespace.ts +30 -2
  451. package/src/server/translator.ts +425 -128
  452. package/src/service/config/index.js +1 -1
  453. package/src/service/creator/errHandles.js +5 -2
  454. package/src/service/creator/index.js +0 -6
  455. package/src/service/storage/api.js +14 -0
  456. package/src/service/storage/init.ts +218 -45
  457. package/src/service/storage/service.ts +6 -0
  458. package/src/service/storage/storagePoint.ts +16 -16
  459. package/src/templator/genCreateBlock.ts +6 -6
  460. package/src/templator/genCurdEditMultipleKeyBlock.ts +29 -30
  461. package/src/templator/genCurdMultipleKeyBlock.ts +11 -11
  462. package/src/templator/genEditTableBlock.ts +5 -5
  463. package/src/templator/genEnumSelectBlock.ts +2 -2
  464. package/src/templator/genGetBlock.ts +7 -9
  465. package/src/templator/genGridViewBlock.ts +59 -9
  466. package/src/templator/genQueryComponent.ts +46 -32
  467. package/src/templator/genSelectBlock.ts +5 -15
  468. package/src/templator/genTableBlock.ts +5 -9
  469. package/src/templator/genUpdateBlock.ts +10 -12
  470. package/src/templator/utils.ts +12 -6
  471. package/src/test/fixtures/env.ts +0 -2
  472. package/src/test/units/page/Element.spec.ts +3 -3
  473. package/src/test/units/temp/temp.spec.ts +1 -1
  474. package/src/utils/index.ts +24 -0
  475. package/src/utils/string.ts +39 -9
  476. package/out/concepts/basics/stdlib/nasl.validate.js +0 -527
  477. package/out/concepts/basics/stdlib/nasl.validate.js.map +0 -1
  478. package/out/data/Module.d.ts +0 -34
  479. package/out/data/Module.js +0 -53
  480. package/out/data/Module.js.map +0 -1
  481. package/src/automate/engine/index.d.ts +0 -3
@@ -65,38 +65,62 @@ function genArgumentMemberExpression(arr) {
65
65
  }
66
66
  return expressionNode;
67
67
  }
68
- function transAstNodeToNaslNode(astNode) {
68
+ function transAstNodeToNaslNode(astNode, namespace) {
69
69
  let node = null;
70
70
  if (astNode.type === 'CallExpression' && astNode.callee.object.name === '$utils') {
71
71
  const calleeName = astNode.callee.property.name || astNode.callee.property.value;
72
- node = {
73
- concept: 'CallFunction',
74
- name: '',
75
- label: '调用逻辑',
76
- kind: 'Expression',
77
- calleeNamespace: 'nasl.util',
78
- calleeName,
79
- arguments: astNode.arguments.map((argument) => ({
80
- concept: 'Argument',
72
+ if (calleeName === 'EnumList') {
73
+ const args = astNode.arguments;
74
+ let name = '';
75
+ let namespace = 'app.enums';
76
+ if (Array.isArray(args)) {
77
+ name = args[0]?.value;
78
+ namespace = args[1]?.value ? args[1]?.value : 'app.enums';
79
+ }
80
+ node = {
81
+ concept: 'Identifier',
82
+ name,
83
+ namespace,
84
+ kind: 'Expression',
85
+ };
86
+ }
87
+ else {
88
+ node = {
89
+ concept: 'CallFunction',
81
90
  name: '',
82
- kind: 'Statement',
83
- keyword: '',
84
- expression: transAstNodeToNaslNode(Object.assign({}, argument)),
85
- })),
86
- };
91
+ label: '调用内置函数',
92
+ kind: 'Expression',
93
+ calleeNamespace: 'nasl.util',
94
+ calleeName,
95
+ arguments: astNode.arguments.map((argument) => ({
96
+ concept: 'Argument',
97
+ name: '',
98
+ kind: 'Statement',
99
+ keyword: '',
100
+ expression: transAstNodeToNaslNode(Object.assign({}, argument)),
101
+ })),
102
+ };
103
+ }
87
104
  }
88
105
  else if (astNode.type === 'MemberExpression') {
89
- node = {
90
- concept: 'MemberExpression',
91
- name: '',
92
- kind: 'Expression',
93
- object: transAstNodeToNaslNode(astNode.object),
94
- property: transAstNodeToNaslNode(astNode.property),
95
- };
106
+ if (astNode.object?.name === '$global') {
107
+ // 目前只有权限相关的
108
+ node = transAstNodeToNaslNode(astNode.property, 'nasl.auth');
109
+ }
110
+ else {
111
+ node = {
112
+ concept: 'MemberExpression',
113
+ name: '',
114
+ kind: 'Expression',
115
+ object: transAstNodeToNaslNode(astNode.object),
116
+ property: transAstNodeToNaslNode(astNode.property),
117
+ };
118
+ }
96
119
  }
97
120
  else if (astNode.type === 'Identifier') {
98
121
  node = {
99
122
  concept: 'Identifier',
123
+ namespace: namespace || '',
100
124
  name: astNode.name,
101
125
  kind: 'Expression',
102
126
  };
@@ -116,6 +140,19 @@ function transAstNodeToNaslNode(astNode) {
116
140
  value: astNode.value,
117
141
  };
118
142
  }
143
+ else if (astNode.type === 'UnaryExpression') {
144
+ node = {
145
+ concept: 'UnaryExpression',
146
+ kind: 'Expression',
147
+ name: '',
148
+ operator: astNode.operator,
149
+ argument: transAstNodeToNaslNode(astNode.argument),
150
+ };
151
+ }
152
+ else {
153
+ node = astNode;
154
+ node.concept = astNode.type;
155
+ }
119
156
  return node;
120
157
  }
121
158
  const decorators_1 = require("../decorators");
@@ -246,7 +283,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
246
283
  return (this.bindAttrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
247
284
  }
248
285
  getBindAttributeUniqueName(name = 'bindAttribute1') {
249
- return utils.unique(name, this.getBindAttributeExistingNames());
286
+ return utils.unique(name, this.getBindAttributeExistingNames(), undefined, false);
250
287
  }
251
288
  _insertBindAttributeAt(options, index) {
252
289
  const bindAttributeOptions = {};
@@ -265,7 +302,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
265
302
  }, this, 'bindAttrs');
266
303
  }
267
304
  else if (options instanceof BindAttribute__1.default) {
268
- options.delete(); // 同一实例不支持多处存在
305
+ options.ensureDelete(); // 同一实例不支持多处存在
269
306
  bindAttribute = options;
270
307
  Object.assign(bindAttribute, relationOptions);
271
308
  }
@@ -293,7 +330,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
293
330
  }
294
331
  addBindAttribute(options) {
295
332
  const node = this._addBindAttribute(options);
296
- const index = this.bindAttrs.length;
333
+ const index = this.bindAttrs.indexOf(node);
297
334
  node.create({
298
335
  index,
299
336
  parentNode: this,
@@ -306,7 +343,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
306
343
  return (this.bindEvents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
307
344
  }
308
345
  getBindEventUniqueName(name = 'bindEvent1') {
309
- return utils.unique(name, this.getBindEventExistingNames());
346
+ return utils.unique(name, this.getBindEventExistingNames(), undefined, false);
310
347
  }
311
348
  _insertBindEventAt(options, index) {
312
349
  const bindEventOptions = {};
@@ -325,7 +362,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
325
362
  }, this, 'bindEvents');
326
363
  }
327
364
  else if (options instanceof BindEvent__1.default) {
328
- options.delete(); // 同一实例不支持多处存在
365
+ options.ensureDelete(); // 同一实例不支持多处存在
329
366
  bindEvent = options;
330
367
  Object.assign(bindEvent, relationOptions);
331
368
  }
@@ -353,7 +390,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
353
390
  }
354
391
  addBindEvent(options) {
355
392
  const node = this._addBindEvent(options);
356
- const index = this.bindEvents.length;
393
+ const index = this.bindEvents.indexOf(node);
357
394
  node.create({
358
395
  index,
359
396
  parentNode: this,
@@ -366,7 +403,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
366
403
  return (this.bindDirectives || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
367
404
  }
368
405
  getBindDirectiveUniqueName(name = 'bindDirective1') {
369
- return utils.unique(name, this.getBindDirectiveExistingNames());
406
+ return utils.unique(name, this.getBindDirectiveExistingNames(), undefined, false);
370
407
  }
371
408
  _insertBindDirectiveAt(options, index) {
372
409
  const bindDirectiveOptions = {};
@@ -385,7 +422,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
385
422
  }, this, 'bindDirectives');
386
423
  }
387
424
  else if (options instanceof BindDirective__1.default) {
388
- options.delete(); // 同一实例不支持多处存在
425
+ options.ensureDelete(); // 同一实例不支持多处存在
389
426
  bindDirective = options;
390
427
  Object.assign(bindDirective, relationOptions);
391
428
  }
@@ -413,7 +450,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
413
450
  }
414
451
  addBindDirective(options) {
415
452
  const node = this._addBindDirective(options);
416
- const index = this.bindDirectives.length;
453
+ const index = this.bindDirectives.indexOf(node);
417
454
  node.create({
418
455
  index,
419
456
  parentNode: this,
@@ -438,7 +475,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
438
475
  }, this, 'children');
439
476
  }
440
477
  else if (options instanceof ViewElement_1) {
441
- options.delete(); // 同一实例不支持多处存在
478
+ options.ensureDelete(); // 同一实例不支持多处存在
442
479
  viewElement = options;
443
480
  Object.assign(viewElement, relationOptions);
444
481
  }
@@ -466,7 +503,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
466
503
  }
467
504
  addViewElement(options) {
468
505
  const node = this._addViewElement(options);
469
- const index = this.children.length;
506
+ const index = this.children.indexOf(node);
470
507
  node.create({
471
508
  index,
472
509
  parentNode: this,
@@ -622,6 +659,18 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
622
659
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
623
660
  // 自动生成的代码已结束。下面可以手动编写。
624
661
  //================================================================================
662
+ /* 主页面有没有权限 */
663
+ get parentAuth() {
664
+ const _nameSpace = this.view.getNamespace();
665
+ const mainViewName = _nameSpace.split('.')[2];
666
+ return this.view.parentNode.concept === 'App' ? this.view.auth : this.app.views.find((item) => item.name === mainViewName)?.auth;
667
+ }
668
+ /**
669
+ * 权限领域的资源路径
670
+ */
671
+ get authPath() {
672
+ return `${this.view.path}/${this.name}`;
673
+ }
625
674
  getViewElementUniqueName(name = 'viewElement1') {
626
675
  return this.view?.getViewElementUniqueName(name);
627
676
  }
@@ -648,43 +697,24 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
648
697
  getBindAttribute(name) {
649
698
  return this.bindAttrs.find((bindAttr) => bindAttr.name === name);
650
699
  }
651
- /**
652
- * 角色
653
- */
654
- roles = [];
655
- toggleRole(role) {
656
- const index = this.roles.findIndex((roleItem) => roleItem.name === role.name);
657
- const roles = [...this.roles];
658
- if (index !== -1) {
659
- roles.splice(index, 1);
660
- }
661
- else {
662
- roles.push({
663
- namespace: role.getNamespace(),
664
- name: role.name,
665
- });
666
- }
667
- const object = {
668
- roles,
669
- };
670
- this.update({
671
- ...object,
672
- });
673
- }
674
700
  toHump(name) {
675
701
  return name.replace(/\-(\w)/g, (all, letter) => letter.toUpperCase());
676
702
  }
677
703
  haveScope(node) {
678
- const dataSourcePcList = ['uGallery', 'uTableView', 'uListView', 'uGridView', 'uCalendarView', 'uListComponents', 'uSelect'];
679
- const dataSourceH5List = ['vanListView', 'vanForComponents', 'lcapEchartsLine', 'lcapEchartsBar', 'lcapEchartsPie'];
704
+ // uGallery 没有子集不需要scope
705
+ const dataSourcePcList = ['uTableView', 'uListView', 'uGridView', 'uCalendarView', 'uListComponents', 'uSelect', 'devopsDragTable'];
706
+ const dataSourceH5List = ['vanRadioGroup', 'vanCheckboxGroup', 'vanListView', 'vanGridView', 'vanForComponents', 'lcapEchartsLine', 'lcapEchartsBar', 'lcapEchartsPie'];
680
707
  const dataSourceList = [...dataSourcePcList, ...dataSourceH5List];
681
708
  return dataSourceList.includes(node.toHump(node.tag));
682
709
  }
683
710
  toEmbeddedTSDefinition(state) {
711
+ // 登录组件不翻译
712
+ if (this.toHump(this.tag) === 'lcapLogin' || this.staticClass === 'login-form')
713
+ return '';
684
714
  let code = '';
685
715
  // formItem的单独处理
686
716
  if (this.tag === 'u-form-item') {
687
- code = (0, translator_1.indent)(state.tabSize) + `${this.name}: <nasl.ui.${this.toHump(this.tag)}`;
717
+ code = (0, translator_1.indent)(state.tabSize) + `${this.name}: nasl.ui.${this.toHump(this.tag)}`;
688
718
  if (Array.isArray(this.children) && this.children.length) {
689
719
  const tag = this.children[0].tag;
690
720
  if (tag === 'u-input') {
@@ -697,7 +727,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
697
727
  code += '<nasl.core.Any>';
698
728
  }
699
729
  }
700
- code += '> null,\n';
730
+ code += ';\n';
701
731
  }
702
732
  if (this.haveScope(this)) {
703
733
  let genericType = 'any';
@@ -714,9 +744,13 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
714
744
  let parentNode = this.parentNode;
715
745
  let haveScopeFlag = false;
716
746
  while (!haveScopeFlag && parentNode.concept !== 'View') {
717
- if (this.haveScope((parentNode))) {
747
+ if (this.haveScope(parentNode)) {
718
748
  // type d = nasl.ui.GetItemTypeFromDataSource<typeof listStructure>['tableRelation']
719
- const tsArr = expressionTs.split('.');
749
+ const tsArr = expressionTs.replace('scope.item.', '').split('.');
750
+ let itemStr = '';
751
+ tsArr.forEach((item) => {
752
+ itemStr += `['${item}']`;
753
+ });
720
754
  const parentbindAttrs = parentNode.bindAttrs;
721
755
  if (parentbindAttrs && parentbindAttrs.length) {
722
756
  const parentAttr = parentbindAttrs.find((item) => item.name === 'data-source');
@@ -724,7 +758,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
724
758
  let parentExpressionTs = parentAttr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
725
759
  parentExpressionTs = parentExpressionTs.replaceAll(' ', '');
726
760
  // 如果是逻辑就推导出逻辑类型
727
- genericType = `nasl.ui.GetItemTypeFromDataSource<nasl.ui.GetItemTypeFromDataSource<typeof ${parentExpressionTs}>['${tsArr[tsArr.length - 1]}']>`;
761
+ genericType = `nasl.ui.GetItemTypeFromDataSource<nasl.ui.GetItemTypeFromDataSource<typeof ${parentExpressionTs}>${itemStr}>`;
728
762
  }
729
763
  }
730
764
  haveScopeFlag = true;
@@ -734,10 +768,10 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
734
768
  }
735
769
  }
736
770
  }
737
- code += (0, translator_1.indent)(state.tabSize) + `${this.name}: <nasl.ui.${this.toHump(this.tag)}<${genericType}>> null,\n`;
771
+ code += (0, translator_1.indent)(state.tabSize) + `${this.name}: nasl.ui.${this.toHump(this.tag)}<${genericType}>;\n`;
738
772
  }
739
773
  else {
740
- code = (0, translator_1.indent)(state.tabSize) + `${this.name}: <nasl.ui.${this.toHump(this.tag)}<any>> null,\n`;
774
+ code = (0, translator_1.indent)(state.tabSize) + `${this.name}: nasl.ui.${this.toHump(this.tag)}<any>;\n`;
741
775
  }
742
776
  if (Array.isArray(this.children)) {
743
777
  this.children.forEach((element) => {
@@ -747,13 +781,15 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
747
781
  return code;
748
782
  }
749
783
  toEmbeddedTS(state, parentLevel) {
784
+ if (this.toHump(this.tag) === 'lcapLogin' || this.staticClass === 'login-form')
785
+ return '';
750
786
  function chineseTsName(name) {
751
787
  let tsName = name;
788
+ // 匹配所有特殊字符都转为_
789
+ tsName = tsName.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '_');
752
790
  if (/^\d/.test(tsName)) {
753
791
  tsName = '$' + tsName;
754
792
  }
755
- // 匹配所有特殊字符都转为_
756
- tsName = tsName.replace(/\W/g, '_');
757
793
  return tsName;
758
794
  }
759
795
  let code = `__elements.${this.name} = new nasl.ui.${this.toHump(this.tag)}({\n`;
@@ -763,7 +799,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
763
799
  hasAuth = !!this.bindDirectives.filter((directive) => directive.name === 'auth').length;
764
800
  }
765
801
  // 角色
766
- if (hasAuth && Array.isArray(this.bindRoles)) {
802
+ if (Array.isArray(this.bindRoles) && this.bindRoles.length) {
767
803
  code += (0, translator_1.indent)(state.tabSize + 2);
768
804
  code += 'roles = [\n';
769
805
  this.bindRoles.forEach((role) => {
@@ -798,26 +834,39 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
798
834
  // 子元素
799
835
  if (Array.isArray(this.children)) {
800
836
  code += (0, translator_1.indent)(state.tabSize + 1);
801
- let levelIndex = parentLevel || 0;
802
- if (this.haveScope(this)) {
803
- code += `slotDefault: (scope${levelIndex || ''})=> [\n`;
804
- levelIndex++;
805
- }
806
- else {
807
- code += `slotDefault: ()=> [\n`;
808
- }
809
837
  if (Array.isArray(this.bindAttrs)) {
810
- code += (0, translator_1.indent)(state.tabSize + 2) + `() => [\n`;
838
+ code += `bindAttr: () => [\n`;
811
839
  this.bindAttrs.forEach((attr) => {
812
840
  if (attr.expression) {
813
841
  code
814
842
  += attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
815
- tabSize: state.tabSize + 3,
843
+ tabSize: state.tabSize + 2,
844
+ })) + ',\n';
845
+ }
846
+ if (Array.isArray(attr.rules) && attr.rules.length) {
847
+ attr.rules.forEach((item) => {
848
+ code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code)) + ',\n';
849
+ });
850
+ }
851
+ });
852
+ this.bindDirectives.forEach((directive) => {
853
+ if (directive.expression) {
854
+ code
855
+ += directive.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
856
+ tabSize: state.tabSize + 2,
816
857
  })) + ',\n';
817
858
  }
818
859
  });
819
860
  code += (0, translator_1.indent)(state.tabSize + 2) + '],\n';
820
861
  }
862
+ let levelIndex = parentLevel || 0;
863
+ if (this.haveScope(this)) {
864
+ code += `slotDefault: (scope)=> [\n`;
865
+ levelIndex++;
866
+ }
867
+ else {
868
+ code += `slotDefault: ()=> [\n`;
869
+ }
821
870
  this.children.forEach((element) => {
822
871
  code += element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
823
872
  tabSize: state.tabSize + 2,
@@ -830,12 +879,9 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
830
879
  code += (0, translator_1.indent)(state.tabSize) + '}),\n';
831
880
  return code;
832
881
  }
833
- _duplicate(options) {
834
- const code = this.toVue(options);
835
- const element = ViewElement_1.fromHTML(code, {
836
- view: this.view,
837
- });
838
- element.deepRenameElements();
882
+ _duplicate() {
883
+ const element = ViewElement_1.from(this.toTemplateJSON());
884
+ element.deepRenameElements(this);
839
885
  return element;
840
886
  }
841
887
  // 递归遍历组件
@@ -845,10 +891,10 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
845
891
  }, { node: this });
846
892
  }
847
893
  // 递归生成组件名
848
- deepRenameElements() {
894
+ deepRenameElements(node) {
849
895
  return this.traverseChildren((ele) => {
850
896
  const tagName = ele.tag.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
851
- ele.name = this.getViewElementUniqueName(`${tagName}1`);
897
+ ele.name = node.getViewElementUniqueName(`${tagName}1`);
852
898
  });
853
899
  }
854
900
  /**
@@ -888,7 +934,6 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
888
934
  concept: 'ValidationRule',
889
935
  name: '',
890
936
  label: '验证规则',
891
- folded: true,
892
937
  kind: 'Expression',
893
938
  calleeNamespace: 'nasl.validation',
894
939
  arguments: args,
@@ -917,8 +962,9 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
917
962
  if (astNode.scopedSlots) {
918
963
  astNode.children = astNode.children || [];
919
964
  Object.keys(astNode.scopedSlots).forEach((key) => {
920
- if (!astNode.children.find((child) => key === child.slotTarget))
965
+ if (!astNode.children.find((child) => key === child.slotTarget)) {
921
966
  astNode.children.unshift(astNode.scopedSlots[key]);
967
+ }
922
968
  });
923
969
  delete astNode.scopedSlots;
924
970
  }
@@ -938,6 +984,12 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
938
984
  }
939
985
  }
940
986
  const tagName = astNode.tag.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
987
+ let newContext = {};
988
+ if (context) {
989
+ newContext = {
990
+ ...context,
991
+ };
992
+ }
941
993
  element = new ViewElement_1({
942
994
  tag: astNode.tag,
943
995
  name: astNode.attrsMap.ref || view.getViewElementUniqueName(`${tagName}1`),
@@ -945,46 +997,45 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
945
997
  staticStyle: astNode.attrsMap.style,
946
998
  slotTarget: astNode.slotTarget && json5.parse(astNode.slotTarget),
947
999
  slotScope: astNode.slotScope === '_empty_' ? '' : astNode.slotScope,
948
- children: astNode.children.map((item) => this._fromASTNode(item, context)),
1000
+ children: astNode.children.map((item) => this._fromASTNode(item, newContext)),
949
1001
  });
950
- astNode.attrs
951
- && astNode.attrs.forEach((oldAttr) => {
952
- let attr;
953
- if (oldAttr.value === '""' && oldAttr.end - oldAttr.start === oldAttr.name.length) {
954
- attr = BindAttribute__1.default.from({
955
- type: 'static',
1002
+ astNode?.attrs?.forEach((oldAttr) => {
1003
+ let attr;
1004
+ if (oldAttr.value === '""' && oldAttr.end - oldAttr.start === oldAttr.name.length) {
1005
+ attr = new BindAttribute__1.default({
1006
+ type: 'static',
1007
+ name: oldAttr.name,
1008
+ value: 'true',
1009
+ });
1010
+ }
1011
+ else {
1012
+ try {
1013
+ const tmp = json5.parse(oldAttr.value);
1014
+ const source = {
1015
+ type: typeof tmp === 'string' ? 'string' : 'static',
956
1016
  name: oldAttr.name,
957
- value: 'true',
958
- }, element);
959
- }
960
- else {
961
- try {
962
- const tmp = json5.parse(oldAttr.value);
963
- const source = {
964
- type: typeof tmp === 'string' ? 'string' : 'static',
965
- name: oldAttr.name,
966
- value: typeof tmp === 'string' ? tmp : oldAttr.value,
967
- };
968
- if (oldAttr.name === 'rules') {
969
- source.rules = tmp?.split('|').map((ruleStr) => this._parseValidationRule(ruleStr.trim()));
970
- }
971
- attr = BindAttribute__1.default.from(source, element);
1017
+ value: typeof tmp === 'string' ? tmp : oldAttr.value,
1018
+ };
1019
+ if (oldAttr.name === 'rules') {
1020
+ source.rules = tmp?.split('|').map((ruleStr) => this._parseValidationRule(ruleStr.trim()));
972
1021
  }
973
- catch (e) {
974
- const expression = this._parseExpression(oldAttr.value);
975
- attr = BindAttribute__1.default.from({
976
- type: 'dynamic',
977
- name: oldAttr.name,
978
- value: expression ? '' : oldAttr.value,
979
- expression,
980
- }, element);
981
- if (astNode.attrsMap[`:${attr.name}.sync`]) {
982
- attr.sync = true;
983
- }
1022
+ attr = new BindAttribute__1.default(source);
1023
+ }
1024
+ catch (e) {
1025
+ const expression = this._parseExpression(oldAttr.value);
1026
+ attr = new BindAttribute__1.default({
1027
+ type: 'dynamic',
1028
+ name: oldAttr.name,
1029
+ value: expression ? '' : oldAttr.value,
1030
+ expression,
1031
+ });
1032
+ if (astNode.attrsMap[`:${attr.name}.sync`]) {
1033
+ attr.sync = true;
984
1034
  }
985
1035
  }
986
- element.bindAttrs.push(attr);
987
- });
1036
+ }
1037
+ element.addBindAttribute(attr);
1038
+ });
988
1039
  // compiler 处理:value.sync 时会加上update:value事件,需要过滤
989
1040
  astNode.events
990
1041
  && Object.keys(astNode.events)
@@ -993,24 +1044,23 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
993
1044
  const oldEvent = astNode.events[name];
994
1045
  const str = oldEvent.value;
995
1046
  let calleeName = str.split('(')[0];
996
- const matchArr = str.match(/\(([^)]*)\)/);
1047
+ const matchArr = str.match(/\(([^)]*)\)/) || [];
997
1048
  let argsStr = '';
998
- if (matchArr.length >= 2) {
1049
+ if (matchArr?.length >= 2) {
999
1050
  argsStr = matchArr[1];
1000
1051
  }
1001
1052
  let args = [];
1002
- if (argsStr) {
1003
- args = argsStr.split(',').map((argStr) => {
1004
- const keyword = argStr.trim().split('.');
1005
- return {
1006
- concept: 'Argument',
1007
- expression: genArgumentMemberExpression(keyword),
1008
- };
1009
- });
1010
- }
1011
- const viewNamespace = view?.getNamespace();
1012
- const viewName = `${view?.name}`;
1013
- let calleeNamespace = `${viewNamespace}.${viewName}.logics`;
1053
+ const argStrs = argsStr.split(',');
1054
+ args = argStrs
1055
+ .filter((argStr) => !!argStr && argStr !== '_empty_')
1056
+ .map((argStr) => {
1057
+ const keyword = argStr.trim().split('.');
1058
+ return {
1059
+ concept: 'Argument',
1060
+ expression: genArgumentMemberExpression(keyword),
1061
+ };
1062
+ });
1063
+ let calleeNamespace = '';
1014
1064
  if (calleeName) {
1015
1065
  const namespaceArr = calleeName.split('.');
1016
1066
  const start = namespaceArr.shift();
@@ -1019,12 +1069,12 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1019
1069
  calleeName = namespaceArr[1];
1020
1070
  }
1021
1071
  }
1022
- element.bindEvents.push(BindEvent__1.default.from({
1072
+ element.addBindEvent(new BindEvent__1.default({
1023
1073
  name,
1024
1074
  calleeNamespace,
1025
1075
  calleeName,
1026
1076
  arguments: args,
1027
- }, element));
1077
+ }));
1028
1078
  });
1029
1079
  astNode.directives
1030
1080
  && astNode.directives.forEach((directive) => {
@@ -1032,52 +1082,48 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1032
1082
  const valueAttr = astNode.attrs && astNode.attrs.find((attr) => attr.name === 'value');
1033
1083
  if (!valueAttr) {
1034
1084
  const expression = this._parseExpression(directive.value);
1035
- element.bindAttrs.push(BindAttribute__1.default.from({
1085
+ element.addBindAttribute(new BindAttribute__1.default({
1036
1086
  type: 'dynamic',
1037
1087
  name: 'value',
1038
1088
  value: expression ? '' : directive.value,
1039
1089
  expression,
1040
1090
  sync: true,
1041
- }, element));
1091
+ }));
1042
1092
  }
1043
1093
  }
1044
1094
  else {
1045
1095
  const expression = this._parseExpression(directive.value);
1046
- element.bindDirectives.push(BindDirective__1.default.from({
1096
+ element.addBindDirective(new BindDirective__1.default({
1047
1097
  type: expression ? 'string' : 'dynamic',
1048
1098
  name: directive.name,
1049
1099
  rawName: directive.rawName,
1050
1100
  value: expression ? '' : directive.value,
1051
1101
  expression,
1052
1102
  arg: directive.arg,
1053
- modifiers: directive.modifiers,
1054
- }, element));
1103
+ // modifiers: directive.modifiers,
1104
+ }));
1055
1105
  }
1056
1106
  });
1057
1107
  if (astNode.if) {
1058
- element.bindDirectives.push(BindDirective__1.default.from({
1108
+ element.addBindDirective(new BindDirective__1.default({
1059
1109
  type: 'dynamic',
1060
1110
  name: 'if',
1061
1111
  rawName: 'v-if',
1062
1112
  value: '',
1063
1113
  expression: this._parseExpression(astNode.if),
1064
- }, element));
1114
+ }));
1065
1115
  }
1066
1116
  }
1067
1117
  else if (astNode.type === 2) {
1068
- if (__1.config.scope === 'h5') {
1069
- element = new ViewElement_1({
1070
- tag: 'van-text',
1071
- });
1072
- }
1073
- else {
1074
- element = new ViewElement_1({
1075
- tag: 'u-text',
1076
- });
1077
- }
1118
+ const tagName = __1.config.scope === 'h5' ? 'van-text' : 'u-text';
1119
+ const baseName = tagName.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
1120
+ element = new ViewElement_1({
1121
+ tag: tagName,
1122
+ name: view.getViewElementUniqueName(`${baseName}1`),
1123
+ });
1078
1124
  const value = astNode.text.match(/{{(.*?)}}/)[1].trim();
1079
1125
  const expression = this._parseExpression(value);
1080
- element.bindAttrs.push(new BindAttribute__1.default({
1126
+ element.addBindAttribute(new BindAttribute__1.default({
1081
1127
  type: 'dynamic',
1082
1128
  name: 'text',
1083
1129
  value: expression ? '' : value,
@@ -1085,17 +1131,13 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1085
1131
  }));
1086
1132
  }
1087
1133
  else if (astNode.type === 3) {
1088
- if (__1.config.scope === 'h5') {
1089
- element = new ViewElement_1({
1090
- tag: 'van-text',
1091
- });
1092
- }
1093
- else {
1094
- element = new ViewElement_1({
1095
- tag: 'u-text',
1096
- });
1097
- }
1098
- element.bindAttrs.push(new BindAttribute__1.default({
1134
+ const tagName = __1.config.scope === 'h5' ? 'van-text' : 'u-text';
1135
+ const baseName = tagName.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
1136
+ element = new ViewElement_1({
1137
+ tag: tagName,
1138
+ name: view.getViewElementUniqueName(`${baseName}1`),
1139
+ });
1140
+ element.addBindAttribute(new BindAttribute__1.default({
1099
1141
  name: 'text',
1100
1142
  type: 'string',
1101
1143
  value: astNode.text,
@@ -1118,22 +1160,13 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1118
1160
  let ast = compiler.compile(html, compilerOptions).ast;
1119
1161
  if (ast.tag === 'template' && !ast.slotTarget)
1120
1162
  ast = ast.children[0];
1121
- let root;
1122
- utils.traverse((current) => {
1123
- // 处理 scopedSlots;
1124
- if (!current.parent)
1125
- root = this._fromASTNode(current.node, context);
1126
- else
1127
- current.parent.children[current.index] = this._fromASTNode(current.node, context);
1128
- }, { node: ast });
1129
- return root;
1163
+ return this._fromASTNode(ast, context);
1130
1164
  }
1131
1165
  /**
1132
1166
  * 从模板生成规范的 ViewElement 对象
1133
1167
  */
1134
1168
  static fromHTML(html, context) {
1135
- const element = this.parse(html, context);
1136
- return element;
1169
+ return this.parse(html, context);
1137
1170
  }
1138
1171
  /**
1139
1172
  * 转换成设计器中使用的 Vue 文件
@@ -1161,7 +1194,7 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1161
1194
  }
1162
1195
  }
1163
1196
  if (attr.type === 'dynamic' && !(element.tag === 'u-cascade-select' && attr.name === 'categories'))
1164
- return defaultResult.replace(/:?(\w+)(?:.*?)="(.*)"/, (m, name, value) => {
1197
+ return defaultResult.replace(/:?([\w-]+)(?:.*?)="(.*)"/, (m, name, value) => {
1165
1198
  try {
1166
1199
  const tempValue = json5.parse(value);
1167
1200
  if (typeof tempValue === 'boolean' || typeof tempValue === 'number') {
@@ -1173,7 +1206,12 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1173
1206
  if (apiOfAttr && !apiOfAttr.type.includes('string'))
1174
1207
  return '';
1175
1208
  }
1176
- return `${name}="{{ ${value.replace(/"/g, "'")} }}"`;
1209
+ value = value
1210
+ .replace(/"/g, "'")
1211
+ .replace(/\$utils\['(.+?)'\]/g, '$1')
1212
+ .replace(/\$refs./g, 'elements.')
1213
+ .replace(/\$global./g, 'nasl.auth.');
1214
+ return `${name}="{{ ${value} }}"`;
1177
1215
  });
1178
1216
  else
1179
1217
  return defaultResult;
@@ -1184,13 +1222,31 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1184
1222
  const parts = [];
1185
1223
  const api = __1.config.allNodesAPI[el.tag];
1186
1224
  const emptySlot = api && api.slots && api.slots.find((slot) => slot.name === 'default' && slot['empty-background']);
1187
- if (!el.children.length && emptySlot) {
1188
- let addEmpty = true;
1189
- if (el.tag === 'u-grid-view' || el.tag === 'u-list-view' || el.tag === 'van-list-view') {
1190
- const hasDataSource = el.bindAttrs.find((attr) => attr.name === 'data-source');
1191
- addEmpty = !hasDataSource;
1225
+ const hasSupport = api && api.slots && api.slots.some((slot) => slot.support);
1226
+ if (emptySlot || hasSupport) {
1227
+ let childEmpty = !el.children.length;
1228
+ const defaultSlot = el.children.find((elem) => elem.tag === 'template' && elem.slotTarget === 'default');
1229
+ if (defaultSlot) {
1230
+ childEmpty = !defaultSlot.children.length;
1231
+ }
1232
+ if (childEmpty) {
1233
+ let addEmpty = true;
1234
+ if (el.tag === 'u-grid-view' || el.tag === 'u-list-view' || el.tag === 'van-list-view' || el.tag === 'van-grid-view') {
1235
+ const hasDataSource = el.bindAttrs.find((attr) => attr.name === 'data-source');
1236
+ addEmpty = !hasDataSource;
1237
+ }
1238
+ if (el.tag === 'u-crumb') {
1239
+ const attrList = el.bindAttrs;
1240
+ const hasAuto = attrList.some((attr) => attr.name === 'auto' && String(attr.value) === 'true');
1241
+ if (hasAuto)
1242
+ addEmpty = false;
1243
+ }
1244
+ if (['u-select', 'u-dropdown', 'u-panel'].includes(el.tag)) {
1245
+ addEmpty = false;
1246
+ }
1247
+ const background = (emptySlot && emptySlot['empty-background']) || (hasSupport ? 'add-sub' : '');
1248
+ addEmpty && parts.push(`vusion-empty-background="${background}"`);
1192
1249
  }
1193
- addEmpty && parts.push(`vusion-empty-background="${emptySlot['empty-background']}"`);
1194
1250
  }
1195
1251
  return parts;
1196
1252
  },
@@ -1200,7 +1256,14 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1200
1256
  * 转换成 Vue 的模板格式
1201
1257
  */
1202
1258
  toVue(options) {
1203
- options = Object.assign({
1259
+ let scopeList = [];
1260
+ if (Array.isArray(options?.scopeList)) {
1261
+ scopeList = [...options?.scopeList];
1262
+ }
1263
+ if (this.slotScope) {
1264
+ scopeList.unshift(this.slotScope);
1265
+ }
1266
+ const newOptions = Object.assign({
1204
1267
  indentStyle: 'space',
1205
1268
  tabSize: 4,
1206
1269
  indentLevel: 0,
@@ -1208,26 +1271,30 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1208
1271
  nodePathAttr: false,
1209
1272
  getExtraParts: () => [],
1210
1273
  attrFormat: (attr, element, defaultResult) => defaultResult,
1211
- }, options);
1212
- const tabString = ' '.repeat(options.tabSize * options.indentLevel);
1213
- const insideTabString = ' '.repeat(options.tabSize * (options.indentLevel + 1));
1274
+ }, options, {
1275
+ scopeList,
1276
+ });
1277
+ const tabString = ' '.repeat(newOptions.tabSize * newOptions.indentLevel);
1278
+ const insideTabString = ' '.repeat(newOptions.tabSize * (newOptions.indentLevel + 1));
1214
1279
  let shouldIndent = true;
1215
1280
  const content = !this.children ? '' : this.children
1216
1281
  .map((element) => {
1217
- const childOptions = Object.assign({}, options);
1282
+ const childOptions = Object.assign({}, newOptions);
1218
1283
  childOptions.indentLevel++;
1219
- return (shouldIndent ? '\n' + insideTabString : '') + element.toVue(childOptions);
1284
+ return (shouldIndent ? '\n' + insideTabString : '') + element?.toVue(childOptions);
1220
1285
  })
1221
1286
  .join('');
1222
- if (!content.length)
1287
+ if (!content.length) {
1223
1288
  shouldIndent = false;
1289
+ }
1224
1290
  const parts = [];
1225
- if (options.aslIdAttr) {
1226
- if (options.aslIdAttr === true)
1227
- options.aslIdAttr = 'asl-id';
1228
- parts.push(`${options.aslIdAttr}="${this.id}"`);
1291
+ if (newOptions.aslIdAttr) {
1292
+ if (newOptions.aslIdAttr === true) {
1293
+ newOptions.aslIdAttr = 'asl-id';
1294
+ }
1295
+ parts.push(`${newOptions.aslIdAttr}="${this.id}"`);
1229
1296
  }
1230
- if (options.nodePathAttr) {
1297
+ if (newOptions.nodePathAttr) {
1231
1298
  // 注入 asl 的 node-path
1232
1299
  parts.push(`vusion-node-path="${this.nodePath}"`);
1233
1300
  }
@@ -1236,10 +1303,10 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1236
1303
  this.staticClass && parts.push(`class="${this.staticClass}"`);
1237
1304
  this.staticStyle && parts.push(`style="${this.staticStyle}"`);
1238
1305
  [].concat(this.bindAttrs, this.bindDirectives, this.bindEvents).forEach((attr) => {
1239
- const result = options.attrFormat(attr, this, attr.toVue(options));
1306
+ const result = newOptions.attrFormat(attr, this, attr?.toVue(newOptions));
1240
1307
  result && parts.push(result);
1241
1308
  });
1242
- options.getExtraParts(this).forEach((part) => parts.push(part));
1309
+ newOptions.getExtraParts(this).forEach((part) => parts.push(part));
1243
1310
  let partsLength = 0;
1244
1311
  let partsString = '';
1245
1312
  parts.forEach((part) => {
@@ -1252,6 +1319,37 @@ let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
1252
1319
  });
1253
1320
  return `<${this.tag}${partsString.length ? partsString : ''}>` + content + (shouldIndent ? '\n' + tabString : '') + `</${this.tag}>`;
1254
1321
  }
1322
+ /**
1323
+ * 从父级删除该节点
1324
+ * @internal
1325
+ */
1326
+ delete() {
1327
+ super.delete();
1328
+ if (this.parentNode) {
1329
+ this.traverseChildren((ele) => {
1330
+ this.view?.removeExistingViewElement(ele);
1331
+ });
1332
+ }
1333
+ }
1334
+ findElementByName(name) {
1335
+ return utils.traverse((current) => {
1336
+ if (current.node.name === name)
1337
+ return current.node;
1338
+ }, { node: this });
1339
+ }
1340
+ findElementByTag(tag) {
1341
+ return utils.traverse((current) => {
1342
+ if (current.node.tag === tag)
1343
+ return current.node;
1344
+ }, { node: this });
1345
+ }
1346
+ findElementByAttr(name, value) {
1347
+ return utils.traverse((current) => {
1348
+ if (current.node.bindAttrs.some((attr) => attr.name === name && attr.value === value))
1349
+ return current.node;
1350
+ }, { node: this });
1351
+ }
1352
+ computedStyle = {};
1255
1353
  };
1256
1354
  __decorate([
1257
1355
  (0, decorators_1.property)()
@@ -1292,12 +1390,12 @@ __decorate([
1292
1390
  __decorate([
1293
1391
  (0, decorators_1.property)('ViewElement')
1294
1392
  ], ViewElement.prototype, "children", void 0);
1295
- __decorate([
1296
- (0, decorators_1.property)()
1297
- ], ViewElement.prototype, "roles", void 0);
1298
1393
  __decorate([
1299
1394
  (0, translator_1.withSourceMap)()
1300
1395
  ], ViewElement.prototype, "toEmbeddedTS", null);
1396
+ __decorate([
1397
+ (0, decorators_1.excludedInJSON)()
1398
+ ], ViewElement.prototype, "computedStyle", void 0);
1301
1399
  ViewElement = ViewElement_1 = __decorate([
1302
1400
  (0, decorators_1.concept)('页面元素')
1303
1401
  ], ViewElement);