@abp/ng.core 4.4.3 → 5.0.0-beta.3

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 (405) hide show
  1. package/abp-ng.core.d.ts +1 -41
  2. package/bundles/abp-ng.core-locale.umd.js +1 -1
  3. package/bundles/abp-ng.core-locale.umd.js.map +1 -1
  4. package/bundles/abp-ng.core-testing.umd.js +37 -34
  5. package/bundles/abp-ng.core-testing.umd.js.map +1 -1
  6. package/bundles/abp-ng.core.umd.js +1403 -1897
  7. package/bundles/abp-ng.core.umd.js.map +1 -1
  8. package/esm2015/abp-ng.core.js +1 -40
  9. package/esm2015/abp-ng.core.js.map +1 -0
  10. package/esm2015/lib/abstracts/index.js +1 -1
  11. package/esm2015/lib/abstracts/index.js.map +1 -0
  12. package/esm2015/lib/abstracts/ng-model.component.js +18 -16
  13. package/esm2015/lib/abstracts/ng-model.component.js.map +1 -0
  14. package/esm2015/lib/components/dynamic-layout.component.js +28 -16
  15. package/esm2015/lib/components/dynamic-layout.component.js.map +1 -0
  16. package/esm2015/lib/components/index.js +1 -1
  17. package/esm2015/lib/components/index.js.map +1 -0
  18. package/esm2015/lib/components/replaceable-route-container.component.js +19 -15
  19. package/esm2015/lib/components/replaceable-route-container.component.js.map +1 -0
  20. package/esm2015/lib/components/router-outlet.component.js +12 -9
  21. package/esm2015/lib/components/router-outlet.component.js.map +1 -0
  22. package/esm2015/lib/constants/different-locales.js +1 -1
  23. package/esm2015/lib/constants/different-locales.js.map +1 -0
  24. package/esm2015/lib/constants/index.js +1 -1
  25. package/esm2015/lib/constants/index.js.map +1 -0
  26. package/esm2015/lib/core.module.js +151 -83
  27. package/esm2015/lib/core.module.js.map +1 -0
  28. package/esm2015/lib/directives/autofocus.directive.js +14 -13
  29. package/esm2015/lib/directives/autofocus.directive.js.map +1 -0
  30. package/esm2015/lib/directives/debounce.directive.js +18 -16
  31. package/esm2015/lib/directives/debounce.directive.js.map +1 -0
  32. package/esm2015/lib/directives/for.directive.js +39 -25
  33. package/esm2015/lib/directives/for.directive.js.map +1 -0
  34. package/esm2015/lib/directives/form-submit.directive.js +22 -19
  35. package/esm2015/lib/directives/form-submit.directive.js.map +1 -0
  36. package/esm2015/lib/directives/index.js +1 -2
  37. package/esm2015/lib/directives/index.js.map +1 -0
  38. package/esm2015/lib/directives/init.directive.js +11 -10
  39. package/esm2015/lib/directives/init.directive.js.map +1 -0
  40. package/esm2015/lib/directives/permission.directive.js +19 -34
  41. package/esm2015/lib/directives/permission.directive.js.map +1 -0
  42. package/esm2015/lib/directives/replaceable-template.directive.js +24 -20
  43. package/esm2015/lib/directives/replaceable-template.directive.js.map +1 -0
  44. package/esm2015/lib/directives/stop-propagation.directive.js +16 -15
  45. package/esm2015/lib/directives/stop-propagation.directive.js.map +1 -0
  46. package/esm2015/lib/enums/common.js +1 -1
  47. package/esm2015/lib/enums/common.js.map +1 -0
  48. package/esm2015/lib/enums/index.js +1 -1
  49. package/esm2015/lib/enums/index.js.map +1 -0
  50. package/esm2015/lib/guards/auth.guard.js +9 -11
  51. package/esm2015/lib/guards/auth.guard.js.map +1 -0
  52. package/esm2015/lib/guards/index.js +1 -1
  53. package/esm2015/lib/guards/index.js.map +1 -0
  54. package/esm2015/lib/guards/permission.guard.js +16 -21
  55. package/esm2015/lib/guards/permission.guard.js.map +1 -0
  56. package/esm2015/lib/handlers/oauth-configuration.handler.js +12 -13
  57. package/esm2015/lib/handlers/oauth-configuration.handler.js.map +1 -0
  58. package/esm2015/lib/handlers/routes.handler.js +11 -11
  59. package/esm2015/lib/handlers/routes.handler.js.map +1 -0
  60. package/esm2015/lib/interceptors/api.interceptor.js +12 -14
  61. package/esm2015/lib/interceptors/api.interceptor.js.map +1 -0
  62. package/esm2015/lib/interceptors/index.js +1 -1
  63. package/esm2015/lib/interceptors/index.js.map +1 -0
  64. package/esm2015/lib/localization.module.js +12 -7
  65. package/esm2015/lib/localization.module.js.map +1 -0
  66. package/esm2015/lib/models/auth.js +1 -1
  67. package/esm2015/lib/models/auth.js.map +1 -0
  68. package/esm2015/lib/models/common.js +1 -1
  69. package/esm2015/lib/models/common.js.map +1 -0
  70. package/esm2015/lib/models/dtos.js +6 -5
  71. package/esm2015/lib/models/dtos.js.map +1 -0
  72. package/esm2015/lib/models/environment.js +1 -1
  73. package/esm2015/lib/models/environment.js.map +1 -0
  74. package/esm2015/lib/models/index.js +1 -4
  75. package/esm2015/lib/models/index.js.map +1 -0
  76. package/esm2015/lib/models/localization.js +1 -1
  77. package/esm2015/lib/models/localization.js.map +1 -0
  78. package/esm2015/lib/models/replaceable-components.js +1 -1
  79. package/esm2015/lib/models/replaceable-components.js.map +1 -0
  80. package/esm2015/lib/models/rest.js +1 -1
  81. package/esm2015/lib/models/rest.js.map +1 -0
  82. package/esm2015/lib/models/session.js +1 -1
  83. package/esm2015/lib/models/session.js.map +1 -0
  84. package/esm2015/lib/models/utility.js +1 -1
  85. package/esm2015/lib/models/utility.js.map +1 -0
  86. package/esm2015/lib/pipes/index.js +1 -1
  87. package/esm2015/lib/pipes/index.js.map +1 -0
  88. package/esm2015/lib/pipes/localization.pipe.js +14 -10
  89. package/esm2015/lib/pipes/localization.pipe.js.map +1 -0
  90. package/esm2015/lib/pipes/sort.pipe.js +13 -7
  91. package/esm2015/lib/pipes/sort.pipe.js.map +1 -0
  92. package/esm2015/lib/providers/cookie-language.provider.js +22 -0
  93. package/esm2015/lib/providers/cookie-language.provider.js.map +1 -0
  94. package/esm2015/lib/providers/locale.provider.js +1 -1
  95. package/esm2015/lib/providers/locale.provider.js.map +1 -0
  96. package/esm2015/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.js +9 -10
  97. package/esm2015/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.js.map +1 -0
  98. package/esm2015/lib/proxy/pages/abp/multi-tenancy/index.js +1 -1
  99. package/esm2015/lib/proxy/pages/abp/multi-tenancy/index.js.map +1 -0
  100. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.js +9 -10
  101. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.js.map +1 -0
  102. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/index.js +1 -1
  103. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/index.js.map +1 -0
  104. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.js +9 -10
  105. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.js.map +1 -0
  106. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.js +1 -1
  107. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.js.map +1 -0
  108. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/models.js +1 -1
  109. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/models.js.map +1 -0
  110. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/index.js +1 -1
  111. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/index.js.map +1 -0
  112. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/models.js +2 -1
  113. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/models.js.map +1 -0
  114. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/index.js +1 -1
  115. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/index.js.map +1 -0
  116. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models.js +1 -1
  117. package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models.js.map +1 -0
  118. package/esm2015/lib/proxy/volo/abp/http/modeling/index.js +1 -1
  119. package/esm2015/lib/proxy/volo/abp/http/modeling/index.js.map +1 -0
  120. package/esm2015/lib/proxy/volo/abp/http/modeling/models.js +2 -1
  121. package/esm2015/lib/proxy/volo/abp/http/modeling/models.js.map +1 -0
  122. package/esm2015/lib/proxy/volo/abp/localization/index.js +1 -1
  123. package/esm2015/lib/proxy/volo/abp/localization/index.js.map +1 -0
  124. package/esm2015/lib/proxy/volo/abp/localization/models.js +1 -1
  125. package/esm2015/lib/proxy/volo/abp/localization/models.js.map +1 -0
  126. package/esm2015/lib/proxy/volo/abp/models.js +1 -1
  127. package/esm2015/lib/proxy/volo/abp/models.js.map +1 -0
  128. package/esm2015/lib/services/auth.service.js +9 -16
  129. package/esm2015/lib/services/auth.service.js.map +1 -0
  130. package/esm2015/lib/services/config-state.service.js +12 -20
  131. package/esm2015/lib/services/config-state.service.js.map +1 -0
  132. package/esm2015/lib/services/content-projection.service.js +7 -8
  133. package/esm2015/lib/services/content-projection.service.js.map +1 -0
  134. package/esm2015/lib/services/dom-insertion.service.js +7 -5
  135. package/esm2015/lib/services/dom-insertion.service.js.map +1 -0
  136. package/esm2015/lib/services/environment.service.js +7 -7
  137. package/esm2015/lib/services/environment.service.js.map +1 -0
  138. package/esm2015/lib/services/http-error-reporter.service.js +29 -0
  139. package/esm2015/lib/services/http-error-reporter.service.js.map +1 -0
  140. package/esm2015/lib/services/http-wait.service.js +9 -10
  141. package/esm2015/lib/services/http-wait.service.js.map +1 -0
  142. package/esm2015/lib/services/index.js +2 -4
  143. package/esm2015/lib/services/index.js.map +1 -0
  144. package/esm2015/lib/services/lazy-load.service.js +9 -10
  145. package/esm2015/lib/services/lazy-load.service.js.map +1 -0
  146. package/esm2015/lib/services/list.service.js +7 -7
  147. package/esm2015/lib/services/list.service.js.map +1 -0
  148. package/esm2015/lib/services/localization.service.js +11 -11
  149. package/esm2015/lib/services/localization.service.js.map +1 -0
  150. package/esm2015/lib/services/multi-tenancy.service.js +15 -34
  151. package/esm2015/lib/services/multi-tenancy.service.js.map +1 -0
  152. package/esm2015/lib/services/permission.service.js +10 -11
  153. package/esm2015/lib/services/permission.service.js.map +1 -0
  154. package/esm2015/lib/services/replaceable-components.service.js +7 -9
  155. package/esm2015/lib/services/replaceable-components.service.js.map +1 -0
  156. package/esm2015/lib/services/resource-wait.service.js +9 -7
  157. package/esm2015/lib/services/resource-wait.service.js.map +1 -0
  158. package/esm2015/lib/services/rest.service.js +19 -23
  159. package/esm2015/lib/services/rest.service.js.map +1 -0
  160. package/esm2015/lib/services/router-events.service.js +7 -8
  161. package/esm2015/lib/services/router-events.service.js.map +1 -0
  162. package/esm2015/lib/services/router-wait.service.js +9 -11
  163. package/esm2015/lib/services/router-wait.service.js.map +1 -0
  164. package/esm2015/lib/services/routes.service.js +13 -17
  165. package/esm2015/lib/services/routes.service.js.map +1 -0
  166. package/esm2015/lib/services/session-state.service.js +9 -10
  167. package/esm2015/lib/services/session-state.service.js.map +1 -0
  168. package/esm2015/lib/services/subscription.service.js +7 -4
  169. package/esm2015/lib/services/subscription.service.js.map +1 -0
  170. package/esm2015/lib/services/track-by.service.js +12 -8
  171. package/esm2015/lib/services/track-by.service.js.map +1 -0
  172. package/esm2015/lib/strategies/auth-flow.strategy.js +9 -7
  173. package/esm2015/lib/strategies/auth-flow.strategy.js.map +1 -0
  174. package/esm2015/lib/strategies/container.strategy.js +1 -1
  175. package/esm2015/lib/strategies/container.strategy.js.map +1 -0
  176. package/esm2015/lib/strategies/content-security.strategy.js +1 -1
  177. package/esm2015/lib/strategies/content-security.strategy.js.map +1 -0
  178. package/esm2015/lib/strategies/content.strategy.js +14 -10
  179. package/esm2015/lib/strategies/content.strategy.js.map +1 -0
  180. package/esm2015/lib/strategies/context.strategy.js +1 -2
  181. package/esm2015/lib/strategies/context.strategy.js.map +1 -0
  182. package/esm2015/lib/strategies/cross-origin.strategy.js +1 -1
  183. package/esm2015/lib/strategies/cross-origin.strategy.js.map +1 -0
  184. package/esm2015/lib/strategies/dom.strategy.js +1 -1
  185. package/esm2015/lib/strategies/dom.strategy.js.map +1 -0
  186. package/esm2015/lib/strategies/index.js +1 -1
  187. package/esm2015/lib/strategies/index.js.map +1 -0
  188. package/esm2015/lib/strategies/loading.strategy.js +1 -1
  189. package/esm2015/lib/strategies/loading.strategy.js.map +1 -0
  190. package/esm2015/lib/strategies/projection.strategy.js +1 -1
  191. package/esm2015/lib/strategies/projection.strategy.js.map +1 -0
  192. package/esm2015/lib/tokens/app-config.token.js +1 -1
  193. package/esm2015/lib/tokens/app-config.token.js.map +1 -0
  194. package/esm2015/lib/tokens/cookie-language-key.token.js +5 -0
  195. package/esm2015/lib/tokens/cookie-language-key.token.js.map +1 -0
  196. package/esm2015/lib/tokens/index.js +3 -2
  197. package/esm2015/lib/tokens/index.js.map +1 -0
  198. package/esm2015/lib/tokens/list.token.js +1 -1
  199. package/esm2015/lib/tokens/list.token.js.map +1 -0
  200. package/esm2015/lib/tokens/lodaer-delay.token.js +1 -1
  201. package/esm2015/lib/tokens/lodaer-delay.token.js.map +1 -0
  202. package/esm2015/lib/tokens/manage-profile.token.js +1 -1
  203. package/esm2015/lib/tokens/manage-profile.token.js.map +1 -0
  204. package/esm2015/lib/tokens/options.token.js +1 -1
  205. package/esm2015/lib/tokens/options.token.js.map +1 -0
  206. package/esm2015/lib/tokens/tenant-key.token.js +1 -1
  207. package/esm2015/lib/tokens/tenant-key.token.js.map +1 -0
  208. package/esm2015/lib/utils/array-utils.js +1 -1
  209. package/esm2015/lib/utils/array-utils.js.map +1 -0
  210. package/esm2015/lib/utils/auth-utils.js +1 -1
  211. package/esm2015/lib/utils/auth-utils.js.map +1 -0
  212. package/esm2015/lib/utils/common-utils.js +1 -2
  213. package/esm2015/lib/utils/common-utils.js.map +1 -0
  214. package/esm2015/lib/utils/date-extensions.js +1 -1
  215. package/esm2015/lib/utils/date-extensions.js.map +1 -0
  216. package/esm2015/lib/utils/date-utils.js +1 -1
  217. package/esm2015/lib/utils/date-utils.js.map +1 -0
  218. package/esm2015/lib/utils/environment-utils.js +8 -5
  219. package/esm2015/lib/utils/environment-utils.js.map +1 -0
  220. package/esm2015/lib/utils/factory-utils.js +1 -1
  221. package/esm2015/lib/utils/factory-utils.js.map +1 -0
  222. package/esm2015/lib/utils/file-utils.js +1 -1
  223. package/esm2015/lib/utils/file-utils.js.map +1 -0
  224. package/esm2015/lib/utils/form-utils.js +1 -1
  225. package/esm2015/lib/utils/form-utils.js.map +1 -0
  226. package/esm2015/lib/utils/generator-utils.js +1 -2
  227. package/esm2015/lib/utils/generator-utils.js.map +1 -0
  228. package/esm2015/lib/utils/http-utils.js +1 -1
  229. package/esm2015/lib/utils/http-utils.js.map +1 -0
  230. package/esm2015/lib/utils/index.js +1 -2
  231. package/esm2015/lib/utils/index.js.map +1 -0
  232. package/esm2015/lib/utils/initial-utils.js +1 -1
  233. package/esm2015/lib/utils/initial-utils.js.map +1 -0
  234. package/esm2015/lib/utils/internal-store-utils.js +1 -1
  235. package/esm2015/lib/utils/internal-store-utils.js.map +1 -0
  236. package/esm2015/lib/utils/lazy-load-utils.js +1 -2
  237. package/esm2015/lib/utils/lazy-load-utils.js.map +1 -0
  238. package/esm2015/lib/utils/localization-utils.js +3 -3
  239. package/esm2015/lib/utils/localization-utils.js.map +1 -0
  240. package/esm2015/lib/utils/multi-tenancy-utils.js +1 -1
  241. package/esm2015/lib/utils/multi-tenancy-utils.js.map +1 -0
  242. package/esm2015/lib/utils/number-utils.js +1 -2
  243. package/esm2015/lib/utils/number-utils.js.map +1 -0
  244. package/esm2015/lib/utils/object-utils.js +1 -1
  245. package/esm2015/lib/utils/object-utils.js.map +1 -0
  246. package/esm2015/lib/utils/route-utils.js +1 -1
  247. package/esm2015/lib/utils/route-utils.js.map +1 -0
  248. package/esm2015/lib/utils/string-utils.js +1 -1
  249. package/esm2015/lib/utils/string-utils.js.map +1 -0
  250. package/esm2015/lib/utils/tree-utils.js +2 -1
  251. package/esm2015/lib/utils/tree-utils.js.map +1 -0
  252. package/esm2015/lib/validators/age.validator.js +1 -1
  253. package/esm2015/lib/validators/age.validator.js.map +1 -0
  254. package/esm2015/lib/validators/credit-card.validator.js +1 -2
  255. package/esm2015/lib/validators/credit-card.validator.js.map +1 -0
  256. package/esm2015/lib/validators/index.js +2 -4
  257. package/esm2015/lib/validators/index.js.map +1 -0
  258. package/esm2015/lib/validators/range.validator.js +1 -1
  259. package/esm2015/lib/validators/range.validator.js.map +1 -0
  260. package/esm2015/lib/validators/required.validator.js +1 -1
  261. package/esm2015/lib/validators/required.validator.js.map +1 -0
  262. package/esm2015/lib/validators/string-length.validator.js +1 -1
  263. package/esm2015/lib/validators/string-length.validator.js.map +1 -0
  264. package/esm2015/lib/validators/url.validator.js +1 -1
  265. package/esm2015/lib/validators/url.validator.js.map +1 -0
  266. package/esm2015/locale/abp-ng.core-locale.js +1 -1
  267. package/esm2015/locale/abp-ng.core-locale.js.map +1 -0
  268. package/esm2015/locale/public-api.js +1 -1
  269. package/esm2015/locale/public-api.js.map +1 -0
  270. package/esm2015/locale/utils/register-locale.js +1 -1
  271. package/esm2015/locale/utils/register-locale.js.map +1 -0
  272. package/esm2015/public-api.js +10 -15
  273. package/esm2015/public-api.js.map +1 -0
  274. package/esm2015/testing/abp-ng.core-testing.js +1 -3
  275. package/esm2015/testing/abp-ng.core-testing.js.map +1 -0
  276. package/esm2015/testing/lib/core-testing.module.js +12 -7
  277. package/esm2015/testing/lib/core-testing.module.js.map +1 -0
  278. package/esm2015/testing/lib/services/index.js +1 -1
  279. package/esm2015/testing/lib/services/index.js.map +1 -0
  280. package/esm2015/testing/lib/services/mock-permission.service.js +9 -10
  281. package/esm2015/testing/lib/services/mock-permission.service.js.map +1 -0
  282. package/esm2015/testing/lib/services/mock-rest.service.js +14 -14
  283. package/esm2015/testing/lib/services/mock-rest.service.js.map +1 -0
  284. package/esm2015/testing/lib/utils/clear-page.util.js +1 -1
  285. package/esm2015/testing/lib/utils/clear-page.util.js.map +1 -0
  286. package/esm2015/testing/lib/utils/index.js +1 -1
  287. package/esm2015/testing/lib/utils/index.js.map +1 -0
  288. package/esm2015/testing/lib/utils/wait.util.js +1 -1
  289. package/esm2015/testing/lib/utils/wait.util.js.map +1 -0
  290. package/esm2015/testing/public-api.js +1 -1
  291. package/esm2015/testing/public-api.js.map +1 -0
  292. package/fesm2015/abp-ng.core-locale.js.map +1 -1
  293. package/fesm2015/abp-ng.core-testing.js +32 -30
  294. package/fesm2015/abp-ng.core-testing.js.map +1 -1
  295. package/fesm2015/abp-ng.core.js +723 -1138
  296. package/fesm2015/abp-ng.core.js.map +1 -1
  297. package/lib/abstracts/ng-model.component.d.ts +6 -3
  298. package/lib/components/dynamic-layout.component.d.ts +3 -0
  299. package/lib/components/replaceable-route-container.component.d.ts +3 -0
  300. package/lib/components/router-outlet.component.d.ts +3 -0
  301. package/lib/core.module.d.ts +29 -0
  302. package/lib/directives/autofocus.directive.d.ts +4 -1
  303. package/lib/directives/debounce.directive.d.ts +3 -0
  304. package/lib/directives/for.directive.d.ts +3 -0
  305. package/lib/directives/form-submit.directive.d.ts +3 -0
  306. package/lib/directives/index.d.ts +0 -1
  307. package/lib/directives/init.directive.d.ts +3 -0
  308. package/lib/directives/permission.directive.d.ts +3 -5
  309. package/lib/directives/replaceable-template.directive.d.ts +3 -0
  310. package/lib/directives/stop-propagation.directive.d.ts +3 -0
  311. package/lib/guards/auth.guard.d.ts +3 -0
  312. package/lib/guards/permission.guard.d.ts +7 -4
  313. package/lib/handlers/oauth-configuration.handler.d.ts +3 -0
  314. package/lib/handlers/routes.handler.d.ts +3 -0
  315. package/lib/interceptors/api.interceptor.d.ts +3 -0
  316. package/lib/localization.module.d.ts +5 -0
  317. package/lib/models/index.d.ts +0 -3
  318. package/lib/models/replaceable-components.d.ts +2 -2
  319. package/lib/models/session.d.ts +0 -14
  320. package/lib/pipes/localization.pipe.d.ts +6 -2
  321. package/lib/pipes/sort.pipe.d.ts +4 -0
  322. package/lib/providers/cookie-language.provider.d.ts +3 -0
  323. package/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.d.ts +3 -0
  324. package/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.d.ts +3 -0
  325. package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.d.ts +3 -0
  326. package/lib/services/auth.service.d.ts +3 -4
  327. package/lib/services/config-state.service.d.ts +14 -16
  328. package/lib/services/content-projection.service.d.ts +3 -0
  329. package/lib/services/dom-insertion.service.d.ts +3 -0
  330. package/lib/services/environment.service.d.ts +4 -0
  331. package/lib/services/http-error-reporter.service.d.ts +12 -0
  332. package/lib/services/http-wait.service.d.ts +3 -0
  333. package/lib/services/index.d.ts +1 -3
  334. package/lib/services/lazy-load.service.d.ts +3 -0
  335. package/lib/services/list.service.d.ts +4 -1
  336. package/lib/services/localization.service.d.ts +6 -3
  337. package/lib/services/multi-tenancy.service.d.ts +7 -14
  338. package/lib/services/permission.service.d.ts +4 -1
  339. package/lib/services/replaceable-components.service.d.ts +3 -0
  340. package/lib/services/resource-wait.service.d.ts +3 -0
  341. package/lib/services/rest.service.d.ts +6 -3
  342. package/lib/services/router-events.service.d.ts +3 -0
  343. package/lib/services/router-wait.service.d.ts +3 -0
  344. package/lib/services/routes.service.d.ts +5 -2
  345. package/lib/services/session-state.service.d.ts +3 -0
  346. package/lib/services/subscription.service.d.ts +3 -0
  347. package/lib/services/track-by.service.d.ts +3 -0
  348. package/lib/strategies/auth-flow.strategy.d.ts +12 -12
  349. package/lib/strategies/content.strategy.d.ts +9 -5
  350. package/lib/tokens/cookie-language-key.token.d.ts +2 -0
  351. package/lib/tokens/index.d.ts +2 -1
  352. package/lib/utils/auth-utils.d.ts +5 -5
  353. package/lib/utils/index.d.ts +0 -1
  354. package/lib/utils/initial-utils.d.ts +5 -5
  355. package/lib/utils/tree-utils.d.ts +1 -1
  356. package/locale/abp-ng.core-locale.d.ts +1 -0
  357. package/locale/package.json +0 -1
  358. package/package.json +5 -9
  359. package/public-api.d.ts +9 -11
  360. package/testing/abp-ng.core-testing.d.ts +1 -2
  361. package/testing/lib/core-testing.module.d.ts +7 -0
  362. package/testing/lib/services/mock-permission.service.d.ts +3 -0
  363. package/testing/lib/services/mock-rest.service.d.ts +3 -0
  364. package/testing/package.json +0 -1
  365. package/abp-ng.core.metadata.json +0 -1
  366. package/bundles/abp-ng.core-locale.umd.min.js +0 -16
  367. package/bundles/abp-ng.core-locale.umd.min.js.map +0 -1
  368. package/bundles/abp-ng.core-testing.umd.min.js +0 -2
  369. package/bundles/abp-ng.core-testing.umd.min.js.map +0 -1
  370. package/bundles/abp-ng.core.umd.min.js +0 -17
  371. package/bundles/abp-ng.core.umd.min.js.map +0 -1
  372. package/esm2015/lib/actions/config.actions.js +0 -25
  373. package/esm2015/lib/actions/index.js +0 -5
  374. package/esm2015/lib/actions/loader.actions.js +0 -13
  375. package/esm2015/lib/actions/profile.actions.js +0 -16
  376. package/esm2015/lib/actions/rest.actions.js +0 -7
  377. package/esm2015/lib/directives/visibility.directive.js +0 -62
  378. package/esm2015/lib/models/application-configuration.js +0 -2
  379. package/esm2015/lib/models/config.js +0 -2
  380. package/esm2015/lib/models/profile.js +0 -2
  381. package/esm2015/lib/services/application-configuration.service.js +0 -29
  382. package/esm2015/lib/services/profile-state.service.js +0 -33
  383. package/esm2015/lib/services/profile.service.js +0 -48
  384. package/esm2015/lib/states/config.state.js +0 -230
  385. package/esm2015/lib/states/index.js +0 -3
  386. package/esm2015/lib/states/profile.state.js +0 -53
  387. package/esm2015/lib/utils/rxjs-utils.js +0 -26
  388. package/lib/actions/config.actions.d.ts +0 -23
  389. package/lib/actions/index.d.ts +0 -4
  390. package/lib/actions/loader.actions.d.ts +0 -11
  391. package/lib/actions/profile.actions.d.ts +0 -14
  392. package/lib/actions/rest.actions.d.ts +0 -6
  393. package/lib/directives/visibility.directive.d.ts +0 -16
  394. package/lib/models/application-configuration.d.ts +0 -108
  395. package/lib/models/config.d.ts +0 -52
  396. package/lib/models/profile.d.ts +0 -25
  397. package/lib/services/application-configuration.service.d.ts +0 -11
  398. package/lib/services/profile-state.service.d.ts +0 -11
  399. package/lib/services/profile.service.d.ts +0 -11
  400. package/lib/states/config.state.d.ts +0 -191
  401. package/lib/states/index.d.ts +0 -2
  402. package/lib/states/profile.state.d.ts +0 -12
  403. package/lib/utils/rxjs-utils.d.ts +0 -5
  404. package/locale/abp-ng.core-locale.metadata.json +0 -1
  405. package/testing/abp-ng.core-testing.metadata.json +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('snq'), require('just-compare'), require('@angular/common/http'), require('@ngxs/store'), require('@angular/forms'), require('angular-oauth2-oidc'), require('just-clone')) :
