@lcap/nasl 3.7.1-beta.1 → 3.7.1-beta.3

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 (475) hide show
  1. package/out/common/BaseNode.js +3 -1
  2. package/out/common/BaseNode.js.map +1 -1
  3. package/out/concepts/AnonymousFunction__.d.ts +1 -1
  4. package/out/concepts/AnonymousFunction__.js.map +1 -1
  5. package/out/concepts/App__.js +9 -27
  6. package/out/concepts/App__.js.map +1 -1
  7. package/out/concepts/Argument__.d.ts +1 -1
  8. package/out/concepts/Argument__.js +2 -6
  9. package/out/concepts/Argument__.js.map +1 -1
  10. package/out/concepts/AssigneeV2__.js +0 -2
  11. package/out/concepts/AssigneeV2__.js.map +1 -1
  12. package/out/concepts/Assignee__.js +0 -2
  13. package/out/concepts/Assignee__.js.map +1 -1
  14. package/out/concepts/AssignmentLine__.js +0 -2
  15. package/out/concepts/AssignmentLine__.js.map +1 -1
  16. package/out/concepts/Assignment__.js +2 -4
  17. package/out/concepts/Assignment__.js.map +1 -1
  18. package/out/concepts/Attribute__.d.ts +1 -1
  19. package/out/concepts/Attribute__.js +7 -23
  20. package/out/concepts/Attribute__.js.map +1 -1
  21. package/out/concepts/AuthInterface__.js +1 -3
  22. package/out/concepts/AuthInterface__.js.map +1 -1
  23. package/out/concepts/AuthLogicForCallInterface__.js +7 -7
  24. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  25. package/out/concepts/AuthLogic__.js +1 -3
  26. package/out/concepts/AuthLogic__.js.map +1 -1
  27. package/out/concepts/BackendVariable__.d.ts +2 -2
  28. package/out/concepts/BackendVariable__.js +3 -9
  29. package/out/concepts/BackendVariable__.js.map +1 -1
  30. package/out/concepts/Backend__.js +1 -3
  31. package/out/concepts/Backend__.js.map +1 -1
  32. package/out/concepts/BatchAssignment__.js +1 -3
  33. package/out/concepts/BatchAssignment__.js.map +1 -1
  34. package/out/concepts/BinaryExpression__.js +4 -4
  35. package/out/concepts/BinaryExpression__.js.map +1 -1
  36. package/out/concepts/BindAttribute__.js +6 -58
  37. package/out/concepts/BindAttribute__.js.map +1 -1
  38. package/out/concepts/BindDirective__.d.ts +6 -6
  39. package/out/concepts/BindDirective__.js +7 -21
  40. package/out/concepts/BindDirective__.js.map +1 -1
  41. package/out/concepts/BindEvent__.d.ts +3 -3
  42. package/out/concepts/BindEvent__.js +3 -13
  43. package/out/concepts/BindEvent__.js.map +1 -1
  44. package/out/concepts/BindStyle__.js +1 -3
  45. package/out/concepts/BindStyle__.js.map +1 -1
  46. package/out/concepts/BooleanLiteral__.js +1 -3
  47. package/out/concepts/BooleanLiteral__.js.map +1 -1
  48. package/out/concepts/BusinessComponent__.js +11 -19
  49. package/out/concepts/BusinessComponent__.js.map +1 -1
  50. package/out/concepts/BusinessLogic__.js +8 -10
  51. package/out/concepts/BusinessLogic__.js.map +1 -1
  52. package/out/concepts/CallConnector__.js +2 -6
  53. package/out/concepts/CallConnector__.js.map +1 -1
  54. package/out/concepts/CallEvent__.js +2 -6
  55. package/out/concepts/CallEvent__.js.map +1 -1
  56. package/out/concepts/CallFunction__.d.ts +1 -1
  57. package/out/concepts/CallFunction__.js +3 -13
  58. package/out/concepts/CallFunction__.js.map +1 -1
  59. package/out/concepts/CallInterface__.d.ts +1 -1
  60. package/out/concepts/CallInterface__.js +3 -9
  61. package/out/concepts/CallInterface__.js.map +1 -1
  62. package/out/concepts/CallLogic__.d.ts +4 -4
  63. package/out/concepts/CallLogic__.js +8 -23
  64. package/out/concepts/CallLogic__.js.map +1 -1
  65. package/out/concepts/CallQueryComponent__.d.ts +2 -2
  66. package/out/concepts/CallQueryComponent__.js +2 -13
  67. package/out/concepts/CallQueryComponent__.js.map +1 -1
  68. package/out/concepts/Comment__.js +1 -3
  69. package/out/concepts/Comment__.js.map +1 -1
  70. package/out/concepts/CompletionProperty__.js +5 -15
  71. package/out/concepts/CompletionProperty__.js.map +1 -1
  72. package/out/concepts/ConfigGroup__.js +1 -3
  73. package/out/concepts/ConfigGroup__.js.map +1 -1
  74. package/out/concepts/ConfigPropertyValue__.d.ts +0 -1
  75. package/out/concepts/ConfigPropertyValue__.js +2 -13
  76. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  77. package/out/concepts/ConfigProperty__.js +3 -9
  78. package/out/concepts/ConfigProperty__.js.map +1 -1
  79. package/out/concepts/Configuration__.js.map +1 -1
  80. package/out/concepts/Connection__.js +3 -9
  81. package/out/concepts/Connection__.js.map +1 -1
  82. package/out/concepts/ConnectorLogic__.js +1 -3
  83. package/out/concepts/ConnectorLogic__.js.map +1 -1
  84. package/out/concepts/ConnectorTriggerLauncher__.js +6 -9
  85. package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -1
  86. package/out/concepts/ConnectorTrigger__.js +2 -6
  87. package/out/concepts/ConnectorTrigger__.js.map +1 -1
  88. package/out/concepts/Connector__.js +3 -9
  89. package/out/concepts/Connector__.js.map +1 -1
  90. package/out/concepts/Constant__.js +2 -6
  91. package/out/concepts/Constant__.js.map +1 -1
  92. package/out/concepts/CountersignPolicyV2__.js +1 -3
  93. package/out/concepts/CountersignPolicyV2__.js.map +1 -1
  94. package/out/concepts/CountersignPolicy__.js +1 -3
  95. package/out/concepts/CountersignPolicy__.js.map +1 -1
  96. package/out/concepts/DataSource__.js +6 -12
  97. package/out/concepts/DataSource__.js.map +1 -1
  98. package/out/concepts/DatabaseTypeAnnotation__.js +6 -6
  99. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  100. package/out/concepts/Destination__.js +3 -9
  101. package/out/concepts/Destination__.js.map +1 -1
  102. package/out/concepts/EntityIndex__.d.ts +2 -2
  103. package/out/concepts/EntityIndex__.js +4 -13
  104. package/out/concepts/EntityIndex__.js.map +1 -1
  105. package/out/concepts/EntityProperty__.d.ts +10 -12
  106. package/out/concepts/EntityProperty__.js +25 -44
  107. package/out/concepts/EntityProperty__.js.map +1 -1
  108. package/out/concepts/Entity__.d.ts +2 -2
  109. package/out/concepts/Entity__.js +7 -17
  110. package/out/concepts/Entity__.js.map +1 -1
  111. package/out/concepts/EnumItem__.d.ts +1 -1
  112. package/out/concepts/EnumItem__.js +1 -7
  113. package/out/concepts/EnumItem__.js.map +1 -1
  114. package/out/concepts/Enum__.js +3 -9
  115. package/out/concepts/Enum__.js.map +1 -1
  116. package/out/concepts/EventDeclaration__.js +4 -16
  117. package/out/concepts/EventDeclaration__.js.map +1 -1
  118. package/out/concepts/Event__.js +5 -15
  119. package/out/concepts/Event__.js.map +1 -1
  120. package/out/concepts/ExternalDestination__.d.ts +1 -1
  121. package/out/concepts/ExternalDestination__.js +1 -3
  122. package/out/concepts/ExternalDestination__.js.map +1 -1
  123. package/out/concepts/FieldPermissionV2__.js +2 -6
  124. package/out/concepts/FieldPermissionV2__.js.map +1 -1
  125. package/out/concepts/FlowConditionV2__.js +1 -3
  126. package/out/concepts/FlowConditionV2__.js.map +1 -1
  127. package/out/concepts/ForEachStatement__.d.ts +1 -1
  128. package/out/concepts/ForEachStatement__.js.map +1 -1
  129. package/out/concepts/FrontendLibrary__.js +2 -6
  130. package/out/concepts/FrontendLibrary__.js.map +1 -1
  131. package/out/concepts/FrontendType__.d.ts +0 -4
  132. package/out/concepts/FrontendType__.js +2 -15
  133. package/out/concepts/FrontendType__.js.map +1 -1
  134. package/out/concepts/FrontendVariable__.js +1 -3
  135. package/out/concepts/FrontendVariable__.js.map +1 -1
  136. package/out/concepts/Frontend__.d.ts +0 -2
  137. package/out/concepts/Frontend__.js +8 -31
  138. package/out/concepts/Frontend__.js.map +1 -1
  139. package/out/concepts/Function__.js +2 -6
  140. package/out/concepts/Function__.js.map +1 -1
  141. package/out/concepts/HistoryProcessV2__.js +4 -12
  142. package/out/concepts/HistoryProcessV2__.js.map +1 -1
  143. package/out/concepts/I18nInfo__.d.ts +1 -1
  144. package/out/concepts/I18nInfo__.js +5 -9
  145. package/out/concepts/I18nInfo__.js.map +1 -1
  146. package/out/concepts/IconSetter__.js +1 -7
  147. package/out/concepts/IconSetter__.js.map +1 -1
  148. package/out/concepts/Identifier__.js +7 -7
  149. package/out/concepts/Identifier__.js.map +1 -1
  150. package/out/concepts/ImportedInterface__.d.ts +1 -1
  151. package/out/concepts/ImportedInterface__.js +1 -3
  152. package/out/concepts/ImportedInterface__.js.map +1 -1
  153. package/out/concepts/InputSetter__.js +1 -7
  154. package/out/concepts/InputSetter__.js.map +1 -1
  155. package/out/concepts/Integration__.js.map +1 -1
  156. package/out/concepts/InterfaceParam__.js +4 -12
  157. package/out/concepts/InterfaceParam__.js.map +1 -1
  158. package/out/concepts/Interface__.js +8 -18
  159. package/out/concepts/Interface__.js.map +1 -1
  160. package/out/concepts/JSBlock__.js +1 -3
  161. package/out/concepts/JSBlock__.js.map +1 -1
  162. package/out/concepts/JavaLogic__.js +3 -9
  163. package/out/concepts/JavaLogic__.js.map +1 -1
  164. package/out/concepts/LogicDeclaration__.js +3 -13
  165. package/out/concepts/LogicDeclaration__.js.map +1 -1
  166. package/out/concepts/LogicItem__.js +5 -31
  167. package/out/concepts/LogicItem__.js.map +1 -1
  168. package/out/concepts/Logic__.d.ts +6 -6
  169. package/out/concepts/Logic__.js +25 -36
  170. package/out/concepts/Logic__.js.map +1 -1
  171. package/out/concepts/MatchCase__.d.ts +2 -2
  172. package/out/concepts/MatchCase__.js +11 -11
  173. package/out/concepts/MatchCase__.js.map +1 -1
  174. package/out/concepts/Match__.js +1 -3
  175. package/out/concepts/Match__.js.map +1 -1
  176. package/out/concepts/MemberExpression__.js +6 -2
  177. package/out/concepts/MemberExpression__.js.map +1 -1
  178. package/out/concepts/MetadataType__.d.ts +1 -1
  179. package/out/concepts/MetadataType__.js +4 -12
  180. package/out/concepts/MetadataType__.js.map +1 -1
  181. package/out/concepts/MicroApp__.js +7 -21
  182. package/out/concepts/MicroApp__.js.map +1 -1
  183. package/out/concepts/Module__.d.ts +2 -2
  184. package/out/concepts/Module__.js +8 -24
  185. package/out/concepts/Module__.js.map +1 -1
  186. package/out/concepts/Namespace__.js +4 -12
  187. package/out/concepts/Namespace__.js.map +1 -1
  188. package/out/concepts/NewComposite__.js +6 -10
  189. package/out/concepts/NewComposite__.js.map +1 -1
  190. package/out/concepts/NewList__.d.ts +1 -1
  191. package/out/concepts/NewList__.js.map +1 -1
  192. package/out/concepts/NewMap__.d.ts +1 -1
  193. package/out/concepts/NewMap__.js +5 -2
  194. package/out/concepts/NewMap__.js.map +1 -1
  195. package/out/concepts/NumberInputSetter__.js +5 -35
  196. package/out/concepts/NumberInputSetter__.js.map +1 -1
  197. package/out/concepts/NumericLiteral__.js +1 -3
  198. package/out/concepts/NumericLiteral__.js.map +1 -1
  199. package/out/concepts/OperatePermissionV2__.js +4 -12
  200. package/out/concepts/OperatePermissionV2__.js.map +1 -1
  201. package/out/concepts/OqlQueryComponent__.d.ts +1 -1
  202. package/out/concepts/OqlQueryComponent__.js +2 -6
  203. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  204. package/out/concepts/OverriddenLogic__.js +12 -26
  205. package/out/concepts/OverriddenLogic__.js.map +1 -1
  206. package/out/concepts/ParamWithGroup__.js +2 -6
  207. package/out/concepts/ParamWithGroup__.js.map +1 -1
  208. package/out/concepts/Param__.d.ts +1 -1
  209. package/out/concepts/Param__.js +2 -14
  210. package/out/concepts/Param__.js.map +1 -1
  211. package/out/concepts/Point__.js +2 -6
  212. package/out/concepts/Point__.js.map +1 -1
  213. package/out/concepts/ProcessBindV2__.js +2 -6
  214. package/out/concepts/ProcessBindV2__.js.map +1 -1
  215. package/out/concepts/ProcessComponent__.js +4 -12
  216. package/out/concepts/ProcessComponent__.js.map +1 -1
  217. package/out/concepts/ProcessElementV2__.js +8 -24
  218. package/out/concepts/ProcessElementV2__.js.map +1 -1
  219. package/out/concepts/ProcessElement__.js +10 -22
  220. package/out/concepts/ProcessElement__.js.map +1 -1
  221. package/out/concepts/ProcessOutcome__.js +1 -3
  222. package/out/concepts/ProcessOutcome__.js.map +1 -1
  223. package/out/concepts/ProcessOutcomes__.js +0 -1
  224. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  225. package/out/concepts/ProcessV2__.js +6 -18
  226. package/out/concepts/ProcessV2__.js.map +1 -1
  227. package/out/concepts/Process__.js +3 -9
  228. package/out/concepts/Process__.js.map +1 -1
  229. package/out/concepts/PropDeclaration__.d.ts +4 -0
  230. package/out/concepts/PropDeclaration__.js +19 -84
  231. package/out/concepts/PropDeclaration__.js.map +1 -1
  232. package/out/concepts/QueryAggregateExpression__.js +2 -6
  233. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  234. package/out/concepts/QueryFieldExpression__.js +4 -12
  235. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  236. package/out/concepts/QueryFromExpression__.js +3 -9
  237. package/out/concepts/QueryFromExpression__.js.map +1 -1
  238. package/out/concepts/QueryJoinExpression__.js +4 -12
  239. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  240. package/out/concepts/QueryLimitExpression__.js +12 -4
  241. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  242. package/out/concepts/QueryOrderByExpression__.js +6 -2
  243. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  244. package/out/concepts/QuerySelectExpression__.js +5 -7
  245. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  246. package/out/concepts/Rect__.js +4 -12
  247. package/out/concepts/Rect__.js.map +1 -1
  248. package/out/concepts/Return__.d.ts +1 -1
  249. package/out/concepts/Return__.js +2 -10
  250. package/out/concepts/Return__.js.map +1 -1
  251. package/out/concepts/Role__.d.ts +4 -4
  252. package/out/concepts/Role__.js +6 -14
  253. package/out/concepts/Role__.js.map +1 -1
  254. package/out/concepts/SelectMembers__.js +1 -3
  255. package/out/concepts/SelectMembers__.js.map +1 -1
  256. package/out/concepts/SetterOption__.js +6 -34
  257. package/out/concepts/SetterOption__.js.map +1 -1
  258. package/out/concepts/SlotDeclaration__.js +5 -23
  259. package/out/concepts/SlotDeclaration__.js.map +1 -1
  260. package/out/concepts/SqlQueryComponent__.js +4 -12
  261. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  262. package/out/concepts/StaticString__.d.ts +1 -1
  263. package/out/concepts/StaticString__.js +6 -10
  264. package/out/concepts/StaticString__.js.map +1 -1
  265. package/out/concepts/StringLiteral__.d.ts +1 -1
  266. package/out/concepts/StringLiteral__.js +2 -6
  267. package/out/concepts/StringLiteral__.js.map +1 -1
  268. package/out/concepts/StructureProperty__.d.ts +5 -5
  269. package/out/concepts/StructureProperty__.js +5 -13
  270. package/out/concepts/StructureProperty__.js.map +1 -1
  271. package/out/concepts/Structure__.d.ts +0 -4
  272. package/out/concepts/Structure__.js +9 -18
  273. package/out/concepts/Structure__.js.map +1 -1
  274. package/out/concepts/SwitchCase__.d.ts +1 -1
  275. package/out/concepts/SwitchCase__.js.map +1 -1
  276. package/out/concepts/SwitchStatement__.js.map +1 -1
  277. package/out/concepts/ThemeVariable__.js +1 -3
  278. package/out/concepts/ThemeVariable__.js.map +1 -1
  279. package/out/concepts/Theme__.js +2 -6
  280. package/out/concepts/Theme__.js.map +1 -1
  281. package/out/concepts/Transactional__.d.ts +2 -2
  282. package/out/concepts/Transactional__.js +6 -12
  283. package/out/concepts/Transactional__.js.map +1 -1
  284. package/out/concepts/TriggerEvent__.js +1 -3
  285. package/out/concepts/TriggerEvent__.js.map +1 -1
  286. package/out/concepts/TriggerLauncher__.js +3 -9
  287. package/out/concepts/TriggerLauncher__.js.map +1 -1
  288. package/out/concepts/TypeAnnotation__.d.ts +2 -2
  289. package/out/concepts/TypeAnnotation__.js +24 -31
  290. package/out/concepts/TypeAnnotation__.js.map +1 -1
  291. package/out/concepts/TypeParam__.js +1 -3
  292. package/out/concepts/TypeParam__.js.map +1 -1
  293. package/out/concepts/UnaryExpression__.js +1 -3
  294. package/out/concepts/UnaryExpression__.js.map +1 -1
  295. package/out/concepts/Unparsed__.js +1 -3
  296. package/out/concepts/Unparsed__.js.map +1 -1
  297. package/out/concepts/UseComponent__.js +2 -6
  298. package/out/concepts/UseComponent__.js.map +1 -1
  299. package/out/concepts/ValidationRule__.js +3 -17
  300. package/out/concepts/ValidationRule__.js.map +1 -1
  301. package/out/concepts/Variable__.d.ts +1 -1
  302. package/out/concepts/Variable__.js +2 -10
  303. package/out/concepts/Variable__.js.map +1 -1
  304. package/out/concepts/ViewBlockWithImage__.js +2 -6
  305. package/out/concepts/ViewBlockWithImage__.js.map +1 -1
  306. package/out/concepts/ViewBlock__.js +3 -13
  307. package/out/concepts/ViewBlock__.js.map +1 -1
  308. package/out/concepts/ViewComponentDeclaration__.d.ts +1 -1
  309. package/out/concepts/ViewComponentDeclaration__.js +8 -36
  310. package/out/concepts/ViewComponentDeclaration__.js.map +1 -1
  311. package/out/concepts/ViewElement__.js +82 -72
  312. package/out/concepts/ViewElement__.js.map +1 -1
  313. package/out/concepts/View__.js +22 -40
  314. package/out/concepts/View__.js.map +1 -1
  315. package/out/generator/genBundleFiles.js +1 -0
  316. package/out/generator/genBundleFiles.js.map +1 -1
  317. package/out/generator/release-body/utils.js +2 -1
  318. package/out/generator/release-body/utils.js.map +1 -1
  319. package/out/natural/genNaturalTS.js +1 -0
  320. package/out/natural/genNaturalTS.js.map +1 -1
  321. package/out/server/naslServer.js +24 -10
  322. package/out/server/naslServer.js.map +1 -1
  323. package/out/server/translator.js +54 -0
  324. package/out/server/translator.js.map +1 -1
  325. package/out/utils/env.d.ts +2 -0
  326. package/out/utils/env.js +3 -1
  327. package/out/utils/env.js.map +1 -1
  328. package/package.json +1 -1
  329. package/src/common/BaseNode.ts +3 -1
  330. package/src/concepts/AnonymousFunction__.ts +1 -1
  331. package/src/concepts/App__.ts +9 -27
  332. package/src/concepts/Argument__.ts +3 -7
  333. package/src/concepts/AssigneeV2__.ts +0 -2
  334. package/src/concepts/Assignee__.ts +0 -2
  335. package/src/concepts/AssignmentLine__.ts +0 -2
  336. package/src/concepts/Assignment__.ts +2 -4
  337. package/src/concepts/Attribute__.ts +9 -21
  338. package/src/concepts/AuthInterface__.ts +1 -3
  339. package/src/concepts/AuthLogicForCallInterface__.ts +4 -5
  340. package/src/concepts/AuthLogic__.ts +1 -3
  341. package/src/concepts/BackendVariable__.ts +5 -11
  342. package/src/concepts/Backend__.ts +1 -3
  343. package/src/concepts/BatchAssignment__.ts +4 -4
  344. package/src/concepts/BinaryExpression__.ts +9 -7
  345. package/src/concepts/BindAttribute__.ts +26 -38
  346. package/src/concepts/BindDirective__.ts +13 -27
  347. package/src/concepts/BindEvent__.ts +7 -13
  348. package/src/concepts/BindStyle__.ts +1 -3
  349. package/src/concepts/BooleanLiteral__.ts +1 -3
  350. package/src/concepts/BusinessComponent__.ts +16 -20
  351. package/src/concepts/BusinessLogic__.ts +7 -10
  352. package/src/concepts/CallConnector__.ts +3 -7
  353. package/src/concepts/CallEvent__.ts +2 -6
  354. package/src/concepts/CallFunction__.ts +6 -13
  355. package/src/concepts/CallInterface__.ts +8 -15
  356. package/src/concepts/CallLogic__.ts +37 -44
  357. package/src/concepts/CallQueryComponent__.ts +9 -22
  358. package/src/concepts/Comment__.ts +1 -3
  359. package/src/concepts/CompletionProperty__.ts +5 -15
  360. package/src/concepts/ConfigGroup__.ts +2 -7
  361. package/src/concepts/ConfigPropertyValue__.ts +3 -15
  362. package/src/concepts/ConfigProperty__.ts +3 -9
  363. package/src/concepts/Configuration__.ts +1 -4
  364. package/src/concepts/Connection__.ts +3 -9
  365. package/src/concepts/ConnectorLogic__.ts +2 -4
  366. package/src/concepts/ConnectorTriggerLauncher__.ts +13 -11
  367. package/src/concepts/ConnectorTrigger__.ts +12 -12
  368. package/src/concepts/Connector__.ts +3 -9
  369. package/src/concepts/Constant__.ts +2 -6
  370. package/src/concepts/CountersignPolicyV2__.ts +1 -3
  371. package/src/concepts/CountersignPolicy__.ts +1 -3
  372. package/src/concepts/DataSource__.ts +16 -18
  373. package/src/concepts/DatabaseTypeAnnotation__.ts +6 -11
  374. package/src/concepts/Destination__.ts +3 -9
  375. package/src/concepts/EntityIndex__.ts +6 -15
  376. package/src/concepts/EntityProperty__.ts +35 -56
  377. package/src/concepts/Entity__.ts +7 -17
  378. package/src/concepts/EnumItem__.ts +7 -9
  379. package/src/concepts/Enum__.ts +3 -9
  380. package/src/concepts/EventDeclaration__.ts +5 -13
  381. package/src/concepts/Event__.ts +5 -15
  382. package/src/concepts/ExternalDestination__.ts +2 -4
  383. package/src/concepts/FieldPermissionV2__.ts +2 -6
  384. package/src/concepts/FlowConditionV2__.ts +1 -3
  385. package/src/concepts/ForEachStatement__.ts +1 -1
  386. package/src/concepts/FrontendLibrary__.ts +2 -6
  387. package/src/concepts/FrontendType__.ts +2 -14
  388. package/src/concepts/FrontendVariable__.ts +1 -3
  389. package/src/concepts/Frontend__.ts +11 -35
  390. package/src/concepts/Function__.ts +2 -6
  391. package/src/concepts/HistoryProcessV2__.ts +4 -12
  392. package/src/concepts/I18nInfo__.ts +8 -15
  393. package/src/concepts/IconSetter__.ts +2 -4
  394. package/src/concepts/Identifier__.ts +9 -10
  395. package/src/concepts/ImportedInterface__.ts +2 -4
  396. package/src/concepts/InputSetter__.ts +2 -4
  397. package/src/concepts/Integration__.ts +0 -1
  398. package/src/concepts/InterfaceParam__.ts +4 -12
  399. package/src/concepts/InterfaceTriggerEvent__.ts +1 -1
  400. package/src/concepts/Interface__.ts +10 -21
  401. package/src/concepts/JSBlock__.ts +1 -3
  402. package/src/concepts/JavaLogic__.ts +3 -9
  403. package/src/concepts/LogicDeclaration__.ts +4 -10
  404. package/src/concepts/LogicItem__.ts +9 -19
  405. package/src/concepts/Logic__.ts +43 -47
  406. package/src/concepts/MatchCase__.ts +12 -12
  407. package/src/concepts/Match__.ts +11 -8
  408. package/src/concepts/MemberExpression__.ts +8 -2
  409. package/src/concepts/MetadataType__.ts +9 -16
  410. package/src/concepts/MicroApp__.ts +7 -21
  411. package/src/concepts/Module__.ts +10 -26
  412. package/src/concepts/Namespace__.ts +4 -12
  413. package/src/concepts/NewComposite__.ts +18 -16
  414. package/src/concepts/NewList__.ts +1 -1
  415. package/src/concepts/NewMap__.ts +15 -6
  416. package/src/concepts/NumberInputSetter__.ts +10 -20
  417. package/src/concepts/NumericLiteral__.ts +1 -3
  418. package/src/concepts/OperatePermissionV2__.ts +4 -12
  419. package/src/concepts/OqlQueryComponent__.ts +3 -7
  420. package/src/concepts/OverriddenLogic__.ts +15 -25
  421. package/src/concepts/ParamWithGroup__.ts +2 -6
  422. package/src/concepts/Param__.ts +5 -9
  423. package/src/concepts/Point__.ts +2 -6
  424. package/src/concepts/ProcessBindV2__.ts +2 -6
  425. package/src/concepts/ProcessComponent__.ts +4 -12
  426. package/src/concepts/ProcessElementV2__.ts +11 -27
  427. package/src/concepts/ProcessElement__.ts +13 -23
  428. package/src/concepts/ProcessOutcome__.ts +1 -3
  429. package/src/concepts/ProcessOutcomes__.ts +0 -1
  430. package/src/concepts/ProcessV2__.ts +11 -19
  431. package/src/concepts/Process__.ts +3 -9
  432. package/src/concepts/PropDeclaration__.ts +31 -57
  433. package/src/concepts/QueryAggregateExpression__.ts +3 -8
  434. package/src/concepts/QueryFieldExpression__.ts +23 -30
  435. package/src/concepts/QueryFromExpression__.ts +3 -9
  436. package/src/concepts/QueryJoinExpression__.ts +5 -14
  437. package/src/concepts/QueryLimitExpression__.ts +16 -4
  438. package/src/concepts/QueryOrderByExpression__.ts +22 -13
  439. package/src/concepts/QuerySelectExpression__.ts +8 -13
  440. package/src/concepts/Rect__.ts +4 -12
  441. package/src/concepts/Return__.ts +4 -8
  442. package/src/concepts/Role__.ts +8 -16
  443. package/src/concepts/SelectMembers__.ts +1 -3
  444. package/src/concepts/SetterOption__.ts +10 -22
  445. package/src/concepts/SlotDeclaration__.ts +7 -17
  446. package/src/concepts/SqlQueryComponent__.ts +5 -13
  447. package/src/concepts/StaticString__.ts +9 -16
  448. package/src/concepts/StringLiteral__.ts +5 -11
  449. package/src/concepts/StructureProperty__.ts +10 -18
  450. package/src/concepts/Structure__.ts +10 -18
  451. package/src/concepts/SwitchCase__.ts +1 -1
  452. package/src/concepts/SwitchStatement__.ts +1 -1
  453. package/src/concepts/ThemeVariable__.ts +1 -3
  454. package/src/concepts/Theme__.ts +2 -6
  455. package/src/concepts/Transactional__.ts +10 -19
  456. package/src/concepts/TriggerEvent__.ts +1 -3
  457. package/src/concepts/TriggerLauncher__.ts +11 -15
  458. package/src/concepts/TypeAnnotation__.ts +50 -41
  459. package/src/concepts/TypeParam__.ts +1 -3
  460. package/src/concepts/UnaryExpression__.ts +1 -3
  461. package/src/concepts/Unparsed__.ts +1 -3
  462. package/src/concepts/UseComponent__.ts +2 -6
  463. package/src/concepts/ValidationRule__.ts +5 -11
  464. package/src/concepts/Variable__.ts +4 -8
  465. package/src/concepts/ViewBlockWithImage__.ts +2 -6
  466. package/src/concepts/ViewBlock__.ts +4 -10
  467. package/src/concepts/ViewComponentDeclaration__.ts +11 -27
  468. package/src/concepts/ViewElement__.ts +219 -146
  469. package/src/concepts/View__.ts +40 -54
  470. package/src/generator/genBundleFiles.ts +2 -1
  471. package/src/generator/release-body/utils.ts +2 -1
  472. package/src/natural/genNaturalTS.ts +1 -0
  473. package/src/server/naslServer.ts +24 -10
  474. package/src/server/translator.ts +56 -0
  475. package/src/utils/env.ts +2 -0
