@lcap/nasl 3.6.0-alpha.6 → 3.6.0-alpha.7

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 (1285) hide show
  1. package/package.json +1 -1
  2. package/sandbox/stdlib/nasl.core.ts +2 -0
  3. package/sandbox/stdlib/nasl.ui.components.h5.ts +1733 -0
  4. package/sandbox/stdlib/nasl.ui.components.pc.ts +3479 -0
  5. package/sandbox/stdlib/nasl.ui.definition.ts +40 -2693
  6. package/sandbox/stdlib/nasl.ui.ts +2 -1
  7. package/src/automate/template/myProcess.js +65 -65
  8. package/src/bak/translator.js +71 -28
  9. package/src/common/ComponentAPI.ts +6 -3
  10. package/src/concepts/App__.ts +1 -1
  11. package/src/concepts/BindAttribute__.ts +171 -91
  12. package/src/concepts/BindDirective__.ts +38 -12
  13. package/src/concepts/BindEvent__.ts +9 -2
  14. package/src/concepts/BindStyle__.ts +25 -2
  15. package/src/concepts/BusinessComponent__.ts +56 -30
  16. package/src/concepts/CallLogic__.ts +14 -5
  17. package/src/concepts/Identifier__.ts +2 -2
  18. package/src/concepts/MemberExpression__.ts +59 -23
  19. package/src/concepts/ViewElement__.ts +456 -193
  20. package/src/concepts/View__.ts +466 -85
  21. package/src/server/createUiTs.ts +120 -154
  22. package/src/server/getLogics.ts +2 -1
  23. package/src/server/getMemberIdentifier.ts +75 -5
  24. package/src/server/naslServer.ts +47 -16
  25. package/src/templator/genCreateBlock.ts +16 -16
  26. package/src/templator/genCurdEditMultipleKeyBlock.ts +22 -22
  27. package/src/templator/genCurdMultipleKeyBlock.ts +22 -22
  28. package/src/templator/genEditTableBlock.ts +15 -15
  29. package/src/templator/genEnumSelectBlock.ts +8 -8
  30. package/src/templator/genGridViewBlock.ts +11 -11
  31. package/src/templator/genListViewBlock.ts +10 -10
  32. package/src/templator/genSelectBlock.ts +10 -10
  33. package/src/templator/genTableBlock.ts +7 -9
  34. package/src/templator/genUpdateBlock.ts +15 -15
  35. package/src/translator/types.ts +1 -0
  36. package/src/utils/string.ts +14 -0
  37. package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +4 -5
  38. package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
  39. package/test/concepts/member-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
  40. package/test/concepts/member-expression/__snapshots__/toJS.spec.ts.snap +1 -1
  41. package/test/concepts/member-expression/__snapshots__/toVue.spec.ts.snap +1 -1
  42. package/test/concepts/member-expression/fixtures/elements.table-view.data.json +352 -10
  43. package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +524 -629
  44. package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +9 -1
  45. package/test/concepts/view-element/toEmbeddedTS.spec.ts +11 -0
  46. package/ts-worker/src/start.js +3 -0
  47. package/.nyc_output/50a74696-517e-4e22-8a16-9eeecc5ae7c2.json +0 -1
  48. package/.nyc_output/processinfo/50a74696-517e-4e22-8a16-9eeecc5ae7c2.json +0 -1
  49. package/.nyc_output/processinfo/index.json +0 -1
  50. package/coverage/base.css +0 -224
  51. package/coverage/block-navigation.js +0 -87
  52. package/coverage/cobertura-coverage.xml +0 -6417
  53. package/coverage/favicon.png +0 -0
  54. package/coverage/index.html +0 -506
  55. package/coverage/prettify.css +0 -1
  56. package/coverage/prettify.js +0 -2
  57. package/coverage/sort-arrow-sprite.png +0 -0
  58. package/coverage/sorter.js +0 -196
  59. package/coverage/src/automate/engine/index.html +0 -116
  60. package/coverage/src/automate/engine/utils.js.html +0 -1414
  61. package/coverage/src/bak/index.html +0 -116
  62. package/coverage/src/bak/translator.js.html +0 -667
  63. package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +0 -175
  64. package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +0 -169
  65. package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +0 -1246
  66. package/coverage/src/breakpoint/generator/CallbackNode.ts.html +0 -145
  67. package/coverage/src/breakpoint/generator/index.html +0 -176
  68. package/coverage/src/breakpoint/generator/index.ts.html +0 -508
  69. package/coverage/src/breakpoint/index.html +0 -116
  70. package/coverage/src/breakpoint/index.ts.html +0 -94
  71. package/coverage/src/breakpoint/shared/constants.ts.html +0 -436
  72. package/coverage/src/breakpoint/shared/index.html +0 -176
  73. package/coverage/src/breakpoint/shared/index.ts.html +0 -94
  74. package/coverage/src/breakpoint/shared/operations.ts.html +0 -160
  75. package/coverage/src/breakpoint/shared/socket.ts.html +0 -1297
  76. package/coverage/src/breakpoint/shared/utils.ts.html +0 -1087
  77. package/coverage/src/breakpoint/store/core.ts.html +0 -1600
  78. package/coverage/src/breakpoint/store/dock.ts.html +0 -733
  79. package/coverage/src/breakpoint/store/index.html +0 -146
  80. package/coverage/src/breakpoint/store/index.ts.html +0 -91
  81. package/coverage/src/common/BaseNode.ts.html +0 -4711
  82. package/coverage/src/common/Command.ts.html +0 -310
  83. package/coverage/src/common/EventEmitter.ts.html +0 -388
  84. package/coverage/src/common/Messager.ts.html +0 -820
  85. package/coverage/src/common/asyncFuncMap.ts.html +0 -127
  86. package/coverage/src/common/index.html +0 -206
  87. package/coverage/src/common/index.ts.html +0 -97
  88. package/coverage/src/common/utils.ts.html +0 -136
  89. package/coverage/src/concepts/Abort__.ts.html +0 -364
  90. package/coverage/src/concepts/AbstractInterface__.ts.html +0 -277
  91. package/coverage/src/concepts/Anchor__.ts.html +0 -712
  92. package/coverage/src/concepts/AnonymousFunction__.ts.html +0 -2140
  93. package/coverage/src/concepts/App__.ts.html +0 -14650
  94. package/coverage/src/concepts/Argument__.ts.html +0 -964
  95. package/coverage/src/concepts/Assignee__.ts.html +0 -2395
  96. package/coverage/src/concepts/AssignmentLine__.ts.html +0 -469
  97. package/coverage/src/concepts/Assignment__.ts.html +0 -1219
  98. package/coverage/src/concepts/Attribute__.ts.html +0 -922
  99. package/coverage/src/concepts/AuthInterface__.ts.html +0 -361
  100. package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +0 -1999
  101. package/coverage/src/concepts/AuthLogic__.ts.html +0 -796
  102. package/coverage/src/concepts/BackendVariable__.ts.html +0 -1789
  103. package/coverage/src/concepts/Backend__.ts.html +0 -1264
  104. package/coverage/src/concepts/BatchAssignment__.ts.html +0 -3451
  105. package/coverage/src/concepts/BinaryExpression__.ts.html +0 -1549
  106. package/coverage/src/concepts/BindAttribute__.ts.html +0 -4030
  107. package/coverage/src/concepts/BindDirective__.ts.html +0 -2065
  108. package/coverage/src/concepts/BindEvent__.ts.html +0 -3538
  109. package/coverage/src/concepts/BindStyle__.ts.html +0 -1693
  110. package/coverage/src/concepts/Block__.ts.html +0 -907
  111. package/coverage/src/concepts/BooleanLiteral__.ts.html +0 -448
  112. package/coverage/src/concepts/CallAuthInterface__.ts.html +0 -1756
  113. package/coverage/src/concepts/CallConnector__.ts.html +0 -961
  114. package/coverage/src/concepts/CallFunction__.ts.html +0 -2287
  115. package/coverage/src/concepts/CallInterface__.ts.html +0 -2815
  116. package/coverage/src/concepts/CallLogic__.ts.html +0 -4915
  117. package/coverage/src/concepts/CallQueryComponent__.ts.html +0 -5461
  118. package/coverage/src/concepts/Comment__.ts.html +0 -430
  119. package/coverage/src/concepts/CompletionProperty__.ts.html +0 -946
  120. package/coverage/src/concepts/ConfigGroup__.ts.html +0 -1153
  121. package/coverage/src/concepts/ConfigPropertyValue__.ts.html +0 -430
  122. package/coverage/src/concepts/ConfigProperty__.ts.html +0 -1420
  123. package/coverage/src/concepts/Configuration__.ts.html +0 -1078
  124. package/coverage/src/concepts/Connection__.ts.html +0 -1450
  125. package/coverage/src/concepts/ConnectorTrigger__.ts.html +0 -598
  126. package/coverage/src/concepts/Connector__.ts.html +0 -7144
  127. package/coverage/src/concepts/Constant__.ts.html +0 -1213
  128. package/coverage/src/concepts/CountersignPolicy__.ts.html +0 -319
  129. package/coverage/src/concepts/DataSource__.ts.html +0 -1840
  130. package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +0 -337
  131. package/coverage/src/concepts/DefaultValue__.ts.html +0 -1024
  132. package/coverage/src/concepts/Destination__.ts.html +0 -2800
  133. package/coverage/src/concepts/End__.ts.html +0 -469
  134. package/coverage/src/concepts/EntityIndex__.ts.html +0 -823
  135. package/coverage/src/concepts/EntityProperty__.ts.html +0 -2950
  136. package/coverage/src/concepts/Entity__.ts.html +0 -3115
  137. package/coverage/src/concepts/EnumItem__.ts.html +0 -583
  138. package/coverage/src/concepts/Enum__.ts.html +0 -1306
  139. package/coverage/src/concepts/Event__.ts.html +0 -1120
  140. package/coverage/src/concepts/ExternalDestination__.ts.html +0 -1099
  141. package/coverage/src/concepts/ForEachStatement__.ts.html +0 -2044
  142. package/coverage/src/concepts/FrontendLibrary__.ts.html +0 -1795
  143. package/coverage/src/concepts/FrontendVariable__.ts.html +0 -349
  144. package/coverage/src/concepts/Frontend__.ts.html +0 -4684
  145. package/coverage/src/concepts/Function__.ts.html +0 -3823
  146. package/coverage/src/concepts/I18nInfo__.ts.html +0 -424
  147. package/coverage/src/concepts/Identifier__.ts.html +0 -1087
  148. package/coverage/src/concepts/IfStatement__.ts.html +0 -1693
  149. package/coverage/src/concepts/ImportedInterface__.ts.html +0 -262
  150. package/coverage/src/concepts/Integration__.ts.html +0 -1303
  151. package/coverage/src/concepts/InterfaceParam__.ts.html +0 -1321
  152. package/coverage/src/concepts/Interface__.ts.html +0 -3535
  153. package/coverage/src/concepts/JSBlock__.ts.html +0 -454
  154. package/coverage/src/concepts/JavaLogic__.ts.html +0 -490
  155. package/coverage/src/concepts/LogicItem__.ts.html +0 -1249
  156. package/coverage/src/concepts/Logic__.ts.html +0 -7864
  157. package/coverage/src/concepts/MatchCase__.ts.html +0 -3052
  158. package/coverage/src/concepts/Match__.ts.html +0 -2614
  159. package/coverage/src/concepts/MemberExpression__.ts.html +0 -1810
  160. package/coverage/src/concepts/MetadataType__.ts.html +0 -2035
  161. package/coverage/src/concepts/MicroApp__.ts.html +0 -427
  162. package/coverage/src/concepts/Module__.ts.html +0 -9325
  163. package/coverage/src/concepts/MsgTriggerEvent__.ts.html +0 -1093
  164. package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +0 -1063
  165. package/coverage/src/concepts/MultiApprovalPolicy__.ts.html +0 -301
  166. package/coverage/src/concepts/Namespace__.ts.html +0 -8563
  167. package/coverage/src/concepts/NewComposite__.ts.html +0 -4945
  168. package/coverage/src/concepts/NewList__.ts.html +0 -1798
  169. package/coverage/src/concepts/NewMap__.ts.html +0 -2530
  170. package/coverage/src/concepts/New__.ts.html +0 -325
  171. package/coverage/src/concepts/NullLiteral__.ts.html +0 -382
  172. package/coverage/src/concepts/NumericLiteral__.ts.html +0 -739
  173. package/coverage/src/concepts/OqlQueryComponent__.ts.html +0 -1276
  174. package/coverage/src/concepts/OverriddenLogic__.ts.html +0 -7066
  175. package/coverage/src/concepts/Param__.ts.html +0 -1867
  176. package/coverage/src/concepts/Point__.ts.html +0 -337
  177. package/coverage/src/concepts/ProcessComponent__.ts.html +0 -1744
  178. package/coverage/src/concepts/ProcessElement__.ts.html +0 -6457
  179. package/coverage/src/concepts/ProcessOutcome__.ts.html +0 -427
  180. package/coverage/src/concepts/ProcessOutcomes__.ts.html +0 -430
  181. package/coverage/src/concepts/Process__.ts.html +0 -5119
  182. package/coverage/src/concepts/QueryAggregateExpression__.ts.html +0 -622
  183. package/coverage/src/concepts/QueryFieldExpression__.ts.html +0 -610
  184. package/coverage/src/concepts/QueryFromExpression__.ts.html +0 -982
  185. package/coverage/src/concepts/QueryGroupByExpression__.ts.html +0 -619
  186. package/coverage/src/concepts/QueryJoinExpression__.ts.html +0 -1651
  187. package/coverage/src/concepts/QueryLimitExpression__.ts.html +0 -706
  188. package/coverage/src/concepts/QueryOrderByExpression__.ts.html +0 -751
  189. package/coverage/src/concepts/QuerySelectExpression__.ts.html +0 -1765
  190. package/coverage/src/concepts/Rect__.ts.html +0 -373
  191. package/coverage/src/concepts/Return__.ts.html +0 -1549
  192. package/coverage/src/concepts/Role__.ts.html +0 -631
  193. package/coverage/src/concepts/SelectMembers__.ts.html +0 -1330
  194. package/coverage/src/concepts/SequentialPolicy__.ts.html +0 -265
  195. package/coverage/src/concepts/Slot__.ts.html +0 -652
  196. package/coverage/src/concepts/SqlQueryComponent__.ts.html +0 -1042
  197. package/coverage/src/concepts/Start__.ts.html +0 -337
  198. package/coverage/src/concepts/StaticString__.ts.html +0 -397
  199. package/coverage/src/concepts/StringInterpolation__.ts.html +0 -1237
  200. package/coverage/src/concepts/StringLiteral__.ts.html +0 -616
  201. package/coverage/src/concepts/StructureProperty__.ts.html +0 -1360
  202. package/coverage/src/concepts/Structure__.ts.html +0 -2287
  203. package/coverage/src/concepts/SwitchCase__.ts.html +0 -1249
  204. package/coverage/src/concepts/SwitchStatement__.ts.html +0 -955
  205. package/coverage/src/concepts/Theme__.ts.html +0 -370
  206. package/coverage/src/concepts/Transactional__.ts.html +0 -631
  207. package/coverage/src/concepts/TriggerEvent__.ts.html +0 -595
  208. package/coverage/src/concepts/TriggerLauncher__.ts.html +0 -805
  209. package/coverage/src/concepts/TypeAnnotation__.ts.html +0 -4051
  210. package/coverage/src/concepts/TypeParam__.ts.html +0 -355
  211. package/coverage/src/concepts/UnaryExpression__.ts.html +0 -781
  212. package/coverage/src/concepts/Unparsed__.ts.html +0 -424
  213. package/coverage/src/concepts/UseComponent__.ts.html +0 -337
  214. package/coverage/src/concepts/ValidationRule__.ts.html +0 -1978
  215. package/coverage/src/concepts/Variable__.ts.html +0 -1813
  216. package/coverage/src/concepts/ViewBlock__.ts.html +0 -355
  217. package/coverage/src/concepts/ViewComponent__.ts.html +0 -4417
  218. package/coverage/src/concepts/ViewElement__.ts.html +0 -9199
  219. package/coverage/src/concepts/View__.ts.html +0 -9466
  220. package/coverage/src/concepts/WhileStatement__.ts.html +0 -1159
  221. package/coverage/src/concepts/basics/constants.ts.html +0 -88
  222. package/coverage/src/concepts/basics/index.html +0 -116
  223. package/coverage/src/concepts/basics/stdlib/index.html +0 -356
  224. package/coverage/src/concepts/basics/stdlib/index.ts.html +0 -346
  225. package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +0 -619
  226. package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +0 -550
  227. package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +0 -271
  228. package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +0 -271
  229. package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +0 -232
  230. package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +0 -175
  231. package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +0 -625
  232. package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +0 -247
  233. package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +0 -259
  234. package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +0 -271
  235. package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +0 -2047
  236. package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +0 -3316
  237. package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +0 -6949
  238. package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +0 -1801
  239. package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +0 -151
  240. package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +0 -664
  241. package/coverage/src/concepts/basics/types/coreTypeList.ts.html +0 -121
  242. package/coverage/src/concepts/basics/types/index.html +0 -131
  243. package/coverage/src/concepts/basics/types/index.ts.html +0 -160
  244. package/coverage/src/concepts/index.html +0 -2111
  245. package/coverage/src/concepts/index.ts.html +0 -127
  246. package/coverage/src/concepts/index__.ts.html +0 -481
  247. package/coverage/src/concepts/utils/asserts.ts.html +0 -28675
  248. package/coverage/src/concepts/utils/index.html +0 -131
  249. package/coverage/src/concepts/utils/types.ts.html +0 -2092
  250. package/coverage/src/config.ts.html +0 -325
  251. package/coverage/src/decorators/index.html +0 -131
  252. package/coverage/src/decorators/index.ts.html +0 -754
  253. package/coverage/src/decorators/promise.ts.html +0 -169
  254. package/coverage/src/eventBus.ts.html +0 -100
  255. package/coverage/src/generator/compileComponent.ts.html +0 -142
  256. package/coverage/src/generator/genBundleFiles.ts.html +0 -2056
  257. package/coverage/src/generator/genHash.ts.html +0 -124
  258. package/coverage/src/generator/genMetaData.ts.html +0 -1273
  259. package/coverage/src/generator/genReleaseBody.ts.html +0 -1297
  260. package/coverage/src/generator/icestark.ts.html +0 -226
  261. package/coverage/src/generator/index.html +0 -266
  262. package/coverage/src/generator/index.ts.html +0 -106
  263. package/coverage/src/generator/microApp.ts.html +0 -172
  264. package/coverage/src/generator/permission.ts.html +0 -1108
  265. package/coverage/src/generator/qiankun.ts.html +0 -238
  266. package/coverage/src/generator/styleReplacer.ts.html +0 -199
  267. package/coverage/src/index.html +0 -146
  268. package/coverage/src/index.ts.html +0 -124
  269. package/coverage/src/manager/diagnostic.ts.html +0 -439
  270. package/coverage/src/manager/index.html +0 -131
  271. package/coverage/src/manager/stepRecorder.ts.html +0 -457
  272. package/coverage/src/natural/genNaturalTS.ts.html +0 -355
  273. package/coverage/src/natural/index.html +0 -161
  274. package/coverage/src/natural/index.ts.html +0 -91
  275. package/coverage/src/natural/naslStdlibMap.ts.html +0 -157
  276. package/coverage/src/natural/transformTSCode.ts.html +0 -2707
  277. package/coverage/src/sentry/index.html +0 -116
  278. package/coverage/src/sentry/index.ts.html +0 -682
  279. package/coverage/src/server/createUiTs.ts.html +0 -919
  280. package/coverage/src/server/entity2LogicNamespace.ts.html +0 -1294
  281. package/coverage/src/server/event.js.html +0 -526
  282. package/coverage/src/server/extendBaseNode.ts.html +0 -1804
  283. package/coverage/src/server/formatTsUtils.ts.html +0 -2692
  284. package/coverage/src/server/getConnector.ts.html +0 -388
  285. package/coverage/src/server/getExtensionModules.ts.html +0 -178
  286. package/coverage/src/server/getFunctions.ts.html +0 -133
  287. package/coverage/src/server/getInterfaces.ts.html +0 -229
  288. package/coverage/src/server/getLogging.ts.html +0 -100
  289. package/coverage/src/server/getLogics.ts.html +0 -1411
  290. package/coverage/src/server/getMemberIdentifier.ts.html +0 -1756
  291. package/coverage/src/server/getProcessComponents.ts.html +0 -112
  292. package/coverage/src/server/getProcesses.ts.html +0 -2173
  293. package/coverage/src/server/getValidates.ts.html +0 -118
  294. package/coverage/src/server/index.html +0 -401
  295. package/coverage/src/server/index.ts.html +0 -232
  296. package/coverage/src/server/naslServer.ts.html +0 -15064
  297. package/coverage/src/server/naslStdlibMap.ts.html +0 -241
  298. package/coverage/src/server/process2LogicNamespace.ts.html +0 -454
  299. package/coverage/src/server/translator.ts.html +0 -2611
  300. package/coverage/src/service/creator/add.configs.js.html +0 -397
  301. package/coverage/src/service/creator/errHandles.js.html +0 -313
  302. package/coverage/src/service/creator/index.html +0 -146
  303. package/coverage/src/service/creator/index.js.html +0 -352
  304. package/coverage/src/service/datasource/api.js.html +0 -118
  305. package/coverage/src/service/datasource/index.html +0 -131
  306. package/coverage/src/service/datasource/index.js.html +0 -103
  307. package/coverage/src/service/logic/api.js.html +0 -109
  308. package/coverage/src/service/logic/index.html +0 -131
  309. package/coverage/src/service/logic/index.js.html +0 -103
  310. package/coverage/src/service/storage/api.js.html +0 -202
  311. package/coverage/src/service/storage/index.html +0 -206
  312. package/coverage/src/service/storage/index.ts.html +0 -103
  313. package/coverage/src/service/storage/init.ts.html +0 -3895
  314. package/coverage/src/service/storage/jsoner.ts.html +0 -565
  315. package/coverage/src/service/storage/map.ts.html +0 -256
  316. package/coverage/src/service/storage/service.ts.html +0 -331
  317. package/coverage/src/service/storage/storagePoint.ts.html +0 -304
  318. package/coverage/src/templator/genCallComponentLogic.ts.html +0 -163
  319. package/coverage/src/templator/genCreateBlock.ts.html +0 -1153
  320. package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +0 -1609
  321. package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +0 -2236
  322. package/coverage/src/templator/genEditTableBlock.ts.html +0 -1018
  323. package/coverage/src/templator/genEnumSelectBlock.ts.html +0 -259
  324. package/coverage/src/templator/genGetBlock.ts.html +0 -451
  325. package/coverage/src/templator/genGridViewBlock.ts.html +0 -1114
  326. package/coverage/src/templator/genListViewBlock.ts.html +0 -475
  327. package/coverage/src/templator/genQueryComponent.ts.html +0 -1207
  328. package/coverage/src/templator/genSelectBlock.ts.html +0 -1324
  329. package/coverage/src/templator/genTableBlock.ts.html +0 -973
  330. package/coverage/src/templator/genUpdateBlock.ts.html +0 -1276
  331. package/coverage/src/templator/index.html +0 -326
  332. package/coverage/src/templator/index.ts.html +0 -154
  333. package/coverage/src/templator/utils.ts.html +0 -1924
  334. package/coverage/src/translator/constant.ts.html +0 -106
  335. package/coverage/src/translator/index.html +0 -161
  336. package/coverage/src/translator/index.ts.html +0 -94
  337. package/coverage/src/translator/types.ts.html +0 -256
  338. package/coverage/src/translator/utils.ts.html +0 -817
  339. package/coverage/src/utils/cookie.ts.html +0 -265
  340. package/coverage/src/utils/env.ts.html +0 -91
  341. package/coverage/src/utils/i18nInfo.ts.html +0 -166
  342. package/coverage/src/utils/index.html +0 -251
  343. package/coverage/src/utils/index.ts.html +0 -697
  344. package/coverage/src/utils/logger.ts.html +0 -145
  345. package/coverage/src/utils/sortTsString.ts.html +0 -202
  346. package/coverage/src/utils/string.ts.html +0 -502
  347. package/coverage/src/utils/time-slicing/constant.ts.html +0 -196
  348. package/coverage/src/utils/time-slicing/controller.ts.html +0 -1144
  349. package/coverage/src/utils/time-slicing/index.html +0 -236
  350. package/coverage/src/utils/time-slicing/index.ts.html +0 -103
  351. package/coverage/src/utils/time-slicing/page-state.ts.html +0 -121
  352. package/coverage/src/utils/time-slicing/performance.ts.html +0 -253
  353. package/coverage/src/utils/time-slicing/runner.ts.html +0 -241
  354. package/coverage/src/utils/time-slicing/tool.ts.html +0 -220
  355. package/coverage/src/utils/time-slicing/utils.ts.html +0 -355
  356. package/coverage/src/utils/time-slicing/wrapper.ts.html +0 -259
  357. package/coverage/src/utils/time-slicing.ts.html +0 -418
  358. package/coverage/src/utils/traverse.ts.html +0 -568
  359. package/coverage/src/utils/types.ts.html +0 -133
  360. package/coverage/src/utils/window.ts.html +0 -112
  361. package/out/automate/engine/index.d.ts +0 -4
  362. package/out/automate/engine/index.js +0 -443
  363. package/out/automate/engine/index.js.map +0 -1
  364. package/out/automate/engine/operators.d.ts +0 -26
  365. package/out/automate/engine/operators.js +0 -364
  366. package/out/automate/engine/operators.js.map +0 -1
  367. package/out/automate/engine/uniqueName.d.ts +0 -12
  368. package/out/automate/engine/uniqueName.js +0 -116
  369. package/out/automate/engine/uniqueName.js.map +0 -1
  370. package/out/automate/engine/utils.d.ts +0 -25
  371. package/out/automate/engine/utils.js +0 -440
  372. package/out/automate/engine/utils.js.map +0 -1
  373. package/out/automate/engine/viewCache.d.ts +0 -19
  374. package/out/automate/engine/viewCache.js +0 -45
  375. package/out/automate/engine/viewCache.js.map +0 -1
  376. package/out/automate/template/myProcess.d.ts +0 -10
  377. package/out/automate/template/myProcess.js +0 -11502
  378. package/out/automate/template/myProcess.js.map +0 -1
  379. package/out/automate/upgrader/2.12.d.ts +0 -7
  380. package/out/automate/upgrader/2.12.js +0 -63
  381. package/out/automate/upgrader/2.12.js.map +0 -1
  382. package/out/automate/upgrader/2.14-components.d.ts +0 -1115
  383. package/out/automate/upgrader/2.14-components.js +0 -1087
  384. package/out/automate/upgrader/2.14-components.js.map +0 -1
  385. package/out/automate/upgrader/2.14.d.ts +0 -10
  386. package/out/automate/upgrader/2.14.js +0 -236
  387. package/out/automate/upgrader/2.14.js.map +0 -1
  388. package/out/automate/upgrader/2.14.old.d.ts +0 -1
  389. package/out/automate/upgrader/2.14.old.js +0 -125
  390. package/out/automate/upgrader/2.14.old.js.map +0 -1
  391. package/out/automate/upgrader/2.16.d.ts +0 -10
  392. package/out/automate/upgrader/2.16.js +0 -75
  393. package/out/automate/upgrader/2.16.js.map +0 -1
  394. package/out/automate/upgrader/2.17.d.ts +0 -21
  395. package/out/automate/upgrader/2.17.js +0 -557
  396. package/out/automate/upgrader/2.17.js.map +0 -1
  397. package/out/automate/upgrader/2.18.d.ts +0 -10
  398. package/out/automate/upgrader/2.18.js +0 -107
  399. package/out/automate/upgrader/2.18.js.map +0 -1
  400. package/out/automate/upgrader/2.20.d.ts +0 -17
  401. package/out/automate/upgrader/2.20.js +0 -68
  402. package/out/automate/upgrader/2.20.js.map +0 -1
  403. package/out/bak/translator.d.ts +0 -1
  404. package/out/bak/translator.js +0 -265
  405. package/out/bak/translator.js.map +0 -1
  406. package/out/breakpoint/generator/AfterStartNode.d.ts +0 -7
  407. package/out/breakpoint/generator/AfterStartNode.js +0 -30
  408. package/out/breakpoint/generator/AfterStartNode.js.map +0 -1
  409. package/out/breakpoint/generator/BeforeEndNode.d.ts +0 -7
  410. package/out/breakpoint/generator/BeforeEndNode.js +0 -28
  411. package/out/breakpoint/generator/BeforeEndNode.js.map +0 -1
  412. package/out/breakpoint/generator/BreakpointNode.d.ts +0 -18
  413. package/out/breakpoint/generator/BreakpointNode.js +0 -293
  414. package/out/breakpoint/generator/BreakpointNode.js.map +0 -1
  415. package/out/breakpoint/generator/CallbackNode.d.ts +0 -4
  416. package/out/breakpoint/generator/CallbackNode.js +0 -37
  417. package/out/breakpoint/generator/CallbackNode.js.map +0 -1
  418. package/out/breakpoint/generator/FragmentNode.d.ts +0 -4
  419. package/out/breakpoint/generator/FragmentNode.js +0 -18
  420. package/out/breakpoint/generator/FragmentNode.js.map +0 -1
  421. package/out/breakpoint/generator/index.d.ts +0 -4
  422. package/out/breakpoint/generator/index.js +0 -119
  423. package/out/breakpoint/generator/index.js.map +0 -1
  424. package/out/breakpoint/index.d.ts +0 -3
  425. package/out/breakpoint/index.js +0 -20
  426. package/out/breakpoint/index.js.map +0 -1
  427. package/out/breakpoint/shared/constants.d.ts +0 -37
  428. package/out/breakpoint/shared/constants.js +0 -108
  429. package/out/breakpoint/shared/constants.js.map +0 -1
  430. package/out/breakpoint/shared/index.d.ts +0 -3
  431. package/out/breakpoint/shared/index.js +0 -33
  432. package/out/breakpoint/shared/index.js.map +0 -1
  433. package/out/breakpoint/shared/operations.d.ts +0 -10
  434. package/out/breakpoint/shared/operations.js +0 -25
  435. package/out/breakpoint/shared/operations.js.map +0 -1
  436. package/out/breakpoint/shared/socket.d.ts +0 -48
  437. package/out/breakpoint/shared/socket.js +0 -257
  438. package/out/breakpoint/shared/socket.js.map +0 -1
  439. package/out/breakpoint/shared/utils.d.ts +0 -27
  440. package/out/breakpoint/shared/utils.js +0 -217
  441. package/out/breakpoint/shared/utils.js.map +0 -1
  442. package/out/breakpoint/store/core.d.ts +0 -80
  443. package/out/breakpoint/store/core.js +0 -416
  444. package/out/breakpoint/store/core.js.map +0 -1
  445. package/out/breakpoint/store/dock.d.ts +0 -1
  446. package/out/breakpoint/store/dock.js +0 -160
  447. package/out/breakpoint/store/dock.js.map +0 -1
  448. package/out/breakpoint/store/index.d.ts +0 -2
  449. package/out/breakpoint/store/index.js +0 -19
  450. package/out/breakpoint/store/index.js.map +0 -1
  451. package/out/common/BaseNode.d.ts +0 -377
  452. package/out/common/BaseNode.js +0 -1432
  453. package/out/common/BaseNode.js.map +0 -1
  454. package/out/common/Command.d.ts +0 -21
  455. package/out/common/Command.js +0 -79
  456. package/out/common/Command.js.map +0 -1
  457. package/out/common/ComponentAPI.d.ts +0 -110
  458. package/out/common/ComponentAPI.js +0 -3
  459. package/out/common/ComponentAPI.js.map +0 -1
  460. package/out/common/EventEmitter.d.ts +0 -61
  461. package/out/common/EventEmitter.js +0 -71
  462. package/out/common/EventEmitter.js.map +0 -1
  463. package/out/common/Messager.d.ts +0 -91
  464. package/out/common/Messager.js +0 -205
  465. package/out/common/Messager.js.map +0 -1
  466. package/out/common/asyncFuncMap.d.ts +0 -2
  467. package/out/common/asyncFuncMap.js +0 -16
  468. package/out/common/asyncFuncMap.js.map +0 -1
  469. package/out/common/index.d.ts +0 -4
  470. package/out/common/index.js +0 -21
  471. package/out/common/index.js.map +0 -1
  472. package/out/common/utils.d.ts +0 -2
  473. package/out/common/utils.js +0 -18
  474. package/out/common/utils.js.map +0 -1
  475. package/out/concepts/Abort__.d.ts +0 -28
  476. package/out/concepts/Abort__.js +0 -80
  477. package/out/concepts/Abort__.js.map +0 -1
  478. package/out/concepts/AbstractInterface__.d.ts +0 -22
  479. package/out/concepts/AbstractInterface__.js +0 -56
  480. package/out/concepts/AbstractInterface__.js.map +0 -1
  481. package/out/concepts/Anchor__.d.ts +0 -48
  482. package/out/concepts/Anchor__.js +0 -200
  483. package/out/concepts/Anchor__.js.map +0 -1
  484. package/out/concepts/AnonymousFunction__.d.ts +0 -180
  485. package/out/concepts/AnonymousFunction__.js +0 -555
  486. package/out/concepts/AnonymousFunction__.js.map +0 -1
  487. package/out/concepts/App__.d.ts +0 -1818
  488. package/out/concepts/App__.js +0 -2983
  489. package/out/concepts/App__.js.map +0 -1
  490. package/out/concepts/Argument__.d.ts +0 -70
  491. package/out/concepts/Argument__.js +0 -270
  492. package/out/concepts/Argument__.js.map +0 -1
  493. package/out/concepts/Assignee__.d.ts +0 -291
  494. package/out/concepts/Assignee__.js +0 -461
  495. package/out/concepts/Assignee__.js.map +0 -1
  496. package/out/concepts/AssignmentLine__.d.ts +0 -44
  497. package/out/concepts/AssignmentLine__.js +0 -114
  498. package/out/concepts/AssignmentLine__.js.map +0 -1
  499. package/out/concepts/Assignment__.d.ts +0 -77
  500. package/out/concepts/Assignment__.js +0 -338
  501. package/out/concepts/Assignment__.js.map +0 -1
  502. package/out/concepts/Attribute__.d.ts +0 -112
  503. package/out/concepts/Attribute__.js +0 -208
  504. package/out/concepts/Attribute__.js.map +0 -1
  505. package/out/concepts/AuthInterface__.d.ts +0 -38
  506. package/out/concepts/AuthInterface__.js +0 -74
  507. package/out/concepts/AuthInterface__.js.map +0 -1
  508. package/out/concepts/AuthLogicForCallInterface__.d.ts +0 -141
  509. package/out/concepts/AuthLogicForCallInterface__.js +0 -514
  510. package/out/concepts/AuthLogicForCallInterface__.js.map +0 -1
  511. package/out/concepts/AuthLogic__.d.ts +0 -69
  512. package/out/concepts/AuthLogic__.js +0 -210
  513. package/out/concepts/AuthLogic__.js.map +0 -1
  514. package/out/concepts/BackendVariable__.d.ts +0 -145
  515. package/out/concepts/BackendVariable__.js +0 -502
  516. package/out/concepts/BackendVariable__.js.map +0 -1
  517. package/out/concepts/Backend__.d.ts +0 -134
  518. package/out/concepts/Backend__.js +0 -280
  519. package/out/concepts/Backend__.js.map +0 -1
  520. package/out/concepts/BatchAssignment__.d.ts +0 -255
  521. package/out/concepts/BatchAssignment__.js +0 -881
  522. package/out/concepts/BatchAssignment__.js.map +0 -1
  523. package/out/concepts/BinaryExpression__.d.ts +0 -76
  524. package/out/concepts/BinaryExpression__.js +0 -422
  525. package/out/concepts/BinaryExpression__.js.map +0 -1
  526. package/out/concepts/BindAttribute__.d.ts +0 -330
  527. package/out/concepts/BindAttribute__.js +0 -1074
  528. package/out/concepts/BindAttribute__.js.map +0 -1
  529. package/out/concepts/BindDirective__.d.ts +0 -170
  530. package/out/concepts/BindDirective__.js +0 -555
  531. package/out/concepts/BindDirective__.js.map +0 -1
  532. package/out/concepts/BindEvent__.d.ts +0 -254
  533. package/out/concepts/BindEvent__.js +0 -954
  534. package/out/concepts/BindEvent__.js.map +0 -1
  535. package/out/concepts/BindStyle__.d.ts +0 -142
  536. package/out/concepts/BindStyle__.js +0 -436
  537. package/out/concepts/BindStyle__.js.map +0 -1
  538. package/out/concepts/Block__.d.ts +0 -84
  539. package/out/concepts/Block__.js +0 -215
  540. package/out/concepts/Block__.js.map +0 -1
  541. package/out/concepts/BooleanLiteral__.d.ts +0 -38
  542. package/out/concepts/BooleanLiteral__.js +0 -97
  543. package/out/concepts/BooleanLiteral__.js.map +0 -1
  544. package/out/concepts/BusinessComponent__.d.ts +0 -641
  545. package/out/concepts/BusinessComponent__.js +0 -1921
  546. package/out/concepts/BusinessComponent__.js.map +0 -1
  547. package/out/concepts/BusinessLogic__.d.ts +0 -38
  548. package/out/concepts/BusinessLogic__.js +0 -358
  549. package/out/concepts/BusinessLogic__.js.map +0 -1
  550. package/out/concepts/CallAuthInterface__.d.ts +0 -130
  551. package/out/concepts/CallAuthInterface__.js +0 -438
  552. package/out/concepts/CallAuthInterface__.js.map +0 -1
  553. package/out/concepts/CallConnector__.d.ts +0 -49
  554. package/out/concepts/CallConnector__.js +0 -257
  555. package/out/concepts/CallConnector__.js.map +0 -1
  556. package/out/concepts/CallEvent__.d.ts +0 -101
  557. package/out/concepts/CallEvent__.js +0 -280
  558. package/out/concepts/CallEvent__.js.map +0 -1
  559. package/out/concepts/CallFunction__.d.ts +0 -162
  560. package/out/concepts/CallFunction__.js +0 -600
  561. package/out/concepts/CallFunction__.js.map +0 -1
  562. package/out/concepts/CallInterface__.d.ts +0 -136
  563. package/out/concepts/CallInterface__.js +0 -814
  564. package/out/concepts/CallInterface__.js.map +0 -1
  565. package/out/concepts/CallLogic__.d.ts +0 -235
  566. package/out/concepts/CallLogic__.js +0 -1351
  567. package/out/concepts/CallLogic__.js.map +0 -1
  568. package/out/concepts/CallQueryComponent__.d.ts +0 -435
  569. package/out/concepts/CallQueryComponent__.js +0 -1235
  570. package/out/concepts/CallQueryComponent__.js.map +0 -1
  571. package/out/concepts/Comment__.d.ts +0 -35
  572. package/out/concepts/Comment__.js +0 -94
  573. package/out/concepts/Comment__.js.map +0 -1
  574. package/out/concepts/CompletionProperty__.d.ts +0 -107
  575. package/out/concepts/CompletionProperty__.js +0 -239
  576. package/out/concepts/CompletionProperty__.js.map +0 -1
  577. package/out/concepts/ConfigGroup__.d.ts +0 -127
  578. package/out/concepts/ConfigGroup__.js +0 -258
  579. package/out/concepts/ConfigGroup__.js.map +0 -1
  580. package/out/concepts/ConfigPropertyValue__.d.ts +0 -47
  581. package/out/concepts/ConfigPropertyValue__.js +0 -93
  582. package/out/concepts/ConfigPropertyValue__.js.map +0 -1
  583. package/out/concepts/ConfigProperty__.d.ts +0 -153
  584. package/out/concepts/ConfigProperty__.js +0 -321
  585. package/out/concepts/ConfigProperty__.js.map +0 -1
  586. package/out/concepts/Configuration__.d.ts +0 -126
  587. package/out/concepts/Configuration__.js +0 -236
  588. package/out/concepts/Configuration__.js.map +0 -1
  589. package/out/concepts/Connection__.d.ts +0 -165
  590. package/out/concepts/Connection__.js +0 -330
  591. package/out/concepts/Connection__.js.map +0 -1
  592. package/out/concepts/ConnectorTrigger__.d.ts +0 -81
  593. package/out/concepts/ConnectorTrigger__.js +0 -138
  594. package/out/concepts/ConnectorTrigger__.js.map +0 -1
  595. package/out/concepts/Connector__.d.ts +0 -929
  596. package/out/concepts/Connector__.js +0 -1343
  597. package/out/concepts/Connector__.js.map +0 -1
  598. package/out/concepts/Constant__.d.ts +0 -121
  599. package/out/concepts/Constant__.js +0 -331
  600. package/out/concepts/Constant__.js.map +0 -1
  601. package/out/concepts/CountersignPolicy__.d.ts +0 -28
  602. package/out/concepts/CountersignPolicy__.js +0 -62
  603. package/out/concepts/CountersignPolicy__.js.map +0 -1
  604. package/out/concepts/DataSource__.d.ts +0 -168
  605. package/out/concepts/DataSource__.js +0 -460
  606. package/out/concepts/DataSource__.js.map +0 -1
  607. package/out/concepts/DatabaseTypeAnnotation__.d.ts +0 -34
  608. package/out/concepts/DatabaseTypeAnnotation__.js +0 -65
  609. package/out/concepts/DatabaseTypeAnnotation__.js.map +0 -1
  610. package/out/concepts/DefaultValue__.d.ts +0 -104
  611. package/out/concepts/DefaultValue__.js +0 -242
  612. package/out/concepts/DefaultValue__.js.map +0 -1
  613. package/out/concepts/Destination__.d.ts +0 -160
  614. package/out/concepts/Destination__.js +0 -799
  615. package/out/concepts/Destination__.js.map +0 -1
  616. package/out/concepts/End__.d.ts +0 -27
  617. package/out/concepts/End__.js +0 -115
  618. package/out/concepts/End__.js.map +0 -1
  619. package/out/concepts/EntityIndex__.d.ts +0 -98
  620. package/out/concepts/EntityIndex__.js +0 -201
  621. package/out/concepts/EntityIndex__.js.map +0 -1
  622. package/out/concepts/EntityProperty__.d.ts +0 -293
  623. package/out/concepts/EntityProperty__.js +0 -824
  624. package/out/concepts/EntityProperty__.js.map +0 -1
  625. package/out/concepts/Entity__.d.ts +0 -339
  626. package/out/concepts/Entity__.js +0 -764
  627. package/out/concepts/Entity__.js.map +0 -1
  628. package/out/concepts/EnumItem__.d.ts +0 -67
  629. package/out/concepts/EnumItem__.js +0 -131
  630. package/out/concepts/EnumItem__.js.map +0 -1
  631. package/out/concepts/Enum__.d.ts +0 -138
  632. package/out/concepts/Enum__.js +0 -321
  633. package/out/concepts/Enum__.js.map +0 -1
  634. package/out/concepts/Event__.d.ts +0 -160
  635. package/out/concepts/Event__.js +0 -294
  636. package/out/concepts/Event__.js.map +0 -1
  637. package/out/concepts/ExternalDestination__.d.ts +0 -78
  638. package/out/concepts/ExternalDestination__.js +0 -309
  639. package/out/concepts/ExternalDestination__.js.map +0 -1
  640. package/out/concepts/ForEachStatement__.d.ts +0 -173
  641. package/out/concepts/ForEachStatement__.js +0 -497
  642. package/out/concepts/ForEachStatement__.js.map +0 -1
  643. package/out/concepts/FrontendLibrary__.d.ts +0 -216
  644. package/out/concepts/FrontendLibrary__.js +0 -364
  645. package/out/concepts/FrontendLibrary__.js.map +0 -1
  646. package/out/concepts/FrontendType__.d.ts +0 -308
  647. package/out/concepts/FrontendType__.js +0 -606
  648. package/out/concepts/FrontendType__.js.map +0 -1
  649. package/out/concepts/FrontendVariable__.d.ts +0 -36
  650. package/out/concepts/FrontendVariable__.js +0 -77
  651. package/out/concepts/FrontendVariable__.js.map +0 -1
  652. package/out/concepts/Frontend__.d.ts +0 -420
  653. package/out/concepts/Frontend__.js +0 -915
  654. package/out/concepts/Frontend__.js.map +0 -1
  655. package/out/concepts/Function__.d.ts +0 -420
  656. package/out/concepts/Function__.js +0 -805
  657. package/out/concepts/Function__.js.map +0 -1
  658. package/out/concepts/I18nInfo__.d.ts +0 -46
  659. package/out/concepts/I18nInfo__.js +0 -90
  660. package/out/concepts/I18nInfo__.js.map +0 -1
  661. package/out/concepts/Identifier__.d.ts +0 -59
  662. package/out/concepts/Identifier__.js +0 -326
  663. package/out/concepts/Identifier__.js.map +0 -1
  664. package/out/concepts/IfStatement__.d.ts +0 -161
  665. package/out/concepts/IfStatement__.js +0 -372
  666. package/out/concepts/IfStatement__.js.map +0 -1
  667. package/out/concepts/ImportedInterface__.d.ts +0 -20
  668. package/out/concepts/ImportedInterface__.js +0 -48
  669. package/out/concepts/ImportedInterface__.js.map +0 -1
  670. package/out/concepts/Integration__.d.ts +0 -146
  671. package/out/concepts/Integration__.js +0 -296
  672. package/out/concepts/Integration__.js.map +0 -1
  673. package/out/concepts/InterfaceParam__.d.ts +0 -146
  674. package/out/concepts/InterfaceParam__.js +0 -342
  675. package/out/concepts/InterfaceParam__.js.map +0 -1
  676. package/out/concepts/Interface__.d.ts +0 -328
  677. package/out/concepts/Interface__.js +0 -892
  678. package/out/concepts/Interface__.js.map +0 -1
  679. package/out/concepts/JSBlock__.d.ts +0 -37
  680. package/out/concepts/JSBlock__.js +0 -104
  681. package/out/concepts/JSBlock__.js.map +0 -1
  682. package/out/concepts/JavaLogic__.d.ts +0 -45
  683. package/out/concepts/JavaLogic__.js +0 -109
  684. package/out/concepts/JavaLogic__.js.map +0 -1
  685. package/out/concepts/LogicItem__.d.ts +0 -155
  686. package/out/concepts/LogicItem__.js +0 -284
  687. package/out/concepts/LogicItem__.js.map +0 -1
  688. package/out/concepts/Logic__.d.ts +0 -649
  689. package/out/concepts/Logic__.js +0 -1939
  690. package/out/concepts/Logic__.js.map +0 -1
  691. package/out/concepts/MatchCase__.d.ts +0 -261
  692. package/out/concepts/MatchCase__.js +0 -706
  693. package/out/concepts/MatchCase__.js.map +0 -1
  694. package/out/concepts/Match__.d.ts +0 -127
  695. package/out/concepts/Match__.js +0 -731
  696. package/out/concepts/Match__.js.map +0 -1
  697. package/out/concepts/MemberExpression__.d.ts +0 -78
  698. package/out/concepts/MemberExpression__.js +0 -514
  699. package/out/concepts/MemberExpression__.js.map +0 -1
  700. package/out/concepts/MetadataType__.d.ts +0 -236
  701. package/out/concepts/MetadataType__.js +0 -464
  702. package/out/concepts/MetadataType__.js.map +0 -1
  703. package/out/concepts/MicroApp__.d.ts +0 -54
  704. package/out/concepts/MicroApp__.js +0 -80
  705. package/out/concepts/MicroApp__.js.map +0 -1
  706. package/out/concepts/Module__.d.ts +0 -1171
  707. package/out/concepts/Module__.js +0 -1747
  708. package/out/concepts/Module__.js.map +0 -1
  709. package/out/concepts/MsgTriggerEvent__.d.ts +0 -140
  710. package/out/concepts/MsgTriggerEvent__.js +0 -236
  711. package/out/concepts/MsgTriggerEvent__.js.map +0 -1
  712. package/out/concepts/MsgTriggerLauncher__.d.ts +0 -129
  713. package/out/concepts/MsgTriggerLauncher__.js +0 -226
  714. package/out/concepts/MsgTriggerLauncher__.js.map +0 -1
  715. package/out/concepts/MultiApprovalPolicy__.d.ts +0 -26
  716. package/out/concepts/MultiApprovalPolicy__.js +0 -59
  717. package/out/concepts/MultiApprovalPolicy__.js.map +0 -1
  718. package/out/concepts/Namespace__.d.ts +0 -1086
  719. package/out/concepts/Namespace__.js +0 -1555
  720. package/out/concepts/Namespace__.js.map +0 -1
  721. package/out/concepts/NewComposite__.d.ts +0 -353
  722. package/out/concepts/NewComposite__.js +0 -1277
  723. package/out/concepts/NewComposite__.js.map +0 -1
  724. package/out/concepts/NewList__.d.ts +0 -141
  725. package/out/concepts/NewList__.js +0 -470
  726. package/out/concepts/NewList__.js.map +0 -1
  727. package/out/concepts/NewMap__.d.ts +0 -231
  728. package/out/concepts/NewMap__.js +0 -604
  729. package/out/concepts/NewMap__.js.map +0 -1
  730. package/out/concepts/New__.d.ts +0 -23
  731. package/out/concepts/New__.js +0 -65
  732. package/out/concepts/New__.js.map +0 -1
  733. package/out/concepts/NullLiteral__.d.ts +0 -29
  734. package/out/concepts/NullLiteral__.js +0 -77
  735. package/out/concepts/NullLiteral__.js.map +0 -1
  736. package/out/concepts/NumericLiteral__.d.ts +0 -59
  737. package/out/concepts/NumericLiteral__.js +0 -177
  738. package/out/concepts/NumericLiteral__.js.map +0 -1
  739. package/out/concepts/OqlQueryComponent__.d.ts +0 -76
  740. package/out/concepts/OqlQueryComponent__.js +0 -351
  741. package/out/concepts/OqlQueryComponent__.js.map +0 -1
  742. package/out/concepts/OverriddenLogic__.d.ts +0 -634
  743. package/out/concepts/OverriddenLogic__.js +0 -1661
  744. package/out/concepts/OverriddenLogic__.js.map +0 -1
  745. package/out/concepts/Paginate__.d.ts +0 -97
  746. package/out/concepts/Paginate__.js +0 -267
  747. package/out/concepts/Paginate__.js.map +0 -1
  748. package/out/concepts/ParamWithGroup__.d.ts +0 -39
  749. package/out/concepts/ParamWithGroup__.js +0 -85
  750. package/out/concepts/ParamWithGroup__.js.map +0 -1
  751. package/out/concepts/Param__.d.ts +0 -182
  752. package/out/concepts/Param__.js +0 -524
  753. package/out/concepts/Param__.js.map +0 -1
  754. package/out/concepts/Point__.d.ts +0 -34
  755. package/out/concepts/Point__.js +0 -65
  756. package/out/concepts/Point__.js.map +0 -1
  757. package/out/concepts/ProcessComponent__.d.ts +0 -222
  758. package/out/concepts/ProcessComponent__.js +0 -340
  759. package/out/concepts/ProcessComponent__.js.map +0 -1
  760. package/out/concepts/ProcessElement__.d.ts +0 -665
  761. package/out/concepts/ProcessElement__.js +0 -1354
  762. package/out/concepts/ProcessElement__.js.map +0 -1
  763. package/out/concepts/ProcessOutcome__.d.ts +0 -34
  764. package/out/concepts/ProcessOutcome__.js +0 -97
  765. package/out/concepts/ProcessOutcome__.js.map +0 -1
  766. package/out/concepts/ProcessOutcomes__.d.ts +0 -34
  767. package/out/concepts/ProcessOutcomes__.js +0 -104
  768. package/out/concepts/ProcessOutcomes__.js.map +0 -1
  769. package/out/concepts/Process__.d.ts +0 -615
  770. package/out/concepts/Process__.js +0 -1117
  771. package/out/concepts/Process__.js.map +0 -1
  772. package/out/concepts/QueryAggregateExpression__.d.ts +0 -54
  773. package/out/concepts/QueryAggregateExpression__.js +0 -140
  774. package/out/concepts/QueryAggregateExpression__.js.map +0 -1
  775. package/out/concepts/QueryFieldExpression__.d.ts +0 -56
  776. package/out/concepts/QueryFieldExpression__.js +0 -142
  777. package/out/concepts/QueryFieldExpression__.js.map +0 -1
  778. package/out/concepts/QueryFromExpression__.d.ts +0 -101
  779. package/out/concepts/QueryFromExpression__.js +0 -227
  780. package/out/concepts/QueryFromExpression__.js.map +0 -1
  781. package/out/concepts/QueryGroupByExpression__.d.ts +0 -50
  782. package/out/concepts/QueryGroupByExpression__.js +0 -142
  783. package/out/concepts/QueryGroupByExpression__.js.map +0 -1
  784. package/out/concepts/QueryJoinExpression__.d.ts +0 -188
  785. package/out/concepts/QueryJoinExpression__.js +0 -327
  786. package/out/concepts/QueryJoinExpression__.js.map +0 -1
  787. package/out/concepts/QueryLimitExpression__.d.ts +0 -60
  788. package/out/concepts/QueryLimitExpression__.js +0 -159
  789. package/out/concepts/QueryLimitExpression__.js.map +0 -1
  790. package/out/concepts/QueryOrderByExpression__.d.ts +0 -71
  791. package/out/concepts/QueryOrderByExpression__.js +0 -172
  792. package/out/concepts/QueryOrderByExpression__.js.map +0 -1
  793. package/out/concepts/QuerySelectExpression__.d.ts +0 -206
  794. package/out/concepts/QuerySelectExpression__.js +0 -308
  795. package/out/concepts/QuerySelectExpression__.js.map +0 -1
  796. package/out/concepts/Rect__.d.ts +0 -42
  797. package/out/concepts/Rect__.js +0 -71
  798. package/out/concepts/Rect__.js.map +0 -1
  799. package/out/concepts/Return__.d.ts +0 -147
  800. package/out/concepts/Return__.js +0 -429
  801. package/out/concepts/Return__.js.map +0 -1
  802. package/out/concepts/Role__.d.ts +0 -62
  803. package/out/concepts/Role__.js +0 -151
  804. package/out/concepts/Role__.js.map +0 -1
  805. package/out/concepts/SelectMembers__.d.ts +0 -145
  806. package/out/concepts/SelectMembers__.js +0 -300
  807. package/out/concepts/SelectMembers__.js.map +0 -1
  808. package/out/concepts/SequentialPolicy__.d.ts +0 -20
  809. package/out/concepts/SequentialPolicy__.js +0 -48
  810. package/out/concepts/SequentialPolicy__.js.map +0 -1
  811. package/out/concepts/Slot__.d.ts +0 -77
  812. package/out/concepts/Slot__.js +0 -141
  813. package/out/concepts/Slot__.js.map +0 -1
  814. package/out/concepts/SqlQueryComponent__.d.ts +0 -74
  815. package/out/concepts/SqlQueryComponent__.js +0 -269
  816. package/out/concepts/SqlQueryComponent__.js.map +0 -1
  817. package/out/concepts/Start__.d.ts +0 -27
  818. package/out/concepts/Start__.js +0 -69
  819. package/out/concepts/Start__.js.map +0 -1
  820. package/out/concepts/StaticString__.d.ts +0 -49
  821. package/out/concepts/StaticString__.js +0 -91
  822. package/out/concepts/StaticString__.js.map +0 -1
  823. package/out/concepts/StringInterpolation__.d.ts +0 -118
  824. package/out/concepts/StringInterpolation__.js +0 -284
  825. package/out/concepts/StringInterpolation__.js.map +0 -1
  826. package/out/concepts/StringLiteral__.d.ts +0 -45
  827. package/out/concepts/StringLiteral__.js +0 -159
  828. package/out/concepts/StringLiteral__.js.map +0 -1
  829. package/out/concepts/StructureProperty__.d.ts +0 -154
  830. package/out/concepts/StructureProperty__.js +0 -338
  831. package/out/concepts/StructureProperty__.js.map +0 -1
  832. package/out/concepts/Structure__.d.ts +0 -250
  833. package/out/concepts/Structure__.js +0 -508
  834. package/out/concepts/Structure__.js.map +0 -1
  835. package/out/concepts/SwitchCase__.d.ts +0 -97
  836. package/out/concepts/SwitchCase__.js +0 -305
  837. package/out/concepts/SwitchCase__.js.map +0 -1
  838. package/out/concepts/SwitchStatement__.d.ts +0 -87
  839. package/out/concepts/SwitchStatement__.js +0 -234
  840. package/out/concepts/SwitchStatement__.js.map +0 -1
  841. package/out/concepts/Theme__.d.ts +0 -40
  842. package/out/concepts/Theme__.js +0 -84
  843. package/out/concepts/Theme__.js.map +0 -1
  844. package/out/concepts/Transactional__.d.ts +0 -90
  845. package/out/concepts/Transactional__.js +0 -149
  846. package/out/concepts/Transactional__.js.map +0 -1
  847. package/out/concepts/TriggerEvent__.d.ts +0 -54
  848. package/out/concepts/TriggerEvent__.js +0 -137
  849. package/out/concepts/TriggerEvent__.js.map +0 -1
  850. package/out/concepts/TriggerLauncher__.d.ts +0 -81
  851. package/out/concepts/TriggerLauncher__.js +0 -197
  852. package/out/concepts/TriggerLauncher__.js.map +0 -1
  853. package/out/concepts/TypeAnnotation__.d.ts +0 -305
  854. package/out/concepts/TypeAnnotation__.js +0 -1095
  855. package/out/concepts/TypeAnnotation__.js.map +0 -1
  856. package/out/concepts/TypeParam__.d.ts +0 -28
  857. package/out/concepts/TypeParam__.js +0 -71
  858. package/out/concepts/TypeParam__.js.map +0 -1
  859. package/out/concepts/UnaryExpression__.d.ts +0 -52
  860. package/out/concepts/UnaryExpression__.js +0 -191
  861. package/out/concepts/UnaryExpression__.js.map +0 -1
  862. package/out/concepts/Unparsed__.d.ts +0 -36
  863. package/out/concepts/Unparsed__.js +0 -91
  864. package/out/concepts/Unparsed__.js.map +0 -1
  865. package/out/concepts/UseComponent__.d.ts +0 -34
  866. package/out/concepts/UseComponent__.js +0 -65
  867. package/out/concepts/UseComponent__.js.map +0 -1
  868. package/out/concepts/ValidationRule__.d.ts +0 -152
  869. package/out/concepts/ValidationRule__.js +0 -535
  870. package/out/concepts/ValidationRule__.js.map +0 -1
  871. package/out/concepts/Variable__.d.ts +0 -164
  872. package/out/concepts/Variable__.js +0 -505
  873. package/out/concepts/Variable__.js.map +0 -1
  874. package/out/concepts/ViewBlock__.d.ts +0 -38
  875. package/out/concepts/ViewBlock__.js +0 -68
  876. package/out/concepts/ViewBlock__.js.map +0 -1
  877. package/out/concepts/ViewComponent__.d.ts +0 -568
  878. package/out/concepts/ViewComponent__.js +0 -809
  879. package/out/concepts/ViewComponent__.js.map +0 -1
  880. package/out/concepts/ViewElement__.d.ts +0 -648
  881. package/out/concepts/ViewElement__.js +0 -2482
  882. package/out/concepts/ViewElement__.js.map +0 -1
  883. package/out/concepts/View__.d.ts +0 -739
  884. package/out/concepts/View__.js +0 -2298
  885. package/out/concepts/View__.js.map +0 -1
  886. package/out/concepts/WhileStatement__.d.ts +0 -100
  887. package/out/concepts/WhileStatement__.js +0 -269
  888. package/out/concepts/WhileStatement__.js.map +0 -1
  889. package/out/concepts/basics/constants.d.ts +0 -1
  890. package/out/concepts/basics/constants.js +0 -6
  891. package/out/concepts/basics/constants.js.map +0 -1
  892. package/out/concepts/basics/stdlib/index.d.ts +0 -16
  893. package/out/concepts/basics/stdlib/index.js +0 -90
  894. package/out/concepts/basics/stdlib/index.js.map +0 -1
  895. package/out/concepts/basics/stdlib/nasl.auth.d.ts +0 -9
  896. package/out/concepts/basics/stdlib/nasl.auth.js +0 -206
  897. package/out/concepts/basics/stdlib/nasl.auth.js.map +0 -1
  898. package/out/concepts/basics/stdlib/nasl.browser.d.ts +0 -5
  899. package/out/concepts/basics/stdlib/nasl.browser.js +0 -158
  900. package/out/concepts/basics/stdlib/nasl.browser.js.map +0 -1
  901. package/out/concepts/basics/stdlib/nasl.collection.d.ts +0 -9
  902. package/out/concepts/basics/stdlib/nasl.collection.js +0 -57
  903. package/out/concepts/basics/stdlib/nasl.collection.js.map +0 -1
  904. package/out/concepts/basics/stdlib/nasl.configuration.d.ts +0 -5
  905. package/out/concepts/basics/stdlib/nasl.configuration.js +0 -65
  906. package/out/concepts/basics/stdlib/nasl.configuration.js.map +0 -1
  907. package/out/concepts/basics/stdlib/nasl.core.d.ts +0 -7
  908. package/out/concepts/basics/stdlib/nasl.core.js +0 -47
  909. package/out/concepts/basics/stdlib/nasl.core.js.map +0 -1
  910. package/out/concepts/basics/stdlib/nasl.event.d.ts +0 -5
  911. package/out/concepts/basics/stdlib/nasl.event.js +0 -34
  912. package/out/concepts/basics/stdlib/nasl.event.js.map +0 -1
  913. package/out/concepts/basics/stdlib/nasl.http.d.ts +0 -9
  914. package/out/concepts/basics/stdlib/nasl.http.js +0 -174
  915. package/out/concepts/basics/stdlib/nasl.http.js.map +0 -1
  916. package/out/concepts/basics/stdlib/nasl.interface.d.ts +0 -9
  917. package/out/concepts/basics/stdlib/nasl.interface.js +0 -49
  918. package/out/concepts/basics/stdlib/nasl.interface.js.map +0 -1
  919. package/out/concepts/basics/stdlib/nasl.io.d.ts +0 -5
  920. package/out/concepts/basics/stdlib/nasl.io.js +0 -61
  921. package/out/concepts/basics/stdlib/nasl.io.js.map +0 -1
  922. package/out/concepts/basics/stdlib/nasl.logging.d.ts +0 -5
  923. package/out/concepts/basics/stdlib/nasl.logging.js +0 -65
  924. package/out/concepts/basics/stdlib/nasl.logging.js.map +0 -1
  925. package/out/concepts/basics/stdlib/nasl.process.d.ts +0 -9
  926. package/out/concepts/basics/stdlib/nasl.process.js +0 -643
  927. package/out/concepts/basics/stdlib/nasl.process.js.map +0 -1
  928. package/out/concepts/basics/stdlib/nasl.ui.d.ts +0 -9
  929. package/out/concepts/basics/stdlib/nasl.ui.js +0 -1038
  930. package/out/concepts/basics/stdlib/nasl.ui.js.map +0 -1
  931. package/out/concepts/basics/stdlib/nasl.util.d.ts +0 -6
  932. package/out/concepts/basics/stdlib/nasl.util.js +0 -2285
  933. package/out/concepts/basics/stdlib/nasl.util.js.map +0 -1
  934. package/out/concepts/basics/stdlib/nasl.validation.d.ts +0 -5
  935. package/out/concepts/basics/stdlib/nasl.validation.js +0 -574
  936. package/out/concepts/basics/stdlib/nasl.validation.js.map +0 -1
  937. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +0 -4
  938. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +0 -47
  939. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +0 -1
  940. package/out/concepts/basics/stdlib/timeZone.d.ts +0 -5
  941. package/out/concepts/basics/stdlib/timeZone.js +0 -196
  942. package/out/concepts/basics/stdlib/timeZone.js.map +0 -1
  943. package/out/concepts/basics/types/coreTypeList.d.ts +0 -2
  944. package/out/concepts/basics/types/coreTypeList.js +0 -15
  945. package/out/concepts/basics/types/coreTypeList.js.map +0 -1
  946. package/out/concepts/basics/types/index.d.ts +0 -16
  947. package/out/concepts/basics/types/index.js +0 -35
  948. package/out/concepts/basics/types/index.js.map +0 -1
  949. package/out/concepts/index.d.ts +0 -7
  950. package/out/concepts/index.js +0 -41
  951. package/out/concepts/index.js.map +0 -1
  952. package/out/concepts/index__.d.ts +0 -138
  953. package/out/concepts/index__.js +0 -155
  954. package/out/concepts/index__.js.map +0 -1
  955. package/out/concepts/types__.d.ts +0 -0
  956. package/out/concepts/types__.js +0 -1
  957. package/out/concepts/types__.js.map +0 -1
  958. package/out/concepts/utils/asserts.d.ts +0 -6982
  959. package/out/concepts/utils/asserts.js +0 -9276
  960. package/out/concepts/utils/asserts.js.map +0 -1
  961. package/out/concepts/utils/quick-info.d.ts +0 -13
  962. package/out/concepts/utils/quick-info.js +0 -51
  963. package/out/concepts/utils/quick-info.js.map +0 -1
  964. package/out/concepts/utils/types.d.ts +0 -450
  965. package/out/concepts/utils/types.js +0 -3
  966. package/out/concepts/utils/types.js.map +0 -1
  967. package/out/config.d.ts +0 -43
  968. package/out/config.js +0 -72
  969. package/out/config.js.map +0 -1
  970. package/out/decorators/index.d.ts +0 -67
  971. package/out/decorators/index.js +0 -213
  972. package/out/decorators/index.js.map +0 -1
  973. package/out/decorators/promise.d.ts +0 -7
  974. package/out/decorators/promise.js +0 -28
  975. package/out/decorators/promise.js.map +0 -1
  976. package/out/enums/KEYWORDS.d.ts +0 -6
  977. package/out/enums/KEYWORDS.js +0 -1248
  978. package/out/enums/KEYWORDS.js.map +0 -1
  979. package/out/enums/LEVEL_NAME_MAP.d.ts +0 -26
  980. package/out/enums/LEVEL_NAME_MAP.js +0 -30
  981. package/out/enums/LEVEL_NAME_MAP.js.map +0 -1
  982. package/out/eventBus.d.ts +0 -3
  983. package/out/eventBus.js +0 -7
  984. package/out/eventBus.js.map +0 -1
  985. package/out/generator/compileComponent.d.ts +0 -11
  986. package/out/generator/compileComponent.js +0 -12
  987. package/out/generator/compileComponent.js.map +0 -1
  988. package/out/generator/genBundleFiles.d.ts +0 -37
  989. package/out/generator/genBundleFiles.js +0 -678
  990. package/out/generator/genBundleFiles.js.map +0 -1
  991. package/out/generator/genHash.d.ts +0 -7
  992. package/out/generator/genHash.js +0 -39
  993. package/out/generator/genHash.js.map +0 -1
  994. package/out/generator/genMetaData.d.ts +0 -31
  995. package/out/generator/genMetaData.js +0 -365
  996. package/out/generator/genMetaData.js.map +0 -1
  997. package/out/generator/genReleaseBody.d.ts +0 -72
  998. package/out/generator/genReleaseBody.js +0 -333
  999. package/out/generator/genReleaseBody.js.map +0 -1
  1000. package/out/generator/icestark.d.ts +0 -2
  1001. package/out/generator/icestark.js +0 -50
  1002. package/out/generator/icestark.js.map +0 -1
  1003. package/out/generator/index.d.ts +0 -7
  1004. package/out/generator/index.js +0 -24
  1005. package/out/generator/index.js.map +0 -1
  1006. package/out/generator/microApp.d.ts +0 -2
  1007. package/out/generator/microApp.js +0 -36
  1008. package/out/generator/microApp.js.map +0 -1
  1009. package/out/generator/permission.d.ts +0 -14
  1010. package/out/generator/permission.js +0 -296
  1011. package/out/generator/permission.js.map +0 -1
  1012. package/out/generator/qiankun.d.ts +0 -2
  1013. package/out/generator/qiankun.js +0 -54
  1014. package/out/generator/qiankun.js.map +0 -1
  1015. package/out/generator/styleReplacer.d.ts +0 -3
  1016. package/out/generator/styleReplacer.js +0 -68
  1017. package/out/generator/styleReplacer.js.map +0 -1
  1018. package/out/index.d.ts +0 -13
  1019. package/out/index.js +0 -67
  1020. package/out/index.js.map +0 -1
  1021. package/out/manager/diagnostic.d.ts +0 -35
  1022. package/out/manager/diagnostic.js +0 -64
  1023. package/out/manager/diagnostic.js.map +0 -1
  1024. package/out/manager/stepRecorder.d.ts +0 -20
  1025. package/out/manager/stepRecorder.js +0 -114
  1026. package/out/manager/stepRecorder.js.map +0 -1
  1027. package/out/natural/componentData.d.ts +0 -31
  1028. package/out/natural/componentData.js +0 -85
  1029. package/out/natural/componentData.js.map +0 -1
  1030. package/out/natural/genNaturalTS.d.ts +0 -3
  1031. package/out/natural/genNaturalTS.js +0 -87
  1032. package/out/natural/genNaturalTS.js.map +0 -1
  1033. package/out/natural/index.d.ts +0 -4
  1034. package/out/natural/index.js +0 -21
  1035. package/out/natural/index.js.map +0 -1
  1036. package/out/natural/naslStdlibMap.d.ts +0 -1
  1037. package/out/natural/naslStdlibMap.js +0 -35
  1038. package/out/natural/naslStdlibMap.js.map +0 -1
  1039. package/out/natural/prompt/analyzeClaims.d.ts +0 -1
  1040. package/out/natural/prompt/analyzeClaims.js +0 -21
  1041. package/out/natural/prompt/analyzeClaims.js.map +0 -1
  1042. package/out/natural/prompt/executeClaims.d.ts +0 -1
  1043. package/out/natural/prompt/executeClaims.js +0 -73
  1044. package/out/natural/prompt/executeClaims.js.map +0 -1
  1045. package/out/natural/transformTSCode.d.ts +0 -7
  1046. package/out/natural/transformTSCode.js +0 -931
  1047. package/out/natural/transformTSCode.js.map +0 -1
  1048. package/out/sentry/index.d.ts +0 -34
  1049. package/out/sentry/index.js +0 -149
  1050. package/out/sentry/index.js.map +0 -1
  1051. package/out/server/createUiTs.d.ts +0 -16
  1052. package/out/server/createUiTs.js +0 -296
  1053. package/out/server/createUiTs.js.map +0 -1
  1054. package/out/server/entity2LogicNamespace.d.ts +0 -10
  1055. package/out/server/entity2LogicNamespace.js +0 -382
  1056. package/out/server/entity2LogicNamespace.js.map +0 -1
  1057. package/out/server/event.d.ts +0 -30
  1058. package/out/server/event.js +0 -151
  1059. package/out/server/event.js.map +0 -1
  1060. package/out/server/extendBaseNode.d.ts +0 -1
  1061. package/out/server/extendBaseNode.js +0 -605
  1062. package/out/server/extendBaseNode.js.map +0 -1
  1063. package/out/server/formatTsUtils.d.ts +0 -36
  1064. package/out/server/formatTsUtils.js +0 -854
  1065. package/out/server/formatTsUtils.js.map +0 -1
  1066. package/out/server/getConnector.d.ts +0 -14
  1067. package/out/server/getConnector.js +0 -101
  1068. package/out/server/getConnector.js.map +0 -1
  1069. package/out/server/getExtensionModules.d.ts +0 -3
  1070. package/out/server/getExtensionModules.js +0 -34
  1071. package/out/server/getExtensionModules.js.map +0 -1
  1072. package/out/server/getFunctions.d.ts +0 -3
  1073. package/out/server/getFunctions.js +0 -20
  1074. package/out/server/getFunctions.js.map +0 -1
  1075. package/out/server/getInterfaces.d.ts +0 -2
  1076. package/out/server/getInterfaces.js +0 -48
  1077. package/out/server/getInterfaces.js.map +0 -1
  1078. package/out/server/getLogging.d.ts +0 -1
  1079. package/out/server/getLogging.js +0 -9
  1080. package/out/server/getLogging.js.map +0 -1
  1081. package/out/server/getLogics.d.ts +0 -5
  1082. package/out/server/getLogics.js +0 -430
  1083. package/out/server/getLogics.js.map +0 -1
  1084. package/out/server/getMemberIdentifier.d.ts +0 -17
  1085. package/out/server/getMemberIdentifier.js +0 -535
  1086. package/out/server/getMemberIdentifier.js.map +0 -1
  1087. package/out/server/getProcessComponents.d.ts +0 -2
  1088. package/out/server/getProcessComponents.js +0 -13
  1089. package/out/server/getProcessComponents.js.map +0 -1
  1090. package/out/server/getProcesses.d.ts +0 -33
  1091. package/out/server/getProcesses.js +0 -647
  1092. package/out/server/getProcesses.js.map +0 -1
  1093. package/out/server/getScope.d.ts +0 -13
  1094. package/out/server/getScope.js +0 -61
  1095. package/out/server/getScope.js.map +0 -1
  1096. package/out/server/getValidates.d.ts +0 -3
  1097. package/out/server/getValidates.js +0 -14
  1098. package/out/server/getValidates.js.map +0 -1
  1099. package/out/server/index.d.ts +0 -5
  1100. package/out/server/index.js +0 -43
  1101. package/out/server/index.js.map +0 -1
  1102. package/out/server/naslServer.d.ts +0 -372
  1103. package/out/server/naslServer.js +0 -4719
  1104. package/out/server/naslServer.js.map +0 -1
  1105. package/out/server/naslStdlibMap.d.ts +0 -2
  1106. package/out/server/naslStdlibMap.js +0 -54
  1107. package/out/server/naslStdlibMap.js.map +0 -1
  1108. package/out/server/process2LogicNamespace.d.ts +0 -26
  1109. package/out/server/process2LogicNamespace.js +0 -109
  1110. package/out/server/process2LogicNamespace.js.map +0 -1
  1111. package/out/server/translator.d.ts +0 -26
  1112. package/out/server/translator.js +0 -847
  1113. package/out/server/translator.js.map +0 -1
  1114. package/out/service/creator/add.configs.d.ts +0 -1
  1115. package/out/service/creator/add.configs.js +0 -103
  1116. package/out/service/creator/add.configs.js.map +0 -1
  1117. package/out/service/creator/errHandles.d.ts +0 -18
  1118. package/out/service/creator/errHandles.js +0 -71
  1119. package/out/service/creator/errHandles.js.map +0 -1
  1120. package/out/service/creator/index.d.ts +0 -1
  1121. package/out/service/creator/index.js +0 -87
  1122. package/out/service/creator/index.js.map +0 -1
  1123. package/out/service/datasource/api.d.ts +0 -12
  1124. package/out/service/datasource/api.js +0 -14
  1125. package/out/service/datasource/api.js.map +0 -1
  1126. package/out/service/datasource/index.d.ts +0 -2
  1127. package/out/service/datasource/index.js +0 -10
  1128. package/out/service/datasource/index.js.map +0 -1
  1129. package/out/service/defaultErrorMessage.json +0 -98
  1130. package/out/service/logic/api.d.ts +0 -9
  1131. package/out/service/logic/api.js +0 -11
  1132. package/out/service/logic/api.js.map +0 -1
  1133. package/out/service/logic/checktypeSocket.d.ts +0 -5
  1134. package/out/service/logic/checktypeSocket.js +0 -55
  1135. package/out/service/logic/checktypeSocket.js.map +0 -1
  1136. package/out/service/logic/index.d.ts +0 -2
  1137. package/out/service/logic/index.js +0 -10
  1138. package/out/service/logic/index.js.map +0 -1
  1139. package/out/service/storage/api.d.ts +0 -54
  1140. package/out/service/storage/api.js +0 -42
  1141. package/out/service/storage/api.js.map +0 -1
  1142. package/out/service/storage/index.d.ts +0 -2
  1143. package/out/service/storage/index.js +0 -10
  1144. package/out/service/storage/index.js.map +0 -1
  1145. package/out/service/storage/init.d.ts +0 -105
  1146. package/out/service/storage/init.js +0 -1232
  1147. package/out/service/storage/init.js.map +0 -1
  1148. package/out/service/storage/jsoner.d.ts +0 -36
  1149. package/out/service/storage/jsoner.js +0 -148
  1150. package/out/service/storage/jsoner.js.map +0 -1
  1151. package/out/service/storage/map.d.ts +0 -4
  1152. package/out/service/storage/map.js +0 -54
  1153. package/out/service/storage/map.js.map +0 -1
  1154. package/out/service/storage/service.d.ts +0 -25
  1155. package/out/service/storage/service.js +0 -80
  1156. package/out/service/storage/service.js.map +0 -1
  1157. package/out/service/storage/storagePoint.d.ts +0 -17
  1158. package/out/service/storage/storagePoint.js +0 -76
  1159. package/out/service/storage/storagePoint.js.map +0 -1
  1160. package/out/service/video/BaseService.d.ts +0 -7
  1161. package/out/service/video/BaseService.js +0 -61
  1162. package/out/service/video/BaseService.js.map +0 -1
  1163. package/out/service/video/MainCallbackService.d.ts +0 -12
  1164. package/out/service/video/MainCallbackService.js +0 -183
  1165. package/out/service/video/MainCallbackService.js.map +0 -1
  1166. package/out/service/video/VideoTranscribe.d.ts +0 -15
  1167. package/out/service/video/VideoTranscribe.js +0 -96
  1168. package/out/service/video/VideoTranscribe.js.map +0 -1
  1169. package/out/service/video/publishService.d.ts +0 -1
  1170. package/out/service/video/publishService.js +0 -58
  1171. package/out/service/video/publishService.js.map +0 -1
  1172. package/out/templator/genCallComponentLogic.d.ts +0 -17
  1173. package/out/templator/genCallComponentLogic.js +0 -29
  1174. package/out/templator/genCallComponentLogic.js.map +0 -1
  1175. package/out/templator/genCreateBlock.d.ts +0 -10
  1176. package/out/templator/genCreateBlock.js +0 -372
  1177. package/out/templator/genCreateBlock.js.map +0 -1
  1178. package/out/templator/genCurdEditMultipleKeyBlock.d.ts +0 -8
  1179. package/out/templator/genCurdEditMultipleKeyBlock.js +0 -527
  1180. package/out/templator/genCurdEditMultipleKeyBlock.js.map +0 -1
  1181. package/out/templator/genCurdMultipleKeyBlock.d.ts +0 -61
  1182. package/out/templator/genCurdMultipleKeyBlock.js +0 -1378
  1183. package/out/templator/genCurdMultipleKeyBlock.js.map +0 -1
  1184. package/out/templator/genEditTableBlock.d.ts +0 -51
  1185. package/out/templator/genEditTableBlock.js +0 -325
  1186. package/out/templator/genEditTableBlock.js.map +0 -1
  1187. package/out/templator/genEnumSelectBlock.d.ts +0 -10
  1188. package/out/templator/genEnumSelectBlock.js +0 -53
  1189. package/out/templator/genEnumSelectBlock.js.map +0 -1
  1190. package/out/templator/genGetBlock.d.ts +0 -6
  1191. package/out/templator/genGetBlock.js +0 -139
  1192. package/out/templator/genGetBlock.js.map +0 -1
  1193. package/out/templator/genGridViewBlock.d.ts +0 -55
  1194. package/out/templator/genGridViewBlock.js +0 -359
  1195. package/out/templator/genGridViewBlock.js.map +0 -1
  1196. package/out/templator/genListViewBlock.d.ts +0 -19
  1197. package/out/templator/genListViewBlock.js +0 -148
  1198. package/out/templator/genListViewBlock.js.map +0 -1
  1199. package/out/templator/genQueryComponent.d.ts +0 -34
  1200. package/out/templator/genQueryComponent.js +0 -344
  1201. package/out/templator/genQueryComponent.js.map +0 -1
  1202. package/out/templator/genSelectBlock.d.ts +0 -45
  1203. package/out/templator/genSelectBlock.js +0 -415
  1204. package/out/templator/genSelectBlock.js.map +0 -1
  1205. package/out/templator/genTableBlock.d.ts +0 -55
  1206. package/out/templator/genTableBlock.js +0 -417
  1207. package/out/templator/genTableBlock.js.map +0 -1
  1208. package/out/templator/genUpdateBlock.d.ts +0 -6
  1209. package/out/templator/genUpdateBlock.js +0 -414
  1210. package/out/templator/genUpdateBlock.js.map +0 -1
  1211. package/out/templator/index.d.ts +0 -19
  1212. package/out/templator/index.js +0 -38
  1213. package/out/templator/index.js.map +0 -1
  1214. package/out/templator/utils.d.ts +0 -683
  1215. package/out/templator/utils.js +0 -472
  1216. package/out/templator/utils.js.map +0 -1
  1217. package/out/translator/constant.d.ts +0 -6
  1218. package/out/translator/constant.js +0 -10
  1219. package/out/translator/constant.js.map +0 -1
  1220. package/out/translator/index.d.ts +0 -3
  1221. package/out/translator/index.js +0 -20
  1222. package/out/translator/index.js.map +0 -1
  1223. package/out/translator/types.d.ts +0 -48
  1224. package/out/translator/types.js +0 -3
  1225. package/out/translator/types.js.map +0 -1
  1226. package/out/translator/utils.d.ts +0 -44
  1227. package/out/translator/utils.js +0 -241
  1228. package/out/translator/utils.js.map +0 -1
  1229. package/out/utils/cookie.d.ts +0 -9
  1230. package/out/utils/cookie.js +0 -62
  1231. package/out/utils/cookie.js.map +0 -1
  1232. package/out/utils/env.d.ts +0 -2
  1233. package/out/utils/env.js +0 -6
  1234. package/out/utils/env.js.map +0 -1
  1235. package/out/utils/i18nInfo.d.ts +0 -5
  1236. package/out/utils/i18nInfo.js +0 -36
  1237. package/out/utils/i18nInfo.js.map +0 -1
  1238. package/out/utils/index.d.ts +0 -61
  1239. package/out/utils/index.js +0 -386
  1240. package/out/utils/index.js.map +0 -1
  1241. package/out/utils/logger.d.ts +0 -7
  1242. package/out/utils/logger.js +0 -23
  1243. package/out/utils/logger.js.map +0 -1
  1244. package/out/utils/sortTsString.d.ts +0 -1
  1245. package/out/utils/sortTsString.js +0 -44
  1246. package/out/utils/sortTsString.js.map +0 -1
  1247. package/out/utils/string.d.ts +0 -52
  1248. package/out/utils/string.js +0 -139
  1249. package/out/utils/string.js.map +0 -1
  1250. package/out/utils/time-slicing/constant.d.ts +0 -35
  1251. package/out/utils/time-slicing/constant.js +0 -40
  1252. package/out/utils/time-slicing/constant.js.map +0 -1
  1253. package/out/utils/time-slicing/controller.d.ts +0 -53
  1254. package/out/utils/time-slicing/controller.js +0 -294
  1255. package/out/utils/time-slicing/controller.js.map +0 -1
  1256. package/out/utils/time-slicing/index.d.ts +0 -5
  1257. package/out/utils/time-slicing/index.js +0 -26
  1258. package/out/utils/time-slicing/index.js.map +0 -1
  1259. package/out/utils/time-slicing/page-state.d.ts +0 -2
  1260. package/out/utils/time-slicing/page-state.js +0 -14
  1261. package/out/utils/time-slicing/page-state.js.map +0 -1
  1262. package/out/utils/time-slicing/performance.d.ts +0 -11
  1263. package/out/utils/time-slicing/performance.js +0 -50
  1264. package/out/utils/time-slicing/performance.js.map +0 -1
  1265. package/out/utils/time-slicing/runner.d.ts +0 -12
  1266. package/out/utils/time-slicing/runner.js +0 -52
  1267. package/out/utils/time-slicing/runner.js.map +0 -1
  1268. package/out/utils/time-slicing/tool.d.ts +0 -24
  1269. package/out/utils/time-slicing/tool.js +0 -47
  1270. package/out/utils/time-slicing/tool.js.map +0 -1
  1271. package/out/utils/time-slicing/utils.d.ts +0 -62
  1272. package/out/utils/time-slicing/utils.js +0 -47
  1273. package/out/utils/time-slicing/utils.js.map +0 -1
  1274. package/out/utils/time-slicing/wrapper.d.ts +0 -18
  1275. package/out/utils/time-slicing/wrapper.js +0 -55
  1276. package/out/utils/time-slicing/wrapper.js.map +0 -1
  1277. package/out/utils/traverse.d.ts +0 -36
  1278. package/out/utils/traverse.js +0 -143
  1279. package/out/utils/traverse.js.map +0 -1
  1280. package/out/utils/types.d.ts +0 -13
  1281. package/out/utils/types.js +0 -3
  1282. package/out/utils/types.js.map +0 -1
  1283. package/out/utils/window.d.ts +0 -7
  1284. package/out/utils/window.js +0 -14
  1285. package/out/utils/window.js.map +0 -1