3
- typeof define === 'function' && define.amd ? define('@abp/ng.core', ['exports', '@angular/core', '@angular/router', '@angular/common', 'rxjs', 'rxjs/operators', 'snq', 'just-compare', '@angular/common/http', '@ngxs/store', '@angular/forms', 'angular-oauth2-oidc', 'just-clone'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abp = global.abp || {}, global.abp.ng = global.abp.ng || {}, global.abp.ng.core = {}), global.ng.core, global.ng.router, global.ng.common, global.rxjs, global.rxjs.operators, global.snq, global.compare, global.ng.common.http, global.i4, global.ng.forms, global.i1$1, global.clone));
5
- }(this, (function (exports, i0, i1, common, rxjs, operators, snq, compare, i2, i4, forms, i1$1, clone) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('just-compare'), require('@angular/common/http'), require('@angular/common'), require('@angular/forms'), require('angular-oauth2-oidc'), require('just-clone')) :
3
+ typeof define === 'function' && define.amd ? define('@abp/ng.core', ['exports', '@angular/core', '@angular/router', 'rxjs', 'rxjs/operators', 'just-compare', '@angular/common/http', '@angular/common', '@angular/forms', 'angular-oauth2-oidc', 'just-clone'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abp = global.abp || {}, global.abp.ng = global.abp.ng || {}, global.abp.ng.core = {}), global.ng.core, global.ng.router, global.rxjs, global.rxjs.operators, global.compare, global.ng.common.http, global.ng.common, global.ng.forms, global.i1$3, global.clone));
5
+ }(this, (function (exports, i0, i1$1, rxjs, operators, compare, i1, i5, i1$2, i1$3, clone) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -27,22 +27,20 @@
27
27
  }
28
28
 
29
29
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
30
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
- var snq__default = /*#__PURE__*/_interopDefaultLegacy(snq);
32
- var compare__default = /*#__PURE__*/_interopDefaultLegacy(compare);
33
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
34
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
35
30
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
31
+ var compare__default = /*#__PURE__*/_interopDefaultLegacy(compare);
32
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
33
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
34
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
35
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
36
36
  var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
37
37
 
38
38
  // Not an abstract class on purpose. Do not change!
39
- // tslint:disable-next-line: use-component-selector
40
39
  var AbstractNgModelComponent = /** @class */ (function () {
41
40
  function AbstractNgModelComponent(injector) {
42
41
  this.injector = injector;
43
42
  this.valueFn = function (value) { return value; };
44
43
  this.valueLimitFn = function (value) { return false; };
45
- // tslint:disable-next-line: deprecation
46
44
  this.cdRef = injector.get(i0.ChangeDetectorRef);
47
45
  }
48
46
  Object.defineProperty(AbstractNgModelComponent.prototype, "value", {
@@ -87,93 +85,22 @@
87
85
  };
88
86
  return AbstractNgModelComponent;
89
87
  }());
90
- AbstractNgModelComponent.decorators = [
91
- { type: i0.Component, args: [{ template: '' },] }
92
- ];
93
- AbstractNgModelComponent.ctorParameters = function () { return [
94
- { type: i0.Injector }
95
- ]; };
96
- AbstractNgModelComponent.propDecorators = {
97
- disabled: [{ type: i0.Input }],
98
- readonly: [{ type: i0.Input }],
99
- valueFn: [{ type: i0.Input }],
100
- valueLimitFn: [{ type: i0.Input }],
101
- value: [{ type: i0.Input }]
102
- };
103
-
104
- /**
105
- * @deprecated Use ConfigStateService. To be deleted in v5.0.
106
- */
107
- var GetAppConfiguration = /** @class */ (function () {
108
- function GetAppConfiguration() {
109
- }
110
- return GetAppConfiguration;
111
- }());
112
- GetAppConfiguration.type = '[Config] Get App Configuration';
113
- /**
114
- * @deprecated Use EnvironmentService instead. To be deleted in v5.0.
115
- */
116
- var SetEnvironment = /** @class */ (function () {
117
- function SetEnvironment(environment) {
118
- this.environment = environment;
119
- }
120
- return SetEnvironment;
121
- }());
122
- SetEnvironment.type = '[Config] Set Environment';
123
- /**
124
- * @deprecated Use EnvironmentService instead. To be deleted in v5.0.
125
- */
126
- var PatchConfigState = /** @class */ (function () {
127
- function PatchConfigState(state) {
128
- this.state = state;
129
- }
130
- return PatchConfigState;
131
- }());
132
- PatchConfigState.type = '[Config] Set State';
133
-
134
- var StartLoader = /** @class */ (function () {
135
- function StartLoader(payload) {
136
- this.payload = payload;
137
- }
138
- return StartLoader;
139
- }());
140
- StartLoader.type = '[Loader] Start';
141
- var StopLoader = /** @class */ (function () {
142
- function StopLoader(payload) {
143
- this.payload = payload;
144
- }
145
- return StopLoader;
146
- }());
147
- StopLoader.type = '[Loader] Stop';
148
-
149
- var GetProfile = /** @class */ (function () {
150
- function GetProfile() {
151
- }
152
- return GetProfile;
153
- }());
154
- GetProfile.type = '[Profile] Get';
155
- var UpdateProfile = /** @class */ (function () {
156
- function UpdateProfile(payload) {
157
- this.payload = payload;
158
- }
159
- return UpdateProfile;
160
- }());
161
- UpdateProfile.type = '[Profile] Update';
162
- var ChangePassword = /** @class */ (function () {
163
- function ChangePassword(payload) {
164
- this.payload = payload;
165
- }
166
- return ChangePassword;
167
- }());
168
- ChangePassword.type = '[Profile] Change Password';
169
-
170
- var RestOccurError = /** @class */ (function () {
171
- function RestOccurError(payload) {
172
- this.payload = payload;
173
- }
174
- return RestOccurError;
175
- }());
176
- RestOccurError.type = '[Rest] Error';
88
+ AbstractNgModelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbstractNgModelComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
89
+ AbstractNgModelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: AbstractNgModelComponent, selector: "ng-component", inputs: { disabled: "disabled", readonly: "readonly", valueFn: "valueFn", valueLimitFn: "valueLimitFn", value: "value" }, ngImport: i0__namespace, template: '', isInline: true });
90
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbstractNgModelComponent, decorators: [{
91
+ type: i0.Component,
92
+ args: [{ template: '' }]
93
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { disabled: [{
94
+ type: i0.Input
95
+ }], readonly: [{
96
+ type: i0.Input
97
+ }], valueFn: [{
98
+ type: i0.Input
99
+ }], valueLimitFn: [{
100
+ type: i0.Input
101
+ }], value: [{
102
+ type: i0.Input
103
+ }] } });
177
104
 
178
105
  /*! *****************************************************************************
179
106
  Copyright (c) Microsoft Corporation.
@@ -410,7 +337,7 @@
410
337
  ar[i] = from[i];
411
338
  }
412
339
  }
413
- return to.concat(ar || from);
340
+ return to.concat(ar || Array.prototype.slice.call(from));
414
341
  }
415
342
  function __await(v) {
416
343
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -493,84 +420,81 @@
493
420
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
494
421
  }
495
422
 
496
- var CORE_OPTIONS = new i0.InjectionToken('CORE_OPTIONS');
497
- function coreOptionsFactory(_a) {
498
- var options = __rest(_a, []);
499
- return Object.assign({}, options);
423
+ function pushValueTo(array) {
424
+ return function (element) {
425
+ array.push(element);
426
+ return array;
427
+ };
500
428
  }
501
429
 
502
- // This will not be necessary when only Angukar 9.1+ is supported
503
- function getLocaleDirection(locale) {
504
- 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)
505
- ? 'rtl'
506
- : 'ltr';
507
- }
508
- function createLocalizer(localization) {
509
- return function (resourceName, key, defaultValue) {
510
- if (resourceName === '_')
511
- return key;
512
- var resource = snq__default['default'](function () { return localization.values[resourceName]; });
513
- if (!resource)
514
- return defaultValue;
515
- return resource[key] || defaultValue;
516
- };
517
- }
518
- function createLocalizerWithFallback(localization) {
519
- var findLocalization = createLocalizationFinder(localization);
520
- return function (resourceNames, keys, defaultValue) {
521
- var localized = findLocalization(resourceNames, keys).localized;
522
- return localized || defaultValue;
430
+ /* eslint-disable @typescript-eslint/ban-types */
431
+ var BaseTreeNode = /** @class */ (function () {
432
+ function BaseTreeNode(props) {
433
+ this.children = [];
434
+ this.isLeaf = true;
435
+ Object.assign(this, props);
436
+ }
437
+ BaseTreeNode.create = function (props) {
438
+ return new BaseTreeNode(props);
523
439
  };
440
+ return BaseTreeNode;
441
+ }());
442
+ function createTreeFromList(list, keySelector, parentKeySelector, valueMapper) {
443
+ var map = createMapFromList(list, keySelector, valueMapper);
444
+ var tree = [];
445
+ list.forEach(function (row) {
446
+ var id = keySelector(row);
447
+ var parentId = parentKeySelector(row);
448
+ var node = map.get(id);
449
+ if (!node)
450
+ return;
451
+ if (parentId) {
452
+ var parent = map.get(parentId);
453
+ if (!parent)
454
+ return;
455
+ parent.children.push(node);
456
+ parent.isLeaf = false;
457
+ node.parent = parent;
458
+ }
459
+ else {
460
+ tree.push(node);
461
+ }
462
+ });
463
+ return tree;
524
464
  }
525
- function createLocalizationPipeKeyGenerator(localization) {
526
- var findLocalization = createLocalizationFinder(localization);
527
- return function (resourceNames, keys, defaultKey) {
528
- var _a = findLocalization(resourceNames, keys), resourceName = _a.resourceName, key = _a.key;
529
- return !resourceName ? defaultKey : resourceName === '_' ? key : resourceName + "::" + key;
530
- };
465
+ function createMapFromList(list, keySelector, valueMapper) {
466
+ var map = new Map();
467
+ list.forEach(function (row) { return map.set(keySelector(row), valueMapper(row)); });
468
+ return map;
531
469
  }
532
- function createLocalizationFinder(localization) {
533
- var localize = createLocalizer(localization);
534
- return function (resourceNames, keys) {
535
- resourceNames = resourceNames.concat(localization.defaultResourceName).filter(Boolean);
536
- var resourceCount = resourceNames.length;
537
- var keyCount = keys.length;
538
- for (var i = 0; i < resourceCount; i++) {
539
- var resourceName = resourceNames[i];
540
- for (var j = 0; j < keyCount; j++) {
541
- var key = keys[j];
542
- var localized = localize(resourceName, key, null);
543
- if (localized)
544
- return { resourceName: resourceName, key: key, localized: localized };
470
+ function createTreeNodeFilterCreator(key, mapperFn) {
471
+ return function (search) {
472
+ var regex = new RegExp('.*' + search + '.*', 'i');
473
+ return function collectNodes(nodes, matches) {
474
+ var e_1, _a;
475
+ if (matches === void 0) { matches = []; }
476
+ try {
477
+ for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {
478
+ var node = nodes_1_1.value;
479
+ if (regex.test(mapperFn(node[key])))
480
+ matches.push(node);
481
+ if (node.children.length)
482
+ collectNodes(node.children, matches);
483
+ }
545
484
  }
546
- }
547
- return { resourceName: undefined, key: undefined, localized: undefined };
548
- };
549
- }
550
-
551
- function createTokenParser(format) {
552
- return function (str) {
553
- var tokens = [];
554
- var regex = format.replace(/\./g, '\\.').replace(/\{\s?([0-9a-zA-Z]+)\s?\}/g, function (_, token) {
555
- tokens.push(token);
556
- return '(.+)';
557
- });
558
- var matches = (str.match(regex) || []).slice(1);
559
- return matches.reduce(function (acc, v, i) {
560
- var key = tokens[i];
561
- acc[key] = __spread((acc[key] || []), [v]).filter(Boolean);
562
- return acc;
563
- }, {});
485
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
486
+ finally {
487
+ try {
488
+ if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);
489
+ }
490
+ finally { if (e_1) throw e_1.error; }
491
+ }
492
+ return matches;
493
+ };
564
494
  };
565
- }
566
- function interpolate(text, params) {
567
- return text
568
- .replace(/(['"]?\{\s*(\d+)\s*\}['"]?)/g, function (_, match, digit) { var _a; return (_a = params[digit]) !== null && _a !== void 0 ? _a : match; })
569
- .replace(/\s+/g, ' ');
570
495
  }
571
496
 
572
497
  function noop() {
573
- // tslint:disable-next-line: only-arrow-functions
574
498
  var fn = function () { };
575
499
  return fn;
576
500
  }
@@ -629,7 +553,7 @@
629
553
  var keysOfTarget = Object.keys(target);
630
554
  var keysOfSource = Object.keys(source);
631
555
  var uniqueKeys = new Set(keysOfTarget.concat(keysOfSource));
632
- return __spread(uniqueKeys).reduce(function (retVal, key) {
556
+ return __spreadArray([], __read(uniqueKeys)).reduce(function (retVal, key) {
633
557
  retVal[key] = deepMergeRecursively(target[key], source[key]);
634
558
  return retVal;
635
559
  }, {});
@@ -679,8 +603,13 @@
679
603
  return InternalStore;
680
604
  }());
681
605
 
606
+ var CORE_OPTIONS = new i0.InjectionToken('CORE_OPTIONS');
607
+ function coreOptionsFactory(_a) {
608
+ var options = __rest(_a, []);
609
+ return Object.assign({}, options);
610
+ }
611
+
682
612
  var mapToApiUrl = function (key) { return function (apis) { return (apis[key] || apis.default).url || apis.default.url; }; };
683
- var ɵ0$1 = mapToApiUrl;
684
613
  var EnvironmentService = /** @class */ (function () {
685
614
  function EnvironmentService() {
686
615
  this.store = new InternalStore({});
@@ -709,26 +638,67 @@
709
638
  };
710
639
  return EnvironmentService;
711
640
  }());
712
- EnvironmentService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function EnvironmentService_Factory() { return new EnvironmentService(); }, token: EnvironmentService, providedIn: "root" });
713
- EnvironmentService.decorators = [
714
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
715
- ];
641
+ EnvironmentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: EnvironmentService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
642
+ EnvironmentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: EnvironmentService, providedIn: 'root' });
643
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: EnvironmentService, decorators: [{
644
+ type: i0.Injectable,
645
+ args: [{ providedIn: 'root' }]
646
+ }] });
647
+
648
+ var HttpErrorReporterService = /** @class */ (function () {
649
+ function HttpErrorReporterService() {
650
+ var _this = this;
651
+ this._reporter$ = new rxjs.Subject();
652
+ this._errors$ = new rxjs.BehaviorSubject([]);
653
+ this.reportError = function (error) {
654
+ _this._reporter$.next(error);
655
+ _this._errors$.next(__spreadArray(__spreadArray([], __read(_this.errors)), [error]));
656
+ };
657
+ }
658
+ Object.defineProperty(HttpErrorReporterService.prototype, "reporter$", {
659
+ get: function () {
660
+ return this._reporter$.asObservable();
661
+ },
662
+ enumerable: false,
663
+ configurable: true
664
+ });
665
+ Object.defineProperty(HttpErrorReporterService.prototype, "errors$", {
666
+ get: function () {
667
+ return this._errors$.asObservable();
668
+ },
669
+ enumerable: false,
670
+ configurable: true
671
+ });
672
+ Object.defineProperty(HttpErrorReporterService.prototype, "errors", {
673
+ get: function () {
674
+ return this._errors$.value;
675
+ },
676
+ enumerable: false,
677
+ configurable: true
678
+ });
679
+ return HttpErrorReporterService;
680
+ }());
681
+ HttpErrorReporterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: HttpErrorReporterService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
682
+ HttpErrorReporterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: HttpErrorReporterService, providedIn: 'root' });
683
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: HttpErrorReporterService, decorators: [{
684
+ type: i0.Injectable,
685
+ args: [{ providedIn: 'root' }]
686
+ }] });
716
687
 
717
688
  var RestService = /** @class */ (function () {
718
- function RestService(options, http, environment, store) {
689
+ function RestService(options, http, environment, httpErrorReporter) {
719
690
  this.options = options;
720
691
  this.http = http;
721
692
  this.environment = environment;
722
- this.store = store;
693
+ this.httpErrorReporter = httpErrorReporter;
723
694
  }
724
695
  RestService.prototype.getApiFromStore = function (apiName) {
725
696
  return this.environment.getApiUrl(apiName);
726
697
  };
727
698
  RestService.prototype.handleError = function (err) {
728
- this.store.dispatch(new RestOccurError(err));
699
+ this.httpErrorReporter.reportError(err);
729
700
  return rxjs.throwError(err);
730
701
  };
731
- // TODO: Deprecate service or improve interface in v5.0
732
702
  RestService.prototype.request = function (request, config, api) {
733
703
  var _this = this;
734
704
  config = config || {};
@@ -751,18 +721,19 @@
751
721
  };
752
722
  return RestService;
753
723
  }());
754
- RestService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function RestService_Factory() { return new RestService(i0__namespace.ɵɵinject(CORE_OPTIONS), i0__namespace.ɵɵinject(i2__namespace.HttpClient), i0__namespace.ɵɵinject(EnvironmentService), i0__namespace.ɵɵinject(i4__namespace.Store)); }, token: RestService, providedIn: "root" });
755
- RestService.decorators = [
756
- { type: i0.Injectable, args: [{
757
- providedIn: 'root',
758
- },] }
759
- ];
760
- RestService.ctorParameters = function () { return [
761
- { type: undefined, decorators: [{ type: i0.Inject, args: [CORE_OPTIONS,] }] },
762
- { type: i2.HttpClient },
763
- { type: EnvironmentService },
764
- { type: i4.Store }
765
- ]; };
724
+ RestService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RestService, deps: [{ token: CORE_OPTIONS }, { token: i1__namespace.HttpClient }, { token: EnvironmentService }, { token: HttpErrorReporterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
725
+ RestService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RestService, providedIn: 'root' });
726
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RestService, decorators: [{
727
+ type: i0.Injectable,
728
+ args: [{
729
+ providedIn: 'root',
730
+ }]
731
+ }], ctorParameters: function () {
732
+ return [{ type: undefined, decorators: [{
733
+ type: i0.Inject,
734
+ args: [CORE_OPTIONS]
735
+ }] }, { type: i1__namespace.HttpClient }, { type: EnvironmentService }, { type: HttpErrorReporterService }];
736
+ } });
766
737
 
767
738
  var AbpApplicationConfigurationService = /** @class */ (function () {
768
739
  function AbpApplicationConfigurationService(restService) {
@@ -777,15 +748,14 @@
777
748
  };
778
749
  return AbpApplicationConfigurationService;
779
750
  }());
780
- AbpApplicationConfigurationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AbpApplicationConfigurationService_Factory() { return new AbpApplicationConfigurationService(i0__namespace.ɵɵinject(RestService)); }, token: AbpApplicationConfigurationService, providedIn: "root" });
781
- AbpApplicationConfigurationService.decorators = [
782
- { type: i0.Injectable, args: [{
783
- providedIn: 'root',
784
- },] }
785
- ];
786
- AbpApplicationConfigurationService.ctorParameters = function () { return [
787
- { type: RestService }
788
- ]; };
751
+ AbpApplicationConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpApplicationConfigurationService, deps: [{ token: RestService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
752
+ AbpApplicationConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpApplicationConfigurationService, providedIn: 'root' });
753
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpApplicationConfigurationService, decorators: [{
754
+ type: i0.Injectable,
755
+ args: [{
756
+ providedIn: 'root',
757
+ }]
758
+ }], ctorParameters: function () { return [{ type: RestService }]; } });
789
759
 
790
760
  var ConfigStateService = /** @class */ (function () {
791
761
  function ConfigStateService(abpConfigService) {
@@ -805,14 +775,7 @@
805
775
  var _this = this;
806
776
  this.updateSubject
807
777
  .pipe(operators.switchMap(function () { return _this.abpConfigService.get(); }))
808
- .subscribe(function (res) { return _this.setState(res); });
809
- };
810
- /**
811
- * @deprecated do not use this method directly, instead call refreshAppState
812
- * This method will be private in v5.0
813
- */
814
- ConfigStateService.prototype.setState = function (state) {
815
- this.store.set(state);
778
+ .subscribe(function (res) { return _this.store.set(res); });
816
779
  };
817
780
  ConfigStateService.prototype.refreshAppState = function () {
818
781
  this.updateSubject.next();
@@ -913,15 +876,14 @@
913
876
  };
914
877
  return ConfigStateService;
915
878
  }());
