@lcap/nasl 3.7.0-alpha.1 → 3.7.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 (832) hide show
  1. package/out/automate/engine/utils.d.ts +1 -1
  2. package/out/automate/engine/utils.js +3 -7
  3. package/out/automate/engine/utils.js.map +1 -1
  4. package/out/automate/template/myProcess.js +65 -65
  5. package/out/automate/template/myProcess.js.map +1 -1
  6. package/out/bak/translator.js +42 -12
  7. package/out/bak/translator.js.map +1 -1
  8. package/out/breakpoint/generator/BreakpointNode.d.ts +2 -0
  9. package/out/breakpoint/generator/BreakpointNode.js +7 -0
  10. package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
  11. package/out/breakpoint/shared/constants.js +1 -0
  12. package/out/breakpoint/shared/constants.js.map +1 -1
  13. package/out/breakpoint/shared/utils.js +1 -1
  14. package/out/breakpoint/shared/utils.js.map +1 -1
  15. package/out/common/BaseNode.d.ts +4 -3
  16. package/out/common/BaseNode.js +61 -10
  17. package/out/common/BaseNode.js.map +1 -1
  18. package/out/common/ComponentAPI.d.ts +5 -3
  19. package/out/common/EventEmitter.d.ts +1 -0
  20. package/out/common/EventEmitter.js.map +1 -1
  21. package/out/concepts/Abort__.d.ts +5 -4
  22. package/out/concepts/Abort__.js +5 -7
  23. package/out/concepts/Abort__.js.map +1 -1
  24. package/out/concepts/AbstractInterface__.d.ts +9 -6
  25. package/out/concepts/AbstractInterface__.js +8 -11
  26. package/out/concepts/AbstractInterface__.js.map +1 -1
  27. package/out/concepts/Anchor__.d.ts +5 -12
  28. package/out/concepts/Anchor__.js +5 -44
  29. package/out/concepts/Anchor__.js.map +1 -1
  30. package/out/concepts/AnonymousFunction__.d.ts +10 -47
  31. package/out/concepts/AnonymousFunction__.js +14 -159
  32. package/out/concepts/AnonymousFunction__.js.map +1 -1
  33. package/out/concepts/App__.d.ts +321 -437
  34. package/out/concepts/App__.js +460 -986
  35. package/out/concepts/App__.js.map +1 -1
  36. package/out/concepts/Argument__.d.ts +5 -12
  37. package/out/concepts/Argument__.js +11 -46
  38. package/out/concepts/Argument__.js.map +1 -1
  39. package/out/concepts/Assignee__.d.ts +8 -5
  40. package/out/concepts/Assignee__.js +9 -66
  41. package/out/concepts/Assignee__.js.map +1 -1
  42. package/out/concepts/AssignmentLine__.d.ts +5 -6
  43. package/out/concepts/AssignmentLine__.js +7 -11
  44. package/out/concepts/AssignmentLine__.js.map +1 -1
  45. package/out/concepts/Assignment__.d.ts +5 -26
  46. package/out/concepts/Assignment__.js +5 -64
  47. package/out/concepts/Assignment__.js.map +1 -1
  48. package/out/concepts/Attribute__.d.ts +14 -51
  49. package/out/concepts/Attribute__.js +36 -126
  50. package/out/concepts/Attribute__.js.map +1 -1
  51. package/out/concepts/AuthInterface__.d.ts +10 -10
  52. package/out/concepts/AuthInterface__.js +18 -13
  53. package/out/concepts/AuthInterface__.js.map +1 -1
  54. package/out/concepts/AuthLogicForCallInterface__.d.ts +6 -3
  55. package/out/concepts/AuthLogicForCallInterface__.js +6 -32
  56. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  57. package/out/concepts/AuthLogic__.d.ts +19 -19
  58. package/out/concepts/AuthLogic__.js +26 -25
  59. package/out/concepts/AuthLogic__.js.map +1 -1
  60. package/out/concepts/BackendVariable__.d.ts +19 -47
  61. package/out/concepts/BackendVariable__.js +43 -134
  62. package/out/concepts/BackendVariable__.js.map +1 -1
  63. package/out/concepts/Backend__.d.ts +6 -13
  64. package/out/concepts/Backend__.js +13 -50
  65. package/out/concepts/Backend__.js.map +1 -1
  66. package/out/concepts/BaseSetter__.d.ts +25 -0
  67. package/out/concepts/BaseSetter__.js +53 -0
  68. package/out/concepts/BaseSetter__.js.map +1 -0
  69. package/out/concepts/BatchAssignment__.d.ts +9 -21
  70. package/out/concepts/BatchAssignment__.js +11 -86
  71. package/out/concepts/BatchAssignment__.js.map +1 -1
  72. package/out/concepts/BinaryExpression__.d.ts +5 -22
  73. package/out/concepts/BinaryExpression__.js +32 -59
  74. package/out/concepts/BinaryExpression__.js.map +1 -1
  75. package/out/concepts/BindAttribute__.d.ts +60 -107
  76. package/out/concepts/BindAttribute__.js +144 -251
  77. package/out/concepts/BindAttribute__.js.map +1 -1
  78. package/out/concepts/BindDirective__.d.ts +26 -42
  79. package/out/concepts/BindDirective__.js +63 -105
  80. package/out/concepts/BindDirective__.js.map +1 -1
  81. package/out/concepts/BindEvent__.d.ts +27 -36
  82. package/out/concepts/BindEvent__.js +50 -109
  83. package/out/concepts/BindEvent__.js.map +1 -1
  84. package/out/concepts/BindStyle__.d.ts +24 -41
  85. package/out/concepts/BindStyle__.js +48 -88
  86. package/out/concepts/BindStyle__.js.map +1 -1
  87. package/out/concepts/Block__.d.ts +5 -2
  88. package/out/concepts/Block__.js +5 -31
  89. package/out/concepts/Block__.js.map +1 -1
  90. package/out/concepts/BooleanLiteral__.d.ts +5 -0
  91. package/out/concepts/BooleanLiteral__.js +8 -1
  92. package/out/concepts/BooleanLiteral__.js.map +1 -1
  93. package/out/concepts/BusinessComponent__.d.ts +47 -49
  94. package/out/concepts/BusinessComponent__.js +122 -444
  95. package/out/concepts/BusinessComponent__.js.map +1 -1
  96. package/out/concepts/BusinessLogic__.d.ts +5 -0
  97. package/out/concepts/BusinessLogic__.js +8 -1
  98. package/out/concepts/BusinessLogic__.js.map +1 -1
  99. package/out/concepts/CallAuthInterface__.d.ts +6 -4
  100. package/out/concepts/CallAuthInterface__.js +6 -34
  101. package/out/concepts/CallAuthInterface__.js.map +1 -1
  102. package/out/concepts/CallConnector__.d.ts +5 -0
  103. package/out/concepts/CallConnector__.js +11 -2
  104. package/out/concepts/CallConnector__.js.map +1 -1
  105. package/out/concepts/CallEvent__.d.ts +6 -7
  106. package/out/concepts/CallEvent__.js +11 -40
  107. package/out/concepts/CallEvent__.js.map +1 -1
  108. package/out/concepts/CallFunction__.d.ts +17 -9
  109. package/out/concepts/CallFunction__.js +84 -130
  110. package/out/concepts/CallFunction__.js.map +1 -1
  111. package/out/concepts/CallInterface__.d.ts +6 -7
  112. package/out/concepts/CallInterface__.js +14 -41
  113. package/out/concepts/CallInterface__.js.map +1 -1
  114. package/out/concepts/CallLogic__.d.ts +11 -24
  115. package/out/concepts/CallLogic__.js +68 -140
  116. package/out/concepts/CallLogic__.js.map +1 -1
  117. package/out/concepts/CallQueryComponent__.d.ts +70 -126
  118. package/out/concepts/CallQueryComponent__.js +134 -308
  119. package/out/concepts/CallQueryComponent__.js.map +1 -1
  120. package/out/concepts/CapsulesSetter__.d.ts +109 -0
  121. package/out/concepts/CapsulesSetter__.js +163 -0
  122. package/out/concepts/CapsulesSetter__.js.map +1 -0
  123. package/out/concepts/Comment__.d.ts +5 -0
  124. package/out/concepts/Comment__.js +8 -1
  125. package/out/concepts/Comment__.js.map +1 -1
  126. package/out/concepts/CompletionProperty__.d.ts +6 -26
  127. package/out/concepts/CompletionProperty__.js +24 -74
  128. package/out/concepts/CompletionProperty__.js.map +1 -1
  129. package/out/concepts/ConfigGroup__.d.ts +6 -13
  130. package/out/concepts/ConfigGroup__.js +13 -50
  131. package/out/concepts/ConfigGroup__.js.map +1 -1
  132. package/out/concepts/ConfigPropertyValue__.d.ts +5 -11
  133. package/out/concepts/ConfigPropertyValue__.js +11 -19
  134. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  135. package/out/concepts/ConfigProperty__.d.ts +11 -18
  136. package/out/concepts/ConfigProperty__.js +25 -58
  137. package/out/concepts/ConfigProperty__.js.map +1 -1
  138. package/out/concepts/Configuration__.d.ts +6 -13
  139. package/out/concepts/Configuration__.js +6 -49
  140. package/out/concepts/Configuration__.js.map +1 -1
  141. package/out/concepts/Connection__.d.ts +11 -18
  142. package/out/concepts/Connection__.js +25 -58
  143. package/out/concepts/Connection__.js.map +1 -1
  144. package/out/concepts/ConnectorTrigger__.d.ts +28 -34
  145. package/out/concepts/ConnectorTrigger__.js +55 -50
  146. package/out/concepts/ConnectorTrigger__.js.map +1 -1
  147. package/out/concepts/Connector__.d.ts +106 -504
  148. package/out/concepts/Connector__.js +134 -791
  149. package/out/concepts/Connector__.js.map +1 -1
  150. package/out/concepts/Constant__.d.ts +27 -55
  151. package/out/concepts/Constant__.js +45 -137
  152. package/out/concepts/Constant__.js.map +1 -1
  153. package/out/concepts/CountersignPolicy__.d.ts +6 -5
  154. package/out/concepts/CountersignPolicy__.js +8 -12
  155. package/out/concepts/CountersignPolicy__.js.map +1 -1
  156. package/out/concepts/DataSource__.d.ts +11 -18
  157. package/out/concepts/DataSource__.js +25 -58
  158. package/out/concepts/DataSource__.js.map +1 -1
  159. package/out/concepts/DatabaseTypeAnnotation__.d.ts +5 -6
  160. package/out/concepts/DatabaseTypeAnnotation__.js +11 -13
  161. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  162. package/out/concepts/DefaultValue__.d.ts +7 -19
  163. package/out/concepts/DefaultValue__.js +6 -56
  164. package/out/concepts/DefaultValue__.js.map +1 -1
  165. package/out/concepts/Destination__.d.ts +10 -21
  166. package/out/concepts/Destination__.js +15 -55
  167. package/out/concepts/Destination__.js.map +1 -1
  168. package/out/concepts/End__.d.ts +5 -4
  169. package/out/concepts/End__.js +7 -8
  170. package/out/concepts/End__.js.map +1 -1
  171. package/out/concepts/EntityIndex__.d.ts +20 -26
  172. package/out/concepts/EntityIndex__.js +40 -39
  173. package/out/concepts/EntityIndex__.js.map +1 -1
  174. package/out/concepts/EntityProperty__.d.ts +17 -56
  175. package/out/concepts/EntityProperty__.js +70 -181
  176. package/out/concepts/EntityProperty__.js.map +1 -1
  177. package/out/concepts/Entity__.d.ts +18 -26
  178. package/out/concepts/Entity__.js +38 -98
  179. package/out/concepts/Entity__.js.map +1 -1
  180. package/out/concepts/EnumItem__.d.ts +15 -21
  181. package/out/concepts/EnumItem__.js +27 -31
  182. package/out/concepts/EnumItem__.js.map +1 -1
  183. package/out/concepts/EnumSelectSetter__.d.ts +109 -0
  184. package/out/concepts/EnumSelectSetter__.js +163 -0
  185. package/out/concepts/EnumSelectSetter__.js.map +1 -0
  186. package/out/concepts/Enum__.d.ts +10 -28
  187. package/out/concepts/Enum__.js +35 -102
  188. package/out/concepts/Enum__.js.map +1 -1
  189. package/out/concepts/EventDeclaration__.d.ts +41 -0
  190. package/out/concepts/EventDeclaration__.js +81 -0
  191. package/out/concepts/EventDeclaration__.js.map +1 -0
  192. package/out/concepts/Event__.d.ts +16 -27
  193. package/out/concepts/Event__.js +37 -78
  194. package/out/concepts/Event__.js.map +1 -1
  195. package/out/concepts/ExternalDestination__.d.ts +8 -25
  196. package/out/concepts/ExternalDestination__.js +8 -58
  197. package/out/concepts/ExternalDestination__.js.map +1 -1
  198. package/out/concepts/ForEachStatement__.d.ts +7 -55
  199. package/out/concepts/ForEachStatement__.js +6 -128
  200. package/out/concepts/ForEachStatement__.js.map +1 -1
  201. package/out/concepts/FrontendLibrary__.d.ts +38 -46
  202. package/out/concepts/FrontendLibrary__.js +55 -121
  203. package/out/concepts/FrontendLibrary__.js.map +1 -1
  204. package/out/concepts/FrontendType__.d.ts +8 -12
  205. package/out/concepts/FrontendType__.js +15 -109
  206. package/out/concepts/FrontendType__.js.map +1 -1
  207. package/out/concepts/FrontendVariable__.d.ts +5 -0
  208. package/out/concepts/FrontendVariable__.js +8 -1
  209. package/out/concepts/FrontendVariable__.js.map +1 -1
  210. package/out/concepts/Frontend__.d.ts +9 -41
  211. package/out/concepts/Frontend__.js +36 -209
  212. package/out/concepts/Frontend__.js.map +1 -1
  213. package/out/concepts/Function__.d.ts +13 -34
  214. package/out/concepts/Function__.js +22 -194
  215. package/out/concepts/Function__.js.map +1 -1
  216. package/out/concepts/I18nInfo__.d.ts +6 -7
  217. package/out/concepts/I18nInfo__.js +14 -14
  218. package/out/concepts/I18nInfo__.js.map +1 -1
  219. package/out/concepts/IconSetter__.d.ts +29 -0
  220. package/out/concepts/IconSetter__.js +62 -0
  221. package/out/concepts/IconSetter__.js.map +1 -0
  222. package/out/concepts/Identifier__.d.ts +5 -0
  223. package/out/concepts/Identifier__.js +20 -6
  224. package/out/concepts/Identifier__.js.map +1 -1
  225. package/out/concepts/IfStatement__.d.ts +5 -12
  226. package/out/concepts/IfStatement__.js +5 -44
  227. package/out/concepts/IfStatement__.js.map +1 -1
  228. package/out/concepts/ImageSetter__.d.ts +25 -0
  229. package/out/concepts/ImageSetter__.js +53 -0
  230. package/out/concepts/ImageSetter__.js.map +1 -0
  231. package/out/concepts/ImportedInterface__.d.ts +9 -0
  232. package/out/concepts/ImportedInterface__.js +11 -1
  233. package/out/concepts/ImportedInterface__.js.map +1 -1
  234. package/out/concepts/InputSetter__.d.ts +29 -0
  235. package/out/concepts/InputSetter__.js +62 -0
  236. package/out/concepts/InputSetter__.js.map +1 -0
  237. package/out/concepts/Integration__.d.ts +7 -26
  238. package/out/concepts/Integration__.js +6 -93
  239. package/out/concepts/Integration__.js.map +1 -1
  240. package/out/concepts/InterfaceParam__.d.ts +34 -62
  241. package/out/concepts/InterfaceParam__.js +63 -147
  242. package/out/concepts/InterfaceParam__.js.map +1 -1
  243. package/out/concepts/Interface__.d.ts +42 -48
  244. package/out/concepts/Interface__.js +89 -158
  245. package/out/concepts/Interface__.js.map +1 -1
  246. package/out/concepts/JSBlock__.d.ts +5 -4
  247. package/out/concepts/JSBlock__.js +8 -8
  248. package/out/concepts/JSBlock__.js.map +1 -1
  249. package/out/concepts/JavaLogic__.d.ts +5 -0
  250. package/out/concepts/JavaLogic__.js +14 -3
  251. package/out/concepts/JavaLogic__.js.map +1 -1
  252. package/out/concepts/LogicDeclaration__.d.ts +289 -0
  253. package/out/concepts/LogicDeclaration__.js +352 -0
  254. package/out/concepts/LogicDeclaration__.js.map +1 -0
  255. package/out/concepts/LogicItem__.d.ts +39 -45
  256. package/out/concepts/LogicItem__.js +76 -62
  257. package/out/concepts/LogicItem__.js.map +1 -1
  258. package/out/concepts/Logic__.d.ts +45 -63
  259. package/out/concepts/Logic__.js +159 -280
  260. package/out/concepts/Logic__.js.map +1 -1
  261. package/out/concepts/MatchCase__.d.ts +6 -4
  262. package/out/concepts/MatchCase__.js +16 -68
  263. package/out/concepts/MatchCase__.js.map +1 -1
  264. package/out/concepts/Match__.d.ts +8 -14
  265. package/out/concepts/Match__.js +17 -49
  266. package/out/concepts/Match__.js.map +1 -1
  267. package/out/concepts/MemberExpression__.d.ts +8 -23
  268. package/out/concepts/MemberExpression__.js +85 -103
  269. package/out/concepts/MemberExpression__.js.map +1 -1
  270. package/out/concepts/MetadataType__.d.ts +36 -54
  271. package/out/concepts/MetadataType__.js +44 -119
  272. package/out/concepts/MetadataType__.js.map +1 -1
  273. package/out/concepts/MicroApp__.d.ts +5 -6
  274. package/out/concepts/MicroApp__.js +30 -18
  275. package/out/concepts/MicroApp__.js.map +1 -1
  276. package/out/concepts/Module__.d.ts +99 -128
  277. package/out/concepts/Module__.js +133 -532
  278. package/out/concepts/Module__.js.map +1 -1
  279. package/out/concepts/MsgTriggerEvent__.d.ts +31 -33
  280. package/out/concepts/MsgTriggerEvent__.js +39 -67
  281. package/out/concepts/MsgTriggerEvent__.js.map +1 -1
  282. package/out/concepts/MsgTriggerLauncher__.d.ts +11 -14
  283. package/out/concepts/MsgTriggerLauncher__.js +18 -44
  284. package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
  285. package/out/concepts/MultiApprovalPolicy__.d.ts +8 -9
  286. package/out/concepts/MultiApprovalPolicy__.js +7 -13
  287. package/out/concepts/MultiApprovalPolicy__.js.map +1 -1
  288. package/out/concepts/Namespace__.d.ts +112 -138
  289. package/out/concepts/Namespace__.js +122 -501
  290. package/out/concepts/Namespace__.js.map +1 -1
  291. package/out/concepts/NewComposite__.d.ts +11 -21
  292. package/out/concepts/NewComposite__.js +48 -146
  293. package/out/concepts/NewComposite__.js.map +1 -1
  294. package/out/concepts/NewList__.d.ts +6 -14
  295. package/out/concepts/NewList__.js +7 -77
  296. package/out/concepts/NewList__.js.map +1 -1
  297. package/out/concepts/NewMap__.d.ts +6 -14
  298. package/out/concepts/NewMap__.js +7 -77
  299. package/out/concepts/NewMap__.js.map +1 -1
  300. package/out/concepts/New__.d.ts +6 -0
  301. package/out/concepts/New__.js +9 -0
  302. package/out/concepts/New__.js.map +1 -1
  303. package/out/concepts/NullLiteral__.d.ts +5 -0
  304. package/out/concepts/NullLiteral__.js +5 -0
  305. package/out/concepts/NullLiteral__.js.map +1 -1
  306. package/out/concepts/NumberInputSetter__.d.ts +45 -0
  307. package/out/concepts/NumberInputSetter__.js +98 -0
  308. package/out/concepts/NumberInputSetter__.js.map +1 -0
  309. package/out/concepts/NumericLiteral__.d.ts +6 -13
  310. package/out/concepts/NumericLiteral__.js +8 -45
  311. package/out/concepts/NumericLiteral__.js.map +1 -1
  312. package/out/concepts/OqlQueryComponent__.d.ts +7 -17
  313. package/out/concepts/OqlQueryComponent__.js +16 -53
  314. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  315. package/out/concepts/OverriddenLogic__.d.ts +38 -59
  316. package/out/concepts/OverriddenLogic__.js +55 -252
  317. package/out/concepts/OverriddenLogic__.js.map +1 -1
  318. package/out/concepts/Paginate__.d.ts +59 -0
  319. package/out/concepts/Paginate__.js +158 -0
  320. package/out/concepts/Paginate__.js.map +1 -0
  321. package/out/concepts/ParamWithGroup__.d.ts +13 -10
  322. package/out/concepts/ParamWithGroup__.js +15 -6
  323. package/out/concepts/ParamWithGroup__.js.map +1 -1
  324. package/out/concepts/Param__.d.ts +33 -76
  325. package/out/concepts/Param__.js +63 -159
  326. package/out/concepts/Param__.js.map +1 -1
  327. package/out/concepts/Point__.d.ts +5 -6
  328. package/out/concepts/Point__.js +11 -13
  329. package/out/concepts/Point__.js.map +1 -1
  330. package/out/concepts/ProcessComponent__.d.ts +12 -20
  331. package/out/concepts/ProcessComponent__.js +32 -90
  332. package/out/concepts/ProcessComponent__.js.map +1 -1
  333. package/out/concepts/ProcessElement__.d.ts +21 -66
  334. package/out/concepts/ProcessElement__.js +48 -360
  335. package/out/concepts/ProcessElement__.js.map +1 -1
  336. package/out/concepts/ProcessOutcome__.d.ts +5 -4
  337. package/out/concepts/ProcessOutcome__.js +8 -8
  338. package/out/concepts/ProcessOutcome__.js.map +1 -1
  339. package/out/concepts/ProcessOutcomes__.d.ts +5 -4
  340. package/out/concepts/ProcessOutcomes__.js +6 -7
  341. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  342. package/out/concepts/Process__.d.ts +16 -26
  343. package/out/concepts/Process__.js +29 -186
  344. package/out/concepts/Process__.js.map +1 -1
  345. package/out/concepts/PropDeclaration__.d.ts +99 -0
  346. package/out/concepts/PropDeclaration__.js +183 -0
  347. package/out/concepts/PropDeclaration__.js.map +1 -0
  348. package/out/concepts/PropertySelectSetter__.d.ts +25 -0
  349. package/out/concepts/PropertySelectSetter__.js +53 -0
  350. package/out/concepts/PropertySelectSetter__.js.map +1 -0
  351. package/out/concepts/QueryAggregateExpression__.d.ts +6 -13
  352. package/out/concepts/QueryAggregateExpression__.js +11 -46
  353. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  354. package/out/concepts/QueryFieldExpression__.d.ts +5 -0
  355. package/out/concepts/QueryFieldExpression__.js +17 -4
  356. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  357. package/out/concepts/QueryFromExpression__.d.ts +6 -3
  358. package/out/concepts/QueryFromExpression__.js +14 -34
  359. package/out/concepts/QueryFromExpression__.js.map +1 -1
  360. package/out/concepts/QueryGroupByExpression__.d.ts +5 -12
  361. package/out/concepts/QueryGroupByExpression__.js +5 -44
  362. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  363. package/out/concepts/QueryJoinExpression__.d.ts +29 -26
  364. package/out/concepts/QueryJoinExpression__.js +34 -52
  365. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  366. package/out/concepts/QueryLimitExpression__.d.ts +5 -22
  367. package/out/concepts/QueryLimitExpression__.js +5 -57
  368. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  369. package/out/concepts/QueryOrderByExpression__.d.ts +5 -22
  370. package/out/concepts/QueryOrderByExpression__.js +5 -57
  371. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  372. package/out/concepts/QuerySelectExpression__.d.ts +37 -34
  373. package/out/concepts/QuerySelectExpression__.js +37 -59
  374. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  375. package/out/concepts/Rect__.d.ts +5 -6
  376. package/out/concepts/Rect__.js +17 -15
  377. package/out/concepts/Rect__.js.map +1 -1
  378. package/out/concepts/Return__.d.ts +28 -56
  379. package/out/concepts/Return__.js +50 -139
  380. package/out/concepts/Return__.js.map +1 -1
  381. package/out/concepts/Role__.d.ts +5 -11
  382. package/out/concepts/Role__.js +21 -21
  383. package/out/concepts/Role__.js.map +1 -1
  384. package/out/concepts/SelectMembers__.d.ts +8 -20
  385. package/out/concepts/SelectMembers__.js +10 -58
  386. package/out/concepts/SelectMembers__.js.map +1 -1
  387. package/out/concepts/SequentialPolicy__.d.ts +5 -0
  388. package/out/concepts/SequentialPolicy__.js +5 -0
  389. package/out/concepts/SequentialPolicy__.js.map +1 -1
  390. package/out/concepts/SetterOption__.d.ts +49 -0
  391. package/out/concepts/SetterOption__.js +99 -0
  392. package/out/concepts/SetterOption__.js.map +1 -0
  393. package/out/concepts/SlotDeclaration__.d.ts +213 -0
  394. package/out/concepts/SlotDeclaration__.js +287 -0
  395. package/out/concepts/SlotDeclaration__.js.map +1 -0
  396. package/out/concepts/Slot__.d.ts +7 -31
  397. package/out/concepts/Slot__.js +27 -72
  398. package/out/concepts/Slot__.js.map +1 -1
  399. package/out/concepts/SqlQueryComponent__.d.ts +6 -17
  400. package/out/concepts/SqlQueryComponent__.js +14 -54
  401. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  402. package/out/concepts/Start__.d.ts +5 -4
  403. package/out/concepts/Start__.js +5 -7
  404. package/out/concepts/Start__.js.map +1 -1
  405. package/out/concepts/StaticString__.d.ts +6 -12
  406. package/out/concepts/StaticString__.js +14 -21
  407. package/out/concepts/StaticString__.js.map +1 -1
  408. package/out/concepts/StringInterpolation__.d.ts +5 -2
  409. package/out/concepts/StringInterpolation__.js +7 -33
  410. package/out/concepts/StringInterpolation__.js.map +1 -1
  411. package/out/concepts/StringLiteral__.d.ts +6 -1
  412. package/out/concepts/StringLiteral__.js +16 -2
  413. package/out/concepts/StringLiteral__.js.map +1 -1
  414. package/out/concepts/StructureProperty__.d.ts +13 -49
  415. package/out/concepts/StructureProperty__.js +35 -137
  416. package/out/concepts/StructureProperty__.js.map +1 -1
  417. package/out/concepts/Structure__.d.ts +13 -21
  418. package/out/concepts/Structure__.js +28 -90
  419. package/out/concepts/Structure__.js.map +1 -1
  420. package/out/concepts/SwitchCase__.d.ts +6 -13
  421. package/out/concepts/SwitchCase__.js +6 -45
  422. package/out/concepts/SwitchCase__.js.map +1 -1
  423. package/out/concepts/SwitchSetter__.d.ts +25 -0
  424. package/out/concepts/SwitchSetter__.js +53 -0
  425. package/out/concepts/SwitchSetter__.js.map +1 -0
  426. package/out/concepts/SwitchStatement__.d.ts +6 -3
  427. package/out/concepts/SwitchStatement__.js +5 -31
  428. package/out/concepts/SwitchStatement__.js.map +1 -1
  429. package/out/concepts/ThemeVariable__.d.ts +29 -0
  430. package/out/concepts/ThemeVariable__.js +58 -0
  431. package/out/concepts/ThemeVariable__.js.map +1 -0
  432. package/out/concepts/Theme__.d.ts +5 -6
  433. package/out/concepts/Theme__.js +11 -13
  434. package/out/concepts/Theme__.js.map +1 -1
  435. package/out/concepts/Transactional__.d.ts +29 -35
  436. package/out/concepts/Transactional__.js +54 -56
  437. package/out/concepts/Transactional__.js.map +1 -1
  438. package/out/concepts/TriggerEvent__.d.ts +8 -20
  439. package/out/concepts/TriggerEvent__.js +13 -57
  440. package/out/concepts/TriggerEvent__.js.map +1 -1
  441. package/out/concepts/TriggerLauncher__.d.ts +12 -17
  442. package/out/concepts/TriggerLauncher__.js +30 -27
  443. package/out/concepts/TriggerLauncher__.js.map +1 -1
  444. package/out/concepts/TypeAnnotation__.d.ts +8 -11
  445. package/out/concepts/TypeAnnotation__.js +40 -89
  446. package/out/concepts/TypeAnnotation__.js.map +1 -1
  447. package/out/concepts/TypeParam__.d.ts +5 -0
  448. package/out/concepts/TypeParam__.js +12 -1
  449. package/out/concepts/TypeParam__.js.map +1 -1
  450. package/out/concepts/UnaryExpression__.d.ts +5 -12
  451. package/out/concepts/UnaryExpression__.js +8 -45
  452. package/out/concepts/UnaryExpression__.js.map +1 -1
  453. package/out/concepts/Unparsed__.d.ts +5 -0
  454. package/out/concepts/Unparsed__.js +8 -1
  455. package/out/concepts/Unparsed__.js.map +1 -1
  456. package/out/concepts/UseComponent__.d.ts +6 -7
  457. package/out/concepts/UseComponent__.js +11 -13
  458. package/out/concepts/UseComponent__.js.map +1 -1
  459. package/out/concepts/ValidationRule__.d.ts +7 -28
  460. package/out/concepts/ValidationRule__.js +18 -71
  461. package/out/concepts/ValidationRule__.js.map +1 -1
  462. package/out/concepts/Variable__.d.ts +30 -58
  463. package/out/concepts/Variable__.js +51 -140
  464. package/out/concepts/Variable__.js.map +1 -1
  465. package/out/concepts/ViewBlockWithImage__.d.ts +33 -0
  466. package/out/concepts/ViewBlockWithImage__.js +63 -0
  467. package/out/concepts/ViewBlockWithImage__.js.map +1 -0
  468. package/out/concepts/ViewBlock__.d.ts +11 -12
  469. package/out/concepts/ViewBlock__.js +22 -18
  470. package/out/concepts/ViewBlock__.js.map +1 -1
  471. package/out/concepts/ViewComponentDeclaration__.d.ts +721 -0
  472. package/out/concepts/ViewComponentDeclaration__.js +808 -0
  473. package/out/concepts/ViewComponentDeclaration__.js.map +1 -0
  474. package/out/concepts/ViewElement__.d.ts +38 -37
  475. package/out/concepts/ViewElement__.js +415 -432
  476. package/out/concepts/ViewElement__.js.map +1 -1
  477. package/out/concepts/View__.d.ts +39 -46
  478. package/out/concepts/View__.js +509 -342
  479. package/out/concepts/View__.js.map +1 -1
  480. package/out/concepts/WhileStatement__.d.ts +6 -13
  481. package/out/concepts/WhileStatement__.js +6 -45
  482. package/out/concepts/WhileStatement__.js.map +1 -1
  483. package/out/concepts/basics/stdlib/nasl.auth.js +68 -33
  484. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
  485. package/out/concepts/basics/stdlib/nasl.process.js +101 -3
  486. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
  487. package/out/concepts/basics/stdlib/nasl.util.js +31 -31
  488. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  489. package/out/concepts/index__.d.ts +24 -8
  490. package/out/concepts/index__.js +24 -8
  491. package/out/concepts/index__.js.map +1 -1
  492. package/out/concepts/utils/asserts.d.ts +1079 -313
  493. package/out/concepts/utils/asserts.js +1461 -441
  494. package/out/concepts/utils/asserts.js.map +1 -1
  495. package/out/concepts/utils/types.d.ts +82 -30
  496. package/out/config.d.ts +9 -0
  497. package/out/config.js +5 -0
  498. package/out/config.js.map +1 -1
  499. package/out/decorators/index.d.ts +1 -6
  500. package/out/decorators/index.js +7 -16
  501. package/out/decorators/index.js.map +1 -1
  502. package/out/enums/KEYWORDS.js +2 -0
  503. package/out/enums/KEYWORDS.js.map +1 -1
  504. package/out/generator/genBundleFiles.d.ts +2 -0
  505. package/out/generator/genBundleFiles.js +105 -25
  506. package/out/generator/genBundleFiles.js.map +1 -1
  507. package/out/generator/genReleaseBody.d.ts +2 -4
  508. package/out/generator/genReleaseBody.js +0 -1
  509. package/out/generator/genReleaseBody.js.map +1 -1
  510. package/out/generator/permission.d.ts +5 -1
  511. package/out/generator/permission.js +3 -2
  512. package/out/generator/permission.js.map +1 -1
  513. package/out/index.d.ts +1 -0
  514. package/out/index.js +3 -1
  515. package/out/index.js.map +1 -1
  516. package/out/natural/genNaturalTS.js +2 -5
  517. package/out/natural/genNaturalTS.js.map +1 -1
  518. package/out/natural/index.d.ts +2 -0
  519. package/out/natural/index.js +2 -0
  520. package/out/natural/index.js.map +1 -1
  521. package/out/natural/naslStdlibMap.d.ts +1 -2
  522. package/out/natural/naslStdlibMap.js +32 -23
  523. package/out/natural/naslStdlibMap.js.map +1 -1
  524. package/out/natural/prompt/analyzeClaims.d.ts +1 -0
  525. package/out/natural/prompt/analyzeClaims.js +21 -0
  526. package/out/natural/prompt/analyzeClaims.js.map +1 -0
  527. package/out/natural/prompt/executeClaims.d.ts +1 -0
  528. package/out/natural/prompt/executeClaims.js +73 -0
  529. package/out/natural/prompt/executeClaims.js.map +1 -0
  530. package/out/natural/transformTSCode.js +13 -2
  531. package/out/natural/transformTSCode.js.map +1 -1
  532. package/out/server/createUiTs.d.ts +2 -1
  533. package/out/server/createUiTs.js +133 -161
  534. package/out/server/createUiTs.js.map +1 -1
  535. package/out/server/entity2LogicNamespace.js +1 -15
  536. package/out/server/entity2LogicNamespace.js.map +1 -1
  537. package/out/server/extendBaseNode.js +36 -9
  538. package/out/server/extendBaseNode.js.map +1 -1
  539. package/out/server/formatTsUtils.js +9 -9
  540. package/out/server/formatTsUtils.js.map +1 -1
  541. package/out/server/getConnector.d.ts +1 -0
  542. package/out/server/getConnector.js +38 -35
  543. package/out/server/getConnector.js.map +1 -1
  544. package/out/server/getFunctions.js +3 -3
  545. package/out/server/getFunctions.js.map +1 -1
  546. package/out/server/getLogics.js +51 -15
  547. package/out/server/getLogics.js.map +1 -1
  548. package/out/server/getMemberIdentifier.js +87 -144
  549. package/out/server/getMemberIdentifier.js.map +1 -1
  550. package/out/server/naslServer.d.ts +11 -1
  551. package/out/server/naslServer.js +118 -74
  552. package/out/server/naslServer.js.map +1 -1
  553. package/out/server/translator.js +24 -5
  554. package/out/server/translator.js.map +1 -1
  555. package/out/service/storage/init.d.ts +1 -0
  556. package/out/service/storage/init.js +12 -7
  557. package/out/service/storage/init.js.map +1 -1
  558. package/out/templator/genCreateBlock.js +16 -16
  559. package/out/templator/genCreateBlock.js.map +1 -1
  560. package/out/templator/genCurdEditMultipleKeyBlock.js +23 -23
  561. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  562. package/out/templator/genCurdMultipleKeyBlock.d.ts +2 -2
  563. package/out/templator/genCurdMultipleKeyBlock.js +28 -38
  564. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  565. package/out/templator/genEditTableBlock.js +15 -15
  566. package/out/templator/genEditTableBlock.js.map +1 -1
  567. package/out/templator/genEnumSelectBlock.js +8 -8
  568. package/out/templator/genEnumSelectBlock.js.map +1 -1
  569. package/out/templator/genGridViewBlock.js +18 -20
  570. package/out/templator/genGridViewBlock.js.map +1 -1
  571. package/out/templator/genListViewBlock.js +10 -10
  572. package/out/templator/genListViewBlock.js.map +1 -1
  573. package/out/templator/genQueryComponent.js +32 -37
  574. package/out/templator/genQueryComponent.js.map +1 -1
  575. package/out/templator/genSelectBlock.js +10 -10
  576. package/out/templator/genSelectBlock.js.map +1 -1
  577. package/out/templator/genTableBlock.js +18 -10
  578. package/out/templator/genTableBlock.js.map +1 -1
  579. package/out/templator/genUpdateBlock.js +15 -15
  580. package/out/templator/genUpdateBlock.js.map +1 -1
  581. package/out/templator/utils.d.ts +19 -24
  582. package/out/templator/utils.js +20 -30
  583. package/out/templator/utils.js.map +1 -1
  584. package/out/translator/types.d.ts +2 -0
  585. package/out/utils/index.d.ts +6 -1
  586. package/out/utils/index.js +37 -4
  587. package/out/utils/index.js.map +1 -1
  588. package/out/utils/string.d.ts +12 -0
  589. package/out/utils/string.js +15 -1
  590. package/out/utils/string.js.map +1 -1
  591. package/out/utils/time-slicing/performance.js +3 -3
  592. package/out/utils/time-slicing/performance.js.map +1 -1
  593. package/package.json +1 -1
  594. package/sandbox/stdlib/nasl.auth.ts +4 -0
  595. package/sandbox/stdlib/nasl.collection.ts +5 -3
  596. package/sandbox/stdlib/nasl.core.ts +16 -1
  597. package/sandbox/stdlib/nasl.oql.ts +2 -2
  598. package/sandbox/stdlib/nasl.process.ts +18 -0
  599. package/sandbox/stdlib/nasl.ui.components.h5.ts +1751 -0
  600. package/sandbox/stdlib/nasl.ui.components.pc.ts +3479 -0
  601. package/sandbox/stdlib/nasl.ui.definition.ts +53 -2688
  602. package/sandbox/stdlib/nasl.ui.ts +2 -1
  603. package/sandbox/stdlib/nasl.util.ts +7 -5
  604. package/sandbox-natural/stdlib/nasl.core.ts +3 -0
  605. package/sandbox-natural/stdlib/nasl.oql.ts +4 -3
  606. package/src/automate/engine/utils.js +3 -7
  607. package/src/automate/template/myProcess.js +65 -65
  608. package/src/bak/translator.js +62 -29
  609. package/src/breakpoint/generator/BreakpointNode.ts +9 -0
  610. package/src/breakpoint/shared/constants.ts +1 -0
  611. package/src/breakpoint/shared/utils.ts +1 -1
  612. package/src/common/BaseNode.ts +71 -9
  613. package/src/common/ComponentAPI.ts +6 -3
  614. package/src/common/EventEmitter.ts +1 -0
  615. package/src/concepts/Abort__.ts +8 -8
  616. package/src/concepts/AbstractInterface__.ts +14 -14
  617. package/src/concepts/Anchor__.ts +8 -60
  618. package/src/concepts/AnonymousFunction__.ts +21 -198
  619. package/src/concepts/App__.ts +1151 -1837
  620. package/src/concepts/Argument__.ts +16 -64
  621. package/src/concepts/Assignee__.ts +14 -72
  622. package/src/concepts/AssignmentLine__.ts +9 -14
  623. package/src/concepts/Assignment__.ts +9 -92
  624. package/src/concepts/Attribute__.ts +49 -176
  625. package/src/concepts/AuthInterface__.ts +19 -20
  626. package/src/concepts/AuthLogicForCallInterface__.ts +9 -36
  627. package/src/concepts/AuthLogic__.ts +45 -46
  628. package/src/concepts/BackendVariable__.ts +45 -167
  629. package/src/concepts/Backend__.ts +13 -57
  630. package/src/concepts/BaseSetter__.ts +72 -0
  631. package/src/concepts/BatchAssignment__.ts +18 -105
  632. package/src/concepts/BinaryExpression__.ts +36 -89
  633. package/src/concepts/BindAttribute__.ts +194 -343
  634. package/src/concepts/BindDirective__.ts +80 -135
  635. package/src/concepts/BindEvent__.ts +62 -126
  636. package/src/concepts/BindStyle__.ts +59 -112
  637. package/src/concepts/Block__.ts +8 -34
  638. package/src/concepts/BooleanLiteral__.ts +12 -5
  639. package/src/concepts/BusinessComponent__.ts +201 -502
  640. package/src/concepts/BusinessLogic__.ts +15 -15
  641. package/src/concepts/CallAuthInterface__.ts +10 -39
  642. package/src/concepts/CallConnector__.ts +15 -6
  643. package/src/concepts/CallEvent__.ts +16 -45
  644. package/src/concepts/CallFunction__.ts +104 -134
  645. package/src/concepts/CallInterface__.ts +20 -47
  646. package/src/concepts/CallLogic__.ts +93 -175
  647. package/src/concepts/CallQueryComponent__.ts +226 -520
  648. package/src/concepts/CapsulesSetter__.ts +254 -0
  649. package/src/concepts/Comment__.ts +11 -5
  650. package/src/concepts/CompletionProperty__.ts +29 -100
  651. package/src/concepts/ConfigGroup__.ts +13 -57
  652. package/src/concepts/ConfigPropertyValue__.ts +14 -26
  653. package/src/concepts/ConfigProperty__.ts +28 -68
  654. package/src/concepts/Configuration__.ts +9 -56
  655. package/src/concepts/Connection__.ts +27 -68
  656. package/src/concepts/ConnectorTrigger__.ts +57 -65
  657. package/src/concepts/Connector__.ts +339 -1448
  658. package/src/concepts/Constant__.ts +59 -182
  659. package/src/concepts/CountersignPolicy__.ts +12 -18
  660. package/src/concepts/DataSource__.ts +29 -68
  661. package/src/concepts/DatabaseTypeAnnotation__.ts +14 -19
  662. package/src/concepts/DefaultValue__.ts +10 -74
  663. package/src/concepts/Destination__.ts +28 -80
  664. package/src/concepts/End__.ts +11 -9
  665. package/src/concepts/EntityIndex__.ts +44 -51
  666. package/src/concepts/EntityProperty__.ts +86 -238
  667. package/src/concepts/Entity__.ts +43 -111
  668. package/src/concepts/EnumItem__.ts +29 -40
  669. package/src/concepts/EnumSelectSetter__.ts +254 -0
  670. package/src/concepts/Enum__.ts +38 -129
  671. package/src/concepts/EventDeclaration__.ts +95 -0
  672. package/src/concepts/Event__.ts +43 -92
  673. package/src/concepts/ExternalDestination__.ts +17 -91
  674. package/src/concepts/ForEachStatement__.ts +15 -198
  675. package/src/concepts/FrontendLibrary__.ts +111 -161
  676. package/src/concepts/FrontendType__.ts +21 -118
  677. package/src/concepts/FrontendVariable__.ts +10 -4
  678. package/src/concepts/Frontend__.ts +44 -250
  679. package/src/concepts/Function__.ts +28 -220
  680. package/src/concepts/I18nInfo__.ts +18 -20
  681. package/src/concepts/IconSetter__.ts +72 -0
  682. package/src/concepts/Identifier__.ts +27 -16
  683. package/src/concepts/IfStatement__.ts +9 -60
  684. package/src/concepts/ImageSetter__.ts +65 -0
  685. package/src/concepts/ImportedInterface__.ts +17 -4
  686. package/src/concepts/InputSetter__.ts +72 -0
  687. package/src/concepts/Integration__.ts +10 -114
  688. package/src/concepts/InterfaceParam__.ts +67 -186
  689. package/src/concepts/Interface__.ts +106 -200
  690. package/src/concepts/JSBlock__.ts +11 -11
  691. package/src/concepts/JavaLogic__.ts +19 -9
  692. package/src/concepts/LogicDeclaration__.ts +657 -0
  693. package/src/concepts/LogicItem__.ts +91 -96
  694. package/src/concepts/Logic__.ts +287 -434
  695. package/src/concepts/MatchCase__.ts +22 -72
  696. package/src/concepts/Match__.ts +23 -67
  697. package/src/concepts/MemberExpression__.ts +136 -132
  698. package/src/concepts/MetadataType__.ts +72 -167
  699. package/src/concepts/MicroApp__.ts +34 -29
  700. package/src/concepts/Module__.ts +259 -681
  701. package/src/concepts/MsgTriggerEvent__.ts +44 -79
  702. package/src/concepts/MsgTriggerLauncher__.ts +21 -54
  703. package/src/concepts/MultiApprovalPolicy__.ts +10 -18
  704. package/src/concepts/Namespace__.ts +278 -652
  705. package/src/concepts/NewComposite__.ts +62 -170
  706. package/src/concepts/NewList__.ts +12 -94
  707. package/src/concepts/NewMap__.ts +12 -94
  708. package/src/concepts/New__.ts +13 -2
  709. package/src/concepts/NullLiteral__.ts +8 -2
  710. package/src/concepts/NumberInputSetter__.ts +104 -0
  711. package/src/concepts/NumericLiteral__.ts +13 -63
  712. package/src/concepts/OqlQueryComponent__.ts +23 -71
  713. package/src/concepts/OverriddenLogic__.ts +71 -287
  714. package/src/concepts/Paginate__.ts +185 -0
  715. package/src/concepts/ParamWithGroup__.ts +26 -17
  716. package/src/concepts/Param__.ts +70 -211
  717. package/src/concepts/Point__.ts +14 -19
  718. package/src/concepts/ProcessComponent__.ts +33 -104
  719. package/src/concepts/ProcessElement__.ts +67 -422
  720. package/src/concepts/ProcessOutcome__.ts +12 -11
  721. package/src/concepts/ProcessOutcomes__.ts +9 -9
  722. package/src/concepts/Process__.ts +36 -200
  723. package/src/concepts/PropDeclaration__.ts +209 -0
  724. package/src/concepts/PropertySelectSetter__.ts +65 -0
  725. package/src/concepts/QueryAggregateExpression__.ts +18 -65
  726. package/src/concepts/QueryFieldExpression__.ts +22 -10
  727. package/src/concepts/QueryFromExpression__.ts +21 -41
  728. package/src/concepts/QueryGroupByExpression__.ts +8 -60
  729. package/src/concepts/QueryJoinExpression__.ts +64 -101
  730. package/src/concepts/QueryLimitExpression__.ts +9 -86
  731. package/src/concepts/QueryOrderByExpression__.ts +9 -86
  732. package/src/concepts/QuerySelectExpression__.ts +70 -118
  733. package/src/concepts/Rect__.ts +22 -23
  734. package/src/concepts/Return__.ts +60 -185
  735. package/src/concepts/Role__.ts +22 -29
  736. package/src/concepts/SelectMembers__.ts +16 -77
  737. package/src/concepts/SequentialPolicy__.ts +7 -2
  738. package/src/concepts/SetterOption__.ts +111 -0
  739. package/src/concepts/SlotDeclaration__.ts +488 -0
  740. package/src/concepts/Slot__.ts +35 -105
  741. package/src/concepts/SqlQueryComponent__.ts +21 -73
  742. package/src/concepts/Start__.ts +7 -8
  743. package/src/concepts/StaticString__.ts +16 -26
  744. package/src/concepts/StringInterpolation__.ts +9 -36
  745. package/src/concepts/StringLiteral__.ts +16 -7
  746. package/src/concepts/StructureProperty__.ts +38 -176
  747. package/src/concepts/Structure__.ts +32 -102
  748. package/src/concepts/SwitchCase__.ts +10 -62
  749. package/src/concepts/SwitchSetter__.ts +65 -0
  750. package/src/concepts/SwitchStatement__.ts +9 -35
  751. package/src/concepts/ThemeVariable__.ts +71 -0
  752. package/src/concepts/Theme__.ts +15 -17
  753. package/src/concepts/Transactional__.ts +67 -77
  754. package/src/concepts/TriggerEvent__.ts +14 -76
  755. package/src/concepts/TriggerLauncher__.ts +34 -38
  756. package/src/concepts/TypeAnnotation__.ts +50 -100
  757. package/src/concepts/TypeParam__.ts +10 -5
  758. package/src/concepts/UnaryExpression__.ts +12 -62
  759. package/src/concepts/Unparsed__.ts +11 -5
  760. package/src/concepts/UseComponent__.ts +14 -19
  761. package/src/concepts/ValidationRule__.ts +26 -105
  762. package/src/concepts/Variable__.ts +71 -195
  763. package/src/concepts/ViewBlockWithImage__.ts +80 -0
  764. package/src/concepts/ViewBlock__.ts +24 -27
  765. package/src/concepts/ViewComponentDeclaration__.ts +1670 -0
  766. package/src/concepts/ViewElement__.ts +502 -486
  767. package/src/concepts/View__.ts +576 -389
  768. package/src/concepts/WhileStatement__.ts +11 -62
  769. package/src/concepts/basics/stdlib/nasl.auth.ts +97 -34
  770. package/src/concepts/basics/stdlib/nasl.process.ts +103 -7
  771. package/src/concepts/basics/stdlib/nasl.util.ts +31 -31
  772. package/src/concepts/index__.ts +24 -8
  773. package/src/concepts/utils/asserts.ts +1544 -446
  774. package/src/concepts/utils/types.ts +121 -41
  775. package/src/config.ts +6 -0
  776. package/src/decorators/index.ts +3 -8
  777. package/src/enums/KEYWORDS.ts +2 -0
  778. package/src/generator/genBundleFiles.ts +129 -29
  779. package/src/generator/genReleaseBody.ts +0 -2
  780. package/src/generator/permission.ts +2 -2
  781. package/src/index.ts +1 -0
  782. package/src/natural/genNaturalTS.ts +2 -2
  783. package/src/natural/index.ts +3 -0
  784. package/src/natural/naslStdlibMap.ts +25 -19
  785. package/src/natural/prompt/analyzeClaims.ts +16 -0
  786. package/src/natural/prompt/executeClaims.ts +69 -0
  787. package/src/natural/transformTSCode.ts +12 -2
  788. package/src/server/createUiTs.ts +121 -155
  789. package/src/server/entity2LogicNamespace.ts +1 -16
  790. package/src/server/extendBaseNode.ts +46 -15
  791. package/src/server/formatTsUtils.ts +13 -13
  792. package/src/server/getConnector.ts +43 -35
  793. package/src/server/getFunctions.ts +3 -3
  794. package/src/server/getLogics.ts +34 -17
  795. package/src/server/getMemberIdentifier.ts +101 -145
  796. package/src/server/naslServer.ts +136 -74
  797. package/src/server/translator.ts +23 -5
  798. package/src/service/storage/init.ts +15 -8
  799. package/src/templator/genCreateBlock.ts +16 -16
  800. package/src/templator/genCurdEditMultipleKeyBlock.ts +23 -23
  801. package/src/templator/genCurdMultipleKeyBlock.ts +34 -44
  802. package/src/templator/genEditTableBlock.ts +15 -15
  803. package/src/templator/genEnumSelectBlock.ts +8 -8
  804. package/src/templator/genGridViewBlock.ts +18 -20
  805. package/src/templator/genListViewBlock.ts +10 -10
  806. package/src/templator/genQueryComponent.ts +33 -38
  807. package/src/templator/genSelectBlock.ts +10 -10
  808. package/src/templator/genTableBlock.ts +20 -12
  809. package/src/templator/genUpdateBlock.ts +15 -15
  810. package/src/templator/utils.ts +21 -30
  811. package/src/translator/types.ts +4 -0
  812. package/src/utils/index.ts +40 -5
  813. package/src/utils/string.ts +14 -0
  814. package/src/utils/time-slicing/performance.ts +3 -3
  815. package/test/concepts/call-interface/__snapshots__/getQuickInfoOffset.spec.ts.snap +1 -1
  816. package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
  817. package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +7 -8
  818. package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +5 -5
  819. package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +2 -2
  820. package/test/concepts/member-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
  821. package/test/concepts/member-expression/__snapshots__/toJS.spec.ts.snap +1 -1
  822. package/test/concepts/member-expression/fixtures/elements.table-view.data.json +363 -10
  823. package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +655 -611
  824. package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +127 -6
  825. package/test/concepts/view-element/fixtures/table-data-source-calllogic-with-server-validation.json +2074 -0
  826. package/test/concepts/view-element/toEmbeddedTS.spec.ts +11 -0
  827. package/test/concepts/view-element/toVue.spec.ts +0 -1
  828. package/ts-worker/src/start.js +1 -0
  829. package/out/concepts/ViewComponent__.d.ts +0 -568
  830. package/out/concepts/ViewComponent__.js +0 -809
  831. package/out/concepts/ViewComponent__.js.map +0 -1
  832. package/src/concepts/ViewComponent__.ts +0 -1444
