@celljs/core 3.0.0

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 (550) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/cell-remote.yml +3 -0
  4. package/cell.yml +15 -0
  5. package/lib/browser/application/frontend-application-state.d.ts +5 -0
  6. package/lib/browser/application/frontend-application-state.d.ts.map +1 -0
  7. package/lib/browser/application/frontend-application-state.js +17 -0
  8. package/lib/browser/application/frontend-application-state.js.map +1 -0
  9. package/lib/browser/application/frontend-application.d.ts +31 -0
  10. package/lib/browser/application/frontend-application.d.ts.map +1 -0
  11. package/lib/browser/application/frontend-application.js +145 -0
  12. package/lib/browser/application/frontend-application.js.map +1 -0
  13. package/lib/browser/application/index.d.ts +3 -0
  14. package/lib/browser/application/index.d.ts.map +1 -0
  15. package/lib/browser/application/index.js +19 -0
  16. package/lib/browser/application/index.js.map +1 -0
  17. package/lib/browser/browser.d.ts +23 -0
  18. package/lib/browser/browser.d.ts.map +1 -0
  19. package/lib/browser/browser.js +53 -0
  20. package/lib/browser/browser.js.map +1 -0
  21. package/lib/browser/index.d.ts +4 -0
  22. package/lib/browser/index.d.ts.map +1 -0
  23. package/lib/browser/index.js +20 -0
  24. package/lib/browser/index.js.map +1 -0
  25. package/lib/browser/shell/application-shell.d.ts +5 -0
  26. package/lib/browser/shell/application-shell.d.ts.map +1 -0
  27. package/lib/browser/shell/application-shell.js +21 -0
  28. package/lib/browser/shell/application-shell.js.map +1 -0
  29. package/lib/browser/shell/index.d.ts +3 -0
  30. package/lib/browser/shell/index.d.ts.map +1 -0
  31. package/lib/browser/shell/index.js +19 -0
  32. package/lib/browser/shell/index.js.map +1 -0
  33. package/lib/browser/shell/shell-protocol.d.ts +5 -0
  34. package/lib/browser/shell/shell-protocol.d.ts.map +1 -0
  35. package/lib/browser/shell/shell-protocol.js +5 -0
  36. package/lib/browser/shell/shell-protocol.js.map +1 -0
  37. package/lib/browser/static-module.d.ts +4 -0
  38. package/lib/browser/static-module.d.ts.map +1 -0
  39. package/lib/browser/static-module.js +6 -0
  40. package/lib/browser/static-module.js.map +1 -0
  41. package/lib/common/annotation/aspect.d.ts +8 -0
  42. package/lib/common/annotation/aspect.d.ts.map +1 -0
  43. package/lib/common/annotation/aspect.js +14 -0
  44. package/lib/common/annotation/aspect.js.map +1 -0
  45. package/lib/common/annotation/autowired-provider.d.ts +8 -0
  46. package/lib/common/annotation/autowired-provider.d.ts.map +1 -0
  47. package/lib/common/annotation/autowired-provider.js +31 -0
  48. package/lib/common/annotation/autowired-provider.js.map +1 -0
  49. package/lib/common/annotation/autowired.d.ts +23 -0
  50. package/lib/common/annotation/autowired.d.ts.map +1 -0
  51. package/lib/common/annotation/autowired.js +55 -0
  52. package/lib/common/annotation/autowired.js.map +1 -0
  53. package/lib/common/annotation/component.d.ts +58 -0
  54. package/lib/common/annotation/component.d.ts.map +1 -0
  55. package/lib/common/annotation/component.js +71 -0
  56. package/lib/common/annotation/component.js.map +1 -0
  57. package/lib/common/annotation/constant.d.ts +9 -0
  58. package/lib/common/annotation/constant.d.ts.map +1 -0
  59. package/lib/common/annotation/constant.js +17 -0
  60. package/lib/common/annotation/constant.js.map +1 -0
  61. package/lib/common/annotation/decorate.d.ts +2 -0
  62. package/lib/common/annotation/decorate.d.ts.map +1 -0
  63. package/lib/common/annotation/decorate.js +6 -0
  64. package/lib/common/annotation/decorate.js.map +1 -0
  65. package/lib/common/annotation/detached/autowired-provider.d.ts +3 -0
  66. package/lib/common/annotation/detached/autowired-provider.d.ts.map +1 -0
  67. package/lib/common/annotation/detached/autowired-provider.js +16 -0
  68. package/lib/common/annotation/detached/autowired-provider.js.map +1 -0
  69. package/lib/common/annotation/detached/autowired.d.ts +3 -0
  70. package/lib/common/annotation/detached/autowired.d.ts.map +1 -0
  71. package/lib/common/annotation/detached/autowired.js +13 -0
  72. package/lib/common/annotation/detached/autowired.js.map +1 -0
  73. package/lib/common/annotation/detached/index.d.ts +4 -0
  74. package/lib/common/annotation/detached/index.d.ts.map +1 -0
  75. package/lib/common/annotation/detached/index.js +20 -0
  76. package/lib/common/annotation/detached/index.js.map +1 -0
  77. package/lib/common/annotation/detached/value.d.ts +3 -0
  78. package/lib/common/annotation/detached/value.d.ts.map +1 -0
  79. package/lib/common/annotation/detached/value.js +13 -0
  80. package/lib/common/annotation/detached/value.js.map +1 -0
  81. package/lib/common/annotation/index.d.ts +18 -0
  82. package/lib/common/annotation/index.d.ts.map +1 -0
  83. package/lib/common/annotation/index.js +34 -0
  84. package/lib/common/annotation/index.js.map +1 -0
  85. package/lib/common/annotation/inject.d.ts +2 -0
  86. package/lib/common/annotation/inject.d.ts.map +1 -0
  87. package/lib/common/annotation/inject.js +6 -0
  88. package/lib/common/annotation/inject.js.map +1 -0
  89. package/lib/common/annotation/injectable.d.ts +2 -0
  90. package/lib/common/annotation/injectable.d.ts.map +1 -0
  91. package/lib/common/annotation/injectable.js +6 -0
  92. package/lib/common/annotation/injectable.js.map +1 -0
  93. package/lib/common/annotation/named.d.ts +2 -0
  94. package/lib/common/annotation/named.d.ts.map +1 -0
  95. package/lib/common/annotation/named.js +6 -0
  96. package/lib/common/annotation/named.js.map +1 -0
  97. package/lib/common/annotation/optional.d.ts +2 -0
  98. package/lib/common/annotation/optional.d.ts.map +1 -0
  99. package/lib/common/annotation/optional.js +6 -0
  100. package/lib/common/annotation/optional.js.map +1 -0
  101. package/lib/common/annotation/post-construct.d.ts +2 -0
  102. package/lib/common/annotation/post-construct.d.ts.map +1 -0
  103. package/lib/common/annotation/post-construct.js +6 -0
  104. package/lib/common/annotation/post-construct.js.map +1 -0
  105. package/lib/common/annotation/pre-destroy.d.ts +2 -0
  106. package/lib/common/annotation/pre-destroy.d.ts.map +1 -0
  107. package/lib/common/annotation/pre-destroy.js +6 -0
  108. package/lib/common/annotation/pre-destroy.js.map +1 -0
  109. package/lib/common/annotation/service.d.ts +5 -0
  110. package/lib/common/annotation/service.d.ts.map +1 -0
  111. package/lib/common/annotation/service.js +18 -0
  112. package/lib/common/annotation/service.js.map +1 -0
  113. package/lib/common/annotation/tagged.d.ts +2 -0
  114. package/lib/common/annotation/tagged.d.ts.map +1 -0
  115. package/lib/common/annotation/tagged.js +6 -0
  116. package/lib/common/annotation/tagged.js.map +1 -0
  117. package/lib/common/annotation/target-name.d.ts +2 -0
  118. package/lib/common/annotation/target-name.d.ts.map +1 -0
  119. package/lib/common/annotation/target-name.js +6 -0
  120. package/lib/common/annotation/target-name.js.map +1 -0
  121. package/lib/common/annotation/unmanaged.d.ts +2 -0
  122. package/lib/common/annotation/unmanaged.d.ts.map +1 -0
  123. package/lib/common/annotation/unmanaged.js +6 -0
  124. package/lib/common/annotation/unmanaged.js.map +1 -0
  125. package/lib/common/annotation/value.d.ts +16 -0
  126. package/lib/common/annotation/value.d.ts.map +1 -0
  127. package/lib/common/annotation/value.js +58 -0
  128. package/lib/common/annotation/value.js.map +1 -0
  129. package/lib/common/aop/aop-protocol.d.ts +41 -0
  130. package/lib/common/aop/aop-protocol.d.ts.map +1 -0
  131. package/lib/common/aop/aop-protocol.js +11 -0
  132. package/lib/common/aop/aop-protocol.js.map +1 -0
  133. package/lib/common/aop/aop-proxy-factory.d.ts +7 -0
  134. package/lib/common/aop/aop-proxy-factory.d.ts.map +1 -0
  135. package/lib/common/aop/aop-proxy-factory.js +70 -0
  136. package/lib/common/aop/aop-proxy-factory.js.map +1 -0
  137. package/lib/common/aop/class-filter.d.ts +7 -0
  138. package/lib/common/aop/class-filter.d.ts.map +1 -0
  139. package/lib/common/aop/class-filter.js +31 -0
  140. package/lib/common/aop/class-filter.js.map +1 -0
  141. package/lib/common/aop/index.d.ts +4 -0
  142. package/lib/common/aop/index.d.ts.map +1 -0
  143. package/lib/common/aop/index.js +20 -0
  144. package/lib/common/aop/index.js.map +1 -0
  145. package/lib/common/application/application-entry.d.ts +2 -0
  146. package/lib/common/application/application-entry.d.ts.map +1 -0
  147. package/lib/common/application/application-entry.js +16 -0
  148. package/lib/common/application/application-entry.js.map +1 -0
  149. package/lib/common/application/application-error.d.ts +21 -0
  150. package/lib/common/application/application-error.d.ts.map +1 -0
  151. package/lib/common/application/application-error.js +47 -0
  152. package/lib/common/application/application-error.js.map +1 -0
  153. package/lib/common/application/application-factory.d.ts +8 -0
  154. package/lib/common/application/application-factory.d.ts.map +1 -0
  155. package/lib/common/application/application-factory.js +23 -0
  156. package/lib/common/application/application-factory.js.map +1 -0
  157. package/lib/common/application/application-protocol.d.ts +54 -0
  158. package/lib/common/application/application-protocol.d.ts.map +1 -0
  159. package/lib/common/application/application-protocol.js +108 -0
  160. package/lib/common/application/application-protocol.js.map +1 -0
  161. package/lib/common/application/application-state.d.ts +4 -0
  162. package/lib/common/application/application-state.d.ts.map +1 -0
  163. package/lib/common/application/application-state.js +18 -0
  164. package/lib/common/application/application-state.js.map +1 -0
  165. package/lib/common/application/application.d.ts +7 -0
  166. package/lib/common/application/application.d.ts.map +1 -0
  167. package/lib/common/application/application.js +34 -0
  168. package/lib/common/application/application.js.map +1 -0
  169. package/lib/common/application/index.d.ts +3 -0
  170. package/lib/common/application/index.d.ts.map +1 -0
  171. package/lib/common/application/index.js +19 -0
  172. package/lib/common/application/index.js.map +1 -0
  173. package/lib/common/config/config-protocol.d.ts +5 -0
  174. package/lib/common/config/config-protocol.d.ts.map +1 -0
  175. package/lib/common/config/config-protocol.js +5 -0
  176. package/lib/common/config/config-protocol.js.map +1 -0
  177. package/lib/common/config/config-provider.d.ts +7 -0
  178. package/lib/common/config/config-provider.d.ts.map +1 -0
  179. package/lib/common/config/config-provider.js +29 -0
  180. package/lib/common/config/config-provider.js.map +1 -0
  181. package/lib/common/config/config-util.d.ts +5 -0
  182. package/lib/common/config/config-util.d.ts.map +1 -0
  183. package/lib/common/config/config-util.js +19 -0
  184. package/lib/common/config/config-util.js.map +1 -0
  185. package/lib/common/config/dynamic-config.d.ts +4 -0
  186. package/lib/common/config/dynamic-config.d.ts.map +1 -0
  187. package/lib/common/config/dynamic-config.js +6 -0
  188. package/lib/common/config/dynamic-config.js.map +1 -0
  189. package/lib/common/config/index.d.ts +4 -0
  190. package/lib/common/config/index.d.ts.map +1 -0
  191. package/lib/common/config/index.js +20 -0
  192. package/lib/common/config/index.js.map +1 -0
  193. package/lib/common/constants.d.ts +6 -0
  194. package/lib/common/constants.d.ts.map +1 -0
  195. package/lib/common/constants.js +9 -0
  196. package/lib/common/constants.js.map +1 -0
  197. package/lib/common/container/auto-bind.d.ts +4 -0
  198. package/lib/common/container/auto-bind.d.ts.map +1 -0
  199. package/lib/common/container/auto-bind.js +103 -0
  200. package/lib/common/container/auto-bind.js.map +1 -0
  201. package/lib/common/container/container-factory.d.ts +5 -0
  202. package/lib/common/container/container-factory.d.ts.map +1 -0
  203. package/lib/common/container/container-factory.js +13 -0
  204. package/lib/common/container/container-factory.js.map +1 -0
  205. package/lib/common/container/container-provider.d.ts +7 -0
  206. package/lib/common/container/container-provider.d.ts.map +1 -0
  207. package/lib/common/container/container-provider.js +26 -0
  208. package/lib/common/container/container-provider.js.map +1 -0
  209. package/lib/common/container/container-util.d.ts +10 -0
  210. package/lib/common/container/container-util.d.ts.map +1 -0
  211. package/lib/common/container/container-util.js +32 -0
  212. package/lib/common/container/container-util.js.map +1 -0
  213. package/lib/common/container/dynamic-container.d.ts +3 -0
  214. package/lib/common/container/dynamic-container.d.ts.map +1 -0
  215. package/lib/common/container/dynamic-container.js +7 -0
  216. package/lib/common/container/dynamic-container.js.map +1 -0
  217. package/lib/common/container/index.d.ts +9 -0
  218. package/lib/common/container/index.d.ts.map +1 -0
  219. package/lib/common/container/index.js +22 -0
  220. package/lib/common/container/index.js.map +1 -0
  221. package/lib/common/container/scope.d.ts +6 -0
  222. package/lib/common/container/scope.d.ts.map +1 -0
  223. package/lib/common/container/scope.js +10 -0
  224. package/lib/common/container/scope.js.map +1 -0
  225. package/lib/common/el/core-context-initializer.d.ts +7 -0
  226. package/lib/common/el/core-context-initializer.d.ts.map +1 -0
  227. package/lib/common/el/core-context-initializer.js +39 -0
  228. package/lib/common/el/core-context-initializer.js.map +1 -0
  229. package/lib/common/el/expression-compiler.d.ts +18 -0
  230. package/lib/common/el/expression-compiler.d.ts.map +1 -0
  231. package/lib/common/el/expression-compiler.js +171 -0
  232. package/lib/common/el/expression-compiler.js.map +1 -0
  233. package/lib/common/el/expression-context-provider.d.ts +10 -0
  234. package/lib/common/el/expression-context-provider.d.ts.map +1 -0
  235. package/lib/common/el/expression-context-provider.js +46 -0
  236. package/lib/common/el/expression-context-provider.js.map +1 -0
  237. package/lib/common/el/expression-handler.d.ts +12 -0
  238. package/lib/common/el/expression-handler.d.ts.map +1 -0
  239. package/lib/common/el/expression-handler.js +97 -0
  240. package/lib/common/el/expression-handler.js.map +1 -0
  241. package/lib/common/el/expression-protocol.d.ts +25 -0
  242. package/lib/common/el/expression-protocol.d.ts.map +1 -0
  243. package/lib/common/el/expression-protocol.js +9 -0
  244. package/lib/common/el/expression-protocol.js.map +1 -0
  245. package/lib/common/el/index.d.ts +7 -0
  246. package/lib/common/el/index.d.ts.map +1 -0
  247. package/lib/common/el/index.js +23 -0
  248. package/lib/common/el/index.js.map +1 -0
  249. package/lib/common/el/jexl-engine-provider.d.ts +6 -0
  250. package/lib/common/el/jexl-engine-provider.d.ts.map +1 -0
  251. package/lib/common/el/jexl-engine-provider.js +25 -0
  252. package/lib/common/el/jexl-engine-provider.js.map +1 -0
  253. package/lib/common/error/cutom-error.d.ts +4 -0
  254. package/lib/common/error/cutom-error.d.ts.map +1 -0
  255. package/lib/common/error/cutom-error.js +8 -0
  256. package/lib/common/error/cutom-error.js.map +1 -0
  257. package/lib/common/error/error-protocol.d.ts +4 -0
  258. package/lib/common/error/error-protocol.d.ts.map +1 -0
  259. package/lib/common/error/error-protocol.js +3 -0
  260. package/lib/common/error/error-protocol.js.map +1 -0
  261. package/lib/common/error/illegal-argument-error.d.ts +4 -0
  262. package/lib/common/error/illegal-argument-error.d.ts.map +1 -0
  263. package/lib/common/error/illegal-argument-error.js +8 -0
  264. package/lib/common/error/illegal-argument-error.js.map +1 -0
  265. package/lib/common/error/index.d.ts +4 -0
  266. package/lib/common/error/index.d.ts.map +1 -0
  267. package/lib/common/error/index.js +20 -0
  268. package/lib/common/error/index.js.map +1 -0
  269. package/lib/common/index.d.ts +13 -0
  270. package/lib/common/index.d.ts.map +1 -0
  271. package/lib/common/index.js +29 -0
  272. package/lib/common/index.js.map +1 -0
  273. package/lib/common/logger/abstract-logger.d.ts +14 -0
  274. package/lib/common/logger/abstract-logger.d.ts.map +1 -0
  275. package/lib/common/logger/abstract-logger.js +39 -0
  276. package/lib/common/logger/abstract-logger.js.map +1 -0
  277. package/lib/common/logger/index.d.ts +4 -0
  278. package/lib/common/logger/index.d.ts.map +1 -0
  279. package/lib/common/logger/index.js +20 -0
  280. package/lib/common/logger/index.js.map +1 -0
  281. package/lib/common/logger/logger-protocol.d.ts +16 -0
  282. package/lib/common/logger/logger-protocol.d.ts.map +1 -0
  283. package/lib/common/logger/logger-protocol.js +8 -0
  284. package/lib/common/logger/logger-protocol.js.map +1 -0
  285. package/lib/common/logger/logger.d.ts +8 -0
  286. package/lib/common/logger/logger.d.ts.map +1 -0
  287. package/lib/common/logger/logger.js +38 -0
  288. package/lib/common/logger/logger.js.map +1 -0
  289. package/lib/common/provider/component-filter-registry.d.ts +12 -0
  290. package/lib/common/provider/component-filter-registry.d.ts.map +1 -0
  291. package/lib/common/provider/component-filter-registry.js +69 -0
  292. package/lib/common/provider/component-filter-registry.js.map +1 -0
  293. package/lib/common/provider/index.d.ts +6 -0
  294. package/lib/common/provider/index.d.ts.map +1 -0
  295. package/lib/common/provider/index.js +22 -0
  296. package/lib/common/provider/index.js.map +1 -0
  297. package/lib/common/provider/provider-creator.d.ts +7 -0
  298. package/lib/common/provider/provider-creator.d.ts.map +1 -0
  299. package/lib/common/provider/provider-creator.js +22 -0
  300. package/lib/common/provider/provider-creator.js.map +1 -0
  301. package/lib/common/provider/provider-protocol.d.ts +49 -0
  302. package/lib/common/provider/provider-protocol.d.ts.map +1 -0
  303. package/lib/common/provider/provider-protocol.js +8 -0
  304. package/lib/common/provider/provider-protocol.js.map +1 -0
  305. package/lib/common/provider/provider-util.d.ts +6 -0
  306. package/lib/common/provider/provider-util.d.ts.map +1 -0
  307. package/lib/common/provider/provider-util.js +13 -0
  308. package/lib/common/provider/provider-util.js.map +1 -0
  309. package/lib/common/provider/provider.d.ts +14 -0
  310. package/lib/common/provider/provider.d.ts.map +1 -0
  311. package/lib/common/provider/provider.js +58 -0
  312. package/lib/common/provider/provider.js.map +1 -0
  313. package/lib/common/static-module.d.ts +4 -0
  314. package/lib/common/static-module.d.ts.map +1 -0
  315. package/lib/common/static-module.js +11 -0
  316. package/lib/common/static-module.js.map +1 -0
  317. package/lib/common/test/index.d.ts +2 -0
  318. package/lib/common/test/index.d.ts.map +1 -0
  319. package/lib/common/test/index.js +18 -0
  320. package/lib/common/test/index.js.map +1 -0
  321. package/lib/common/test/mock-logger.d.ts +9 -0
  322. package/lib/common/test/mock-logger.d.ts.map +1 -0
  323. package/lib/common/test/mock-logger.js +32 -0
  324. package/lib/common/test/mock-logger.js.map +1 -0
  325. package/lib/common/test/test-module.d.ts +3 -0
  326. package/lib/common/test/test-module.d.ts.map +1 -0
  327. package/lib/common/test/test-module.js +15 -0
  328. package/lib/common/test/test-module.js.map +1 -0
  329. package/lib/common/utils/annotation-util.d.ts +5 -0
  330. package/lib/common/utils/annotation-util.d.ts.map +1 -0
  331. package/lib/common/utils/annotation-util.js +27 -0
  332. package/lib/common/utils/annotation-util.js.map +1 -0
  333. package/lib/common/utils/async.d.ts +368 -0
  334. package/lib/common/utils/async.d.ts.map +1 -0
  335. package/lib/common/utils/async.js +964 -0
  336. package/lib/common/utils/async.js.map +1 -0
  337. package/lib/common/utils/cancellation.d.ts +22 -0
  338. package/lib/common/utils/cancellation.d.ts.map +1 -0
  339. package/lib/common/utils/cancellation.js +95 -0
  340. package/lib/common/utils/cancellation.js.map +1 -0
  341. package/lib/common/utils/class-util.d.ts +3 -0
  342. package/lib/common/utils/class-util.d.ts.map +1 -0
  343. package/lib/common/utils/class-util.js +24 -0
  344. package/lib/common/utils/class-util.js.map +1 -0
  345. package/lib/common/utils/disposable.d.ts +30 -0
  346. package/lib/common/utils/disposable.d.ts.map +1 -0
  347. package/lib/common/utils/disposable.js +82 -0
  348. package/lib/common/utils/disposable.js.map +1 -0
  349. package/lib/common/utils/emitter.d.ts +64 -0
  350. package/lib/common/utils/emitter.d.ts.map +1 -0
  351. package/lib/common/utils/emitter.js +226 -0
  352. package/lib/common/utils/emitter.js.map +1 -0
  353. package/lib/common/utils/event.d.ts +41 -0
  354. package/lib/common/utils/event.d.ts.map +1 -0
  355. package/lib/common/utils/event.js +90 -0
  356. package/lib/common/utils/event.js.map +1 -0
  357. package/lib/common/utils/global-util.d.ts +2 -0
  358. package/lib/common/utils/global-util.d.ts.map +1 -0
  359. package/lib/common/utils/global-util.js +19 -0
  360. package/lib/common/utils/global-util.js.map +1 -0
  361. package/lib/common/utils/index.d.ts +17 -0
  362. package/lib/common/utils/index.d.ts.map +1 -0
  363. package/lib/common/utils/index.js +33 -0
  364. package/lib/common/utils/index.js.map +1 -0
  365. package/lib/common/utils/metadata-util.d.ts +2 -0
  366. package/lib/common/utils/metadata-util.d.ts.map +1 -0
  367. package/lib/common/utils/metadata-util.js +29 -0
  368. package/lib/common/utils/metadata-util.js.map +1 -0
  369. package/lib/common/utils/os.d.ts +20 -0
  370. package/lib/common/utils/os.d.ts.map +1 -0
  371. package/lib/common/utils/os.js +50 -0
  372. package/lib/common/utils/os.js.map +1 -0
  373. package/lib/common/utils/prioritizeable.d.ts +18 -0
  374. package/lib/common/utils/prioritizeable.d.ts.map +1 -0
  375. package/lib/common/utils/prioritizeable.js +41 -0
  376. package/lib/common/utils/prioritizeable.js.map +1 -0
  377. package/lib/common/utils/promise-util.d.ts +6 -0
  378. package/lib/common/utils/promise-util.d.ts.map +1 -0
  379. package/lib/common/utils/promise-util.js +13 -0
  380. package/lib/common/utils/promise-util.js.map +1 -0
  381. package/lib/common/utils/proxy-util.d.ts +5 -0
  382. package/lib/common/utils/proxy-util.d.ts.map +1 -0
  383. package/lib/common/utils/proxy-util.js +41 -0
  384. package/lib/common/utils/proxy-util.js.map +1 -0
  385. package/lib/common/utils/types.d.ts +13 -0
  386. package/lib/common/utils/types.d.ts.map +1 -0
  387. package/lib/common/utils/types.js +3 -0
  388. package/lib/common/utils/types.js.map +1 -0
  389. package/lib/common/utils/url-util.d.ts +4 -0
  390. package/lib/common/utils/url-util.d.ts.map +1 -0
  391. package/lib/common/utils/url-util.js +58 -0
  392. package/lib/common/utils/url-util.js.map +1 -0
  393. package/lib/common/utils/uuid.d.ts +3 -0
  394. package/lib/common/utils/uuid.d.ts.map +1 -0
  395. package/lib/common/utils/uuid.js +65 -0
  396. package/lib/common/utils/uuid.js.map +1 -0
  397. package/lib/node/application/backend-application-state.d.ts +5 -0
  398. package/lib/node/application/backend-application-state.d.ts.map +1 -0
  399. package/lib/node/application/backend-application-state.js +17 -0
  400. package/lib/node/application/backend-application-state.js.map +1 -0
  401. package/lib/node/application/backend-application.d.ts +12 -0
  402. package/lib/node/application/backend-application.d.ts.map +1 -0
  403. package/lib/node/application/backend-application.js +55 -0
  404. package/lib/node/application/backend-application.js.map +1 -0
  405. package/lib/node/application/index.d.ts +3 -0
  406. package/lib/node/application/index.d.ts.map +1 -0
  407. package/lib/node/application/index.js +19 -0
  408. package/lib/node/application/index.js.map +1 -0
  409. package/lib/node/constants.d.ts +16 -0
  410. package/lib/node/constants.d.ts.map +1 -0
  411. package/lib/node/constants.js +19 -0
  412. package/lib/node/constants.js.map +1 -0
  413. package/lib/node/context/context.d.ts +16 -0
  414. package/lib/node/context/context.d.ts.map +1 -0
  415. package/lib/node/context/context.js +60 -0
  416. package/lib/node/context/context.js.map +1 -0
  417. package/lib/node/context/index.d.ts +2 -0
  418. package/lib/node/context/index.d.ts.map +1 -0
  419. package/lib/node/context/index.js +18 -0
  420. package/lib/node/context/index.js.map +1 -0
  421. package/lib/node/index.d.ts +4 -0
  422. package/lib/node/index.d.ts.map +1 -0
  423. package/lib/node/index.js +20 -0
  424. package/lib/node/index.js.map +1 -0
  425. package/lib/node/static-module.d.ts +4 -0
  426. package/lib/node/static-module.d.ts.map +1 -0
  427. package/lib/node/static-module.js +6 -0
  428. package/lib/node/static-module.js.map +1 -0
  429. package/lib/node/utils/crc.d.ts +2 -0
  430. package/lib/node/utils/crc.d.ts.map +1 -0
  431. package/lib/node/utils/crc.js +11 -0
  432. package/lib/node/utils/crc.js.map +1 -0
  433. package/lib/node/utils/index.d.ts +2 -0
  434. package/lib/node/utils/index.d.ts.map +1 -0
  435. package/lib/node/utils/index.js +18 -0
  436. package/lib/node/utils/index.js.map +1 -0
  437. package/lib/package.spec.d.ts +1 -0
  438. package/lib/package.spec.d.ts.map +1 -0
  439. package/lib/package.spec.js +4 -0
  440. package/lib/package.spec.js.map +1 -0
  441. package/package.json +55 -0
  442. package/src/browser/application/frontend-application-state.ts +11 -0
  443. package/src/browser/application/frontend-application.ts +142 -0
  444. package/src/browser/application/index.ts +2 -0
  445. package/src/browser/browser.ts +59 -0
  446. package/src/browser/index.ts +3 -0
  447. package/src/browser/shell/application-shell.ts +10 -0
  448. package/src/browser/shell/index.ts +2 -0
  449. package/src/browser/shell/shell-protocol.ts +5 -0
  450. package/src/browser/static-module.ts +4 -0
  451. package/src/common/annotation/aspect.ts +18 -0
  452. package/src/common/annotation/autowired-provider.ts +31 -0
  453. package/src/common/annotation/autowired.ts +76 -0
  454. package/src/common/annotation/component.ts +120 -0
  455. package/src/common/annotation/constant.ts +20 -0
  456. package/src/common/annotation/decorate.ts +1 -0
  457. package/src/common/annotation/detached/autowired-provider.ts +13 -0
  458. package/src/common/annotation/detached/autowired.ts +9 -0
  459. package/src/common/annotation/detached/index.ts +3 -0
  460. package/src/common/annotation/detached/value.ts +9 -0
  461. package/src/common/annotation/index.ts +17 -0
  462. package/src/common/annotation/inject.ts +1 -0
  463. package/src/common/annotation/injectable.ts +1 -0
  464. package/src/common/annotation/named.ts +1 -0
  465. package/src/common/annotation/optional.ts +1 -0
  466. package/src/common/annotation/post-construct.ts +1 -0
  467. package/src/common/annotation/pre-destroy.ts +1 -0
  468. package/src/common/annotation/service.ts +15 -0
  469. package/src/common/annotation/tagged.ts +1 -0
  470. package/src/common/annotation/target-name.ts +1 -0
  471. package/src/common/annotation/unmanaged.ts +1 -0
  472. package/src/common/annotation/value.ts +64 -0
  473. package/src/common/aop/aop-protocol.ts +57 -0
  474. package/src/common/aop/aop-proxy-factory.ts +61 -0
  475. package/src/common/aop/class-filter.ts +22 -0
  476. package/src/common/aop/index.ts +3 -0
  477. package/src/common/application/application-entry.ts +14 -0
  478. package/src/common/application/application-error.ts +57 -0
  479. package/src/common/application/application-factory.ts +20 -0
  480. package/src/common/application/application-protocol.ts +143 -0
  481. package/src/common/application/application-state.ts +7 -0
  482. package/src/common/application/application.ts +20 -0
  483. package/src/common/application/index.ts +2 -0
  484. package/src/common/config/config-protocol.ts +5 -0
  485. package/src/common/config/config-provider.ts +15 -0
  486. package/src/common/config/config-util.ts +14 -0
  487. package/src/common/config/dynamic-config.ts +2 -0
  488. package/src/common/config/index.ts +3 -0
  489. package/src/common/constants.ts +6 -0
  490. package/src/common/container/auto-bind.ts +101 -0
  491. package/src/common/container/container-factory.ts +9 -0
  492. package/src/common/container/container-provider.ts +23 -0
  493. package/src/common/container/container-util.ts +28 -0
  494. package/src/common/container/dynamic-container.ts +4 -0
  495. package/src/common/container/index.ts +9 -0
  496. package/src/common/container/scope.ts +3 -0
  497. package/src/common/el/core-context-initializer.ts +25 -0
  498. package/src/common/el/expression-compiler.ts +157 -0
  499. package/src/common/el/expression-context-provider.ts +34 -0
  500. package/src/common/el/expression-handler.ts +84 -0
  501. package/src/common/el/expression-protocol.ts +36 -0
  502. package/src/common/el/index.ts +6 -0
  503. package/src/common/el/jexl-engine-provider.ts +18 -0
  504. package/src/common/error/cutom-error.ts +5 -0
  505. package/src/common/error/error-protocol.ts +4 -0
  506. package/src/common/error/illegal-argument-error.ts +5 -0
  507. package/src/common/error/index.ts +3 -0
  508. package/src/common/index.ts +12 -0
  509. package/src/common/logger/abstract-logger.ts +32 -0
  510. package/src/common/logger/index.ts +3 -0
  511. package/src/common/logger/logger-protocol.ts +23 -0
  512. package/src/common/logger/logger.ts +31 -0
  513. package/src/common/provider/component-filter-registry.ts +56 -0
  514. package/src/common/provider/index.ts +6 -0
  515. package/src/common/provider/provider-creator.ts +12 -0
  516. package/src/common/provider/provider-protocol.ts +59 -0
  517. package/src/common/provider/provider-util.ts +10 -0
  518. package/src/common/provider/provider.ts +63 -0
  519. package/src/common/static-module.ts +9 -0
  520. package/src/common/test/index.ts +1 -0
  521. package/src/common/test/mock-logger.ts +21 -0
  522. package/src/common/test/test-module.ts +12 -0
  523. package/src/common/utils/annotation-util.ts +21 -0
  524. package/src/common/utils/async.ts +1222 -0
  525. package/src/common/utils/cancellation.ts +112 -0
  526. package/src/common/utils/class-util.ts +20 -0
  527. package/src/common/utils/disposable.ts +94 -0
  528. package/src/common/utils/emitter.ts +268 -0
  529. package/src/common/utils/event.ts +124 -0
  530. package/src/common/utils/global-util.ts +16 -0
  531. package/src/common/utils/index.ts +16 -0
  532. package/src/common/utils/metadata-util.ts +24 -0
  533. package/src/common/utils/os.ts +49 -0
  534. package/src/common/utils/prioritizeable.ts +44 -0
  535. package/src/common/utils/promise-util.ts +9 -0
  536. package/src/common/utils/proxy-util.ts +36 -0
  537. package/src/common/utils/types.ts +13 -0
  538. package/src/common/utils/url-util.ts +64 -0
  539. package/src/common/utils/uuid.ts +75 -0
  540. package/src/node/application/backend-application-state.ts +9 -0
  541. package/src/node/application/backend-application.ts +43 -0
  542. package/src/node/application/index.ts +2 -0
  543. package/src/node/constants.ts +16 -0
  544. package/src/node/context/context.ts +58 -0
  545. package/src/node/context/index.ts +1 -0
  546. package/src/node/index.ts +3 -0
  547. package/src/node/static-module.ts +4 -0
  548. package/src/node/utils/crc.ts +7 -0
  549. package/src/node/utils/index.ts +1 -0
  550. package/src/package.spec.ts +4 -0