916
- ConfigStateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ConfigStateService_Factory() { return new ConfigStateService(i0__namespace.ɵɵinject(AbpApplicationConfigurationService)); }, token: ConfigStateService, providedIn: "root" });
917
- ConfigStateService.decorators = [
918
- { type: i0.Injectable, args: [{
919
- providedIn: 'root',
920
- },] }
921
- ];
922
- ConfigStateService.ctorParameters = function () { return [
923
- { type: AbpApplicationConfigurationService }
924
- ]; };
879
+ ConfigStateService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ConfigStateService, deps: [{ token: AbpApplicationConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
880
+ ConfigStateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ConfigStateService, providedIn: 'root' });
881
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ConfigStateService, decorators: [{
882
+ type: i0.Injectable,
883
+ args: [{
884
+ providedIn: 'root',
885
+ }]
886
+ }], ctorParameters: function () { return [{ type: AbpApplicationConfigurationService }]; } });
925
887
  function splitKeys(keys) {
926
888
  if (typeof keys === 'string') {
927
889
  keys = keys.split('.');
@@ -932,738 +894,727 @@
932
894
  return keys;
933
895
  }
934
896
 
935
- var SessionStateService = /** @class */ (function () {
936
- function SessionStateService(configState) {
937
- var _this = this;
897
+ var PermissionService = /** @class */ (function () {
898
+ function PermissionService(configState) {
938
899
  this.configState = configState;
939
- this.store = new InternalStore({});
940
- this.updateLocalStorage = function () {
941
- localStorage.setItem('abpSession', JSON.stringify(_this.store.state));
942
- };
943
- this.init();
944
- this.setInitialLanguage();
945
900
  }
946
- SessionStateService.prototype.init = function () {
947
- var session = localStorage.getItem('abpSession');
948
- if (session) {
949
- this.store.set(JSON.parse(session));
950
- }
951
- this.store.sliceUpdate(function (state) { return state; }).subscribe(this.updateLocalStorage);
952
- };
953
- SessionStateService.prototype.setInitialLanguage = function () {
901
+ PermissionService.prototype.getGrantedPolicy$ = function (key) {
954
902
  var _this = this;
955
- if (this.getLanguage())
956
- return;
957
- this.configState
958
- .getDeep$('localization.currentCulture.cultureName')
959
- .pipe(operators.filter(function (cultureName) { return !!cultureName; }), operators.take(1))
960
- .subscribe(function (lang) {
961
- if (lang.includes(';')) {
962
- lang = lang.split(';')[0];
963
- }
964
- _this.setLanguage(lang);
965
- });
966
- };
967
- SessionStateService.prototype.onLanguageChange$ = function () {
968
- return this.store.sliceUpdate(function (state) { return state.language; });
969
- };
970
- SessionStateService.prototype.onTenantChange$ = function () {
971
- return this.store.sliceUpdate(function (state) { return state.tenant; });
972
- };
973
- SessionStateService.prototype.getLanguage = function () {
974
- return this.store.state.language;
975
- };
976
- SessionStateService.prototype.getLanguage$ = function () {
977
- return this.store.sliceState(function (state) { return state.language; });
903
+ return this.getStream().pipe(operators.map(function (grantedPolicies) { return _this.isPolicyGranted(key, grantedPolicies); }));
978
904
  };
979
- SessionStateService.prototype.getTenant = function () {
980
- return this.store.state.tenant;
905
+ PermissionService.prototype.getGrantedPolicy = function (key) {
906
+ var policies = this.getSnapshot();
907
+ return this.isPolicyGranted(key, policies);
981
908
  };
982
- SessionStateService.prototype.getTenant$ = function () {
983
- return this.store.sliceState(function (state) { return state.tenant; });
909
+ PermissionService.prototype.filterItemsByPolicy = function (items) {
910
+ var _this = this;
911
+ var policies = this.getSnapshot();
912
+ return items.filter(function (item) { return !item.requiredPolicy || _this.isPolicyGranted(item.requiredPolicy, policies); });
984
913
  };
985
- SessionStateService.prototype.setTenant = function (tenant) {
986
- if (compare__default['default'](tenant, this.store.state.tenant))
987
- return;
988
- this.store.set(Object.assign(Object.assign({}, this.store.state), { tenant: tenant }));
914
+ PermissionService.prototype.filterItemsByPolicy$ = function (items) {
915
+ var _this = this;
916
+ return this.getStream().pipe(operators.map(function (policies) { return items.filter(function (item) { return !item.requiredPolicy || _this.isPolicyGranted(item.requiredPolicy, policies); }); }));
989
917
  };
990
- SessionStateService.prototype.setLanguage = function (language) {
991
- if (language === this.store.state.language)
992
- return;
993
- this.store.patch({ language: language });
994
- document.documentElement.setAttribute('lang', language);
918
+ PermissionService.prototype.isPolicyGranted = function (key, grantedPolicies) {
919
+ var _this = this;
920
+ if (!key)
921
+ return true;
922
+ var orRegexp = /\|\|/g;
923
+ var andRegexp = /&&/g;
924
+ // TODO: Allow combination of ANDs & ORs
925
+ if (orRegexp.test(key)) {
926
+ var keys = key.split('||').filter(Boolean);
927
+ if (keys.length < 2)
928
+ return false;
929
+ return keys.some(function (k) { return _this.getPolicy(k.trim(), grantedPolicies); });
930
+ }
931
+ else if (andRegexp.test(key)) {
932
+ var keys = key.split('&&').filter(Boolean);
933
+ if (keys.length < 2)
934
+ return false;
935
+ return keys.every(function (k) { return _this.getPolicy(k.trim(), grantedPolicies); });
936
+ }
937
+ return this.getPolicy(key, grantedPolicies);
995
938
  };
996
- return SessionStateService;
939
+ PermissionService.prototype.getStream = function () {
940
+ return this.configState.getAll$().pipe(operators.map(this.mapToPolicies));
941
+ };
942
+ PermissionService.prototype.getSnapshot = function () {
943
+ return this.mapToPolicies(this.configState.getAll());
944
+ };
945
+ PermissionService.prototype.mapToPolicies = function (applicationConfiguration) {
946
+ var _a;
947
+ return ((_a = applicationConfiguration === null || applicationConfiguration === void 0 ? void 0 : applicationConfiguration.auth) === null || _a === void 0 ? void 0 : _a.grantedPolicies) || {};
948
+ };
949
+ PermissionService.prototype.getPolicy = function (key, grantedPolicies) {
950
+ return grantedPolicies[key] || false;
951
+ };
952
+ return PermissionService;
997
953
  }());
998
- SessionStateServiceprov = i0__namespace.ɵɵdefineInjectable({ factory: function SessionStateService_Factory() { return new SessionStateService(i0__namespace.ɵɵinject(ConfigStateService)); }, token: SessionStateService, providedIn: "root" });
999
- SessionStateService.decorators = [
1000
- { type: i0.Injectable, args: [{
1001
- providedIn: 'root',
1002
- },] }
1003
- ];
1004
- SessionStateService.ctorParameters = function () { return [
1005
- { type: ConfigStateService }
1006
- ]; };
954
+ PermissionServicefac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionService, deps: [{ token: ConfigStateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
955
+ PermissionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionService, providedIn: 'root' });
956
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionService, decorators: [{
957
+ type: i0.Injectable,
958
+ args: [{ providedIn: 'root' }]
959
+ }], ctorParameters: function () { return [{ type: ConfigStateService }]; } });
1007
960
 
1008
- var LocalizationService = /** @class */ (function () {
1009
- function LocalizationService(sessionState, injector, otherInstance, configState) {
1010
- this.sessionState = sessionState;
1011
- this.injector = injector;
1012
- this.configState = configState;
1013
- this.latestLang = this.sessionState.getLanguage();
1014
- this._languageChange$ = new rxjs.Subject();
1015
- if (otherInstance)
1016
- throw new Error('LocalizationService should have only one instance.');
1017
- this.listenToSetLanguage();
961
+ // eslint-disable-next-line @typescript-eslint/ban-types
962
+ var AbstractTreeService = /** @class */ (function () {
963
+ function AbstractTreeService() {
964
+ this._flat$ = new rxjs.BehaviorSubject([]);
965
+ this._tree$ = new rxjs.BehaviorSubject([]);
966
+ this._visible$ = new rxjs.BehaviorSubject([]);
1018
967
  }
1019
- Object.defineProperty(LocalizationService.prototype, "currentLang", {
1020
- /**
1021
- * Returns currently selected language
1022
- */
968
+ Object.defineProperty(AbstractTreeService.prototype, "flat", {
1023
969
  get: function () {
1024
- return this.latestLang || this.sessionState.getLanguage();
970
+ return this._flat$.value;
1025
971
  },
1026
972
  enumerable: false,
1027
973
  configurable: true
1028
974
  });
1029
- Object.defineProperty(LocalizationService.prototype, "languageChange$", {
975
+ Object.defineProperty(AbstractTreeService.prototype, "flat$", {
1030
976
  get: function () {
1031
- return this._languageChange$.asObservable();
977
+ return this._flat$.asObservable();
1032
978
  },
1033
979
  enumerable: false,
1034
980
  configurable: true
1035
981
  });
1036
- LocalizationService.prototype.listenToSetLanguage = function () {
1037
- var _this = this;
1038
- this.sessionState
1039
- .onLanguageChange$()
1040
- .pipe(operators.filter(function (lang) { return _this.configState.getDeep('localization.currentCulture.cultureName') !== lang; }), operators.switchMap(function (lang) { return _this.configState.refreshAppState().pipe(operators.mapTo(lang)); }), operators.switchMap(function (lang) { return rxjs.from(_this.registerLocale(lang).then(function () { return lang; })); }))
1041
- .subscribe(function (lang) { return _this._languageChange$.next(lang); });
1042
- };
1043
- LocalizationService.prototype.registerLocale = function (locale) {
1044
- var _this = this;
1045
- var registerLocaleFn = this.injector.get(CORE_OPTIONS).registerLocaleFn;
1046
- return registerLocaleFn(locale).then(function (module) {
1047
- if (module === null || module === void 0 ? void 0 : module.default)
1048
- common.registerLocaleData(module.default);
1049
- _this.latestLang = locale;
1050
- });
1051
- };
1052
- /**
1053
- * Returns an observable localized text with the given interpolation parameters in current language.
1054
- * @param key Localizaton key to replace with localized text
1055
- * @param interpolateParams Values to interpolate
1056
- */
1057
- LocalizationService.prototype.get = function (key) {
1058
- var interpolateParams = [];
1059
- for (var _i = 1; _i < arguments.length; _i++) {
1060
- interpolateParams[_i - 1] = arguments[_i];
1061
- }
1062
- return this.configState
1063
- .getAll$()
1064
- .pipe(operators.map(function (state) { return getLocalization.apply(void 0, __spread([state, key], interpolateParams)); }));
1065
- };
1066
- LocalizationService.prototype.getResource = function (resourceName) {
1067
- return this.configState.getDeep("localization.values." + resourceName);
1068
- };
1069
- LocalizationService.prototype.getResource$ = function (resourceName) {
1070
- return this.configState.getDeep$("localization.values." + resourceName);
1071
- };
1072
- /**
1073
- * Returns localized text with the given interpolation parameters in current language.
1074
- * @param key Localization key to replace with localized text
1075
- * @param interpolateParams Values to intepolate.
1076
- */
1077
- LocalizationService.prototype.instant = function (key) {
1078
- var interpolateParams = [];
1079
- for (var _i = 1; _i < arguments.length; _i++) {
1080
- interpolateParams[_i - 1] = arguments[_i];
1081
- }
1082
- return getLocalization.apply(void 0, __spread([this.configState.getAll(), key], interpolateParams));
1083
- };
1084
- LocalizationService.prototype.localize = function (resourceName, key, defaultValue) {
1085
- return this.configState.getOne$('localization').pipe(operators.map(createLocalizer), operators.map(function (localize) { return localize(resourceName, key, defaultValue); }));
1086
- };
1087
- LocalizationService.prototype.localizeSync = function (resourceName, key, defaultValue) {
1088
- var localization = this.configState.getOne('localization');
1089
- return createLocalizer(localization)(resourceName, key, defaultValue);
1090
- };
1091
- LocalizationService.prototype.localizeWithFallback = function (resourceNames, keys, defaultValue) {
1092
- return this.configState.getOne$('localization').pipe(operators.map(createLocalizerWithFallback), operators.map(function (localizeWithFallback) { return localizeWithFallback(resourceNames, keys, defaultValue); }));
1093
- };
1094
- LocalizationService.prototype.localizeWithFallbackSync = function (resourceNames, keys, defaultValue) {
1095
- var localization = this.configState.getOne('localization');
1096
- return createLocalizerWithFallback(localization)(resourceNames, keys, defaultValue);
1097
- };
1098
- return LocalizationService;
1099
- }());
1100
- LocalizationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LocalizationService_Factory() { return new LocalizationService(i0__namespace.ɵɵinject(SessionStateService), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(LocalizationService, 12), i0__namespace.ɵɵinject(ConfigStateService)); }, token: LocalizationService, providedIn: "root" });
1101
- LocalizationService.decorators = [
1102
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1103
- ];
1104
- LocalizationService.ctorParameters = function () { return [
1105
- { type: SessionStateService },
1106
- { type: i0.Injector },
1107
- { type: LocalizationService, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] },
1108
- { type: ConfigStateService }
1109
- ]; };
1110
- function getLocalization(state, key) {
1111
- var interpolateParams = [];
1112
- for (var _i = 2; _i < arguments.length; _i++) {
1113
- interpolateParams[_i - 2] = arguments[_i];
1114
- }
1115
- if (!key)
1116
- key = '';
1117
- var defaultValue;
1118
- if (typeof key !== 'string') {
1119
- defaultValue = key.defaultValue;
1120
- key = key.key;
1121
- }
1122
- var keys = key.split('::');
1123
- var warn = function (message) {
1124
- if (i0.isDevMode)
1125
- console.warn(message);
1126
- };
1127
- if (keys.length < 2) {
1128
- warn('The localization source separator (::) not found.');
1129
- return defaultValue || key;
1130
- }
1131
- if (!state.localization)
1132
- return defaultValue || keys[1];
1133
- var sourceName = keys[0] || state.localization.defaultResourceName;
1134
- var sourceKey = keys[1];
1135
- if (sourceName === '_') {
1136
- return defaultValue || sourceKey;
1137
- }
1138
- if (!sourceName) {
1139
- warn('Localization source name is not specified and the defaultResourceName was not defined!');
1140
- return defaultValue || sourceKey;
1141
- }
1142
- var source = state.localization.values[sourceName];
1143
- if (!source) {
1144
- warn('Could not find localization source: ' + sourceName);
1145
- return defaultValue || sourceKey;
1146
- }
1147
- var localization = source[sourceKey];
1148
- if (typeof localization === 'undefined') {
1149
- return defaultValue || sourceKey;
1150
- }
1151
- interpolateParams = interpolateParams.filter(function (params) { return params != null; });
1152
- if (localization)
1153
- localization = interpolate(localization, interpolateParams);
1154
- if (typeof localization !== 'string')
1155
- localization = '';
1156
- return localization || defaultValue || key;
1157
- }
1158
-
1159
- function findRoute(routesService, path) {
1160
- var node = routesService.find(function (route) { return route.path === path; });
1161
- return node || path === '/'
1162
- ? node
1163
- : findRoute(routesService, path.split('/').slice(0, -1).join('/') || '/');
1164
- }
1165
- function getRoutePath(router, url) {
1166
- if (url === void 0) { url = router.url; }
1167
- var emptyGroup = { segments: [] };
1168
- var primaryGroup = router.parseUrl(url).root.children[i1.PRIMARY_OUTLET];
1169
- return '/' + (primaryGroup || emptyGroup).segments.map(function (_a) {
1170
- var path = _a.path;
1171
- return path;
1172
- }).join('/');
1173
- }
1174
- function reloadRoute(router, ngZone) {
1175
- var _this = this;
1176
- var shouldReuseRoute = router.routeReuseStrategy.shouldReuseRoute;
1177
- var setRouteReuse = function (reuse) {
1178
- router.routeReuseStrategy.shouldReuseRoute = reuse;
1179
- };
1180
- setRouteReuse(function () { return false; });
1181
- router.navigated = false;
1182
- ngZone.run(function () { return __awaiter(_this, void 0, void 0, function () {
1183
- return __generator(this, function (_a) {
1184
- switch (_a.label) {
1185
- case 0: return [4 /*yield*/, router.navigateByUrl(router.url).catch(noop)];
1186
- case 1:
1187
- _a.sent();
1188
- setRouteReuse(shouldReuseRoute);
1189
- return [2 /*return*/];
1190
- }
1191
- });
1192
- }); });
1193
- }
1194
-
1195
- var ReplaceableComponentsService = /** @class */ (function () {
1196
- function ReplaceableComponentsService(ngZone, router) {
1197
- this.ngZone = ngZone;
1198
- this.router = router;
1199
- this.store = new InternalStore([]);
1200
- }
1201
- Object.defineProperty(ReplaceableComponentsService.prototype, "replaceableComponents$", {
982
+ Object.defineProperty(AbstractTreeService.prototype, "tree", {
1202
983
  get: function () {
1203
- return this.store.sliceState(function (state) { return state; });
984
+ return this._tree$.value;
1204
985
  },
1205
986
  enumerable: false,
1206
987
  configurable: true
1207
988
  });
1208
- Object.defineProperty(ReplaceableComponentsService.prototype, "replaceableComponents", {
989
+ Object.defineProperty(AbstractTreeService.prototype, "tree$", {
1209
990
  get: function () {
1210
- return this.store.state;
991
+ return this._tree$.asObservable();
1211
992
  },
1212
993
  enumerable: false,
1213
994
  configurable: true
1214
995
  });
1215
- Object.defineProperty(ReplaceableComponentsService.prototype, "onUpdate$", {
996
+ Object.defineProperty(AbstractTreeService.prototype, "visible", {
1216
997
  get: function () {
1217
- return this.store.sliceUpdate(function (state) { return state; });
998
+ return this._visible$.value;
1218
999
  },
1219
1000
  enumerable: false,
1220
1001
  configurable: true
1221
1002
  });
1222
- ReplaceableComponentsService.prototype.add = function (replaceableComponent, reload) {
1223
- var replaceableComponents = __spread(this.store.state);
1224
- var index = replaceableComponents.findIndex(function (component) { return component.key === replaceableComponent.key; });
1225
- if (index > -1) {
1226
- replaceableComponents[index] = replaceableComponent;
1227
- }
1228
- else {
1229
- replaceableComponents.push(replaceableComponent);
1230
- }
1231
- this.store.set(replaceableComponents);
1232
- if (reload)
1233
- reloadRoute(this.router, this.ngZone);
1234
- };
1235
- ReplaceableComponentsService.prototype.get = function (replaceableComponentKey) {
1236
- return this.replaceableComponents.find(function (component) { return component.key === replaceableComponentKey; });
1003
+ Object.defineProperty(AbstractTreeService.prototype, "visible$", {
1004
+ get: function () {
1005
+ return this._visible$.asObservable();
1006
+ },
1007
+ enumerable: false,
1008
+ configurable: true
1009
+ });
1010
+ AbstractTreeService.prototype.createTree = function (items) {
1011
+ var _this = this;
1012
+ return createTreeFromList(items, function (item) { return item[_this.id]; }, function (item) { return item[_this.parentId]; }, function (item) { return BaseTreeNode.create(item); });
1237
1013
  };
1238
- ReplaceableComponentsService.prototype.get$ = function (replaceableComponentKey) {
1239
- return this.replaceableComponents$.pipe(operators.map(function (components) { return components.find(function (component) { return component.key === replaceableComponentKey; }); }));
1014
+ AbstractTreeService.prototype.filterWith = function (setOrMap) {
1015
+ var _this = this;
1016
+ return this._flat$.value.filter(function (item) { return !setOrMap.has(item[_this.id]); });
1240
1017
  };
1241
- return ReplaceableComponentsService;
1242
- }());
1243
- ReplaceableComponentsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ReplaceableComponentsService_Factory() { return new ReplaceableComponentsService(i0__namespace.ɵɵinject(i0__namespace.NgZone), i0__namespace.ɵɵinject(i1__namespace.Router)); }, token: ReplaceableComponentsService, providedIn: "root" });
1244
- ReplaceableComponentsService.decorators = [
1245
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1246
- ];
1247
- ReplaceableComponentsService.ctorParameters = function () { return [
1248
- { type: i0.NgZone },
1249
- { type: i1.Router }
1250
- ]; };
1251
-
1252
- var NavigationEvent = {
1253
- Cancel: i1.NavigationCancel,
1254
- End: i1.NavigationEnd,
1255
- Error: i1.NavigationError,
1256
- Start: i1.NavigationStart,
1257
- };
1258
- var RouterEvents = /** @class */ (function () {
1259
- function RouterEvents(router) {
1260
- this.router = router;
1261
- }
1262
- RouterEvents.prototype.getEvents = function () {
1263
- var eventTypes = [];
1264
- for (var _i = 0; _i < arguments.length; _i++) {
1265
- eventTypes[_i] = arguments[_i];
1266
- }
1267
- var filterRouterEvents = function (event) { return eventTypes.some(function (type) { return event instanceof type; }); };
1268
- return this.router.events.pipe(operators.filter(filterRouterEvents));
1018
+ AbstractTreeService.prototype.findItemsToRemove = function (set) {
1019
+ var _this = this;
1020
+ return this._flat$.value.reduce(function (acc, item) {
1021
+ if (!acc.has(item[_this.parentId]))
1022
+ return acc;
1023
+ var childSet = new Set([item[_this.id]]);
1024
+ var children = _this.findItemsToRemove(childSet);
1025
+ return new Set(__spreadArray(__spreadArray([], __read(acc)), __read(children)));
1026
+ }, set);
1269
1027
  };
1270
- RouterEvents.prototype.getNavigationEvents = function () {
1271
- var navigationEventKeys = [];
1272
- for (var _i = 0; _i < arguments.length; _i++) {
1273
- navigationEventKeys[_i] = arguments[_i];
1274
- }
1275
- var filterNavigationEvents = function (event) { return navigationEventKeys.some(function (key) { return event instanceof NavigationEvent[key]; }); };
1276
- return this.router.events.pipe(operators.filter(filterNavigationEvents));
1028
+ AbstractTreeService.prototype.publish = function (flatItems, visibleItems) {
1029
+ this._flat$.next(flatItems);
1030
+ this._tree$.next(this.createTree(flatItems));
1031
+ this._visible$.next(this.createTree(visibleItems));
1032
+ return flatItems;
1277
1033
  };
1278
- RouterEvents.prototype.getAllEvents = function () {
1279
- return this.router.events;
1034
+ AbstractTreeService.prototype.add = function (items) {
1035
+ var _this = this;
1036
+ var map = new Map();
1037
+ items.forEach(function (item) { return map.set(item[_this.id], item); });
1038
+ var flatItems = this.filterWith(map);
1039
+ map.forEach(pushValueTo(flatItems));
1040
+ flatItems.sort(this.sort);
1041
+ var visibleItems = flatItems.filter(function (item) { return !_this.hide(item); });
1042
+ return this.publish(flatItems, visibleItems);
1280
1043
  };
1281
- RouterEvents.prototype.getAllNavigationEvents = function () {
1282
- var keys = Object.keys(NavigationEvent);
1283
- return this.getNavigationEvents.apply(this, __spread(keys));
1044
+ AbstractTreeService.prototype.find = function (predicate, tree) {
1045
+ var _this = this;
1046
+ if (tree === void 0) { tree = this.tree; }
1047
+ return tree.reduce(function (acc, node) { return (acc ? acc : predicate(node) ? node : _this.find(predicate, node.children)); }, null);
1284
1048
  };
1285
- return RouterEvents;
1049
+ AbstractTreeService.prototype.patch = function (identifier, props) {
1050
+ var _this = this;
1051
+ var flatItems = this._flat$.value;
1052
+ var index = flatItems.findIndex(function (item) { return item[_this.id] === identifier; });
1053
+ if (index < 0)
1054
+ return false;
1055
+ flatItems[index] = Object.assign(Object.assign({}, flatItems[index]), props);
1056
+ flatItems.sort(this.sort);
1057
+ var visibleItems = flatItems.filter(function (item) { return !_this.hide(item); });
1058
+ return this.publish(flatItems, visibleItems);
1059
+ };
1060
+ AbstractTreeService.prototype.refresh = function () {
1061
+ return this.add([]);
1062
+ };
1063
+ AbstractTreeService.prototype.remove = function (identifiers) {
1064
+ var _this = this;
1065
+ var set = new Set();
1066
+ identifiers.forEach(function (id) { return set.add(id); });
1067
+ var setToRemove = this.findItemsToRemove(set);
1068
+ var flatItems = this.filterWith(setToRemove);
1069
+ var visibleItems = flatItems.filter(function (item) { return !_this.hide(item); });
1070
+ return this.publish(flatItems, visibleItems);
1071
+ };
1072
+ AbstractTreeService.prototype.search = function (params, tree) {
1073
+ var _this = this;
1074
+ if (tree === void 0) { tree = this.tree; }
1075
+ var searchKeys = Object.keys(params);
1076
+ return tree.reduce(function (acc, node) { return acc
1077
+ ? acc
1078
+ : searchKeys.every(function (key) { return node[key] === params[key]; })
1079
+ ? node
1080
+ : _this.search(params, node.children); }, null);
1081
+ };
1082
+ return AbstractTreeService;
1286
1083
  }());
1287
- RouterEvents.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function RouterEvents_Factory() { return new RouterEvents(i0__namespace.ɵɵinject(i1__namespace.Router)); }, token: RouterEvents, providedIn: "root" });
1288
- RouterEvents.decorators = [
1289
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1290
- ];
1291
- RouterEvents.ctorParameters = function () { return [
1292
- { type: i1.Router }
1293
- ]; };
1294
-
1295
- function pushValueTo(array) {
1296
- return function (element) {
1297
- array.push(element);
1298
- return array;
1084
+ var AbstractNavTreeService = /** @class */ (function (_super) {
1085
+ __extends(AbstractNavTreeService, _super);
1086
+ function AbstractNavTreeService(injector) {
1087
+ var _this = _super.call(this) || this;
1088
+ _this.injector = injector;
1089
+ _this.id = 'name';
1090
+ _this.parentId = 'parentName';
1091
+ _this.hide = function (item) { return item.invisible || !_this.isGranted(item); };
1092
+ _this.sort = function (a, b) {
1093
+ if (!Number.isInteger(a.order))
1094
+ return 1;
1095
+ if (!Number.isInteger(b.order))
1096
+ return -1;
1097
+ return a.order - b.order;
1098
+ };
1099
+ var configState = _this.injector.get(ConfigStateService);
1100
+ _this.subscription = configState
1101
+ .createOnUpdateStream(function (state) { return state; })
1102
+ .subscribe(function () { return _this.refresh(); });
1103
+ _this.permissionService = injector.get(PermissionService);
1104
+ return _this;
1105
+ }
1106
+ AbstractNavTreeService.prototype.isGranted = function (_b) {
1107
+ var requiredPolicy = _b.requiredPolicy;
1108
+ return this.permissionService.getGrantedPolicy(requiredPolicy);
1299
1109
  };
1300
- }
1110
+ AbstractNavTreeService.prototype.hasChildren = function (identifier) {
1111
+ var _this = this;
1112
+ var _a;
1113
+ var node = this.find(function (item) { return item[_this.id] === identifier; });
1114
+ return Boolean((_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.length);
1115
+ };
1116
+ AbstractNavTreeService.prototype.hasInvisibleChild = function (identifier) {
1117
+ var _this = this;
1118
+ var _a;
1119
+ var node = this.find(function (item) { return item[_this.id] === identifier; });
1120
+ return (_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.some(function (child) { return child.invisible; });
1121
+ };
1122
+ /* istanbul ignore next */
1123
+ AbstractNavTreeService.prototype.ngOnDestroy = function () {
1124
+ this.subscription.unsubscribe();
1125
+ };
1126
+ return AbstractNavTreeService;
1127
+ }(AbstractTreeService));
1128
+ AbstractNavTreeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbstractNavTreeService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1129
+ AbstractNavTreeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbstractNavTreeService });
1130
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbstractNavTreeService, decorators: [{
1131
+ type: i0.Injectable
1132
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
1133
+ var RoutesService = /** @class */ (function (_super) {
1134
+ __extends(RoutesService, _super);
1135
+ function RoutesService() {
1136
+ return _super !== null && _super.apply(this, arguments) || this;
1137
+ }
1138
+ return RoutesService;
1139
+ }(AbstractNavTreeService));
1140
+ RoutesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RoutesService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
1141
+ RoutesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RoutesService, providedIn: 'root' });
1142
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RoutesService, decorators: [{
1143
+ type: i0.Injectable,
1144
+ args: [{ providedIn: 'root' }]
1145
+ }] });
1301
1146
 
1302
- var BaseTreeNode = /** @class */ (function () {
1303
- function BaseTreeNode(props) {
1304
- this.children = [];
1305
- this.isLeaf = true;
1306
- Object.assign(this, props);
1147
+ var SubscriptionService = /** @class */ (function () {
1148
+ function SubscriptionService() {
1149
+ this.subscription = new rxjs.Subscription();
1307
1150
  }
1308
- BaseTreeNode.create = function (props) {
1309
- return new BaseTreeNode(props);
1151
+ Object.defineProperty(SubscriptionService.prototype, "isClosed", {
1152
+ get: function () {
1153
+ return this.subscription.closed;
1154
+ },
1155
+ enumerable: false,
1156
+ configurable: true
1157
+ });
1158
+ SubscriptionService.prototype.addOne = function (source$, nextOrObserver, error) {
1159
+ var subscription = source$.subscribe(nextOrObserver, error);
1160
+ this.subscription.add(subscription);
1161
+ return subscription;
1310
1162
  };
1311
- return BaseTreeNode;
1312
- }());
1313
- function createTreeFromList(list, keySelector, parentKeySelector, valueMapper) {
1314
- var map = createMapFromList(list, keySelector, valueMapper);
1315
- var tree = [];
1316
- list.forEach(function (row) {
1317
- var id = keySelector(row);
1318
- var parentId = parentKeySelector(row);
1319
- var node = map.get(id);
1320
- if (!node)
1163
+ SubscriptionService.prototype.closeAll = function () {
1164
+ this.subscription.unsubscribe();
1165
+ };
1166
+ SubscriptionService.prototype.closeOne = function (subscription) {
1167
+ this.removeOne(subscription);
1168
+ subscription.unsubscribe();
1169
+ };
1170
+ SubscriptionService.prototype.ngOnDestroy = function () {
1171
+ this.subscription.unsubscribe();
1172
+ };
1173
+ SubscriptionService.prototype.removeOne = function (subscription) {
1174
+ if (!subscription)
1321
1175
  return;
1322
- if (parentId) {
1323
- var parent = map.get(parentId);
1324
- if (!parent)
1325
- return;
1326
- parent.children.push(node);
1327
- parent.isLeaf = false;
1328
- node.parent = parent;
1329
- }
1330
- else {
1331
- tree.push(node);
1332
- }
1333
- });
1334
- return tree;
1176
+ this.subscription.remove(subscription);
1177
+ };
1178
+ SubscriptionService.prototype.reset = function () {
1179
+ this.subscription.unsubscribe();
1180
+ this.subscription = new rxjs.Subscription();
1181
+ };
1182
+ return SubscriptionService;
1183
+ }());
1184
+ SubscriptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SubscriptionService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1185
+ SubscriptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SubscriptionService });
1186
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SubscriptionService, decorators: [{
1187
+ type: i0.Injectable
1188
+ }] });
1189
+
1190
+ function findRoute(routesService, path) {
1191
+ var node = routesService.find(function (route) { return route.path === path; });
1192
+ return node || path === '/'
1193
+ ? node
1194
+ : findRoute(routesService, path.split('/').slice(0, -1).join('/') || '/');
1335
1195
  }
1336
- function createMapFromList(list, keySelector, valueMapper) {
1337
- var map = new Map();
1338
- list.forEach(function (row) { return map.set(keySelector(row), valueMapper(row)); });
1339
- return map;
1196
+ function getRoutePath(router, url) {
1197
+ if (url === void 0) { url = router.url; }
1198
+ var emptyGroup = { segments: [] };
1199
+ var primaryGroup = router.parseUrl(url).root.children[i1$1.PRIMARY_OUTLET];
1200
+ return '/' + (primaryGroup || emptyGroup).segments.map(function (_a) {
1201
+ var path = _a.path;
1202
+ return path;
1203
+ }).join('/');
1340
1204
  }
1341
- function createTreeNodeFilterCreator(key, mapperFn) {
1342
- return function (search) {
1343
- var regex = new RegExp('.*' + search + '.*', 'i');
1344
- return function collectNodes(nodes, matches) {
1345
- var e_1, _a;
1346
- if (matches === void 0) { matches = []; }
1347
- try {
1348
- for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {
1349
- var node = nodes_1_1.value;
1350
- if (regex.test(mapperFn(node[key])))
1351
- matches.push(node);
1352
- if (node.children.length)
1353
- collectNodes(node.children, matches);
1354
- }
1205
+ function reloadRoute(router, ngZone) {
1206
+ var _this = this;
1207
+ var shouldReuseRoute = router.routeReuseStrategy.shouldReuseRoute;
1208
+ var setRouteReuse = function (reuse) {
1209
+ router.routeReuseStrategy.shouldReuseRoute = reuse;
1210
+ };
1211
+ setRouteReuse(function () { return false; });
1212
+ router.navigated = false;
1213
+ ngZone.run(function () { return __awaiter(_this, void 0, void 0, function () {
1214
+ return __generator(this, function (_a) {
1215
+ switch (_a.label) {
1216
+ case 0: return [4 /*yield*/, router.navigateByUrl(router.url).catch(noop)];
1217
+ case 1:
1218
+ _a.sent();
1219
+ setRouteReuse(shouldReuseRoute);
1220
+ return [2 /*return*/];
1355
1221
  }
1356
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1357
- finally {
1358
- try {
1359
- if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);
1360
- }
1361
- finally { if (e_1) throw e_1.error; }
1222
+ });
1223
+ }); });
1224
+ }
1225
+
1226
+ // This will not be necessary when only Angukar 9.1+ is supported
1227
+ function getLocaleDirection(locale) {
1228
+ 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)
1229
+ ? 'rtl'
1230
+ : 'ltr';
1231
+ }
1232
+ function createLocalizer(localization) {
1233
+ return function (resourceName, key, defaultValue) {
1234
+ var _a;
1235
+ if (resourceName === '_')
1236
+ return key;
1237
+ var resource = (_a = localization === null || localization === void 0 ? void 0 : localization.values) === null || _a === void 0 ? void 0 : _a[resourceName];
1238
+ if (!resource)
1239
+ return defaultValue;
1240
+ return resource[key] || defaultValue;
1241
+ };
1242
+ }
1243
+ function createLocalizerWithFallback(localization) {
1244
+ var findLocalization = createLocalizationFinder(localization);
1245
+ return function (resourceNames, keys, defaultValue) {
1246
+ var localized = findLocalization(resourceNames, keys).localized;
1247
+ return localized || defaultValue;
1248
+ };
1249
+ }
1250
+ function createLocalizationPipeKeyGenerator(localization) {
1251
+ var findLocalization = createLocalizationFinder(localization);
1252
+ return function (resourceNames, keys, defaultKey) {
1253
+ var _b = findLocalization(resourceNames, keys), resourceName = _b.resourceName, key = _b.key;
1254
+ return !resourceName ? defaultKey : resourceName === '_' ? key : resourceName + "::" + key;
1255
+ };
1256
+ }
1257
+ function createLocalizationFinder(localization) {
1258
+ var localize = createLocalizer(localization);
1259
+ return function (resourceNames, keys) {
1260
+ resourceNames = resourceNames.concat(localization.defaultResourceName).filter(Boolean);
1261
+ var resourceCount = resourceNames.length;
1262
+ var keyCount = keys.length;
1263
+ for (var i = 0; i < resourceCount; i++) {
1264
+ var resourceName = resourceNames[i];
1265
+ for (var j = 0; j < keyCount; j++) {
1266
+ var key = keys[j];
1267
+ var localized = localize(resourceName, key, null);
1268
+ if (localized)
1269
+ return { resourceName: resourceName, key: key, localized: localized };
1362
1270
  }
1363
- return matches;
1364
- };
1271
+ }
1272
+ return { resourceName: undefined, key: undefined, localized: undefined };
1365
1273
  };
1366
1274
  }
1367
1275
 
1368
- var PermissionService = /** @class */ (function () {
1369
- function PermissionService(configState) {
1276
+ function createTokenParser(format) {
1277
+ return function (str) {
1278
+ var tokens = [];
1279
+ var regex = format.replace(/\./g, '\\.').replace(/\{\s?([0-9a-zA-Z]+)\s?\}/g, function (_, token) {
1280
+ tokens.push(token);
1281
+ return '(.+)';
1282
+ });
1283
+ var matches = (str.match(regex) || []).slice(1);
1284
+ return matches.reduce(function (acc, v, i) {
1285
+ var key = tokens[i];
1286
+ acc[key] = __spreadArray(__spreadArray([], __read((acc[key] || []))), [v]).filter(Boolean);
1287
+ return acc;
1288
+ }, {});
1289
+ };
1290
+ }
1291
+ function interpolate(text, params) {
1292
+ return text
1293
+ .replace(/(['"]?\{\s*(\d+)\s*\}['"]?)/g, function (_, match, digit) { var _a; return (_a = params[digit]) !== null && _a !== void 0 ? _a : match; })
1294
+ .replace(/\s+/g, ' ');
1295
+ }
1296
+
1297
+ var SessionStateService = /** @class */ (function () {
1298
+ function SessionStateService(configState) {
1299
+ var _this = this;
1370
1300
  this.configState = configState;
1301
+ this.store = new InternalStore({});
1302
+ this.updateLocalStorage = function () {
1303
+ localStorage.setItem('abpSession', JSON.stringify(_this.store.state));
1304
+ };
1305
+ this.init();
1306
+ this.setInitialLanguage();
1371
1307
  }
1372
- PermissionService.prototype.getGrantedPolicy$ = function (key) {
1308
+ SessionStateService.prototype.init = function () {
1309
+ var session = localStorage.getItem('abpSession');
1310
+ if (session) {
1311
+ this.store.set(JSON.parse(session));
1312
+ }
1313
+ this.store.sliceUpdate(function (state) { return state; }).subscribe(this.updateLocalStorage);
1314
+ };
1315
+ SessionStateService.prototype.setInitialLanguage = function () {
1373
1316
  var _this = this;
1374
- return this.getStream().pipe(operators.map(function (grantedPolicies) { return _this.isPolicyGranted(key, grantedPolicies); }));
1317
+ if (this.getLanguage())
1318
+ return;
1319
+ this.configState
1320
+ .getDeep$('localization.currentCulture.cultureName')
1321
+ .pipe(operators.filter(function (cultureName) { return !!cultureName; }), operators.take(1))
1322
+ .subscribe(function (lang) {
1323
+ if (lang.includes(';')) {
1324
+ lang = lang.split(';')[0];
1325
+ }
1326
+ _this.setLanguage(lang);
1327
+ });
1375
1328
  };
1376
- PermissionService.prototype.getGrantedPolicy = function (key) {
1377
- var policies = this.getSnapshot();
1378
- return this.isPolicyGranted(key, policies);
1329
+ SessionStateService.prototype.onLanguageChange$ = function () {
1330
+ return this.store.sliceUpdate(function (state) { return state.language; });
1379
1331
  };
1380
- PermissionService.prototype.filterItemsByPolicy = function (items) {
1381
- var _this = this;
1382
- var policies = this.getSnapshot();
1383
- return items.filter(function (item) { return !item.requiredPolicy || _this.isPolicyGranted(item.requiredPolicy, policies); });
1332
+ SessionStateService.prototype.onTenantChange$ = function () {
1333
+ return this.store.sliceUpdate(function (state) { return state.tenant; });
1384
1334
  };
1385
- PermissionService.prototype.filterItemsByPolicy$ = function (items) {
1386
- var _this = this;
1387
- return this.getStream().pipe(operators.map(function (policies) { return items.filter(function (item) { return !item.requiredPolicy || _this.isPolicyGranted(item.requiredPolicy, policies); }); }));
1335
+ SessionStateService.prototype.getLanguage = function () {
1336
+ return this.store.state.language;
1388
1337
  };
1389
- PermissionService.prototype.isPolicyGranted = function (key, grantedPolicies) {
1390
- var _this = this;
1391
- if (!key)
1392
- return true;
1393
- var orRegexp = /\|\|/g;
1394
- var andRegexp = /&&/g;
1395
- // TODO: Allow combination of ANDs & ORs
1396
- if (orRegexp.test(key)) {
1397
- var keys = key.split('||').filter(Boolean);
1398
- if (keys.length < 2)
1399
- return false;
1400
- return keys.some(function (k) { return _this.getPolicy(k.trim(), grantedPolicies); });
1401
- }
1402
- else if (andRegexp.test(key)) {
1403
- var keys = key.split('&&').filter(Boolean);
1404
- if (keys.length < 2)
1405
- return false;
1406
- return keys.every(function (k) { return _this.getPolicy(k.trim(), grantedPolicies); });
1407
- }
1408
- return this.getPolicy(key, grantedPolicies);
1338
+ SessionStateService.prototype.getLanguage$ = function () {
1339
+ return this.store.sliceState(function (state) { return state.language; });
1409
1340
  };
1410
- PermissionService.prototype.getStream = function () {
1411
- return this.configState.getAll$().pipe(operators.map(this.mapToPolicies));
1341
+ SessionStateService.prototype.getTenant = function () {
1342
+ return this.store.state.tenant;
1412
1343
  };
1413
- PermissionService.prototype.getSnapshot = function () {
1414
- return this.mapToPolicies(this.configState.getAll());
1344
+ SessionStateService.prototype.getTenant$ = function () {
1345
+ return this.store.sliceState(function (state) { return state.tenant; });
1415
1346
  };
1416
- PermissionService.prototype.mapToPolicies = function (applicationConfiguration) {
1417
- return snq__default['default'](function () { return applicationConfiguration.auth.grantedPolicies; }, {});
1347
+ SessionStateService.prototype.setTenant = function (tenant) {
1348
+ if (compare__default['default'](tenant, this.store.state.tenant))
1349
+ return;
1350
+ this.store.set(Object.assign(Object.assign({}, this.store.state), { tenant: tenant }));
1418
1351
  };
1419
- PermissionService.prototype.getPolicy = function (key, grantedPolicies) {
1420
- return snq__default['default'](function () { return grantedPolicies[key]; }, false);
1352
+ SessionStateService.prototype.setLanguage = function (language) {
1353
+ if (language === this.store.state.language)
1354
+ return;
1355
+ this.store.patch({ language: language });
1356
+ document.documentElement.setAttribute('lang', language);
1421
1357
  };
1422
- return PermissionService;
1358
+ return SessionStateService;
1423
1359
  }());
1424
- PermissionServiceprov = i0__namespace.ɵɵdefineInjectable({ factory: function PermissionService_Factory() { return new PermissionService(i0__namespace.ɵɵinject(ConfigStateService)); }, token: PermissionService, providedIn: "root" });
1425
- PermissionService.decorators = [
1426
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1427
- ];
1428
- PermissionService.ctorParameters = function () { return [
1429
- { type: ConfigStateService }
1430
- ]; };
1360
+ SessionStateServicefac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SessionStateService, deps: [{ token: ConfigStateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1361
+ SessionStateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SessionStateService, providedIn: 'root' });
1362
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SessionStateService, decorators: [{
1363
+ type: i0.Injectable,
1364
+ args: [{
1365
+ providedIn: 'root',
1366
+ }]
1367
+ }], ctorParameters: function () { return [{ type: ConfigStateService }]; } });
1431
1368
 
1432
- var AbstractTreeService = /** @class */ (function () {
1433
- function AbstractTreeService() {
1434
- this._flat$ = new rxjs.BehaviorSubject([]);
1435
- this._tree$ = new rxjs.BehaviorSubject([]);
1436
- this._visible$ = new rxjs.BehaviorSubject([]);
1437
- }
1438
- Object.defineProperty(AbstractTreeService.prototype, "flat", {
1439
- get: function () {
1440
- return this._flat$.value;
1441
- },
1442
- enumerable: false,
1443
- configurable: true
1444
- });
1445
- Object.defineProperty(AbstractTreeService.prototype, "flat$", {
1446
- get: function () {
1447
- return this._flat$.asObservable();
1448
- },
1449
- enumerable: false,
1450
- configurable: true
1451
- });
1452
- Object.defineProperty(AbstractTreeService.prototype, "tree", {
1453
- get: function () {
1454
- return this._tree$.value;
1455
- },
1456
- enumerable: false,
1457
- configurable: true
1458
- });
1459
- Object.defineProperty(AbstractTreeService.prototype, "tree$", {
1460
- get: function () {
1461
- return this._tree$.asObservable();
1462
- },
1463
- enumerable: false,
1464
- configurable: true
1465
- });
1466
- Object.defineProperty(AbstractTreeService.prototype, "visible", {
1369
+ var LocalizationService = /** @class */ (function () {
1370
+ function LocalizationService(sessionState, injector, otherInstance, configState) {
1371
+ this.sessionState = sessionState;
1372
+ this.injector = injector;
1373
+ this.configState = configState;
1374
+ this.latestLang = this.sessionState.getLanguage();
1375
+ this._languageChange$ = new rxjs.Subject();
1376
+ if (otherInstance)
1377
+ throw new Error('LocalizationService should have only one instance.');
1378
+ this.listenToSetLanguage();
1379
+ }
1380
+ Object.defineProperty(LocalizationService.prototype, "currentLang", {
1381
+ /**
1382
+ * Returns currently selected language
1383
+ */
1467
1384
  get: function () {
1468
- return this._visible$.value;
1385
+ return this.latestLang || this.sessionState.getLanguage();
1469
1386
  },
1470
1387
  enumerable: false,
1471
1388
  configurable: true
1472
1389
  });
1473
- Object.defineProperty(AbstractTreeService.prototype, "visible$", {
1390
+ Object.defineProperty(LocalizationService.prototype, "languageChange$", {
1474
1391
  get: function () {
1475
- return this._visible$.asObservable();
1392
+ return this._languageChange$.asObservable();
1476
1393
  },
1477
1394
  enumerable: false,
1478
1395
  configurable: true
1479
1396
  });
1480
- AbstractTreeService.prototype.createTree = function (items) {
1397
+ LocalizationService.prototype.listenToSetLanguage = function () {
1481
1398
  var _this = this;
1482
- return createTreeFromList(items, function (item) { return item[_this.id]; }, function (item) { return item[_this.parentId]; }, function (item) { return BaseTreeNode.create(item); });
1399
+ this.sessionState
1400
+ .onLanguageChange$()
1401
+ .pipe(operators.filter(function (lang) { return _this.configState.getDeep('localization.currentCulture.cultureName') !== lang; }), operators.switchMap(function (lang) { return _this.configState.refreshAppState().pipe(operators.mapTo(lang)); }), operators.switchMap(function (lang) { return rxjs.from(_this.registerLocale(lang).then(function () { return lang; })); }))
1402
+ .subscribe(function (lang) { return _this._languageChange$.next(lang); });
1483
1403
  };
1484
- AbstractTreeService.prototype.filterWith = function (setOrMap) {
1404
+ LocalizationService.prototype.registerLocale = function (locale) {
1485
1405
  var _this = this;
1486
- return this._flat$.value.filter(function (item) { return !setOrMap.has(item[_this.id]); });
1406
+ var registerLocaleFn = this.injector.get(CORE_OPTIONS).registerLocaleFn;
1407
+ return registerLocaleFn(locale).then(function (module) {
1408
+ if (module === null || module === void 0 ? void 0 : module.default)
1409
+ i5.registerLocaleData(module.default);
1410
+ _this.latestLang = locale;
1411
+ });
1487
1412
  };
1488
- AbstractTreeService.prototype.findItemsToRemove = function (set) {
1489
- var _this = this;
1490
- return this._flat$.value.reduce(function (acc, item) {
1491
- if (!acc.has(item[_this.parentId]))
1492
- return acc;
1493
- var childSet = new Set([item[_this.id]]);
1494
- var children = _this.findItemsToRemove(childSet);
1495
- return new Set(__spread(acc, children));
1496
- }, set);
1413
+ /**
1414
+ * Returns an observable localized text with the given interpolation parameters in current language.
1415
+ * @param key Localizaton key to replace with localized text
1416
+ * @param interpolateParams Values to interpolate
1417
+ */
1418
+ LocalizationService.prototype.get = function (key) {
1419
+ var interpolateParams = [];
1420
+ for (var _i = 1; _i < arguments.length; _i++) {
1421
+ interpolateParams[_i - 1] = arguments[_i];
1422
+ }
1423
+ return this.configState
1424
+ .getAll$()
1425
+ .pipe(operators.map(function (state) { return getLocalization.apply(void 0, __spreadArray([state, key], __read(interpolateParams))); }));
1497
1426
  };
1498
- AbstractTreeService.prototype.publish = function (flatItems, visibleItems) {
1499
- this._flat$.next(flatItems);
1500
- this._tree$.next(this.createTree(flatItems));
1501
- this._visible$.next(this.createTree(visibleItems));
1502
- return flatItems;
1427
+ LocalizationService.prototype.getResource = function (resourceName) {
1428
+ return this.configState.getDeep("localization.values." + resourceName);
1503
1429
  };
1504
- AbstractTreeService.prototype.add = function (items) {
1505
- var _this = this;
1506
- var map = new Map();
1507
- items.forEach(function (item) { return map.set(item[_this.id], item); });
1508
- var flatItems = this.filterWith(map);
1509
- map.forEach(pushValueTo(flatItems));
1510
- flatItems.sort(this.sort);
1511
- var visibleItems = flatItems.filter(function (item) { return !_this.hide(item); });
1512
- return this.publish(flatItems, visibleItems);
1430
+ LocalizationService.prototype.getResource$ = function (resourceName) {
1431
+ return this.configState.getDeep$("localization.values." + resourceName);
1513
1432
  };
1514
- AbstractTreeService.prototype.find = function (predicate, tree) {
1515
- var _this = this;
1516
- if (tree === void 0) { tree = this.tree; }
1517
- return tree.reduce(function (acc, node) { return (acc ? acc : predicate(node) ? node : _this.find(predicate, node.children)); }, null);
1433
+ /**
1434
+ * Returns localized text with the given interpolation parameters in current language.
1435
+ * @param key Localization key to replace with localized text
1436
+ * @param interpolateParams Values to intepolate.
1437
+ */
1438
+ LocalizationService.prototype.instant = function (key) {
1439
+ var interpolateParams = [];
1440
+ for (var _i = 1; _i < arguments.length; _i++) {
1441
+ interpolateParams[_i - 1] = arguments[_i];
1442
+ }
1443
+ return getLocalization.apply(void 0, __spreadArray([this.configState.getAll(), key], __read(interpolateParams)));
1518
1444
  };
1519
- AbstractTreeService.prototype.patch = function (identifier, props) {
1520
- var _this = this;
1521
- var flatItems = this._flat$.value;
1522
- var index = flatItems.findIndex(function (item) { return item[_this.id] === identifier; });
1523
- if (index < 0)
1524
- return false;
1525
- flatItems[index] = Object.assign(Object.assign({}, flatItems[index]), props);
1526
- flatItems.sort(this.sort);
1527
- var visibleItems = flatItems.filter(function (item) { return !_this.hide(item); });
1528
- return this.publish(flatItems, visibleItems);
1445
+ LocalizationService.prototype.localize = function (resourceName, key, defaultValue) {
1446
+ return this.configState.getOne$('localization').pipe(operators.map(createLocalizer), operators.map(function (localize) { return localize(resourceName, key, defaultValue); }));
1529
1447
  };
1530
- AbstractTreeService.prototype.refresh = function () {
1531
- return this.add([]);
1448
+ LocalizationService.prototype.localizeSync = function (resourceName, key, defaultValue) {
1449
+ var localization = this.configState.getOne('localization');
1450
+ return createLocalizer(localization)(resourceName, key, defaultValue);
1532
1451
  };
1533
- AbstractTreeService.prototype.remove = function (identifiers) {
1534
- var _this = this;
1535
- var set = new Set();
1536
- identifiers.forEach(function (id) { return set.add(id); });
1537
- var setToRemove = this.findItemsToRemove(set);
1538
- var flatItems = this.filterWith(setToRemove);
1539
- var visibleItems = flatItems.filter(function (item) { return !_this.hide(item); });
1540
- return this.publish(flatItems, visibleItems);
1452
+ LocalizationService.prototype.localizeWithFallback = function (resourceNames, keys, defaultValue) {
1453
+ return this.configState.getOne$('localization').pipe(operators.map(createLocalizerWithFallback), operators.map(function (localizeWithFallback) { return localizeWithFallback(resourceNames, keys, defaultValue); }));
1541
1454
  };
1542
- AbstractTreeService.prototype.search = function (params, tree) {
1543
- var _this = this;
1544
- if (tree === void 0) { tree = this.tree; }
1545
- var searchKeys = Object.keys(params);
1546
- return tree.reduce(function (acc, node) { return acc
1547
- ? acc
1548
- : searchKeys.every(function (key) { return node[key] === params[key]; })
1549
- ? node
1550
- : _this.search(params, node.children); }, null);
1455
+ LocalizationService.prototype.localizeWithFallbackSync = function (resourceNames, keys, defaultValue) {
1456
+ var localization = this.configState.getOne('localization');
1457
+ return createLocalizerWithFallback(localization)(resourceNames, keys, defaultValue);
1551
1458
  };
1552
- return AbstractTreeService;
1459
+ return LocalizationService;
1553
1460
  }());
1554
- var AbstractNavTreeService = /** @class */ (function (_super) {
1555
- __extends(AbstractNavTreeService, _super);
1556
- function AbstractNavTreeService(injector) {
1557
- var _this = _super.call(this) || this;
1558
- _this.injector = injector;
1559
- _this.id = 'name';
1560
- _this.parentId = 'parentName';
1561
- _this.hide = function (item) { return item.invisible || !_this.isGranted(item); };
1562
- _this.sort = function (a, b) {
1563
- if (!Number.isInteger(a.order))
1564
- return 1;
1565
- if (!Number.isInteger(b.order))
1566
- return -1;
1567
- return a.order - b.order;
1568
- };
1569
- var configState = _this.injector.get(ConfigStateService);
1570
- _this.subscription = configState
1571
- .createOnUpdateStream(function (state) { return state; })
1572
- .subscribe(function () { return _this.refresh(); });
1573
- _this.permissionService = injector.get(PermissionService);
1574
- return _this;
1461
+ LocalizationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationService, deps: [{ token: SessionStateService }, { token: i0__namespace.Injector }, { token: LocalizationService, optional: true, skipSelf: true }, { token: ConfigStateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1462
+ LocalizationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationService, providedIn: 'root' });
1463
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationService, decorators: [{
1464
+ type: i0.Injectable,
1465
+ args: [{ providedIn: 'root' }]
1466
+ }], ctorParameters: function () {
1467
+ return [{ type: SessionStateService }, { type: i0__namespace.Injector }, { type: LocalizationService, decorators: [{
1468
+ type: i0.Optional
1469
+ }, {
1470
+ type: i0.SkipSelf
1471
+ }] }, { type: ConfigStateService }];
1472
+ } });
1473
+ function getLocalization(state, key) {
1474
+ var interpolateParams = [];
1475
+ for (var _i = 2; _i < arguments.length; _i++) {
1476
+ interpolateParams[_i - 2] = arguments[_i];
1575
1477
  }
1576
- AbstractNavTreeService.prototype.isGranted = function (_b) {
1577
- var requiredPolicy = _b.requiredPolicy;
1578
- return this.permissionService.getGrantedPolicy(requiredPolicy);
1579
- };
1580
- AbstractNavTreeService.prototype.hasChildren = function (identifier) {
1581
- var _this = this;
1582
- var _a;
1583
- var node = this.find(function (item) { return item[_this.id] === identifier; });
1584
- return Boolean((_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.length);
1585
- };
1586
- AbstractNavTreeService.prototype.hasInvisibleChild = function (identifier) {
1587
- var _this = this;
1588
- var _a;
1589
- var node = this.find(function (item) { return item[_this.id] === identifier; });
1590
- return (_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.some(function (child) { return child.invisible; });
1591
- };
1592
- /* istanbul ignore next */
1593
- AbstractNavTreeService.prototype.ngOnDestroy = function () {
1594
- this.subscription.unsubscribe();
1478
+ if (!key)
1479
+ key = '';
1480
+ var defaultValue;
1481
+ if (typeof key !== 'string') {
1482
+ defaultValue = key.defaultValue;
1483
+ key = key.key;
1484
+ }
1485
+ var keys = key.split('::');
1486
+ var warn = function (message) {
1487
+ if (i0.isDevMode)
1488
+ console.warn(message);
1595
1489
  };
1596
- return AbstractNavTreeService;
1597
- }(AbstractTreeService));
1598
- AbstractNavTreeService.decorators = [
1599
- { type: i0.Injectable }
1600
- ];
1601
- AbstractNavTreeService.ctorParameters = function () { return [
1602
- { type: i0.Injector }
1603
- ]; };
1604
- var RoutesService = /** @class */ (function (_super) {
1605
- __extends(RoutesService, _super);
1606
- function RoutesService() {
1607
- return _super !== null && _super.apply(this, arguments) || this;
1490
+ if (keys.length < 2) {
1491
+ warn('The localization source separator (::) not found.');
1492
+ return defaultValue || key;
1608
1493
  }
1609
- return RoutesService;
1610
- }(AbstractNavTreeService));
1611
- RoutesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function RoutesService_Factory() { return new RoutesService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: RoutesService, providedIn: "root" });
1612
- RoutesService.decorators = [
1613
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1614
- ];
1615
- var SettingTabsService = /** @class */ (function (_super) {
1616
- __extends(SettingTabsService, _super);
1617
- function SettingTabsService() {
1618
- return _super !== null && _super.apply(this, arguments) || this;
1494
+ if (!state.localization)
1495
+ return defaultValue || keys[1];
1496
+ var sourceName = keys[0] || state.localization.defaultResourceName;
1497
+ var sourceKey = keys[1];
1498
+ if (sourceName === '_') {
1499
+ return defaultValue || sourceKey;
1619
1500
  }
1620
- return SettingTabsService;
1621
- }(AbstractNavTreeService));
1622
- SettingTabsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SettingTabsService_Factory() { return new SettingTabsService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: SettingTabsService, providedIn: "root" });
1623
- SettingTabsService.decorators = [
1624
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1625
- ];
1501
+ if (!sourceName) {
1502
+ warn('Localization source name is not specified and the defaultResourceName was not defined!');
1503
+ return defaultValue || sourceKey;
1504
+ }
1505
+ var source = state.localization.values[sourceName];
1506
+ if (!source) {
1507
+ warn('Could not find localization source: ' + sourceName);
1508
+ return defaultValue || sourceKey;
1509
+ }
1510
+ var localization = source[sourceKey];
1511
+ if (typeof localization === 'undefined') {
1512
+ return defaultValue || sourceKey;
1513
+ }
1514
+ interpolateParams = interpolateParams.filter(function (params) { return params != null; });
1515
+ if (localization)
1516
+ localization = interpolate(localization, interpolateParams);
1517
+ if (typeof localization !== 'string')
1518
+ localization = '';
1519
+ return localization || defaultValue || key;
1520
+ }
1626
1521
 
1627
- var SubscriptionService = /** @class */ (function () {
1628
- function SubscriptionService() {
1629
- this.subscription = new rxjs.Subscription();
1522
+ var ReplaceableComponentsService = /** @class */ (function () {
1523
+ function ReplaceableComponentsService(ngZone, router) {
1524
+ this.ngZone = ngZone;
1525
+ this.router = router;
1526
+ this.store = new InternalStore([]);
1630
1527
  }
1631
- Object.defineProperty(SubscriptionService.prototype, "isClosed", {
1528
+ Object.defineProperty(ReplaceableComponentsService.prototype, "replaceableComponents$", {
1632
1529
  get: function () {
1633
- return this.subscription.closed;
1530
+ return this.store.sliceState(function (state) { return state; });
1634
1531
  },
1635
1532
  enumerable: false,
1636
1533
  configurable: true
1637
1534
  });
1638
- SubscriptionService.prototype.addOne = function (source$, nextOrObserver, error) {
1639
- var subscription = source$.subscribe(nextOrObserver, error);
1640
- this.subscription.add(subscription);
1641
- return subscription;
1535
+ Object.defineProperty(ReplaceableComponentsService.prototype, "replaceableComponents", {
1536
+ get: function () {
1537
+ return this.store.state;
1538
+ },
1539
+ enumerable: false,
1540
+ configurable: true
1541
+ });
1542
+ Object.defineProperty(ReplaceableComponentsService.prototype, "onUpdate$", {
1543
+ get: function () {
1544
+ return this.store.sliceUpdate(function (state) { return state; });
1545
+ },
1546
+ enumerable: false,
1547
+ configurable: true
1548
+ });
1549
+ ReplaceableComponentsService.prototype.add = function (replaceableComponent, reload) {
1550
+ var replaceableComponents = __spreadArray([], __read(this.store.state));
1551
+ var index = replaceableComponents.findIndex(function (component) { return component.key === replaceableComponent.key; });
1552
+ if (index > -1) {
1553
+ replaceableComponents[index] = replaceableComponent;
1554
+ }
1555
+ else {
1556
+ replaceableComponents.push(replaceableComponent);
1557
+ }
1558
+ this.store.set(replaceableComponents);
1559
+ if (reload)
1560
+ reloadRoute(this.router, this.ngZone);
1561
+ };
1562
+ ReplaceableComponentsService.prototype.get = function (replaceableComponentKey) {
1563
+ return this.replaceableComponents.find(function (component) { return component.key === replaceableComponentKey; });
1642
1564
  };
1643
- SubscriptionService.prototype.closeAll = function () {
1644
- this.subscription.unsubscribe();
1565
+ ReplaceableComponentsService.prototype.get$ = function (replaceableComponentKey) {
1566
+ return this.replaceableComponents$.pipe(operators.map(function (components) { return components.find(function (component) { return component.key === replaceableComponentKey; }); }));
1645
1567
  };
1646
- SubscriptionService.prototype.closeOne = function (subscription) {
1647
- this.removeOne(subscription);
1648
- subscription.unsubscribe();
1568
+ return ReplaceableComponentsService;
1569
+ }());
1570
+ ReplaceableComponentsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableComponentsService, deps: [{ token: i0__namespace.NgZone }, { token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1571
+ ReplaceableComponentsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableComponentsService, providedIn: 'root' });
1572
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableComponentsService, decorators: [{
1573
+ type: i0.Injectable,
1574
+ args: [{ providedIn: 'root' }]
1575
+ }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i1__namespace$1.Router }]; } });
1576
+
1577
+ var NavigationEvent = {
1578
+ Cancel: i1$1.NavigationCancel,
1579
+ End: i1$1.NavigationEnd,
1580
+ Error: i1$1.NavigationError,
1581
+ Start: i1$1.NavigationStart,
1582
+ };
1583
+ var RouterEvents = /** @class */ (function () {
1584
+ function RouterEvents(router) {
1585
+ this.router = router;
1586
+ }
1587
+ RouterEvents.prototype.getEvents = function () {
1588
+ var eventTypes = [];
1589
+ for (var _i = 0; _i < arguments.length; _i++) {
1590
+ eventTypes[_i] = arguments[_i];
1591
+ }
1592
+ var filterRouterEvents = function (event) { return eventTypes.some(function (type) { return event instanceof type; }); };
1593
+ return this.router.events.pipe(operators.filter(filterRouterEvents));
1649
1594
  };
1650
- SubscriptionService.prototype.ngOnDestroy = function () {
1651
- this.subscription.unsubscribe();
1595
+ RouterEvents.prototype.getNavigationEvents = function () {
1596
+ var navigationEventKeys = [];
1597
+ for (var _i = 0; _i < arguments.length; _i++) {
1598
+ navigationEventKeys[_i] = arguments[_i];
1599
+ }
1600
+ var filterNavigationEvents = function (event) { return navigationEventKeys.some(function (key) { return event instanceof NavigationEvent[key]; }); };
1601
+ return this.router.events.pipe(operators.filter(filterNavigationEvents));
1652
1602
  };
1653
- SubscriptionService.prototype.removeOne = function (subscription) {
1654
- if (!subscription)
1655
- return;
1656
- this.subscription.remove(subscription);
1603
+ RouterEvents.prototype.getAllEvents = function () {
1604
+ return this.router.events;
1657
1605
  };
1658
- SubscriptionService.prototype.reset = function () {
1659
- this.subscription.unsubscribe();
1660
- this.subscription = new rxjs.Subscription();
1606
+ RouterEvents.prototype.getAllNavigationEvents = function () {
1607
+ var keys = Object.keys(NavigationEvent);
1608
+ return this.getNavigationEvents.apply(this, __spreadArray([], __read(keys)));
1661
1609
  };
1662
- return SubscriptionService;
1610
+ return RouterEvents;
1663
1611
  }());
1664
- SubscriptionService.decorators = [
1665
- { type: i0.Injectable }
1666
- ];
1612
+ RouterEvents.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterEvents, deps: [{ token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1613
+ RouterEvents.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterEvents, providedIn: 'root' });
1614
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterEvents, decorators: [{
1615
+ type: i0.Injectable,
1616
+ args: [{ providedIn: 'root' }]
1617
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }]; } });
1667
1618
 
1668
1619
  var DynamicLayoutComponent = /** @class */ (function () {
1669
1620
  function DynamicLayoutComponent(injector, localizationService, replaceableComponents, subscription, routerEvents, dynamicLayoutComponent) {
@@ -1680,8 +1631,8 @@
1680
1631
  this.isLayoutVisible = true;
1681
1632
  if (dynamicLayoutComponent)
1682
1633
  return;
1683
- this.route = injector.get(i1.ActivatedRoute);
1684
- this.router = injector.get(i1.Router);
1634
+ this.route = injector.get(i1$1.ActivatedRoute);
1635
+ this.router = injector.get(i1$1.Router);
1685
1636
  this.routes = injector.get(RoutesService);
1686
1637
  this.getLayout();
1687
1638
  this.checkLayoutOnNavigationEnd();
@@ -1726,21 +1677,22 @@
1726
1677
  };
1727
1678
  return DynamicLayoutComponent;
1728
1679
  }());
1729
- DynamicLayoutComponent.decorators = [
1730
- { type: i0.Component, args: [{
1731
- selector: 'abp-dynamic-layout',
1732
- template: "\n <ng-container *ngTemplateOutlet=\"layout ? componentOutlet : routerOutlet\"></ng-container>\n <ng-template #routerOutlet><router-outlet></router-outlet></ng-template>\n <ng-template #componentOutlet\n ><ng-container *ngIf=\"isLayoutVisible\" [ngComponentOutlet]=\"layout\"></ng-container\n ></ng-template>\n ",
1733
- providers: [SubscriptionService]
1734
- },] }
1735
- ];
1736
- DynamicLayoutComponent.ctorParameters = function () { return [
1737
- { type: i0.Injector },
1738
- { type: LocalizationService },
1739
- { type: ReplaceableComponentsService },
1740
- { type: SubscriptionService },
1741
- { type: RouterEvents },
1742
- { type: DynamicLayoutComponent, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
1743
- ]; };
1680
+ DynamicLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: DynamicLayoutComponent, deps: [{ token: i0__namespace.Injector }, { token: LocalizationService }, { token: ReplaceableComponentsService }, { token: SubscriptionService }, { token: RouterEvents }, { token: DynamicLayoutComponent, optional: true, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1681
+ DynamicLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: DynamicLayoutComponent, selector: "abp-dynamic-layout", providers: [SubscriptionService], ngImport: i0__namespace, template: "\n <ng-container *ngTemplateOutlet=\"layout ? componentOutlet : routerOutlet\"></ng-container>\n <ng-template #routerOutlet><router-outlet></router-outlet></ng-template>\n <ng-template #componentOutlet\n ><ng-container *ngIf=\"isLayoutVisible\" [ngComponentOutlet]=\"layout\"></ng-container\n ></ng-template>\n ", isInline: true, directives: [{ type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }] });
1682
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: DynamicLayoutComponent, decorators: [{
1683
+ type: i0.Component,
1684
+ args: [{
1685
+ selector: 'abp-dynamic-layout',
1686
+ template: "\n <ng-container *ngTemplateOutlet=\"layout ? componentOutlet : routerOutlet\"></ng-container>\n <ng-template #routerOutlet><router-outlet></router-outlet></ng-template>\n <ng-template #componentOutlet\n ><ng-container *ngIf=\"isLayoutVisible\" [ngComponentOutlet]=\"layout\"></ng-container\n ></ng-template>\n ",
1687
+ providers: [SubscriptionService],
1688
+ }]
1689
+ }], ctorParameters: function () {
1690
+ return [{ type: i0__namespace.Injector }, { type: LocalizationService }, { type: ReplaceableComponentsService }, { type: SubscriptionService }, { type: RouterEvents }, { type: DynamicLayoutComponent, decorators: [{
1691
+ type: i0.Optional
1692
+ }, {
1693
+ type: i0.SkipSelf
1694
+ }] }];
1695
+ } });
1744
1696
 
1745
1697
  var ReplaceableRouteContainerComponent = /** @class */ (function () {
1746
1698
  function ReplaceableRouteContainerComponent(route, replaceableComponents, subscription) {
@@ -1751,8 +1703,7 @@
1751
1703
  ReplaceableRouteContainerComponent.prototype.ngOnInit = function () {
1752
1704
  var _this = this;
1753
1705
  this.defaultComponent = this.route.snapshot.data.replaceableComponent.defaultComponent;
1754
- this.componentKey = this.route.snapshot.data
1755
- .replaceableComponent.key;
1706
+ this.componentKey = this.route.snapshot.data.replaceableComponent.key;
1756
1707
  var component$ = this.replaceableComponents
1757
1708
  .get$(this.componentKey)
1758
1709
  .pipe(operators.distinctUntilChanged());
@@ -1763,30 +1714,31 @@
1763
1714
  };
1764
1715
  return ReplaceableRouteContainerComponent;
1765
1716
  }());
1766
- ReplaceableRouteContainerComponent.decorators = [
1767
- { type: i0.Component, args: [{
1768
- selector: 'abp-replaceable-route-container',
1769
- template: "\n <ng-container *ngComponentOutlet=\"externalComponent || defaultComponent\"></ng-container>\n ",
1770
- providers: [SubscriptionService]
1771
- },] }
1772
- ];
1773
- ReplaceableRouteContainerComponent.ctorParameters = function () { return [
1774
- { type: i1.ActivatedRoute },
1775
- { type: ReplaceableComponentsService },
1776
- { type: SubscriptionService }
1777
- ]; };
1717
+ ReplaceableRouteContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableRouteContainerComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: ReplaceableComponentsService }, { token: SubscriptionService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1718
+ ReplaceableRouteContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: ReplaceableRouteContainerComponent, selector: "abp-replaceable-route-container", providers: [SubscriptionService], ngImport: i0__namespace, template: "\n <ng-container *ngComponentOutlet=\"externalComponent || defaultComponent\"></ng-container>\n ", isInline: true, directives: [{ type: i5__namespace.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }] });
1719
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableRouteContainerComponent, decorators: [{
1720
+ type: i0.Component,
1721
+ args: [{
1722
+ selector: 'abp-replaceable-route-container',
1723
+ template: "\n <ng-container *ngComponentOutlet=\"externalComponent || defaultComponent\"></ng-container>\n ",
1724
+ providers: [SubscriptionService],
1725
+ }]
1726
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: ReplaceableComponentsService }, { type: SubscriptionService }]; } });
1778
1727
 
1779
1728
  var RouterOutletComponent = /** @class */ (function () {
1780
1729
  function RouterOutletComponent() {
1781
1730
  }
1782
1731
  return RouterOutletComponent;
1783
1732
  }());
1784
- RouterOutletComponent.decorators = [
1785
- { type: i0.Component, args: [{
1786
- selector: 'abp-router-outlet',
1787
- template: "\n <router-outlet></router-outlet>\n "
1788
- },] }
1789
- ];
1733
+ RouterOutletComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterOutletComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1734
+ RouterOutletComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: RouterOutletComponent, selector: "abp-router-outlet", ngImport: i0__namespace, template: " <router-outlet></router-outlet> ", isInline: true, directives: [{ type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
1735
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterOutletComponent, decorators: [{
1736
+ type: i0.Component,
1737
+ args: [{
1738
+ selector: 'abp-router-outlet',
1739
+ template: " <router-outlet></router-outlet> ",
1740
+ }]
1741
+ }] });
1790
1742
 
1791
1743
  // Different locales from .NET
1792
1744
  // Key is .NET locale, value is Angular locale
@@ -2136,18 +2088,18 @@
2136
2088
  };
2137
2089
  return AutofocusDirective;
2138
2090
  }());
2139
- AutofocusDirective.decorators = [
2140
- { type: i0.Directive, args: [{
2141
- // tslint:disable-next-line: directive-selector
2142
- selector: '[autofocus]'
2143
- },] }
2144
- ];
2145
- AutofocusDirective.ctorParameters = function () { return [
2146
- { type: i0.ElementRef }
2147
- ]; };
2148
- AutofocusDirective.propDecorators = {
2149
- delay: [{ type: i0.Input, args: ['autofocus',] }]
2150
- };
2091
+ AutofocusDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AutofocusDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2092
+ AutofocusDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: AutofocusDirective, selector: "[autofocus]", inputs: { delay: ["autofocus", "delay"] }, ngImport: i0__namespace });
2093
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AutofocusDirective, decorators: [{
2094
+ type: i0.Directive,
2095
+ args: [{
2096
+ // eslint-disable-next-line @angular-eslint/directive-selector
2097
+ selector: '[autofocus]',
2098
+ }]
2099
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { delay: [{
2100
+ type: i0.Input,
2101
+ args: ['autofocus']
2102
+ }] } });
2151
2103
 
2152
2104
  var InputEventDebounceDirective = /** @class */ (function () {
2153
2105
  function InputEventDebounceDirective(el, subscription) {
@@ -2165,21 +2117,21 @@
2165
2117
  };
2166
2118
  return InputEventDebounceDirective;
2167
2119
  }());
2168
- InputEventDebounceDirective.decorators = [
2169
- { type: i0.Directive, args: [{
2170
- // tslint:disable-next-line: directive-selector
2171
- selector: '[input.debounce]',
2172
- providers: [SubscriptionService],
2173
- },] }
2174
- ];
2175
- InputEventDebounceDirective.ctorParameters = function () { return [
2176
- { type: i0.ElementRef },
2177
- { type: SubscriptionService }
2178
- ]; };
2179
- InputEventDebounceDirective.propDecorators = {
2180
- debounce: [{ type: i0.Input }],
2181
- debounceEvent: [{ type: i0.Output, args: ['input.debounce',] }]
2182
- };
2120
+ InputEventDebounceDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: InputEventDebounceDirective, deps: [{ token: i0__namespace.ElementRef }, { token: SubscriptionService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2121
+ InputEventDebounceDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: InputEventDebounceDirective, selector: "[input.debounce]", inputs: { debounce: "debounce" }, outputs: { debounceEvent: "input.debounce" }, providers: [SubscriptionService], ngImport: i0__namespace });
2122
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: InputEventDebounceDirective, decorators: [{
2123
+ type: i0.Directive,
2124
+ args: [{
2125
+ // eslint-disable-next-line @angular-eslint/directive-selector
2126
+ selector: '[input.debounce]',
2127
+ providers: [SubscriptionService],
2128
+ }]
2129
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: SubscriptionService }]; }, propDecorators: { debounce: [{
2130
+ type: i0.Input
2131
+ }], debounceEvent: [{
2132
+ type: i0.Output,
2133
+ args: ['input.debounce']
2134
+ }] } });
2183
2135
 
2184
2136
  var AbpForContext = /** @class */ (function () {
2185
2137
  function AbpForContext($implicit, index, count, list) {
@@ -2254,7 +2206,6 @@
2254
2206
  ForDirective.prototype.projectItems = function (items) {
2255
2207
  if (!items.length && this.emptyRef) {
2256
2208
  this.vcRef.clear();
2257
- // tslint:disable-next-line: no-unused-expression
2258
2209
  this.vcRef.createEmbeddedView(this.emptyRef).rootNodes;
2259
2210
  this.isShowEmptyRef = true;
2260
2211
  this.differ = null;
@@ -2278,7 +2229,7 @@
2278
2229
  ForDirective.prototype.sortItems = function (items) {
2279
2230
  var _this = this;
2280
2231
  if (this.orderBy) {
2281
- items.sort(function (a, b) { return (a[_this.orderBy] > b[_this.orderBy] ? 1 : a[_this.orderBy] < b[_this.orderBy] ? -1 : 0); });
2232
+ items.sort(function (a, b) { return a[_this.orderBy] > b[_this.orderBy] ? 1 : a[_this.orderBy] < b[_this.orderBy] ? -1 : 0; });
2282
2233
  }
2283
2234
  else {
2284
2235
  items.sort();
@@ -2290,7 +2241,9 @@
2290
2241
  if (!Array.isArray(items))
2291
2242
  return;
2292
2243
  var compareFn = this.compareFn;
2293
- if (typeof this.filterBy !== 'undefined' && typeof this.filterVal !== 'undefined' && this.filterVal !== '') {
2244
+ if (typeof this.filterBy !== 'undefined' &&
2245
+ typeof this.filterVal !== 'undefined' &&
2246
+ this.filterVal !== '') {
2294
2247
  items = items.filter(function (item) { return compareFn(item[_this.filterBy], _this.filterVal); });
2295
2248
  }
2296
2249
  switch (this.orderDir) {
@@ -2309,26 +2262,38 @@
2309
2262
  };
2310
2263
  return ForDirective;
2311
2264
  }());
2312
- ForDirective.decorators = [
2313
- { type: i0.Directive, args: [{
2314
- selector: '[abpFor]',
2315
- },] }
2316
- ];
2317
- ForDirective.ctorParameters = function () { return [
2318
- { type: i0.TemplateRef },
2319
- { type: i0.ViewContainerRef },
2320
- { type: i0.IterableDiffers }
2321
- ]; };
2322
- ForDirective.propDecorators = {
2323
- items: [{ type: i0.Input, args: ['abpForOf',] }],
2324
- orderBy: [{ type: i0.Input, args: ['abpForOrderBy',] }],
2325
- orderDir: [{ type: i0.Input, args: ['abpForOrderDir',] }],
2326
- filterBy: [{ type: i0.Input, args: ['abpForFilterBy',] }],
2327
- filterVal: [{ type: i0.Input, args: ['abpForFilterVal',] }],
2328
- trackBy: [{ type: i0.Input, args: ['abpForTrackBy',] }],
2329
- compareBy: [{ type: i0.Input, args: ['abpForCompareBy',] }],
2330
- emptyRef: [{ type: i0.Input, args: ['abpForEmptyRef',] }]
2331
- };
2265
+ ForDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ForDirective, deps: [{ token: i0__namespace.TemplateRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.IterableDiffers }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2266
+ ForDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", 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__namespace });
2267
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ForDirective, decorators: [{
2268
+ type: i0.Directive,
2269
+ args: [{
2270
+ selector: '[abpFor]',
2271
+ }]
2272
+ }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.IterableDiffers }]; }, propDecorators: { items: [{
2273
+ type: i0.Input,
2274
+ args: ['abpForOf']
2275
+ }], orderBy: [{
2276
+ type: i0.Input,
2277
+ args: ['abpForOrderBy']
2278
+ }], orderDir: [{
2279
+ type: i0.Input,
2280
+ args: ['abpForOrderDir']
2281
+ }], filterBy: [{
2282
+ type: i0.Input,
2283
+ args: ['abpForFilterBy']
2284
+ }], filterVal: [{
2285
+ type: i0.Input,
2286
+ args: ['abpForFilterVal']
2287
+ }], trackBy: [{
2288
+ type: i0.Input,
2289
+ args: ['abpForTrackBy']
2290
+ }], compareBy: [{
2291
+ type: i0.Input,
2292
+ args: ['abpForCompareBy']
2293
+ }], emptyRef: [{
2294
+ type: i0.Input,
2295
+ args: ['abpForEmptyRef']
2296
+ }] } });
2332
2297
 
2333
2298
  var FormSubmitDirective = /** @class */ (function () {
2334
2299
  function FormSubmitDirective(formGroupDirective, host, cdRef, subscription) {
@@ -2362,24 +2327,26 @@
2362
2327
  };
2363
2328
  return FormSubmitDirective;
2364
2329
  }());
2365
- FormSubmitDirective.decorators = [
2366
- { type: i0.Directive, args: [{
2367
- // tslint:disable-next-line: directive-selector
2368
- selector: 'form[ngSubmit][formGroup]',
2369
- providers: [SubscriptionService],
2370
- },] }
2371
- ];
2372
- FormSubmitDirective.ctorParameters = function () { return [
2373
- { type: forms.FormGroupDirective, decorators: [{ type: i0.Self }] },
2374
- { type: i0.ElementRef },
2375
- { type: i0.ChangeDetectorRef },
2376
- { type: SubscriptionService }
2377
- ]; };
2378
- FormSubmitDirective.propDecorators = {
2379
- debounce: [{ type: i0.Input }],
2380
- notValidateOnSubmit: [{ type: i0.Input }],
2381
- ngSubmit: [{ type: i0.Output }]
2382
- };
2330
+ FormSubmitDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: FormSubmitDirective, deps: [{ token: i1__namespace$2.FormGroupDirective, self: true }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: SubscriptionService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2331
+ FormSubmitDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: { debounce: "debounce", notValidateOnSubmit: "notValidateOnSubmit" }, outputs: { ngSubmit: "ngSubmit" }, providers: [SubscriptionService], ngImport: i0__namespace });
2332
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: FormSubmitDirective, decorators: [{
2333
+ type: i0.Directive,
2334
+ args: [{
2335
+ // eslint-disable-next-line @angular-eslint/directive-selector
2336
+ selector: 'form[ngSubmit][formGroup]',
2337
+ providers: [SubscriptionService],
2338
+ }]
2339
+ }], ctorParameters: function () {
2340
+ return [{ type: i1__namespace$2.FormGroupDirective, decorators: [{
2341
+ type: i0.Self
2342
+ }] }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: SubscriptionService }];
2343
+ }, propDecorators: { debounce: [{
2344
+ type: i0.Input
2345
+ }], notValidateOnSubmit: [{
2346
+ type: i0.Input
2347
+ }], ngSubmit: [{
2348
+ type: i0.Output
2349
+ }] } });
2383
2350
  function setDirty(controls) {
2384
2351
  if (Array.isArray(controls)) {
2385
2352
  controls.forEach(function (group) {
@@ -2403,15 +2370,15 @@
2403
2370
  };
2404
2371
  return InitDirective;
2405
2372
  }());
2406
- InitDirective.decorators = [
2407
- { type: i0.Directive, args: [{ selector: '[abpInit]' },] }
2408
- ];
2409
- InitDirective.ctorParameters = function () { return [
2410
- { type: i0.ElementRef }
2411
- ]; };
2412
- InitDirective.propDecorators = {
2413
- init: [{ type: i0.Output, args: ['abpInit',] }]
2414
- };
2373
+ InitDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: InitDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2374
+ InitDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: InitDirective, selector: "[abpInit]", outputs: { init: "abpInit" }, ngImport: i0__namespace });
2375
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: InitDirective, decorators: [{
2376
+ type: i0.Directive,
2377
+ args: [{ selector: '[abpInit]' }]
2378
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { init: [{
2379
+ type: i0.Output,
2380
+ args: ['abpInit']
2381
+ }] } });
2415
2382
 
2416
2383
  var PermissionDirective = /** @class */ (function () {
2417
2384
  function PermissionDirective(elRef, renderer, templateRef, vcRef, permissionService, cdRef) {
@@ -2431,26 +2398,12 @@
2431
2398
  .getGrantedPolicy$(this.condition)
2432
2399
  .pipe(operators.distinctUntilChanged())
2433
2400
  .subscribe(function (isGranted) {
2434
- if (_this.templateRef)
2435
- _this.initStructural(isGranted);
2436
- else
2437
- _this.initAttribute(isGranted);
2401
+ _this.vcRef.clear();
2402
+ if (isGranted)
2403
+ _this.vcRef.createEmbeddedView(_this.templateRef);
2438
2404
  _this.cdRef.detectChanges();
2439
2405
  });
2440
2406
  };
2441
- PermissionDirective.prototype.initStructural = function (isGranted) {
2442
- this.vcRef.clear();
2443
- if (isGranted)
2444
- this.vcRef.createEmbeddedView(this.templateRef);
2445
- };
2446
- /**
2447
- * @deprecated Will be deleted in v5.0
2448
- */
2449
- PermissionDirective.prototype.initAttribute = function (isGranted) {
2450
- if (!isGranted) {
2451
- this.renderer.removeChild(this.elRef.nativeElement.parentElement, this.elRef.nativeElement);
2452
- }
2453
- };
2454
2407
  PermissionDirective.prototype.ngOnDestroy = function () {
2455
2408
  if (this.subscription)
2456
2409
  this.subscription.unsubscribe();
@@ -2460,22 +2413,21 @@
2460
2413
  };
2461
2414
  return PermissionDirective;
2462
2415
  }());
2463
- PermissionDirective.decorators = [
2464
- { type: i0.Directive, args: [{
2465
- selector: '[abpPermission]',
2466
- },] }
2467
- ];
2468
- PermissionDirective.ctorParameters = function () { return [
2469
- { type: i0.ElementRef },
2470
- { type: i0.Renderer2 },
2471
- { type: i0.TemplateRef, decorators: [{ type: i0.Optional }] },
2472
- { type: i0.ViewContainerRef },
2473
- { type: PermissionService },
2474
- { type: i0.ChangeDetectorRef }
2475
- ]; };
2476
- PermissionDirective.propDecorators = {
2477
- condition: [{ type: i0.Input, args: ['abpPermission',] }]
2478
- };
2416
+ PermissionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.TemplateRef, optional: true }, { token: i0__namespace.ViewContainerRef }, { token: PermissionService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2417
+ PermissionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: PermissionDirective, selector: "[abpPermission]", inputs: { condition: ["abpPermission", "condition"] }, usesOnChanges: true, ngImport: i0__namespace });
2418
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionDirective, decorators: [{
2419
+ type: i0.Directive,
2420
+ args: [{
2421
+ selector: '[abpPermission]',
2422
+ }]
2423
+ }], ctorParameters: function () {
2424
+ return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.TemplateRef, decorators: [{
2425
+ type: i0.Optional
2426
+ }] }, { type: i0__namespace.ViewContainerRef }, { type: PermissionService }, { type: i0__namespace.ChangeDetectorRef }];
2427
+ }, propDecorators: { condition: [{
2428
+ type: i0.Input,
2429
+ args: ['abpPermission']
2430
+ }] } });
2479
2431
 
2480
2432
  var ReplaceableTemplateDirective = /** @class */ (function () {
2481
2433
  function ReplaceableTemplateDirective(injector, templateRef, cfRes, vcRef, replaceableComponents, subscription) {
@@ -2486,7 +2438,10 @@
2486
2438
  this.vcRef = vcRef;
2487
2439
  this.replaceableComponents = replaceableComponents;
2488
2440
  this.subscription = subscription;
2489
- this.providedData = { inputs: {}, outputs: {} };
2441
+ this.providedData = {
2442
+ inputs: {},
2443
+ outputs: {},
2444
+ };
2490
2445
  this.context = {};
2491
2446
  this.defaultComponentSubscriptions = {};
2492
2447
  this.initialized = false;
@@ -2528,7 +2483,8 @@
2528
2483
  });
2529
2484
  };
2530
2485
  ReplaceableTemplateDirective.prototype.ngOnChanges = function (changes) {
2531
- if (snq__default['default'](function () { return changes.data.currentValue.inputs; }) && this.defaultComponentRef) {
2486
+ var _a, _b;
2487
+ 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) {
2532
2488
  this.setDefaultComponentInputs();
2533
2489
  }
2534
2490
  };
@@ -2538,7 +2494,7 @@
2538
2494
  return;
2539
2495
  if (this.data.inputs) {
2540
2496
  for (var key in this.data.inputs) {
2541
- if (this.data.inputs.hasOwnProperty(key)) {
2497
+ if (Object.prototype.hasOwnProperty.call(this.data.inputs, key)) {
2542
2498
  if (!compare__default['default'](this.defaultComponentRef[key], this.data.inputs[key].value)) {
2543
2499
  this.defaultComponentRef[key] = this.data.inputs[key].value;
2544
2500
  }
@@ -2547,7 +2503,7 @@
2547
2503
  }
2548
2504
  if (this.data.outputs) {
2549
2505
  var _loop_1 = function (key) {
2550
- if (this_1.data.outputs.hasOwnProperty(key)) {
2506
+ if (Object.prototype.hasOwnProperty.call(this_1.data.outputs, key)) {
2551
2507
  if (!this_1.defaultComponentSubscriptions[key]) {
2552
2508
  this_1.defaultComponentSubscriptions[key] = this_1.defaultComponentRef[key].subscribe(function (value) {
2553
2509
  _this.data.outputs[key](value);
@@ -2567,13 +2523,13 @@
2567
2523
  if (!this.data.inputs)
2568
2524
  return;
2569
2525
  Object.defineProperties(this.providedData.inputs, Object.assign({}, Object.keys(this.data.inputs).reduce(function (acc, key) {
2570
- var _a;
2571
- return (Object.assign(Object.assign({}, acc), (_a = {}, _a[key] = Object.assign({ enumerable: true, configurable: true, get: function () { return _this.data.inputs[key].value; } }, (_this.data.inputs[key].twoWay && {
2526
+ var _c;
2527
+ return (Object.assign(Object.assign({}, acc), (_c = {}, _c[key] = Object.assign({ enumerable: true, configurable: true, get: function () { return _this.data.inputs[key].value; } }, (_this.data.inputs[key].twoWay && {
2572
2528
  set: function (newValue) {
2573
2529
  _this.data.inputs[key].value = newValue;
2574
2530
  _this.data.outputs[key + "Change"](newValue);
2575
2531
  },
2576
- })), _a)));
2532
+ })), _c)));
2577
2533
  }, {})));
2578
2534
  };
2579
2535
  ReplaceableTemplateDirective.prototype.resetDefaultComponent = function () {
@@ -2586,20 +2542,18 @@
2586
2542
  };
2587
2543
  return ReplaceableTemplateDirective;
2588
2544
  }());
2589
- ReplaceableTemplateDirective.decorators = [
2590
- { type: i0.Directive, args: [{ selector: '[abpReplaceableTemplate]', providers: [SubscriptionService] },] }
2591
- ];
2592
- ReplaceableTemplateDirective.ctorParameters = function () { return [
2593
- { type: i0.Injector },
2594
- { type: i0.TemplateRef },
2595
- { type: i0.ComponentFactoryResolver },
2596
- { type: i0.ViewContainerRef },
2597
- { type: ReplaceableComponentsService },
2598
- { type: SubscriptionService }
2599
- ]; };
2600
- ReplaceableTemplateDirective.propDecorators = {
2601
- data: [{ type: i0.Input, args: ['abpReplaceableTemplate',] }]
2602
- };
2545
+ ReplaceableTemplateDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableTemplateDirective, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.TemplateRef }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ViewContainerRef }, { token: ReplaceableComponentsService }, { token: SubscriptionService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2546
+ ReplaceableTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: { data: ["abpReplaceableTemplate", "data"] }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0__namespace });
2547
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ReplaceableTemplateDirective, decorators: [{
2548
+ type: i0.Directive,
2549
+ args: [{
2550
+ selector: '[abpReplaceableTemplate]',
2551
+ providers: [SubscriptionService],
2552
+ }]
2553
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.TemplateRef }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ViewContainerRef }, { type: ReplaceableComponentsService }, { type: SubscriptionService }]; }, propDecorators: { data: [{
2554
+ type: i0.Input,
2555
+ args: ['abpReplaceableTemplate']
2556
+ }] } });
2603
2557
 
2604
2558
  var StopPropagationDirective = /** @class */ (function () {
2605
2559
  function StopPropagationDirective(el, subscription) {
@@ -2616,81 +2570,19 @@
2616
2570
  };
2617
2571
  return StopPropagationDirective;
2618
2572
  }());
2619
- StopPropagationDirective.decorators = [
2620
- { type: i0.Directive, args: [{
2621
- // tslint:disable-next-line: directive-selector
2622
- selector: '[click.stop]',
2623
- providers: [SubscriptionService],
2624
- },] }
2625
- ];
2626
- StopPropagationDirective.ctorParameters = function () { return [
2627
- { type: i0.ElementRef },
2628
- { type: SubscriptionService }
2629
- ]; };
2630
- StopPropagationDirective.propDecorators = {
2631
- stopPropEvent: [{ type: i0.Output, args: ['click.stop',] }]
2632
- };
2633
-
2634
- /**
2635
- *
2636
- * @deprecated To be deleted in v5.0
2637
- */
2638
- var VisibilityDirective = /** @class */ (function () {
2639
- function VisibilityDirective(elRef, renderer) {
2640
- this.elRef = elRef;
2641
- this.renderer = renderer;
2642
- this.completed$ = new rxjs.Subject();
2643
- }
2644
- VisibilityDirective.prototype.ngAfterViewInit = function () {
2645
- var _this = this;
2646
- if (!this.focusedElement && this.elRef) {
2647
- this.focusedElement = this.elRef.nativeElement;
2648
- }
2649
- var observer;
2650
- observer = new MutationObserver(function (mutations) {
2651
- mutations.forEach(function (mutation) {
2652
- if (!mutation.target)
2653
- return;
2654
- var htmlNodes = snq__default['default'](function () { return Array.from(mutation.target.childNodes).filter(function (node) { return node instanceof HTMLElement; }); }, []);
2655
- if (!htmlNodes.length) {
2656
- _this.removeFromDOM();
2657
- }
2658
- });
2659
- });
2660
- observer.observe(this.focusedElement, {
2661
- childList: true,
2662
- });
2663
- setTimeout(function () {
2664
- var htmlNodes = snq__default['default'](function () { return Array.from(_this.focusedElement.childNodes).filter(function (node) { return node instanceof HTMLElement; }); }, []);
2665
- if (!htmlNodes.length)
2666
- _this.removeFromDOM();
2667
- }, 0);
2668
- this.completed$.subscribe(function () { return observer.disconnect(); });
2669
- };
2670
- VisibilityDirective.prototype.disconnect = function () {
2671
- this.completed$.next();
2672
- this.completed$.complete();
2673
- };
2674
- VisibilityDirective.prototype.removeFromDOM = function () {
2675
- if (!this.elRef.nativeElement)
2676
- return;
2677
- this.renderer.removeChild(this.elRef.nativeElement.parentElement, this.elRef.nativeElement);
2678
- this.disconnect();
2679
- };
2680
- return VisibilityDirective;
2681
- }());
2682
- VisibilityDirective.decorators = [
2683
- { type: i0.Directive, args: [{
2684
- selector: '[abpVisibility]',
2685
- },] }
2686
- ];
2687
- VisibilityDirective.ctorParameters = function () { return [
2688
- { type: i0.ElementRef, decorators: [{ type: i0.Optional }] },
2689
- { type: i0.Renderer2 }
2690
- ]; };
2691
- VisibilityDirective.propDecorators = {
2692
- focusedElement: [{ type: i0.Input, args: ['abpVisibility',] }]
2693
- };
2573
+ StopPropagationDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: StopPropagationDirective, deps: [{ token: i0__namespace.ElementRef }, { token: SubscriptionService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2574
+ StopPropagationDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: StopPropagationDirective, selector: "[click.stop]", outputs: { stopPropEvent: "click.stop" }, providers: [SubscriptionService], ngImport: i0__namespace });
2575
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: StopPropagationDirective, decorators: [{
2576
+ type: i0.Directive,
2577
+ args: [{
2578
+ // eslint-disable-next-line @angular-eslint/directive-selector
2579
+ selector: '[click.stop]',
2580
+ providers: [SubscriptionService],
2581
+ }]
2582
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: SubscriptionService }]; }, propDecorators: { stopPropEvent: [{
2583
+ type: i0.Output,
2584
+ args: ['click.stop']
2585
+ }] } });
2694
2586
 
2695
2587
  var OAuthConfigurationHandler = /** @class */ (function () {
2696
2588
  function OAuthConfigurationHandler(oAuthService, environmentService, options) {
@@ -2710,17 +2602,19 @@
2710
2602
  };
2711
2603
  return OAuthConfigurationHandler;
2712
2604
  }());
2713
- OAuthConfigurationHandler.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function OAuthConfigurationHandler_Factory() { return new OAuthConfigurationHandler(i0__namespace.ɵɵinject(i1__namespace$1.OAuthService), i0__namespace.ɵɵinject(EnvironmentService), i0__namespace.ɵɵinject(CORE_OPTIONS)); }, token: OAuthConfigurationHandler, providedIn: "root" });
2714
- OAuthConfigurationHandler.decorators = [
2715
- { type: i0.Injectable, args: [{
2716
- providedIn: 'root',
2717
- },] }
2718
- ];
2719
- OAuthConfigurationHandler.ctorParameters = function () { return [
2720
- { type: i1$1.OAuthService },
2721
- { type: EnvironmentService },
2722
- { type: undefined, decorators: [{ type: i0.Inject, args: [CORE_OPTIONS,] }] }
2723
- ]; };
2605
+ OAuthConfigurationHandler.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: OAuthConfigurationHandler, deps: [{ token: i1__namespace$3.OAuthService }, { token: EnvironmentService }, { token: CORE_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2606
+ OAuthConfigurationHandler.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: OAuthConfigurationHandler, providedIn: 'root' });
2607
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: OAuthConfigurationHandler, decorators: [{
2608
+ type: i0.Injectable,
2609
+ args: [{
2610
+ providedIn: 'root',
2611
+ }]
2612
+ }], ctorParameters: function () {
2613
+ return [{ type: i1__namespace$3.OAuthService }, { type: EnvironmentService }, { type: undefined, decorators: [{
2614
+ type: i0.Inject,
2615
+ args: [CORE_OPTIONS]
2616
+ }] }];
2617
+ } });
2724
2618
 
2725
2619
  var RoutesHandler = /** @class */ (function () {
2726
2620
  function RoutesHandler(routes, router) {
@@ -2745,26 +2639,30 @@
2745
2639
  };
2746
2640
  return RoutesHandler;
2747
2641
  }());
2748
- RoutesHandler.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function RoutesHandler_Factory() { return new RoutesHandler(i0__namespace.ɵɵinject(RoutesService), i0__namespace.ɵɵinject(i1__namespace.Router, 8)); }, token: RoutesHandler, providedIn: "root" });
2749
- RoutesHandler.decorators = [
2750
- { type: i0.Injectable, args: [{
2751
- providedIn: 'root',
2752
- },] }
2753
- ];
2754
- RoutesHandler.ctorParameters = function () { return [
2755
- { type: RoutesService },
2756
- { type: i1.Router, decorators: [{ type: i0.Optional }] }
2757
- ]; };
2642
+ RoutesHandler.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RoutesHandler, deps: [{ token: RoutesService }, { token: i1__namespace$1.Router, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2643
+ RoutesHandler.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RoutesHandler, providedIn: 'root' });
2644
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RoutesHandler, decorators: [{
2645
+ type: i0.Injectable,
2646
+ args: [{
2647
+ providedIn: 'root',
2648
+ }]
2649
+ }], ctorParameters: function () {
2650
+ return [{ type: RoutesService }, { type: i1__namespace$1.Router, decorators: [{
2651
+ type: i0.Optional
2652
+ }] }];
2653
+ } });
2758
2654
  function flatRoutes(routes, parent) {
2759
2655
  if (!routes)
2760
2656
  return [];
2761
2657
  return routes.reduce(function (acc, route) {
2762
2658
  var _a = Object.assign(Object.assign({}, route), { parentName: parent.name, path: (parent.path + '/' + route.path).replace(/\/\//g, '/') }), children = _a.children, current = __rest(_a, ["children"]);
2763
- acc.push.apply(acc, __spread([current], flatRoutes(children, current)));
2659
+ acc.push.apply(acc, __spreadArray([current], __read(flatRoutes(children, current))));
2764
2660
  return acc;
2765
2661
  }, []);
2766
2662
  }
2767
2663
 
2664
+ var TENANT_KEY = new i0.InjectionToken('TENANT_KEY');
2665
+
2768
2666
  function getPathName(url) {
2769
2667
  var pathname = new URL(url, window.location.origin).pathname;
2770
2668
  return pathname;
@@ -2825,7 +2723,7 @@
2825
2723
  this.store.patch({ requests: [] });
2826
2724
  };
2827
2725
  HttpWaitService.prototype.addRequest = function (request) {
2828
- this.store.patch({ requests: __spread(this.store.state.requests, [request]) });
2726
+ this.store.patch({ requests: __spreadArray(__spreadArray([], __read(this.store.state.requests)), [request]) });
2829
2727
  };
2830
2728
  HttpWaitService.prototype.deleteRequest = function (request) {
2831
2729
  var requests = this.store.state.requests.filter(function (r) { return r !== request; });
@@ -2834,7 +2732,7 @@
2834
2732
  HttpWaitService.prototype.addFilter = function (request) {
2835
2733
  var _this = this;
2836
2734
  var requests = Array.isArray(request) ? request : [request];
2837
- var filteredRequests = __spread(this.store.state.filteredRequests.filter(function (f) { return !requests.some(function (r) { return _this.isSameRequest(f, r); }); }), requests);
2735
+ var filteredRequests = __spreadArray(__spreadArray([], __read(this.store.state.filteredRequests.filter(function (f) { return !requests.some(function (r) { return _this.isSameRequest(f, r); }); }))), __read(requests));
2838
2736
  this.store.patch({ filteredRequests: filteredRequests });
2839
2737
  };
2840
2738
  HttpWaitService.prototype.removeFilter = function (request) {
@@ -2857,17 +2755,14 @@
2857
2755
  };
2858
2756
  return HttpWaitService;
2859
2757
  }());
2860
- HttpWaitService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function HttpWaitService_Factory() { return new HttpWaitService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: HttpWaitService, providedIn: "root" });
2861
- HttpWaitService.decorators = [
2862
- { type: i0.Injectable, args: [{
2863
- providedIn: 'root',
2864
- },] }
2865
- ];
2866
- HttpWaitService.ctorParameters = function () { return [
2867
- { type: i0.Injector }
2868
- ]; };
2869
-
2870
- var TENANT_KEY = new i0.InjectionToken('TENANT_KEY');
2758
+ HttpWaitService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: HttpWaitService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2759
+ HttpWaitService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: HttpWaitService, providedIn: 'root' });
2760
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: HttpWaitService, decorators: [{
2761
+ type: i0.Injectable,
2762
+ args: [{
2763
+ providedIn: 'root',
2764
+ }]
2765
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
2871
2766
 
2872
2767
  var ApiInterceptor = /** @class */ (function () {
2873
2768
  function ApiInterceptor(oAuthService, sessionState, httpWaitService, tenantKey) {
@@ -2903,18 +2798,19 @@
2903
2798
  };
2904
2799
  return ApiInterceptor;
2905
2800
  }());
2906
- ApiInterceptor.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ApiInterceptor_Factory() { return new ApiInterceptor(i0__namespace.ɵɵinject(i1__namespace$1.OAuthService), i0__namespace.ɵɵinject(SessionStateService), i0__namespace.ɵɵinject(HttpWaitService), i0__namespace.ɵɵinject(TENANT_KEY)); }, token: ApiInterceptor, providedIn: "root" });
2907
- ApiInterceptor.decorators = [
2908
- { type: i0.Injectable, args: [{
2909
- providedIn: 'root',
2910
- },] }
2911
- ];
2912
- ApiInterceptor.ctorParameters = function () { return [
2913
- { type: i1$1.OAuthService },
2914
- { type: SessionStateService },
2915
- { type: HttpWaitService },
2916
- { type: String, decorators: [{ type: i0.Inject, args: [TENANT_KEY,] }] }
2917
- ]; };
2801
+ ApiInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ApiInterceptor, deps: [{ token: i1__namespace$3.OAuthService }, { token: SessionStateService }, { token: HttpWaitService }, { token: TENANT_KEY }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2802
+ ApiInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ApiInterceptor, providedIn: 'root' });
2803
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ApiInterceptor, decorators: [{
2804
+ type: i0.Injectable,
2805
+ args: [{
2806
+ providedIn: 'root',
2807
+ }]
2808
+ }], ctorParameters: function () {
2809
+ return [{ type: i1__namespace$3.OAuthService }, { type: SessionStateService }, { type: HttpWaitService }, { type: undefined, decorators: [{
2810
+ type: i0.Inject,
2811
+ args: [TENANT_KEY]
2812
+ }] }];
2813
+ } });
2918
2814
 
2919
2815
  var LocalizationPipe = /** @class */ (function () {
2920
2816
  function LocalizationPipe(localization) {
@@ -2927,31 +2823,37 @@
2927
2823
  for (var _i = 1; _i < arguments.length; _i++) {
2928
2824
  interpolateParams[_i - 1] = arguments[_i];
2929
2825
  }
2930
- return (_a = this.localization).instant.apply(_a, __spread([value], interpolateParams.reduce(function (acc, val) { return (Array.isArray(val) ? __spread(acc, val) : __spread(acc, [val])); }, [])));
2826
+ return (_a = this.localization).instant.apply(_a, __spreadArray([value], __read(interpolateParams.reduce(function (acc, val) { return (Array.isArray(val) ? __spreadArray(__spreadArray([], __read(acc)), __read(val)) : __spreadArray(__spreadArray([], __read(acc)), [val])); }, []))));
2931
2827
  };
2932
2828
  return LocalizationPipe;
2933
2829
  }());
2934
- LocalizationPipe.decorators = [
2935
- { type: i0.Injectable },
2936
- { type: i0.Pipe, args: [{
2937
- name: 'abpLocalization',
2938
- },] }
2939
- ];
2940
- LocalizationPipe.ctorParameters = function () { return [
2941
- { type: LocalizationService }
2942
- ]; };
2830
+ LocalizationPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationPipe, deps: [{ token: LocalizationService }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2831
+ LocalizationPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationPipe, name: "abpLocalization" });
2832
+ LocalizationPipe.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationPipe });
2833
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationPipe, decorators: [{
2834
+ type: i0.Injectable
2835
+ }, {
2836
+ type: i0.Pipe,
2837
+ args: [{
2838
+ name: 'abpLocalization',
2839
+ }]
2840
+ }], ctorParameters: function () { return [{ type: LocalizationService }]; } });
2943
2841
 
2944
2842
  var LocalizationModule = /** @class */ (function () {
2945
2843
  function LocalizationModule() {
2946
2844
  }
2947
2845
  return LocalizationModule;
2948
2846
  }());
2949
- LocalizationModule.decorators = [
2950
- { type: i0.NgModule, args: [{
2951
- exports: [LocalizationPipe],
2952
- declarations: [LocalizationPipe],
2953
- },] }
2954
- ];
2847
+ LocalizationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2848
+ LocalizationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationModule, declarations: [LocalizationPipe], exports: [LocalizationPipe] });
2849
+ LocalizationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationModule });
2850
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LocalizationModule, decorators: [{
2851
+ type: i0.NgModule,
2852
+ args: [{
2853
+ exports: [LocalizationPipe],
2854
+ declarations: [LocalizationPipe],
2855
+ }]
2856
+ }] });
2955
2857
 
2956
2858
  var SortPipe = /** @class */ (function () {
2957
2859
  function SortPipe() {
@@ -2982,18 +2884,45 @@
2982
2884
  return 0;
2983
2885
  });
2984
2886
  }
2985
- var sorted = __spread(numberArray, stringArray, value.filter(function (item) { return typeof (sortKey ? item[sortKey] : item) !== 'number' &&
2986
- typeof (sortKey ? item[sortKey] : item) !== 'string'; }));
2887
+ var sorted = __spreadArray(__spreadArray(__spreadArray([], __read(numberArray)), __read(stringArray)), __read(value.filter(function (item) { return typeof (sortKey ? item[sortKey] : item) !== 'number' &&
2888
+ typeof (sortKey ? item[sortKey] : item) !== 'string'; })));
2987
2889
  return sortOrder === 'asc' ? sorted : sorted.reverse();
2988
2890
  };
2989
2891
  return SortPipe;
2990
2892
  }());
2991
- SortPipe.decorators = [
2992
- { type: i0.Injectable },
2993
- { type: i0.Pipe, args: [{
2994
- name: 'abpSort',
2995
- },] }
2996
- ];
2893
+ SortPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SortPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2894
+ SortPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SortPipe, name: "abpSort" });
2895
+ SortPipe.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SortPipe });
2896
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: SortPipe, decorators: [{
2897
+ type: i0.Injectable
2898
+ }, {
2899
+ type: i0.Pipe,
2900
+ args: [{
2901
+ name: 'abpSort',
2902
+ }]
2903
+ }] });
2904
+
2905
+ var COOKIE_LANGUAGE_KEY = new i0.InjectionToken('COOKIE_LANGUAGE_KEY', {
2906
+ factory: function () { return '.AspNetCore.Culture'; },
2907
+ });
2908
+
2909
+ function setLanguageToCookie(injector) {
2910
+ return function () {
2911
+ var sessionState = injector.get(SessionStateService);
2912
+ var document = injector.get(i5.DOCUMENT);
2913
+ var cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY);
2914
+ sessionState.getLanguage$().subscribe(function (language) {
2915
+ var cookieValue = encodeURIComponent("c=" + language + "|uic=" + language);
2916
+ document.cookie = cookieLanguageKey + "=" + cookieValue;
2917
+ });
2918
+ };
2919
+ }
2920
+ var CookieLanguageProvider = {
2921
+ provide: i0.APP_INITIALIZER,
2922
+ useFactory: setLanguageToCookie,
2923
+ deps: [i0.Injector],
2924
+ multi: true,
2925
+ };
2997
2926
 
