@lcap/nasl 3.4.0-beta.6 → 3.5.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (801) hide show
  1. package/.mocharc.js +1 -1
  2. package/out/automate/engine/uniqueName.js +7 -3
  3. package/out/automate/engine/uniqueName.js.map +1 -1
  4. package/out/automate/engine/utils.d.ts +1 -1
  5. package/out/automate/engine/utils.js +6 -6
  6. package/out/automate/engine/utils.js.map +1 -1
  7. package/out/bak/translator.js +2 -1
  8. package/out/bak/translator.js.map +1 -1
  9. package/out/breakpoint/generator/AfterStartNode.js +1 -1
  10. package/out/breakpoint/generator/AfterStartNode.js.map +1 -1
  11. package/out/breakpoint/generator/BeforeEndNode.js +1 -1
  12. package/out/breakpoint/generator/BeforeEndNode.js.map +1 -1
  13. package/out/breakpoint/generator/BreakpointNode.js +3 -3
  14. package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
  15. package/out/common/BaseNode.d.ts +16 -12
  16. package/out/common/BaseNode.js +41 -140
  17. package/out/common/BaseNode.js.map +1 -1
  18. package/out/common/Command.js +1 -2
  19. package/out/common/Command.js.map +1 -1
  20. package/out/common/EventEmitter.d.ts +1 -1
  21. package/out/common/EventEmitter.js +8 -2
  22. package/out/common/EventEmitter.js.map +1 -1
  23. package/out/common/Messager.js +0 -2
  24. package/out/common/Messager.js.map +1 -1
  25. package/out/common/utils.d.ts +2 -2
  26. package/out/common/utils.js.map +1 -1
  27. package/out/concepts/Abort__.d.ts +1 -1
  28. package/out/concepts/Abort__.js +9 -17
  29. package/out/concepts/Abort__.js.map +1 -1
  30. package/out/concepts/AbstractInterface__.d.ts +1 -1
  31. package/out/concepts/AbstractInterface__.js +5 -9
  32. package/out/concepts/AbstractInterface__.js.map +1 -1
  33. package/out/concepts/Anchor__.d.ts +1 -1
  34. package/out/concepts/Anchor__.js +6 -19
  35. package/out/concepts/Anchor__.js.map +1 -1
  36. package/out/concepts/AnonymousFunction__.d.ts +5 -5
  37. package/out/concepts/AnonymousFunction__.js +28 -53
  38. package/out/concepts/AnonymousFunction__.js.map +1 -1
  39. package/out/concepts/App__.d.ts +19 -19
  40. package/out/concepts/App__.js +243 -295
  41. package/out/concepts/App__.js.map +1 -1
  42. package/out/concepts/Argument__.d.ts +3 -3
  43. package/out/concepts/Argument__.js +12 -35
  44. package/out/concepts/Argument__.js.map +1 -1
  45. package/out/concepts/Assignee__.d.ts +2 -2
  46. package/out/concepts/Assignee__.js +41 -46
  47. package/out/concepts/Assignee__.js.map +1 -1
  48. package/out/concepts/AssignmentLine__.d.ts +1 -1
  49. package/out/concepts/AssignmentLine__.js +13 -21
  50. package/out/concepts/AssignmentLine__.js.map +1 -1
  51. package/out/concepts/Assignment__.d.ts +2 -2
  52. package/out/concepts/Assignment__.js +43 -38
  53. package/out/concepts/Assignment__.js.map +1 -1
  54. package/out/concepts/Attribute__.d.ts +6 -6
  55. package/out/concepts/Attribute__.js +16 -74
  56. package/out/concepts/Attribute__.js.map +1 -1
  57. package/out/concepts/AuthInterface__.d.ts +3 -3
  58. package/out/concepts/AuthInterface__.js +11 -24
  59. package/out/concepts/AuthInterface__.js.map +1 -1
  60. package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
  61. package/out/concepts/AuthLogicForCallInterface__.js +44 -50
  62. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  63. package/out/concepts/AuthLogic__.d.ts +7 -7
  64. package/out/concepts/AuthLogic__.js +11 -24
  65. package/out/concepts/AuthLogic__.js.map +1 -1
  66. package/out/concepts/BackendVariable__.d.ts +10 -10
  67. package/out/concepts/BackendVariable__.js +37 -58
  68. package/out/concepts/BackendVariable__.js.map +1 -1
  69. package/out/concepts/Backend__.d.ts +3 -3
  70. package/out/concepts/Backend__.js +21 -33
  71. package/out/concepts/Backend__.js.map +1 -1
  72. package/out/concepts/BatchAssignment__.d.ts +4 -4
  73. package/out/concepts/BatchAssignment__.js +45 -53
  74. package/out/concepts/BatchAssignment__.js.map +1 -1
  75. package/out/concepts/BinaryExpression__.d.ts +1 -1
  76. package/out/concepts/BinaryExpression__.js +15 -33
  77. package/out/concepts/BinaryExpression__.js.map +1 -1
  78. package/out/concepts/BindAttribute__.d.ts +13 -13
  79. package/out/concepts/BindAttribute__.js +29 -87
  80. package/out/concepts/BindAttribute__.js.map +1 -1
  81. package/out/concepts/BindDirective__.d.ts +7 -7
  82. package/out/concepts/BindDirective__.js +19 -66
  83. package/out/concepts/BindDirective__.js.map +1 -1
  84. package/out/concepts/BindEvent__.d.ts +11 -11
  85. package/out/concepts/BindEvent__.js +43 -66
  86. package/out/concepts/BindEvent__.js.map +1 -1
  87. package/out/concepts/BindStyle__.d.ts +7 -7
  88. package/out/concepts/BindStyle__.js +19 -36
  89. package/out/concepts/BindStyle__.js.map +1 -1
  90. package/out/concepts/Block__.d.ts +1 -1
  91. package/out/concepts/Block__.js +15 -20
  92. package/out/concepts/Block__.js.map +1 -1
  93. package/out/concepts/BooleanLiteral__.d.ts +1 -1
  94. package/out/concepts/BooleanLiteral__.js +5 -18
  95. package/out/concepts/BooleanLiteral__.js.map +1 -1
  96. package/out/concepts/CallAuthInterface__.d.ts +6 -5
  97. package/out/concepts/CallAuthInterface__.js +22 -27
  98. package/out/concepts/CallAuthInterface__.js.map +1 -1
  99. package/out/concepts/CallConnector__.d.ts +3 -3
  100. package/out/concepts/CallConnector__.js +16 -29
  101. package/out/concepts/CallConnector__.js.map +1 -1
  102. package/out/concepts/CallFunction__.d.ts +4 -4
  103. package/out/concepts/CallFunction__.js +59 -59
  104. package/out/concepts/CallFunction__.js.map +1 -1
  105. package/out/concepts/CallInterface__.d.ts +7 -6
  106. package/out/concepts/CallInterface__.js +65 -63
  107. package/out/concepts/CallInterface__.js.map +1 -1
  108. package/out/concepts/CallLogic__.d.ts +5 -5
  109. package/out/concepts/CallLogic__.js +116 -116
  110. package/out/concepts/CallLogic__.js.map +1 -1
  111. package/out/concepts/CallQueryComponent__.d.ts +15 -15
  112. package/out/concepts/CallQueryComponent__.js +83 -114
  113. package/out/concepts/CallQueryComponent__.js.map +1 -1
  114. package/out/concepts/Comment__.d.ts +1 -1
  115. package/out/concepts/Comment__.js +5 -18
  116. package/out/concepts/Comment__.js.map +1 -1
  117. package/out/concepts/CompletionProperty__.d.ts +2 -2
  118. package/out/concepts/CompletionProperty__.js +18 -62
  119. package/out/concepts/CompletionProperty__.js.map +1 -1
  120. package/out/concepts/ConfigGroup__.d.ts +3 -3
  121. package/out/concepts/ConfigGroup__.js +21 -33
  122. package/out/concepts/ConfigGroup__.js.map +1 -1
  123. package/out/concepts/ConfigPropertyValue__.d.ts +2 -2
  124. package/out/concepts/ConfigPropertyValue__.js +11 -29
  125. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  126. package/out/concepts/ConfigProperty__.d.ts +4 -4
  127. package/out/concepts/ConfigProperty__.js +21 -43
  128. package/out/concepts/ConfigProperty__.js.map +1 -1
  129. package/out/concepts/Configuration__.d.ts +4 -4
  130. package/out/concepts/Configuration__.js +21 -28
  131. package/out/concepts/Configuration__.js.map +1 -1
  132. package/out/concepts/Connection__.d.ts +4 -4
  133. package/out/concepts/Connection__.js +21 -43
  134. package/out/concepts/Connection__.js.map +1 -1
  135. package/out/concepts/ConnectorTrigger__.d.ts +7 -7
  136. package/out/concepts/ConnectorTrigger__.js +11 -34
  137. package/out/concepts/ConnectorTrigger__.js.map +1 -1
  138. package/out/concepts/Connector__.d.ts +15 -15
  139. package/out/concepts/Connector__.js +87 -124
  140. package/out/concepts/Connector__.js.map +1 -1
  141. package/out/concepts/Constant__.d.ts +11 -11
  142. package/out/concepts/Constant__.js +28 -43
  143. package/out/concepts/Constant__.js.map +1 -1
  144. package/out/concepts/CountersignPolicy__.d.ts +28 -0
  145. package/out/concepts/CountersignPolicy__.js +62 -0
  146. package/out/concepts/CountersignPolicy__.js.map +1 -0
  147. package/out/concepts/DataSource__.d.ts +4 -4
  148. package/out/concepts/DataSource__.js +22 -44
  149. package/out/concepts/DataSource__.js.map +1 -1
  150. package/out/concepts/DatabaseTypeAnnotation__.d.ts +1 -1
  151. package/out/concepts/DatabaseTypeAnnotation__.js +5 -23
  152. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  153. package/out/concepts/DefaultValue__.d.ts +2 -2
  154. package/out/concepts/DefaultValue__.js +43 -25
  155. package/out/concepts/DefaultValue__.js.map +1 -1
  156. package/out/concepts/Destination__.d.ts +5 -5
  157. package/out/concepts/Destination__.js +33 -53
  158. package/out/concepts/Destination__.js.map +1 -1
  159. package/out/concepts/End__.d.ts +1 -1
  160. package/out/concepts/End__.js +9 -17
  161. package/out/concepts/End__.js.map +1 -1
  162. package/out/concepts/EntityIndex__.d.ts +5 -5
  163. package/out/concepts/EntityIndex__.js +15 -43
  164. package/out/concepts/EntityIndex__.js.map +1 -1
  165. package/out/concepts/EntityProperty__.d.ts +13 -9
  166. package/out/concepts/EntityProperty__.js +41 -119
  167. package/out/concepts/EntityProperty__.js.map +1 -1
  168. package/out/concepts/Entity__.d.ts +7 -7
  169. package/out/concepts/Entity__.js +40 -64
  170. package/out/concepts/Entity__.js.map +1 -1
  171. package/out/concepts/EnumItem__.d.ts +4 -4
  172. package/out/concepts/EnumItem__.js +11 -37
  173. package/out/concepts/EnumItem__.js.map +1 -1
  174. package/out/concepts/Enum__.d.ts +5 -5
  175. package/out/concepts/Enum__.js +23 -54
  176. package/out/concepts/Enum__.js.map +1 -1
  177. package/out/concepts/Event__.d.ts +5 -5
  178. package/out/concepts/Event__.js +21 -53
  179. package/out/concepts/Event__.js.map +1 -1
  180. package/out/concepts/ExternalDestination__.d.ts +2 -2
  181. package/out/concepts/ExternalDestination__.js +38 -33
  182. package/out/concepts/ExternalDestination__.js.map +1 -1
  183. package/out/concepts/ForEachStatement__.d.ts +2 -2
  184. package/out/concepts/ForEachStatement__.js +28 -73
  185. package/out/concepts/ForEachStatement__.js.map +1 -1
  186. package/out/concepts/FrontendLibrary__.d.ts +5 -5
  187. package/out/concepts/FrontendLibrary__.js +30 -47
  188. package/out/concepts/FrontendLibrary__.js.map +1 -1
  189. package/out/concepts/FrontendVariable__.d.ts +13 -1
  190. package/out/concepts/FrontendVariable__.js +23 -13
  191. package/out/concepts/FrontendVariable__.js.map +1 -1
  192. package/out/concepts/Frontend__.d.ts +8 -8
  193. package/out/concepts/Frontend__.js +91 -108
  194. package/out/concepts/Frontend__.js.map +1 -1
  195. package/out/concepts/Function__.d.ts +8 -8
  196. package/out/concepts/Function__.js +53 -73
  197. package/out/concepts/Function__.js.map +1 -1
  198. package/out/concepts/I18nInfo__.d.ts +1 -1
  199. package/out/concepts/I18nInfo__.js +5 -28
  200. package/out/concepts/I18nInfo__.js.map +1 -1
  201. package/out/concepts/Identifier__.d.ts +2 -2
  202. package/out/concepts/Identifier__.js +43 -38
  203. package/out/concepts/Identifier__.js.map +1 -1
  204. package/out/concepts/IfStatement__.d.ts +1 -1
  205. package/out/concepts/IfStatement__.js +43 -30
  206. package/out/concepts/IfStatement__.js.map +1 -1
  207. package/out/concepts/ImportedInterface__.d.ts +1 -1
  208. package/out/concepts/ImportedInterface__.js +5 -14
  209. package/out/concepts/ImportedInterface__.js.map +1 -1
  210. package/out/concepts/Integration__.d.ts +5 -5
  211. package/out/concepts/Integration__.js +21 -33
  212. package/out/concepts/Integration__.js.map +1 -1
  213. package/out/concepts/InterfaceParam__.d.ts +11 -11
  214. package/out/concepts/InterfaceParam__.js +11 -49
  215. package/out/concepts/InterfaceParam__.js.map +1 -1
  216. package/out/concepts/Interface__.d.ts +16 -15
  217. package/out/concepts/Interface__.js +43 -81
  218. package/out/concepts/Interface__.js.map +1 -1
  219. package/out/concepts/JSBlock__.d.ts +1 -1
  220. package/out/concepts/JSBlock__.js +9 -22
  221. package/out/concepts/JSBlock__.js.map +1 -1
  222. package/out/concepts/JavaLogic__.d.ts +1 -1
  223. package/out/concepts/JavaLogic__.js +5 -28
  224. package/out/concepts/JavaLogic__.js.map +1 -1
  225. package/out/concepts/LogicItem__.d.ts +12 -12
  226. package/out/concepts/LogicItem__.js +18 -45
  227. package/out/concepts/LogicItem__.js.map +1 -1
  228. package/out/concepts/Logic__.d.ts +20 -19
  229. package/out/concepts/Logic__.js +110 -155
  230. package/out/concepts/Logic__.js.map +1 -1
  231. package/out/concepts/MatchCase__.d.ts +2 -2
  232. package/out/concepts/MatchCase__.js +36 -43
  233. package/out/concepts/MatchCase__.js.map +1 -1
  234. package/out/concepts/Match__.d.ts +3 -3
  235. package/out/concepts/Match__.js +84 -56
  236. package/out/concepts/Match__.js.map +1 -1
  237. package/out/concepts/MemberExpression__.d.ts +3 -2
  238. package/out/concepts/MemberExpression__.js +58 -48
  239. package/out/concepts/MemberExpression__.js.map +1 -1
  240. package/out/concepts/MetadataType__.d.ts +6 -14
  241. package/out/concepts/MetadataType__.js +36 -77
  242. package/out/concepts/MetadataType__.js.map +1 -1
  243. package/out/concepts/MicroApp__.d.ts +1 -1
  244. package/out/concepts/MicroApp__.js +5 -48
  245. package/out/concepts/MicroApp__.js.map +1 -1
  246. package/out/concepts/Module__.d.ts +16 -16
  247. package/out/concepts/Module__.js +126 -190
  248. package/out/concepts/Module__.js.map +1 -1
  249. package/out/concepts/MsgTriggerEvent__.d.ts +8 -8
  250. package/out/concepts/MsgTriggerEvent__.js +21 -28
  251. package/out/concepts/MsgTriggerEvent__.js.map +1 -1
  252. package/out/concepts/MsgTriggerLauncher__.d.ts +5 -5
  253. package/out/concepts/MsgTriggerLauncher__.js +21 -33
  254. package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
  255. package/out/concepts/MultiApprovalPolicy__.d.ts +26 -0
  256. package/out/concepts/MultiApprovalPolicy__.js +59 -0
  257. package/out/concepts/MultiApprovalPolicy__.js.map +1 -0
  258. package/out/concepts/Namespace__.d.ts +12 -12
  259. package/out/concepts/Namespace__.js +115 -140
  260. package/out/concepts/Namespace__.js.map +1 -1
  261. package/out/concepts/NewComposite__.d.ts +6 -6
  262. package/out/concepts/NewComposite__.js +70 -71
  263. package/out/concepts/NewComposite__.js.map +1 -1
  264. package/out/concepts/NewList__.d.ts +2 -2
  265. package/out/concepts/NewList__.js +19 -30
  266. package/out/concepts/NewList__.js.map +1 -1
  267. package/out/concepts/NewMap__.d.ts +2 -2
  268. package/out/concepts/NewMap__.js +28 -39
  269. package/out/concepts/NewMap__.js.map +1 -1
  270. package/out/concepts/New__.d.ts +1 -1
  271. package/out/concepts/New__.js +5 -13
  272. package/out/concepts/New__.js.map +1 -1
  273. package/out/concepts/NullLiteral__.d.ts +2 -2
  274. package/out/concepts/NullLiteral__.js +6 -14
  275. package/out/concepts/NullLiteral__.js.map +1 -1
  276. package/out/concepts/NumericLiteral__.d.ts +3 -3
  277. package/out/concepts/NumericLiteral__.js +8 -26
  278. package/out/concepts/NumericLiteral__.js.map +1 -1
  279. package/out/concepts/OqlQueryComponent__.d.ts +4 -4
  280. package/out/concepts/OqlQueryComponent__.js +18 -41
  281. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  282. package/out/concepts/OverriddenLogic__.d.ts +18 -18
  283. package/out/concepts/OverriddenLogic__.js +108 -148
  284. package/out/concepts/OverriddenLogic__.js.map +1 -1
  285. package/out/concepts/Param__.d.ts +15 -15
  286. package/out/concepts/Param__.js +60 -66
  287. package/out/concepts/Param__.js.map +1 -1
  288. package/out/concepts/Point__.d.ts +1 -1
  289. package/out/concepts/Point__.js +5 -23
  290. package/out/concepts/Point__.js.map +1 -1
  291. package/out/concepts/ProcessComponent__.d.ts +5 -5
  292. package/out/concepts/ProcessComponent__.js +30 -57
  293. package/out/concepts/ProcessComponent__.js.map +1 -1
  294. package/out/concepts/ProcessElement__.d.ts +29 -13
  295. package/out/concepts/ProcessElement__.js +119 -119
  296. package/out/concepts/ProcessElement__.js.map +1 -1
  297. package/out/concepts/ProcessOutcome__.d.ts +1 -1
  298. package/out/concepts/ProcessOutcome__.js +9 -22
  299. package/out/concepts/ProcessOutcome__.js.map +1 -1
  300. package/out/concepts/ProcessOutcomes__.d.ts +1 -1
  301. package/out/concepts/ProcessOutcomes__.js +13 -21
  302. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  303. package/out/concepts/Process__.d.ts +11 -9
  304. package/out/concepts/Process__.js +64 -85
  305. package/out/concepts/Process__.js.map +1 -1
  306. package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
  307. package/out/concepts/QueryAggregateExpression__.js +5 -28
  308. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  309. package/out/concepts/QueryFieldExpression__.d.ts +1 -1
  310. package/out/concepts/QueryFieldExpression__.js +9 -32
  311. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  312. package/out/concepts/QueryFromExpression__.d.ts +2 -2
  313. package/out/concepts/QueryFromExpression__.js +36 -35
  314. package/out/concepts/QueryFromExpression__.js.map +1 -1
  315. package/out/concepts/QueryGroupByExpression__.d.ts +1 -1
  316. package/out/concepts/QueryGroupByExpression__.js +5 -18
  317. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  318. package/out/concepts/QueryJoinExpression__.d.ts +2 -2
  319. package/out/concepts/QueryJoinExpression__.js +22 -48
  320. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  321. package/out/concepts/QueryLimitExpression__.d.ts +1 -1
  322. package/out/concepts/QueryLimitExpression__.js +5 -23
  323. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  324. package/out/concepts/QueryOrderByExpression__.d.ts +1 -1
  325. package/out/concepts/QueryOrderByExpression__.js +5 -23
  326. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  327. package/out/concepts/QuerySelectExpression__.d.ts +3 -3
  328. package/out/concepts/QuerySelectExpression__.js +28 -35
  329. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  330. package/out/concepts/Rect__.d.ts +1 -1
  331. package/out/concepts/Rect__.js +5 -33
  332. package/out/concepts/Rect__.js.map +1 -1
  333. package/out/concepts/Return__.d.ts +13 -13
  334. package/out/concepts/Return__.js +30 -52
  335. package/out/concepts/Return__.js.map +1 -1
  336. package/out/concepts/Role__.d.ts +2 -2
  337. package/out/concepts/Role__.js +15 -38
  338. package/out/concepts/Role__.js.map +1 -1
  339. package/out/concepts/SelectMembers__.d.ts +2 -2
  340. package/out/concepts/SelectMembers__.js +19 -31
  341. package/out/concepts/SelectMembers__.js.map +1 -1
  342. package/out/concepts/SequentialPolicy__.d.ts +20 -0
  343. package/out/concepts/SequentialPolicy__.js +48 -0
  344. package/out/concepts/SequentialPolicy__.js.map +1 -0
  345. package/out/concepts/Slot__.d.ts +5 -5
  346. package/out/concepts/Slot__.js +11 -49
  347. package/out/concepts/Slot__.js.map +1 -1
  348. package/out/concepts/SqlQueryComponent__.d.ts +4 -4
  349. package/out/concepts/SqlQueryComponent__.js +16 -44
  350. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  351. package/out/concepts/Start__.d.ts +1 -1
  352. package/out/concepts/Start__.js +9 -17
  353. package/out/concepts/Start__.js.map +1 -1
  354. package/out/concepts/StaticString__.d.ts +49 -0
  355. package/out/concepts/StaticString__.js +91 -0
  356. package/out/concepts/StaticString__.js.map +1 -0
  357. package/out/concepts/StringInterpolation__.d.ts +2 -2
  358. package/out/concepts/StringInterpolation__.js +22 -23
  359. package/out/concepts/StringInterpolation__.js.map +1 -1
  360. package/out/concepts/StringLiteral__.d.ts +2 -2
  361. package/out/concepts/StringLiteral__.js +10 -23
  362. package/out/concepts/StringLiteral__.js.map +1 -1
  363. package/out/concepts/StructureProperty__.d.ts +11 -7
  364. package/out/concepts/StructureProperty__.js +23 -66
  365. package/out/concepts/StructureProperty__.js.map +1 -1
  366. package/out/concepts/Structure__.d.ts +7 -6
  367. package/out/concepts/Structure__.js +30 -52
  368. package/out/concepts/Structure__.js.map +1 -1
  369. package/out/concepts/SwitchCase__.d.ts +1 -1
  370. package/out/concepts/SwitchCase__.js +36 -24
  371. package/out/concepts/SwitchCase__.js.map +1 -1
  372. package/out/concepts/SwitchStatement__.d.ts +2 -2
  373. package/out/concepts/SwitchStatement__.js +36 -20
  374. package/out/concepts/SwitchStatement__.js.map +1 -1
  375. package/out/concepts/Theme__.d.ts +1 -1
  376. package/out/concepts/Theme__.js +13 -21
  377. package/out/concepts/Theme__.js.map +1 -1
  378. package/out/concepts/Transactional__.d.ts +9 -9
  379. package/out/concepts/Transactional__.js +11 -34
  380. package/out/concepts/Transactional__.js.map +1 -1
  381. package/out/concepts/TriggerEvent__.d.ts +9 -78
  382. package/out/concepts/TriggerEvent__.js +15 -118
  383. package/out/concepts/TriggerEvent__.js.map +1 -1
  384. package/out/concepts/TriggerLauncher__.d.ts +4 -4
  385. package/out/concepts/TriggerLauncher__.js +11 -39
  386. package/out/concepts/TriggerLauncher__.js.map +1 -1
  387. package/out/concepts/TypeAnnotation__.d.ts +7 -6
  388. package/out/concepts/TypeAnnotation__.js +41 -65
  389. package/out/concepts/TypeAnnotation__.js.map +1 -1
  390. package/out/concepts/TypeParam__.d.ts +1 -1
  391. package/out/concepts/TypeParam__.js +11 -24
  392. package/out/concepts/TypeParam__.js.map +1 -1
  393. package/out/concepts/UnaryExpression__.d.ts +1 -1
  394. package/out/concepts/UnaryExpression__.js +5 -23
  395. package/out/concepts/UnaryExpression__.js.map +1 -1
  396. package/out/concepts/Unparsed__.d.ts +2 -2
  397. package/out/concepts/Unparsed__.js +6 -19
  398. package/out/concepts/Unparsed__.js.map +1 -1
  399. package/out/concepts/UseComponent__.d.ts +1 -1
  400. package/out/concepts/UseComponent__.js +5 -23
  401. package/out/concepts/UseComponent__.js.map +1 -1
  402. package/out/concepts/ValidationRule__.d.ts +3 -3
  403. package/out/concepts/ValidationRule__.js +48 -51
  404. package/out/concepts/ValidationRule__.js.map +1 -1
  405. package/out/concepts/Variable__.d.ts +16 -16
  406. package/out/concepts/Variable__.js +38 -54
  407. package/out/concepts/Variable__.js.map +1 -1
  408. package/out/concepts/ViewBlock__.d.ts +1 -1
  409. package/out/concepts/ViewBlock__.js +5 -28
  410. package/out/concepts/ViewBlock__.js.map +1 -1
  411. package/out/concepts/ViewComponent__.d.ts +8 -8
  412. package/out/concepts/ViewComponent__.js +110 -121
  413. package/out/concepts/ViewComponent__.js.map +1 -1
  414. package/out/concepts/ViewElement__.d.ts +9 -9
  415. package/out/concepts/ViewElement__.js +138 -162
  416. package/out/concepts/ViewElement__.js.map +1 -1
  417. package/out/concepts/View__.d.ts +25 -13
  418. package/out/concepts/View__.js +197 -184
  419. package/out/concepts/View__.js.map +1 -1
  420. package/out/concepts/WhileStatement__.d.ts +1 -1
  421. package/out/concepts/WhileStatement__.js +36 -24
  422. package/out/concepts/WhileStatement__.js.map +1 -1
  423. package/out/concepts/basics/stdlib/index.d.ts +12 -0
  424. package/out/concepts/basics/stdlib/index.js +46 -1
  425. package/out/concepts/basics/stdlib/index.js.map +1 -1
  426. package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -5
  427. package/out/concepts/basics/stdlib/nasl.auth.js +76 -69
  428. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
  429. package/out/concepts/basics/stdlib/nasl.browser.d.ts +4 -2
  430. package/out/concepts/basics/stdlib/nasl.browser.js +54 -45
  431. package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
  432. package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -5
  433. package/out/concepts/basics/stdlib/nasl.collection.js +29 -24
  434. package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -1
  435. package/out/concepts/basics/stdlib/nasl.configuration.d.ts +4 -2
  436. package/out/concepts/basics/stdlib/nasl.configuration.js +27 -18
  437. package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -1
  438. package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -3
  439. package/out/concepts/basics/stdlib/nasl.core.js +25 -27
  440. package/out/concepts/basics/stdlib/nasl.core.js.map +1 -1
  441. package/out/concepts/basics/stdlib/nasl.event.d.ts +4 -2
  442. package/out/concepts/basics/stdlib/nasl.event.js +16 -7
  443. package/out/concepts/basics/stdlib/nasl.event.js.map +1 -1
  444. package/out/concepts/basics/stdlib/nasl.http.d.ts +7 -5
  445. package/out/concepts/basics/stdlib/nasl.http.js +78 -73
  446. package/out/concepts/basics/stdlib/nasl.http.js.map +1 -1
  447. package/out/concepts/basics/stdlib/nasl.interface.d.ts +6 -4
  448. package/out/concepts/basics/stdlib/nasl.interface.js +28 -22
  449. package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -1
  450. package/out/concepts/basics/stdlib/nasl.io.d.ts +4 -2
  451. package/out/concepts/basics/stdlib/nasl.io.js +30 -21
  452. package/out/concepts/basics/stdlib/nasl.io.js.map +1 -1
  453. package/out/concepts/basics/stdlib/nasl.logging.d.ts +4 -2
  454. package/out/concepts/basics/stdlib/nasl.logging.js +33 -24
  455. package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -1
  456. package/out/concepts/basics/stdlib/nasl.process.d.ts +6 -4
  457. package/out/concepts/basics/stdlib/nasl.process.js +541 -536
  458. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
  459. package/out/concepts/basics/stdlib/nasl.ui.d.ts +6 -4
  460. package/out/concepts/basics/stdlib/nasl.ui.js +400 -425
  461. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  462. package/out/concepts/basics/stdlib/nasl.util.d.ts +5 -4
  463. package/out/concepts/basics/stdlib/nasl.util.js +716 -702
  464. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  465. package/out/concepts/basics/stdlib/nasl.validation.d.ts +4 -2
  466. package/out/concepts/basics/stdlib/nasl.validation.js +191 -182
  467. package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -1
  468. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +4 -5
  469. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +29 -8
  470. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -1
  471. package/out/concepts/index.d.ts +2 -1
  472. package/out/concepts/index.js +18 -2
  473. package/out/concepts/index.js.map +1 -1
  474. package/out/concepts/index__.d.ts +4 -0
  475. package/out/concepts/index__.js +4 -0
  476. package/out/concepts/index__.js.map +1 -1
  477. package/out/concepts/types__.d.ts +0 -127
  478. package/out/concepts/types__.js +0 -2
  479. package/out/concepts/utils/asserts.d.ts +6676 -0
  480. package/out/concepts/utils/asserts.js +8870 -0
  481. package/out/concepts/utils/asserts.js.map +1 -0
  482. package/out/concepts/utils/types.d.ts +430 -0
  483. package/out/concepts/utils/types.js +3 -0
  484. package/out/concepts/utils/types.js.map +1 -0
  485. package/out/decorators/index.d.ts +10 -7
  486. package/out/decorators/index.js +12 -8
  487. package/out/decorators/index.js.map +1 -1
  488. package/out/generator/genBundleFiles.js +33 -1
  489. package/out/generator/genBundleFiles.js.map +1 -1
  490. package/out/generator/genMetaData.js +32 -3
  491. package/out/generator/genMetaData.js.map +1 -1
  492. package/out/generator/genReleaseBody.js.map +1 -1
  493. package/out/manager/diagnostic.js +3 -1
  494. package/out/manager/diagnostic.js.map +1 -1
  495. package/out/server/extendBaseNode.js.map +1 -1
  496. package/out/server/formatTsUtils.d.ts +4 -5
  497. package/out/server/formatTsUtils.js +13 -12
  498. package/out/server/formatTsUtils.js.map +1 -1
  499. package/out/server/getConnector.js +19 -1
  500. package/out/server/getConnector.js.map +1 -1
  501. package/out/server/getFunctions.js +2 -2
  502. package/out/server/getFunctions.js.map +1 -1
  503. package/out/server/getLogging.js +1 -1
  504. package/out/server/getLogging.js.map +1 -1
  505. package/out/server/getLogics.d.ts +1 -0
  506. package/out/server/getLogics.js +17 -13
  507. package/out/server/getLogics.js.map +1 -1
  508. package/out/server/getMemberIdentifier.d.ts +4 -4
  509. package/out/server/getMemberIdentifier.js +22 -1
  510. package/out/server/getMemberIdentifier.js.map +1 -1
  511. package/out/server/getProcessComponents.js +1 -1
  512. package/out/server/getProcessComponents.js.map +1 -1
  513. package/out/server/getProcesses.js +56 -6
  514. package/out/server/getProcesses.js.map +1 -1
  515. package/out/server/getValidates.d.ts +1 -1
  516. package/out/server/getValidates.js +2 -2
  517. package/out/server/getValidates.js.map +1 -1
  518. package/out/server/index.js +1 -0
  519. package/out/server/index.js.map +1 -1
  520. package/out/server/naslServer.d.ts +8 -12
  521. package/out/server/naslServer.js +58 -76
  522. package/out/server/naslServer.js.map +1 -1
  523. package/out/server/translator.js +3 -0
  524. package/out/server/translator.js.map +1 -1
  525. package/out/service/creator/errHandles.js +6 -3
  526. package/out/service/creator/errHandles.js.map +1 -1
  527. package/out/service/storage/init.d.ts +2 -0
  528. package/out/service/storage/init.js +35 -20
  529. package/out/service/storage/init.js.map +1 -1
  530. package/out/translator/types.d.ts +1 -0
  531. package/out/translator/utils.d.ts +1 -1
  532. package/out/translator/utils.js +1 -2
  533. package/out/translator/utils.js.map +1 -1
  534. package/out/utils/i18nInfo.js +0 -30
  535. package/out/utils/i18nInfo.js.map +1 -1
  536. package/out/utils/time-slicing/controller.d.ts +1 -1
  537. package/out/utils/time-slicing/controller.js +79 -65
  538. package/out/utils/time-slicing/controller.js.map +1 -1
  539. package/out/utils/time-slicing/performance.js +0 -1
  540. package/out/utils/time-slicing/performance.js.map +1 -1
  541. package/out/utils/time-slicing/runner.d.ts +1 -1
  542. package/out/utils/time-slicing/runner.js +4 -5
  543. package/out/utils/time-slicing/runner.js.map +1 -1
  544. package/out/utils/time-slicing/tool.d.ts +1 -1
  545. package/out/utils/types.d.ts +5 -0
  546. package/package.json +2 -2
  547. package/sandbox/stdlib/nasl.configuration.ts +16 -1
  548. package/sandbox/stdlib/nasl.core.ts +3 -0
  549. package/sandbox/stdlib/nasl.oql.ts +19 -2
  550. package/sandbox/stdlib/nasl.util.ts +2 -2
  551. package/src/automate/engine/utils.js +6 -6
  552. package/src/bak/translator.js +2 -1
  553. package/src/common/BaseNode.ts +30 -30
  554. package/src/common/Command.ts +1 -1
  555. package/src/common/EventEmitter.ts +6 -1
  556. package/src/common/utils.ts +2 -2
  557. package/src/concepts/Abort__.ts +5 -6
  558. package/src/concepts/AbstractInterface__.ts +5 -5
  559. package/src/concepts/Anchor__.ts +7 -9
  560. package/src/concepts/AnonymousFunction__.ts +23 -29
  561. package/src/concepts/App__.ts +89 -73
  562. package/src/concepts/Argument__.ts +11 -15
  563. package/src/concepts/Assignee__.ts +13 -11
  564. package/src/concepts/AssignmentLine__.ts +5 -5
  565. package/src/concepts/Assignment__.ts +24 -25
  566. package/src/concepts/Attribute__.ts +10 -20
  567. package/src/concepts/AuthInterface__.ts +9 -15
  568. package/src/concepts/AuthLogicForCallInterface__.ts +43 -33
  569. package/src/concepts/AuthLogic__.ts +11 -13
  570. package/src/concepts/BackendVariable__.ts +39 -30
  571. package/src/concepts/Backend__.ts +10 -10
  572. package/src/concepts/BatchAssignment__.ts +23 -18
  573. package/src/concepts/BinaryExpression__.ts +14 -14
  574. package/src/concepts/BindAttribute__.ts +25 -34
  575. package/src/concepts/BindDirective__.ts +14 -21
  576. package/src/concepts/BindEvent__.ts +31 -30
  577. package/src/concepts/BindStyle__.ts +14 -15
  578. package/src/concepts/Block__.ts +9 -8
  579. package/src/concepts/BooleanLiteral__.ts +5 -7
  580. package/src/concepts/CallAuthInterface__.ts +16 -16
  581. package/src/concepts/CallConnector__.ts +15 -14
  582. package/src/concepts/CallFunction__.ts +23 -22
  583. package/src/concepts/CallInterface__.ts +25 -23
  584. package/src/concepts/CallLogic__.ts +127 -85
  585. package/src/concepts/CallQueryComponent__.ts +41 -32
  586. package/src/concepts/Comment__.ts +5 -7
  587. package/src/concepts/CompletionProperty__.ts +6 -13
  588. package/src/concepts/ConfigGroup__.ts +10 -10
  589. package/src/concepts/ConfigPropertyValue__.ts +6 -8
  590. package/src/concepts/ConfigProperty__.ts +13 -15
  591. package/src/concepts/Configuration__.ts +10 -9
  592. package/src/concepts/Connection__.ts +10 -12
  593. package/src/concepts/ConnectorTrigger__.ts +11 -14
  594. package/src/concepts/Connector__.ts +33 -33
  595. package/src/concepts/Constant__.ts +35 -26
  596. package/src/concepts/CountersignPolicy__.ts +78 -0
  597. package/src/concepts/DataSource__.ts +10 -12
  598. package/src/concepts/DatabaseTypeAnnotation__.ts +5 -7
  599. package/src/concepts/DefaultValue__.ts +18 -8
  600. package/src/concepts/Destination__.ts +18 -18
  601. package/src/concepts/End__.ts +7 -8
  602. package/src/concepts/EntityIndex__.ts +9 -13
  603. package/src/concepts/EntityProperty__.ts +18 -28
  604. package/src/concepts/Entity__.ts +19 -22
  605. package/src/concepts/EnumItem__.ts +8 -10
  606. package/src/concepts/Enum__.ts +12 -14
  607. package/src/concepts/Event__.ts +11 -15
  608. package/src/concepts/ExternalDestination__.ts +12 -15
  609. package/src/concepts/ForEachStatement__.ts +28 -41
  610. package/src/concepts/FrontendLibrary__.ts +14 -14
  611. package/src/concepts/FrontendVariable__.ts +22 -6
  612. package/src/concepts/Frontend__.ts +48 -30
  613. package/src/concepts/Function__.ts +26 -23
  614. package/src/concepts/I18nInfo__.ts +5 -8
  615. package/src/concepts/Identifier__.ts +12 -15
  616. package/src/concepts/IfStatement__.ts +9 -9
  617. package/src/concepts/ImportedInterface__.ts +5 -7
  618. package/src/concepts/Integration__.ts +11 -11
  619. package/src/concepts/InterfaceParam__.ts +20 -24
  620. package/src/concepts/Interface__.ts +26 -31
  621. package/src/concepts/JSBlock__.ts +5 -7
  622. package/src/concepts/JavaLogic__.ts +5 -9
  623. package/src/concepts/LogicItem__.ts +21 -25
  624. package/src/concepts/Logic__.ts +87 -81
  625. package/src/concepts/MatchCase__.ts +20 -18
  626. package/src/concepts/Match__.ts +48 -23
  627. package/src/concepts/MemberExpression__.ts +32 -29
  628. package/src/concepts/MetadataType__.ts +15 -34
  629. package/src/concepts/MicroApp__.ts +5 -12
  630. package/src/concepts/Module__.ts +47 -43
  631. package/src/concepts/MsgTriggerEvent__.ts +14 -14
  632. package/src/concepts/MsgTriggerLauncher__.ts +11 -12
  633. package/src/concepts/MultiApprovalPolicy__.ts +72 -0
  634. package/src/concepts/Namespace__.ts +40 -32
  635. package/src/concepts/NewComposite__.ts +43 -28
  636. package/src/concepts/NewList__.ts +14 -14
  637. package/src/concepts/NewMap__.ts +17 -16
  638. package/src/concepts/New__.ts +5 -6
  639. package/src/concepts/NullLiteral__.ts +6 -7
  640. package/src/concepts/NumericLiteral__.ts +8 -10
  641. package/src/concepts/OqlQueryComponent__.ts +12 -14
  642. package/src/concepts/OverriddenLogic__.ts +81 -71
  643. package/src/concepts/Param__.ts +40 -40
  644. package/src/concepts/Point__.ts +5 -7
  645. package/src/concepts/ProcessComponent__.ts +13 -15
  646. package/src/concepts/ProcessElement__.ts +101 -34
  647. package/src/concepts/ProcessOutcome__.ts +5 -7
  648. package/src/concepts/ProcessOutcomes__.ts +5 -6
  649. package/src/concepts/Process__.ts +29 -25
  650. package/src/concepts/QueryAggregateExpression__.ts +6 -10
  651. package/src/concepts/QueryFieldExpression__.ts +6 -10
  652. package/src/concepts/QueryFromExpression__.ts +8 -11
  653. package/src/concepts/QueryGroupByExpression__.ts +5 -7
  654. package/src/concepts/QueryJoinExpression__.ts +11 -14
  655. package/src/concepts/QueryLimitExpression__.ts +5 -8
  656. package/src/concepts/QueryOrderByExpression__.ts +5 -8
  657. package/src/concepts/QuerySelectExpression__.ts +11 -10
  658. package/src/concepts/Rect__.ts +5 -9
  659. package/src/concepts/Return__.ts +30 -26
  660. package/src/concepts/Role__.ts +7 -10
  661. package/src/concepts/SelectMembers__.ts +10 -10
  662. package/src/concepts/SequentialPolicy__.ts +60 -0
  663. package/src/concepts/Slot__.ts +9 -15
  664. package/src/concepts/SqlQueryComponent__.ts +11 -16
  665. package/src/concepts/Start__.ts +5 -6
  666. package/src/concepts/StaticString__.ts +104 -0
  667. package/src/concepts/StringInterpolation__.ts +13 -9
  668. package/src/concepts/StringLiteral__.ts +6 -8
  669. package/src/concepts/StructureProperty__.ts +16 -20
  670. package/src/concepts/Structure__.ts +14 -15
  671. package/src/concepts/SwitchCase__.ts +7 -8
  672. package/src/concepts/SwitchStatement__.ts +8 -8
  673. package/src/concepts/Theme__.ts +5 -5
  674. package/src/concepts/Transactional__.ts +13 -16
  675. package/src/concepts/TriggerEvent__.ts +22 -177
  676. package/src/concepts/TriggerLauncher__.ts +9 -13
  677. package/src/concepts/TypeAnnotation__.ts +22 -18
  678. package/src/concepts/TypeParam__.ts +5 -6
  679. package/src/concepts/UnaryExpression__.ts +5 -8
  680. package/src/concepts/Unparsed__.ts +6 -8
  681. package/src/concepts/UseComponent__.ts +5 -7
  682. package/src/concepts/ValidationRule__.ts +13 -16
  683. package/src/concepts/Variable__.ts +50 -37
  684. package/src/concepts/ViewBlock__.ts +5 -8
  685. package/src/concepts/ViewComponent__.ts +68 -47
  686. package/src/concepts/ViewElement__.ts +114 -89
  687. package/src/concepts/View__.ts +183 -91
  688. package/src/concepts/WhileStatement__.ts +7 -8
  689. package/src/concepts/basics/stdlib/index.ts +66 -20
  690. package/src/concepts/basics/stdlib/nasl.auth.ts +167 -149
  691. package/src/concepts/basics/stdlib/nasl.browser.ts +143 -132
  692. package/src/concepts/basics/stdlib/nasl.collection.ts +54 -39
  693. package/src/concepts/basics/stdlib/nasl.configuration.ts +19 -9
  694. package/src/concepts/basics/stdlib/nasl.core.ts +41 -35
  695. package/src/concepts/basics/stdlib/nasl.event.ts +27 -17
  696. package/src/concepts/basics/stdlib/nasl.http.ts +170 -158
  697. package/src/concepts/basics/stdlib/nasl.interface.ts +48 -37
  698. package/src/concepts/basics/stdlib/nasl.io.ts +54 -44
  699. package/src/concepts/basics/stdlib/nasl.logging.ts +56 -55
  700. package/src/concepts/basics/stdlib/nasl.process.ts +610 -594
  701. package/src/concepts/basics/stdlib/nasl.ui.ts +1005 -986
  702. package/src/concepts/basics/stdlib/nasl.util.ts +2270 -2251
  703. package/src/concepts/basics/stdlib/nasl.validation.ts +567 -556
  704. package/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts +19 -23
  705. package/src/concepts/index.ts +9 -1
  706. package/src/concepts/index__.ts +4 -0
  707. package/src/concepts/types__.ts +0 -254
  708. package/src/concepts/utils/asserts.ts +9530 -0
  709. package/src/concepts/utils/types.ts +670 -0
  710. package/src/decorators/index.ts +17 -16
  711. package/src/generator/genBundleFiles.ts +34 -2
  712. package/src/generator/genMetaData.ts +31 -3
  713. package/src/generator/genReleaseBody.ts +41 -40
  714. package/src/server/extendBaseNode.ts +2 -1
  715. package/src/server/formatTsUtils.ts +21 -20
  716. package/src/server/getConnector.ts +21 -2
  717. package/src/server/getFunctions.ts +3 -3
  718. package/src/server/getLogging.ts +2 -2
  719. package/src/server/getLogics.ts +16 -12
  720. package/src/server/getMemberIdentifier.ts +26 -5
  721. package/src/server/getProcessComponents.ts +2 -2
  722. package/src/server/getProcesses.ts +56 -6
  723. package/src/server/getValidates.ts +3 -2
  724. package/src/server/index.ts +2 -1
  725. package/src/server/naslServer.ts +51 -60
  726. package/src/server/translator.ts +3 -0
  727. package/src/service/creator/errHandles.js +7 -4
  728. package/src/service/storage/init.ts +34 -7
  729. package/src/translator/types.ts +1 -0
  730. package/src/translator/utils.ts +1 -2
  731. package/src/utils/i18nInfo.ts +0 -30
  732. package/src/utils/time-slicing/controller.ts +34 -23
  733. package/src/utils/time-slicing/runner.ts +7 -9
  734. package/src/utils/time-slicing/tool.ts +1 -1
  735. package/src/utils/types.ts +6 -0
  736. package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +3 -3
  737. package/test/concepts/anonymous-function/toJS.spec.ts +2 -2
  738. package/test/concepts/anonymous-function/toVue.spec.ts +2 -2
  739. package/test/concepts/assignment/toEmbeddedTS.spec.ts +3 -3
  740. package/test/concepts/assignment/toJS.spec.ts +2 -2
  741. package/test/concepts/assignment/toVue.spec.ts +2 -2
  742. package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +3 -3
  743. package/test/concepts/batch-assignment/toJS.spec.ts +2 -2
  744. package/test/concepts/batch-assignment/toVue.spec.ts +2 -2
  745. package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +3 -3
  746. package/test/concepts/binary-expression/toJS.spec.ts +2 -2
  747. package/test/concepts/binary-expression/toVue.spec.ts +2 -2
  748. package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +3 -3
  749. package/test/concepts/boolean-literal/toJS.spec.ts +2 -2
  750. package/test/concepts/boolean-literal/toVue.spec.ts +2 -2
  751. package/test/concepts/call-function/toEmbeddedTS.spec.ts +3 -3
  752. package/test/concepts/call-function/toJS.spec.ts +2 -2
  753. package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +6 -9
  754. package/test/concepts/call-interface/toEmbeddedTS.spec.ts +3 -3
  755. package/test/concepts/call-interface/toJS.spec.ts +2 -2
  756. package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +27 -3
  757. package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +18 -3
  758. package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +15 -0
  759. package/test/concepts/call-logic/__snapshots__/toUI.spec.ts.snap +7 -0
  760. package/test/concepts/call-logic/__snapshots__/toVue.spec.ts.snap +101 -0
  761. package/test/concepts/call-logic/__snapshots__/toVueDesigner.spec.ts.snap +7 -0
  762. package/test/concepts/call-logic/fixtures/json-deserialize.json +173 -0
  763. package/test/concepts/call-logic/fixtures/json-serialize-with-string.json +177 -0
  764. package/test/concepts/call-logic/fixtures/json-serialize.json +178 -0
  765. package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +3 -3
  766. package/test/concepts/call-logic/toEmbeddedTS.spec.ts +3 -3
  767. package/test/concepts/call-logic/toJS.spec.ts +2 -2
  768. package/test/concepts/call-logic/toUI.spec.ts +16 -0
  769. package/test/concepts/call-logic/toVue.spec.ts +14 -0
  770. package/test/concepts/call-logic/toVueDesigner.spec.ts +16 -0
  771. package/test/concepts/data-source/toEmbeddedTS.spec.ts +3 -3
  772. package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +3 -3
  773. package/test/concepts/entity/toEmbeddedTS.spec.ts +3 -3
  774. package/test/concepts/entity/toEmbeddedTSFile.spec.ts +2 -2
  775. package/test/concepts/identifier/toEmbeddedTS.spec.ts +3 -3
  776. package/test/concepts/identifier/toJS.spec.ts +2 -2
  777. package/test/concepts/identifier/toVue.spec.ts +2 -2
  778. package/test/concepts/match/toEmbeddedTS.spec.ts +3 -3
  779. package/test/concepts/match/toJS.spec.ts +2 -2
  780. package/test/concepts/member-expression/toEmbeddedTS.spec.ts +3 -3
  781. package/test/concepts/member-expression/toJS.spec.ts +2 -2
  782. package/test/concepts/member-expression/toVue.spec.ts +2 -2
  783. package/test/concepts/null-literal/toEmbeddedTS.spec.ts +3 -3
  784. package/test/concepts/null-literal/toJS.spec.ts +2 -2
  785. package/test/concepts/null-literal/toVue.spec.ts +2 -2
  786. package/test/concepts/numeric-literal/toEmbeddedTS.spec.ts +3 -3
  787. package/test/concepts/numeric-literal/toJS.spec.ts +2 -2
  788. package/test/concepts/numeric-literal/toVue.spec.ts +2 -2
  789. package/test/concepts/string-literal/toEmbeddedTS.spec.ts +3 -3
  790. package/test/concepts/string-literal/toJS.spec.ts +2 -2
  791. package/test/concepts/string-literal/toVue.spec.ts +2 -2
  792. package/test/concepts/utils.ts +2 -2
  793. package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +3 -3
  794. package/test/concepts/validation-rule/toJS.spec.ts +2 -2
  795. package/test/concepts/validation-rule/validation-rule.spec.ts +3 -3
  796. package/test/concepts/view-element/toEmbeddedTS.spec.ts +3 -3
  797. package/test/concepts/view-element/toVue.spec.ts +2 -2
  798. package/test/time-slicing/runner.spec.ts +5 -1
  799. package/test/time-slicing/time-slicing-nodejs.spec.ts +1 -1
  800. package/test/time-slicing/wrapper.spec.ts +1 -1
  801. package/tsconfig.json +2 -1