@@ -0,0 +1,10 @@
1
+ import { interfaces } from 'inversify';
2
+ export declare namespace ContainerUtil {
3
+ function get<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T;
4
+ function getAll<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T[];
5
+ function getAllNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T[];
6
+ function getNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T;
7
+ function getAllTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: any): T[];
8
+ function getTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: any): T;
9
+ }
10
+ //# sourceMappingURL=container-util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-util.d.ts","sourceRoot":"","sources":["../../../src/common/container/container-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,yBAAiB,aAAa,CAAC;IAC3B,SAAgB,GAAG,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAE5E;IAED,SAAgB,MAAM,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAEjF;IAED,SAAgB,WAAW,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAEvH;IAED,SAAgB,QAAQ,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAElH;IAED,SAAgB,YAAY,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,EAAE,CAElI;IAED,SAAgB,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,CAE7H;CACJ"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContainerUtil = void 0;
4
+ const container_provider_1 = require("./container-provider");
5
+ var ContainerUtil;
6
+ (function (ContainerUtil) {
7
+ function get(serviceIdentifier) {
8
+ return container_provider_1.ContainerProvider.provide().get(serviceIdentifier);
9
+ }
10
+ ContainerUtil.get = get;
11
+ function getAll(serviceIdentifier) {
12
+ return container_provider_1.ContainerProvider.provide().getAll(serviceIdentifier);
13
+ }
14
+ ContainerUtil.getAll = getAll;
15
+ function getAllNamed(serviceIdentifier, named) {
16
+ return container_provider_1.ContainerProvider.provide().getAllNamed(serviceIdentifier, named);
17
+ }
18
+ ContainerUtil.getAllNamed = getAllNamed;
19
+ function getNamed(serviceIdentifier, named) {
20
+ return container_provider_1.ContainerProvider.provide().getNamed(serviceIdentifier, named);
21
+ }
22
+ ContainerUtil.getNamed = getNamed;
23
+ function getAllTagged(serviceIdentifier, key, value) {
24
+ return container_provider_1.ContainerProvider.provide().getAllTagged(serviceIdentifier, key, value);
25
+ }
26
+ ContainerUtil.getAllTagged = getAllTagged;
27
+ function getTagged(serviceIdentifier, key, value) {
28
+ return container_provider_1.ContainerProvider.provide().getTagged(serviceIdentifier, key, value);
29
+ }
30
+ ContainerUtil.getTagged = getTagged;
31
+ })(ContainerUtil = exports.ContainerUtil || (exports.ContainerUtil = {}));
32
+ //# sourceMappingURL=container-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-util.js","sourceRoot":"","sources":["../../../src/common/container/container-util.ts"],"names":[],"mappings":";;;AACA,6DAAyD;AAEzD,IAAiB,aAAa,CAwB7B;AAxBD,WAAiB,aAAa;IAC1B,SAAgB,GAAG,CAAI,iBAAkD;QACrE,OAAO,sCAAiB,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAFe,iBAAG,MAElB,CAAA;IAED,SAAgB,MAAM,CAAI,iBAAkD;QACxE,OAAO,sCAAiB,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACjE,CAAC;IAFe,oBAAM,SAErB,CAAA;IAED,SAAgB,WAAW,CAAI,iBAAkD,EAAE,KAA+B;QAC9G,OAAO,sCAAiB,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAC7E,CAAC;IAFe,yBAAW,cAE1B,CAAA;IAED,SAAgB,QAAQ,CAAI,iBAAkD,EAAE,KAA+B;QAC3G,OAAO,sCAAiB,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IAFe,sBAAQ,WAEvB,CAAA;IAED,SAAgB,YAAY,CAAI,iBAAkD,EAAE,GAA6B,EAAE,KAAU;QACzH,OAAO,sCAAiB,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,iBAAiB,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACnF,CAAC;IAFe,0BAAY,eAE3B,CAAA;IAED,SAAgB,SAAS,CAAI,iBAAkD,EAAE,GAA6B,EAAE,KAAU;QACtH,OAAO,sCAAiB,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,iBAAiB,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAChF,CAAC;IAFe,uBAAS,YAExB,CAAA;AACL,CAAC,EAxBgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAwB7B"}
@@ -0,0 +1,3 @@
1
+ import { Container } from 'inversify';
2
+ export declare const container: Promise<Container>;
3
+ //# sourceMappingURL=dynamic-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-container.d.ts","sourceRoot":"","sources":["../../../src/common/container/dynamic-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,SAAS,CAAoC,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.container = void 0;
4
+ const inversify_1 = require("inversify");
5
+ // dynamic loading component module at compile time
6
+ exports.container = Promise.resolve(new inversify_1.Container());
7
+ //# sourceMappingURL=dynamic-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-container.js","sourceRoot":"","sources":["../../../src/common/container/dynamic-container.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,mDAAmD;AACtC,QAAA,SAAS,GAAuB,OAAO,CAAC,OAAO,CAAC,IAAI,qBAAS,EAAE,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export * from './container-provider';
2
+ export * from './auto-bind';
3
+ export * from './container-util';
4
+ export * from './scope';
5
+ export * from './container-factory';
6
+ import { interfaces } from 'inversify';
7
+ export declare type Container = interfaces.Container;
8
+ export declare type ContainerModule = interfaces.ContainerModule;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/container/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,oBAAY,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;AAC7C,oBAAY,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./container-provider"), exports);
18
+ __exportStar(require("./auto-bind"), exports);
19
+ __exportStar(require("./container-util"), exports);
20
+ __exportStar(require("./scope"), exports);
21
+ __exportStar(require("./container-factory"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/container/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,8CAA4B;AAC5B,mDAAiC;AACjC,0CAAwB;AACxB,sDAAoC"}
@@ -0,0 +1,6 @@
1
+ export declare enum Scope {
2
+ Request = 0,
3
+ Singleton = 1,
4
+ Transient = 2
5
+ }
6
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../src/common/container/scope.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACb,OAAO,IAAA;IAAE,SAAS,IAAA;IAAE,SAAS,IAAA;CAChC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Scope = void 0;
4
+ var Scope;
5
+ (function (Scope) {
6
+ Scope[Scope["Request"] = 0] = "Request";
7
+ Scope[Scope["Singleton"] = 1] = "Singleton";
8
+ Scope[Scope["Transient"] = 2] = "Transient";
9
+ })(Scope = exports.Scope || (exports.Scope = {}));
10
+ //# sourceMappingURL=scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/common/container/scope.ts"],"names":[],"mappings":";;;AAAA,IAAY,KAEX;AAFD,WAAY,KAAK;IACb,uCAAO,CAAA;IAAE,2CAAS,CAAA;IAAE,2CAAS,CAAA;AACjC,CAAC,EAFW,KAAK,GAAL,aAAK,KAAL,aAAK,QAEhB"}
@@ -0,0 +1,7 @@
1
+ import { ContextInitializer, ExpressionContext, JexlEngineProvider } from './expression-protocol';
2
+ export declare class CoreContextInitializer implements ContextInitializer {
3
+ protected readonly jexlEngineProvider: JexlEngineProvider<any>;
4
+ initialize(ctx: ExpressionContext): void;
5
+ priority: number;
6
+ }
7
+ //# sourceMappingURL=core-context-initializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-context-initializer.d.ts","sourceRoot":"","sources":["../../../src/common/el/core-context-initializer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAC;AAErH,qBACa,sBAAuB,YAAW,kBAAkB;IAG7D,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE/D,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IAYxC,QAAQ,SAAO;CAElB"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CoreContextInitializer = void 0;
13
+ const annotation_1 = require("../annotation");
14
+ const container_1 = require("../container");
15
+ const expression_protocol_1 = require("./expression-protocol");
16
+ let CoreContextInitializer = class CoreContextInitializer {
17
+ constructor() {
18
+ this.priority = 500;
19
+ }
20
+ initialize(ctx) {
21
+ if (typeof process !== 'undefined') {
22
+ ctx.env = Object.assign(Object.assign({}, process.env), { _ignoreEl: true });
23
+ }
24
+ const jexlEngine = this.jexlEngineProvider.provide();
25
+ jexlEngine.addTransform('replace', (val, searchValue, replaceValue) => val && val.replace(new RegExp(searchValue, 'g'), replaceValue));
26
+ jexlEngine.addTransform('regexp', (pattern, flags) => new RegExp(pattern, flags));
27
+ const expressionHandler = container_1.ContainerUtil.get(expression_protocol_1.ExpressionHandler);
28
+ jexlEngine.addTransform('eval', (text) => expressionHandler.handle(text));
29
+ }
30
+ };
31
+ __decorate([
32
+ (0, annotation_1.Autowired)(expression_protocol_1.JexlEngineProvider),
33
+ __metadata("design:type", Object)
34
+ ], CoreContextInitializer.prototype, "jexlEngineProvider", void 0);
35
+ CoreContextInitializer = __decorate([
36
+ (0, annotation_1.Component)(expression_protocol_1.ContextInitializer)
37
+ ], CoreContextInitializer);
38
+ exports.CoreContextInitializer = CoreContextInitializer;
39
+ //# sourceMappingURL=core-context-initializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-context-initializer.js","sourceRoot":"","sources":["../../../src/common/el/core-context-initializer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAqD;AACrD,4CAA6C;AAC7C,+DAAqH;AAG9G,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QAiBH,aAAQ,GAAG,GAAG,CAAC;IAEnB,CAAC;IAdG,UAAU,CAAC,GAAsB;QAC7B,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YAChC,GAAG,CAAC,GAAG,mCAAQ,OAAO,CAAC,GAAG,KAAE,SAAS,EAAE,IAAI,GAAE,CAAC;SACjD;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;QACrD,UAAU,CAAC,YAAY,CAAC,SAAS,EACzB,CAAC,GAAW,EAAE,WAA4B,EAAE,YAAoB,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;QAC7I,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAG,CAAC,OAAe,EAAE,KAAc,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;QACpG,MAAM,iBAAiB,GAAG,yBAAa,CAAC,GAAG,CAAoB,uCAAiB,CAAC,CAAC;QAClF,UAAU,CAAC,YAAY,CAAC,MAAM,EAAG,CAAC,IAAY,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvF,CAAC;CAIJ,CAAA;AAjBG;IAAC,IAAA,sBAAS,EAAC,wCAAkB,CAAC;;kEACiC;AAHtD,sBAAsB;IADlC,IAAA,sBAAS,EAAC,wCAAkB,CAAC;GACjB,sBAAsB,CAmBlC;AAnBY,wDAAsB"}
@@ -0,0 +1,18 @@
1
+ import { ExpressionCompiler, JexlEngineProvider } from './expression-protocol';
2
+ interface MiddleExpression {
3
+ expression: any;
4
+ nextText?: string;
5
+ }
6
+ export declare class ExpressionCompilerImpl implements ExpressionCompiler {
7
+ private ESCAPE_CHAR;
8
+ private SPECIAL_CHAR;
9
+ private BRACKET_BEGIN;
10
+ private BRACKET_END;
11
+ protected readonly jexlEngineProvider: JexlEngineProvider<any>;
12
+ compileSections(text: string): any[];
13
+ protected middleCompile(text: string): MiddleExpression | undefined;
14
+ protected nextMiddleExpression(text: string, bracketBeginCharNum?: number): MiddleExpression | undefined;
15
+ protected nextString(text: string): MiddleExpression;
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=expression-compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-compiler.d.ts","sourceRoot":"","sources":["../../../src/common/el/expression-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG/E,UAAU,gBAAgB;IACtB,UAAU,EAAE,GAAG,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBACa,sBAAuB,YAAW,kBAAkB;IAE7D,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,YAAY,CAAO;IAC3B,OAAO,CAAC,aAAa,CAAO;IAC5B,OAAO,CAAC,WAAW,CAAO;IAG1B,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE/D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,EAAE;IAqBpC,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAYnE,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,mBAAmB,SAAI,GAAG,gBAAgB,GAAG,SAAS;IAuDnG,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;CAiDvD"}
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ExpressionCompilerImpl = void 0;
13
+ const expression_protocol_1 = require("./expression-protocol");
14
+ const annotation_1 = require("../annotation");
15
+ let ExpressionCompilerImpl = class ExpressionCompilerImpl {
16
+ constructor() {
17
+ this.ESCAPE_CHAR = '\\';
18
+ this.SPECIAL_CHAR = '$';
19
+ this.BRACKET_BEGIN = '{';
20
+ this.BRACKET_END = '}';
21
+ }
22
+ compileSections(text) {
23
+ if (!text || text.indexOf(this.SPECIAL_CHAR) < 0) {
24
+ return [];
25
+ }
26
+ const sections = [];
27
+ let middleText = text;
28
+ while (middleText) {
29
+ const me = this.middleCompile(middleText);
30
+ if (!me) {
31
+ sections.push(middleText);
32
+ middleText = undefined;
33
+ }
34
+ else {
35
+ sections.push(me.expression);
36
+ middleText = me.nextText;
37
+ }
38
+ }
39
+ return sections;
40
+ }
41
+ middleCompile(text) {
42
+ let me;
43
+ if (text.startsWith('${{')) {
44
+ me = this.nextMiddleExpression(text.substring(3), 2);
45
+ }
46
+ else if (text.startsWith('${')) {
47
+ me = this.nextMiddleExpression(text.substring(2));
48
+ }
49
+ else {
50
+ me = this.nextString(text);
51
+ }
52
+ return me;
53
+ }
54
+ nextMiddleExpression(text, bracketBeginCharNum = 1) {
55
+ let stringed = false;
56
+ let escaped = false;
57
+ let bracketBeginCharFound = 0;
58
+ const section = [];
59
+ for (let i = 0; i < text.length; i++) {
60
+ const c = text[i];
61
+ if (!escaped) {
62
+ if ('\'' === c || '\"' === c) {
63
+ stringed = !stringed;
64
+ section.push(c);
65
+ continue;
66
+ }
67
+ else if (c === this.ESCAPE_CHAR) {
68
+ escaped = true;
69
+ continue;
70
+ }
71
+ }
72
+ if (stringed) {
73
+ section.push(c);
74
+ escaped = false;
75
+ }
76
+ else if (escaped) {
77
+ if (this.SPECIAL_CHAR === c || this.BRACKET_BEGIN === c || this.BRACKET_END === c) {
78
+ section.push(c);
79
+ }
80
+ else {
81
+ section.push(this.ESCAPE_CHAR);
82
+ section.push(c);
83
+ }
84
+ escaped = false;
85
+ }
86
+ else if (this.BRACKET_BEGIN === c) {
87
+ bracketBeginCharFound++;
88
+ section.push(c);
89
+ }
90
+ else if (this.BRACKET_END === c) {
91
+ if (bracketBeginCharFound === 0 && bracketBeginCharNum === 1) {
92
+ const jexlEngine = this.jexlEngineProvider.provide();
93
+ const expression = jexlEngine.createExpression(section.join(''));
94
+ let nextText;
95
+ if (i !== text.length - 1) {
96
+ nextText = text.substring(i + 1);
97
+ }
98
+ return { expression, nextText };
99
+ }
100
+ else if (bracketBeginCharFound > 0) {
101
+ bracketBeginCharFound--;
102
+ section.push(c);
103
+ }
104
+ else {
105
+ bracketBeginCharNum--;
106
+ }
107
+ }
108
+ else {
109
+ section.push(c);
110
+ }
111
+ }
112
+ }
113
+ nextString(text) {
114
+ let escaped = false;
115
+ let specialCharFound = false;
116
+ const section = [];
117
+ for (let i = 0; i < text.length; i++) {
118
+ const c = text[i];
119
+ if (!escaped) {
120
+ if ('\'' === c || '\"' === c) {
121
+ section.push(c);
122
+ continue;
123
+ }
124
+ else if (c === this.ESCAPE_CHAR) {
125
+ escaped = true;
126
+ continue;
127
+ }
128
+ }
129
+ if (escaped) {
130
+ if (this.SPECIAL_CHAR === c || this.BRACKET_BEGIN === c || this.BRACKET_END === c) {
131
+ section.push(c);
132
+ }
133
+ else {
134
+ section.push(this.ESCAPE_CHAR);
135
+ section.push(c);
136
+ }
137
+ escaped = false;
138
+ }
139
+ else if (specialCharFound) {
140
+ if (this.BRACKET_BEGIN === c) {
141
+ const expression = section.join('');
142
+ const nextText = text.substring(i - 1);
143
+ return { expression, nextText };
144
+ }
145
+ else {
146
+ specialCharFound = false;
147
+ section.push(this.SPECIAL_CHAR);
148
+ section.push(c);
149
+ }
150
+ }
151
+ else {
152
+ if (this.SPECIAL_CHAR === c) {
153
+ specialCharFound = true;
154
+ }
155
+ else {
156
+ section.push(c);
157
+ }
158
+ }
159
+ }
160
+ return { expression: section.join('') };
161
+ }
162
+ };
163
+ __decorate([
164
+ (0, annotation_1.Autowired)(expression_protocol_1.JexlEngineProvider),
165
+ __metadata("design:type", Object)
166
+ ], ExpressionCompilerImpl.prototype, "jexlEngineProvider", void 0);
167
+ ExpressionCompilerImpl = __decorate([
168
+ (0, annotation_1.Component)(expression_protocol_1.ExpressionCompiler)
169
+ ], ExpressionCompilerImpl);
170
+ exports.ExpressionCompilerImpl = ExpressionCompilerImpl;
171
+ //# sourceMappingURL=expression-compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-compiler.js","sourceRoot":"","sources":["../../../src/common/el/expression-compiler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA+E;AAC/E,8CAAqD;AAQ9C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QAEK,gBAAW,GAAG,IAAI,CAAC;QACnB,iBAAY,GAAG,GAAG,CAAC;QACnB,kBAAa,GAAG,GAAG,CAAC;QACpB,gBAAW,GAAG,GAAG,CAAC;IA8I9B,CAAC;IAzIG,eAAe,CAAC,IAAY;QACxB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,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;oBAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnB;qBAAM;oBACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnB;gBACD,OAAO,GAAG,KAAK,CAAC;aACnB;iBACG,IAAI,gBAAgB,EAAE;gBAClB,IAAI,IAAI,CAAC,aAAa,KAAK,CAAC,EAAE;oBAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACvC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;iBACnC;qBAAM;oBACH,gBAAgB,GAAG,KAAK,CAAC;oBACzB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;oBAChC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnB;aACJ;iBAAM;gBACH,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,EAAE;oBACzB,gBAAgB,GAAG,IAAI,CAAC;iBAC3B;qBAAM;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnB;aACJ;SACR;QAED,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IAC5C,CAAC;CAEJ,CAAA;AA5IG;IAAC,IAAA,sBAAS,EAAC,wCAAkB,CAAC;;kEACiC;AARtD,sBAAsB;IADlC,IAAA,sBAAS,EAAC,wCAAkB,CAAC;GACjB,sBAAsB,CAmJlC;AAnJY,wDAAsB"}
@@ -0,0 +1,10 @@
1
+ import { ExpressionContextProvider, ContextInitializer, ExpressionContext } from './expression-protocol';
2
+ export declare class ExpressionContextProviderImpl implements ExpressionContextProvider {
3
+ protected readonly contextInitializers: ContextInitializer[];
4
+ protected prioritized: ContextInitializer[];
5
+ protected ctx: ExpressionContext;
6
+ protected initialized: boolean;
7
+ constructor(contextInitializers: ContextInitializer[]);
8
+ provide(): ExpressionContext;
9
+ }
10
+ //# sourceMappingURL=expression-context-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-context-provider.d.ts","sourceRoot":"","sources":["../../../src/common/el/expression-context-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAIzG,qBACa,6BAA8B,YAAW,yBAAyB;IAQvE,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,kBAAkB,EAAE;IANhE,SAAS,CAAC,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC5C,SAAS,CAAC,GAAG,EAAE,iBAAiB,CAAC;IACjC,SAAS,CAAC,WAAW,UAAS;gBAIP,mBAAmB,EAAE,kBAAkB,EAAE;IAMhE,OAAO,IAAI,iBAAiB;CAa/B"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ExpressionContextProviderImpl = void 0;
16
+ const annotation_1 = require("../annotation");
17
+ const expression_protocol_1 = require("./expression-protocol");
18
+ const utils_1 = require("../utils");
19
+ const config_1 = require("../config");
20
+ let ExpressionContextProviderImpl = class ExpressionContextProviderImpl {
21
+ constructor(contextInitializers) {
22
+ this.contextInitializers = contextInitializers;
23
+ this.initialized = false;
24
+ this.ctx = config_1.ConfigUtil.getRaw();
25
+ }
26
+ provide() {
27
+ if (!this.prioritized) {
28
+ this.prioritized = utils_1.Prioritizeable.prioritizeAllSync(this.contextInitializers).map(c => c.value);
29
+ }
30
+ if (!this.initialized) {
31
+ this.initialized = true;
32
+ for (const initializer of this.prioritized) {
33
+ initializer.initialize(this.ctx);
34
+ }
35
+ }
36
+ return this.ctx;
37
+ }
38
+ };
39
+ ExpressionContextProviderImpl = __decorate([
40
+ (0, annotation_1.Component)(expression_protocol_1.ExpressionContextProvider),
41
+ __param(0, (0, annotation_1.Autowired)(expression_protocol_1.ContextInitializer)),
42
+ __param(0, (0, annotation_1.Optional)()),
43
+ __metadata("design:paramtypes", [Array])
44
+ ], ExpressionContextProviderImpl);
45
+ exports.ExpressionContextProviderImpl = ExpressionContextProviderImpl;
46
+ //# sourceMappingURL=expression-context-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-context-provider.js","sourceRoot":"","sources":["../../../src/common/el/expression-context-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAA+D;AAC/D,+DAAyG;AACzG,oCAA0C;AAC1C,sCAAuC;AAGhC,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAMtC,YAEuB,mBAAyC;QAAzC,wBAAmB,GAAnB,mBAAmB,CAAsB;QAJtD,gBAAW,GAAG,KAAK,CAAC;QAO1B,IAAI,CAAC,GAAG,GAAG,mBAAU,CAAC,MAAM,EAAE,CAAC;IACnC,CAAC;IAED,OAAO;QACH,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAW,GAAG,sBAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACnG;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,WAAW,EAAE;gBACxC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACpC;SACJ;QACD,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;CAEJ,CAAA;AA3BY,6BAA6B;IADzC,IAAA,sBAAS,EAAC,+CAAyB,CAAC;IAQ5B,WAAA,IAAA,sBAAS,EAAC,wCAAkB,CAAC,CAAA;IAAE,WAAA,IAAA,qBAAQ,GAAE,CAAA;;GAPrC,6BAA6B,CA2BzC;AA3BY,sEAA6B"}
@@ -0,0 +1,12 @@
1
+ import { JexlEngineProvider, ExpressionHandler, ExpressionContextProvider, ExpressionCompiler, ExpressionContext } from './expression-protocol';
2
+ export declare class ExpressionHandlerImpl implements ExpressionHandler {
3
+ protected readonly jexlEngineProvider: JexlEngineProvider<any>;
4
+ protected readonly expressionContextProvider: ExpressionContextProvider;
5
+ protected readonly expressionCompiler: ExpressionCompiler;
6
+ protected _ctx: ExpressionContext;
7
+ protected getContext(ctx?: ExpressionContext): ExpressionContext;
8
+ handle(textOrObj: string | Object, ctx?: ExpressionContext): any;
9
+ protected doHandle(text: string, ctx?: ExpressionContext): any;
10
+ protected hasExpression(sections: any[]): boolean;
11
+ }
12
+ //# sourceMappingURL=expression-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-handler.d.ts","sourceRoot":"","sources":["../../../src/common/el/expression-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGhJ,qBACa,qBAAsB,YAAW,iBAAiB;IAG3D,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAG/D,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAGxE,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAE1D,SAAS,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAElC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,iBAAiB;IAU5C,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,iBAAiB,GAAG,GAAG;IAgBhE,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,iBAAiB,GAAG,GAAG;IA8B9D,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE;CAS1C"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ExpressionHandlerImpl = void 0;
13
+ const annotation_1 = require("../annotation");
14
+ const expression_protocol_1 = require("./expression-protocol");
15
+ const traverse = require("traverse");
16
+ let ExpressionHandlerImpl = class ExpressionHandlerImpl {
17
+ getContext(ctx) {
18
+ const c = ctx || this.expressionContextProvider.provide();
19
+ if (!ctx && c !== this._ctx) {
20
+ this._ctx = c;
21
+ this.handle(c, c);
22
+ }
23
+ return c;
24
+ }
25
+ handle(textOrObj, ctx) {
26
+ if (typeof textOrObj === 'string') {
27
+ return this.doHandle(textOrObj, ctx);
28
+ }
29
+ else {
30
+ const self = this;
31
+ traverse(textOrObj).forEach(function (value) {
32
+ if (typeof value === 'string') {
33
+ this.update(self.handle(value, ctx));
34
+ }
35
+ else if (value && value._ignoreEl === true) {
36
+ this.update(value, true);
37
+ }
38
+ });
39
+ return textOrObj;
40
+ }
41
+ }
42
+ doHandle(text, ctx) {
43
+ const sections = this.expressionCompiler.compileSections(text);
44
+ if (sections.length > 0) {
45
+ if (this.hasExpression(sections)) {
46
+ const c = this.getContext(ctx);
47
+ if (sections.length === 1) {
48
+ let value = sections[0].evalSync(c);
49
+ if (typeof value === 'string') {
50
+ value = this.handle(value, c);
51
+ }
52
+ return value;
53
+ }
54
+ const result = [];
55
+ for (const section of sections) {
56
+ if (typeof section === 'string') {
57
+ result.push(section);
58
+ }
59
+ else {
60
+ let value = section.evalSync(c);
61
+ if (typeof value === 'string') {
62
+ value = this.handle(value, c);
63
+ }
64
+ result.push(value);
65
+ }
66
+ }
67
+ return result.join('');
68
+ }
69
+ }
70
+ return text;
71
+ }
72
+ hasExpression(sections) {
73
+ for (const section of sections) {
74
+ if (typeof section !== 'string') {
75
+ return true;
76
+ }
77
+ }
78
+ return false;
79
+ }
80
+ };
81
+ __decorate([
82
+ (0, annotation_1.Autowired)(expression_protocol_1.JexlEngineProvider),
83
+ __metadata("design:type", Object)
84
+ ], ExpressionHandlerImpl.prototype, "jexlEngineProvider", void 0);
85
+ __decorate([
86
+ (0, annotation_1.Autowired)(expression_protocol_1.ExpressionContextProvider),
87
+ __metadata("design:type", Object)
88
+ ], ExpressionHandlerImpl.prototype, "expressionContextProvider", void 0);
89
+ __decorate([
90
+ (0, annotation_1.Autowired)(expression_protocol_1.ExpressionCompiler),
91
+ __metadata("design:type", Object)
92
+ ], ExpressionHandlerImpl.prototype, "expressionCompiler", void 0);
93
+ ExpressionHandlerImpl = __decorate([
94
+ (0, annotation_1.Component)(expression_protocol_1.ExpressionHandler)
95
+ ], ExpressionHandlerImpl);
96
+ exports.ExpressionHandlerImpl = ExpressionHandlerImpl;
97
+ //# sourceMappingURL=expression-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-handler.js","sourceRoot":"","sources":["../../../src/common/el/expression-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAqD;AACrD,+DAAgJ;AAChJ,qCAAqC;AAG9B,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAapB,UAAU,CAAC,GAAuB;QACxC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,yBAAyB,CAAC,OAAO,EAAE,CAAC;QAE1D,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE;YACzB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACrB;QACD,OAAO,CAAC,CAAC;IACb,CAAC;IAED,MAAM,CAAC,SAA0B,EAAE,GAAuB;QACtD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;YAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;SACxC;aAAM;YACH,MAAM,IAAI,GAAG,IAAI,CAAC;YAClB,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAU;gBAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;oBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;iBACxC;qBAAM,IAAI,KAAK,IAAK,KAAa,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CAAC,EAAE,CAAC,CAAC;aAC1B;SACJ;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,aAAa,CAAC,QAAe;QACnC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC5B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;gBAC7B,OAAO,IAAI,CAAC;aACf;SACJ;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ,CAAA;AA5EG;IAAC,IAAA,sBAAS,EAAC,wCAAkB,CAAC;;iEACiC;AAE/D;IAAC,IAAA,sBAAS,EAAC,+CAAyB,CAAC;;wEACmC;AAExE;IAAC,IAAA,sBAAS,EAAC,wCAAkB,CAAC;;iEAC4B;AATjD,qBAAqB;IADjC,IAAA,sBAAS,EAAC,uCAAiB,CAAC;GAChB,qBAAqB,CA8EjC;AA9EY,sDAAqB"}
@@ -0,0 +1,25 @@
1
+ export declare const ExpressionCompiler: unique symbol;
2
+ export declare const ExpressionHandler: unique symbol;
3
+ export declare const ContextInitializer: unique symbol;
4
+ export declare const ExpressionContextProvider: unique symbol;
5
+ export declare const JexlEngineProvider: unique symbol;
6
+ export interface ExpressionCompiler {
7
+ compileSections(text: string): any[];
8
+ }
9
+ export interface ExpressionHandler {
10
+ handle(text: string | Object, ctx?: ExpressionContext): any;
11
+ }
12
+ export interface ExpressionContext {
13
+ [key: string]: any;
14
+ }
15
+ export interface ContextInitializer {
16
+ initialize(ctx: ExpressionContext): void;
17
+ readonly priority: number;
18
+ }
19
+ export interface ExpressionContextProvider {
20
+ provide(): ExpressionContext;
21
+ }
22
+ export interface JexlEngineProvider<T> {
23
+ provide(): T;
24
+ }
25
+ //# sourceMappingURL=expression-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-protocol.d.ts","sourceRoot":"","sources":["../../../src/common/el/expression-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,yBAAyB,eAAsC,CAAC;AAC7E,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IAC/B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,EAAE,CAAA;CACvC;AAED,MAAM,WAAW,iBAAiB;IAE9B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAAC;CAE/D;AAED,MAAM,WAAW,iBAAiB;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAE/B,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IAEtC,OAAO,IAAI,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IAEjC,OAAO,IAAI,CAAC,CAAA;CACf"}