2998
2927
  var LocaleId = /** @class */ (function (_super) {
2999
2928
  __extends(LocaleId, _super);
@@ -3017,109 +2946,11 @@
3017
2946
  deps: [LocalizationService],
3018
2947
  };
3019
2948
 
3020
- var ProfileService = /** @class */ (function () {
3021
- function ProfileService(rest) {
3022
- this.rest = rest;
3023
- this.apiName = 'AbpIdentity';
3024
- }
3025
- ProfileService.prototype.get = function () {
3026
- var request = {
3027
- method: 'GET',
3028
- url: '/api/identity/my-profile',
3029
- };
3030
- return this.rest.request(request, { apiName: this.apiName });
3031
- };
3032
- ProfileService.prototype.update = function (body) {
3033
- var request = {
3034
- method: 'PUT',
3035
- url: '/api/identity/my-profile',
3036
- body: body,
3037
- };
3038
- return this.rest.request(request, {
3039
- apiName: this.apiName,
3040
- });
3041
- };
3042
- ProfileService.prototype.changePassword = function (body, skipHandleError) {
3043
- if (skipHandleError === void 0) { skipHandleError = false; }
3044
- var request = {
3045
- method: 'POST',
3046
- url: '/api/identity/my-profile/change-password',
3047
- body: body,
3048
- };
3049
- return this.rest.request(request, {
3050
- skipHandleError: skipHandleError,
3051
- apiName: this.apiName,
3052
- });
3053
- };
3054
- return ProfileService;
3055
- }());
3056
- ProfileService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ProfileService_Factory() { return new ProfileService(i0__namespace.ɵɵinject(RestService)); }, token: ProfileService, providedIn: "root" });
3057
- ProfileService.decorators = [
3058
- { type: i0.Injectable, args: [{
3059
- providedIn: 'root',
3060
- },] }
3061
- ];
3062
- ProfileService.ctorParameters = function () { return [
3063
- { type: RestService }
3064
- ]; };
3065
-
3066
- exports.ɵbd = /** @class */ (function () {
3067
- function ProfileState(profileService) {
3068
- this.profileService = profileService;
3069
- }
3070
- ProfileState.getProfile = function (_a) {
3071
- var profile = _a.profile;
3072
- return profile;
3073
- };
3074
- ProfileState.prototype.getProfile = function (_a) {
3075
- var patchState = _a.patchState;
3076
- return this.profileService.get().pipe(operators.tap(function (profile) { return patchState({
3077
- profile: profile,
3078
- }); }));
3079
- };
3080
- ProfileState.prototype.updateProfile = function (_a, _b) {
3081
- var patchState = _a.patchState;
3082
- var payload = _b.payload;
3083
- return this.profileService.update(payload).pipe(operators.tap(function (profile) { return patchState({
3084
- profile: profile,
3085
- }); }));
3086
- };
3087
- ProfileState.prototype.changePassword = function (_, _a) {
3088
- var payload = _a.payload;
3089
- return this.profileService.changePassword(payload, true);
3090
- };
3091
- return ProfileState;
3092
- }());
3093
- exports.ɵbd.decorators = [
3094
- { type: i0.Injectable }
3095
- ];
3096
- exports.ɵbd.ctorParameters = function () { return [
3097
- { type: ProfileService }
3098
- ]; };
3099
- __decorate([
3100
- i4.Action(GetProfile)
3101
- ], exports.ɵbd.prototype, "getProfile", null);
3102
- __decorate([
3103
- i4.Action(UpdateProfile)
3104
- ], exports.ɵbd.prototype, "updateProfile", null);
3105
- __decorate([
3106
- i4.Action(ChangePassword)
3107
- ], exports.ɵbd.prototype, "changePassword", null);
3108
- __decorate([
3109
- i4.Selector()
3110
- ], exports.ɵbd, "getProfile", null);
3111
- exports.ɵbd = __decorate([
3112
- i4.State({
3113
- name: 'ProfileState',
3114
- defaults: {},
3115
- })
3116
- ], exports.ɵbd);
3117
-
3118
2949
  var cookieKey = 'rememberMe';