@@ -34,7 +34,22 @@ export interface ParseContext {
34
34
  /**
35
35
  * 自闭合标签
36
36
  */
37
- const selfClosingTag = ['base', 'meta', 'area', 'embed', 'link', 'img', 'input', 'param', 'hr', 'br', 'source', 'track', 'wbr', 'col'];
37
+ const selfClosingTag = [
38
+ 'base',
39
+ 'meta',
40
+ 'area',
41
+ 'embed',
42
+ 'link',
43
+ 'img',
44
+ 'input',
45
+ 'param',
46
+ 'hr',
47
+ 'br',
48
+ 'source',
49
+ 'track',
50
+ 'wbr',
51
+ 'col',
52
+ ];
38
53
 
39
54
  function genArgumentMemberExpression(arr: string[]) {
40
55
  let expressionNode: any;
@@ -70,7 +85,11 @@ export interface ElementToVueOptions {
70
85
  aslIdAttr?: string | boolean;
71
86
  nodePathAttr?: string | boolean;
72
87
  getExtraParts?: (element?: ViewElement) => Array<string>;
73
- attrFormat?: (attr: BindAttribute | BindEvent | BindDirective, element?: ViewElement, defaultResult?: string) => string | false;
88
+ attrFormat?: (
89
+ attr: BindAttribute | BindEvent | BindDirective,
90
+ element?: ViewElement,
91
+ defaultResult?: string,
92
+ ) => string | false;
74
93
  bindStylesFormat?: (bindStyles: BindStyle[], element?: ViewElement, defaultResult?: string) => string | false;
75
94
  finalCode?: boolean;
76
95
  currentList?: string[];
@@ -98,7 +117,9 @@ function transAstNodeToNaslNode(astNode: any, namespace?: string): any {
98
117
  expression: transAstNodeToNaslNode(Object.assign({}, argument)),
99
118
  }))
100
119
  .filter((item: any) => item.expression),
101
- typeArguments: astNode.arguments.map((argument: any) => transAstNodeToNaslTypeNode(Object.assign({}, argument))).filter((item: any) => item),
120
+ typeArguments: astNode.arguments
121
+ .map((argument: any) => transAstNodeToNaslTypeNode(Object.assign({}, argument)))
122
+ .filter((item: any) => item),
102
123
  };