@@ -1,2482 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- var __importDefault = (this && this.__importDefault) || function (mod) {
32
- return (mod && mod.__esModule) ? mod : { "default": mod };
33
- };
34
- var ViewElement_1;
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.ViewElement = void 0;
37
- const time_slicing_1 = require("../utils/time-slicing");
38
- const translator_1 = require("../translator");
39
- const concepts_1 = require("../concepts");
40
- const babelParser = __importStar(require("@babel/parser"));
41
- const json5 = __importStar(require("json5"));
42
- const compiler = __importStar(require("vue-template-compiler"));
43
- const LogicItem__1 = require("./LogicItem__");
44
- const Logic__1 = require("./Logic__");
45
- const config_1 = require("../config");
46
- const View__1 = require("./View__");
47
- const utils_1 = require("../utils");
48
- /**
49
- * 自闭合标签
50
- */
51
- const selfClosingTag = [
52
- 'base',
53
- 'meta',
54
- 'area',
55
- 'embed',
56
- 'link',
57
- 'img',
58
- 'input',
59
- 'param',
60
- 'hr',
61
- 'br',
62
- 'source',
63
- 'track',
64
- 'wbr',
65
- 'col',
66
- ];
67
- function genArgumentMemberExpression(arr) {
68
- let expressionNode;
69
- const propertyName = arr.pop();
70
- if (arr.length >= 1) {
71
- expressionNode = {
72
- concept: 'MemberExpression',
73
- name: '',
74
- kind: 'Expression',
75
- object: genArgumentMemberExpression(arr),
76
- property: {
77
- concept: 'Identifier',
78
- kind: 'Expression',
79
- name: propertyName,
80
- },
81
- };
82
- }
83
- else {
84
- return {
85
- concept: 'Identifier',
86
- kind: 'Expression',
87
- name: propertyName,
88
- };
89
- }
90
- return expressionNode;
91
- }
92
- function transAstNodeToNaslNode(astNode, namespace) {
93
- let node = null;
94
- if (astNode.type === 'CallExpression' && astNode.callee.object.name === '$utils') {
95
- const calleeName = astNode.callee.property.name || astNode.callee.property.value;
96
- node = {
97
- concept: 'CallFunction',
98
- name: '',
99
- label: '调用内置函数',
100
- kind: 'Expression',
101
- calleeNamespace: 'nasl.util',
102
- calleeName,
103
- arguments: astNode.arguments
104
- .map((argument) => ({
105
- concept: 'Argument',
106
- name: '',
107
- kind: 'Statement',
108
- keyword: '',
109
- expression: transAstNodeToNaslNode(Object.assign({}, argument)),
110
- }))
111
- .filter((item) => item.expression),
112
- typeArguments: astNode.arguments
113
- .map((argument) => transAstNodeToNaslTypeNode(Object.assign({}, argument)))
114
- .filter((item) => item),
115
- };
116
- }
117
- else if (astNode.type === 'MemberExpression') {
118
- if (astNode.object?.name === '$global') {
119
- if (astNode.property?.name === 'userInfo') {
120
- // 目前只有权限相关的
121
- node = transAstNodeToNaslNode(astNode.property, 'nasl.auth');
122
- }
123
- else if (astNode.property?.name === 'frontendVariables') {
124
- node = 'app.frontendVariables';
125
- }
126
- }
127
- else if (astNode.object?.name === 'frontendVariables') {
128
- node = transAstNodeToNaslNode(astNode.property, 'app.frontendVariables');
129
- }
130
- else {
131
- const object = transAstNodeToNaslNode(astNode.object);
132
- // object如果返回字符串,则将它当成namespace处理
133
- if (Object.prototype.toString.call(object) === '[object String]') {
134
- node = transAstNodeToNaslNode(astNode.property, object);
135
- }
136
- else {
137
- const property = transAstNodeToNaslNode(astNode.property);
138
- node = {
139
- concept: 'MemberExpression',
140
- name: '',
141
- kind: 'Expression',
142
- object,
143
- property,
144
- };
145
- }
146
- }
147
- }
148
- else if (astNode.type === 'Identifier') {
149
- node = {
150
- concept: 'Identifier',
151
- namespace: namespace || '',
152
- name: astNode.name,
153
- kind: 'Expression',
154
- };
155
- }
156
- else if (astNode.type === 'ArrayExpression' || astNode.type === 'ObjectExpression') {
157
- node = {
158
- concept: 'Unparsed',
159
- label: '原子项',
160
- code: astNode.value,
161
- };
162
- }
163
- else if (astNode.type === 'TemplateLiteral') {
164
- // 模板字符串翻译成字符串插值
165
- const { expressions, quasis } = astNode;
166
- node = {
167
- concept: 'StringInterpolation',
168
- kind: 'Expression',
169
- name: '',
170
- expressions: [...(quasis || []), ...(expressions || [])]
171
- .sort((node1, node2) => {
172
- return node1.start - node2.start;
173
- })
174
- .map((node) => {
175
- return transAstNodeToNaslNode(node);
176
- }),
177
- };
178
- }
179
- else if (astNode.type === 'TemplateElement') {
180
- node = {
181
- concept: 'StringLiteral',
182
- kind: 'Expression',
183
- name: '',
184
- value: astNode.value?.raw,
185
- };
186
- }
187
- else if (astNode.type === 'StringLiteral') {
188
- // 单独特殊处理枚举因为他不是MemberExpression,而是Identifier_
189
- if (astNode?.value?.startsWith('__enumTypeAnnotation_')) {
190
- return null;
191
- }
192
- else {
193
- node = {
194
- concept: 'StringLiteral',
195
- kind: 'Expression',
196
- name: '',
197
- value: astNode.value,
198
- };
199
- }
200
- }
201
- else if (astNode.type === 'UnaryExpression') {
202
- const argument = astNode.argument;
203
- if (argument.type === 'NumericLiteral') {
204
- node = {
205
- concept: 'NumericLiteral',
206
- value: astNode.operator + argument.value,
207
- };
208
- }
209
- else {
210
- node = {
211
- concept: 'UnaryExpression',
212
- kind: 'Expression',
213
- name: '',
214
- operator: astNode.operator,
215
- argument: transAstNodeToNaslNode(astNode.argument),
216
- };
217
- }
218
- }
219
- else if (astNode.type === 'NumericLiteral') {
220
- const numberString = typeof astNode.value === 'number' ? astNode.value.toString() : astNode.value;
221
- node = {
222
- concept: 'NumericLiteral',
223
- value: numberString,
224
- };
225
- }
226
- else if (astNode.type === 'ArrowFunctionExpression') {
227
- if (astNode.body?.callee?.name) {
228
- astNode.name = astNode.body.callee.name;
229
- }
230
- let tempNode = {
231
- calleeNamespace: 'app.logics',
232
- concept: 'CallLogic',
233
- namespace: namespace || '',
234
- name: astNode.name,
235
- calleeName: astNode.name,
236
- kind: 'Expression',
237
- parentNode: astNode.parentNode,
238
- parentKey: astNode.parentKey,
239
- arguments: astNode?.body?.arguments
240
- ?.map((argument) => ({
241
- concept: 'Argument',
242
- name: '',
243
- kind: 'Statement',
244
- keyword: '',
245
- expression: transAstNodeToNaslNode(Object.assign({}, argument)),
246
- }))
247
- .filter((item) => item.expression),
248
- typeArguments: astNode?.body?.arguments
249
- ?.map((argument) => transAstNodeToNaslTypeNode(Object.assign({}, argument)))
250
- .filter((item) => item),
251
- };
252
- node = Logic__1.Logic.from({
253
- ...tempNode,
254
- }, undefined, 'logics');
255
- }
256
- else {
257
- node = astNode;
258
- node.concept = astNode.type;
259
- }
260
- return node;
261
- }
262
- function transAstNodeToNaslTypeNode(astNode, namespace) {
263
- let node = null;
264
- // 单独特殊处理枚举因为他不是MemberExpression,而是Identifier_
265
- if (astNode?.value?.startsWith('__enumTypeAnnotation_')) {
266
- const valueArr = astNode.value.replace('__enumTypeAnnotation_', '')?.split('.');
267
- const name = valueArr.pop();
268
- const namespace = valueArr.join('.');
269
- node = {
270
- concept: 'TypeAnnotation',
271
- typeNamespace: namespace || '',
272
- typeName: name || '',
273
- typeKind: 'reference',
274
- };
275
- }
276
- return node;
277
- }
278
- function isLockField(node) {
279
- if (!node || node.concept !== 'ViewElement')
280
- return false;
281
- const attr = node?.bindAttrs?.find((attr) => ['FormDesignerLocked', 'TableDesignerLocked'].includes(attr.name))?.value;
282
- if (attr === undefined)
283
- return !!isLockField(node?.parentNode);
284
- else
285
- return !!attr;
286
- }
287
- const decorators_1 = require("../decorators");
288
- const utils = __importStar(require("../utils"));
289
- const asserts = __importStar(require("./utils/asserts"));
290
- const uuid_1 = require("uuid");
291
- const BaseNode_1 = __importDefault(require("../common/BaseNode"));
292
- /**
293
- * 页面元素
294
- */
295
- let ViewElement = ViewElement_1 = class ViewElement extends BaseNode_1.default {
296
- /**
297
- * @param source 需要合并的部分参数
298
- */
299
- constructor(source) {
300
- source = Object.assign({}, ViewElement_1.getDefaultOptions(), source);
301
- super(source);
302
- /**
303
- * 元素绑定属性列表
304
- */
305
- this.bindAttrs = [];
306
- /**
307
- * 元素绑定事件列表
308
- */
309
- this.bindEvents = [];
310
- /**
311
- * 元素指令列表
312
- */
313
- this.bindDirectives = [];
314
- /**
315
- * 绑定的角色
316
- */
317
- this.bindRoles = [];
318
- /**
319
- * 元素绑定样式列表
320
- */
321
- this.bindStyles = [];
322
- /**
323
- * 子元素列表
324
- */
325
- this.children = [];
326
- this.computedStyle = {};
327
- super.subConstructor(source);
328
- }
329
- /**
330
- * 祖先 View
331
- */
332
- get view() {
333
- return this.getAncestor('View');
334
- }
335
- /**
336
- * 祖先 Module
337
- */
338
- get module() {
339
- return this.getAncestor('Module');
340
- }
341
- /**
342
- * 祖先 App
343
- */
344
- get app() {
345
- return this.getAncestor('App');
346
- }
347
- /**
348
- * 祖先 Frontend
349
- */
350
- get frontend() {
351
- return this.getAncestor('Frontend');
352
- }
353
- /**
354
- * 从父级删除该节点
355
- * @internal
356
- */
357
- _delete() {
358
- let params = null;
359
- if (this.parentNode) {
360
- params = this.parentNode?.__removeViewElement?.(this);
361
- }
362
- return params;
363
- }
364
- /**
365
- * 设置页面元素名称
366
- */
367
- setName(name) {
368
- const object = {
369
- name,
370
- };
371
- this.update({
372
- ...object,
373
- field: 'name',
374
- });
375
- }
376
- /**
377
- * 设置静态 style
378
- */
379
- setStaticStyle(staticStyle) {
380
- const object = {
381
- staticStyle,
382
- };
383
- this.update({
384
- ...object,
385
- });
386
- }
387
- /**
388
- * 设置权限资源描述
389
- */
390
- setAuthDescription(authDescription) {
391
- const object = {
392
- authDescription,
393
- };
394
- this.update({
395
- ...object,
396
- });
397
- }
398
- getBindAttributeExistingNames(excludedList = []) {
399
- const excludedSet = new Set(excludedList);
400
- return (this.bindAttrs || [])
401
- .filter((item) => !excludedSet.has(item))
402
- .map((item) => item?.name);
403
- }
404
- getBindAttributeUniqueName(name = 'bindAttribute1') {
405
- return utils.unique(name, this.getBindAttributeExistingNames(), undefined, false);
406
- }
407
- _insertBindAttributeAt(options, index) {
408
- const bindAttributeOptions = {};
409
- const relationOptions = { parentNode: this, parentKey: 'bindAttrs' };
410
- const BindAttribute = (0, decorators_1.getConceptConstructor)('BindAttribute');
411
- let bindAttribute;
412
- if (!options) {
413
- bindAttribute = BindAttribute.from({
414
- ...bindAttributeOptions,
415
- name: this.getBindAttributeUniqueName(),
416
- }, this, 'bindAttrs');
417
- }
418
- else if (typeof options === 'string') {
419
- bindAttribute = BindAttribute.from({
420
- ...bindAttributeOptions,
421
- name: options,
422
- }, this, 'bindAttrs');
423
- }
424
- else if (asserts.isBindAttribute(options)) {
425
- options.ensureDelete(); // 同一实例不支持多处存在
426
- bindAttribute = options;
427
- Object.assign(bindAttribute, relationOptions);
428
- }
429
- else {
430
- bindAttribute = BindAttribute.from({
431
- ...bindAttributeOptions,
432
- ...options,
433
- }, this, 'bindAttrs');
434
- }
435
- this.bindAttrs.splice(index, 0, bindAttribute);
436
- return bindAttribute;
437
- }
438
- insertBindAttributeAt(options, index) {
439
- const node = this._insertBindAttributeAt(options, index);
440
- node.create({
441
- index,
442
- parentNode: this,
443
- parentKey: 'bindAttrs',
444
- });
445
- return node;
446
- }
447
- _addBindAttribute(options) {
448
- const index = this.bindAttrs.length;
449
- return this._insertBindAttributeAt(options, index);
450
- }
451
- addBindAttribute(options) {
452
- const node = this._addBindAttribute(options);
453
- const index = this.bindAttrs.indexOf(node);
454
- node.create({
455
- index,
456
- parentNode: this,
457
- parentKey: 'bindAttrs',
458
- });
459
- return node;
460
- }
461
- getBindEventExistingNames(excludedList = []) {
462
- const excludedSet = new Set(excludedList);
463
- return (this.bindEvents || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
464
- }
465
- getBindEventUniqueName(name = 'bindEvent1') {
466
- return utils.unique(name, this.getBindEventExistingNames(), undefined, false);
467
- }
468
- _insertBindEventAt(options, index) {
469
- const bindEventOptions = {};
470
- const relationOptions = { parentNode: this, parentKey: 'bindEvents' };
471
- const BindEvent = (0, decorators_1.getConceptConstructor)('BindEvent');
472
- let bindEvent;
473
- if (!options) {
474
- bindEvent = BindEvent.from({
475
- ...bindEventOptions,
476
- name: this.getBindEventUniqueName(),
477
- }, this, 'bindEvents');
478
- }
479
- else if (typeof options === 'string') {
480
- bindEvent = BindEvent.from({
481
- ...bindEventOptions,
482
- name: options,
483
- }, this, 'bindEvents');
484
- }
485
- else if (asserts.isBindEvent(options)) {
486
- options.ensureDelete(); // 同一实例不支持多处存在
487
- bindEvent = options;
488
- Object.assign(bindEvent, relationOptions);
489
- }
490
- else {
491
- bindEvent = BindEvent.from({
492
- ...bindEventOptions,
493
- ...options,
494
- }, this, 'bindEvents');
495
- }
496
- this.bindEvents.splice(index, 0, bindEvent);
497
- return bindEvent;
498
- }
499
- insertBindEventAt(options, index) {
500
- const node = this._insertBindEventAt(options, index);
501
- node.create({
502
- index,
503
- parentNode: this,
504
- parentKey: 'bindEvents',
505
- });
506
- return node;
507
- }
508
- _addBindEvent(options) {
509
- const index = this.bindEvents.length;
510
- return this._insertBindEventAt(options, index);
511
- }
512
- addBindEvent(options) {
513
- const node = this._addBindEvent(options);
514
- const index = this.bindEvents.indexOf(node);
515
- node.create({
516
- index,
517
- parentNode: this,
518
- parentKey: 'bindEvents',
519
- });
520
- return node;
521
- }
522
- getBindDirectiveExistingNames(excludedList = []) {
523
- const excludedSet = new Set(excludedList);
524
- return (this.bindDirectives || [])
525
- .filter((item) => !excludedSet.has(item))
526
- .map((item) => item?.name);
527
- }
528
- getBindDirectiveUniqueName(name = 'bindDirective1') {
529
- return utils.unique(name, this.getBindDirectiveExistingNames(), undefined, false);
530
- }
531
- _insertBindDirectiveAt(options, index) {
532
- const bindDirectiveOptions = {};
533
- const relationOptions = { parentNode: this, parentKey: 'bindDirectives' };
534
- const BindDirective = (0, decorators_1.getConceptConstructor)('BindDirective');
535
- let bindDirective;
536
- if (!options) {
537
- bindDirective = BindDirective.from({
538
- ...bindDirectiveOptions,
539
- name: this.getBindDirectiveUniqueName(),
540
- }, this, 'bindDirectives');
541
- }
542
- else if (typeof options === 'string') {
543
- bindDirective = BindDirective.from({
544
- ...bindDirectiveOptions,
545
- name: options,
546
- }, this, 'bindDirectives');
547
- }
548
- else if (asserts.isBindDirective(options)) {
549
- options.ensureDelete(); // 同一实例不支持多处存在
550
- bindDirective = options;
551
- Object.assign(bindDirective, relationOptions);
552
- }
553
- else {
554
- bindDirective = BindDirective.from({
555
- ...bindDirectiveOptions,
556
- ...options,
557
- }, this, 'bindDirectives');
558
- }
559
- this.bindDirectives.splice(index, 0, bindDirective);
560
- return bindDirective;
561
- }
562
- insertBindDirectiveAt(options, index) {
563
- const node = this._insertBindDirectiveAt(options, index);
564
- node.create({
565
- index,
566
- parentNode: this,
567
- parentKey: 'bindDirectives',
568
- });
569
- return node;
570
- }
571
- _addBindDirective(options) {
572
- const index = this.bindDirectives.length;
573
- return this._insertBindDirectiveAt(options, index);
574
- }
575
- addBindDirective(options) {
576
- const node = this._addBindDirective(options);
577
- const index = this.bindDirectives.indexOf(node);
578
- node.create({
579
- index,
580
- parentNode: this,
581
- parentKey: 'bindDirectives',
582
- });
583
- return node;
584
- }
585
- getBindStyleExistingNames(excludedList = []) {
586
- const excludedSet = new Set(excludedList);
587
- return (this.bindStyles || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
588
- }
589
- getBindStyleUniqueName(name = 'bindStyle1') {
590
- return utils.unique(name, this.getBindStyleExistingNames(), undefined, false);
591
- }
592
- _insertBindStyleAt(options, index) {
593
- const bindStyleOptions = {};
594
- const relationOptions = { parentNode: this, parentKey: 'bindStyles' };
595
- const BindStyle = (0, decorators_1.getConceptConstructor)('BindStyle');
596
- let bindStyle;
597
- if (!options) {
598
- bindStyle = BindStyle.from({
599
- ...bindStyleOptions,
600
- name: this.getBindStyleUniqueName(),
601
- }, this, 'bindStyles');
602
- }
603
- else if (typeof options === 'string') {
604
- bindStyle = BindStyle.from({
605
- ...bindStyleOptions,
606
- name: options,
607
- }, this, 'bindStyles');
608
- }
609
- else if (asserts.isBindStyle(options)) {
610
- options.ensureDelete(); // 同一实例不支持多处存在
611
- bindStyle = options;
612
- Object.assign(bindStyle, relationOptions);
613
- }
614
- else {
615
- bindStyle = BindStyle.from({
616
- ...bindStyleOptions,
617
- ...options,
618
- }, this, 'bindStyles');
619
- }
620
- this.bindStyles.splice(index, 0, bindStyle);
621
- return bindStyle;
622
- }
623
- insertBindStyleAt(options, index) {
624
- const node = this._insertBindStyleAt(options, index);
625
- node.create({
626
- index,
627
- parentNode: this,
628
- parentKey: 'bindStyles',
629
- });
630
- return node;
631
- }
632
- _addBindStyle(options) {
633
- const index = this.bindStyles.length;
634
- return this._insertBindStyleAt(options, index);
635
- }
636
- addBindStyle(options) {
637
- const node = this._addBindStyle(options);
638
- const index = this.bindStyles.indexOf(node);
639
- node.create({
640
- index,
641
- parentNode: this,
642
- parentKey: 'bindStyles',
643
- });
644
- return node;
645
- }
646
- _insertViewElementAt(options, index) {
647
- const viewElementOptions = {};
648
- const relationOptions = { parentNode: this, parentKey: 'children' };
649
- const ViewElement = (0, decorators_1.getConceptConstructor)('ViewElement');
650
- let viewElement;
651
- if (!options) {
652
- viewElement = ViewElement.from({
653
- ...viewElementOptions,
654
- name: this.getViewElementUniqueName(),
655
- }, this, 'children');
656
- }
657
- else if (typeof options === 'string') {
658
- viewElement = ViewElement.from({
659
- ...viewElementOptions,
660
- name: options,
661
- }, this, 'children');
662
- }
663
- else if (asserts.isViewElement(options)) {
664
- options.ensureDelete(); // 同一实例不支持多处存在
665
- viewElement = options;
666
- Object.assign(viewElement, relationOptions);
667
- }
668
- else {
669
- viewElement = ViewElement.from({
670
- ...viewElementOptions,
671
- ...options,
672
- }, this, 'children');
673
- }
674
- this.children.splice(index, 0, viewElement);
675
- return viewElement;
676
- }
677
- insertViewElementAt(options, index) {
678
- const node = this._insertViewElementAt(options, index);
679
- node.create({
680
- index,
681
- parentNode: this,
682
- parentKey: 'children',
683
- });
684
- return node;
685
- }
686
- _addViewElement(options) {
687
- const index = this.children.length;
688
- return this._insertViewElementAt(options, index);
689
- }
690
- addViewElement(options) {
691
- const node = this._addViewElement(options);
692
- const index = this.children.indexOf(node);
693
- node.create({
694
- index,
695
- parentNode: this,
696
- parentKey: 'children',
697
- });
698
- return node;
699
- }
700
- removeBindAttribute(options) {
701
- let bindAttribute;
702
- if (typeof options === 'string') {
703
- bindAttribute = this.bindAttrs.find((item) => item.name === options);
704
- if (!bindAttribute) {
705
- throw new Error('找不到元素绑定属性 ' + options);
706
- }
707
- }
708
- else {
709
- bindAttribute = options;
710
- }
711
- return bindAttribute.delete();
712
- }
713
- __removeBindAttribute(bindAttribute) {
714
- const parentKey = bindAttribute.parentKey;
715
- const params = {
716
- parentNode: this,
717
- parentKey,
718
- index: -1,
719
- object: null,
720
- oldObject: bindAttribute,
721
- };
722
- if (parentKey) {
723
- params.parentKey = parentKey;
724
- // @ts-ignore
725
- const t = this.__v_raw || this;
726
- // @ts-ignore
727
- const n = bindAttribute.__v_raw || bindAttribute;
728
- if (Array.isArray(t[parentKey])) {
729
- // @ts-ignore
730
- const index = t[parentKey].findIndex((el) => (el.__v_raw || el) === n);
731
- ~index && this[parentKey].splice(index, 1);
732
- params.index = index;
733
- }
734
- else {
735
- const q = t[parentKey];
736
- if ((q.__v_raw || q) === n) {
737
- params.index = 0;
738
- this[parentKey] = undefined;
739
- }
740
- }
741
- }
742
- return params;
743
- }
744
- removeBindEvent(options) {
745
- let bindEvent;
746
- if (typeof options === 'string') {
747
- bindEvent = this.bindEvents.find((item) => item.name === options);
748
- if (!bindEvent) {
749
- throw new Error('找不到元素绑定事件 ' + options);
750
- }
751
- }
752
- else {
753
- bindEvent = options;
754
- }
755
- return bindEvent.delete();
756
- }
757
- __removeBindEvent(bindEvent) {
758
- const parentKey = bindEvent.parentKey;
759
- const params = {
760
- parentNode: this,
761
- parentKey,
762
- index: -1,
763
- object: null,
764
- oldObject: bindEvent,
765
- };
766
- if (parentKey) {
767
- params.parentKey = parentKey;
768
- // @ts-ignore
769
- const t = this.__v_raw || this;
770
- // @ts-ignore
771
- const n = bindEvent.__v_raw || bindEvent;
772
- if (Array.isArray(t[parentKey])) {
773
- // @ts-ignore
774
- const index = t[parentKey].findIndex((el) => (el.__v_raw || el) === n);
775
- ~index && this[parentKey].splice(index, 1);
776
- params.index = index;
777
- }
778
- else {
779
- const q = t[parentKey];
780
- if ((q.__v_raw || q) === n) {
781
- params.index = 0;
782
- this[parentKey] = undefined;
783
- }
784
- }
785
- }
786
- return params;
787
- }
788
- removeBindDirective(options) {
789
- let bindDirective;
790
- if (typeof options === 'string') {
791
- bindDirective = this.bindDirectives.find((item) => item.name === options);
792
- if (!bindDirective) {
793
- throw new Error('找不到元素指令 ' + options);
794
- }
795
- }
796
- else {
797
- bindDirective = options;
798
- }
799
- return bindDirective.delete();
800
- }
801
- __removeBindDirective(bindDirective) {
802
- const parentKey = bindDirective.parentKey;
803
- const params = {
804
- parentNode: this,
805
- parentKey,
806
- index: -1,
807
- object: null,
808
- oldObject: bindDirective,
809
- };
810
- if (parentKey) {
811
- params.parentKey = parentKey;
812
- // @ts-ignore
813
- const t = this.__v_raw || this;
814
- // @ts-ignore
815
- const n = bindDirective.__v_raw || bindDirective;
816
- if (Array.isArray(t[parentKey])) {
817
- // @ts-ignore
818
- const index = t[parentKey].findIndex((el) => (el.__v_raw || el) === n);
819
- ~index && this[parentKey].splice(index, 1);
820
- params.index = index;
821
- }
822
- else {
823
- const q = t[parentKey];
824
- if ((q.__v_raw || q) === n) {
825
- params.index = 0;
826
- this[parentKey] = undefined;
827
- }
828
- }
829
- }
830
- return params;
831
- }
832
- removeBindStyle(options) {
833
- let bindStyle;
834
- if (typeof options === 'string') {
835
- bindStyle = this.bindStyles.find((item) => item.name === options);
836
- if (!bindStyle) {
837
- throw new Error('找不到元素绑定样式 ' + options);
838
- }
839
- }
840
- else {
841
- bindStyle = options;
842
- }
843
- return bindStyle.delete();
844
- }
845
- __removeBindStyle(bindStyle) {
846
- const parentKey = bindStyle.parentKey;
847
- const params = {
848
- parentNode: this,
849
- parentKey,
850
- index: -1,
851
- object: null,
852
- oldObject: bindStyle,
853
- };
854
- if (parentKey) {
855
- params.parentKey = parentKey;
856
- // @ts-ignore
857
- const t = this.__v_raw || this;
858
- // @ts-ignore
859
- const n = bindStyle.__v_raw || bindStyle;
860
- if (Array.isArray(t[parentKey])) {
861
- // @ts-ignore
862
- const index = t[parentKey].findIndex((el) => (el.__v_raw || el) === n);
863
- ~index && this[parentKey].splice(index, 1);
864
- params.index = index;
865
- }
866
- else {
867
- const q = t[parentKey];
868
- if ((q.__v_raw || q) === n) {
869
- params.index = 0;
870
- this[parentKey] = undefined;
871
- }
872
- }
873
- }
874
- return params;
875
- }
876
- removeViewElement(options) {
877
- let viewElement;
878
- if (typeof options === 'string') {
879
- viewElement = this.children.find((item) => item.name === options);
880
- if (!viewElement) {
881
- throw new Error('找不到页面元素 ' + options);
882
- }
883
- }
884
- else {
885
- viewElement = options;
886
- }
887
- return viewElement.delete();
888
- }
889
- __removeViewElement(viewElement) {
890
- const parentKey = viewElement.parentKey;
891
- const params = {
892
- parentNode: this,
893
- parentKey,
894
- index: -1,
895
- object: null,
896
- oldObject: viewElement,
897
- };
898
- if (parentKey) {
899
- params.parentKey = parentKey;
900
- // @ts-ignore
901
- const t = this.__v_raw || this;
902
- // @ts-ignore
903
- const n = viewElement.__v_raw || viewElement;
904
- if (Array.isArray(t[parentKey])) {
905
- // @ts-ignore
906
- const index = t[parentKey].findIndex((el) => (el.__v_raw || el) === n);
907
- ~index && this[parentKey].splice(index, 1);
908
- params.index = index;
909
- }
910
- else {
911
- const q = t[parentKey];
912
- if ((q.__v_raw || q) === n) {
913
- params.index = 0;
914
- this[parentKey] = undefined;
915
- }
916
- }
917
- }
918
- return params;
919
- }
920
- //================================================================================
921
- // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
922
- // 自动生成的代码已结束。下面可以手动编写。
923
- //================================================================================
924
- get likeComponent() {
925
- return this.view || this?.getAncestor('BusinessComponent');
926
- }
927
- /* 主页面有没有权限 */
928
- get parentAuth() {
929
- const _nameSpace = this.view.getNamespace();
930
- const mainViewName = _nameSpace.split('.')[2];
931
- return this.view.parentNode.concept === 'App'
932
- ? this.view.auth
933
- : this.frontend.views.find((item) => item.name === mainViewName)?.auth;
934
- }
935
- // IDE内展示需要屏蔽掉“系统统一路径前缀”
936
- get uiPath() {
937
- return `${this.view.uiPath}/${this.name}`;
938
- }
939
- /**
940
- * 权限领域的资源路径
941
- */
942
- get authPath() {
943
- return `${this.view.path}/${this.name}`;
944
- }
945
- get auth() {
946
- return this.bindDirectives.find((directive) => directive.name === 'auth');
947
- }
948
- getViewElementUniqueName(name = 'viewElement1') {
949
- return this.likeComponent?.getViewElementUniqueName(name);
950
- }
951
- getViewElementUniqueNameOld(name = 'viewElement1') {
952
- return this.likeComponent?.getViewElementUniqueNameOld(name);
953
- }
954
- static from(source, parentNode, parentKey) {
955
- const node = super.from(source, parentNode, parentKey);
956
- if (!node.name) {
957
- const tagName = node.tag.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
958
- node.name = node.getViewElementUniqueName(`${tagName}1`);
959
- }
960
- return node;
961
- }
962
- /**
963
- * 设置组件权限
964
- */
965
- setBindRoles(bindRoles) {
966
- const object = {
967
- bindRoles,
968
- };
969
- this.update({
970
- ...object,
971
- });
972
- }
973
- getBindAttribute(name) {
974
- return this.bindAttrs.find((bindAttr) => bindAttr.name === name);
975
- }
976
- toHump(name) {
977
- return name.replace(/-(\w)/g, (all, letter) => letter.toUpperCase());
978
- }
979
- toFirstUpper(name) {
980
- return name.replace(/^\S/, (s) => s.toUpperCase());
981
- }
982
- haveScope() {
983
- return Boolean(this.slotScope);
984
- }
985
- *toEmbeddedTSDefinition(state = (0, translator_1.createCompilerState)()) {
986
- const self = this;
987
- let code = '';
988
- code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
989
- if (self.isCorrespondingBusinessComponent) {
990
- code += `${self.name}: ${self.correspondingBusinessComponentNamespace}.${self.tag.replace('bs-', '')};\n`;
991
- }
992
- else if (self.toHump(self.tag) === 'lcapLogin' || self.staticClass === 'login-form') { // 登录组件不翻译
993
- code += `${self.name}: nasl.ui.div<any>;\n`;
994
- }
995
- else if (self.tag === 'u-table-view-column-dynamic') {
996
- code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any, any>;\n`;
997
- }
998
- else if (Object.keys(View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP).includes(self.tag)) {
999
- if (self.bindAttrs?.findIndex((attr) => attr.name === 'data-source') > -1) {
1000
- code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<__elements_completionProperty['${self.name}']['dataSource']>;\n`;
1001
- }
1002
- else {
1003
- code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any>;\n`;
1004
- }
1005
- }
1006
- else {
1007
- code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any>;\n`;
1008
- }
1009
- if (Array.isArray(self.children)) {
1010
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
1011
- code += yield* element.toEmbeddedTSDefinition((0, translator_1.shiftState)(state, code));
1012
- });
1013
- }
1014
- return code;
1015
- }
1016
- *toEmbeddedTSVariableDefinition(state = (0, translator_1.createCompilerState)(), variableList, nameLevel) {
1017
- const self = this;
1018
- let code = '';
1019
- let currentLevel = nameLevel ? `${nameLevel}?.` : '';
1020
- currentLevel += `${self.name}?.()`;
1021
- if (View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP?.[self.tag]) {
1022
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1023
- code += `${self.name}: {\n`;
1024
- if (Array.isArray(self.bindAttrs)) {
1025
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindAttrs.filter((attr) => View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP[self.tag]?.[attr.name]), function* warpForEachGenerator(attr) {
1026
- code += yield* attr.toEmbeddedTSVariableDefinition((0, translator_1.shiftState)(state, code, { inline: true }), variableList, self.name, currentLevel);
1027
- });
1028
- if (['u-select', 'van-pickerson'].includes(self.tag)) {
1029
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1030
- code += `pageNumber: nasl.core.Long\n`;
1031
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1032
- code += `filterText: nasl.core.String\n`;
1033
- }
1034
- else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(self.tag) &&
1035
- self.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1) {
1036
- if (['u-list-view', 'van-grid-view', 'van-list-view'].includes(self.tag)) {
1037
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1038
- code += `filterText: nasl.core.String\n`;
1039
- }
1040
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1041
- code += `sorting: {
1042
- field: nasl.core.String
1043
- order: nasl.core.String
1044
- }\n`;
1045
- }
1046
- else if (['u-cascader', 'van-cascader'].includes(self.tag)) {
1047
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1048
- code += `filterText: nasl.core.String\n`;
1049
- }
1050
- }
1051
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1052
- code += `};\n`;
1053
- }
1054
- if (Array.isArray(self.children)) {
1055
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
1056
- code += yield* element.toEmbeddedTSVariableDefinition((0, translator_1.shiftState)(state, code), variableList, currentLevel);
1057
- });
1058
- }
1059
- return code;
1060
- }
1061
- *toEmbeddedTSVariableFunctionDefinition(state = (0, translator_1.createCompilerState)(), parentLevel) {
1062
- const self = this;
1063
- let code = '';
1064
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1065
- let levelIndex = parentLevel || 0;
1066
- code += `${self.name}: () => {\n`;
1067
- if (self.tag === 'template' && self.haveScope() && asserts.isViewElement(self.parentNode)) {
1068
- const currentType = self.parentNode.tag === 'u-table-view-column-dynamic' ? 'CurrentDynamic' : 'Current';
1069
- const _this = self.parentNode;
1070
- let genericity = '';
1071
- if (_this.tag === 'u-table-view-column-dynamic') {
1072
- genericity += `<${_this.parentNode.__tsVariableDataSourceTypeName}, ${_this.__tsVariableDataSourceTypeName}>`;
1073
- }
1074
- else {
1075
- let targetNode = _this;
1076
- while ((!targetNode.__tsVariableDataSourceTypeName || targetNode.__tsVariableDataSourceTypeName === 'any') && asserts.isViewElement(targetNode?.parentNode)) {
1077
- targetNode = targetNode.parentNode;
1078
- }
1079
- genericity += `<${targetNode.__tsVariableDataSourceTypeName ?? 'any'}>`;
1080
- }
1081
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1082
- code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}${genericity}\n`;
1083
- levelIndex++;
1084
- }
1085
- const attr = self.bindAttrs?.find((item) => item.name === 'data-source');
1086
- if (attr && attr.expression) {
1087
- const datasourceName = `datasourceName${self.name}`;
1088
- self.__tsVariableDataSourceTypeName = datasourceName;
1089
- if (asserts.isMemberExpression(attr.expression) ||
1090
- asserts.isIdentifier(attr.expression) ||
1091
- asserts.isCallLogic(attr.expression)) {
1092
- const extraParams = {
1093
- tabSize: 4,
1094
- inline: true,
1095
- noNeedParams: true,
1096
- callLogicNoIife: true,
1097
- };
1098
- const value = yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
1099
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1100
- code += `type ${datasourceName} = nasl.ui.GetItemTypeFromDataSource<typeof ${value}>;\n`;
1101
- // code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}<nasl.ui.GetItemTypeFromDataSource<typeof ${value}>>;\n`;
1102
- }
1103
- else {
1104
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1105
- code += `const __funcName = () => { return `;
1106
- code += yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
1107
- code += '};\n';
1108
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1109
- code += `type ${datasourceName} = nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName>>;\n`;
1110
- // code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}<nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName>>>;\n`;
1111
- }
1112
- }
1113
- else {
1114
- self.__tsVariableDataSourceTypeName = 'any';
1115
- }
1116
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1117
- code += `return {\n`;
1118
- if (Array.isArray(self.bindAttrs)) {
1119
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindAttrs.filter((attr) => View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP[self.tag]?.[attr.name]), function* warpForEachGenerator(attr) {
1120
- code += yield* attr.toEmbeddedTSVariableFunctionDefinition((0, translator_1.shiftState)(state, code, { inline: true }));
1121
- });
1122
- }
1123
- if (Array.isArray(self.children)) {
1124
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
1125
- code += yield* element.toEmbeddedTSVariableFunctionDefinition((0, translator_1.shiftState)({ ...state, tabSize: state.tabSize + 2 }, code), levelIndex);
1126
- });
1127
- }
1128
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1129
- code += `}\n`;
1130
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1131
- code += `},\n`;
1132
- return code;
1133
- }
1134
- getTypeArgmentsStr(state, currentNode) {
1135
- // 登录组件不翻译
1136
- if (this.toHump(this.tag) === 'lcapLogin' || this.staticClass === 'login-form')
1137
- return '<any>';
1138
- let code = '';
1139
- // formItem的单独处理
1140
- if (this.tag === 'u-form-item') {
1141
- if (Array.isArray(this.children) && this.children.length) {
1142
- const tag = this.children[0].tag;
1143
- if (tag === 'u-input') {
1144
- code += '<nasl.core.String>';
1145
- }
1146
- else if (tag === 'u-input-number') {
1147
- code += '<nasl.core.Long>';
1148
- }
1149
- else {
1150
- code += '<any>';
1151
- }
1152
- }
1153
- return code;
1154
- }
1155
- if (this.tag === 'u-table-view-column-group') {
1156
- code += `<${this.parentNode.__tsDataSourceTypeName}>`;
1157
- return code;
1158
- }
1159
- const bindAttrs = this.bindAttrs;
1160
- if (bindAttrs && bindAttrs.length) {
1161
- const attr = bindAttrs.find((item) => item.name === 'data-source');
1162
- if (attr && attr.expression) {
1163
- if (this.tag === 'u-table-view-column-dynamic') {
1164
- code += `<${this.parentNode.__tsDataSourceTypeName}, ${this.__tsDataSourceTypeName}>`;
1165
- }
1166
- else {
1167
- code += `<${this.__tsDataSourceTypeName}>`;
1168
- }
1169
- }
1170
- }
1171
- return code;
1172
- }
1173
- *getDatasourceTypeCodeStr(state, eleArr) {
1174
- let code = '';
1175
- yield* (0, time_slicing_1.wrapForEachToGenerator)(eleArr ?? [], function* wrapForEach(element, index) {
1176
- const bindAttrs = element.bindAttrs;
1177
- if (bindAttrs && bindAttrs.length) {
1178
- const attr = bindAttrs.find((item) => item.name === 'data-source');
1179
- if (attr && attr.expression) {
1180
- const datasourceName = `datasourceName${element.name}`;
1181
- element.__tsDataSourceTypeName = datasourceName;
1182
- if (asserts.isMemberExpression(attr.expression) ||
1183
- asserts.isIdentifier(attr.expression) ||
1184
- asserts.isCallLogic(attr.expression)) {
1185
- const extraParams = {
1186
- tabSize: 4,
1187
- inline: true,
1188
- noNeedParams: true,
1189
- callLogicNoIife: true,
1190
- };
1191
- const value = yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
1192
- code += `type ${datasourceName} = `;
1193
- code += `nasl.ui.GetItemTypeFromDataSource<typeof ${value}>;\n`;
1194
- }
1195
- else {
1196
- code += `const __funcName${index} = () => { return`;
1197
- code += yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
1198
- code += '};\n';
1199
- code += `type ${datasourceName} = `;
1200
- code += `nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName${index}>>;\n`;
1201
- }
1202
- }
1203
- }
1204
- });
1205
- code += '\n';
1206
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1207
- return code;
1208
- }
1209
- // 获取端类型
1210
- get frontendType() {
1211
- return this.getAncestor('FrontendType');
1212
- }
1213
- // 对应业务组件
1214
- get isCorrespondingBusinessComponent() {
1215
- return this.tag.startsWith('bs-');
1216
- }
1217
- // 对应的业务组件的Namespace
1218
- get correspondingBusinessComponentNamespace() {
1219
- return `${this.frontendType?.getNamespace()}.${this.frontendType?.name}.businessComponents`;
1220
- }
1221
- // 获取对应的业务组件
1222
- get correspondingBusinessComponent() {
1223
- if (this.isCorrespondingBusinessComponent) {
1224
- // 端下的业务组件
1225
- const businessComponents = this.frontendType?.businessComponents;
1226
- const businessComponent = businessComponents.find((businessComponent) => {
1227
- return `bs-${businessComponent?.name}` === this.tag;
1228
- });
1229
- return businessComponent;
1230
- }
1231
- }
1232
- *toEmbeddedTS(state = (0, translator_1.createCompilerState)(), parentLevel) {
1233
- const self = this;
1234
- const { parentNode, app, tag, staticClass, name, bindRoles, bindEvents, children } = self;
1235
- const chineseTsName = (name) => {
1236
- let tsName = name;
1237
- // 匹配所有特殊字符都转为_
1238
- tsName = tsName.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '_');
1239
- if (/^\d/.test(tsName)) {
1240
- tsName = '$' + tsName;
1241
- }
1242
- return tsName;
1243
- };
1244
- // 过滤模板的登录中的一些翻译,这里只过滤h5表格中的两个列
1245
- if ((parentNode.concept === 'ViewElement' &&
1246
- parentNode.tag &&
1247
- this.toHump(parentNode.tag) === 'lcapLogin') ||
1248
- staticClass === 'login-cell') {
1249
- return '';
1250
- }
1251
- // pc事件翻译
1252
- if (self.toHump(tag) === 'lcapLogin') {
1253
- let code = `new nasl.ui.div({name: __elements.${self.name},\n`;
1254
- // 事件
1255
- if (Array.isArray(self.bindEvents)) {
1256
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindEvents, function* warpForEachGenerator(event) {
1257
- code += yield* event.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1258
- tabSize: (state?.tabSize || 0) + 2,
1259
- }));
1260
- code += '\n';
1261
- });
1262
- }
1263
- code += `}),\n`;
1264
- return code;
1265
- }
1266
- let levelIndex = parentLevel || 0;
1267
- if (tag === 'template' && self.haveScope()) {
1268
- const slotTarget = !self.slotTarget ? 'slotDefault' : 'slot' + self.toFirstUpper(self.toHump(self.slotTarget));
1269
- let code = '';
1270
- code += `${slotTarget}: (current${levelIndex === 0 ? '' : levelIndex})=> {\n`;
1271
- code += yield* self.getDatasourceTypeCodeStr(state, self.children);
1272
- levelIndex++;
1273
- code += 'return [';
1274
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
1275
- code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1276
- tabSize: state?.tabSize || 0,
1277
- }), levelIndex);
1278
- });
1279
- code += ']';
1280
- code += '\n';
1281
- code += '},\n';
1282
- return code;
1283
- }
1284
- else if (tag === 'template') {
1285
- const slotTarget = !self.slotTarget ? 'slotDefault' : 'slot' + self.toFirstUpper(self.toHump(self.slotTarget));
1286
- let code = '';
1287
- code += `${slotTarget}: ()=> {\n`;
1288
- code += yield* self.getDatasourceTypeCodeStr(state, self.children);
1289
- code += 'return [';
1290
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
1291
- code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1292
- tabSize: state?.tabSize || 0,
1293
- }), levelIndex);
1294
- });
1295
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1296
- code += ']';
1297
- code += '\n';
1298
- code += '},\n';
1299
- return code;
1300
- }
1301
- let namespace = `nasl.ui.${self.toHump(tag)}`;
1302
- if (self.isCorrespondingBusinessComponent) {
1303
- namespace = `${self.correspondingBusinessComponentNamespace}.${self.tag.replace('bs-', '')}`;
1304
- }
1305
- // 后面那个name是为了查找引用的时候用的
1306
- let code = `new ${namespace}${self.getTypeArgmentsStr(state)}({name: __elements.${name},\n`;
1307
- // 是否开启权限
1308
- // const hasAuth = Array.isArray(bindDirectives)
1309
- // ? !!bindDirectives.filter((directive) => directive.name === 'auth').length
1310
- // : false;
1311
- // 角色
1312
- if (Array.isArray(bindRoles) && bindRoles.length) {
1313
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1314
- code += 'roles: [\n';
1315
- yield* (0, time_slicing_1.wrapForEachToGenerator)(bindRoles, function* warpForEachGenerator(role) {
1316
- code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
1317
- code += `${app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
1318
- code += '\n';
1319
- });
1320
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1321
- code += '],\n';
1322
- }
1323
- // 事件
1324
- if (Array.isArray(bindEvents)) {
1325
- yield* (0, time_slicing_1.wrapForEachToGenerator)(bindEvents, function* warpForEachGenerator(event) {
1326
- code += yield* event.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1327
- tabSize: (state?.tabSize || 0) + 2,
1328
- }));
1329
- code += '\n';
1330
- });
1331
- }
1332
- // 子元素
1333
- if (Array.isArray(children)) {
1334
- code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
1335
- if (Array.isArray(self.bindAttrs)) {
1336
- code += `bindAttr: `;
1337
- if (self.isCorrespondingBusinessComponent) {
1338
- code += `{\n`;
1339
- }
1340
- else {
1341
- code += `() => [\n`;
1342
- }
1343
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindAttrs, function* warpForEachGenerator(attr) {
1344
- // 过滤业务组件的非表达式模式的翻译
1345
- const shouldFilter = self.isCorrespondingBusinessComponent && (attr.type !== 'dynamic');
1346
- if (shouldFilter) {
1347
- return;
1348
- }
1349
- code += (yield* attr.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: 1 }))) + ',\n';
1350
- });
1351
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindDirectives, function* warpForEachGenerator(directive) {
1352
- code += (yield* directive.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: 1 }))) + ',\n';
1353
- });
1354
- yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindStyles, function* warpForEachGenerator(bindStyle) {
1355
- code += (yield* bindStyle.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: 1 }))) + ',\n';
1356
- });
1357
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1358
- if (self.isCorrespondingBusinessComponent) {
1359
- code += '},\n';
1360
- }
1361
- else {
1362
- code += '],\n';
1363
- }
1364
- }
1365
- // 如果子集中有插槽的就
1366
- if (children.find((item) => item.tag === 'template' && item.slotTarget)) {
1367
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1368
- const defaultArr = [];
1369
- // 先把插槽翻译了
1370
- yield* (0, time_slicing_1.wrapForEachToGenerator)(children, function* warpForEachGenerator(element) {
1371
- if (element.tag === 'template') {
1372
- code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1373
- tabSize: state?.tabSize || 0,
1374
- }), levelIndex);
1375
- }
1376
- else {
1377
- defaultArr.push(element);
1378
- }
1379
- });
1380
- // 翻译其余的子集
1381
- if (defaultArr.length) {
1382
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1383
- code += `slotDefault: ()=> {\n`;
1384
- code += yield* self.getDatasourceTypeCodeStr(state, defaultArr);
1385
- code += 'return [';
1386
- yield* (0, time_slicing_1.wrapForEachToGenerator)(defaultArr, function* warpForEachGenerator(element) {
1387
- code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1388
- tabSize: (state?.tabSize || 0) + 2,
1389
- }), levelIndex);
1390
- code += '\n';
1391
- });
1392
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1393
- code += ']\n';
1394
- code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
1395
- code += '}\n';
1396
- }
1397
- }
1398
- else {
1399
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1400
- code += `slotDefault: ()=> {\n`;
1401
- code += yield* self.getDatasourceTypeCodeStr(state, children);
1402
- code += 'return [';
1403
- yield* (0, time_slicing_1.wrapForEachToGenerator)(children, function* warpForEachGenerator(element) {
1404
- code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
1405
- tabSize: (state?.tabSize || 0) + 2,
1406
- }), levelIndex);
1407
- code += '\n';
1408
- });
1409
- code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
1410
- code += ']\n';
1411
- code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
1412
- code += '}\n';
1413
- }
1414
- }
1415
- code += (0, translator_1.indent)(state?.tabSize || 0) + '})';
1416
- // 顶层元素是单独的表达式
1417
- if (parentNode.concept === 'View' || asserts.isBusinessComponent(parentNode)) {
1418
- code += ';\n';
1419
- }
1420
- else {
1421
- code += ',\n';
1422
- }
1423
- return code;
1424
- }
1425
- toNaturalTS(state = (0, translator_1.createCompilerState)(), parentLevel) {
1426
- let code = '';
1427
- const levelIndex = parentLevel || 0;
1428
- if (Array.isArray(this.bindEvents)) {
1429
- this.bindEvents.forEach((event) => {
1430
- code += event.toNaturalTS((0, translator_1.shiftState)(state, code, {
1431
- tabSize: state.tabSize,
1432
- }));
1433
- // code += '\n';
1434
- });
1435
- }
1436
- if (Array.isArray(this.children)) {
1437
- if (this.children.find((item) => item.tag === 'template' && item.slotTarget)) {
1438
- // code += indent(state.tabSize + 2);
1439
- const defaultArr = [];
1440
- // 先把插槽翻译了
1441
- this.children.forEach((element) => {
1442
- if (element.tag === 'template') {
1443
- code += element.toNaturalTS((0, translator_1.shiftState)(state, code, {
1444
- tabSize: state.tabSize,
1445
- }), levelIndex);
1446
- }
1447
- else {
1448
- defaultArr.push(element);
1449
- }
1450
- });
1451
- // 翻译其余的子集
1452
- if (defaultArr.length) {
1453
- defaultArr.forEach((element) => {
1454
- code += element.toNaturalTS((0, translator_1.shiftState)(state, code, {
1455
- tabSize: state.tabSize,
1456
- }), levelIndex);
1457
- });
1458
- }
1459
- }
1460
- else {
1461
- this.children.forEach((element) => {
1462
- code += element.toNaturalTS((0, translator_1.shiftState)(state, code, {
1463
- tabSize: state.tabSize,
1464
- }), levelIndex);
1465
- });
1466
- }
1467
- }
1468
- return code;
1469
- }
1470
- toNaturalTSDefinition(state) {
1471
- let code = '';
1472
- if (['u-button', 'u-form', 'u-modal', 'u-table-view', 'u-select', 'u-input', 'u-number-input'].includes(this.tag)) {
1473
- code += (0, translator_1.indent)(state.tabSize + 1);
1474
- // 登录组件不翻译
1475
- // if (this.toHump(this.tag) === 'lcapLogin' || this.staticClass === 'login-form') {
1476
- // code += `${this.name}: nasl.ui.div;\n`;
1477
- // } else {
1478
- code += `${this.name}: nasl.ui.${(0, utils_1.kebab2Camel)(this.tag.replace(/^\w-/, ''))},\n`;
1479
- // }
1480
- }
1481
- if (Array.isArray(this.children)) {
1482
- this.children.forEach((element) => {
1483
- code += element.toNaturalTSDefinition((0, translator_1.shiftState)(state, code));
1484
- });
1485
- }
1486
- return code;
1487
- }
1488
- _duplicate() {
1489
- const element = ViewElement_1.from(this.toTemplateJSON());
1490
- const nameMap = element.deepRenameElements(this);
1491
- utils.traverse((current) => {
1492
- const node = current.node;
1493
- if (node.concept === 'CallLogic') {
1494
- node.uuid = (0, uuid_1.v4)().replace(/-/g, '');
1495
- if (/elements.(.+).logics/.test(node.calleeNamespace)) {
1496
- const oldName = node.calleeNamespace.split('.')[1];
1497
- if (nameMap.has(oldName)) {
1498
- const newName = nameMap.get(oldName);
1499
- node.calleeNamespace = `elements.${newName}.logics`;
1500
- }
1501
- }
1502
- }
1503
- // 如果创建副本,内部的国际化标识都要去掉
1504
- if (node.i18nKey) {
1505
- delete node.i18nKey;
1506
- }
1507
- }, { node: element }, { mode: 'anyObject', excludedKeySet: element.JSON_EXCLUDED_KEYS });
1508
- this.likeComponent?.existingViewElement.clear();
1509
- return element;
1510
- }
1511
- setTag(tag) {
1512
- const object = {
1513
- tag,
1514
- };
1515
- this.update({
1516
- ...object,
1517
- });
1518
- }
1519
- // 递归遍历组件
1520
- traverseChildren(cb) {
1521
- utils.traverse((current) => {
1522
- cb(current.node);
1523
- }, { node: this });
1524
- }
1525
- // 递归生成组件名
1526
- deepRenameElements(node) {
1527
- const map = new Map();
1528
- this.traverseChildren((ele) => {
1529
- const oldName = ele.name;
1530
- const tagName = ele.tag.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
1531
- ele.name = node.getViewElementUniqueName(`${tagName}1`);
1532
- map.set(oldName, ele.name);
1533
- });
1534
- return map;
1535
- }
1536
- /**
1537
- * 解析属性中的表达式
1538
- * @param value
1539
- * @param $def 目前 $def 只用来查找 $def.variables 和 $def.structures
1540
- * @param dataSchema
1541
- */
1542
- static _parseExpression(value) {
1543
- try {
1544
- const ast = babelParser.parseExpression(value);
1545
- const node = transAstNodeToNaslNode(ast);
1546
- return LogicItem__1.LogicItem.from(node, null, null);
1547
- }
1548
- catch (e) {
1549
- return null;
1550
- }
1551
- }
1552
- static _parseValidationRule(value) {
1553
- let calleeName = value;
1554
- let args = [];
1555
- try {
1556
- const ast = babelParser.parseExpression(value);
1557
- const validationNamespace = (0, concepts_1.getStdlibNamespace)().findChild('validation');
1558
- if (ast.type === 'CallExpression') {
1559
- calleeName = (ast.callee?.property?.name ?? ast.callee?.property?.value ?? ast.callee?.name).replace(/\(.*/, '');
1560
- const func = validationNamespace.functions.find((item) => item.name === calleeName);
1561
- args = ast.arguments.map((argument, index) => ({
1562
- concept: 'Argument',
1563
- name: '',
1564
- kind: 'Statement',
1565
- keyword: func?.params?.[index]?.name ?? '',
1566
- expression: transAstNodeToNaslNode(Object.assign({}, argument)),
1567
- }));
1568
- }
1569
- }
1570
- catch (error) { }
1571
- return {
1572
- concept: 'ValidationRule',
1573
- name: '',
1574
- label: '验证规则',
1575
- kind: 'Expression',
1576
- calleeNamespace: 'nasl.validation',
1577
- arguments: args,
1578
- calleeName,
1579
- };
1580
- }
1581
- /**
1582
- * 从 Vue 的 ASTNode 转换成 ASL 元素
1583
- * @param astNode Vue 的 ASTNode
1584
- */
1585
- static _fromASTNode(astNode, context) {
1586
- const view = context?.view;
1587
- // 临时处理组件的 text
1588
- //h5-mock
1589
- if ([
1590
- 'u-text',
1591
- 'van-text',
1592
- 'u-link',
1593
- 'u-button',
1594
- 'u-label',
1595
- 'u-radio',
1596
- 'u-checkbox',
1597
- 'u-navbar-item',
1598
- 'u-sidebar-item',
1599
- 'u-menu-item',
1600
- ].includes(astNode.tag) &&
1601
- astNode.children.length === 1 &&
1602
- astNode.children[0].type === 3) {
1603
- astNode.attrs = astNode.attrs || [];
1604
- astNode.attrs.push({
1605
- name: 'text',
1606
- value: JSON.stringify(astNode.children[0].text),
1607
- });
1608
- astNode.children = [];
1609
- }
1610
- // 将 scopedSlots 合并到 children 中
1611
- if (astNode.scopedSlots) {
1612
- astNode.children = astNode.children || [];
1613
- Object.keys(astNode.scopedSlots).forEach((key) => {
1614
- if (!astNode.children.find((child) => key === child.slotTarget)) {
1615
- astNode.children.unshift(astNode.scopedSlots[key]);
1616
- }
1617
- });
1618
- delete astNode.scopedSlots;
1619
- }
1620
- // 提示不支持的属性
1621
- [
1622
- 'component',
1623
- 'inlineTemplate',
1624
- 'pre',
1625
- 'ns',
1626
- 'transition',
1627
- 'transitionOnAppear',
1628
- 'transitionMode',
1629
- 'slotName',
1630
- 'classBinding',
1631
- 'styleBinding',
1632
- ].forEach((key) => {
1633
- if (astNode[key])
1634
- console.warn(`[warn] ViewElement NASL unsupports '${key}' field in node `, astNode);
1635
- });
1636
- const BindAttribute = (0, decorators_1.getConceptConstructor)('BindAttribute');
1637
- const BindDirective = (0, decorators_1.getConceptConstructor)('BindDirective');
1638
- const BindEvent = (0, decorators_1.getConceptConstructor)('BindEvent');
1639
- let element;
1640
- if (astNode.type === 1) {
1641
- if (astNode.tag === 'router-view') {
1642
- if (view.frontend.type === 'h5') {
1643
- astNode.tag = 'van-router-view';
1644
- }
1645
- else {
1646
- astNode.tag = 'u-router-view';
1647
- }
1648
- }
1649
- const tagName = astNode.tag.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
1650
- let newContext = {};
1651
- if (context) {
1652
- newContext = {
1653
- ...context,
1654
- };
1655
- }
1656
- element = new ViewElement_1({
1657
- tag: astNode.tag,
1658
- name: astNode.attrsMap.ref || view.getViewElementUniqueName(`${tagName}1`),
1659
- staticClass: astNode.attrsMap.class,
1660
- staticStyle: astNode.attrsMap.style,
1661
- slotTarget: astNode.slotTarget && json5.parse(astNode.slotTarget),
1662
- slotScope: astNode.slotScope === '_empty_' ? '' : astNode.slotScope,
1663
- children: astNode.children.map((item) => this._fromASTNode(item, newContext)),
1664
- });
1665
- astNode?.attrs?.forEach((oldAttr) => {
1666
- let attr;
1667
- // 获取原始属性
1668
- const orginAttrCode = (context?.code || '').substr(oldAttr.start, oldAttr.end - oldAttr.start);
1669
- if (oldAttr.value === '""' && orginAttrCode.trim() === oldAttr.name) {
1670
- attr = new BindAttribute({
1671
- type: 'static',
1672
- name: oldAttr.name,
1673
- value: 'true',
1674
- });
1675
- }
1676
- else {
1677
- try {
1678
- const tmp = json5.parse(oldAttr.value);
1679
- const source = {
1680
- type: typeof tmp === 'string' ? 'string' : 'static',
1681
- name: oldAttr.name,
1682
- value: typeof tmp === 'string' ? tmp : oldAttr.value,
1683
- };
1684
- if (oldAttr.name === 'rules') {
1685
- source.rules = tmp?.split('|').map((ruleStr) => this._parseValidationRule(ruleStr.trim()));
1686
- }
1687
- else if (['page-number', 'page-size'].includes(oldAttr.name)) {
1688
- source.value = Number(source.value);
1689
- }
1690
- attr = new BindAttribute(source);
1691
- }
1692
- catch (e) {
1693
- const expression = this._parseExpression(oldAttr.value);
1694
- attr = new BindAttribute({
1695
- type: 'dynamic',
1696
- name: oldAttr.name,
1697
- value: expression ? '' : oldAttr.value,
1698
- expression,
1699
- });
1700
- if (astNode.attrsMap[`:${attr.name}.sync`]) {
1701
- attr.sync = true;
1702
- }
1703
- }
1704
- }
1705
- element.addBindAttribute(attr);
1706
- });
1707
- // compiler 处理:value.sync 时会加上update:value事件,需要过滤
1708
- astNode.events &&
1709
- Object.keys(astNode.events)
1710
- .filter((name) => !name.startsWith('update:'))
1711
- .forEach((name) => {
1712
- const oldEvent = astNode.events[name];
1713
- const str = oldEvent.value;
1714
- const calleeName = str.split('(')[0];
1715
- const matchArr = str.match(/\(([^)]*)\)/) || [];
1716
- let argsStr = '';
1717
- if (matchArr?.length >= 2) {
1718
- argsStr = matchArr[1];
1719
- }
1720
- let args = [];
1721
- const argStrs = argsStr.split(',');
1722
- args = argStrs
1723
- .filter((argStr) => !!argStr)
1724
- .map((argStr) => {
1725
- const keyword = argStr.trim().split('.');
1726
- return {
1727
- concept: 'Argument',
1728
- expression: genArgumentMemberExpression(keyword),
1729
- };
1730
- });
1731
- const viewLogics = context?.definition?.viewLogics || [];
1732
- const currentLogic = viewLogics.find((item) => item.name === calleeName);
1733
- if (currentLogic) {
1734
- element.addBindEvent(new BindEvent({
1735
- name,
1736
- calleeNamespace: '',
1737
- calleeName: '',
1738
- arguments: args,
1739
- logics: [currentLogic],
1740
- }));
1741
- }
1742
- });
1743
- astNode.directives &&
1744
- astNode.directives.forEach((directive) => {
1745
- if (directive.name === 'model') {
1746
- const valueAttr = astNode.attrs && astNode.attrs.find((attr) => attr.name === 'value');
1747
- if (!valueAttr) {
1748
- const expression = this._parseExpression(directive.value);
1749
- element.addBindAttribute(new BindAttribute({
1750
- type: 'dynamic',
1751
- name: 'value',
1752
- value: expression ? '' : directive.value,
1753
- expression,
1754
- sync: true,
1755
- }));
1756
- }
1757
- }
1758
- else {
1759
- const expression = this._parseExpression(directive.value);
1760
- element.addBindDirective(new BindDirective({
1761
- type: expression ? 'string' : 'dynamic',
1762
- name: directive.name,
1763
- rawName: directive.rawName,
1764
- value: expression ? '' : directive.value,
1765
- expression,
1766
- arg: directive.arg,
1767
- // modifiers: directive.modifiers,
1768
- }));
1769
- }
1770
- });
1771
- if (astNode.if) {
1772
- element.addBindDirective(new BindDirective({
1773
- type: 'dynamic',
1774
- name: 'if',
1775
- rawName: 'v-if',
1776
- value: '',
1777
- expression: this._parseExpression(astNode.if),
1778
- }));
1779
- }
1780
- }
1781
- else if (astNode.type === 2) {
1782
- const tagName = config_1.config.scope === 'h5' ? 'van-text' : 'u-text';
1783
- const baseName = tagName.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
1784
- element = new ViewElement_1({
1785
- tag: tagName,
1786
- name: view.getViewElementUniqueName(`${baseName}1`),
1787
- });
1788
- const value = astNode.text?.match(/{{(.*?)}}/)[1].trim();
1789
- const expression = this._parseExpression(value);
1790
- element.addBindAttribute(new BindAttribute({
1791
- type: 'dynamic',
1792
- name: 'text',
1793
- value: expression ? '' : value,
1794
- expression,
1795
- }));
1796
- }
1797
- else if (astNode.type === 3) {
1798
- const tagName = config_1.config.scope === 'h5' ? 'van-text' : 'u-text';
1799
- const baseName = tagName.replace(ViewElement_1.TAG_NAME_PREFIX_REG, '').replace(/-/g, '_');
1800
- element = new ViewElement_1({
1801
- tag: tagName,
1802
- name: view.getViewElementUniqueName(`${baseName}1`),
1803
- });
1804
- element.addBindAttribute(new BindAttribute({
1805
- name: 'text',
1806
- type: 'string',
1807
- value: astNode.text?.trim(),
1808
- }));
1809
- }
1810
- return element;
1811
- }
1812
- /**
1813
- * 解析 Vue 模板
1814
- * 该方法不会绑定 view 和 parent,如果是添加元素优先使用 fromHTML
1815
- * @param html Vue 的模板
1816
- * @TODO 处理多个元素的问题
1817
- */
1818
- static parse(code, context) {
1819
- code = code || '<div></div>';
1820
- const compilerOptions = {
1821
- preserveWhitespace: false,
1822
- outputSourceRange: true,
1823
- };
1824
- let ast = compiler.compile(code, compilerOptions).ast;
1825
- if (ast.tag === 'template' && !ast.slotTarget)
1826
- ast = ast.children[0];
1827
- return this._fromASTNode(ast, {
1828
- ...context,
1829
- code,
1830
- });
1831
- }
1832
- /**
1833
- * 从模板生成规范的 ViewElement 对象
1834
- */
1835
- static fromHTML(html, context) {
1836
- return this.parse(html, context);
1837
- }
1838
- /**
1839
- * 转换成设计器中使用的 Vue 文件
1840
- * @param options
1841
- */
1842
- toDesignerVue(options) {
1843
- return this.toVue({
1844
- isRoot: options?.isRoot,
1845
- asCompontent: options?.asCompontent,
1846
- finalCode: false,
1847
- nodePathAttr: true,
1848
- attrFormat: (attr, element, defaultResult) => {
1849
- if (attr.concept === 'BindAttribute' &&
1850
- !['href', 'destination', 'externalDestination', 'download'].includes(attr.name)) {
1851
- const api = config_1.config?.allNodesAPI?.[element.tag];
1852
- const apiOfAttr = api && api.attrs && api.attrs.find((_attr) => _attr.name === attr.name);
1853
- if (['u-form-item', 'u-validator', 'van-field'].includes(element.tag) && attr.name === 'rules') {
1854
- return `${attr.name}=""`;
1855
- }
1856
- if (apiOfAttr && apiOfAttr['designer-value'] !== undefined) {
1857
- let designerValue = apiOfAttr['designer-value'];
1858
- //对流程模板拖拽进行特判
1859
- element.bindAttrs.forEach((property) => {
1860
- if (property.name === 'repeat' && property.value === '1')
1861
- designerValue = '[{}, {}]';
1862
- });
1863
- if (typeof designerValue === 'string') {
1864
- designerValue = designerValue.replace(/"/g, "'");
1865
- }
1866
- try {
1867
- json5.parse(designerValue);
1868
- return `:${attr.name}="${designerValue}"`;
1869
- }
1870
- catch (e) {
1871
- return `${attr.name}="${designerValue}"`;
1872
- }
1873
- }
1874
- if (attr.name === 'text' &&
1875
- asserts.isMemberExpression(attr?.expression) &&
1876
- attr?.expression?.object?.namespace?.startsWith('elements.') &&
1877
- attr?.expression?.object?.namespace?.endsWith('.property')) {
1878
- return `${attr.name}="{{ ${attr.expression.toUI()} }}"`;
1879
- }
1880
- if (attr.type === 'dynamic' &&
1881
- !(element.tag === 'u-cascade-select' && attr.name === 'categories'))
1882
- return defaultResult.replace(/:?([\w-]+)(?:.*?)="([\s\S]*)"/, (m, name, value) => {
1883
- try {
1884
- const tempValue = json5.parse(value);
1885
- if (typeof tempValue === 'boolean' || typeof tempValue === 'number') {
1886
- // 简单类型走属性
1887
- return `:${name}="${value.replace(/"/g, "'")}"`;
1888
- }
1889
- }
1890
- catch (e) {
1891
- if (apiOfAttr && !apiOfAttr.type.includes('string'))
1892
- return '';
1893
- }
1894
- value = value
1895
- .replace(/"/g, "'")
1896
- .replace(/\$utils\['(.+?)'\]/g, '$1')
1897
- .replace(/\$refs./g, 'elements.')
1898
- .replace(/\$global.userInfo/g, 'nasl.auth.userInfo')
1899
- .replace(/\$global./g, 'nasl.')
1900
- .replace(/\bscope\.item\.\b/g, '')
1901
- .replace(/\bcurrent\.item\.\b/g, '');
1902
- if (isLockField(element)) {
1903
- return element.tag === 'u-text' ? `${name}="--"` : `${name}=""`;
1904
- }
1905
- return `${name}="{{ ${value} }}"`;
1906
- });
1907
- else
1908
- return defaultResult;
1909
- }
1910
- return false;
1911
- },
1912
- bindStylesFormat: (bindStyles, element) => false,
1913
- getExtraParts: (el) => {
1914
- const parts = [];
1915
- const api = config_1.config?.allNodesAPI?.[el?.tag];
1916
- const emptySlot = api && api.slots && api.slots.find((slot) => slot.name === 'default' && slot['empty-background']);
1917
- const hasSupport = api && api.slots && api.slots.some((slot) => slot.support);
1918
- if (emptySlot || hasSupport) {
1919
- // 有些限制的组件如侧边栏分组有title插槽但要限制子元素放入
1920
- const validChildren = el.children.filter((elem) => !(elem.tag === 'template' && elem.slotTarget !== 'default'));
1921
- let childEmpty = !validChildren.length;
1922
- const defaultSlot = el.children.find((elem) => elem.tag === 'template' && elem.slotTarget === 'default');
1923
- if (defaultSlot) {
1924
- childEmpty = !defaultSlot.children.length;
1925
- }
1926
- if (childEmpty) {
1927
- let addEmpty = true;
1928
- if (['u-grid-view', 'u-list-view', 'van-list-view', 'van-grid-view', 'u-carousel'].includes(el.tag)) {
1929
- const hasDataSource = el.bindAttrs.find((attr) => attr.name === 'data-source');
1930
- addEmpty = !hasDataSource;
1931
- }
1932
- if (el.tag === 'u-crumb') {
1933
- const attrList = el.bindAttrs;
1934
- const hasAuto = attrList.some((attr) => attr.name === 'auto' && String(attr.value) === 'true');
1935
- if (hasAuto)
1936
- addEmpty = false;
1937
- }
1938
- if ([
1939
- 'u-select',
1940
- 'u-dropdown',
1941
- 'u-panel',
1942
- 'u-toc',
1943
- 'u-toc-item',
1944
- 'u-tree-view-new',
1945
- 'u-tree-view-node-new',
1946
- 'u-tree-select',
1947
- 'u-tree-select-new',
1948
- 'u-anchor',
1949
- 'u-drawer',
1950
- 'u-timeline',
1951
- 'u-tabs',
1952
- ].includes(el.tag)) {
1953
- addEmpty = false;
1954
- }
1955
- const background = (emptySlot && emptySlot['empty-background']) || (hasSupport ? 'add-sub' : '');
1956
- addEmpty && parts.push(`vusion-empty-background="${background}"`);
1957
- }
1958
- }
1959
- if (['u-router-view', 'van-router-view'].includes(el.tag)) {
1960
- const excludes = ['background-color:', 'background:', 'background-image:'];
1961
- if (excludes.some((key) => el.staticStyle && el.staticStyle.includes(key))) {
1962
- parts.push(':designer="false"');
1963
- }
1964
- }
1965
- return parts;
1966
- },
1967
- isDev: true,
1968
- });
1969
- }
1970
- isLikeComponent(node) {
1971
- return ['View', 'BusinessComponent'].includes(node?.concept);
1972
- }
1973
- // 获取currentList
1974
- getCurrentList() {
1975
- const argsList = [];
1976
- let parent = this.parentNode;
1977
- let index = 0;
1978
- while (parent && !this.isLikeComponent(parent)) {
1979
- if (parent.slotScope) {
1980
- argsList.push(index === 0 ? 'current' : 'current' + index);
1981
- index++;
1982
- }
1983
- parent = parent.parentNode;
1984
- }
1985
- return argsList;
1986
- }
1987
- get refName() {
1988
- let refName = this.name;
1989
- const list = this.getCurrentList();
1990
- if (Array.isArray(list) && list.length) {
1991
- list.forEach((item) => {
1992
- refName += `_\${(${item} || {}).__nodeKey || (${item} || {}).index}`;
1993
- });
1994
- }
1995
- return refName;
1996
- }
1997
- get keyName() {
1998
- // 是否配置了v-if
1999
- const isDefineIf = this.bindDirectives.some((directive) => directive.name === 'if' && directive.expression);
2000
- if (isDefineIf) {
2001
- let key = this.name;
2002
- const list = this.getCurrentList();
2003
- // v-for中需要加上nodeKey
2004
- if (Array.isArray(list) && list.length) {
2005
- list.forEach((item) => {
2006
- key += `_\${(${item} || {}).__nodeKey || (${item} || {}).index}`;
2007
- });
2008
- }
2009
- return key;
2010
- }
2011
- return null;
2012
- }
2013
- get businessComponent() {
2014
- return this.getAncestor('BusinessComponent');
2015
- }
2016
- /**
2017
- * 转换成 Vue 的模板格式
2018
- */
2019
- toVue(options) {
2020
- // lockField 不翻译modal
2021
- if (options?.isDev && this?.tag === 'u-modal' && isLockField(this)) {
2022
- return ``;
2023
- }
2024
- const { finalCode, asCompontent } = options || {};
2025
- const parts = [];
2026
- if (finalCode === false) {
2027
- if (this.tag === 'slot') {
2028
- if (asCompontent) {
2029
- return `<div vusion-slot-name="${this.name}">
2030
- <slot name="${this.name}">
2031
- <div s-empty="true" bs-empty="true" style="background: #f7f8fa;
2032
- border: 1px dashed #c3c3c3;
2033
- text-align: center;
2034
- color: #999;
2035
- min-height: 32px;
2036
- min-width: 32px;
2037
- width: 100%;
2038
- align-items: center;
2039
- display: inline-flex;
2040
- justify-content: center;">
2041
- +
2042
- </div>
2043
- </slot>
2044
- </div>`;
2045
- }
2046
- else {
2047
- return `<div vusion-node-path="${this.nodePath}"
2048
- style="background: linear-gradient(-45deg,#fff 25%,#f3f5fa 0,#f3f5fa 50%,#fff 0,#fff 75%,#f3f5fa 0);
2049
- background-size: 45px 45px;
2050
- background-repeat: repeat;
2051
- line-height: 32px;
2052
- min-height: 32px;
2053
- color: var(--font-second-color);
2054
- text-align: center;">
2055
- 组件占位,可在使用业务组件时插入任意组件
2056
- </div>`;
2057
- }
2058
- }
2059
- else if (this.businessComponent?.name === this.tag) {
2060
- // 组件内部使用自身的情况
2061
- return `<div vusion-node-path="${this.nodePath}"
2062
- style="background: linear-gradient(-45deg,#fff 25%,#f3f5fa 0,#f3f5fa 50%,#fff 0,#fff 75%,#f3f5fa 0);
2063
- background-size: 45px 45px;
2064
- background-repeat: repeat;
2065
- line-height: 32px;
2066
- min-height: 32px;
2067
- color: var(--font-second-color);
2068
- text-align: center;">
2069
- 在组件内部使用自身可能会导致循环引用,请谨慎使用
2070
- </div>`;
2071
- }
2072
- const isRoot = options.isRoot;
2073
- if (isRoot && !options?.asCompontent) {
2074
- parts.push('type="root"');
2075
- if (this.frontendType?.kind === 'h5') {
2076
- parts.push('class="l-root-h5"');
2077
- }
2078
- else {
2079
- parts.push('style="height:100%; --custom-start: auto; min-height: 200px;"');
2080
- }
2081
- }
2082
- }
2083
- if (options) {
2084
- options.isRoot = false;
2085
- }
2086
- let currentList = [];
2087
- if (Array.isArray(options?.currentList)) {
2088
- currentList = [...options?.currentList];
2089
- }
2090
- if (this.slotScope) {
2091
- currentList.unshift(this.slotScope);
2092
- }
2093
- const newOptions = Object.assign({
2094
- indentStyle: 'space',
2095
- tabSize: 4,
2096
- indentLevel: 0,
2097
- aslIdAttr: false,
2098
- nodePathAttr: false,
2099
- getExtraParts: () => [],
2100
- attrFormat: (attr, element, defaultResult) => defaultResult,
2101
- bindStylesFormat: (bindStyles, element) => {
2102
- if (bindStyles.length === 0)
2103
- return false;
2104
- return `:style="{${bindStyles
2105
- .map((item) => item.toVue())
2106
- .filter((item) => item !== undefined)
2107
- .join(', ')}}"`;
2108
- },
2109
- }, options, {
2110
- currentList,
2111
- });
2112
- const tabString = ' '.repeat(newOptions.tabSize * newOptions.indentLevel);
2113
- const insideTabString = ' '.repeat(newOptions.tabSize * (newOptions.indentLevel + 1));
2114
- let shouldIndent = true;
2115
- const content = !this.children
2116
- ? ''
2117
- : this.children
2118
- .map((element) => {
2119
- const childOptions = Object.assign({}, newOptions);
2120
- childOptions.indentLevel++;
2121
- return (shouldIndent ? '\n' + insideTabString : '') + element?.toVue(childOptions);
2122
- })
2123
- .join('');
2124
- if (!content.length) {
2125
- shouldIndent = false;
2126
- }
2127
- if (newOptions.aslIdAttr) {
2128
- if (newOptions.aslIdAttr === true) {
2129
- newOptions.aslIdAttr = 'asl-id';
2130
- }
2131
- parts.push(`${newOptions.aslIdAttr}="${this.id}"`);
2132
- }
2133
- if (newOptions.nodePathAttr) {
2134
- // 注入 asl 的 node-path
2135
- parts.push(`vusion-node-path="${this.nodePath}"`);
2136
- }
2137
- // 模板里解析时候,可能会有多级嵌套的 current,所以当前有多少的长度,当前就是多大的下标
2138
- this.slotTarget &&
2139
- parts.push(`#${this.slotTarget}` +
2140
- (this.slotScope
2141
- ? `="${currentList.length > 1 ? this.slotScope + (currentList.length - 1) : this.slotScope}"`
2142
- : ''));
2143
- this.refName && parts.push(`:ref="\`${this.refName}\`"`);
2144
- this.keyName && parts.push(`:key="\`${this.keyName}\`"`);
2145
- this.staticClass && parts.push(`class="${this.staticClass}"`);
2146
- this.staticStyle && parts.push(`style="${this.staticStyle}"`);
2147
- const vIfs = [];
2148
- []
2149
- .concat(this.bindAttrs, this.bindDirectives, this.bindEvents)
2150
- .forEach((attr) => {
2151
- const result = newOptions.attrFormat(attr, this, attr?.toVue(newOptions));
2152
- // v-auth v-if 都翻译成 v-if
2153
- if (asserts.isBindDirective(attr) && ['if', 'auth'].includes(attr.name) && result !== false) {
2154
- const expr = result.replace(/v-(if|auth)="(.*)"/, (match, p1, p2) => p2);
2155
- if (expr)
2156
- vIfs.push(attr.name === 'if' ? expr : `$auth.has(${expr})`);
2157
- return;
2158
- }
2159
- result && parts.push(result);
2160
- });
2161
- if (vIfs.length === 2)
2162
- parts.push(`v-if="(${vIfs[0]}) && (${vIfs[1]})"`);
2163
- else if (vIfs.length === 1)
2164
- parts.push(`v-if="${vIfs[0]}"`);
2165
- const bindStyles = newOptions.bindStylesFormat(this.bindStyles, this);
2166
- if (bindStyles)
2167
- parts.push(bindStyles);
2168
- newOptions.getExtraParts(this).forEach((part) => parts.push(part));
2169
- if (['u-modal', 'u-drawer'].includes(this.tag)) {
2170
- this.children.forEach((citem) => {
2171
- if (citem.tag === 'template' && !citem.children.length) {
2172
- parts.push(`:is-${citem.slotTarget}-slot-empty=true`);
2173
- }
2174
- });
2175
- }
2176
- // 部分组件增加 key 唯一标识,防止 vue 判断重复节点,导致渲染异常
2177
- if (this.name &&
2178
- ['u-table-view', 'u-list-view', 'u-grid-view', 'u-list-components', 'u-form', 'u-select'].includes(this.tag)) {
2179
- this.name && parts.push(`key="${this.name}"`);
2180
- }
2181
- if (this.tag === 'slot') {
2182
- this.name && parts.push(`name="${this.name}"`);
2183
- }
2184
- let partsLength = 0;
2185
- let partsString = '';
2186
- parts.forEach((part) => {
2187
- if (partsLength >= 120 || part.length >= 120) {
2188
- partsString += '\n' + tabString + ' '.repeat(3); // ' '.repeat(el.tag.length + 1);
2189
- partsLength = 0;
2190
- }
2191
- partsString += ' ' + part;
2192
- partsLength += part.length;
2193
- });
2194
- let htmlContent = `<${this.tag}${partsString.length ? partsString : ''}>` +
2195
- content +
2196
- (shouldIndent ? '\n' + tabString : '') +
2197
- `</${this.tag}>`;
2198
- if (!content.trim() && selfClosingTag.includes(this.tag)) {
2199
- htmlContent = `<${this.tag}${partsString.length ? partsString : ''} />`;
2200
- }
2201
- return htmlContent;
2202
- }
2203
- /**
2204
- * 从父级删除该节点
2205
- * @internal
2206
- */
2207
- delete() {
2208
- super.delete();
2209
- if (this.parentNode) {
2210
- this.traverseChildren((ele) => {
2211
- this.likeComponent?.removeExistingViewElement(ele);
2212
- });
2213
- }
2214
- }
2215
- findElementByName(name) {
2216
- return utils.traverse((current) => {
2217
- if (current.node.name === name)
2218
- return current.node;
2219
- }, { node: this });
2220
- }
2221
- findElementByTag(tag) {
2222
- return utils.traverse((current) => {
2223
- if (current.node.tag === tag)
2224
- return current.node;
2225
- }, { node: this });
2226
- }
2227
- findElementByAttr(name, value) {
2228
- return utils.traverse((current) => {
2229
- if (current.node.bindAttrs.some((attr) => attr.name === name && attr.value === value))
2230
- return current.node;
2231
- }, { node: this });
2232
- }
2233
- getCurrentName() {
2234
- let current = 'current';
2235
- let parent = this.parentNode;
2236
- let index = 0;
2237
- while (parent && !this.isLikeComponent(parent)) {
2238
- if (parent.slotScope) {
2239
- index++;
2240
- }
2241
- parent = parent.parentNode;
2242
- }
2243
- current = index === 0 ? 'current' : 'current' + index;
2244
- return current;
2245
- }
2246
- /**
2247
- * 计算约束样式
2248
- * @param positionData 位置数据
2249
- * @param ops 配置项
2250
- * @param ops.beforeSetStyleCb 设置样式前的回调
2251
- * @param ops.setStaticSize 是否设置静态尺寸,开启此项会将节点的宽高设置为像素值,通常在修改约束规则时候开启
2252
- */
2253
- computeConstraintStyle(positionData, ops = {}) {
2254
- if (!positionData) {
2255
- return;
2256
- }
2257
- const { nodeRect, parentRect, parentBorder } = positionData;
2258
- const staticWidth = nodeRect.width;
2259
- const staticHeight = nodeRect.height;
2260
- const staticLeft = nodeRect.left - parentRect.left - parentBorder.left;
2261
- const staticTop = nodeRect.top - parentRect.top - parentBorder.top;
2262
- const staticRight = parentRect.width - nodeRect.width - staticLeft - parentBorder.right - parentBorder.left;
2263
- const staticBottom = parentRect.height - nodeRect.height - staticTop - parentBorder.bottom - parentBorder.top;
2264
- const styleObj = this.parseStyleToObject(this.staticStyle);
2265
- const constraintX = styleObj['--constraint-x'] || 'left';
2266
- const constraintY = styleObj['--constraint-y'] || 'top';
2267
- const rawWidth = styleObj.width || '';
2268
- const rawHeight = styleObj.height || '';
2269
- let left = '';
2270
- let right = '';
2271
- let top = '';
2272
- let bottom = '';
2273
- let transform = '';
2274
- let width = ops.setStaticSize ? `${staticWidth}px` : rawWidth;
2275
- let height = ops.setStaticSize ? `${staticHeight}px` : rawHeight;
2276
- const parentWidth = staticLeft + staticWidth + staticRight;
2277
- const parentHeight = staticTop + staticHeight + staticBottom;
2278
- if (constraintX === 'left') {
2279
- left = staticLeft + 'px';
2280
- right = '';
2281
- }
2282
- else if (constraintX === 'right') {
2283
- left = '';
2284
- right = staticRight + 'px';
2285
- }
2286
- else if (constraintX === 'center') {
2287
- const offset = staticLeft + staticWidth / 2 - parentWidth / 2;
2288
- left = `calc(50% ${offset > 0 ? '+' : '-'} ${Math.abs(offset)}px)`;
2289
- right = '';
2290
- transform = 'translateX(-50%)';
2291
- }
2292
- else if (constraintX === 'scale') {
2293
- left = (staticLeft * 100) / parentWidth + '%';
2294
- right = '';
2295
- width = (staticWidth * 100) / parentWidth + '%';
2296
- }
2297
- else if (constraintX === 'left-right') {
2298
- left = staticLeft + 'px';
2299
- right = staticRight + 'px';
2300
- width = 'auto';
2301
- }
2302
- if (constraintY === 'top') {
2303
- top = staticTop + 'px';
2304
- bottom = '';
2305
- }
2306
- else if (constraintY === 'bottom') {
2307
- top = '';
2308
- bottom = staticBottom + 'px';
2309
- }
2310
- else if (constraintY === 'center') {
2311
- const offset = staticTop + staticHeight / 2 - parentHeight / 2;
2312
- top = `calc(50% ${offset > 0 ? '+' : '-'} ${Math.abs(offset)}px)`;
2313
- bottom = '';
2314
- transform = transform ? 'translate(-50%, -50%)' : 'translateY(-50%)';
2315
- }
2316
- else if (constraintY === 'scale') {
2317
- top = (staticTop * 100) / parentHeight + '%';
2318
- bottom = '';
2319
- height = (staticHeight * 100) / parentHeight + '%';
2320
- }
2321
- else if (constraintY === 'top-bottom') {
2322
- top = staticTop + 'px';
2323
- bottom = staticBottom + 'px';
2324
- height = 'auto';
2325
- }
2326
- const newStyleObj = {
2327
- ...styleObj,
2328
- left,
2329
- right,
2330
- top,
2331
- bottom,
2332
- transform,
2333
- width,
2334
- height,
2335
- };
2336
- ops.beforeSetStyleCb?.(newStyleObj);
2337
- const newStaticStyle = this.stringifyStyleAttr(newStyleObj);
2338
- this.setStaticStyle(newStaticStyle);
2339
- }
2340
- updateStyleObj(styleObj) {
2341
- this.setStaticStyle(this.stringifyStyleAttr({
2342
- ...this.parseStyleToObject(this.staticStyle),
2343
- ...styleObj,
2344
- }));
2345
- }
2346
- parseStyleToObject(styleStr = '') {
2347
- const [styleStr1, styleStr2] = styleStr.split('--custom-start: auto;');
2348
- const styleObj = styleStr1.split(/;/gim).reduce((obj, item) => {
2349
- // background-image:url(http://www...)
2350
- item = item.trim();
2351
- const pos = item.indexOf(':');
2352
- if (pos >= 0) {
2353
- const key = item.slice(0, pos).trim();
2354
- const value = item.slice(pos + 1).trim();
2355
- obj[key] = value;
2356
- }
2357
- return obj;
2358
- }, {});
2359
- styleObj['customStyle'] = styleStr2;
2360
- return styleObj;
2361
- }
2362
- stringifyStyleAttr(styleObj) {
2363
- const customStyle = styleObj['customStyle'] || '';
2364
- delete styleObj['customStyle'];
2365
- const styleStr = Object.keys(styleObj)
2366
- // 空字符串是允许的,因为有时候想要覆盖之前的样式。undefined 则不允许
2367
- .filter((key) => styleObj[key] !== undefined)
2368
- .map((key) => `${key}:${String(styleObj[key]).trim()};`)
2369
- .join('');
2370
- return styleStr + '--custom-start: auto;' + customStyle;
2371
- }
2372
- // 批量更新绑定属性
2373
- batchUpdateBindAttrs(attrOptions) {
2374
- const BindAttribute = (0, decorators_1.getConceptConstructor)('BindAttribute');
2375
- const oldBindAttrs = this.bindAttrs.filter((it) => !attrOptions.some((item) => item.name === it.name));
2376
- const newBindAttrs = attrOptions.map((it) => BindAttribute.from(it, this, 'bindAttrs'));
2377
- this.update({
2378
- bindAttrs: [...oldBindAttrs, ...newBindAttrs],
2379
- });
2380
- }
2381
- };
2382
- /** 类名 */
2383
- ViewElement.ConceptName = 'ViewElement';
2384
- /** 继承链 */
2385
- ViewElement.inheritanceChain = ['BaseNode'];
2386
- ViewElement.TAG_NAME_PREFIX_REG = /^([lieu]|van)[-_]/;
2387
- __decorate([
2388
- (0, decorators_1.property)('concept')
2389
- ], ViewElement.prototype, "concept", void 0);
2390
- __decorate([
2391
- (0, decorators_1.property)()
2392
- ], ViewElement.prototype, "type", void 0);
2393
- __decorate([
2394
- (0, decorators_1.property)()
2395
- ], ViewElement.prototype, "tag", void 0);
2396
- __decorate([
2397
- (0, decorators_1.property)()
2398
- ], ViewElement.prototype, "name", void 0);
2399
- __decorate([
2400
- (0, decorators_1.property)()
2401
- ], ViewElement.prototype, "staticClass", void 0);
2402
- __decorate([
2403
- (0, decorators_1.property)()
2404
- ], ViewElement.prototype, "staticStyle", void 0);
2405
- __decorate([
2406
- (0, decorators_1.property)()
2407
- ], ViewElement.prototype, "authDescription", void 0);
2408
- __decorate([
2409
- (0, decorators_1.property)()
2410
- ], ViewElement.prototype, "slotTarget", void 0);
2411
- __decorate([
2412
- (0, decorators_1.property)()
2413
- ], ViewElement.prototype, "slotScope", void 0);
2414
- __decorate([
2415
- (0, decorators_1.property)({
2416
- objectRef: 'BindAttribute',
2417
- isArray: true,
2418
- defaultValue: [],
2419
- })
2420
- ], ViewElement.prototype, "bindAttrs", void 0);
2421
- __decorate([
2422
- (0, decorators_1.property)({
2423
- objectRef: 'BindEvent',
2424
- isArray: true,
2425
- defaultValue: [],
2426
- })
2427
- ], ViewElement.prototype, "bindEvents", void 0);
2428
- __decorate([
2429
- (0, decorators_1.property)({
2430
- objectRef: 'BindDirective',
2431
- isArray: true,
2432
- defaultValue: [],
2433
- })
2434
- ], ViewElement.prototype, "bindDirectives", void 0);
2435
- __decorate([
2436
- (0, decorators_1.property)({
2437
- isArray: true,
2438
- defaultValue: [],
2439
- })
2440
- ], ViewElement.prototype, "bindRoles", void 0);
2441
- __decorate([
2442
- (0, decorators_1.property)({
2443
- objectRef: 'BindStyle',
2444
- isArray: true,
2445
- defaultValue: [],
2446
- })
2447
- ], ViewElement.prototype, "bindStyles", void 0);
2448
- __decorate([
2449
- (0, decorators_1.property)({
2450
- objectRef: 'ViewElement',
2451
- isArray: true,
2452
- defaultValue: [],
2453
- })
2454
- ], ViewElement.prototype, "children", void 0);
2455
- __decorate([
2456
- translator_1.withGenerator
2457
- ], ViewElement.prototype, "toEmbeddedTSDefinition", null);
2458
- __decorate([
2459
- translator_1.withGenerator
2460
- ], ViewElement.prototype, "toEmbeddedTSVariableDefinition", null);
2461
- __decorate([
2462
- translator_1.withGenerator
2463
- ], ViewElement.prototype, "toEmbeddedTSVariableFunctionDefinition", null);
2464
- __decorate([
2465
- translator_1.withSourceMapGenerator
2466
- ], ViewElement.prototype, "toEmbeddedTS", null);
2467
- __decorate([
2468
- (0, translator_1.withSourceMap)()
2469
- ], ViewElement.prototype, "toNaturalTS", null);
2470
- __decorate([
2471
- (0, decorators_1.excludedInJSON)()
2472
- ], ViewElement.prototype, "computedStyle", void 0);
2473
- ViewElement = ViewElement_1 = __decorate([
2474
- (0, decorators_1.concept)('页面元素')
2475
- ], ViewElement);
2476
- exports.ViewElement = ViewElement;
2477
- exports.default = ViewElement;
2478
- //================================================================================
2479
- // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
2480
- // 自动生成的代码已结束。下面可以手动编写。
2481
- //================================================================================
2482
- //# sourceMappingURL=ViewElement__.js.map