@abp/ng.theme.shared 7.2.2 → 7.3.0-rc.2

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 (316) hide show
  1. package/README.md +129 -2
  2. package/{esm2020 → esm2022}/abp-ng.theme.shared.mjs +4 -4
  3. package/{esm2020 → esm2022}/extensions/abp-ng.theme.shared-extensions.mjs +4 -4
  4. package/esm2022/extensions/lib/adapters/date-time.adapter.mjs +45 -0
  5. package/esm2022/extensions/lib/adapters/date.adapter.mjs +42 -0
  6. package/esm2022/extensions/lib/adapters/time.adapter.mjs +37 -0
  7. package/esm2022/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +26 -0
  8. package/esm2022/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +110 -0
  9. package/esm2022/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +199 -0
  10. package/esm2022/extensions/lib/components/extensible-form/extensible-form.component.mjs +74 -0
  11. package/esm2022/extensions/lib/components/extensible-table/extensible-table.component.mjs +137 -0
  12. package/esm2022/extensions/lib/components/grid-actions/grid-actions.component.mjs +40 -0
  13. package/esm2022/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +39 -0
  14. package/{esm2020 → esm2022}/extensions/lib/constants/extra-properties.mjs +1 -1
  15. package/esm2022/extensions/lib/directives/disabled.directive.mjs +30 -0
  16. package/esm2022/extensions/lib/directives/prop-data.directive.mjs +42 -0
  17. package/{esm2020 → esm2022}/extensions/lib/enums/components.mjs +1 -1
  18. package/{esm2020 → esm2022}/extensions/lib/enums/props.enum.mjs +1 -1
  19. package/{esm2020 → esm2022}/extensions/lib/models/actions.mjs +46 -46
  20. package/{esm2020 → esm2022}/extensions/lib/models/entity-actions.mjs +28 -28
  21. package/esm2022/extensions/lib/models/entity-props.mjs +44 -0
  22. package/esm2022/extensions/lib/models/form-props.mjs +76 -0
  23. package/{esm2020 → esm2022}/extensions/lib/models/internal/object-extensions.mjs +2 -2
  24. package/{esm2020 → esm2022}/extensions/lib/models/object-extensions.mjs +2 -2
  25. package/esm2022/extensions/lib/models/props.mjs +54 -0
  26. package/{esm2020 → esm2022}/extensions/lib/models/toolbar-actions.mjs +43 -43
  27. package/esm2022/extensions/lib/pipes/create-injector.pipe.mjs +37 -0
  28. package/esm2022/extensions/lib/services/extensions.service.mjs +25 -0
  29. package/{esm2020 → esm2022}/extensions/lib/tokens/extensible-form-view-provider.token.mjs +2 -2
  30. package/{esm2020 → esm2022}/extensions/lib/tokens/extensions.token.mjs +11 -11
  31. package/esm2022/extensions/lib/ui-extensions.module.mjs +100 -0
  32. package/{esm2020 → esm2022}/extensions/lib/utils/actions.util.mjs +8 -8
  33. package/{esm2020 → esm2022}/extensions/lib/utils/enum.util.mjs +41 -41
  34. package/{esm2020 → esm2022}/extensions/lib/utils/factory.util.mjs +3 -3
  35. package/esm2022/extensions/lib/utils/form-props.util.mjs +51 -0
  36. package/{esm2020 → esm2022}/extensions/lib/utils/localization.util.mjs +12 -12
  37. package/{esm2020 → esm2022}/extensions/lib/utils/props.util.mjs +13 -13
  38. package/esm2022/extensions/lib/utils/state.util.mjs +126 -0
  39. package/{esm2020 → esm2022}/extensions/lib/utils/typeahead.util.mjs +51 -51
  40. package/{esm2020 → esm2022}/extensions/lib/utils/validation.util.mjs +10 -10
  41. package/{esm2020 → esm2022}/extensions/public-api.mjs +30 -30
  42. package/{esm2020 → esm2022}/lib/animations/bounce.animations.mjs +16 -16
  43. package/{esm2020 → esm2022}/lib/animations/collapse.animations.mjs +49 -49
  44. package/{esm2020 → esm2022}/lib/animations/fade.animations.mjs +37 -37
  45. package/{esm2020 → esm2022}/lib/animations/index.mjs +6 -6
  46. package/{esm2020 → esm2022}/lib/animations/modal.animations.mjs +10 -10
  47. package/{esm2020 → esm2022}/lib/animations/slide.animations.mjs +7 -7
  48. package/{esm2020 → esm2022}/lib/animations/toast.animations.mjs +12 -12
  49. package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +44 -0
  50. package/esm2022/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +20 -0
  51. package/esm2022/lib/components/button/button.component.mjs +103 -0
  52. package/{esm2020 → esm2022}/lib/components/card/card-body.component.mjs +27 -26
  53. package/esm2022/lib/components/card/card-footer.component.mjs +31 -0
  54. package/esm2022/lib/components/card/card-header.component.mjs +31 -0
  55. package/esm2022/lib/components/card/card-header.directive.mjs +20 -0
  56. package/esm2022/lib/components/card/card-img-top.directive.mjs +20 -0
  57. package/esm2022/lib/components/card/card-subtitle.directive.mjs +20 -0
  58. package/esm2022/lib/components/card/card-title.directive.mjs +20 -0
  59. package/esm2022/lib/components/card/card.component.mjs +24 -0
  60. package/esm2022/lib/components/card/card.module.mjs +50 -0
  61. package/{esm2020 → esm2022}/lib/components/card/index.mjs +9 -9
  62. package/esm2022/lib/components/checkbox/checkbox.component.mjs +89 -0
  63. package/esm2022/lib/components/confirmation/confirmation.component.mjs +46 -0
  64. package/esm2022/lib/components/form-input/form-input.component.mjs +95 -0
  65. package/esm2022/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +60 -0
  66. package/{esm2020 → esm2022}/lib/components/index.mjs +16 -16
  67. package/esm2022/lib/components/loader-bar/loader-bar.component.mjs +122 -0
  68. package/esm2022/lib/components/loading/loading.component.mjs +20 -0
  69. package/esm2022/lib/components/modal/modal-close.directive.mjs +28 -0
  70. package/esm2022/lib/components/modal/modal-ref.service.mjs +27 -0
  71. package/esm2022/lib/components/modal/modal.component.mjs +190 -0
  72. package/esm2022/lib/components/password/password.component.mjs +39 -0
  73. package/esm2022/lib/components/toast/toast.component.mjs +56 -0
  74. package/esm2022/lib/components/toast-container/toast-container.component.mjs +59 -0
  75. package/{esm2020 → esm2022}/lib/constants/styles.mjs +1 -1
  76. package/{esm2020 → esm2022}/lib/constants/validation.mjs +19 -19
  77. package/esm2022/lib/directives/ellipsis.directive.mjs +65 -0
  78. package/{esm2020 → esm2022}/lib/directives/index.mjs +5 -5
  79. package/esm2022/lib/directives/loading.directive.mjs +90 -0
  80. package/esm2022/lib/directives/ngx-datatable-default.directive.mjs +76 -0
  81. package/esm2022/lib/directives/ngx-datatable-list.directive.mjs +95 -0
  82. package/esm2022/lib/directives/visible.directive.mjs +63 -0
  83. package/{esm2020 → esm2022}/lib/enums/form.mjs +5 -5
  84. package/{esm2020 → esm2022}/lib/enums/index.mjs +2 -2
  85. package/{esm2020 → esm2022}/lib/enums/route-names.mjs +1 -1
  86. package/esm2022/lib/handlers/document-dir.handler.mjs +32 -0
  87. package/esm2022/lib/handlers/error.handler.mjs +294 -0
  88. package/{esm2020 → esm2022}/lib/handlers/index.mjs +2 -2
  89. package/{esm2020 → esm2022}/lib/models/common.mjs +1 -1
  90. package/{esm2020 → esm2022}/lib/models/confirmation.mjs +9 -9
  91. package/{esm2020 → esm2022}/lib/models/index.mjs +7 -7
  92. package/{esm2020 → esm2022}/lib/models/nav-item.mjs +5 -5
  93. package/{esm2020 → esm2022}/lib/models/statistics.mjs +1 -1
  94. package/{esm2020 → esm2022}/lib/models/toaster.mjs +1 -1
  95. package/{esm2020 → esm2022}/lib/models/user-menu.mjs +3 -3
  96. package/{esm2020 → esm2022}/lib/models/validation.mjs +1 -1
  97. package/{esm2020 → esm2022}/lib/providers/index.mjs +2 -2
  98. package/{esm2020 → esm2022}/lib/providers/ng-bootstrap-config.provider.mjs +16 -16
  99. package/{esm2020 → esm2022}/lib/providers/route.provider.mjs +17 -17
  100. package/{esm2020 → esm2022}/lib/services/abstract-menu.service.mjs +49 -49
  101. package/esm2022/lib/services/confirmation.service.mjs +69 -0
  102. package/{esm2020 → esm2022}/lib/services/index.mjs +5 -5
  103. package/esm2022/lib/services/nav-items.service.mjs +18 -0
  104. package/esm2022/lib/services/page-alert.service.mjs +29 -0
  105. package/esm2022/lib/services/toaster.service.mjs +104 -0
  106. package/esm2022/lib/services/user-menu.service.mjs +18 -0
  107. package/esm2022/lib/theme-shared.module.mjs +202 -0
  108. package/{esm2020 → esm2022}/lib/tokens/append-content.token.mjs +10 -10
  109. package/{esm2020 → esm2022}/lib/tokens/confirmation-icons.token.mjs +10 -10
  110. package/{esm2020 → esm2022}/lib/tokens/http-error.token.mjs +13 -13
  111. package/{esm2020 → esm2022}/lib/tokens/index.mjs +4 -4
  112. package/{esm2020 → esm2022}/lib/tokens/ngx-datatable-messages.token.mjs +7 -7
  113. package/{esm2020 → esm2022}/lib/tokens/suppress-unsaved-changes-warning.token.mjs +2 -2
  114. package/esm2022/lib/utils/date-parser-formatter.mjs +59 -0
  115. package/{esm2020 → esm2022}/lib/utils/index.mjs +2 -2
  116. package/{esm2020 → esm2022}/lib/utils/validation-utils.mjs +61 -61
  117. package/{esm2020 → esm2022}/public-api.mjs +15 -15
  118. package/{esm2020 → esm2022}/testing/abp-ng.theme.shared-testing.mjs +4 -4
  119. package/{esm2020 → esm2022}/testing/lib/models/config.mjs +1 -1
  120. package/{esm2020 → esm2022}/testing/lib/models/index.mjs +1 -1
  121. package/esm2022/testing/lib/theme-shared-testing.module.mjs +47 -0
  122. package/{esm2020 → esm2022}/testing/public-api.mjs +3 -3
  123. package/extensions/index.d.ts +5 -5
  124. package/extensions/lib/adapters/date-time.adapter.d.ts +11 -11
  125. package/extensions/lib/adapters/date.adapter.d.ts +9 -9
  126. package/extensions/lib/adapters/time.adapter.d.ts +8 -8
  127. package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +12 -12
  128. package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +16 -16
  129. package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +43 -43
  130. package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +25 -25
  131. package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +38 -38
  132. package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +13 -13
  133. package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +20 -20
  134. package/extensions/lib/constants/extra-properties.d.ts +1 -1
  135. package/extensions/lib/directives/disabled.directive.d.ts +11 -11
  136. package/extensions/lib/directives/prop-data.directive.d.ts +19 -19
  137. package/extensions/lib/enums/components.d.ts +3 -3
  138. package/extensions/lib/enums/props.enum.d.ts +16 -16
  139. package/extensions/lib/models/actions.d.ts +36 -36
  140. package/extensions/lib/models/entity-actions.d.ts +22 -22
  141. package/extensions/lib/models/entity-props.d.ts +30 -29
  142. package/extensions/lib/models/form-props.d.ts +59 -58
  143. package/extensions/lib/models/internal/object-extensions.d.ts +86 -85
  144. package/extensions/lib/models/object-extensions.d.ts +2 -2
  145. package/extensions/lib/models/props.d.ts +45 -44
  146. package/extensions/lib/models/toolbar-actions.d.ts +38 -38
  147. package/extensions/lib/pipes/create-injector.pipe.d.ts +8 -8
  148. package/extensions/lib/services/extensions.service.d.ts +14 -14
  149. package/extensions/lib/tokens/extensible-form-view-provider.token.d.ts +5 -5
  150. package/extensions/lib/tokens/extensions.token.d.ts +20 -24
  151. package/extensions/lib/ui-extensions.module.d.ts +24 -24
  152. package/extensions/lib/utils/actions.util.d.ts +7 -7
  153. package/extensions/lib/utils/enum.util.d.ts +7 -7
  154. package/extensions/lib/utils/factory.util.d.ts +1 -1
  155. package/extensions/lib/utils/form-props.util.d.ts +3 -3
  156. package/extensions/lib/utils/localization.util.d.ts +3 -3
  157. package/extensions/lib/utils/props.util.d.ts +9 -9
  158. package/extensions/lib/utils/state.util.d.ts +5 -5
  159. package/extensions/lib/utils/typeahead.util.d.ts +11 -11
  160. package/extensions/lib/utils/validation.util.d.ts +3 -3
  161. package/extensions/public-api.d.ts +30 -30
  162. package/{fesm2020 → fesm2022}/abp-ng.theme.shared-extensions.mjs +1340 -1331
  163. package/fesm2022/abp-ng.theme.shared-extensions.mjs.map +1 -0
  164. package/{fesm2020 → fesm2022}/abp-ng.theme.shared-testing.mjs +40 -40
  165. package/{fesm2015 → fesm2022}/abp-ng.theme.shared-testing.mjs.map +1 -1
  166. package/{fesm2020 → fesm2022}/abp-ng.theme.shared.mjs +2292 -2290
  167. package/fesm2022/abp-ng.theme.shared.mjs.map +1 -0
  168. package/index.d.ts +5 -5
  169. package/lib/animations/bounce.animations.d.ts +1 -1
  170. package/lib/animations/collapse.animations.d.ts +9 -9
  171. package/lib/animations/fade.animations.d.ts +10 -10
  172. package/lib/animations/index.d.ts +6 -6
  173. package/lib/animations/modal.animations.d.ts +2 -2
  174. package/lib/animations/slide.animations.d.ts +1 -1
  175. package/lib/animations/toast.animations.d.ts +1 -1
  176. package/lib/components/breadcrumb/breadcrumb.component.d.ts +16 -16
  177. package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +7 -7
  178. package/lib/components/button/button.component.d.ts +26 -26
  179. package/lib/components/card/card-body.component.d.ts +8 -8
  180. package/lib/components/card/card-footer.component.d.ts +8 -8
  181. package/lib/components/card/card-header.component.d.ts +8 -8
  182. package/lib/components/card/card-header.directive.d.ts +6 -6
  183. package/lib/components/card/card-img-top.directive.d.ts +6 -6
  184. package/lib/components/card/card-subtitle.directive.d.ts +6 -6
  185. package/lib/components/card/card-title.directive.d.ts +6 -6
  186. package/lib/components/card/card.component.d.ts +7 -7
  187. package/lib/components/card/card.module.d.ts +15 -15
  188. package/lib/components/card/index.d.ts +9 -9
  189. package/lib/components/checkbox/checkbox.component.d.ts +18 -18
  190. package/lib/components/confirmation/confirmation.component.d.ts +19 -19
  191. package/lib/components/form-input/form-input.component.d.ts +19 -19
  192. package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +27 -27
  193. package/lib/components/index.d.ts +16 -16
  194. package/lib/components/loader-bar/loader-bar.component.d.ts +33 -33
  195. package/lib/components/loading/loading.component.d.ts +5 -5
  196. package/lib/components/modal/modal-close.directive.d.ts +9 -9
  197. package/lib/components/modal/modal-ref.service.d.ts +13 -13
  198. package/lib/components/modal/modal.component.d.ts +50 -50
  199. package/lib/components/password/password.component.d.ts +12 -12
  200. package/lib/components/toast/toast.component.d.ts +14 -14
  201. package/lib/components/toast-container/toast-container.component.d.ts +22 -22
  202. package/lib/constants/styles.d.ts +2 -2
  203. package/lib/constants/validation.d.ts +19 -19
  204. package/lib/directives/ellipsis.directive.d.ts +21 -21
  205. package/lib/directives/index.d.ts +5 -5
  206. package/lib/directives/loading.directive.d.ts +25 -25
  207. package/lib/directives/ngx-datatable-default.directive.d.ts +30 -30
  208. package/lib/directives/ngx-datatable-list.directive.d.ts +24 -24
  209. package/lib/directives/visible.directive.d.ts +18 -18
  210. package/lib/enums/form.d.ts +4 -4
  211. package/lib/enums/index.d.ts +2 -2
  212. package/lib/enums/route-names.d.ts +3 -3
  213. package/lib/handlers/document-dir.handler.d.ts +13 -13
  214. package/lib/handlers/error.handler.d.ts +83 -83
  215. package/lib/handlers/index.d.ts +2 -2
  216. package/lib/models/common.d.ts +21 -21
  217. package/lib/models/confirmation.d.ts +27 -27
  218. package/lib/models/index.d.ts +7 -7
  219. package/lib/models/nav-item.d.ts +13 -13
  220. package/lib/models/statistics.d.ts +12 -12
  221. package/lib/models/toaster.d.ts +30 -30
  222. package/lib/models/user-menu.d.ts +8 -8
  223. package/lib/models/validation.d.ts +1 -1
  224. package/lib/providers/index.d.ts +2 -2
  225. package/lib/providers/ng-bootstrap-config.provider.d.ts +8 -8
  226. package/lib/providers/route.provider.d.ts +8 -8
  227. package/lib/services/abstract-menu.service.d.ts +13 -13
  228. package/lib/services/confirmation.service.d.ts +21 -21
  229. package/lib/services/index.d.ts +5 -5
  230. package/lib/services/nav-items.service.d.ts +8 -8
  231. package/lib/services/page-alert.service.d.ts +18 -18
  232. package/lib/services/toaster.service.d.ts +60 -60
  233. package/lib/services/user-menu.service.d.ts +8 -8
  234. package/lib/theme-shared.module.d.ts +38 -38
  235. package/lib/tokens/append-content.token.d.ts +2 -2
  236. package/lib/tokens/confirmation-icons.token.d.ts +11 -11
  237. package/lib/tokens/http-error.token.d.ts +5 -5
  238. package/lib/tokens/index.d.ts +4 -4
  239. package/lib/tokens/ngx-datatable-messages.token.d.ts +12 -12
  240. package/lib/tokens/suppress-unsaved-changes-warning.token.d.ts +2 -2
  241. package/lib/utils/date-parser-formatter.d.ts +12 -12
  242. package/lib/utils/index.d.ts +2 -2
  243. package/lib/utils/validation-utils.d.ts +5 -5
  244. package/package.json +28 -24
  245. package/public-api.d.ts +12 -12
  246. package/testing/index.d.ts +5 -5
  247. package/testing/lib/models/config.d.ts +4 -4
  248. package/testing/lib/models/index.d.ts +1 -1
  249. package/testing/lib/theme-shared-testing.module.d.ts +14 -14
  250. package/testing/public-api.d.ts +3 -3
  251. package/esm2020/extensions/lib/adapters/date-time.adapter.mjs +0 -44
  252. package/esm2020/extensions/lib/adapters/date.adapter.mjs +0 -41
  253. package/esm2020/extensions/lib/adapters/time.adapter.mjs +0 -36
  254. package/esm2020/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +0 -25
  255. package/esm2020/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +0 -109
  256. package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +0 -198
  257. package/esm2020/extensions/lib/components/extensible-form/extensible-form.component.mjs +0 -73
  258. package/esm2020/extensions/lib/components/extensible-table/extensible-table.component.mjs +0 -135
  259. package/esm2020/extensions/lib/components/grid-actions/grid-actions.component.mjs +0 -39
  260. package/esm2020/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +0 -38
  261. package/esm2020/extensions/lib/directives/disabled.directive.mjs +0 -29
  262. package/esm2020/extensions/lib/directives/prop-data.directive.mjs +0 -41
  263. package/esm2020/extensions/lib/models/entity-props.mjs +0 -43
  264. package/esm2020/extensions/lib/models/form-props.mjs +0 -75
  265. package/esm2020/extensions/lib/models/props.mjs +0 -53
  266. package/esm2020/extensions/lib/pipes/create-injector.pipe.mjs +0 -36
  267. package/esm2020/extensions/lib/services/extensions.service.mjs +0 -24
  268. package/esm2020/extensions/lib/ui-extensions.module.mjs +0 -95
  269. package/esm2020/extensions/lib/utils/form-props.util.mjs +0 -51
  270. package/esm2020/extensions/lib/utils/state.util.mjs +0 -123
  271. package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +0 -43
  272. package/esm2020/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +0 -19
  273. package/esm2020/lib/components/button/button.component.mjs +0 -102
  274. package/esm2020/lib/components/card/card-footer.component.mjs +0 -30
  275. package/esm2020/lib/components/card/card-header.component.mjs +0 -30
  276. package/esm2020/lib/components/card/card-header.directive.mjs +0 -19
  277. package/esm2020/lib/components/card/card-img-top.directive.mjs +0 -19
  278. package/esm2020/lib/components/card/card-subtitle.directive.mjs +0 -19
  279. package/esm2020/lib/components/card/card-title.directive.mjs +0 -19
  280. package/esm2020/lib/components/card/card.component.mjs +0 -23
  281. package/esm2020/lib/components/card/card.module.mjs +0 -49
  282. package/esm2020/lib/components/checkbox/checkbox.component.mjs +0 -88
  283. package/esm2020/lib/components/confirmation/confirmation.component.mjs +0 -45
  284. package/esm2020/lib/components/form-input/form-input.component.mjs +0 -94
  285. package/esm2020/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +0 -59
  286. package/esm2020/lib/components/loader-bar/loader-bar.component.mjs +0 -121
  287. package/esm2020/lib/components/loading/loading.component.mjs +0 -19
  288. package/esm2020/lib/components/modal/modal-close.directive.mjs +0 -27
  289. package/esm2020/lib/components/modal/modal-ref.service.mjs +0 -26
  290. package/esm2020/lib/components/modal/modal.component.mjs +0 -189
  291. package/esm2020/lib/components/password/password.component.mjs +0 -38
  292. package/esm2020/lib/components/toast/toast.component.mjs +0 -55
  293. package/esm2020/lib/components/toast-container/toast-container.component.mjs +0 -58
  294. package/esm2020/lib/directives/ellipsis.directive.mjs +0 -63
  295. package/esm2020/lib/directives/loading.directive.mjs +0 -89
  296. package/esm2020/lib/directives/ngx-datatable-default.directive.mjs +0 -75
  297. package/esm2020/lib/directives/ngx-datatable-list.directive.mjs +0 -94
  298. package/esm2020/lib/directives/visible.directive.mjs +0 -62
  299. package/esm2020/lib/handlers/document-dir.handler.mjs +0 -31
  300. package/esm2020/lib/handlers/error.handler.mjs +0 -291
  301. package/esm2020/lib/services/confirmation.service.mjs +0 -68
  302. package/esm2020/lib/services/nav-items.service.mjs +0 -17
  303. package/esm2020/lib/services/page-alert.service.mjs +0 -28
  304. package/esm2020/lib/services/toaster.service.mjs +0 -103
  305. package/esm2020/lib/services/user-menu.service.mjs +0 -17
  306. package/esm2020/lib/theme-shared.module.mjs +0 -200
  307. package/esm2020/lib/utils/date-parser-formatter.mjs +0 -58
  308. package/esm2020/testing/lib/theme-shared-testing.module.mjs +0 -46
  309. package/fesm2015/abp-ng.theme.shared-extensions.mjs +0 -1460
  310. package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +0 -1
  311. package/fesm2015/abp-ng.theme.shared-testing.mjs +0 -54
  312. package/fesm2015/abp-ng.theme.shared.mjs +0 -2767
  313. package/fesm2015/abp-ng.theme.shared.mjs.map +0 -1
  314. package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +0 -1
  315. package/fesm2020/abp-ng.theme.shared-testing.mjs.map +0 -1
  316. package/fesm2020/abp-ng.theme.shared.mjs.map +0 -1