103
124
  } else if (astNode.type === 'MemberExpression') {
104
125
  if (astNode.object?.name === '$global') {
@@ -226,7 +247,7 @@ function transAstNodeToNaslNode(astNode: any, namespace?: string): any {
226
247
  ...tempNode,
227
248
  },
228
249
  undefined,
229
- 'logics'
250
+ 'logics',
230
251
  );
231
252
  } else if (astNode.type === 'LogicalExpression' || astNode.type === 'BinaryExpression') {
232
253
  node = {
@@ -261,7 +282,9 @@ function transAstNodeToNaslTypeNode(astNode: any, namespace?: string): any {
261
282
 
262
283
  function isLockField(node?: any): boolean {
263
284
  if (!node || node.concept !== 'ViewElement') return false;
264
- const attr = node?.bindAttrs?.find((attr: any) => ['FormDesignerLocked', 'TableDesignerLocked'].includes(attr.name))?.value;
285
+ const attr = node?.bindAttrs?.find((attr: any) =>
286
+ ['FormDesignerLocked', 'TableDesignerLocked'].includes(attr.name),
287
+ )?.value;
265
288
  if (attr === undefined) return !!isLockField(node?.parentNode);
266
289
  else return !!attr;
267
290
  }
@@ -310,58 +333,44 @@ export class ViewElement extends BaseNode {
310
333
  /**
311
334
  * 元素标签
312
335
  */
313
- @property({
314
- objectRef: '',
315
- })
336
+ @property()
316
337
  tag: string;
317
338
 
318
339
  /**
319
340
  * 页面元素名称
320
341
  */
321
- @property({
322
- objectRef: '',
323
- })
342
+ @property()
324
343
  name: string = '';
325
344
 
326
345
  /**
327
346
  * 静态 class 名
328
347
  */
329
- @property({
330
- objectRef: '',
331
- })
332
- staticClass?: string = null;
348
+ @property()
349
+ staticClass?: string;
333
350
 
334
351
  /**
335
352
  * 静态 style
336
353
  */
337
- @property({
338
- objectRef: '',
339
- })
340
- staticStyle?: string = null;
354
+ @property()
355
+ staticStyle?: string;
341
356
 
342
357
  /**
343
358
  * 权限资源描述
344
359
  */
345
- @property({
346
- objectRef: '',
347
- })
348
- authDescription?: string = null;
360
+ @property()
361
+ authDescription?: string;
349
362
 
350
363
  /**
351
364
  * 插槽目标
352
365
  */
353
- @property({
354
- objectRef: '',
355
- })
356
- slotTarget?: string = null;
366
+ @property()
367
+ slotTarget?: string;
357
368
 
358
369
  /**
359
370
  * 插槽 scope 表达式
360
371
  */
361
- @property({
362
- objectRef: '',
363
- })
364
- slotScope?: string = null;
372
+ @property()
373
+ slotScope?: string;
365
374
 
366
375
  /**
367
376
  * 元素绑定属性列表
@@ -397,7 +406,6 @@ export class ViewElement extends BaseNode {
397
406
  * 绑定的角色
398
407
  */
399
408
  @property({
400
- objectRef: '',
401
409
  isArray: true,
402
410
  defaultValue: [],
403
411
  })
@@ -471,7 +479,9 @@ export class ViewElement extends BaseNode {
471
479
 
472
480
  getBindAttributeExistingNames(excludedList: Array<BindAttribute> = []) {
473
481
  const excludedSet = new Set(excludedList);
474
- return ((this.bindAttrs as BindAttribute[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
482
+ return ((this.bindAttrs as BindAttribute[]) || [])
483
+ .filter((item) => !excludedSet.has(item))
484
+ .map((item) => item.name);
475
485
  }
476
486
  getBindAttributeUniqueName(name = 'bindAttribute1') {
477
487
  return utils.unique(name, this.getBindAttributeExistingNames(), undefined, false);
@@ -510,7 +520,7 @@ export class ViewElement extends BaseNode {
510
520
  name: this.getBindAttributeUniqueName(),
511
521
  },
512
522
  this,
513
- 'bindAttrs'
523
+ 'bindAttrs',
514
524
  );
515
525
  } else if (typeof options === 'string') {
516
526
  bindAttribute = BindAttribute.from(
@@ -519,7 +529,7 @@ export class ViewElement extends BaseNode {
519
529
  name: options,
520
530
  },
521
531
  this,
522
- 'bindAttrs'
532
+ 'bindAttrs',
523
533
  );
524
534
  } else if (asserts.isBindAttribute(options)) {
525
535
  options.ensureDelete(); // 同一实例不支持多处存在
@@ -532,7 +542,7 @@ export class ViewElement extends BaseNode {
532
542
  ...options,
533
543
  },
534
544
  this,
535
- 'bindAttrs'
545
+ 'bindAttrs',
536
546
  );
537
547
  }
538
548
  this.bindAttrs.splice(index, 0, bindAttribute);
@@ -664,7 +674,7 @@ export class ViewElement extends BaseNode {
664
674
  name: this.getBindEventUniqueName(),
665
675
  },
666
676
  this,
667
- 'bindEvents'
677
+ 'bindEvents',
668
678
  );
669
679
  } else if (typeof options === 'string') {
670
680
  bindEvent = BindEvent.from(
@@ -673,7 +683,7 @@ export class ViewElement extends BaseNode {
673
683
  name: options,
674
684
  },
675
685
  this,
676
- 'bindEvents'
686
+ 'bindEvents',
677
687
  );
678
688
  } else if (asserts.isBindEvent(options)) {
679
689
  options.ensureDelete(); // 同一实例不支持多处存在
@@ -686,7 +696,7 @@ export class ViewElement extends BaseNode {
686
696
  ...options,
687
697
  },
688
698
  this,
689
- 'bindEvents'
699
+ 'bindEvents',
690
700
  );
691
701
  }
692
702
  this.bindEvents.splice(index, 0, bindEvent);
@@ -779,7 +789,9 @@ export class ViewElement extends BaseNode {
779
789
 
780
790
  getBindDirectiveExistingNames(excludedList: Array<BindDirective> = []) {
781
791
  const excludedSet = new Set(excludedList);
782
- return ((this.bindDirectives as BindDirective[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
792
+ return ((this.bindDirectives as BindDirective[]) || [])
793
+ .filter((item) => !excludedSet.has(item))
794
+ .map((item) => item.name);
783
795
  }
784
796
  getBindDirectiveUniqueName(name = 'bindDirective1') {
785
797
  return utils.unique(name, this.getBindDirectiveExistingNames(), undefined, false);
@@ -818,7 +830,7 @@ export class ViewElement extends BaseNode {
818
830
  name: this.getBindDirectiveUniqueName(),
819
831
  },
820
832
  this,
821
- 'bindDirectives'
833
+ 'bindDirectives',
822
834
  );
823
835
  } else if (typeof options === 'string') {
824
836
  bindDirective = BindDirective.from(
@@ -827,7 +839,7 @@ export class ViewElement extends BaseNode {
827
839
  name: options,
828
840
  },
829
841
  this,
830
- 'bindDirectives'
842
+ 'bindDirectives',
831
843
  );
832
844
  } else if (asserts.isBindDirective(options)) {
833
845
  options.ensureDelete(); // 同一实例不支持多处存在
@@ -840,7 +852,7 @@ export class ViewElement extends BaseNode {
840
852
  ...options,
841
853
  },
842
854
  this,
843
- 'bindDirectives'
855
+ 'bindDirectives',
844
856
  );
845
857
  }
846
858
  this.bindDirectives.splice(index, 0, bindDirective);
@@ -972,7 +984,7 @@ export class ViewElement extends BaseNode {
972
984
  name: this.getBindStyleUniqueName(),
973
985
  },
974
986
  this,
975
- 'bindStyles'
987
+ 'bindStyles',
976
988
  );
977
989
  } else if (typeof options === 'string') {
978
990
  bindStyle = BindStyle.from(
@@ -981,7 +993,7 @@ export class ViewElement extends BaseNode {
981
993
  name: options,
982
994
  },
983
995
  this,
984
- 'bindStyles'
996
+ 'bindStyles',
985
997
  );
986
998
  } else if (asserts.isBindStyle(options)) {
987
999
  options.ensureDelete(); // 同一实例不支持多处存在
@@ -994,7 +1006,7 @@ export class ViewElement extends BaseNode {
994
1006
  ...options,
995
1007
  },
996
1008
  this,
997
- 'bindStyles'
1009
+ 'bindStyles',
998
1010
  );
999
1011
  }
1000
1012
  this.bindStyles.splice(index, 0, bindStyle);
@@ -1118,7 +1130,7 @@ export class ViewElement extends BaseNode {
1118
1130
  name: this.getViewElementUniqueName(),
1119
1131
  },
1120
1132
  this,
1121
- 'children'
1133
+ 'children',
1122
1134
  );
1123
1135
  } else if (typeof options === 'string') {
1124
1136
  viewElement = ViewElement.from(
@@ -1127,7 +1139,7 @@ export class ViewElement extends BaseNode {
1127
1139
  name: options,
1128
1140
  },
1129
1141
  this,
1130
- 'children'
1142
+ 'children',
1131
1143
  );
1132
1144
  } else if (asserts.isViewElement(options)) {
1133
1145
  options.ensureDelete(); // 同一实例不支持多处存在
@@ -1140,7 +1152,7 @@ export class ViewElement extends BaseNode {
1140
1152
  ...options,
1141
1153
  },
1142
1154
  this,
1143
- 'children'
1155
+ 'children',
1144
1156
  );