@@ -1,2269 +1,2288 @@
1
1
  import Namespace from '../../Namespace__';
2
- import Param from '../../Param__';
3
- import Return from '../../Return__';
4
- import Logic from '../../Logic__';
5
- import Function from '../../Function__';
6
- import TypeAnnotation from '../../TypeAnnotation__';
7
- import TypeParam from '../../TypeParam__';
8
- import NumericLiteral from '../../NumericLiteral__';
9
- import Identifier from '../../Identifier__';
10
- import BooleanLiteral from '../../BooleanLiteral__';
11
- import StringLiteral from '../../StringLiteral__';
12
- import AnonymousFunction from '../../AnonymousFunction__';
13
- import StringInterpolation from '../../StringInterpolation__';
14
- import NewList from '../../NewList__';
15
- import DefaultValue from '../../DefaultValue__';
16
2
  import { TIMEZONES } from './timeZone';
3
+ import { getConceptConstructor } from '../../../decorators';
17
4
 
18
- export const createTimezoneParam = (fnName : string) => new Param({
5
+ export const createTimezoneParam = (fnName: string) => {
6
+ const Param = getConceptConstructor('Param');
7
+ const StringLiteral = getConceptConstructor('StringLiteral');
8
+
9
+ return new Param({
19
10
  name: '时区',
20
11
  description: '以此时区为基准',
21
12
  useComponent: { type: 's-bidirectional-bind-switch' },
22
13
  defaultExpression: new StringLiteral({
23
- name: `${fnName}TimeZoneDefaultExpression`,
24
- value: 'global'
14
+ name: `${fnName}TimeZoneDefaultExpression`,
15
+ value: 'global'
25
16
  }),
26
17
  options: TIMEZONES,
27
18
  hidden: true,
28
- })
19
+ });
20
+ }
29
21
 