3119
2950
  var storageKey = 'passwordFlow';
3120
2951
  function pipeToLogin(params, injector) {
3121
2952
  var configState = injector.get(ConfigStateService);
3122
- var router = injector.get(i1.Router);
2953
+ var router = injector.get(i1$1.Router);
3123
2954
  return rxjs.pipe(operators.switchMap(function () { return configState.refreshAppState(); }), operators.tap(function () {
3124
2955
  setRememberMe(params.rememberMe);
3125
2956
  if (params.redirectUrl)
@@ -3128,7 +2959,7 @@
3128
2959
  }
3129
2960
  function setTokenResponseToStorage(injector, tokenRes) {
3130
2961
  var access_token = tokenRes.access_token, refresh_token = tokenRes.refresh_token, grantedScopes = tokenRes.scope, expires_in = tokenRes.expires_in;
3131
- var storage = injector.get(i1$1.OAuthStorage);
2962
+ var storage = injector.get(i1$3.OAuthStorage);
3132
2963
  storage.setItem('access_token', access_token);
3133
2964
  storage.setItem('refresh_token', refresh_token);
3134
2965
  storage.setItem('access_token_stored_at', '' + Date.now());
@@ -3157,11 +2988,14 @@
3157
2988
  function AuthFlowStrategy(injector) {
3158
2989
  var _this = this;
3159
2990
  this.injector = injector;
3160
- this.catchError = function (err) { return _this.store.dispatch(new RestOccurError(err)); };
3161
- this.store = injector.get(i4.Store);
2991
+ this.catchError = function (err) {
2992
+ _this.httpErrorReporter.reportError(err);
2993
+ return rxjs.of(null);
2994
+ };
2995
+ this.httpErrorReporter = injector.get(HttpErrorReporterService);
3162
2996
  this.environment = injector.get(EnvironmentService);
3163
2997
  this.configState = injector.get(ConfigStateService);
3164
- this.oAuthService = injector.get(i1$1.OAuthService);
2998
+ this.oAuthService = injector.get(i1$3.OAuthService);
3165
2999
  this.sessionState = injector.get(SessionStateService);
3166
3000
  this.oAuthConfig = this.environment.getEnvironment().oAuthConfig;
3167
3001
  this.tenantKey = injector.get(TENANT_KEY);
@@ -3194,7 +3028,7 @@
3194
3028
  AuthFlowStrategy.prototype.listenToOauthErrors = function () {
3195
3029
  var _this = this;
3196
3030
  this.oAuthService.events
3197
- .pipe(operators.filter(function (event) { return event instanceof i1$1.OAuthErrorEvent; }), operators.tap(function () { return clearOAuthStorage(); }), operators.switchMap(function () { return _this.configState.refreshAppState(); }))
3031
+ .pipe(operators.filter(function (event) { return event instanceof i1$3.OAuthErrorEvent; }), operators.tap(function () { return clearOAuthStorage(); }), operators.switchMap(function () { return _this.configState.refreshAppState(); }))
3198
3032
  .subscribe();
3199
3033
  };
3200
3034
  return AuthFlowStrategy;
@@ -3202,7 +3036,7 @@
3202
3036
  var AuthCodeFlowStrategy = /** @class */ (function (_super_1) {
3203
3037
  __extends(AuthCodeFlowStrategy, _super_1);
3204
3038
  function AuthCodeFlowStrategy() {
3205
- var _this = _super_1.apply(this, __spread(arguments)) || this;
3039
+ var _this = _super_1.apply(this, __spreadArray([], __read(arguments))) || this;
3206
3040
  _this.isInternalAuth = false;
3207
3041
  return _this;
3208
3042
  }
@@ -3243,7 +3077,7 @@
3243
3077
  var AuthPasswordFlowStrategy = /** @class */ (function (_super_1) {
3244
3078
  __extends(AuthPasswordFlowStrategy, _super_1);
3245
3079
  function AuthPasswordFlowStrategy() {
3246
- var _this = _super_1.apply(this, __spread(arguments)) || this;
3080
+ var _this = _super_1.apply(this, __spreadArray([], __read(arguments))) || this;
3247
3081
  _this.isInternalAuth = true;
3248
3082
  _this.cookieKey = 'rememberMe';
3249
3083
  _this.storageKey = 'passwordFlow';
@@ -3252,7 +3086,7 @@
3252
3086
  AuthPasswordFlowStrategy.prototype.listenToTokenExpiration = function () {
3253
3087
  var _this = this;
3254
3088
  this.oAuthService.events
3255
- .pipe(operators.filter(function (event) { return event instanceof i1$1.OAuthInfoEvent &&
3089
+ .pipe(operators.filter(function (event) { return event instanceof i1$3.OAuthInfoEvent &&
3256
3090
  event.type === 'token_expires' &&
3257
3091
  event.info === 'access_token'; }))
3258
3092
  .subscribe(function () {
@@ -3281,7 +3115,7 @@
3281
3115
  });
3282
3116
  };
3283
3117
  AuthPasswordFlowStrategy.prototype.navigateToLogin = function (queryParams) {
3284
- var router = this.injector.get(i1.Router);
3118
+ var router = this.injector.get(i1$1.Router);
3285
3119
  router.navigate(['/account/login'], { queryParams: queryParams });
3286
3120
  };
3287
3121
  AuthPasswordFlowStrategy.prototype.checkIfInternalAuth = function () {
@@ -3290,11 +3124,11 @@
3290
3124
  AuthPasswordFlowStrategy.prototype.login = function (params) {
3291
3125
  var _a;
3292
3126
  var tenant = this.sessionState.getTenant();
3293
- return rxjs.from(this.oAuthService.fetchTokenUsingPasswordFlow(params.username, params.password, new i2.HttpHeaders(Object.assign({}, (tenant && tenant.id && (_a = {}, _a[this.tenantKey] = tenant.id, _a)))))).pipe(this.pipeToLogin(params));
3127
+ return rxjs.from(this.oAuthService.fetchTokenUsingPasswordFlow(params.username, params.password, new i1.HttpHeaders(Object.assign({}, (tenant && tenant.id && (_a = {}, _a[this.tenantKey] = tenant.id, _a)))))).pipe(this.pipeToLogin(params));
3294
3128
  };
3295
3129
  AuthPasswordFlowStrategy.prototype.pipeToLogin = function (params) {
3296
3130
  var _this = this;
3297
- var router = this.injector.get(i1.Router);
3131
+ var router = this.injector.get(i1$1.Router);
3298
3132
  return rxjs.pipe(operators.switchMap(function () { return _this.configState.refreshAppState(); }), operators.tap(function () {
3299
3133
  setRememberMe(params.rememberMe);
3300
3134
  if (params.redirectUrl)
@@ -3303,7 +3137,7 @@
3303
3137
  };
3304
3138
  AuthPasswordFlowStrategy.prototype.logout = function (queryParams) {
3305
3139
  var _this = this;
3306
- var router = this.injector.get(i1.Router);
3140
+ var router = this.injector.get(i1$1.Router);
3307
3141
  return rxjs.from(this.oAuthService.revokeTokenAndLogout(queryParams)).pipe(operators.switchMap(function () { return _this.configState.refreshAppState(); }), operators.tap(function () {
3308
3142
  router.navigateByUrl('/');
3309
3143
  removeRememberMe();
@@ -3396,12 +3230,6 @@
3396
3230
  AuthService.prototype.logout = function (queryParams) {
3397
3231
  return this.strategy.logout(queryParams);
3398
3232
  };
3399
- /**
3400
- * @deprecated Use navigateToLogin method instead. To be deleted in v5.0
3401
- */
3402
- AuthService.prototype.initLogin = function () {
3403
- this.strategy.navigateToLogin();
3404
- };
3405
3233
  AuthService.prototype.navigateToLogin = function (queryParams) {
3406
3234
  this.strategy.navigateToLogin(queryParams);
3407
3235
  };
@@ -3410,15 +3238,14 @@
3410
3238
  };
3411
3239
  return AuthService;
3412
3240
  }());
3413
- AuthService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AuthService_Factory() { return new AuthService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: AuthService, providedIn: "root" });
3414
- AuthService.decorators = [
3415
- { type: i0.Injectable, args: [{
3416
- providedIn: 'root',
3417
- },] }
3418
- ];
3419
- AuthService.ctorParameters = function () { return [
3420
- { type: i0.Injector }
3421
- ]; };
3241
+ AuthService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AuthService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3242
+ AuthService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AuthService, providedIn: 'root' });
3243
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AuthService, decorators: [{
3244
+ type: i0.Injectable,
3245
+ args: [{
3246
+ providedIn: 'root',
3247
+ }]
3248
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
3422
3249
 
3423
3250
  var APP_INIT_ERROR_HANDLERS = new i0.InjectionToken('APP_INIT_ERROR_HANDLERS');
3424
3251
 
@@ -3428,11 +3255,14 @@
3428
3255
  var _a = remoteEnv || {}, _b = _a.headers, headers = _b === void 0 ? {} : _b, _c = _a.method, method = _c === void 0 ? 'GET' : _c, url = _a.url;
3429
3256
  if (!url)
3430
3257
  return Promise.resolve();
3431
- var http = injector.get(i2.HttpClient);
3432
- var store = injector.get(i4.Store);
3258
+ var http = injector.get(i1.HttpClient);
3259
+ var httpErrorReporter = injector.get(HttpErrorReporterService);
3433
3260
  return http
3434
3261
  .request(method, url, { headers: headers })
3435
- .pipe(operators.catchError(function (err) { return store.dispatch(new RestOccurError(err)); }), // TODO: Condiser get handle function from a provider
3262
+ .pipe(operators.catchError(function (err) {
3263
+ httpErrorReporter.reportError(err);
3264
+ return rxjs.of(null);
3265
+ }), // TODO: Consider get handle function from a provider
3436
3266
  operators.tap(function (env) { return environmentService.setState(mergeEnvironments(environment, env, remoteEnv)); }))
3437
3267
  .toPromise();
3438
3268
  }
@@ -3467,15 +3297,14 @@
3467
3297
  }
3468
3298
  return AbpTenantService;
3469
3299
  }());
3470
- AbpTenantService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AbpTenantService_Factory() { return new AbpTenantService(i0__namespace.ɵɵinject(RestService)); }, token: AbpTenantService, providedIn: "root" });
3471
- AbpTenantService.decorators = [
3472
- { type: i0.Injectable, args: [{
3473
- providedIn: 'root',
3474
- },] }
3475
- ];
3476
- AbpTenantService.ctorParameters = function () { return [
3477
- { type: RestService }
3478
- ]; };
3300
+ AbpTenantService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpTenantService, deps: [{ token: RestService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3301
+ AbpTenantService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpTenantService, providedIn: 'root' });
3302
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpTenantService, decorators: [{
3303
+ type: i0.Injectable,
3304
+ args: [{
3305
+ providedIn: 'root',
3306
+ }]
3307
+ }], ctorParameters: function () { return [{ type: RestService }]; } });
3479
3308
 
3480
3309
  var MultiTenancyService = /** @class */ (function () {
3481
3310
  function MultiTenancyService(restService, sessionState, tenantService, configStateService, tenantKey) {
@@ -3493,22 +3322,6 @@
3493
3322
  return _this.configStateService.refreshAppState().pipe(operators.map(function (_) { return tenant; }));
3494
3323
  };
3495
3324
  }
3496
- /**
3497
- * @deprecated Use AbpTenantService.findTenantByName method instead. To be deleted in v5.0.
3498
- */
3499
- MultiTenancyService.prototype.findTenantByName = function (name, headers) {
3500
- return this.restService.request({
3501
- url: "/api/abp/multi-tenancy/tenants/by-name/" + name,
3502
- method: 'GET',
3503
- headers: headers,
3504
- }, { apiName: this.apiName });
3505
- };
3506
- /**
3507
- * @deprecated Use AbpTenantService.findTenantById method instead. To be deleted in v5.0.
3508
- */
3509
- MultiTenancyService.prototype.findTenantById = function (id, headers) {
3510
- return this.restService.request({ url: "/api/abp/multi-tenancy/tenants/by-id/" + id, method: 'GET', headers: headers }, { apiName: this.apiName });
3511
- };
3512
3325
  MultiTenancyService.prototype.setTenantByName = function (tenantName) {
3513
3326
  var _a;
3514
3327
  return this.tenantService
@@ -3523,17 +3336,17 @@
3523
3336
  };
3524
3337
  return MultiTenancyService;
3525
3338
  }());
3526
- MultiTenancyService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MultiTenancyService_Factory() { return new MultiTenancyService(i0__namespace.ɵɵinject(RestService), i0__namespace.ɵɵinject(SessionStateService), i0__namespace.ɵɵinject(AbpTenantService), i0__namespace.ɵɵinject(ConfigStateService), i0__namespace.ɵɵinject(TENANT_KEY)); }, token: MultiTenancyService, providedIn: "root" });
3527
- MultiTenancyService.decorators = [
3528
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
3529
- ];
3530
- MultiTenancyService.ctorParameters = function () { return [
3531
- { type: RestService },
3532
- { type: SessionStateService },
3533
- { type: AbpTenantService },
3534
- { type: ConfigStateService },
3535
- { type: String, decorators: [{ type: i0.Inject, args: [TENANT_KEY,] }] }
3536
- ]; };
3339
+ MultiTenancyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: MultiTenancyService, deps: [{ token: RestService }, { token: SessionStateService }, { token: AbpTenantService }, { token: ConfigStateService }, { token: TENANT_KEY }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3340
+ MultiTenancyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: MultiTenancyService, providedIn: 'root' });
3341
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: MultiTenancyService, decorators: [{
3342
+ type: i0.Injectable,
3343
+ args: [{ providedIn: 'root' }]
3344
+ }], ctorParameters: function () {
3345
+ return [{ type: RestService }, { type: SessionStateService }, { type: AbpTenantService }, { type: ConfigStateService }, { type: undefined, decorators: [{
3346
+ type: i0.Inject,
3347
+ args: [TENANT_KEY]
3348
+ }] }];
3349
+ } });
3537
3350
 
3538
3351
  var tenancyPlaceholder = '{0}';
3539
3352
  function getCurrentTenancyName(appBaseUrl) {
@@ -3658,7 +3471,7 @@
3658
3471
  }
3659
3472
  function checkAccessToken(injector) {
3660
3473
  var configState = injector.get(ConfigStateService);
3661
- var oAuth = injector.get(i1$1.OAuthService);
3474
+ var oAuth = injector.get(i1$3.OAuthService);
3662
3475
  if (oAuth.hasValidAccessToken() && !configState.getDeep('currentUser.id')) {
3663
3476
  clearOAuthStorage();
3664
3477
  }
@@ -3671,7 +3484,7 @@
3671
3484
  return new Promise(function (resolve, reject) {
3672
3485
  registerLocaleFn(lang).then(function (module) {
3673
3486
  if (module === null || module === void 0 ? void 0 : module.default)
3674
- common.registerLocaleData(module.default);
3487
+ i5.registerLocaleData(module.default);
3675
3488
  return resolve('resolved');
3676
3489
  }, reject);
3677
3490
  });
@@ -3693,63 +3506,114 @@
3693
3506
  }
3694
3507
  return BaseCoreModule;
3695
3508
  }());
3696
- BaseCoreModule.decorators = [
3697
- { type: i0.NgModule, args: [{
3698
- exports: [
3699
- common.CommonModule,
3700
- i2.HttpClientModule,
3701
- forms.FormsModule,
3702
- forms.ReactiveFormsModule,
3703
- i1.RouterModule,
3704
- LocalizationModule,
3705
- AbstractNgModelComponent,
3706
- AutofocusDirective,
3707
- DynamicLayoutComponent,
3708
- ForDirective,
3709
- FormSubmitDirective,
3710
- InitDirective,
3711
- InputEventDebounceDirective,
3712
- PermissionDirective,
3713
- ReplaceableRouteContainerComponent,
3714
- ReplaceableTemplateDirective,
3715
- RouterOutletComponent,
3716
- SortPipe,
3717
- StopPropagationDirective,
3718
- VisibilityDirective,
3719
- ],
3720
- imports: [
3721
- i1$1.OAuthModule,
3722
- common.CommonModule,
3723
- i2.HttpClientModule,
3724
- forms.FormsModule,
3725
- forms.ReactiveFormsModule,
3726
- i1.RouterModule,
3727
- LocalizationModule,
3728
- ],
3729
- declarations: [
3730
- AbstractNgModelComponent,
3731
- AutofocusDirective,
3732
- DynamicLayoutComponent,
3733
- ForDirective,
3734
- FormSubmitDirective,
3735
- InitDirective,
3736
- InputEventDebounceDirective,
3737
- PermissionDirective,
3738
- ReplaceableRouteContainerComponent,
3739
- ReplaceableTemplateDirective,
3740
- RouterOutletComponent,
3741
- SortPipe,
3742
- StopPropagationDirective,
3743
- VisibilityDirective,
3744
- ],
3745
- providers: [LocalizationPipe],
3746
- entryComponents: [
3747
- RouterOutletComponent,
3748
- DynamicLayoutComponent,
3749
- ReplaceableRouteContainerComponent,
3750
- ],
3751
- },] }
3752
- ];
3509
+ BaseCoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: BaseCoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3510
+ BaseCoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: BaseCoreModule, declarations: [AbstractNgModelComponent,
3511
+ AutofocusDirective,
3512
+ DynamicLayoutComponent,
3513
+ ForDirective,
3514
+ FormSubmitDirective,
3515
+ InitDirective,
3516
+ InputEventDebounceDirective,
3517
+ PermissionDirective,
3518
+ ReplaceableRouteContainerComponent,
3519
+ ReplaceableTemplateDirective,
3520
+ RouterOutletComponent,
3521
+ SortPipe,
3522
+ StopPropagationDirective], imports: [i1$3.OAuthModule,
3523
+ i5.CommonModule,
3524
+ i1.HttpClientModule,
3525
+ i1$2.FormsModule,
3526
+ i1$2.ReactiveFormsModule,
3527
+ i1$1.RouterModule,
3528
+ LocalizationModule], exports: [i5.CommonModule,
3529
+ i1.HttpClientModule,
3530
+ i1$2.FormsModule,
3531
+ i1$2.ReactiveFormsModule,
3532
+ i1$1.RouterModule,
3533
+ LocalizationModule,
3534
+ AbstractNgModelComponent,
3535
+ AutofocusDirective,
3536
+ DynamicLayoutComponent,
3537
+ ForDirective,
3538
+ FormSubmitDirective,
3539
+ InitDirective,
3540
+ InputEventDebounceDirective,
3541
+ PermissionDirective,
3542
+ ReplaceableRouteContainerComponent,
3543
+ ReplaceableTemplateDirective,
3544
+ RouterOutletComponent,
3545
+ SortPipe,
3546
+ StopPropagationDirective] });
3547
+ BaseCoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: BaseCoreModule, providers: [LocalizationPipe], imports: [[
3548
+ i1$3.OAuthModule,
3549
+ i5.CommonModule,
3550
+ i1.HttpClientModule,
3551
+ i1$2.FormsModule,
3552
+ i1$2.ReactiveFormsModule,
3553
+ i1$1.RouterModule,
3554
+ LocalizationModule,
3555
+ ], i5.CommonModule,
3556
+ i1.HttpClientModule,
3557
+ i1$2.FormsModule,
3558
+ i1$2.ReactiveFormsModule,
3559
+ i1$1.RouterModule,
3560
+ LocalizationModule] });
3561
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: BaseCoreModule, decorators: [{
3562
+ type: i0.NgModule,
3563
+ args: [{
3564
+ exports: [
3565
+ i5.CommonModule,
3566
+ i1.HttpClientModule,
3567
+ i1$2.FormsModule,
3568
+ i1$2.ReactiveFormsModule,
3569
+ i1$1.RouterModule,
3570
+ LocalizationModule,
3571
+ AbstractNgModelComponent,
3572
+ AutofocusDirective,
3573
+ DynamicLayoutComponent,
3574
+ ForDirective,
3575
+ FormSubmitDirective,
3576
+ InitDirective,
3577
+ InputEventDebounceDirective,
3578
+ PermissionDirective,
3579
+ ReplaceableRouteContainerComponent,
3580
+ ReplaceableTemplateDirective,
3581
+ RouterOutletComponent,
3582
+ SortPipe,
3583
+ StopPropagationDirective,
3584
+ ],
3585
+ imports: [
3586
+ i1$3.OAuthModule,
3587
+ i5.CommonModule,
3588
+ i1.HttpClientModule,
3589
+ i1$2.FormsModule,
3590
+ i1$2.ReactiveFormsModule,
3591
+ i1$1.RouterModule,
3592
+ LocalizationModule,
3593
+ ],
3594
+ declarations: [
3595
+ AbstractNgModelComponent,
3596
+ AutofocusDirective,
3597
+ DynamicLayoutComponent,
3598
+ ForDirective,
3599
+ FormSubmitDirective,
3600
+ InitDirective,
3601
+ InputEventDebounceDirective,
3602
+ PermissionDirective,
3603
+ ReplaceableRouteContainerComponent,
3604
+ ReplaceableTemplateDirective,
3605
+ RouterOutletComponent,
3606
+ SortPipe,
3607
+ StopPropagationDirective,
3608
+ ],
3609
+ providers: [LocalizationPipe],
3610
+ entryComponents: [
3611
+ RouterOutletComponent,
3612
+ DynamicLayoutComponent,
3613
+ ReplaceableRouteContainerComponent,
3614
+ ],
3615
+ }]
3616
+ }] });
3753
3617
  /**
3754
3618
  * RootCoreModule is the module that will be used at root level
3755
3619
  * and it introduces imports useful at root level (e.g. NGXS)
@@ -3759,21 +3623,32 @@
3759
3623
  }
3760
3624
  return RootCoreModule;
3761
3625
  }());
3762
- RootCoreModule.decorators = [
3763
- { type: i0.NgModule, args: [{
3764
- exports: [BaseCoreModule, LocalizationModule],
3765
- imports: [
3766
- BaseCoreModule,
3767
- LocalizationModule,
3768
- i4.NgxsModule.forFeature([exports.ɵbd]),
3769
- i1$1.OAuthModule.forRoot(),
3770
- i2.HttpClientXsrfModule.withOptions({
3771
- cookieName: 'XSRF-TOKEN',
3772
- headerName: 'RequestVerificationToken',
3773
- }),
3774
- ],
3775
- },] }
3776
- ];
3626
+ RootCoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RootCoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3627
+ RootCoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RootCoreModule, imports: [BaseCoreModule, LocalizationModule, i1__namespace$3.OAuthModule, i1__namespace.HttpClientXsrfModule], exports: [BaseCoreModule, LocalizationModule] });
3628
+ RootCoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RootCoreModule, imports: [[
3629
+ BaseCoreModule,
3630
+ LocalizationModule,
3631
+ i1$3.OAuthModule.forRoot(),
3632
+ i1.HttpClientXsrfModule.withOptions({
3633
+ cookieName: 'XSRF-TOKEN',
3634
+ headerName: 'RequestVerificationToken',
3635
+ }),
3636
+ ], BaseCoreModule, LocalizationModule] });
3637
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RootCoreModule, decorators: [{
3638
+ type: i0.NgModule,
3639
+ args: [{
3640
+ exports: [BaseCoreModule, LocalizationModule],
3641
+ imports: [
3642
+ BaseCoreModule,
3643
+ LocalizationModule,
3644
+ i1$3.OAuthModule.forRoot(),
3645
+ i1.HttpClientXsrfModule.withOptions({
3646
+ cookieName: 'XSRF-TOKEN',
3647
+ headerName: 'RequestVerificationToken',
3648
+ }),
3649
+ ],
3650
+ }]
3651
+ }] });
3777
3652
  /**
3778
3653
  * CoreModule is the module that is publicly available
3779
3654
  */