@@ -26,34 +26,37 @@ import type BatchAssignment from './BatchAssignment__';
26
26
  import type CallInterface from './CallInterface__';
27
27
  import type CallLogic from './CallLogic__';
28
28
  import type DefaultValue from './DefaultValue__';
29
- import type Interface from './Interface__';
29
+ import type Interface from './Interface__'; // 临时记录删除的页面元素计数的最大值
30
+ import type LogicItem from './LogicItem__';
31
+ import type CallFunction from './CallFunction__';
32
+
33
+ import App from './App__';
34
+ import Module from './Module__';
35
+ import Frontend from './Frontend__';
30
36
 
31
37
  const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode;
32
38
  const removedViewElementCache: {
33
39
  [key: string]: number | bigint;
34
- } = {}; // 临时记录删除的页面元素计数的最大值
40
+ } = {};
35
41
 
36
42
  //================================================================================
37
43
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
38
44
  // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
39
45
  //================================================================================
40
46
  import { EventPayload, Params } from '../common/EventEmitter';
41
- import { concept, excludedInJSON, property, getConceptConstructor, getBaseNode } from '../decorators';
47
+ import { concept, excludedInJSON, property, getConceptConstructor } from '../decorators';
42
48
 
43
49
  import * as utils from '../utils';
44
50
  import * as types from './utils/types';
