@lcap/nasl 2.22.2-beta.3 → 2.22.2-beta.4

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 (669) hide show
  1. package/out/automate/engine/index.d.ts +4 -0
  2. package/out/automate/engine/index.js +443 -0
  3. package/out/automate/engine/index.js.map +1 -0
  4. package/out/automate/engine/operators.d.ts +24 -0
  5. package/out/automate/engine/operators.js +252 -0
  6. package/out/automate/engine/operators.js.map +1 -0
  7. package/out/automate/engine/uniqueName.d.ts +12 -0
  8. package/out/automate/engine/uniqueName.js +112 -0
  9. package/out/automate/engine/uniqueName.js.map +1 -0
  10. package/out/automate/engine/utils.d.ts +25 -0
  11. package/out/automate/engine/utils.js +428 -0
  12. package/out/automate/engine/utils.js.map +1 -0
  13. package/out/automate/engine/viewCache.d.ts +19 -0
  14. package/out/automate/engine/viewCache.js +45 -0
  15. package/out/automate/engine/viewCache.js.map +1 -0
  16. package/out/automate/template/myProcess.d.ts +10 -0
  17. package/out/automate/template/myProcess.js +11498 -0
  18. package/out/automate/template/myProcess.js.map +1 -0
  19. package/out/bak/translator.d.ts +1 -0
  20. package/out/bak/translator.js +130 -0
  21. package/out/bak/translator.js.map +1 -0
  22. package/out/common/BaseNode.d.ts +306 -0
  23. package/out/common/BaseNode.js +1222 -0
  24. package/out/common/BaseNode.js.map +1 -0
  25. package/out/common/Command.d.ts +20 -0
  26. package/out/common/Command.js +66 -0
  27. package/out/common/Command.js.map +1 -0
  28. package/out/common/ComponentAPI.d.ts +110 -0
  29. package/out/common/ComponentAPI.js +3 -0
  30. package/out/common/ComponentAPI.js.map +1 -0
  31. package/out/common/EventEmitter.d.ts +59 -0
  32. package/out/common/EventEmitter.js +69 -0
  33. package/out/common/EventEmitter.js.map +1 -0
  34. package/out/common/Messager.d.ts +91 -0
  35. package/out/common/Messager.js +208 -0
  36. package/out/common/Messager.js.map +1 -0
  37. package/out/common/index.d.ts +3 -0
  38. package/out/common/index.js +20 -0
  39. package/out/common/index.js.map +1 -0
  40. package/out/concepts/Abort__.d.ts +26 -0
  41. package/out/concepts/Abort__.js +79 -0
  42. package/out/concepts/Abort__.js.map +1 -0
  43. package/out/concepts/Anchor__.d.ts +45 -0
  44. package/out/concepts/Anchor__.js +182 -0
  45. package/out/concepts/Anchor__.js.map +1 -0
  46. package/out/concepts/AnonymousFunction__.d.ts +173 -0
  47. package/out/concepts/AnonymousFunction__.js +484 -0
  48. package/out/concepts/AnonymousFunction__.js.map +1 -0
  49. package/out/concepts/App__.d.ts +1166 -0
  50. package/out/concepts/App__.js +1885 -0
  51. package/out/concepts/App__.js.map +1 -0
  52. package/out/concepts/Argument__.d.ts +66 -0
  53. package/out/concepts/Argument__.js +267 -0
  54. package/out/concepts/Argument__.js.map +1 -0
  55. package/out/concepts/Assignee__.d.ts +289 -0
  56. package/out/concepts/Assignee__.js +426 -0
  57. package/out/concepts/Assignee__.js.map +1 -0
  58. package/out/concepts/AssignmentLine__.d.ts +42 -0
  59. package/out/concepts/AssignmentLine__.js +111 -0
  60. package/out/concepts/AssignmentLine__.js.map +1 -0
  61. package/out/concepts/Assignment__.d.ts +74 -0
  62. package/out/concepts/Assignment__.js +287 -0
  63. package/out/concepts/Assignment__.js.map +1 -0
  64. package/out/concepts/Attribute__.d.ts +98 -0
  65. package/out/concepts/Attribute__.js +206 -0
  66. package/out/concepts/Attribute__.js.map +1 -0
  67. package/out/concepts/BatchAssignment__.d.ts +252 -0
  68. package/out/concepts/BatchAssignment__.js +806 -0
  69. package/out/concepts/BatchAssignment__.js.map +1 -0
  70. package/out/concepts/BinaryExpression__.d.ts +71 -0
  71. package/out/concepts/BinaryExpression__.js +347 -0
  72. package/out/concepts/BinaryExpression__.js.map +1 -0
  73. package/out/concepts/BindAttribute__.d.ts +319 -0
  74. package/out/concepts/BindAttribute__.js +896 -0
  75. package/out/concepts/BindAttribute__.js.map +1 -0
  76. package/out/concepts/BindDirective__.d.ts +162 -0
  77. package/out/concepts/BindDirective__.js +538 -0
  78. package/out/concepts/BindDirective__.js.map +1 -0
  79. package/out/concepts/BindEvent__.d.ts +240 -0
  80. package/out/concepts/BindEvent__.js +764 -0
  81. package/out/concepts/BindEvent__.js.map +1 -0
  82. package/out/concepts/BindStyle__.d.ts +140 -0
  83. package/out/concepts/BindStyle__.js +433 -0
  84. package/out/concepts/BindStyle__.js.map +1 -0
  85. package/out/concepts/BooleanLiteral__.d.ts +35 -0
  86. package/out/concepts/BooleanLiteral__.js +100 -0
  87. package/out/concepts/BooleanLiteral__.js.map +1 -0
  88. package/out/concepts/CallFunction__.d.ts +159 -0
  89. package/out/concepts/CallFunction__.js +503 -0
  90. package/out/concepts/CallFunction__.js.map +1 -0
  91. package/out/concepts/CallInterface__.d.ts +116 -0
  92. package/out/concepts/CallInterface__.js +570 -0
  93. package/out/concepts/CallInterface__.js.map +1 -0
  94. package/out/concepts/CallLogic__.d.ts +187 -0
  95. package/out/concepts/CallLogic__.js +1007 -0
  96. package/out/concepts/CallLogic__.js.map +1 -0
  97. package/out/concepts/CallQueryComponent__.d.ts +433 -0
  98. package/out/concepts/CallQueryComponent__.js +1267 -0
  99. package/out/concepts/CallQueryComponent__.js.map +1 -0
  100. package/out/concepts/Comment__.d.ts +32 -0
  101. package/out/concepts/Comment__.js +96 -0
  102. package/out/concepts/Comment__.js.map +1 -0
  103. package/out/concepts/CompletionProperty__.d.ts +105 -0
  104. package/out/concepts/CompletionProperty__.js +262 -0
  105. package/out/concepts/CompletionProperty__.js.map +1 -0
  106. package/out/concepts/ConfigGroup__.d.ts +124 -0
  107. package/out/concepts/ConfigGroup__.js +237 -0
  108. package/out/concepts/ConfigGroup__.js.map +1 -0
  109. package/out/concepts/ConfigPropertyValue__.d.ts +45 -0
  110. package/out/concepts/ConfigPropertyValue__.js +107 -0
  111. package/out/concepts/ConfigPropertyValue__.js.map +1 -0
  112. package/out/concepts/ConfigProperty__.d.ts +154 -0
  113. package/out/concepts/ConfigProperty__.js +324 -0
  114. package/out/concepts/ConfigProperty__.js.map +1 -0
  115. package/out/concepts/Configuration__.d.ts +124 -0
  116. package/out/concepts/Configuration__.js +228 -0
  117. package/out/concepts/Configuration__.js.map +1 -0
  118. package/out/concepts/Constant__.d.ts +106 -0
  119. package/out/concepts/Constant__.js +249 -0
  120. package/out/concepts/Constant__.js.map +1 -0
  121. package/out/concepts/DataElement__.d.ts +47 -0
  122. package/out/concepts/DataElement__.js +119 -0
  123. package/out/concepts/DataElement__.js.map +1 -0
  124. package/out/concepts/DataSource__.d.ts +165 -0
  125. package/out/concepts/DataSource__.js +442 -0
  126. package/out/concepts/DataSource__.js.map +1 -0
  127. package/out/concepts/DatabaseTypeAnnotation__.d.ts +32 -0
  128. package/out/concepts/DatabaseTypeAnnotation__.js +79 -0
  129. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
  130. package/out/concepts/Destination__.d.ts +157 -0
  131. package/out/concepts/Destination__.js +740 -0
  132. package/out/concepts/Destination__.js.map +1 -0
  133. package/out/concepts/End__.d.ts +25 -0
  134. package/out/concepts/End__.js +86 -0
  135. package/out/concepts/End__.js.map +1 -0
  136. package/out/concepts/EntityIndex__.d.ts +96 -0
  137. package/out/concepts/EntityIndex__.js +221 -0
  138. package/out/concepts/EntityIndex__.js.map +1 -0
  139. package/out/concepts/EntityProperty__.d.ts +274 -0
  140. package/out/concepts/EntityProperty__.js +824 -0
  141. package/out/concepts/EntityProperty__.js.map +1 -0
  142. package/out/concepts/Entity__.d.ts +339 -0
  143. package/out/concepts/Entity__.js +711 -0
  144. package/out/concepts/Entity__.js.map +1 -0
  145. package/out/concepts/EnumItem__.d.ts +64 -0
  146. package/out/concepts/EnumItem__.js +146 -0
  147. package/out/concepts/EnumItem__.js.map +1 -0
  148. package/out/concepts/Enum__.d.ts +138 -0
  149. package/out/concepts/Enum__.js +322 -0
  150. package/out/concepts/Enum__.js.map +1 -0
  151. package/out/concepts/Event__.d.ts +144 -0
  152. package/out/concepts/Event__.js +249 -0
  153. package/out/concepts/Event__.js.map +1 -0
  154. package/out/concepts/ExternalDestination__.d.ts +76 -0
  155. package/out/concepts/ExternalDestination__.js +286 -0
  156. package/out/concepts/ExternalDestination__.js.map +1 -0
  157. package/out/concepts/ForEachStatement__.d.ts +189 -0
  158. package/out/concepts/ForEachStatement__.js +446 -0
  159. package/out/concepts/ForEachStatement__.js.map +1 -0
  160. package/out/concepts/FrontendLibrary__.d.ts +214 -0
  161. package/out/concepts/FrontendLibrary__.js +353 -0
  162. package/out/concepts/FrontendLibrary__.js.map +1 -0
  163. package/out/concepts/Frontend__.d.ts +374 -0
  164. package/out/concepts/Frontend__.js +690 -0
  165. package/out/concepts/Frontend__.js.map +1 -0
  166. package/out/concepts/Function__.d.ts +417 -0
  167. package/out/concepts/Function__.js +717 -0
  168. package/out/concepts/Function__.js.map +1 -0
  169. package/out/concepts/Identifier__.d.ts +52 -0
  170. package/out/concepts/Identifier__.js +296 -0
  171. package/out/concepts/Identifier__.js.map +1 -0
  172. package/out/concepts/IfStatement__.d.ts +158 -0
  173. package/out/concepts/IfStatement__.js +305 -0
  174. package/out/concepts/IfStatement__.js.map +1 -0
  175. package/out/concepts/Integration__.d.ts +54 -0
  176. package/out/concepts/Integration__.js +143 -0
  177. package/out/concepts/Integration__.js.map +1 -0
  178. package/out/concepts/InterfaceParam__.d.ts +111 -0
  179. package/out/concepts/InterfaceParam__.js +266 -0
  180. package/out/concepts/InterfaceParam__.js.map +1 -0
  181. package/out/concepts/Interface__.d.ts +284 -0
  182. package/out/concepts/Interface__.js +749 -0
  183. package/out/concepts/Interface__.js.map +1 -0
  184. package/out/concepts/JSBlock__.d.ts +34 -0
  185. package/out/concepts/JSBlock__.js +106 -0
  186. package/out/concepts/JSBlock__.js.map +1 -0
  187. package/out/concepts/JavaLogic__.d.ts +43 -0
  188. package/out/concepts/JavaLogic__.js +124 -0
  189. package/out/concepts/JavaLogic__.js.map +1 -0
  190. package/out/concepts/LogicItem__.d.ts +126 -0
  191. package/out/concepts/LogicItem__.js +253 -0
  192. package/out/concepts/LogicItem__.js.map +1 -0
  193. package/out/concepts/Logic__.d.ts +633 -0
  194. package/out/concepts/Logic__.js +1568 -0
  195. package/out/concepts/Logic__.js.map +1 -0
  196. package/out/concepts/MatchCase__.d.ts +258 -0
  197. package/out/concepts/MatchCase__.js +591 -0
  198. package/out/concepts/MatchCase__.js.map +1 -0
  199. package/out/concepts/Match__.d.ts +124 -0
  200. package/out/concepts/Match__.js +628 -0
  201. package/out/concepts/Match__.js.map +1 -0
  202. package/out/concepts/MemberExpression__.d.ts +73 -0
  203. package/out/concepts/MemberExpression__.js +319 -0
  204. package/out/concepts/MemberExpression__.js.map +1 -0
  205. package/out/concepts/MetadataType__.d.ts +245 -0
  206. package/out/concepts/MetadataType__.js +473 -0
  207. package/out/concepts/MetadataType__.js.map +1 -0
  208. package/out/concepts/MicroApp__.d.ts +52 -0
  209. package/out/concepts/MicroApp__.js +119 -0
  210. package/out/concepts/MicroApp__.js.map +1 -0
  211. package/out/concepts/Module__.d.ts +978 -0
  212. package/out/concepts/Module__.js +1386 -0
  213. package/out/concepts/Module__.js.map +1 -0
  214. package/out/concepts/Namespace__.d.ts +1069 -0
  215. package/out/concepts/Namespace__.js +1380 -0
  216. package/out/concepts/Namespace__.js.map +1 -0
  217. package/out/concepts/NewComposite__.d.ts +346 -0
  218. package/out/concepts/NewComposite__.js +1086 -0
  219. package/out/concepts/NewComposite__.js.map +1 -0
  220. package/out/concepts/NewList__.d.ts +133 -0
  221. package/out/concepts/NewList__.js +385 -0
  222. package/out/concepts/NewList__.js.map +1 -0
  223. package/out/concepts/NewMap__.d.ts +224 -0
  224. package/out/concepts/NewMap__.js +530 -0
  225. package/out/concepts/NewMap__.js.map +1 -0
  226. package/out/concepts/New__.d.ts +21 -0
  227. package/out/concepts/New__.js +68 -0
  228. package/out/concepts/New__.js.map +1 -0
  229. package/out/concepts/NullLiteral__.d.ts +27 -0
  230. package/out/concepts/NullLiteral__.js +81 -0
  231. package/out/concepts/NullLiteral__.js.map +1 -0
  232. package/out/concepts/NumericLiteral__.d.ts +56 -0
  233. package/out/concepts/NumericLiteral__.js +174 -0
  234. package/out/concepts/NumericLiteral__.js.map +1 -0
  235. package/out/concepts/OqlQueryComponent__.d.ts +73 -0
  236. package/out/concepts/OqlQueryComponent__.js +327 -0
  237. package/out/concepts/OqlQueryComponent__.js.map +1 -0
  238. package/out/concepts/Param__.d.ts +161 -0
  239. package/out/concepts/Param__.js +431 -0
  240. package/out/concepts/Param__.js.map +1 -0
  241. package/out/concepts/Point__.d.ts +32 -0
  242. package/out/concepts/Point__.js +79 -0
  243. package/out/concepts/Point__.js.map +1 -0
  244. package/out/concepts/ProcessComponent__.d.ts +220 -0
  245. package/out/concepts/ProcessComponent__.js +339 -0
  246. package/out/concepts/ProcessComponent__.js.map +1 -0
  247. package/out/concepts/ProcessElement__.d.ts +647 -0
  248. package/out/concepts/ProcessElement__.js +1220 -0
  249. package/out/concepts/ProcessElement__.js.map +1 -0
  250. package/out/concepts/ProcessOutcome__.d.ts +32 -0
  251. package/out/concepts/ProcessOutcome__.js +90 -0
  252. package/out/concepts/ProcessOutcome__.js.map +1 -0
  253. package/out/concepts/ProcessOutcomes__.d.ts +32 -0
  254. package/out/concepts/ProcessOutcomes__.js +89 -0
  255. package/out/concepts/ProcessOutcomes__.js.map +1 -0
  256. package/out/concepts/Process__.d.ts +614 -0
  257. package/out/concepts/Process__.js +1031 -0
  258. package/out/concepts/Process__.js.map +1 -0
  259. package/out/concepts/QueryAggregateExpression__.d.ts +52 -0
  260. package/out/concepts/QueryAggregateExpression__.js +149 -0
  261. package/out/concepts/QueryAggregateExpression__.js.map +1 -0
  262. package/out/concepts/QueryFieldExpression__.d.ts +54 -0
  263. package/out/concepts/QueryFieldExpression__.js +160 -0
  264. package/out/concepts/QueryFieldExpression__.js.map +1 -0
  265. package/out/concepts/QueryFromExpression__.d.ts +97 -0
  266. package/out/concepts/QueryFromExpression__.js +197 -0
  267. package/out/concepts/QueryFromExpression__.js.map +1 -0
  268. package/out/concepts/QueryGroupByExpression__.d.ts +47 -0
  269. package/out/concepts/QueryGroupByExpression__.js +142 -0
  270. package/out/concepts/QueryGroupByExpression__.js.map +1 -0
  271. package/out/concepts/QueryJoinExpression__.d.ts +184 -0
  272. package/out/concepts/QueryJoinExpression__.js +318 -0
  273. package/out/concepts/QueryJoinExpression__.js.map +1 -0
  274. package/out/concepts/QueryLimitExpression__.d.ts +58 -0
  275. package/out/concepts/QueryLimitExpression__.js +160 -0
  276. package/out/concepts/QueryLimitExpression__.js.map +1 -0
  277. package/out/concepts/QueryOrderByExpression__.d.ts +69 -0
  278. package/out/concepts/QueryOrderByExpression__.js +173 -0
  279. package/out/concepts/QueryOrderByExpression__.js.map +1 -0
  280. package/out/concepts/QuerySelectExpression__.d.ts +204 -0
  281. package/out/concepts/QuerySelectExpression__.js +295 -0
  282. package/out/concepts/QuerySelectExpression__.js.map +1 -0
  283. package/out/concepts/Rect__.d.ts +40 -0
  284. package/out/concepts/Rect__.js +95 -0
  285. package/out/concepts/Rect__.js.map +1 -0
  286. package/out/concepts/Return__.d.ts +129 -0
  287. package/out/concepts/Return__.js +345 -0
  288. package/out/concepts/Return__.js.map +1 -0
  289. package/out/concepts/Role__.d.ts +63 -0
  290. package/out/concepts/Role__.js +170 -0
  291. package/out/concepts/Role__.js.map +1 -0
  292. package/out/concepts/SelectMembers__.d.ts +143 -0
  293. package/out/concepts/SelectMembers__.js +293 -0
  294. package/out/concepts/SelectMembers__.js.map +1 -0
  295. package/out/concepts/Slot__.d.ts +75 -0
  296. package/out/concepts/Slot__.js +165 -0
  297. package/out/concepts/Slot__.js.map +1 -0
  298. package/out/concepts/SqlQueryComponent__.d.ts +71 -0
  299. package/out/concepts/SqlQueryComponent__.js +271 -0
  300. package/out/concepts/SqlQueryComponent__.js.map +1 -0
  301. package/out/concepts/Start__.d.ts +25 -0
  302. package/out/concepts/Start__.js +73 -0
  303. package/out/concepts/Start__.js.map +1 -0
  304. package/out/concepts/StringInterpolation__.d.ts +117 -0
  305. package/out/concepts/StringInterpolation__.js +252 -0
  306. package/out/concepts/StringInterpolation__.js.map +1 -0
  307. package/out/concepts/StringLiteral__.d.ts +38 -0
  308. package/out/concepts/StringLiteral__.js +134 -0
  309. package/out/concepts/StringLiteral__.js.map +1 -0
  310. package/out/concepts/StructureProperty__.d.ts +131 -0
  311. package/out/concepts/StructureProperty__.js +303 -0
  312. package/out/concepts/StructureProperty__.js.map +1 -0
  313. package/out/concepts/Structure__.d.ts +252 -0
  314. package/out/concepts/Structure__.js +447 -0
  315. package/out/concepts/Structure__.js.map +1 -0
  316. package/out/concepts/SwitchCase__.d.ts +94 -0
  317. package/out/concepts/SwitchCase__.js +232 -0
  318. package/out/concepts/SwitchCase__.js.map +1 -0
  319. package/out/concepts/SwitchStatement__.d.ts +84 -0
  320. package/out/concepts/SwitchStatement__.js +177 -0
  321. package/out/concepts/SwitchStatement__.js.map +1 -0
  322. package/out/concepts/Theme__.d.ts +38 -0
  323. package/out/concepts/Theme__.js +88 -0
  324. package/out/concepts/Theme__.js.map +1 -0
  325. package/out/concepts/Transactional__.d.ts +83 -0
  326. package/out/concepts/Transactional__.js +162 -0
  327. package/out/concepts/Transactional__.js.map +1 -0
  328. package/out/concepts/TypeAnnotation__.d.ts +290 -0
  329. package/out/concepts/TypeAnnotation__.js +885 -0
  330. package/out/concepts/TypeAnnotation__.js.map +1 -0
  331. package/out/concepts/TypeParam__.d.ts +25 -0
  332. package/out/concepts/TypeParam__.js +73 -0
  333. package/out/concepts/TypeParam__.js.map +1 -0
  334. package/out/concepts/UnaryExpression__.d.ts +49 -0
  335. package/out/concepts/UnaryExpression__.js +176 -0
  336. package/out/concepts/UnaryExpression__.js.map +1 -0
  337. package/out/concepts/Unparsed__.d.ts +32 -0
  338. package/out/concepts/Unparsed__.js +94 -0
  339. package/out/concepts/Unparsed__.js.map +1 -0
  340. package/out/concepts/UseComponent__.d.ts +32 -0
  341. package/out/concepts/UseComponent__.js +79 -0
  342. package/out/concepts/UseComponent__.js.map +1 -0
  343. package/out/concepts/ValidationRule__.d.ts +142 -0
  344. package/out/concepts/ValidationRule__.js +473 -0
  345. package/out/concepts/ValidationRule__.js.map +1 -0
  346. package/out/concepts/Variable__.d.ts +139 -0
  347. package/out/concepts/Variable__.js +386 -0
  348. package/out/concepts/Variable__.js.map +1 -0
  349. package/out/concepts/ViewBlock__.d.ts +36 -0
  350. package/out/concepts/ViewBlock__.js +87 -0
  351. package/out/concepts/ViewBlock__.js.map +1 -0
  352. package/out/concepts/ViewComponent__.d.ts +566 -0
  353. package/out/concepts/ViewComponent__.js +762 -0
  354. package/out/concepts/ViewComponent__.js.map +1 -0
  355. package/out/concepts/ViewElement__.d.ts +597 -0
  356. package/out/concepts/ViewElement__.js +1777 -0
  357. package/out/concepts/ViewElement__.js.map +1 -0
  358. package/out/concepts/View__.d.ts +714 -0
  359. package/out/concepts/View__.js +1733 -0
  360. package/out/concepts/View__.js.map +1 -0
  361. package/out/concepts/WhileStatement__.d.ts +97 -0
  362. package/out/concepts/WhileStatement__.js +211 -0
  363. package/out/concepts/WhileStatement__.js.map +1 -0
  364. package/out/concepts/basics/stdlib/index.d.ts +4 -0
  365. package/out/concepts/basics/stdlib/index.js +29 -0
  366. package/out/concepts/basics/stdlib/index.js.map +1 -0
  367. package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -0
  368. package/out/concepts/basics/stdlib/nasl.auth.js +140 -0
  369. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
  370. package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
  371. package/out/concepts/basics/stdlib/nasl.browser.js +133 -0
  372. package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
  373. package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -0
  374. package/out/concepts/basics/stdlib/nasl.collection.js +52 -0
  375. package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
  376. package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
  377. package/out/concepts/basics/stdlib/nasl.configuration.js +33 -0
  378. package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
  379. package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -0
  380. package/out/concepts/basics/stdlib/nasl.core.js +49 -0
  381. package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
  382. package/out/concepts/basics/stdlib/nasl.event.d.ts +3 -0
  383. package/out/concepts/basics/stdlib/nasl.event.js +25 -0
  384. package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
  385. package/out/concepts/basics/stdlib/nasl.interface.d.ts +7 -0
  386. package/out/concepts/basics/stdlib/nasl.interface.js +43 -0
  387. package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
  388. package/out/concepts/basics/stdlib/nasl.io.d.ts +3 -0
  389. package/out/concepts/basics/stdlib/nasl.io.js +52 -0
  390. package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
  391. package/out/concepts/basics/stdlib/nasl.logging.d.ts +3 -0
  392. package/out/concepts/basics/stdlib/nasl.logging.js +56 -0
  393. package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
  394. package/out/concepts/basics/stdlib/nasl.process.d.ts +7 -0
  395. package/out/concepts/basics/stdlib/nasl.process.js +638 -0
  396. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
  397. package/out/concepts/basics/stdlib/nasl.ui.d.ts +7 -0
  398. package/out/concepts/basics/stdlib/nasl.ui.js +1043 -0
  399. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
  400. package/out/concepts/basics/stdlib/nasl.util.d.ts +3 -0
  401. package/out/concepts/basics/stdlib/nasl.util.js +1798 -0
  402. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
  403. package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
  404. package/out/concepts/basics/stdlib/nasl.validation.js +565 -0
  405. package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
  406. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
  407. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +26 -0
  408. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
  409. package/out/concepts/basics/types/coreTypeList.d.ts +2 -0
  410. package/out/concepts/basics/types/coreTypeList.js +15 -0
  411. package/out/concepts/basics/types/coreTypeList.js.map +1 -0
  412. package/out/concepts/basics/types/index.d.ts +15 -0
  413. package/out/concepts/basics/types/index.js +32 -0
  414. package/out/concepts/basics/types/index.js.map +1 -0
  415. package/out/concepts/index.d.ts +5 -0
  416. package/out/concepts/index.js +24 -0
  417. package/out/concepts/index.js.map +1 -0
  418. package/out/concepts/index__.d.ts +108 -0
  419. package/out/concepts/index__.js +125 -0
  420. package/out/concepts/index__.js.map +1 -0
  421. package/out/config.d.ts +44 -0
  422. package/out/config.js +73 -0
  423. package/out/config.js.map +1 -0
  424. package/out/decorators/index.d.ts +56 -0
  425. package/out/decorators/index.js +159 -0
  426. package/out/decorators/index.js.map +1 -0
  427. package/out/enums/KEYWORDS.d.ts +6 -0
  428. package/out/enums/KEYWORDS.js +1243 -0
  429. package/out/enums/KEYWORDS.js.map +1 -0
  430. package/out/enums/LEVEL_NAME_MAP.d.ts +26 -0
  431. package/out/enums/LEVEL_NAME_MAP.js +30 -0
  432. package/out/enums/LEVEL_NAME_MAP.js.map +1 -0
  433. package/out/eventBus.d.ts +3 -0
  434. package/out/eventBus.js +7 -0
  435. package/out/eventBus.js.map +1 -0
  436. package/out/generator/compileComponent.d.ts +11 -0
  437. package/out/generator/compileComponent.js +12 -0
  438. package/out/generator/compileComponent.js.map +1 -0
  439. package/out/generator/genBundleFiles.d.ts +33 -0
  440. package/out/generator/genBundleFiles.js +501 -0
  441. package/out/generator/genBundleFiles.js.map +1 -0
  442. package/out/generator/genHash.d.ts +7 -0
  443. package/out/generator/genHash.js +39 -0
  444. package/out/generator/genHash.js.map +1 -0
  445. package/out/generator/genMetaData.d.ts +28 -0
  446. package/out/generator/genMetaData.js +288 -0
  447. package/out/generator/genMetaData.js.map +1 -0
  448. package/out/generator/genReleaseBody.d.ts +60 -0
  449. package/out/generator/genReleaseBody.js +493 -0
  450. package/out/generator/genReleaseBody.js.map +1 -0
  451. package/out/generator/icestark.d.ts +2 -0
  452. package/out/generator/icestark.js +48 -0
  453. package/out/generator/icestark.js.map +1 -0
  454. package/out/generator/index.d.ts +7 -0
  455. package/out/generator/index.js +24 -0
  456. package/out/generator/index.js.map +1 -0
  457. package/out/generator/microApp.d.ts +2 -0
  458. package/out/generator/microApp.js +35 -0
  459. package/out/generator/microApp.js.map +1 -0
  460. package/out/generator/permission.d.ts +10 -0
  461. package/out/generator/permission.js +269 -0
  462. package/out/generator/permission.js.map +1 -0
  463. package/out/generator/qiankun.d.ts +2 -0
  464. package/out/generator/qiankun.js +52 -0
  465. package/out/generator/qiankun.js.map +1 -0
  466. package/out/generator/styleReplacer.d.ts +3 -0
  467. package/out/generator/styleReplacer.js +71 -0
  468. package/out/generator/styleReplacer.js.map +1 -0
  469. package/out/index.d.ts +13 -0
  470. package/out/index.js +64 -0
  471. package/out/index.js.map +1 -0
  472. package/out/manager/diagnostic.d.ts +35 -0
  473. package/out/manager/diagnostic.js +63 -0
  474. package/out/manager/diagnostic.js.map +1 -0
  475. package/out/manager/stepRecorder.d.ts +20 -0
  476. package/out/manager/stepRecorder.js +110 -0
  477. package/out/manager/stepRecorder.js.map +1 -0
  478. package/out/sentry/index.d.ts +29 -0
  479. package/out/sentry/index.js +111 -0
  480. package/out/sentry/index.js.map +1 -0
  481. package/out/server/createUiTs.d.ts +16 -0
  482. package/out/server/createUiTs.js +248 -0
  483. package/out/server/createUiTs.js.map +1 -0
  484. package/out/server/entity2LogicNamespace.d.ts +10 -0
  485. package/out/server/entity2LogicNamespace.js +380 -0
  486. package/out/server/entity2LogicNamespace.js.map +1 -0
  487. package/out/server/event.d.ts +30 -0
  488. package/out/server/event.js +151 -0
  489. package/out/server/event.js.map +1 -0
  490. package/out/server/extendBaseNode.d.ts +1 -0
  491. package/out/server/extendBaseNode.js +475 -0
  492. package/out/server/extendBaseNode.js.map +1 -0
  493. package/out/server/formatTsUtils.d.ts +36 -0
  494. package/out/server/formatTsUtils.js +788 -0
  495. package/out/server/formatTsUtils.js.map +1 -0
  496. package/out/server/getExtensionModules.d.ts +3 -0
  497. package/out/server/getExtensionModules.js +20 -0
  498. package/out/server/getExtensionModules.js.map +1 -0
  499. package/out/server/getFunctions.d.ts +3 -0
  500. package/out/server/getFunctions.js +20 -0
  501. package/out/server/getFunctions.js.map +1 -0
  502. package/out/server/getInterfaces.d.ts +2 -0
  503. package/out/server/getInterfaces.js +48 -0
  504. package/out/server/getInterfaces.js.map +1 -0
  505. package/out/server/getLogging.d.ts +1 -0
  506. package/out/server/getLogging.js +9 -0
  507. package/out/server/getLogging.js.map +1 -0
  508. package/out/server/getLogics.d.ts +4 -0
  509. package/out/server/getLogics.js +352 -0
  510. package/out/server/getLogics.js.map +1 -0
  511. package/out/server/getMemberIdentifier.d.ts +15 -0
  512. package/out/server/getMemberIdentifier.js +290 -0
  513. package/out/server/getMemberIdentifier.js.map +1 -0
  514. package/out/server/getProcessComponents.d.ts +2 -0
  515. package/out/server/getProcessComponents.js +13 -0
  516. package/out/server/getProcessComponents.js.map +1 -0
  517. package/out/server/getProcesses.d.ts +33 -0
  518. package/out/server/getProcesses.js +599 -0
  519. package/out/server/getProcesses.js.map +1 -0
  520. package/out/server/getScope.d.ts +13 -0
  521. package/out/server/getScope.js +61 -0
  522. package/out/server/getScope.js.map +1 -0
  523. package/out/server/getValidates.d.ts +3 -0
  524. package/out/server/getValidates.js +14 -0
  525. package/out/server/getValidates.js.map +1 -0
  526. package/out/server/index.d.ts +5 -0
  527. package/out/server/index.js +38 -0
  528. package/out/server/index.js.map +1 -0
  529. package/out/server/naslServer.d.ts +363 -0
  530. package/out/server/naslServer.js +4382 -0
  531. package/out/server/naslServer.js.map +1 -0
  532. package/out/server/naslStdlibMap.d.ts +2 -0
  533. package/out/server/naslStdlibMap.js +50 -0
  534. package/out/server/naslStdlibMap.js.map +1 -0
  535. package/out/server/process2LogicNamespace.d.ts +26 -0
  536. package/out/server/process2LogicNamespace.js +109 -0
  537. package/out/server/process2LogicNamespace.js.map +1 -0
  538. package/out/server/translator.d.ts +26 -0
  539. package/out/server/translator.js +787 -0
  540. package/out/server/translator.js.map +1 -0
  541. package/out/service/creator/add.configs.d.ts +1 -0
  542. package/out/service/creator/add.configs.js +74 -0
  543. package/out/service/creator/add.configs.js.map +1 -0
  544. package/out/service/creator/errHandles.d.ts +18 -0
  545. package/out/service/creator/errHandles.js +75 -0
  546. package/out/service/creator/errHandles.js.map +1 -0
  547. package/out/service/creator/index.d.ts +1 -0
  548. package/out/service/creator/index.js +74 -0
  549. package/out/service/creator/index.js.map +1 -0
  550. package/out/service/datasource/api.d.ts +12 -0
  551. package/out/service/datasource/api.js +14 -0
  552. package/out/service/datasource/api.js.map +1 -0
  553. package/out/service/datasource/index.d.ts +2 -0
  554. package/out/service/datasource/index.js +10 -0
  555. package/out/service/datasource/index.js.map +1 -0
  556. package/out/service/defaultErrorMessage.json +98 -0
  557. package/out/service/logic/api.d.ts +9 -0
  558. package/out/service/logic/api.js +11 -0
  559. package/out/service/logic/api.js.map +1 -0
  560. package/out/service/logic/index.d.ts +2 -0
  561. package/out/service/logic/index.js +10 -0
  562. package/out/service/logic/index.js.map +1 -0
  563. package/out/service/storage/api.d.ts +45 -0
  564. package/out/service/storage/api.js +36 -0
  565. package/out/service/storage/api.js.map +1 -0
  566. package/out/service/storage/index.d.ts +2 -0
  567. package/out/service/storage/index.js +10 -0
  568. package/out/service/storage/index.js.map +1 -0
  569. package/out/service/storage/init.d.ts +65 -0
  570. package/out/service/storage/init.js +797 -0
  571. package/out/service/storage/init.js.map +1 -0
  572. package/out/service/storage/jsoner.d.ts +36 -0
  573. package/out/service/storage/jsoner.js +131 -0
  574. package/out/service/storage/jsoner.js.map +1 -0
  575. package/out/service/storage/map.d.ts +4 -0
  576. package/out/service/storage/map.js +54 -0
  577. package/out/service/storage/map.js.map +1 -0
  578. package/out/service/storage/service.d.ts +22 -0
  579. package/out/service/storage/service.js +70 -0
  580. package/out/service/storage/service.js.map +1 -0
  581. package/out/service/storage/storagePoint.d.ts +17 -0
  582. package/out/service/storage/storagePoint.js +76 -0
  583. package/out/service/storage/storagePoint.js.map +1 -0
  584. package/out/templator/genCallComponentLogic.d.ts +17 -0
  585. package/out/templator/genCallComponentLogic.js +30 -0
  586. package/out/templator/genCallComponentLogic.js.map +1 -0
  587. package/out/templator/genCreateBlock.d.ts +10 -0
  588. package/out/templator/genCreateBlock.js +338 -0
  589. package/out/templator/genCreateBlock.js.map +1 -0
  590. package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
  591. package/out/templator/genCurdEditMultipleKeyBlock.js +516 -0
  592. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
  593. package/out/templator/genCurdMultipleKeyBlock.d.ts +34 -0
  594. package/out/templator/genCurdMultipleKeyBlock.js +709 -0
  595. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
  596. package/out/templator/genEditTableBlock.d.ts +51 -0
  597. package/out/templator/genEditTableBlock.js +299 -0
  598. package/out/templator/genEditTableBlock.js.map +1 -0
  599. package/out/templator/genEnumSelectBlock.d.ts +10 -0
  600. package/out/templator/genEnumSelectBlock.js +26 -0
  601. package/out/templator/genEnumSelectBlock.js.map +1 -0
  602. package/out/templator/genGetBlock.d.ts +6 -0
  603. package/out/templator/genGetBlock.js +138 -0
  604. package/out/templator/genGetBlock.js.map +1 -0
  605. package/out/templator/genGridViewBlock.d.ts +55 -0
  606. package/out/templator/genGridViewBlock.js +350 -0
  607. package/out/templator/genGridViewBlock.js.map +1 -0
  608. package/out/templator/genListViewBlock.d.ts +19 -0
  609. package/out/templator/genListViewBlock.js +143 -0
  610. package/out/templator/genListViewBlock.js.map +1 -0
  611. package/out/templator/genQueryComponent.d.ts +34 -0
  612. package/out/templator/genQueryComponent.js +342 -0
  613. package/out/templator/genQueryComponent.js.map +1 -0
  614. package/out/templator/genSelectBlock.d.ts +45 -0
  615. package/out/templator/genSelectBlock.js +406 -0
  616. package/out/templator/genSelectBlock.js.map +1 -0
  617. package/out/templator/genTableBlock.d.ts +53 -0
  618. package/out/templator/genTableBlock.js +280 -0
  619. package/out/templator/genTableBlock.js.map +1 -0
  620. package/out/templator/genUpdateBlock.d.ts +6 -0
  621. package/out/templator/genUpdateBlock.js +380 -0
  622. package/out/templator/genUpdateBlock.js.map +1 -0
  623. package/out/templator/index.d.ts +18 -0
  624. package/out/templator/index.js +34 -0
  625. package/out/templator/index.js.map +1 -0
  626. package/out/templator/utils.d.ts +676 -0
  627. package/out/templator/utils.js +469 -0
  628. package/out/templator/utils.js.map +1 -0
  629. package/out/translator/constant.d.ts +6 -0
  630. package/out/translator/constant.js +10 -0
  631. package/out/translator/constant.js.map +1 -0
  632. package/out/translator/index.d.ts +3 -0
  633. package/out/translator/index.js +20 -0
  634. package/out/translator/index.js.map +1 -0
  635. package/out/translator/types.d.ts +32 -0
  636. package/out/translator/types.js +3 -0
  637. package/out/translator/types.js.map +1 -0
  638. package/out/translator/utils.d.ts +25 -0
  639. package/out/translator/utils.js +120 -0
  640. package/out/translator/utils.js.map +1 -0
  641. package/out/utils/index.d.ts +42 -0
  642. package/out/utils/index.js +213 -0
  643. package/out/utils/index.js.map +1 -0
  644. package/out/utils/logger.d.ts +7 -0
  645. package/out/utils/logger.js +23 -0
  646. package/out/utils/logger.js.map +1 -0
  647. package/out/utils/sortTsString.d.ts +1 -0
  648. package/out/utils/sortTsString.js +36 -0
  649. package/out/utils/sortTsString.js.map +1 -0
  650. package/out/utils/string.d.ts +51 -0
  651. package/out/utils/string.js +110 -0
  652. package/out/utils/string.js.map +1 -0
  653. package/out/utils/time.d.ts +1 -0
  654. package/out/utils/time.js +6 -0
  655. package/out/utils/time.js.map +1 -0
  656. package/out/utils/traverse.d.ts +36 -0
  657. package/out/utils/traverse.js +145 -0
  658. package/out/utils/traverse.js.map +1 -0
  659. package/out/utils/types.d.ts +1 -0
  660. package/out/utils/types.js +3 -0
  661. package/out/utils/types.js.map +1 -0
  662. package/out/utils/window.d.ts +7 -0
  663. package/out/utils/window.js +14 -0
  664. package/out/utils/window.js.map +1 -0
  665. package/package.json +1 -1
  666. package/src/concepts/BindEvent__.ts +5 -6
  667. package/src/concepts/Module__.ts +2 -2
  668. package/src/concepts/View__.ts +2 -2
  669. package/src/server/naslServer.ts +4 -4