@@ -3786,6 +3661,7 @@
3786
3661
  ngModule: RootCoreModule,
3787
3662
  providers: [
3788
3663
  LocaleProvider,
3664
+ CookieLanguageProvider,
3789
3665
  {
3790
3666
  provide: 'CORE_OPTIONS',
3791
3667
  useValue: options,
@@ -3796,7 +3672,7 @@
3796
3672
  deps: ['CORE_OPTIONS'],
3797
3673
  },
3798
3674
  {
3799
- provide: i2.HTTP_INTERCEPTORS,
3675
+ provide: i1.HTTP_INTERCEPTORS,
3800
3676
  useExisting: ApiInterceptor,
3801
3677
  multi: true,
3802
3678
  },
@@ -3830,19 +3706,23 @@
3830
3706
  deps: [RoutesHandler],
3831
3707
  useFactory: noop,
3832
3708
  },
3833
- { provide: i1$1.OAuthStorage, useFactory: storageFactory },
3709
+ { provide: i1$3.OAuthStorage, useFactory: storageFactory },
3834
3710
  { provide: TENANT_KEY, useValue: options.tenantKey || '__tenant' },
3835
3711
  ],
3836
3712
  };
3837
3713
  };
3838
3714
  return CoreModule;
3839
3715
  }());