45
51
  import * as asserts from './utils/asserts';
46
52
  import { v4 as uuidv4 } from 'uuid';
47
53
  import BaseNode from '../common/BaseNode';
48
- import type StaticString from './StaticString__';
49
- import type ViewElement from './ViewElement__';
50
- import type Param from './Param__';
51
- import type Variable from './Variable__';
52
- import type Logic from './Logic__';
53
- import type BindEvent from './BindEvent__';
54
- import type Module from './Module__';
55
- import type Frontend from './Frontend__';
56
- import type App from './App__';
54
+ import StaticString from './StaticString__';
55
+ import ViewElement from './ViewElement__';
56
+ import Param from './Param__';
57
+ import Variable from './Variable__';
58
+ import Logic from './Logic__';
59
+ import BindEvent from './BindEvent__';
57
60
 
58
61
  /**
59
62
  * 页面
@@ -62,7 +65,11 @@ import type App from './App__';
62
65
  export class View extends BaseNode {
63
66
  /** 类名 */
64
67
  static readonly ConceptName: string = 'View';
65
-
68
+ /**
69
+ * 是否为抽象类
70
+ * 抽象类不能产生 concept: string
71
+ */
72
+ static isAbstract: boolean = false;
66
73
  /** 继承链 */
67
74
  static readonly inheritanceChain: string[] = ['BaseNode'];