@@ -1,2767 +0,0 @@
1
- import { animation, style, animate, keyframes, trigger, state, transition, useAnimation, query } from '@angular/animations';
2
- import * as i0 from '@angular/core';
3
- import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output, ViewChild, InjectionToken, Inject, ViewEncapsulation, Injectable, Optional, ContentChild, Directive, HostListener, forwardRef, HostBinding, NgModule, ComponentFactoryResolver, RendererFactory2, ApplicationRef, APP_INITIALIZER, inject, LOCALE_ID } from '@angular/core';
4
- import * as i1 from '@angular/common';
5
- import { CommonModule, DOCUMENT, formatDate, DatePipe } from '@angular/common';
6
- import * as i1$1 from '@angular/router';
7
- import { ResolveEnd } from '@angular/router';
8
- import * as i2 from '@abp/ng.core';
9
- import { getRoutePath, SubscriptionService, PROJECTION_STRATEGY, uuid, AbstractNgModelComponent, LocalizationService, getLocaleDirection, HttpErrorReporterService, RouterEvents, AuthService, RoutesService, InternalStore, DomInsertionService, CONTENT_STRATEGY, CoreModule, noop, ConfigStateService } from '@abp/ng.core';
10
- import { __rest } from 'tslib';
11
- import { startWith, map, debounceTime, filter, takeUntil, distinctUntilChanged, take, catchError, switchMap } from 'rxjs/operators';
12
- import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, of, from, Observable, EMPTY, BehaviorSubject, throwError } from 'rxjs';
13
- import * as i3 from '@ng-bootstrap/ng-bootstrap';
14
- import { NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
15
- import * as i2$1 from '@angular/forms';
16
- import { NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
17
- import * as i3$1 from '@ngx-validate/core';
18
- import { NgxValidateCoreModule, VALIDATION_BLUEPRINTS, VALIDATION_MAP_ERRORS_FN, defaultMapErrorsFn, VALIDATION_VALIDATE_ON_SUBMIT, normalizeDiacritics } from '@ngx-validate/core';
19
- import * as i1$2 from '@swimlane/ngx-datatable';
20
- import { ColumnMode, NgxDatatableModule } from '@swimlane/ngx-datatable';
21
- import { HttpErrorResponse } from '@angular/common/http';
22
-
23
- const bounceIn = animation([
24
- style({ opacity: '0', display: '{{ display }}' }),
25
- animate('{{ time}} {{ easing }}', keyframes([
26
- style({ opacity: '0', transform: '{{ transform }} scale(0.0)', offset: 0 }),
27
- style({ opacity: '0', transform: '{{ transform }} scale(0.8)', offset: 0.5 }),
28
- style({ opacity: '1', transform: '{{ transform }} scale(1.0)', offset: 1 }),
29
- ])),
30
- ], {
31
- params: {
32
- time: '350ms',
33
- easing: 'cubic-bezier(.7,.31,.72,1.47)',
34
- display: 'block',
35
- transform: 'translate(-50%, -50%)',
36
- },
37
- });
38
-
39
- const collapseY = animation([
40
- style({ height: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
41
- animate('{{ time }} {{ easing }}', style({ height: '0', padding: '0px' })),
42
- ], { params: { time: '350ms', easing: 'ease' } });
43
- const collapseYWithMargin = animation([
44
- style({ 'margin-top': '0' }),
45
- animate('{{ time }} {{ easing }}', style({ 'margin-left': '-100%' })),
46
- ], {
47
- params: { time: '500ms', easing: 'ease' },
48
- });
49
- const collapseX = animation([
50
- style({ width: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
51
- animate('{{ time }} {{ easing }}', style({ width: '0', padding: '0px' })),
52
- ], { params: { time: '350ms', easing: 'ease' } });
53
- const expandY = animation([
54
- style({ height: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
55
- animate('{{ time }} {{ easing }}', style({ height: '*', padding: '*' })),
56
- ], { params: { time: '350ms', easing: 'ease' } });
57
- const expandYWithMargin = animation([
58
- style({ 'margin-top': '-100%' }),
59
- animate('{{ time }} {{ easing }}', style({ 'margin-top': '0' })),
60
- ], {
61
- params: { time: '500ms', easing: 'ease' },
62
- });
63
- const expandX = animation([
64
- style({ width: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
65
- animate('{{ time }} {{ easing }}', style({ width: '*', padding: '*' })),
66
- ], { params: { time: '350ms', easing: 'ease' } });
67
- const collapse = trigger('collapse', [
68
- state('collapsed', style({ height: '0', overflow: 'hidden' })),
69
- state('expanded', style({ height: '*', overflow: 'hidden' })),
70
- transition('expanded => collapsed', useAnimation(collapseY)),
71
- transition('collapsed => expanded', useAnimation(expandY)),
72
- ]);
73
- const collapseWithMargin = trigger('collapseWithMargin', [
74
- state('collapsed', style({ 'margin-top': '-100%' })),
75
- state('expanded', style({ 'margin-top': '0' })),
76
- transition('expanded => collapsed', useAnimation(collapseYWithMargin), {
77
- params: { time: '400ms', easing: 'linear' },
78
- }),
79
- transition('collapsed => expanded', useAnimation(expandYWithMargin)),
80
- ]);
81
- const collapseLinearWithMargin = trigger('collapseLinearWithMargin', [
82
- state('collapsed', style({ 'margin-top': '-100vh' })),
83
- state('expanded', style({ 'margin-top': '0' })),
84
- transition('expanded => collapsed', useAnimation(collapseYWithMargin, { params: { time: '200ms', easing: 'linear' } })),
85
- transition('collapsed => expanded', useAnimation(expandYWithMargin, { params: { time: '250ms', easing: 'linear' } })),
86
- ]);
87
-
88
- const fadeIn = animation([style({ opacity: '0' }), animate('{{ time}} {{ easing }}', style({ opacity: '1' }))], {
89
- params: { time: '350ms', easing: 'ease' },
90
- });
91
- const fadeOut = animation([style({ opacity: '1' }), animate('{{ time}} {{ easing }}', style({ opacity: '0' }))], { params: { time: '350ms', easing: 'ease' } });
92
- const fadeInDown = animation([
93
- style({ opacity: '0', transform: '{{ transform }} translateY(-20px)' }),
94
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateY(0)' })),
95
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
96
- const fadeInUp = animation([
97
- style({ opacity: '0', transform: '{{ transform }} translateY(20px)' }),
98
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateY(0)' })),
99
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
100
- const fadeInLeft = animation([
101
- style({ opacity: '0', transform: '{{ transform }} translateX(20px)' }),
102
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateX(0)' })),
103
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
104
- const fadeInRight = animation([
105
- style({ opacity: '0', transform: '{{ transform }} translateX(-20px)' }),
106
- animate('{{ time }} {{ easing }}', style({ opacity: '1', transform: '{{ transform }} translateX(0)' })),
107
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
108
- const fadeOutDown = animation([
109
- style({ opacity: '1', transform: '{{ transform }} translateY(0)' }),
110
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateY(20px)' })),
111
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
112
- const fadeOutUp = animation([
113
- style({ opacity: '1', transform: '{{ transform }} translateY(0)' }),
114
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateY(-20px)' })),
115
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
116
- const fadeOutLeft = animation([
117
- style({ opacity: '1', transform: '{{ transform }} translateX(0)' }),
118
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateX(20px)' })),
119
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
120
- const fadeOutRight = animation([
121
- style({ opacity: '1', transform: '{{ transform }} translateX(0)' }),
122
- animate('{{ time }} {{ easing }}', style({ opacity: '0', transform: '{{ transform }} translateX(-20px)' })),
123
- ], { params: { time: '350ms', easing: 'ease', transform: '' } });
124
-
125
- const fadeAnimation = trigger('fade', [
126
- transition(':enter', useAnimation(fadeIn)),
127
- transition(':leave', useAnimation(fadeOut)),
128
- ]);
129
- const dialogAnimation = trigger('dialog', [
130
- transition(':enter', useAnimation(fadeInDown)),
131
- transition(':leave', useAnimation(fadeOut)),
132
- ]);
133
-
134
- const slideFromBottom = trigger('slideFromBottom', [
135
- transition('* <=> *', [
136
- style({ 'margin-top': '20px', opacity: '0' }),
137
- animate('0.2s ease-out', style({ opacity: '1', 'margin-top': '0px' })),
138
- ]),
139
- ]);
140
-
141
- const toastInOut = trigger('toastInOut', [
142
- transition('* <=> *', [
143
- query(':enter', [
144
- style({ opacity: 0, transform: 'translateY(20px)' }),
145
- animate('350ms ease', style({ opacity: 1, transform: 'translateY(0)' })),
146
- ], { optional: true }),
147
- query(':leave', animate('450ms ease', style({ opacity: 0 })), {
148
- optional: true,
149
- }),
150
- ]),
151
- ]);
152
-
153
- class BreadcrumbItemsComponent {
154
- constructor() {
155
- this.items = [];
156
- }
157
- }
158
- BreadcrumbItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
- BreadcrumbItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: { items: "items" }, ngImport: i0, template: "<ol class=\"breadcrumb\" *ngIf=\"items.length\">\r\n <li class=\"breadcrumb-item\">\r\n <a routerLink=\"/\"><i class=\"fa fa-home\"></i> </a>\r\n </li>\r\n <li\r\n *ngFor=\"let item of items; let last = last\"\r\n class=\"breadcrumb-item\"\r\n [class.active]=\"last\"\r\n aria-current=\"page\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </li>\r\n</ol>\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\r\n</ng-template>\r\n\r\n<ng-template #textTemplate let-item>\r\n {{ item.name | abpLocalization }}\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] });
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbItemsComponent, decorators: [{
161
- type: Component,
162
- args: [{ selector: 'abp-breadcrumb-items', template: "<ol class=\"breadcrumb\" *ngIf=\"items.length\">\r\n <li class=\"breadcrumb-item\">\r\n <a routerLink=\"/\"><i class=\"fa fa-home\"></i> </a>\r\n </li>\r\n <li\r\n *ngFor=\"let item of items; let last = last\"\r\n class=\"breadcrumb-item\"\r\n [class.active]=\"last\"\r\n aria-current=\"page\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"item.path ? linkTemplate : textTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </li>\r\n</ol>\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.path\"> {{ item.name | abpLocalization }}</a>\r\n</ng-template>\r\n\r\n<ng-template #textTemplate let-item>\r\n {{ item.name | abpLocalization }}\r\n</ng-template>\r\n" }]
163
- }], propDecorators: { items: [{
164
- type: Input
165
- }] } });
166
-
167
- class BreadcrumbComponent {
168
- constructor(cdRef, router, routes, subscription, routerEvents) {
169
- this.cdRef = cdRef;
170
- this.router = router;
171
- this.routes = routes;
172
- this.subscription = subscription;
173
- this.routerEvents = routerEvents;
174
- this.segments = [];
175
- }
176
- ngOnInit() {
177
- this.subscription.addOne(this.routerEvents.getNavigationEvents('End').pipe(startWith(null), map(() => this.routes.search({ path: getRoutePath(this.router) }))), route => {
178
- this.segments = [];
179
- if (route) {
180
- let node = { parent: route };
181
- while (node.parent) {
182
- node = node.parent;
183
- const { parent, children, isLeaf, path } = node, segment = __rest(node, ["parent", "children", "isLeaf", "path"]);
184
- if (!isAdministration(segment))
185
- this.segments.unshift(segment);
186
- }
187
- this.cdRef.detectChanges();
188
- }
189
- });
190
- }
191
- }
192
- BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.Router }, { token: i2.RoutesService }, { token: i2.SubscriptionService }, { token: i2.RouterEvents }], target: i0.ɵɵFactoryTarget.Component });
193
- BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BreadcrumbComponent, selector: "abp-breadcrumb", providers: [SubscriptionService], ngImport: i0, template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\r\n", dependencies: [{ kind: "component", type: BreadcrumbItemsComponent, selector: "abp-breadcrumb-items", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
195
- type: Component,
196
- args: [{ selector: 'abp-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SubscriptionService], template: "<abp-breadcrumb-items [items]=\"segments\"></abp-breadcrumb-items>\r\n" }]
197
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.Router }, { type: i2.RoutesService }, { type: i2.SubscriptionService }, { type: i2.RouterEvents }]; } });
198
- function isAdministration(route) {
199
- return route.name === "AbpUiNavigation::Menu:Administration" /* eThemeSharedRouteNames.Administration */;
200
- }
201
-
202
- class ButtonComponent {
203
- constructor(renderer) {
204
- this.renderer = renderer;
205
- this.buttonId = '';
206
- this.buttonClass = 'btn btn-primary';
207
- this.buttonType = 'button';
208
- this.formName = undefined;
209
- this.loading = false;
210
- this.disabled = false;
211
- this.click = new EventEmitter();
212
- this.focus = new EventEmitter();
213
- this.blur = new EventEmitter();
214
- this.abpClick = new EventEmitter();
215
- this.abpFocus = new EventEmitter();
216
- this.abpBlur = new EventEmitter();
217
- }
218
- get icon() {
219
- return `${this.loading ? 'fa fa-spinner fa-spin' : this.iconClass || 'd-none'}`;
220
- }
221
- ngOnInit() {
222
- if (this.attributes) {
223
- Object.keys(this.attributes).forEach(key => {
224
- var _a;
225
- if ((_a = this.attributes) === null || _a === void 0 ? void 0 : _a[key]) {
226
- this.renderer.setAttribute(this.buttonRef.nativeElement, key, this.attributes[key]);
227
- }
228
- });
229
- }
230
- }
231
- }
232
- ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
233
- ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ButtonComponent, selector: "abp-button", inputs: { buttonId: "buttonId", buttonClass: "buttonClass", buttonType: "buttonType", formName: "formName", iconClass: "iconClass", loading: "loading", disabled: "disabled", attributes: "attributes" }, outputs: { click: "click", focus: "focus", blur: "blur", abpClick: "abpClick", abpFocus: "abpFocus", abpBlur: "abpBlur" }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true, static: true }], ngImport: i0, template: `
234
- <button
235
- #button
236
- [id]="buttonId"
237
- [attr.type]="buttonType"
238
- [attr.form]="formName"
239
- [ngClass]="buttonClass"
240
- [disabled]="loading || disabled"
241
- (click.stop)="click.next($event); abpClick.next($event)"
242
- (focus)="focus.next($event); abpFocus.next($event)"
243
- (blur)="blur.next($event); abpBlur.next($event)"
244
- >
245
- <i [ngClass]="icon" class="me-1"></i><ng-content></ng-content>
246
- </button>
247
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] });
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ButtonComponent, decorators: [{
249
- type: Component,
250
- args: [{
251
- selector: 'abp-button',
252
- template: `
253
- <button
254
- #button
255
- [id]="buttonId"
256
- [attr.type]="buttonType"
257
- [attr.form]="formName"
258
- [ngClass]="buttonClass"
259
- [disabled]="loading || disabled"
260
- (click.stop)="click.next($event); abpClick.next($event)"
261
- (focus)="focus.next($event); abpFocus.next($event)"
262
- (blur)="blur.next($event); abpBlur.next($event)"
263
- >
264
- <i [ngClass]="icon" class="me-1"></i><ng-content></ng-content>
265
- </button>
266
- `,
267
- }]
268
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { buttonId: [{
269
- type: Input
270
- }], buttonClass: [{
271
- type: Input
272
- }], buttonType: [{
273
- type: Input
274
- }], formName: [{
275
- type: Input
276
- }], iconClass: [{
277
- type: Input
278
- }], loading: [{
279
- type: Input
280
- }], disabled: [{
281
- type: Input
282
- }], attributes: [{
283
- type: Input
284
- }], click: [{
285
- type: Output
286
- }], focus: [{
287
- type: Output
288
- }], blur: [{
289
- type: Output
290
- }], abpClick: [{
291
- type: Output
292
- }], abpFocus: [{
293
- type: Output
294
- }], abpBlur: [{
295
- type: Output
296
- }], buttonRef: [{
297
- type: ViewChild,
298
- args: ['button', { static: true }]
299
- }] } });
300
-
301
- var Confirmation;
302
- (function (Confirmation) {
303
- let Status;
304
- (function (Status) {
305
- Status["confirm"] = "confirm";
306
- Status["reject"] = "reject";
307
- Status["dismiss"] = "dismiss";
308
- })(Status = Confirmation.Status || (Confirmation.Status = {}));
309
- })(Confirmation || (Confirmation = {}));
310
-
311
- const CONFIRMATION_ICONS = new InjectionToken('CONFIRMATION_ICONS');
312
- const DEFAULT_CONFIRMATION_ICONS = {
313
- info: 'fa fa-info-circle',
314
- success: 'fa fa-check-circle',
315
- warning: 'fa fa-exclamation-triangle',
316
- error: 'fa fa-times-circle',
317
- default: 'fa fa-question-circle',
318
- neutral: '',
319
- };
320
-
321
- class ConfirmationComponent {
322
- constructor(icons) {
323
- this.icons = icons;
324
- this.confirm = Confirmation.Status.confirm;
325
- this.reject = Confirmation.Status.reject;
326
- this.dismiss = Confirmation.Status.dismiss;
327
- }
328
- close(status) {
329
- this.clear(status);
330
- }
331
- getIconClass({ severity, options }) {
332
- if (options && options.icon) {
333
- return options.icon;
334
- }
335
- if (!this.icons) {
336
- return '';
337
- }
338
- if (severity) {
339
- return this.icons[severity];
340
- }
341
- return this.icons.default;
342
- }
343
- isCustomIconExists({ options }) {
344
- return !!(options && (options.iconTemplate || options.icon));
345
- }
346
- isIconTemplateExits({ options }) {
347
- return !!(options && options.iconTemplate);
348
- }
349
- }
350
- ConfirmationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfirmationComponent, deps: [{ token: CONFIRMATION_ICONS }], target: i0.ɵɵFactoryTarget.Component });
351
- ConfirmationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ConfirmationComponent, selector: "abp-confirmation", ngImport: i0, template: "<div class=\"confirmation\" *ngIf=\"confirmation$ | async as data\">\r\n <div\r\n class=\"confirmation-backdrop\"\r\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\r\n ></div>\r\n <div class=\"confirmation-dialog\">\r\n <div class=\"icon-container\" [ngClass]=\"data.severity\" *ngIf=\"data.severity || isCustomIconExists(data)\">\r\n <div [outerHTML]=\"data.options.iconTemplate\" *ngIf=\"isIconTemplateExits(data); else iconHolder\" ></div>\r\n <ng-template #iconHolder>\r\n <i class=\"icon\" [ngClass]=\"getIconClass(data)\"></i>\r\n </ng-template>\r\n </div>\r\n <div class=\"content\">\r\n <h1\r\n class=\"title\"\r\n *ngIf=\"data.title\"\r\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\r\n ></h1>\r\n <p\r\n class=\"message\"\r\n *ngIf=\"data.message\"\r\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n <div class=\"footer\">\r\n <button\r\n id=\"cancel\"\r\n class=\"confirmation-button confirmation-button--reject\"\r\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\r\n *ngIf=\"!data?.options?.hideCancelBtn\"\r\n (click)=\"close(reject)\"\r\n ></button>\r\n <button\r\n id=\"confirm\"\r\n class=\"confirmation-button confirmation-button--approve\"\r\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\r\n *ngIf=\"!data?.options?.hideYesBtn\"\r\n (click)=\"close(confirm)\"\r\n ></button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;margin:0 0 10px;padding:20px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;margin:10px auto;padding:20px;font-size:16px;font-weight:400;text-align:center}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;margin:10px 0 0;padding:20px;width:100%}.confirmation .confirmation-dialog .footer .confirmation-button{display:inline-block;margin:0 5px;padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:600}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] });
352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfirmationComponent, decorators: [{
353
- type: Component,
354
- args: [{ selector: 'abp-confirmation', template: "<div class=\"confirmation\" *ngIf=\"confirmation$ | async as data\">\r\n <div\r\n class=\"confirmation-backdrop\"\r\n (click)=\"data.options?.dismissible ? close(dismiss) : null\"\r\n ></div>\r\n <div class=\"confirmation-dialog\">\r\n <div class=\"icon-container\" [ngClass]=\"data.severity\" *ngIf=\"data.severity || isCustomIconExists(data)\">\r\n <div [outerHTML]=\"data.options.iconTemplate\" *ngIf=\"isIconTemplateExits(data); else iconHolder\" ></div>\r\n <ng-template #iconHolder>\r\n <i class=\"icon\" [ngClass]=\"getIconClass(data)\"></i>\r\n </ng-template>\r\n </div>\r\n <div class=\"content\">\r\n <h1\r\n class=\"title\"\r\n *ngIf=\"data.title\"\r\n [innerHTML]=\"data.title | abpLocalization: data.options?.titleLocalizationParams\"\r\n ></h1>\r\n <p\r\n class=\"message\"\r\n *ngIf=\"data.message\"\r\n [innerHTML]=\"data.message | abpLocalization: data.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n <div class=\"footer\">\r\n <button\r\n id=\"cancel\"\r\n class=\"confirmation-button confirmation-button--reject\"\r\n [innerHTML]=\"data.options?.cancelText || 'AbpUi::Cancel' | abpLocalization\"\r\n *ngIf=\"!data?.options?.hideCancelBtn\"\r\n (click)=\"close(reject)\"\r\n ></button>\r\n <button\r\n id=\"confirm\"\r\n class=\"confirmation-button confirmation-button--approve\"\r\n [innerHTML]=\"data.options?.yesText || 'AbpUi::Yes' | abpLocalization\"\r\n *ngIf=\"!data?.options?.hideYesBtn\"\r\n (click)=\"close(confirm)\"\r\n ></button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirmation{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:1060}.confirmation .confirmation-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1061!important}.confirmation .confirmation-dialog{display:flex;flex-direction:column;margin:20px auto;padding:0;width:450px;min-height:300px;z-index:1062!important}@media screen and (max-width: 500px){.confirmation .confirmation-dialog{width:90vw}}.confirmation .confirmation-dialog .icon-container{display:flex;align-items:center;justify-content:center;margin:0 0 10px;padding:20px}.confirmation .confirmation-dialog .icon-container .icon{width:100px;height:100px;stroke-width:1;font-size:80px;text-align:center}.confirmation .confirmation-dialog .content{flex-grow:1;display:block}.confirmation .confirmation-dialog .content .title{display:block;margin:0;padding:0;font-size:27px;font-weight:600;text-align:center}.confirmation .confirmation-dialog .content .message{display:block;margin:10px auto;padding:20px;font-size:16px;font-weight:400;text-align:center}.confirmation .confirmation-dialog .footer{display:flex;align-items:center;justify-content:flex-end;margin:10px 0 0;padding:20px;width:100%}.confirmation .confirmation-dialog .footer .confirmation-button{display:inline-block;margin:0 5px;padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:600}\n"] }]
355
- }], ctorParameters: function () {
356
- return [{ type: undefined, decorators: [{
357
- type: Inject,
358
- args: [CONFIRMATION_ICONS]
359
- }] }];
360
- } });
361
-
362
- class HttpErrorWrapperComponent {
363
- constructor(subscription) {
364
- this.subscription = subscription;
365
- this.status = 0;
366
- this.title = 'Oops!';
367
- this.details = 'Sorry, an error has occured.';
368
- this.customComponent = undefined;
369
- this.hideCloseIcon = false;
370
- this.isHomeShow = true;
371
- }
372
- get statusText() {
373
- return this.status ? `[${this.status}]` : '';
374
- }
375
- ngOnInit() {
376
- var _a;
377
- this.backgroundColor =
378
- ((_a = window.getComputedStyle(document.body)) === null || _a === void 0 ? void 0 : _a.getPropertyValue('background-color')) || '#fff';
379
- }
380
- ngAfterViewInit() {
381
- if (this.customComponent) {
382
- const customComponentRef = this.cfRes
383
- .resolveComponentFactory(this.customComponent)
384
- .create(this.injector);
385
- customComponentRef.instance.errorStatus = this.status;
386
- customComponentRef.instance.destroy$ = this.destroy$;
387
- this.appRef.attachView(customComponentRef.hostView);
388
- if (this.containerRef) {
389
- this.containerRef.nativeElement.appendChild(customComponentRef.hostView.rootNodes[0]);
390
- }
391
- customComponentRef.changeDetectorRef.detectChanges();
392
- }
393
- const keyup$ = fromEvent(document, 'keyup').pipe(debounceTime(150), filter((key) => key && key.key === 'Escape'));
394
- this.subscription.addOne(keyup$, () => this.destroy());
395
- }
396
- ngOnDestroy() {
397
- this.destroy();
398
- }
399
- destroy() {
400
- this.destroy$.next();
401
- this.destroy$.complete();
402
- }
403
- }
404
- HttpErrorWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorWrapperComponent, deps: [{ token: i2.SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
405
- HttpErrorWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: HttpErrorWrapperComponent, selector: "abp-http-error-wrapper", providers: [SubscriptionService], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div\r\n #container\r\n id=\"abp-http-error-container\"\r\n class=\"error\"\r\n [style.backgroundColor]=\"backgroundColor\"\r\n>\r\n <button\r\n *ngIf=\"!hideCloseIcon\"\r\n id=\"abp-close-button\"\r\n type=\"button\"\r\n class=\"btn-close me-2\"\r\n (click)=\"destroy()\"\r\n ></button>\r\n\r\n <div *ngIf=\"!customComponent\" class=\"row centered\">\r\n <div class=\"col-md-12\">\r\n <div class=\"error-template\">\r\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\r\n <div class=\"error-details\">\r\n {{ details | abpLocalization }}\r\n </div>\r\n <div class=\"error-actions\">\r\n <a\r\n *ngIf=\"isHomeShow\"\r\n (click)=\"destroy()\"\r\n routerLink=\"/\"\r\n class=\"btn btn-primary btn-md mt-2\"\r\n ><span class=\"glyphicon glyphicon-home\"></span>\r\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] });
406
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HttpErrorWrapperComponent, decorators: [{
407
- type: Component,
408
- args: [{ selector: 'abp-http-error-wrapper', providers: [SubscriptionService], template: "<div\r\n #container\r\n id=\"abp-http-error-container\"\r\n class=\"error\"\r\n [style.backgroundColor]=\"backgroundColor\"\r\n>\r\n <button\r\n *ngIf=\"!hideCloseIcon\"\r\n id=\"abp-close-button\"\r\n type=\"button\"\r\n class=\"btn-close me-2\"\r\n (click)=\"destroy()\"\r\n ></button>\r\n\r\n <div *ngIf=\"!customComponent\" class=\"row centered\">\r\n <div class=\"col-md-12\">\r\n <div class=\"error-template\">\r\n <h1>{{ statusText }} {{ title | abpLocalization }}</h1>\r\n <div class=\"error-details\">\r\n {{ details | abpLocalization }}\r\n </div>\r\n <div class=\"error-actions\">\r\n <a\r\n *ngIf=\"isHomeShow\"\r\n (click)=\"destroy()\"\r\n routerLink=\"/\"\r\n class=\"btn btn-primary btn-md mt-2\"\r\n ><span class=\"glyphicon glyphicon-home\"></span>\r\n {{ { key: '::Menu:Home', defaultValue: 'Home' } | abpLocalization }}\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error{position:fixed;top:0;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
409
- }], ctorParameters: function () { return [{ type: i2.SubscriptionService }]; }, propDecorators: { containerRef: [{
410
- type: ViewChild,
411
- args: ['container', { static: false }]
412
- }] } });
413
-
414
- class LoaderBarComponent {
415
- constructor(router, cdRef, subscription, httpWaitService, routerWaitService) {
416
- this.router = router;
417
- this.cdRef = cdRef;
418
- this.subscription = subscription;
419
- this.httpWaitService = httpWaitService;
420
- this.routerWaitService = routerWaitService;
421
- this.containerClass = 'abp-loader-bar';
422
- this.color = '#77b6ff';
423
- this.progressLevel = 0;
424
- this.interval = new Subscription();
425
- this.timer = new Subscription();
426
- this.intervalPeriod = 350;
427
- this.stopDelay = 800;
428
- this.clearProgress = () => {
429
- this.progressLevel = 0;
430
- this.cdRef.detectChanges();
431
- };
432
- this.reportProgress = () => {
433
- if (this.progressLevel < 75) {
434
- this.progressLevel += 1 + Math.random() * 9;
435
- }
436
- else if (this.progressLevel < 90) {
437
- this.progressLevel += 0.4;
438
- }
439
- else if (this.progressLevel < 100) {
440
- this.progressLevel += 0.1;
441
- }
442
- else {
443
- this.interval.unsubscribe();
444
- }
445
- this.cdRef.detectChanges();
446
- };
447
- }
448
- set isLoading(value) {
449
- this._isLoading = value;
450
- this.cdRef.detectChanges();
451
- }
452
- get isLoading() {
453
- return this._isLoading;
454
- }
455
- get boxShadow() {
456
- return `0 0 10px rgba(${this.color}, 0.5)`;
457
- }
458
- ngOnInit() {
459
- this.subscribeLoading();
460
- }
461
- subscribeLoading() {
462
- this.subscription.addOne(combineLatest([this.httpWaitService.getLoading$(), this.routerWaitService.getLoading$()]), ([httpLoading, routerLoading]) => {
463
- if (httpLoading || routerLoading)
464
- this.startLoading();
465
- else
466
- this.stopLoading();
467
- });
468
- }
469
- ngOnDestroy() {
470
- this.interval.unsubscribe();
471
- }
472
- startLoading() {
473
- if (this.isLoading || !this.interval.closed)
474
- return;
475
- this.isLoading = true;
476
- this.progressLevel = 0;
477
- this.cdRef.detectChanges();
478
- this.interval = timer(0, this.intervalPeriod).subscribe(this.reportProgress);
479
- this.timer.unsubscribe();
480
- }
481
- stopLoading() {
482
- this.interval.unsubscribe();
483
- this.progressLevel = 100;
484
- this.isLoading = false;
485
- if (!this.timer.closed)
486
- return;
487
- this.timer = timer(this.stopDelay).subscribe(this.clearProgress);
488
- }
489
- }
490
- LoaderBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderBarComponent, deps: [{ token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: i2.SubscriptionService }, { token: i2.HttpWaitService }, { token: i2.RouterWaitService }], target: i0.ɵɵFactoryTarget.Component });
491
- LoaderBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoaderBarComponent, selector: "abp-loader-bar", inputs: { isLoading: "isLoading", containerClass: "containerClass", color: "color" }, providers: [SubscriptionService], ngImport: i0, template: `
492
- <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">
493
- <div
494
- class="abp-progress"
495
- [class.progressing]="progressLevel"
496
- [style.width.vw]="progressLevel"
497
- [ngStyle]="{
498
- 'background-color': color,
499
- 'box-shadow': boxShadow
500
- }"
501
- ></div>
502
- </div>
503
- `, isInline: true, styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoaderBarComponent, decorators: [{
505
- type: Component,
506
- args: [{ selector: 'abp-loader-bar', template: `
507
- <div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading">
508
- <div
509
- class="abp-progress"
510
- [class.progressing]="progressLevel"
511
- [style.width.vw]="progressLevel"
512
- [ngStyle]="{
513
- 'background-color': color,
514
- 'box-shadow': boxShadow
515
- }"
516
- ></div>
517
- </div>
518
- `, providers: [SubscriptionService], styles: [".abp-loader-bar{left:0;opacity:0;position:fixed;top:0;transition:opacity .4s linear .4s;z-index:99999}.abp-loader-bar.is-loading{opacity:1;transition:none}.abp-loader-bar .abp-progress{height:3px;left:0;position:fixed;top:0}.abp-loader-bar .abp-progress.progressing{transition:width .4s ease}\n"] }]
519
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i0.ChangeDetectorRef }, { type: i2.SubscriptionService }, { type: i2.HttpWaitService }, { type: i2.RouterWaitService }]; }, propDecorators: { isLoading: [{
520
- type: Input
521
- }], containerClass: [{
522
- type: Input
523
- }], color: [{
524
- type: Input
525
- }] } });
526
-
527
- class LoadingComponent {
528
- }
529
- LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
530
- LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoadingComponent, selector: "abp-loading", ngImport: i0, template: `
531
- <div class="abp-loading">
532
- <i class="fa fa-spinner fa-pulse abp-spinner"></i>
533
- </div>
534
- `, isInline: true, styles: [".abp-loading{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1040}.abp-loading .abp-spinner{position:absolute;top:50%;left:50%;font-size:14px;transform:translate(-50%) translateY(-50%)}\n"], encapsulation: i0.ViewEncapsulation.None });
535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadingComponent, decorators: [{
536
- type: Component,
537
- args: [{ selector: 'abp-loading', template: `
538
- <div class="abp-loading">
539
- <i class="fa fa-spinner fa-pulse abp-spinner"></i>
540
- </div>
541
- `, encapsulation: ViewEncapsulation.None, styles: [".abp-loading{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1040}.abp-loading .abp-spinner{position:absolute;top:50%;left:50%;font-size:14px;transform:translate(-50%) translateY(-50%)}\n"] }]
542
- }] });
543
-
544
- const SUPPRESS_UNSAVED_CHANGES_WARNING = new InjectionToken('SUPPRESS_UNSAVED_CHANGES_WARNING');
545
-
546
- class ConfirmationService {
547
- constructor(contentProjectionService) {
548
- this.contentProjectionService = contentProjectionService;
549
- this.confirmation$ = new ReplaySubject(1);
550
- this.clear = (status = Confirmation.Status.dismiss) => {
551
- this.confirmation$.next(null);
552
- this.status$.next(status);
553
- };
554
- }
555
- setContainer() {
556
- this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ConfirmationComponent, {
557
- confirmation$: this.confirmation$,
558
- clear: this.clear,
559
- }));
560
- setTimeout(() => {
561
- this.containerComponentRef.changeDetectorRef.detectChanges();
562
- }, 0);
563
- }
564
- info(message, title, options) {
565
- return this.show(message, title, 'info', options);
566
- }
567
- success(message, title, options) {
568
- return this.show(message, title, 'success', options);
569
- }
570
- warn(message, title, options) {
571
- return this.show(message, title, 'warning', options);
572
- }
573
- error(message, title, options) {
574
- return this.show(message, title, 'error', options);
575
- }
576
- show(message, title, severity, options = {}) {
577
- if (!this.containerComponentRef)
578
- this.setContainer();
579
- this.confirmation$.next({
580
- message,
581
- title,
582
- severity: severity || 'neutral',
583
- options,
584
- });
585
- this.status$ = new Subject();
586
- const { dismissible = true } = options;
587
- if (dismissible)
588
- this.listenToEscape();
589
- return this.status$;
590
- }
591
- listenToEscape() {
592
- fromEvent(document, 'keyup')
593
- .pipe(takeUntil(this.status$), debounceTime(150), filter((key) => key && key.key === 'Escape'))
594
- .subscribe(() => {
595
- this.clear();
596
- });
597
- }
598
- }
599
- ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfirmationService, deps: [{ token: i2.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable });
600
- ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfirmationService, decorators: [{
602
- type: Injectable,
603
- args: [{ providedIn: 'root' }]
604
- }], ctorParameters: function () { return [{ type: i2.ContentProjectionService }]; } });
605
-
606
- class ModalRefService {
607
- constructor() {
608
- this.modalRefs = [];
609
- }
610
- register(modal) {
611
- this.modalRefs.push(modal);
612
- }
613
- unregister(modal) {
614
- const index = this.modalRefs.indexOf(modal);
615
- if (index > -1) {
616
- this.modalRefs.splice(index, 1);
617
- }
618
- }
619
- dismissAll(mode) {
620
- this.modalRefs.forEach(modal => modal.dismiss(mode));
621
- }
622
- }
623
- ModalRefService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalRefService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
624
- ModalRefService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalRefService, providedIn: 'root' });
625
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalRefService, decorators: [{
626
- type: Injectable,
627
- args: [{ providedIn: 'root' }]
628
- }] });
629
-
630
- class ModalComponent {
631
- constructor(confirmationService, subscription, suppressUnsavedChangesWarningToken, modal, modalRefService) {
632
- this.confirmationService = confirmationService;
633
- this.subscription = subscription;
634
- this.suppressUnsavedChangesWarningToken = suppressUnsavedChangesWarningToken;
635
- this.modal = modal;
636
- this.modalRefService = modalRefService;
637
- this.options = {};
638
- this.suppressUnsavedChangesWarning = this.suppressUnsavedChangesWarningToken;
639
- this.visibleChange = new EventEmitter();
640
- this.init = new EventEmitter();
641
- this.appear = new EventEmitter();
642
- this.disappear = new EventEmitter();
643
- this._visible = false;
644
- this._busy = false;
645
- this.isConfirmationOpen = false;
646
- this.destroy$ = new Subject();
647
- this.modalIdentifier = `modal-${uuid()}`;
648
- this.toggle$ = new Subject();
649
- this.initToggleStream();
650
- }
651
- get visible() {
652
- return this._visible;
653
- }
654
- set visible(value) {
655
- if (typeof value !== 'boolean')
656
- return;
657
- this.toggle$.next(value);
658
- }
659
- get busy() {
660
- return this._busy;
661
- }
662
- set busy(value) {
663
- if (this.abpSubmit && this.abpSubmit instanceof ButtonComponent) {
664
- this.abpSubmit.loading = value;
665
- }
666
- this._busy = value;
667
- }
668
- get modalWindowRef() {
669
- return document.querySelector(`ngb-modal-window.${this.modalIdentifier}`);
670
- }
671
- get isFormDirty() {
672
- var _a;
673
- return Boolean((_a = this.modalWindowRef) === null || _a === void 0 ? void 0 : _a.querySelector('.ng-dirty'));
674
- }
675
- ngOnInit() {
676
- this.modalRefService.register(this);
677
- }
678
- dismiss(mode) {
679
- switch (mode) {
680
- case 'hard':
681
- this.visible = false;
682
- break;
683
- case 'soft':
684
- this.close();
685
- break;
686
- default:
687
- break;
688
- }
689
- }
690
- initToggleStream() {
691
- this.subscription.addOne(this.toggle$.pipe(debounceTime(0), distinctUntilChanged()), value => this.toggle(value));
692
- }
693
- toggle(value) {
694
- var _a;
695
- this._visible = value;
696
- this.visibleChange.emit(value);
697
- if (!value) {
698
- (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.dismiss();
699
- this.disappear.emit();
700
- this.destroy$.next();
701
- return;
702
- }
703
- setTimeout(() => this.listen(), 0);
704
- this.modalRef = this.modal.open(this.modalContent, Object.assign(Object.assign({ size: 'md', centered: false, keyboard: false, scrollable: true, beforeDismiss: () => {
705
- if (!this.visible)
706
- return true;
707
- this.close();
708
- return !this.visible;
709
- } }, this.options), { windowClass: `${this.options.windowClass || ''} ${this.modalIdentifier}` }));
710
- this.appear.emit();
711
- }
712
- ngOnDestroy() {
713
- this.modalRefService.unregister(this);
714
- this.toggle(false);
715
- this.destroy$.next();
716
- }
717
- close() {
718
- if (this.busy)
719
- return;
720
- if (this.isFormDirty && !this.suppressUnsavedChangesWarning) {
721
- if (this.isConfirmationOpen)
722
- return;
723
- this.isConfirmationOpen = true;
724
- this.confirmationService
725
- .warn('AbpUi::AreYouSureYouWantToCancelEditingWarningMessage', 'AbpUi::AreYouSure', { dismissible: false })
726
- .subscribe((status) => {
727
- this.isConfirmationOpen = false;
728
- if (status === Confirmation.Status.confirm) {
729
- this.visible = false;
730
- }
731
- });
732
- }
733
- else {
734
- this.visible = false;
735
- }
736
- }
737
- listen() {
738
- if (this.modalWindowRef) {
739
- fromEvent(this.modalWindowRef, 'keyup')
740
- .pipe(takeUntil(this.destroy$), debounceTime(150), filter((key) => key && key.key === 'Escape' && this.options.keyboard))
741
- .subscribe(() => this.close());
742
- }
743
- fromEvent(window, 'beforeunload')
744
- .pipe(takeUntil(this.destroy$))
745
- .subscribe(event => {
746
- // TODO: check this
747
- if (!this.isFormDirty || this.suppressUnsavedChangesWarning) {
748
- event.preventDefault();
749
- }
750
- });
751
- this.init.emit();
752
- }
753
- }
754
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: [{ token: ConfirmationService }, { token: i2.SubscriptionService }, { token: SUPPRESS_UNSAVED_CHANGES_WARNING, optional: true }, { token: i3.NgbModal }, { token: ModalRefService }], target: i0.ɵɵFactoryTarget.Component });
755
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalComponent, selector: "abp-modal", inputs: { visible: "visible", busy: "busy", options: "options", suppressUnsavedChangesWarning: "suppressUnsavedChangesWarning" }, outputs: { visibleChange: "visibleChange", init: "init", appear: "appear", disappear: "disappear" }, providers: [SubscriptionService], queries: [{ propertyName: "abpHeader", first: true, predicate: ["abpHeader"], descendants: true }, { propertyName: "abpBody", first: true, predicate: ["abpBody"], descendants: true }, { propertyName: "abpFooter", first: true, predicate: ["abpFooter"], descendants: true }, { propertyName: "abpSubmit", first: true, predicate: ButtonComponent, descendants: true, read: ButtonComponent }], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0, template: "<ng-content></ng-content>\r\n\r\n<ng-template #modalContent let-modal>\r\n <div *ngIf=\"abpHeader\" id=\"abp-modal-header\" class=\"modal-header abp-modal-header\">\r\n <ng-container *ngTemplateOutlet=\"abpHeader\"></ng-container>\r\n \u200B\r\n <button\r\n id=\"abp-modal-close-button\"\r\n type=\"button\"\r\n class=\"btn-sm btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss()\"\r\n ></button>\r\n </div>\r\n <div *ngIf=\"abpBody\" id=\"abp-modal-body\" class=\"modal-body\">\r\n <ng-container *ngTemplateOutlet=\"abpBody\"></ng-container>\r\n </div>\r\n <div *ngIf=\"abpFooter\" id=\"abp-modal-footer\" class=\"modal-footer\">\r\n <ng-container *ngTemplateOutlet=\"abpFooter\"></ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, decorators: [{
757
- type: Component,
758
- args: [{ selector: 'abp-modal', providers: [SubscriptionService], template: "<ng-content></ng-content>\r\n\r\n<ng-template #modalContent let-modal>\r\n <div *ngIf=\"abpHeader\" id=\"abp-modal-header\" class=\"modal-header abp-modal-header\">\r\n <ng-container *ngTemplateOutlet=\"abpHeader\"></ng-container>\r\n \u200B\r\n <button\r\n id=\"abp-modal-close-button\"\r\n type=\"button\"\r\n class=\"btn-sm btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss()\"\r\n ></button>\r\n </div>\r\n <div *ngIf=\"abpBody\" id=\"abp-modal-body\" class=\"modal-body\">\r\n <ng-container *ngTemplateOutlet=\"abpBody\"></ng-container>\r\n </div>\r\n <div *ngIf=\"abpFooter\" id=\"abp-modal-footer\" class=\"modal-footer\">\r\n <ng-container *ngTemplateOutlet=\"abpFooter\"></ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".modal.show{display:block!important}.modal-backdrop{opacity:.8}.modal::-webkit-scrollbar{width:7px}.modal::-webkit-scrollbar-track{background:#ddd}.modal::-webkit-scrollbar-thumb{background:#8a8686}.modal-dialog{z-index:1050}\n"] }]
759
- }], ctorParameters: function () {
760
- return [{ type: ConfirmationService }, { type: i2.SubscriptionService }, { type: undefined, decorators: [{
761
- type: Optional
762
- }, {
763
- type: Inject,
764
- args: [SUPPRESS_UNSAVED_CHANGES_WARNING]
765
- }] }, { type: i3.NgbModal }, { type: ModalRefService }];
766
- }, propDecorators: { visible: [{
767
- type: Input
768
- }], busy: [{
769
- type: Input
770
- }], options: [{
771
- type: Input
772
- }], suppressUnsavedChangesWarning: [{
773
- type: Input
774
- }], modalContent: [{
775
- type: ViewChild,
776
- args: ['modalContent']
777
- }], abpHeader: [{
778
- type: ContentChild,
779
- args: ['abpHeader', { static: false }]
780
- }], abpBody: [{
781
- type: ContentChild,
782
- args: ['abpBody', { static: false }]
783
- }], abpFooter: [{
784
- type: ContentChild,
785
- args: ['abpFooter', { static: false }]
786
- }], abpSubmit: [{
787
- type: ContentChild,
788
- args: [ButtonComponent, { static: false, read: ButtonComponent }]
789
- }], visibleChange: [{
790
- type: Output
791
- }], init: [{
792
- type: Output
793
- }], appear: [{
794
- type: Output
795
- }], disappear: [{
796
- type: Output
797
- }] } });
798
-
799
- class ModalCloseDirective {
800
- constructor(modal) {
801
- this.modal = modal;
802
- if (!modal) {
803
- console.error('Please use abpClose within an abp-modal');
804
- }
805
- }
806
- onClick() {
807
- var _a;
808
- (_a = this.modal) === null || _a === void 0 ? void 0 : _a.close();
809
- }
810
- }
811
- ModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalCloseDirective, deps: [{ token: ModalComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
812
- ModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ModalCloseDirective, selector: "[abpClose]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
813
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalCloseDirective, decorators: [{
814
- type: Directive,
815
- args: [{ selector: '[abpClose]' }]
816
- }], ctorParameters: function () {
817
- return [{ type: ModalComponent, decorators: [{
818
- type: Optional
819
- }] }];
820
- }, propDecorators: { onClick: [{
821
- type: HostListener,
822
- args: ['click']
823
- }] } });
824
-
825
- class ToastComponent {
826
- constructor() {
827
- this.remove = new EventEmitter();
828
- }
829
- get severityClass() {
830
- if (!this.toast || !this.toast.severity)
831
- return '';
832
- return `abp-toast-${this.toast.severity}`;
833
- }
834
- get iconClass() {
835
- switch (this.toast.severity) {
836
- case 'success':
837
- return 'fa-check-circle';
838
- case 'info':
839
- return 'fa-info-circle';
840
- case 'warning':
841
- return 'fa-exclamation-triangle';
842
- case 'error':
843
- return 'fa-times-circle';
844
- default:
845
- return 'fa-exclamation-circle';
846
- }
847
- }
848
- ngOnInit() {
849
- const { sticky, life } = this.toast.options || {};
850
- if (sticky)
851
- return;
852
- const timeout = life || 5000;
853
- setTimeout(() => {
854
- this.close();
855
- }, timeout);
856
- }
857
- close() {
858
- var _a;
859
- this.remove.emit((_a = this.toast.options) === null || _a === void 0 ? void 0 : _a.id);
860
- }
861
- tap() {
862
- var _a;
863
- if ((_a = this.toast.options) === null || _a === void 0 ? void 0 : _a.tapToDismiss)
864
- this.close();
865
- }
866
- }
867
- ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
868
- ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToastComponent, selector: "abp-toast", inputs: { toast: "toast" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"fa icon\" [ngClass]=\"iconClass\"></i>\r\n </div>\r\n <div class=\"abp-toast-content\">\r\n <button class=\"abp-toast-close-button\" (click)=\"close()\" *ngIf=\"toast.options?.closable\">\r\n <i class=\"fa fa-times\"></i>\r\n </button>\r\n <div class=\"abp-toast-title\">\r\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\r\n </div>\r\n <p\r\n class=\"abp-toast-message\"\r\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n</div>\r\n", styles: [".abp-toast{display:grid;grid-template-columns:50px 1fr;gap:10px;margin:5px 0;padding:10px;border-radius:0;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e3e3e3;background-color:#e3e3e3;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #51a351;background-color:#51a351;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid #499249;background-color:#499249;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #2f96b4;background-color:#2f96b4;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid #2a85a0;background-color:#2a85a0;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #f89406;background-color:#f89406;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid #df8505;background-color:#df8505;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #bd362f;background-color:#bd362f;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid #a9302a;background-color:#a9302a;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:36px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;word-break:break-word}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:25px;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] });
869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastComponent, decorators: [{
870
- type: Component,
871
- args: [{ selector: 'abp-toast', template: "<div class=\"abp-toast\" [ngClass]=\"severityClass\" (click)=\"tap()\">\r\n <div class=\"abp-toast-icon\">\r\n <i class=\"fa icon\" [ngClass]=\"iconClass\"></i>\r\n </div>\r\n <div class=\"abp-toast-content\">\r\n <button class=\"abp-toast-close-button\" (click)=\"close()\" *ngIf=\"toast.options?.closable\">\r\n <i class=\"fa fa-times\"></i>\r\n </button>\r\n <div class=\"abp-toast-title\">\r\n {{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}\r\n </div>\r\n <p\r\n class=\"abp-toast-message\"\r\n [innerHTML]=\"toast.message | abpLocalization: toast.options?.messageLocalizationParams\"\r\n ></p>\r\n </div>\r\n</div>\r\n", styles: [".abp-toast{display:grid;grid-template-columns:50px 1fr;gap:10px;margin:5px 0;padding:10px;border-radius:0;width:350px;-webkit-user-select:none;user-select:none;z-index:9999;border:2px solid #f0f0f0;background-color:#f0f0f0;color:#000;box-shadow:0 0 10px -5px #0006;opacity:1}.abp-toast:hover{border:2px solid #e3e3e3;background-color:#e3e3e3;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-success{border:2px solid #51a351;background-color:#51a351;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-success:hover{border:2px solid #499249;background-color:#499249;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-info{border:2px solid #2f96b4;background-color:#2f96b4;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-info:hover{border:2px solid #2a85a0;background-color:#2a85a0;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-warning{border:2px solid #f89406;background-color:#f89406;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-warning:hover{border:2px solid #df8505;background-color:#df8505;box-shadow:0 0 15px -5px #0006}.abp-toast.abp-toast-error{border:2px solid #bd362f;background-color:#bd362f;color:#fff;box-shadow:0 0 10px -5px #0006}.abp-toast.abp-toast-error:hover{border:2px solid #a9302a;background-color:#a9302a;box-shadow:0 0 15px -5px #0006}.abp-toast .abp-toast-icon{display:flex;align-items:center;justify-content:center}.abp-toast .abp-toast-icon .icon{font-size:36px}.abp-toast .abp-toast-content{position:relative;display:flex;align-self:center;word-break:break-word}.abp-toast .abp-toast-content .abp-toast-close-button{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 5px 0 0;width:25px;height:25px;border:none;border-radius:50%;background:transparent;color:inherit}.abp-toast .abp-toast-content .abp-toast-close-button:focus{outline:none}.abp-toast .abp-toast-content .abp-toast-title{margin:0;padding:0;font-size:1rem;font-weight:600}.abp-toast .abp-toast-content .abp-toast-message{margin:0;padding:0;max-width:240px}\n"] }]
872
- }], propDecorators: { toast: [{
873
- type: Input
874
- }], remove: [{
875
- type: Output
876
- }] } });
877
-
878
- class ToastContainerComponent {
879
- constructor() {
880
- this.toasts = [];
881
- this.right = '30px';
882
- this.defaultRight = '30px';
883
- this.defaultMobileRight = '0';
884
- this.bottom = '30px';
885
- }
886
- ngOnInit() {
887
- this.setDefaultRight();
888
- this.toasts$.subscribe(toasts => {
889
- this.toasts = this.toastKey
890
- ? toasts.filter(t => {
891
- return t.options && t.options.containerKey !== this.toastKey;
892
- })
893
- : toasts;
894
- });
895
- }
896
- onWindowResize() {
897
- this.setDefaultRight();
898
- }
899
- setDefaultRight() {
900
- const screenWidth = window.innerWidth;
901
- if (screenWidth < 768 && this.right == this.defaultRight) {
902
- this.right = this.defaultMobileRight;
903
- }
904
- }
905
- trackByFunc(index, toast) {
906
- var _a;
907
- if (!toast)
908
- return null;
909
- return (_a = toast.options) === null || _a === void 0 ? void 0 : _a.id;
910
- }
911
- }
912
- ToastContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
913
- ToastContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToastContainerComponent, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n <abp-toast\r\n [toast]=\"toast\"\r\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], animations: [toastInOut] });
914
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerComponent, decorators: [{
915
- type: Component,
916
- args: [{ selector: 'abp-toast-container', animations: [toastInOut], template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n <abp-toast\r\n [toast]=\"toast\"\r\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"] }]
917
- }], propDecorators: { top: [{
918
- type: Input
919
- }], right: [{
920
- type: Input
921
- }], bottom: [{
922
- type: Input
923
- }], left: [{
924
- type: Input
925
- }], toastKey: [{
926
- type: Input
927
- }], onWindowResize: [{
928
- type: HostListener,
929
- args: ['window:resize', ['$event']]
930
- }] } });
931
-
932
- class PasswordComponent extends AbstractNgModelComponent {
933
- constructor(injector) {
934
- super(injector);
935
- }
936
- toggleFieldTextType() {
937
- this.fieldTextType = !this.fieldTextType;
938
- }
939
- }
940
- PasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PasswordComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
941
- PasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PasswordComponent, selector: "abp-password", inputs: { inputId: "inputId", formControlName: "formControlName" }, providers: [
942
- {
943
- provide: NG_VALUE_ACCESSOR,
944
- useExisting: forwardRef(() => PasswordComponent),
945
- multi: true,
946
- },
947
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"input-group\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n class=\"form-control\"\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n />\r\n\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"toggleFieldTextType()\">\r\n <i\r\n class=\"fa\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !fieldTextType,\r\n 'fa-eye': fieldTextType\r\n }\"\r\n ></i>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }] });
948
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PasswordComponent, decorators: [{
949
- type: Component,
950
- args: [{ selector: 'abp-password', providers: [
951
- {
952
- provide: NG_VALUE_ACCESSOR,
953
- useExisting: forwardRef(() => PasswordComponent),
954
- multi: true,
955
- },
956
- ], template: "<div class=\"input-group\" validationTarget>\r\n <input\r\n [type]=\"fieldTextType ? 'text' : 'password'\"\r\n class=\"form-control\"\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n />\r\n\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"toggleFieldTextType()\">\r\n <i\r\n class=\"fa\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !fieldTextType,\r\n 'fa-eye': fieldTextType\r\n }\"\r\n ></i>\r\n </button>\r\n</div>\r\n" }]
957
- }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { inputId: [{
958
- type: Input
959
- }], formControlName: [{
960
- type: Input
961
- }] } });
962
-
963
- class CardBodyComponent {
964
- constructor() {
965
- this.componentClass = 'card-body';
966
- }
967
- }
968
- CardBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
969
- CardBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CardBodyComponent, selector: "abp-card-body", inputs: { cardBodyClass: "cardBodyClass", cardBodyStyle: "cardBodyStyle" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: ` <div [ngClass]="cardBodyClass" [ngStyle]="cardBodyStyle">
970
- <ng-content></ng-content>
971
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardBodyComponent, decorators: [{
973
- type: Component,
974
- args: [{
975
- selector: 'abp-card-body',
976
- template: ` <div [ngClass]="cardBodyClass" [ngStyle]="cardBodyStyle">
977
- <ng-content></ng-content>
978
- </div>`,
979
- }]
980
- }], propDecorators: { componentClass: [{
981
- type: HostBinding,
982
- args: ['class']
983
- }], cardBodyClass: [{
984
- type: Input
985
- }], cardBodyStyle: [{
986
- type: Input
987
- }] } });
988
-
989
- class CardComponent {
990
- }
991
- CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
992
- CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CardComponent, selector: "abp-card", inputs: { cardClass: "cardClass", cardStyle: "cardStyle" }, ngImport: i0, template: ` <div class="card" [ngClass]="cardClass" [ngStyle]="cardStyle">
993
- <ng-content></ng-content>
994
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
995
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardComponent, decorators: [{
996
- type: Component,
997
- args: [{
998
- selector: 'abp-card',
999
- template: ` <div class="card" [ngClass]="cardClass" [ngStyle]="cardStyle">
1000
- <ng-content></ng-content>
1001
- </div>`,
1002
- }]
1003
- }], propDecorators: { cardClass: [{
1004
- type: Input
1005
- }], cardStyle: [{
1006
- type: Input
1007
- }] } });
1008
-
1009
- class CardHeaderComponent {
1010
- constructor() {
1011
- this.componentClass = 'card-header';
1012
- }
1013
- }
1014
- CardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1015
- CardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CardHeaderComponent, selector: "abp-card-header", inputs: { cardHeaderClass: "cardHeaderClass", cardHeaderStyle: "cardHeaderStyle" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: `
1016
- <div [ngClass]="cardHeaderClass" [ngStyle]="cardHeaderStyle">
1017
- <ng-content></ng-content>
1018
- </div>
1019
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1020
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardHeaderComponent, decorators: [{
1021
- type: Component,
1022
- args: [{ selector: 'abp-card-header', template: `
1023
- <div [ngClass]="cardHeaderClass" [ngStyle]="cardHeaderStyle">
1024
- <ng-content></ng-content>
1025
- </div>
1026
- ` }]
1027
- }], propDecorators: { componentClass: [{
1028
- type: HostBinding,
1029
- args: ['class']
1030
- }], cardHeaderClass: [{
1031
- type: Input
1032
- }], cardHeaderStyle: [{
1033
- type: Input
1034
- }] } });
1035
-
1036
- class CardFooterComponent {
1037
- constructor() {
1038
- this.componentClass = 'card-footer';
1039
- }
1040
- }
1041
- CardFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1042
- CardFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CardFooterComponent, selector: "abp-card-footer", inputs: { cardFooterStyle: "cardFooterStyle", cardFooterClass: "cardFooterClass" }, host: { properties: { "class": "this.componentClass" } }, ngImport: i0, template: `
1043
- <div [ngStyle]="cardFooterStyle" [ngClass]="cardFooterClass">
1044
- <ng-content></ng-content>
1045
- </div>
1046
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1047
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardFooterComponent, decorators: [{
1048
- type: Component,
1049
- args: [{ selector: 'abp-card-footer', template: `
1050
- <div [ngStyle]="cardFooterStyle" [ngClass]="cardFooterClass">
1051
- <ng-content></ng-content>
1052
- </div>
1053
- ` }]
1054
- }], propDecorators: { componentClass: [{
1055
- type: HostBinding,
1056
- args: ['class']
1057
- }], cardFooterStyle: [{
1058
- type: Input
1059
- }], cardFooterClass: [{
1060
- type: Input
1061
- }] } });
1062
-
1063
- class CardTitleDirective {
1064
- constructor() {
1065
- this.directiveClass = 'card-title';
1066
- }
1067
- }
1068
- CardTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1069
- CardTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: CardTitleDirective, selector: "abp-card-title, [abp-card-title], [abpCardTitle]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 });
1070
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardTitleDirective, decorators: [{
1071
- type: Directive,
1072
- args: [{
1073
- selector: `abp-card-title, [abp-card-title], [abpCardTitle]`,
1074
- }]
1075
- }], propDecorators: { directiveClass: [{
1076
- type: HostBinding,
1077
- args: ['class']
1078
- }] } });
1079
-
1080
- class CardSubtitleDirective {
1081
- constructor() {
1082
- this.directiveClass = 'card-subtitle';
1083
- }
1084
- }
1085
- CardSubtitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1086
- CardSubtitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: CardSubtitleDirective, selector: "abp-card-subtitle, [abp-card-subtitle], [abpCardSubtitle]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 });
1087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardSubtitleDirective, decorators: [{
1088
- type: Directive,
1089
- args: [{
1090
- selector: `abp-card-subtitle, [abp-card-subtitle], [abpCardSubtitle]`,
1091
- }]
1092
- }], propDecorators: { directiveClass: [{
1093
- type: HostBinding,
1094
- args: ['class']
1095
- }] } });
1096
-
1097
- class CardImgTopDirective {
1098
- constructor() {
1099
- this.directiveClass = 'card-img-top';
1100
- }
1101
- }
1102
- CardImgTopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardImgTopDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1103
- CardImgTopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: CardImgTopDirective, selector: "abp-card-img-top, [abp-card-img-top], [abpCardImgTop]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 });
1104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardImgTopDirective, decorators: [{
1105
- type: Directive,
1106
- args: [{
1107
- selector: `abp-card-img-top, [abp-card-img-top], [abpCardImgTop]`,
1108
- }]
1109
- }], propDecorators: { directiveClass: [{
1110
- type: HostBinding,
1111
- args: ['class']
1112
- }] } });
1113
-
1114
- class CardHeaderDirective {
1115
- constructor() {
1116
- this.directiveClass = 'card-header';
1117
- }
1118
- }
1119
- CardHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1120
- CardHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: CardHeaderDirective, selector: "abp-card-header, [abp-card-header], [abpCardHeader]", host: { properties: { "class": "this.directiveClass" } }, ngImport: i0 });
1121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardHeaderDirective, decorators: [{
1122
- type: Directive,
1123
- args: [{
1124
- selector: `abp-card-header, [abp-card-header], [abpCardHeader]`,
1125
- }]
1126
- }], propDecorators: { directiveClass: [{
1127
- type: HostBinding,
1128
- args: ['class']
1129
- }] } });
1130
-
1131
- const declarationsWithExports$1 = [
1132
- CardComponent,
1133
- CardBodyComponent,
1134
- CardHeaderComponent,
1135
- CardFooterComponent,
1136
- CardTitleDirective,
1137
- CardSubtitleDirective,
1138
- CardImgTopDirective,
1139
- CardHeaderDirective,
1140
- ];
1141
- class CardModule {
1142
- }
1143
- CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1144
- CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: CardModule, declarations: [CardComponent,
1145
- CardBodyComponent,
1146
- CardHeaderComponent,
1147
- CardFooterComponent,
1148
- CardTitleDirective,
1149
- CardSubtitleDirective,
1150
- CardImgTopDirective,
1151
- CardHeaderDirective], imports: [CommonModule], exports: [CardComponent,
1152
- CardBodyComponent,
1153
- CardHeaderComponent,
1154
- CardFooterComponent,
1155
- CardTitleDirective,
1156
- CardSubtitleDirective,
1157
- CardImgTopDirective,
1158
- CardHeaderDirective] });
1159
- CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardModule, imports: [CommonModule] });
1160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardModule, decorators: [{
1161
- type: NgModule,
1162
- args: [{
1163
- declarations: [...declarationsWithExports$1],
1164
- imports: [CommonModule],
1165
- exports: [...declarationsWithExports$1],
1166
- }]
1167
- }] });
1168
-
1169
- class FormCheckboxComponent extends AbstractNgModelComponent {
1170
- constructor(injector) {
1171
- super(injector);
1172
- this.labelClass = 'form-check-label';
1173
- this.checkboxClass = 'form-check-input';
1174
- this.checkboxReadonly = false;
1175
- this.checkboxBlur = new EventEmitter();
1176
- this.checkboxFocus = new EventEmitter();
1177
- }
1178
- }
1179
- FormCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FormCheckboxComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1180
- FormCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: FormCheckboxComponent, selector: "abp-checkbox", inputs: { label: "label", labelClass: "labelClass", checkboxId: "checkboxId", checkboxStyle: "checkboxStyle", checkboxClass: "checkboxClass", checkboxReadonly: "checkboxReadonly" }, outputs: { checkboxBlur: "checkboxBlur", checkboxFocus: "checkboxFocus" }, providers: [
1181
- {
1182
- provide: NG_VALUE_ACCESSOR,
1183
- useExisting: forwardRef(() => FormCheckboxComponent),
1184
- multi: true,
1185
- },
1186
- ], usesInheritance: true, ngImport: i0, template: `
1187
- <div class="mb-3">
1188
- <input
1189
- type="checkbox"
1190
- [(ngModel)]="value"
1191
- [id]="checkboxId"
1192
- [readonly]="checkboxReadonly"
1193
- [ngClass]="checkboxClass"
1194
- [ngStyle]="checkboxStyle"
1195
- (blur)="checkboxBlur.next()"
1196
- (focus)="checkboxFocus.next()"
1197
- />
1198
- <label *ngIf="label" [ngClass]="labelClass" [for]="checkboxId">
1199
- {{ label | abpLocalization }}
1200
- </label>
1201
- </div>
1202
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] });
1203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FormCheckboxComponent, decorators: [{
1204
- type: Component,
1205
- args: [{
1206
- selector: 'abp-checkbox',
1207
- template: `
1208
- <div class="mb-3">
1209
- <input
1210
- type="checkbox"
1211
- [(ngModel)]="value"
1212
- [id]="checkboxId"
1213
- [readonly]="checkboxReadonly"
1214
- [ngClass]="checkboxClass"
1215
- [ngStyle]="checkboxStyle"
1216
- (blur)="checkboxBlur.next()"
1217
- (focus)="checkboxFocus.next()"
1218
- />
1219
- <label *ngIf="label" [ngClass]="labelClass" [for]="checkboxId">
1220
- {{ label | abpLocalization }}
1221
- </label>
1222
- </div>
1223
- `,
1224
- providers: [
1225
- {
1226
- provide: NG_VALUE_ACCESSOR,
1227
- useExisting: forwardRef(() => FormCheckboxComponent),
1228
- multi: true,
1229
- },
1230
- ],
1231
- }]
1232
- }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { label: [{
1233
- type: Input
1234
- }], labelClass: [{
1235
- type: Input
1236
- }], checkboxId: [{
1237
- type: Input
1238
- }], checkboxStyle: [{
1239
- type: Input
1240
- }], checkboxClass: [{
1241
- type: Input
1242
- }], checkboxReadonly: [{
1243
- type: Input
1244
- }], checkboxBlur: [{
1245
- type: Output
1246
- }], checkboxFocus: [{
1247
- type: Output
1248
- }] } });
1249
-
1250
- class FormInputComponent extends AbstractNgModelComponent {
1251
- constructor(injector) {
1252
- super(injector);
1253
- this.inputReadonly = false;
1254
- this.label = '';
1255
- this.labelClass = 'form-label';
1256
- this.inputPlaceholder = '';
1257
- this.inputClass = 'form-control';
1258
- this.formBlur = new EventEmitter();
1259
- this.formFocus = new EventEmitter();
1260
- }
1261
- }
1262
- FormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FormInputComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1263
- FormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: FormInputComponent, selector: "abp-form-input", inputs: { inputId: "inputId", inputReadonly: "inputReadonly", label: "label", labelClass: "labelClass", inputPlaceholder: "inputPlaceholder", inputStyle: "inputStyle", inputClass: "inputClass" }, outputs: { formBlur: "formBlur", formFocus: "formFocus" }, providers: [
1264
- {
1265
- provide: NG_VALUE_ACCESSOR,
1266
- useExisting: forwardRef(() => FormInputComponent),
1267
- multi: true,
1268
- },
1269
- ], usesInheritance: true, ngImport: i0, template: `
1270
- <div class="mb-3">
1271
- <label *ngIf="label" [ngClass]="labelClass" [for]="inputId">
1272
- {{ label | abpLocalization }}
1273
- </label>
1274
- <input
1275
- type="text"
1276
- [id]="inputId"
1277
- [placeholder]="inputPlaceholder"
1278
- [readonly]="inputReadonly"
1279
- [ngClass]="inputClass"
1280
- [ngStyle]="inputStyle"
1281
- (blur)="formBlur.next()"
1282
- (focus)="formFocus.next()"
1283
- [(ngModel)]="value"
1284
- />
1285
- </div>
1286
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] });
1287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FormInputComponent, decorators: [{
1288
- type: Component,
1289
- args: [{
1290
- selector: 'abp-form-input',
1291
- template: `
1292
- <div class="mb-3">
1293
- <label *ngIf="label" [ngClass]="labelClass" [for]="inputId">
1294
- {{ label | abpLocalization }}
1295
- </label>
1296
- <input
1297
- type="text"
1298
- [id]="inputId"
1299
- [placeholder]="inputPlaceholder"
1300
- [readonly]="inputReadonly"
1301
- [ngClass]="inputClass"
1302
- [ngStyle]="inputStyle"
1303
- (blur)="formBlur.next()"
1304
- (focus)="formFocus.next()"
1305
- [(ngModel)]="value"
1306
- />
1307
- </div>
1308
- `,
1309
- providers: [
1310
- {
1311
- provide: NG_VALUE_ACCESSOR,
1312
- useExisting: forwardRef(() => FormInputComponent),
1313
- multi: true,
1314
- },
1315
- ],
1316
- }]
1317
- }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { inputId: [{
1318
- type: Input
1319
- }], inputReadonly: [{
1320
- type: Input
1321
- }], label: [{
1322
- type: Input
1323
- }], labelClass: [{
1324
- type: Input
1325
- }], inputPlaceholder: [{
1326
- type: Input
1327
- }], inputStyle: [{
1328
- type: Input
1329
- }], inputClass: [{
1330
- type: Input
1331
- }], formBlur: [{
1332
- type: Output
1333
- }], formFocus: [{
1334
- type: Output
1335
- }] } });
1336
-
1337
- const DEFAULT_VALIDATION_BLUEPRINTS = {
1338
- creditCard: 'AbpValidation::ThisFieldIsNotAValidCreditCardNumber.',
1339
- email: 'AbpValidation::ThisFieldIsNotAValidEmailAddress.',
1340
- invalid: 'AbpValidation::ThisFieldIsNotValid.',
1341
- max: 'AbpValidation::ThisFieldMustBeLessOrEqual{0}[{{ max }}]',
1342
- maxlength: 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}[{{ requiredLength }}]',
1343
- min: 'AbpValidation::ThisFieldMustBeGreaterThanOrEqual{0}[{{ min }}]',
1344
- minlength: 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}[{{ requiredLength }}]',
1345
- ngbDate: 'AbpValidation::ThisFieldIsNotValid.',
1346
- passwordMismatch: 'AbpIdentity::Volo.Abp.Identity:PasswordConfirmationFailed',
1347
- range: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]',
1348
- required: 'AbpValidation::ThisFieldIsRequired.',
1349
- url: 'AbpValidation::ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl',
1350
- passwordRequiresLower: 'AbpIdentity::Volo.Abp.Identity:PasswordRequiresLower',
1351
- passwordRequiresUpper: 'AbpIdentity::Volo.Abp.Identity:PasswordRequiresUpper',
1352
- passwordRequiresDigit: 'AbpIdentity::Volo.Abp.Identity:PasswordRequiresDigit',
1353
- passwordRequiresNonAlphanumeric: 'AbpIdentity::Volo.Abp.Identity:PasswordRequiresNonAlphanumeric',
1354
- usernamePattern: 'AbpIdentity::Volo.Abp.Identity:InvalidUserName[{{ actualValue }}]',
1355
- };
1356
-
1357
- class EllipsisDirective {
1358
- constructor(cdRef, elRef) {
1359
- this.cdRef = cdRef;
1360
- this.elRef = elRef;
1361
- this.enabled = true;
1362
- }
1363
- get inlineClass() {
1364
- return this.enabled && this.width;
1365
- }
1366
- get class() {
1367
- return this.enabled && !this.width;
1368
- }
1369
- get maxWidth() {
1370
- return this.enabled && this.width ? this.width || '170px' : undefined;
1371
- }
1372
- ngAfterViewInit() {
1373
- this.title = this.title || this.elRef.nativeElement.innerText;
1374
- this.cdRef.detectChanges();
1375
- }
1376
- }
1377
- EllipsisDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EllipsisDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1378
- EllipsisDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: EllipsisDirective, selector: "[abpEllipsis]", inputs: { width: ["abpEllipsis", "width"], title: "title", enabled: ["abpEllipsisEnabled", "enabled"] }, host: { properties: { "title": "this.title", "class.abp-ellipsis-inline": "this.inlineClass", "class.abp-ellipsis": "this.class", "style.max-width": "this.maxWidth" } }, ngImport: i0 });
1379
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EllipsisDirective, decorators: [{
1380
- type: Directive,
1381
- args: [{
1382
- selector: '[abpEllipsis]',
1383
- }]
1384
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
1385
- type: Input,
1386
- args: ['abpEllipsis']
1387
- }], title: [{
1388
- type: HostBinding,
1389
- args: ['title']
1390
- }, {
1391
- type: Input
1392
- }], enabled: [{
1393
- type: Input,
1394
- args: ['abpEllipsisEnabled']
1395
- }], inlineClass: [{
1396
- type: HostBinding,
1397
- args: ['class.abp-ellipsis-inline']
1398
- }], class: [{
1399
- type: HostBinding,
1400
- args: ['class.abp-ellipsis']
1401
- }], maxWidth: [{
1402
- type: HostBinding,
1403
- args: ['style.max-width']
1404
- }] } });
1405
- class EllipsisModule {
1406
- }
1407
- EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1408
- EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: EllipsisModule, declarations: [EllipsisDirective], exports: [EllipsisDirective] });
1409
- EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EllipsisModule });
1410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EllipsisModule, decorators: [{
1411
- type: NgModule,
1412
- args: [{
1413
- exports: [EllipsisDirective],
1414
- declarations: [EllipsisDirective],
1415
- }]
1416
- }] });
1417
-
1418
- class LoadingDirective {
1419
- constructor(elRef, vcRef, cdRes, injector, renderer) {
1420
- this.elRef = elRef;
1421
- this.vcRef = vcRef;
1422
- this.cdRes = cdRes;
1423
- this.injector = injector;
1424
- this.renderer = renderer;
1425
- this.position = 'relative';
1426
- this.delay = 0;
1427
- this.rootNode = null;
1428
- this.timerSubscription = null;
1429
- }
1430
- get loading() {
1431
- return this._loading;
1432
- }
1433
- set loading(newValue) {
1434
- setTimeout(() => {
1435
- if (!newValue && this.timerSubscription) {
1436
- this.timerSubscription.unsubscribe();
1437
- this.timerSubscription = null;
1438
- this._loading = newValue;
1439
- if (this.rootNode) {
1440
- this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1441
- this.rootNode = null;
1442
- }
1443
- return;
1444
- }
1445
- this.timerSubscription = timer(this.delay)
1446
- .pipe(take(1))
1447
- .subscribe(() => {
1448
- var _a;
1449
- if (!this.componentRef) {
1450
- this.componentRef = this.cdRes
1451
- .resolveComponentFactory(LoadingComponent)
1452
- .create(this.injector);
1453
- }
1454
- if (newValue && !this.rootNode) {
1455
- this.rootNode = this.componentRef.hostView.rootNodes[0];
1456
- (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.appendChild(this.rootNode);
1457
- }
1458
- else if (this.rootNode) {
1459
- this.renderer.removeChild(this.rootNode.parentElement, this.rootNode);
1460
- this.rootNode = null;
1461
- }
1462
- this._loading = newValue;
1463
- this.timerSubscription = null;
1464
- });
1465
- }, 0);
1466
- }
1467
- ngOnInit() {
1468
- if (!this.targetElement) {
1469
- const { offsetHeight, offsetWidth } = this.elRef.nativeElement;
1470
- if (!offsetHeight && !offsetWidth && this.elRef.nativeElement.children.length) {
1471
- this.targetElement = this.elRef.nativeElement.children[0];
1472
- }
1473
- else {
1474
- this.targetElement = this.elRef.nativeElement;
1475
- }
1476
- }
1477
- }
1478
- ngOnDestroy() {
1479
- if (this.timerSubscription) {
1480
- this.timerSubscription.unsubscribe();
1481
- }
1482
- }
1483
- }
1484
- LoadingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1485
- LoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: LoadingDirective, selector: "[abpLoading]", inputs: { loading: ["abpLoading", "loading"], targetElement: ["abpLoadingTargetElement", "targetElement"], delay: ["abpLoadingDelay", "delay"] }, host: { properties: { "style.position": "this.position" } }, ngImport: i0 });
1486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoadingDirective, decorators: [{
1487
- type: Directive,
1488
- args: [{ selector: '[abpLoading]' }]
1489
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.Renderer2 }]; }, propDecorators: { position: [{
1490
- type: HostBinding,
1491
- args: ['style.position']
1492
- }], loading: [{
1493
- type: Input,
1494
- args: ['abpLoading']
1495
- }], targetElement: [{
1496
- type: Input,
1497
- args: ['abpLoadingTargetElement']
1498
- }], delay: [{
1499
- type: Input,
1500
- args: ['abpLoadingDelay']
1501
- }] } });
1502
-
1503
- class NgxDatatableDefaultDirective {
1504
- constructor(table, document) {
1505
- this.table = table;
1506
- this.document = document;
1507
- this.subscription = new Subscription();
1508
- this.resizeDiff = 0;
1509
- this.class = 'material bordered';
1510
- this.table.columnMode = ColumnMode.force;
1511
- this.table.footerHeight = 50;
1512
- this.table.headerHeight = 50;
1513
- this.table.rowHeight = 'auto';
1514
- this.table.scrollbarH = true;
1515
- this.table.virtualization = false;
1516
- }
1517
- get classes() {
1518
- return `ngx-datatable ${this.class}`;
1519
- }
1520
- fixHorizontalGap(scroller) {
1521
- const { body, documentElement } = this.document;
1522
- if (documentElement.scrollHeight !== documentElement.clientHeight) {
1523
- if (this.resizeDiff === 0) {
1524
- this.resizeDiff = window.innerWidth - body.offsetWidth;
1525
- scroller.scrollWidth -= this.resizeDiff;
1526
- }
1527
- }
1528
- else {
1529
- scroller.scrollWidth += this.resizeDiff;
1530
- this.resizeDiff = 0;
1531
- }
1532
- }
1533
- fixStyleOnWindowResize() {
1534
- // avoided @HostListener('window:resize') in favor of performance
1535
- const subscription = fromEvent(window, 'resize')
1536
- .pipe(debounceTime(500))
1537
- .subscribe(() => {
1538
- const { scroller } = this.table.bodyComponent;
1539
- if (!scroller)
1540
- return;
1541
- this.fixHorizontalGap(scroller);
1542
- });
1543
- this.subscription.add(subscription);
1544
- }
1545
- ngAfterViewInit() {
1546
- this.fixStyleOnWindowResize();
1547
- }
1548
- ngOnDestroy() {
1549
- this.subscription.unsubscribe();
1550
- }
1551
- }
1552
- NgxDatatableDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxDatatableDefaultDirective, deps: [{ token: i1$2.DatatableComponent }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
1553
- NgxDatatableDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: { class: "class" }, host: { properties: { "class": "this.classes" } }, exportAs: ["ngxDatatableDefault"], ngImport: i0 });
1554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxDatatableDefaultDirective, decorators: [{
1555
- type: Directive,
1556
- args: [{
1557
- // eslint-disable-next-line @angular-eslint/directive-selector
1558
- selector: 'ngx-datatable[default]',
1559
- exportAs: 'ngxDatatableDefault',
1560
- }]
1561
- }], ctorParameters: function () {
1562
- return [{ type: i1$2.DatatableComponent }, { type: undefined, decorators: [{
1563
- type: Inject,
1564
- args: [DOCUMENT]
1565
- }] }];
1566
- }, propDecorators: { class: [{
1567
- type: Input
1568
- }], classes: [{
1569
- type: HostBinding,
1570
- args: ['class']
1571
- }] } });
1572
-
1573
- const defaultNgxDatatableMessages = {
1574
- emptyMessage: 'AbpUi::NoDataAvailableInDatatable',
1575
- totalMessage: 'AbpUi::Total',
1576
- selectedMessage: 'AbpUi::Selected',
1577
- };
1578
- const NGX_DATATABLE_MESSAGES = new InjectionToken('NGX_DATATABLE_MESSAGES');
1579
-
1580
- class NgxDatatableListDirective {
1581
- constructor(table, cdRef, localizationService, ngxDatatableMessages) {
1582
- this.table = table;
1583
- this.cdRef = cdRef;
1584
- this.localizationService = localizationService;
1585
- this.ngxDatatableMessages = ngxDatatableMessages;
1586
- this.subscription = new Subscription();
1587
- this.querySubscription = new Subscription();
1588
- this.setInitialValues();
1589
- }
1590
- setInitialValues() {
1591
- this.table.externalPaging = true;
1592
- this.table.externalSorting = true;
1593
- const { emptyMessage, selectedMessage, totalMessage } = this.ngxDatatableMessages || defaultNgxDatatableMessages;
1594
- this.table.messages = {
1595
- emptyMessage: this.localizationService.instant(emptyMessage),
1596
- totalMessage: this.localizationService.instant(totalMessage),
1597
- selectedMessage: this.localizationService.instant(selectedMessage),
1598
- };
1599
- }
1600
- subscribeToPage() {
1601
- const sub = this.table.page.subscribe(({ offset }) => {
1602
- this.list.page = offset;
1603
- this.table.offset = offset;
1604
- });
1605
- this.subscription.add(sub);
1606
- }
1607
- subscribeToSort() {
1608
- const sub = this.table.sort.subscribe(({ sorts: [{ prop, dir }] }) => {
1609
- if (prop === this.list.sortKey && this.list.sortOrder === 'desc') {
1610
- this.list.sortKey = '';
1611
- this.list.sortOrder = '';
1612
- this.table.sorts = [];
1613
- this.cdRef.detectChanges();
1614
- }
1615
- else {
1616
- this.list.sortKey = prop;
1617
- this.list.sortOrder = dir;
1618
- }
1619
- });
1620
- this.subscription.add(sub);
1621
- }
1622
- subscribeToQuery() {
1623
- if (!this.querySubscription.closed)
1624
- this.querySubscription.unsubscribe();
1625
- this.querySubscription = this.list.query$.subscribe(() => {
1626
- const offset = this.list.page;
1627
- if (this.table.offset !== offset)
1628
- this.table.offset = offset;
1629
- });
1630
- }
1631
- ngOnChanges({ list }) {
1632
- this.subscribeToQuery();
1633
- if (!list.firstChange)
1634
- return;
1635
- const { maxResultCount, page } = list.currentValue;
1636
- this.table.limit = maxResultCount;
1637
- this.table.offset = page;
1638
- }
1639
- ngOnDestroy() {
1640
- this.subscription.unsubscribe();
1641
- this.querySubscription.unsubscribe();
1642
- }
1643
- ngOnInit() {
1644
- this.subscribeToPage();
1645
- this.subscribeToSort();
1646
- }
1647
- }
1648
- NgxDatatableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxDatatableListDirective, deps: [{ token: i1$2.DatatableComponent }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }, { token: NGX_DATATABLE_MESSAGES, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1649
- NgxDatatableListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: { list: "list" }, exportAs: ["ngxDatatableList"], usesOnChanges: true, ngImport: i0 });
1650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxDatatableListDirective, decorators: [{
1651
- type: Directive,
1652
- args: [{
1653
- // eslint-disable-next-line @angular-eslint/directive-selector
1654
- selector: 'ngx-datatable[list]',
1655
- exportAs: 'ngxDatatableList',
1656
- }]
1657
- }], ctorParameters: function () {
1658
- return [{ type: i1$2.DatatableComponent }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }, { type: undefined, decorators: [{
1659
- type: Optional
1660
- }, {
1661
- type: Inject,
1662
- args: [NGX_DATATABLE_MESSAGES]
1663
- }] }];
1664
- }, propDecorators: { list: [{
1665
- type: Input
1666
- }] } });
1667
-
1668
- class AbpVisibleDirective {
1669
- constructor(viewContainerRef, templateRef) {
1670
- this.viewContainerRef = viewContainerRef;
1671
- this.templateRef = templateRef;
1672
- this.condition$ = of(false);
1673
- }
1674
- set abpVisible(value) {
1675
- this.condition$ = checkType(value);
1676
- this.subscribeToCondition();
1677
- }
1678
- ngOnInit() {
1679
- this.updateVisibility();
1680
- }
1681
- ngOnDestroy() {
1682
- var _a;
1683
- (_a = this.conditionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1684
- }
1685
- subscribeToCondition() {
1686
- this.conditionSubscription = this.condition$.subscribe(value => {
1687
- this.isVisible = value;
1688
- this.updateVisibility();
1689
- });
1690
- }
1691
- updateVisibility() {
1692
- this.viewContainerRef.clear();
1693
- // it should be false not falsy
1694
- if (this.isVisible === false) {
1695
- return;
1696
- }
1697
- this.viewContainerRef.createEmbeddedView(this.templateRef);
1698
- }
1699
- }
1700
- AbpVisibleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpVisibleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1701
- AbpVisibleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: AbpVisibleDirective, selector: "[abpVisible]", inputs: { abpVisible: "abpVisible" }, ngImport: i0 });
1702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpVisibleDirective, decorators: [{
1703
- type: Directive,
1704
- args: [{
1705
- selector: '[abpVisible]',
1706
- }]
1707
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { abpVisible: [{
1708
- type: Input
1709
- }] } });
1710
- function checkType(value) {
1711
- if (value instanceof Promise) {
1712
- return from(value);
1713
- }
1714
- else if (value instanceof Observable) {
1715
- return value;
1716
- }
1717
- else if (typeof value === 'boolean') {
1718
- return of(value);
1719
- }
1720
- else if (value === undefined || value === null) {
1721
- return of(true);
1722
- }
1723
- else {
1724
- return EMPTY;
1725
- }
1726
- }
1727
-
1728
- var eFormComponets;
1729
- (function (eFormComponets) {
1730
- eFormComponets["FormInputComponent"] = "FormInputComponent";
1731
- eFormComponets["FormCheckboxComponent"] = "FormCheckboxComponent";
1732
- })(eFormComponets || (eFormComponets = {}));
1733
-
1734
- class DocumentDirHandlerService {
1735
- constructor(injector) {
1736
- this.injector = injector;
1737
- this.dir = new BehaviorSubject('ltr');
1738
- this.dir$ = this.dir.asObservable();
1739
- this.listenToLanguageChanges();
1740
- }
1741
- listenToLanguageChanges() {
1742
- const l10n = this.injector.get(LocalizationService);
1743
- // will always listen, no need to unsubscribe
1744
- l10n.currentLang$.pipe(map(locale => getLocaleDirection(locale))).subscribe(dir => {
1745
- this.dir.next(dir);
1746
- this.setBodyDir(dir);
1747
- });
1748
- }
1749
- setBodyDir(dir) {
1750
- document.body.dir = dir;
1751
- document.dir = dir;
1752
- }
1753
- }
1754
- DocumentDirHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DocumentDirHandlerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1755
- DocumentDirHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DocumentDirHandlerService });
1756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DocumentDirHandlerService, decorators: [{
1757
- type: Injectable
1758
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1759
-
1760
- function httpErrorConfigFactory(config = {}) {
1761
- if (config.errorScreen && config.errorScreen.component && !config.errorScreen.forWhichErrors) {
1762
- config.errorScreen.forWhichErrors = [401, 403, 404, 500];
1763
- }
1764
- return Object.assign({ skipHandledErrorCodes: [], errorScreen: {} }, config);
1765
- }
1766
- const HTTP_ERROR_CONFIG = new InjectionToken('HTTP_ERROR_CONFIG');
1767
- const HTTP_ERROR_HANDLER = new InjectionToken('HTTP_ERROR_HANDLER');
1768
-
1769
- const DEFAULT_ERROR_MESSAGES = {
1770
- defaultError: {
1771
- title: 'An error has occurred!',
1772
- details: 'Error detail not sent by server.',
1773
- },
1774
- defaultError401: {
1775
- title: 'You are not authenticated!',
1776
- details: 'You should be authenticated (sign in) in order to perform this operation.',
1777
- },
1778
- defaultError403: {
1779
- title: 'You are not authorized!',
1780
- details: 'You are not allowed to perform this operation.',
1781
- },
1782
- defaultError404: {
1783
- title: 'Resource not found!',
1784
- details: 'The resource requested could not found on the server.',
1785
- },
1786
- defaultError500: {
1787
- title: 'Internal server error',
1788
- details: 'Error detail not sent by server.',
1789
- },
1790
- };
1791
- const DEFAULT_ERROR_LOCALIZATIONS = {
1792
- defaultError: {
1793
- title: 'AbpUi::DefaultErrorMessage',
1794
- details: 'AbpUi::DefaultErrorMessageDetail',
1795
- },
1796
- defaultError401: {
1797
- title: 'AbpUi::DefaultErrorMessage401',
1798
- details: 'AbpUi::DefaultErrorMessage401Detail',
1799
- },
1800
- defaultError403: {
1801
- title: 'AbpUi::DefaultErrorMessage403',
1802
- details: 'AbpUi::DefaultErrorMessage403Detail',
1803
- },
1804
- defaultError404: {
1805
- title: 'AbpUi::DefaultErrorMessage404',
1806
- details: 'AbpUi::DefaultErrorMessage404Detail',
1807
- },
1808
- defaultError500: {
1809
- title: 'AbpUi::500Message',
1810
- details: 'AbpUi::DefaultErrorMessage',
1811
- },
1812
- };
1813
- class ErrorHandler {
1814
- constructor(injector) {
1815
- this.injector = injector;
1816
- this.componentRef = null;
1817
- this.httpErrorHandler = this.injector.get(HTTP_ERROR_HANDLER, (_, err) => throwError(err));
1818
- this.executeErrorHandler = (error) => {
1819
- const returnValue = this.httpErrorHandler(this.injector, error);
1820
- return (returnValue instanceof Observable ? returnValue : of(null)).pipe(catchError(err => {
1821
- this.handleError(err);
1822
- return of(null);
1823
- }));
1824
- };
1825
- this.filterRestErrors = ({ status }) => {
1826
- if (typeof status !== 'number')
1827
- return false;
1828
- return (!!this.httpErrorConfig.skipHandledErrorCodes &&
1829
- this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0);
1830
- };
1831
- this.filterRouteErrors = (navigationError) => {
1832
- var _a, _b;
1833
- return (((_b = (_a = navigationError.error) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.indexOf('Cannot match')) > -1 &&
1834
- !!this.httpErrorConfig.skipHandledErrorCodes &&
1835
- this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0);
1836
- };
1837
- this.httpErrorReporter = injector.get(HttpErrorReporterService);
1838
- this.routerEvents = injector.get(RouterEvents);
1839
- this.confirmationService = injector.get(ConfirmationService);
1840
- this.cfRes = injector.get(ComponentFactoryResolver);
1841
- this.rendererFactory = injector.get(RendererFactory2);
1842
- this.httpErrorConfig = injector.get('HTTP_ERROR_CONFIG');
1843
- this.authService = this.injector.get(AuthService);
1844
- this.listenToRestError();
1845
- this.listenToRouterError();
1846
- this.listenToRouterDataResolved();
1847
- }
1848
- listenToRouterError() {
1849
- this.routerEvents
1850
- .getNavigationEvents('Error')
1851
- .pipe(filter(this.filterRouteErrors))
1852
- .subscribe(() => this.show404Page());
1853
- }
1854
- listenToRouterDataResolved() {
1855
- this.routerEvents
1856
- .getEvents(ResolveEnd)
1857
- .pipe(filter(() => !!this.componentRef))
1858
- .subscribe(() => {
1859
- var _a;
1860
- (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
1861
- this.componentRef = null;
1862
- });
1863
- }
1864
- listenToRestError() {
1865
- this.httpErrorReporter.reporter$
1866
- .pipe(filter(this.filterRestErrors), switchMap(this.executeErrorHandler))
1867
- .subscribe();
1868
- }
1869
- handleError(err) {
1870
- var _a;
1871
- const body = ((_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.error) || {
1872
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1873
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1874
- };
1875
- if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) {
1876
- const confirmation$ = this.showErrorWithRequestBody(body);
1877
- if (err.status === 401) {
1878
- confirmation$.subscribe(() => {
1879
- this.navigateToLogin();
1880
- });
1881
- }
1882
- }
1883
- if (err instanceof HttpErrorResponse && err.headers.get('Abp-Tenant-Resolve-Error')) {
1884
- this.authService.logout().subscribe();
1885
- }
1886
- else {
1887
- switch (err.status) {
1888
- case 401:
1889
- this.canCreateCustomError(401)
1890
- ? this.show401Page()
1891
- : this.showError({
1892
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.title,
1893
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title,
1894
- }, {
1895
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.details,
1896
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.details,
1897
- }).subscribe(() => this.navigateToLogin());
1898
- break;
1899
- case 403:
1900
- this.createErrorComponent({
1901
- title: {
1902
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError403.title,
1903
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.title,
1904
- },
1905
- details: {
1906
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError403.details,
1907
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError403.details,
1908
- },
1909
- status: 403,
1910
- });
1911
- break;
1912
- case 404: {
1913
- this.canCreateCustomError(404)
1914
- ? this.show404Page()
1915
- : this.showError({
1916
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.details,
1917
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.details,
1918
- }, {
1919
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1920
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1921
- });
1922
- break;
1923
- }
1924
- case 500:
1925
- this.createErrorComponent({
1926
- title: {
1927
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError500.title,
1928
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.title,
1929
- },
1930
- details: {
1931
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError500.details,
1932
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError500.details,
1933
- },
1934
- status: 500,
1935
- });
1936
- break;
1937
- case 0:
1938
- if (err.statusText === 'Unknown Error') {
1939
- this.createErrorComponent({
1940
- title: {
1941
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1942
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1943
- },
1944
- details: err.message,
1945
- isHomeShow: false,
1946
- });
1947
- }
1948
- break;
1949
- default:
1950
- this.showError({
1951
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.details,
1952
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.details,
1953
- }, {
1954
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1955
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1956
- });
1957
- break;
1958
- }
1959
- }
1960
- }
1961
- show401Page() {
1962
- this.createErrorComponent({
1963
- title: {
1964
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError401.title,
1965
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError401.title,
1966
- },
1967
- status: 401,
1968
- });
1969
- }
1970
- show404Page() {
1971
- this.createErrorComponent({
1972
- title: {
1973
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
1974
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
1975
- },
1976
- status: 404,
1977
- });
1978
- }
1979
- showErrorWithRequestBody(body) {
1980
- let message;
1981
- let title;
1982
- if (body.details) {
1983
- message = body.details;
1984
- title = body.message;
1985
- }
1986
- else if (body.message) {
1987
- title = {
1988
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1989
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1990
- };
1991
- message = body.message;
1992
- }
1993
- else {
1994
- message = body.message || {
1995
- key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
1996
- defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
1997
- };
1998
- title = '';
1999
- }
2000
- return this.showError(message, title);
2001
- }
2002
- showError(message, title) {
2003
- return this.confirmationService.error(message, title, {
2004
- hideCancelBtn: true,
2005
- yesText: 'AbpAccount::Close',
2006
- });
2007
- }
2008
- navigateToLogin() {
2009
- this.authService.navigateToLogin();
2010
- }
2011
- createErrorComponent(instance) {
2012
- var _a, _b;
2013
- const renderer = this.rendererFactory.createRenderer(null, null);
2014
- const host = renderer.selectRootElement(document.body, true);
2015
- this.componentRef = this.cfRes
2016
- .resolveComponentFactory(HttpErrorWrapperComponent)
2017
- .create(this.injector);
2018
- for (const key in instance) {
2019
- /* istanbul ignore else */
2020
- if (Object.prototype.hasOwnProperty.call(this.componentRef.instance, key)) {
2021
- this.componentRef.instance[key] = instance[key];
2022
- }
2023
- }
2024
- this.componentRef.instance.hideCloseIcon = !!((_a = this.httpErrorConfig.errorScreen) === null || _a === void 0 ? void 0 : _a.hideCloseIcon);
2025
- const appRef = this.injector.get(ApplicationRef);
2026
- if (this.canCreateCustomError(instance.status)) {
2027
- this.componentRef.instance.cfRes = this.cfRes;
2028
- this.componentRef.instance.appRef = appRef;
2029
- this.componentRef.instance.injector = this.injector;
2030
- this.componentRef.instance.customComponent = (_b = this.httpErrorConfig.errorScreen) === null || _b === void 0 ? void 0 : _b.component;
2031
- }
2032
- appRef.attachView(this.componentRef.hostView);
2033
- renderer.appendChild(host, this.componentRef.hostView.rootNodes[0]);
2034
- const destroy$ = new Subject();
2035
- this.componentRef.instance.destroy$ = destroy$;
2036
- destroy$.subscribe(() => {
2037
- var _a;
2038
- (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
2039
- this.componentRef = null;
2040
- });
2041
- }
2042
- canCreateCustomError(status) {
2043
- var _a, _b, _c, _d, _e, _f;
2044
- return !!(((_b = (_a = this.httpErrorConfig) === null || _a === void 0 ? void 0 : _a.errorScreen) === null || _b === void 0 ? void 0 : _b.component) &&
2045
- ((_d = (_c = this.httpErrorConfig) === null || _c === void 0 ? void 0 : _c.errorScreen) === null || _d === void 0 ? void 0 : _d.forWhichErrors) &&
2046
- ((_f = (_e = this.httpErrorConfig) === null || _e === void 0 ? void 0 : _e.errorScreen) === null || _f === void 0 ? void 0 : _f.forWhichErrors.indexOf(status)) > -1);
2047
- }
2048
- }
2049
- ErrorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2050
- ErrorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ErrorHandler, providedIn: 'root' });
2051
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ErrorHandler, decorators: [{
2052
- type: Injectable,
2053
- args: [{ providedIn: 'root' }]
2054
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
2055
-
2056
- class NavItem {
2057
- constructor(props) {
2058
- Object.assign(this, props);
2059
- }
2060
- }
2061
-
2062
- class UserMenu extends NavItem {
2063
- }
2064
-
2065
- const NG_BOOTSTRAP_CONFIG_PROVIDERS = [
2066
- {
2067
- provide: APP_INITIALIZER,
2068
- useFactory: configureNgBootstrap,
2069
- deps: [NgbInputDatepickerConfig, NgbTypeaheadConfig],
2070
- multi: true,
2071
- },
2072
- ];
2073
- function configureNgBootstrap(datepicker, typeahead) {
2074
- return () => {
2075
- datepicker.container = 'body';
2076
- typeahead.container = 'body';
2077
- };
2078
- }
2079
-
2080
- const THEME_SHARED_ROUTE_PROVIDERS = [
2081
- { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
2082
- ];
2083
- function configureRoutes(routesService) {
2084
- return () => {
2085
- routesService.add([
2086
- {
2087
- path: undefined,
2088
- name: "AbpUiNavigation::Menu:Administration" /* eThemeSharedRouteNames.Administration */,
2089
- iconClass: 'fa fa-wrench',
2090
- order: 100,
2091
- },
2092
- ]);
2093
- };
2094
- }
2095
-
2096
- class AbstractMenuService {
2097
- constructor() {
2098
- this._items$ = new BehaviorSubject([]);
2099
- }
2100
- get items() {
2101
- return this._items$.value;
2102
- }
2103
- get items$() {
2104
- return this._items$.asObservable();
2105
- }
2106
- addItems(newItems) {
2107
- const items = [...this.items];
2108
- newItems.forEach(item => {
2109
- const index = items.findIndex(i => i.id === item.id);
2110
- const data = new this.baseClass(item);
2111
- if (index > -1) {
2112
- items[index] = data;
2113
- return;
2114
- }
2115
- items.push(data);
2116
- });
2117
- items.sort(this.sortItems);
2118
- this._items$.next(items);
2119
- }
2120
- removeItem(id) {
2121
- const index = this.items.findIndex(item => item.id === id);
2122
- if (index < 0)
2123
- return;
2124
- const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
2125
- this._items$.next(items);
2126
- }
2127
- patchItem(id, item) {
2128
- const index = this.items.findIndex(i => i.id === id);
2129
- if (index < 0)
2130
- return;
2131
- const items = [...this.items];
2132
- items[index] = new this.baseClass(Object.assign(Object.assign({}, items[index]), item));
2133
- items.sort(this.sortItems);
2134
- this._items$.next(items);
2135
- }
2136
- sortItems(a, b) {
2137
- if (!a.order)
2138
- return 1;
2139
- if (!b.order)
2140
- return -1;
2141
- return a.order - b.order;
2142
- }
2143
- }
2144
-
2145
- class NavItemsService extends AbstractMenuService {
2146
- constructor() {
2147
- super(...arguments);
2148
- this.baseClass = NavItem;
2149
- }
2150
- }
2151
- NavItemsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavItemsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2152
- NavItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavItemsService, providedIn: 'root' });
2153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavItemsService, decorators: [{
2154
- type: Injectable,
2155
- args: [{ providedIn: 'root' }]
2156
- }] });
2157
-
2158
- class PageAlertService {
2159
- constructor() {
2160
- this.alerts = new InternalStore([]);
2161
- this.alerts$ = this.alerts.sliceState(state => state);
2162
- }
2163
- show(alert) {
2164
- var _a;
2165
- const newAlert = Object.assign(Object.assign({}, alert), { dismissible: (_a = alert.dismissible) !== null && _a !== void 0 ? _a : true });
2166
- this.alerts.set([newAlert, ...this.alerts.state]);
2167
- }
2168
- remove(index) {
2169
- const alerts = [...this.alerts.state];
2170
- alerts.splice(index, 1);
2171
- this.alerts.set(alerts);
2172
- }
2173
- }
2174
- PageAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PageAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2175
- PageAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PageAlertService, providedIn: 'root' });
2176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PageAlertService, decorators: [{
2177
- type: Injectable,
2178
- args: [{ providedIn: 'root' }]
2179
- }], ctorParameters: function () { return []; } });
2180
-
2181
- class ToasterService {
2182
- constructor(contentProjectionService) {
2183
- this.contentProjectionService = contentProjectionService;
2184
- this.toasts$ = new ReplaySubject(1);
2185
- this.lastId = -1;
2186
- this.toasts = [];
2187
- /**
2188
- * Removes the toast with given id.
2189
- * @param id ID of the toast to be removed.
2190
- */
2191
- this.remove = (id) => {
2192
- this.toasts = this.toasts.filter(toast => { var _a; return ((_a = toast.options) === null || _a === void 0 ? void 0 : _a.id) !== id; });
2193
- this.toasts$.next(this.toasts);
2194
- };
2195
- }
2196
- setContainer() {
2197
- this.containerComponentRef = this.contentProjectionService.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(ToastContainerComponent, {
2198
- toasts$: this.toasts$,
2199
- remove: this.remove,
2200
- }));
2201
- this.containerComponentRef.changeDetectorRef.detectChanges();
2202
- }
2203
- /**
2204
- * Creates an info toast with given parameters.
2205
- * @param message Content of the toast
2206
- * @param title Title of the toast
2207
- * @param options Spesific style or structural options for individual toast
2208
- */
2209
- info(message, title, options) {
2210
- return this.show(message, title, 'info', options);
2211
- }
2212
- /**
2213
- * Creates a success toast with given parameters.
2214
- * @param message Content of the toast
2215
- * @param title Title of the toast
2216
- * @param options Spesific style or structural options for individual toast
2217
- */
2218
- success(message, title, options) {
2219
- return this.show(message, title, 'success', options);
2220
- }
2221
- /**
2222
- * Creates a warning toast with given parameters.
2223
- * @param message Content of the toast
2224
- * @param title Title of the toast
2225
- * @param options Spesific style or structural options for individual toast
2226
- */
2227
- warn(message, title, options) {
2228
- return this.show(message, title, 'warning', options);
2229
- }
2230
- /**
2231
- * Creates an error toast with given parameters.
2232
- * @param message Content of the toast
2233
- * @param title Title of the toast
2234
- * @param options Spesific style or structural options for individual toast
2235
- */
2236
- error(message, title, options) {
2237
- return this.show(message, title, 'error', options);
2238
- }
2239
- /**
2240
- * Creates a toast with given parameters.
2241
- * @param message Content of the toast
2242
- * @param title Title of the toast
2243
- * @param severity Sets color of the toast. "success", "warning" etc.
2244
- * @param options Spesific style or structural options for individual toast
2245
- */
2246
- show(message, title = undefined, severity = 'neutral', options = {}) {
2247
- if (!this.containerComponentRef)
2248
- this.setContainer();
2249
- const id = ++this.lastId;
2250
- this.toasts.push({
2251
- message,
2252
- title,
2253
- severity,
2254
- options: Object.assign({ closable: true, id }, options),
2255
- });
2256
- this.toasts$.next(this.toasts);
2257
- return id;
2258
- }
2259
- /**
2260
- * Removes all open toasts at once.
2261
- */
2262
- clear(containerKey) {
2263
- this.toasts = !containerKey
2264
- ? []
2265
- : this.toasts.filter(toast => { var _a; return ((_a = toast.options) === null || _a === void 0 ? void 0 : _a.containerKey) !== containerKey; });
2266
- this.toasts$.next(this.toasts);
2267
- }
2268
- }
2269
- ToasterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToasterService, deps: [{ token: i2.ContentProjectionService }], target: i0.ɵɵFactoryTarget.Injectable });
2270
- ToasterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToasterService, providedIn: 'root' });
2271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToasterService, decorators: [{
2272
- type: Injectable,
2273
- args: [{
2274
- providedIn: 'root',
2275
- }]
2276
- }], ctorParameters: function () { return [{ type: i2.ContentProjectionService }]; } });
2277
-
2278
- class UserMenuService extends AbstractMenuService {
2279
- constructor() {
2280
- super(...arguments);
2281
- this.baseClass = UserMenu;
2282
- }
2283
- }
2284
- UserMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserMenuService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2285
- UserMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserMenuService, providedIn: 'root' });
2286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserMenuService, decorators: [{
2287
- type: Injectable,
2288
- args: [{ providedIn: 'root' }]
2289
- }] });
2290
-
2291
- var styles = `
2292
- .is-invalid .form-control {
2293
- border-color: #dc3545;
2294
- border-style: solid !important;
2295
- padding-right: calc(1.5em + .75rem);
2296
- background-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e);
2297
- background-repeat: no-repeat;
2298
- background-position: right calc(.375em + .1875rem) center;
2299
- background-size: calc(.75em + .375rem) calc(.75em + .375rem);
2300
- }
2301
-
2302
- .is-invalid .invalid-feedback,
2303
- .is-invalid + * .invalid-feedback {
2304
- display: block;
2305
- }
2306
-
2307
- .data-tables-filter {
2308
- text-align: right;
2309
- }
2310
-
2311
- [dir=rtl] .data-tables-filter {
2312
- text-align: left;
2313
- }
2314
-
2315
- .pointer {
2316
- cursor: pointer;
2317
- }
2318
-
2319
- .navbar .dropdown-submenu a::after {
2320
- transform: rotate(-90deg);
2321
- position: absolute;
2322
- right: 16px;
2323
- top: 18px;
2324
- }
2325
-
2326
- .navbar .dropdown-menu {
2327
- min-width: 215px;
2328
- }
2329
-
2330
- .datatable-scroll {
2331
- margin-bottom: 5px !important;
2332
- width: unset !important;
2333
- }
2334
-
2335
- .ui-table-scrollable-body::-webkit-scrollbar {
2336
- height: 5px !important;
2337
- width: 5px !important;
2338
- }
2339
-
2340
- .ui-table-scrollable-body::-webkit-scrollbar-track {
2341
- background: #ddd;
2342
- }
2343
-
2344
- .ui-table-scrollable-body::-webkit-scrollbar-thumb {
2345
- background: #8a8686;
2346
- }
2347
-
2348
- .abp-ellipsis-inline {
2349
- display: inline-block;
2350
- overflow: hidden;
2351
- text-overflow: ellipsis;
2352
- white-space: nowrap;
2353
- }
2354
-
2355
- .abp-ellipsis {
2356
- overflow: hidden !important;
2357
- text-overflow: ellipsis;
2358
- white-space: nowrap;
2359
- }
2360
-
2361
- .ui-widget-overlay {
2362
- z-index: 1000;
2363
- }
2364
-
2365
- .color-white {
2366
- color: #FFF !important;
2367
- }
2368
-
2369
- .custom-checkbox > label {
2370
- cursor: pointer;
2371
- }
2372
-
2373
- /* <animations */
2374
-
2375
- .fade-in-top {
2376
- animation: fadeInTop 0.2s ease-in-out;
2377
- }
2378
-
2379
- .fade-out-top {
2380
- animation: fadeOutTop 0.2s ease-in-out;
2381
- }
2382
-
2383
- .abp-collapsed-height {
2384
- -moz-transition: max-height linear 0.35s;
2385
- -ms-transition: max-height linear 0.35s;
2386
- -o-transition: max-height linear 0.35s;
2387
- -webkit-transition: max-height linear 0.35s;
2388
- overflow:hidden;
2389
- transition:max-height 0.35s linear;
2390
- height:auto;
2391
- max-height: 0;
2392
- }
2393
-
2394
- .abp-mh-25 {
2395
- max-height: 25vh;
2396
- }
2397
-
2398
- .abp-mh-50 {
2399
- transition:max-height 0.65s linear;
2400
- max-height: 50vh;
2401
- }
2402
-
2403
- .abp-mh-75 {
2404
- transition:max-height 0.85s linear;
2405
- max-height: 75vh;
2406
- }
2407
-
2408
- .abp-mh-100 {
2409
- transition:max-height 1s linear;
2410
- max-height: 100vh;
2411
- }
2412
-
2413
- [class^="sorting"] {
2414
- opacity: .3;
2415
- cursor: pointer;
2416
- }
2417
- [class^="sorting"]:before {
2418
- right: 0.5rem;
2419
- content: "↑";
2420
- }
2421
- [class^="sorting"]:after {
2422
- right: 0.5rem;
2423
- content: "↓";
2424
- }
2425
-
2426
- .sorting_desc {
2427
- opacity: 1;
2428
- }
2429
- .sorting_desc:before {
2430
- opacity: .3;
2431
- }
2432
-
2433
- .sorting_asc {
2434
- opacity: 1;
2435
- }
2436
- .sorting_asc:after {
2437
- opacity: .3;
2438
- }
2439
- .ngx-datatable.material {
2440
- box-shadow: none;
2441
- }
2442
- ngb-typeahead-window, ngb-typeahead-window.dropdown-menu {
2443
- max-height: 25em;
2444
- overflow-y: scroll !important;
2445
- z-index: 1050;
2446
- }
2447
-
2448
- .abp-modal-header {
2449
- word-break: break-word;
2450
- }
2451
-
2452
-
2453
- @keyframes fadeInTop {
2454
- from {
2455
- transform: translateY(-5px);
2456
- opacity: 0;
2457
- }
2458
-
2459
- to {
2460
- transform: translateY(0px);
2461
- opacity: 1;
2462
- }
2463
- }
2464
-
2465
- @keyframes fadeOutTop {
2466
- to {
2467
- transform: translateY(-5px);
2468
- opacity: 0;
2469
- }
2470
- }
2471
-
2472
- /* </animations */
2473
- .ngb-dp-body {
2474
- z-index: 1055 !important;
2475
- }
2476
- `;
2477
-
2478
- const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARED_APPEND_CONTENT', {
2479
- providedIn: 'root',
2480
- factory: () => {
2481
- const domInsertion = inject(DomInsertionService);
2482
- domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
2483
- },
2484
- });
2485
-
2486
- function isNumber(value) {
2487
- return !isNaN(toInteger(value));
2488
- }
2489
- function toInteger(value) {
2490
- return parseInt(`${value}`, 10);
2491
- }
2492
- class DateParserFormatter extends NgbDateParserFormatter {
2493
- constructor(configState, locale) {
2494
- super();
2495
- this.configState = configState;
2496
- this.locale = locale;
2497
- }
2498
- parse(value) {
2499
- if (value) {
2500
- const dateParts = value.trim().split('-');
2501
- // TODO: CHANGED
2502
- if (dateParts.length === 1 && isNumber(dateParts[0])) {
2503
- return { year: toInteger(dateParts[0]), month: -1, day: -1 };
2504
- }
2505
- else if (dateParts.length === 2 && isNumber(dateParts[0]) && isNumber(dateParts[1])) {
2506
- return { year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: -1 };
2507
- }
2508
- else if (dateParts.length === 3 &&
2509
- isNumber(dateParts[0]) &&
2510
- isNumber(dateParts[1]) &&
2511
- isNumber(dateParts[2])) {
2512
- return {
2513
- year: toInteger(dateParts[0]),
2514
- month: toInteger(dateParts[1]),
2515
- day: toInteger(dateParts[2]),
2516
- };
2517
- }
2518
- }
2519
- return null;
2520
- }
2521
- format(date) {
2522
- var _a, _b;
2523
- if (!date)
2524
- return '';
2525
- const localization = this.configState.getOne('localization');
2526
- const dateFormat = ((_b = (_a = localization.currentCulture) === null || _a === void 0 ? void 0 : _a.dateTimeFormat) === null || _b === void 0 ? void 0 : _b.shortDatePattern) || 'yyyy-MM-dd';
2527
- return formatDate(new Date(date.year, date.month - 1, date.day), dateFormat, this.locale);
2528
- }
2529
- }
2530
- DateParserFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateParserFormatter, deps: [{ token: i2.ConfigStateService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2531
- DateParserFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateParserFormatter });
2532
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateParserFormatter, decorators: [{
2533
- type: Injectable
2534
- }], ctorParameters: function () {
2535
- return [{ type: i2.ConfigStateService }, { type: undefined, decorators: [{
2536
- type: Inject,
2537
- args: [LOCALE_ID]
2538
- }] }];
2539
- } });
2540
-
2541
- const declarationsWithExports = [
2542
- BreadcrumbComponent,
2543
- BreadcrumbItemsComponent,
2544
- ButtonComponent,
2545
- ConfirmationComponent,
2546
- LoaderBarComponent,
2547
- LoadingComponent,
2548
- ModalComponent,
2549
- ToastComponent,
2550
- ToastContainerComponent,
2551
- PasswordComponent,
2552
- NgxDatatableDefaultDirective,
2553
- NgxDatatableListDirective,
2554
- LoadingDirective,
2555
- ModalCloseDirective,
2556
- AbpVisibleDirective,
2557
- FormInputComponent,
2558
- FormCheckboxComponent
2559
- ];
2560
- class BaseThemeSharedModule {
2561
- }
2562
- BaseThemeSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2563
- BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: BaseThemeSharedModule, declarations: [BreadcrumbComponent,
2564
- BreadcrumbItemsComponent,
2565
- ButtonComponent,
2566
- ConfirmationComponent,
2567
- LoaderBarComponent,
2568
- LoadingComponent,
2569
- ModalComponent,
2570
- ToastComponent,
2571
- ToastContainerComponent,
2572
- PasswordComponent,
2573
- NgxDatatableDefaultDirective,
2574
- NgxDatatableListDirective,
2575
- LoadingDirective,
2576
- ModalCloseDirective,
2577
- AbpVisibleDirective,
2578
- FormInputComponent,
2579
- FormCheckboxComponent, HttpErrorWrapperComponent], imports: [CoreModule,
2580
- NgxDatatableModule,
2581
- NgxValidateCoreModule,
2582
- NgbPaginationModule,
2583
- EllipsisModule,
2584
- CardModule], exports: [NgxDatatableModule,
2585
- EllipsisModule,
2586
- NgxValidateCoreModule,
2587
- CardModule, BreadcrumbComponent,
2588
- BreadcrumbItemsComponent,
2589
- ButtonComponent,
2590
- ConfirmationComponent,
2591
- LoaderBarComponent,
2592
- LoadingComponent,
2593
- ModalComponent,
2594
- ToastComponent,
2595
- ToastContainerComponent,
2596
- PasswordComponent,
2597
- NgxDatatableDefaultDirective,
2598
- NgxDatatableListDirective,
2599
- LoadingDirective,
2600
- ModalCloseDirective,
2601
- AbpVisibleDirective,
2602
- FormInputComponent,
2603
- FormCheckboxComponent] });
2604
- BaseThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseThemeSharedModule, providers: [DatePipe], imports: [CoreModule,
2605
- NgxDatatableModule,
2606
- NgxValidateCoreModule,
2607
- NgbPaginationModule,
2608
- EllipsisModule,
2609
- CardModule, NgxDatatableModule,
2610
- EllipsisModule,
2611
- NgxValidateCoreModule,
2612
- CardModule] });
2613
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseThemeSharedModule, decorators: [{
2614
- type: NgModule,
2615
- args: [{
2616
- imports: [
2617
- CoreModule,
2618
- NgxDatatableModule,
2619
- NgxValidateCoreModule,
2620
- NgbPaginationModule,
2621
- EllipsisModule,
2622
- CardModule,
2623
- ],
2624
- declarations: [...declarationsWithExports, HttpErrorWrapperComponent],
2625
- exports: [
2626
- NgxDatatableModule,
2627
- EllipsisModule,
2628
- NgxValidateCoreModule,
2629
- CardModule,
2630
- ...declarationsWithExports
2631
- ],
2632
- providers: [DatePipe],
2633
- }]
2634
- }] });
2635
- class ThemeSharedModule {
2636
- static forRoot({ httpErrorConfig, validation = {}, confirmationIcons = {} } = {}) {
2637
- return {
2638
- ngModule: ThemeSharedModule,
2639
- providers: [
2640
- {
2641
- provide: APP_INITIALIZER,
2642
- multi: true,
2643
- deps: [ErrorHandler],
2644
- useFactory: noop,
2645
- },
2646
- THEME_SHARED_ROUTE_PROVIDERS,
2647
- {
2648
- provide: APP_INITIALIZER,
2649
- multi: true,
2650
- deps: [THEME_SHARED_APPEND_CONTENT],
2651
- useFactory: noop,
2652
- },
2653
- { provide: HTTP_ERROR_CONFIG, useValue: httpErrorConfig },
2654
- {
2655
- provide: 'HTTP_ERROR_CONFIG',
2656
- useFactory: httpErrorConfigFactory,
2657
- deps: [HTTP_ERROR_CONFIG],
2658
- },
2659
- { provide: NgbDateParserFormatter, useClass: DateParserFormatter },
2660
- NG_BOOTSTRAP_CONFIG_PROVIDERS,
2661
- {
2662
- provide: VALIDATION_BLUEPRINTS,
2663
- useValue: Object.assign(Object.assign({}, DEFAULT_VALIDATION_BLUEPRINTS), (validation.blueprints || {})),
2664
- },
2665
- {
2666
- provide: VALIDATION_MAP_ERRORS_FN,
2667
- useValue: validation.mapErrorsFn || defaultMapErrorsFn,
2668
- },
2669
- {
2670
- provide: VALIDATION_VALIDATE_ON_SUBMIT,
2671
- useValue: validation.validateOnSubmit,
2672
- },
2673
- DocumentDirHandlerService,
2674
- {
2675
- provide: APP_INITIALIZER,
2676
- useFactory: noop,
2677
- multi: true,
2678
- deps: [DocumentDirHandlerService],
2679
- },
2680
- {
2681
- provide: CONFIRMATION_ICONS,
2682
- useValue: Object.assign(Object.assign({}, DEFAULT_CONFIRMATION_ICONS), (confirmationIcons || {})),
2683
- },
2684
- ],
2685
- };
2686
- }
2687
- }
2688
- ThemeSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThemeSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2689
- ThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ThemeSharedModule, imports: [BaseThemeSharedModule], exports: [BaseThemeSharedModule] });
2690
- ThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThemeSharedModule, imports: [BaseThemeSharedModule, BaseThemeSharedModule] });
2691
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ThemeSharedModule, decorators: [{
2692
- type: NgModule,
2693
- args: [{
2694
- imports: [BaseThemeSharedModule],
2695
- exports: [BaseThemeSharedModule],
2696
- }]
2697
- }] });
2698
-
2699
- const { minLength, maxLength } = Validators;
2700
- function getPasswordValidators(injector) {
2701
- const getRule = getRuleFn(injector);
2702
- const passwordRulesArr = [];
2703
- let requiredLength = 1;
2704
- if (getRule('RequireDigit') === 'true') {
2705
- passwordRulesArr.push('number');
2706
- }
2707
- if (getRule('RequireLowercase') === 'true') {
2708
- passwordRulesArr.push('small');
2709
- }
2710
- if (getRule('RequireUppercase') === 'true') {
2711
- passwordRulesArr.push('capital');
2712
- }
2713
- if (getRule('RequireNonAlphanumeric') === 'true') {
2714
- passwordRulesArr.push('special');
2715
- }
2716
- if (Number.isInteger(+getRule('RequiredLength'))) {
2717
- requiredLength = +getRule('RequiredLength');
2718
- }
2719
- const passwordValidators = passwordRulesArr.map(rule => validatePassword(rule));
2720
- return [...passwordValidators, minLength(requiredLength), maxLength(128)];
2721
- }
2722
- function getRuleFn(injector) {
2723
- const configState = injector.get(ConfigStateService);
2724
- return (key) => {
2725
- const passwordRules = configState.getSettings('Identity.Password');
2726
- return (passwordRules[`Abp.Identity.Password.${key}`] || '').toLowerCase();
2727
- };
2728
- }
2729
- const errorMessageMap = {
2730
- small: 'passwordRequiresLower',
2731
- capital: 'passwordRequiresUpper',
2732
- number: 'passwordRequiresDigit',
2733
- special: 'passwordRequiresNonAlphanumeric',
2734
- };
2735
- function validatePassword(shouldContain) {
2736
- return (control) => {
2737
- if (!control.value)
2738
- return null;
2739
- const value = normalizeDiacritics(control.value);
2740
- const regexMap = {
2741
- small: /.*[a-z].*/,
2742
- capital: /.*[A-Z].*/,
2743
- number: /.*[0-9].*/,
2744
- special: /.*[^0-9a-zA-Z].*/,
2745
- };
2746
- const regex = regexMap[shouldContain];
2747
- const isValid = regex.test(value);
2748
- if (isValid) {
2749
- return null;
2750
- }
2751
- const error = errorMessageMap[shouldContain];
2752
- return {
2753
- [error]: true,
2754
- };
2755
- };
2756
- }
2757
-
2758
- /*
2759
- * Public API Surface of theme-shared
2760
- */
2761
-
2762
- /**
2763
- * Generated bundle index. Do not edit.
2764
- */
2765
-
2766
- export { AbpVisibleDirective, BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardHeaderDirective, CardImgTopDirective, CardModule, CardSubtitleDirective, CardTitleDirective, Confirmation, ConfirmationComponent, ConfirmationService, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_VALIDATION_BLUEPRINTS, DateParserFormatter, DocumentDirHandlerService, EllipsisDirective, EllipsisModule, ErrorHandler, FormCheckboxComponent, FormInputComponent, HTTP_ERROR_CONFIG, HTTP_ERROR_HANDLER, HttpErrorWrapperComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, SUPPRESS_UNSAVED_CHANGES_WARNING, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, ThemeSharedModule, ToastComponent, ToastContainerComponent, ToasterService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, eFormComponets, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getPasswordValidators, httpErrorConfigFactory, slideFromBottom, toastInOut, validatePassword };
2767
- //# sourceMappingURL=abp-ng.theme.shared.mjs.map