@abp/ng.core 7.2.1 → 7.3.0-rc.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 (397) hide show
  1. package/{esm2020 → esm2022}/abp-ng.core.mjs +4 -4
  2. package/esm2022/lib/abstracts/abstract-guard.mjs +2 -0
  3. package/{esm2020 → esm2022}/lib/abstracts/auth-response.model.mjs +1 -1
  4. package/esm2022/lib/abstracts/auth.guard.mjs +18 -0
  5. package/esm2022/lib/abstracts/auth.service.mjs +46 -0
  6. package/esm2022/lib/abstracts/index.mjs +6 -0
  7. package/esm2022/lib/abstracts/ng-model.component.mjs +60 -0
  8. package/esm2022/lib/clients/http.client.mjs +29 -0
  9. package/{esm2020 → esm2022}/lib/clients/index.mjs +1 -1
  10. package/esm2022/lib/components/dynamic-layout.component.mjs +101 -0
  11. package/{esm2020 → esm2022}/lib/components/index.mjs +3 -3
  12. package/esm2022/lib/components/replaceable-route-container.component.mjs +43 -0
  13. package/esm2022/lib/components/router-outlet.component.mjs +16 -0
  14. package/{esm2020 → esm2022}/lib/constants/different-locales.mjs +336 -336
  15. package/{esm2020 → esm2022}/lib/constants/index.mjs +1 -1
  16. package/esm2022/lib/core.module.mjs +285 -0
  17. package/esm2022/lib/directives/autofocus.directive.mjs +31 -0
  18. package/esm2022/lib/directives/debounce.directive.mjs +37 -0
  19. package/esm2022/lib/directives/for.directive.mjs +160 -0
  20. package/esm2022/lib/directives/form-submit.directive.mjs +78 -0
  21. package/{esm2020 → esm2022}/lib/directives/index.mjs +8 -8
  22. package/esm2022/lib/directives/init.directive.mjs +22 -0
  23. package/esm2022/lib/directives/permission.directive.mjs +75 -0
  24. package/esm2022/lib/directives/replaceable-template.directive.mjs +133 -0
  25. package/esm2022/lib/directives/stop-propagation.directive.mjs +33 -0
  26. package/{esm2020 → esm2022}/lib/enums/common.mjs +1 -1
  27. package/{esm2020 → esm2022}/lib/enums/index.mjs +1 -1
  28. package/{esm2020 → esm2022}/lib/guards/index.mjs +1 -1
  29. package/esm2022/lib/guards/permission.guard.mjs +41 -0
  30. package/esm2022/lib/handlers/routes.handler.mjs +52 -0
  31. package/esm2022/lib/interceptors/api.interceptor.mjs +28 -0
  32. package/{esm2020 → esm2022}/lib/interceptors/index.mjs +1 -1
  33. package/esm2022/lib/localization.module.mjs +17 -0
  34. package/{esm2020 → esm2022}/lib/models/auth.mjs +1 -1
  35. package/{esm2020 → esm2022}/lib/models/common.mjs +1 -1
  36. package/{esm2020 → esm2022}/lib/models/dtos.mjs +134 -134
  37. package/{esm2020 → esm2022}/lib/models/environment.mjs +1 -1
  38. package/{esm2020 → esm2022}/lib/models/index.mjs +9 -9
  39. package/{esm2020 → esm2022}/lib/models/localization.mjs +1 -1
  40. package/{esm2020 → esm2022}/lib/models/replaceable-components.mjs +1 -1
  41. package/{esm2020 → esm2022}/lib/models/rest.mjs +1 -1
  42. package/{esm2020 → esm2022}/lib/models/session.mjs +1 -1
  43. package/{esm2020 → esm2022}/lib/models/utility.mjs +1 -1
  44. package/{esm2020 → esm2022}/lib/pipes/index.mjs +7 -7
  45. package/esm2022/lib/pipes/localization.pipe.mjs +34 -0
  46. package/esm2022/lib/pipes/safe-html.pipe.mjs +24 -0
  47. package/esm2022/lib/pipes/short-date-time.pipe.mjs +35 -0
  48. package/esm2022/lib/pipes/short-date.pipe.mjs +35 -0
  49. package/esm2022/lib/pipes/short-time.pipe.mjs +35 -0
  50. package/esm2022/lib/pipes/sort.pipe.mjs +50 -0
  51. package/esm2022/lib/pipes/to-injector.pipe.mjs +30 -0
  52. package/{esm2020 → esm2022}/lib/providers/cookie-language.provider.mjs +21 -21
  53. package/{esm2020 → esm2022}/lib/providers/include-localization-resources.provider.mjs +5 -5
  54. package/{esm2020 → esm2022}/lib/providers/locale.provider.mjs +25 -25
  55. package/esm2022/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.mjs +28 -0
  56. package/{esm2020 → esm2022}/lib/proxy/pages/abp/multi-tenancy/index.mjs +1 -1
  57. package/esm2022/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.mjs +25 -0
  58. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/index.mjs +1 -1
  59. package/esm2022/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.mjs +25 -0
  60. package/esm2022/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-localization.service.mjs +25 -0
  61. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.mjs +5 -5
  62. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/models.mjs +1 -1
  63. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/index.mjs +1 -1
  64. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/models.mjs +1 -1
  65. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/index.mjs +1 -1
  66. package/{esm2020 → esm2022}/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models.mjs +1 -1
  67. package/{esm2020 → esm2022}/lib/proxy/volo/abp/http/modeling/index.mjs +1 -1
  68. package/{esm2020 → esm2022}/lib/proxy/volo/abp/http/modeling/models.mjs +1 -1
  69. package/{esm2020 → esm2022}/lib/proxy/volo/abp/localization/index.mjs +1 -1
  70. package/{esm2020 → esm2022}/lib/proxy/volo/abp/localization/models.mjs +1 -1
  71. package/{esm2020 → esm2022}/lib/proxy/volo/abp/models.mjs +1 -1
  72. package/esm2022/lib/services/config-state.service.mjs +182 -0
  73. package/esm2022/lib/services/content-projection.service.mjs +18 -0
  74. package/esm2022/lib/services/dom-insertion.service.mjs +35 -0
  75. package/esm2022/lib/services/environment.service.mjs +49 -0
  76. package/esm2022/lib/services/http-error-reporter.service.mjs +30 -0
  77. package/esm2022/lib/services/http-wait.service.mjs +76 -0
  78. package/{esm2020 → esm2022}/lib/services/index.mjs +21 -21
  79. package/esm2022/lib/services/lazy-load.service.mjs +41 -0
  80. package/esm2022/lib/services/list.service.mjs +103 -0
  81. package/esm2022/lib/services/local-storage.service.mjs +33 -0
  82. package/esm2022/lib/services/localization.service.mjs +218 -0
  83. package/esm2022/lib/services/multi-tenancy.service.mjs +49 -0
  84. package/esm2022/lib/services/permission.service.mjs +64 -0
  85. package/esm2022/lib/services/replaceable-components.service.mjs +50 -0
  86. package/esm2022/lib/services/resource-wait.service.mjs +40 -0
  87. package/esm2022/lib/services/rest.service.mjs +79 -0
  88. package/esm2022/lib/services/router-events.service.mjs +39 -0
  89. package/esm2022/lib/services/router-wait.service.mjs +52 -0
  90. package/esm2022/lib/services/routes.service.mjs +165 -0
  91. package/esm2022/lib/services/session-state.service.mjs +81 -0
  92. package/esm2022/lib/services/subscription.service.mjs +44 -0
  93. package/esm2022/lib/services/track-by.service.mjs +22 -0
  94. package/{esm2020 → esm2022}/lib/strategies/container.strategy.mjs +37 -37
  95. package/{esm2020 → esm2022}/lib/strategies/content-security.strategy.mjs +29 -29
  96. package/{esm2020 → esm2022}/lib/strategies/content.strategy.mjs +51 -51
  97. package/{esm2020 → esm2022}/lib/strategies/context.strategy.mjs +36 -36
  98. package/{esm2020 → esm2022}/lib/strategies/cross-origin.strategy.mjs +27 -27
  99. package/{esm2020 → esm2022}/lib/strategies/dom.strategy.mjs +26 -26
  100. package/{esm2020 → esm2022}/lib/strategies/index.mjs +8 -8
  101. package/{esm2020 → esm2022}/lib/strategies/loading.strategy.mjs +57 -57
  102. package/{esm2020 → esm2022}/lib/strategies/projection.strategy.mjs +79 -79
  103. package/{esm2020 → esm2022}/lib/tokens/app-config.token.mjs +2 -2
  104. package/{esm2020 → esm2022}/lib/tokens/check-authentication-state.mjs +2 -2
  105. package/{esm2020 → esm2022}/lib/tokens/cookie-language-key.token.mjs +4 -4
  106. package/{esm2020 → esm2022}/lib/tokens/http-context.token.mjs +2 -2
  107. package/{esm2020 → esm2022}/lib/tokens/include-localization-resources.token.mjs +2 -2
  108. package/{esm2020 → esm2022}/lib/tokens/index.mjs +15 -15
  109. package/{esm2020 → esm2022}/lib/tokens/list.token.mjs +2 -2
  110. package/{esm2020 → esm2022}/lib/tokens/localization.token.mjs +9 -9
  111. package/{esm2020 → esm2022}/lib/tokens/lodaer-delay.token.mjs +2 -2
  112. package/{esm2020 → esm2022}/lib/tokens/manage-profile.token.mjs +2 -2
  113. package/{esm2020 → esm2022}/lib/tokens/options.token.mjs +7 -7
  114. package/{esm2020 → esm2022}/lib/tokens/others-group.token.mjs +2 -2
  115. package/{esm2020 → esm2022}/lib/tokens/pipe-to-login.token.mjs +2 -2
  116. package/{esm2020 → esm2022}/lib/tokens/queue.token.mjs +2 -2
  117. package/{esm2020 → esm2022}/lib/tokens/set-token-response-to-storage.token.mjs +5 -5
  118. package/{esm2020 → esm2022}/lib/tokens/tenant-key.token.mjs +2 -2
  119. package/{esm2020 → esm2022}/lib/utils/array-utils.mjs +6 -6
  120. package/{esm2020 → esm2022}/lib/utils/common-utils.mjs +34 -34
  121. package/{esm2020 → esm2022}/lib/utils/date-extensions.mjs +5 -5
  122. package/{esm2020 → esm2022}/lib/utils/date-utils.mjs +12 -12
  123. package/{esm2020 → esm2022}/lib/utils/environment-utils.mjs +35 -35
  124. package/{esm2020 → esm2022}/lib/utils/factory-utils.mjs +24 -24
  125. package/{esm2020 → esm2022}/lib/utils/file-utils.mjs +13 -13
  126. package/{esm2020 → esm2022}/lib/utils/form-utils.mjs +11 -11
  127. package/{esm2020 → esm2022}/lib/utils/generator-utils.mjs +33 -33
  128. package/{esm2020 → esm2022}/lib/utils/http-utils.mjs +18 -18
  129. package/{esm2020 → esm2022}/lib/utils/index.mjs +20 -20
  130. package/{esm2020 → esm2022}/lib/utils/initial-utils.mjs +59 -59
  131. package/esm2022/lib/utils/internal-store-utils.mjs +37 -0
  132. package/{esm2020 → esm2022}/lib/utils/lazy-load-utils.mjs +39 -39
  133. package/{esm2020 → esm2022}/lib/utils/localization-utils.mjs +48 -48
  134. package/{esm2020 → esm2022}/lib/utils/multi-tenancy-utils.mjs +80 -80
  135. package/{esm2020 → esm2022}/lib/utils/number-utils.mjs +3 -3
  136. package/{esm2020 → esm2022}/lib/utils/object-utils.mjs +36 -36
  137. package/{esm2020 → esm2022}/lib/utils/queue.mjs +40 -40
  138. package/{esm2020 → esm2022}/lib/utils/route-utils.mjs +25 -25
  139. package/{esm2020 → esm2022}/lib/utils/string-utils.mjs +29 -29
  140. package/{esm2020 → esm2022}/lib/utils/tree-utils.mjs +69 -69
  141. package/{esm2020 → esm2022}/lib/validators/age.validator.mjs +13 -13
  142. package/{esm2020 → esm2022}/lib/validators/credit-card.validator.mjs +20 -20
  143. package/esm2022/lib/validators/index.mjs +29 -0
  144. package/{esm2020 → esm2022}/lib/validators/range.validator.mjs +14 -14
  145. package/{esm2020 → esm2022}/lib/validators/required.validator.mjs +14 -14
  146. package/{esm2020 → esm2022}/lib/validators/string-length.validator.mjs +14 -14
  147. package/esm2022/lib/validators/unique-character.validator.mjs +13 -0
  148. package/{esm2020 → esm2022}/lib/validators/url.validator.mjs +16 -16
  149. package/{esm2020 → esm2022}/lib/validators/username.validator.mjs +13 -13
  150. package/{esm2020 → esm2022}/locale/abp-ng.core-locale.mjs +4 -4
  151. package/{esm2020 → esm2022}/locale/public-api.mjs +1 -1
  152. package/{esm2020 → esm2022}/locale/utils/register-locale.mjs +46 -46
  153. package/{esm2020 → esm2022}/public-api.mjs +26 -26
  154. package/{esm2020 → esm2022}/testing/abp-ng.core-testing.mjs +4 -4
  155. package/esm2022/testing/lib/core-testing.module.mjs +68 -0
  156. package/{esm2020 → esm2022}/testing/lib/services/index.mjs +2 -2
  157. package/esm2022/testing/lib/services/mock-permission.service.mjs +36 -0
  158. package/esm2022/testing/lib/services/mock-rest.service.mjs +32 -0
  159. package/{esm2020 → esm2022}/testing/lib/utils/clear-page.util.mjs +9 -9
  160. package/{esm2020 → esm2022}/testing/lib/utils/index.mjs +2 -2
  161. package/{esm2020 → esm2022}/testing/lib/utils/wait.util.mjs +4 -4
  162. package/{esm2020 → esm2022}/testing/public-api.mjs +3 -3
  163. package/{fesm2020 → fesm2022}/abp-ng.core-locale.mjs +45 -45
  164. package/{fesm2020 → fesm2022}/abp-ng.core-testing.mjs +120 -120
  165. package/{fesm2020 → fesm2022}/abp-ng.core-testing.mjs.map +1 -1
  166. package/{fesm2020 → fesm2022}/abp-ng.core.mjs +4199 -4187
  167. package/fesm2022/abp-ng.core.mjs.map +1 -0
  168. package/index.d.ts +5 -5
  169. package/lib/abstracts/abstract-guard.d.ts +5 -0
  170. package/lib/abstracts/auth-response.model.d.ts +10 -10
  171. package/lib/abstracts/auth.guard.d.ts +9 -10
  172. package/lib/abstracts/auth.service.d.ts +30 -30
  173. package/lib/abstracts/index.d.ts +5 -4
  174. package/lib/abstracts/ng-model.component.d.ts +25 -25
  175. package/lib/clients/http.client.d.ts +11 -11
  176. package/lib/clients/index.d.ts +1 -1
  177. package/lib/components/dynamic-layout.component.d.ts +28 -28
  178. package/lib/components/index.d.ts +3 -3
  179. package/lib/components/replaceable-route-container.component.d.ts +17 -17
  180. package/lib/components/router-outlet.component.d.ts +5 -5
  181. package/lib/constants/different-locales.d.ts +334 -334
  182. package/lib/constants/index.d.ts +1 -1
  183. package/lib/core.module.d.ts +57 -57
  184. package/lib/directives/autofocus.directive.d.ts +12 -12
  185. package/lib/directives/debounce.directive.d.ts +13 -13
  186. package/lib/directives/for.directive.d.ts +36 -36
  187. package/lib/directives/form-submit.directive.d.ts +23 -23
  188. package/lib/directives/index.d.ts +8 -8
  189. package/lib/directives/init.directive.d.ts +10 -10
  190. package/lib/directives/permission.directive.d.ts +24 -24
  191. package/lib/directives/replaceable-template.directive.d.ts +29 -29
  192. package/lib/directives/stop-propagation.directive.d.ts +12 -12
  193. package/lib/enums/common.d.ts +5 -5
  194. package/lib/enums/index.d.ts +1 -1
  195. package/lib/guards/index.d.ts +1 -1
  196. package/lib/guards/permission.guard.d.ts +16 -16
  197. package/lib/handlers/routes.handler.d.ts +11 -11
  198. package/lib/interceptors/api.interceptor.d.ts +14 -14
  199. package/lib/interceptors/index.d.ts +1 -1
  200. package/lib/localization.module.d.ts +7 -7
  201. package/lib/models/auth.d.ts +14 -14
  202. package/lib/models/common.d.ts +79 -79
  203. package/lib/models/dtos.d.ts +107 -107
  204. package/lib/models/environment.d.ts +38 -38
  205. package/lib/models/index.d.ts +9 -9
  206. package/lib/models/localization.d.ts +5 -5
  207. package/lib/models/replaceable-components.d.ts +45 -45
  208. package/lib/models/rest.d.ts +36 -36
  209. package/lib/models/session.d.ts +7 -7
  210. package/lib/models/utility.d.ts +14 -14
  211. package/lib/pipes/index.d.ts +7 -7
  212. package/lib/pipes/localization.pipe.d.ts +12 -12
  213. package/lib/pipes/safe-html.pipe.d.ts +9 -9
  214. package/lib/pipes/short-date-time.pipe.d.ts +12 -12
  215. package/lib/pipes/short-date.pipe.d.ts +12 -12
  216. package/lib/pipes/short-time.pipe.d.ts +12 -12
  217. package/lib/pipes/sort.pipe.d.ts +9 -9
  218. package/lib/pipes/to-injector.pipe.d.ts +10 -10
  219. package/lib/providers/cookie-language.provider.d.ts +3 -3
  220. package/lib/providers/include-localization-resources.provider.d.ts +2 -2
  221. package/lib/providers/locale.provider.d.ts +9 -9
  222. package/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.d.ts +12 -12
  223. package/lib/proxy/pages/abp/multi-tenancy/index.d.ts +1 -1
  224. package/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.d.ts +11 -11
  225. package/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/index.d.ts +1 -1
  226. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.d.ts +11 -11
  227. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-localization.service.d.ts +11 -11
  228. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.d.ts +5 -5
  229. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/models.d.ts +106 -106
  230. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/index.d.ts +1 -1
  231. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/models.d.ts +71 -71
  232. package/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/index.d.ts +1 -1
  233. package/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models.d.ts +14 -14
  234. package/lib/proxy/volo/abp/http/modeling/index.d.ts +1 -1
  235. package/lib/proxy/volo/abp/http/modeling/models.d.ts +88 -88
  236. package/lib/proxy/volo/abp/localization/index.d.ts +1 -1
  237. package/lib/proxy/volo/abp/localization/models.d.ts +7 -7
  238. package/lib/proxy/volo/abp/models.d.ts +4 -4
  239. package/lib/services/config-state.service.d.ts +379 -378
  240. package/lib/services/content-projection.service.d.ts +10 -10
  241. package/lib/services/dom-insertion.service.d.ts +10 -10
  242. package/lib/services/environment.service.d.ts +103 -103
  243. package/lib/services/http-error-reporter.service.d.ts +12 -12
  244. package/lib/services/http-wait.service.d.ts +30 -30
  245. package/lib/services/index.d.ts +21 -21
  246. package/lib/services/lazy-load.service.d.ts +13 -13
  247. package/lib/services/list.service.d.ts +39 -39
  248. package/lib/services/local-storage.service.d.ts +13 -13
  249. package/lib/services/localization.service.d.ts +54 -54
  250. package/lib/services/multi-tenancy.service.d.ts +22 -22
  251. package/lib/services/permission.service.d.ts +19 -19
  252. package/lib/services/replaceable-components.service.d.ts +19 -19
  253. package/lib/services/resource-wait.service.d.ts +15 -15
  254. package/lib/services/rest.service.d.ts +24 -24
  255. package/lib/services/router-events.service.d.ts +29 -29
  256. package/lib/services/router-wait.service.d.ts +20 -20
  257. package/lib/services/routes.service.d.ts +57 -57
  258. package/lib/services/session-state.service.d.ts +27 -27
  259. package/lib/services/subscription.service.d.ts +17 -17
  260. package/lib/services/track-by.service.d.ts +11 -11
  261. package/lib/strategies/container.strategy.d.ts +22 -22
  262. package/lib/strategies/content-security.strategy.d.ts +17 -17
  263. package/lib/strategies/content.strategy.d.ts +26 -26
  264. package/lib/strategies/context.strategy.d.ts +23 -23
  265. package/lib/strategies/cross-origin.strategy.d.ts +14 -14
  266. package/lib/strategies/dom.strategy.d.ts +13 -13
  267. package/lib/strategies/index.d.ts +8 -8
  268. package/lib/strategies/loading.strategy.d.ts +28 -28
  269. package/lib/strategies/projection.strategy.d.ts +39 -39
  270. package/lib/tokens/app-config.token.d.ts +3 -3
  271. package/lib/tokens/check-authentication-state.d.ts +3 -3
  272. package/lib/tokens/cookie-language-key.token.d.ts +2 -2
  273. package/lib/tokens/http-context.token.d.ts +2 -2
  274. package/lib/tokens/include-localization-resources.token.d.ts +2 -2
  275. package/lib/tokens/index.d.ts +15 -15
  276. package/lib/tokens/list.token.d.ts +2 -2
  277. package/lib/tokens/localization.token.d.ts +6 -6
  278. package/lib/tokens/lodaer-delay.token.d.ts +2 -2
  279. package/lib/tokens/manage-profile.token.d.ts +2 -2
  280. package/lib/tokens/options.token.d.ts +4 -4
  281. package/lib/tokens/others-group.token.d.ts +2 -2
  282. package/lib/tokens/pipe-to-login.token.d.ts +3 -3
  283. package/lib/tokens/queue.token.d.ts +3 -3
  284. package/lib/tokens/set-token-response-to-storage.token.d.ts +6 -6
  285. package/lib/tokens/tenant-key.token.d.ts +2 -2
  286. package/lib/utils/array-utils.d.ts +1 -1
  287. package/lib/utils/common-utils.d.ts +11 -11
  288. package/lib/utils/date-extensions.d.ts +6 -6
  289. package/lib/utils/date-utils.d.ts +4 -4
  290. package/lib/utils/environment-utils.d.ts +3 -3
  291. package/lib/utils/factory-utils.d.ts +11 -11
  292. package/lib/utils/file-utils.d.ts +1 -1
  293. package/lib/utils/form-utils.d.ts +2 -2
  294. package/lib/utils/generator-utils.d.ts +3 -3
  295. package/lib/utils/http-utils.d.ts +8 -8
  296. package/lib/utils/index.d.ts +20 -20
  297. package/lib/utils/initial-utils.d.ts +3 -3
  298. package/lib/utils/internal-store-utils.d.ts +14 -14
  299. package/lib/utils/lazy-load-utils.d.ts +4 -4
  300. package/lib/utils/localization-utils.d.ts +5 -5
  301. package/lib/utils/multi-tenancy-utils.d.ts +3 -3
  302. package/lib/utils/number-utils.d.ts +1 -1
  303. package/lib/utils/object-utils.d.ts +2 -2
  304. package/lib/utils/queue.d.ts +14 -14
  305. package/lib/utils/route-utils.d.ts +8 -8
  306. package/lib/utils/string-utils.d.ts +3 -3
  307. package/lib/utils/tree-utils.d.ts +26 -26
  308. package/lib/validators/age.validator.d.ts +10 -10
  309. package/lib/validators/credit-card.validator.d.ts +5 -5
  310. package/lib/validators/index.d.ts +28 -24
  311. package/lib/validators/range.validator.d.ts +12 -12
  312. package/lib/validators/required.validator.d.ts +8 -8
  313. package/lib/validators/string-length.validator.d.ts +14 -14
  314. package/lib/validators/unique-character.validator.d.ts +5 -0
  315. package/lib/validators/url.validator.d.ts +5 -5
  316. package/lib/validators/username.validator.d.ts +10 -10
  317. package/locale/index.d.ts +5 -5
  318. package/locale/public-api.d.ts +1 -1
  319. package/locale/utils/register-locale.d.ts +13 -13
  320. package/package.json +12 -22
  321. package/public-api.d.ts +25 -25
  322. package/testing/index.d.ts +5 -5
  323. package/testing/lib/core-testing.module.d.ts +16 -16
  324. package/testing/lib/services/index.d.ts +2 -2
  325. package/testing/lib/services/mock-permission.service.d.ts +10 -10
  326. package/testing/lib/services/mock-rest.service.d.ts +14 -14
  327. package/testing/lib/utils/clear-page.util.d.ts +2 -2
  328. package/testing/lib/utils/index.d.ts +2 -2
  329. package/testing/lib/utils/wait.util.d.ts +2 -2
  330. package/testing/public-api.d.ts +3 -3
  331. package/esm2020/lib/abstracts/auth.guard.mjs +0 -17
  332. package/esm2020/lib/abstracts/auth.service.mjs +0 -45
  333. package/esm2020/lib/abstracts/index.mjs +0 -5
  334. package/esm2020/lib/abstracts/ng-model.component.mjs +0 -59
  335. package/esm2020/lib/clients/http.client.mjs +0 -34
  336. package/esm2020/lib/components/dynamic-layout.component.mjs +0 -100
  337. package/esm2020/lib/components/replaceable-route-container.component.mjs +0 -42
  338. package/esm2020/lib/components/router-outlet.component.mjs +0 -15
  339. package/esm2020/lib/core.module.mjs +0 -282
  340. package/esm2020/lib/directives/autofocus.directive.mjs +0 -30
  341. package/esm2020/lib/directives/debounce.directive.mjs +0 -36
  342. package/esm2020/lib/directives/for.directive.mjs +0 -159
  343. package/esm2020/lib/directives/form-submit.directive.mjs +0 -77
  344. package/esm2020/lib/directives/init.directive.mjs +0 -21
  345. package/esm2020/lib/directives/permission.directive.mjs +0 -74
  346. package/esm2020/lib/directives/replaceable-template.directive.mjs +0 -132
  347. package/esm2020/lib/directives/stop-propagation.directive.mjs +0 -32
  348. package/esm2020/lib/guards/permission.guard.mjs +0 -44
  349. package/esm2020/lib/handlers/routes.handler.mjs +0 -51
  350. package/esm2020/lib/interceptors/api.interceptor.mjs +0 -27
  351. package/esm2020/lib/localization.module.mjs +0 -16
  352. package/esm2020/lib/pipes/localization.pipe.mjs +0 -33
  353. package/esm2020/lib/pipes/safe-html.pipe.mjs +0 -23
  354. package/esm2020/lib/pipes/short-date-time.pipe.mjs +0 -34
  355. package/esm2020/lib/pipes/short-date.pipe.mjs +0 -34
  356. package/esm2020/lib/pipes/short-time.pipe.mjs +0 -34
  357. package/esm2020/lib/pipes/sort.pipe.mjs +0 -49
  358. package/esm2020/lib/pipes/to-injector.pipe.mjs +0 -29
  359. package/esm2020/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.mjs +0 -27
  360. package/esm2020/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.mjs +0 -24
  361. package/esm2020/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.mjs +0 -24
  362. package/esm2020/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-localization.service.mjs +0 -24
  363. package/esm2020/lib/services/config-state.service.mjs +0 -178
  364. package/esm2020/lib/services/content-projection.service.mjs +0 -17
  365. package/esm2020/lib/services/dom-insertion.service.mjs +0 -34
  366. package/esm2020/lib/services/environment.service.mjs +0 -48
  367. package/esm2020/lib/services/http-error-reporter.service.mjs +0 -29
  368. package/esm2020/lib/services/http-wait.service.mjs +0 -75
  369. package/esm2020/lib/services/lazy-load.service.mjs +0 -40
  370. package/esm2020/lib/services/list.service.mjs +0 -102
  371. package/esm2020/lib/services/local-storage.service.mjs +0 -32
  372. package/esm2020/lib/services/localization.service.mjs +0 -217
  373. package/esm2020/lib/services/multi-tenancy.service.mjs +0 -48
  374. package/esm2020/lib/services/permission.service.mjs +0 -63
  375. package/esm2020/lib/services/replaceable-components.service.mjs +0 -49
  376. package/esm2020/lib/services/resource-wait.service.mjs +0 -39
  377. package/esm2020/lib/services/rest.service.mjs +0 -78
  378. package/esm2020/lib/services/router-events.service.mjs +0 -38
  379. package/esm2020/lib/services/router-wait.service.mjs +0 -51
  380. package/esm2020/lib/services/routes.service.mjs +0 -163
  381. package/esm2020/lib/services/session-state.service.mjs +0 -80
  382. package/esm2020/lib/services/subscription.service.mjs +0 -43
  383. package/esm2020/lib/services/track-by.service.mjs +0 -21
  384. package/esm2020/lib/utils/internal-store-utils.mjs +0 -37
  385. package/esm2020/lib/validators/index.mjs +0 -25
  386. package/esm2020/testing/lib/core-testing.module.mjs +0 -67
  387. package/esm2020/testing/lib/services/mock-permission.service.mjs +0 -35
  388. package/esm2020/testing/lib/services/mock-rest.service.mjs +0 -31
  389. package/fesm2015/abp-ng.core-locale.mjs +0 -57
  390. package/fesm2015/abp-ng.core-locale.mjs.map +0 -1
  391. package/fesm2015/abp-ng.core-testing.mjs +0 -146
  392. package/fesm2015/abp-ng.core-testing.mjs.map +0 -1
  393. package/fesm2015/abp-ng.core.mjs +0 -4460
  394. package/fesm2015/abp-ng.core.mjs.map +0 -1
  395. package/fesm2020/abp-ng.core.mjs.map +0 -1
  396. package/src/lib/proxy/README.md +0 -17
  397. /package/{fesm2020 → fesm2022}/abp-ng.core-locale.mjs.map +0 -0