1145
1157
  }
1146
1158
  this.children.splice(index, 0, viewElement);
@@ -1387,7 +1399,9 @@ export class ViewElement extends BaseNode {
1387
1399
  get parentAuth() {
1388
1400
  const _nameSpace = this.view.getNamespace();
1389
1401
  const mainViewName = _nameSpace.split('.')[2];
1390
- return this.view.parentNode.concept === 'App' ? this.view.auth : this.frontend.views.find((item) => item.name === mainViewName)?.auth;
1402
+ return this.view.parentNode.concept === 'App'
1403
+ ? this.view.auth
1404
+ : this.frontend.views.find((item) => item.name === mainViewName)?.auth;
1391
1405
  }
1392
1406
 
1393
1407
  // IDE内展示需要屏蔽掉“系统统一路径前缀”
@@ -1605,7 +1619,9 @@ export class ViewElement extends BaseNode {
1605
1619
 
1606
1620
  return t;
1607
1621
  };
1608
- const hasDataSource = config?.allNodesAPI?.[self.tag]?.props?.findIndex((prop) => ['dataSource', 'data-source'].includes(prop.name)) > -1;
1622
+ const hasDataSource =
1623
+ config?.allNodesAPI?.[self.tag]?.props?.findIndex((prop) => ['dataSource', 'data-source'].includes(prop.name)) >
1624
+ -1;
1609
1625
  // 有数据源属性的组件 才需要生成 item
1610
1626
  if (hasDataSource && T) {
1611
1627
  const key = T1 ? '__columnItem' : '__item';
@@ -1629,9 +1645,9 @@ export class ViewElement extends BaseNode {
1629
1645
  inElementsRefTree: true,
1630
1646
  }
1631
1647
  : {
1632
- // 业务组件需要特殊处理
1633
- inElementsRefTree: true,
1634
- },
1648
+ // 业务组件需要特殊处理
1649
+ inElementsRefTree: true,
1650
+ },
1635
1651
  ),