30
- export default new Namespace({
31
- name: 'util',
32
- logics: [
33
- new Logic({
34
- name: 'consoleLog',
35
- params: [
36
- new Param({
37
- name: 'arg',
38
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
39
- defaultExpression: new StringInterpolation(),
40
- }),
41
- ],
42
- }),
43
- new Logic({
44
- name: 'jsonSerialize',
45
- params: [
46
- new Param({
47
- name: 'arg',
48
- }),
49
- ],
50
- returns: [
51
- new Return({
52
- name: 'result',
53
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
54
- }),
55
- ],
56
- }),
57
- new Logic({
58
- name: 'jsonDeserialize',
59
- typeParams: [
60
- new TypeParam({
61
- name: 'T',
62
- }),
63
- ],
64
- params: [
65
- new Param({
66
- name: 'arg',
67
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
68
- }),
69
- ],
70
- returns: [
71
- new Return({
72
- name: 'result',
73
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
74
- useComponent: { type: 's-datatype-select' },
75
- }),
76
- ],
77
- }),
78
- ],
79
- functions: [
80
- new Function({
81
- name: 'Convert',
82
- description: '各基础数据类型之间转换',
83
- typeParams: [
84
- new TypeParam({
85
- name: 'T',
86
- }),
87
- ],
88
- params: [
89
- new Param({
90
- name: 'value',
91
- description: '选择变量或常量',
92
- defaultExpression: new Identifier(),
93
- }),
94
- ],
95
- returns: [
96
- new Return({
97
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
98
- }),
99
- ],
100
- }),
101
- new Function({
102
- name: 'ToString',
103
- description: '各类型转换成字符串',
104
- params: [
105
- new Param({
106
- name: 'value',
107
- description: '待转成字符串的表达式',
108
- typeAnnotation: TypeAnnotation.createPrimitive('Any'),
109
- }),
110
- ],
111
- returns: [
112
- new Return({
113
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
114
- }),
115
- ],
116
- }),
117
- new Function({
118
- name: 'FromString',
119
- description: '字符串转换成其他类型',
120
- typeParams: [
121
- new TypeParam({
122
- name: 'T',
123
- }),
124
- ],
125
- params: [
126
- new Param({
127
- name: 'value',
128
- defaultExpression: new Identifier(),
129
- }),
130
- ],
131
- returns: [
132
- new Return({
133
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
134
- }),
135
- ],
136
- }),
22
+ const utilNamespace = new Namespace({
23
+ name: 'util',
24
+ logics: [],
25
+ functions: [],
26
+ });
137
27
 
138
- new Function({
139
- name: 'IndexOf',
140
- description: '搜索字符串位置',
141
- params: [
142
- new Param({
143
- name: 'str',
144
- description: '指定字符串',
145
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
146
- }),
147
- new Param({
148
- name: 'search',
149
- description: '指定需要搜索的字段,String类型',
150
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
151
- }),
152
- new Param({
153
- name: 'fromIndex',
154
- description: '开始搜索的索引值,Integer类型,用数字表示第几项,项数索引从0开始',
155
- defaultExpression: new NumericLiteral({ value: '0' }),
156
- }),
28
+ export default utilNamespace;
157
29
 
158
- new Param({
159
- name: 'ignoreCase',
160
- description: '是否忽略大小写,true为忽略,false为不忽略',
161
- defaultExpression: new BooleanLiteral({ value: 'true' }),
162
- options: [
163
- {
164
- text: 'true',
165
- value: 'true',
166
- description: '忽略大小写',
167
- },
168
- {
169
- text: 'false',
170
- value: 'false',
171
- description: '对大小写敏感',
172
- },
173
- ],
174
- }),
175
- ],
176
- returns: [
177
- new Return({
178
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
179
- }),
180
- ],
181
- }),
182
- new Function({
183
- name: 'LastIndexOf',
184
- description: '从末尾搜索字符串位置',
185
- params: [
186
- new Param({
187
- name: 'str',
188
- description: '指定字符串',
189
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
190
- }),
191
- new Param({
192
- name: 'search',
193
- description: '指定需要搜索的字段,String类型',
194
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
195
- }),
196
- new Param({
197
- name: 'ignoreCase',
198
- description: '是否忽略大小写,true为忽略,false为不忽略',
199
- defaultExpression: new BooleanLiteral({ value: 'true' }),
200
- options: [
201
- {
202
- text: 'true',
203
- value: 'true',
204
- description: '忽略大小写',
205
- },
206
- {
207
- text: 'false',
208
- value: 'false',
209
- description: '对大小写敏感',
210
- },
211
- ],
212
- }),
213
- ],
214
- returns: [
215
- new Return({
216
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
217
- }),
218
- ],
219
- }),
220
- new Function({
221
- name: 'Replace',
222
- description: '字符串替换。返回替换后的新字符串。',
223
- params: [
224
- new Param({
225
- name: 'str',
226
- description: '指定原始字符串',
227
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
228
- }),
229
- new Param({
230
- name: 'search',
231
- description: '指定原始字符串中需要被替换的字符串',
232
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
233
- }),
234
- new Param({
235
- name: 'replace',
236
- description: '指定进行替换操作的字符串',
237
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
238
- }),
239
- ],
240
- returns: [
241
- new Return({
242
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
243
- }),
244
- ],
245
- }),
246
- new Function({
247
- name: 'SubString',
248
- description: '字符串截取。返回截取的字符串。',
249
- params: [
250
- new Param({
251
- name: 'str',
252
- description: '指定需要截取的字符串',
253
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
254
- }),
255
- new Param({
256
- name: 'start',
257
- description: 'int类型,输入数字指定开始截取的位置',
258
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
259
- }),
260
- new Param({
261
- name: 'length',
262
- description: '指定截取的字符串长度',
263
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
264
- }),
265
- ],
266
- returns: [
267
- new Return({
268
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
269
- }),
270
- ],
271
- }),
272
- new Function({
273
- name: 'EnumToList',
274
- description: '返回枚举value和text的List集合',
275
- typeParams: [
276
- new TypeParam({
277
- name: 'enum',
278
- useComponent: { type: 's-enum-select' },
279
- }),
280
- ],
281
- returns: [
282
- new Return({
283
- typeAnnotation: TypeAnnotation.createGeneric('List', {
284
- typeArguments: [TypeAnnotation.createPrimitive('String')],
285
- }),
286
- }),
287
- ],
288
- }),
289
- new Function({
290
- name: 'EnumValueToText',
291
- description: '返回枚举指定value的标题字符串',
292
- typeParams: [
293
- new TypeParam({
294
- name: 'enum',
295
- useComponent: { type: 's-enum-select' },
296
- }),
297
- ],
298
- params: [
299
- new Param({
300
- name: 'value',
301
- description: '指定需要将枚举值转换为标题的字段',
302
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
303
- }),
304
- ],
305
- returns: [
306
- new Return({
307
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
308
- }),
309
- ],
310
- }),
311
- new Function({
312
- name: 'StringToEnumValue',
313
- description: '在指定enum中找到与参数str相同的枚举值并返回。',
314
- typeParams: [
315
- new TypeParam({
316
- name: 'enum',
317
- useComponent: { type: 's-enum-select' },
318
- }),
319
- ],
320
- params: [
321
- new Param({
322
- name: 'value',
323
- description: '指定一个字符串',
324
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
325
- }),
326
- ],
327
- returns: [
328
- new Return({
329
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
330
- }),
331
- ],
332
- }),
333
- new Function({
334
- name: 'Split',
335
- description: '将字符串参数,用分割符分割成字符串列表,并返回',
336
- params: [
337
- new Param({
338
- name: 'str',
339
- description: '指定字符串',
340
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
341
- }),
342
- new Param({
343
- name: 'separator',
344
- description: '指定字符串中作为分隔符的参数',
345
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
346
- }),
347
- ],
348
- returns: [
349
- new Return({
350
- typeAnnotation: TypeAnnotation.createGeneric('List', {
351
- typeArguments: [TypeAnnotation.createPrimitive('String')],
352
- }),
353
- }),
354
- ],
355
- }),
356
- new Function({
357
- name: 'Join',
358
- description: '将列表的项,用连接符连接成一个字符串,并返回',
359
- params: [
360
- new Param({
361
- name: 'list',
362
- description: '指定列表',
363
- typeAnnotation: TypeAnnotation.createGeneric('List', {
364
- typeArguments: [TypeAnnotation.createPrimitive('String')],
365
- }),
366
- }),
367
- new Param({
368
- name: 'separator',
369
- description: '连接符,用于连接列表中的项',
370
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
371
- }),
372
- ],
373
- returns: [
374
- new Return({
375
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
376
- }),
377
- ],
378
- }),
379
- new Function({
380
- name: 'Length',
381
- description: '返回String或Map或List的长度',
382
- params: [
383
- new Param({
384
- name: 'param',
385
- description: '指定字符串',
386
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
387
- }),
388
- ],
389
- returns: [
390
- new Return({
391
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
392
- }),
393
- ],
394
- }),
395
- new Function({
396
- name: 'ToLower',
397
- description: '返回全部小写的字符串',
398
- params: [
399
- new Param({
400
- name: 'str1',
401
- description: '指定字符串',
402
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
403
- }),
404
- ],
405
- returns: [
406
- new Return({
407
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
408
- }),
409
- ],
410
- }),
411
- new Function({
412
- name: 'ToUpper',
413
- description: '返回全部大写的字符串',
414
- params: [
415
- new Param({
416
- name: 'str1',
417
- description: '指定字符串',
418
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
419
- }),
420
- ],
421
- returns: [
422
- new Return({
423
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
424
- }),
425
- ],
426
- }),
427
- new Function({
428
- name: 'Trim',
429
- description: '删除字符串的前后空格。返回裁剪后的新字符串。',
430
- params: [
431
- new Param({
432
- name: 'str1',
433
- description: '指定字符串',
434
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
435
- }),
436
- ],
437
- returns: [
438
- new Return({
439
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
440
- }),
441
- ],
442
- }),
443
- new Function({
444
- name: 'Get',
445
- description: '获得列表位于指定索引处的项',
446
- params: [
447
- new Param({
448
- name: 'list',
449
- description: '指定列表',
450
- typeAnnotation: TypeAnnotation.createGeneric('List', {
451
- typeArguments: [TypeAnnotation.createTypeParam('T')],
452
- }),
453
- }),
454
- new Param({
455
- name: 'index',
456
- description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
457
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
458
- }),
459
- ],
460
- returns: [
461
- new Return({
462
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
463
- }),
464
- ],
465
- }),
466
- new Function({
467
- name: 'Set',
468
- description: '(修改原数据)为列表的指定索引项赋值(覆盖原索引项)',
469
- params: [
470
- new Param({
471
- name: 'list',
472
- description: '指定列表',
473
- typeAnnotation: TypeAnnotation.createGeneric('List', {
474
- typeArguments: [TypeAnnotation.createTypeParam('T')],
475
- }),
476
- }),
477
- new Param({
478
- name: 'index',
479
- description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
480
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
481
- }),
482
- new Param({
483
- name: 'item',
484
- description: '列表指定索引下的新项',
485
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
486
- }),
487
- ],
488
- returns: [
489
- new Return({
490
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
491
- }),
492
- ],
493
- }),
494
- new Function({
495
- name: 'Contains',
496
- description: '测试列表是否包含某一项,返回测试结果',
497
- params: [
498
- new Param({
499
- name: 'list',
500
- description: '指定列表',
501
- typeAnnotation: TypeAnnotation.createGeneric('List', {
502
- typeArguments: [TypeAnnotation.createTypeParam('T')],
503
- }),
504
- }),
505
- new Param({
506
- name: 'item',
507
- description: '指定项',
508
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
509
- }),
510
- ],
511
- returns: [
512
- new Return({
513
- typeAnnotation: TypeAnnotation.createTypeParam('Boolean'),
514
- }),
515
- ],
516
- }),
517
- new Function({
518
- name: 'Add',
519
- description: '(修改原数据)在列表末尾追加项。',
520
- params: [
521
- new Param({
522
- name: 'list',
523
- description: '指定列表',
524
- typeAnnotation: TypeAnnotation.createGeneric('List', {
525
- typeArguments: [TypeAnnotation.createTypeParam('T')],
526
- }),
527
- }),
528
- new Param({
529
- name: 'item',
530
- description: '指定需要在列表末尾增加的项',
531
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
532
- }),
533
- ],
534
- }),
535
- new Function({
536
- name: 'AddAll',
537
- description: '(修改原数据)为一个列表添加另一列表中的多项内容。返回新列表的长度',
538
- params: [
539
- new Param({
540
- name: 'list',
541
- description: '指定列表1',
542
- typeAnnotation: TypeAnnotation.createGeneric('List', {
543
- typeArguments: [TypeAnnotation.createTypeParam('T')],
544
- }),
545
- }),
546
- new Param({
547
- name: 'addList',
548
- description: '指定列表2',
549
- typeAnnotation: TypeAnnotation.createGeneric('List', {
550
- typeArguments: [TypeAnnotation.createTypeParam('T')],
551
- }),
552
- }),
553
- ],
554
- returns: [
555
- new Return({
556
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
557
- }),
558
- ],
559
- }),
560
- new Function({
561
- name: 'Insert',
562
- description: '(修改原数据)在列表的指定索引处插入新项(原索引项依次后推)',
563
- params: [
564
- new Param({
565
- name: 'list',
566
- description: '指定列表',
567
- typeAnnotation: TypeAnnotation.createGeneric('List', {
568
- typeArguments: [TypeAnnotation.createTypeParam('T')],
569
- }),
570
- }),
571
- new Param({
572
- name: 'index',
573
- description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
574
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
575
- }),
576
- new Param({
577
- name: 'item',
578
- description: '待插入项',
579
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
580
- }),
581
- ],
30
+ /** @internal */
31
+ export function initialize() {
32
+ const TypeAnnotation = getConceptConstructor('TypeAnnotation');
33
+ const Logic = getConceptConstructor('Logic');
34
+ const Param = getConceptConstructor('Param');
35
+ const Return = getConceptConstructor('Return');
36
+ const Function = getConceptConstructor('Function');
37
+ const AnonymousFunction = getConceptConstructor('AnonymousFunction');
38
+ const StringInterpolation = getConceptConstructor('StringInterpolation');
39
+ const TypeParam = getConceptConstructor('TypeParam');
40
+ const Identifier = getConceptConstructor('Identifier');
41
+ const BooleanLiteral = getConceptConstructor('BooleanLiteral');
42
+ const NumericLiteral = getConceptConstructor('NumericLiteral');
43
+ const StringLiteral = getConceptConstructor('StringLiteral');
44
+ const NewList = getConceptConstructor('NewList');
45
+ const DefaultValue = getConceptConstructor('DefaultValue');
46
+
47
+ const logics = [
48
+ new Logic({
49
+ name: 'consoleLog',
50
+ params: [
51
+ new Param({
52
+ name: 'arg',
53
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
54
+ defaultExpression: new StringInterpolation(),
55
+ }),
56
+ ],
57
+ }),
58
+ new Logic({
59
+ name: 'jsonSerialize',
60
+ params: [
61
+ new Param({
62
+ name: 'arg',
63
+ }),
64
+ ],
65
+ returns: [
66
+ new Return({
67
+ name: 'result',
68
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
69
+ }),
70
+ ],
71
+ }),
72
+ new Logic({
73
+ name: 'jsonDeserialize',
74
+ typeParams: [
75
+ new TypeParam({
76
+ name: 'T',
77
+ }),
78
+ ],
79
+ params: [
80
+ new Param({
81
+ name: 'arg',
82
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
83
+ }),
84
+ ],
85
+ returns: [
86
+ new Return({
87
+ name: 'result',
88
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
89
+ useComponent: { type: 's-datatype-select' },
90
+ }),
91
+ ],
92
+ }),
93
+ ];
94
+
95
+ const functions = [
96
+
97
+ new Function({
98
+ name: 'Convert',
99
+ description: '各基础数据类型之间转换',
100
+ typeParams: [
101
+ new TypeParam({
102
+ name: 'T',
103
+ }),
104
+ ],
105
+ params: [
106
+ new Param({
107
+ name: 'value',
108
+ description: '选择变量或常量',
109
+ defaultExpression: new Identifier(),
110
+ }),
111
+ ],
112
+ returns: [
113
+ new Return({
114
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
115
+ }),
116
+ ],
117
+ }),
118
+ new Function({
119
+ name: 'ToString',
120
+ description: '各类型转换成字符串',
121
+ params: [
122
+ new Param({
123
+ name: 'value',
124
+ description: '待转成字符串的表达式',
125
+ typeAnnotation: TypeAnnotation.createPrimitive('Any'),
126
+ }),
127
+ ],
128
+ returns: [
129
+ new Return({
130
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
131
+ }),
132
+ ],
133
+ }),
134
+ new Function({
135
+ name: 'FromString',
136
+ description: '字符串转换成其他类型',
137
+ typeParams: [
138
+ new TypeParam({
139
+ name: 'T',
140
+ }),
141
+ ],
142
+ params: [
143
+ new Param({
144
+ name: 'value',
145
+ defaultExpression: new Identifier(),
146
+ }),
147
+ ],
148
+ returns: [
149
+ new Return({
150
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
151
+ }),
152
+ ],
153
+ }),
154
+ new Function({
155
+ name: 'IndexOf',
156
+ description: '搜索字符串位置',
157
+ params: [
158
+ new Param({
159
+ name: 'str',
160
+ description: '指定字符串',
161
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
162
+ }),
163
+ new Param({
164
+ name: 'search',
165
+ description: '指定需要搜索的字段,String类型',
166
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
167
+ }),
168
+ new Param({
169
+ name: 'fromIndex',
170
+ description: '开始搜索的索引值,Integer类型,用数字表示第几项,项数索引从0开始',
171
+ defaultExpression: new NumericLiteral({ value: '0' }),
582
172
  }),
583
- new Function({
584
- name: 'Remove',
585
- description: '(修改原数据)删除列表的某项',
586
- params: [
587
- new Param({
588
- name: 'list',
589
- description: '指定列表',
590
- typeAnnotation: TypeAnnotation.createGeneric('List', {
591
- typeArguments: [TypeAnnotation.createTypeParam('T')],
592
- }),
593
- }),
594
- new Param({
173
+
174
+ new Param({
175
+ name: 'ignoreCase',
176
+ description: '是否忽略大小写,true为忽略,false为不忽略',
177
+ defaultExpression: new BooleanLiteral({ value: 'true' }),
178
+ options: [
179
+ {
180
+ text: 'true',
181
+ value: 'true',
182
+ description: '忽略大小写',
183
+ },
184
+ {
185
+ text: 'false',
186
+ value: 'false',
187
+ description: '对大小写敏感',
188
+ },
189
+ ],
190
+ }),
191
+ ],
192
+ returns: [
193
+ new Return({
194
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
195
+ }),
196
+ ],
197
+ }),
198
+ new Function({
199
+ name: 'LastIndexOf',
200
+ description: '从末尾搜索字符串位置',
201
+ params: [
202
+ new Param({
203
+ name: 'str',
204
+ description: '指定字符串',
205
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
206
+ }),
207
+ new Param({
208
+ name: 'search',
209
+ description: '指定需要搜索的字段,String类型',
210
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
211
+ }),
212
+ new Param({
213
+ name: 'ignoreCase',
214
+ description: '是否忽略大小写,true为忽略,false为不忽略',
215
+ defaultExpression: new BooleanLiteral({ value: 'true' }),
216
+ options: [
217
+ {
218
+ text: 'true',
219
+ value: 'true',
220
+ description: '忽略大小写',
221
+ },
222
+ {
223
+ text: 'false',
224
+ value: 'false',
225
+ description: '对大小写敏感',
226
+ },
227
+ ],
228
+ }),
229
+ ],
230
+ returns: [
231
+ new Return({
232
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
233
+ }),
234
+ ],
235
+ }),
236
+ new Function({
237
+ name: 'Replace',
238
+ description: '字符串替换。返回替换后的新字符串。',
239
+ params: [
240
+ new Param({
241
+ name: 'str',
242
+ description: '指定原始字符串',
243
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
244
+ }),
245
+ new Param({
246
+ name: 'search',
247
+ description: '指定原始字符串中需要被替换的字符串',
248
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
249
+ }),
250
+ new Param({
251
+ name: 'replace',
252
+ description: '指定进行替换操作的字符串',
253
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
254
+ }),
255
+ ],
256
+ returns: [
257
+ new Return({
258
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
259
+ }),
260
+ ],
261
+ }),
262
+ new Function({
263
+ name: 'SubString',
264
+ description: '字符串截取。返回截取的字符串。',
265
+ params: [
266
+ new Param({
267
+ name: 'str',
268
+ description: '指定需要截取的字符串',
269
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
270
+ }),
271
+ new Param({
272
+ name: 'start',
273
+ description: 'int类型,输入数字指定开始截取的位置',
274
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
275
+ }),
276
+ new Param({
277
+ name: 'length',
278
+ description: '指定截取的字符串长度',
279
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
280
+ }),
281
+ ],
282
+ returns: [
283
+ new Return({
284
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
285
+ }),
286
+ ],
287
+ }),
288
+ new Function({
289
+ name: 'EnumToList',
290
+ description: '返回枚举value和text的List集合',
291
+ typeParams: [
292
+ new TypeParam({
293
+ name: 'enum',
294
+ useComponent: { type: 's-enum-select' },
295
+ }),
296
+ ],
297
+ returns: [
298
+ new Return({
299
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
300
+ typeArguments: [TypeAnnotation.createPrimitive('String')],
301
+ }),
302
+ }),
303
+ ],
304
+ }),
305
+ new Function({
306
+ name: 'EnumValueToText',
307
+ description: '返回枚举指定value的标题字符串',
308
+ typeParams: [
309
+ new TypeParam({
310
+ name: 'enum',
311
+ useComponent: { type: 's-enum-select' },
312
+ }),
313
+ ],
314
+ params: [
315
+ new Param({
316
+ name: 'value',
317
+ description: '指定需要将枚举值转换为标题的字段',
318
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
319
+ }),
320
+ ],
321
+ returns: [
322
+ new Return({
323
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
324
+ }),
325
+ ],
326
+ }),
327
+ new Function({
328
+ name: 'StringToEnumValue',
329
+ description: '在指定enum中找到与参数str相同的枚举值并返回。',
330
+ typeParams: [
331
+ new TypeParam({
332
+ name: 'enum',
333
+ useComponent: { type: 's-enum-select' },
334
+ }),
335
+ ],
336
+ params: [
337
+ new Param({
338
+ name: 'value',
339
+ description: '指定一个字符串',
340
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
341
+ }),
342
+ ],
343
+ returns: [
344
+ new Return({
345
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
346
+ }),
347
+ ],
348
+ }),
349
+ new Function({
350
+ name: 'Split',
351
+ description: '将字符串参数,用分割符分割成字符串列表,并返回',
352
+ params: [
353
+ new Param({
354
+ name: 'str',
355
+ description: '指定字符串',
356
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
357
+ }),
358
+ new Param({
359
+ name: 'separator',
360
+ description: '指定字符串中作为分隔符的参数',
361
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
362
+ }),
363
+ ],
364
+ returns: [
365
+ new Return({
366
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
367
+ typeArguments: [TypeAnnotation.createPrimitive('String')],
368
+ }),
369
+ }),
370
+ ],
371
+ }),
372
+ new Function({
373
+ name: 'Join',
374
+ description: '将列表的项,用连接符连接成一个字符串,并返回',
375
+ params: [
376
+ new Param({
377
+ name: 'list',
378
+ description: '指定列表',
379
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
380
+ typeArguments: [TypeAnnotation.createPrimitive('String')],
381
+ }),
382
+ }),
383
+ new Param({
384
+ name: 'separator',
385
+ description: '连接符,用于连接列表中的项',
386
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
387
+ }),
388
+ ],
389
+ returns: [
390
+ new Return({
391
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
392
+ }),
393
+ ],
394
+ }),
395
+ new Function({
396
+ name: 'Length',
397
+ description: '返回String或Map或List的长度',
398
+ params: [
399
+ new Param({
400
+ name: 'param',
401
+ description: '指定字符串',
402
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
403
+ }),
404
+ ],
405
+ returns: [
406
+ new Return({
407
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
408
+ }),
409
+ ],
410
+ }),
411
+ new Function({
412
+ name: 'ToLower',
413
+ description: '返回全部小写的字符串',
414
+ params: [
415
+ new Param({
416
+ name: 'str1',
417
+ description: '指定字符串',
418
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
419
+ }),
420
+ ],
421
+ returns: [
422
+ new Return({
423
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
424
+ }),
425
+ ],
426
+ }),
427
+ new Function({
428
+ name: 'ToUpper',
429
+ description: '返回全部大写的字符串',
430
+ params: [
431
+ new Param({
432
+ name: 'str1',
433
+ description: '指定字符串',
434
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
435
+ }),
436
+ ],
437
+ returns: [
438
+ new Return({
439
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
440
+ }),
441
+ ],
442
+ }),
443
+ new Function({
444
+ name: 'Trim',
445
+ description: '删除字符串的前后空格。返回裁剪后的新字符串。',
446
+ params: [
447
+ new Param({
448
+ name: 'str1',
449
+ description: '指定字符串',
450
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
451
+ }),
452
+ ],
453
+ returns: [
454
+ new Return({
455
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
456
+ }),
457
+ ],
458
+ }),
459
+ new Function({
460
+ name: 'Get',
461
+ description: '获得列表位于指定索引处的项',
462
+ params: [
463
+ new Param({
464
+ name: 'list',
465
+ description: '指定列表',
466
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
467
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
468
+ }),
469
+ }),
470
+ new Param({
471
+ name: 'index',
472
+ description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
473
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
474
+ }),
475
+ ],
476
+ returns: [
477
+ new Return({
478
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
479
+ }),
480
+ ],
481
+ }),
482
+ new Function({
483
+ name: 'Set',
484
+ description: '(修改原数据)为列表的指定索引项赋值(覆盖原索引项)',
485
+ params: [
486
+ new Param({
487
+ name: 'list',
488
+ description: '指定列表',
489
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
490
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
491
+ }),
492
+ }),
493
+ new Param({
494
+ name: 'index',
495
+ description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
496
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
497
+ }),
498
+ new Param({
499
+ name: 'item',
500
+ description: '列表指定索引下的新项',
501
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
502
+ }),
503
+ ],
504
+ returns: [
505
+ new Return({
506
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
507
+ }),
508
+ ],
509
+ }),
510
+ new Function({
511
+ name: 'Contains',
512
+ description: '测试列表是否包含某一项,返回测试结果',
513
+ params: [
514
+ new Param({
515
+ name: 'list',
516
+ description: '指定列表',
517
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
518
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
519
+ }),
520
+ }),
521
+ new Param({
522
+ name: 'item',
523
+ description: '指定项',
524
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
525
+ }),
526
+ ],
527
+ returns: [
528
+ new Return({
529
+ typeAnnotation: TypeAnnotation.createTypeParam('Boolean'),
530
+ }),
531
+ ],
532
+ }),
533
+ new Function({
534
+ name: 'Add',
535
+ description: '(修改原数据)在列表末尾追加项。',
536
+ params: [
537
+ new Param({
538
+ name: 'list',
539
+ description: '指定列表',
540
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
541
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
542
+ }),
543
+ }),
544
+ new Param({
545
+ name: 'item',
546
+ description: '指定需要在列表末尾增加的项',
547
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
548
+ }),
549
+ ],
550
+ }),
551
+ new Function({
552
+ name: 'AddAll',
553
+ description: '(修改原数据)为一个列表添加另一列表中的多项内容。返回新列表的长度',
554
+ params: [
555
+ new Param({
556
+ name: 'list',
557
+ description: '指定列表1',
558
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
559
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
560
+ }),
561
+ }),
562
+ new Param({
563
+ name: 'addList',
564
+ description: '指定列表2',
565
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
566
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
567
+ }),
568
+ }),
569
+ ],
570
+ returns: [
571
+ new Return({
572
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
573
+ }),
574
+ ],
575
+ }),
576
+ new Function({
577
+ name: 'Insert',
578
+ description: '(修改原数据)在列表的指定索引处插入新项(原索引项依次后推)',
579
+ params: [
580
+ new Param({
581
+ name: 'list',
582
+ description: '指定列表',
583
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
584
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
585
+ }),
586
+ }),
587
+ new Param({
588
+ name: 'index',
589
+ description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
590
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
591
+ }),
592
+ new Param({
593
+ name: 'item',
594
+ description: '待插入项',
595
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
596
+ }),
597
+ ],
598
+ }),
599
+ new Function({
600
+ name: 'Remove',
601
+ description: '(修改原数据)删除列表的某项',
602
+ params: [
603
+ new Param({
604
+ name: 'list',
605
+ description: '指定列表',
606
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
607
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
608
+ }),
609
+ }),
610
+ new Param({
611
+ name: 'item',
612
+ description: '指定项',
613
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
614
+ }),
615
+ ],
616
+ }),
617
+ new Function({
618
+ name: 'RemoveAt',
619
+ description: '(修改原数据)在列表中删除位于指定索引的项。返回被删除的项',
620
+ params: [
621
+ new Param({
622
+ name: 'list',
623
+ description: '指定列表',
624
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
625
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
626
+ }),
627
+ }),
628
+ new Param({
629
+ name: 'index',
630
+ description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
631
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
632
+ }),
633
+ ],
634
+ returns: [
635
+ new Return({
636
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
637
+ }),
638
+ ],
639
+ }),
640
+ new Function({
641
+ name: 'ListHead',
642
+ description: '返回列表的首项',
643
+ params: [
644
+ new Param({
645
+ name: 'list',
646
+ description: '指定列表',
647
+ }),
648
+ ],
649
+ returns: [
650
+ new Return({
651
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
652
+ }),
653
+ ],
654
+ }),
655
+ new Function({
656
+ name: 'ListLast',
657
+ description: '返回列表的末项',
658
+ params: [
659
+ new Param({
660
+ name: 'list',
661
+ description: '指定列表',
662
+ }),
663
+ ],
664
+ returns: [
665
+ new Return({
666
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
667
+ }),
668
+ ],
669
+ }),
670
+ new Function({
671
+ name: 'ListFlatten',
672
+ description: '将嵌套列表摊平一层并返回(List<List<T>> 变为 List<T>)',
673
+ params: [
674
+ new Param({
675
+ name: 'list',
676
+ description: '指定列表',
677
+ }),
678
+ ],
679
+ returns: [
680
+ new Return({
681
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
682
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
683
+ }),
684
+ }),
685
+ ],
686
+ }),
687
+ new Function({
688
+ name: 'ListToMap',
689
+ description: '选取列表项的某些属性,根据这些属性将列表变为 Map 并返回',
690
+ params: [
691
+ new Param({
692
+ name: 'list',
693
+ description: '指定列表',
694
+ }),
695
+ new Param({
696
+ name: 'by',
697
+ description: `根据项的属性及其本身进行key和value的定义`,
698
+ defaultExpression: new AnonymousFunction({
699
+ params: [
700
+ new Param({
701
+ name: 'item',
702
+ typeAnnotation: null,
703
+ }),
704
+ ],
705
+ body: new Identifier(),
706
+ }),
707
+ }),
708
+ new Param({
709
+ name: 'byVal',
710
+ defaultExpression: new AnonymousFunction({
711
+ params: [
712
+ new Param({
713
+ name: 'item',
714
+ typeAnnotation: null,
715
+ }),
716
+ ],
717
+ body: new Identifier(),
718
+ }),
719
+ }),
720
+ ],
721
+ }),
722
+ new Function({
723
+ name: 'ListTransform',
724
+ description: '对列表的每一项调用函数 by,得到新项;返回新项构成的列表',
725
+ params: [
726
+ new Param({
727
+ name: 'list',
728
+ description: '指定列表',
729
+ }),
730
+ new Param({
731
+ name: 'by',
732
+ description: '指定对列表中项的某个属性或项本身的处理方式,支持算数运算和比较运算',
733
+ defaultExpression: new AnonymousFunction({
734
+ params: [
735
+ new Param({
736
+ name: 'item',
737
+ typeAnnotation: null,
738
+ }),
739
+ ],
740
+ }),
741
+ }),
742
+ ],
743
+ returns: [
744
+ new Return({
745
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
746
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
747
+ }),
748
+ }),
749
+ ],
750
+ }),
751
+ new Function({
752
+ name: 'ListSum',
753
+ description: '返回数值列表中所有项的和',
754
+ params: [
755
+ new Param({
756
+ name: 'list',
757
+ description: '指定列表',
758
+ }),
759
+ ],
760
+ returns: [
761
+ new Return({
762
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
763
+ }),
764
+ ],
765
+ }),
766
+ new Function({
767
+ name: 'ListProduct',
768
+ description: '返回数值列表中所有项的积',
769
+ params: [
770
+ new Param({
771
+ name: 'list',
772
+ description: '指定数值类型列表',
773
+ }),
774
+ ],
775
+ returns: [
776
+ new Return({
777
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
778
+ }),
779
+ ],
780
+ }),
781
+ new Function({
782
+ name: 'ListAverage',
783
+ description: '返回数值列表中所有项的平均值',
784
+ params: [
785
+ new Param({
786
+ name: 'list',
787
+ description: '指定数值类型列表',
788
+ }),
789
+ ],
790
+ returns: [
791
+ new Return({
792
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
793
+ }),
794
+ ],
795
+ }),
796
+ new Function({
797
+ name: 'ListMax',
798
+ description: '返回数值列表中所有项的最大值',
799
+ params: [
800
+ new Param({
801
+ name: 'list',
802
+ description: '指定数值类型列表',
803
+ }),
804
+ ],
805
+ returns: [
806
+ new Return({
807
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
808
+ }),
809
+ ],
810
+ }),
811
+ new Function({
812
+ name: 'ListMin',
813
+ description: '返回数值列表中所有项的最小值',
814
+ params: [
815
+ new Param({
816
+ name: 'list',
817
+ description: '指定数值类型列表',
818
+ }),
819
+ ],
820
+ returns: [
821
+ new Return({
822
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
823
+ }),
824
+ ],
825
+ }),
826
+ new Function({
827
+ name: 'MapGet',
828
+ description: '查询出Map中key为指定值的value值列表',
829
+ params: [
830
+ new Param({
831
+ name: 'map',
832
+ description: '指定映射',
833
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
834
+ typeArguments: [
835
+ TypeAnnotation.createTypeParam('K'),
836
+ TypeAnnotation.createTypeParam('V'),
837
+ ],
838
+ }),
839
+ }),
840
+ new Param({
841
+ name: 'key',
842
+ description: '指定参数key',
843
+ typeAnnotation: TypeAnnotation.createTypeParam('K'),
844
+ }),
845
+ ],
846
+ returns: [
847
+ new Return({
848
+ typeAnnotation: TypeAnnotation.createTypeParam('V'),
849
+ }),
850
+ ],
851
+ }),
852
+ new Function({
853
+ name: 'MapPut',
854
+ description: '(修改原数据)为Map中添加键值对',
855
+ params: [
856
+ new Param({
857
+ name: 'map',
858
+ description: '指定映射',
859
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
860
+ typeArguments: [
861
+ TypeAnnotation.createTypeParam('K'),
862
+ TypeAnnotation.createTypeParam('V'),
863
+ ],
864
+ }),
865
+ }),
866
+ new Param({
867
+ name: 'key',
868
+ description: '指定参数key',
869
+ typeAnnotation: TypeAnnotation.createTypeParam('K'),
870
+ }),
871
+ new Param({
872
+ name: 'value',
873
+ description: '指定参数value',
874
+ typeAnnotation: TypeAnnotation.createTypeParam('V'),
875
+ }),
876
+ ],
877
+ }),
878
+ new Function({
879
+ name: 'MapRemove',
880
+ description: '(修改原数据)删除Map中的键值对',
881
+ params: [
882
+ new Param({
883
+ name: 'map',
884
+ description: '指定列表',
885
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
886
+ typeArguments: [
887
+ TypeAnnotation.createTypeParam('K'),
888
+ TypeAnnotation.createTypeParam('V'),
889
+ ],
890
+ }),
891
+ }),
892
+ new Param({
893
+ name: 'key',
894
+ description: '指定参数key',
895
+ typeAnnotation: TypeAnnotation.createTypeParam('K'),
896
+ }),
897
+ ],
898
+ }),
899
+ new Function({
900
+ name: 'MapContains',
901
+ description: '判断Map中是否存在参数指定的键值对',
902
+ params: [
903
+ new Param({
904
+ name: 'map',
905
+ description: '指定映射',
906
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
907
+ typeArguments: [
908
+ TypeAnnotation.createTypeParam('K'),
909
+ TypeAnnotation.createTypeParam('V'),
910
+ ],
911
+ }),
912
+ }),
913
+ new Param({
914
+ name: 'key',
915
+ description: '指定参数key',
916
+ typeAnnotation: TypeAnnotation.createTypeParam('K'),
917
+ }),
918
+ ],
919
+ returns: [
920
+ new Return({
921
+ typeAnnotation: TypeAnnotation.createTypeParam('Boolean'),
922
+ }),
923
+ ],
924
+ }),
925
+ new Function({
926
+ name: 'MapKeys',
927
+ description: '输出Map中key集合',
928
+ params: [
929
+ new Param({
930
+ name: 'map',
931
+ description: '指定映射',
932
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
933
+ typeArguments: [
934
+ TypeAnnotation.createTypeParam('K'),
935
+ TypeAnnotation.createTypeParam('V'),
936
+ ],
937
+ }),
938
+ }),
939
+ ],
940
+ returns: [
941
+ new Return({
942
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
943
+ typeArguments: [TypeAnnotation.createTypeParam('K')],
944
+ }),
945
+ }),
946
+ ],
947
+ }),
948
+ new Function({
949
+ name: 'MapValues',
950
+ description: '输出Map中value集合',
951
+ params: [
952
+ new Param({
953
+ name: 'map',
954
+ description: '指定映射',
955
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
956
+ typeArguments: [
957
+ TypeAnnotation.createTypeParam('K'),
958
+ TypeAnnotation.createTypeParam('V'),
959
+ ],
960
+ }),
961
+ }),
962
+ ],
963
+ returns: [
964
+ new Return({
965
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
966
+ typeArguments: [TypeAnnotation.createTypeParam('V')],
967
+ }),
968
+ }),
969
+ ],
970
+ }),
971
+ new Function({
972
+ name: 'MapFilter',
973
+ description: '在指定Map中过滤出符合条件参数的Map列表',
974
+ params: [
975
+ new Param({
976
+ name: 'map',
977
+ description: '指定映射',
978
+ }),
979
+ new Param({
980
+ name: 'by',
981
+ description: '针对键值对的参数key和value设置过滤条件,支持算数运算、比较运算和逻辑运算',
982
+ defaultExpression: new AnonymousFunction({
983
+ params: [
984
+ new Param({
985
+ name: 'key',
986
+ typeAnnotation: null,
987
+ }),
988
+ new Param({
989
+ name: 'value',
990
+ typeAnnotation: null,
991
+ }),
992
+ ],
993
+ }),
994
+ }),
995
+ ],
996
+ returns: [
997
+ new Return({
998
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
999
+ typeArguments: [
1000
+ TypeAnnotation.createTypeParam('K'),
1001
+ TypeAnnotation.createTypeParam('V'),
1002
+ ],
1003
+ }),
1004
+ }),
1005
+ ],
1006
+ }),
1007
+ new Function({
1008
+ name: 'MapTransform',
1009
+ description: '对 Map 的每一项调用函数 by,得到新项,并返回新项构成的 Map。(Map 的每一项从 (K0, V0) 变为 (K, V)。)',
1010
+ params: [
1011
+ new Param({
1012
+ name: 'map',
1013
+ description: '指定映射',
1014
+ }),
1015
+ new Param({
1016
+ name: 'by',
1017
+ description: `指定映射中键值对的参数处理方式,支持算数运算和比较运算`,
1018
+ defaultExpression: new AnonymousFunction({
1019
+ params: [
1020
+ new Param({
1021
+ name: 'key',
1022
+ typeAnnotation: null,
1023
+ }),
1024
+ new Param({
1025
+ name: 'value',
1026
+ typeAnnotation: null,
1027
+ }),
1028
+ ],
1029
+ body: new Identifier({
1030
+ name: 'key',
1031
+ }),
1032
+ }),
1033
+ }),
1034
+ new Param({
1035
+ name: 'byVal',
1036
+ defaultExpression: new AnonymousFunction({
1037
+ params: [
1038
+ new Param({
1039
+ name: 'key',
1040
+ typeAnnotation: null,
1041
+ }),
1042
+ new Param({
1043
+ name: 'value',
1044
+ typeAnnotation: null,
1045
+ }),
1046
+ ],
1047
+ }),
1048
+ }),
1049
+ ],
1050
+ returns: [
1051
+ new Return({
1052
+ typeAnnotation: TypeAnnotation.createGeneric('Map', {
1053
+ typeArguments: [TypeAnnotation.createTypeParam('K'), TypeAnnotation.createTypeParam('V')],
1054
+ }),
1055
+ }),
1056
+ ],
1057
+ }),
1058
+ new Function({
1059
+ name: 'CurrDate',
1060
+ description: '返回指定时区的当前日期',
1061
+ params: [],
1062
+ returns: [
1063
+ new Return({
1064
+ typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1065
+ }),
1066
+ ],
1067
+ }),
1068
+ new Function({
1069
+ name: 'CurrTime',
1070
+ description: '返回指定时区的当前时间',
1071
+ params: [],
1072
+ returns: [
1073
+ new Return({
1074
+ typeAnnotation: TypeAnnotation.createTypeParam('Time'),
1075
+ }),
1076
+ ],
1077
+ }),
1078
+ new Function({
1079
+ name: 'CurrDateTime',
1080
+ description: '返回指定时区的当前日期时间',
1081
+ params: [],
1082
+ returns: [
1083
+ new Return({
1084
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1085
+ }),
1086
+ ],
1087
+ }),
1088
+ new Function({
1089
+ name: 'FormatDate',
1090
+ description: '返回格式化日期字符串',
1091
+ params: [
1092
+ new Param({
1093
+ name: 'date',
1094
+ description: '指定需要格式化日期的字段',
1095
+ typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1096
+ }),
1097
+ new Param({
1098
+ name: 'formatter',
1099
+ description: '格式化规则,默认为yyyy-MM-dd,即年月日格式',
1100
+ defaultValue: new DefaultValue({
1101
+ expression: new StringLiteral({ value: 'yyyy-MM-dd' }),
1102
+ concept: 'DefaultValue',
1103
+ }),
1104
+ defaultExpression: new StringLiteral({ value: 'yyyy-MM-dd' }),
1105
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1106
+ })
1107
+ ],
1108
+ returns: [
1109
+ new Return({
1110
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1111
+ }),
1112
+ ],
1113
+ }),
1114
+ new Function({
1115
+ name: 'FormatDateTime',
1116
+ description: '返回格式化日期时间字符串。当输入为 DateTime 类型时,会把数据转到目标时区的当地时间进行格式化。',
1117
+ params: [
1118
+ new Param({
1119
+ name: 'date',
1120
+ description: '指定需要格式化日期时间的字段',
1121
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1122
+ }),
1123
+ new Param({
1124
+ name: 'formatter',
1125
+ description: '格式化规则,默认为yyyy-MM-dd',
1126
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1127
+ defaultValue: new DefaultValue({
1128
+ expression: new StringLiteral({ value: 'yyyy-MM-dd HH:mm:ss' }),
1129
+ concept: 'DefaultValue',
1130
+ }),
1131
+ defaultExpression: new StringLiteral({ value: 'yyyy-MM-dd HH:mm:ss' }),
1132
+ }),
1133
+ ],
1134
+ returns: [
1135
+ new Return({
1136
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1137
+ }),
1138
+ ],
1139
+ }),
1140
+ new Function({
1141
+ name: 'FormatNumber',
1142
+ description: '返回格式化的数字字符串',
1143
+ params: [
1144
+ new Param({
1145
+ name: 'value',
1146
+ description: '指定需要格式化小数位数的字段',
1147
+ typeAnnotation: TypeAnnotation.createPrimitive('Decimal'),
1148
+ defaultExpression: new Identifier(),
1149
+ }),
1150
+ new Param({
1151
+ name: 'digits',
1152
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1153
+ description: '保留小数位数',
1154
+ defaultValue: new DefaultValue({
1155
+ expression: new NumericLiteral({ value: '2' }),
1156
+ concept: 'DefaultValue',
1157
+ }),
1158
+ defaultExpression: new NumericLiteral({ value: '2' }),
1159
+ }),
1160
+ new Param({
1161
+ name: 'showGroups',
1162
+ description: '是否显示千分位:true显示,false不显示',
1163
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1164
+ defaultValue: new DefaultValue({
1165
+ expression: new BooleanLiteral({ value: 'false' }),
1166
+ concept: 'DefaultValue',
1167
+ }),
1168
+ defaultExpression: new BooleanLiteral({ value: 'false' }),
1169
+ options: [
1170
+ {
1171
+ text: 'true',
1172
+ value: 'true',
1173
+ description: '显示千分位',
1174
+ },
1175
+ {
1176
+ text: 'false',
1177
+ value: 'false',
1178
+ description: '不显示千分位',
1179
+ },
1180
+ ],
1181
+ }),
1182
+ ],
1183
+ returns: [
1184
+ new Return({
1185
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1186
+ }),
1187
+ ],
1188
+ }),
1189
+ new Function({
1190
+ name: 'AddDays',
1191
+ description: '返回日期天数加法计算结果',
1192
+ params: [
1193
+ new Param({
1194
+ name: 'dateTime',
1195
+ description: '指定日期时间',
1196
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1197
+ }),
1198
+ new Param({
1199
+ name: 'amount',
1200
+ description: '增加的天数',
1201
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1202
+ }),
1203
+ ],
1204
+ returns: [
1205
+ new Return({
1206
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1207
+ }),
1208
+ ],
1209
+ }),
1210
+ new Function({
1211
+ name: 'AddMonths',
1212
+ description: '返回月份加法计算结果',
1213
+ params: [
1214
+ new Param({
1215
+ name: 'dateTime',
1216
+ description: '指定日期时间',
1217
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1218
+ }),
1219
+ new Param({
1220
+ name: 'amount',
1221
+ description: '增加的月数',
1222
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1223
+ }),
1224
+ ],
1225
+ returns: [
1226
+ new Return({
1227
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1228
+ }),
1229
+ ],
1230
+ }),
1231
+ new Function({
1232
+ name: 'DateDiff',
1233
+ description: '返回日期比较结果',
1234
+ params: [
1235
+ new Param({
1236
+ name: 'dateTime1',
1237
+ description: '指定日期时间1',
1238
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1239
+ defaultExpression: new Identifier(),
1240
+ }),
1241
+ new Param({
1242
+ name: 'dateTime2',
1243
+ description: '指定日期时间2',
1244
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1245
+ defaultExpression: new Identifier(),
1246
+ }),
1247
+ new Param({
1248
+ name: 'calcType',
1249
+ description: '计算类型。计算两个日期时间之间的差值,支持年数、季度数、月数、星期数、天数、小时数、分钟数、秒数',
1250
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1251
+ defaultValue: new DefaultValue({
1252
+ expression: new StringLiteral({ value: 'd' }),
1253
+ concept: 'DefaultValue',
1254
+ }),
1255
+ defaultExpression: new StringLiteral({ value: 'd' }),
1256
+ options: [
1257
+ {
1258
+ text: 'Year',
1259
+ value: 'y',
1260
+ description: '年数',
1261
+ },
1262
+ {
1263
+ text: 'Season',
1264
+ value: 'q',
1265
+ description: '季度数',
1266
+ },
1267
+ {
1268
+ text: 'Month',
1269
+ value: 'M',
1270
+ description: '月数',
1271
+ },
1272
+ {
1273
+ text: 'Week',
1274
+ value: 'w',
1275
+ description: '星期数',
1276
+ },
1277
+ {
1278
+ text: 'Day',
1279
+ value: 'd',
1280
+ description: '天数',
1281
+ },
1282
+ {
1283
+ text: 'Hour',
1284
+ value: 'h',
1285
+ description: '小时数',
1286
+ },
1287
+ {
1288
+ text: 'Minute',
1289
+ value: 'm',
1290
+ description: '分钟数',
1291
+ },
1292
+ {
1293
+ text: 'Second',
1294
+ value: 's',
1295
+ description: '秒数',
1296
+ },
1297
+ ],
1298
+ }),
1299
+ new Param({
1300
+ name: '结果处理',
1301
+ description: '结果是否绝对值处理',
1302
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1303
+ defaultValue: new DefaultValue({
1304
+ expression: new BooleanLiteral({ value: 'true' }),
1305
+ concept: 'DefaultValue',
1306
+ }),
1307
+ defaultExpression: new BooleanLiteral({ value: 'true' }),
1308
+ options: [
1309
+ {
1310
+ text: '绝对值',
1311
+ value: 'true',
1312
+ description: '结果绝对值处理',
1313
+ },
1314
+ {
1315
+ text: '不处理',
1316
+ value: 'false',
1317
+ description: '结果不做绝对值处理',
1318
+ },
1319
+ ],
1320
+ }),
1321
+ ],
1322
+ returns: [
1323
+ new Return({
1324
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1325
+ }),
1326
+ ],
1327
+ }),
1328
+ new Function({
1329
+ name: 'ConvertTimezone',
1330
+ description: '为指定日期时间转换时区',
1331
+ params: [
1332
+ new Param({
1333
+ name: '指定日期',
1334
+ description: '指定日期',
1335
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1336
+ }),
1337
+ new Param({
1338
+ name: '转换时区至',
1339
+ description: '转换时区至',
1340
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1341
+ defaultValue: new DefaultValue({
1342
+ expression: new StringLiteral({ value: 'Asia/Shanghai' }),
1343
+ concept: 'DefaultValue',
1344
+ }),
1345
+ useComponent: { type: 's-bidirectional-bind-switch' },
1346
+ defaultExpression: new StringLiteral({
1347
+ value: 'Asia/Shanghai',
1348
+ name: 'ConvertTimezoneDefaultExpression',
1349
+ }),
1350
+ options: [
1351
+ {
1352
+ text: '中国标准时间(UTC +8)',
1353
+ value: 'Asia/Shanghai',
1354
+ description: '中国标准时间',
1355
+ },
1356
+ {
1357
+ text: '格林威治标准时间(UTC +0)',
1358
+ value: 'Europe/London',
1359
+ description: '格林威治标准时间',
1360
+ },
1361
+ {
1362
+ text: '北美东部标准时间(UTC -5)',
1363
+ value: 'America/New_York',
1364
+ description: '北美东部标准时间',
1365
+ },
1366
+ {
1367
+ text: '日本标准时间(UTC +9)',
1368
+ value: 'Asia/Tokyo',
1369
+ description: '日本标准时间',
1370
+ },
1371
+ {
1372
+ text: '欧洲中部标准时间(UTC +1)',
1373
+ value: 'Europe/Paris',
1374
+ description: '欧洲中部标准时间',
1375
+ },
1376
+ ],
1377
+ }),
1378
+ ],
1379
+ returns: [
1380
+ new Return({
1381
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1382
+ }),
1383
+ ],
1384
+ }),
1385
+ new Function({
1386
+ name: 'GetDateCount',
1387
+ description: '按指定维度计算日期,如“所在年-第几周”。当输入为 DateTime 类型时,会把数据转到提供的时区的当地时间进行计算。',
1388
+ params: [
1389
+ new Param({
1390
+ name: '指定日期',
1391
+ description: '将被计算的日期',
1392
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1393
+ }),
1394
+ new Param({
1395
+ name: '根据指定日期计算',
1396
+ description: '获取指定日期的特定信息,如是其所在年的第几天',
1397
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1398
+ defaultValue: new DefaultValue({
1399
+ expression: new StringLiteral({ value: 'week-year' }),
1400
+ concept: 'DefaultValue',
1401
+ }),
1402
+ defaultExpression: new StringLiteral({ value: 'week-year' }),
1403
+ cascader: true,
1404
+ }),
1405
+ ],
1406
+ returns: [
1407
+ new Return({
1408
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1409
+ }),
1410
+ ],
1411
+ }),
1412
+ new Function({
1413
+ name: 'AlterDateTime',
1414
+ description: '为指定日期时间调整增加(减少)时间',
1415
+ params: [
1416
+ new Param({
1417
+ name: '指定日期时间',
1418
+ description: '将被更改的日期时间或日期',
1419
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1420
+ }),
1421
+ new Param({
1422
+ name: '调整',
1423
+ description: '为指定的日期时间增加或减少指定的数量,只能填整数',
1424
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1425
+ defaultValue: new DefaultValue({
1426
+ expression: new StringLiteral({ value: 'Increase' }),
1427
+ concept: 'DefaultValue',
1428
+ }),
1429
+ defaultExpression: new StringLiteral({ value: 'Increase' }),
1430
+ options: [
1431
+ { text: '增加', value: 'Increase' },
1432
+ { text: '减少', value: 'Decrease' },
1433
+ ],
1434
+ }),
1435
+ new Param({
1436
+ name: 'amount',
1437
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1438
+ defaultExpression: new NumericLiteral({ value: '0' }),
1439
+ }),
1440
+ new Param({
1441
+ name: '计算数',
1442
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1443
+ defaultValue: new DefaultValue({
1444
+ expression: new StringLiteral({ value: 'day' }),
1445
+ concept: 'DefaultValue',
1446
+ }),
1447
+ defaultExpression: new StringLiteral({ value: 'day' }),
1448
+ options: [
1449
+ { text: '天', value: 'day' },
1450
+ { text: '周', value: 'week' },
1451
+ { text: '月', value: 'month' },
1452
+ { text: '季度', value: 'quarter' },
1453
+ { text: '年', value: 'year' },
1454
+ ],
1455
+ }),
1456
+ ],
1457
+ }),
1458
+ new Function({
1459
+ name: 'GetSpecificDaysOfWeek',
1460
+ description: '按“星期几”获取指定日期范围内的日子。当输入为 DateTime 类型时,会把数据转到提供的时区的当地时间进行计算。',
1461
+ params: [
1462
+ new Param({
1463
+ name: '起始',
1464
+ description: '起始日期(包含)',
1465
+ typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1466
+ }),
1467
+ new Param({
1468
+ name: '结束',
1469
+ description: '结束日期(包含)',
1470
+ typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1471
+ }),
1472
+ new Param({
1473
+ name: '指定',
1474
+ description: '指定的星期几,可多选',
1475
+ useComponent: { type: 's-bidirectional-bind-switch' },
1476
+ defaultExpression: new NewList({
1477
+ name: 'GetSpecificDaysOfWeekTargetDefaultExpression',
1478
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1479
+ typeArguments: [TypeAnnotation.createPrimitive('Long')],
1480
+ }),
1481
+ }),
1482
+ options: [
1483
+ { text: '星期一', value: '1' },
1484
+ { text: '星期二', value: '2' },
1485
+ { text: '星期三', value: '3' },
1486
+ { text: '星期四', value: '4' },
1487
+ { text: '星期五', value: '5' },
1488
+ { text: '星期六', value: '6' },
1489
+ { text: '星期日', value: '7' },
1490
+ ],
1491
+ }),
1492
+ ],
1493
+ returns: [
1494
+ new Return({
1495
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1496
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1497
+ }),
1498
+ }),
1499
+ ],
1500
+ }),
1501
+ new Function({
1502
+ name: 'Clone',
1503
+ description: '复制一个所选参数的实例',
1504
+ params: [
1505
+ new Param({
1506
+ name: 'struct',
1507
+ description: '指定对象',
1508
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1509
+ }),
1510
+ ],
1511
+ returns: [
1512
+ new Return({
1513
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1514
+ }),
1515
+ ],
1516
+ }),
1517
+ new Function({
1518
+ name: 'Clear',
1519
+ description: '(修改原数据)清除复杂对象中每个属性的数据(若输入是单个基础类型如 Integer 的值,则不做处理)',
1520
+ params: [
1521
+ new Param({
1522
+ name: 'struct',
1523
+ description: '指定对象',
1524
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1525
+ }),
1526
+ ],
1527
+ returns: [
1528
+ new Return({
1529
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1530
+ }),
1531
+ ],
1532
+ }),
1533
+ new Function({
1534
+ name: 'RandomInt',
1535
+ description: '产生随机整数',
1536
+ params: [
1537
+ new Param({
1538
+ name: 'start',
1539
+ description: '起始数字,Integer类型',
1540
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1541
+ }),
1542
+ new Param({
1543
+ name: 'end',
1544
+ description: '截至数字,Integer类型',
1545
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1546
+ }),
1547
+ ],
1548
+ returns: [
1549
+ new Return({
1550
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1551
+ }),
1552
+ ],
1553
+ }),
1554
+ new Function({
1555
+ name: 'CreateListPage',
1556
+ description: '将List<T>列表转换为列表分页',
1557
+ params: [
1558
+ new Param({
1559
+ name: 'list',
1560
+ description: '指定列表',
1561
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1562
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1563
+ }),
1564
+ }),
1565
+ new Param({
1566
+ name: 'total',
1567
+ description: '指定数据条数',
1568
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1569
+ }),
1570
+ ],
1571
+ returns: [
1572
+ new Return({
1573
+ typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
1574
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1575
+ }),
1576
+ }),
1577
+ ],
1578
+ }),
1579
+ new Function({
1580
+ name: 'ListSort',
1581
+ description: '(修改原数据)为列表按指定规则排序',
1582
+ params: [
1583
+ new Param({
1584
+ name: 'list',
1585
+ description: '指定列表',
1586
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1587
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1588
+ }),
1589
+ }),
1590
+ new Param({
1591
+ name: 'by',
1592
+ description: '指定列表中项的某个属性或项本身,支持算数运算和比较运算',
1593
+ defaultExpression: new AnonymousFunction({
1594
+ params: [
1595
+ new Param({
1596
+ name: 'item',
1597
+ typeAnnotation: null,
1598
+ }),
1599
+ ],
1600
+ }),
1601
+ }),
1602
+ new Param({
1603
+ name: 'sort',
1604
+ description: '支持升序或降序设置,asc为升序,desc为降序。',
1605
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1606
+ defaultValue: new DefaultValue({
1607
+ expression: new BooleanLiteral({ value: 'true' }),
1608
+ concept: 'DefaultValue',
1609
+ }),
1610
+ defaultExpression: new BooleanLiteral({ value: 'true' }),
1611
+ options: [
1612
+ {
1613
+ text: 'asc',
1614
+ value: 'true',
1615
+ description: '升序',
1616
+ },
1617
+ {
1618
+ text: 'desc',
1619
+ value: 'false',
1620
+ description: '降序',
1621
+ },
1622
+ ],
1623
+ }),
1624
+ ],
1625
+ returns: [],
1626
+ }),
1627
+ new Function({
1628
+ name: 'ListFind',
1629
+ description: '返回列表中第一个符合条件的项',
1630
+ params: [
1631
+ new Param({
1632
+ name: 'list',
1633
+ description: '指定列表',
1634
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1635
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1636
+ }),
1637
+ }),
1638
+ new Param({
1639
+ name: 'by',
1640
+ description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1641
+ defaultExpression: new AnonymousFunction({
1642
+ params: [
1643
+ new Param({
1644
+ name: 'item',
1645
+ typeAnnotation: null,
1646
+ }),
1647
+ ],
1648
+ }),
1649
+ }),
1650
+ ],
1651
+ returns: [
1652
+ new Return({
1653
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1654
+ }),
1655
+ ],
1656
+ }),
1657
+ new Function({
1658
+ name: 'ListFindIndex',
1659
+ description: '返回列表中第一个符合条件的项的索引值',
1660
+ params: [
1661
+ new Param({
1662
+ name: 'list',
1663
+ description: '指定列表',
1664
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1665
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1666
+ }),
1667
+ }),
1668
+ new Param({
1669
+ name: 'by',
1670
+ description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1671
+ defaultExpression: new AnonymousFunction({
1672
+ params: [
1673
+ new Param({
1674
+ name: 'item',
1675
+ typeAnnotation: null,
1676
+ }),
1677
+ ],
1678
+ }),
1679
+ }),
1680
+ ],
1681
+ returns: [
1682
+ new Return({
1683
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1684
+ }),
1685
+ ],
1686
+ }),
1687
+ new Function({
1688
+ name: 'ListFilter',
1689
+ description: '筛选列表中符合条件的所有项,返回这些项构成的新的列表',
1690
+ params: [
1691
+ new Param({
1692
+ name: 'list',
1693
+ description: '指定列表',
1694
+ }),
1695
+ new Param({
1696
+ name: 'by',
1697
+ description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1698
+ defaultExpression: new AnonymousFunction({
1699
+ params: [
1700
+ new Param({
1701
+ name: 'item',
1702
+ typeAnnotation: null,
1703
+ }),
1704
+ ],
1705
+ }),
1706
+ }),
1707
+ ],
1708
+ returns: [
1709
+ new Return({
1710
+ name: 'list',
1711
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1712
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1713
+ }),
1714
+ }),
1715
+ ],
1716
+ }),
1717
+ new Function({
1718
+ name: 'ListReverse',
1719
+ description: '(修改原数据)将列表的所有项反向排列(例如第一项变为最后一项)',
1720
+ params: [
1721
+ new Param({
1722
+ name: 'list',
1723
+ description: '指定列表',
1724
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1725
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1726
+ }),
1727
+ }),
1728
+ ],
1729
+ returns: [],
1730
+ }),
1731
+ new Function({
1732
+ name: 'ListDistinct',
1733
+ description: '(修改原数据)为列表去除重复项',
1734
+ params: [
1735
+ new Param({
1736
+ name: 'list',
1737
+ description: '指定列表',
1738
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1739
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1740
+ }),
1741
+ }),
1742
+ ],
1743
+ returns: [],
1744
+ }),
1745
+ new Function({
1746
+ name: 'ListDistinctBy',
1747
+ description: '按某几个属性为列表去除重复项。返回去除重复项后的列表',
1748
+ params: [
1749
+ new Param({
1750
+ name: 'list',
1751
+ description: '指定列表',
1752
+ }),
1753
+ new Param({
1754
+ name: 'by',
1755
+ description: '指定列表中项的某几个属性,若项无属性,则该函数不生效',
1756
+ defaultExpression: new NewList({
1757
+ name: 'ListDistinctByTargetDefaultExpression',
1758
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1759
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1760
+ }),
1761
+ items: [
1762
+ new AnonymousFunction({
1763
+ params: [
1764
+ new Param({
595
1765
  name: 'item',
596
- description: '指定项',
597
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
598
- }),
599
- ],
600
- }),
601
- new Function({
602
- name: 'RemoveAt',
603
- description: '(修改原数据)在列表中删除位于指定索引的项。返回被删除的项',
604
- params: [
605
- new Param({
606
- name: 'list',
607
- description: '指定列表',
608
- typeAnnotation: TypeAnnotation.createGeneric('List', {
609
- typeArguments: [TypeAnnotation.createTypeParam('T')],
610
- }),
611
- }),
612
- new Param({
613
- name: 'index',
614
- description: '索引,integer类型,用数字表示第几项,项数索引从0开始',
615
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
616
- }),
617
- ],
618
- returns: [
619
- new Return({
620
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
621
- }),
622
- ],
623
- }),
624
- new Function({
625
- name: 'ListHead',
626
- description: '返回列表的首项',
627
- params: [
628
- new Param({
629
- name: 'list',
630
- description: '指定列表',
631
- }),
632
- ],
633
- returns: [
634
- new Return({
635
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
636
- }),
637
- ],
638
- }),
639
- new Function({
640
- name: 'ListLast',
641
- description: '返回列表的末项',
642
- params: [
643
- new Param({
644
- name: 'list',
645
- description: '指定列表',
646
- }),
647
- ],
648
- returns: [
649
- new Return({
650
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
651
- }),
652
- ],
653
- }),
654
- new Function({
655
- name: 'ListFlatten',
656
- description: '将嵌套列表摊平一层并返回(List<List<T>> 变为 List<T>)',
657
- params: [
658
- new Param({
659
- name: 'list',
660
- description: '指定列表',
661
- }),
662
- ],
663
- returns: [
664
- new Return({
665
- typeAnnotation: TypeAnnotation.createGeneric('List', {
666
- typeArguments: [TypeAnnotation.createTypeParam('T')],
667
- }),
668
- }),
669
- ],
670
- }),
671
- new Function({
672
- name: 'ListToMap',
673
- description: '选取列表项的某些属性,根据这些属性将列表变为 Map 并返回',
674
- params: [
675
- new Param({
676
- name: 'list',
677
- description: '指定列表',
678
- }),
679
- new Param({
680
- name: 'by',
681
- description: `根据项的属性及其本身进行key和value的定义`,
682
- defaultExpression: new AnonymousFunction({
683
- params: [
684
- new Param({
685
- name: 'item',
686
- typeAnnotation: null,
687
- }),
688
- ],
689
- body: new Identifier(),
690
- }),
691
- }),
692
- new Param({
693
- name: 'byVal',
694
- defaultExpression: new AnonymousFunction({
695
- params: [
696
- new Param({
697
- name: 'item',
698
- typeAnnotation: null,
699
- }),
700
- ],
701
- body: new Identifier(),
702
- }),
703
- }),
704
- ],
705
- }),
706
- new Function({
707
- name: 'ListTransform',
708
- description: '对列表的每一项调用函数 by,得到新项;返回新项构成的列表',
709
- params: [
710
- new Param({
711
- name: 'list',
712
- description: '指定列表',
713
- }),
714
- new Param({
715
- name: 'by',
716
- description: '指定对列表中项的某个属性或项本身的处理方式,支持算数运算和比较运算',
717
- defaultExpression: new AnonymousFunction({
718
- params: [
719
- new Param({
720
- name: 'item',
721
- typeAnnotation: null,
722
- }),
723
- ],
724
- }),
725
- }),
726
- ],
727
- returns: [
728
- new Return({
729
- typeAnnotation: TypeAnnotation.createGeneric('List', {
730
- typeArguments: [TypeAnnotation.createTypeParam('T')],
731
- }),
732
- }),
733
- ],
734
- }),
735
- new Function({
736
- name: 'ListSum',
737
- description: '返回数值列表中所有项的和',
738
- params: [
739
- new Param({
740
- name: 'list',
741
- description: '指定列表',
742
- }),
743
- ],
744
- returns: [
745
- new Return({
746
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
747
- }),
748
- ],
749
- }),
750
- new Function({
751
- name: 'ListProduct',
752
- description: '返回数值列表中所有项的积',
753
- params: [
754
- new Param({
755
- name: 'list',
756
- description: '指定数值类型列表',
757
- }),
758
- ],
759
- returns: [
760
- new Return({
761
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
762
- }),
763
- ],
764
- }),
765
- new Function({
766
- name: 'ListAverage',
767
- description: '返回数值列表中所有项的平均值',
768
- params: [
769
- new Param({
770
- name: 'list',
771
- description: '指定数值类型列表',
772
- }),
773
- ],
774
- returns: [
775
- new Return({
776
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
777
- }),
778
- ],
779
- }),
780
- new Function({
781
- name: 'ListMax',
782
- description: '返回数值列表中所有项的最大值',
783
- params: [
784
- new Param({
785
- name: 'list',
786
- description: '指定数值类型列表',
787
- }),
788
- ],
789
- returns: [
790
- new Return({
791
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
792
- }),
793
- ],
794
- }),
795
- new Function({
796
- name: 'ListMin',
797
- description: '返回数值列表中所有项的最小值',
798
- params: [
799
- new Param({
800
- name: 'list',
801
- description: '指定数值类型列表',
802
- }),
803
- ],
804
- returns: [
805
- new Return({
806
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
807
- }),
808
- ],
809
- }),
810
- new Function({
811
- name: 'MapGet',
812
- description: '查询出Map中key为指定值的value值列表',
813
- params: [
814
- new Param({
815
- name: 'map',
816
- description: '指定映射',
817
- typeAnnotation: TypeAnnotation.createGeneric('map', {
818
- typeArguments: [
819
- TypeAnnotation.createTypeParam('K'),
820
- TypeAnnotation.createTypeParam('V'),
821
- ],
822
- }),
823
- }),
824
- new Param({
825
- name: 'key',
826
- description: '指定参数key',
827
- typeAnnotation: TypeAnnotation.createTypeParam('K'),
828
- }),
829
- ],
830
- returns: [
831
- new Return({
832
- typeAnnotation: TypeAnnotation.createTypeParam('V'),
833
- }),
834
- ],
835
- }),
836
- new Function({
837
- name: 'MapPut',
838
- description: '(修改原数据)为Map中添加键值对',
839
- params: [
840
- new Param({
841
- name: 'map',
842
- description: '指定映射',
843
- typeAnnotation: TypeAnnotation.createGeneric('map', {
844
- typeArguments: [
845
- TypeAnnotation.createTypeParam('K'),
846
- TypeAnnotation.createTypeParam('V'),
847
- ],
848
- }),
849
- }),
850
- new Param({
851
- name: 'key',
852
- description: '指定参数key',
853
- typeAnnotation: TypeAnnotation.createTypeParam('K'),
854
- }),
855
- new Param({
856
- name: 'value',
857
- description: '指定参数value',
858
- typeAnnotation: TypeAnnotation.createTypeParam('V'),
859
- }),
860
- ],
861
- }),
862
- new Function({
863
- name: 'MapRemove',
864
- description: '(修改原数据)删除Map中的键值对',
865
- params: [
866
- new Param({
867
- name: 'map',
868
- description: '指定列表',
869
- typeAnnotation: TypeAnnotation.createGeneric('map', {
870
- typeArguments: [
871
- TypeAnnotation.createTypeParam('K'),
872
- TypeAnnotation.createTypeParam('V'),
873
- ],
874
- }),
875
- }),
876
- new Param({
877
- name: 'key',
878
- description: '指定参数key',
879
- typeAnnotation: TypeAnnotation.createTypeParam('K'),
880
- }),
881
- ],
882
- }),
883
- new Function({
884
- name: 'MapContains',
885
- description: '判断Map中是否存在参数指定的键值对',
886
- params: [
887
- new Param({
888
- name: 'map',
889
- description: '指定映射',
890
- typeAnnotation: TypeAnnotation.createGeneric('map', {
891
- typeArguments: [
892
- TypeAnnotation.createTypeParam('K'),
893
- TypeAnnotation.createTypeParam('V'),
894
- ],
895
- }),
896
- }),
897
- new Param({
898
- name: 'key',
899
- description: '指定参数key',
900
- typeAnnotation: TypeAnnotation.createTypeParam('K'),
901
- }),
902
- ],
903
- returns: [
904
- new Return({
905
- typeAnnotation: TypeAnnotation.createTypeParam('Boolean'),
906
- }),
907
- ],
908
- }),
909
- new Function({
910
- name: 'MapKeys',
911
- description: '输出Map中key集合',
912
- params: [
913
- new Param({
914
- name: 'map',
915
- description: '指定映射',
916
- typeAnnotation: TypeAnnotation.createGeneric('map', {
917
- typeArguments: [
918
- TypeAnnotation.createTypeParam('K'),
919
- TypeAnnotation.createTypeParam('V'),
920
- ],
921
- }),
922
- }),
923
- ],
924
- returns: [
925
- new Return({
926
- typeAnnotation: TypeAnnotation.createGeneric('List', {
927
- typeArguments: [TypeAnnotation.createTypeParam('K')],
928
- }),
929
- }),
930
- ],
931
- }),
932
- new Function({
933
- name: 'MapValues',
934
- description: '输出Map中value集合',
935
- params: [
936
- new Param({
937
- name: 'map',
938
- description: '指定映射',
939
- typeAnnotation: TypeAnnotation.createGeneric('map', {
940
- typeArguments: [
941
- TypeAnnotation.createTypeParam('K'),
942
- TypeAnnotation.createTypeParam('V'),
943
- ],
944
- }),
945
- }),
946
- ],
947
- returns: [
948
- new Return({
949
- typeAnnotation: TypeAnnotation.createGeneric('List', {
950
- typeArguments: [TypeAnnotation.createTypeParam('V')],
951
- }),
952
- }),
953
- ],
954
- }),
955
- new Function({
956
- name: 'MapFilter',
957
- description: '在指定Map中过滤出符合条件参数的Map列表',
958
- params: [
959
- new Param({
960
- name: 'map',
961
- description: '指定映射',
962
- }),
963
- new Param({
964
- name: 'by',
965
- description: '针对键值对的参数key和value设置过滤条件,支持算数运算、比较运算和逻辑运算',
966
- defaultExpression: new AnonymousFunction({
967
- params: [
968
- new Param({
969
- name: 'key',
970
- typeAnnotation: null,
971
- }),
972
- new Param({
973
- name: 'value',
974
- typeAnnotation: null,
975
- }),
976
- ],
977
- }),
978
- }),
979
- ],
980
- returns: [
981
- new Return({
982
- typeAnnotation: TypeAnnotation.createGeneric('map', {
983
- typeArguments: [
984
- TypeAnnotation.createTypeParam('K'),
985
- TypeAnnotation.createTypeParam('V'),
986
- ],
987
- }),
988
- }),
989
- ],
990
- }),
991
- new Function({
992
- name: 'MapTransform',
993
- description: '对 Map 的每一项调用函数 by,得到新项,并返回新项构成的 Map。(Map 的每一项从 (K0, V0) 变为 (K, V)。)',
994
- params: [
995
- new Param({
996
- name: 'map',
997
- description: '指定映射',
998
- }),
999
- new Param({
1000
- name: 'by',
1001
- description: `指定映射中键值对的参数处理方式,支持算数运算和比较运算`,
1002
- defaultExpression: new AnonymousFunction({
1003
- params: [
1004
- new Param({
1005
- name: 'key',
1006
- typeAnnotation: null,
1007
- }),
1008
- new Param({
1009
- name: 'value',
1010
- typeAnnotation: null,
1011
- }),
1012
- ],
1013
- body: new Identifier({
1014
- name: 'key',
1015
- }),
1016
- }),
1017
- }),
1018
- new Param({
1019
- name: 'byVal',
1020
- defaultExpression: new AnonymousFunction({
1021
- params: [
1022
- new Param({
1023
- name: 'key',
1024
- typeAnnotation: null,
1025
- }),
1026
- new Param({
1027
- name: 'value',
1028
- typeAnnotation: null,
1029
- }),
1030
- ],
1031
- }),
1032
- }),
1033
- ],
1034
- returns: [
1035
- new Return({
1036
- typeAnnotation: TypeAnnotation.createGeneric('Map', {
1037
- typeArguments: [TypeAnnotation.createTypeParam('K'), TypeAnnotation.createTypeParam('V')],
1038
- }),
1039
- }),
1040
- ],
1041
- }),
1042
- new Function({
1043
- name: 'CurrDate',
1044
- description: '返回指定时区的当前日期',
1045
- params: [ ],
1046
- returns: [
1047
- new Return({
1048
- typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1049
- }),
1050
- ],
1051
- }),
1052
- new Function({
1053
- name: 'CurrTime',
1054
- description: '返回指定时区的当前时间',
1055
- params: [ ],
1056
- returns: [
1057
- new Return({
1058
- typeAnnotation: TypeAnnotation.createTypeParam('Time'),
1059
- }),
1060
- ],
1061
- }),
1062
- new Function({
1063
- name: 'CurrDateTime',
1064
- description: '返回指定时区的当前日期时间',
1065
- params: [ ],
1066
- returns: [
1067
- new Return({
1068
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1069
- }),
1070
- ],
1071
- }),
1072
- new Function({
1073
- name: 'FormatDate',
1074
- description: '返回格式化日期字符串',
1075
- params: [
1076
- new Param({
1077
- name: 'date',
1078
- description: '指定需要格式化日期的字段',
1079
- typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1080
- }),
1081
- new Param({
1082
- name: 'formatter',
1083
- description: '格式化规则,默认为yyyy-MM-dd,即年月日格式',
1084
- defaultValue: new DefaultValue({
1085
- expression: new StringLiteral({ value: 'yyyy-MM-dd' }),
1086
- concept: 'DefaultValue',
1087
- }),
1088
- defaultExpression: new StringLiteral({ value: 'yyyy-MM-dd' }),
1089
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1090
- })
1091
- ],
1092
- returns: [
1093
- new Return({
1094
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1095
- }),
1096
- ],
1097
- }),
1098
- new Function({
1099
- name: 'FormatDateTime',
1100
- description: '返回格式化日期时间字符串。当输入为 DateTime 类型时,会把数据转到目标时区的当地时间进行格式化。',
1101
- params: [
1102
- new Param({
1103
- name: 'date',
1104
- description: '指定需要格式化日期时间的字段',
1105
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1106
- }),
1107
- new Param({
1108
- name: 'formatter',
1109
- description: '格式化规则,默认为yyyy-MM-dd',
1110
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1111
- defaultValue: new DefaultValue({
1112
- expression: new StringLiteral({ value: 'yyyy-MM-dd HH:mm:ss' }),
1113
- concept: 'DefaultValue',
1114
- }),
1115
- defaultExpression: new StringLiteral({ value: 'yyyy-MM-dd HH:mm:ss' }),
1116
- }),
1117
- ],
1118
- returns: [
1119
- new Return({
1120
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1121
- }),
1122
- ],
1123
- }),
1124
- new Function({
1125
- name: 'FormatNumber',
1126
- description: '返回格式化的数字字符串',
1127
- params: [
1128
- new Param({
1129
- name: 'value',
1130
- description: '指定需要格式化小数位数的字段',
1131
- typeAnnotation: TypeAnnotation.createPrimitive('Decimal'),
1132
- defaultExpression: new Identifier(),
1133
- }),
1134
- new Param({
1135
- name: 'digits',
1136
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1137
- description: '保留小数位数',
1138
- defaultValue: new DefaultValue({
1139
- expression: new NumericLiteral({ value: '2' }),
1140
- concept: 'DefaultValue',
1141
- }),
1142
- defaultExpression: new NumericLiteral({ value: '2' }),
1143
- }),
1144
- new Param({
1145
- name: 'showGroups',
1146
- description: '是否显示千分位:true显示,false不显示',
1147
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1148
- defaultValue: new DefaultValue({
1149
- expression: new BooleanLiteral({ value: 'false' }),
1150
- concept: 'DefaultValue',
1151
- }),
1152
- defaultExpression: new BooleanLiteral({ value: 'false' }),
1153
- options: [
1154
- {
1155
- text: 'true',
1156
- value: 'true',
1157
- description: '显示千分位',
1158
- },
1159
- {
1160
- text: 'false',
1161
- value: 'false',
1162
- description: '不显示千分位',
1163
- },
1164
- ],
1165
- }),
1166
- ],
1167
- returns: [
1168
- new Return({
1169
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1170
- }),
1171
- ],
1172
- }),
1173
- new Function({
1174
- name: 'AddDays',
1175
- description: '返回日期天数加法计算结果',
1176
- params: [
1177
- new Param({
1178
- name: 'dateTime',
1179
- description: '指定日期时间',
1180
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1181
- }),
1182
- new Param({
1183
- name: 'amount',
1184
- description: '增加的天数',
1185
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1186
- }),
1187
- ],
1188
- returns: [
1189
- new Return({
1190
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1191
- }),
1192
- ],
1193
- }),
1194
- new Function({
1195
- name: 'AddMonths',
1196
- description: '返回月份加法计算结果',
1197
- params: [
1198
- new Param({
1199
- name: 'dateTime',
1200
- description: '指定日期时间',
1201
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1202
- }),
1203
- new Param({
1204
- name: 'amount',
1205
- description: '增加的月数',
1206
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1207
- }),
1208
- ],
1209
- returns: [
1210
- new Return({
1211
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1212
- }),
1213
- ],
1214
- }),
1215
- new Function({
1216
- name: 'DateDiff',
1217
- description: '返回日期比较结果',
1218
- params: [
1219
- new Param({
1220
- name: 'dateTime1',
1221
- description: '指定日期时间1',
1222
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1223
- defaultExpression: new Identifier(),
1224
- }),
1225
- new Param({
1226
- name: 'dateTime2',
1227
- description: '指定日期时间2',
1228
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1229
- defaultExpression: new Identifier(),
1230
- }),
1231
- new Param({
1232
- name: 'calcType',
1233
- description: '计算类型。计算两个日期时间之间的差值,支持年数、季度数、月数、星期数、天数、小时数、分钟数、秒数',
1234
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1235
- defaultValue: new DefaultValue({
1236
- expression: new StringLiteral({ value: 'd' }),
1237
- concept: 'DefaultValue',
1238
- }),
1239
- defaultExpression: new StringLiteral({ value: 'd' }),
1240
- options: [
1241
- {
1242
- text: 'Year',
1243
- value: 'y',
1244
- description: '年数',
1245
- },
1246
- {
1247
- text: 'Season',
1248
- value: 'q',
1249
- description: '季度数',
1250
- },
1251
- {
1252
- text: 'Month',
1253
- value: 'M',
1254
- description: '月数',
1255
- },
1256
- {
1257
- text: 'Week',
1258
- value: 'w',
1259
- description: '星期数',
1260
- },
1261
- {
1262
- text: 'Day',
1263
- value: 'd',
1264
- description: '天数',
1265
- },
1266
- {
1267
- text: 'Hour',
1268
- value: 'h',
1269
- description: '小时数',
1270
- },
1271
- {
1272
- text: 'Minute',
1273
- value: 'm',
1274
- description: '分钟数',
1275
- },
1276
- {
1277
- text: 'Second',
1278
- value: 's',
1279
- description: '秒数',
1280
- },
1281
- ],
1282
- }),
1283
- new Param({
1284
- name: '结果处理',
1285
- description: '结果是否绝对值处理',
1286
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1287
- defaultValue: new DefaultValue({
1288
- expression: new BooleanLiteral({ value: 'true' }),
1289
- concept: 'DefaultValue',
1290
- }),
1291
- defaultExpression: new BooleanLiteral({ value: 'true' }),
1292
- options: [
1293
- {
1294
- text: '绝对值',
1295
- value: 'true',
1296
- description: '结果绝对值处理',
1297
- },
1298
- {
1299
- text: '不处理',
1300
- value: 'false',
1301
- description: '结果不做绝对值处理',
1302
- },
1303
- ],
1304
- }),
1305
- ],
1306
- returns: [
1307
- new Return({
1308
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1309
- }),
1310
- ],
1311
- }),
1312
- new Function({
1313
- name: 'ConvertTimezone',
1314
- description: '为指定日期时间转换时区',
1315
- params: [
1316
- new Param({
1317
- name: '指定日期',
1318
- description: '指定日期',
1319
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1320
- }),
1321
- new Param({
1322
- name: '转换时区至',
1323
- description: '转换时区至',
1324
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1325
- defaultValue: new DefaultValue({
1326
- expression: new StringLiteral({ value: 'Asia/Shanghai' }),
1327
- concept: 'DefaultValue',
1328
- }),
1329
- useComponent: { type: 's-bidirectional-bind-switch' },
1330
- defaultExpression: new StringLiteral({
1331
- value: 'Asia/Shanghai',
1332
- name: 'ConvertTimezoneDefaultExpression',
1333
- }),
1334
- options: [
1335
- {
1336
- text: '中国标准时间(UTC +8)',
1337
- value: 'Asia/Shanghai',
1338
- description: '中国标准时间',
1339
- },
1340
- {
1341
- text: '格林威治标准时间(UTC +0)',
1342
- value: 'Europe/London',
1343
- description: '格林威治标准时间',
1344
- },
1345
- {
1346
- text: '北美东部标准时间(UTC -5)',
1347
- value: 'America/New_York',
1348
- description: '北美东部标准时间',
1349
- },
1350
- {
1351
- text: '日本标准时间(UTC +9)',
1352
- value: 'Asia/Tokyo',
1353
- description: '日本标准时间',
1354
- },
1355
- {
1356
- text: '欧洲中部标准时间(UTC +1)',
1357
- value: 'Europe/Paris',
1358
- description: '欧洲中部标准时间',
1359
- },
1360
- ],
1361
- }),
1362
- ],
1363
- returns: [
1364
- new Return({
1365
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1366
- }),
1367
- ],
1368
- }),
1369
- new Function({
1370
- name: 'GetDateCount',
1371
- description: '按指定维度计算日期,如“所在年-第几周”。当输入为 DateTime 类型时,会把数据转到提供的时区的当地时间进行计算。',
1372
- params: [
1373
- new Param({
1374
- name: '指定日期',
1375
- description: '将被计算的日期',
1376
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1377
- }),
1378
- new Param({
1379
- name: '根据指定日期计算',
1380
- description: '获取指定日期的特定信息,如是其所在年的第几天',
1381
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1382
- defaultValue: new DefaultValue({
1383
- expression: new StringLiteral({ value: 'week-year' }),
1384
- concept: 'DefaultValue',
1385
- }),
1386
- defaultExpression: new StringLiteral({ value: 'week-year' }),
1387
- cascader: true,
1388
- }),
1389
- ],
1390
- returns: [
1391
- new Return({
1392
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1393
- }),
1394
- ],
1395
- }),
1396
- new Function({
1397
- name: 'AlterDateTime',
1398
- description: '为指定日期时间调整增加(减少)时间',
1399
- params: [
1400
- new Param({
1401
- name: '指定日期时间',
1402
- description: '将被更改的日期时间或日期',
1403
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1404
- }),
1405
- new Param({
1406
- name: '调整',
1407
- description: '为指定的日期时间增加或减少指定的数量,只能填整数',
1408
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1409
- defaultValue: new DefaultValue({
1410
- expression: new StringLiteral({ value: 'Increase' }),
1411
- concept: 'DefaultValue',
1412
- }),
1413
- defaultExpression: new StringLiteral({ value: 'Increase' }),
1414
- options: [
1415
- { text: '增加', value: 'Increase' },
1416
- { text: '减少', value: 'Decrease' },
1417
- ],
1418
- }),
1419
- new Param({
1420
- name: 'amount',
1421
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1422
- defaultExpression: new NumericLiteral({ value: '0' }),
1423
- }),
1424
- new Param({
1425
- name: '计算数',
1426
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1427
- defaultValue: new DefaultValue({
1428
- expression: new StringLiteral({ value: 'day' }),
1429
- concept: 'DefaultValue',
1430
- }),
1431
- defaultExpression: new StringLiteral({ value: 'day' }),
1432
- options: [
1433
- { text: '天', value: 'day' },
1434
- { text: '周', value: 'week' },
1435
- { text: '月', value: 'month' },
1436
- { text: '季度', value: 'quarter' },
1437
- { text: '年', value: 'year' },
1438
- ],
1439
- }),
1440
- ],
1441
- }),
1442
- new Function({
1443
- name: 'GetSpecificDaysOfWeek',
1444
- description: '按“星期几”获取指定日期范围内的日子。当输入为 DateTime 类型时,会把数据转到提供的时区的当地时间进行计算。',
1445
- params: [
1446
- new Param({
1447
- name: '起始',
1448
- description: '起始日期(包含)',
1449
- typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1450
- }),
1451
- new Param({
1452
- name: '结束',
1453
- description: '结束日期(包含)',
1454
- typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1455
- }),
1456
- new Param({
1457
- name: '指定',
1458
- description: '指定的星期几,可多选',
1459
- useComponent: { type: 's-bidirectional-bind-switch' },
1460
- defaultExpression: new NewList({
1461
- name: 'GetSpecificDaysOfWeekTargetDefaultExpression',
1462
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1463
- typeArguments: [TypeAnnotation.createPrimitive('Long')],
1464
- }),
1465
- }),
1466
- options: [
1467
- { text: '星期一', value: '1' },
1468
- { text: '星期二', value: '2' },
1469
- { text: '星期三', value: '3' },
1470
- { text: '星期四', value: '4' },
1471
- { text: '星期五', value: '5' },
1472
- { text: '星期六', value: '6' },
1473
- { text: '星期日', value: '7' },
1474
- ],
1475
- }),
1476
- ],
1477
- returns: [
1478
- new Return({
1479
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1480
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1481
- }),
1482
- }),
1483
- ],
1484
- }),
1485
- new Function({
1486
- name: 'Clone',
1487
- description: '复制一个所选参数的实例',
1488
- params: [
1489
- new Param({
1490
- name: 'struct',
1491
- description: '指定对象',
1492
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1493
- }),
1494
- ],
1495
- returns: [
1496
- new Return({
1497
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1498
- }),
1499
- ],
1500
- }),
1501
- new Function({
1502
- name: 'Clear',
1503
- description: '(修改原数据)清除复杂对象中每个属性的数据(若输入是单个基础类型如 Integer 的值,则不做处理)',
1504
- params: [
1505
- new Param({
1506
- name: 'struct',
1507
- description: '指定对象',
1508
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1509
- }),
1510
- ],
1511
- returns: [
1512
- new Return({
1513
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1514
- }),
1515
- ],
1516
- }),
1517
- new Function({
1518
- name: 'RandomInt',
1519
- description: '产生随机整数',
1520
- params: [
1521
- new Param({
1522
- name: 'start',
1523
- description: '起始数字,Integer类型',
1524
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1525
- }),
1526
- new Param({
1527
- name: 'end',
1528
- description: '截至数字,Integer类型',
1529
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1530
- }),
1531
- ],
1532
- returns: [
1533
- new Return({
1534
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1535
- }),
1536
- ],
1537
- }),
1538
- new Function({
1539
- name: 'CreateListPage',
1540
- description: '将List<T>列表转换为列表分页',
1541
- params: [
1542
- new Param({
1543
- name: 'list',
1544
- description: '指定列表',
1545
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1546
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1547
- }),
1548
- }),
1549
- new Param({
1550
- name: 'total',
1551
- description: '指定数据条数',
1552
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1553
- }),
1554
- ],
1555
- returns: [
1556
- new Return({
1557
- typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
1558
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1559
- }),
1560
- }),
1561
- ],
1562
- }),
1563
- new Function({
1564
- name: 'ListSort',
1565
- description: '(修改原数据)为列表按指定规则排序',
1566
- params: [
1567
- new Param({
1568
- name: 'list',
1569
- description: '指定列表',
1570
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1571
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1572
- }),
1573
- }),
1574
- new Param({
1575
- name: 'by',
1576
- description: '指定列表中项的某个属性或项本身,支持算数运算和比较运算',
1577
- defaultExpression: new AnonymousFunction({
1578
- params: [
1579
- new Param({
1580
- name: 'item',
1581
- typeAnnotation: null,
1582
- }),
1583
- ],
1584
- }),
1585
- }),
1586
- new Param({
1587
- name: 'sort',
1588
- description: '支持升序或降序设置,asc为升序,desc为降序。',
1589
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1590
- defaultValue: new DefaultValue({
1591
- expression: new BooleanLiteral({ value: 'true' }),
1592
- concept: 'DefaultValue',
1593
- }),
1594
- defaultExpression: new BooleanLiteral({ value: 'true' }),
1595
- options: [
1596
- {
1597
- text: 'asc',
1598
- value: 'true',
1599
- description: '升序',
1600
- },
1601
- {
1602
- text: 'desc',
1603
- value: 'false',
1604
- description: '降序',
1605
- },
1606
- ],
1607
- }),
1608
- ],
1609
- returns: [],
1610
- }),
1611
- new Function({
1612
- name: 'ListFind',
1613
- description: '返回列表中第一个符合条件的项',
1614
- params: [
1615
- new Param({
1616
- name: 'list',
1617
- description: '指定列表',
1618
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1619
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1620
- }),
1621
- }),
1622
- new Param({
1623
- name: 'by',
1624
- description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1625
- defaultExpression: new AnonymousFunction({
1626
- params: [
1627
- new Param({
1628
- name: 'item',
1629
- typeAnnotation: null,
1630
- }),
1631
- ],
1632
- }),
1633
- }),
1634
- ],
1635
- returns: [
1636
- new Return({
1637
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1638
- }),
1639
- ],
1640
- }),
1641
- new Function({
1642
- name: 'ListFindIndex',
1643
- description: '返回列表中第一个符合条件的项的索引值',
1644
- params: [
1645
- new Param({
1646
- name: 'list',
1647
- description: '指定列表',
1648
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1649
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1650
- }),
1651
- }),
1652
- new Param({
1653
- name: 'by',
1654
- description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1655
- defaultExpression: new AnonymousFunction({
1656
- params: [
1657
- new Param({
1658
- name: 'item',
1659
- typeAnnotation: null,
1660
- }),
1661
- ],
1662
- }),
1663
- }),
1664
- ],
1665
- returns: [
1666
- new Return({
1667
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1668
- }),
1669
- ],
1670
- }),
1671
- new Function({
1672
- name: 'ListFilter',
1673
- description: '筛选列表中符合条件的所有项,返回这些项构成的新的列表',
1674
- params: [
1675
- new Param({
1676
- name: 'list',
1677
- description: '指定列表',
1678
- }),
1679
- new Param({
1680
- name: 'by',
1681
- description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1682
- defaultExpression: new AnonymousFunction({
1683
- params: [
1684
- new Param({
1685
- name: 'item',
1686
- typeAnnotation: null,
1687
- }),
1688
- ],
1689
- }),
1690
- }),
1691
- ],
1692
- returns: [
1693
- new Return({
1694
- name: 'list',
1695
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1696
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1697
- }),
1698
- }),
1699
- ],
1700
- }),
1701
- new Function({
1702
- name: 'ListReverse',
1703
- description: '(修改原数据)将列表的所有项反向排列(例如第一项变为最后一项)',
1704
- params: [
1705
- new Param({
1706
- name: 'list',
1707
- description: '指定列表',
1708
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1709
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1710
- }),
1711
- }),
1712
- ],
1713
- returns: [],
1714
- }),
1715
- new Function({
1716
- name: 'ListDistinct',
1717
- description: '(修改原数据)为列表去除重复项',
1718
- params: [
1719
- new Param({
1720
- name: 'list',
1721
- description: '指定列表',
1722
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1723
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1724
- }),
1725
- }),
1726
- ],
1727
- returns: [],
1728
- }),
1729
- new Function({
1730
- name: 'ListDistinctBy',
1731
- description: '按某几个属性为列表去除重复项。返回去除重复项后的列表',
1732
- params: [
1733
- new Param({
1734
- name: 'list',
1735
- description: '指定列表',
1736
- }),
1737
- new Param({
1738
- name: 'by',
1739
- description: '指定列表中项的某几个属性,若项无属性,则该函数不生效',
1740
- defaultExpression: new NewList({
1741
- name: 'ListDistinctByTargetDefaultExpression',
1742
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1743
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1744
- }),
1745
- items: [
1746
- new AnonymousFunction({
1747
- params: [
1748
- new Param({
1749
- name: 'item',
1750
- description: '是否忽略大小写',
1751
- typeAnnotation: null,
1752
- }),
1753
- ],
1754
- body: new Identifier(),
1755
- }),
1756
- ],
1757
- }),
1758
- }),
1759
- ],
1760
- returns: [new Return({
1761
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1762
- typeArguments: [
1763
- TypeAnnotation.createTypeParam('T'),
1764
- ],
1765
- }),
1766
- })],
1767
- }),
1768
- new Function({
1769
- name: 'ListGroupBy',
1770
- description: '按某个属性为列表分组。以选中的属性为 key 建立 Map 并返回。',
1771
- params: [
1772
- new Param({
1773
- name: 'list',
1774
- description: '指定列表',
1775
- }),
1776
- new Param({
1777
- name: 'by',
1778
- description: '指定列表中项的某个属性,若项无属性,则该函数不生效',
1779
- defaultExpression: new AnonymousFunction({
1780
- params: [
1781
- new Param({
1782
- name: 'item',
1783
- description: '是否忽略大小写',
1784
- typeAnnotation: null,
1785
- }),
1786
- ],
1787
- body: new Identifier(),
1788
- }),
1789
- }),
1790
- ],
1791
- returns: [new Return({
1792
- typeAnnotation: TypeAnnotation.createGeneric('map', {
1793
- typeArguments: [
1794
- TypeAnnotation.createTypeParam('K'),
1795
- TypeAnnotation.createGeneric('List', {
1796
- typeArguments: [TypeAnnotation.createTypeParam('A')],
1797
- }),
1798
- ],
1799
- }),
1800
- })],
1801
- }),
1802
- new Function({
1803
- name: 'ListSlice',
1804
- description: '将列表按照规则切片,返回切片后的子列表',
1805
- params: [
1806
- new Param({
1807
- name: 'list',
1808
- description: '指定列表',
1809
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1810
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1811
- }),
1812
- }),
1813
- new Param({
1814
- name: 'start',
1815
- description: '切片起始的索引,integer类型,项数索引从0开始',
1816
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1817
- }),
1818
- new Param({
1819
- name: 'end',
1820
- description: '切片结束的索引,integer类型,用数字表示第几项,项数索引从0开始',
1821
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1822
- }),
1823
- ],
1824
- returns: [
1825
- new Return({
1826
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1827
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1828
- }),
1829
- }),
1830
- ],
1831
- }),
1832
- new Function({
1833
- name: 'SliceToListPage',
1834
- description: '将列表按照规则切片,返回切片后的列表分页',
1835
- params: [
1836
- new Param({
1837
- name: 'list',
1838
- description: '指定列表',
1839
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1840
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1841
- }),
1842
- }),
1843
- new Param({
1844
- name: 'page',
1845
- description: '页数,integer类型,从1开始',
1846
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1847
- }),
1848
- new Param({
1849
- name: 'size',
1850
- description: '每页的大小,integer类型',
1851
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1852
- }),
1853
- ],
1854
- returns: [
1855
- new Return({
1856
- typeAnnotation: TypeAnnotation.createGeneric('PageOf', {
1857
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1858
- }),
1859
- }),
1860
- ],
1861
- }),
1862
- new Function({
1863
- name: 'New',
1864
- description: '根据参数选择的类型,返回该参数的实例化对象',
1865
- typeParams: [
1866
- new TypeParam({
1867
- name: 'T',
1868
- }),
1869
- ],
1870
- params: [
1871
- ],
1872
- returns: [
1873
- new Return({
1874
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1875
- }),
1876
- ],
1877
- }),
1878
- new Function({
1879
- name: 'Round',
1880
- description: '对指定的小数按指定的舍入模式进行舍入,返回舍入后的整数',
1881
- params: [
1882
- new Param({
1883
- name: 'value',
1884
- description: '被取整小数',
1885
- typeAnnotation: TypeAnnotation.createPrimitive('Decimal'),
1886
- }),
1887
- new Param({
1888
- name: 'mode',
1889
- description: '取整模式:HalfUp 四舍五入,如 -2.5 取整为 -3,2.5 取整为 3。TowardsZero 截断、向零取整:如 -2.6 取整为 -2,2.6 取整为 2。TowardsInfinity 进位、向正负无穷取整,如 -1.1 取整为 -2,1.1 取整为 2',
1890
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
1891
- defaultExpression: new StringLiteral({ value: 'HalfUp' }),
1892
- options: [
1893
- { text: 'HalfUp', value: 'HalfUp', description: '四舍五入' },
1894
- { text: 'TowardsZero', value: 'TowardsZero', description: '截断、向零取整,如 -2.6 取整为 -2' },
1895
- { text: 'Towardslnfinity', value: 'TowardsInfinity', description: '进位、向正负无穷取整,如 -1.1 取整为 -2' },
1896
- ],
1766
+ description: '是否忽略大小写',
1767
+ typeAnnotation: null,
1768
+ }),
1769
+ ],
1770
+ body: new Identifier(),
1771
+ }),
1772
+ ],
1773
+ }),
1774
+ }),
1775
+ ],
1776
+ returns: [new Return({
1777
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1778
+ typeArguments: [
1779
+ TypeAnnotation.createTypeParam('T'),
1780
+ ],
1781
+ }),
1782
+ })],
1783
+ }),
1784
+ new Function({
1785
+ name: 'ListGroupBy',
1786
+ description: '按某个属性为列表分组。以选中的属性为 key 建立 Map 并返回。',
1787
+ params: [
1788
+ new Param({
1789
+ name: 'list',
1790
+ description: '指定列表',
1791
+ }),
1792
+ new Param({
1793
+ name: 'by',
1794
+ description: '指定列表中项的某个属性,若项无属性,则该函数不生效',
1795
+ defaultExpression: new AnonymousFunction({
1796
+ params: [
1797
+ new Param({
1798
+ name: 'item',
1799
+ description: '是否忽略大小写',
1800
+ typeAnnotation: null,
1801
+ }),
1802
+ ],
1803
+ body: new Identifier(),
1804
+ }),
1805
+ }),
1806
+ ],
1807
+ returns: [new Return({
1808
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
1809
+ typeArguments: [
1810
+ TypeAnnotation.createTypeParam('K'),
1811
+ TypeAnnotation.createGeneric('List', {
1812
+ typeArguments: [TypeAnnotation.createTypeParam('A')],
1813
+ }),
1814
+ ],
1815
+ }),
1816
+ })],
1817
+ }),
1818
+ new Function({
1819
+ name: 'ListSlice',
1820
+ description: '将列表按照规则切片,返回切片后的子列表',
1821
+ params: [
1822
+ new Param({
1823
+ name: 'list',
1824
+ description: '指定列表',
1825
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1826
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1827
+ }),
1828
+ }),
1829
+ new Param({
1830
+ name: 'start',
1831
+ description: '切片起始的索引,integer类型,项数索引从0开始',
1832
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1833
+ }),
1834
+ new Param({
1835
+ name: 'end',
1836
+ description: '切片结束的索引,integer类型,用数字表示第几项,项数索引从0开始',
1837
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1838
+ }),
1839
+ ],
1840
+ returns: [
1841
+ new Return({
1842
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1843
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1844
+ }),
1845
+ }),
1846
+ ],
1847
+ }),
1848
+ new Function({
1849
+ name: 'SliceToListPage',
1850
+ description: '将列表按照规则切片,返回切片后的列表分页',
1851
+ params: [
1852
+ new Param({
1853
+ name: 'list',
1854
+ description: '指定列表',
1855
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1856
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1857
+ }),
1858
+ }),
1859
+ new Param({
1860
+ name: 'page',
1861
+ description: '页数,integer类型,从1开始',
1862
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1863
+ }),
1864
+ new Param({
1865
+ name: 'size',
1866
+ description: '每页的大小,integer类型',
1867
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1868
+ }),
1869
+ ],
1870
+ returns: [
1871
+ new Return({
1872
+ typeAnnotation: TypeAnnotation.createGeneric('PageOf', {
1873
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1874
+ }),
1875
+ }),
1876
+ ],
1877
+ }),
1878
+ new Function({
1879
+ name: 'New',
1880
+ description: '根据参数选择的类型,返回该参数的实例化对象',
1881
+ typeParams: [
1882
+ new TypeParam({
1883
+ name: 'T',
1884
+ }),
1885
+ ],
1886
+ params: [
1887
+ ],
1888
+ returns: [
1889
+ new Return({
1890
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1891
+ }),
1892
+ ],
1893
+ }),
1894
+ new Function({
1895
+ name: 'Round',
1896
+ description: '对指定的小数按指定的舍入模式进行舍入,返回舍入后的整数',
1897
+ params: [
1898
+ new Param({
1899
+ name: 'value',
1900
+ description: '被取整小数',
1901
+ typeAnnotation: TypeAnnotation.createPrimitive('Decimal'),
1902
+ }),
1903
+ new Param({
1904
+ name: 'mode',
1905
+ description: '取整模式:HalfUp 四舍五入,如 -2.5 取整为 -3,2.5 取整为 3。TowardsZero 截断、向零取整:如 -2.6 取整为 -2,2.6 取整为 2。TowardsInfinity 进位、向正负无穷取整,如 -1.1 取整为 -2,1.1 取整为 2',
1906
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
1907
+ defaultExpression: new StringLiteral({ value: 'HalfUp' }),
1908
+ options: [
1909
+ { text: 'HalfUp', value: 'HalfUp', description: '四舍五入' },
1910
+ { text: 'TowardsZero', value: 'TowardsZero', description: '截断、向零取整,如 -2.6 取整为 -2' },
1911
+ { text: 'Towardslnfinity', value: 'TowardsInfinity', description: '进位、向正负无穷取整,如 -1.1 取整为 -2' },
1912
+ ],
1897
1913
 
1898
- }),
1899
- ],
1900
- returns: [
1901
- new Return({
1902
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1903
- }),
1904
- ],
1905
1914
  }),