@@ -1,4460 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectorRef, Component, Input, Injectable, InjectionToken, Inject, Optional, isDevMode, SkipSelf, Directive, EventEmitter, Output, Self, Injector, Pipe, NgModule, APP_INITIALIZER, LOCALE_ID, NgModuleFactory, Compiler, inject, SecurityContext, ComponentFactoryResolver, ApplicationRef } from '@angular/core';
3
- import { of, BehaviorSubject, Subject, throwError, map as map$1, Subscription, combineLatest, from, fromEvent, ReplaySubject, lastValueFrom, Observable, timer, pipe, concat } from 'rxjs';
4
- import * as i1$1 from '@angular/router';
5
- import { PRIMARY_OUTLET, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ActivatedRoute, Router, RouterModule } from '@angular/router';
6
- import { __rest, __classPrivateFieldGet, __awaiter } from 'tslib';
7
- import * as i1 from '@angular/common/http';
8
- import { HttpContextToken, HttpClient, HttpContext, HttpParams, HttpClientModule, HttpClientXsrfModule, HttpHeaders } from '@angular/common/http';
9
- import { map, distinctUntilChanged, filter, catchError, switchMap, take, tap, debounceTime, mapTo, takeUntil, delay, retryWhen, shareReplay, finalize } from 'rxjs/operators';
10
- import compare from 'just-compare';
11
- import * as i5 from '@angular/common';
12
- import { registerLocaleData, DOCUMENT, DatePipe, DATE_PIPE_DEFAULT_TIMEZONE, CommonModule } from '@angular/common';
13
- import * as i1$2 from '@angular/forms';
14
- import { FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
15
- import clone from 'just-clone';
16
- import { DomSanitizer } from '@angular/platform-browser';
17
-
18
- // Not an abstract class on purpose. Do not change!
19
- class AbstractNgModelComponent {
20
- constructor(injector) {
21
- this.injector = injector;
22
- this.valueFn = value => value;
23
- this.valueLimitFn = value => false;
24
- this.cdRef = injector.get(ChangeDetectorRef);
25
- }
26
- set value(value) {
27
- value = this.valueFn(value, this._value);
28
- if (this.valueLimitFn(value, this._value) !== false || this.readonly)
29
- return;
30
- this._value = value;
31
- this.notifyValueChange();
32
- }
33
- get value() {
34
- return this._value || this.defaultValue;
35
- }
36
- get defaultValue() {
37
- return this._value;
38
- }
39
- notifyValueChange() {
40
- if (this.onChange) {
41
- this.onChange(this.value);
42
- }
43
- }
44
- writeValue(value) {
45
- this._value = this.valueLimitFn(value, this._value) || value;
46
- setTimeout(() => this.cdRef.markForCheck(), 0);
47
- }
48
- registerOnChange(fn) {
49
- this.onChange = fn;
50
- }
51
- registerOnTouched(fn) {
52
- this.onTouched = fn;
53
- }
54
- setDisabledState(isDisabled) {
55
- this.disabled = isDisabled;
56
- }
57
- }
58
- AbstractNgModelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractNgModelComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
59
- AbstractNgModelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AbstractNgModelComponent, selector: "ng-component", inputs: { disabled: "disabled", readonly: "readonly", valueFn: "valueFn", valueLimitFn: "valueLimitFn", value: "value" }, ngImport: i0, template: '', isInline: true });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractNgModelComponent, decorators: [{
61
- type: Component,
62
- args: [{ template: '' }]
63
- }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { disabled: [{
64
- type: Input
65
- }], readonly: [{
66
- type: Input
67
- }], valueFn: [{
68
- type: Input
69
- }], valueLimitFn: [{
70
- type: Input
71
- }], value: [{
72
- type: Input
73
- }] } });
74
-
75
- class AuthGuard {
76
- canActivate() {
77
- console.error('You should add @abp/ng-oauth packages or create your own auth packages.');
78
- return false;
79
- }
80
- }
81
- AuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
82
- AuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthGuard, providedIn: 'root' });
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthGuard, decorators: [{
84
- type: Injectable,
85
- args: [{
86
- providedIn: 'root',
87
- }]
88
- }] });
89
-
90
- /**
91
- * Abstract service for Authentication.
92
- */
93
- class AuthService {
94
- warningMessage() {
95
- console.error('You should add @abp/ng-oauth packages or create your own auth packages.');
96
- }
97
- init() {
98
- this.warningMessage();
99
- return Promise.resolve(undefined);
100
- }
101
- login(params) {
102
- this.warningMessage();
103
- return of(undefined);
104
- }
105
- logout(queryParams) {
106
- this.warningMessage();
107
- return of(undefined);
108
- }
109
- navigateToLogin(queryParams) { }
110
- get isInternalAuth() {
111
- throw new Error('not implemented');
112
- return false;
113
- }
114
- get isAuthenticated() {
115
- this.warningMessage();
116
- return false;
117
- }
118
- loginUsingGrant(grantType, parameters, headers) {
119
- console.log({ grantType, parameters, headers });
120
- return Promise.reject(new Error('not implemented'));
121
- }
122
- }
123
- AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
124
- AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthService, providedIn: 'root' });
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthService, decorators: [{
126
- type: Injectable,
127
- args: [{
128
- providedIn: 'root',
129
- }]
130
- }] });
131
-
132
- const APP_INIT_ERROR_HANDLERS = new InjectionToken('APP_INIT_ERROR_HANDLERS');
133
-
134
- const COOKIE_LANGUAGE_KEY = new InjectionToken('COOKIE_LANGUAGE_KEY', {
135
- factory: () => '.AspNetCore.Culture',
136
- });
137
-
138
- const LIST_QUERY_DEBOUNCE_TIME = new InjectionToken('LIST_QUERY_DEBOUNCE_TIME');
139
-
140
- const LOCALIZATIONS = new InjectionToken('LOCALIZATIONS');
141
- function localizationContributor(localizations) {
142
- if (localizations) {
143
- localizations$.next([...localizations$.value, ...localizations]);
144
- }
145
- }
146
- const localizations$ = new BehaviorSubject([]);
147
-
148
- const LOADER_DELAY = new InjectionToken('LOADER_DELAY');
149
-
150
- const NAVIGATE_TO_MANAGE_PROFILE = new InjectionToken('NAVIGATE_TO_MANAGE_PROFILE');
151
-
152
- const CORE_OPTIONS = new InjectionToken('CORE_OPTIONS');
153
- function coreOptionsFactory(_a) {
154
- var options = __rest(_a, []);
155
- return Object.assign({}, options);
156
- }
157
-
158
- const QUEUE_MANAGER = new InjectionToken("QUEUE_MANAGER");
159
-
160
- const TENANT_KEY = new InjectionToken('TENANT_KEY');
161
-
162
- const INCUDE_LOCALIZATION_RESOURCES_TOKEN = new InjectionToken('INCUDE_LOCALIZATION_RESOURCES_TOKEN');
163
-
164
- const PIPE_TO_LOGIN_FN_KEY = new InjectionToken('PIPE_TO_LOGIN_FN_KEY');
165
-
166
- /**
167
- * @deprecated The token should not be used anymore.
168
- */
169
- const SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY = new InjectionToken('SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY');
170
-
171
- const CHECK_AUTHENTICATION_STATE_FN_KEY = new InjectionToken('CHECK_AUTHENTICATION_STATE_FN_KEY');
172
-
173
- const IS_EXTERNAL_REQUEST = new HttpContextToken(() => false);
174
-
175
- const OTHERS_GROUP = new InjectionToken('OTHERS_GROUP');
176
-
177
- function pushValueTo(array) {
178
- return (element) => {
179
- array.push(element);
180
- return array;
181
- };
182
- }
183
-
184
- function noop() {
185
- const fn = function () { };
186
- return fn;
187
- }
188
- function isUndefinedOrEmptyString(value) {
189
- return value === undefined || value === '';
190
- }
191
- function isNullOrUndefined(obj) {
192
- return obj === null || obj === undefined;
193
- }
194
- function isNullOrEmpty(obj) {
195
- return obj === null || obj === undefined || obj === '';
196
- }
197
- function exists(obj) {
198
- return !isNullOrUndefined(obj);
199
- }
200
- function isObject(obj) {
201
- return obj instanceof Object;
202
- }
203
- function isArray(obj) {
204
- return Array.isArray(obj);
205
- }
206
- function isObjectAndNotArray(obj) {
207
- return isObject(obj) && !isArray(obj);
208
- }
209
- function isNode(obj) {
210
- return obj instanceof Node;
211
- }
212
- function isObjectAndNotArrayNotNode(obj) {
213
- return isObjectAndNotArray(obj) && !isNode(obj);
214
- }
215
- function checkHasProp(object, key) {
216
- return Object.prototype.hasOwnProperty.call(object, key);
217
- }
218
-
219
- /* eslint-disable @typescript-eslint/ban-types */
220
- class BaseTreeNode {
221
- constructor(props) {
222
- this.children = [];
223
- this.isLeaf = true;
224
- Object.assign(this, props);
225
- }
226
- static create(props) {
227
- return new BaseTreeNode(props);
228
- }
229
- }
230
- function createTreeFromList(list, keySelector, parentKeySelector, valueMapper) {
231
- const map = createMapFromList(list, keySelector, valueMapper);
232
- const tree = [];
233
- list.forEach(row => {
234
- const id = keySelector(row);
235
- const parentId = parentKeySelector(row);
236
- const node = map.get(id);
237
- if (!node)
238
- return;
239
- if (parentId) {
240
- const parent = map.get(parentId);
241
- if (!parent)
242
- return;
243
- parent.children.push(node);
244
- parent.isLeaf = false;
245
- node.parent = parent;
246
- }
247
- else {
248
- tree.push(node);
249
- }
250
- });
251
- return tree;
252
- }
253
- function createMapFromList(list, keySelector, valueMapper) {
254
- const map = new Map();
255
- list.forEach(row => map.set(keySelector(row), valueMapper(row)));
256
- return map;
257
- }
258
- function createTreeNodeFilterCreator(key, mapperFn) {
259
- return (search) => {
260
- const regex = new RegExp('.*' + search + '.*', 'i');
261
- return function collectNodes(nodes, matches = []) {
262
- for (const node of nodes) {
263
- if (regex.test(mapperFn(node[key])))
264
- matches.push(node);
265
- if (node.children.length)
266
- collectNodes(node.children, matches);
267
- }
268
- return matches;
269
- };
270
- };
271
- }
272
- function createGroupMap(list, othersGroupKey) {
273
- if (!isArray(list) || !list.some(node => Boolean(node.group)))
274
- return undefined;
275
- const mapGroup = new Map();
276
- for (const node of list) {
277
- const group = (node === null || node === void 0 ? void 0 : node.group) || othersGroupKey;
278
- if (typeof group !== 'string') {
279
- throw new Error(`Invalid group: ${group}`);
280
- }
281
- const items = mapGroup.get(group) || [];
282
- items.push(node);
283
- mapGroup.set(group, items);
284
- }
285
- return mapGroup;
286
- }
287
-
288
- function deepMerge(target, source) {
289
- if (isObjectAndNotArrayNotNode(target) && isObjectAndNotArrayNotNode(source)) {
290
- return deepMergeRecursively(target, source);
291
- }
292
- else if (isNullOrUndefined(target) && isNullOrUndefined(source)) {
293
- return {};
294
- }
295
- else {
296
- return exists(source) ? source : target;
297
- }
298
- }
299
- function deepMergeRecursively(target, source) {
300
- const shouldNotRecurse = isNullOrUndefined(target) ||
301
- isNullOrUndefined(source) || // at least one not defined
302
- isArray(target) ||
303
- isArray(source) || // at least one array
304
- !isObject(target) ||
305
- !isObject(source) || // at least one not an object
306
- isNode(target) ||
307
- isNode(source); // at least one node
308
- /**
309
- * if we will not recurse any further,
310
- * we will prioritize source if it is a defined value.
311
- */
312
- if (shouldNotRecurse) {
313
- return exists(source) ? source : target;
314
- }
315
- const keysOfTarget = Object.keys(target);
316
- const keysOfSource = Object.keys(source);
317
- const uniqueKeys = new Set(keysOfTarget.concat(keysOfSource));
318
- return [...uniqueKeys].reduce((retVal, key) => {
319
- retVal[key] = deepMergeRecursively(target[key], source[key]);
320
- return retVal;
321
- }, {});
322
- }
323
-
324
- class InternalStore {
325
- constructor(initialState) {
326
- this.initialState = initialState;
327
- this.state$ = new BehaviorSubject(this.initialState);
328
- this.update$ = new Subject();
329
- this.sliceState = (selector, compareFn = compare) => this.state$.pipe(map(selector), distinctUntilChanged(compareFn));
330
- this.sliceUpdate = (selector, filterFn = (x) => x !== undefined) => this.update$.pipe(map(selector), filter(filterFn));
331
- }
332
- get state() {
333
- return this.state$.value;
334
- }
335
- patch(state) {
336
- let patchedState = state;
337
- if (typeof state === 'object' && !Array.isArray(state)) {
338
- patchedState = Object.assign(Object.assign({}, this.state), state);
339
- }
340
- this.state$.next(patchedState);
341
- this.update$.next(patchedState);
342
- }
343
- deepPatch(state) {
344
- // TODO: Strict improve deepMerge
345
- this.state$.next(deepMerge(this.state, state));
346
- this.update$.next(state);
347
- }
348
- set(state) {
349
- this.state$.next(state);
350
- this.update$.next(state);
351
- }
352
- reset() {
353
- this.set(this.initialState);
354
- }
355
- }
356
-
357
- var _ExternalHttpClient_instances, _ExternalHttpClient_setPlaceholderContext;
358
- // source : https://github.com/armanozak/demo-angular-server-specific-interceptors
359
- class ExternalHttpClient extends HttpClient {
360
- constructor() {
361
- super(...arguments);
362
- _ExternalHttpClient_instances.add(this);
363
- }
364
- request(first, url, options = {}) {
365
- if (typeof first === 'string') {
366
- __classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, options);
367
- return super.request(first, url || '', options);
368
- }
369
- __classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, first);
370
- return super.request(first);
371
- }
372
- }
373
- _ExternalHttpClient_instances = new WeakSet(), _ExternalHttpClient_setPlaceholderContext = function _ExternalHttpClient_setPlaceholderContext(optionsOrRequest) {
374
- var _a;
375
- (_a = optionsOrRequest.context) !== null && _a !== void 0 ? _a : (optionsOrRequest.context = new HttpContext());
376
- optionsOrRequest.context.set(IS_EXTERNAL_REQUEST, true);
377
- };
378
- ExternalHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
379
- ExternalHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, providedIn: 'root' });
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, decorators: [{
381
- type: Injectable,
382
- args: [{
383
- providedIn: 'root',
384
- }]
385
- }] });
386
-
387
- const mapToApiUrl = (key) => (apis) => ((key && apis[key]) || apis.default).url || apis.default.url;
388
- const mapToIssuer = (issuer) => {
389
- if (!issuer) {
390
- return issuer;
391
- }
392
- return issuer.endsWith('/') ? issuer : issuer + '/';
393
- };
394
- class EnvironmentService {
395
- constructor() {
396
- this.store = new InternalStore({});
397
- }
398
- get createOnUpdateStream() {
399
- return this.store.sliceUpdate;
400
- }
401
- getEnvironment$() {
402
- return this.store.sliceState(state => state);
403
- }
404
- getEnvironment() {
405
- return this.store.state;
406
- }
407
- getApiUrl(key) {
408
- var _a;
409
- return mapToApiUrl(key)((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.apis);
410
- }
411
- getApiUrl$(key) {
412
- return this.store.sliceState(state => state.apis).pipe(map(mapToApiUrl(key)));
413
- }
414
- setState(environment) {
415
- this.store.set(environment);
416
- }
417
- getIssuer() {
418
- var _a, _b;
419
- const issuer = (_b = (_a = this.store.state) === null || _a === void 0 ? void 0 : _a.oAuthConfig) === null || _b === void 0 ? void 0 : _b.issuer;
420
- return mapToIssuer(issuer);
421
- }
422
- getIssuer$() {
423
- return this.store.sliceState(state => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.oAuthConfig) === null || _a === void 0 ? void 0 : _a.issuer; }).pipe(map(mapToIssuer));
424
- }
425
- }
426
- EnvironmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EnvironmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
427
- EnvironmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EnvironmentService, providedIn: 'root' });
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EnvironmentService, decorators: [{
429
- type: Injectable,
430
- args: [{ providedIn: 'root' }]
431
- }] });
432
-
433
- class HttpErrorReporterService {
434
- constructor() {
435
- this._reporter$ = new Subject();
436
- this._errors$ = new BehaviorSubject([]);
437
- this.reportError = (error) => {
438
- this._reporter$.next(error);
439
- this._errors$.next([...this.errors, error]);
440
- };
441
- }
442
- get reporter$() {
443
- return this._reporter$.asObservable();
444
- }
445
- get errors$() {
446
- return this._errors$.asObservable();
447
- }
448
- get errors() {
449
- return this._errors$.value;
450
- }
451
- }
452
- HttpErrorReporterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorReporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
453
- HttpErrorReporterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorReporterService, providedIn: 'root' });
454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorReporterService, decorators: [{
455
- type: Injectable,
456
- args: [{ providedIn: 'root' }]
457
- }] });
458
-
459
- class RestService {
460
- constructor(options, http, externalHttp, environment, httpErrorReporter) {
461
- this.options = options;
462
- this.http = http;
463
- this.externalHttp = externalHttp;
464
- this.environment = environment;
465
- this.httpErrorReporter = httpErrorReporter;
466
- }
467
- getApiFromStore(apiName) {
468
- return this.environment.getApiUrl(apiName);
469
- }
470
- handleError(err) {
471
- this.httpErrorReporter.reportError(err);
472
- return throwError(err);
473
- }
474
- request(request, config, api) {
475
- config = config || {};
476
- api = api || this.getApiFromStore(config.apiName);
477
- const { method, params } = request, options = __rest(request, ["method", "params"]);
478
- const { observe = "body" /* Rest.Observe.Body */, skipHandleError } = config;
479
- const url = this.removeDuplicateSlashes(api + request.url);
480
- const httpClient = this.getHttpClient(config.skipAddingHeader);
481
- return httpClient
482
- .request(method, url, Object.assign(Object.assign({ observe }, (params && {
483
- params: this.getParams(params, config.httpParamEncoder),
484
- })), options))
485
- .pipe(catchError(err => (skipHandleError ? throwError(err) : this.handleError(err))));
486
- }
487
- getHttpClient(isExternal) {
488
- return isExternal ? this.externalHttp : this.http;
489
- }
490
- getParams(params, encoder) {
491
- const filteredParams = Object.entries(params).reduce((acc, [key, value]) => {
492
- if (isUndefinedOrEmptyString(value))
493
- return acc;
494
- if (value === null && !this.options.sendNullsAsQueryParam)
495
- return acc;
496
- acc[key] = value;
497
- return acc;
498
- }, {});
499
- return encoder
500
- ? new HttpParams({ encoder, fromObject: filteredParams })
501
- : new HttpParams({ fromObject: filteredParams });
502
- }
503
- removeDuplicateSlashes(url) {
504
- return url.replace(/([^:]\/)\/+/g, '$1');
505
- }
506
- }
507
- RestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, deps: [{ token: CORE_OPTIONS }, { token: i1.HttpClient }, { token: ExternalHttpClient }, { token: EnvironmentService }, { token: HttpErrorReporterService }], target: i0.ɵɵFactoryTarget.Injectable });
508
- RestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, providedIn: 'root' });
509
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, decorators: [{
510
- type: Injectable,
511
- args: [{
512
- providedIn: 'root',
513
- }]
514
- }], ctorParameters: function () {
515
- return [{ type: undefined, decorators: [{
516
- type: Inject,
517
- args: [CORE_OPTIONS]
518
- }] }, { type: i1.HttpClient }, { type: ExternalHttpClient }, { type: EnvironmentService }, { type: HttpErrorReporterService }];
519
- } });
520
-
521
- class AbpApplicationConfigurationService {
522
- constructor(restService) {
523
- this.restService = restService;
524
- this.apiName = 'abp';
525
- this.get = (options) => this.restService.request({
526
- method: 'GET',
527
- url: '/api/abp/application-configuration',
528
- params: { includeLocalizationResources: options.includeLocalizationResources },
529
- }, { apiName: this.apiName });
530
- }
531
- }
532
- AbpApplicationConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApplicationConfigurationService, deps: [{ token: RestService }], target: i0.ɵɵFactoryTarget.Injectable });
533
- AbpApplicationConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApplicationConfigurationService, providedIn: 'root' });
534
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApplicationConfigurationService, decorators: [{
535
- type: Injectable,
536
- args: [{
537
- providedIn: 'root',
538
- }]
539
- }], ctorParameters: function () { return [{ type: RestService }]; } });
540
-
541
- class AbpApplicationLocalizationService {
542
- constructor(restService) {
543
- this.restService = restService;
544
- this.apiName = 'abp';
545
- this.get = (input) => this.restService.request({
546
- method: 'GET',
547
- url: '/api/abp/application-localization',
548
- params: { cultureName: input.cultureName, onlyDynamics: input.onlyDynamics },
549
- }, { apiName: this.apiName });
550
- }
551
- }
552
- AbpApplicationLocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApplicationLocalizationService, deps: [{ token: RestService }], target: i0.ɵɵFactoryTarget.Injectable });
553
- AbpApplicationLocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApplicationLocalizationService, providedIn: 'root' });
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApplicationLocalizationService, decorators: [{
555
- type: Injectable,
556
- args: [{
557
- providedIn: 'root',
558
- }]
559
- }], ctorParameters: function () { return [{ type: RestService }]; } });
560
-
561
- class ConfigStateService {
562
- constructor(abpConfigService, abpApplicationLocalizationService, includeLocalizationResources) {
563
- this.abpConfigService = abpConfigService;
564
- this.abpApplicationLocalizationService = abpApplicationLocalizationService;
565
- this.includeLocalizationResources = includeLocalizationResources;
566
- this.store = new InternalStore({});
567
- this.updateSubject = new Subject();
568
- this.initUpdateStream();
569
- }
570
- get createOnUpdateStream() {
571
- return this.store.sliceUpdate;
572
- }
573
- initUpdateStream() {
574
- this.updateSubject
575
- .pipe(switchMap(() => this.abpConfigService.get({
576
- includeLocalizationResources: !!this.includeLocalizationResources,
577
- })))
578
- .pipe(switchMap(appState => this.getLocalizationAndCombineWithAppState(appState)))
579
- .subscribe(res => this.store.set(res));
580
- }
581
- getLocalizationAndCombineWithAppState(appState) {
582
- if (!appState.localization.currentCulture.cultureName) {
583
- throw new Error('culture name should defined');
584
- }
585
- return this.getlocalizationResource(appState.localization.currentCulture.cultureName).pipe(map(result => (Object.assign(Object.assign({}, appState), { localization: Object.assign(Object.assign({}, appState.localization), result) }))));
586
- }
587
- getlocalizationResource(cultureName) {
588
- return this.abpApplicationLocalizationService.get({
589
- cultureName: cultureName,
590
- onlyDynamics: false,
591
- });
592
- }
593
- refreshAppState() {
594
- this.updateSubject.next();
595
- return this.createOnUpdateStream(state => state).pipe(take(1));
596
- }
597
- refreshLocalization(lang) {
598
- if (this.includeLocalizationResources) {
599
- return this.refreshAppState().pipe(map(() => null));
600
- }
601
- else {
602
- return this.getlocalizationResource(lang)
603
- .pipe(tap(result => this.store.patch({ localization: Object.assign(Object.assign({}, this.store.state.localization), result) })))
604
- .pipe(map(() => null));
605
- }
606
- }
607
- getOne$(key) {
608
- return this.store.sliceState(state => state[key]);
609
- }
610
- getOne(key) {
611
- return this.store.state[key];
612
- }
613
- getAll$() {
614
- return this.store.sliceState(state => state);
615
- }
616
- getAll() {
617
- return this.store.state;
618
- }
619
- getDeep$(keys) {
620
- keys = splitKeys(keys);
621
- return this.store
622
- .sliceState(state => state)
623
- .pipe(map(state => {
624
- return keys.reduce((acc, val) => {
625
- if (acc) {
626
- return acc[val];
627
- }
628
- return undefined;
629
- }, state);
630
- }));
631
- }
632
- getDeep(keys) {
633
- keys = splitKeys(keys);
634
- return keys.reduce((acc, val) => {
635
- if (acc) {
636
- return acc[val];
637
- }
638
- return undefined;
639
- }, this.store.state);
640
- }
641
- getFeature(key) {
642
- var _a, _b;
643
- return (_b = (_a = this.store.state.features) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b[key];
644
- }
645
- getFeature$(key) {
646
- return this.store.sliceState(state => { var _a, _b; return (_b = (_a = state.features) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b[key]; });
647
- }
648
- getFeatures(keys) {
649
- const { features } = this.store.state;
650
- if (!features)
651
- return;
652
- return keys.reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: features.values[key] })), {});
653
- }
654
- getFeatures$(keys) {
655
- return this.store.sliceState(({ features }) => {
656
- if (!(features === null || features === void 0 ? void 0 : features.values))
657
- return;
658
- return keys.reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: features.values[key] })), {});
659
- });
660
- }
661
- getSetting(key) {
662
- var _a, _b;
663
- return (_b = (_a = this.store.state.setting) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b[key];
664
- }
665
- getSetting$(key) {
666
- return this.store.sliceState(state => { var _a, _b; return (_b = (_a = state.setting) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b[key]; });
667
- }
668
- getSettings(keyword) {
669
- var _a;
670
- const settings = ((_a = this.store.state.setting) === null || _a === void 0 ? void 0 : _a.values) || {};
671
- if (!keyword)
672
- return settings;
673
- const keysFound = Object.keys(settings).filter(key => key.indexOf(keyword) > -1);
674
- return keysFound.reduce((acc, key) => {
675
- acc[key] = settings[key];
676
- return acc;
677
- }, {});
678
- }
679
- getSettings$(keyword) {
680
- return this.store
681
- .sliceState(state => { var _a; return (_a = state.setting) === null || _a === void 0 ? void 0 : _a.values; })
682
- .pipe(map((settings = {}) => {
683
- if (!keyword)
684
- return settings;
685
- const keysFound = Object.keys(settings).filter(key => key.indexOf(keyword) > -1);
686
- return keysFound.reduce((acc, key) => {
687
- acc[key] = settings[key];
688
- return acc;
689
- }, {});
690
- }));
691
- }
692
- getGlobalFeatures() {
693
- return this.store.state.globalFeatures;
694
- }
695
- getGlobalFeatures$() {
696
- return this.store.sliceState(state => state.globalFeatures);
697
- }
698
- isGlobalFeatureEnabled(key, globalFeatures) {
699
- const features = globalFeatures.enabledFeatures || [];
700
- return features.some(f => key === f);
701
- }
702
- getGlobalFeatureIsEnabled(key) {
703
- return this.isGlobalFeatureEnabled(key, this.store.state.globalFeatures);
704
- }
705
- getGlobalFeatureIsEnabled$(key) {
706
- return this.store.sliceState(state => this.isGlobalFeatureEnabled(key, state.globalFeatures));
707
- }
708
- }
709
- ConfigStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, deps: [{ token: AbpApplicationConfigurationService }, { token: AbpApplicationLocalizationService }, { token: INCUDE_LOCALIZATION_RESOURCES_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
710
- ConfigStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, providedIn: 'root' });
711
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, decorators: [{
712
- type: Injectable,
713
- args: [{
714
- providedIn: 'root',
715
- }]
716
- }], ctorParameters: function () {
717
- return [{ type: AbpApplicationConfigurationService }, { type: AbpApplicationLocalizationService }, { type: undefined, decorators: [{
718
- type: Optional
719
- }, {
720
- type: Inject,
721
- args: [INCUDE_LOCALIZATION_RESOURCES_TOKEN]
722
- }] }];
723
- } });
724
- function splitKeys(keys) {
725
- if (typeof keys === 'string') {
726
- keys = keys.split('.');
727
- }
728
- if (!Array.isArray(keys)) {
729
- throw new Error('The argument must be a dot string or an string array.');
730
- }
731
- return keys;
732
- }
733
-
734
- class PermissionService {
735
- constructor(configState) {
736
- this.configState = configState;
737
- }
738
- getGrantedPolicy$(key) {
739
- return this.getStream().pipe(map(grantedPolicies => this.isPolicyGranted(key, grantedPolicies)));
740
- }
741
- getGrantedPolicy(key) {
742
- const policies = this.getSnapshot();
743
- return this.isPolicyGranted(key, policies);
744
- }
745
- filterItemsByPolicy(items) {
746
- const policies = this.getSnapshot();
747
- return items.filter(item => !item.requiredPolicy || this.isPolicyGranted(item.requiredPolicy, policies));
748
- }
749
- filterItemsByPolicy$(items) {
750
- return this.getStream().pipe(map(policies => items.filter(item => !item.requiredPolicy || this.isPolicyGranted(item.requiredPolicy, policies))));
751
- }
752
- isPolicyGranted(key, grantedPolicies) {
753
- if (!key)
754
- return true;
755
- const orRegexp = /\|\|/g;
756
- const andRegexp = /&&/g;
757
- // TODO: Allow combination of ANDs & ORs
758
- if (orRegexp.test(key)) {
759
- const keys = key.split('||').filter(Boolean);
760
- if (keys.length < 2)
761
- return false;
762
- return keys.some(k => this.getPolicy(k.trim(), grantedPolicies));
763
- }
764
- else if (andRegexp.test(key)) {
765
- const keys = key.split('&&').filter(Boolean);
766
- if (keys.length < 2)
767
- return false;
768
- return keys.every(k => this.getPolicy(k.trim(), grantedPolicies));
769
- }
770
- return this.getPolicy(key, grantedPolicies);
771
- }
772
- getStream() {
773
- return this.configState.getAll$().pipe(map(this.mapToPolicies));
774
- }
775
- getSnapshot() {
776
- return this.mapToPolicies(this.configState.getAll());
777
- }
778
- mapToPolicies(applicationConfiguration) {
779
- var _a;
780
- return ((_a = applicationConfiguration === null || applicationConfiguration === void 0 ? void 0 : applicationConfiguration.auth) === null || _a === void 0 ? void 0 : _a.grantedPolicies) || {};
781
- }
782
- getPolicy(key, grantedPolicies) {
783
- return grantedPolicies[key] || false;
784
- }
785
- }
786
- PermissionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionService, deps: [{ token: ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
787
- PermissionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionService, providedIn: 'root' });
788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionService, decorators: [{
789
- type: Injectable,
790
- args: [{ providedIn: 'root' }]
791
- }], ctorParameters: function () { return [{ type: ConfigStateService }]; } });
792
-
793
- // eslint-disable-next-line @typescript-eslint/ban-types
794
- class AbstractTreeService {
795
- constructor() {
796
- this._flat$ = new BehaviorSubject([]);
797
- this._tree$ = new BehaviorSubject([]);
798
- this._visible$ = new BehaviorSubject([]);
799
- }
800
- get flat() {
801
- return this._flat$.value;
802
- }
803
- get flat$() {
804
- return this._flat$.asObservable();
805
- }
806
- get tree() {
807
- return this._tree$.value;
808
- }
809
- get tree$() {
810
- return this._tree$.asObservable();
811
- }
812
- get visible() {
813
- return this._visible$.value;
814
- }
815
- get visible$() {
816
- return this._visible$.asObservable();
817
- }
818
- createTree(items) {
819
- return createTreeFromList(items, item => item[this.id], item => item[this.parentId], item => BaseTreeNode.create(item));
820
- }
821
- createGroupedTree(list) {
822
- const map = createGroupMap(list, this.othersGroup);
823
- if (!map) {
824
- return undefined;
825
- }
826
- return Array.from(map, ([key, items]) => ({ group: key, items }));
827
- }
828
- filterWith(setOrMap) {
829
- return this._flat$.value.filter(item => !setOrMap.has(item[this.id]));
830
- }
831
- findItemsToRemove(set) {
832
- return this._flat$.value.reduce((acc, item) => {
833
- if (!acc.has(item[this.parentId]))
834
- return acc;
835
- const childSet = new Set([item[this.id]]);
836
- const children = this.findItemsToRemove(childSet);
837
- return new Set([...acc, ...children]);
838
- }, set);
839
- }
840
- publish(flatItems, visibleItems) {
841
- this._flat$.next(flatItems);
842
- this._tree$.next(this.createTree(flatItems));
843
- this._visible$.next(this.createTree(visibleItems));
844
- return flatItems;
845
- }
846
- add(items) {
847
- const map = new Map();
848
- items.forEach(item => map.set(item[this.id], item));
849
- const flatItems = this.filterWith(map);
850
- map.forEach(pushValueTo(flatItems));
851
- flatItems.sort(this.sort);
852
- const visibleItems = flatItems.filter(item => !this.hide(item));
853
- return this.publish(flatItems, visibleItems);
854
- }
855
- find(predicate, tree = this.tree) {
856
- return tree.reduce((acc, node) => (acc ? acc : predicate(node) ? node : this.find(predicate, node.children)), null);
857
- }
858
- patch(identifier, props) {
859
- const flatItems = this._flat$.value;
860
- const index = flatItems.findIndex(item => item[this.id] === identifier);
861
- if (index < 0)
862
- return false;
863
- flatItems[index] = Object.assign(Object.assign({}, flatItems[index]), props);
864
- flatItems.sort(this.sort);
865
- const visibleItems = flatItems.filter(item => !this.hide(item));
866
- return this.publish(flatItems, visibleItems);
867
- }
868
- refresh() {
869
- return this.add([]);
870
- }
871
- remove(identifiers) {
872
- const set = new Set();
873
- identifiers.forEach(id => set.add(id));
874
- const setToRemove = this.findItemsToRemove(set);
875
- const flatItems = this.filterWith(setToRemove);
876
- const visibleItems = flatItems.filter(item => !this.hide(item));
877
- return this.publish(flatItems, visibleItems);
878
- }
879
- search(params, tree = this.tree) {
880
- const searchKeys = Object.keys(params);
881
- return tree.reduce((acc, node) => acc
882
- ? acc
883
- : searchKeys.every(key => node[key] === params[key])
884
- ? node
885
- : this.search(params, node.children), null);
886
- }
887
- }
888
- class AbstractNavTreeService extends AbstractTreeService {
889
- constructor(injector) {
890
- super();
891
- this.injector = injector;
892
- this.id = 'name';
893
- this.parentId = 'parentName';
894
- this.hide = (item) => item.invisible || !this.isGranted(item);
895
- this.sort = (a, b) => {
896
- if (!Number.isInteger(a.order))
897
- return 1;
898
- if (!Number.isInteger(b.order))
899
- return -1;
900
- return a.order - b.order;
901
- };
902
- const configState = this.injector.get(ConfigStateService);
903
- this.subscription = configState
904
- .createOnUpdateStream(state => state)
905
- .subscribe(() => this.refresh());
906
- this.permissionService = injector.get(PermissionService);
907
- this.othersGroup = injector.get(OTHERS_GROUP);
908
- }
909
- isGranted({ requiredPolicy }) {
910
- return this.permissionService.getGrantedPolicy(requiredPolicy);
911
- }
912
- hasChildren(identifier) {
913
- var _a;
914
- const node = this.find(item => item[this.id] === identifier);
915
- return Boolean((_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.length);
916
- }
917
- hasInvisibleChild(identifier) {
918
- var _a;
919
- const node = this.find(item => item[this.id] === identifier);
920
- return ((_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.some(child => child.invisible)) || false;
921
- }
922
- /* istanbul ignore next */
923
- ngOnDestroy() {
924
- this.subscription.unsubscribe();
925
- }
926
- }
927
- AbstractNavTreeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractNavTreeService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
928
- AbstractNavTreeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractNavTreeService });
929
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractNavTreeService, decorators: [{
930
- type: Injectable
931
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
932
- class RoutesService extends AbstractNavTreeService {
933
- hasPathOrChild(item) {
934
- return Boolean(item.path) || this.hasChildren(item.name);
935
- }
936
- get groupedVisible() {
937
- return this.createGroupedTree(this.visible.filter(item => this.hasPathOrChild(item)));
938
- }
939
- get groupedVisible$() {
940
- return this.visible$.pipe(map$1(items => items.filter(item => this.hasPathOrChild(item))), map$1(visible => this.createGroupedTree(visible)));
941
- }
942
- }
943
- RoutesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
944
- RoutesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesService, providedIn: 'root' });
945
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesService, decorators: [{
946
- type: Injectable,
947
- args: [{ providedIn: 'root' }]
948
- }] });
949
-
950
- class SubscriptionService {
951
- constructor() {
952
- this.subscription = new Subscription();
953
- }
954
- get isClosed() {
955
- return this.subscription.closed;
956
- }
957
- addOne(source$, nextOrObserver, error) {
958
- const subscription = source$.subscribe(nextOrObserver, error);
959
- this.subscription.add(subscription);
960
- return subscription;
961
- }
962
- closeAll() {
963
- this.subscription.unsubscribe();
964
- }
965
- closeOne(subscription) {
966
- this.removeOne(subscription);
967
- if (subscription) {
968
- subscription.unsubscribe();
969
- }
970
- }
971
- ngOnDestroy() {
972
- this.subscription.unsubscribe();
973
- }
974
- removeOne(subscription) {
975
- if (!subscription)
976
- return;
977
- this.subscription.remove(subscription);
978
- }
979
- reset() {
980
- this.subscription.unsubscribe();
981
- this.subscription = new Subscription();
982
- }
983
- }
984
- SubscriptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SubscriptionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
985
- SubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SubscriptionService });
986
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SubscriptionService, decorators: [{
987
- type: Injectable
988
- }] });
989
-
990
- function findRoute(routesService, path) {
991
- const node = routesService.find(route => route.path === path);
992
- return node || path === '/'
993
- ? node
994
- : findRoute(routesService, path.split('/').slice(0, -1).join('/') || '/');
995
- }
996
- function getRoutePath(router, url = router.url) {
997
- const emptyGroup = { segments: [] };
998
- const primaryGroup = router.parseUrl(url).root.children[PRIMARY_OUTLET];
999
- return '/' + (primaryGroup || emptyGroup).segments.map(({ path }) => path).join('/');
1000
- }
1001
- function reloadRoute(router, ngZone) {
1002
- const { shouldReuseRoute } = router.routeReuseStrategy;
1003
- const setRouteReuse = (reuse) => {
1004
- router.routeReuseStrategy.shouldReuseRoute = reuse;
1005
- };
1006
- setRouteReuse(() => false);
1007
- router.navigated = false;
1008
- ngZone.run(() => __awaiter(this, void 0, void 0, function* () {
1009
- yield router.navigateByUrl(router.url).catch(noop);
1010
- setRouteReuse(shouldReuseRoute);
1011
- }));
1012
- }
1013
-
1014
- // This will not be necessary when only Angukar 9.1+ is supported
1015
- function getLocaleDirection(locale) {
1016
- return /^(ar(-[A-Z]{2})?|ckb(-IR)?|fa(-AF)?|he|ks|lrc(-IQ)?|mzn|pa-Arab|ps(-PK)?|sd|ug|ur(-IN)?|uz-Arab|yi)$/.test(locale)
1017
- ? 'rtl'
1018
- : 'ltr';
1019
- }
1020
- function createLocalizer(localization) {
1021
- return (resourceName, key, defaultValue) => {
1022
- var _a;
1023
- if (resourceName === '_')
1024
- return key;
1025
- const resource = (_a = localization === null || localization === void 0 ? void 0 : localization.values) === null || _a === void 0 ? void 0 : _a[resourceName];
1026
- if (!resource)
1027
- return defaultValue;
1028
- return resource[key] || defaultValue;
1029
- };
1030
- }
1031
- function createLocalizerWithFallback(localization) {
1032
- const findLocalization = createLocalizationFinder(localization);
1033
- return (resourceNames, keys, defaultValue) => {
1034
- const { localized } = findLocalization(resourceNames, keys);
1035
- return localized || defaultValue;
1036
- };
1037
- }
1038
- function createLocalizationPipeKeyGenerator(localization) {
1039
- const findLocalization = createLocalizationFinder(localization);
1040
- return (resourceNames, keys, defaultKey) => {
1041
- const { resourceName, key } = findLocalization(resourceNames, keys);
1042
- return !resourceName ? defaultKey : resourceName === '_' ? key : `${resourceName}::${key}`;
1043
- };
1044
- }
1045
- function createLocalizationFinder(localization) {
1046
- const localize = createLocalizer(localization);
1047
- return (resourceNames, keys) => {
1048
- resourceNames = resourceNames.concat(localization.defaultResourceName || '').filter(Boolean);
1049
- const resourceCount = resourceNames.length;
1050
- const keyCount = keys.length;
1051
- for (let i = 0; i < resourceCount; i++) {
1052
- const resourceName = resourceNames[i];
1053
- for (let j = 0; j < keyCount; j++) {
1054
- const key = keys[j];
1055
- const localized = localize(resourceName, key, null);
1056
- if (localized)
1057
- return { resourceName, key, localized };
1058
- }
1059
- }
1060
- return { resourceName: undefined, key: undefined, localized: undefined };
1061
- };
1062
- }
1063
-
1064
- function createTokenParser(format) {
1065
- return (str) => {
1066
- const tokens = [];
1067
- const regex = format.replace(/\./g, '\\.').replace(/\{\s?([0-9a-zA-Z]+)\s?\}/g, (_, token) => {
1068
- tokens.push(token);
1069
- return '(.+)';
1070
- });
1071
- const matches = (str.match(regex) || []).slice(1);
1072
- return matches.reduce((acc, v, i) => {
1073
- const key = tokens[i];
1074
- acc[key] = [...(acc[key] || []), v].filter(Boolean);
1075
- return acc;
1076
- }, {});
1077
- };
1078
- }
1079
- function interpolate(text, params) {
1080
- return text
1081
- .replace(/(['"]?\{\s*(\d+)\s*\}['"]?)/g, (_, match, digit) => { var _a; return (_a = params[digit]) !== null && _a !== void 0 ? _a : match; })
1082
- .replace(/\s+/g, ' ');
1083
- }
1084
- function escapeHtmlChars(value) {
1085
- return value && typeof value === 'string'
1086
- ? value
1087
- .replace(/&/g, '&amp;')
1088
- .replace(/</g, '&lt;')
1089
- .replace(/>/g, '&gt;')
1090
- .replace(/"/g, '&quot;')
1091
- : value;
1092
- }
1093
-
1094
- class AbpLocalStorageService {
1095
- constructor() { }
1096
- get length() {
1097
- return localStorage.length;
1098
- }
1099
- clear() {
1100
- localStorage.clear();
1101
- }
1102
- getItem(key) {
1103
- return localStorage.getItem(key);
1104
- }
1105
- key(index) {
1106
- return localStorage.key(index);
1107
- }
1108
- removeItem(key) {
1109
- localStorage.removeItem(key);
1110
- }
1111
- setItem(key, value) {
1112
- localStorage.setItem(key, value);
1113
- }
1114
- }
1115
- AbpLocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1116
- AbpLocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpLocalStorageService, providedIn: 'root' });
1117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpLocalStorageService, decorators: [{
1118
- type: Injectable,
1119
- args: [{
1120
- providedIn: 'root',
1121
- }]
1122
- }], ctorParameters: function () { return []; } });
1123
-
1124
- class SessionStateService {
1125
- constructor(configState, localStorageService) {
1126
- this.configState = configState;
1127
- this.localStorageService = localStorageService;
1128
- this.store = new InternalStore({});
1129
- this.updateLocalStorage = () => {
1130
- this.localStorageService.setItem('abpSession', JSON.stringify(this.store.state));
1131
- };
1132
- this.init();
1133
- this.setInitialLanguage();
1134
- }
1135
- init() {
1136
- const session = this.localStorageService.getItem('abpSession');
1137
- if (session) {
1138
- this.store.set(JSON.parse(session));
1139
- }
1140
- this.store.sliceUpdate(state => state).subscribe(this.updateLocalStorage);
1141
- }
1142
- setInitialLanguage() {
1143
- const appLanguage = this.getLanguage();
1144
- this.configState
1145
- .getDeep$('localization.currentCulture.cultureName')
1146
- .pipe(filter(cultureName => !!cultureName), take(1))
1147
- .subscribe(lang => {
1148
- if (lang.includes(';')) {
1149
- lang = lang.split(';')[0];
1150
- }
1151
- if (appLanguage !== lang) {
1152
- this.setLanguage(lang);
1153
- }
1154
- });
1155
- }
1156
- onLanguageChange$() {
1157
- return this.store.sliceUpdate(state => state.language);
1158
- }
1159
- onTenantChange$() {
1160
- return this.store.sliceUpdate(state => state.tenant);
1161
- }
1162
- getLanguage() {
1163
- return this.store.state.language;
1164
- }
1165
- getLanguage$() {
1166
- return this.store.sliceState(state => state.language);
1167
- }
1168
- getTenant() {
1169
- return this.store.state.tenant;
1170
- }
1171
- getTenant$() {
1172
- return this.store.sliceState(state => state.tenant);
1173
- }
1174
- setTenant(tenant) {
1175
- if (compare(tenant, this.store.state.tenant))
1176
- return;
1177
- this.store.set(Object.assign(Object.assign({}, this.store.state), { tenant }));
1178
- }
1179
- setLanguage(language) {
1180
- if (language === this.store.state.language)
1181
- return;
1182
- this.store.patch({ language });
1183
- document.documentElement.setAttribute('lang', language);
1184
- }
1185
- }
1186
- SessionStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, deps: [{ token: ConfigStateService }, { token: AbpLocalStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
1187
- SessionStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, providedIn: 'root' });
1188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, decorators: [{
1189
- type: Injectable,
1190
- args: [{
1191
- providedIn: 'root',
1192
- }]
1193
- }], ctorParameters: function () { return [{ type: ConfigStateService }, { type: AbpLocalStorageService }]; } });
1194
-
1195
- class LocalizationService {
1196
- constructor(sessionState, injector, otherInstance, configState) {
1197
- this.sessionState = sessionState;
1198
- this.injector = injector;
1199
- this.configState = configState;
1200
- this.latestLang = this.sessionState.getLanguage();
1201
- this._languageChange$ = new Subject();
1202
- this.uiLocalizations$ = new BehaviorSubject(new Map());
1203
- this.localizations$ = new BehaviorSubject(new Map());
1204
- if (otherInstance)
1205
- throw new Error('LocalizationService should have only one instance.');
1206
- this.listenToSetLanguage();
1207
- this.initLocalizationValues();
1208
- }
1209
- /**
1210
- * Returns currently selected language
1211
- * Even though this looks like it's redundant to return the same value as `getLanguage()`,
1212
- * it's actually not. This could be invoked any time, and the latestLang could be different from the
1213
- * sessionState.getLanguage() value.
1214
- */
1215
- get currentLang() {
1216
- return this.latestLang || this.sessionState.getLanguage();
1217
- }
1218
- get currentLang$() {
1219
- return this.sessionState.getLanguage$();
1220
- }
1221
- get languageChange$() {
1222
- return this._languageChange$.asObservable();
1223
- }
1224
- initLocalizationValues() {
1225
- localizations$.subscribe(val => this.addLocalization(val));
1226
- const legacyResources$ = this.configState.getDeep$('localization.values');
1227
- const remoteLocalizations$ = this.configState.getDeep$('localization.resources');
1228
- const currentLanguage$ = this.sessionState.getLanguage$();
1229
- const uiLocalizations$ = combineLatest([currentLanguage$, this.uiLocalizations$]).pipe(map(([currentLang, localizations]) => localizations.get(currentLang)));
1230
- combineLatest([legacyResources$, remoteLocalizations$, uiLocalizations$])
1231
- .pipe(map(([legacy, resource, local]) => {
1232
- if (!resource) {
1233
- return;
1234
- }
1235
- const remote = combineLegacyandNewResources(legacy || {}, resource);
1236
- if (remote) {
1237
- if (!local) {
1238
- local = new Map();
1239
- }
1240
- Object.entries(remote).forEach(entry => {
1241
- const resourceName = entry[0];
1242
- const remoteTexts = entry[1];
1243
- let resource = (local === null || local === void 0 ? void 0 : local.get(resourceName)) || {};
1244
- resource = Object.assign(Object.assign({}, resource), remoteTexts);
1245
- local === null || local === void 0 ? void 0 : local.set(resourceName, resource);
1246
- });
1247
- }
1248
- return local;
1249
- }), filter(Boolean))
1250
- .subscribe(val => this.localizations$.next(val));
1251
- }
1252
- addLocalization(localizations) {
1253
- if (!localizations)
1254
- return;
1255
- const localizationMap = this.uiLocalizations$.value;
1256
- localizations.forEach(loc => {
1257
- const cultureMap = localizationMap.get(loc.culture) || new Map();
1258
- loc.resources.forEach(res => {
1259
- let resource = cultureMap.get(res.resourceName) || {};
1260
- resource = Object.assign(Object.assign({}, resource), res.texts);
1261
- cultureMap.set(res.resourceName, resource);
1262
- });
1263
- localizationMap.set(loc.culture, cultureMap);
1264
- });
1265
- this.uiLocalizations$.next(localizationMap);
1266
- }
1267
- listenToSetLanguage() {
1268
- this.sessionState
1269
- .onLanguageChange$()
1270
- .pipe(filter(lang => this.configState.getDeep('localization.currentCulture.cultureName') !== lang), switchMap(lang => this.configState.refreshAppState().pipe(map(() => lang))), filter(Boolean), switchMap(lang => from(this.registerLocale(lang).then(() => lang))))
1271
- .subscribe(lang => this._languageChange$.next(lang));
1272
- }
1273
- registerLocale(locale) {
1274
- const { registerLocaleFn } = this.injector.get(CORE_OPTIONS);
1275
- return registerLocaleFn(locale).then(module => {
1276
- if (module === null || module === void 0 ? void 0 : module.default)
1277
- registerLocaleData(module.default);
1278
- this.latestLang = locale;
1279
- });
1280
- }
1281
- /**
1282
- * Returns an observable localized text with the given interpolation parameters in current language.
1283
- * @param key Localizaton key to replace with localized text
1284
- * @param interpolateParams Values to interpolate
1285
- */
1286
- get(key, ...interpolateParams) {
1287
- return this.configState
1288
- .getAll$()
1289
- .pipe(map(state => this.getLocalization(state, key, ...interpolateParams)));
1290
- }
1291
- getResource(resourceName) {
1292
- return this.localizations$.value.get(resourceName);
1293
- }
1294
- getResource$(resourceName) {
1295
- return this.localizations$.pipe(map(res => res.get(resourceName)));
1296
- }
1297
- /**
1298
- * Returns localized text with the given interpolation parameters in current language.
1299
- * @param key Localization key to replace with localized text
1300
- * @param interpolateParams Values to intepolate.
1301
- */
1302
- instant(key, ...interpolateParams) {
1303
- return this.getLocalization(this.configState.getAll(), key, ...interpolateParams);
1304
- }
1305
- localize(resourceName, key, defaultValue) {
1306
- return this.configState.getOne$('localization').pipe(map(createLocalizer), map(localize => localize(resourceName, key, defaultValue)));
1307
- }
1308
- localizeSync(resourceName, key, defaultValue) {
1309
- const localization = this.configState.getOne('localization');
1310
- return createLocalizer(localization)(resourceName, key, defaultValue);
1311
- }
1312
- localizeWithFallback(resourceNames, keys, defaultValue) {
1313
- return this.configState.getOne$('localization').pipe(map(createLocalizerWithFallback), map(localizeWithFallback => localizeWithFallback(resourceNames, keys, defaultValue)));
1314
- }
1315
- localizeWithFallbackSync(resourceNames, keys, defaultValue) {
1316
- const localization = this.configState.getOne('localization');
1317
- return createLocalizerWithFallback(localization)(resourceNames, keys, defaultValue);
1318
- }
1319
- getLocalization(state, key, ...interpolateParams) {
1320
- if (!key)
1321
- key = '';
1322
- let defaultValue = '';
1323
- if (typeof key !== 'string') {
1324
- defaultValue = key.defaultValue;
1325
- key = key.key;
1326
- }
1327
- const keys = key.split('::');
1328
- const warn = (message) => {
1329
- if (isDevMode())
1330
- console.warn(message);
1331
- };
1332
- if (keys.length < 2) {
1333
- warn('The localization source separator (::) not found.');
1334
- return defaultValue || key;
1335
- }
1336
- if (!state.localization)
1337
- return defaultValue || keys[1];
1338
- const sourceName = keys[0] || state.localization.defaultResourceName;
1339
- const sourceKey = keys[1];
1340
- if (sourceName === '_') {
1341
- return defaultValue || sourceKey;
1342
- }
1343
- if (!sourceName) {
1344
- warn('Localization source name is not specified and the defaultResourceName was not defined!');
1345
- return defaultValue || sourceKey;
1346
- }
1347
- const source = this.localizations$.value.get(sourceName);
1348
- if (!source) {
1349
- warn('Could not find localization source: ' + sourceName);
1350
- return defaultValue || sourceKey;
1351
- }
1352
- let localization = source[sourceKey];
1353
- if (typeof localization === 'undefined') {
1354
- return defaultValue || sourceKey;
1355
- }
1356
- interpolateParams = interpolateParams.filter(params => params != null);
1357
- if (localization)
1358
- localization = interpolate(localization, interpolateParams);
1359
- if (typeof localization !== 'string')
1360
- localization = '';
1361
- return localization || defaultValue || key;
1362
- }
1363
- }
1364
- LocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationService, deps: [{ token: SessionStateService }, { token: i0.Injector }, { token: LocalizationService, optional: true, skipSelf: true }, { token: ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
1365
- LocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationService, providedIn: 'root' });
1366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationService, decorators: [{
1367
- type: Injectable,
1368
- args: [{ providedIn: 'root' }]
1369
- }], ctorParameters: function () {
1370
- return [{ type: SessionStateService }, { type: i0.Injector }, { type: LocalizationService, decorators: [{
1371
- type: Optional
1372
- }, {
1373
- type: SkipSelf
1374
- }] }, { type: ConfigStateService }];
1375
- } });
1376
- function recursivelyMergeBaseResources(baseResourceName, source) {
1377
- const item = source[baseResourceName];
1378
- if (item.baseResources.length === 0) {
1379
- return item;
1380
- }
1381
- return item.baseResources.reduce((acc, baseResource) => {
1382
- const baseItem = recursivelyMergeBaseResources(baseResource, source);
1383
- const texts = Object.assign(Object.assign({}, baseItem.texts), item.texts);
1384
- return Object.assign(Object.assign({}, acc), { texts });
1385
- }, item);
1386
- }
1387
- function mergeResourcesWithBaseResource(resource) {
1388
- const entities = Object.keys(resource).map(key => {
1389
- const newValue = recursivelyMergeBaseResources(key, resource);
1390
- return [key, newValue];
1391
- });
1392
- return entities.reduce((acc, [key, value]) => (Object.assign(Object.assign({}, acc), { [key]: value })), {});
1393
- }
1394
- function combineLegacyandNewResources(legacy, resource) {
1395
- const mergedResource = mergeResourcesWithBaseResource(resource);
1396
- return Object.entries(mergedResource).reduce((acc, [key, value]) => {
1397
- return Object.assign(Object.assign({}, acc), { [key]: value.texts });
1398
- }, legacy);
1399
- }
1400
-
1401
- class ReplaceableComponentsService {
1402
- constructor(ngZone, router) {
1403
- this.ngZone = ngZone;
1404
- this.router = router;
1405
- this.store = new InternalStore([]);
1406
- }
1407
- get replaceableComponents$() {
1408
- return this.store.sliceState(state => state);
1409
- }
1410
- get replaceableComponents() {
1411
- return this.store.state;
1412
- }
1413
- get onUpdate$() {
1414
- return this.store.sliceUpdate(state => state);
1415
- }
1416
- add(replaceableComponent, reload) {
1417
- const replaceableComponents = [...this.store.state];
1418
- const index = replaceableComponents.findIndex(component => component.key === replaceableComponent.key);
1419
- if (index > -1) {
1420
- replaceableComponents[index] = replaceableComponent;
1421
- }
1422
- else {
1423
- replaceableComponents.push(replaceableComponent);
1424
- }
1425
- this.store.set(replaceableComponents);
1426
- if (reload)
1427
- reloadRoute(this.router, this.ngZone);
1428
- }
1429
- get(replaceableComponentKey) {
1430
- return this.replaceableComponents.find(component => component.key === replaceableComponentKey);
1431
- }
1432
- get$(replaceableComponentKey) {
1433
- return this.replaceableComponents$.pipe(map(components => components.find(component => component.key === replaceableComponentKey)));
1434
- }
1435
- }
1436
- ReplaceableComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableComponentsService, deps: [{ token: i0.NgZone }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1437
- ReplaceableComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableComponentsService, providedIn: 'root' });
1438
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableComponentsService, decorators: [{
1439
- type: Injectable,
1440
- args: [{ providedIn: 'root' }]
1441
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.Router }]; } });
1442
-
1443
- const NavigationEvent = {
1444
- Cancel: NavigationCancel,
1445
- End: NavigationEnd,
1446
- Error: NavigationError,
1447
- Start: NavigationStart,
1448
- };
1449
- class RouterEvents {
1450
- constructor(router) {
1451
- this.router = router;
1452
- }
1453
- getEvents(...eventTypes) {
1454
- const filterRouterEvents = (event) => eventTypes.some(type => event instanceof type);
1455
- return this.router.events.pipe(filter(filterRouterEvents));
1456
- }
1457
- getNavigationEvents(...navigationEventKeys) {
1458
- const filterNavigationEvents = (event) => navigationEventKeys.some(key => event instanceof NavigationEvent[key]);
1459
- return this.router.events.pipe(filter(filterNavigationEvents));
1460
- }
1461
- getAllEvents() {
1462
- return this.router.events;
1463
- }
1464
- getAllNavigationEvents() {
1465
- const keys = Object.keys(NavigationEvent);
1466
- return this.getNavigationEvents(...keys);
1467
- }
1468
- }
1469
- RouterEvents.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterEvents, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1470
- RouterEvents.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterEvents, providedIn: 'root' });
1471
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterEvents, decorators: [{
1472
- type: Injectable,
1473
- args: [{ providedIn: 'root' }]
1474
- }], ctorParameters: function () { return [{ type: i1$1.Router }]; } });
1475
-
1476
- class DynamicLayoutComponent {
1477
- constructor(injector, localizationService, replaceableComponents, subscription, routerEvents, dynamicLayoutComponent) {
1478
- this.localizationService = localizationService;
1479
- this.replaceableComponents = replaceableComponents;
1480
- this.subscription = subscription;
1481
- this.routerEvents = routerEvents;
1482
- // TODO: Consider a shared enum (eThemeSharedComponents) for known layouts
1483
- this.layouts = new Map([
1484
- ['application', 'Theme.ApplicationLayoutComponent'],
1485
- ['account', 'Theme.AccountLayoutComponent'],
1486
- ['empty', 'Theme.EmptyLayoutComponent'],
1487
- ]);
1488
- this.isLayoutVisible = true;
1489
- if (dynamicLayoutComponent) {
1490
- if (isDevMode())
1491
- console.warn('DynamicLayoutComponent must be used only in AppComponent.');
1492
- return;
1493
- }
1494
- this.route = injector.get(ActivatedRoute);
1495
- this.router = injector.get(Router);
1496
- this.routes = injector.get(RoutesService);
1497
- this.checkLayoutOnNavigationEnd();
1498
- this.listenToLanguageChange();
1499
- }
1500
- checkLayoutOnNavigationEnd() {
1501
- const navigationEnd$ = this.routerEvents.getNavigationEvents('End');
1502
- this.subscription.addOne(navigationEnd$, () => this.getLayout());
1503
- }
1504
- getLayout() {
1505
- var _a;
1506
- let expectedLayout = (this.route.snapshot.data || {}).layout;
1507
- if (!expectedLayout) {
1508
- let node = findRoute(this.routes, getRoutePath(this.router));
1509
- node = { parent: node };
1510
- while (node.parent) {
1511
- node = node.parent;
1512
- if (node.layout) {
1513
- expectedLayout = node.layout;
1514
- break;
1515
- }
1516
- }
1517
- }
1518
- if (!expectedLayout)
1519
- expectedLayout = "empty" /* eLayoutType.empty */;
1520
- if (this.layoutKey === expectedLayout)
1521
- return;
1522
- const key = this.layouts.get(expectedLayout);
1523
- if (key) {
1524
- this.layout = (_a = this.getComponent(key)) === null || _a === void 0 ? void 0 : _a.component;
1525
- this.layoutKey = expectedLayout;
1526
- }
1527
- if (!this.layout) {
1528
- this.showLayoutNotFoundError(expectedLayout);
1529
- }
1530
- }
1531
- showLayoutNotFoundError(layoutName) {
1532
- let message = `Layout ${layoutName} not found.`;
1533
- if (layoutName === 'account') {
1534
- message = 'Account layout not found. Please check your configuration. If you are using LeptonX, please make sure you have added "AccountLayoutModule.forRoot()" to your app.module configuration.';
1535
- }
1536
- console.warn(message);
1537
- }
1538
- listenToLanguageChange() {
1539
- this.subscription.addOne(this.localizationService.languageChange$, () => {
1540
- this.isLayoutVisible = false;
1541
- setTimeout(() => (this.isLayoutVisible = true), 0);
1542
- });
1543
- }
1544
- getComponent(key) {
1545
- return this.replaceableComponents.get(key);
1546
- }
1547
- }
1548
- DynamicLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DynamicLayoutComponent, deps: [{ token: i0.Injector }, { token: LocalizationService }, { token: ReplaceableComponentsService }, { token: SubscriptionService }, { token: RouterEvents }, { token: DynamicLayoutComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
1549
- DynamicLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DynamicLayoutComponent, selector: "abp-dynamic-layout", providers: [SubscriptionService], ngImport: i0, template: ` <ng-container *ngIf="isLayoutVisible" [ngComponentOutlet]="layout"></ng-container> `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1550
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DynamicLayoutComponent, decorators: [{
1551
- type: Component,
1552
- args: [{
1553
- selector: 'abp-dynamic-layout',
1554
- template: ` <ng-container *ngIf="isLayoutVisible" [ngComponentOutlet]="layout"></ng-container> `,
1555
- providers: [SubscriptionService],
1556
- }]
1557
- }], ctorParameters: function () {
1558
- return [{ type: i0.Injector }, { type: LocalizationService }, { type: ReplaceableComponentsService }, { type: SubscriptionService }, { type: RouterEvents }, { type: DynamicLayoutComponent, decorators: [{
1559
- type: Optional
1560
- }, {
1561
- type: SkipSelf
1562
- }] }];
1563
- } });
1564
-
1565
- class ReplaceableRouteContainerComponent {
1566
- constructor(route, replaceableComponents, subscription) {
1567
- this.route = route;
1568
- this.replaceableComponents = replaceableComponents;
1569
- this.subscription = subscription;
1570
- }
1571
- ngOnInit() {
1572
- this.defaultComponent = this.route.snapshot.data.replaceableComponent.defaultComponent;
1573
- this.componentKey = this.route.snapshot.data.replaceableComponent.key;
1574
- const component$ = this.replaceableComponents
1575
- .get$(this.componentKey)
1576
- .pipe(distinctUntilChanged());
1577
- this.subscription.addOne(component$, (res = {}) => {
1578
- this.externalComponent = res.component;
1579
- });
1580
- }
1581
- }
1582
- ReplaceableRouteContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableRouteContainerComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: ReplaceableComponentsService }, { token: SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
1583
- ReplaceableRouteContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ReplaceableRouteContainerComponent, selector: "abp-replaceable-route-container", providers: [SubscriptionService], ngImport: i0, template: `
1584
- <ng-container *ngComponentOutlet="externalComponent || defaultComponent"></ng-container>
1585
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }] });
1586
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableRouteContainerComponent, decorators: [{
1587
- type: Component,
1588
- args: [{
1589
- selector: 'abp-replaceable-route-container',
1590
- template: `
1591
- <ng-container *ngComponentOutlet="externalComponent || defaultComponent"></ng-container>
1592
- `,
1593
- providers: [SubscriptionService],
1594
- }]
1595
- }], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: ReplaceableComponentsService }, { type: SubscriptionService }]; } });
1596
-
1597
- class RouterOutletComponent {
1598
- }
1599
- RouterOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1600
- RouterOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: RouterOutletComponent, selector: "abp-router-outlet", ngImport: i0, template: ` <router-outlet></router-outlet> `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
1601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterOutletComponent, decorators: [{
1602
- type: Component,
1603
- args: [{
1604
- selector: 'abp-router-outlet',
1605
- template: ` <router-outlet></router-outlet> `,
1606
- }]
1607
- }] });
1608
-
1609
- // Different locales from .NET
1610
- // Key is .NET locale, value is Angular locale
1611
- const differentLocales = {
1612
- aa: 'en',
1613
- 'aa-DJ': 'en',
1614
- 'aa-ER': 'en',
1615
- 'aa-ET': 'en',
1616
- 'af-ZA': 'af',
1617
- 'agq-CM': 'agq',
1618
- 'ak-GH': 'ak',
1619
- 'am-ET': 'am',
1620
- 'ar-001': 'ar',
1621
- arn: 'en',
1622
- 'arn-CL': 'en',
1623
- 'as-IN': 'as',
1624
- 'asa-TZ': 'asa',
1625
- 'ast-ES': 'ast',
1626
- 'az-Cyrl-AZ': 'az-Cyrl',
1627
- 'az-Latn-AZ': 'az-Latn',
1628
- ba: 'ru',
1629
- 'ba-RU': 'ru',
1630
- 'bas-CM': 'bas',
1631
- 'be-BY': 'be',
1632
- 'bem-ZM': 'bem',
1633
- 'bez-TZ': 'bez',
1634
- 'bg-BG': 'bg',
1635
- bin: 'en',
1636
- 'bin-NG': 'en',
1637
- 'bm-Latn': 'bm',
1638
- 'bm-Latn-ML': 'bm',
1639
- 'bn-BD': 'bn',
1640
- 'bo-CN': 'bo',
1641
- 'br-FR': 'br',
1642
- 'brx-IN': 'brx',
1643
- 'bs-Cyrl-BA': 'bs-Cyrl',
1644
- 'bs-Latn-BA': 'bs-Latn',
1645
- byn: 'en',
1646
- 'byn-ER': 'en',
1647
- 'ca-ES': 'ca',
1648
- 'ca-ES-valencia': 'ca-ES-VALENCIA',
1649
- 'ce-RU': 'ce',
1650
- 'cgg-UG': 'cgg',
1651
- 'chr-Cher': 'chr',
1652
- 'chr-Cher-US': 'chr',
1653
- co: 'en',
1654
- 'co-FR': 'fr',
1655
- 'cs-CZ': 'cs',
1656
- 'cu-RU': 'cu',
1657
- 'cy-GB': 'cy',
1658
- 'da-DK': 'da',
1659
- 'dav-KE': 'dav',
1660
- 'de-DE': 'de',
1661
- 'dje-NE': 'dje',
1662
- 'dsb-DE': 'dsb',
1663
- 'dua-CM': 'dua',
1664
- dv: 'en',
1665
- 'dv-MV': 'en',
1666
- 'dyo-SN': 'dyo',
1667
- 'dz-BT': 'dz',
1668
- 'ebu-KE': 'ebu',
1669
- 'ee-GH': 'ee',
1670
- 'el-GR': 'el',
1671
- 'en-029': 'en',
1672
- 'en-ID': 'en',
1673
- 'en-US': 'en',
1674
- 'eo-001': 'en',
1675
- 'es-ES': 'es',
1676
- 'et-EE': 'et',
1677
- 'eu-ES': 'eu',
1678
- 'ewo-CM': 'ewo',
1679
- 'fa-IR': 'fa',
1680
- 'ff-Latn-SN': 'ff-Latn',
1681
- 'ff-NG': 'ff',
1682
- 'fi-FI': 'fi',
1683
- 'fil-PH': 'fil',
1684
- 'fo-FO': 'fo',
1685
- 'fr-029': 'fr',
1686
- 'fr-FR': 'fr',
1687
- 'fur-IT': 'fur',
1688
- 'fy-NL': 'fy',
1689
- 'ga-IE': 'ga',
1690
- 'gd-GB': 'gd',
1691
- 'gl-ES': 'gl',
1692
- gn: 'en',
1693
- 'gn-PY': 'en',
1694
- 'gsw-CH': 'gsw',
1695
- 'gu-IN': 'gu',
1696
- 'guz-KE': 'guz',
1697
- 'gv-IM': 'gv',
1698
- 'ha-Latn': 'ha',
1699
- 'ha-Latn-GH': 'ha-GH',
1700
- 'ha-Latn-NE': 'ha-NE',
1701
- 'ha-Latn-NG': 'ha',
1702
- 'haw-US': 'haw',
1703
- 'he-IL': 'he',
1704
- 'hi-IN': 'hi',
1705
- 'hr-HR': 'hr',
1706
- 'hsb-DE': 'hsb',
1707
- 'hu-HU': 'hu',
1708
- 'hy-AM': 'hy',
1709
- 'ia-001': 'ia',
1710
- 'ia-FR': 'ia',
1711
- ibb: 'en',
1712
- 'ibb-NG': 'en',
1713
- 'id-ID': 'id',
1714
- 'ig-NG': 'ig',
1715
- 'ii-CN': 'ii',
1716
- 'is-IS': 'is',
1717
- 'it-IT': 'it',
1718
- iu: 'en',
1719
- 'iu-Cans': 'en',
1720
- 'iu-Cans-CA': 'en',
1721
- 'iu-Latn': 'en',
1722
- 'iu-Latn-CA': 'en',
1723
- 'ja-JP': 'ja',
1724
- 'jgo-CM': 'jgo',
1725
- 'jmc-TZ': 'jmc',
1726
- 'jv-Java': 'jv',
1727
- 'jv-Java-ID': 'jv',
1728
- 'jv-Latn': 'jv',
1729
- 'jv-Latn-ID': 'jv',
1730
- 'ka-GE': 'ka',
1731
- 'kab-DZ': 'kab',
1732
- 'kam-KE': 'kam',
1733
- 'kde-TZ': 'kde',
1734
- 'kea-CV': 'kea',
1735
- 'khq-ML': 'khq',
1736
- 'ki-KE': 'ki',
1737
- 'kk-KZ': 'kk',
1738
- 'kkj-CM': 'kkj',
1739
- 'kl-GL': 'kl',
1740
- 'kln-KE': 'kln',
1741
- 'km-KH': 'km',
1742
- 'kn-IN': 'kn',
1743
- 'ko-KR': 'ko',
1744
- 'kok-IN': 'kok',
1745
- kr: 'en',
1746
- 'kr-NG': 'en',
1747
- 'ks-Arab': 'ks',
1748
- 'ks-Arab-IN': 'ks',
1749
- 'ks-Deva': 'ks',
1750
- 'ks-Deva-IN': 'ks',
1751
- 'ksb-TZ': 'ksb',
1752
- 'ksf-CM': 'ksf',
1753
- 'ksh-DE': 'ksh',
1754
- 'ku-Arab': 'ku',
1755
- 'ku-Arab-IQ': 'ku',
1756
- 'ku-Arab-IR': 'ku',
1757
- 'kw-GB': 'kw',
1758
- 'ky-KG': 'ky',
1759
- la: 'en',
1760
- 'la-001': 'en',
1761
- 'lag-TZ': 'lag',
1762
- 'lb-LU': 'lb',
1763
- 'lg-UG': 'lg',
1764
- 'lkt-US': 'lkt',
1765
- 'ln-CD': 'ln',
1766
- 'lo-LA': 'lo',
1767
- 'lrc-IR': 'lrc',
1768
- 'lt-LT': 'lt',
1769
- 'lu-CD': 'lu',
1770
- 'luo-KE': 'luo',
1771
- 'luy-KE': 'luy',
1772
- 'lv-LV': 'lv',
1773
- 'mas-KE': 'mas',
1774
- 'mer-KE': 'mer',
1775
- 'mfe-MU': 'mfe',
1776
- 'mg-MG': 'mg',
1777
- 'mgh-MZ': 'mgh',
1778
- 'mgo-CM': 'mgo',
1779
- 'mi-NZ': 'mi',
1780
- 'mk-MK': 'mk',
1781
- 'ml-IN': 'ml',
1782
- 'mn-Cyrl': 'mn',
1783
- 'mn-MN': 'mn',
1784
- 'mn-Mong': 'mn',
1785
- 'mn-Mong-CN': 'mn',
1786
- 'mn-Mong-MN': 'mn',
1787
- mni: 'en',
1788
- 'mni-IN': 'en',
1789
- moh: 'en',
1790
- 'moh-CA': 'en',
1791
- 'mr-IN': 'mr',
1792
- 'ms-MY': 'ms',
1793
- 'mt-MT': 'mt',
1794
- 'mua-CM': 'mua',
1795
- 'my-MM': 'my',
1796
- 'mzn-IR': 'mzn',
1797
- 'naq-NA': 'naq',
1798
- 'nb-NO': 'nb',
1799
- 'nd-ZW': 'nd',
1800
- 'ne-NP': 'ne',
1801
- 'nl-NL': 'nl',
1802
- 'nmg-CM': 'ngm',
1803
- 'nn-NO': 'nn',
1804
- 'nnh-CM': 'nnh',
1805
- no: 'en',
1806
- nqo: 'en',
1807
- 'nqo-GN': 'en',
1808
- nr: 'en',
1809
- 'nr-ZA': 'en',
1810
- nso: 'en',
1811
- 'nso-ZA': 'en',
1812
- 'nus-SS': 'nus',
1813
- 'nyn-UG': 'nyn',
1814
- oc: 'en',
1815
- 'oc-FR': 'fr',
1816
- 'om-ET': 'om',
1817
- 'or-IN': 'or',
1818
- 'os-GE': 'os',
1819
- 'pa-Arab-PK': 'pa-Arab',
1820
- 'pa-IN': 'pa',
1821
- pap: 'en',
1822
- 'pap-029': 'en',
1823
- 'pl-PL': 'pl',
1824
- 'prg-001': 'prg',
1825
- prs: 'en',
1826
- 'prs-AF': 'en',
1827
- 'ps-AF': 'ps',
1828
- 'pt-BR': 'pt',
1829
- quc: 'en',
1830
- 'quc-Latn': 'en',
1831
- 'quc-Latn-GT': 'en',
1832
- quz: 'en',
1833
- 'quz-BO': 'en',
1834
- 'quz-EC': 'en',
1835
- 'quz-PE': 'en',
1836
- 'rm-CH': 'rm',
1837
- 'rn-BI': 'rn',
1838
- 'ro-RO': 'ro',
1839
- 'rof-TZ': 'rof',
1840
- 'ru-RU': 'ru',
1841
- 'rw-RW': 'rw',
1842
- 'rwk-TZ': 'rwk',
1843
- sa: 'en',
1844
- 'sa-IN': 'en',
1845
- 'sah-RU': 'sah',
1846
- 'saq-KE': 'saq',
1847
- 'sbp-TZ': 'en',
1848
- 'sd-Arab': 'sd',
1849
- 'sd-Arab-PK': 'sd',
1850
- 'sd-Deva': 'sd',
1851
- 'sd-Deva-IN': 'sd',
1852
- 'se-NO': 'se',
1853
- 'seh-MZ': 'seh',
1854
- 'ses-ML': 'ses',
1855
- 'sg-CF': 'sg',
1856
- 'shi-Latn-MA': 'shi-Latn',
1857
- 'shi-Tfng-MA': 'shi-Tfng',
1858
- 'si-LK': 'si',
1859
- 'sk-SK': 'sk',
1860
- 'sl-SI': 'sl',
1861
- sma: 'en',
1862
- 'sma-NO': 'en',
1863
- 'sma-SE': 'en',
1864
- smj: 'en',
1865
- 'smj-NO': 'en',
1866
- 'smj-SE': 'en',
1867
- 'smn-FI': 'en',
1868
- sms: 'en',
1869
- 'sms-FI': 'en',
1870
- 'sn-Latn': 'sn',
1871
- 'sn-Latn-ZW': 'sn',
1872
- 'so-SO': 'so',
1873
- 'sq-AL': 'so',
1874
- 'sr-Cyrl-RS': 'sr-Cryl',
1875
- 'sr-Latn-RS': 'sr-Latn',
1876
- ss: 'en',
1877
- 'ss-SZ': 'en',
1878
- 'ss-ZA': 'en',
1879
- ssy: 'en',
1880
- 'ssy-ER': 'en',
1881
- st: 'en',
1882
- 'st-LS': 'en',
1883
- 'st-ZA': 'en',
1884
- 'sv-SE': 'sv',
1885
- 'sw-TZ': 'sw',
1886
- syr: 'en',
1887
- 'syr-SY': 'en',
1888
- 'ta-IN': 'ta',
1889
- 'te-IN': 'te',
1890
- 'teo-UG': 'teo',
1891
- 'tg-Cyrl': 'tg',
1892
- 'tg-Cyrl-TJ': 'tg',
1893
- 'th-TH': 'th',
1894
- 'ti-ET': 'ti',
1895
- tig: 'en',
1896
- 'tig-ER': 'en',
1897
- 'tk-TM': 'tk',
1898
- tn: 'en',
1899
- 'tn-BW': 'en',
1900
- 'tn-ZA': 'en',
1901
- 'to-TO': 'to',
1902
- 'tr-TR': 'tr',
1903
- ts: 'en',
1904
- 'ts-ZA': 'en',
1905
- 'tt-RU': 'tt',
1906
- 'twq-NE': 'twq',
1907
- 'tzm-Arab': 'tzm',
1908
- 'tzm-Arab-MA': 'tzm',
1909
- 'tzm-Latn': 'tzm',
1910
- 'tzm-Latn-DZ': 'tzm',
1911
- 'tzm-Latn-MA': 'tzm',
1912
- 'tzm-Tfng': 'tzm',
1913
- 'tzm-Tfng-MA': 'tzm',
1914
- 'ug-CN': 'ug',
1915
- 'uk-UA': 'uk',
1916
- 'ur-PK': 'ur',
1917
- 'uz-Arab-AF': 'uz-Arab',
1918
- 'uz-Cyrl-UZ': 'uz-Cyrl',
1919
- 'uz-Latn-UZ': 'uz-Latn',
1920
- 'vai-Latn-LR': 'vai-Latn',
1921
- 'vai-Vaii-LR': 'vai-Vaii',
1922
- ve: 'en',
1923
- 've-ZA': 'en',
1924
- 'vi-VN': 'vi',
1925
- 'vo-001': 'vo',
1926
- 'vun-TZ': 'vun',
1927
- 'wae-CH': 'wae',
1928
- wal: 'en',
1929
- 'wal-ET': 'en',
1930
- 'wo-SN': 'wo',
1931
- 'xh-ZA': 'xh',
1932
- 'xog-UG': 'xog',
1933
- 'yav-CM': 'yav',
1934
- 'yi-001': 'yi',
1935
- 'yo-NG': 'yo',
1936
- 'zgh-Tfng': 'zgh',
1937
- 'zgh-Tfng-MA': 'zgh',
1938
- 'zh-CN': 'zh',
1939
- 'zh-HK': 'zh',
1940
- 'zh-MO': 'zh',
1941
- 'zh-SG': 'zh',
1942
- 'zh-TW': 'zh',
1943
- 'zu-ZA': 'zu',
1944
- };
1945
-
1946
- class AutofocusDirective {
1947
- constructor(elRef) {
1948
- this.elRef = elRef;
1949
- this._delay = 0;
1950
- }
1951
- set delay(val) {
1952
- this._delay = Number(val) || 0;
1953
- }
1954
- get delay() {
1955
- return this._delay;
1956
- }
1957
- ngAfterViewInit() {
1958
- setTimeout(() => this.elRef.nativeElement.focus(), this.delay);
1959
- }
1960
- }
1961
- AutofocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AutofocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1962
- AutofocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: AutofocusDirective, selector: "[autofocus]", inputs: { delay: ["autofocus", "delay"] }, ngImport: i0 });
1963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AutofocusDirective, decorators: [{
1964
- type: Directive,
1965
- args: [{
1966
- // eslint-disable-next-line @angular-eslint/directive-selector
1967
- selector: '[autofocus]',
1968
- }]
1969
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { delay: [{
1970
- type: Input,
1971
- args: ['autofocus']
1972
- }] } });
1973
-
1974
- class InputEventDebounceDirective {
1975
- constructor(el, subscription) {
1976
- this.el = el;
1977
- this.subscription = subscription;
1978
- this.debounce = 300;
1979
- this.debounceEvent = new EventEmitter();
1980
- }
1981
- ngOnInit() {
1982
- const input$ = fromEvent(this.el.nativeElement, 'input').pipe(debounceTime(this.debounce));
1983
- this.subscription.addOne(input$, (event) => {
1984
- this.debounceEvent.emit(event);
1985
- });
1986
- }
1987
- }
1988
- InputEventDebounceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: InputEventDebounceDirective, deps: [{ token: i0.ElementRef }, { token: SubscriptionService }], target: i0.ɵɵFactoryTarget.Directive });
1989
- InputEventDebounceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: InputEventDebounceDirective, selector: "[input.debounce]", inputs: { debounce: "debounce" }, outputs: { debounceEvent: "input.debounce" }, providers: [SubscriptionService], ngImport: i0 });
1990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: InputEventDebounceDirective, decorators: [{
1991
- type: Directive,
1992
- args: [{
1993
- // eslint-disable-next-line @angular-eslint/directive-selector
1994
- selector: '[input.debounce]',
1995
- providers: [SubscriptionService],
1996
- }]
1997
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SubscriptionService }]; }, propDecorators: { debounce: [{
1998
- type: Input
1999
- }], debounceEvent: [{
2000
- type: Output,
2001
- args: ['input.debounce']
2002
- }] } });
2003
-
2004
- class AbpForContext {
2005
- constructor($implicit, index, count, list) {
2006
- this.$implicit = $implicit;
2007
- this.index = index;
2008
- this.count = count;
2009
- this.list = list;
2010
- }
2011
- }
2012
- class RecordView {
2013
- constructor(record, view) {
2014
- this.record = record;
2015
- this.view = view;
2016
- }
2017
- }
2018
- class ForDirective {
2019
- constructor(tempRef, vcRef, differs) {
2020
- this.tempRef = tempRef;
2021
- this.vcRef = vcRef;
2022
- this.differs = differs;
2023
- }
2024
- get compareFn() {
2025
- return this.compareBy || compare;
2026
- }
2027
- get trackByFn() {
2028
- return this.trackBy || ((index, item) => item.id || index);
2029
- }
2030
- iterateOverAppliedOperations(changes) {
2031
- const rw = [];
2032
- changes.forEachOperation((record, previousIndex, currentIndex) => {
2033
- if (record.previousIndex == null) {
2034
- const view = this.vcRef.createEmbeddedView(this.tempRef, new AbpForContext(null, -1, -1, this.items), currentIndex || 0);
2035
- rw.push(new RecordView(record, view));
2036
- }
2037
- else if (currentIndex == null && previousIndex !== null) {
2038
- this.vcRef.remove(previousIndex);
2039
- }
2040
- else {
2041
- if (previousIndex !== null) {
2042
- const view = this.vcRef.get(previousIndex);
2043
- if (view && currentIndex !== null) {
2044
- this.vcRef.move(view, currentIndex);
2045
- rw.push(new RecordView(record, view));
2046
- }
2047
- }
2048
- }
2049
- });
2050
- for (let i = 0, l = rw.length; i < l; i++) {
2051
- rw[i].view.context.$implicit = rw[i].record.item;
2052
- }
2053
- }
2054
- iterateOverAttachedViews(changes) {
2055
- for (let i = 0, l = this.vcRef.length; i < l; i++) {
2056
- const viewRef = this.vcRef.get(i);
2057
- viewRef.context.index = i;
2058
- viewRef.context.count = l;
2059
- viewRef.context.list = this.items;
2060
- }
2061
- changes.forEachIdentityChange((record) => {
2062
- if (record.currentIndex !== null) {
2063
- const viewRef = this.vcRef.get(record.currentIndex);
2064
- viewRef.context.$implicit = record.item;
2065
- }
2066
- });
2067
- }
2068
- projectItems(items) {
2069
- if (!items.length && this.emptyRef) {
2070
- this.vcRef.clear();
2071
- this.vcRef.createEmbeddedView(this.emptyRef).rootNodes;
2072
- this.isShowEmptyRef = true;
2073
- this.differ = null;
2074
- return;
2075
- }
2076
- if (this.emptyRef && this.isShowEmptyRef) {
2077
- this.vcRef.clear();
2078
- this.isShowEmptyRef = false;
2079
- }
2080
- if (!this.differ && items) {
2081
- this.differ = this.differs.find(items).create(this.trackByFn);
2082
- }
2083
- if (this.differ) {
2084
- const changes = this.differ.diff(items);
2085
- if (changes) {
2086
- this.iterateOverAppliedOperations(changes);
2087
- this.iterateOverAttachedViews(changes);
2088
- }
2089
- }
2090
- }
2091
- sortItems(items) {
2092
- const orderBy = this.orderBy;
2093
- if (orderBy) {
2094
- items.sort((a, b) => (a[orderBy] > b[orderBy] ? 1 : a[orderBy] < b[orderBy] ? -1 : 0));
2095
- }
2096
- else {
2097
- items.sort();
2098
- }
2099
- }
2100
- ngOnChanges() {
2101
- let items = clone(this.items);
2102
- if (!Array.isArray(items))
2103
- return;
2104
- const compareFn = this.compareFn;
2105
- const filterBy = this.filterBy;
2106
- if (typeof filterBy !== 'undefined' &&
2107
- typeof this.filterVal !== 'undefined' &&
2108
- this.filterVal !== '') {
2109
- items = items.filter(item => compareFn(item[filterBy], this.filterVal));
2110
- }
2111
- switch (this.orderDir) {
2112
- case 'ASC':
2113
- this.sortItems(items);
2114
- this.projectItems(items);
2115
- break;
2116
- case 'DESC':
2117
- this.sortItems(items);
2118
- items.reverse();
2119
- this.projectItems(items);
2120
- break;
2121
- default:
2122
- this.projectItems(items);
2123
- }
2124
- }
2125
- }
2126
- ForDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ForDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
2127
- ForDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ForDirective, selector: "[abpFor]", inputs: { items: ["abpForOf", "items"], orderBy: ["abpForOrderBy", "orderBy"], orderDir: ["abpForOrderDir", "orderDir"], filterBy: ["abpForFilterBy", "filterBy"], filterVal: ["abpForFilterVal", "filterVal"], trackBy: ["abpForTrackBy", "trackBy"], compareBy: ["abpForCompareBy", "compareBy"], emptyRef: ["abpForEmptyRef", "emptyRef"] }, usesOnChanges: true, ngImport: i0 });
2128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ForDirective, decorators: [{
2129
- type: Directive,
2130
- args: [{
2131
- selector: '[abpFor]',
2132
- }]
2133
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.IterableDiffers }]; }, propDecorators: { items: [{
2134
- type: Input,
2135
- args: ['abpForOf']
2136
- }], orderBy: [{
2137
- type: Input,
2138
- args: ['abpForOrderBy']
2139
- }], orderDir: [{
2140
- type: Input,
2141
- args: ['abpForOrderDir']
2142
- }], filterBy: [{
2143
- type: Input,
2144
- args: ['abpForFilterBy']
2145
- }], filterVal: [{
2146
- type: Input,
2147
- args: ['abpForFilterVal']
2148
- }], trackBy: [{
2149
- type: Input,
2150
- args: ['abpForTrackBy']
2151
- }], compareBy: [{
2152
- type: Input,
2153
- args: ['abpForCompareBy']
2154
- }], emptyRef: [{
2155
- type: Input,
2156
- args: ['abpForEmptyRef']
2157
- }] } });
2158
-
2159
- /**
2160
- * @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead.
2161
- */
2162
- class FormSubmitDirective {
2163
- constructor(formGroupDirective, host, cdRef, subscription) {
2164
- this.formGroupDirective = formGroupDirective;
2165
- this.host = host;
2166
- this.cdRef = cdRef;
2167
- this.subscription = subscription;
2168
- this.debounce = 200;
2169
- this.markAsDirtyWhenSubmit = true;
2170
- this.ngSubmit = new EventEmitter();
2171
- this.executedNgSubmit = false;
2172
- }
2173
- ngOnInit() {
2174
- this.subscription.addOne(this.formGroupDirective.ngSubmit, () => {
2175
- if (this.markAsDirtyWhenSubmit) {
2176
- this.markAsDirty();
2177
- }
2178
- this.executedNgSubmit = true;
2179
- });
2180
- const keyup$ = fromEvent(this.host.nativeElement, 'keyup').pipe(debounceTime(this.debounce), filter(event => !(event.target instanceof HTMLTextAreaElement)), filter(event => event && event.key === 'Enter'));
2181
- this.subscription.addOne(keyup$, () => {
2182
- if (!this.executedNgSubmit) {
2183
- this.host.nativeElement.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
2184
- }
2185
- this.executedNgSubmit = false;
2186
- });
2187
- }
2188
- markAsDirty() {
2189
- const { form } = this.formGroupDirective;
2190
- setDirty(form.controls);
2191
- form.markAsDirty();
2192
- this.cdRef.detectChanges();
2193
- }
2194
- }
2195
- FormSubmitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FormSubmitDirective, deps: [{ token: i1$2.FormGroupDirective, self: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: SubscriptionService }], target: i0.ɵɵFactoryTarget.Directive });
2196
- FormSubmitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: { debounce: "debounce", notValidateOnSubmit: "notValidateOnSubmit", markAsDirtyWhenSubmit: "markAsDirtyWhenSubmit" }, outputs: { ngSubmit: "ngSubmit" }, providers: [SubscriptionService], ngImport: i0 });
2197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FormSubmitDirective, decorators: [{
2198
- type: Directive,
2199
- args: [{
2200
- // eslint-disable-next-line @angular-eslint/directive-selector
2201
- selector: 'form[ngSubmit][formGroup]',
2202
- providers: [SubscriptionService],
2203
- }]
2204
- }], ctorParameters: function () {
2205
- return [{ type: i1$2.FormGroupDirective, decorators: [{
2206
- type: Self
2207
- }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: SubscriptionService }];
2208
- }, propDecorators: { debounce: [{
2209
- type: Input
2210
- }], notValidateOnSubmit: [{
2211
- type: Input
2212
- }], markAsDirtyWhenSubmit: [{
2213
- type: Input
2214
- }], ngSubmit: [{
2215
- type: Output
2216
- }] } });
2217
- function setDirty(controls) {
2218
- if (Array.isArray(controls)) {
2219
- controls.forEach(group => {
2220
- setDirty(group.controls);
2221
- });
2222
- return;
2223
- }
2224
- Object.keys(controls).forEach(key => {
2225
- controls[key].markAsDirty();
2226
- controls[key].updateValueAndValidity();
2227
- });
2228
- }
2229
-
2230
- class InitDirective {
2231
- constructor(elRef) {
2232
- this.elRef = elRef;
2233
- this.init = new EventEmitter();
2234
- }
2235
- ngAfterViewInit() {
2236
- this.init.emit(this.elRef);
2237
- }
2238
- }
2239
- InitDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: InitDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2240
- InitDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: InitDirective, selector: "[abpInit]", outputs: { init: "abpInit" }, ngImport: i0 });
2241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: InitDirective, decorators: [{
2242
- type: Directive,
2243
- args: [{ selector: '[abpInit]' }]
2244
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { init: [{
2245
- type: Output,
2246
- args: ['abpInit']
2247
- }] } });
2248
-
2249
- class PermissionDirective {
2250
- constructor(templateRef, vcRef, permissionService, cdRef, queue) {
2251
- this.templateRef = templateRef;
2252
- this.vcRef = vcRef;
2253
- this.permissionService = permissionService;
2254
- this.cdRef = cdRef;
2255
- this.queue = queue;
2256
- this.runChangeDetection = true;
2257
- this.cdrSubject = new ReplaySubject();
2258
- this.rendered = false;
2259
- }
2260
- check() {
2261
- if (this.subscription) {
2262
- this.subscription.unsubscribe();
2263
- }
2264
- this.subscription = this.permissionService
2265
- .getGrantedPolicy$(this.condition || '')
2266
- .pipe(distinctUntilChanged())
2267
- .subscribe(isGranted => {
2268
- this.vcRef.clear();
2269
- if (isGranted)
2270
- this.vcRef.createEmbeddedView(this.templateRef);
2271
- if (this.runChangeDetection) {
2272
- if (!this.rendered) {
2273
- this.cdrSubject.next();
2274
- }
2275
- else {
2276
- this.cdRef.detectChanges();
2277
- }
2278
- }
2279
- else {
2280
- this.cdRef.markForCheck();
2281
- }
2282
- });
2283
- }
2284
- ngOnDestroy() {
2285
- if (this.subscription)
2286
- this.subscription.unsubscribe();
2287
- }
2288
- ngOnChanges() {
2289
- this.check();
2290
- }
2291
- ngAfterViewInit() {
2292
- this.cdrSubject.pipe(take(1)).subscribe(() => this.queue.add(() => this.cdRef.detectChanges()));
2293
- this.rendered = true;
2294
- }
2295
- }
2296
- PermissionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionDirective, deps: [{ token: i0.TemplateRef, optional: true }, { token: i0.ViewContainerRef }, { token: PermissionService }, { token: i0.ChangeDetectorRef }, { token: QUEUE_MANAGER }], target: i0.ɵɵFactoryTarget.Directive });
2297
- PermissionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: PermissionDirective, selector: "[abpPermission]", inputs: { condition: ["abpPermission", "condition"], runChangeDetection: ["abpPermissionRunChangeDetection", "runChangeDetection"] }, usesOnChanges: true, ngImport: i0 });
2298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionDirective, decorators: [{
2299
- type: Directive,
2300
- args: [{
2301
- selector: '[abpPermission]',
2302
- }]
2303
- }], ctorParameters: function () {
2304
- return [{ type: i0.TemplateRef, decorators: [{
2305
- type: Optional
2306
- }] }, { type: i0.ViewContainerRef }, { type: PermissionService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
2307
- type: Inject,
2308
- args: [QUEUE_MANAGER]
2309
- }] }];
2310
- }, propDecorators: { condition: [{
2311
- type: Input,
2312
- args: ['abpPermission']
2313
- }], runChangeDetection: [{
2314
- type: Input,
2315
- args: ['abpPermissionRunChangeDetection']
2316
- }] } });
2317
-
2318
- class ReplaceableTemplateDirective {
2319
- constructor(injector, templateRef, vcRef, replaceableComponents, subscription) {
2320
- this.injector = injector;
2321
- this.templateRef = templateRef;
2322
- this.vcRef = vcRef;
2323
- this.replaceableComponents = replaceableComponents;
2324
- this.subscription = subscription;
2325
- this.providedData = {
2326
- inputs: {},
2327
- outputs: {},
2328
- };
2329
- this.context = {};
2330
- this.defaultComponentSubscriptions = {};
2331
- this.initialized = false;
2332
- this.context = {
2333
- initTemplate: (ref) => {
2334
- this.resetDefaultComponent();
2335
- this.defaultComponentRef = ref;
2336
- this.setDefaultComponentInputs();
2337
- },
2338
- };
2339
- }
2340
- ngOnInit() {
2341
- const component$ = this.replaceableComponents
2342
- .get$(this.data.componentKey)
2343
- .pipe(filter((res = {}) => !this.initialized || !compare(res.component, this.externalComponent)));
2344
- this.subscription.addOne(component$, (res = {}) => {
2345
- this.vcRef.clear();
2346
- this.externalComponent = res.component;
2347
- if (this.defaultComponentRef) {
2348
- this.resetDefaultComponent();
2349
- }
2350
- if (res.component) {
2351
- this.setProvidedData();
2352
- const customInjector = Injector.create({
2353
- providers: [{ provide: 'REPLACEABLE_DATA', useValue: this.providedData }],
2354
- parent: this.injector,
2355
- });
2356
- const ref = this.vcRef.createComponent(res.component, {
2357
- index: 0,
2358
- injector: customInjector,
2359
- });
2360
- }
2361
- else {
2362
- this.vcRef.createEmbeddedView(this.templateRef, this.context);
2363
- }
2364
- this.initialized = true;
2365
- });
2366
- }
2367
- ngOnChanges(changes) {
2368
- var _a, _b;
2369
- if (((_b = (_a = changes === null || changes === void 0 ? void 0 : changes.data) === null || _a === void 0 ? void 0 : _a.currentValue) === null || _b === void 0 ? void 0 : _b.inputs) && this.defaultComponentRef) {
2370
- this.setDefaultComponentInputs();
2371
- }
2372
- }
2373
- setDefaultComponentInputs() {
2374
- if (!this.defaultComponentRef || (!this.data.inputs && !this.data.outputs))
2375
- return;
2376
- if (this.data.inputs) {
2377
- for (const key in this.data.inputs) {
2378
- if (Object.prototype.hasOwnProperty.call(this.data.inputs, key)) {
2379
- if (!compare(this.defaultComponentRef[key], this.data.inputs[key].value)) {
2380
- this.defaultComponentRef[key] = this.data.inputs[key].value;
2381
- }
2382
- }
2383
- }
2384
- }
2385
- if (this.data.outputs) {
2386
- for (const key in this.data.outputs) {
2387
- if (Object.prototype.hasOwnProperty.call(this.data.outputs, key)) {
2388
- if (!this.defaultComponentSubscriptions[key]) {
2389
- this.defaultComponentSubscriptions[key] = this.defaultComponentRef[key].subscribe((value) => {
2390
- var _a;
2391
- (_a = this.data.outputs) === null || _a === void 0 ? void 0 : _a[key](value);
2392
- });
2393
- }
2394
- }
2395
- }
2396
- }
2397
- }
2398
- setProvidedData() {
2399
- this.providedData = Object.assign(Object.assign({ outputs: {} }, this.data), { inputs: {} });
2400
- if (!this.data.inputs)
2401
- return;
2402
- Object.defineProperties(this.providedData.inputs, Object.assign({}, Object.keys(this.data.inputs).reduce((acc, key) => {
2403
- var _a, _b;
2404
- return (Object.assign(Object.assign({}, acc), { [key]: Object.assign({ enumerable: true, configurable: true, get: () => { var _a, _b; return (_b = (_a = this.data.inputs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.value; } }, (((_b = (_a = this.data.inputs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.twoWay) && {
2405
- set: (newValue) => {
2406
- var _a, _b;
2407
- if ((_a = this.data.inputs) === null || _a === void 0 ? void 0 : _a[key]) {
2408
- this.data.inputs[key].value = newValue;
2409
- }
2410
- if ((_b = this.data.outputs) === null || _b === void 0 ? void 0 : _b[`${key}Change`]) {
2411
- this.data.outputs[`${key}Change`](newValue);
2412
- }
2413
- },
2414
- })) }));
2415
- }, {})));
2416
- }
2417
- resetDefaultComponent() {
2418
- Object.keys(this.defaultComponentSubscriptions).forEach(key => {
2419
- this.defaultComponentSubscriptions[key].unsubscribe();
2420
- });
2421
- this.defaultComponentSubscriptions = {};
2422
- this.defaultComponentRef = null;
2423
- }
2424
- }
2425
- ReplaceableTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableTemplateDirective, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ReplaceableComponentsService }, { token: SubscriptionService }], target: i0.ɵɵFactoryTarget.Directive });
2426
- ReplaceableTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: { data: ["abpReplaceableTemplate", "data"] }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0 });
2427
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ReplaceableTemplateDirective, decorators: [{
2428
- type: Directive,
2429
- args: [{
2430
- selector: '[abpReplaceableTemplate]',
2431
- providers: [SubscriptionService],
2432
- }]
2433
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ReplaceableComponentsService }, { type: SubscriptionService }]; }, propDecorators: { data: [{
2434
- type: Input,
2435
- args: ['abpReplaceableTemplate']
2436
- }] } });
2437
-
2438
- class StopPropagationDirective {
2439
- constructor(el, subscription) {
2440
- this.el = el;
2441
- this.subscription = subscription;
2442
- this.stopPropEvent = new EventEmitter();
2443
- }
2444
- ngOnInit() {
2445
- this.subscription.addOne(fromEvent(this.el.nativeElement, 'click'), event => {
2446
- event.stopPropagation();
2447
- this.stopPropEvent.emit(event);
2448
- });
2449
- }
2450
- }
2451
- StopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: StopPropagationDirective, deps: [{ token: i0.ElementRef }, { token: SubscriptionService }], target: i0.ɵɵFactoryTarget.Directive });
2452
- StopPropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: StopPropagationDirective, selector: "[click.stop]", outputs: { stopPropEvent: "click.stop" }, providers: [SubscriptionService], ngImport: i0 });
2453
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: StopPropagationDirective, decorators: [{
2454
- type: Directive,
2455
- args: [{
2456
- // eslint-disable-next-line @angular-eslint/directive-selector
2457
- selector: '[click.stop]',
2458
- providers: [SubscriptionService],
2459
- }]
2460
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SubscriptionService }]; }, propDecorators: { stopPropEvent: [{
2461
- type: Output,
2462
- args: ['click.stop']
2463
- }] } });
2464
-
2465
- class RoutesHandler {
2466
- constructor(routes, router) {
2467
- this.routes = routes;
2468
- this.router = router;
2469
- this.addRoutes();
2470
- }
2471
- addRoutes() {
2472
- var _a, _b;
2473
- (_b = (_a = this.router) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.forEach(({ path = '', data }) => {
2474
- const routes = data === null || data === void 0 ? void 0 : data.routes;
2475
- if (!routes)
2476
- return;
2477
- if (Array.isArray(routes)) {
2478
- this.routes.add(routes);
2479
- }
2480
- else {
2481
- const routesFlatten = flatRoutes([Object.assign({ path }, routes)], { path: '' });
2482
- this.routes.add(routesFlatten);
2483
- }
2484
- });
2485
- }
2486
- }
2487
- RoutesHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesHandler, deps: [{ token: RoutesService }, { token: i1$1.Router, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2488
- RoutesHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesHandler, providedIn: 'root' });
2489
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesHandler, decorators: [{
2490
- type: Injectable,
2491
- args: [{
2492
- providedIn: 'root',
2493
- }]
2494
- }], ctorParameters: function () {
2495
- return [{ type: RoutesService }, { type: i1$1.Router, decorators: [{
2496
- type: Optional
2497
- }] }];
2498
- } });
2499
- function flatRoutes(routes, parent) {
2500
- if (!routes)
2501
- return [];
2502
- return routes.reduce((acc, route) => {
2503
- const _a = Object.assign(Object.assign({}, route), { parentName: parent.name, path: (parent.path + '/' + route.path).replace(/\/\//g, '/') }), { children } = _a, current = __rest(_a, ["children"]);
2504
- acc.push(current, ...flatRoutes(children, current));
2505
- return acc;
2506
- }, []);
2507
- }
2508
-
2509
- class LocalizationPipe {
2510
- constructor(localization) {
2511
- this.localization = localization;
2512
- }
2513
- transform(value = '', ...interpolateParams) {
2514
- const params = interpolateParams.reduce((acc, val) => {
2515
- if (!acc) {
2516
- return val;
2517
- }
2518
- if (!val) {
2519
- return acc;
2520
- }
2521
- return Array.isArray(val) ? [...acc, ...val] : [...acc, val];
2522
- }, []) || [];
2523
- return this.localization.instant(value, ...params);
2524
- }
2525
- }
2526
- LocalizationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationPipe, deps: [{ token: LocalizationService }], target: i0.ɵɵFactoryTarget.Pipe });
2527
- LocalizationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: LocalizationPipe, name: "abpLocalization" });
2528
- LocalizationPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationPipe });
2529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationPipe, decorators: [{
2530
- type: Injectable
2531
- }, {
2532
- type: Pipe,
2533
- args: [{
2534
- name: 'abpLocalization',
2535
- }]
2536
- }], ctorParameters: function () { return [{ type: LocalizationService }]; } });
2537
-
2538
- class LocalizationModule {
2539
- }
2540
- LocalizationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2541
- LocalizationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: LocalizationModule, declarations: [LocalizationPipe], exports: [LocalizationPipe] });
2542
- LocalizationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationModule });
2543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LocalizationModule, decorators: [{
2544
- type: NgModule,
2545
- args: [{
2546
- exports: [LocalizationPipe],
2547
- declarations: [LocalizationPipe],
2548
- }]
2549
- }] });
2550
-
2551
- class SortPipe {
2552
- transform(value, sortOrder = 'asc', sortKey) {
2553
- sortOrder = sortOrder && sortOrder.toLowerCase();
2554
- if (!value || (sortOrder !== 'asc' && sortOrder !== 'desc'))
2555
- return value;
2556
- let numberArray = [];
2557
- let stringArray = [];
2558
- if (!sortKey) {
2559
- numberArray = value.filter(item => typeof item === 'number').sort();
2560
- stringArray = value.filter(item => typeof item === 'string').sort();
2561
- }
2562
- else {
2563
- numberArray = value
2564
- .filter(item => typeof item[sortKey] === 'number')
2565
- .sort((a, b) => a[sortKey] - b[sortKey]);
2566
- stringArray = value
2567
- .filter(item => typeof item[sortKey] === 'string')
2568
- .sort((a, b) => {
2569
- if (a[sortKey] < b[sortKey])
2570
- return -1;
2571
- else if (a[sortKey] > b[sortKey])
2572
- return 1;
2573
- else
2574
- return 0;
2575
- });
2576
- }
2577
- const sorted = [
2578
- ...numberArray,
2579
- ...stringArray,
2580
- ...value.filter(item => typeof (sortKey ? item[sortKey] : item) !== 'number' &&
2581
- typeof (sortKey ? item[sortKey] : item) !== 'string'),
2582
- ];
2583
- return sortOrder === 'asc' ? sorted : sorted.reverse();
2584
- }
2585
- }
2586
- SortPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2587
- SortPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SortPipe, name: "abpSort" });
2588
- SortPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortPipe });
2589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SortPipe, decorators: [{
2590
- type: Injectable
2591
- }, {
2592
- type: Pipe,
2593
- args: [{
2594
- name: 'abpSort',
2595
- }]
2596
- }] });
2597
-
2598
- const INJECTOR_PIPE_DATA_TOKEN = new InjectionToken('INJECTOR_PIPE_DATA_TOKEN');
2599
- class ToInjectorPipe {
2600
- constructor(injector) {
2601
- this.injector = injector;
2602
- }
2603
- transform(value, token = INJECTOR_PIPE_DATA_TOKEN, name = 'ToInjectorPipe') {
2604
- return Injector.create({
2605
- providers: [
2606
- {
2607
- provide: token,
2608
- useValue: value,
2609
- },
2610
- ],
2611
- parent: this.injector,
2612
- name,
2613
- });
2614
- }
2615
- }
2616
- ToInjectorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToInjectorPipe, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Pipe });
2617
- ToInjectorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ToInjectorPipe, name: "toInjector" });
2618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToInjectorPipe, decorators: [{
2619
- type: Pipe,
2620
- args: [{
2621
- name: 'toInjector',
2622
- }]
2623
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
2624
-
2625
- function setLanguageToCookie(injector) {
2626
- return () => {
2627
- const sessionState = injector.get(SessionStateService);
2628
- const document = injector.get(DOCUMENT);
2629
- const cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY);
2630
- sessionState.getLanguage$().subscribe(language => {
2631
- const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`);
2632
- document.cookie = `${cookieLanguageKey}=${cookieValue}`;
2633
- });
2634
- };
2635
- }
2636
- const CookieLanguageProvider = {
2637
- provide: APP_INITIALIZER,
2638
- useFactory: setLanguageToCookie,
2639
- deps: [Injector],
2640
- multi: true,
2641
- };
2642
-
2643
- class LocaleId extends String {
2644
- constructor(localizationService) {
2645
- super();
2646
- this.localizationService = localizationService;
2647
- }
2648
- toString() {
2649
- const { currentLang } = this.localizationService;
2650
- if (checkHasProp(differentLocales, currentLang)) {
2651
- return differentLocales[currentLang];
2652
- }
2653
- return currentLang;
2654
- }
2655
- valueOf() {
2656
- return this.toString();
2657
- }
2658
- }
2659
- const LocaleProvider = {
2660
- provide: LOCALE_ID,
2661
- useClass: LocaleId,
2662
- deps: [LocalizationService],
2663
- };
2664
-
2665
- Date.prototype.toLocalISOString = function () {
2666
- const timezoneOffset = this.getTimezoneOffset();
2667
- return new Date(this.getTime() - timezoneOffset * 60000).toISOString();
2668
- };
2669
-
2670
- function getRemoteEnv(injector, environment) {
2671
- const environmentService = injector.get(EnvironmentService);
2672
- const { remoteEnv } = environment;
2673
- const { headers = {}, method = 'GET', url } = remoteEnv || {};
2674
- if (!url)
2675
- return Promise.resolve();
2676
- const http = injector.get(HttpClient);
2677
- const httpErrorReporter = injector.get(HttpErrorReporterService);
2678
- return http
2679
- .request(method, url, { headers })
2680
- .pipe(catchError(err => {
2681
- httpErrorReporter.reportError(err);
2682
- return of(null);
2683
- }), // TODO: Consider get handle function from a provider
2684
- tap(env => environmentService.setState(mergeEnvironments(environment, env || {}, remoteEnv))))
2685
- .toPromise();
2686
- }
2687
- function mergeEnvironments(local, remote, config) {
2688
- switch (config.mergeStrategy) {
2689
- case 'deepmerge':
2690
- return deepMerge(local, remote);
2691
- case 'overwrite':
2692
- case null:
2693
- case undefined:
2694
- return remote;
2695
- default:
2696
- return config.mergeStrategy(local, remote);
2697
- }
2698
- }
2699
-
2700
- class AbpTenantService {
2701
- constructor(restService) {
2702
- this.restService = restService;
2703
- this.apiName = 'abp';
2704
- this.findTenantById = (id) => this.restService.request({
2705
- method: 'GET',
2706
- url: `/api/abp/multi-tenancy/tenants/by-id/${id}`,
2707
- }, { apiName: this.apiName });
2708
- this.findTenantByName = (name) => this.restService.request({
2709
- method: 'GET',
2710
- url: `/api/abp/multi-tenancy/tenants/by-name/${name}`,
2711
- }, { apiName: this.apiName });
2712
- }
2713
- }
2714
- AbpTenantService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpTenantService, deps: [{ token: RestService }], target: i0.ɵɵFactoryTarget.Injectable });
2715
- AbpTenantService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpTenantService, providedIn: 'root' });
2716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpTenantService, decorators: [{
2717
- type: Injectable,
2718
- args: [{
2719
- providedIn: 'root',
2720
- }]
2721
- }], ctorParameters: function () { return [{ type: RestService }]; } });
2722
-
2723
- class MultiTenancyService {
2724
- constructor(restService, sessionState, tenantService, configStateService, tenantKey) {
2725
- this.restService = restService;
2726
- this.sessionState = sessionState;
2727
- this.tenantService = tenantService;
2728
- this.configStateService = configStateService;
2729
- this.tenantKey = tenantKey;
2730
- this.domainTenant = null;
2731
- this.isTenantBoxVisible = true;
2732
- this.apiName = 'abp';
2733
- this.setTenantToState = (tenant) => {
2734
- this.sessionState.setTenant({ id: tenant.tenantId, name: tenant.name, isAvailable: true });
2735
- return this.configStateService.refreshAppState().pipe(map(_ => tenant));
2736
- };
2737
- }
2738
- setTenantByName(tenantName) {
2739
- return this.tenantService
2740
- .findTenantByName(tenantName)
2741
- .pipe(switchMap(this.setTenantToState));
2742
- }
2743
- setTenantById(tenantId) {
2744
- return this.tenantService
2745
- .findTenantById(tenantId)
2746
- .pipe(switchMap(this.setTenantToState));
2747
- }
2748
- }
2749
- MultiTenancyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MultiTenancyService, deps: [{ token: RestService }, { token: SessionStateService }, { token: AbpTenantService }, { token: ConfigStateService }, { token: TENANT_KEY }], target: i0.ɵɵFactoryTarget.Injectable });
2750
- MultiTenancyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MultiTenancyService, providedIn: 'root' });
2751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MultiTenancyService, decorators: [{
2752
- type: Injectable,
2753
- args: [{ providedIn: 'root' }]
2754
- }], ctorParameters: function () {
2755
- return [{ type: RestService }, { type: SessionStateService }, { type: AbpTenantService }, { type: ConfigStateService }, { type: undefined, decorators: [{
2756
- type: Inject,
2757
- args: [TENANT_KEY]
2758
- }] }];
2759
- } });
2760
-
2761
- const tenancyPlaceholder = '{0}';
2762
- function getCurrentTenancyName(appBaseUrl) {
2763
- var _a;
2764
- if (appBaseUrl.charAt(appBaseUrl.length - 1) !== '/')
2765
- appBaseUrl += '/';
2766
- const parseTokens = createTokenParser(appBaseUrl);
2767
- const token = tenancyPlaceholder.replace(/[}{]/g, '');
2768
- return (_a = parseTokens(window.location.href)[token]) === null || _a === void 0 ? void 0 : _a[0];
2769
- }
2770
- function getCurrentTenancyNameFromUrl(tenantKey) {
2771
- const urlParams = new URLSearchParams(window.location.search);
2772
- return urlParams.get(tenantKey);
2773
- }
2774
- function parseTenantFromUrl(injector) {
2775
- var _a, _b;
2776
- return __awaiter(this, void 0, void 0, function* () {
2777
- const environmentService = injector.get(EnvironmentService);
2778
- const multiTenancyService = injector.get(MultiTenancyService);
2779
- const baseUrl = ((_b = (_a = environmentService.getEnvironment()) === null || _a === void 0 ? void 0 : _a.application) === null || _b === void 0 ? void 0 : _b.baseUrl) || '';
2780
- const tenancyName = getCurrentTenancyName(baseUrl);
2781
- const hideTenantBox = () => {
2782
- multiTenancyService.isTenantBoxVisible = false;
2783
- };
2784
- const setDomainTenant = (tenant) => {
2785
- multiTenancyService.domainTenant = {
2786
- id: tenant.tenantId,
2787
- name: tenant.name,
2788
- isAvailable: true,
2789
- };
2790
- };
2791
- const setEnvironmentWithDomainTenant = (tenant) => {
2792
- hideTenantBox();
2793
- setDomainTenant(tenant);
2794
- };
2795
- if (tenancyName) {
2796
- /**
2797
- * We have to replace tenant name within the urls from environment,
2798
- * because the code below will make a http request to find information about the domain tenant.
2799
- * Before this request takes place, we need to replace placeholders aka "{0}".
2800
- */
2801
- replaceTenantNameWithinEnvironment(injector, tenancyName);
2802
- return multiTenancyService
2803
- .setTenantByName(tenancyName)
2804
- .pipe(tap(setEnvironmentWithDomainTenant))
2805
- .toPromise();
2806
- }
2807
- else {
2808
- /**
2809
- * If there is no tenant, we still have to clean up {0}. from baseUrl to avoid incorrect http requests.
2810
- */
2811
- replaceTenantNameWithinEnvironment(injector, '', tenancyPlaceholder + '.');
2812
- const tenantIdFromQueryParams = getCurrentTenancyNameFromUrl(multiTenancyService.tenantKey);
2813
- if (tenantIdFromQueryParams) {
2814
- return multiTenancyService.setTenantById(tenantIdFromQueryParams).toPromise();
2815
- }
2816
- }
2817
- return Promise.resolve();
2818
- });
2819
- }
2820
- function replaceTenantNameWithinEnvironment(injector, tenancyName, placeholder = tenancyPlaceholder) {
2821
- var _a;
2822
- const environmentService = injector.get(EnvironmentService);
2823
- const environment = clone(environmentService.getEnvironment());
2824
- if (environment.application.baseUrl) {
2825
- environment.application.baseUrl = environment.application.baseUrl.replace(placeholder, tenancyName);
2826
- }
2827
- if ((_a = environment.oAuthConfig) === null || _a === void 0 ? void 0 : _a.redirectUri) {
2828
- environment.oAuthConfig.redirectUri = environment.oAuthConfig.redirectUri.replace(placeholder, tenancyName);
2829
- }
2830
- if (!environment.oAuthConfig) {
2831
- environment.oAuthConfig = {};
2832
- }
2833
- environment.oAuthConfig.issuer = (environment.oAuthConfig.issuer || '').replace(placeholder, tenancyName);
2834
- Object.keys(environment.apis).forEach(api => {
2835
- Object.keys(environment.apis[api]).forEach(key => {
2836
- environment.apis[api][key] = (environment.apis[api][key] || '').replace(placeholder, tenancyName);
2837
- });
2838
- });
2839
- return environmentService.setState(environment);
2840
- }
2841
-
2842
- function getInitialData(injector) {
2843
- const fn = () => __awaiter(this, void 0, void 0, function* () {
2844
- const environmentService = injector.get(EnvironmentService);
2845
- const configState = injector.get(ConfigStateService);
2846
- const options = injector.get(CORE_OPTIONS);
2847
- environmentService.setState(options.environment);
2848
- yield getRemoteEnv(injector, options.environment);
2849
- yield parseTenantFromUrl(injector);
2850
- const authService = injector.get(AuthService, undefined, { optional: true });
2851
- const checkAuthenticationState = injector.get(CHECK_AUTHENTICATION_STATE_FN_KEY, noop, {
2852
- optional: true,
2853
- });
2854
- if (authService) {
2855
- yield authService.init();
2856
- }
2857
- if (options.skipGetAppConfiguration)
2858
- return;
2859
- const result$ = configState.refreshAppState().pipe(tap(() => checkAuthenticationState(injector)), tap(() => {
2860
- const currentTenant = configState.getOne('currentTenant');
2861
- injector.get(SessionStateService).setTenant(currentTenant);
2862
- }), catchError(error => {
2863
- const appInitErrorHandlers = injector.get(APP_INIT_ERROR_HANDLERS, null);
2864
- if (appInitErrorHandlers && appInitErrorHandlers.length) {
2865
- appInitErrorHandlers.forEach(func => func(error));
2866
- }
2867
- return throwError(error);
2868
- }));
2869
- yield lastValueFrom(result$);
2870
- });
2871
- return fn;
2872
- }
2873
- function localeInitializer(injector) {
2874
- const fn = () => {
2875
- const sessionState = injector.get(SessionStateService);
2876
- const { registerLocaleFn } = injector.get(CORE_OPTIONS);
2877
- const lang = sessionState.getLanguage() || 'en';
2878
- return new Promise((resolve, reject) => {
2879
- registerLocaleFn(lang).then(module => {
2880
- if (module === null || module === void 0 ? void 0 : module.default)
2881
- registerLocaleData(module.default);
2882
- return resolve('resolved');
2883
- }, reject);
2884
- });
2885
- };
2886
- return fn;
2887
- }
2888
-
2889
- function getShortDateFormat(configStateService) {
2890
- const dateTimeFormat = configStateService.getDeep('localization.currentCulture.dateTimeFormat');
2891
- return dateTimeFormat.shortDatePattern;
2892
- }
2893
- function getShortTimeFormat(configStateService) {
2894
- var _a;
2895
- const dateTimeFormat = configStateService.getDeep('localization.currentCulture.dateTimeFormat');
2896
- return (_a = dateTimeFormat === null || dateTimeFormat === void 0 ? void 0 : dateTimeFormat.shortTimePattern) === null || _a === void 0 ? void 0 : _a.replace('tt', 'a');
2897
- }
2898
- function getShortDateShortTimeFormat(configStateService) {
2899
- var _a;
2900
- const dateTimeFormat = configStateService.getDeep('localization.currentCulture.dateTimeFormat');
2901
- return `${dateTimeFormat.shortDatePattern} ${(_a = dateTimeFormat === null || dateTimeFormat === void 0 ? void 0 : dateTimeFormat.shortTimePattern) === null || _a === void 0 ? void 0 : _a.replace('tt', 'a')}`;
2902
- }
2903
-
2904
- class ContentProjectionService {
2905
- constructor(injector) {
2906
- this.injector = injector;
2907
- }
2908
- projectContent(projectionStrategy, injector = this.injector) {
2909
- return projectionStrategy.injectContent(injector);
2910
- }
2911
- }
2912
- ContentProjectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ContentProjectionService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2913
- ContentProjectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ContentProjectionService, providedIn: 'root' });
2914
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ContentProjectionService, decorators: [{
2915
- type: Injectable,
2916
- args: [{ providedIn: 'root' }]
2917
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
2918
-
2919
- class LazyModuleFactory extends NgModuleFactory {
2920
- constructor(moduleWithProviders) {
2921
- super();
2922
- this.moduleWithProviders = moduleWithProviders;
2923
- }
2924
- get moduleType() {
2925
- return this.moduleWithProviders.ngModule;
2926
- }
2927
- create(parentInjector) {
2928
- const injector = Injector.create(Object.assign(Object.assign({}, (parentInjector && { parent: parentInjector })), { providers: this.moduleWithProviders.providers }));
2929
- const compiler = injector.get(Compiler);
2930
- const factory = compiler.compileModuleSync(this.moduleType);
2931
- return factory.create(injector);
2932
- }
2933
- }
2934
- function featuresFactory(configState, featureKeys, mapFn = features => features) {
2935
- return configState.getFeatures$(featureKeys).pipe(filter(Boolean), map(mapFn));
2936
- }
2937
-
2938
- function downloadBlob(blob, filename) {
2939
- const blobUrl = URL.createObjectURL(blob);
2940
- const link = document.createElement('a');
2941
- link.href = blobUrl;
2942
- link.download = filename;
2943
- document.body.appendChild(link);
2944
- link.dispatchEvent(new MouseEvent('click', {
2945
- bubbles: true,
2946
- cancelable: true,
2947
- view: window,
2948
- }));
2949
- document.body.removeChild(link);
2950
- }
2951
-
2952
- function isNumber(value) {
2953
- return value == Number(value);
2954
- }
2955
-
2956
- function mapEnumToOptions(_enum) {
2957
- const options = [];
2958
- for (const member in _enum)
2959
- if (!isNumber(member))
2960
- options.push({
2961
- key: member,
2962
- value: _enum[member],
2963
- });
2964
- return options;
2965
- }
2966
-
2967
- function uuid(a) {
2968
- return a
2969
- ? (a ^ ((Math.random() * 16) >> (a / 4))).toString(16)
2970
- : ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, uuid);
2971
- }
2972
- function generateHash(value) {
2973
- let hashed = 0;
2974
- let charCode;
2975
- for (let i = 0; i < value.length; i++) {
2976
- charCode = value.charCodeAt(i);
2977
- hashed = (hashed << 5) - hashed + charCode;
2978
- hashed |= 0;
2979
- }
2980
- return hashed;
2981
- }
2982
- function generatePassword(length = 8) {
2983
- length = Math.min(Math.max(4, length), 128);
2984
- const lowers = 'abcdefghijklmnopqrstuvwxyz';
2985
- const uppers = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
2986
- const numbers = '0123456789';
2987
- const specials = '!@#$%&*()_+{}<>?[]./';
2988
- const all = lowers + uppers + numbers + specials;
2989
- const getRandom = (chrSet) => chrSet[Math.floor(Math.random() * chrSet.length)];
2990
- const password = Array({ length });
2991
- password[0] = getRandom(lowers);
2992
- password[1] = getRandom(uppers);
2993
- password[2] = getRandom(numbers);
2994
- password[3] = getRandom(specials);
2995
- for (let i = 4; i < length; i++) {
2996
- password[i] = getRandom(all);
2997
- }
2998
- return password.sort(() => 0.5 - Math.random()).join('');
2999
- }
3000
-
3001
- function getPathName(url) {
3002
- const { pathname } = new URL(url, window.location.origin);
3003
- return pathname;
3004
- }
3005
- class WebHttpUrlEncodingCodec {
3006
- encodeKey(k) {
3007
- return encodeURIComponent(k);
3008
- }
3009
- encodeValue(v) {
3010
- return encodeURIComponent(v);
3011
- }
3012
- decodeKey(k) {
3013
- return decodeURIComponent(k);
3014
- }
3015
- decodeValue(v) {
3016
- return decodeURIComponent(v);
3017
- }
3018
- }
3019
-
3020
- class CrossOriginStrategy {
3021
- constructor(crossorigin, integrity) {
3022
- this.crossorigin = crossorigin;
3023
- this.integrity = integrity;
3024
- }
3025
- setCrossOrigin(element) {
3026
- if (this.integrity)
3027
- element.setAttribute('integrity', this.integrity);
3028
- if (this.crossorigin) {
3029
- element.setAttribute('crossorigin', this.crossorigin);
3030
- }
3031
- }
3032
- }
3033
- class NoCrossOriginStrategy extends CrossOriginStrategy {
3034
- setCrossOrigin() { }
3035
- }
3036
- const CROSS_ORIGIN_STRATEGY = {
3037
- Anonymous(integrity) {
3038
- return new CrossOriginStrategy('anonymous', integrity);
3039
- },
3040
- UseCredentials(integrity) {
3041
- return new CrossOriginStrategy('use-credentials', integrity);
3042
- },
3043
- None() {
3044
- return new NoCrossOriginStrategy(null);
3045
- },
3046
- };
3047
-
3048
- class DomStrategy {
3049
- constructor(target = document.head, position = 'beforeend') {
3050
- this.target = target;
3051
- this.position = position;
3052
- }
3053
- insertElement(element) {
3054
- this.target.insertAdjacentElement(this.position, element);
3055
- }
3056
- }
3057
- const DOM_STRATEGY = {
3058
- AfterElement(element) {
3059
- return new DomStrategy(element, 'afterend');
3060
- },
3061
- AppendToBody() {
3062
- return new DomStrategy(document.body, 'beforeend');
3063
- },
3064
- AppendToHead() {
3065
- return new DomStrategy(document.head, 'beforeend');
3066
- },
3067
- BeforeElement(element) {
3068
- return new DomStrategy(element, 'beforebegin');
3069
- },
3070
- PrependToHead() {
3071
- return new DomStrategy(document.head, 'afterbegin');
3072
- },
3073
- };
3074
-
3075
- function fromLazyLoad(element, domStrategy = DOM_STRATEGY.AppendToHead(), crossOriginStrategy = CROSS_ORIGIN_STRATEGY.Anonymous()) {
3076
- crossOriginStrategy.setCrossOrigin(element);
3077
- domStrategy.insertElement(element);
3078
- return new Observable((observer) => {
3079
- element.onload = (event) => {
3080
- clearCallbacks(element);
3081
- observer.next(event);
3082
- observer.complete();
3083
- };
3084
- const handleError = createErrorHandler(observer, element);
3085
- element.onerror = handleError;
3086
- element.onabort = handleError;
3087
- element.onemptied = handleError;
3088
- element.onstalled = handleError;
3089
- element.onsuspend = handleError;
3090
- return () => {
3091
- clearCallbacks(element);
3092
- observer.complete();
3093
- };
3094
- });
3095
- }
3096
- function createErrorHandler(observer, element) {
3097
- return function (event) {
3098
- var _a;
3099
- clearCallbacks(element);
3100
- (_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
3101
- observer.error(event);
3102
- };
3103
- }
3104
- function clearCallbacks(element) {
3105
- element.onload = null;
3106
- element.onerror = null;
3107
- element.onabort = null;
3108
- element.onemptied = null;
3109
- element.onstalled = null;
3110
- element.onsuspend = null;
3111
- }
3112
-
3113
- class DefaultQueueManager {
3114
- constructor() {
3115
- this.queue = [];
3116
- this.isRunning = false;
3117
- this.stack = 0;
3118
- this.interval = 0;
3119
- this.stackSize = 100;
3120
- }
3121
- init(interval, stackSize) {
3122
- this.interval = interval;
3123
- this.stackSize = stackSize;
3124
- }
3125
- add(fn) {
3126
- this.queue.push(fn);
3127
- this.run();
3128
- }
3129
- run() {
3130
- if (this.isRunning)
3131
- return;
3132
- this.stack++;
3133
- this.isRunning = true;
3134
- const fn = this.queue.shift();
3135
- if (!fn) {
3136
- this.isRunning = false;
3137
- return;
3138
- }
3139
- fn();
3140
- if (this.stack > this.stackSize) {
3141
- setTimeout(() => {
3142
- this.isRunning = false;
3143
- this.run();
3144
- this.stack = 0;
3145
- }, this.interval);
3146
- }
3147
- else {
3148
- this.isRunning = false;
3149
- this.run();
3150
- }
3151
- }
3152
- }
3153
-
3154
- class DomInsertionService {
3155
- constructor() {
3156
- this.inserted = new Set();
3157
- }
3158
- insertContent(contentStrategy) {
3159
- const hash = generateHash(contentStrategy.content);
3160
- if (this.inserted.has(hash))
3161
- return;
3162
- const element = contentStrategy.insertElement();
3163
- this.inserted.add(hash);
3164
- return element;
3165
- }
3166
- removeContent(element) {
3167
- var _a;
3168
- if (element.textContent) {
3169
- const hash = generateHash(element.textContent);
3170
- this.inserted.delete(hash);
3171
- (_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
3172
- }
3173
- }
3174
- has(content) {
3175
- const hash = generateHash(content);
3176
- return this.inserted.has(hash);
3177
- }
3178
- }
3179
- DomInsertionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DomInsertionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3180
- DomInsertionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DomInsertionService, providedIn: 'root' });
3181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DomInsertionService, decorators: [{
3182
- type: Injectable,
3183
- args: [{ providedIn: 'root' }]
3184
- }] });
3185
-
3186
- class HttpWaitService {
3187
- constructor(injector) {
3188
- this.store = new InternalStore({
3189
- requests: [],
3190
- filteredRequests: [],
3191
- });
3192
- this.destroy$ = new Subject();
3193
- this.delay = injector.get(LOADER_DELAY, 500);
3194
- }
3195
- getLoading() {
3196
- return !!this.applyFilter(this.store.state.requests).length;
3197
- }
3198
- getLoading$() {
3199
- return this.store
3200
- .sliceState(({ requests }) => requests)
3201
- .pipe(map(requests => !!this.applyFilter(requests).length), switchMap(condition => condition
3202
- ? this.delay === 0
3203
- ? of(true)
3204
- : timer(this.delay).pipe(mapTo(true), takeUntil(this.destroy$))
3205
- : of(false)), tap(() => this.destroy$.next()));
3206
- }
3207
- updateLoading$() {
3208
- return this.store.sliceUpdate(({ requests }) => !!this.applyFilter(requests).length);
3209
- }
3210
- clearLoading() {
3211
- this.store.patch({ requests: [] });
3212
- }
3213
- addRequest(request) {
3214
- this.store.patch({ requests: [...this.store.state.requests, request] });
3215
- }
3216
- deleteRequest(request) {
3217
- const requests = this.store.state.requests.filter(r => r !== request);
3218
- this.store.patch({ requests });
3219
- }
3220
- addFilter(request) {
3221
- const requests = Array.isArray(request) ? request : [request];
3222
- const filteredRequests = [
3223
- ...this.store.state.filteredRequests.filter(f => !requests.some(r => this.isSameRequest(f, r))),
3224
- ...requests,
3225
- ];
3226
- this.store.patch({ filteredRequests });
3227
- }
3228
- removeFilter(request) {
3229
- const requests = Array.isArray(request) ? request : [request];
3230
- const filteredRequests = this.store.state.filteredRequests.filter(f => !requests.some(r => this.isSameRequest(f, r)));
3231
- this.store.patch({ filteredRequests });
3232
- }
3233
- applyFilter(requests) {
3234
- if (!requests) {
3235
- return [];
3236
- }
3237
- const { filteredRequests } = this.store.state;
3238
- return requests.filter(({ method, url }) => !filteredRequests.find(filteredRequest => this.isSameRequest(filteredRequest, { method, endpoint: getPathName(url) })));
3239
- }
3240
- isSameRequest(filteredRequest, request) {
3241
- const { method, endpoint } = filteredRequest;
3242
- return endpoint === request.endpoint && method === request.method;
3243
- }
3244
- }
3245
- HttpWaitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpWaitService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
3246
- HttpWaitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpWaitService, providedIn: 'root' });
3247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpWaitService, decorators: [{
3248
- type: Injectable,
3249
- args: [{
3250
- providedIn: 'root',
3251
- }]
3252
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
3253
-
3254
- class ResourceWaitService {
3255
- constructor() {
3256
- this.store = new InternalStore({ resources: new Set() });
3257
- }
3258
- getLoading() {
3259
- return !!this.store.state.resources.size;
3260
- }
3261
- getLoading$() {
3262
- return this.store.sliceState(({ resources }) => !!resources.size);
3263
- }
3264
- updateLoading$() {
3265
- return this.store.sliceUpdate(({ resources }) => !!(resources === null || resources === void 0 ? void 0 : resources.size));
3266
- }
3267
- clearLoading() {
3268
- this.store.patch({ resources: new Set() });
3269
- }
3270
- addResource(resource) {
3271
- const resources = this.store.state.resources;
3272
- resources.add(resource);
3273
- this.store.patch({ resources });
3274
- }
3275
- deleteResource(resource) {
3276
- const resources = this.store.state.resources;
3277
- resources.delete(resource);
3278
- this.store.patch({ resources });
3279
- }
3280
- }
3281
- ResourceWaitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResourceWaitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3282
- ResourceWaitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResourceWaitService, providedIn: 'root' });
3283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResourceWaitService, decorators: [{
3284
- type: Injectable,
3285
- args: [{
3286
- providedIn: 'root',
3287
- }]
3288
- }] });
3289
-
3290
- class LazyLoadService {
3291
- constructor(resourceWaitService) {
3292
- this.resourceWaitService = resourceWaitService;
3293
- this.loaded = new Map();
3294
- }
3295
- load(strategy, retryTimes, retryDelay) {
3296
- if (this.loaded.has(strategy.path))
3297
- return of(new CustomEvent('load'));
3298
- this.resourceWaitService.addResource(strategy.path);
3299
- const delayOperator = retryDelay ? pipe(delay(retryDelay)) : pipe();
3300
- const takeOp = retryTimes ? pipe(take(retryTimes)) : pipe();
3301
- return strategy.createStream().pipe(retryWhen(error$ => concat(error$.pipe(delayOperator, takeOp), throwError(() => new CustomEvent('error')))), tap(() => {
3302
- this.loaded.set(strategy.path, strategy.element);
3303
- this.resourceWaitService.deleteResource(strategy.path);
3304
- }), delay(100), shareReplay({ bufferSize: 1, refCount: true }));
3305
- }
3306
- remove(path) {
3307
- var _a;
3308
- const element = this.loaded.get(path);
3309
- if (!element)
3310
- return false;
3311
- (_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
3312
- this.loaded.delete(path);
3313
- return true;
3314
- }
3315
- }
3316
- LazyLoadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LazyLoadService, deps: [{ token: ResourceWaitService }], target: i0.ɵɵFactoryTarget.Injectable });
3317
- LazyLoadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LazyLoadService, providedIn: 'root' });
3318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LazyLoadService, decorators: [{
3319
- type: Injectable,
3320
- args: [{
3321
- providedIn: 'root',
3322
- }]
3323
- }], ctorParameters: function () { return [{ type: ResourceWaitService }]; } });
3324
-
3325
- class ListService {
3326
- constructor(injector) {
3327
- this._filter = '';
3328
- this._maxResultCount = 10;
3329
- this._skipCount = 0;
3330
- this._page = 0;
3331
- this._sortKey = '';
3332
- this._sortOrder = '';
3333
- this._query$ = new ReplaySubject(1);
3334
- this._isLoading$ = new BehaviorSubject(false);
3335
- this.destroy$ = new Subject();
3336
- this.get = () => {
3337
- this.resetPageWhenUnchanged();
3338
- this.next();
3339
- };
3340
- this.getWithoutPageReset = () => {
3341
- this.next();
3342
- };
3343
- const delay = injector.get(LIST_QUERY_DEBOUNCE_TIME, 300);
3344
- this.delay = delay ? debounceTime(delay) : tap();
3345
- this.get();
3346
- }
3347
- set filter(value) {
3348
- this._filter = value;
3349
- this.get();
3350
- }
3351
- get filter() {
3352
- return this._filter;
3353
- }
3354
- set maxResultCount(value) {
3355
- this._maxResultCount = value;
3356
- this.get();
3357
- }
3358
- get maxResultCount() {
3359
- return this._maxResultCount;
3360
- }
3361
- set page(value) {
3362
- if (value === this._page)
3363
- return;
3364
- this._page = value;
3365
- this.get();
3366
- }
3367
- get page() {
3368
- return this._page;
3369
- }
3370
- set sortKey(value) {
3371
- this._sortKey = value;
3372
- this.get();
3373
- }
3374
- get sortKey() {
3375
- return this._sortKey;
3376
- }
3377
- set sortOrder(value) {
3378
- this._sortOrder = value;
3379
- this.get();
3380
- }
3381
- get sortOrder() {
3382
- return this._sortOrder;
3383
- }
3384
- get query$() {
3385
- return this._query$
3386
- .asObservable()
3387
- .pipe(this.delay, shareReplay({ bufferSize: 1, refCount: true }));
3388
- }
3389
- get isLoading$() {
3390
- return this._isLoading$.asObservable();
3391
- }
3392
- hookToQuery(streamCreatorCallback) {
3393
- return this.query$.pipe(tap(() => this._isLoading$.next(true)), switchMap(query => streamCreatorCallback(query).pipe(catchError(() => of(null)))), filter(Boolean), tap(() => this._isLoading$.next(false)), shareReplay({ bufferSize: 1, refCount: true }), takeUntil(this.destroy$));
3394
- }
3395
- ngOnDestroy() {
3396
- this.destroy$.next();
3397
- }
3398
- resetPageWhenUnchanged() {
3399
- const skipCount = this._page * this._maxResultCount;
3400
- if (skipCount === this._skipCount) {
3401
- this._page = 0;
3402
- this._skipCount = 0;
3403
- }
3404
- else
3405
- this._skipCount = skipCount;
3406
- }
3407
- next() {
3408
- this._query$.next({
3409
- filter: this._filter || undefined,
3410
- maxResultCount: this._maxResultCount,
3411
- skipCount: this._page * this._maxResultCount,
3412
- sorting: this._sortOrder ? `${this._sortKey} ${this._sortOrder}` : undefined,
3413
- });
3414
- }
3415
- }
3416
- ListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
3417
- ListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListService });
3418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListService, decorators: [{
3419
- type: Injectable
3420
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
3421
-
3422
- class RouterWaitService {
3423
- constructor(routerEvents, injector) {
3424
- this.routerEvents = routerEvents;
3425
- this.store = new InternalStore({ loading: false });
3426
- this.destroy$ = new Subject();
3427
- this.delay = injector.get(LOADER_DELAY, 500);
3428
- this.updateLoadingStatusOnNavigationEvents();
3429
- }
3430
- updateLoadingStatusOnNavigationEvents() {
3431
- this.routerEvents
3432
- .getAllNavigationEvents()
3433
- .pipe(map(event => event instanceof NavigationStart), switchMap(condition => condition
3434
- ? this.delay === 0
3435
- ? of(true)
3436
- : timer(this.delay || 0).pipe(mapTo(true), takeUntil(this.destroy$))
3437
- : of(false)), tap(() => this.destroy$.next()))
3438
- .subscribe(status => {
3439
- this.setLoading(status);
3440
- });
3441
- }
3442
- getLoading() {
3443
- return this.store.state.loading;
3444
- }
3445
- getLoading$() {
3446
- return this.store.sliceState(({ loading }) => loading);
3447
- }
3448
- updateLoading$() {
3449
- return this.store.sliceUpdate(({ loading }) => loading);
3450
- }
3451
- setLoading(loading) {
3452
- this.store.patch({ loading });
3453
- }
3454
- }
3455
- RouterWaitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterWaitService, deps: [{ token: RouterEvents }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
3456
- RouterWaitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterWaitService, providedIn: 'root' });
3457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RouterWaitService, decorators: [{
3458
- type: Injectable,
3459
- args: [{
3460
- providedIn: 'root',
3461
- }]
3462
- }], ctorParameters: function () { return [{ type: RouterEvents }, { type: i0.Injector }]; } });
3463
-
3464
- const trackBy = (key) => (_, item) => item[key];
3465
- const trackByDeep = (
3466
- // eslint-disable-next-line @typescript-eslint/ban-types
3467
- ...keys) => (_, item) => keys.reduce((acc, key) => acc[key], item);
3468
- class TrackByService {
3469
- constructor() {
3470
- this.by = trackBy;
3471
- this.byDeep = trackByDeep;
3472
- }
3473
- }
3474
- TrackByService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TrackByService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3475
- TrackByService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TrackByService, providedIn: 'root' });
3476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TrackByService, decorators: [{
3477
- type: Injectable,
3478
- args: [{
3479
- providedIn: 'root',
3480
- }]
3481
- }] });
3482
-
3483
- class ShortDateTimePipe extends DatePipe {
3484
- constructor(configStateService, locale, defaultTimezone) {
3485
- super(locale, defaultTimezone);
3486
- this.configStateService = configStateService;
3487
- }
3488
- transform(value, timezone, locale) {
3489
- const format = getShortDateShortTimeFormat(this.configStateService);
3490
- return super.transform(value, format, timezone, locale);
3491
- }
3492
- }
3493
- ShortDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShortDateTimePipe, deps: [{ token: ConfigStateService }, { token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
3494
- ShortDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ShortDateTimePipe, name: "shortDateTime" });
3495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShortDateTimePipe, decorators: [{
3496
- type: Pipe,
3497
- args: [{
3498
- name: 'shortDateTime',
3499
- pure: true,
3500
- }]
3501
- }], ctorParameters: function () {
3502
- return [{ type: ConfigStateService }, { type: undefined, decorators: [{
3503
- type: Inject,
3504
- args: [LOCALE_ID]
3505
- }] }, { type: undefined, decorators: [{
3506
- type: Inject,
3507
- args: [DATE_PIPE_DEFAULT_TIMEZONE]
3508
- }, {
3509
- type: Optional
3510
- }] }];
3511
- } });
3512
-
3513
- class ShortTimePipe extends DatePipe {
3514
- constructor(configStateService, locale, defaultTimezone) {
3515
- super(locale, defaultTimezone);
3516
- this.configStateService = configStateService;
3517
- }
3518
- transform(value, timezone, locale) {
3519
- const format = getShortTimeFormat(this.configStateService);
3520
- return super.transform(value, format, timezone, locale);
3521
- }
3522
- }
3523
- ShortTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShortTimePipe, deps: [{ token: ConfigStateService }, { token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
3524
- ShortTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ShortTimePipe, name: "shortTime" });
3525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShortTimePipe, decorators: [{
3526
- type: Pipe,
3527
- args: [{
3528
- name: 'shortTime',
3529
- pure: true,
3530
- }]
3531
- }], ctorParameters: function () {
3532
- return [{ type: ConfigStateService }, { type: undefined, decorators: [{
3533
- type: Inject,
3534
- args: [LOCALE_ID]
3535
- }] }, { type: undefined, decorators: [{
3536
- type: Inject,
3537
- args: [DATE_PIPE_DEFAULT_TIMEZONE]
3538
- }, {
3539
- type: Optional
3540
- }] }];
3541
- } });
3542
-
3543
- class ShortDatePipe extends DatePipe {
3544
- constructor(configStateService, locale, defaultTimezone) {
3545
- super(locale, defaultTimezone);
3546
- this.configStateService = configStateService;
3547
- }
3548
- transform(value, timezone, locale) {
3549
- const format = getShortDateFormat(this.configStateService);
3550
- return super.transform(value, format, timezone, locale);
3551
- }
3552
- }
3553
- ShortDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShortDatePipe, deps: [{ token: ConfigStateService }, { token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
3554
- ShortDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ShortDatePipe, name: "shortDate" });
3555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ShortDatePipe, decorators: [{
3556
- type: Pipe,
3557
- args: [{
3558
- name: 'shortDate',
3559
- pure: true,
3560
- }]
3561
- }], ctorParameters: function () {
3562
- return [{ type: ConfigStateService }, { type: undefined, decorators: [{
3563
- type: Inject,
3564
- args: [LOCALE_ID]
3565
- }] }, { type: undefined, decorators: [{
3566
- type: Inject,
3567
- args: [DATE_PIPE_DEFAULT_TIMEZONE]
3568
- }, {
3569
- type: Optional
3570
- }] }];
3571
- } });
3572
-
3573
- class SafeHtmlPipe {
3574
- constructor() {
3575
- this.sanitizer = inject(DomSanitizer);
3576
- }
3577
- transform(value) {
3578
- if (typeof value !== 'string')
3579
- return '';
3580
- return this.sanitizer.sanitize(SecurityContext.HTML, value);
3581
- }
3582
- }
3583
- SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3584
- SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, name: "abpSafeHtml" });
3585
- SafeHtmlPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe });
3586
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, decorators: [{
3587
- type: Injectable
3588
- }, {
3589
- type: Pipe,
3590
- args: [{ name: 'abpSafeHtml' }]
3591
- }] });
3592
-
3593
- const IncludeLocalizationResourcesProvider = {
3594
- provide: INCUDE_LOCALIZATION_RESOURCES_TOKEN,
3595
- useValue: false,
3596
- };
3597
-
3598
- /**
3599
- * BaseCoreModule is the module that holds
3600
- * all imports, declarations, exports, and entryComponents
3601
- * but not the providers.
3602
- * This module will be imported and exported by all others.
3603
- */
3604
- class BaseCoreModule {
3605
- }
3606
- BaseCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3607
- BaseCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: BaseCoreModule, declarations: [AbstractNgModelComponent,
3608
- AutofocusDirective,
3609
- DynamicLayoutComponent,
3610
- ForDirective,
3611
- FormSubmitDirective,
3612
- InitDirective,
3613
- InputEventDebounceDirective,
3614
- PermissionDirective,
3615
- ReplaceableRouteContainerComponent,
3616
- ReplaceableTemplateDirective,
3617
- RouterOutletComponent,
3618
- SortPipe,
3619
- SafeHtmlPipe,
3620
- StopPropagationDirective,
3621
- ToInjectorPipe,
3622
- ShortDateTimePipe,
3623
- ShortTimePipe,
3624
- ShortDatePipe], imports: [CommonModule,
3625
- HttpClientModule,
3626
- FormsModule,
3627
- ReactiveFormsModule,
3628
- RouterModule,
3629
- LocalizationModule], exports: [CommonModule,
3630
- HttpClientModule,
3631
- FormsModule,
3632
- ReactiveFormsModule,
3633
- RouterModule,
3634
- LocalizationModule,
3635
- AbstractNgModelComponent,
3636
- AutofocusDirective,
3637
- DynamicLayoutComponent,
3638
- ForDirective,
3639
- FormSubmitDirective,
3640
- InitDirective,
3641
- InputEventDebounceDirective,
3642
- PermissionDirective,
3643
- ReplaceableRouteContainerComponent,
3644
- ReplaceableTemplateDirective,
3645
- RouterOutletComponent,
3646
- SortPipe,
3647
- SafeHtmlPipe,
3648
- StopPropagationDirective,
3649
- ToInjectorPipe,
3650
- ShortDateTimePipe,
3651
- ShortTimePipe,
3652
- ShortDatePipe] });
3653
- BaseCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseCoreModule, providers: [LocalizationPipe], imports: [CommonModule,
3654
- HttpClientModule,
3655
- FormsModule,
3656
- ReactiveFormsModule,
3657
- RouterModule,
3658
- LocalizationModule, CommonModule,
3659
- HttpClientModule,
3660
- FormsModule,
3661
- ReactiveFormsModule,
3662
- RouterModule,
3663
- LocalizationModule] });
3664
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseCoreModule, decorators: [{
3665
- type: NgModule,
3666
- args: [{
3667
- exports: [
3668
- CommonModule,
3669
- HttpClientModule,
3670
- FormsModule,
3671
- ReactiveFormsModule,
3672
- RouterModule,
3673
- LocalizationModule,
3674
- AbstractNgModelComponent,
3675
- AutofocusDirective,
3676
- DynamicLayoutComponent,
3677
- ForDirective,
3678
- FormSubmitDirective,
3679
- InitDirective,
3680
- InputEventDebounceDirective,
3681
- PermissionDirective,
3682
- ReplaceableRouteContainerComponent,
3683
- ReplaceableTemplateDirective,
3684
- RouterOutletComponent,
3685
- SortPipe,
3686
- SafeHtmlPipe,
3687
- StopPropagationDirective,
3688
- ToInjectorPipe,
3689
- ShortDateTimePipe,
3690
- ShortTimePipe,
3691
- ShortDatePipe,
3692
- ],
3693
- imports: [
3694
- CommonModule,
3695
- HttpClientModule,
3696
- FormsModule,
3697
- ReactiveFormsModule,
3698
- RouterModule,
3699
- LocalizationModule,
3700
- ],
3701
- declarations: [
3702
- AbstractNgModelComponent,
3703
- AutofocusDirective,
3704
- DynamicLayoutComponent,
3705
- ForDirective,
3706
- FormSubmitDirective,
3707
- InitDirective,
3708
- InputEventDebounceDirective,
3709
- PermissionDirective,
3710
- ReplaceableRouteContainerComponent,
3711
- ReplaceableTemplateDirective,
3712
- RouterOutletComponent,
3713
- SortPipe,
3714
- SafeHtmlPipe,
3715
- StopPropagationDirective,
3716
- ToInjectorPipe,
3717
- ShortDateTimePipe,
3718
- ShortTimePipe,
3719
- ShortDatePipe,
3720
- ],
3721
- providers: [LocalizationPipe],
3722
- }]
3723
- }] });
3724
- /**
3725
- * RootCoreModule is the module that will be used at root level
3726
- * and it introduces imports useful at root level (e.g. NGXS)
3727
- */
3728
- class RootCoreModule {
3729
- }
3730
- RootCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RootCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3731
- RootCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: RootCoreModule, imports: [BaseCoreModule, LocalizationModule, i1.HttpClientXsrfModule], exports: [BaseCoreModule, LocalizationModule] });
3732
- RootCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RootCoreModule, imports: [BaseCoreModule,
3733
- LocalizationModule,
3734
- HttpClientXsrfModule.withOptions({
3735
- cookieName: 'XSRF-TOKEN',
3736
- headerName: 'RequestVerificationToken',
3737
- }), BaseCoreModule, LocalizationModule] });
3738
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RootCoreModule, decorators: [{
3739
- type: NgModule,
3740
- args: [{
3741
- exports: [BaseCoreModule, LocalizationModule],
3742
- imports: [
3743
- BaseCoreModule,
3744
- LocalizationModule,
3745
- HttpClientXsrfModule.withOptions({
3746
- cookieName: 'XSRF-TOKEN',
3747
- headerName: 'RequestVerificationToken',
3748
- }),
3749
- ],
3750
- }]
3751
- }] });
3752
- /**
3753
- * CoreModule is the module that is publicly available
3754
- */
3755
- class CoreModule {
3756
- static forRoot(options = {}) {
3757
- return {
3758
- ngModule: RootCoreModule,
3759
- providers: [
3760
- LocaleProvider,
3761
- CookieLanguageProvider,
3762
- {
3763
- provide: 'CORE_OPTIONS',
3764
- useValue: options,
3765
- },
3766
- {
3767
- provide: CORE_OPTIONS,
3768
- useFactory: coreOptionsFactory,
3769
- deps: ['CORE_OPTIONS'],
3770
- },
3771
- {
3772
- provide: APP_INITIALIZER,
3773
- multi: true,
3774
- deps: [Injector],
3775
- useFactory: getInitialData,
3776
- },
3777
- {
3778
- provide: APP_INITIALIZER,
3779
- multi: true,
3780
- deps: [Injector],
3781
- useFactory: localeInitializer,
3782
- },
3783
- {
3784
- provide: APP_INITIALIZER,
3785
- multi: true,
3786
- deps: [LocalizationService],
3787
- useFactory: noop,
3788
- },
3789
- {
3790
- provide: APP_INITIALIZER,
3791
- multi: true,
3792
- deps: [RoutesHandler],
3793
- useFactory: noop,
3794
- },
3795
- { provide: TENANT_KEY, useValue: options.tenantKey || '__tenant' },
3796
- {
3797
- provide: LOCALIZATIONS,
3798
- multi: true,
3799
- useValue: localizationContributor(options.localizations),
3800
- deps: [LocalizationService],
3801
- },
3802
- {
3803
- provide: QUEUE_MANAGER,
3804
- useClass: DefaultQueueManager,
3805
- },
3806
- {
3807
- provide: OTHERS_GROUP,
3808
- useValue: options.othersGroup || 'AbpUi::OthersGroup',
3809
- },
3810
- IncludeLocalizationResourcesProvider,
3811
- ],
3812
- };
3813
- }
3814
- static forChild(options = {}) {
3815
- return {
3816
- ngModule: RootCoreModule,
3817
- providers: [
3818
- {
3819
- provide: LOCALIZATIONS,
3820
- multi: true,
3821
- useValue: localizationContributor(options.localizations),
3822
- deps: [LocalizationService],
3823
- },
3824
- ],
3825
- };
3826
- }
3827
- }
3828
- CoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3829
- CoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: CoreModule, imports: [BaseCoreModule], exports: [BaseCoreModule] });
3830
- CoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CoreModule, imports: [BaseCoreModule, BaseCoreModule] });
3831
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CoreModule, decorators: [{
3832
- type: NgModule,
3833
- args: [{
3834
- exports: [BaseCoreModule],
3835
- imports: [BaseCoreModule],
3836
- }]
3837
- }] });
3838
-
3839
- class PermissionGuard {
3840
- constructor(router, routesService, permissionService, httpErrorReporter) {
3841
- this.router = router;
3842
- this.routesService = routesService;
3843
- this.permissionService = permissionService;
3844
- this.httpErrorReporter = httpErrorReporter;
3845
- }
3846
- canActivate(route, state) {
3847
- let { requiredPolicy } = route.data || {};
3848
- if (!requiredPolicy) {
3849
- const routeFound = findRoute(this.routesService, getRoutePath(this.router, state.url));
3850
- requiredPolicy = routeFound === null || routeFound === void 0 ? void 0 : routeFound.requiredPolicy;
3851
- }
3852
- if (!requiredPolicy)
3853
- return of(true);
3854
- return this.permissionService.getGrantedPolicy$(requiredPolicy).pipe(tap(access => {
3855
- if (!access) {
3856
- this.httpErrorReporter.reportError({ status: 403 });
3857
- }
3858
- }));
3859
- }
3860
- }
3861
- PermissionGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionGuard, deps: [{ token: i1$1.Router }, { token: RoutesService }, { token: PermissionService }, { token: HttpErrorReporterService }], target: i0.ɵɵFactoryTarget.Injectable });
3862
- PermissionGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionGuard, providedIn: 'root' });
3863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PermissionGuard, decorators: [{
3864
- type: Injectable,
3865
- args: [{
3866
- providedIn: 'root',
3867
- }]
3868
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: RoutesService }, { type: PermissionService }, { type: HttpErrorReporterService }]; } });
3869
-
3870
- class ListResultDto {
3871
- constructor(initialValues = {}) {
3872
- for (const key in initialValues) {
3873
- if (checkHasProp(initialValues, key)) {
3874
- this[key] = initialValues[key];
3875
- }
3876
- }
3877
- }
3878
- }
3879
- class PagedResultDto extends ListResultDto {
3880
- constructor(initialValues = {}) {
3881
- super(initialValues);
3882
- }
3883
- }
3884
- class ExtensibleObject {
3885
- constructor(initialValues = {}) {
3886
- for (const key in initialValues) {
3887
- if (checkHasProp(initialValues, key) && initialValues[key] !== undefined) {
3888
- this[key] = initialValues[key];
3889
- }
3890
- }
3891
- }
3892
- }
3893
- class ExtensibleEntityDto extends ExtensibleObject {
3894
- constructor(initialValues = {}) {
3895
- super(initialValues);
3896
- }
3897
- }
3898
- class LimitedResultRequestDto {
3899
- constructor(initialValues = {}) {
3900
- this.maxResultCount = 10;
3901
- for (const key in initialValues) {
3902
- if (checkHasProp(initialValues, key) && initialValues[key] !== undefined) {
3903
- this[key] = initialValues[key];
3904
- }
3905
- }
3906
- }
3907
- }
3908
- class ExtensibleLimitedResultRequestDto extends ExtensibleEntityDto {
3909
- constructor(initialValues = {}) {
3910
- super(initialValues);
3911
- this.maxResultCount = 10;
3912
- }
3913
- }
3914
- class PagedResultRequestDto extends LimitedResultRequestDto {
3915
- constructor(initialValues = {}) {
3916
- super(initialValues);
3917
- }
3918
- }
3919
- class ExtensiblePagedResultRequestDto extends ExtensibleLimitedResultRequestDto {
3920
- constructor(initialValues = {}) {
3921
- super(initialValues);
3922
- }
3923
- }
3924
- class PagedAndSortedResultRequestDto extends PagedResultRequestDto {
3925
- constructor(initialValues = {}) {
3926
- super(initialValues);
3927
- }
3928
- }
3929
- class ExtensiblePagedAndSortedResultRequestDto extends ExtensiblePagedResultRequestDto {
3930
- constructor(initialValues = {}) {
3931
- super(initialValues);
3932
- }
3933
- }
3934
- class EntityDto {
3935
- constructor(initialValues = {}) {
3936
- for (const key in initialValues) {
3937
- if (checkHasProp(initialValues, key)) {
3938
- this[key] = initialValues[key];
3939
- }
3940
- }
3941
- }
3942
- }
3943
- class CreationAuditedEntityDto extends EntityDto {
3944
- constructor(initialValues = {}) {
3945
- super(initialValues);
3946
- }
3947
- }
3948
- class CreationAuditedEntityWithUserDto extends CreationAuditedEntityDto {
3949
- constructor(initialValues = {}) {
3950
- super(initialValues);
3951
- }
3952
- }
3953
- class AuditedEntityDto extends CreationAuditedEntityDto {
3954
- constructor(initialValues = {}) {
3955
- super(initialValues);
3956
- }
3957
- }
3958
- class AuditedEntityWithUserDto extends AuditedEntityDto {
3959
- constructor(initialValues = {}) {
3960
- super(initialValues);
3961
- }
3962
- }
3963
- class FullAuditedEntityDto extends AuditedEntityDto {
3964
- constructor(initialValues = {}) {
3965
- super(initialValues);
3966
- }
3967
- }
3968
- class FullAuditedEntityWithUserDto extends FullAuditedEntityDto {
3969
- constructor(initialValues = {}) {
3970
- super(initialValues);
3971
- }
3972
- }
3973
- class ExtensibleCreationAuditedEntityDto extends ExtensibleEntityDto {
3974
- constructor(initialValues = {}) {
3975
- super(initialValues);
3976
- }
3977
- }
3978
- class ExtensibleAuditedEntityDto extends ExtensibleCreationAuditedEntityDto {
3979
- constructor(initialValues = {}) {
3980
- super(initialValues);
3981
- }
3982
- }
3983
- class ExtensibleAuditedEntityWithUserDto extends ExtensibleAuditedEntityDto {
3984
- constructor(initialValues = {}) {
3985
- super(initialValues);
3986
- }
3987
- }
3988
- class ExtensibleCreationAuditedEntityWithUserDto extends ExtensibleCreationAuditedEntityDto {
3989
- constructor(initialValues = {}) {
3990
- super(initialValues);
3991
- }
3992
- }
3993
- class ExtensibleFullAuditedEntityDto extends ExtensibleAuditedEntityDto {
3994
- constructor(initialValues = {}) {
3995
- super(initialValues);
3996
- }
3997
- }
3998
- class ExtensibleFullAuditedEntityWithUserDto extends ExtensibleFullAuditedEntityDto {
3999
- constructor(initialValues = {}) {
4000
- super(initialValues);
4001
- }
4002
- }
4003
-
4004
- class AbpApiDefinitionService {
4005
- constructor(restService) {
4006
- this.restService = restService;
4007
- this.apiName = 'abp';
4008
- this.getByModel = (model) => this.restService.request({
4009
- method: 'GET',
4010
- url: '/api/abp/api-definition',
4011
- params: { includeTypes: model.includeTypes },
4012
- }, { apiName: this.apiName });
4013
- }
4014
- }
4015
- AbpApiDefinitionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApiDefinitionService, deps: [{ token: RestService }], target: i0.ɵɵFactoryTarget.Injectable });
4016
- AbpApiDefinitionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApiDefinitionService, providedIn: 'root' });
4017
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpApiDefinitionService, decorators: [{
4018
- type: Injectable,
4019
- args: [{
4020
- providedIn: 'root',
4021
- }]
4022
- }], ctorParameters: function () { return [{ type: RestService }]; } });
4023
-
4024
- var index = /*#__PURE__*/Object.freeze({
4025
- __proto__: null
4026
- });
4027
-
4028
- class ContainerStrategy {
4029
- constructor(containerRef) {
4030
- this.containerRef = containerRef;
4031
- }
4032
- prepare() { }
4033
- }
4034
- class ClearContainerStrategy extends ContainerStrategy {
4035
- getIndex() {
4036
- return 0;
4037
- }
4038
- prepare() {
4039
- this.containerRef.clear();
4040
- }
4041
- }
4042
- class InsertIntoContainerStrategy extends ContainerStrategy {
4043
- constructor(containerRef, index) {
4044
- super(containerRef);
4045
- this.index = index;
4046
- }
4047
- getIndex() {
4048
- return Math.min(Math.max(0, this.index), this.containerRef.length);
4049
- }
4050
- }
4051
- const CONTAINER_STRATEGY = {
4052
- Clear(containerRef) {
4053
- return new ClearContainerStrategy(containerRef);
4054
- },
4055
- Append(containerRef) {
4056
- return new InsertIntoContainerStrategy(containerRef, containerRef.length);
4057
- },
4058
- Prepend(containerRef) {
4059
- return new InsertIntoContainerStrategy(containerRef, 0);
4060
- },
4061
- Insert(containerRef, index) {
4062
- return new InsertIntoContainerStrategy(containerRef, index);
4063
- },
4064
- };
4065
-
4066
- class ContentSecurityStrategy {
4067
- constructor(nonce) {
4068
- this.nonce = nonce;
4069
- }
4070
- }
4071
- class LooseContentSecurityStrategy extends ContentSecurityStrategy {
4072
- constructor(nonce) {
4073
- super(nonce);
4074
- }
4075
- applyCSP(element) {
4076
- if (this.nonce) {
4077
- element.setAttribute('nonce', this.nonce);
4078
- }
4079
- }
4080
- }
4081
- class NoContentSecurityStrategy extends ContentSecurityStrategy {
4082
- constructor() {
4083
- super();
4084
- }
4085
- applyCSP(_) { }
4086
- }
4087
- const CONTENT_SECURITY_STRATEGY = {
4088
- Loose(nonce) {
4089
- return new LooseContentSecurityStrategy(nonce);
4090
- },
4091
- None() {
4092
- return new NoContentSecurityStrategy();
4093
- },
4094
- };
4095
-
4096
- class ContentStrategy {
4097
- constructor(content, domStrategy = DOM_STRATEGY.AppendToHead(), contentSecurityStrategy = CONTENT_SECURITY_STRATEGY.None(), options = {}) {
4098
- this.content = content;
4099
- this.domStrategy = domStrategy;
4100
- this.contentSecurityStrategy = contentSecurityStrategy;
4101
- this.options = options;
4102
- }
4103
- insertElement() {
4104
- const element = this.createElement();
4105
- if (this.options && Object.keys(this.options).length > 0) {
4106
- Object.keys(this.options).forEach(key => {
4107
- if (this.options[key]) {
4108
- element[key] = this.options[key];
4109
- }
4110
- });
4111
- }
4112
- this.contentSecurityStrategy.applyCSP(element);
4113
- this.domStrategy.insertElement(element);
4114
- return element;
4115
- }
4116
- }
4117
- class StyleContentStrategy extends ContentStrategy {
4118
- createElement() {
4119
- const element = document.createElement('style');
4120
- element.textContent = this.content;
4121
- return element;
4122
- }
4123
- }
4124
- class ScriptContentStrategy extends ContentStrategy {
4125
- createElement() {
4126
- const element = document.createElement('script');
4127
- element.textContent = this.content;
4128
- return element;
4129
- }
4130
- }
4131
- const CONTENT_STRATEGY = {
4132
- AppendScriptToBody(content, options) {
4133
- return new ScriptContentStrategy(content, DOM_STRATEGY.AppendToBody(), undefined, options);
4134
- },
4135
- AppendScriptToHead(content, options) {
4136
- return new ScriptContentStrategy(content, DOM_STRATEGY.AppendToHead(), undefined, options);
4137
- },
4138
- AppendStyleToHead(content, options) {
4139
- return new StyleContentStrategy(content, DOM_STRATEGY.AppendToHead(), undefined, options);
4140
- },
4141
- PrependStyleToHead(content, options) {
4142
- return new StyleContentStrategy(content, DOM_STRATEGY.PrependToHead(), undefined, options);
4143
- },
4144
- };
4145
-
4146
- class ContextStrategy {
4147
- constructor(context) {
4148
- this.context = context;
4149
- }
4150
- setContext(componentRef) {
4151
- return this.context;
4152
- }
4153
- }
4154
- class NoContextStrategy extends ContextStrategy {
4155
- constructor() {
4156
- super(undefined);
4157
- }
4158
- }
4159
- class ComponentContextStrategy extends ContextStrategy {
4160
- setContext(componentRef) {
4161
- Object.keys(this.context).forEach(key => (componentRef.instance[key] = this.context[key]));
4162
- componentRef.changeDetectorRef.detectChanges();
4163
- return this.context;
4164
- }
4165
- }
4166
- class TemplateContextStrategy extends ContextStrategy {
4167
- setContext() {
4168
- return this.context;
4169
- }
4170
- }
4171
- const CONTEXT_STRATEGY = {
4172
- None() {
4173
- return new NoContextStrategy();
4174
- },
4175
- Component(context) {
4176
- return new ComponentContextStrategy(context);
4177
- },
4178
- Template(context) {
4179
- return new TemplateContextStrategy(context);
4180
- },
4181
- };
4182
-
4183
- class LoadingStrategy {
4184
- constructor(path, domStrategy = DOM_STRATEGY.AppendToHead(), crossOriginStrategy = CROSS_ORIGIN_STRATEGY.Anonymous()) {
4185
- this.path = path;
4186
- this.domStrategy = domStrategy;
4187
- this.crossOriginStrategy = crossOriginStrategy;
4188
- }
4189
- createStream() {
4190
- this.element = this.createElement();
4191
- return of(null).pipe(switchMap(() => fromLazyLoad(this.element, this.domStrategy, this.crossOriginStrategy)));
4192
- }
4193
- }
4194
- class ScriptLoadingStrategy extends LoadingStrategy {
4195
- constructor(src, domStrategy, crossOriginStrategy) {
4196
- super(src, domStrategy, crossOriginStrategy);
4197
- }
4198
- createElement() {
4199
- const element = document.createElement('script');
4200
- element.src = this.path;
4201
- return element;
4202
- }
4203
- }
4204
- class StyleLoadingStrategy extends LoadingStrategy {
4205
- constructor(href, domStrategy, crossOriginStrategy) {
4206
- super(href, domStrategy, crossOriginStrategy);
4207
- }
4208
- createElement() {
4209
- const element = document.createElement('link');
4210
- element.rel = 'stylesheet';
4211
- element.href = this.path;
4212
- return element;
4213
- }
4214
- }
4215
- const LOADING_STRATEGY = {
4216
- AppendScriptToBody(src) {
4217
- return new ScriptLoadingStrategy(src, DOM_STRATEGY.AppendToBody(), CROSS_ORIGIN_STRATEGY.None());
4218
- },
4219
- AppendAnonymousScriptToBody(src, integrity) {
4220
- return new ScriptLoadingStrategy(src, DOM_STRATEGY.AppendToBody(), CROSS_ORIGIN_STRATEGY.Anonymous(integrity));
4221
- },
4222
- AppendAnonymousScriptToHead(src, integrity) {
4223
- return new ScriptLoadingStrategy(src, DOM_STRATEGY.AppendToHead(), CROSS_ORIGIN_STRATEGY.Anonymous(integrity));
4224
- },
4225
- AppendAnonymousStyleToHead(src, integrity) {
4226
- return new StyleLoadingStrategy(src, DOM_STRATEGY.AppendToHead(), CROSS_ORIGIN_STRATEGY.Anonymous(integrity));
4227
- },
4228
- PrependAnonymousScriptToHead(src, integrity) {
4229
- return new ScriptLoadingStrategy(src, DOM_STRATEGY.PrependToHead(), CROSS_ORIGIN_STRATEGY.Anonymous(integrity));
4230
- },
4231
- PrependAnonymousStyleToHead(src, integrity) {
4232
- return new StyleLoadingStrategy(src, DOM_STRATEGY.PrependToHead(), CROSS_ORIGIN_STRATEGY.Anonymous(integrity));
4233
- },
4234
- };
4235
-
4236
- class ProjectionStrategy {
4237
- constructor(content) {
4238
- this.content = content;
4239
- }
4240
- }
4241
- class ComponentProjectionStrategy extends ProjectionStrategy {
4242
- constructor(component, containerStrategy, contextStrategy = CONTEXT_STRATEGY.None()) {
4243
- super(component);
4244
- this.containerStrategy = containerStrategy;
4245
- this.contextStrategy = contextStrategy;
4246
- }
4247
- injectContent(injector) {
4248
- this.containerStrategy.prepare();
4249
- const resolver = injector.get(ComponentFactoryResolver);
4250
- const factory = resolver.resolveComponentFactory(this.content);
4251
- const componentRef = this.containerStrategy.containerRef.createComponent(factory, this.containerStrategy.getIndex(), injector);
4252
- this.contextStrategy.setContext(componentRef);
4253
- return componentRef;
4254
- }
4255
- }
4256
- class RootComponentProjectionStrategy extends ProjectionStrategy {
4257
- constructor(component, contextStrategy = CONTEXT_STRATEGY.None(), domStrategy = DOM_STRATEGY.AppendToBody()) {
4258
- super(component);
4259
- this.contextStrategy = contextStrategy;
4260
- this.domStrategy = domStrategy;
4261
- }
4262
- injectContent(injector) {
4263
- const appRef = injector.get(ApplicationRef);
4264
- const resolver = injector.get(ComponentFactoryResolver);
4265
- const componentRef = resolver
4266
- .resolveComponentFactory(this.content)
4267
- .create(injector);
4268
- this.contextStrategy.setContext(componentRef);
4269
- appRef.attachView(componentRef.hostView);
4270
- const element = componentRef.hostView.rootNodes[0];
4271
- this.domStrategy.insertElement(element);
4272
- return componentRef;
4273
- }
4274
- }
4275
- class TemplateProjectionStrategy extends ProjectionStrategy {
4276
- constructor(templateRef, containerStrategy, contextStrategy = CONTEXT_STRATEGY.None()) {
4277
- super(templateRef);
4278
- this.containerStrategy = containerStrategy;
4279
- this.contextStrategy = contextStrategy;
4280
- }
4281
- injectContent() {
4282
- this.containerStrategy.prepare();
4283
- const embeddedViewRef = this.containerStrategy.containerRef.createEmbeddedView(this.content, this.contextStrategy.context, this.containerStrategy.getIndex());
4284
- embeddedViewRef.detectChanges();
4285
- return embeddedViewRef;
4286
- }
4287
- }
4288
- const PROJECTION_STRATEGY = {
4289
- AppendComponentToBody(component, context) {
4290
- return new RootComponentProjectionStrategy(component, context && CONTEXT_STRATEGY.Component(context));
4291
- },
4292
- AppendComponentToContainer(component, containerRef, context) {
4293
- return new ComponentProjectionStrategy(component, CONTAINER_STRATEGY.Append(containerRef), context && CONTEXT_STRATEGY.Component(context));
4294
- },
4295
- AppendTemplateToContainer(templateRef, containerRef, context) {
4296
- return new TemplateProjectionStrategy(templateRef, CONTAINER_STRATEGY.Append(containerRef), context && CONTEXT_STRATEGY.Template(context));
4297
- },
4298
- PrependComponentToContainer(component, containerRef, context) {
4299
- return new ComponentProjectionStrategy(component, CONTAINER_STRATEGY.Prepend(containerRef), context && CONTEXT_STRATEGY.Component(context));
4300
- },
4301
- PrependTemplateToContainer(templateRef, containerRef, context) {
4302
- return new TemplateProjectionStrategy(templateRef, CONTAINER_STRATEGY.Prepend(containerRef), context && CONTEXT_STRATEGY.Template(context));
4303
- },
4304
- ProjectComponentToContainer(component, containerRef, context) {
4305
- return new ComponentProjectionStrategy(component, CONTAINER_STRATEGY.Clear(containerRef), context && CONTEXT_STRATEGY.Component(context));
4306
- },
4307
- ProjectTemplateToContainer(templateRef, containerRef, context) {
4308
- return new TemplateProjectionStrategy(templateRef, CONTAINER_STRATEGY.Clear(containerRef), context && CONTEXT_STRATEGY.Template(context));
4309
- },
4310
- };
4311
-
4312
- function validateMinAge({ age = 18 } = {}) {
4313
- return (control) => {
4314
- if (['', null, undefined].indexOf(control.value) > -1)
4315
- return null;
4316
- return isValidMinAge(control.value, age) ? null : { minAge: { age } };
4317
- };
4318
- }
4319
- function isValidMinAge(value, minAge) {
4320
- const date = new Date();
4321
- date.setFullYear(date.getFullYear() - minAge);
4322
- date.setHours(23, 59, 59, 999);
4323
- return Number(new Date(value)) <= date.valueOf();
4324
- }
4325
-
4326
- function validateCreditCard() {
4327
- return (control) => {
4328
- if (['', null, undefined].indexOf(control.value) > -1)
4329
- return null;
4330
- return isValidCreditCard(String(control.value)) ? null : { creditCard: true };
4331
- };
4332
- }
4333
- function isValidCreditCard(value) {
4334
- value = value.replace(/[ -]/g, '');
4335
- if (!/^[0-9]{13,19}$/.test(value))
4336
- return false;
4337
- let checksum = 0;
4338
- let multiplier = 1;
4339
- for (let i = value.length; i > 0; i--) {
4340
- const digit = Number(value[i - 1]) * multiplier;
4341
- checksum += (digit % 10) + ~~(digit / 10);
4342
- multiplier = (multiplier * 2) % 3;
4343
- }
4344
- return checksum % 10 === 0;
4345
- }
4346
-
4347
- function validateRange({ maximum = Infinity, minimum = 0 } = {}) {
4348
- return (control) => {
4349
- if (['', null, undefined].indexOf(control.value) > -1)
4350
- return null;
4351
- const value = Number(control.value);
4352
- return getMinError(value, minimum, maximum) || getMaxError(value, maximum, minimum);
4353
- };
4354
- }
4355
- function getMaxError(value, max, min) {
4356
- return value > max ? { range: { max, min } } : null;
4357
- }
4358
- function getMinError(value, min, max) {
4359
- return value < min ? { range: { min, max } } : null;
4360
- }
4361
-
4362
- function validateRequired({ allowEmptyStrings } = {}) {
4363
- // note: please do not remove name of the function, it is used in function compare with type 'RequiredError'
4364
- const required = (control) => {
4365
- return isValidRequired(control.value, allowEmptyStrings) ? null : { required: true };
4366
- };
4367
- return required;
4368
- }
4369
- function isValidRequired(value, allowEmptyStrings) {
4370
- if (value || value === 0 || value === false)
4371
- return true;
4372
- if (allowEmptyStrings && value === '')
4373
- return true;
4374
- return false;
4375
- }
4376
-
4377
- function validateStringLength({ maximumLength = Infinity, minimumLength = 0, } = {}) {
4378
- return (control) => {
4379
- if (['', null, undefined].indexOf(control.value) > -1)
4380
- return null;
4381
- const value = String(control.value);
4382
- return getMinLengthError(value, minimumLength) || getMaxLengthError(value, maximumLength);
4383
- };
4384
- }
4385
- function getMaxLengthError(value, requiredLength) {
4386
- return value.length > requiredLength ? { maxlength: { requiredLength } } : null;
4387
- }
4388
- function getMinLengthError(value, requiredLength) {
4389
- return value.length < requiredLength ? { minlength: { requiredLength } } : null;
4390
- }
4391
-
4392
- function validateUrl() {
4393
- return (control) => {
4394
- if (isNullOrEmpty(control.value))
4395
- return null;
4396
- return isValidUrl(control.value) ? null : { url: true };
4397
- };
4398
- }
4399
- function isValidUrl(value) {
4400
- if (/^http(s)?:\/\/[^/]/.test(value) || /^ftp:\/\/[^/]/.test(value)) {
4401
- const a = document.createElement('a');
4402
- a.href = value;
4403
- return !!a.host;
4404
- }
4405
- return false;
4406
- }
4407
-
4408
- const onlyLetterAndNumberRegex = /^[a-zA-Z0-9]+$/;
4409
- function validateUsername({ pattern = /.*/ } = { pattern: onlyLetterAndNumberRegex }) {
4410
- return (control) => {
4411
- const isValid = isValidUserName(control.value, pattern);
4412
- return isValid ? null : { usernamePattern: { actualValue: control.value } };
4413
- };
4414
- }
4415
- function isValidUserName(value, pattern) {
4416
- if (isNullOrEmpty(value))
4417
- return true;
4418
- return pattern.test(value);
4419
- }
4420
-
4421
- const AbpValidators = {
4422
- creditCard: validateCreditCard,
4423
- emailAddress: () => Validators.email,
4424
- minAge: validateMinAge,
4425
- range: validateRange,
4426
- required: validateRequired,
4427
- stringLength: validateStringLength,
4428
- url: validateUrl,
4429
- username: validateUsername,
4430
- };
4431
-
4432
- class ApiInterceptor {
4433
- constructor(httpWaitService) {
4434
- this.httpWaitService = httpWaitService;
4435
- }
4436
- getAdditionalHeaders(existingHeaders) {
4437
- return existingHeaders || new HttpHeaders();
4438
- }
4439
- intercept(request, next) {
4440
- this.httpWaitService.addRequest(request);
4441
- return next.handle(request).pipe(finalize(() => this.httpWaitService.deleteRequest(request)));
4442
- }
4443
- }
4444
- ApiInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ApiInterceptor, deps: [{ token: HttpWaitService }], target: i0.ɵɵFactoryTarget.Injectable });
4445
- ApiInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ApiInterceptor, providedIn: 'root' });
4446
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ApiInterceptor, decorators: [{
4447
- type: Injectable,
4448
- args: [{
4449
- providedIn: 'root',
4450
- }]
4451
- }], ctorParameters: function () { return [{ type: HttpWaitService }]; } });
4452
-
4453
- // export * from './lib/handlers';
4454
-
4455
- /**
4456
- * Generated bundle index. Do not edit.
4457
- */
4458
-
4459
- export { APP_INIT_ERROR_HANDLERS, AbpApiDefinitionService, AbpApplicationConfigurationService, AbpApplicationLocalizationService, AbpLocalStorageService, AbpTenantService, AbpValidators, AbstractNavTreeService, AbstractNgModelComponent, AbstractTreeService, ApiInterceptor, AuditedEntityDto, AuditedEntityWithUserDto, AuthGuard, AuthService, AutofocusDirective, BaseCoreModule, BaseTreeNode, CHECK_AUTHENTICATION_STATE_FN_KEY, CONTAINER_STRATEGY, CONTENT_SECURITY_STRATEGY, CONTENT_STRATEGY, CONTEXT_STRATEGY, COOKIE_LANGUAGE_KEY, CORE_OPTIONS, CROSS_ORIGIN_STRATEGY, ClearContainerStrategy, ComponentContextStrategy, ComponentProjectionStrategy, ConfigStateService, ContainerStrategy, ContentProjectionService, ContentSecurityStrategy, ContentStrategy, ContextStrategy, CoreModule, CreationAuditedEntityDto, CreationAuditedEntityWithUserDto, CrossOriginStrategy, DOM_STRATEGY, DefaultQueueManager, DomInsertionService, DomStrategy, DynamicLayoutComponent, EntityDto, EnvironmentService, ExtensibleAuditedEntityDto, ExtensibleAuditedEntityWithUserDto, ExtensibleCreationAuditedEntityDto, ExtensibleCreationAuditedEntityWithUserDto, ExtensibleEntityDto, ExtensibleFullAuditedEntityDto, ExtensibleFullAuditedEntityWithUserDto, ExtensibleLimitedResultRequestDto, ExtensibleObject, ExtensiblePagedAndSortedResultRequestDto, ExtensiblePagedResultRequestDto, ExternalHttpClient, ForDirective, FormSubmitDirective, FullAuditedEntityDto, FullAuditedEntityWithUserDto, HttpErrorReporterService, HttpWaitService, INCUDE_LOCALIZATION_RESOURCES_TOKEN, INJECTOR_PIPE_DATA_TOKEN, IS_EXTERNAL_REQUEST, InitDirective, InputEventDebounceDirective, InsertIntoContainerStrategy, InternalStore, LIST_QUERY_DEBOUNCE_TIME, LOADER_DELAY, LOADING_STRATEGY, LOCALIZATIONS, LazyLoadService, LazyModuleFactory, LimitedResultRequestDto, ListResultDto, ListService, LoadingStrategy, LocalizationModule, LocalizationPipe, LocalizationService, LooseContentSecurityStrategy, MultiTenancyService, NAVIGATE_TO_MANAGE_PROFILE, NavigationEvent, NoContentSecurityStrategy, NoContextStrategy, NoCrossOriginStrategy, OTHERS_GROUP, index as ObjectExtending, PIPE_TO_LOGIN_FN_KEY, PROJECTION_STRATEGY, PagedAndSortedResultRequestDto, PagedResultDto, PagedResultRequestDto, PermissionDirective, PermissionGuard, PermissionService, ProjectionStrategy, QUEUE_MANAGER, ReplaceableComponentsService, ReplaceableRouteContainerComponent, ReplaceableTemplateDirective, ResourceWaitService, RestService, RootComponentProjectionStrategy, RootCoreModule, RouterEvents, RouterOutletComponent, RouterWaitService, RoutesService, SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY, SafeHtmlPipe, ScriptContentStrategy, ScriptLoadingStrategy, SessionStateService, ShortDatePipe, ShortDateTimePipe, ShortTimePipe, SortPipe, StopPropagationDirective, StyleContentStrategy, StyleLoadingStrategy, SubscriptionService, TENANT_KEY, TemplateContextStrategy, TemplateProjectionStrategy, ToInjectorPipe, TrackByService, WebHttpUrlEncodingCodec, checkHasProp, coreOptionsFactory, createGroupMap, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, differentLocales, downloadBlob, escapeHtmlChars, exists, featuresFactory, findRoute, fromLazyLoad, generateHash, generatePassword, getInitialData, getLocaleDirection, getPathName, getRemoteEnv, getRoutePath, getShortDateFormat, getShortDateShortTimeFormat, getShortTimeFormat, interpolate, isArray, isNode, isNullOrEmpty, isNullOrUndefined, isNumber, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isUndefinedOrEmptyString, localeInitializer, localizationContributor, localizations$, mapEnumToOptions, noop, parseTenantFromUrl, pushValueTo, reloadRoute, trackBy, trackByDeep, uuid, validateCreditCard, validateMinAge, validateRange, validateRequired, validateStringLength, validateUrl };
4460
- //# sourceMappingURL=abp-ng.core.mjs.map