1636
1652
  );
1637
1653
 
@@ -1739,7 +1755,11 @@ export class ViewElement extends BaseNode {
1739
1755
  code += indent((state?.tabSize || 0) + 4);
1740
1756
  code += `children: {\n`;
1741
1757
  yield* wrapForEach(self.children, function* warpForEachGenerator(element) {
1742
- code += yield* element.toEmbeddedTSRefTree(shiftState({ ...state, tabSize: state.tabSize + 2 }, code), { elementsPathMap }, levelIndex);
1758
+ code += yield* element.toEmbeddedTSRefTree(
1759
+ shiftState({ ...state, tabSize: state.tabSize + 2 }, code),
1760
+ { elementsPathMap },
1761
+ levelIndex,
1762
+ );
1743
1763
  });
1744
1764
  code += indent((state?.tabSize || 0) + 4);
1745
1765
  code += `},\n`;
@@ -1796,14 +1816,20 @@ export class ViewElement extends BaseNode {
1796
1816
  if (attr && attr.expression) {
1797
1817
  const datasourceName = `datasourceName${element.name}`;
1798
1818
  (element as any).__tsDataSourceTypeName = datasourceName;
1799
- if (asserts.isMemberExpression(attr.expression) || asserts.isIdentifier(attr.expression) || asserts.isCallLogic(attr.expression)) {
1819
+ if (
1820
+ asserts.isMemberExpression(attr.expression) ||
1821
+ asserts.isIdentifier(attr.expression) ||
1822
+ asserts.isCallLogic(attr.expression)
1823
+ ) {
1800
1824
  const extraParams = {
1801
1825
  tabSize: 4,
1802
1826
  inline: true,
1803
1827
  noNeedParams: true,
1804
1828
  callLogicNoIife: true,
1805
1829
  };
1806
- const value = yield* attr.expression.toEmbeddedTS(shiftState(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
1830
+ const value = yield* attr.expression.toEmbeddedTS(
1831
+ shiftState(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}),
1832
+ );
1807
1833
  code += `type ${datasourceName} = `;
1808
1834
  code += `nasl.ui.GetItemTypeFromDataSource<typeof ${value}>;\n`;
1809
1835
  } else {
@@ -1867,7 +1893,7 @@ export class ViewElement extends BaseNode {
1867
1893
  },
1868
1894
  {
1869
1895
  node: this,
1870
- }
1896
+ },
1871
1897
  );
1872
1898
  return excludedSet;
1873
1899
  }
@@ -1887,7 +1913,9 @@ export class ViewElement extends BaseNode {
1887
1913
  };
1888
1914
  // 过滤模板的登录中的一些翻译,这里只过滤h5表格中的两个列
1889
1915
  if (
1890
- (parentNode.concept === 'ViewElement' && (parentNode as any).tag && this.toHump((parentNode as any).tag) === 'lcapLogin') ||
1916
+ (parentNode.concept === 'ViewElement' &&
1917
+ (parentNode as any).tag &&
1918
+ this.toHump((parentNode as any).tag) === 'lcapLogin') ||
1891
1919
  staticClass === 'login-cell'
1892
1920
  ) {
1893
1921
  return '';
@@ -1902,7 +1930,7 @@ export class ViewElement extends BaseNode {
1902
1930
  code += yield* event.toEmbeddedTS(
1903
1931
  shiftState(state, code, {
1904
1932
  tabSize: (state?.tabSize || 0) + 2,
1905
- })
1933
+ }),
1906
1934
  );
1907
1935
  code += '\n';
1908
1936
  });
@@ -1921,7 +1949,7 @@ export class ViewElement extends BaseNode {
1921
1949
  shiftState(state, code, {
1922
1950
  tabSize: state?.tabSize || 0,
1923
1951
  }),
1924
- levelIndex
1952
+ levelIndex,
1925
1953
  );
1926
1954
  });