@@ -0,0 +1,1380 @@
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 Namespace_1;
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Namespace = void 0;
37
+ const decorators_1 = require("../decorators");
38
+ const utils = __importStar(require("../utils"));
39
+ const BaseNode_1 = __importDefault(require("../common/BaseNode"));
40
+ const Process__1 = __importDefault(require("./Process__"));
41
+ const Structure__1 = __importDefault(require("./Structure__"));
42
+ const Enum__1 = __importDefault(require("./Enum__"));
43
+ const Logic__1 = __importDefault(require("./Logic__"));
44
+ const Function__1 = __importDefault(require("./Function__"));
45
+ const Interface__1 = __importDefault(require("./Interface__"));
46
+ const View__1 = __importDefault(require("./View__"));
47
+ const Variable__1 = __importDefault(require("./Variable__"));
48
+ const ViewComponent__1 = __importDefault(require("./ViewComponent__"));
49
+ const ProcessComponent__1 = __importDefault(require("./ProcessComponent__"));
50
+ /**
51
+ * 命名空间
52
+ */
53
+ let Namespace = Namespace_1 =
54
+ // @ts-ignore
55
+ class Namespace extends BaseNode_1.default {
56
+ /** 类名 */
57
+ static ConceptName = 'Namespace';
58
+ /**
59
+ * 产品概念
60
+ */
61
+ // @ts-ignore
62
+ concept;
63
+ /**
64
+ * 表示是从实体还是流程等概念产生的
65
+ */
66
+ // @ts-ignore
67
+ originConcept;
68
+ /**
69
+ * 命名空间名称
70
+ */
71
+ // @ts-ignore
72
+ name;
73
+ /**
74
+ * 命名空间标题
75
+ */
76
+ // @ts-ignore
77
+ title;
78
+ /**
79
+ * 命名空间描述
80
+ */
81
+ // @ts-ignore
82
+ description;
83
+ /**
84
+ * 命名空间列表
85
+ */
86
+ children = [];
87
+ /**
88
+ * 流程列表
89
+ */
90
+ processes = [];
91
+ /**
92
+ * 数据结构列表
93
+ */
94
+ structures = [];
95
+ /**
96
+ * 枚举列表
97
+ */
98
+ enums = [];
99
+ /**
100
+ * 逻辑列表
101
+ */
102
+ logics = [];
103
+ /**
104
+ * 函数列表
105
+ */
106
+ functions = [];
107
+ /**
108
+ * 接口列表
109
+ */
110
+ interfaces = [];
111
+ /**
112
+ * 页面列表
113
+ */
114
+ views = [];
115
+ /**
116
+ * 变量列表
117
+ */
118
+ frontendVariables = [];
119
+ /**
120
+ * 变量列表
121
+ */
122
+ variables = [];
123
+ /**
124
+ * 平台类型列表
125
+ */
126
+ viewComponents = [];
127
+ /**
128
+ * 流程组件列表
129
+ */
130
+ processComponents = [];
131
+ /**
132
+ * @param source 需要合并的部分参数
133
+ */
134
+ constructor(source) {
135
+ source = Object.assign({}, Namespace_1.getDefaultOptions(), source);
136
+ super(source);
137
+ super.subConstructor(source);
138
+ }
139
+ static from(source, parentNode, parentKey) {
140
+ return super.from(source, parentNode, parentKey);
141
+ }
142
+ /**
143
+ * 从父级删除该节点
144
+ * @internal
145
+ */
146
+ _delete() {
147
+ let params = null;
148
+ if (this.parentNode) {
149
+ params = this.parentNode?.__removeNamespace?.(this);
150
+ }
151
+ return params;
152
+ }
153
+ getNamespaceExistingNames(excludedList = []) {
154
+ const excludedSet = new Set(excludedList);
155
+ return (this.children || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
156
+ }
157
+ getNamespaceUniqueName(name = 'namespace1') {
158
+ return utils.unique(name, this.getNamespaceExistingNames(), undefined, false);
159
+ }
160
+ _insertNamespaceAt(options, index) {
161
+ const namespaceOptions = {};
162
+ const relationOptions = { parentNode: this, parentKey: 'children' };
163
+ let namespace;
164
+ if (!options) {
165
+ namespace = Namespace_1.from({
166
+ ...namespaceOptions,
167
+ name: this.getNamespaceUniqueName(),
168
+ }, this, 'children');
169
+ }
170
+ else if (typeof options === 'string') {
171
+ namespace = Namespace_1.from({
172
+ ...namespaceOptions,
173
+ name: options,
174
+ }, this, 'children');
175
+ }
176
+ else if (options instanceof Namespace_1) {
177
+ options.ensureDelete(); // 同一实例不支持多处存在
178
+ namespace = options;
179
+ Object.assign(namespace, relationOptions);
180
+ }
181
+ else {
182
+ namespace = Namespace_1.from({
183
+ ...namespaceOptions,
184
+ ...options,
185
+ }, this, 'children');
186
+ }
187
+ this.children.splice(index, 0, namespace);
188
+ return namespace;
189
+ }
190
+ insertNamespaceAt(options, index) {
191
+ const node = this._insertNamespaceAt(options, index);
192
+ node.create({
193
+ index,
194
+ parentNode: this,
195
+ parentKey: 'children',
196
+ });
197
+ return node;
198
+ }
199
+ _addNamespace(options) {
200
+ const index = this.children.length;
201
+ return this._insertNamespaceAt(options, index);
202
+ }
203
+ addNamespace(options) {
204
+ const node = this._addNamespace(options);
205
+ const index = this.children.indexOf(node);
206
+ node.create({
207
+ index,
208
+ parentNode: this,
209
+ parentKey: 'children',
210
+ });
211
+ return node;
212
+ }
213
+ getProcessExistingNames(excludedList = []) {
214
+ const excludedSet = new Set(excludedList);
215
+ return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
216
+ }
217
+ getProcessUniqueName(name = 'Process1') {
218
+ return utils.unique(name, this.getProcessExistingNames(), undefined, false);
219
+ }
220
+ _insertProcessAt(options, index) {
221
+ const processOptions = {};
222
+ const relationOptions = { parentNode: this, parentKey: 'processes' };
223
+ let process;
224
+ if (!options) {
225
+ process = Process__1.default.from({
226
+ ...processOptions,
227
+ name: this.getProcessUniqueName(),
228
+ }, this, 'processes');
229
+ }
230
+ else if (typeof options === 'string') {
231
+ process = Process__1.default.from({
232
+ ...processOptions,
233
+ name: options,
234
+ }, this, 'processes');
235
+ }
236
+ else if (options instanceof Process__1.default) {
237
+ options.ensureDelete(); // 同一实例不支持多处存在
238
+ process = options;
239
+ Object.assign(process, relationOptions);
240
+ }
241
+ else {
242
+ process = Process__1.default.from({
243
+ ...processOptions,
244
+ ...options,
245
+ }, this, 'processes');
246
+ }
247
+ this.processes.splice(index, 0, process);
248
+ return process;
249
+ }
250
+ insertProcessAt(options, index) {
251
+ const node = this._insertProcessAt(options, index);
252
+ node.create({
253
+ index,
254
+ parentNode: this,
255
+ parentKey: 'processes',
256
+ });
257
+ return node;
258
+ }
259
+ _addProcess(options) {
260
+ const index = 0;
261
+ return this._insertProcessAt(options, index);
262
+ }
263
+ addProcess(options) {
264
+ const node = this._addProcess(options);
265
+ const index = this.processes.indexOf(node);
266
+ node.create({
267
+ index,
268
+ parentNode: this,
269
+ parentKey: 'processes',
270
+ });
271
+ return node;
272
+ }
273
+ getStructureExistingNames(excludedList = []) {
274
+ const excludedSet = new Set(excludedList);
275
+ return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
276
+ }
277
+ getStructureUniqueName(name = 'Structure1') {
278
+ return utils.unique(name, this.getStructureExistingNames(), undefined, false);
279
+ }
280
+ _insertStructureAt(options, index) {
281
+ const structureOptions = {};
282
+ const relationOptions = { parentNode: this, parentKey: 'structures' };
283
+ let structure;
284
+ if (!options) {
285
+ structure = Structure__1.default.from({
286
+ ...structureOptions,
287
+ name: this.getStructureUniqueName(),
288
+ }, this, 'structures');
289
+ }
290
+ else if (typeof options === 'string') {
291
+ structure = Structure__1.default.from({
292
+ ...structureOptions,
293
+ name: options,
294
+ }, this, 'structures');
295
+ }
296
+ else if (options instanceof Structure__1.default) {
297
+ options.ensureDelete(); // 同一实例不支持多处存在
298
+ structure = options;
299
+ Object.assign(structure, relationOptions);
300
+ }
301
+ else {
302
+ structure = Structure__1.default.from({
303
+ ...structureOptions,
304
+ ...options,
305
+ }, this, 'structures');
306
+ }
307
+ this.structures.splice(index, 0, structure);
308
+ return structure;
309
+ }
310
+ insertStructureAt(options, index) {
311
+ const node = this._insertStructureAt(options, index);
312
+ node.create({
313
+ index,
314
+ parentNode: this,
315
+ parentKey: 'structures',
316
+ });
317
+ return node;
318
+ }
319
+ _addStructure(options) {
320
+ const index = 0;
321
+ return this._insertStructureAt(options, index);
322
+ }
323
+ addStructure(options) {
324
+ const node = this._addStructure(options);
325
+ const index = this.structures.indexOf(node);
326
+ node.create({
327
+ index,
328
+ parentNode: this,
329
+ parentKey: 'structures',
330
+ });
331
+ return node;
332
+ }
333
+ getEnumExistingNames(excludedList = []) {
334
+ const excludedSet = new Set(excludedList);
335
+ return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
336
+ }
337
+ getEnumUniqueName(name = 'Enum1') {
338
+ return utils.unique(name, this.getEnumExistingNames(), undefined, false);
339
+ }
340
+ _insertEnumAt(options, index) {
341
+ const enumerationOptions = {};
342
+ const relationOptions = { parentNode: this, parentKey: 'enums' };
343
+ let enumeration;
344
+ if (!options) {
345
+ enumeration = Enum__1.default.from({
346
+ ...enumerationOptions,
347
+ name: this.getEnumUniqueName(),
348
+ }, this, 'enums');
349
+ }
350
+ else if (typeof options === 'string') {
351
+ enumeration = Enum__1.default.from({
352
+ ...enumerationOptions,
353
+ name: options,
354
+ }, this, 'enums');
355
+ }
356
+ else if (options instanceof Enum__1.default) {
357
+ options.ensureDelete(); // 同一实例不支持多处存在
358
+ enumeration = options;
359
+ Object.assign(enumeration, relationOptions);
360
+ }
361
+ else {
362
+ enumeration = Enum__1.default.from({
363
+ ...enumerationOptions,
364
+ ...options,
365
+ }, this, 'enums');
366
+ }
367
+ this.enums.splice(index, 0, enumeration);
368
+ return enumeration;
369
+ }
370
+ insertEnumAt(options, index) {
371
+ const node = this._insertEnumAt(options, index);
372
+ node.create({
373
+ index,
374
+ parentNode: this,
375
+ parentKey: 'enums',
376
+ });
377
+ return node;
378
+ }
379
+ _addEnum(options) {
380
+ const index = 0;
381
+ return this._insertEnumAt(options, index);
382
+ }
383
+ addEnum(options) {
384
+ const node = this._addEnum(options);
385
+ const index = this.enums.indexOf(node);
386
+ node.create({
387
+ index,
388
+ parentNode: this,
389
+ parentKey: 'enums',
390
+ });
391
+ return node;
392
+ }
393
+ getLogicExistingNames(excludedList = []) {
394
+ const excludedSet = new Set(excludedList);
395
+ return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
396
+ }
397
+ getLogicUniqueName(name = 'logic1') {
398
+ return utils.unique(name, this.getLogicExistingNames(), undefined, false);
399
+ }
400
+ _insertLogicAt(options, index) {
401
+ const logicOptions = {};
402
+ const relationOptions = { parentNode: this, parentKey: 'logics' };
403
+ let logic;
404
+ if (!options) {
405
+ logic = Logic__1.default.from({
406
+ ...logicOptions,
407
+ name: this.getLogicUniqueName(),
408
+ }, this, 'logics');
409
+ }
410
+ else if (typeof options === 'string') {
411
+ logic = Logic__1.default.from({
412
+ ...logicOptions,
413
+ name: options,
414
+ }, this, 'logics');
415
+ }
416
+ else if (options instanceof Logic__1.default) {
417
+ options.ensureDelete(); // 同一实例不支持多处存在
418
+ logic = options;
419
+ Object.assign(logic, relationOptions);
420
+ }
421
+ else {
422
+ logic = Logic__1.default.from({
423
+ ...logicOptions,
424
+ ...options,
425
+ }, this, 'logics');
426
+ }
427
+ this.logics.splice(index, 0, logic);
428
+ return logic;
429
+ }
430
+ insertLogicAt(options, index) {
431
+ const node = this._insertLogicAt(options, index);
432
+ node.create({
433
+ index,
434
+ parentNode: this,
435
+ parentKey: 'logics',
436
+ });
437
+ return node;
438
+ }
439
+ _addLogic(options) {
440
+ const index = 0;
441
+ return this._insertLogicAt(options, index);
442
+ }
443
+ addLogic(options) {
444
+ const node = this._addLogic(options);
445
+ const index = this.logics.indexOf(node);
446
+ node.create({
447
+ index,
448
+ parentNode: this,
449
+ parentKey: 'logics',
450
+ });
451
+ return node;
452
+ }
453
+ getFunctionExistingNames(excludedList = []) {
454
+ const excludedSet = new Set(excludedList);
455
+ return (this.functions || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
456
+ }
457
+ getFunctionUniqueName(name = 'func1') {
458
+ return utils.unique(name, this.getFunctionExistingNames(), undefined, false);
459
+ }
460
+ _insertFunctionAt(options, index) {
461
+ const funcOptions = {};
462
+ const relationOptions = { parentNode: this, parentKey: 'functions' };
463
+ let func;
464
+ if (!options) {
465
+ func = Function__1.default.from({
466
+ ...funcOptions,
467
+ name: this.getFunctionUniqueName(),
468
+ }, this, 'functions');
469
+ }
470
+ else if (typeof options === 'string') {
471
+ func = Function__1.default.from({
472
+ ...funcOptions,
473
+ name: options,
474
+ }, this, 'functions');
475
+ }
476
+ else if (options instanceof Function__1.default) {
477
+ options.ensureDelete(); // 同一实例不支持多处存在
478
+ func = options;
479
+ Object.assign(func, relationOptions);
480
+ }
481
+ else {
482
+ func = Function__1.default.from({
483
+ ...funcOptions,
484
+ ...options,
485
+ }, this, 'functions');
486
+ }
487
+ this.functions.splice(index, 0, func);
488
+ return func;
489
+ }
490
+ insertFunctionAt(options, index) {
491
+ const node = this._insertFunctionAt(options, index);
492
+ node.create({
493
+ index,
494
+ parentNode: this,
495
+ parentKey: 'functions',
496
+ });
497
+ return node;
498
+ }
499
+ _addFunction(options) {
500
+ const index = 0;
501
+ return this._insertFunctionAt(options, index);
502
+ }
503
+ addFunction(options) {
504
+ const node = this._addFunction(options);
505
+ const index = this.functions.indexOf(node);
506
+ node.create({
507
+ index,
508
+ parentNode: this,
509
+ parentKey: 'functions',
510
+ });
511
+ return node;
512
+ }
513
+ getInterfaceExistingNames(excludedList = []) {
514
+ const excludedSet = new Set(excludedList);
515
+ return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
516
+ }
517
+ getInterfaceUniqueName(name = 'Interface1') {
518
+ return utils.unique(name, this.getInterfaceExistingNames(), undefined, false);
519
+ }
520
+ _insertInterfaceAt(options, index) {
521
+ const itfaceOptions = {};
522
+ const relationOptions = { parentNode: this, parentKey: 'interfaces' };
523
+ let itface;
524
+ if (!options) {
525
+ itface = Interface__1.default.from({
526
+ ...itfaceOptions,
527
+ name: this.getInterfaceUniqueName(),
528
+ }, this, 'interfaces');
529
+ }
530
+ else if (typeof options === 'string') {
531
+ itface = Interface__1.default.from({
532
+ ...itfaceOptions,
533
+ name: options,
534
+ }, this, 'interfaces');
535
+ }
536
+ else if (options instanceof Interface__1.default) {
537
+ options.ensureDelete(); // 同一实例不支持多处存在
538
+ itface = options;
539
+ Object.assign(itface, relationOptions);
540
+ }
541
+ else {
542
+ itface = Interface__1.default.from({
543
+ ...itfaceOptions,
544
+ ...options,
545
+ }, this, 'interfaces');
546
+ }
547
+ this.interfaces.splice(index, 0, itface);
548
+ return itface;
549
+ }
550
+ insertInterfaceAt(options, index) {
551
+ const node = this._insertInterfaceAt(options, index);
552
+ node.create({
553
+ index,
554
+ parentNode: this,
555
+ parentKey: 'interfaces',
556
+ });
557
+ return node;
558
+ }
559
+ _addInterface(options) {
560
+ const index = 0;
561
+ return this._insertInterfaceAt(options, index);
562
+ }
563
+ addInterface(options) {
564
+ const node = this._addInterface(options);
565
+ const index = this.interfaces.indexOf(node);
566
+ node.create({
567
+ index,
568
+ parentNode: this,
569
+ parentKey: 'interfaces',
570
+ });
571
+ return node;
572
+ }
573
+ getViewExistingNames(excludedList = []) {
574
+ const excludedSet = new Set(excludedList);
575
+ return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
576
+ }
577
+ getViewUniqueName(name = 'view1') {
578
+ return utils.unique(name, this.getViewExistingNames(), undefined, false);
579
+ }
580
+ _insertViewAt(options, index) {
581
+ const viewOptions = {};
582
+ const relationOptions = { parentNode: this, parentKey: 'views' };
583
+ let view;
584
+ if (!options) {
585
+ view = View__1.default.from({
586
+ ...viewOptions,
587
+ name: this.getViewUniqueName(),
588
+ }, this, 'views');
589
+ }
590
+ else if (typeof options === 'string') {
591
+ view = View__1.default.from({
592
+ ...viewOptions,
593
+ name: options,
594
+ }, this, 'views');
595
+ }
596
+ else if (options instanceof View__1.default) {
597
+ options.ensureDelete(); // 同一实例不支持多处存在
598
+ view = options;
599
+ Object.assign(view, relationOptions);
600
+ }
601
+ else {
602
+ view = View__1.default.from({
603
+ ...viewOptions,
604
+ ...options,
605
+ }, this, 'views');
606
+ }
607
+ this.views.splice(index, 0, view);
608
+ return view;
609
+ }
610
+ insertViewAt(options, index) {
611
+ const node = this._insertViewAt(options, index);
612
+ node.create({
613
+ index,
614
+ parentNode: this,
615
+ parentKey: 'views',
616
+ });
617
+ return node;
618
+ }
619
+ _addView(options) {
620
+ const index = this.views.length;
621
+ return this._insertViewAt(options, index);
622
+ }
623
+ addView(options) {
624
+ const node = this._addView(options);
625
+ const index = this.views.indexOf(node);
626
+ node.create({
627
+ index,
628
+ parentNode: this,
629
+ parentKey: 'views',
630
+ });
631
+ return node;
632
+ }
633
+ getVarExistingNames(excludedList = []) {
634
+ const excludedSet = new Set(excludedList);
635
+ return (this.frontendVariables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
636
+ }
637
+ getVariableUniqueName(name = 'variable1') {
638
+ return utils.unique(name, this.getVarExistingNames(), undefined, true);
639
+ }
640
+ _insertVariableInFrontendVariablesAt(options, index) {
641
+ const variableOptions = {};
642
+ const relationOptions = { parentNode: this, parentKey: 'frontendVariables' };
643
+ let variable;
644
+ if (!options) {
645
+ variable = Variable__1.default.from({
646
+ ...variableOptions,
647
+ name: this.getVariableUniqueName(),
648
+ }, this, 'frontendVariables');
649
+ }
650
+ else if (typeof options === 'string') {
651
+ variable = Variable__1.default.from({
652
+ ...variableOptions,
653
+ name: options,
654
+ }, this, 'frontendVariables');
655
+ }
656
+ else if (options instanceof Variable__1.default) {
657
+ options.ensureDelete(); // 同一实例不支持多处存在
658
+ variable = options;
659
+ Object.assign(variable, relationOptions);
660
+ }
661
+ else {
662
+ variable = Variable__1.default.from({
663
+ ...variableOptions,
664
+ ...options,
665
+ }, this, 'frontendVariables');
666
+ }
667
+ this.frontendVariables.splice(index, 0, variable);
668
+ return variable;
669
+ }
670
+ insertVariableInFrontendVariablesAt(options, index) {
671
+ const node = this._insertVariableInFrontendVariablesAt(options, index);
672
+ node.create({
673
+ index,
674
+ parentNode: this,
675
+ parentKey: 'frontendVariables',
676
+ });
677
+ return node;
678
+ }
679
+ _addVariableInFrontendVariables(options) {
680
+ const index = this.frontendVariables.length;
681
+ return this._insertVariableInFrontendVariablesAt(options, index);
682
+ }
683
+ addVariableInFrontendVariables(options) {
684
+ const node = this._addVariableInFrontendVariables(options);
685
+ const index = this.frontendVariables.indexOf(node);
686
+ node.create({
687
+ index,
688
+ parentNode: this,
689
+ parentKey: 'frontendVariables',
690
+ });
691
+ return node;
692
+ }
693
+ _insertVariableInVariablesAt(options, index) {
694
+ const variableOptions = {};
695
+ const relationOptions = { parentNode: this, parentKey: 'variables' };
696
+ let variable;
697
+ if (!options) {
698
+ variable = Variable__1.default.from({
699
+ ...variableOptions,
700
+ name: this.getVariableUniqueName(),
701
+ }, this, 'variables');
702
+ }
703
+ else if (typeof options === 'string') {
704
+ variable = Variable__1.default.from({
705
+ ...variableOptions,
706
+ name: options,
707
+ }, this, 'variables');
708
+ }
709
+ else if (options instanceof Variable__1.default) {
710
+ options.ensureDelete(); // 同一实例不支持多处存在
711
+ variable = options;
712
+ Object.assign(variable, relationOptions);
713
+ }
714
+ else {
715
+ variable = Variable__1.default.from({
716
+ ...variableOptions,
717
+ ...options,
718
+ }, this, 'variables');
719
+ }
720
+ this.variables.splice(index, 0, variable);
721
+ return variable;
722
+ }
723
+ insertVariableInVariablesAt(options, index) {
724
+ const node = this._insertVariableInVariablesAt(options, index);
725
+ node.create({
726
+ index,
727
+ parentNode: this,
728
+ parentKey: 'variables',
729
+ });
730
+ return node;
731
+ }
732
+ _addVariableInVariables(options) {
733
+ const index = this.variables.length;
734
+ return this._insertVariableInVariablesAt(options, index);
735
+ }
736
+ addVariableInVariables(options) {
737
+ const node = this._addVariableInVariables(options);
738
+ const index = this.variables.indexOf(node);
739
+ node.create({
740
+ index,
741
+ parentNode: this,
742
+ parentKey: 'variables',
743
+ });
744
+ return node;
745
+ }
746
+ getViewComponentExistingNames(excludedList = []) {
747
+ const excludedSet = new Set(excludedList);
748
+ return (this.viewComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
749
+ }
750
+ getViewComponentUniqueName(name = 'viewComponent1') {
751
+ return utils.unique(name, this.getViewComponentExistingNames(), undefined, false);
752
+ }
753
+ _insertViewComponentAt(options, index) {
754
+ const viewComponentOptions = {};
755
+ const relationOptions = { parentNode: this, parentKey: 'viewComponents' };
756
+ let viewComponent;
757
+ if (!options) {
758
+ viewComponent = ViewComponent__1.default.from({
759
+ ...viewComponentOptions,
760
+ name: this.getViewComponentUniqueName(),
761
+ }, this, 'viewComponents');
762
+ }
763
+ else if (typeof options === 'string') {
764
+ viewComponent = ViewComponent__1.default.from({
765
+ ...viewComponentOptions,
766
+ name: options,
767
+ }, this, 'viewComponents');
768
+ }
769
+ else if (options instanceof ViewComponent__1.default) {
770
+ options.ensureDelete(); // 同一实例不支持多处存在
771
+ viewComponent = options;
772
+ Object.assign(viewComponent, relationOptions);
773
+ }
774
+ else {
775
+ viewComponent = ViewComponent__1.default.from({
776
+ ...viewComponentOptions,
777
+ ...options,
778
+ }, this, 'viewComponents');
779
+ }
780
+ this.viewComponents.splice(index, 0, viewComponent);
781
+ return viewComponent;
782
+ }
783
+ insertViewComponentAt(options, index) {
784
+ const node = this._insertViewComponentAt(options, index);
785
+ node.create({
786
+ index,
787
+ parentNode: this,
788
+ parentKey: 'viewComponents',
789
+ });
790
+ return node;
791
+ }
792
+ _addViewComponent(options) {
793
+ const index = this.viewComponents.length;
794
+ return this._insertViewComponentAt(options, index);
795
+ }
796
+ addViewComponent(options) {
797
+ const node = this._addViewComponent(options);
798
+ const index = this.viewComponents.indexOf(node);
799
+ node.create({
800
+ index,
801
+ parentNode: this,
802
+ parentKey: 'viewComponents',
803
+ });
804
+ return node;
805
+ }
806
+ getProcessComponentExistingNames(excludedList = []) {
807
+ const excludedSet = new Set(excludedList);
808
+ return (this.processComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
809
+ }
810
+ getProcessComponentUniqueName(name = 'processComponent1') {
811
+ return utils.unique(name, this.getProcessComponentExistingNames(), undefined, false);
812
+ }
813
+ _insertProcessComponentAt(options, index) {
814
+ const processComponentOptions = {};
815
+ const relationOptions = { parentNode: this, parentKey: 'processComponents' };
816
+ let processComponent;
817
+ if (!options) {
818
+ processComponent = ProcessComponent__1.default.from({
819
+ ...processComponentOptions,
820
+ name: this.getProcessComponentUniqueName(),
821
+ }, this, 'processComponents');
822
+ }
823
+ else if (typeof options === 'string') {
824
+ processComponent = ProcessComponent__1.default.from({
825
+ ...processComponentOptions,
826
+ name: options,
827
+ }, this, 'processComponents');
828
+ }
829
+ else if (options instanceof ProcessComponent__1.default) {
830
+ options.ensureDelete(); // 同一实例不支持多处存在
831
+ processComponent = options;
832
+ Object.assign(processComponent, relationOptions);
833
+ }
834
+ else {
835
+ processComponent = ProcessComponent__1.default.from({
836
+ ...processComponentOptions,
837
+ ...options,
838
+ }, this, 'processComponents');
839
+ }
840
+ this.processComponents.splice(index, 0, processComponent);
841
+ return processComponent;
842
+ }
843
+ insertProcessComponentAt(options, index) {
844
+ const node = this._insertProcessComponentAt(options, index);
845
+ node.create({
846
+ index,
847
+ parentNode: this,
848
+ parentKey: 'processComponents',
849
+ });
850
+ return node;
851
+ }
852
+ _addProcessComponent(options) {
853
+ const index = this.processComponents.length;
854
+ return this._insertProcessComponentAt(options, index);
855
+ }
856
+ addProcessComponent(options) {
857
+ const node = this._addProcessComponent(options);
858
+ const index = this.processComponents.indexOf(node);
859
+ node.create({
860
+ index,
861
+ parentNode: this,
862
+ parentKey: 'processComponents',
863
+ });
864
+ return node;
865
+ }
866
+ removeNamespace(options) {
867
+ let namespace;
868
+ if (typeof options === 'string') {
869
+ namespace = this.children.find((item) => item.name === options);
870
+ if (!namespace) {
871
+ throw new Error('找不到命名空间 ' + options);
872
+ }
873
+ }
874
+ else {
875
+ namespace = options;
876
+ }
877
+ return namespace.delete();
878
+ }
879
+ __removeNamespace(namespace) {
880
+ const parentKey = namespace.parentKey;
881
+ const params = {
882
+ parentNode: this,
883
+ parentKey,
884
+ index: -1,
885
+ object: null,
886
+ oldObject: namespace,
887
+ };
888
+ if (parentKey) {
889
+ params.parentKey = parentKey;
890
+ if (Array.isArray(this[parentKey])) {
891
+ const index = this[parentKey].indexOf(namespace);
892
+ ~index && this[parentKey].splice(index, 1);
893
+ params.index = index;
894
+ }
895
+ else if (this[parentKey] === namespace) {
896
+ params.index = 0;
897
+ this[parentKey] = undefined;
898
+ }
899
+ }
900
+ return params;
901
+ }
902
+ removeProcess(options) {
903
+ let process;
904
+ if (typeof options === 'string') {
905
+ process = this.processes.find((item) => item.name === options);
906
+ if (!process) {
907
+ throw new Error('找不到流程 ' + options);
908
+ }
909
+ }
910
+ else {
911
+ process = options;
912
+ }
913
+ return process.delete();
914
+ }
915
+ __removeProcess(process) {
916
+ const parentKey = process.parentKey;
917
+ const params = {
918
+ parentNode: this,
919
+ parentKey,
920
+ index: -1,
921
+ object: null,
922
+ oldObject: process,
923
+ };
924
+ if (parentKey) {
925
+ params.parentKey = parentKey;
926
+ if (Array.isArray(this[parentKey])) {
927
+ const index = this[parentKey].indexOf(process);
928
+ ~index && this[parentKey].splice(index, 1);
929
+ params.index = index;
930
+ }
931
+ else if (this[parentKey] === process) {
932
+ params.index = 0;
933
+ this[parentKey] = undefined;
934
+ }
935
+ }
936
+ return params;
937
+ }
938
+ removeStructure(options) {
939
+ let structure;
940
+ if (typeof options === 'string') {
941
+ structure = this.structures.find((item) => item.name === options);
942
+ if (!structure) {
943
+ throw new Error('找不到数据结构 ' + options);
944
+ }
945
+ }
946
+ else {
947
+ structure = options;
948
+ }
949
+ return structure.delete();
950
+ }
951
+ __removeStructure(structure) {
952
+ const parentKey = structure.parentKey;
953
+ const params = {
954
+ parentNode: this,
955
+ parentKey,
956
+ index: -1,
957
+ object: null,
958
+ oldObject: structure,
959
+ };
960
+ if (parentKey) {
961
+ params.parentKey = parentKey;
962
+ if (Array.isArray(this[parentKey])) {
963
+ const index = this[parentKey].indexOf(structure);
964
+ ~index && this[parentKey].splice(index, 1);
965
+ params.index = index;
966
+ }
967
+ else if (this[parentKey] === structure) {
968
+ params.index = 0;
969
+ this[parentKey] = undefined;
970
+ }
971
+ }
972
+ return params;
973
+ }
974
+ removeEnum(options) {
975
+ let enumeration;
976
+ if (typeof options === 'string') {
977
+ enumeration = this.enums.find((item) => item.name === options);
978
+ if (!enumeration) {
979
+ throw new Error('找不到枚举 ' + options);
980
+ }
981
+ }
982
+ else {
983
+ enumeration = options;
984
+ }
985
+ return enumeration.delete();
986
+ }
987
+ __removeEnum(enumeration) {
988
+ const parentKey = enumeration.parentKey;
989
+ const params = {
990
+ parentNode: this,
991
+ parentKey,
992
+ index: -1,
993
+ object: null,
994
+ oldObject: enumeration,
995
+ };
996
+ if (parentKey) {
997
+ params.parentKey = parentKey;
998
+ if (Array.isArray(this[parentKey])) {
999
+ const index = this[parentKey].indexOf(enumeration);
1000
+ ~index && this[parentKey].splice(index, 1);
1001
+ params.index = index;
1002
+ }
1003
+ else if (this[parentKey] === enumeration) {
1004
+ params.index = 0;
1005
+ this[parentKey] = undefined;
1006
+ }
1007
+ }
1008
+ return params;
1009
+ }
1010
+ removeLogic(options) {
1011
+ let logic;
1012
+ if (typeof options === 'string') {
1013
+ logic = this.logics.find((item) => item.name === options);
1014
+ if (!logic) {
1015
+ throw new Error('找不到逻辑 ' + options);
1016
+ }
1017
+ }
1018
+ else {
1019
+ logic = options;
1020
+ }
1021
+ return logic.delete();
1022
+ }
1023
+ __removeLogic(logic) {
1024
+ const parentKey = logic.parentKey;
1025
+ const params = {
1026
+ parentNode: this,
1027
+ parentKey,
1028
+ index: -1,
1029
+ object: null,
1030
+ oldObject: logic,
1031
+ };
1032
+ if (parentKey) {
1033
+ params.parentKey = parentKey;
1034
+ if (Array.isArray(this[parentKey])) {
1035
+ const index = this[parentKey].indexOf(logic);
1036
+ ~index && this[parentKey].splice(index, 1);
1037
+ params.index = index;
1038
+ }
1039
+ else if (this[parentKey] === logic) {
1040
+ params.index = 0;
1041
+ this[parentKey] = undefined;
1042
+ }
1043
+ }
1044
+ return params;
1045
+ }
1046
+ removeFunction(options) {
1047
+ let func;
1048
+ if (typeof options === 'string') {
1049
+ func = this.functions.find((item) => item.name === options);
1050
+ if (!func) {
1051
+ throw new Error('找不到函数 ' + options);
1052
+ }
1053
+ }
1054
+ else {
1055
+ func = options;
1056
+ }
1057
+ return func.delete();
1058
+ }
1059
+ __removeFunction(func) {
1060
+ const parentKey = func.parentKey;
1061
+ const params = {
1062
+ parentNode: this,
1063
+ parentKey,
1064
+ index: -1,
1065
+ object: null,
1066
+ oldObject: func,
1067
+ };
1068
+ if (parentKey) {
1069
+ params.parentKey = parentKey;
1070
+ if (Array.isArray(this[parentKey])) {
1071
+ const index = this[parentKey].indexOf(func);
1072
+ ~index && this[parentKey].splice(index, 1);
1073
+ params.index = index;
1074
+ }
1075
+ else if (this[parentKey] === func) {
1076
+ params.index = 0;
1077
+ this[parentKey] = undefined;
1078
+ }
1079
+ }
1080
+ return params;
1081
+ }
1082
+ removeInterface(options) {
1083
+ let itface;
1084
+ if (typeof options === 'string') {
1085
+ itface = this.interfaces.find((item) => item.name === options);
1086
+ if (!itface) {
1087
+ throw new Error('找不到接口 ' + options);
1088
+ }
1089
+ }
1090
+ else {
1091
+ itface = options;
1092
+ }
1093
+ return itface.delete();
1094
+ }
1095
+ __removeInterface(itface) {
1096
+ const parentKey = itface.parentKey;
1097
+ const params = {
1098
+ parentNode: this,
1099
+ parentKey,
1100
+ index: -1,
1101
+ object: null,
1102
+ oldObject: itface,
1103
+ };
1104
+ if (parentKey) {
1105
+ params.parentKey = parentKey;
1106
+ if (Array.isArray(this[parentKey])) {
1107
+ const index = this[parentKey].indexOf(itface);
1108
+ ~index && this[parentKey].splice(index, 1);
1109
+ params.index = index;
1110
+ }
1111
+ else if (this[parentKey] === itface) {
1112
+ params.index = 0;
1113
+ this[parentKey] = undefined;
1114
+ }
1115
+ }
1116
+ return params;
1117
+ }
1118
+ removeView(options) {
1119
+ let view;
1120
+ if (typeof options === 'string') {
1121
+ view = this.views.find((item) => item.name === options);
1122
+ if (!view) {
1123
+ throw new Error('找不到页面 ' + options);
1124
+ }
1125
+ }
1126
+ else {
1127
+ view = options;
1128
+ }
1129
+ return view.delete();
1130
+ }
1131
+ __removeView(view) {
1132
+ const parentKey = view.parentKey;
1133
+ const params = {
1134
+ parentNode: this,
1135
+ parentKey,
1136
+ index: -1,
1137
+ object: null,
1138
+ oldObject: view,
1139
+ };
1140
+ if (parentKey) {
1141
+ params.parentKey = parentKey;
1142
+ if (Array.isArray(this[parentKey])) {
1143
+ const index = this[parentKey].indexOf(view);
1144
+ ~index && this[parentKey].splice(index, 1);
1145
+ params.index = index;
1146
+ }
1147
+ else if (this[parentKey] === view) {
1148
+ params.index = 0;
1149
+ this[parentKey] = undefined;
1150
+ }
1151
+ }
1152
+ return params;
1153
+ }
1154
+ removeVariableInFrontendVariables(options) {
1155
+ let variable;
1156
+ if (typeof options === 'string') {
1157
+ variable = this.frontendVariables.find((item) => item.name === options);
1158
+ if (!variable) {
1159
+ throw new Error('找不到变量 ' + options);
1160
+ }
1161
+ }
1162
+ else {
1163
+ variable = options;
1164
+ }
1165
+ return variable.delete();
1166
+ }
1167
+ removeVariableInVariables(options) {
1168
+ let variable;
1169
+ if (typeof options === 'string') {
1170
+ variable = this.variables.find((item) => item.name === options);
1171
+ if (!variable) {
1172
+ throw new Error('找不到变量 ' + options);
1173
+ }
1174
+ }
1175
+ else {
1176
+ variable = options;
1177
+ }
1178
+ return variable.delete();
1179
+ }
1180
+ __removeVariable(variable) {
1181
+ const parentKey = variable.parentKey;
1182
+ const params = {
1183
+ parentNode: this,
1184
+ parentKey,
1185
+ index: -1,
1186
+ object: null,
1187
+ oldObject: variable,
1188
+ };
1189
+ if (parentKey) {
1190
+ params.parentKey = parentKey;
1191
+ if (Array.isArray(this[parentKey])) {
1192
+ const index = this[parentKey].indexOf(variable);
1193
+ ~index && this[parentKey].splice(index, 1);
1194
+ params.index = index;
1195
+ }
1196
+ else if (this[parentKey] === variable) {
1197
+ params.index = 0;
1198
+ this[parentKey] = undefined;
1199
+ }
1200
+ }
1201
+ return params;
1202
+ }
1203
+ removeViewComponent(options) {
1204
+ let viewComponent;
1205
+ if (typeof options === 'string') {
1206
+ viewComponent = this.viewComponents.find((item) => item.name === options);
1207
+ if (!viewComponent) {
1208
+ throw new Error('找不到平台类型 ' + options);
1209
+ }
1210
+ }
1211
+ else {
1212
+ viewComponent = options;
1213
+ }
1214
+ return viewComponent.delete();
1215
+ }
1216
+ __removeViewComponent(viewComponent) {
1217
+ const parentKey = viewComponent.parentKey;
1218
+ const params = {
1219
+ parentNode: this,
1220
+ parentKey,
1221
+ index: -1,
1222
+ object: null,
1223
+ oldObject: viewComponent,
1224
+ };
1225
+ if (parentKey) {
1226
+ params.parentKey = parentKey;
1227
+ if (Array.isArray(this[parentKey])) {
1228
+ const index = this[parentKey].indexOf(viewComponent);
1229
+ ~index && this[parentKey].splice(index, 1);
1230
+ params.index = index;
1231
+ }
1232
+ else if (this[parentKey] === viewComponent) {
1233
+ params.index = 0;
1234
+ this[parentKey] = undefined;
1235
+ }
1236
+ }
1237
+ return params;
1238
+ }
1239
+ removeProcessComponent(options) {
1240
+ let processComponent;
1241
+ if (typeof options === 'string') {
1242
+ processComponent = this.processComponents.find((item) => item.name === options);
1243
+ if (!processComponent) {
1244
+ throw new Error('找不到流程组件 ' + options);
1245
+ }
1246
+ }
1247
+ else {
1248
+ processComponent = options;
1249
+ }
1250
+ return processComponent.delete();
1251
+ }
1252
+ __removeProcessComponent(processComponent) {
1253
+ const parentKey = processComponent.parentKey;
1254
+ const params = {
1255
+ parentNode: this,
1256
+ parentKey,
1257
+ index: -1,
1258
+ object: null,
1259
+ oldObject: processComponent,
1260
+ };
1261
+ if (parentKey) {
1262
+ params.parentKey = parentKey;
1263
+ if (Array.isArray(this[parentKey])) {
1264
+ const index = this[parentKey].indexOf(processComponent);
1265
+ ~index && this[parentKey].splice(index, 1);
1266
+ params.index = index;
1267
+ }
1268
+ else if (this[parentKey] === processComponent) {
1269
+ params.index = 0;
1270
+ this[parentKey] = undefined;
1271
+ }
1272
+ }
1273
+ return params;
1274
+ }
1275
+ //================================================================================
1276
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1277
+ // 自动生成的代码已结束。下面可以手动编写。
1278
+ //================================================================================
1279
+ findEnumByName(name) {
1280
+ return this.enums.find((enumItem) => enumItem.name === name);
1281
+ }
1282
+ findStructureByName(name) {
1283
+ return this.structures.find((item) => item.name === name);
1284
+ }
1285
+ findLogicByName(name) {
1286
+ return this.logics.find((logic) => logic.name === name);
1287
+ }
1288
+ path = undefined;
1289
+ /**
1290
+ * 获取命名空间
1291
+ */
1292
+ getNamespace() {
1293
+ if (this.path)
1294
+ return this.path;
1295
+ else if (this.parentNode && this.parentNode.getNamespace)
1296
+ return `${this.parentNode.getNamespace()}`;
1297
+ else
1298
+ throw new Error('无法获取命名空间,请设置 parentNode 或临时的 path!');
1299
+ }
1300
+ /**
1301
+ * 获取命名空间
1302
+ */
1303
+ getTsNamespace() {
1304
+ if (this.path)
1305
+ return this.path;
1306
+ else if (this.parentNode && this.parentNode.getNamespace)
1307
+ return `${this.parentNode.getNamespace()}.${this.tsName}`;
1308
+ else
1309
+ throw new Error('无法获取命名空间,请设置 parentNode 或临时的 path!');
1310
+ }
1311
+ findChild(name) {
1312
+ return this.children.find((child) => child.name === name);
1313
+ }
1314
+ findLogic(name) {
1315
+ return this.logics.find((logic) => logic.name === name);
1316
+ }
1317
+ };
1318
+ __decorate([
1319
+ (0, decorators_1.property)()
1320
+ ], Namespace.prototype, "originConcept", void 0);
1321
+ __decorate([
1322
+ (0, decorators_1.property)()
1323
+ ], Namespace.prototype, "name", void 0);
1324
+ __decorate([
1325
+ (0, decorators_1.property)()
1326
+ ], Namespace.prototype, "title", void 0);
1327
+ __decorate([
1328
+ (0, decorators_1.property)()
1329
+ ], Namespace.prototype, "description", void 0);
1330
+ __decorate([
1331
+ (0, decorators_1.property)('Namespace')
1332
+ ], Namespace.prototype, "children", void 0);
1333
+ __decorate([
1334
+ (0, decorators_1.property)('Process')
1335
+ ], Namespace.prototype, "processes", void 0);
1336
+ __decorate([
1337
+ (0, decorators_1.property)('Structure')
1338
+ ], Namespace.prototype, "structures", void 0);
1339
+ __decorate([
1340
+ (0, decorators_1.property)('Enum')
1341
+ ], Namespace.prototype, "enums", void 0);
1342
+ __decorate([
1343
+ (0, decorators_1.property)('Logic')
1344
+ ], Namespace.prototype, "logics", void 0);
1345
+ __decorate([
1346
+ (0, decorators_1.property)('Function')
1347
+ ], Namespace.prototype, "functions", void 0);
1348
+ __decorate([
1349
+ (0, decorators_1.property)('Interface')
1350
+ ], Namespace.prototype, "interfaces", void 0);
1351
+ __decorate([
1352
+ (0, decorators_1.property)('View')
1353
+ ], Namespace.prototype, "views", void 0);
1354
+ __decorate([
1355
+ (0, decorators_1.property)('Variable')
1356
+ ], Namespace.prototype, "frontendVariables", void 0);
1357
+ __decorate([
1358
+ (0, decorators_1.property)('Variable')
1359
+ ], Namespace.prototype, "variables", void 0);
1360
+ __decorate([
1361
+ (0, decorators_1.property)('ViewComponent')
1362
+ ], Namespace.prototype, "viewComponents", void 0);
1363
+ __decorate([
1364
+ (0, decorators_1.property)('ProcessComponent')
1365
+ ], Namespace.prototype, "processComponents", void 0);
1366
+ __decorate([
1367
+ (0, decorators_1.property)()
1368
+ ], Namespace.prototype, "path", void 0);
1369
+ Namespace = Namespace_1 = __decorate([
1370
+ decorators_1.className,
1371
+ (0, decorators_1.concept)('命名空间')
1372
+ // @ts-ignore
1373
+ ], Namespace);
1374
+ exports.Namespace = Namespace;
1375
+ exports.default = Namespace;
1376
+ //================================================================================
1377
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1378
+ // 自动生成的代码已结束。下面可以手动编写。
1379
+ //================================================================================
1380
+ //# sourceMappingURL=Namespace__.js.map