3840
- CoreModule.decorators = [
3841
- { type: i0.NgModule, args: [{
3842
- exports: [BaseCoreModule],
3843
- imports: [BaseCoreModule],
3844
- },] }
3845
- ];
3716
+ CoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: CoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3717
+ CoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: CoreModule, imports: [BaseCoreModule], exports: [BaseCoreModule] });
3718
+ CoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: CoreModule, imports: [[BaseCoreModule], BaseCoreModule] });
3719
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: CoreModule, decorators: [{
3720
+ type: i0.NgModule,
3721
+ args: [{
3722
+ exports: [BaseCoreModule],
3723
+ imports: [BaseCoreModule],
3724
+ }]
3725
+ }] });
3846
3726
  function ngxsStoragePluginSerialize(data) {
3847
3727
  return data;
3848
3728
  }
@@ -3862,23 +3742,21 @@
3862
3742
  };
3863
3743
  return AuthGuard;
3864
3744
  }());
3865
- AuthGuard.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AuthGuard_Factory() { return new AuthGuard(i0__namespace.ɵɵinject(i1__namespace$1.OAuthService), i0__namespace.ɵɵinject(AuthService)); }, token: AuthGuard, providedIn: "root" });
3866
- AuthGuard.decorators = [
3867
- { type: i0.Injectable, args: [{
3868
- providedIn: 'root',
3869
- },] }
3870
- ];
3871
- AuthGuard.ctorParameters = function () { return [
3872
- { type: i1$1.OAuthService },
3873
- { type: AuthService }
3874
- ]; };
3745
+ AuthGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AuthGuard, deps: [{ token: i1__namespace$3.OAuthService }, { token: AuthService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3746
+ AuthGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AuthGuard, providedIn: 'root' });
3747
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AuthGuard, decorators: [{
3748
+ type: i0.Injectable,
3749
+ args: [{
3750
+ providedIn: 'root',
3751
+ }]
3752
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.OAuthService }, { type: AuthService }]; } });
3875
3753
 
3876
3754
  var PermissionGuard = /** @class */ (function () {
3877
- function PermissionGuard(router, routesService, store, permissionService) {
3755
+ function PermissionGuard(router, routesService, permissionService, httpErrorReporter) {
3878
3756
  this.router = router;
3879
3757
  this.routesService = routesService;
3880
- this.store = store;
3881
3758
  this.permissionService = permissionService;
3759
+ this.httpErrorReporter = httpErrorReporter;
3882
3760
  }
3883
3761
  PermissionGuard.prototype.canActivate = function (route, state) {
3884
3762
  var _this = this;
@@ -3891,30 +3769,26 @@
3891
3769
  return rxjs.of(true);
3892
3770
  return this.permissionService.getGrantedPolicy$(requiredPolicy).pipe(operators.tap(function (access) {
3893
3771
  if (!access) {
3894
- _this.store.dispatch(new RestOccurError({ status: 403 }));
3772
+ _this.httpErrorReporter.reportError({ status: 403 });
3895
3773
  }
3896
3774
  }));
3897
3775
  };
3898
3776
  return PermissionGuard;
3899
3777
  }());
3900
- PermissionGuard.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PermissionGuard_Factory() { return new PermissionGuard(i0__namespace.ɵɵinject(i1__namespace.Router), i0__namespace.ɵɵinject(RoutesService), i0__namespace.ɵɵinject(i4__namespace.Store), i0__namespace.ɵɵinject(PermissionService)); }, token: PermissionGuard, providedIn: "root" });
3901
- PermissionGuard.decorators = [
3902
- { type: i0.Injectable, args: [{
3903
- providedIn: 'root',
3904
- },] }
3905
- ];
3906
- PermissionGuard.ctorParameters = function () { return [
3907
- { type: i1.Router },
3908
- { type: RoutesService },
3909
- { type: i4.Store },
3910
- { type: PermissionService }
3911
- ]; };
3778
+ PermissionGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionGuard, deps: [{ token: i1__namespace$1.Router }, { token: RoutesService }, { token: PermissionService }, { token: HttpErrorReporterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3779
+ PermissionGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionGuard, providedIn: 'root' });
3780
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: PermissionGuard, decorators: [{
3781
+ type: i0.Injectable,
3782
+ args: [{
3783
+ providedIn: 'root',
3784
+ }]
3785
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: RoutesService }, { type: PermissionService }, { type: HttpErrorReporterService }]; } });
3912
3786
 
3913
3787
  var ListResultDto = /** @class */ (function () {
3914
3788
  function ListResultDto(initialValues) {
3915
3789
  if (initialValues === void 0) { initialValues = {}; }
3916
3790
  for (var key in initialValues) {
3917
- if (initialValues.hasOwnProperty(key)) {
3791
+ if (Object.prototype.hasOwnProperty.call(initialValues, key)) {
3918
3792
  this[key] = initialValues[key];
3919
3793
  }
3920
3794
  }
@@ -3934,7 +3808,8 @@
3934
3808
  if (initialValues === void 0) { initialValues = {}; }
3935
3809
  this.maxResultCount = 10;
3936
3810
  for (var key in initialValues) {
3937
- if (initialValues.hasOwnProperty(key) && initialValues[key] !== undefined) {
3811
+ if (Object.prototype.hasOwnProperty.call(initialValues, key) &&
3812
+ initialValues[key] !== undefined) {
3938
3813
  this[key] = initialValues[key];
3939
3814
  }
3940
3815
  }
@@ -3961,7 +3836,7 @@
3961
3836
  function EntityDto(initialValues) {
3962
3837
  if (initialValues === void 0) { initialValues = {}; }
3963
3838
  for (var key in initialValues) {
3964
- if (initialValues.hasOwnProperty(key)) {
3839
+ if (Object.prototype.hasOwnProperty.call(initialValues, key)) {
3965
3840
  this[key] = initialValues[key];
3966
3841
  }
3967
3842
  }
@@ -4020,7 +3895,7 @@
4020
3895
  function ExtensibleObject(initialValues) {
4021
3896
  if (initialValues === void 0) { initialValues = {}; }
4022
3897
  for (var key in initialValues) {
4023
- if (initialValues.hasOwnProperty(key)) {
3898
+ if (Object.prototype.hasOwnProperty.call(initialValues, key)) {
4024
3899
  this[key] = initialValues[key];
4025
3900
  }
4026
3901
  }
@@ -4084,31 +3959,31 @@
4084
3959
  return ExtensibleFullAuditedEntityWithUserDto;
4085
3960
  }(ExtensibleFullAuditedEntityDto));
4086
3961
 
4087
- /**
4088
- * @deprecated Use AbpApplicationConfigurationService instead. To be deleted in v5.0.
4089
- */
4090
- var ApplicationConfigurationService = /** @class */ (function () {
4091
- function ApplicationConfigurationService(rest) {
4092
- this.rest = rest;
4093
- }
4094
- ApplicationConfigurationService.prototype.getConfiguration = function () {
4095
- var request = {
3962
+ var AbpApiDefinitionService = /** @class */ (function () {
3963
+ function AbpApiDefinitionService(restService) {
3964
+ var _this = this;
3965
+ this.restService = restService;
3966
+ this.apiName = 'abp';
3967
+ this.getByModel = function (model) { return _this.restService.request({
4096
3968
  method: 'GET',
4097
- url: '/api/abp/application-configuration',
4098
- };
4099
- return this.rest.request(request, {});
4100
- };
4101
- return ApplicationConfigurationService;
3969
+ url: '/api/abp/api-definition',
3970
+ params: { includeTypes: model.includeTypes },
3971
+ }, { apiName: _this.apiName }); };
3972
+ }
3973
+ return AbpApiDefinitionService;
4102
3974
  }());
4103
- ApplicationConfigurationServiceprov = i0__namespace.ɵɵdefineInjectable({ factory: function ApplicationConfigurationService_Factory() { return new ApplicationConfigurationService(i0__namespace.ɵɵinject(RestService)); }, token: ApplicationConfigurationService, providedIn: "root" });
4104
- ApplicationConfigurationService.decorators = [
4105
- { type: i0.Injectable, args: [{
4106
- providedIn: 'root',
4107
- },] }
4108
- ];
4109
- ApplicationConfigurationService.ctorParameters = function () { return [
4110
- { type: RestService }
4111
- ]; };
3975
+ AbpApiDefinitionServicefac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpApiDefinitionService, deps: [{ token: RestService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3976
+ AbpApiDefinitionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpApiDefinitionService, providedIn: 'root' });
3977
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AbpApiDefinitionService, decorators: [{
3978
+ type: i0.Injectable,
3979
+ args: [{
3980
+ providedIn: 'root',
3981
+ }]
3982
+ }], ctorParameters: function () { return [{ type: RestService }]; } });
3983
+
3984
+ var index = /*#__PURE__*/Object.freeze({
3985
+ __proto__: null
3986
+ });
4112
3987
 
4113
3988
  var ContentProjectionService = /** @class */ (function () {
4114
3989
  function ContentProjectionService(injector) {
@@ -4120,13 +3995,12 @@
4120
3995
  };
4121
3996
  return ContentProjectionService;
4122
3997
  }());
4123
- ContentProjectionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ContentProjectionService_Factory() { return new ContentProjectionService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: ContentProjectionService, providedIn: "root" });
4124
- ContentProjectionService.decorators = [
4125
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
4126
- ];
4127
- ContentProjectionService.ctorParameters = function () { return [
4128
- { type: i0.Injector }
4129
- ]; };
3998
+ ContentProjectionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ContentProjectionService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3999
+ ContentProjectionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ContentProjectionService, providedIn: 'root' });
4000
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ContentProjectionService, decorators: [{
4001
+ type: i0.Injectable,
4002
+ args: [{ providedIn: 'root' }]
4003
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
4130
4004
 
4131
4005
  function getShortDateFormat(configStateService) {
4132
4006
  var dateTimeFormat = configStateService.getDeep('localization.currentCulture.dateTimeFormat');
@@ -4186,7 +4060,6 @@
4186
4060
  }
4187
4061
 
4188
4062
  function isNumber(value) {
4189
- /* tslint:disable-next-line:triple-equals */
4190
4063
  return value == Number(value);
4191
4064
  }
4192
4065
 
@@ -4201,7 +4074,6 @@
4201
4074
  return options;
4202
4075
  }
4203
4076
 
4204
- // tslint:disable: no-bitwise
4205
4077
  function uuid(a) {
4206
4078
  return a
4207
4079
  ? (a ^ ((Math.random() * 16) >> (a / 4))).toString(16)
@@ -4323,7 +4195,6 @@
4323
4195
  });
4324
4196
  }
4325
4197
  function createErrorHandler(observer, element) {
4326
- /* tslint:disable-next-line:only-arrow-functions */
4327
4198
  return function (event) {
4328
4199
  clearCallbacks(element);
4329
4200
  element.parentNode.removeChild(element);
@@ -4339,33 +4210,6 @@
4339
4210
  element.onsuspend = null;
4340
4211
  }
4341
4212
 
4342
- // tslint:disable: max-line-length
4343
- function isFunction(value) {
4344
- return typeof value === 'function';
4345
- }
4346
- /**
4347
- * @deprecated no longer working, please use SubscriptionService (https://docs.abp.io/en/abp/latest/UI/Angular/Subscription-Service) instead.
4348
- */
4349
- var takeUntilDestroy = function (componentInstance, destroyMethodName) {
4350
- if (destroyMethodName === void 0) { destroyMethodName = 'ngOnDestroy'; }
4351
- return function (source) {
4352
- var originalDestroy = componentInstance[destroyMethodName];
4353
- if (isFunction(originalDestroy) === false) {
4354
- throw new Error(componentInstance.constructor.name + " is using untilDestroyed but doesn't implement " + destroyMethodName);
4355
- }
4356
- if (!componentInstance['__takeUntilDestroy']) {
4357
- componentInstance['__takeUntilDestroy'] = new rxjs.Subject();
4358
- componentInstance[destroyMethodName] = function () {
4359
- // tslint:disable-next-line: no-unused-expression
4360
- isFunction(originalDestroy) && originalDestroy.apply(this, arguments);
4361
- componentInstance['__takeUntilDestroy'].next(true);
4362
- componentInstance['__takeUntilDestroy'].complete();
4363
- };
4364
- }
4365
- return source.pipe(operators.takeUntil(componentInstance['__takeUntilDestroy']));
4366
- };
4367
- };
4368
-
4369
4213
  var DomInsertionService = /** @class */ (function () {
4370
4214
  function DomInsertionService() {
4371
4215
  this.inserted = new Set();
@@ -4389,10 +4233,12 @@
4389
4233
  };
4390
4234
  return DomInsertionService;
4391
4235
  }());
4392
- DomInsertionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DomInsertionService_Factory() { return new DomInsertionService(); }, token: DomInsertionService, providedIn: "root" });
4393
- DomInsertionService.decorators = [
4394
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
4395
- ];
4236
+ DomInsertionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: DomInsertionService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4237
+ DomInsertionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: DomInsertionService, providedIn: 'root' });
4238
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: DomInsertionService, decorators: [{
4239
+ type: i0.Injectable,
4240
+ args: [{ providedIn: 'root' }]
4241
+ }] });
4396
4242
 
4397
4243
  var ResourceWaitService = /** @class */ (function () {
4398
4244
  function ResourceWaitService() {
@@ -4428,12 +4274,14 @@
4428
4274
  };
4429
4275
  return ResourceWaitService;
4430
4276
  }());
4431
- ResourceWaitService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ResourceWaitService_Factory() { return new ResourceWaitService(); }, token: ResourceWaitService, providedIn: "root" });
4432
- ResourceWaitService.decorators = [
4433
- { type: i0.Injectable, args: [{
4434
- providedIn: 'root',
4435
- },] }
4436
- ];
4277
+ ResourceWaitService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ResourceWaitService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4278
+ ResourceWaitService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ResourceWaitService, providedIn: 'root' });
4279
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ResourceWaitService, decorators: [{
4280
+ type: i0.Injectable,
4281
+ args: [{
4282
+ providedIn: 'root',
4283
+ }]
4284
+ }] });
4437
4285
 
4438
4286
  var LazyLoadService = /** @class */ (function () {
4439
4287
  function LazyLoadService(resourceWaitService) {
@@ -4460,15 +4308,14 @@
4460
4308
  };
4461
4309
  return LazyLoadService;
4462
4310
  }());
4463
- LazyLoadService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LazyLoadService_Factory() { return new LazyLoadService(i0__namespace.ɵɵinject(ResourceWaitService)); }, token: LazyLoadService, providedIn: "root" });
4464
- LazyLoadService.decorators = [
4465
- { type: i0.Injectable, args: [{
4466
- providedIn: 'root',
4467
- },] }
4468
- ];
4469
- LazyLoadService.ctorParameters = function () { return [
4470
- { type: ResourceWaitService }
4471
- ]; };
4311
+ LazyLoadService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LazyLoadService, deps: [{ token: ResourceWaitService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4312
+ LazyLoadService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LazyLoadService, providedIn: 'root' });
4313
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: LazyLoadService, decorators: [{
4314
+ type: i0.Injectable,
4315
+ args: [{
4316
+ providedIn: 'root',
4317
+ }]
4318
+ }], ctorParameters: function () { return [{ type: ResourceWaitService }]; } });
4472
4319
 