1906
- new Function({
1907
- name: 'HasValue',
1908
- description: '判断参数是否为有效值,null、空字符串、纯空格、长度为0的集合均不被视为有效值,传入多个参数时,判断是否全部都是有效值',
1909
- params: [
1910
- new Param({
1911
- name: 'param1',
1912
- description: '指定参数1',
1913
- typeAnnotation: TypeAnnotation.createPrimitive('Any'),
1914
- }),
1915
- ],
1916
- returns: [
1917
- new Return({
1918
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1919
- }),
1920
- ],
1921
- }),
1922
- new Function({
1923
- name: 'ListFindAsync',
1924
- description: '返回列表中第一个符合条件的项',
1925
- params: [
1926
- new Param({
1927
- name: 'list',
1928
- description: '指定列表',
1929
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1930
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1931
- }),
1932
- }),
1933
- new Param({
1934
- name: 'by',
1935
- description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1936
- defaultExpression: new AnonymousFunction({
1937
- params: [
1938
- new Param({
1939
- name: 'item',
1940
- typeAnnotation: null,
1941
- }),
1942
- ],
1943
- }),
1944
- }),
1945
- ],
1946
- returns: [
1947
- new Return({
1948
- typeAnnotation: TypeAnnotation.createTypeParam('T'),
1949
- }),
1950
- ],
1951
- }),
1952
- new Function({
1953
- name: 'ListSortAsync',
1954
- description: '(修改原数据)为列表按指定规则排序',
1955
- params: [
1956
- new Param({
1957
- name: 'list',
1958
- description: '指定列表',
1959
- typeAnnotation: TypeAnnotation.createGeneric('List', {
1960
- typeArguments: [TypeAnnotation.createTypeParam('T')],
1961
- }),
1962
- }),
1963
- new Param({
1964
- name: 'by',
1965
- description: '指定列表中项的某个属性或项本身,支持算数运算和比较运算',
1966
- defaultExpression: new AnonymousFunction({
1967
- params: [
1968
- new Param({
1969
- name: 'item',
1970
- typeAnnotation: null,
1971
- }),
1972
- ],
1973
- }),
1974
- }),
1975
- new Param({
1976
- name: 'sort',
1977
- description: '支持升序或降序设置,asc为升序,desc为降序。',
1978
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1979
- defaultValue: new DefaultValue({
1980
- expression: new BooleanLiteral({ value: 'true' }),
1981
- concept: 'DefaultValue',
1982
- }),
1983
- defaultExpression: new BooleanLiteral({ value: 'true' }),
1984
- options: [
1985
- { text: 'asc(升序)', value: 'true' },
1986
- { text: 'desc(降序)', value: 'false' },
1987
- ],
1988
- }),
1989
- ],
1990
- returns: [],
1991
- }),
1992
- new Function({
1993
- name: 'ListFilterAsync',
1994
- description: '筛选列表中符合条件的所有项,返回这些项构成的新的列表',
1995
- params: [
1996
- new Param({
1997
- name: 'list',
1998
- description: '指定列表',
1999
- }),
2000
- new Param({
2001
- name: 'by',
2002
- description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
2003
- defaultExpression: new AnonymousFunction({
2004
- params: [
2005
- new Param({
2006
- name: 'item',
2007
- typeAnnotation: null,
2008
- }),
2009
- ],
2010
- }),
2011
- }),
2012
- ],
2013
- returns: [
2014
- new Return({
2015
- name: 'list',
2016
- typeAnnotation: TypeAnnotation.createGeneric('List', {
2017
- typeArguments: [TypeAnnotation.createTypeParam('T')],
2018
- }),
2019
- }),
2020
- ],
2021
- }),
2022
- new Function({
2023
- name: 'ListFindIndexAsync',
2024
- description: '返回列表中第一个符合条件的项的索引值',
2025
- params: [
2026
- new Param({
2027
- name: 'list',
2028
- description: '指定列表',
2029
- typeAnnotation: TypeAnnotation.createGeneric('List', {
2030
- typeArguments: [TypeAnnotation.createTypeParam('T')],
2031
- }),
2032
- }),
2033
- new Param({
2034
- name: 'by',
2035
- description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
2036
- defaultExpression: new AnonymousFunction({
2037
- params: [
2038
- new Param({
2039
- name: 'item',
2040
- typeAnnotation: null,
2041
- }),
2042
- ],
2043
- }),
2044
- }),
2045
- ],
2046
- returns: [
2047
- new Return({
2048
- typeAnnotation: TypeAnnotation.createPrimitive('Long'),
2049
- }),
2050
- ],
2051
- }),
2052
- new Function({
2053
- name: 'ListDistinctByAsync',
2054
- description: '按某个属性为列表去除重复项。返回去除重复项后的列表',
2055
- params: [
2056
- new Param({
2057
- name: 'list',
2058
- description: '指定列表',
2059
- }),
2060
- new Param({
2061
- name: 'by',
2062
- description: '指定列表中项的某个属性,若项无属性,则该函数不生效',
2063
- defaultExpression: new AnonymousFunction({
2064
- params: [
2065
- new Param({
2066
- name: 'item',
2067
- description: '是否忽略大小写',
2068
- typeAnnotation: null,
2069
- }),
2070
- ],
2071
- body: new Identifier(),
2072
- }),
2073
- }),
2074
- ],
2075
- returns: [new Return({
2076
- typeAnnotation: TypeAnnotation.createGeneric('List', {
2077
- typeArguments: [
2078
- TypeAnnotation.createTypeParam('T'),
2079
- ],
2080
- }),
2081
- })],
2082
- }),
2083
- new Function({
2084
- name: 'ListGroupByAsync',
2085
- description: '按某个属性为列表分组。以选中的属性为 key 建立 Map 并返回。',
2086
- params: [
2087
- new Param({
2088
- name: 'list',
2089
- description: '指定列表',
2090
- }),
2091
- new Param({
2092
- name: 'by',
2093
- description: '指定列表中项的某个属性,若项无属性,则该函数不生效',
2094
- defaultExpression: new AnonymousFunction({
2095
- params: [
2096
- new Param({
2097
- name: 'item',
2098
- description: '是否忽略大小写',
2099
- typeAnnotation: null,
2100
- }),
2101
- ],
2102
- body: new Identifier(),
2103
- }),
2104
- }),
2105
- ],
2106
- returns: [new Return({
2107
- typeAnnotation: TypeAnnotation.createGeneric('map', {
2108
- typeArguments: [
2109
- TypeAnnotation.createTypeParam('K'),
2110
- TypeAnnotation.createGeneric('List', {
2111
- typeArguments: [TypeAnnotation.createTypeParam('A')],
2112
- }),
2113
- ],
2114
- }),
2115
- })],
2116
- }),
2117
- new Function({
2118
- name: 'ListTransformAsync',
2119
- description: '对列表的每一项调用函数 by,得到新项;返回新项构成的列表',
2120
- params: [
2121
- new Param({
2122
- name: 'list',
2123
- description: '指定列表',
2124
- }),
2125
- new Param({
2126
- name: 'by',
2127
- description: '指定对列表中项的某个属性或项本身的处理方式,支持算数运算和比较运算',
2128
- defaultExpression: new AnonymousFunction({
2129
- params: [
2130
- new Param({
2131
- name: 'item',
2132
- typeAnnotation: null,
2133
- }),
2134
- ],
2135
- }),
2136
- }),
2137
- ],
2138
- returns: [
2139
- new Return({
2140
- typeAnnotation: TypeAnnotation.createGeneric('List', {
2141
- typeArguments: [TypeAnnotation.createTypeParam('T')],
2142
- }),
2143
- }),
2144
- ],
1915
+ ],
1916
+ returns: [
1917
+ new Return({
1918
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
2145
1919
  }),
2146
- new Function({
2147
- name: 'MapFilterAsync',
2148
- description: '在指定Map中过滤出符合条件参数的Map列表',
2149
- params: [
2150
- new Param({
2151
- name: 'map',
2152
- description: '指定映射',
2153
- }),
2154
- new Param({
2155
- name: 'by',
2156
- description: '针对键值对的参数key和value设置过滤条件,支持算数运算、比较运算和逻辑运算',
2157
- defaultExpression: new AnonymousFunction({
2158
- params: [
2159
- new Param({
2160
- name: 'key',
2161
- typeAnnotation: null,
2162
- }),
2163
- new Param({
2164
- name: 'value',
2165
- typeAnnotation: null,
2166
- }),
2167
- ],
2168
- }),
2169
- }),
2170
- ],
2171
- returns: [
2172
- new Return({
2173
- typeAnnotation: TypeAnnotation.createGeneric('map', {
2174
- typeArguments: [
2175
- TypeAnnotation.createTypeParam('K'),
2176
- TypeAnnotation.createTypeParam('V'),
2177
- ],
2178
- }),
2179
- }),
2180
- ],
2181
- }),
2182
- new Function({
2183
- name: 'MapTransformAsync',
2184
- description: '对 Map 的每一项调用函数 by,得到新项,并返回新项构成的 Map。(Map 的每一项从 (K0, V0) 变为 (K, V)。)',
2185
- params: [
2186
- new Param({
2187
- name: 'map',
2188
- description: '指定映射',
2189
- }),
2190
- new Param({
2191
- name: 'by',
2192
- description: `指定映射中键值对的参数处理方式,支持算数运算和比较运算`,
2193
- defaultExpression: new AnonymousFunction({
2194
- params: [
2195
- new Param({
2196
- name: 'key',
2197
- typeAnnotation: null,
2198
- }),
2199
- new Param({
2200
- name: 'value',
2201
- typeAnnotation: null,
2202
- }),
2203
- ],
2204
- body: new Identifier({
2205
- name: 'key',
2206
- }),
2207
- }),
2208
- }),
2209
- new Param({
2210
- name: 'byVal',
2211
- defaultExpression: new AnonymousFunction({
2212
- params: [
2213
- new Param({
2214
- name: 'key',
2215
- typeAnnotation: null,
2216
- }),
2217
- new Param({
2218
- name: 'value',
2219
- typeAnnotation: null,
2220
- }),
2221
- ],
2222
- }),
2223
- }),
2224
- ],
2225
- returns: [
2226
- new Return({
2227
- typeAnnotation: TypeAnnotation.createGeneric('Map', {
2228
- typeArguments: [TypeAnnotation.createTypeParam('K'), TypeAnnotation.createTypeParam('V')],
2229
- }),
2230
- }),
2231
- ],
2232
- }),
2233
- new Function({
2234
- name: 'ListToMapAsync',
2235
- description: '选取列表项的某些属性,根据这些属性将列表变为 Map 并返回',
2236
- params: [
2237
- new Param({
2238
- name: 'list',
2239
- description: '指定列表',
2240
- }),
2241
- new Param({
2242
- name: 'by',
2243
- description: `根据项的属性及其本身进行key和value的定义`,
2244
- defaultExpression: new AnonymousFunction({
2245
- params: [
2246
- new Param({
2247
- name: 'item',
2248
- typeAnnotation: null,
2249
- }),
2250
- ],
2251
- body: new Identifier(),
2252
- }),
2253
- }),
2254
- new Param({
2255
- name: 'byVal',
2256
- defaultExpression: new AnonymousFunction({
2257
- params: [
2258
- new Param({
2259
- name: 'item',
2260
- typeAnnotation: null,
2261
- }),
2262
- ],
2263
- body: new Identifier(),
2264
- }),
2265
- }),
2266
- ],
2267
- }),
2268
- ],
2269
- });
1920
+ ],
1921
+ }),
1922
+ new Function({
1923
+ name: 'HasValue',
1924
+ description: '判断参数是否为有效值,null、空字符串、纯空格、长度为0的集合均不被视为有效值,传入多个参数时,判断是否全部都是有效值',
1925
+ params: [
1926
+ new Param({
1927
+ name: 'param1',
1928
+ description: '指定参数1',
1929
+ typeAnnotation: TypeAnnotation.createPrimitive('Any'),
1930
+ }),
1931
+ ],
1932
+ returns: [
1933
+ new Return({
1934
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1935
+ }),
1936
+ ],
1937
+ }),
1938
+ new Function({
1939
+ name: 'ListFindAsync',
1940
+ description: '返回列表中第一个符合条件的项',
1941
+ params: [
1942
+ new Param({
1943
+ name: 'list',
1944
+ description: '指定列表',
1945
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1946
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1947
+ }),
1948
+ }),
1949
+ new Param({
1950
+ name: 'by',
1951
+ description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
1952
+ defaultExpression: new AnonymousFunction({
1953
+ params: [
1954
+ new Param({
1955
+ name: 'item',
1956
+ typeAnnotation: null,
1957
+ }),
1958
+ ],
1959
+ }),
1960
+ }),
1961
+ ],
1962
+ returns: [
1963
+ new Return({
1964
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
1965
+ }),
1966
+ ],
1967
+ }),
1968
+ new Function({
1969
+ name: 'ListSortAsync',
1970
+ description: '(修改原数据)为列表按指定规则排序',
1971
+ params: [
1972
+ new Param({
1973
+ name: 'list',
1974
+ description: '指定列表',
1975
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1976
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1977
+ }),
1978
+ }),
1979
+ new Param({
1980
+ name: 'by',
1981
+ description: '指定列表中项的某个属性或项本身,支持算数运算和比较运算',
1982
+ defaultExpression: new AnonymousFunction({
1983
+ params: [
1984
+ new Param({
1985
+ name: 'item',
1986
+ typeAnnotation: null,
1987
+ }),
1988
+ ],
1989
+ }),
1990
+ }),
1991
+ new Param({
1992
+ name: 'sort',
1993
+ description: '支持升序或降序设置,asc为升序,desc为降序。',
1994
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
1995
+ defaultValue: new DefaultValue({
1996
+ expression: new BooleanLiteral({ value: 'true' }),
1997
+ concept: 'DefaultValue',
1998
+ }),
1999
+ defaultExpression: new BooleanLiteral({ value: 'true' }),
2000
+ options: [
2001
+ { text: 'asc(升序)', value: 'true' },
2002
+ { text: 'desc(降序)', value: 'false' },
2003
+ ],
2004
+ }),
2005
+ ],
2006
+ returns: [],
2007
+ }),
2008
+ new Function({
2009
+ name: 'ListFilterAsync',
2010
+ description: '筛选列表中符合条件的所有项,返回这些项构成的新的列表',
2011
+ params: [
2012
+ new Param({
2013
+ name: 'list',
2014
+ description: '指定列表',
2015
+ }),
2016
+ new Param({
2017
+ name: 'by',
2018
+ description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
2019
+ defaultExpression: new AnonymousFunction({
2020
+ params: [
2021
+ new Param({
2022
+ name: 'item',
2023
+ typeAnnotation: null,
2024
+ }),
2025
+ ],
2026
+ }),
2027
+ }),
2028
+ ],
2029
+ returns: [
2030
+ new Return({
2031
+ name: 'list',
2032
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
2033
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
2034
+ }),
2035
+ }),
2036
+ ],
2037
+ }),
2038
+ new Function({
2039
+ name: 'ListFindIndexAsync',
2040
+ description: '返回列表中第一个符合条件的项的索引值',
2041
+ params: [
2042
+ new Param({
2043
+ name: 'list',
2044
+ description: '指定列表',
2045
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
2046
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
2047
+ }),
2048
+ }),
2049
+ new Param({
2050
+ name: 'by',
2051
+ description: '指定列表中项的某个属性或项本身,通过算数运算、比较运算或逻辑运算进行条件判断并输出布尔值',
2052
+ defaultExpression: new AnonymousFunction({
2053
+ params: [
2054
+ new Param({
2055
+ name: 'item',
2056
+ typeAnnotation: null,
2057
+ }),
2058
+ ],
2059
+ }),
2060
+ }),
2061
+ ],
2062
+ returns: [
2063
+ new Return({
2064
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
2065
+ }),
2066
+ ],
2067
+ }),
2068
+ new Function({
2069
+ name: 'ListDistinctByAsync',
2070
+ description: '按某个属性为列表去除重复项。返回去除重复项后的列表',
2071
+ params: [
2072
+ new Param({
2073
+ name: 'list',
2074
+ description: '指定列表',
2075
+ }),
2076
+ new Param({
2077
+ name: 'by',
2078
+ description: '指定列表中项的某个属性,若项无属性,则该函数不生效',
2079
+ defaultExpression: new AnonymousFunction({
2080
+ params: [
2081
+ new Param({
2082
+ name: 'item',
2083
+ description: '是否忽略大小写',
2084
+ typeAnnotation: null,
2085
+ }),
2086
+ ],
2087
+ body: new Identifier(),
2088
+ }),
2089
+ }),
2090
+ ],
2091
+ returns: [new Return({
2092
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
2093
+ typeArguments: [
2094
+ TypeAnnotation.createTypeParam('T'),
2095
+ ],
2096
+ }),
2097
+ })],
2098
+ }),
2099
+ new Function({
2100
+ name: 'ListGroupByAsync',
2101
+ description: '按某个属性为列表分组。以选中的属性为 key 建立 Map 并返回。',
2102
+ params: [
2103
+ new Param({
2104
+ name: 'list',
2105
+ description: '指定列表',
2106
+ }),
2107
+ new Param({
2108
+ name: 'by',
2109
+ description: '指定列表中项的某个属性,若项无属性,则该函数不生效',
2110
+ defaultExpression: new AnonymousFunction({
2111
+ params: [
2112
+ new Param({
2113
+ name: 'item',
2114
+ description: '是否忽略大小写',
2115
+ typeAnnotation: null,
2116
+ }),
2117
+ ],
2118
+ body: new Identifier(),
2119
+ }),
2120
+ }),
2121
+ ],
2122
+ returns: [new Return({
2123
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
2124
+ typeArguments: [
2125
+ TypeAnnotation.createTypeParam('K'),
2126
+ TypeAnnotation.createGeneric('List', {
2127
+ typeArguments: [TypeAnnotation.createTypeParam('A')],
2128
+ }),
2129
+ ],
2130
+ }),
2131
+ })],
2132
+ }),
2133
+ new Function({
2134
+ name: 'ListTransformAsync',
2135
+ description: '对列表的每一项调用函数 by,得到新项;返回新项构成的列表',
2136
+ params: [
2137
+ new Param({
2138
+ name: 'list',
2139
+ description: '指定列表',
2140
+ }),
2141
+ new Param({
2142
+ name: 'by',
2143
+ description: '指定对列表中项的某个属性或项本身的处理方式,支持算数运算和比较运算',
2144
+ defaultExpression: new AnonymousFunction({
2145
+ params: [
2146
+ new Param({
2147
+ name: 'item',
2148
+ typeAnnotation: null,
2149
+ }),
2150
+ ],
2151
+ }),
2152
+ }),
2153
+ ],
2154
+ returns: [
2155
+ new Return({
2156
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
2157
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
2158
+ }),
2159
+ }),
2160
+ ],
2161
+ }),
2162
+ new Function({
2163
+ name: 'MapFilterAsync',
2164
+ description: '在指定Map中过滤出符合条件参数的Map列表',
2165
+ params: [
2166
+ new Param({
2167
+ name: 'map',
2168
+ description: '指定映射',
2169
+ }),
2170
+ new Param({
2171
+ name: 'by',
2172
+ description: '针对键值对的参数key和value设置过滤条件,支持算数运算、比较运算和逻辑运算',
2173
+ defaultExpression: new AnonymousFunction({
2174
+ params: [
2175
+ new Param({
2176
+ name: 'key',
2177
+ typeAnnotation: null,
2178
+ }),
2179
+ new Param({
2180
+ name: 'value',
2181
+ typeAnnotation: null,
2182
+ }),
2183
+ ],
2184
+ }),
2185
+ }),
2186
+ ],
2187
+ returns: [
2188
+ new Return({
2189
+ typeAnnotation: TypeAnnotation.createGeneric('map', {
2190
+ typeArguments: [
2191
+ TypeAnnotation.createTypeParam('K'),
2192
+ TypeAnnotation.createTypeParam('V'),
2193
+ ],
2194
+ }),
2195
+ }),
2196
+ ],
2197
+ }),
2198
+ new Function({
2199
+ name: 'MapTransformAsync',
2200
+ description: '对 Map 的每一项调用函数 by,得到新项,并返回新项构成的 Map。(Map 的每一项从 (K0, V0) 变为 (K, V)。)',
2201
+ params: [
2202
+ new Param({
2203
+ name: 'map',
2204
+ description: '指定映射',
2205
+ }),
2206
+ new Param({
2207
+ name: 'by',
2208
+ description: `指定映射中键值对的参数处理方式,支持算数运算和比较运算`,
2209
+ defaultExpression: new AnonymousFunction({
2210
+ params: [
2211
+ new Param({
2212
+ name: 'key',
2213
+ typeAnnotation: null,
2214
+ }),
2215
+ new Param({
2216
+ name: 'value',
2217
+ typeAnnotation: null,
2218
+ }),
2219
+ ],
2220
+ body: new Identifier({
2221
+ name: 'key',
2222
+ }),
2223
+ }),
2224
+ }),
2225
+ new Param({
2226
+ name: 'byVal',
2227
+ defaultExpression: new AnonymousFunction({
2228
+ params: [
2229
+ new Param({
2230
+ name: 'key',
2231
+ typeAnnotation: null,
2232
+ }),
2233
+ new Param({
2234
+ name: 'value',
2235
+ typeAnnotation: null,
2236
+ }),
2237
+ ],
2238
+ }),
2239
+ }),
2240
+ ],
2241
+ returns: [
2242
+ new Return({
2243
+ typeAnnotation: TypeAnnotation.createGeneric('Map', {
2244
+ typeArguments: [TypeAnnotation.createTypeParam('K'), TypeAnnotation.createTypeParam('V')],
2245
+ }),
2246
+ }),
2247
+ ],
2248
+ }),
2249
+ new Function({
2250
+ name: 'ListToMapAsync',
2251
+ description: '选取列表项的某些属性,根据这些属性将列表变为 Map 并返回',
2252
+ params: [
2253
+ new Param({
2254
+ name: 'list',
2255
+ description: '指定列表',
2256
+ }),
2257
+ new Param({
2258
+ name: 'by',
2259
+ description: `根据项的属性及其本身进行key和value的定义`,
2260
+ defaultExpression: new AnonymousFunction({
2261
+ params: [
2262
+ new Param({
2263
+ name: 'item',
2264
+ typeAnnotation: null,
2265
+ }),
2266
+ ],
2267
+ body: new Identifier(),
2268
+ }),
2269
+ }),
2270
+ new Param({
2271
+ name: 'byVal',
2272
+ defaultExpression: new AnonymousFunction({
2273
+ params: [
2274
+ new Param({
2275
+ name: 'item',
2276
+ typeAnnotation: null,
2277
+ }),
2278
+ ],
2279
+ body: new Identifier(),
2280
+ }),
2281
+ }),
2282
+ ],
2283
+ }),
2284
+ ];
2285
+
2286
+ logics.forEach((logic) => utilNamespace.addLogic(logic));
2287
+ functions.forEach((func) => utilNamespace.addFunction(func));
2288
+ }