1927
1955
  return code;
@@ -1966,7 +1994,7 @@ export class ViewElement extends BaseNode {
1966
1994
  code += yield* event.toEmbeddedTS(
1967
1995
  shiftState(state, code, {
1968
1996
  tabSize: (state?.tabSize || 0) + 2,
1969
- })
1997
+ }),
1970
1998
  );
1971
1999
  code += '\n';
1972
2000
  });
@@ -2046,24 +2074,24 @@ export class ViewElement extends BaseNode {
2046
2074
  // 先把插槽翻译了
2047
2075
  yield* wrapForEach(children, function* warpForEachGenerator(element) {
2048
2076
  if (element.tag === 'template' && element.slotTarget && element.slotTarget !== 'default') {
2049
- const hasScope = element.haveScope();
2050
- const slotTarget = `slot${element.toFirstUpper(element.toHump(element.slotTarget))}`;
2051
- if (hasScope) {
2052
- code += `${slotTarget}: (current${levelIndex === 0 ? '' : levelIndex}) => [\n`;
2053
- } else {
2054
- code += `${slotTarget}: () => [\n`;
2055
- }
2056
- const levelIndexDelta = Number(hasScope);
2057
- yield* wrapForEach(element.children, function* warpForEachGenerator(e) {
2058
- code += yield* e.toEmbeddedTS(
2059
- shiftState(state, code, {
2060
- tabSize: state?.tabSize || 0,
2061
- }),
2062
- levelIndex + levelIndexDelta
2063
- );
2064
- });
2065
- code += indent((state?.tabSize || 0) + 2);
2066
- code += '\n],\n';
2077
+ const hasScope = element.haveScope();
2078
+ const slotTarget = `slot${element.toFirstUpper(element.toHump(element.slotTarget))}`;
2079
+ if (hasScope) {
2080
+ code += `${slotTarget}: (current${levelIndex === 0 ? '' : levelIndex}) => [\n`;
2081
+ } else {
2082
+ code += `${slotTarget}: () => [\n`;
2083
+ }
2084
+ const levelIndexDelta = Number(hasScope);
2085
+ yield* wrapForEach(element.children, function* warpForEachGenerator(e) {
2086
+ code += yield* e.toEmbeddedTS(
2087
+ shiftState(state, code, {
2088
+ tabSize: state?.tabSize || 0,
2089
+ }),
2090
+ levelIndex + levelIndexDelta,
2091
+ );
2092
+ });
2093
+ code += indent((state?.tabSize || 0) + 2);
2094
+ code += '\n],\n';
2067
2095
  } else {
2068
2096
  defaultArr.push(element);
2069
2097
  }
@@ -2071,8 +2099,8 @@ export class ViewElement extends BaseNode {
2071
2099
  // 翻译其余的子元素
2072
2100
  if (defaultArr.length) {
2073
2101
  code += indent((state?.tabSize || 0) + 2);
2074
- const hasScope = defaultArr.some(x=>x.haveScope());
2075
- const param = hasScope ? `current${levelIndex === 0 ? '' : levelIndex}` : "";
2102
+ const hasScope = defaultArr.some((x) => x.haveScope());
2103
+ const param = hasScope ? `current${levelIndex === 0 ? '' : levelIndex}` : '';
2076
2104
  const levelIndexDelta = Number(hasScope);
2077
2105
  code += `slotDefault: (${param}) => [\n`;
2078
2106
  yield* wrapForEach(defaultArr, function* warpForEachGenerator(element) {
@@ -2080,7 +2108,7 @@ export class ViewElement extends BaseNode {
2080
2108
  shiftState(state, code, {
2081
2109
  tabSize: (state?.tabSize || 0) + 2,
2082
2110
  }),
2083
- levelIndex + levelIndexDelta
2111
+ levelIndex + levelIndexDelta,
2084
2112
  );
2085
2113
  code += '\n';
2086
2114
  });
@@ -2090,8 +2118,8 @@ export class ViewElement extends BaseNode {
2090
2118
  }
2091
2119
  } else if (children?.length) {
2092
2120
  code += indent((state?.tabSize || 0) + 2);
2093
- const hasScope = children.some(x=>x.haveScope());
2094
- const param = hasScope ? `current${levelIndex === 0 ? '' : levelIndex}` : "";
2121
+ const hasScope = children.some((x) => x.haveScope());
2122
+ const param = hasScope ? `current${levelIndex === 0 ? '' : levelIndex}` : '';
2095
2123
  const levelIndexDelta = Number(hasScope);
2096
2124
  code += `slotDefault: (${param}) => [\n`;
2097
2125
  yield* wrapForEach(children, function* warpForEachGenerator(element) {
@@ -2099,7 +2127,7 @@ export class ViewElement extends BaseNode {
2099
2127
  shiftState(state, code, {
2100
2128
  tabSize: (state?.tabSize || 0) + 2,
2101
2129
  }),
2102
- levelIndex + levelIndexDelta
2130
+ levelIndex + levelIndexDelta,
2103
2131
  );
2104
2132
  code += '\n';
2105
2133
  });
@@ -2128,7 +2156,7 @@ export class ViewElement extends BaseNode {
2128
2156
  code += attr.toNaturalTS(
2129
2157
  shiftState(state, code, {
2130
2158
  tabSize: state.tabSize + 1,
2131
- })
2159
+ }),
2132
2160
  );
2133
2161
  code += ',\n';
2134
2162
  });
@@ -2137,7 +2165,7 @@ export class ViewElement extends BaseNode {
2137
2165
  code += event.toNaturalTS(
2138
2166
  shiftState(state, code, {
2139
2167
  tabSize: state.tabSize + 1,
2140
- })
2168
+ }),
2141
2169
  );
2142
2170
  code += ',\n';
2143
2171
  });
@@ -2156,7 +2184,7 @@ export class ViewElement extends BaseNode {
2156
2184
  code += element.toNaturalTS(
2157
2185
  shiftState(state, code, {
2158
2186
  tabSize: state.tabSize + 2,
2159
- })
2187
+ }),
2160
2188
  );
2161
2189
  code += ',\n';
2162
2190
  });
@@ -2176,7 +2204,7 @@ export class ViewElement extends BaseNode {
2176
2204
  code += element.toNaturalTS(
2177
2205
  shiftState(state, code, {
2178
2206
  tabSize: state.tabSize + 2,
2179
- })
2207
+ }),
2180
2208
  );
2181
2209
  code += ',\n';
2182
2210
  });
@@ -2191,7 +2219,7 @@ export class ViewElement extends BaseNode {
2191
2219
  code += element.toNaturalTS(
2192
2220
  shiftState(state, code, {
2193
2221
  tabSize: state.tabSize + 2,
2194
- })
2222
+ }),
2195
2223
  );
2196
2224
  code += ',\n';
2197
2225
  });
@@ -2216,7 +2244,7 @@ export class ViewElement extends BaseNode {
2216
2244
  code += attr.toTextualNASL(
2217
2245
  shiftState(state, code, {
2218
2246
  tabSize: state.tabSize + 1,
2219
- })
2247
+ }),
2220
2248
  );
2221
2249
  code += ',\n';
2222
2250
  });
@@ -2225,7 +2253,7 @@ export class ViewElement extends BaseNode {
2225
2253
  code += event.toTextualNASL(
2226
2254
  shiftState(state, code, {
2227
2255
  tabSize: state.tabSize + 1,
2228
- })
2256
+ }),
2229
2257
  );
2230
2258
  code += ',\n';
2231
2259
  });
@@ -2248,7 +2276,7 @@ export class ViewElement extends BaseNode {
2248
2276
  code += element.toTextualNASL(
2249
2277
  shiftState(state, code, {
2250
2278
  tabSize: state.tabSize + 2,
2251
- })
2279
+ }),
2252
2280
  // levelIndex,
2253
2281
  );
2254
2282
  });
@@ -2278,7 +2306,7 @@ export class ViewElement extends BaseNode {
2278
2306
  code += element.toTextualNASL(
2279
2307
  shiftState(state, code, {
2280
2308
  tabSize: state.tabSize + 2,
2281
- })
2309
+ }),
2282
2310
  // levelIndex,
2283
2311
  );
2284
2312
  code += ',\n';
@@ -2337,7 +2365,7 @@ export class ViewElement extends BaseNode {
2337
2365
  }
2338
2366
  },
2339
2367
  { node: element },
2340
- { mode: 'anyObject', excludedKeySet: element.JSON_EXCLUDED_KEYS }
2368
+ { mode: 'anyObject', excludedKeySet: element.JSON_EXCLUDED_KEYS },
2341
2369
  );
2342
2370
 
2343
2371
  this.likeComponent?.existingViewElement.clear();