68
75
 
@@ -72,30 +79,37 @@ export class View extends BaseNode {
72
79
  @property('concept')
73
80
  // @ts-ignore
74
81
  readonly concept!: 'View';
75
-
76
82
  /**
77
83
  * 页面模板 Id
78
84
  */
79
- @property()
80
- pageTemplateId!: string;
85
+ @property({
86
+ objectRef: '',
87
+ })
88
+ pageTemplateId: string;
81
89
 
82
90
  /**
83
91
  * 页面名称
84
92
  */
85
- @property()
86
- name!: string;
93
+ @property({
94
+ objectRef: '',
95
+ })
96
+ name: string = '';
87
97
 
88
98
  /**
89
99
  * 唯一标识
90
100
  */
91
- @property()
92
- uuid!: string;
101
+ @property({
102
+ objectRef: '',
103
+ })
104
+ uuid: string;
93
105
 
94
106
  /**
95
107
  * 页面标题
96
108
  */
97
- @property()
98
- title!: string;
109
+ @property({
110
+ objectRef: '',
111
+ })
112
+ title: string;
99
113
 
100
114
  /**
101
115
  * 面包屑
@@ -103,43 +117,55 @@ export class View extends BaseNode {
103
117
  @property({
104
118
  objectRef: 'StaticString',
105
119
  })
106
- crumb!: StaticString;
120
+ crumb: StaticString;
107
121
 
108
122
  /**
109
123
  * 权限控制
110
124
  */
111
- @property()
112
- auth!: boolean;
125
+ @property({
126
+ objectRef: '',
127
+ })
128
+ auth: boolean;
113
129
 
114
130
  /**
115
131
  * 权限资源描述
116
132
  */
117
- @property()
118
- authDescription!: string;
133
+ @property({
134
+ objectRef: '',
135
+ })
136
+ authDescription: string;
119
137
 
120
138
  /**
121
139
  * 是否是默认跳转的页面
122
140
  */
123
- @property()
124
- isIndex!: boolean;
141
+ @property({
142
+ objectRef: '',
143
+ })
144
+ isIndex: boolean;
125
145
 
126
146
  /**
127
147
  * 未解析的模板代码
128
148
  */
129
- @property()
130
- template!: string;
149
+ @property({
150
+ objectRef: '',
151
+ })
152
+ template: string;
131
153
 
132
154
  /**
133
155
  * 未解析的逻辑代码
134
156
  */
135
- @property()
136
- script!: string;
157
+ @property({
158
+ objectRef: '',
159
+ })
160
+ script: string;
137
161
 
138
162
  /**
139
163
  * 未解析的样式代码
140
164
  */
141
- @property()
142
- style!: string;
165
+ @property({
166
+ objectRef: '',
167
+ })
168
+ style: string;
143
169
 
144
170
  /**
145
171
  * 页面元素列表
@@ -195,6 +221,7 @@ export class View extends BaseNode {
195
221
  * 绑定的角色
196
222
  */
197
223
  @property({
224
+ objectRef: '',
198
225
  isArray: true,
199
226
  defaultValue: [],
200
227
  })
@@ -210,25 +237,6 @@ export class View extends BaseNode {
210
237
  })
