@lcap/nasl 3.3.2-beta.4 → 3.3.3-beta.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 (753) hide show
  1. package/coverage/index.html +108 -108
  2. package/coverage/src/automate/engine/index.html +1 -1
  3. package/coverage/src/automate/engine/utils.js.html +36 -36
  4. package/coverage/src/bak/index.html +15 -15
  5. package/coverage/src/bak/translator.js.html +183 -60
  6. package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +1 -1
  7. package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +1 -1
  8. package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +1 -1
  9. package/coverage/src/breakpoint/generator/CallbackNode.ts.html +1 -1
  10. package/coverage/src/breakpoint/generator/index.html +1 -1
  11. package/coverage/src/breakpoint/generator/index.ts.html +1 -1
  12. package/coverage/src/breakpoint/index.html +1 -1
  13. package/coverage/src/breakpoint/index.ts.html +1 -1
  14. package/coverage/src/breakpoint/shared/constants.ts.html +1 -1
  15. package/coverage/src/breakpoint/shared/index.html +1 -1
  16. package/coverage/src/breakpoint/shared/index.ts.html +1 -1
  17. package/coverage/src/breakpoint/shared/operations.ts.html +1 -1
  18. package/coverage/src/breakpoint/shared/socket.ts.html +1 -1
  19. package/coverage/src/breakpoint/shared/utils.ts.html +1 -1
  20. package/coverage/src/breakpoint/store/core.ts.html +1 -1
  21. package/coverage/src/breakpoint/store/dock.ts.html +1 -1
  22. package/coverage/src/breakpoint/store/index.html +1 -1
  23. package/coverage/src/breakpoint/store/index.ts.html +1 -1
  24. package/coverage/src/common/BaseNode.ts.html +92 -62
  25. package/coverage/src/common/Command.ts.html +1 -1
  26. package/coverage/src/common/EventEmitter.ts.html +1 -1
  27. package/coverage/src/common/Messager.ts.html +1 -1
  28. package/coverage/src/common/asyncFuncMap.ts.html +1 -1
  29. package/coverage/src/common/index.html +14 -14
  30. package/coverage/src/common/index.ts.html +1 -1
  31. package/coverage/src/concepts/Abort__.ts.html +9 -6
  32. package/coverage/src/concepts/Anchor__.ts.html +36 -21
  33. package/coverage/src/concepts/AnonymousFunction__.ts.html +62 -20
  34. package/coverage/src/concepts/App__.ts.html +917 -74
  35. package/coverage/src/concepts/Argument__.ts.html +41 -26
  36. package/coverage/src/concepts/Assignee__.ts.html +40 -13
  37. package/coverage/src/concepts/AssignmentLine__.ts.html +9 -6
  38. package/coverage/src/concepts/Assignment__.ts.html +61 -22
  39. package/coverage/src/concepts/Attribute__.ts.html +25 -10
  40. package/coverage/src/concepts/AuthInterface__.ts.html +9 -6
  41. package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +25 -10
  42. package/coverage/src/concepts/AuthLogic__.ts.html +18 -6
  43. package/coverage/src/concepts/BackendVariable__.ts.html +25 -10
  44. package/coverage/src/concepts/Backend__.ts.html +25 -10
  45. package/coverage/src/concepts/BatchAssignment__.ts.html +61 -16
  46. package/coverage/src/concepts/BinaryExpression__.ts.html +141 -39
  47. package/coverage/src/concepts/BindAttribute__.ts.html +134 -41
  48. package/coverage/src/concepts/BindDirective__.ts.html +79 -16
  49. package/coverage/src/concepts/BindEvent__.ts.html +80 -23
  50. package/coverage/src/concepts/BindStyle__.ts.html +25 -10
  51. package/coverage/src/concepts/BooleanLiteral__.ts.html +9 -6
  52. package/coverage/src/concepts/CallAuthInterface__.ts.html +25 -10
  53. package/coverage/src/concepts/CallConnector__.ts.html +9 -6
  54. package/coverage/src/concepts/CallFunction__.ts.html +56 -38
  55. package/coverage/src/concepts/CallInterface__.ts.html +81 -36
  56. package/coverage/src/concepts/CallLogic__.ts.html +195 -264
  57. package/coverage/src/concepts/CallQueryComponent__.ts.html +40 -13
  58. package/coverage/src/concepts/Comment__.ts.html +11 -8
  59. package/coverage/src/concepts/CompletionProperty__.ts.html +25 -10
  60. package/coverage/src/concepts/ConfigGroup__.ts.html +25 -10
  61. package/coverage/src/concepts/ConfigPropertyValue__.ts.html +9 -6
  62. package/coverage/src/concepts/ConfigProperty__.ts.html +25 -10
  63. package/coverage/src/concepts/Configuration__.ts.html +25 -10
  64. package/coverage/src/concepts/Connection__.ts.html +26 -11
  65. package/coverage/src/concepts/ConnectorTrigger__.ts.html +9 -6
  66. package/coverage/src/concepts/Connector__.ts.html +85 -22
  67. package/coverage/src/concepts/Constant__.ts.html +25 -10
  68. package/coverage/src/concepts/DataSource__.ts.html +26 -11
  69. package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +9 -6
  70. package/coverage/src/concepts/Destination__.ts.html +24 -12
  71. package/coverage/src/concepts/End__.ts.html +9 -6
  72. package/coverage/src/concepts/EntityIndex__.ts.html +9 -6
  73. package/coverage/src/concepts/EntityProperty__.ts.html +62 -14
  74. package/coverage/src/concepts/Entity__.ts.html +41 -14
  75. package/coverage/src/concepts/EnumItem__.ts.html +9 -6
  76. package/coverage/src/concepts/Enum__.ts.html +25 -10
  77. package/coverage/src/concepts/Event__.ts.html +25 -10
  78. package/coverage/src/concepts/ExternalDestination__.ts.html +25 -10
  79. package/coverage/src/concepts/ForEachStatement__.ts.html +68 -47
  80. package/coverage/src/concepts/FrontendLibrary__.ts.html +40 -13
  81. package/coverage/src/concepts/FrontendVariable__.ts.html +1 -1
  82. package/coverage/src/concepts/Frontend__.ts.html +86 -23
  83. package/coverage/src/concepts/Function__.ts.html +92 -26
  84. package/coverage/src/concepts/Identifier__.ts.html +28 -25
  85. package/coverage/src/concepts/IfStatement__.ts.html +83 -56
  86. package/coverage/src/concepts/Integration__.ts.html +40 -13
  87. package/coverage/src/concepts/InterfaceParam__.ts.html +25 -10
  88. package/coverage/src/concepts/Interface__.ts.html +61 -22
  89. package/coverage/src/concepts/JSBlock__.ts.html +188 -8
  90. package/coverage/src/concepts/JavaLogic__.ts.html +9 -6
  91. package/coverage/src/concepts/LogicItem__.ts.html +15 -12
  92. package/coverage/src/concepts/Logic__.ts.html +117 -81
  93. package/coverage/src/concepts/MatchCase__.ts.html +100 -61
  94. package/coverage/src/concepts/Match__.ts.html +48 -27
  95. package/coverage/src/concepts/MemberExpression__.ts.html +72 -66
  96. package/coverage/src/concepts/MetadataType__.ts.html +1996 -0
  97. package/coverage/src/concepts/MicroApp__.ts.html +9 -6
  98. package/coverage/src/concepts/Module__.ts.html +672 -18
  99. package/coverage/src/concepts/MsgTriggerEvent__.ts.html +25 -10
  100. package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +25 -10
  101. package/coverage/src/concepts/Namespace__.ts.html +175 -40
  102. package/coverage/src/concepts/NewComposite__.ts.html +93 -27
  103. package/coverage/src/concepts/NewList__.ts.html +44 -14
  104. package/coverage/src/concepts/NewMap__.ts.html +44 -14
  105. package/coverage/src/concepts/New__.ts.html +1 -1
  106. package/coverage/src/concepts/NullLiteral__.ts.html +9 -6
  107. package/coverage/src/concepts/NumericLiteral__.ts.html +27 -12
  108. package/coverage/src/concepts/OqlQueryComponent__.ts.html +103 -13
  109. package/coverage/src/concepts/OverriddenLogic__.ts.html +100 -25
  110. package/coverage/src/concepts/Param__.ts.html +24 -15
  111. package/coverage/src/concepts/Point__.ts.html +9 -6
  112. package/coverage/src/concepts/ProcessComponent__.ts.html +40 -13
  113. package/coverage/src/concepts/ProcessElement__.ts.html +128 -29
  114. package/coverage/src/concepts/ProcessOutcome__.ts.html +9 -6
  115. package/coverage/src/concepts/ProcessOutcomes__.ts.html +9 -6
  116. package/coverage/src/concepts/Process__.ts.html +85 -22
  117. package/coverage/src/concepts/QueryAggregateExpression__.ts.html +25 -10
  118. package/coverage/src/concepts/QueryFieldExpression__.ts.html +9 -6
  119. package/coverage/src/concepts/QueryFromExpression__.ts.html +25 -10
  120. package/coverage/src/concepts/QueryGroupByExpression__.ts.html +25 -10
  121. package/coverage/src/concepts/QueryJoinExpression__.ts.html +25 -10
  122. package/coverage/src/concepts/QueryLimitExpression__.ts.html +25 -10
  123. package/coverage/src/concepts/QueryOrderByExpression__.ts.html +25 -10
  124. package/coverage/src/concepts/QuerySelectExpression__.ts.html +25 -10
  125. package/coverage/src/concepts/Rect__.ts.html +9 -6
  126. package/coverage/src/concepts/Return__.ts.html +25 -10
  127. package/coverage/src/concepts/Role__.ts.html +9 -6
  128. package/coverage/src/concepts/SelectMembers__.ts.html +25 -10
  129. package/coverage/src/concepts/Slot__.ts.html +25 -10
  130. package/coverage/src/concepts/SqlQueryComponent__.ts.html +25 -10
  131. package/coverage/src/concepts/Start__.ts.html +9 -6
  132. package/coverage/src/concepts/StringInterpolation__.ts.html +40 -19
  133. package/coverage/src/concepts/StringLiteral__.ts.html +9 -6
  134. package/coverage/src/concepts/StructureProperty__.ts.html +25 -10
  135. package/coverage/src/concepts/Structure__.ts.html +40 -13
  136. package/coverage/src/concepts/SwitchCase__.ts.html +33 -18
  137. package/coverage/src/concepts/SwitchStatement__.ts.html +38 -23
  138. package/coverage/src/concepts/Theme__.ts.html +9 -6
  139. package/coverage/src/concepts/Transactional__.ts.html +9 -6
  140. package/coverage/src/concepts/TriggerEvent__.ts.html +25 -10
  141. package/coverage/src/concepts/TriggerLauncher__.ts.html +9 -6
  142. package/coverage/src/concepts/TypeAnnotation__.ts.html +223 -61
  143. package/coverage/src/concepts/TypeParam__.ts.html +10 -7
  144. package/coverage/src/concepts/UnaryExpression__.ts.html +40 -13
  145. package/coverage/src/concepts/Unparsed__.ts.html +11 -8
  146. package/coverage/src/concepts/UseComponent__.ts.html +9 -6
  147. package/coverage/src/concepts/ValidationRule__.ts.html +30 -15
  148. package/coverage/src/concepts/Variable__.ts.html +61 -16
  149. package/coverage/src/concepts/ViewBlock__.ts.html +9 -6
  150. package/coverage/src/concepts/ViewComponent__.ts.html +99 -24
  151. package/coverage/src/concepts/ViewElement__.ts.html +334 -181
  152. package/coverage/src/concepts/View__.ts.html +326 -71
  153. package/coverage/src/concepts/WhileStatement__.ts.html +78 -45
  154. package/coverage/src/concepts/basics/stdlib/index.html +1 -1
  155. package/coverage/src/concepts/basics/stdlib/index.ts.html +1 -1
  156. package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +1 -1
  157. package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +1 -1
  158. package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +1 -1
  159. package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +1 -1
  160. package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +1 -1
  161. package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +1 -1
  162. package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +1 -1
  163. package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +1 -1
  164. package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +1 -1
  165. package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +1 -1
  166. package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +1 -1
  167. package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +1 -1
  168. package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +1 -1
  169. package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1 -1
  170. package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +1 -1
  171. package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +1 -1
  172. package/coverage/src/concepts/basics/types/coreTypeList.ts.html +1 -1
  173. package/coverage/src/concepts/basics/types/index.html +1 -1
  174. package/coverage/src/concepts/basics/types/index.ts.html +1 -1
  175. package/coverage/src/concepts/index.html +823 -808
  176. package/coverage/src/concepts/index.ts.html +1 -1
  177. package/coverage/src/concepts/index__.ts.html +7 -4
  178. package/coverage/src/config.ts.html +1 -1
  179. package/coverage/src/decorators/index.html +1 -1
  180. package/coverage/src/decorators/index.ts.html +24 -24
  181. package/coverage/src/decorators/promise.ts.html +1 -1
  182. package/coverage/src/eventBus.ts.html +1 -1
  183. package/coverage/src/generator/compileComponent.ts.html +1 -1
  184. package/coverage/src/generator/genBundleFiles.ts.html +13 -19
  185. package/coverage/src/generator/genHash.ts.html +1 -1
  186. package/coverage/src/generator/genMetaData.ts.html +103 -16
  187. package/coverage/src/generator/genReleaseBody.ts.html +1 -1
  188. package/coverage/src/generator/icestark.ts.html +1 -1
  189. package/coverage/src/generator/index.html +15 -15
  190. package/coverage/src/generator/index.ts.html +1 -1
  191. package/coverage/src/generator/microApp.ts.html +1 -1
  192. package/coverage/src/generator/permission.ts.html +1 -1
  193. package/coverage/src/generator/qiankun.ts.html +1 -1
  194. package/coverage/src/generator/styleReplacer.ts.html +1 -1
  195. package/coverage/src/index.html +7 -7
  196. package/coverage/src/index.ts.html +4 -4
  197. package/coverage/src/manager/diagnostic.ts.html +1 -1
  198. package/coverage/src/manager/index.html +1 -1
  199. package/coverage/src/manager/stepRecorder.ts.html +1 -1
  200. package/coverage/src/natural/genNaturalTS.ts.html +1 -1
  201. package/coverage/src/natural/index.html +15 -15
  202. package/coverage/src/natural/index.ts.html +1 -1
  203. package/coverage/src/natural/naslStdlibMap.ts.html +1 -1
  204. package/coverage/src/natural/transformTSCode.ts.html +78 -18
  205. package/coverage/src/sentry/index.html +1 -1
  206. package/coverage/src/sentry/index.ts.html +21 -21
  207. package/coverage/src/server/createUiTs.ts.html +15 -6
  208. package/coverage/src/server/entity2LogicNamespace.ts.html +1 -1
  209. package/coverage/src/server/event.js.html +1 -1
  210. package/coverage/src/server/extendBaseNode.ts.html +7 -4
  211. package/coverage/src/server/formatTsUtils.ts.html +1 -1
  212. package/coverage/src/server/getConnector.ts.html +1 -1
  213. package/coverage/src/server/getExtensionModules.ts.html +1 -1
  214. package/coverage/src/server/getFunctions.ts.html +1 -1
  215. package/coverage/src/server/getInterfaces.ts.html +1 -1
  216. package/coverage/src/server/getLogging.ts.html +1 -1
  217. package/coverage/src/server/getLogics.ts.html +1 -1
  218. package/coverage/src/server/getMemberIdentifier.ts.html +161 -113
  219. package/coverage/src/server/getProcessComponents.ts.html +1 -1
  220. package/coverage/src/server/getProcesses.ts.html +1 -1
  221. package/coverage/src/server/getValidates.ts.html +1 -1
  222. package/coverage/src/server/index.html +25 -25
  223. package/coverage/src/server/index.ts.html +1 -1
  224. package/coverage/src/server/naslServer.ts.html +470 -59
  225. package/coverage/src/server/naslStdlibMap.ts.html +1 -1
  226. package/coverage/src/server/process2LogicNamespace.ts.html +1 -1
  227. package/coverage/src/server/translator.ts.html +3 -3
  228. package/coverage/src/service/creator/add.configs.js.html +26 -8
  229. package/coverage/src/service/creator/errHandles.js.html +19 -37
  230. package/coverage/src/service/creator/index.html +22 -22
  231. package/coverage/src/service/creator/index.js.html +1 -1
  232. package/coverage/src/service/datasource/api.js.html +1 -1
  233. package/coverage/src/service/datasource/index.html +1 -1
  234. package/coverage/src/service/datasource/index.js.html +1 -1
  235. package/coverage/src/service/logic/api.js.html +1 -1
  236. package/coverage/src/service/logic/index.html +1 -1
  237. package/coverage/src/service/logic/index.js.html +1 -1
  238. package/coverage/src/service/storage/api.js.html +1 -1
  239. package/coverage/src/service/storage/index.html +19 -19
  240. package/coverage/src/service/storage/index.ts.html +1 -1
  241. package/coverage/src/service/storage/init.ts.html +1498 -598
  242. package/coverage/src/service/storage/jsoner.ts.html +3 -3
  243. package/coverage/src/service/storage/map.ts.html +1 -1
  244. package/coverage/src/service/storage/service.ts.html +1 -1
  245. package/coverage/src/service/storage/storagePoint.ts.html +1 -1
  246. package/coverage/src/templator/genCallComponentLogic.ts.html +1 -1
  247. package/coverage/src/templator/genCreateBlock.ts.html +47 -56
  248. package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +49 -31
  249. package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +81 -93
  250. package/coverage/src/templator/genEditTableBlock.ts.html +80 -11
  251. package/coverage/src/templator/genEnumSelectBlock.ts.html +1 -1
  252. package/coverage/src/templator/genGetBlock.ts.html +1 -1
  253. package/coverage/src/templator/genGridViewBlock.ts.html +1 -1
  254. package/coverage/src/templator/genListViewBlock.ts.html +1 -1
  255. package/coverage/src/templator/genQueryComponent.ts.html +1 -1
  256. package/coverage/src/templator/genSelectBlock.ts.html +1 -1
  257. package/coverage/src/templator/genTableBlock.ts.html +66 -3
  258. package/coverage/src/templator/genUpdateBlock.ts.html +48 -36
  259. package/coverage/src/templator/index.html +39 -39
  260. package/coverage/src/templator/index.ts.html +1 -1
  261. package/coverage/src/templator/utils.ts.html +77 -11
  262. package/coverage/src/translator/constant.ts.html +1 -1
  263. package/coverage/src/translator/index.html +20 -20
  264. package/coverage/src/translator/index.ts.html +1 -1
  265. package/coverage/src/translator/utils.ts.html +87 -30
  266. package/coverage/src/utils/cookie.ts.html +1 -1
  267. package/coverage/src/utils/env.ts.html +1 -1
  268. package/coverage/src/utils/index.html +27 -27
  269. package/coverage/src/utils/index.ts.html +115 -22
  270. package/coverage/src/utils/logger.ts.html +1 -1
  271. package/coverage/src/utils/sortTsString.ts.html +1 -1
  272. package/coverage/src/utils/string.ts.html +110 -8
  273. package/coverage/src/utils/time-slicing.ts.html +1 -1
  274. package/coverage/src/utils/traverse.ts.html +1 -1
  275. package/coverage/src/utils/window.ts.html +1 -1
  276. package/out/bak/translator.d.ts +1 -1
  277. package/out/bak/translator.js +42 -7
  278. package/out/bak/translator.js.map +1 -1
  279. package/out/common/BaseNode.d.ts +9 -4
  280. package/out/common/BaseNode.js +48 -9
  281. package/out/common/BaseNode.js.map +1 -1
  282. package/out/concepts/Abort__.js +3 -1
  283. package/out/concepts/Abort__.js.map +1 -1
  284. package/out/concepts/Anchor__.js +10 -4
  285. package/out/concepts/Anchor__.js.map +1 -1
  286. package/out/concepts/AnonymousFunction__.js +27 -11
  287. package/out/concepts/AnonymousFunction__.js.map +1 -1
  288. package/out/concepts/App__.d.ts +85 -0
  289. package/out/concepts/App__.js +241 -63
  290. package/out/concepts/App__.js.map +1 -1
  291. package/out/concepts/Argument__.js +16 -5
  292. package/out/concepts/Argument__.js.map +1 -1
  293. package/out/concepts/Assignee__.js +17 -7
  294. package/out/concepts/Assignee__.js.map +1 -1
  295. package/out/concepts/AssignmentLine__.js +3 -1
  296. package/out/concepts/AssignmentLine__.js.map +1 -1
  297. package/out/concepts/Assignment__.js +38 -9
  298. package/out/concepts/Assignment__.js.map +1 -1
  299. package/out/concepts/Attribute__.js +10 -4
  300. package/out/concepts/Attribute__.js.map +1 -1
  301. package/out/concepts/AuthInterface__.js +3 -1
  302. package/out/concepts/AuthInterface__.js.map +1 -1
  303. package/out/concepts/AuthLogicForCallInterface__.js +10 -4
  304. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  305. package/out/concepts/AuthLogic__.js +3 -1
  306. package/out/concepts/AuthLogic__.js.map +1 -1
  307. package/out/concepts/BackendVariable__.js +34 -6
  308. package/out/concepts/BackendVariable__.js.map +1 -1
  309. package/out/concepts/Backend__.js +10 -4
  310. package/out/concepts/Backend__.js.map +1 -1
  311. package/out/concepts/BatchAssignment__.js +27 -13
  312. package/out/concepts/BatchAssignment__.js.map +1 -1
  313. package/out/concepts/BinaryExpression__.js +50 -16
  314. package/out/concepts/BinaryExpression__.js.map +1 -1
  315. package/out/concepts/BindAttribute__.js +37 -6
  316. package/out/concepts/BindAttribute__.js.map +1 -1
  317. package/out/concepts/BindDirective__.js +27 -5
  318. package/out/concepts/BindDirective__.js.map +1 -1
  319. package/out/concepts/BindEvent__.js +17 -7
  320. package/out/concepts/BindEvent__.js.map +1 -1
  321. package/out/concepts/BindStyle__.js +10 -4
  322. package/out/concepts/BindStyle__.js.map +1 -1
  323. package/out/concepts/BooleanLiteral__.js +3 -1
  324. package/out/concepts/BooleanLiteral__.js.map +1 -1
  325. package/out/concepts/CallAuthInterface__.js +10 -4
  326. package/out/concepts/CallAuthInterface__.js.map +1 -1
  327. package/out/concepts/CallConnector__.js +3 -1
  328. package/out/concepts/CallConnector__.js.map +1 -1
  329. package/out/concepts/CallFunction__.js +45 -16
  330. package/out/concepts/CallFunction__.js.map +1 -1
  331. package/out/concepts/CallInterface__.js +14 -8
  332. package/out/concepts/CallInterface__.js.map +1 -1
  333. package/out/concepts/CallLogic__.js +49 -27
  334. package/out/concepts/CallLogic__.js.map +1 -1
  335. package/out/concepts/CallQueryComponent__.js +17 -7
  336. package/out/concepts/CallQueryComponent__.js.map +1 -1
  337. package/out/concepts/Comment__.js +3 -1
  338. package/out/concepts/Comment__.js.map +1 -1
  339. package/out/concepts/CompletionProperty__.js +10 -4
  340. package/out/concepts/CompletionProperty__.js.map +1 -1
  341. package/out/concepts/ConfigGroup__.js +10 -4
  342. package/out/concepts/ConfigGroup__.js.map +1 -1
  343. package/out/concepts/ConfigPropertyValue__.js +3 -1
  344. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  345. package/out/concepts/ConfigProperty__.js +10 -4
  346. package/out/concepts/ConfigProperty__.js.map +1 -1
  347. package/out/concepts/Configuration__.js +10 -4
  348. package/out/concepts/Configuration__.js.map +1 -1
  349. package/out/concepts/Connection__.js +10 -4
  350. package/out/concepts/Connection__.js.map +1 -1
  351. package/out/concepts/ConnectorTrigger__.js +3 -1
  352. package/out/concepts/ConnectorTrigger__.js.map +1 -1
  353. package/out/concepts/Connector__.js +38 -16
  354. package/out/concepts/Connector__.js.map +1 -1
  355. package/out/concepts/Constant__.js +10 -4
  356. package/out/concepts/Constant__.js.map +1 -1
  357. package/out/concepts/DataSource__.js +10 -4
  358. package/out/concepts/DataSource__.js.map +1 -1
  359. package/out/concepts/DatabaseTypeAnnotation__.js +3 -1
  360. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  361. package/out/concepts/Destination__.js +10 -4
  362. package/out/concepts/Destination__.js.map +1 -1
  363. package/out/concepts/End__.js +3 -1
  364. package/out/concepts/End__.js.map +1 -1
  365. package/out/concepts/EntityIndex__.js +3 -1
  366. package/out/concepts/EntityIndex__.js.map +1 -1
  367. package/out/concepts/EntityProperty__.js +25 -8
  368. package/out/concepts/EntityProperty__.js.map +1 -1
  369. package/out/concepts/Entity__.js +17 -7
  370. package/out/concepts/Entity__.js.map +1 -1
  371. package/out/concepts/EnumItem__.js +3 -1
  372. package/out/concepts/EnumItem__.js.map +1 -1
  373. package/out/concepts/Enum__.js +10 -4
  374. package/out/concepts/Enum__.js.map +1 -1
  375. package/out/concepts/Event__.js +10 -4
  376. package/out/concepts/Event__.js.map +1 -1
  377. package/out/concepts/ExternalDestination__.js +10 -4
  378. package/out/concepts/ExternalDestination__.js.map +1 -1
  379. package/out/concepts/ForEachStatement__.js +32 -24
  380. package/out/concepts/ForEachStatement__.js.map +1 -1
  381. package/out/concepts/FrontendLibrary__.js +17 -7
  382. package/out/concepts/FrontendLibrary__.js.map +1 -1
  383. package/out/concepts/Frontend__.js +38 -16
  384. package/out/concepts/Frontend__.js.map +1 -1
  385. package/out/concepts/Function__.js +41 -17
  386. package/out/concepts/Function__.js.map +1 -1
  387. package/out/concepts/Identifier__.js +3 -1
  388. package/out/concepts/Identifier__.js.map +1 -1
  389. package/out/concepts/IfStatement__.js +25 -17
  390. package/out/concepts/IfStatement__.js.map +1 -1
  391. package/out/concepts/Integration__.js +17 -7
  392. package/out/concepts/Integration__.js.map +1 -1
  393. package/out/concepts/InterfaceParam__.js +10 -4
  394. package/out/concepts/InterfaceParam__.js.map +1 -1
  395. package/out/concepts/Interface__.js +24 -10
  396. package/out/concepts/Interface__.js.map +1 -1
  397. package/out/concepts/JSBlock__.js +59 -1
  398. package/out/concepts/JSBlock__.js.map +1 -1
  399. package/out/concepts/JavaLogic__.js +3 -1
  400. package/out/concepts/JavaLogic__.js.map +1 -1
  401. package/out/concepts/LogicItem__.d.ts +4 -4
  402. package/out/concepts/LogicItem__.js +7 -5
  403. package/out/concepts/LogicItem__.js.map +1 -1
  404. package/out/concepts/Logic__.js +49 -23
  405. package/out/concepts/Logic__.js.map +1 -1
  406. package/out/concepts/MatchCase__.js +32 -22
  407. package/out/concepts/MatchCase__.js.map +1 -1
  408. package/out/concepts/Match__.js +22 -16
  409. package/out/concepts/Match__.js.map +1 -1
  410. package/out/concepts/MemberExpression__.js +26 -20
  411. package/out/concepts/MemberExpression__.js.map +1 -1
  412. package/out/concepts/MetadataType__.d.ts +245 -0
  413. package/out/concepts/MetadataType__.js +483 -0
  414. package/out/concepts/MetadataType__.js.map +1 -0
  415. package/out/concepts/MicroApp__.js +3 -1
  416. package/out/concepts/MicroApp__.js.map +1 -1
  417. package/out/concepts/Module__.d.ts +85 -0
  418. package/out/concepts/Module__.js +115 -3
  419. package/out/concepts/Module__.js.map +1 -1
  420. package/out/concepts/MsgTriggerEvent__.js +10 -4
  421. package/out/concepts/MsgTriggerEvent__.js.map +1 -1
  422. package/out/concepts/MsgTriggerLauncher__.js +10 -4
  423. package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
  424. package/out/concepts/Namespace__.js +80 -34
  425. package/out/concepts/Namespace__.js.map +1 -1
  426. package/out/concepts/NewComposite__.js +37 -16
  427. package/out/concepts/NewComposite__.js.map +1 -1
  428. package/out/concepts/NewList__.d.ts +1 -0
  429. package/out/concepts/NewList__.js +39 -11
  430. package/out/concepts/NewList__.js.map +1 -1
  431. package/out/concepts/NewMap__.js +29 -11
  432. package/out/concepts/NewMap__.js.map +1 -1
  433. package/out/concepts/NullLiteral__.js +3 -1
  434. package/out/concepts/NullLiteral__.js.map +1 -1
  435. package/out/concepts/NumericLiteral__.js +11 -5
  436. package/out/concepts/NumericLiteral__.js.map +1 -1
  437. package/out/concepts/OqlQueryComponent__.js +34 -5
  438. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  439. package/out/concepts/OverriddenLogic__.js +45 -19
  440. package/out/concepts/OverriddenLogic__.js.map +1 -1
  441. package/out/concepts/Param__.js +34 -6
  442. package/out/concepts/Param__.js.map +1 -1
  443. package/out/concepts/Point__.js +3 -1
  444. package/out/concepts/Point__.js.map +1 -1
  445. package/out/concepts/ProcessComponent__.js +17 -7
  446. package/out/concepts/ProcessComponent__.js.map +1 -1
  447. package/out/concepts/ProcessElement__.js +59 -25
  448. package/out/concepts/ProcessElement__.js.map +1 -1
  449. package/out/concepts/ProcessOutcome__.js +3 -1
  450. package/out/concepts/ProcessOutcome__.js.map +1 -1
  451. package/out/concepts/ProcessOutcomes__.js +3 -1
  452. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  453. package/out/concepts/Process__.js +38 -16
  454. package/out/concepts/Process__.js.map +1 -1
  455. package/out/concepts/QueryAggregateExpression__.js +10 -4
  456. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  457. package/out/concepts/QueryFieldExpression__.js +3 -1
  458. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  459. package/out/concepts/QueryFromExpression__.js +10 -4
  460. package/out/concepts/QueryFromExpression__.js.map +1 -1
  461. package/out/concepts/QueryGroupByExpression__.js +10 -4
  462. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  463. package/out/concepts/QueryJoinExpression__.js +10 -4
  464. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  465. package/out/concepts/QueryLimitExpression__.js +10 -4
  466. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  467. package/out/concepts/QueryOrderByExpression__.js +10 -4
  468. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  469. package/out/concepts/QuerySelectExpression__.js +10 -4
  470. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  471. package/out/concepts/Rect__.js +3 -1
  472. package/out/concepts/Rect__.js.map +1 -1
  473. package/out/concepts/Return__.js +34 -6
  474. package/out/concepts/Return__.js.map +1 -1
  475. package/out/concepts/Role__.js +3 -1
  476. package/out/concepts/Role__.js.map +1 -1
  477. package/out/concepts/SelectMembers__.js +10 -4
  478. package/out/concepts/SelectMembers__.js.map +1 -1
  479. package/out/concepts/Slot__.js +10 -4
  480. package/out/concepts/Slot__.js.map +1 -1
  481. package/out/concepts/SqlQueryComponent__.js +10 -4
  482. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  483. package/out/concepts/Start__.js +3 -1
  484. package/out/concepts/Start__.js.map +1 -1
  485. package/out/concepts/StringInterpolation__.js +14 -6
  486. package/out/concepts/StringInterpolation__.js.map +1 -1
  487. package/out/concepts/StringLiteral__.js +3 -1
  488. package/out/concepts/StringLiteral__.js.map +1 -1
  489. package/out/concepts/StructureProperty__.js +10 -4
  490. package/out/concepts/StructureProperty__.js.map +1 -1
  491. package/out/concepts/Structure__.js +17 -7
  492. package/out/concepts/Structure__.js.map +1 -1
  493. package/out/concepts/SwitchCase__.js +14 -8
  494. package/out/concepts/SwitchCase__.js.map +1 -1
  495. package/out/concepts/SwitchStatement__.js +10 -4
  496. package/out/concepts/SwitchStatement__.js.map +1 -1
  497. package/out/concepts/Theme__.js +3 -1
  498. package/out/concepts/Theme__.js.map +1 -1
  499. package/out/concepts/Transactional__.js +3 -1
  500. package/out/concepts/Transactional__.js.map +1 -1
  501. package/out/concepts/TriggerEvent__.js +10 -4
  502. package/out/concepts/TriggerEvent__.js.map +1 -1
  503. package/out/concepts/TriggerLauncher__.js +3 -1
  504. package/out/concepts/TriggerLauncher__.js.map +1 -1
  505. package/out/concepts/TypeAnnotation__.d.ts +2 -1
  506. package/out/concepts/TypeAnnotation__.js +75 -15
  507. package/out/concepts/TypeAnnotation__.js.map +1 -1
  508. package/out/concepts/TypeParam__.js +3 -1
  509. package/out/concepts/TypeParam__.js.map +1 -1
  510. package/out/concepts/UnaryExpression__.js +16 -6
  511. package/out/concepts/UnaryExpression__.js.map +1 -1
  512. package/out/concepts/Unparsed__.js +3 -1
  513. package/out/concepts/Unparsed__.js.map +1 -1
  514. package/out/concepts/UseComponent__.js +3 -1
  515. package/out/concepts/UseComponent__.js.map +1 -1
  516. package/out/concepts/ValidationRule__.js +11 -5
  517. package/out/concepts/ValidationRule__.js.map +1 -1
  518. package/out/concepts/Variable__.js +35 -7
  519. package/out/concepts/Variable__.js.map +1 -1
  520. package/out/concepts/ViewBlock__.js +3 -1
  521. package/out/concepts/ViewBlock__.js.map +1 -1
  522. package/out/concepts/ViewComponent__.js +45 -19
  523. package/out/concepts/ViewComponent__.js.map +1 -1
  524. package/out/concepts/ViewElement__.d.ts +1 -0
  525. package/out/concepts/ViewElement__.js +83 -21
  526. package/out/concepts/ViewElement__.js.map +1 -1
  527. package/out/concepts/View__.d.ts +1 -0
  528. package/out/concepts/View__.js +85 -22
  529. package/out/concepts/View__.js.map +1 -1
  530. package/out/concepts/WhileStatement__.js +19 -11
  531. package/out/concepts/WhileStatement__.js.map +1 -1
  532. package/out/concepts/basics/stdlib/nasl.util.js +2 -2
  533. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  534. package/out/concepts/index__.d.ts +1 -0
  535. package/out/concepts/index__.js +1 -0
  536. package/out/concepts/index__.js.map +1 -1
  537. package/out/concepts/types__.d.ts +2 -1
  538. package/out/generator/genBundleFiles.js +0 -1
  539. package/out/generator/genBundleFiles.js.map +1 -1
  540. package/out/generator/genMetaData.js +32 -4
  541. package/out/generator/genMetaData.js.map +1 -1
  542. package/out/generator/permission.js +31 -6
  543. package/out/generator/permission.js.map +1 -1
  544. package/out/sentry/index.js +2 -1
  545. package/out/sentry/index.js.map +1 -1
  546. package/out/server/extendBaseNode.js +1 -1
  547. package/out/server/extendBaseNode.js.map +1 -1
  548. package/out/server/getMemberIdentifier.js +1 -1
  549. package/out/server/getMemberIdentifier.js.map +1 -1
  550. package/out/server/naslServer.d.ts +2 -0
  551. package/out/server/naslServer.js +143 -5
  552. package/out/server/naslServer.js.map +1 -1
  553. package/out/server/translator.js +5 -2
  554. package/out/server/translator.js.map +1 -1
  555. package/out/service/creator/add.configs.js +1 -1
  556. package/out/service/creator/add.configs.js.map +1 -1
  557. package/out/service/storage/init.d.ts +1 -1
  558. package/out/service/storage/init.js +45 -21
  559. package/out/service/storage/init.js.map +1 -1
  560. package/out/templator/genCreateBlock.js +13 -7
  561. package/out/templator/genCreateBlock.js.map +1 -1
  562. package/out/templator/genCurdEditMultipleKeyBlock.js +15 -9
  563. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  564. package/out/templator/genCurdMultipleKeyBlock.js +13 -10
  565. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  566. package/out/templator/genEditTableBlock.js +4 -4
  567. package/out/templator/genEditTableBlock.js.map +1 -1
  568. package/out/templator/genUpdateBlock.js +14 -10
  569. package/out/templator/genUpdateBlock.js.map +1 -1
  570. package/out/templator/utils.d.ts +6 -1
  571. package/out/templator/utils.js +24 -1
  572. package/out/templator/utils.js.map +1 -1
  573. package/out/translator/utils.d.ts +8 -0
  574. package/out/translator/utils.js +19 -1
  575. package/out/translator/utils.js.map +1 -1
  576. package/out/utils/cookie.d.ts +1 -1
  577. package/out/utils/cookie.js +2 -2
  578. package/out/utils/cookie.js.map +1 -1
  579. package/out/utils/index.js +19 -0
  580. package/out/utils/index.js.map +1 -1
  581. package/out/utils/sortTsString.js +10 -4
  582. package/out/utils/sortTsString.js.map +1 -1
  583. package/out/utils/string.d.ts +1 -0
  584. package/out/utils/string.js +33 -1
  585. package/out/utils/string.js.map +1 -1
  586. package/package.json +1 -1
  587. package/sandbox/stdlib/nasl.core.ts +187 -185
  588. package/src/bak/translator.js +76 -43
  589. package/src/common/BaseNode.ts +62 -12
  590. package/src/concepts/Abort__.ts +1 -0
  591. package/src/concepts/Anchor__.ts +19 -14
  592. package/src/concepts/AnonymousFunction__.ts +26 -12
  593. package/src/concepts/App__.ts +359 -76
  594. package/src/concepts/Argument__.ts +14 -4
  595. package/src/concepts/Assignee__.ts +15 -6
  596. package/src/concepts/AssignmentLine__.ts +1 -0
  597. package/src/concepts/Assignment__.ts +43 -11
  598. package/src/concepts/Attribute__.ts +8 -3
  599. package/src/concepts/AuthInterface__.ts +1 -0
  600. package/src/concepts/AuthLogicForCallInterface__.ts +8 -3
  601. package/src/concepts/AuthLogic__.ts +4 -0
  602. package/src/concepts/BackendVariable__.ts +30 -6
  603. package/src/concepts/Backend__.ts +8 -3
  604. package/src/concepts/BatchAssignment__.ts +28 -13
  605. package/src/concepts/BinaryExpression__.ts +56 -22
  606. package/src/concepts/BindAttribute__.ts +50 -18
  607. package/src/concepts/BindDirective__.ts +26 -5
  608. package/src/concepts/BindEvent__.ts +34 -15
  609. package/src/concepts/BindStyle__.ts +8 -3
  610. package/src/concepts/BooleanLiteral__.ts +1 -0
  611. package/src/concepts/CallAuthInterface__.ts +8 -3
  612. package/src/concepts/CallConnector__.ts +1 -0
  613. package/src/concepts/CallFunction__.ts +49 -27
  614. package/src/concepts/CallInterface__.ts +43 -28
  615. package/src/concepts/CallLogic__.ts +85 -62
  616. package/src/concepts/CallQueryComponent__.ts +15 -6
  617. package/src/concepts/Comment__.ts +2 -1
  618. package/src/concepts/CompletionProperty__.ts +8 -3
  619. package/src/concepts/ConfigGroup__.ts +8 -3
  620. package/src/concepts/ConfigPropertyValue__.ts +1 -0
  621. package/src/concepts/ConfigProperty__.ts +8 -3
  622. package/src/concepts/Configuration__.ts +8 -3
  623. package/src/concepts/Connection__.ts +9 -4
  624. package/src/concepts/ConnectorTrigger__.ts +1 -0
  625. package/src/concepts/Connector__.ts +36 -15
  626. package/src/concepts/Constant__.ts +8 -3
  627. package/src/concepts/DataSource__.ts +8 -3
  628. package/src/concepts/DatabaseTypeAnnotation__.ts +1 -0
  629. package/src/concepts/Destination__.ts +8 -4
  630. package/src/concepts/End__.ts +1 -0
  631. package/src/concepts/EntityIndex__.ts +1 -0
  632. package/src/concepts/EntityProperty__.ts +23 -7
  633. package/src/concepts/Entity__.ts +15 -6
  634. package/src/concepts/EnumItem__.ts +1 -0
  635. package/src/concepts/Enum__.ts +8 -3
  636. package/src/concepts/Event__.ts +8 -3
  637. package/src/concepts/ExternalDestination__.ts +8 -3
  638. package/src/concepts/ForEachStatement__.ts +43 -36
  639. package/src/concepts/FrontendLibrary__.ts +15 -6
  640. package/src/concepts/Frontend__.ts +36 -15
  641. package/src/concepts/Function__.ts +40 -18
  642. package/src/concepts/Identifier__.ts +1 -0
  643. package/src/concepts/IfStatement__.ts +29 -20
  644. package/src/concepts/Integration__.ts +15 -6
  645. package/src/concepts/InterfaceParam__.ts +8 -3
  646. package/src/concepts/Interface__.ts +28 -15
  647. package/src/concepts/JSBlock__.ts +60 -0
  648. package/src/concepts/JavaLogic__.ts +1 -0
  649. package/src/concepts/LogicItem__.ts +5 -4
  650. package/src/concepts/Logic__.ts +70 -58
  651. package/src/concepts/MatchCase__.ts +42 -29
  652. package/src/concepts/Match__.ts +23 -16
  653. package/src/concepts/MemberExpression__.ts +24 -19
  654. package/src/concepts/MetadataType__.ts +637 -0
  655. package/src/concepts/MicroApp__.ts +1 -0
  656. package/src/concepts/Module__.ts +227 -9
  657. package/src/concepts/MsgTriggerEvent__.ts +8 -3
  658. package/src/concepts/MsgTriggerLauncher__.ts +8 -3
  659. package/src/concepts/Namespace__.ts +78 -33
  660. package/src/concepts/NewComposite__.ts +41 -19
  661. package/src/concepts/NewList__.ts +41 -11
  662. package/src/concepts/NewMap__.ts +31 -11
  663. package/src/concepts/NullLiteral__.ts +1 -0
  664. package/src/concepts/NumericLiteral__.ts +9 -4
  665. package/src/concepts/OqlQueryComponent__.ts +35 -5
  666. package/src/concepts/OverriddenLogic__.ts +44 -19
  667. package/src/concepts/Param__.ts +38 -15
  668. package/src/concepts/Point__.ts +1 -0
  669. package/src/concepts/ProcessComponent__.ts +15 -6
  670. package/src/concepts/ProcessElement__.ts +57 -24
  671. package/src/concepts/ProcessOutcome__.ts +1 -0
  672. package/src/concepts/ProcessOutcomes__.ts +1 -0
  673. package/src/concepts/Process__.ts +36 -15
  674. package/src/concepts/QueryAggregateExpression__.ts +8 -3
  675. package/src/concepts/QueryFieldExpression__.ts +1 -0
  676. package/src/concepts/QueryFromExpression__.ts +8 -3
  677. package/src/concepts/QueryGroupByExpression__.ts +8 -3
  678. package/src/concepts/QueryJoinExpression__.ts +8 -3
  679. package/src/concepts/QueryLimitExpression__.ts +8 -3
  680. package/src/concepts/QueryOrderByExpression__.ts +8 -3
  681. package/src/concepts/QuerySelectExpression__.ts +8 -3
  682. package/src/concepts/Rect__.ts +1 -0
  683. package/src/concepts/Return__.ts +31 -6
  684. package/src/concepts/Role__.ts +1 -0
  685. package/src/concepts/SelectMembers__.ts +8 -3
  686. package/src/concepts/Slot__.ts +8 -3
  687. package/src/concepts/SqlQueryComponent__.ts +8 -3
  688. package/src/concepts/Start__.ts +1 -0
  689. package/src/concepts/StringInterpolation__.ts +14 -7
  690. package/src/concepts/StringLiteral__.ts +1 -0
  691. package/src/concepts/StructureProperty__.ts +8 -3
  692. package/src/concepts/Structure__.ts +15 -6
  693. package/src/concepts/SwitchCase__.ts +14 -9
  694. package/src/concepts/SwitchStatement__.ts +21 -16
  695. package/src/concepts/Theme__.ts +1 -0
  696. package/src/concepts/Transactional__.ts +1 -0
  697. package/src/concepts/TriggerEvent__.ts +8 -3
  698. package/src/concepts/TriggerLauncher__.ts +1 -0
  699. package/src/concepts/TypeAnnotation__.ts +75 -21
  700. package/src/concepts/TypeParam__.ts +2 -1
  701. package/src/concepts/UnaryExpression__.ts +15 -6
  702. package/src/concepts/Unparsed__.ts +2 -1
  703. package/src/concepts/UseComponent__.ts +1 -0
  704. package/src/concepts/ValidationRule__.ts +10 -5
  705. package/src/concepts/Variable__.ts +32 -8
  706. package/src/concepts/ViewBlock__.ts +1 -0
  707. package/src/concepts/ViewComponent__.ts +43 -18
  708. package/src/concepts/ViewElement__.ts +191 -120
  709. package/src/concepts/View__.ts +136 -58
  710. package/src/concepts/WhileStatement__.ts +26 -15
  711. package/src/concepts/basics/stdlib/nasl.util.ts +2 -2
  712. package/src/concepts/index__.ts +1 -0
  713. package/src/concepts/types__.ts +2 -0
  714. package/src/generator/genBundleFiles.ts +11 -13
  715. package/src/generator/genMetaData.ts +37 -8
  716. package/src/generator/permission.ts +33 -9
  717. package/src/sentry/index.ts +3 -1
  718. package/src/server/extendBaseNode.ts +2 -1
  719. package/src/server/getMemberIdentifier.ts +122 -121
  720. package/src/server/naslServer.ts +141 -5
  721. package/src/server/translator.ts +5 -2
  722. package/src/service/creator/add.configs.js +1 -1
  723. package/src/service/storage/init.ts +46 -22
  724. package/src/templator/genCreateBlock.ts +35 -38
  725. package/src/templator/genCurdEditMultipleKeyBlock.ts +31 -25
  726. package/src/templator/genCurdMultipleKeyBlock.ts +67 -71
  727. package/src/templator/genEditTableBlock.ts +7 -6
  728. package/src/templator/genUpdateBlock.ts +30 -26
  729. package/src/templator/utils.ts +23 -1
  730. package/src/translator/utils.ts +20 -0
  731. package/src/utils/cookie.ts +2 -2
  732. package/src/utils/index.ts +19 -1
  733. package/src/utils/sortTsString.ts +9 -4
  734. package/src/utils/string.ts +34 -0
  735. package/test/concepts/call-function/__snapshots__/toEmbeddedTS.spec.ts.snap +26 -0
  736. package/test/concepts/call-function/__snapshots__/toJS.spec.ts.snap +26 -0
  737. package/test/concepts/call-function/constant.ts +5 -0
  738. package/test/concepts/call-function/fixtures/from-string.json +100 -0
  739. package/test/concepts/call-function/fixtures/to-string-global-tz.json +99 -0
  740. package/test/concepts/call-function/fixtures/to-string-no-tz.json +89 -0
  741. package/test/concepts/call-function/fixtures/to-string-user-tz.json +101 -0
  742. package/test/concepts/call-function/fixtures/to-string-utc-tz.json +101 -0
  743. package/test/concepts/call-function/toEmbeddedTS.spec.ts +14 -0
  744. package/test/concepts/call-function/toJS.spec.ts +14 -0
  745. package/test/concepts/call-interface/__snapshots__/toJS.spec.ts.snap +2 -2
  746. package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +3 -3
  747. package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +1 -1
  748. package/test/concepts/numeric-literal/__snapshots__/toJS.spec.ts.snap +1 -1
  749. package/test/concepts/validation-rule/__snapshots__/toJS.spec.ts.snap +3 -3
  750. package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +4 -0
  751. package/.nyc_output/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
  752. package/.nyc_output/processinfo/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
  753. package/.nyc_output/processinfo/index.json +0 -1