@@ -2359,7 +2387,7 @@ export class ViewElement extends BaseNode {
2359
2387
  (current) => {
2360
2388
  cb(current.node);
2361
2389
  },
2362
- { node: this }
2390
+ { node: this },
2363
2391
  );
2364
2392
  }
2365
2393
 
@@ -2398,7 +2426,10 @@ export class ViewElement extends BaseNode {
2398
2426
  const ast = babelParser.parseExpression(value) as any;
2399
2427
  const validationNamespace = getStdlibNamespace().findChild('validation');
2400
2428
  if (ast.type === 'CallExpression') {
2401
- calleeName = (ast.callee?.property?.name ?? ast.callee?.property?.value ?? ast.callee?.name).replace(/\(.*/, '');
2429
+ calleeName = (ast.callee?.property?.name ?? ast.callee?.property?.value ?? ast.callee?.name).replace(
2430
+ /\(.*/,
2431
+ '',
2432
+ );
2402
2433
  const func = validationNamespace.functions.find((item) => item.name === calleeName);
2403
2434
  args = ast.arguments.map((argument: any, index: number) => ({
2404
2435
  concept: 'Argument',
@@ -2430,9 +2461,18 @@ export class ViewElement extends BaseNode {
2430
2461
  // 临时处理组件的 text
2431
2462
  //h5-mock
2432
2463
  if (
2433
- ['u-text', 'van-text', 'u-link', 'u-button', 'u-label', 'u-radio', 'u-checkbox', 'u-navbar-item', 'u-sidebar-item', 'u-menu-item'].includes(
2434
- astNode.tag
2435
- ) &&
2464
+ [
2465
+ 'u-text',
2466
+ 'van-text',
2467
+ 'u-link',
2468
+ 'u-button',
2469
+ 'u-label',
2470
+ 'u-radio',
2471
+ 'u-checkbox',
2472
+ 'u-navbar-item',
2473
+ 'u-sidebar-item',
2474
+ 'u-menu-item',
2475
+ ].includes(astNode.tag) &&
2436
2476
  astNode.children.length === 1 &&
2437
2477
  astNode.children[0].type === 3
2438
2478
  ) {
@@ -2497,7 +2537,9 @@ export class ViewElement extends BaseNode {
2497
2537
  staticStyle: astNode.attrsMap.style,
2498
2538
  slotTarget: astNode.slotTarget && json5.parse(astNode.slotTarget),
2499
2539
  slotScope: astNode.slotScope === '_empty_' ? '' : astNode.slotScope,
2500
- children: astNode.children.map((item) => this._fromASTNode(item as compiler.ASTElement, newContext)) as unknown as Array<ViewElement>,
2540
+ children: astNode.children.map((item) =>
2541
+ this._fromASTNode(item as compiler.ASTElement, newContext),
2542
+ ) as unknown as Array<ViewElement>,
2501
2543
  });
2502
2544
  const attrName2Camel = (name: string) => {
2503
2545
  if (name.startsWith('vusion-')) return name;
@@ -2506,7 +2548,10 @@ export class ViewElement extends BaseNode {
2506
2548
  astNode?.attrs?.forEach((oldAttr) => {
2507
2549
  let attr: BindAttribute;
2508
2550
  // 获取原始属性
2509
- const orginAttrCode = (context?.code || '').substr((oldAttr as any).start, (oldAttr as any).end - (oldAttr as any).start);
2551
+ const orginAttrCode = (context?.code || '').substr(
2552
+ (oldAttr as any).start,
2553
+ (oldAttr as any).end - (oldAttr as any).start,
2554
+ );
2510
2555
  if (oldAttr.value === '""' && orginAttrCode.trim() === oldAttr.name) {
2511
2556
  attr = new BindAttribute({
2512
2557
  type: 'static',
@@ -2588,7 +2633,7 @@ export class ViewElement extends BaseNode {
2588
2633
  calleeName: '',
2589
2634
  arguments: args,
2590
2635
  logics: [currentLogic],
2591
- })
2636
+ }),
2592
2637
  );
2593
2638
  }
2594
2639
  });
@@ -2606,7 +2651,7 @@ export class ViewElement extends BaseNode {
2606
2651
  value: expression ? '' : directive.value,
2607
2652
  expression,
2608
2653
  sync: true,
2609
- })
2654
+ }),
2610
2655
  );
2611
2656
  }
2612
2657
  } else {
@@ -2620,7 +2665,7 @@ export class ViewElement extends BaseNode {
2620
2665
  expression,
2621
2666
  arg: directive.arg,
2622
2667
  // modifiers: directive.modifiers,
2623
- })
2668
+ }),
2624
2669
  );
2625
2670
  }
2626
2671
  });
@@ -2633,7 +2678,7 @@ export class ViewElement extends BaseNode {
2633
2678
  rawName: 'v-if',
2634
2679
  value: '',
2635
2680
  expression: <any>this._parseExpression(astNode.if),
2636
- })
2681
+ }),
2637
2682
  );
2638
2683
  }
2639
2684
  } else if (astNode.type === 2) {
@@ -2651,7 +2696,7 @@ export class ViewElement extends BaseNode {
2651
2696
  name: 'text',
2652
2697
  value: expression ? '' : value,
2653
2698
  expression,
2654
- })
2699
+ }),
2655
2700
  );
2656
2701
  } else if (astNode.type === 3) {
2657
2702
  const tagName = config.scope === 'h5' ? 'van-text' : 'u-text';
@@ -2665,7 +2710,7 @@ export class ViewElement extends BaseNode {
2665
2710
  name: 'text',
2666
2711
  type: 'string',
2667
2712
  value: astNode.text?.trim(),
2668
- })
2713
+ }),
2669
2714
  );
2670
2715
  }
2671
2716
  return element;