211
238
  children: Array<View> = [];
212
239
 
213
- /**
214
- * 祖先 Module
215
- */
216
- get module() {
217
- return this.getAncestor('Module') as Module;
218
- }
219
- /**
220
- * 祖先 App
221
- */
222
- get app() {
223
- return this.getAncestor('App') as App;
224
- }
225
- /**
226
- * 祖先 Frontend
227
- */
228
- get frontend() {
229
- return this.getAncestor('Frontend') as Frontend;
230
- }
231
-
232
240
  /**
233
241
  * @param source 需要合并的部分参数
234
242
  */
@@ -242,17 +250,6 @@ export class View extends BaseNode {
242
250
  return super.from(source, parentNode, parentKey) as View;
243
251
  }
244
252
 
245
- /**
246
- * 从父级删除该节点
247
- * @internal
248
- */
249
- _delete() {
250
- let params: Params = null;
251
- if (this.parentNode) {
252
- params = (this.parentNode as any)?.__removeView?.(this);
253
- }
254
- return params;
255
- }
256
253
  /**
257
254
  * 设置页面名称
258
255
  */
@@ -927,7 +924,7 @@ export class View extends BaseNode {
927
924
 
928
925
  getBindEventExistingNames(excludedList: Array<BindEvent> = []) {
929
926
  const excludedSet = new Set(excludedList);
930
- return ((this.bindEvents as BindEvent[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
927
+ return ((this.bindEvents as BindEvent[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
931
928
  }
932
929
  getBindEventUniqueName(name = 'bindEvent1') {
933
930
  return utils.unique(name, this.getBindEventExistingNames(), undefined, false);
@@ -1081,7 +1078,7 @@ export class View extends BaseNode {
1081
1078
 
1082
1079
  getViewExistingNames(excludedList: Array<View> = []) {
1083
1080
  const excludedSet = new Set(excludedList);
1084
- return ((this.children as View[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
1081
+ return ((this.children as View[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
1085
1082
  }
1086
1083
  getViewUniqueName(name = 'view1') {
1087
1084
  return utils.unique(name, this.getViewExistingNames(), undefined, false);
@@ -1233,62 +1230,6 @@ export class View extends BaseNode {
1233
1230
  return node;
1234
1231
  }
1235
1232
 
1236
- /**
1237
- * 删除静态字符串
1238
- * @param name 静态字符串名称
1239
- */
1240
- removeCrumb(name: string): void;
1241
-
1242
- /**
1243
- * 删除静态字符串
1244
- * @param crumb 已有的静态字符串实例
1245
- */
1246
- removeCrumb(crumb: StaticString): void;
1247
-
1248
- removeCrumb(options: string | StaticString) {
1249
- let crumb: StaticString;
1250
- if (typeof options === 'string') {
1251
- crumb = this.crumb;
1252
- if (!crumb) {
1253
- throw new Error('找不到静态字符串 ' + options);
1254
- }
1255
- } else {
1256
- crumb = options;
1257
- }
1258
- return crumb.delete();
1259
- }
1260
-
1261
- __removeStaticString(staticString: StaticString) {
1262
- const parentKey = staticString.parentKey;
1263
- const params: Params = {
1264
- parentNode: this,
1265
- parentKey,
1266
- index: -1,
1267
- object: null,
1268
- oldObject: staticString,
1269
- };
1270
- if (parentKey) {
1271
- params.parentKey = parentKey;
1272
- // @ts-ignore
1273
- const t = this.__v_raw || this;
1274
- // @ts-ignore
1275
- const n = staticString.__v_raw || staticString;
1276
- if (Array.isArray((t as any)[parentKey])) {
1277
- // @ts-ignore
1278
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1279
- ~index && (this as any)[parentKey].splice(index, 1);
1280
- params.index = index;
1281
- } else {
1282
- const q = (t as any)[parentKey];
1283
- if ((q.__v_raw || q) === n) {
1284
- params.index = 0;
1285
- (this as any)[parentKey] = undefined;
1286
- }
1287
- }
1288
- }
1289
- return params;
1290
- }
1291
-
1292
1233
  /**
1293
1234
  * 删除页面元素
1294
1235
  * @param name 页面元素名称
@@ -1314,37 +1255,6 @@ export class View extends BaseNode {
1314
1255
  return viewElement.delete();
1315
1256
  }
1316
1257
 
1317
- __removeViewElement(viewElement: ViewElement) {
1318
- const parentKey = viewElement.parentKey;
1319
- const params: Params = {
1320
- parentNode: this,
1321
- parentKey,
1322
- index: -1,
1323
- object: null,
1324
- oldObject: viewElement,
1325
- };
1326
- if (parentKey) {
1327
- params.parentKey = parentKey;
1328
- // @ts-ignore
1329
- const t = this.__v_raw || this;
1330
- // @ts-ignore
1331
- const n = viewElement.__v_raw || viewElement;
1332
- if (Array.isArray((t as any)[parentKey])) {
1333
- // @ts-ignore
1334
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1335
- ~index && (this as any)[parentKey].splice(index, 1);
1336
- params.index = index;
1337
- } else {
1338
- const q = (t as any)[parentKey];
1339
- if ((q.__v_raw || q) === n) {
1340
- params.index = 0;
1341
- (this as any)[parentKey] = undefined;
1342
- }
1343
- }
1344
- }
1345
- return params;
1346
- }
1347
-
1348
1258
  /**
1349
1259
  * 删除输入参数
1350
1260
  * @param name 输入参数名称
@@ -1370,37 +1280,6 @@ export class View extends BaseNode {
1370
1280
  return param.delete();
1371
1281
  }
1372
1282
 
1373
- __removeParam(param: Param) {
1374
- const parentKey = param.parentKey;
1375
- const params: Params = {
1376
- parentNode: this,
1377
- parentKey,
1378
- index: -1,
1379
- object: null,
1380
- oldObject: param,
1381
- };
1382
- if (parentKey) {
1383
- params.parentKey = parentKey;
1384
- // @ts-ignore
1385
- const t = this.__v_raw || this;
1386
- // @ts-ignore
1387
- const n = param.__v_raw || param;
1388
- if (Array.isArray((t as any)[parentKey])) {
1389
- // @ts-ignore
1390
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1391
- ~index && (this as any)[parentKey].splice(index, 1);
1392
- params.index = index;
1393
- } else {
1394
- const q = (t as any)[parentKey];
1395
- if ((q.__v_raw || q) === n) {
1396
- params.index = 0;
1397
- (this as any)[parentKey] = undefined;
1398
- }
1399
- }
1400
- }
1401
- return params;
1402
- }
1403
-
1404
1283
  /**
1405
1284
  * 删除变量
1406
1285
  * @param name 变量名称
@@ -1426,37 +1305,6 @@ export class View extends BaseNode {
1426
1305
  return variable.delete();
1427
1306
  }
1428
1307
 
1429
- __removeVariable(variable: Variable) {
1430
- const parentKey = variable.parentKey;
1431
- const params: Params = {
1432
- parentNode: this,
1433
- parentKey,
1434
- index: -1,
1435
- object: null,
1436
- oldObject: variable,
1437
- };
1438
- if (parentKey) {
1439
- params.parentKey = parentKey;
1440
- // @ts-ignore
1441
- const t = this.__v_raw || this;
1442
- // @ts-ignore
1443
- const n = variable.__v_raw || variable;
1444
- if (Array.isArray((t as any)[parentKey])) {
1445
- // @ts-ignore
1446
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1447
- ~index && (this as any)[parentKey].splice(index, 1);
1448
- params.index = index;
1449
- } else {
1450
- const q = (t as any)[parentKey];
1451
- if ((q.__v_raw || q) === n) {
1452
- params.index = 0;
1453
- (this as any)[parentKey] = undefined;
1454
- }
1455
- }
1456
- }
1457
- return params;
1458
- }
1459
-
1460
1308
  /**
1461
1309
  * 删除逻辑
1462
1310
  * @param name 逻辑名称
@@ -1482,37 +1330,6 @@ export class View extends BaseNode {
1482
1330
  return logic.delete();
1483
1331
  }
1484
1332
 
1485
- __removeLogic(logic: Logic) {
1486
- const parentKey = logic.parentKey;
1487
- const params: Params = {
1488
- parentNode: this,
1489
- parentKey,
1490
- index: -1,
1491
- object: null,
1492
- oldObject: logic,
1493
- };
1494
- if (parentKey) {
1495
- params.parentKey = parentKey;
1496
- // @ts-ignore
1497
- const t = this.__v_raw || this;
1498
- // @ts-ignore
1499
- const n = logic.__v_raw || logic;
1500
- if (Array.isArray((t as any)[parentKey])) {
1501
- // @ts-ignore
1502
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1503
- ~index && (this as any)[parentKey].splice(index, 1);
1504
- params.index = index;
1505
- } else {
1506
- const q = (t as any)[parentKey];
1507
- if ((q.__v_raw || q) === n) {
1508
- params.index = 0;
1509
- (this as any)[parentKey] = undefined;
1510
- }
1511
- }
1512
- }
1513
- return params;
1514
- }
1515
-
1516
1333
  /**
1517
1334
  * 删除元素绑定事件
1518
1335
  * @param name 元素绑定事件名称
@@ -1538,37 +1355,6 @@ export class View extends BaseNode {
1538
1355
  return bindEvent.delete();
1539
1356
  }
1540
1357
 
1541
- __removeBindEvent(bindEvent: BindEvent) {
1542
- const parentKey = bindEvent.parentKey;
1543
- const params: Params = {
1544
- parentNode: this,
1545
- parentKey,
1546
- index: -1,
1547
- object: null,
1548
- oldObject: bindEvent,
1549
- };
1550
- if (parentKey) {
1551
- params.parentKey = parentKey;
1552
- // @ts-ignore
1553
- const t = this.__v_raw || this;
1554
- // @ts-ignore
1555
- const n = bindEvent?.__v_raw || bindEvent;
1556
- if (Array.isArray((t as any)[parentKey])) {
1557
- // @ts-ignore
1558
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1559
- ~index && (this as any)[parentKey].splice(index, 1);
1560
- params.index = index;
1561
- } else {
1562
- const q = (t as any)[parentKey];
1563
- if ((q?.__v_raw || q) === n) {
1564
- params.index = 0;
1565
- (this as any)[parentKey] = undefined;
1566
- }
1567
- }
1568
- }
1569
- return params;
1570
- }
1571
-
1572
1358
  /**
1573
1359
  * 删除页面
1574
1360
  * @param name 页面名称
@@ -1594,41 +1380,23 @@ export class View extends BaseNode {
1594
1380
  return view.delete();
1595
1381
  }
1596
1382
 
1597
- __removeView(view: View) {
1598
- const parentKey = view.parentKey;
1599
- const params: Params = {
1600
- parentNode: this,
1601
- parentKey,
1602
- index: -1,
1603
- object: null,
1604
- oldObject: view,
1605
- };
1606
- if (parentKey) {
1607
- params.parentKey = parentKey;
1608
- // @ts-ignore
1609
- const t = this.__v_raw || this;
1610
- // @ts-ignore
1611
- const n = view.__v_raw || view;
1612
- if (Array.isArray((t as any)[parentKey])) {
1613
- // @ts-ignore
1614
- const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
1615
- ~index && (this as any)[parentKey].splice(index, 1);
1616
- params.index = index;
1617
- } else {
1618
- const q = (t as any)[parentKey];
1619
- if ((q.__v_raw || q) === n) {
1620
- params.index = 0;
1621
- (this as any)[parentKey] = undefined;
1622
- }
1623
- }
1624
- }
1625
- return params;
1626
- }
1627
-
1628
1383
  //================================================================================
1629
1384
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1630
1385
  // 自动生成的代码已结束。下面可以手动编写。
1631
1386
  //================================================================================
1387
+ /**
1388
+ * 祖先 Module
1389
+ */
1390
+ get module() {
1391
+ return this.getAncestor('Module') as Module;
1392
+ }
1393
+ /**
1394
+ * 祖先 Frontend
1395
+ */
1396
+ get frontend() {
1397
+ return this.getAncestor('Frontend') as Frontend;
1398
+ }
1399
+
1632
1400
  /* 主页面有没有权限 */
1633
1401
  get parentAuth() {
1634
1402
  const _nameSpace = this.getTsNamespace();
@@ -1690,7 +1458,7 @@ export class View extends BaseNode {
1690
1458
  newName = name.replace(/\d*$/, (m) => `_${BranchCopyUniCode}_${m}`);
1691
1459
  }
1692
1460
  // 主分支无 BranchCopyUniCode
1693
- if (!BranchCopyUniCode && prefix?.at(-1) !== '_') {
1461
+ if (!BranchCopyUniCode && prefix?.slice(-1) !== '_') {
1694
1462
  newName = name.replace(/\d*$/, (m) => `_${m}`);
1695
1463
  }
1696
1464
  const newPrefix = newName.replace(/\d*$/, '');
@@ -1736,15 +1504,55 @@ export class View extends BaseNode {
1736
1504
  return false;
1737
1505
  }
1738
1506
 
1507
+ getViewElementByName(name: string) {
1508
+ let res: ViewElement | null = null;
1509
+
1510
+ for (let i = 0; i < (this.elements || []).length; i += 1) {
1511
+ const element = this.elements[i];
1512
+ // eslint-disable-next-line @typescript-eslint/no-loop-func
1513
+ utils.traverse(
1514
+ ({ node }) => {
1515
+ if (node.concept === 'ViewElement' && node.name === name) {
1516
+ res = node;
1517
+ }
1518
+ },
1519
+ {
1520
+ node: element,
1521
+ },
1522
+ );
1523
+
1524
+ if (res) {
1525
+ break;
1526
+ }
1527
+ }
1528
+
1529
+ return res;
1530
+ }
1531
+
1739
1532
  public static readonly TAG_NAME_PREFIX_REG?: RegExp = /^([lieu]|van)[-_]/;
1740
1533
 
1741
- mergeBlock({ code, nodePath, position, cb }: { code: string; nodePath: string; position: string; cb?: Function }) {
1534
+ mergeBlock({
1535
+ code,
1536
+ nodePath,
1537
+ position,
1538
+ slotTarget,
1539
+ cb,
1540
+ }: {
1541
+ code: string;
1542
+ nodePath: string;
1543
+ position: string;
1544
+ slotTarget?: string;
1545
+ cb?: Function;
1546
+ }) {
1742
1547
  const ViewElement = getConceptConstructor('ViewElement');
1743
1548
  const Logic = getConceptConstructor('Logic');
1744
1549
  const Param = getConceptConstructor('Param');
1745
1550
  const Variable = getConceptConstructor('Variable');
1746
1551
  const BindEvent = getConceptConstructor('BindEvent');
1747
- const template = utils.sliceTagContent(code, 'template');
1552
+ let template = utils.sliceTagContent(code, 'template');
1553
+ if (slotTarget) {
1554
+ template = `<template #${slotTarget}>${template}</template>`;
1555
+ }
1748
1556
  let targetNode = this.app.findNodeByPath(nodePath);
1749
1557
  let parentNode = position === 'append' ? targetNode : targetNode.parentNode;
1750
1558
  if (parentNode.concept === 'View') {
@@ -1949,7 +1757,7 @@ export class View extends BaseNode {
1949
1757
  this.elementsAttrs(this.elements, componentList);
1950
1758
  this.elementsAttrsAll(this.elements, componentListExtra);
1951
1759
 
1952
- let crumbI18n = this.frontend?.i18nInfo?.enabled && this.crumb?.i18nKey ? this.crumb?.i18nKey : undefined;
1760
+ const crumbI18n = this.frontend?.i18nInfo?.enabled && this.crumb?.i18nKey ? this.crumb?.i18nKey : undefined;
1953
1761
 
1954
1762
  const definition = {
1955
1763
  params: this.params,
@@ -1958,7 +1766,7 @@ export class View extends BaseNode {
1958
1766
  events: this.bindEvents,
1959
1767
  title: this.title,
1960
1768
  crumb: this.crumb?.value,
1961
- crumbI18n: crumbI18n,
1769
+ crumbI18n,
1962
1770
  first: this.children.find((child) => child.isIndex)?.name,
1963
1771
  auth: this.auth ? 'loginAuth' : undefined,
1964
1772
  viewBindEvents: this.getViewBindEvents(),
@@ -2100,7 +1908,7 @@ export class View extends BaseNode {
2100
1908
  if (elements) {
2101
1909
  elements.forEach((item: ViewElement) => {
2102
1910
  const { bindAttrs = [], name } = item;
2103
- const isDataSource = bindAttrs.some((attr) => attr.name === 'data-source');
1911
+ const isDataSource = bindAttrs.some((attr) => attr.name === 'dataSource');
2104
1912
  const isInclude = parentNodeNames.includes(name);
2105
1913
 
2106
1914
  allMethods.push(item);
@@ -2121,7 +1929,7 @@ export class View extends BaseNode {
2121
1929
  elementsAttrs(elements: Array<ViewElement>, componentList: Array<ViewElement>) {
2122
1930
  if (elements) {
2123
1931
  elements.forEach((item: ViewElement) => {
2124
- if (PAGE_COMPONENT_INCLUDE_TAG_MAP?.[item.tag]) {
1932
+ if (ComponentCompletionPropertyMap[item.tag]) {
2125
1933
  componentList.push(item);
2126
1934
  }
2127
1935
  if (item.children.length > 0) {
@@ -2134,7 +1942,7 @@ export class View extends BaseNode {
2134
1942
  elementsAttrsAll(elements: Array<ViewElement>, componentListExtra: Array<ViewElement>) {
2135
1943
  if (elements) {
2136
1944
  elements.forEach((item: ViewElement) => {
2137
- if (!PAGE_COMPONENT_INCLUDE_TAG_MAP?.[item.tag]) {
1945
+ if (!ComponentCompletionPropertyMap[item.tag]) {
2138
1946
  componentListExtra.push(item);
2139
1947
  }
2140
1948
  if (item.children.length > 0) {
@@ -2171,15 +1979,32 @@ export class View extends BaseNode {
2171
1979
  code += '];\n';
2172
1980
  }
2173
1981
  // 需要类型推导的局部变量/返回值需要调整申明顺序
2174
- const advanceMap: Map<Variable, Assignment | BatchAssignment> = new Map();
1982
+ const advanceMap: Map<Variable, Assignment | BatchAssignment | CallFunction> = new Map();
2175
1983
  yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
2176
- if (el && (asserts.isBatchAssignment(el) || (asserts.isAssignment(el) && el.left?.name))) {
1984
+ if (el && (
1985
+ // 批量赋值
1986
+ asserts.isBatchAssignment(el)
1987
+ // 赋值
1988
+ || (asserts.isAssignment(el) && el.left?.name)
1989
+ // 内置函数对集合类型的推导
1990
+ || (
1991
+ asserts.isCallFunction(el) && el.derivablecollection?.name
1992
+ )
1993
+ )) {
2177
1994
  // 子页面内部逻辑过滤
2178
1995
  if (el.view !== self) return;
2179
- if (asserts.isAssignment(el)) {
2180
- const advanceVar = self.variables?.find(
2181
- (variable) => !variable.typeAnnotation && el.left?.name === variable.name,
2182
- );
1996
+ if (asserts.isAssignment(el) || asserts.isCallFunction(el)) {
1997
+ let expression: LogicItem;
1998
+ if (asserts.isAssignment(el)) {
1999
+ // 需要被推导的赋值左侧
2000
+ expression = el.left;
2001
+ } else if (asserts.isCallFunction(el)) {
2002
+ // 需要被推导的集合
2003
+ expression = el.derivablecollection;
2004
+ }
2005
+ const advanceVar = self.variables?.find((variable) => {
2006
+ return !variable.typeAnnotation && expression?.name === variable.name;
2007
+ });
2183
2008
  if (advanceVar && !advanceMap.get(advanceVar)) {
2184
2009
  advanceMap.set(advanceVar, el);
2185
2010
  }
@@ -2232,10 +2057,30 @@ export class View extends BaseNode {
2232
2057
  return;
2233
2058
  }
2234
2059
  code += `${indent((state?.tabSize || 0) + 1)}// @ts-ignore\n`;
2060
+ if (asserts.isCallFunction(assignment)) {
2061
+ yield* wrapForEach([
2062
+ {
2063
+ key: 'key',
2064
+ node: assignment.keyOfCollection
2065
+ },
2066
+ {
2067
+ key: 'item',
2068
+ node: assignment.itemOfCollection
2069
+ }
2070
+ ], function* warpForEachGenerator({ key, node: itemNode }) {
2071
+ if (itemNode) {
2072
+ code += `const __${key}_${variable?.name} = `;
2073
+ const itemCode = yield* itemNode?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
2074
+ returnOrigin('');
2075
+ code += yield* self.getRightCode(itemCode, assignment, itemNode);
2076
+ code += ';\n';
2077
+ }
2078
+ });
2079
+ }
2235
2080
  code += `${indent((state?.tabSize || 0) + 1)}let `;
2236
2081
  code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
2237
- code += ' = ';
2238
2082
  if (asserts.isBatchAssignment(assignment)) {
2083
+ code += ' = ';
2239
2084
  yield* wrapForEach(assignment.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
2240
2085
  const leftCode =
2241
2086
  leftIndex.length === 1
@@ -2252,27 +2097,37 @@ export class View extends BaseNode {
2252
2097
  code += yield* self.getRightCode(rightCode, assignment, rightNode);
2253
2098
  }
2254
2099
  });
2100
+ } else if (asserts.isCallFunction(assignment)) {
2101
+ const nodeName = variable?.name;
2102
+ const keyNode = assignment.keyOfCollection;
2103
+ const itemNode = assignment.itemOfCollection;
2104
+ if (assignment.isDerivableMap && keyNode && itemNode) {
2105
+ code += `: nasl.collection.Map<typeof __key_${nodeName}, typeof __item_${nodeName}>`;
2106
+ } else if (assignment.isDerivableList && itemNode) {
2107
+ code += `: nasl.collection.List<typeof __item_${nodeName}>`;
2108
+ }
2255
2109
  } else {
2110
+ code += ' = ';
2256
2111
  let rightCode = '';
2257
2112
  // 因为右侧枚举要赋值就得new 一下;
2258
2113
  if (
2259
- assignment.right &&
2260
- asserts.isIdentifier(assignment.right) &&
2261
- assignment.right.namespace &&
2262
- assignment.right.namespace.endsWith('enums')
2114
+ (assignment as Assignment).right &&
2115
+ asserts.isIdentifier((assignment as Assignment).right) &&
2116
+ ((assignment as Assignment).right as any).namespace &&
2117
+ ((assignment as Assignment).right as any).namespace.endsWith('enums')
2263
2118
  ) {
2264
2119
  rightCode += 'new ';
2265
2120
  }
2266
2121
  rightCode +=
2267
- assignment.right && assignment.right.toEmbeddedTS
2268
- ? yield* assignment.right.toEmbeddedTS(shiftState(state, code, { inline: true }))
2122
+ (assignment as Assignment).right && (assignment as Assignment).right.toEmbeddedTS
2123
+ ? yield* (assignment as Assignment).right.toEmbeddedTS(shiftState(state, code, { inline: true }))
2269
2124
  : '__RIGHT__';
2270
- code += yield* self.getRightCode(rightCode, assignment, assignment.right);
2125
+ code += yield* self.getRightCode(rightCode, assignment, (assignment as Assignment).right);
2271
2126
  }
2272
2127
  code += ';\n';
2273
2128
  });
2274
2129
  // elements类型声明定义
2275
- code += `interface __elements {\n`;
2130
+ code += `interface IElements {\n`;
2276
2131
  // 生成所有的name和类型定义
2277
2132
  yield* wrapForEach(self.elements, function* warpForEachGenerator(element) {
2278
2133
  code += yield* element.toEmbeddedTSDefinition(
@@ -2282,32 +2137,40 @@ export class View extends BaseNode {
2282
2137
  );
2283
2138
  });
2284
2139
  code += `${indent((state?.tabSize || 0) + 1)}}\n`;
2285
- code += `let __elements: __elements;\n`;
2140
+ code += `let __elements: IElements;\n`;
2141
+
2142
+ const elementsPathMap: Record<string, string> = {};
2143
+
2144
+ // 深度遍历拿到element path
2286
2145
  if (Array.isArray(self.elements)) {
2287
- code += `${indent((state?.tabSize || 0) + 1)}interface `;
2288
- code += `__elements_completionProperty {\n`;
2289
- const componentList: Array<ViewElement> = [];
2290
- self.elementsAttrs(self.elements, componentList);
2291
- const variableList: string[] = [];
2292
- yield* wrapForEach(self.elements, function* warpForEachGenerator(item) {
2293
- code += yield* item.toEmbeddedTSVariableDefinition(shiftState(state, code, { inline: true }), variableList);
2146
+ self.elements.forEach((item) => {
2147
+ item.toEmbeddedTSRefPath(elementsPathMap);
2294
2148
  });
2295
- code += indent((state?.tabSize || 0) + 1) + `}\n`;
2296
- code += indent((state?.tabSize || 0) + 1);
2297
- code += `let __elements_completionProperty: __elements_completionProperty;\n`;
2298
- code += indent((state?.tabSize || 0) + 1);
2299
- code += `let __elements_variable_function = {\n`;
2149
+ }
2150
+
2151
+ if (Array.isArray(self.elements)) {
2152
+ // elementsRefTree
2153
+ code += `function elementsRefTree() {\n`;
2154
+ code += `return {\n`;
2155
+ code += `children: {\n`;
2300
2156
  yield* wrapForEach(self.elements, function* warpForEachGenerator(item) {
2301
- code += yield* item.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
2157
+ code += yield* item.toEmbeddedTSRefTree(shiftState(state, code, { inline: true }), { elementsPathMap });
2302
2158
  });
2303
- code += indent((state?.tabSize || 0) + 1) + `}\n`;
2304
- code += indent((state?.tabSize || 0) + 1);
2305
- code += `let __elements_stashFunctionVariable = {\n`;
2306
- yield* wrapForEach(variableList, function* warpForEachGenerator(item) {
2307
- code += indent((state?.tabSize || 0) + 2);
2308
- code += `${item}`;
2309
- });
2310
- code += indent((state?.tabSize || 0) + 1) + `}\n`;
2159
+ code += `},\n`;
2160
+ code += `};\n`;
2161
+ code += `};\n`;
2162
+
2163
+ code += `const __elementsRef = {\n`;
2164
+ // eslint-disable-next-line no-restricted-syntax, guard-for-in
2165
+ for (const key in elementsPathMap) {
2166
+ const pathStr = elementsPathMap[key];
2167
+ const pathArr = pathStr.split('.');
2168
+ const path = pathArr.reduce((prev: string, cur: string) => {
2169
+ return `${prev}.children.${cur}()`;
2170
+ }, 'elementsRefTree()');
2171
+ code += `${indent((state?.tabSize || 0) + 1)}${key}: ${path},\n`;
2172
+ }
2173
+ code += `};\n`;
2311
2174
  }
2312
2175
  // 逻辑
2313
2176
  if (Array.isArray(self.logics) && self.logics.length) {
@@ -2352,6 +2215,7 @@ export class View extends BaseNode {
2352
2215
  code += '\n';
2353
2216
  });
2354
2217
  }
2218
+
2355
2219
  code += `\n${indent((state?.tabSize || 0) + 1)}}\n`;
2356
2220
  if (Array.isArray(self.params)) {
2357
2221
  code += `${indent((state?.tabSize || 0) + 1)}export function $destination(options: {`;
@@ -2788,9 +2652,16 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
2788
2652
  }
2789
2653
  }
2790
2654
 
2791
- *getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any) {
2655
+ *getRightCode(code: string, assignment: Assignment | BatchAssignment | CallFunction, rightNode: any) {
2792
2656
  code = code.replaceAll('\n', ' ');
2793
- const logic = assignment.logic;
2657
+ // 赋值语句的右侧或者集合内置函数的参数
2658
+ if (
2659
+ (asserts.isAssignment(assignment) && !assignment.right)
2660
+ || (asserts.isCallFunction(assignment) && ((assignment.isDerivableList && !assignment.itemOfCollection) || (assignment.isDerivableMap && !(assignment.keyOfCollection && assignment.itemOfCollection))))
2661
+ ) {
2662
+ return code;
2663
+ }
2664
+ const { logic } = assignment;
2794
2665
  const logicRtn = logic?.returns[0];
2795
2666
  // 调用接口,参数替换成 null
2796
2667
  if (asserts.isCallInterface(rightNode)) {
@@ -2859,7 +2730,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
2859
2730
  if (
2860
2731
  element.concept &&
2861
2732
  element.concept === 'ViewElement' &&
2862
- (element as ViewElement).bindAttrs.find((bAttr) => bAttr.name === 'data-source')
2733
+ (element as ViewElement).bindAttrs.find((bAttr) => bAttr.name === 'dataSource')
2863
2734
  ) {
2864
2735
  viewElements.push(element as ViewElement);
2865
2736
  }
@@ -2874,7 +2745,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
2874
2745
  const currentIndex = viewElementsWithDataSource.length - 1 - index;
2875
2746
  const currentItemCode = `current${currentIndex === 0 ? '' : currentIndex}.item`;
2876
2747
  if (code.includes(currentItemCode)) {
2877
- const dataSource = viewElement.bindAttrs.find((bAttr) => bAttr.name === 'data-source');
2748
+ const dataSource = viewElement.bindAttrs.find((bAttr) => bAttr.name === 'dataSource');
2878
2749
  if (dataSource) {
2879
2750
  const view = viewElement.getAncestor('View') as View;
2880
2751
  const dataSourceTS = yield* dataSource.expression.toEmbeddedTS();
@@ -2897,11 +2768,27 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
2897
2768
  return code;
2898
2769
  }
2899
2770
 
2771
+ /**
2772
+ * 该视图是否有子页面容器
2773
+ */
2774
+ hasRouterView() {
2775
+ let res = false;
2776
+ utils.traverse(
2777
+ (current: any) => {
2778
+ if (current.node.tag === 'u-router-view' || current.node.tag === 'van-router-view') {
2779
+ res = true;
2780
+ }
2781
+ },
2782
+ { node: { children: this.elements } },
2783
+ );
2784
+ return res;
2785
+ }
2786
+
2900
2787
  getViewCallLogics(): string[] {
2901
2788
  const callbackLogics: string[] = [];
2902
2789
  this.traverseChildren((el) => {
2903
2790
  if (asserts.isIdentifier(el) && el.namespace?.endsWith('logics')) {
2904
- callbackLogics.push(el.namespace + '.' + el.name);
2791
+ callbackLogics.push(`${el.namespace}.${el.name}`);
2905
2792
  }
2906
2793
  });
2907
2794
  return callbackLogics;
@@ -2922,47 +2809,49 @@ type AttrObject = {
2922
2809
  value: string;
2923
2810
  label: string;
2924
2811
  };
2812
+
2813
+ // 不再使用
2925
2814
  export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrObject>> = {
2926
2815
  'u-list-view': {
2927
- 'page-size': {
2816
+ pageSize: {
2928
2817
  value: 'size',
2929
2818
  label: '分页大小',
2930
2819
  },
2931
- 'page-number': {
2820
+ pageNumber: {
2932
2821
  value: 'page',
2933
2822
  label: '当前页数',
2934
2823
  },
2935
- 'data-source': {
2824
+ dataSource: {
2936
2825
  value: 'data',
2937
2826
  label: '数据',
2938
2827
  },
2939
2828
  },
2940
2829
  'u-grid-view': {
2941
- 'page-size': {
2830
+ pageSize: {
2942
2831
  value: 'size',
2943
2832
  label: '分页大小',
2944
2833
  },
2945
- 'page-number': {
2834
+ pageNumber: {
2946
2835
  value: 'page',
2947
2836
  label: '当前页数',
2948
2837
  },
2949
- 'data-source': {
2838
+ dataSource: {
2950
2839
  value: 'data',
2951
2840
  label: '数据',
2952
2841
  },
2953
2842
  },
2954
2843
  'u-list-components': {
2955
- 'data-source': {
2844
+ dataSource: {
2956
2845
  value: 'data',
2957
2846
  label: '数据',
2958
2847
  },
2959
2848
  },
2960
2849
  'u-table-view': {
2961
- 'page-size': {
2850
+ pageSize: {
2962
2851
  value: 'size',
2963
2852
  label: '分页大小',
2964
2853
  },
2965
- 'page-number': {
2854
+ pageNumber: {
2966
2855
  value: 'page',
2967
2856
  label: '当前页数',
2968
2857
  },
@@ -2978,7 +2867,7 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
2978
2867
  value: 'values',
2979
2868
  label: '多选选中值',
2980
2869
  },
2981
- 'data-source': {
2870
+ dataSource: {
2982
2871
  value: 'data',
2983
2872
  label: '数据',
2984
2873
  },
@@ -2988,7 +2877,7 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
2988
2877
  value: 'value',
2989
2878
  label: '选中值',
2990
2879
  },
2991
- 'data-source': {
2880
+ dataSource: {
2992
2881
  value: 'data',
2993
2882
  label: '数据',
2994
2883
  },
@@ -2998,7 +2887,7 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
2998
2887
  value: 'value',
2999
2888
  label: '选中值',
3000
2889
  },
3001
- 'data-source': {
2890
+ dataSource: {
3002
2891
  value: 'data',
3003
2892
  label: '数据',
3004
2893
  },
@@ -3008,7 +2897,7 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3008
2897
  value: 'value',
3009
2898
  label: '选中值',
3010
2899
  },
3011
- 'data-source': {
2900
+ dataSource: {
3012
2901
  value: 'data',
3013
2902
  label: '数据',
3014
2903
  },
@@ -3016,11 +2905,11 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3016
2905
  value: 'opened',
3017
2906
  label: '弹出状态',
3018
2907
  },
3019
- 'page-size': {
2908
+ pageSize: {
3020
2909
  value: 'size',
3021
2910
  label: '分页大小',
3022
2911
  },
3023
- 'page-number': {
2912
+ pageNumber: {
3024
2913
  value: 'page',
3025
2914
  label: '当前页数',
3026
2915
  },
@@ -3030,7 +2919,7 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3030
2919
  value: 'value',
3031
2920
  label: '选中值',
3032
2921
  },
3033
- 'data-source': {
2922
+ dataSource: {
3034
2923
  value: 'data',
3035
2924
  label: '数据',
3036
2925
  },
@@ -3040,17 +2929,18 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3040
2929
  value: 'value',
3041
2930
  label: '选中值',
3042
2931
  },
3043
- 'data-source': {
2932
+ dataSource: {
3044
2933
  value: 'data',
3045
2934
  label: '数据',
3046
2935
  },
3047
2936
  },
2937
+
3048
2938
  'van-radio-group': {
3049
2939
  value: {
3050
2940
  value: 'value',
3051
2941
  label: '选中值',
3052
2942
  },
3053
- 'data-source': {
2943
+ dataSource: {
3054
2944
  value: 'data',
3055
2945
  label: '数据',
3056
2946
  },
@@ -3060,7 +2950,7 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3060
2950
  value: 'value',
3061
2951
  label: '选中值',
3062
2952
  },
3063
- 'data-source': {
2953
+ dataSource: {
3064
2954
  value: 'data',
3065
2955
  label: '数据',
3066
2956
  },
@@ -3070,15 +2960,15 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3070
2960
  value: 'value',
3071
2961
  label: '选中值',
3072
2962
  },
3073
- 'data-source': {
2963
+ dataSource: {
3074
2964
  value: 'data',
3075
2965
  label: '数据',
3076
2966
  },
3077
- 'page-size': {
2967
+ pageSize: {
3078
2968
  value: 'size',
3079
2969
  label: '分页大小',
3080
2970
  },
3081
- 'page-number': {
2971
+ pageNumber: {
3082
2972
  value: 'page',
3083
2973
  label: '当前页数',
3084
2974
  },
@@ -3088,43 +2978,340 @@ export const PAGE_COMPONENT_INCLUDE_TAG_MAP: Record<string, Record<string, AttrO
3088
2978
  value: 'value',
3089
2979
  label: '选中值',
3090
2980
  },
3091
- 'data-source': {
2981
+ dataSource: {
3092
2982
  value: 'data',
3093
2983
  label: '数据',
3094
2984
  },
3095
2985
  },
3096
2986
  'van-list-view': {
3097
- 'page-size': {
2987
+ pageSize: {
3098
2988
  value: 'size',
3099
2989
  label: '分页大小',
3100
2990
  },
3101
- 'page-number': {
2991
+ pageNumber: {
3102
2992
  value: 'page',
3103
2993
  label: '当前页数',
3104
2994
  },
3105
- 'data-source': {
2995
+ dataSource: {
3106
2996
  value: 'data',
3107
2997
  label: '数据',
3108
2998
  },
3109
2999
  },
3110
3000
  'van-grid-view': {
3111
- 'page-size': {
3001
+ pageSize: {
3112
3002
  value: 'size',
3113
3003
  label: '分页大小',
3114
3004
  },
3115
- 'page-number': {
3005
+ pageNumber: {
3116
3006
  value: 'page',
3117
3007
  label: '当前页数',
3118
3008
  },
3119
- 'data-source': {
3009
+ dataSource: {
3120
3010
  value: 'data',
3121
3011
  label: '数据',
3122
3012
  },
3123
3013
  },
3124
3014
  'van-for-components': {
3125
- 'data-source': {
3015
+ dataSource: {
3126
3016
  value: 'data',
3127
3017
  label: '数据',
3128
3018
  },
3129
3019
  },
3130
3020
  };
3021
+
3022
+ /**
3023
+ * 组件支持补全取值的属性映射
3024
+ * prop 组件属性
3025
+ * state 组件内部状态
3026
+ */
3027
+ export const ComponentCompletionPropertyMap: Record<string, any> = {
3028
+ // h5
3029
+ 'van-list-view': {
3030
+ page: {
3031
+ prop: 'pageNumber',
3032
+ state: 'paging?.number',
3033
+ label: '当前页数',
3034
+ },
3035
+ size: {
3036
+ prop: 'pageSize',
3037
+ state: 'paging?.size',
3038
+ label: '分页大小',
3039
+ },
3040
+ filterText: {
3041
+ prop: 'filterText',
3042
+ state: 'filterText',
3043
+ label: '过滤文本',
3044
+ },
3045
+ data: {
3046
+ prop: 'dataSource',
3047
+ state: 'currentData',
3048
+ label: '数据',
3049
+ },
3050
+ },
3051
+ 'van-grid-view': {
3052
+ page: {
3053
+ prop: 'pageNumber',
3054
+ state: 'paging?.number',
3055
+ label: '当前页数',
3056
+ },
3057
+ size: {
3058
+ prop: 'pageSize',
3059
+ state: 'paging?.size',
3060
+ label: '分页大小',
3061
+ },
3062
+ filterText: {
3063
+ prop: 'filterText',
3064
+ state: 'filterText',
3065
+ label: '过滤文本',
3066
+ },
3067
+ data: {
3068
+ prop: 'dataSource',
3069
+ state: 'currentData',
3070
+ label: '数据',
3071
+ },
3072
+ },
3073
+ 'van-for-components': {
3074
+ data: {
3075
+ prop: 'dataSource',
3076
+ state: 'options',
3077
+ label: '数据',
3078
+ },
3079
+ },
3080
+ 'van-pickerson': {
3081
+ value: {
3082
+ prop: 'value',
3083
+ state: 'value',
3084
+ label: '选中值',
3085
+ },
3086
+ page: {
3087
+ prop: 'pageNumber',
3088
+ state: 'paging?.number',
3089
+ label: '当前页数',
3090
+ },
3091
+ size: {
3092
+ prop: 'pageSize',
3093
+ state: 'paging?.size',
3094
+ label: '分页大小',
3095
+ },
3096
+ filterText: {
3097
+ prop: 'filterText',
3098
+ state: 'filterText',
3099
+ label: '过滤文本',
3100
+ },
3101
+ data: {
3102
+ prop: 'dataSource',
3103
+ state: 'currentData',
3104
+ label: '数据',
3105
+ },
3106
+ },
3107
+ 'van-cascader': {
3108
+ value: {
3109
+ prop: 'value',
3110
+ state: 'value',
3111
+ label: '选中值',
3112
+ },
3113
+ filterText: {
3114
+ prop: 'filterText',
3115
+ state: 'filterText',
3116
+ label: '过滤文本',
3117
+ },
3118
+ },
3119
+ 'van-radio-group': {
3120
+ value: {
3121
+ prop: 'value',
3122
+ state: 'value',
3123
+ label: '选中值',
3124
+ },
3125
+ data: {
3126
+ prop: 'dataSource',
3127
+ state: 'options',
3128
+ label: '数据',
3129
+ },
3130
+ },
3131
+ 'van-checkbox-group': {
3132
+ value: {
3133
+ prop: 'value',
3134
+ state: 'value',
3135
+ label: '选中值',
3136
+ },
3137
+ data: {
3138
+ prop: 'dataSource',
3139
+ state: 'options',
3140
+ label: '数据',
3141
+ },
3142
+ },
3143
+
3144
+ // pc
3145
+ 'u-table-view': {
3146
+ page: {
3147
+ prop: 'pageNumber',
3148
+ state: 'paging?.number',
3149
+ label: '当前页数',
3150
+ },
3151
+ size: {
3152
+ prop: 'pageSize',
3153
+ state: 'paging?.size',
3154
+ label: '分页大小',
3155
+ },
3156
+ sort: {
3157
+ prop: 'sorting',
3158
+ state: 'currentSorting?.field',
3159
+ label: '排序属性',
3160
+ },
3161
+ order: {
3162
+ prop: 'sorting',
3163
+ state: 'currentSorting?.order',
3164
+ label: '排序方式',
3165
+ },
3166
+ data: {
3167
+ prop: 'dataSource',
3168
+ state: 'currentData',
3169
+ label: '数据',
3170
+ },
3171
+ },
3172
+ 'u-grid-view': {
3173
+ page: {
3174
+ prop: 'pageNumber',
3175
+ state: 'paging?.number',
3176
+ label: '当前页数',
3177
+ },
3178
+ size: {
3179
+ prop: 'pageSize',
3180
+ state: 'paging?.size',
3181
+ label: '分页大小',
3182
+ },
3183
+ data: {
3184
+ prop: 'dataSource',
3185
+ state: 'currentData',
3186
+ label: '数据',
3187
+ },
3188
+ },
3189
+ 'u-list-view': {
3190
+ page: {
3191
+ prop: 'pageNumber',
3192
+ state: 'paging?.number',
3193
+ label: '当前页数',
3194
+ },
3195
+ size: {
3196
+ prop: 'pageSize',
3197
+ state: 'paging?.size',
3198
+ label: '分页大小',
3199
+ },
3200
+ filterText: {
3201
+ prop: 'filterText',
3202
+ state: 'filterText',
3203
+ label: '过滤文本',
3204
+ },
3205
+ },
3206
+ 'u-list-components': {
3207
+ data: {
3208
+ prop: 'dataSource',
3209
+ state: 'options',
3210
+ label: '数据',
3211
+ },
3212
+ },
3213
+ 'u-radios': {
3214
+ value: {
3215
+ prop: 'value',
3216
+ state: 'value',
3217
+ label: '选中值',
3218
+ },
3219
+ data: {
3220
+ prop: 'dataSource',
3221
+ state: 'currentDataSource?.data',
3222
+ label: '数据',
3223
+ },
3224
+ },
3225
+ 'u-checkboxes': {
3226
+ value: {
3227
+ prop: 'value',
3228
+ state: 'value',
3229
+ label: '选中值',
3230
+ },
3231
+ data: {
3232
+ prop: 'dataSource',
3233
+ state: 'currentDataSource?.data',
3234
+ label: '数据',
3235
+ },
3236
+ },
3237
+ 'u-select': {
3238
+ value: {
3239
+ prop: 'value',
3240
+ state: 'value',
3241
+ label: '选中值',
3242
+ },
3243
+ page: {
3244
+ prop: 'pageNumber',
3245
+ state: 'paging?.number',
3246
+ label: '当前页数',
3247
+ },
3248
+ size: {
3249
+ prop: 'pageSize',
3250
+ state: 'paging?.size',
3251
+ label: '分页大小',
3252
+ },
3253
+ filterText: {
3254
+ prop: 'filterText',
3255
+ state: 'filterText',
3256
+ label: '过滤文本',
3257
+ },
3258
+ data: {
3259
+ prop: 'dataSource',
3260
+ state: 'currentData',
3261
+ label: '数据',
3262
+ },
3263
+ opened: {
3264
+ prop: 'opened',
3265
+ state: 'popperOpened',
3266
+ label: '弹出状态',
3267
+ },
3268
+ },
3269
+ 'u-cascader': {
3270
+ value: {
3271
+ prop: 'value',
3272
+ state: 'value',
3273
+ label: '选中值',
3274
+ },
3275
+ filterText: {
3276
+ prop: 'filterText',
3277
+ state: 'filterText',
3278
+ label: '过滤文本',
3279
+ },
3280
+ data: {
3281
+ prop: 'dataSource',
3282
+ state: 'currentData',
3283
+ label: '数据',
3284
+ },
3285
+ },
3286
+ 'u-tree-select-new': {
3287
+ value: {
3288
+ prop: 'value',
3289
+ state: 'value',
3290
+ label: '选中值',
3291
+ },
3292
+ data: {
3293
+ prop: 'dataSource',
3294
+ state: 'currentDataSource?.data',
3295
+ label: '数据',
3296
+ },
3297
+ },
3298
+ };
3299
+
3300
+ export const FrontendTypeComponentNamePerfixMap: Record<string, string> = {
3301
+ h5: 'van-',
3302
+ pc: 'u-',
3303
+ };
3304
+
3305
+ export function getComponentNameFromElementName(name: string, frontendType: string = 'pc') {
3306
+ const prefix = FrontendTypeComponentNamePerfixMap[frontendType];
3307
+
3308
+ // radio_group_1 => radio_group
3309
+ let componentName = name.replace(/_\d+$/, '');
3310
+ // radio_group => radioGroup
3311
+ componentName = utils.snake2Camel(componentName, true);
3312
+ // radioGroup => radio-group
3313
+ componentName = utils.Camel2kebab(componentName);
3314
+ componentName = `${prefix}${componentName}`;
3315
+
3316
+ return componentName;
3317
+ }