@@ -2,189 +2,191 @@ type BooleanAlias = Boolean;
2
2
  type StringAlias = String;
3
3
 
4
4
  declare namespace nasl.core {
5
- export type Any = any;
6
- export class Boolean extends globalThis.Boolean {
7
- }
8
- // Long<Long<Decimal<Decimal 小类型可以隐式转换为大类型,反之不可。
9
- // export class Long {
10
- // accept: 'Long';
11
- // constructor(num?: number);
12
- // }
13
-
14
- // export class Decimal {
15
- // accept: 'Decimal' | 'Long' | 'Long';
16
- // constructor(num?: number);
17
- // }
18
- export class Decimal {
19
- accept: 'Decimal' | 'Long';
20
- constructor(num?: number);
21
- }
22
-
23
- export class Long {
24
- accept: 'Long' ;
25
- constructor(num?: number);
26
- }
27
-
28
- export class String extends globalThis.String {
29
- // @ts-ignore
30
- length: nasl.core.Long;
31
- }
32
-
33
- export class Text extends String {
34
- }
35
-
36
- export class Binary {
37
- accept: 'Binary';
38
- }
39
-
40
- export class Date {
41
- accept: 'Date';
42
- }
43
-
44
- export class Time {
45
- accept: 'Time';
46
- }
47
-
48
- export class DateTime {
49
- accept: 'DateTime';
50
- }
51
-
52
- // export class Email extends String {
53
- // subAccept: 'Email';
54
- // }
55
-
56
- export class Union {
57
- accept: 'Union';
58
- }
59
-
60
- // &&
61
- export function and(left: Boolean, right: Boolean): Boolean;
62
- // ||
63
- export function or(left: Boolean, right: Boolean): Boolean;
64
-
65
- export function add(left: Long, right: Long): Long;
66
- export function add(left: Decimal, right: Decimal): Decimal;
67
- export function add(left: String, right: Any): String;
68
- export function add(left: Any, right: String): String;
69
- export function add(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
70
-
71
- export function minus(left: Long, right: Long): Long;
72
- export function minus(left: Decimal, right: Decimal): Decimal;
73
- export function minus(left: Long, right: Long): Long;
74
-
75
- export function multiply(left: Long, right: Long): Long;
76
- export function multiply(left: Decimal, right: Decimal): Decimal;
77
- export function multiply(left: Long, right: Long): Long;
78
-
79
- export function divide(left: Long, right: Long): Decimal;
80
- export function divide(left: Decimal, right: Decimal): Decimal;
81
- export function divide(left: Long, right: Long): Decimal;
82
-
83
- export function remainder(left: Long, right: Long): Long;
84
- export function remainder(left: Decimal, right: Decimal): Decimal;
85
- export function remainder(left: Long, right: Long): Long;
86
-
87
- export function equal<T>(left: T, right: T): Boolean;
88
- export function notEqual<T>(left: T, right: T): Boolean;
89
-
90
- export function greaterThan(left: Long, right: Long): Boolean;
91
- export function greaterThan(left: String, right: String): Boolean;
92
- export function greaterThan(left: Date, right: Date): Boolean;
93
- export function greaterThan(left: Time, right: Time): Boolean;
94
- export function greaterThan(left: DateTime, right: DateTime): Boolean;
95
- export function greaterThan(left: Decimal, right: Decimal): Boolean;
96
- export function greaterThan(left: Long, right: Long): Boolean;
97
-
98
- export function lessThan(left: Long, right: Long): Boolean;
99
- export function lessThan(left: String, right: String): Boolean;
100
- export function lessThan(left: Date, right: Date): Boolean;
101
- export function lessThan(left: Time, right: Time): Boolean;
102
- export function lessThan(left: DateTime, right: DateTime): Boolean;
103
- export function lessThan(left: Decimal, right: Decimal): Boolean;
104
- export function lessThan(left: Long, right: Long): Boolean;
105
-
106
- export function greaterThanOrEqual(left: Long, right: Long): Boolean;
107
- export function greaterThanOrEqual(left: String, right: String): Boolean;
108
- export function greaterThanOrEqual(left: Date, right: Date): Boolean;
109
- export function greaterThanOrEqual(left: Time, right: Time): Boolean;
110
- export function greaterThanOrEqual(left: DateTime, right: DateTime): Boolean;
111
- export function greaterThanOrEqual(left: Decimal, right: Decimal): Boolean;
112
- export function greaterThanOrEqual(left: Long, right: Long): Boolean;
113
-
114
- export function lessThanOrEqual(left: Long, right: Long): Boolean;
115
- export function lessThanOrEqual(left: String, right: String): Boolean;
116
- export function lessThanOrEqual(left: Date, right: Date): Boolean;
117
- export function lessThanOrEqual(left: Time, right: Time): Boolean;
118
- export function lessThanOrEqual(left: DateTime, right: DateTime): Boolean;
119
- export function lessThanOrEqual(left: Decimal, right: Decimal): Boolean;
120
- export function lessThanOrEqual(left: Long, right: Long): Boolean;
121
-
122
- export function ensureBoolean(value: Boolean): Boolean;
123
- export function ensureVoid<T>(value: IsVoid<T>): Boolean
124
-
125
- export function isUnionType<T, S extends T>(obj: T): obj is S;
126
-
127
- // 代替原来的赋值语句,就只校验左右类型是不是可以赋值,但是不会改变原始类型
128
- export function assign<T1, T2 extends T1>(left: T1, right: T2): T1;
129
- export let universalVariable: nasl.core.Any;
130
-
131
- // new 组件对比类型
132
- export function compareNew(left: Date, right: Date): Boolean;
133
- export function compareNew(left: Time, right: Time): Boolean;
134
- export function compareNew(left: DateTime, right: DateTime): Boolean;
135
- export function compareNew(left: Long, right: Long): Boolean;
136
- export function compareNew(left: Long, right: Decimal): Boolean;
137
- export function compareNew(left: Decimal, right: Long): Boolean;
138
- export function compareNew(left: String, right: String): Boolean;
139
- export function compareNew(left: Decimal, right: Decimal): Boolean;
140
- export function compareNew<T>(left: T, right: T): Boolean;
141
-
142
- // OQL 临时补救
143
- export function compare2(left: Date, right: String): Boolean;
144
- export function compare2(left: DateTime, right: String): Boolean;
145
- export function compare2(left: String, right: Date): Boolean;
146
- export function compare2(left: String, right: DateTime): Boolean;
147
- export function compare2(left: String, right: Time): Boolean;
148
- export function compare2(left: Date, right: Date): Boolean;
149
- export function compare2(left: Time, right: Time): Boolean;
150
- export function compare2(left: DateTime, right: DateTime): Boolean;
151
- export function compare2(left: String, right: String): Boolean;
152
- export function compare2(left: Long, right: Long): Boolean;
153
- export function compare2(left: Long, right: Decimal): Boolean;
154
- export function compare2(left: Decimal, right: Long): Boolean;
155
- export function compare2(left: Decimal, right: Decimal): Boolean;
156
- export function compare2<T>(left: T, right: T): Boolean;
157
-
158
- // 包括 +
159
- export function add2(left: Long, right: Long): Long;
160
- export function add2(left: Decimal, right: Decimal): Decimal;
161
- export function add2(left: Long, right: Long): Long;
162
- export function add2(left: Long, right: Decimal): Decimal;
163
- export function add2(left: Decimal, right: Long): Decimal;
164
- export function add2(left: String, right: Any): String;
165
- export function add2(left: Any, right: String): String;
166
- export function add2(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
167
-
168
- // 包括 - * %
169
- export function arith2(left: Long, right: Long): Long;
170
- export function arith2(left: Decimal, right: Decimal): Decimal;
171
- export function arith2(left: Long, right: Decimal): Decimal;
172
- export function arith2(left: Decimal, right: Long): Decimal;
173
- export function arith2(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
174
-
175
- // 包括 /
176
- export function divided2(left: Long, right: Long): Decimal;
177
- export function divided2(left: Decimal, right: Decimal): Decimal;
178
- export function divided2(left: Long, right: Decimal): Decimal;
179
- export function divided2(left: Decimal, right: Long): Decimal;
180
- export function divided2(left: Long, right: Long): Decimal; // 为了让提示到整数上,最后补一个重载
181
-
182
- export class Enums {
183
- accept: 'Enums';
184
- }
185
- export class None {
186
- accept: 'None';
187
- }
188
- export type Incompatible<A, B> = A extends B ? never : A
189
- export type IsVoid<T> = T extends void ? never : T
5
+ export type Any = any;
6
+ export class Boolean extends globalThis.Boolean {
7
+ }
8
+ // Long<Long<Decimal<Decimal 小类型可以隐式转换为大类型,反之不可。
9
+ // export class Long {
10
+ // accept: 'Long';
11
+ // constructor(num?: number);
12
+ // }
13
+
14
+ // export class Decimal {
15
+ // accept: 'Decimal' | 'Long' | 'Long';
16
+ // constructor(num?: number);
17
+ // }
18
+ export class Decimal {
19
+ accept: 'Decimal' | 'Long';
20
+ constructor(num?: number);
21
+ }
22
+
23
+ export class Long {
24
+ accept: 'Long';
25
+ constructor(num?: number);
26
+ }
27
+
28
+ export class String extends globalThis.String {
29
+ // @ts-ignore
30
+ length: nasl.core.Long;
31
+ }
32
+
33
+ export class Text extends String {
34
+ }
35
+
36
+ export class Binary {
37
+ accept: 'Binary';
38
+ }
39
+
40
+ export class Date {
41
+ accept: 'Date';
42
+ }
43
+
44
+ export class Time {
45
+ accept: 'Time';
46
+ }
47
+
48
+ export class DateTime {
49
+ accept: 'DateTime';
50
+ }
51
+
52
+ // export class Email extends String {
53
+ // subAccept: 'Email';
54
+ // }
55
+
56
+ export class Union {
57
+ accept: 'Union';
58
+ }
59
+
60
+ // &&
61
+ export function and(left: Boolean, right: Boolean): Boolean;
62
+ // ||
63
+ export function or(left: Boolean, right: Boolean): Boolean;
64
+
65
+ export function add(left: Long, right: Long): Long;
66
+ export function add(left: Decimal, right: Decimal): Decimal;
67
+ export function add(left: String, right: Any): String;
68
+ export function add(left: Any, right: String): String;
69
+ export function add(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
70
+
71
+ export function minus(left: Long, right: Long): Long;
72
+ export function minus(left: Decimal, right: Decimal): Decimal;
73
+ export function minus(left: Long, right: Long): Long;
74
+
75
+ export function multiply(left: Long, right: Long): Long;
76
+ export function multiply(left: Decimal, right: Decimal): Decimal;
77
+ export function multiply(left: Long, right: Long): Long;
78
+
79
+ export function divide(left: Long, right: Long): Decimal;
80
+ export function divide(left: Decimal, right: Decimal): Decimal;
81
+ export function divide(left: Long, right: Long): Decimal;
82
+
83
+ export function remainder(left: Long, right: Long): Long;
84
+ export function remainder(left: Decimal, right: Decimal): Decimal;
85
+ export function remainder(left: Long, right: Long): Long;
86
+
87
+ export function equal<T>(left: T, right: T): Boolean;
88
+ export function isEqual<T>(left: T, right: T): Boolean;
89
+ export function notEqual<T>(left: T, right: T): Boolean;
90
+ export function isNotEqual<T>(left: T, right: T): Boolean;
91
+
92
+ export function greaterThan(left: Long, right: Long): Boolean;
93
+ export function greaterThan(left: String, right: String): Boolean;
94
+ export function greaterThan(left: Date, right: Date): Boolean;
95
+ export function greaterThan(left: Time, right: Time): Boolean;
96
+ export function greaterThan(left: DateTime, right: DateTime): Boolean;
97
+ export function greaterThan(left: Decimal, right: Decimal): Boolean;
98
+ export function greaterThan(left: Long, right: Long): Boolean;
99
+
100
+ export function lessThan(left: Long, right: Long): Boolean;
101
+ export function lessThan(left: String, right: String): Boolean;
102
+ export function lessThan(left: Date, right: Date): Boolean;
103
+ export function lessThan(left: Time, right: Time): Boolean;
104
+ export function lessThan(left: DateTime, right: DateTime): Boolean;
105
+ export function lessThan(left: Decimal, right: Decimal): Boolean;
106
+ export function lessThan(left: Long, right: Long): Boolean;
107
+
108
+ export function greaterThanOrEqual(left: Long, right: Long): Boolean;
109
+ export function greaterThanOrEqual(left: String, right: String): Boolean;
110
+ export function greaterThanOrEqual(left: Date, right: Date): Boolean;
111
+ export function greaterThanOrEqual(left: Time, right: Time): Boolean;
112
+ export function greaterThanOrEqual(left: DateTime, right: DateTime): Boolean;
113
+ export function greaterThanOrEqual(left: Decimal, right: Decimal): Boolean;
114
+ export function greaterThanOrEqual(left: Long, right: Long): Boolean;
115
+
116
+ export function lessThanOrEqual(left: Long, right: Long): Boolean;
117
+ export function lessThanOrEqual(left: String, right: String): Boolean;
118
+ export function lessThanOrEqual(left: Date, right: Date): Boolean;
119
+ export function lessThanOrEqual(left: Time, right: Time): Boolean;
120
+ export function lessThanOrEqual(left: DateTime, right: DateTime): Boolean;
121
+ export function lessThanOrEqual(left: Decimal, right: Decimal): Boolean;
122
+ export function lessThanOrEqual(left: Long, right: Long): Boolean;
123
+
124
+ export function ensureBoolean(value: Boolean): Boolean;
125
+ export function ensureVoid<T>(value: IsVoid<T>): Boolean
126
+
127
+ export function isUnionType<T, S extends T>(obj: T): obj is S;
128
+
129
+ // 代替原来的赋值语句,就只校验左右类型是不是可以赋值,但是不会改变原始类型
130
+ export function assign<T1, T2 extends T1>(left: T1, right: T2): T1;
131
+ export let universalVariable: nasl.core.Any;
132
+
133
+ // new 组件对比类型
134
+ export function compareNew(left: Date, right: Date): Boolean;
135
+ export function compareNew(left: Time, right: Time): Boolean;
136
+ export function compareNew(left: DateTime, right: DateTime): Boolean;
137
+ export function compareNew(left: Long, right: Long): Boolean;
138
+ export function compareNew(left: Long, right: Decimal): Boolean;
139
+ export function compareNew(left: Decimal, right: Long): Boolean;
140
+ export function compareNew(left: String, right: String): Boolean;
141
+ export function compareNew(left: Decimal, right: Decimal): Boolean;
142
+ export function compareNew<T>(left: T, right: T): Boolean;
143
+
144
+ // OQL 临时补救
145
+ export function compare2(left: Date, right: String): Boolean;
146
+ export function compare2(left: DateTime, right: String): Boolean;
147
+ export function compare2(left: String, right: Date): Boolean;
148
+ export function compare2(left: String, right: DateTime): Boolean;
149
+ export function compare2(left: String, right: Time): Boolean;
150
+ export function compare2(left: Date, right: Date): Boolean;
151
+ export function compare2(left: Time, right: Time): Boolean;
152
+ export function compare2(left: DateTime, right: DateTime): Boolean;
153
+ export function compare2(left: String, right: String): Boolean;
154
+ export function compare2(left: Long, right: Long): Boolean;
155
+ export function compare2(left: Long, right: Decimal): Boolean;
156
+ export function compare2(left: Decimal, right: Long): Boolean;
157
+ export function compare2(left: Decimal, right: Decimal): Boolean;
158
+ export function compare2<T>(left: T, right: T): Boolean;
159
+
160
+ // 包括 +
161
+ export function add2(left: Long, right: Long): Long;
162
+ export function add2(left: Decimal, right: Decimal): Decimal;
163
+ export function add2(left: Long, right: Long): Long;
164
+ export function add2(left: Long, right: Decimal): Decimal;
165
+ export function add2(left: Decimal, right: Long): Decimal;
166
+ export function add2(left: String, right: Any): String;
167
+ export function add2(left: Any, right: String): String;
168
+ export function add2(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
169
+
170
+ // 包括 - * %
171
+ export function arith2(left: Long, right: Long): Long;
172
+ export function arith2(left: Decimal, right: Decimal): Decimal;
173
+ export function arith2(left: Long, right: Decimal): Decimal;
174
+ export function arith2(left: Decimal, right: Long): Decimal;
175
+ export function arith2(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
176
+
177
+ // 包括 /
178
+ export function divided2(left: Long, right: Long): Decimal;
179
+ export function divided2(left: Decimal, right: Decimal): Decimal;
180
+ export function divided2(left: Long, right: Decimal): Decimal;
181
+ export function divided2(left: Decimal, right: Long): Decimal;
182
+ export function divided2(left: Long, right: Long): Decimal; // 为了让提示到整数上,最后补一个重载
183
+
184
+ export class Enums {
185
+ accept: 'Enums';
186
+ }
187
+ export class None {
188
+ accept: 'None';
189
+ }
190
+ export type Incompatible<A, B> = A extends B ? never : A
191
+ export type IsVoid<T> = T extends void ? never : T
190
192
  }
@@ -9,12 +9,12 @@ function tryJSONParse(str) {
9
9
 
10
10
  try {
11
11
  result = JSON.parse(str);
12
- } catch (e) {}
12
+ } catch (e) { }
13
13
 
14
14
  return result;
15
15
  }
16
16
 
17
- export default function (definition) {
17
+ export default function (definition, view) {
18
18
  /**
19
19
  * 页面的 data
20
20
  * 包含 页面变量 / 页面入参 / 页面元素绑定的表达式的返回
@@ -33,21 +33,44 @@ export default function (definition) {
33
33
  viewVariables.forEach((viewVariable) => {
34
34
  dataMap[viewVariable.code || viewVariable.name] = true;
35
35
  const typeAnnotation = viewVariable.typeAnnotation || viewVariable.__TypeAnnotation;
36
+ let { typeKind, typeNamespace, typeName, sortedTypeKey } = typeAnnotation || {};
37
+ if (typeNamespace?.endsWith('.metadataTypes')) {
38
+ const referenceNode = view.getAncestor('App').findNodeByCompleteName(typeNamespace + '.' + typeName) || {}
39
+ const typeAn = referenceNode.typeAnnotation || {};
40
+ typeKind = typeAn.typeKind;
41
+ typeNamespace = typeAn.typeNamespace;
42
+ typeName = typeAn.typeName;
43
+ sortedTypeKey = `${typeNamespace}.${typeName}`;
44
+ if (`${viewVariable.defaultValue}` === 'undefined' || `${viewVariable.defaultValue}` === 'null') {
45
+ viewVariable?.setDefaultValue('')
46
+ }
47
+ }
36
48
  const needGenInitFromSchema =
37
- typeAnnotation && (!['primitive', 'union'].includes(typeAnnotation.typeKind) || typeAnnotation.typeName === 'DateTime');
49
+ typeAnnotation && (!['primitive', 'union'].includes(typeKind) || typeName === 'DateTime');
38
50
  let code = `${safeCodeAsKey(viewVariable.name)}:`;
39
51
  if (needGenInitFromSchema) {
40
- code += `this.$genInitFromSchema('${typeAnnotation?.sortedTypeKey}', `;
52
+ code += `this.$genInitFromSchema('${sortedTypeKey}', `;
41
53
  }
42
54
  if (viewVariable.concept === 'Param') {
43
- code += `this.$route.query.hasOwnProperty('${viewVariable.name}') ? this.$genInitFromSchema('${typeAnnotation?.sortedTypeKey}', this.$route.query.${viewVariable.name}) :`;
55
+ code += `this.$route.query.hasOwnProperty('${viewVariable.name}') ? this.$genInitFromSchema('${sortedTypeKey}', this.$route.query.${viewVariable.name}) :`;
44
56
  }
45
57
 
46
58
  const { defaultValue } = viewVariable;
47
59
  const defaultValueType = Object.prototype.toString.call(defaultValue);
48
- const { typeKind, typeNamespace, typeName } = typeAnnotation || {};
49
60
  // 设置成null,才能同步给后端清除该值,但是null对checkbox组件是一种特殊状态
50
61
  let parsedValue = defaultValue ?? undefined;
62
+ const isDecimal = typeKind === 'primitive' && ['Decimal', "Double"].includes(typeName)
63
+ const isInteger = typeKind === 'primitive' && ['Long', "Integer"].includes(typeName)
64
+ function parseNumberValue(defaultValue, typeAnnotation) {
65
+ const { typeKind, typeName } = typeAnnotation;
66
+ const isNaslNumber = typeKind === 'primitive' && ['Decimal', 'Long', 'Double', 'Int'].includes(typeName);
67
+ if (isNaslNumber) {
68
+ return String(defaultValue);
69
+ } else {
70
+ return tryJSONParse(defaultValue) ?? defaultValue;
71
+ }
72
+ }
73
+
51
74
  if (
52
75
  defaultValueType === '[object String]' &&
53
76
  !(typeKind === 'primitive' && typeNamespace === 'nasl.core' && ['String', 'Text', 'Email'].includes(typeName)) &&
@@ -59,10 +82,20 @@ export default function (definition) {
59
82
  if ([''].includes(defaultValue)) {
60
83
  parsedValue = undefined;
61
84
  } else {
62
- parsedValue = tryJSONParse(defaultValue) ?? defaultValue;
85
+ parsedValue = parseNumberValue(defaultValue, typeAnnotation);
63
86
  }
64
87
  }
65
- code += `${JSON.stringify(parsedValue)}`;
88
+ // code += `${JSON.stringify(parsedValue)}`;
89
+ const isNil = val => val === undefined || val === null;
90
+ if (isDecimal) {
91
+ parsedValue = isNil(parsedValue) ? parsedValue : `new NaslDecimal('${parsedValue}')`
92
+ code += `${parsedValue} `;
93
+ } else if (isInteger) {
94
+ parsedValue = isNil(parsedValue) ? parsedValue : `new NaslLong('${parsedValue}')`
95
+ code += `${parsedValue} `;
96
+ } else {
97
+ code += `${JSON.stringify(parsedValue)} `;
98
+ }
66
99
  if (needGenInitFromSchema) {
67
100
  code += `)`;
68
101
  }
@@ -92,48 +125,48 @@ export default function (definition) {
92
125
  })
93
126
  })
94
127
  definition.elements.forEach(element => {
95
- element.bindAttrs.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[element.tag]?.[attr.name]).forEach(attr => {
96
- let variable = '';
97
- if (attr.expression) {
98
- variable += `${attr.expression.toJS()}`
99
- // attrsData.push(code)
100
- } else if (attr.type === 'static') {
101
- variable = `${attr.value}`
102
- // attrsData.push(code)
103
- }
104
- if (attr.expression?.concept === 'CallLogic' && attr.name === 'data-source') {
105
- const codeLoad = `async '__${element.name}_dataSourceLoad'(params) {
128
+ element.bindAttrs.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[element.tag]?.[attr.name]).forEach(attr => {
129
+ let variable = '';
130
+ if (attr.expression) {
131
+ variable += `${attr.expression.toJS()}`
132
+ // attrsData.push(code)
133
+ } else if (attr.type === 'static') {
134
+ variable = `${attr.value}`
135
+ // attrsData.push(code)
136
+ }
137
+ if (attr.expression?.concept === 'CallLogic' && attr.name === 'data-source') {
138
+ const codeLoad = `async '__${element.name}_dataSourceLoad'(params) {
106
139
  this['__${element.name}_params'] = {...params};
107
140
  return ${variable}
108
141
  }`
109
- viewMethodData.push(codeLoad)
110
- const code = `async '__${element.name}_dataSource'(params) {
142
+ viewMethodData.push(codeLoad)
143
+ const code = `async '__${element.name}_dataSource'(params) {
111
144
  return ${variable}
112
145
  }`
113
- viewMethodData.push(code)
114
- } else {
115
- const code = `'__${element.name}_${attrConvertCamelCase(attr.name)}'(${variable.includes('(current || {}).item') ? 'current' : ''}) {
146
+ viewMethodData.push(code)
147
+ } else {
148
+ const code = `'__${element.name}_${attrConvertCamelCase(attr.name)}'(${variable.includes('(current || {}).item') ? 'current' : ''}) {
116
149
  return ${variable?.trim()?.length > 0 ? variable : undefined}
117
150
  }`
118
- viewMethodData.push(code)
119
- }
120
- })
121
- viewVariablesData.push(`['__${element.name}_params']: {}`);
122
- // if (['u-select', 'van-pickerson'].includes(element.tag)) {
123
- // viewMethodData.push(`['__${element.name}_page-number']() {
124
- // return this['__${element.name}_params']?.page ?? 1
125
- // }`)
126
- // viewMethodData.push(`['__${element.name}_filterText']() {
127
- // return this['__${element.name}_params']?.filterText ?? ''
128
- // }`)
129
- // } else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(element.tag) && element.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1) {
130
- // viewMethodData.push(`['__${element.name}_sorting']() {
131
- // return {
132
- // field: undefined,
133
- // order: undefined
134
- // }
135
- // }`)
136
- // }
151
+ viewMethodData.push(code)
152
+ }
153
+ })
154
+ viewVariablesData.push(`['__${element.name}_params']: {}`);
155
+ // if (['u-select', 'van-pickerson'].includes(element.tag)) {
156
+ // viewMethodData.push(`['__${element.name}_page-number']() {
157
+ // return this['__${element.name}_params']?.page ?? 1
158
+ // }`)
159
+ // viewMethodData.push(`['__${element.name}_filterText']() {
160
+ // return this['__${element.name}_params']?.filterText ?? ''
161
+ // }`)
162
+ // } else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(element.tag) && element.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1) {
163
+ // viewMethodData.push(`['__${element.name}_sorting']() {
164
+ // return {
165
+ // field: undefined,
166
+ // order: undefined
167
+ // }
168
+ // }`)
169
+ // }
137
170
  })
138
171
 
139
172
  let viewExpressionMethods;