4473
4320
  var LIST_QUERY_DEBOUNCE_TIME = new i0.InjectionToken('LIST_QUERY_DEBOUNCE_TIME');
4474
4321
 
@@ -4595,276 +4442,11 @@
4595
4442
  };
4596
4443
  return ListService;
4597
4444
  }());
4598
- ListService.decorators = [
4599
- { type: i0.Injectable }
4600
- ];
4601
- ListService.ctorParameters = function () { return [
4602
- { type: i0.Injector }
4603
- ]; };
4604
-
4605
- var ConfigState_1;
4606
- /**
4607
- * @deprecated Use ConfigStateService instead. To be deleted in v5.0.
4608
- */
4609
- exports.ConfigState = ConfigState_1 = /** @class */ (function () {
4610
- function ConfigState(store, environmentService, configState) {
4611
- this.store = store;
4612
- this.environmentService = environmentService;
4613
- this.configState = configState;
4614
- this.syncConfigState();
4615
- this.syncEnvironment();
4616
- }
4617
- ConfigState.getAll = function (state) {
4618
- return state;
4619
- };
4620
- ConfigState.getApplicationInfo = function (state) {
4621
- return state.environment.application || {};
4622
- };
4623
- ConfigState.getEnvironment = function (state) {
4624
- return state.environment;
4625
- };
4626
- ConfigState.getOne = function (key) {
4627
- var selector = i4.createSelector([ConfigState_1], function (state) {
4628
- return state[key];
4629
- });
4630
- return selector;
4631
- };
4632
- ConfigState.getDeep = function (keys) {
4633
- if (typeof keys === 'string') {
4634
- keys = keys.split('.');
4635
- }
4636
- if (!Array.isArray(keys)) {
4637
- throw new Error('The argument must be a dot string or an string array.');
4638
- }
4639
- var selector = i4.createSelector([ConfigState_1], function (state) {
4640
- return keys.reduce(function (acc, val) {
4641
- if (acc) {
4642
- return acc[val];
4643
- }
4644
- return undefined;
4645
- }, state);
4646
- });
4647
- return selector;
4648
- };
4649
- ConfigState.getApiUrl = function (key) {
4650
- var selector = i4.createSelector([ConfigState_1], function (state) {
4651
- return (state.environment.apis[key || 'default'] || state.environment.apis.default).url;
4652
- });
4653
- return selector;
4654
- };
4655
- ConfigState.getFeature = function (key) {
4656
- var selector = i4.createSelector([ConfigState_1], function (state) {
4657
- return snq__default['default'](function () { return state.features.values[key]; });
4658
- });
4659
- return selector;
4660
- };
4661
- ConfigState.getSetting = function (key) {
4662
- var selector = i4.createSelector([ConfigState_1], function (state) {
4663
- return snq__default['default'](function () { return state.setting.values[key]; });
4664
- });
4665
- return selector;
4666
- };
4667
- ConfigState.getSettings = function (keyword) {
4668
- var selector = i4.createSelector([ConfigState_1], function (state) {
4669
- var settings = snq__default['default'](function () { return state.setting.values; }, {});
4670
- if (!keyword)
4671
- return settings;
4672
- var keysFound = Object.keys(settings).filter(function (key) { return key.indexOf(keyword) > -1; });
4673
- return keysFound.reduce(function (acc, key) {
4674
- acc[key] = settings[key];
4675
- return acc;
4676
- }, {});
4677
- });
4678
- return selector;
4679
- };
4680
- /**
4681
- * @deprecated use PermissionService's getGrantedPolicyStream or getGrantedPolicy methods.
4682
- */
4683
- ConfigState.getGrantedPolicy = function (key) {
4684
- var selector = i4.createSelector([ConfigState_1], function (state) {
4685
- if (!key)
4686
- return true;
4687
- var getPolicy = function (k) { return snq__default['default'](function () { return state.auth.grantedPolicies[k]; }, false); };
4688
- var orRegexp = /\|\|/g;
4689
- var andRegexp = /&&/g;
4690
- // TODO: Allow combination of ANDs & ORs
4691
- if (orRegexp.test(key)) {
4692
- var keys = key.split('||').filter(Boolean);
4693
- if (keys.length < 2)
4694
- return false;
4695
- return keys.some(function (k) { return getPolicy(k.trim()); });
4696
- }
4697
- else if (andRegexp.test(key)) {
4698
- var keys = key.split('&&').filter(Boolean);
4699
- if (keys.length < 2)
4700
- return false;
4701
- return keys.every(function (k) { return getPolicy(k.trim()); });
4702
- }
4703
- return getPolicy(key);
4704
- });
4705
- return selector;
4706
- };
4707
- ConfigState.getLocalizationResource = function (resourceName) {
4708
- var selector = i4.createSelector([ConfigState_1], function (state) {
4709
- return state.localization.values[resourceName];
4710
- });
4711
- return selector;
4712
- };
4713
- ConfigState.getLocalization = function (key) {
4714
- var interpolateParams = [];
4715
- for (var _i = 1; _i < arguments.length; _i++) {
4716
- interpolateParams[_i - 1] = arguments[_i];
4717
- }
4718
- if (!key)
4719
- key = '';
4720
- var defaultValue;
4721
- if (typeof key !== 'string') {
4722
- defaultValue = key.defaultValue;
4723
- key = key.key;
4724
- }
4725
- var keys = key.split('::');
4726
- var selector = i4.createSelector([ConfigState_1], function (state) {
4727
- var warn = function (message) {
4728
- if (!state.environment.production)
4729
- console.warn(message);
4730
- };
4731
- if (keys.length < 2) {
4732
- warn('The localization source separator (::) not found.');
4733
- return defaultValue || key;
4734
- }
4735
- if (!state.localization)
4736
- return defaultValue || keys[1];
4737
- var sourceName = keys[0] ||
4738
- snq__default['default'](function () { return state.environment.localization.defaultResourceName; }) ||
4739
- state.localization.defaultResourceName;
4740
- var sourceKey = keys[1];
4741
- if (sourceName === '_') {
4742
- return defaultValue || sourceKey;
4743
- }
4744
- if (!sourceName) {
4745
- warn('Localization source name is not specified and the defaultResourceName was not defined!');
4746
- return defaultValue || sourceKey;
4747
- }
4748
- var source = state.localization.values[sourceName];
4749
- if (!source) {
4750
- warn('Could not find localization source: ' + sourceName);
4751
- return defaultValue || sourceKey;
4752
- }
4753
- var localization = source[sourceKey];
4754
- if (typeof localization === 'undefined') {
4755
- return defaultValue || sourceKey;
4756
- }
4757
- interpolateParams = interpolateParams.filter(function (params) { return params != null; });
4758
- if (localization)
4759
- localization = interpolate(localization, interpolateParams);
4760
- if (typeof localization !== 'string')
4761
- localization = '';
4762
- return localization || defaultValue || key;
4763
- });
4764
- return selector;
4765
- };
4766
- ConfigState.prototype.syncConfigState = function () {
4767
- var _this = this;
4768
- this.configState
4769
- .createOnUpdateStream(function (state) { return state; })
4770
- .pipe(operators.distinctUntilChanged(compare__default['default']))
4771
- .subscribe(function (config) { return _this.store.dispatch(new PatchConfigState(config)); });
4772
- };
4773
- ConfigState.prototype.syncEnvironment = function () {
4774
- var _this = this;
4775
- this.environmentService
4776
- .createOnUpdateStream(function (state) { return state; })
4777
- .pipe(operators.distinctUntilChanged(compare__default['default']))
4778
- .subscribe(function (env) { return _this.store.dispatch(new PatchConfigState({ environment: env })); });
4779
- };
4780
- ConfigState.prototype.addData = function (_a) {
4781
- var patchState = _a.patchState, dispatch = _a.dispatch;
4782
- var apiName = 'default';
4783
- var api = this.store.selectSnapshot(ConfigState_1.getApiUrl(apiName));
4784
- return this.configState.refreshAppState().pipe(operators.catchError(function (err) {
4785
- dispatch(new RestOccurError(err));
4786
- return rxjs.throwError(err);
4787
- }));
4788
- };
4789
- ConfigState.prototype.setEnvironment = function (_, _a) {
4790
- var environment = _a.environment;
4791
- return this.environmentService.setState(environment);
4792
- };
4793
- ConfigState.prototype.setConfig = function (_a, _b) {
4794
- var patchState = _a.patchState, getState = _a.getState;
4795
- var state = _b.state;
4796
- patchState(Object.assign(Object.assign({}, getState()), state));
4797
- };
4798
- return ConfigState;
4799
- }());
4800
- exports.ConfigState.decorators = [
4801
- { type: i0.Injectable }
4802
- ];
4803
- exports.ConfigState.ctorParameters = function () { return [
4804
- { type: i4.Store },
4805
- { type: EnvironmentService },
4806
- { type: ConfigStateService }
4807
- ]; };
4808
- __decorate([
4809
- i4.Action(GetAppConfiguration)
4810
- ], exports.ConfigState.prototype, "addData", null);
4811
- __decorate([
4812
- i4.Action(SetEnvironment)
4813
- ], exports.ConfigState.prototype, "setEnvironment", null);
4814
- __decorate([
4815
- i4.Action(PatchConfigState)
4816
- ], exports.ConfigState.prototype, "setConfig", null);
4817
- __decorate([
4818
- i4.Selector()
4819
- ], exports.ConfigState, "getAll", null);
4820
- __decorate([
4821
- i4.Selector()
4822
- ], exports.ConfigState, "getApplicationInfo", null);
4823
- __decorate([
4824
- i4.Selector()
4825
- ], exports.ConfigState, "getEnvironment", null);
4826
- exports.ConfigState = ConfigState_1 = __decorate([
4827
- i4.State({
4828
- name: 'ConfigState',
4829
- defaults: {},
4830
- })
4831
- ], exports.ConfigState);
4832
-
4833
- var ProfileStateService = /** @class */ (function () {
4834
- function ProfileStateService(store) {
4835
- this.store = store;
4836
- }
4837
- ProfileStateService.prototype.getProfile = function () {
4838
- return this.store.selectSnapshot(exports.ɵbd.getProfile);
4839
- };
4840
- ProfileStateService.prototype.dispatchGetProfile = function () {
4841
- return this.store.dispatch(new GetProfile());
4842
- };
4843
- ProfileStateService.prototype.dispatchUpdateProfile = function () {
4844
- var args = [];
4845
- for (var _i = 0; _i < arguments.length; _i++) {
4846
- args[_i] = arguments[_i];
4847
- }
4848
- return this.store.dispatch(new (UpdateProfile.bind.apply(UpdateProfile, __spread([void 0], args)))());
4849
- };
4850
- ProfileStateService.prototype.dispatchChangePassword = function () {
4851
- var args = [];
4852
- for (var _i = 0; _i < arguments.length; _i++) {
4853
- args[_i] = arguments[_i];
4854
- }
4855
- return this.store.dispatch(new (ChangePassword.bind.apply(ChangePassword, __spread([void 0], args)))());
4856
- };
4857
- return ProfileStateService;
4858
- }());
4859
- ProfileStateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ProfileStateService_Factory() { return new ProfileStateService(i0__namespace.ɵɵinject(i4__namespace.Store)); }, token: ProfileStateService, providedIn: "root" });
4860
- ProfileStateService.decorators = [
4861
- { type: i0.Injectable, args: [{
4862
- providedIn: 'root',
4863
- },] }
4864
- ];
4865
- ProfileStateService.ctorParameters = function () { return [
4866
- { type: i4.Store }
4867
- ]; };
4445
+ ListService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ListService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4446
+ ListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ListService });
4447
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: ListService, decorators: [{
4448
+ type: i0.Injectable
4449
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
4868
4450
 
4869
4451
  var RouterWaitService = /** @class */ (function () {
4870
4452
  function RouterWaitService(routerEvents, injector) {
@@ -4878,7 +4460,7 @@
4878
4460
  var _this = this;
4879
4461
  this.routerEvents
4880
4462
  .getAllNavigationEvents()
4881
- .pipe(operators.map(function (event) { return event instanceof i1.NavigationStart; }), operators.switchMap(function (condition) { return condition
4463
+ .pipe(operators.map(function (event) { return event instanceof i1$1.NavigationStart; }), operators.switchMap(function (condition) { return condition
4882
4464
  ? _this.delay === 0
4883
4465
  ? rxjs.of(true)
4884
4466
  : rxjs.timer(_this.delay || 0).pipe(operators.mapTo(true), operators.takeUntil(_this.destroy$))
@@ -4907,21 +4489,27 @@
4907
4489
  };
4908
4490
  return RouterWaitService;
4909
4491
  }());
4910
- RouterWaitService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function RouterWaitService_Factory() { return new RouterWaitService(i0__namespace.ɵɵinject(RouterEvents), i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: RouterWaitService, providedIn: "root" });
4911
- RouterWaitService.decorators = [
4912
- { type: i0.Injectable, args: [{
4913
- providedIn: 'root',
4914
- },] }
4915
- ];
4916
- RouterWaitService.ctorParameters = function () { return [
4917
- { type: RouterEvents },
4918
- { type: i0.Injector }
4919
- ]; };
4492
+ RouterWaitService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterWaitService, deps: [{ token: RouterEvents }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4493
+ RouterWaitService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterWaitService, providedIn: 'root' });
4494
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RouterWaitService, decorators: [{
4495
+ type: i0.Injectable,
4496
+ args: [{
4497
+ providedIn: 'root',
4498
+ }]
4499
+ }], ctorParameters: function () { return [{ type: RouterEvents }, { type: i0__namespace.Injector }]; } });
4920
4500
 
4921
4501
  var trackBy = function (key) { return function (_, item) { return item[key]; }; };
4922
4502
  var trackByDeep = function () {
4503
+ // eslint-disable-next-line @typescript-eslint/ban-types
4923
4504
  var keys = [];
4924
- for (var _i = 0; _i < arguments.length; _i++) {
4505
+ for (
4506
+ // eslint-disable-next-line @typescript-eslint/ban-types
4507
+ var _i = 0;
4508
+ // eslint-disable-next-line @typescript-eslint/ban-types
4509
+ _i < arguments.length;
4510
+ // eslint-disable-next-line @typescript-eslint/ban-types
4511
+ _i++) {
4512
+ // eslint-disable-next-line @typescript-eslint/ban-types
4925
4513
  keys[_i] = arguments[_i];
4926
4514
  }
4927
4515
  return function (_, item) { return keys.reduce(function (acc, key) { return acc[key]; }, item); };
@@ -4933,12 +4521,14 @@
4933
4521
  }
4934
4522
  return TrackByService;
4935
4523
  }());
4936
- TrackByService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TrackByService_Factory() { return new TrackByService(); }, token: TrackByService, providedIn: "root" });
4937
- TrackByService.decorators = [
4938
- { type: i0.Injectable, args: [{
4939
- providedIn: 'root',
4940
- },] }
4941
- ];
4524
+ TrackByService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: TrackByService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4525
+ TrackByService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: TrackByService, providedIn: 'root' });
4526
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: TrackByService, decorators: [{
4527
+ type: i0.Injectable,
4528
+ args: [{
4529
+ providedIn: 'root',
4530
+ }]
4531
+ }] });
4942
4532
 
4943
4533
  var ContainerStrategy = /** @class */ (function () {
4944
4534
  function ContainerStrategy(containerRef) {
@@ -5021,15 +4611,21 @@
5021
4611
  };
5022
4612
 
5023
4613
  var ContentStrategy = /** @class */ (function () {
5024
- function ContentStrategy(content, domStrategy, contentSecurityStrategy) {
4614
+ function ContentStrategy(content, domStrategy, contentSecurityStrategy, options) {
5025
4615
  if (domStrategy === void 0) { domStrategy = DOM_STRATEGY.AppendToHead(); }
5026
4616
  if (contentSecurityStrategy === void 0) { contentSecurityStrategy = CONTENT_SECURITY_STRATEGY.None(); }
4617
+ if (options === void 0) { options = {}; }
5027
4618
  this.content = content;
5028
4619
  this.domStrategy = domStrategy;
5029
4620
  this.contentSecurityStrategy = contentSecurityStrategy;
4621
+ this.options = options;
5030
4622
  }
5031
4623
  ContentStrategy.prototype.insertElement = function () {
4624
+ var _this = this;
5032
4625
  var element = this.createElement();
4626
+ if (this.options && Object.keys(this.options).length > 0) {
4627
+ Object.keys(this.options).forEach(function (key) { return (element[key] = _this.options[key]); });
4628
+ }
5033
4629
  this.contentSecurityStrategy.applyCSP(element);
5034
4630
  this.domStrategy.insertElement(element);
5035
4631
  return element;
@@ -5061,17 +4657,17 @@
5061
4657
  return ScriptContentStrategy;
5062
4658
  }(ContentStrategy));
5063
4659
  var CONTENT_STRATEGY = {
5064
- AppendScriptToBody: function (content) {
5065
- return new ScriptContentStrategy(content, DOM_STRATEGY.AppendToBody());
4660
+ AppendScriptToBody: function (content, options) {
4661
+ return new ScriptContentStrategy(content, DOM_STRATEGY.AppendToBody(), undefined, options);
5066
4662
  },
5067
- AppendScriptToHead: function (content) {
5068
- return new ScriptContentStrategy(content, DOM_STRATEGY.AppendToHead());
4663
+ AppendScriptToHead: function (content, options) {
4664
+ return new ScriptContentStrategy(content, DOM_STRATEGY.AppendToHead(), undefined, options);
5069
4665
  },
5070
- AppendStyleToHead: function (content) {
5071
- return new StyleContentStrategy(content, DOM_STRATEGY.AppendToHead());
4666
+ AppendStyleToHead: function (content, options) {
4667
+ return new StyleContentStrategy(content, DOM_STRATEGY.AppendToHead(), undefined, options);
5072
4668
  },
5073
- PrependStyleToHead: function (content) {
5074
- return new StyleContentStrategy(content, DOM_STRATEGY.PrependToHead());
4669
+ PrependStyleToHead: function (content, options) {
4670
+ return new StyleContentStrategy(content, DOM_STRATEGY.PrependToHead(), undefined, options);
5075
4671
  },
5076
4672
  };
5077
4673
 
@@ -5079,7 +4675,6 @@
5079
4675
  function ContextStrategy(context) {
5080
4676
  this.context = context;
5081
4677
  }
5082
- /* tslint:disable-next-line:no-unused-variable */
5083
4678
  ContextStrategy.prototype.setContext = function (componentRef) {
5084
4679
  return this.context;
5085
4680
  };
@@ -5318,7 +4913,6 @@
5318
4913
  var multiplier = 1;
5319
4914
  for (var i = value.length; i > 0; i--) {
5320
4915
  var digit = Number(value[i - 1]) * multiplier;
5321
- /* tslint:disable-next-line:no-bitwise */
5322
4916
  checksum += (digit % 10) + ~~(digit / 10);
5323
4917
  multiplier = (multiplier * 2) % 3;
5324
4918
  }
@@ -5387,10 +4981,9 @@
5387
4981
  return false;
5388
4982
  }
5389
4983
 
5390
- var ɵ0 = function () { return forms.Validators.email; };
5391
4984
  var AbpValidators = {
5392
4985
  creditCard: validateCreditCard,
5393
- emailAddress: ɵ0,
4986
+ emailAddress: function () { return i1$2.Validators.email; },
5394
4987
  minAge: validateMinAge,
5395
4988
  range: validateRange,
5396
4989
  required: validateRequired,
@@ -5398,36 +4991,7 @@
5398
4991
  url: validateUrl,
5399
4992
  };
5400
4993
 
5401
- var AbpApiDefinitionService = /** @class */ (function () {
5402
- function AbpApiDefinitionService(restService) {
5403
- var _this = this;
5404
- this.restService = restService;
5405
- this.apiName = 'abp';
5406
- this.getByModel = function (model) { return _this.restService.request({
5407
- method: 'GET',
5408
- url: '/api/abp/api-definition',
5409
- params: { includeTypes: model.includeTypes },
5410
- }, { apiName: _this.apiName }); };
5411
- }
5412
- return AbpApiDefinitionService;
5413
- }());
5414
- AbpApiDefinitionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AbpApiDefinitionService_Factory() { return new AbpApiDefinitionService(i0__namespace.ɵɵinject(RestService)); }, token: AbpApiDefinitionService, providedIn: "root" });
5415
- AbpApiDefinitionService.decorators = [
5416
- { type: i0.Injectable, args: [{
5417
- providedIn: 'root',
5418
- },] }
5419
- ];
5420
- AbpApiDefinitionService.ctorParameters = function () { return [
5421
- { type: RestService }
5422
- ]; };
5423
-
5424
- var index = /*#__PURE__*/Object.freeze({
5425
- __proto__: null
5426
- });
5427
-
5428
- /*
5429
- * Public API Surface of core
5430
- */
4994
+ // export * from './lib/handlers';
5431
4995
 
5432
4996
  /**
5433
4997
  * Generated bundle index. Do not edit.
@@ -5442,7 +5006,6 @@
5442
5006
  exports.AbstractNgModelComponent = AbstractNgModelComponent;
5443
5007
  exports.AbstractTreeService = AbstractTreeService;
5444
5008
  exports.ApiInterceptor = ApiInterceptor;
5445
- exports.ApplicationConfigurationService = ApplicationConfigurationService;
5446
5009
  exports.AuditedEntityDto = AuditedEntityDto;
5447
5010
  exports.AuditedEntityWithUserDto = AuditedEntityWithUserDto;
5448
5011
  exports.AuthGuard = AuthGuard;
@@ -5454,9 +5017,9 @@
5454
5017
  exports.CONTENT_SECURITY_STRATEGY = CONTENT_SECURITY_STRATEGY;
5455
5018
  exports.CONTENT_STRATEGY = CONTENT_STRATEGY;
5456
5019
  exports.CONTEXT_STRATEGY = CONTEXT_STRATEGY;
5020
+ exports.COOKIE_LANGUAGE_KEY = COOKIE_LANGUAGE_KEY;
5457
5021
  exports.CORE_OPTIONS = CORE_OPTIONS;
5458
5022
  exports.CROSS_ORIGIN_STRATEGY = CROSS_ORIGIN_STRATEGY;
5459
- exports.ChangePassword = ChangePassword;
5460
5023
  exports.ClearContainerStrategy = ClearContainerStrategy;
5461
5024
  exports.ComponentContextStrategy = ComponentContextStrategy;
5462
5025
  exports.ComponentProjectionStrategy = ComponentProjectionStrategy;
@@ -5488,8 +5051,7 @@
5488
5051
  exports.FormSubmitDirective = FormSubmitDirective;
5489
5052
  exports.FullAuditedEntityDto = FullAuditedEntityDto;
5490
5053
  exports.FullAuditedEntityWithUserDto = FullAuditedEntityWithUserDto;
5491
- exports.GetAppConfiguration = GetAppConfiguration;
5492
- exports.GetProfile = GetProfile;
5054
+ exports.HttpErrorReporterService = HttpErrorReporterService;
5493
5055
  exports.HttpWaitService = HttpWaitService;
5494
5056
  exports.InitDirective = InitDirective;
5495
5057
  exports.InputEventDebounceDirective = InputEventDebounceDirective;
@@ -5522,15 +5084,11 @@
5522
5084
  exports.PermissionDirective = PermissionDirective;
5523
5085
  exports.PermissionGuard = PermissionGuard;
5524
5086
  exports.PermissionService = PermissionService;
5525
- exports.ProfileService = ProfileService;
5526
- exports.ProfileState = exports.ɵbd;
5527
- exports.ProfileStateService = ProfileStateService;
5528
5087
  exports.ProjectionStrategy = ProjectionStrategy;
5529
5088
  exports.ReplaceableComponentsService = ReplaceableComponentsService;
5530
5089
  exports.ReplaceableRouteContainerComponent = ReplaceableRouteContainerComponent;
5531
5090
  exports.ReplaceableTemplateDirective = ReplaceableTemplateDirective;
5532
5091
  exports.ResourceWaitService = ResourceWaitService;
5533
- exports.RestOccurError = RestOccurError;
5534
5092
  exports.RestService = RestService;
5535
5093
  exports.RootComponentProjectionStrategy = RootComponentProjectionStrategy;
5536
5094
  exports.RootCoreModule = RootCoreModule;
@@ -5541,11 +5099,7 @@
5541
5099
  exports.ScriptContentStrategy = ScriptContentStrategy;
5542
5100
  exports.ScriptLoadingStrategy = ScriptLoadingStrategy;
5543
5101
  exports.SessionStateService = SessionStateService;
5544
- exports.SetEnvironment = SetEnvironment;
5545
- exports.SettingTabsService = SettingTabsService;
5546
5102
  exports.SortPipe = SortPipe;
5547
- exports.StartLoader = StartLoader;
5548
- exports.StopLoader = StopLoader;
5549
5103
  exports.StopPropagationDirective = StopPropagationDirective;
5550
5104
  exports.StyleContentStrategy = StyleContentStrategy;
5551
5105
  exports.StyleLoadingStrategy = StyleLoadingStrategy;
@@ -5554,8 +5108,6 @@
5554
5108
  exports.TemplateContextStrategy = TemplateContextStrategy;
5555
5109
  exports.TemplateProjectionStrategy = TemplateProjectionStrategy;
5556
5110
  exports.TrackByService = TrackByService;
5557
- exports.UpdateProfile = UpdateProfile;
5558
- exports.VisibilityDirective = VisibilityDirective;
5559
5111
  exports.WebHttpUrlEncodingCodec = WebHttpUrlEncodingCodec;
5560
5112
  exports.checkAccessToken = checkAccessToken;
5561
5113
  exports.coreOptionsFactory = coreOptionsFactory;
@@ -5604,7 +5156,6 @@
5604
5156
  exports.setRememberMe = setRememberMe;
5605
5157
  exports.setTokenResponseToStorage = setTokenResponseToStorage;
5606
5158
  exports.storageFactory = storageFactory;
5607
- exports.takeUntilDestroy = takeUntilDestroy;
5608
5159
  exports.trackBy = trackBy;
5609
5160
  exports.trackByDeep = trackByDeep;
5610
5161
  exports.uuid = uuid;
@@ -5614,51 +5165,6 @@
5614
5165
  exports.validateRequired = validateRequired;
5615
5166
  exports.validateStringLength = validateStringLength;
5616
5167
  exports.validateUrl = validateUrl;
5617
- exports.ɵa = oAuthStorage;
5618
- exports.ɵb = LocalizationPipe;
5619
- exports.ɵba = SortPipe;
5620
- exports.ɵbb = StopPropagationDirective;
5621
- exports.ɵbc = VisibilityDirective;
5622
- exports.ɵbe = ProfileService;
5623
- exports.ɵbf = GetProfile;
5624
- exports.ɵbg = UpdateProfile;
5625
- exports.ɵbh = ChangePassword;
5626
- exports.ɵbj = LocaleId;
5627
- exports.ɵbk = LocaleProvider;
5628
- exports.ɵbl = ApiInterceptor;
5629
- exports.ɵbm = TENANT_KEY;
5630
- exports.ɵbn = HttpWaitService;
5631
- exports.ɵbo = OAuthConfigurationHandler;
5632
- exports.ɵbp = noop;
5633
- exports.ɵbq = getInitialData;
5634
- exports.ɵbr = localeInitializer;
5635
- exports.ɵbs = RoutesHandler;
5636
- exports.ɵbt = AbstractTreeService;
5637
- exports.ɵbu = AbstractNavTreeService;
5638
- exports.ɵbv = RoutesService;
5639
- exports.ɵc = LocalizationService;
5640
- exports.ɵd = SessionStateService;
5641
- exports.ɵe = ConfigStateService;
5642
- exports.ɵf = AbpApplicationConfigurationService;
5643
- exports.ɵg = RestService;
5644
- exports.ɵh = CORE_OPTIONS;
5645
- exports.ɵi = coreOptionsFactory;
5646
- exports.ɵk = EnvironmentService;
5647
- exports.ɵl = AbstractNgModelComponent;
5648
- exports.ɵm = AutofocusDirective;
5649
- exports.ɵn = DynamicLayoutComponent;
5650
- exports.ɵo = SubscriptionService;
5651
- exports.ɵp = ReplaceableComponentsService;
5652
- exports.ɵq = RouterEvents;
5653
- exports.ɵr = ForDirective;
5654
- exports.ɵs = FormSubmitDirective;
5655
- exports.ɵt = InitDirective;
5656
- exports.ɵu = InputEventDebounceDirective;
5657
- exports.ɵv = PermissionDirective;
5658
- exports.ɵw = PermissionService;
5659
- exports.ɵx = ReplaceableRouteContainerComponent;
5660
- exports.ɵy = ReplaceableTemplateDirective;
5661
- exports.ɵz = RouterOutletComponent;
5662
5168
 
5663
5169
  Object.defineProperty(exports, '__esModule', { value: true });
5664
5170