@@ -2711,7 +2756,10 @@ export class ViewElement extends BaseNode {
2711
2756
  finalCode: false,
2712
2757
  nodePathAttr: true,
2713
2758
  attrFormat: (attr: BindAttribute | BindEvent | BindDirective, element?: ViewElement, defaultResult?: string) => {
2714
- if (attr.concept === 'BindAttribute' && !['href', 'destination', 'externalDestination', 'download'].includes(attr.name)) {
2759
+ if (
2760
+ attr.concept === 'BindAttribute' &&
2761
+ !['href', 'destination', 'externalDestination', 'download'].includes(attr.name)
2762
+ ) {
2715
2763
  const api = config?.allNodesAPI?.[element.tag];
2716
2764
  const apiOfAttr = api && api.props && api.props.find((_attr) => _attr.name === attr.name);
2717
2765
  if (['u-form-item', 'u-validator', 'van-field'].includes(element.tag) && attr.name === 'rules') {
@@ -2744,7 +2792,10 @@ export class ViewElement extends BaseNode {
2744
2792
  ) {
2745
2793
  return `${attr.name}="{{ ${attr.expression.toUI()} }}"`;
2746
2794
  }
2747
- if ((attr as BindAttribute).type === 'dynamic' && !(element.tag === 'u-cascade-select' && attr.name === 'categories'))
2795
+ if (
2796
+ (attr as BindAttribute).type === 'dynamic' &&
2797
+ !(element.tag === 'u-cascade-select' && attr.name === 'categories')
2798
+ )
2748
2799
  return defaultResult.replace(/:?([\w-]+)(?:.*?)="([\s\S]*)"/, (m, name, value) => {
2749
2800
  try {
2750
2801
  const tempValue = json5.parse(value);
@@ -2778,11 +2829,14 @@ export class ViewElement extends BaseNode {
2778
2829
  const parts = [];
2779
2830
 
2780
2831
  const api = config?.allNodesAPI?.[el?.tag];
2781
- const emptySlot = api && api.slots && api.slots.find((slot) => slot.name === 'default' && slot['emptyBackground']);
2832
+ const emptySlot =
2833
+ api && api.slots && api.slots.find((slot) => slot.name === 'default' && slot['emptyBackground']);
2782
2834
  const hasSupport = api && api.slots && api.slots.some((slot) => slot.support);
2783
2835
  if (emptySlot || hasSupport) {
2784
2836
  // 有些限制的组件如侧边栏分组有title插槽但要限制子元素放入
2785
- const validChildren = el.children.filter((elem) => !(elem.tag === 'template' && elem.slotTarget !== 'default'));
2837
+ const validChildren = el.children.filter(
2838
+ (elem) => !(elem.tag === 'template' && elem.slotTarget !== 'default'),
2839
+ );
2786
2840
  let childEmpty = !validChildren.length;
2787
2841
  const defaultSlot = el.children.find((elem) => elem.tag === 'template' && elem.slotTarget === 'default');
2788
2842
  if (defaultSlot) {
@@ -2930,7 +2984,8 @@ export class ViewElement extends BaseNode {
2930
2984
  aslIdAttr: false,
2931
2985
  nodePathAttr: false,
2932
2986
  getExtraParts: () => [],
2933
- attrFormat: (attr: BindAttribute | BindEvent | BindDirective, element?: ViewElement, defaultResult?: string) => defaultResult,
2987
+ attrFormat: (attr: BindAttribute | BindEvent | BindDirective, element?: ViewElement, defaultResult?: string) =>
2988
+ defaultResult,
2934
2989
  bindStylesFormat: (bindStyles: BindStyle[], element?: ViewElement) => {
2935
2990
  if (bindStyles.length === 0) return false;
2936
2991
 
@@ -2943,7 +2998,7 @@ export class ViewElement extends BaseNode {
2943
2998
  options,
2944
2999
  {
2945
3000
  currentList,
2946
- }
3001
+ },
2947
3002
  );
2948
3003
  const tabString = ' '.repeat(newOptions.tabSize * newOptions.indentLevel);
2949
3004
  const insideTabString = ' '.repeat(newOptions.tabSize * (newOptions.indentLevel + 1));
@@ -2980,27 +3035,30 @@ export class ViewElement extends BaseNode {
2980
3035
  this.staticClass && parts.push(`class="${this.staticClass}"`);
2981
3036
 
2982
3037
  const vIfs: string[] = [];
2983
- [].concat(this.bindAttrs, this.bindDirectives, this.bindEvents).forEach((attr: BindAttribute | BindDirective | BindEvent) => {
2984
- let result = newOptions.attrFormat(attr, this, attr?.toVue(newOptions));
2985
- if(options?.isExport
2986
- && attr?.concept === 'BindAttribute'
2987
- && attr?.name==='src'
2988
- && /^\/assets\/(.*?)$/.test(attr?.value)
2989
- // && attr.value.includes('/assets/')
2990
- && this.app?.sysPrefixPath?.length>0
2991
- ){
2992
- result = (result as string)?.replace('/assets/',`${this.app?.sysPrefixPath}/assets/`)
2993
- }
3038
+ []
3039
+ .concat(this.bindAttrs, this.bindDirectives, this.bindEvents)
3040
+ .forEach((attr: BindAttribute | BindDirective | BindEvent) => {
3041
+ let result = newOptions.attrFormat(attr, this, attr?.toVue(newOptions));
3042
+ if (
3043
+ options?.isExport &&
3044
+ attr?.concept === 'BindAttribute' &&
3045
+ attr?.name === 'src' &&
3046
+ /^\/assets\/(.*?)$/.test(attr?.value) &&
3047
+ // && attr.value.includes('/assets/')
3048
+ this.app?.sysPrefixPath?.length > 0
3049
+ ) {
3050
+ result = (result as string)?.replace('/assets/', `${this.app?.sysPrefixPath}/assets/`);
3051
+ }
2994
3052
 
2995
- // v-auth v-if 都翻译成 v-if
2996
- if (asserts.isBindDirective(attr) && ['if', 'auth'].includes(attr.name) && result !== false) {
2997
- const expr = result.replace(/v-(if|auth)="(.*)"/, (match, p1, p2) => p2);
2998
- if (expr) vIfs.push(attr.name === 'if' ? expr : `$auth.has(${expr})`);
3053
+ // v-auth v-if 都翻译成 v-if
3054
+ if (asserts.isBindDirective(attr) && ['if', 'auth'].includes(attr.name) && result !== false) {
3055
+ const expr = result.replace(/v-(if|auth)="(.*)"/, (match, p1, p2) => p2);
3056
+ if (expr) vIfs.push(attr.name === 'if' ? expr : `$auth.has(${expr})`);
2999
3057
 
3000
- return;
3001
- }
3002
- result && parts.push(result);
3003
- });
3058
+ return;
3059
+ }
3060
+ result && parts.push(result);
3061
+ });
3004
3062
 
3005
3063
  if (vIfs.length === 2) parts.push(`v-if="(${vIfs[0]}) && (${vIfs[1]})"`);
3006
3064
  else if (vIfs.length === 1) parts.push(`v-if="${vIfs[0]}"`);
@@ -3018,7 +3076,10 @@ export class ViewElement extends BaseNode {
3018
3076
  });
3019
3077
  }
3020
3078
  // 部分组件增加 key 唯一标识,防止 vue 判断重复节点,导致渲染异常
3021
- if (this.name && ['u-table-view', 'u-list-view', 'u-grid-view', 'u-list-components', 'u-form', 'u-select'].includes(this.tag)) {
3079
+ if (
3080
+ this.name &&
3081
+ ['u-table-view', 'u-list-view', 'u-grid-view', 'u-list-components', 'u-form', 'u-select'].includes(this.tag)
3082
+ ) {
3022
3083
  this.name && parts.push(`key="${this.name}"`);
3023
3084
  }
3024
3085
  let tag = this.tag;
@@ -3066,8 +3127,8 @@ export class ViewElement extends BaseNode {
3066
3127
  color: var(--font-second-color);
3067
3128
  text-align: center;`;
3068
3129
  }
3069
- if(options?.isExport && staticStyle?.includes(`url('/assets/`) && this.app.sysPrefixPath?.length > 0 ){
3070
- staticStyle = staticStyle.replace(/url\('\/assets\/(.*?)'\)/, `url('${this.app.sysPrefixPath}/assets/$1')`)
3130
+ if (options?.isExport && staticStyle?.includes(`url('/assets/`) && this.app.sysPrefixPath?.length > 0) {
3131
+ staticStyle = staticStyle.replace(/url\('\/assets\/(.*?)'\)/, `url('${this.app.sysPrefixPath}/assets/$1')`);
3071
3132
  }
3072
3133
  staticStyle && parts.push(`style="${staticStyle}"`);
3073
3134
  if (!content.length) {
@@ -3084,7 +3145,11 @@ export class ViewElement extends BaseNode {
3084
3145
  partsLength += part.length;
3085
3146
  });
3086
3147
 
3087
- let htmlContent = `<${tag}${partsString.length ? partsString : ''}>` + content + (shouldIndent ? '\n' + tabString : '') + `</${tag}>`;
3148
+ let htmlContent =
3149
+ `<${tag}${partsString.length ? partsString : ''}>` +
3150
+ content +
3151
+ (shouldIndent ? '\n' + tabString : '') +
3152
+ `</${tag}>`;
3088
3153
  if (!content.trim() && selfClosingTag.includes(tag)) {
3089
3154
  htmlContent = `<${tag}${partsString.length ? partsString : ''} />`;
3090
3155
  }
@@ -3110,7 +3175,7 @@ export class ViewElement extends BaseNode {
3110
3175
  (current) => {
3111
3176
  if (current.node.name === name) return current.node;
3112
3177
  },
3113
- { node: this }
3178
+ { node: this },
3114
3179
  );
3115
3180
  }
3116
3181
 
@@ -3119,7 +3184,7 @@ export class ViewElement extends BaseNode {
3119
3184
  (current) => {
3120
3185
  if (current.node.tag === tag) return current.node;
3121
3186
  },
3122
- { node: this }
3187
+ { node: this },
3123
3188
  );
3124
3189
  }
3125
3190
 
@@ -3128,7 +3193,7 @@ export class ViewElement extends BaseNode {
3128
3193
  (current) => {
3129
3194
  if (current.node.bindAttrs.some((attr) => attr.name === name && attr.value === value)) return current.node;
3130
3195
  },
3131
- { node: this }
3196
+ { node: this },
3132
3197
  );
3133
3198
  }
3134
3199
  // 查找element下有没有某个类型的元素,有就返回
@@ -3178,7 +3243,7 @@ export class ViewElement extends BaseNode {
3178
3243
  ops: {
3179
3244
  beforeSetStyleCb?: (newStyleObj: Record<string, any>) => void;
3180
3245
  isUpdateConstraintRule?: boolean;
3181
- } = {}
3246
+ } = {},
3182
3247
  ) {
3183
3248
  if (!positionData) {
3184
3249
  return;
@@ -3188,8 +3253,12 @@ export class ViewElement extends BaseNode {
3188
3253
  const staticHeight = Math.round(nodeRect.height);
3189
3254
  const staticLeft = Math.round(nodeRect.left - parentRect.left - parentBorder.left);
3190
3255
  const staticTop = Math.round(nodeRect.top - parentRect.top - parentBorder.top);
3191
- const staticRight = Math.round(parentRect.width - nodeRect.width - staticLeft - parentBorder.right - parentBorder.left);
3192
- const staticBottom = Math.round(parentRect.height - nodeRect.height - staticTop - parentBorder.bottom - parentBorder.top);
3256
+ const staticRight = Math.round(
3257
+ parentRect.width - nodeRect.width - staticLeft - parentBorder.right - parentBorder.left,
3258
+ );
3259
+ const staticBottom = Math.round(
3260
+ parentRect.height - nodeRect.height - staticTop - parentBorder.bottom - parentBorder.top,
3261
+ );
3193
3262
  const styleObj = this.parseStyleToObject(this.staticStyle);
3194
3263
  let constraintX = styleObj['--constraint-x'] || 'left';
3195
3264
  let constraintY = styleObj['--constraint-y'] || 'top';
@@ -3291,7 +3360,7 @@ export class ViewElement extends BaseNode {
3291
3360
  this.stringifyStyleAttr({
3292
3361
  ...this.parseStyleToObject(this.staticStyle),
3293
3362
  ...styleObj,
3294
- })
3363
+ }),
3295
3364
  );
3296
3365
  }
3297
3366
  parseStyleToObject(styleStr: string = '') {
@@ -3337,7 +3406,11 @@ export class ViewElement extends BaseNode {
3337
3406
  * 是否是流程表单
3338
3407
  */
3339
3408
  isProcessForm() {
3340
- return this.tag.endsWith('-form') && this.getBindAttribute('id')?.value === 'dynamicRenderContainer' && this.getBindAttribute('processPrefix');
3409
+ return (
3410
+ this.tag.endsWith('-form') &&
3411
+ this.getBindAttribute('id')?.value === 'dynamicRenderContainer' &&
3412
+ this.getBindAttribute('processPrefix')
3413
+ );
3341
3414
  }
3342
3415
  //================================================================================
3343
3416
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!