@onemrvapublic/design-system 1.0.0-beta.4 → 1.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (512) hide show
  1. package/README.md +9 -4
  2. package/assets/i18n/de.json +84 -12
  3. package/assets/i18n/en.json +78 -6
  4. package/assets/i18n/fr.json +79 -7
  5. package/assets/i18n/nl.json +84 -12
  6. package/fesm2022/onemrvapublic-design-system-flag-icon.mjs +49 -0
  7. package/fesm2022/onemrvapublic-design-system-flag-icon.mjs.map +1 -0
  8. package/fesm2022/onemrvapublic-design-system-layout.mjs +948 -0
  9. package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -0
  10. package/fesm2022/onemrvapublic-design-system-mat-address.mjs +111 -0
  11. package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -0
  12. package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs +318 -0
  13. package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs.map +1 -0
  14. package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs +125 -0
  15. package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs.map +1 -0
  16. package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs +208 -0
  17. package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs.map +1 -0
  18. package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +84 -0
  19. package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -0
  20. package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs +90 -0
  21. package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs.map +1 -0
  22. package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +33 -0
  23. package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -0
  24. package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs +211 -0
  25. package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs.map +1 -0
  26. package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs +42 -0
  27. package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs.map +1 -0
  28. package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +810 -0
  29. package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -0
  30. package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +138 -0
  31. package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -0
  32. package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +135 -0
  33. package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -0
  34. package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +98 -0
  35. package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -0
  36. package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +189 -0
  37. package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -0
  38. package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +308 -0
  39. package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -0
  40. package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +295 -0
  41. package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -0
  42. package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs +210 -0
  43. package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs.map +1 -0
  44. package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +225 -0
  45. package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -0
  46. package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs +169 -0
  47. package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs.map +1 -0
  48. package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +103 -0
  49. package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -0
  50. package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs +269 -0
  51. package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs.map +1 -0
  52. package/fesm2022/onemrvapublic-design-system-mat-panel.mjs +185 -0
  53. package/fesm2022/onemrvapublic-design-system-mat-panel.mjs.map +1 -0
  54. package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs +118 -0
  55. package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs.map +1 -0
  56. package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs +52 -0
  57. package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs.map +1 -0
  58. package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +612 -0
  59. package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -0
  60. package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +96 -0
  61. package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -0
  62. package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs +72 -0
  63. package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs.map +1 -0
  64. package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs +241 -0
  65. package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs.map +1 -0
  66. package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs +65 -0
  67. package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs.map +1 -0
  68. package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs +146 -0
  69. package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs.map +1 -0
  70. package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs +36 -0
  71. package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs.map +1 -0
  72. package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs +232 -0
  73. package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs.map +1 -0
  74. package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs +170 -0
  75. package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs.map +1 -0
  76. package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +1363 -0
  77. package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -0
  78. package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +73 -0
  79. package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -0
  80. package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs +166 -0
  81. package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs.map +1 -0
  82. package/fesm2022/onemrvapublic-design-system-page-error.mjs +80 -0
  83. package/fesm2022/onemrvapublic-design-system-page-error.mjs.map +1 -0
  84. package/fesm2022/onemrvapublic-design-system-page-not-found.mjs +211 -0
  85. package/fesm2022/onemrvapublic-design-system-page-not-found.mjs.map +1 -0
  86. package/fesm2022/onemrvapublic-design-system-shared.mjs +2188 -0
  87. package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -0
  88. package/fesm2022/onemrvapublic-design-system-utils.mjs +35 -0
  89. package/fesm2022/onemrvapublic-design-system-utils.mjs.map +1 -0
  90. package/fesm2022/onemrvapublic-design-system.mjs +10573 -0
  91. package/fesm2022/onemrvapublic-design-system.mjs.map +1 -0
  92. package/flag-icon/index.d.ts +18 -0
  93. package/flag-icon/src/flag-icon.component.scss +12 -0
  94. package/index.d.ts +3140 -0
  95. package/layout/index.d.ts +293 -0
  96. package/layout/src/components/layout/layout.component.scss +90 -80
  97. package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.scss +3 -2
  98. package/layout/src/components/layout-drawer-content/layout-drawer-content.component.scss +9 -0
  99. package/layout/src/components/layout-drawer-title/layout-drawer-title.component.scss +9 -5
  100. package/layout/src/components/layout-left-sidenav/layout-left-sidenav.component.scss +5 -0
  101. package/layout/src/components/layout-sidenav/layout-sidenav.component.scss +43 -0
  102. package/layout/src/index.scss +0 -1
  103. package/mat-address/index.d.ts +36 -0
  104. package/mat-address/src/onemrva-address.scss +14 -0
  105. package/mat-avatar/index.d.ts +187 -0
  106. package/mat-avatar/src/onemrva-mat-avatar.component.scss +79 -123
  107. package/mat-breadcrumb/index.d.ts +40 -0
  108. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +39 -53
  109. package/mat-carousel/index.d.ts +52 -0
  110. package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.scss +10 -0
  111. package/mat-carousel/src/onemrva-mat-carousel.component.scss +38 -45
  112. package/mat-choice-chip/index.d.ts +20 -0
  113. package/mat-choice-chip/src/onemrva-mat-choice-chip.component.scss +83 -0
  114. package/mat-copy-to-clipboard/index.d.ts +26 -0
  115. package/mat-country-item/index.d.ts +10 -0
  116. package/{mat-input-birthplace/src/country-item.component.scss → mat-country-item/src/onemrva-mat-country-item.component.scss} +6 -1
  117. package/mat-datepicker-header/index.d.ts +44 -0
  118. package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.scss +8 -0
  119. package/mat-empty-row/index.d.ts +19 -0
  120. package/mat-empty-row/src/onemrva-mat-empty-row.component.scss +29 -0
  121. package/mat-file-upload/index.d.ts +301 -0
  122. package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +48 -16
  123. package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.scss +72 -218
  124. package/mat-input-address/index.d.ts +32 -0
  125. package/mat-input-address/src/onemrva-mat-input-address.component.scss +8 -0
  126. package/mat-input-birthplace/index.d.ts +36 -0
  127. package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.scss +4 -2
  128. package/mat-input-country/index.d.ts +32 -0
  129. package/mat-input-country/src/onemrva-mat-input-country.component.scss +13 -0
  130. package/mat-input-enterprise-number/index.d.ts +37 -0
  131. package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.scss +7 -0
  132. package/mat-input-iban/index.d.ts +79 -0
  133. package/mat-input-iban/src/onemrva-mat-input-iban.component.scss +10 -0
  134. package/mat-input-phone/index.d.ts +44 -0
  135. package/mat-message-box/index.d.ts +101 -0
  136. package/mat-message-box/src/onemrva-mat-message-box.component.scss +13 -65
  137. package/mat-multi-select/index.d.ts +57 -0
  138. package/mat-multi-select/src/onemrva-mat-multi-select.component.scss +35 -0
  139. package/mat-navigation/index.d.ts +54 -0
  140. package/mat-navigation/src/mat-navigation-item/onemrva-mat-navigation-item.component.scss +66 -0
  141. package/mat-navigation/src/onemrva-mat-navigation.component.scss +36 -0
  142. package/mat-notification/index.d.ts +43 -0
  143. package/mat-notification/src/onemrva-mat-notification.component.scss +26 -0
  144. package/mat-paginator/index.d.ts +58 -0
  145. package/mat-paginator/src/onemrva-mat-paginator.component.scss +146 -0
  146. package/mat-panel/index.d.ts +66 -0
  147. package/mat-panel/src/mat-expansion-panel-header-arrow-divider.scss +11 -0
  148. package/mat-panel/src/onemrva-mat-panel-content.scss +8 -0
  149. package/mat-panel/src/onemrva-mat-panel-icon.scss +7 -0
  150. package/mat-panel/src/onemrva-mat-panel-title.scss +13 -0
  151. package/mat-panel/src/onemrva-mat-panel.component.scss +75 -82
  152. package/mat-pop-over/index.d.ts +40 -0
  153. package/mat-pop-over/src/onemrva-mat-pop-over.component.scss +11 -11
  154. package/mat-progress-bar/index.d.ts +18 -0
  155. package/mat-progress-bar/src/onemrva-mat-progress-bar.component.scss +26 -0
  156. package/mat-select-search/index.d.ts +197 -0
  157. package/mat-select-search/src/mat-select-search.component.scss +62 -109
  158. package/mat-selectable-box/index.d.ts +29 -0
  159. package/mat-selectable-box/src/onemrva-mat-selectable-box.component.scss +68 -90
  160. package/mat-side-menu/index.d.ts +33 -0
  161. package/mat-side-menu/src/onemrva-mat-side-menu.component.scss +36 -38
  162. package/mat-skeleton/index.d.ts +100 -0
  163. package/mat-skeleton/src/onemrva-mat-skeleton.component.scss +10 -59
  164. package/mat-spinner/index.d.ts +25 -0
  165. package/mat-spinner/src/onemrva-mat-spinner.component.scss +21 -0
  166. package/mat-stepper/index.d.ts +36 -0
  167. package/mat-stepper/src/onemrva-mat-stepper.scss +40 -105
  168. package/mat-sticker/index.d.ts +14 -0
  169. package/mat-sticker/src/onemrva-mat-sticker.component.scss +26 -63
  170. package/mat-table-of-content/index.d.ts +84 -0
  171. package/mat-table-of-content/src/onemrva-mat-table-of-content.component.scss +57 -0
  172. package/mat-task-list/index.d.ts +57 -0
  173. package/mat-task-list/src/onemrva-mat-task-content.scss +11 -0
  174. package/mat-task-list/src/onemrva-mat-task-list.component.scss +0 -150
  175. package/mat-task-list/src/onemrva-mat-task-title.scss +16 -0
  176. package/mat-task-list/src/onemrva-mat-task.component.scss +67 -0
  177. package/mat-timepicker/index.d.ts +386 -0
  178. package/mat-timepicker/src/clock/clock.component.scss +13 -7
  179. package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.scss +2 -7
  180. package/mat-toast/index.d.ts +30 -0
  181. package/mat-toast/src/onemrva-mat-toast.component.scss +7 -49
  182. package/mat-tooltip/index.d.ts +39 -0
  183. package/mat-tooltip/src/onemrva-mat-tooltip.component.scss +8 -5
  184. package/package.json +196 -26
  185. package/page-error/index.d.ts +34 -0
  186. package/page-error/src/page-error.component.scss +25 -0
  187. package/page-not-found/index.d.ts +54 -0
  188. package/page-not-found/src/page-not-found-mixin.component.scss +1 -1
  189. package/page-not-found/src/page-not-found.component.scss +2 -2
  190. package/shared/index.d.ts +541 -0
  191. package/utils/index.d.ts +32 -0
  192. package/.eslintrc.json +0 -33
  193. package/_index.scss +0 -34
  194. package/_utils.scss +0 -30
  195. package/core/index.ts +0 -3
  196. package/core/ng-package.json +0 -6
  197. package/core/src/lib/core.module.ts +0 -26
  198. package/core/src/lib/modules/index.ts +0 -1
  199. package/core/src/lib/modules/translate.loader.ts +0 -34
  200. package/core/src/lib/modules/translate.module.ts +0 -66
  201. package/core/src/lib/services/index.ts +0 -2
  202. package/core/src/lib/services/onemrva-error-handler.service.ts +0 -24
  203. package/core/src/lib/services/onemrva-missing-translation.service.ts +0 -12
  204. package/core/src/test.ts +0 -30
  205. package/layout/index.ts +0 -7
  206. package/layout/ng-package.json +0 -6
  207. package/layout/src/components/index.ts +0 -37
  208. package/layout/src/components/layout/_layout-mixin.component.scss +0 -189
  209. package/layout/src/components/layout/layout.component.html +0 -213
  210. package/layout/src/components/layout/layout.component.spec.ts +0 -59
  211. package/layout/src/components/layout/layout.component.ts +0 -185
  212. package/layout/src/components/layout-after-nav/layout-after-nav.component.spec.ts +0 -24
  213. package/layout/src/components/layout-after-nav/layout-after-nav.component.ts +0 -24
  214. package/layout/src/components/layout-content/layout-content.component.spec.ts +0 -24
  215. package/layout/src/components/layout-content/layout-content.component.ts +0 -24
  216. package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.html +0 -1
  217. package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.ts +0 -14
  218. package/layout/src/components/layout-drawer-content/layout-drawer-content.component.html +0 -1
  219. package/layout/src/components/layout-drawer-content/layout-drawer-content.component.ts +0 -14
  220. package/layout/src/components/layout-drawer-title/layout-drawer-title.component.html +0 -7
  221. package/layout/src/components/layout-drawer-title/layout-drawer-title.component.ts +0 -18
  222. package/layout/src/components/layout-footer/layout-footer.component.ts +0 -11
  223. package/layout/src/components/layout-login-menu/layout-login-menu.component.spec.ts +0 -24
  224. package/layout/src/components/layout-login-menu/layout-login-menu.component.ts +0 -24
  225. package/layout/src/components/layout-route/layout-route.component.html +0 -64
  226. package/layout/src/components/layout-route/layout-route.component.spec.ts +0 -24
  227. package/layout/src/components/layout-route/layout-route.component.ts +0 -57
  228. package/layout/src/components/layout-sidenav/layout-sidenav.component.html +0 -104
  229. package/layout/src/components/layout-sidenav/layout-sidenav.component.ts +0 -88
  230. package/layout/src/components/layout-sidenav-title/layout-sidenav-title.component.ts +0 -9
  231. package/layout/src/components/layout-subroute/layout-subroute.component.html +0 -43
  232. package/layout/src/components/layout-subroute/layout-subroute.component.spec.ts +0 -24
  233. package/layout/src/components/layout-subroute/layout-subroute.component.ts +0 -62
  234. package/layout/src/components/layout-title/layout-title.component.spec.ts +0 -24
  235. package/layout/src/components/layout-title/layout-title.component.ts +0 -24
  236. package/layout/src/decorators/coerce-boolean-input.decorator.ts +0 -19
  237. package/layout/src/decorators/observable-content.decorator.ts +0 -13
  238. package/layout/src/directives/drawer-host.directive.ts +0 -42
  239. package/layout/src/enums/environment.enum.ts +0 -6
  240. package/layout/src/layout.module.ts +0 -47
  241. package/layout/src/models/onem-language.model.ts +0 -4
  242. package/layout/src/models/onemrva-profile.model.ts +0 -57
  243. package/layout/src/services/drawer.service.ts +0 -30
  244. package/layout/src/striphtml.pipe.ts +0 -10
  245. package/layout/src/test.ts +0 -31
  246. package/mat-avatar/index.ts +0 -2
  247. package/mat-avatar/ng-package.json +0 -6
  248. package/mat-avatar/src/onemrva-mat-avatar.component.html +0 -21
  249. package/mat-avatar/src/onemrva-mat-avatar.component.ts +0 -421
  250. package/mat-avatar/src/onemrva-mat-avatar.module.ts +0 -11
  251. package/mat-avatar/src/onemrva-mat.avatar.component.spec.ts +0 -54
  252. package/mat-badge/index.ts +0 -6
  253. package/mat-badge/ng-package.json +0 -6
  254. package/mat-badge/src/onemrva-mat-badge.component.scss +0 -157
  255. package/mat-badge/src/onemrva-mat-badge.component.ts +0 -331
  256. package/mat-badge/src/onemrva-mat-badge.module.ts +0 -8
  257. package/mat-breadcrumb/index.ts +0 -7
  258. package/mat-breadcrumb/ng-package.json +0 -6
  259. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.html +0 -37
  260. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.ts +0 -16
  261. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.model.ts +0 -4
  262. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.module.ts +0 -12
  263. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.service.ts +0 -65
  264. package/mat-carousel/index.ts +0 -2
  265. package/mat-carousel/ng-package.json +0 -6
  266. package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html +0 -5
  267. package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts +0 -27
  268. package/mat-carousel/src/onemrva-mat-carousel-item.directive.ts +0 -8
  269. package/mat-carousel/src/onemrva-mat-carousel.component.html +0 -43
  270. package/mat-carousel/src/onemrva-mat-carousel.component.ts +0 -160
  271. package/mat-copy-to-clipboard/index.ts +0 -1
  272. package/mat-copy-to-clipboard/ng-package.json +0 -6
  273. package/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.html +0 -14
  274. package/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.ts +0 -76
  275. package/mat-datepicker-header/index.ts +0 -5
  276. package/mat-datepicker-header/ng-package.json +0 -6
  277. package/mat-datepicker-header/src/_onemrva-mat-datepicker-header.component.scss +0 -12
  278. package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html +0 -54
  279. package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts +0 -283
  280. package/mat-file-upload/index.ts +0 -11
  281. package/mat-file-upload/ng-package.json +0 -6
  282. package/mat-file-upload/src/components/index.ts +0 -10
  283. package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.html +0 -59
  284. package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.ts +0 -79
  285. package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.html +0 -58
  286. package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.ts +0 -209
  287. package/mat-file-upload/src/directives/dnd.directive.ts +0 -41
  288. package/mat-file-upload/src/models/action-config.model.ts +0 -10
  289. package/mat-file-upload/src/models/progress-file.model.ts +0 -94
  290. package/mat-file-upload/src/onemrva-mat-file-upload-itf.store.ts +0 -79
  291. package/mat-file-upload/src/onemrva-mat-file-upload.module.ts +0 -28
  292. package/mat-file-upload/src/onemrva-mat-file-upload.service.ts +0 -68
  293. package/mat-file-upload/src/onemrva-mat-file-upload.store.ts +0 -482
  294. package/mat-input-bank-account/index.ts +0 -5
  295. package/mat-input-bank-account/ng-package.json +0 -6
  296. package/mat-input-bank-account/src/bank-account.component.html +0 -36
  297. package/mat-input-bank-account/src/bank-account.component.scss +0 -42
  298. package/mat-input-bank-account/src/bank-account.component.ts +0 -308
  299. package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.html +0 -11
  300. package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.scss +0 -14
  301. package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.ts +0 -82
  302. package/mat-input-birthplace/index.ts +0 -5
  303. package/mat-input-birthplace/ng-package.json +0 -6
  304. package/mat-input-birthplace/src/country-item.component.html +0 -8
  305. package/mat-input-birthplace/src/country-item.component.ts +0 -33
  306. package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.html +0 -28
  307. package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.ts +0 -129
  308. package/mat-input-country/index.ts +0 -6
  309. package/mat-input-country/ng-package.json +0 -6
  310. package/mat-input-country/src/countries.ts +0 -3198
  311. package/mat-input-country/src/onemrva-mat-input-country.component.html +0 -25
  312. package/mat-input-country/src/onemrva-mat-input-country.component.ts +0 -152
  313. package/mat-input-enterprise-number/index.ts +0 -5
  314. package/mat-input-enterprise-number/ng-package.json +0 -6
  315. package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html +0 -42
  316. package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts +0 -212
  317. package/mat-input-phone/index.ts +0 -6
  318. package/mat-input-phone/ng-package.json +0 -6
  319. package/mat-input-phone/src/onemrva-mat-input-phone.component.html +0 -47
  320. package/mat-input-phone/src/onemrva-mat-input-phone.component.ts +0 -274
  321. package/mat-input-phone/src/phone-number.directive.ts +0 -46
  322. package/mat-message-box/index.ts +0 -2
  323. package/mat-message-box/ng-package.json +0 -6
  324. package/mat-message-box/src/onemrva-mat-message-box.component.html +0 -3
  325. package/mat-message-box/src/onemrva-mat-message-box.component.ts +0 -172
  326. package/mat-message-box/src/onemrva-mat-message-box.module.ts +0 -12
  327. package/mat-multi-select/index.ts +0 -2
  328. package/mat-multi-select/ng-package.json +0 -6
  329. package/mat-multi-select/src/_onemrva-mat-multi-select.component.scss +0 -66
  330. package/mat-multi-select/src/onemrva-mat-multi-select.component.html +0 -44
  331. package/mat-multi-select/src/onemrva-mat-multi-select.component.ts +0 -194
  332. package/mat-multi-select/src/onemrva-mat-multi-select.module.ts +0 -27
  333. package/mat-multi-select/src/onemrva-mat-select-counter.component.ts +0 -0
  334. package/mat-notification/index.ts +0 -1
  335. package/mat-notification/ng-package.json +0 -6
  336. package/mat-notification/src/_onemrva-mat-notification.component.scss +0 -102
  337. package/mat-notification/src/onemrva-mat-notification.component.html +0 -15
  338. package/mat-notification/src/onemrva-mat-notification.component.ts +0 -158
  339. package/mat-paginator/index.ts +0 -6
  340. package/mat-paginator/ng-package.json +0 -6
  341. package/mat-paginator/src/_onemrva-mat-paginator.component.scss +0 -122
  342. package/mat-paginator/src/onemrva-mat-paginator.component.html +0 -108
  343. package/mat-paginator/src/onemrva-mat-paginator.component.spec.ts +0 -184
  344. package/mat-paginator/src/onemrva-mat-paginator.component.ts +0 -216
  345. package/mat-paginator/src/onemrva-mat-paginator.module.ts +0 -21
  346. package/mat-panel/index.ts +0 -6
  347. package/mat-panel/ng-package.json +0 -6
  348. package/mat-panel/src/onemrva-mat-panel-content.component.ts +0 -11
  349. package/mat-panel/src/onemrva-mat-panel-content.html +0 -5
  350. package/mat-panel/src/onemrva-mat-panel-icon.component.ts +0 -11
  351. package/mat-panel/src/onemrva-mat-panel-icon.html +0 -5
  352. package/mat-panel/src/onemrva-mat-panel-title-action.component.ts +0 -11
  353. package/mat-panel/src/onemrva-mat-panel-title-action.html +0 -5
  354. package/mat-panel/src/onemrva-mat-panel-title.component.ts +0 -29
  355. package/mat-panel/src/onemrva-mat-panel-title.html +0 -8
  356. package/mat-panel/src/onemrva-mat-panel.component.html +0 -10
  357. package/mat-panel/src/onemrva-mat-panel.component.ts +0 -122
  358. package/mat-panel/src/onemrva-mat-panel.module.ts +0 -26
  359. package/mat-pop-over/index.ts +0 -4
  360. package/mat-pop-over/ng-package.json +0 -6
  361. package/mat-pop-over/src/onemrva-mat-pop-over-content.component.ts +0 -13
  362. package/mat-pop-over/src/onemrva-mat-pop-over-trigger.component.ts +0 -13
  363. package/mat-pop-over/src/onemrva-mat-pop-over.component.html +0 -29
  364. package/mat-pop-over/src/onemrva-mat-pop-over.component.ts +0 -46
  365. package/mat-pop-over/src/onemrva-mat-pop-over.module.ts +0 -19
  366. package/mat-progress-bar/index.ts +0 -1
  367. package/mat-progress-bar/ng-package.json +0 -6
  368. package/mat-progress-bar/src/_onemrva-mat-progress-bar-mixin.component.scss +0 -37
  369. package/mat-progress-bar/src/onemrva-mat-progress-bar.component.html +0 -13
  370. package/mat-progress-bar/src/onemrva-mat-progress-bar.component.ts +0 -27
  371. package/mat-select-search/index.ts +0 -3
  372. package/mat-select-search/ng-package.json +0 -6
  373. package/mat-select-search/src/default-options.ts +0 -48
  374. package/mat-select-search/src/mat-select-no-entries-found.directive.ts +0 -15
  375. package/mat-select-search/src/mat-select-search-clear.directive.ts +0 -13
  376. package/mat-select-search/src/mat-select-search.component.html +0 -82
  377. package/mat-select-search/src/mat-select-search.component.spec.ts +0 -790
  378. package/mat-select-search/src/mat-select-search.component.ts +0 -705
  379. package/mat-select-search/src/mat-select-search.module.ts +0 -52
  380. package/mat-selectable-box/index.ts +0 -6
  381. package/mat-selectable-box/ng-package.json +0 -6
  382. package/mat-selectable-box/src/onemrva-mat-selectable-box.component.ts +0 -99
  383. package/mat-selectable-box/src/onemrva-mat-selectable-box.module.ts +0 -30
  384. package/mat-side-menu/index.ts +0 -6
  385. package/mat-side-menu/ng-package.json +0 -6
  386. package/mat-side-menu/src/onemrva-mat-side-menu.component.html +0 -36
  387. package/mat-side-menu/src/onemrva-mat-side-menu.component.spec.ts +0 -66
  388. package/mat-side-menu/src/onemrva-mat-side-menu.component.ts +0 -58
  389. package/mat-side-menu/src/onemrva-mat-side-menu.module.ts +0 -14
  390. package/mat-skeleton/index.ts +0 -3
  391. package/mat-skeleton/ng-package.json +0 -6
  392. package/mat-skeleton/src/onemrva-mat-skeleton-enums.ts +0 -32
  393. package/mat-skeleton/src/onemrva-mat-skeleton.component.html +0 -14
  394. package/mat-skeleton/src/onemrva-mat-skeleton.component.ts +0 -187
  395. package/mat-skeleton/src/onemrva-mat-skeleton.module.ts +0 -10
  396. package/mat-spinner/index.ts +0 -7
  397. package/mat-spinner/ng-package.json +0 -6
  398. package/mat-spinner/src/_onemrva-mat-spinner.component.scss +0 -151
  399. package/mat-spinner/src/onemrva-mat-loading.directive.ts +0 -41
  400. package/mat-spinner/src/onemrva-mat-spinner.component.html +0 -2138
  401. package/mat-spinner/src/onemrva-mat-spinner.component.ts +0 -52
  402. package/mat-spinner/src/onemrva-mat-spinner.module.ts +0 -10
  403. package/mat-stepper/index.ts +0 -6
  404. package/mat-stepper/ng-package.json +0 -6
  405. package/mat-stepper/src/_stepper-variables.scss +0 -29
  406. package/mat-stepper/src/onemrva-mat-stepper.component.spec.ts +0 -22
  407. package/mat-stepper/src/onemrva-mat-stepper.component.ts +0 -57
  408. package/mat-stepper/src/onemrva-mat-stepper.html +0 -61
  409. package/mat-stepper/src/onemrva-mat-stepper.module.ts +0 -24
  410. package/mat-stepper/src/onemrva-stepper-animations.ts +0 -42
  411. package/mat-sticker/index.ts +0 -6
  412. package/mat-sticker/ng-package.json +0 -6
  413. package/mat-sticker/src/onemrva-mat-sticker.component.spec.ts +0 -16
  414. package/mat-sticker/src/onemrva-mat-sticker.component.ts +0 -58
  415. package/mat-sticker/src/onemrva-mat-sticker.module.ts +0 -10
  416. package/mat-table-of-content/index.ts +0 -8
  417. package/mat-table-of-content/ng-package.json +0 -6
  418. package/mat-table-of-content/src/_onemrva-mat-table-of-content.component.scss +0 -79
  419. package/mat-table-of-content/src/onemrva-mat-table-of-content.component.html +0 -23
  420. package/mat-table-of-content/src/onemrva-mat-table-of-content.component.ts +0 -126
  421. package/mat-table-of-content/src/onemrva-mat-table-of-content.directive.ts +0 -67
  422. package/mat-table-of-content/src/onemrva-mat-table-of-content.service.ts +0 -51
  423. package/mat-table-of-content/src/onemrva-mat-toc-anchor.model.ts +0 -24
  424. package/mat-task-list/index.ts +0 -5
  425. package/mat-task-list/ng-package.json +0 -6
  426. package/mat-task-list/src/onemrva-mat-task-content.component.ts +0 -11
  427. package/mat-task-list/src/onemrva-mat-task-content.html +0 -5
  428. package/mat-task-list/src/onemrva-mat-task-list.component.html +0 -1
  429. package/mat-task-list/src/onemrva-mat-task-list.component.ts +0 -39
  430. package/mat-task-list/src/onemrva-mat-task-list.module.ts +0 -31
  431. package/mat-task-list/src/onemrva-mat-task-title.component.ts +0 -24
  432. package/mat-task-list/src/onemrva-mat-task-title.html +0 -5
  433. package/mat-task-list/src/onemrva-mat-task.component.html +0 -23
  434. package/mat-task-list/src/onemrva-mat-task.component.ts +0 -121
  435. package/mat-timepicker/index.ts +0 -6
  436. package/mat-timepicker/ng-package.json +0 -6
  437. package/mat-timepicker/src/clock/clock.component.html +0 -109
  438. package/mat-timepicker/src/clock/clock.component.spec.ts +0 -38
  439. package/mat-timepicker/src/clock/clock.component.ts +0 -274
  440. package/mat-timepicker/src/interfaces-and-types.ts +0 -18
  441. package/mat-timepicker/src/onemrva-mat-timepicker.component.html +0 -0
  442. package/mat-timepicker/src/onemrva-mat-timepicker.component.ts +0 -300
  443. package/mat-timepicker/src/onemrva-mat-timepicker.module.ts +0 -40
  444. package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.html +0 -53
  445. package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.spec.ts +0 -41
  446. package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.ts +0 -176
  447. package/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.html +0 -15
  448. package/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.ts +0 -140
  449. package/mat-timepicker/src/timepicker.directive.ts +0 -596
  450. package/mat-timepicker/src/util.ts +0 -109
  451. package/mat-toast/index.ts +0 -6
  452. package/mat-toast/ng-package.json +0 -6
  453. package/mat-toast/src/onemrva-mat-toast.component.ts +0 -36
  454. package/mat-toast/src/onemrva-mat-toast.module.ts +0 -11
  455. package/mat-tooltip/index.ts +0 -4
  456. package/mat-tooltip/ng-package.json +0 -6
  457. package/mat-tooltip/src/onemrva-mat-tooltip.component.ts +0 -21
  458. package/mat-tooltip/src/onemrva-mat-tooltip.directive.ts +0 -123
  459. package/mat-tooltip/src/onemrva-mat-tooltip.module.ts +0 -11
  460. package/ng-package.json +0 -25
  461. package/npm-shrinkwrap.json +0 -30
  462. package/page-not-found/index.ts +0 -5
  463. package/page-not-found/ng-package.json +0 -6
  464. package/page-not-found/src/page-not-found-action.component.ts +0 -9
  465. package/page-not-found/src/page-not-found-extra.component.ts +0 -9
  466. package/page-not-found/src/page-not-found-invader.component.ts +0 -93
  467. package/page-not-found/src/page-not-found.component.html +0 -47
  468. package/page-not-found/src/page-not-found.component.ts +0 -60
  469. package/page-not-found/src/page-not-found.module.ts +0 -24
  470. package/shared/index.ts +0 -17
  471. package/shared/ng-package.json +0 -6
  472. package/shared/src/lib/OnemrvaDateAdapter.ts +0 -78
  473. package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.css +0 -0
  474. package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.html +0 -1
  475. package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.spec.ts +0 -21
  476. package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.ts +0 -18
  477. package/shared/src/lib/containers/WebComponentOverlayContainer.ts +0 -90
  478. package/shared/src/lib/containers/index.ts +0 -1
  479. package/shared/src/lib/date.format.ts +0 -11
  480. package/shared/src/lib/directives/clipboard.directive.ts +0 -52
  481. package/shared/src/lib/directives/color.directive.ts +0 -46
  482. package/shared/src/lib/directives/digit-only.directive.ts +0 -46
  483. package/shared/src/lib/directives/if-width-is.directive.ts +0 -39
  484. package/shared/src/lib/directives/index.ts +0 -22
  485. package/shared/src/lib/directives/mask.directive.ts +0 -223
  486. package/shared/src/lib/directives/mat-row-clickable.directive.ts +0 -66
  487. package/shared/src/lib/interfaces/OnemRvaCommonCountry.interface.ts +0 -23
  488. package/shared/src/lib/interfaces/index.ts +0 -1
  489. package/shared/src/lib/pipes/index.ts +0 -2
  490. package/shared/src/lib/pipes/onemrva-bce.pipe.ts +0 -18
  491. package/shared/src/lib/pipes/onemrva-niss.pipe.ts +0 -18
  492. package/shared/src/lib/services/commonCountryLookup.service.ts +0 -50
  493. package/shared/src/lib/services/index.ts +0 -1
  494. package/shared/src/lib/shared.datepicker.module.ts +0 -60
  495. package/shared/src/lib/shared.module.ts +0 -10
  496. package/shared/src/lib/validators/bankAccountValidator.utils.ts +0 -61
  497. package/shared/src/lib/validators/onemrva-validators.spec.ts +0 -79
  498. package/shared/src/lib/validators/onemrva-validators.ts +0 -97
  499. package/shared/src/onemrva-validators.spec.ts +0 -14
  500. package/src/polyfills.ts +0 -52
  501. package/src/public-api.spec.ts +0 -7
  502. package/src/public-api.ts +0 -5
  503. package/tsconfig.lib.json +0 -12
  504. package/tsconfig.lib.prod.json +0 -10
  505. package/tsconfig.spec.json +0 -10
  506. package/utils/index.ts +0 -2
  507. package/utils/ng-package.json +0 -6
  508. package/utils/src/enum.utils.ts +0 -8
  509. package/utils/src/enums/color.enum.ts +0 -14
  510. package/utils/src/enums/index.ts +0 -2
  511. package/utils/src/enums/size.enum.ts +0 -11
  512. /package/{assets/.gitkeep → mat-navigation/src/mat-navigation-tree/onemrva-mat-navigation-tree.component.scss} +0 -0
@@ -0,0 +1,295 @@
1
+ import * as i5 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { HostListener, Directive, EventEmitter, inject, ViewChild, Output, Input, ViewEncapsulation, Component } from '@angular/core';
5
+ import * as i4 from '@angular/forms';
6
+ import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
7
+ import { MatFormFieldModule } from '@angular/material/form-field';
8
+ import * as i1 from '@angular/material/input';
9
+ import { MatInputModule } from '@angular/material/input';
10
+ import * as i2 from '@angular/material/select';
11
+ import { MatSelectModule } from '@angular/material/select';
12
+ import * as i6 from '@ngx-translate/core';
13
+ import { TranslateModule } from '@ngx-translate/core';
14
+ import { Subject, debounceTime, startWith, combineLatestWith, map, takeUntil, zip } from 'rxjs';
15
+ import * as i3 from '@onemrvapublic/design-system/mat-select-search';
16
+ import { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';
17
+ import parsePhoneNumber from 'libphonenumber-js';
18
+ import { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';
19
+ import { OnemRvaCDNCountryService } from '@onemrvapublic/design-system/shared';
20
+
21
+ class PhoneNumberDirective {
22
+ onKeyDown(event) {
23
+ const e = event;
24
+ const allowedKey = [
25
+ '0',
26
+ '1',
27
+ '2',
28
+ '3',
29
+ '4',
30
+ '5',
31
+ '6',
32
+ '7',
33
+ '8',
34
+ '9',
35
+ ' ',
36
+ 'Backspace',
37
+ 'Delete',
38
+ 'Tab',
39
+ '+',
40
+ '-',
41
+ 'Enter',
42
+ 'ArrowLeft',
43
+ 'ArrowRight',
44
+ 'ArrowUp',
45
+ 'ArrowDown',
46
+ 'Home',
47
+ 'End',
48
+ ];
49
+ if (allowedKey.indexOf(e.key) >= 0)
50
+ return;
51
+ const allowedCtrlShortcuts = ['a', 'c', 'x', 'v'];
52
+ if (e.ctrlKey && allowedCtrlShortcuts.indexOf(e.key) >= 0)
53
+ return;
54
+ e.preventDefault();
55
+ }
56
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PhoneNumberDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
57
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: PhoneNumberDirective, isStandalone: true, selector: "[phoneNumber]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
58
+ }
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PhoneNumberDirective, decorators: [{
60
+ type: Directive,
61
+ args: [{
62
+ selector: '[phoneNumber]',
63
+ standalone: true,
64
+ }]
65
+ }], propDecorators: { onKeyDown: [{
66
+ type: HostListener,
67
+ args: ['keydown', ['$event']]
68
+ }] } });
69
+
70
+ class OnemrvaMatInputPhoneComponent {
71
+ constructor() {
72
+ this.readonly = false;
73
+ this.label = 'Phone number';
74
+ this.noEntriesFoundLabel = 'Not found';
75
+ this.placeholder = '+32 475 12 34 56';
76
+ this.placeholderLabel = 'Search';
77
+ this.defaultPrefix = '+32';
78
+ this.searchAriaLabel = '';
79
+ this.hint = '';
80
+ this.getCountry = new EventEmitter();
81
+ this.countryCode = new FormControl('');
82
+ this.filterCtrl = new FormControl('');
83
+ this.destroyNotifier$ = new Subject();
84
+ this.cdn = inject(OnemRvaCDNCountryService);
85
+ this.countries$ = this.cdn.getCountries();
86
+ this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(debounceTime(400), startWith(''), // Explicitly define type
87
+ combineLatestWith(this.countries$), // Ensure correct tuple structure
88
+ map(([search, countries]) => {
89
+ // Define expected tuple
90
+ return countries.filter((country) => {
91
+ if (!search || search.trim() === '')
92
+ return true; // Return all when search is empty
93
+ return country.name?.toLowerCase().includes(search.toLowerCase());
94
+ });
95
+ }));
96
+ }
97
+ get number() {
98
+ return this.phoneNumber;
99
+ }
100
+ ngOnInit() {
101
+ this.number.valueChanges
102
+ .pipe(startWith(this.number.getRawValue()), takeUntil(this.destroyNotifier$))
103
+ .subscribe(number => {
104
+ if (number !== '') {
105
+ if (number.substring(0, 1) !== '+')
106
+ this.countryCode.setValue('', { emitEvent: false });
107
+ if (number === '0') {
108
+ this.cdn
109
+ .findCountryFromPrefix(this.defaultPrefix)
110
+ .pipe(takeUntil(this.destroyNotifier$))
111
+ .subscribe(country => {
112
+ if (country) {
113
+ //this.getCountry.next(country);
114
+ this.number.setValue(this.defaultPrefix, {
115
+ emitEvent: false,
116
+ });
117
+ this.countryCode.setValue(country.code, { emitEvent: false });
118
+ }
119
+ else {
120
+ this.countryCode.setValue('');
121
+ }
122
+ this.formatPhoneNumber();
123
+ });
124
+ }
125
+ else {
126
+ this.cdn
127
+ .findCountryFromPrefix(number)
128
+ .pipe(takeUntil(this.destroyNotifier$))
129
+ .subscribe(country => {
130
+ if (country) {
131
+ //this.getCountry.next(country);
132
+ this.countryCode.setValue(country.code);
133
+ }
134
+ else {
135
+ this.countryCode.setValue('');
136
+ }
137
+ this.formatPhoneNumber();
138
+ });
139
+ }
140
+ }
141
+ });
142
+ this.countryCode.valueChanges
143
+ .pipe(takeUntil(this.destroyNotifier$))
144
+ .subscribe(value => {
145
+ let number = this.number.getRawValue();
146
+ zip(this.cdn.findCountryFromPrefix(number), this.cdn.findCountryFromCode(value)).subscribe(([countryFromVies, countryFromCode]) => {
147
+ // Perform your action here using countryFromVies and countryFromCode
148
+ if (countryFromVies) {
149
+ number = number.replace(countryFromVies.dial_code, '');
150
+ }
151
+ if (countryFromCode) {
152
+ this.getCountry.next(countryFromCode);
153
+ if (number.substring(0, 1) === '+') {
154
+ number = number.replace('+', '');
155
+ }
156
+ number = countryFromCode.dial_code + number;
157
+ this.number.setValue(number, { emitEvent: false });
158
+ this.formatPhoneNumber();
159
+ }
160
+ setTimeout(() => {
161
+ this.numberInput.nativeElement.focus();
162
+ }, 200);
163
+ });
164
+ });
165
+ }
166
+ handleClick(e) {
167
+ e.stopPropagation();
168
+ }
169
+ clearValidators() {
170
+ let required = false;
171
+ if (this.number.hasValidator(Validators.required)) {
172
+ required = true;
173
+ }
174
+ this.number.clearValidators();
175
+ if (required) {
176
+ this.number.addValidators(Validators.required);
177
+ }
178
+ }
179
+ formatPhoneNumber() {
180
+ this.clearValidators();
181
+ if (this.countryCode.getRawValue() !== '') {
182
+ this.number.addValidators([
183
+ this.phoneNumberValidator(this.countryCode.getRawValue()),
184
+ ]);
185
+ }
186
+ try {
187
+ const parsedPhone = parsePhoneNumber(this.number.getRawValue());
188
+ const code = parsedPhone?.country;
189
+ if (code) {
190
+ this.countryCode.setValue(code, { emitEvent: false });
191
+ this.clearValidators();
192
+ this.number.addValidators([this.phoneNumberValidator(code)]);
193
+ this.number.setValue(parsedPhone?.format('INTERNATIONAL'), {
194
+ emitEvent: false,
195
+ });
196
+ }
197
+ else {
198
+ this.number.addValidators([genericValidator('input.phone.invalid')]);
199
+ }
200
+ }
201
+ catch (e) {
202
+ this.number.addValidators([genericValidator(e.message)]);
203
+ }
204
+ }
205
+ ngOnDestroy() {
206
+ this.destroyNotifier$.next();
207
+ this.destroyNotifier$.complete();
208
+ }
209
+ errors() {
210
+ for (const k in this.number.errors) {
211
+ if (k === 'required') {
212
+ return 'input.phone.required';
213
+ }
214
+ else {
215
+ return 'input.phone.invalid';
216
+ }
217
+ }
218
+ return 'input.phone.unknown.error';
219
+ }
220
+ phoneNumberValidator(code) {
221
+ return (_control) => {
222
+ let number = code + _control.getRawValue();
223
+ if (number === '') {
224
+ return null;
225
+ }
226
+ try {
227
+ number = number.replace(code, '');
228
+ const parsedNumber = parsePhoneNumber(number);
229
+ if (parsedNumber?.isValid()) {
230
+ return null;
231
+ }
232
+ }
233
+ catch (e) {
234
+ console.warn(e.message);
235
+ return { phoneNumber: { value: 'input.phone.invalid' } };
236
+ }
237
+ return { phoneNumber: { value: 'input.phone.invalid' } };
238
+ };
239
+ }
240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputPhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
241
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputPhoneComponent, isStandalone: true, selector: "onemrva-mat-input-phone", inputs: { readonly: "readonly", phoneNumber: "phoneNumber", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", placeholder: "placeholder", placeholderLabel: "placeholderLabel", defaultPrefix: "defaultPrefix", searchAriaLabel: "searchAriaLabel", hint: "hint" }, outputs: { getCountry: "getCountry" }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: ["numberInput"], descendants: true }], ngImport: i0, template: "<ng-container>\n <mat-form-field class=\"onemrva-input-phone-number\">\n <mat-label>{{ label }}</mat-label>\n\n <input\n (click)=\"handleClick($event)\"\n type=\"tel\"\n matInput\n phoneNumber\n #numberInput\n [placeholder]=\"placeholder\"\n [formControl]=\"phoneNumber\"\n class=\"onemrva-text-number\"\n [readOnly]=\"readonly\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />\n &nbsp;&nbsp;&nbsp;\n {{ country.name }}\n &nbsp;&nbsp;&nbsp;\n <span class=\"dialcode\">\n {{ country.dial_code }}\n </span>\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n", styles: [".onemrva-input-phone-number mat-select .mat-mdc-select-placeholder{width:1em!important;display:block!important}.onemrva-input-phone-number mat-select .mat-mdc-select-placeholder:before{width:1em!important;height:1em!important;background:#eee!important;visibility:visible!important;margin:10px 0!important}.onemrva-input-phone-number mat-select .mat-mdc-select-value{padding-right:8px}.onemrva-input-phone-number .onemrva-text-number{padding-left:12px!important;vertical-align:middle}.onemrva-input-phone-number .mat-mdc-form-field-text-prefix mat-select{line-height:14px!important}.onemrva-input-phone-number span.dialcode{color:#acaab2}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatSelectSearchModule }, { kind: "component", type: i3.MatSelectSearchComponent, selector: "mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: PhoneNumberDirective, selector: "[phoneNumber]" }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
242
+ }
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputPhoneComponent, decorators: [{
244
+ type: Component,
245
+ args: [{ selector: 'onemrva-mat-input-phone', standalone: true, imports: [
246
+ CommonModule,
247
+ MatInputModule,
248
+ MatFormFieldModule,
249
+ MatSelectModule,
250
+ MatSelectSearchModule,
251
+ ReactiveFormsModule,
252
+ TranslateModule,
253
+ PhoneNumberDirective,
254
+ FlagIconComponent,
255
+ ], encapsulation: ViewEncapsulation.None, template: "<ng-container>\n <mat-form-field class=\"onemrva-input-phone-number\">\n <mat-label>{{ label }}</mat-label>\n\n <input\n (click)=\"handleClick($event)\"\n type=\"tel\"\n matInput\n phoneNumber\n #numberInput\n [placeholder]=\"placeholder\"\n [formControl]=\"phoneNumber\"\n class=\"onemrva-text-number\"\n [readOnly]=\"readonly\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />\n &nbsp;&nbsp;&nbsp;\n {{ country.name }}\n &nbsp;&nbsp;&nbsp;\n <span class=\"dialcode\">\n {{ country.dial_code }}\n </span>\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n", styles: [".onemrva-input-phone-number mat-select .mat-mdc-select-placeholder{width:1em!important;display:block!important}.onemrva-input-phone-number mat-select .mat-mdc-select-placeholder:before{width:1em!important;height:1em!important;background:#eee!important;visibility:visible!important;margin:10px 0!important}.onemrva-input-phone-number mat-select .mat-mdc-select-value{padding-right:8px}.onemrva-input-phone-number .onemrva-text-number{padding-left:12px!important;vertical-align:middle}.onemrva-input-phone-number .mat-mdc-form-field-text-prefix mat-select{line-height:14px!important}.onemrva-input-phone-number span.dialcode{color:#acaab2}\n"] }]
256
+ }], ctorParameters: () => [], propDecorators: { readonly: [{
257
+ type: Input
258
+ }], phoneNumber: [{
259
+ type: Input
260
+ }], label: [{
261
+ type: Input
262
+ }], noEntriesFoundLabel: [{
263
+ type: Input
264
+ }], placeholder: [{
265
+ type: Input
266
+ }], placeholderLabel: [{
267
+ type: Input
268
+ }], defaultPrefix: [{
269
+ type: Input
270
+ }], searchAriaLabel: [{
271
+ type: Input
272
+ }], hint: [{
273
+ type: Input
274
+ }], getCountry: [{
275
+ type: Output
276
+ }], numberInput: [{
277
+ type: ViewChild,
278
+ args: ['numberInput']
279
+ }] } });
280
+ function genericValidator(message) {
281
+ return (_control) => {
282
+ return { phoneNumber: { value: message } };
283
+ };
284
+ }
285
+
286
+ /*
287
+ * Public API Surface of mat-bank-account-input
288
+ */
289
+
290
+ /**
291
+ * Generated bundle index. Do not edit.
292
+ */
293
+
294
+ export { OnemrvaMatInputPhoneComponent, PhoneNumberDirective };
295
+ //# sourceMappingURL=onemrvapublic-design-system-mat-input-phone.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-input-phone.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-phone/src/phone-number.directive.ts","../../../../projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.ts","../../../../projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.html","../../../../projects/onemrva/design-system/mat-input-phone/index.ts","../../../../projects/onemrva/design-system/mat-input-phone/onemrvapublic-design-system-mat-input-phone.ts"],"sourcesContent":["import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[phoneNumber]',\n standalone: true,\n})\nexport class PhoneNumberDirective {\n @HostListener('keydown', ['$event']) onKeyDown(event: any) {\n const e = event as KeyboardEvent;\n\n const allowedKey = [\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n ' ',\n 'Backspace',\n 'Delete',\n 'Tab',\n '+',\n '-',\n 'Enter',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n ];\n\n if (allowedKey.indexOf(e.key) >= 0) return;\n\n const allowedCtrlShortcuts = ['a', 'c', 'x', 'v'];\n if (e.ctrlKey && allowedCtrlShortcuts.indexOf(e.key) >= 0) return;\n\n e.preventDefault();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n Observable,\n Subject,\n map,\n startWith,\n debounceTime,\n takeUntil,\n combineLatestWith,\n zip,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport { PhoneNumberDirective } from './phone-number.directive';\nimport parsePhoneNumber from 'libphonenumber-js';\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\nimport {\n OnemRvaCDNCountryService,\n OnemrvaMaterialCountry,\n} from '@onemrvapublic/design-system/shared';\n\n@Component({\n selector: 'onemrva-mat-input-phone',\n styleUrls: ['onemrva-mat-input-phone.component.scss'],\n templateUrl: 'onemrva-mat-input-phone.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatSelectSearchModule,\n ReactiveFormsModule,\n TranslateModule,\n PhoneNumberDirective,\n FlagIconComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputPhoneComponent implements OnInit, OnDestroy {\n @Input()\n readonly = false;\n\n @Input() phoneNumber!: FormControl;\n @Input() label = 'Phone number';\n @Input() noEntriesFoundLabel = 'Not found';\n @Input() placeholder = '+32 475 12 34 56';\n @Input() placeholderLabel = 'Search';\n @Input() defaultPrefix = '+32';\n @Input() searchAriaLabel = '';\n @Input() hint = '';\n @Output() getCountry = new EventEmitter<any>();\n @ViewChild('numberInput') numberInput!: ElementRef;\n\n countryCode: FormControl = new FormControl('');\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n destroyNotifier$ = new Subject<void>();\n\n private readonly cdn = inject(OnemRvaCDNCountryService);\n public countries$: Observable<OnemrvaMaterialCountry[]> =\n this.cdn.getCountries();\n public filteredCountries$: Observable<OnemrvaMaterialCountry[]>;\n\n constructor() {\n this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(\n debounceTime(400),\n startWith<string | null>(''), // Explicitly define type\n combineLatestWith(this.countries$), // Ensure correct tuple structure\n map(([search, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n // Define expected tuple\n return countries.filter((country: OnemrvaMaterialCountry) => {\n if (!search || search.trim() === '') return true; // Return all when search is empty\n return country.name?.toLowerCase().includes(search.toLowerCase());\n });\n }),\n );\n }\n\n get number(): FormControl {\n return this.phoneNumber as FormControl;\n }\n\n ngOnInit(): void {\n this.number.valueChanges\n .pipe(\n startWith(this.number.getRawValue()),\n takeUntil(this.destroyNotifier$),\n )\n .subscribe(number => {\n if (number !== '') {\n if (number.substring(0, 1) !== '+')\n this.countryCode.setValue('', { emitEvent: false });\n if (number === '0') {\n this.cdn\n .findCountryFromPrefix(this.defaultPrefix)\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n if (country) {\n //this.getCountry.next(country);\n this.number.setValue(this.defaultPrefix, {\n emitEvent: false,\n });\n this.countryCode.setValue(country.code, { emitEvent: false });\n } else {\n this.countryCode.setValue('');\n }\n this.formatPhoneNumber();\n });\n } else {\n this.cdn\n .findCountryFromPrefix(number)\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n if (country) {\n //this.getCountry.next(country);\n this.countryCode.setValue(country.code);\n } else {\n this.countryCode.setValue('');\n }\n this.formatPhoneNumber();\n });\n }\n }\n });\n\n this.countryCode.valueChanges\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(value => {\n let number = this.number.getRawValue();\n zip(\n this.cdn.findCountryFromPrefix(number),\n this.cdn.findCountryFromCode(value),\n ).subscribe(([countryFromVies, countryFromCode]) => {\n // Perform your action here using countryFromVies and countryFromCode\n if (countryFromVies) {\n number = number.replace(countryFromVies.dial_code, '');\n }\n if (countryFromCode) {\n this.getCountry.next(countryFromCode);\n if (number.substring(0, 1) === '+') {\n number = number.replace('+', '');\n }\n number = countryFromCode.dial_code + number;\n this.number.setValue(number, { emitEvent: false });\n this.formatPhoneNumber();\n }\n setTimeout(() => {\n this.numberInput.nativeElement.focus();\n }, 200);\n });\n });\n }\n\n handleClick(e: any) {\n e.stopPropagation();\n }\n\n private clearValidators() {\n let required = false;\n if (this.number.hasValidator(Validators.required)) {\n required = true;\n }\n this.number.clearValidators();\n if (required) {\n this.number.addValidators(Validators.required);\n }\n }\n\n private formatPhoneNumber() {\n this.clearValidators();\n if (this.countryCode.getRawValue() !== '') {\n this.number.addValidators([\n this.phoneNumberValidator(this.countryCode.getRawValue()),\n ]);\n }\n try {\n const parsedPhone = parsePhoneNumber(this.number.getRawValue());\n const code = parsedPhone?.country;\n if (code) {\n this.countryCode.setValue(code, { emitEvent: false });\n this.clearValidators();\n this.number.addValidators([this.phoneNumberValidator(code)]);\n this.number.setValue(parsedPhone?.format('INTERNATIONAL'), {\n emitEvent: false,\n });\n } else {\n this.number.addValidators([genericValidator('input.phone.invalid')]);\n }\n } catch (e: any) {\n this.number.addValidators([genericValidator(e.message)]);\n }\n }\n\n ngOnDestroy() {\n this.destroyNotifier$.next();\n this.destroyNotifier$.complete();\n }\n\n errors() {\n for (const k in this.number.errors) {\n if (k === 'required') {\n return 'input.phone.required';\n } else {\n return 'input.phone.invalid';\n }\n }\n return 'input.phone.unknown.error';\n }\n\n phoneNumberValidator(code: string): ValidatorFn {\n return (_control: AbstractControl): ValidationErrors | null => {\n let number: string = code + _control.getRawValue();\n\n if (number === '') {\n return null;\n }\n\n try {\n number = number.replace(code, '');\n const parsedNumber = parsePhoneNumber(number);\n\n if (parsedNumber?.isValid()) {\n return null;\n }\n } catch (e: any) {\n console.warn(e.message);\n return { phoneNumber: { value: 'input.phone.invalid' } };\n }\n return { phoneNumber: { value: 'input.phone.invalid' } };\n };\n }\n}\n\nfunction genericValidator(message: string): ValidatorFn {\n return (_control: AbstractControl): ValidationErrors | null => {\n return { phoneNumber: { value: message } };\n };\n}\n","<ng-container>\n <mat-form-field class=\"onemrva-input-phone-number\">\n <mat-label>{{ label }}</mat-label>\n\n <input\n (click)=\"handleClick($event)\"\n type=\"tel\"\n matInput\n phoneNumber\n #numberInput\n [placeholder]=\"placeholder\"\n [formControl]=\"phoneNumber\"\n class=\"onemrva-text-number\"\n [readOnly]=\"readonly\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />\n &nbsp;&nbsp;&nbsp;\n {{ country.name }}\n &nbsp;&nbsp;&nbsp;\n <span class=\"dialcode\">\n {{ country.dial_code }}\n </span>\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-phone.component';\nexport * from './src/phone-number.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAMa,oBAAoB,CAAA;AACM,IAAA,SAAS,CAAC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c;wBACd,kBAAkB;wBAClB,eAAe;wBACf,qBAAqB;wBACrB,mBAAmB;wBACnB,eAAe;wBACf,oBAAoB;wBACpB,iBAAiB;qBAClB,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2gDAAA,EAAA,MAAA,EAAA,CAAA,ioBAAA,CAAA,EAAA;wDAIrC,QAAQ,EAAA,CAAA;sBADP;gBAGQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,aAAa,EAAA,CAAA;sBAArB;gBACQ,eAAe,EAAA,CAAA;sBAAvB;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACyB,WAAW,EAAA,CAAA;sBAApC,SAAS;uBAAC,aAAa;;AAuL1B,SAAS,gBAAgB,CAAC,OAAe,EAAA;IACvC,OAAO,CAAC,QAAyB,KAA6B;QAC5D,OAAO,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;AAC5C,KAAC;AACH;;AEtQA;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,210 @@
1
+ import * as i0 from '@angular/core';
2
+ import { HostBinding, Input, ViewChild, Component, NgModule } from '@angular/core';
3
+ import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
4
+
5
+ let NEXT_ID = 0;
6
+ class OnemrvaMatMessageBoxComponent {
7
+ constructor() {
8
+ this.label = false;
9
+ this.messageCode = '';
10
+ /**
11
+ * Returns the `aria-label` attribute of the element.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * let elementLabel = this.<element>.ariaLabel;
16
+ * ```
17
+ *
18
+ */
19
+ this.ariaLabel = 'message-box';
20
+ this.showIcon = true;
21
+ /**
22
+ * Returns the `role` attribute of the element.
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * let elementRole = this.<element>.role;
27
+ * ```
28
+ */
29
+ this.role = 'alert';
30
+ /**
31
+ * Host `class.onemrva-mat-message-box` binding.
32
+ *
33
+ * @hidden
34
+ * @internal
35
+ */
36
+ this.cssClass = 'onemrva-mat-message-box';
37
+ /**
38
+ * Sets the `id` of the element. If not set, the first component instance will have `id` = `"onemrva-mat-*-0"`.
39
+ *
40
+ * @example
41
+ * ```html
42
+ * <onemrva-mat-* id="my-first-*"></onemrva-mat-*>
43
+ * ```
44
+ */
45
+ this.id = `onemrva-mat-message-box-${NEXT_ID++}`;
46
+ /**
47
+ * Sets the `data-cy` of the element. If not set, the first component instance will have `data-cy` = `"onemrva-mat-*-0"`.
48
+ *
49
+ * @example
50
+ * ```html
51
+ * <onemrva-mat-* id="my-first-*"></onemrva-mat-*>
52
+ * ```
53
+ */
54
+ this.dataCy = `onemrva-mat-message-box-${NEXT_ID++}`;
55
+ /**
56
+ * @hidden
57
+ * @internal
58
+ */
59
+ this._color = OnemrvaMatColor.NONE;
60
+ }
61
+ /**
62
+ * Returns the color of the element.
63
+ *
64
+ * @example
65
+ * ```typescript
66
+ * let color = this.<element>.color;
67
+ * ```
68
+ */
69
+ get color() {
70
+ return this._color;
71
+ }
72
+ /**
73
+ * Sets the size of the element.
74
+ * By default, the size is `"small"`. It can be set to `"medium"` or `"large"`.
75
+ *
76
+ * @example
77
+ * ```html
78
+ * <onemrva-mat-* size="large"></onemrva-mat-*>
79
+ * ```
80
+ */
81
+ set color(value) {
82
+ switch (value) {
83
+ case OnemrvaMatColor.SUCCESS:
84
+ case OnemrvaMatColor.WARN:
85
+ case OnemrvaMatColor.NONE:
86
+ case OnemrvaMatColor.INFO:
87
+ case OnemrvaMatColor.GRAYSCALE:
88
+ case OnemrvaMatColor.PRIMARY:
89
+ case OnemrvaMatColor.NEUTRAL:
90
+ case OnemrvaMatColor.ERROR:
91
+ this._color = value;
92
+ break;
93
+ default:
94
+ this._color = OnemrvaMatColor.INFO;
95
+ }
96
+ }
97
+ /** @hidden @internal */
98
+ get _isError() {
99
+ return this.color === OnemrvaMatColor.ERROR;
100
+ }
101
+ /** @hidden @internal */
102
+ get _isWarn() {
103
+ return this.color === OnemrvaMatColor.WARN;
104
+ }
105
+ /** @hidden @internal */
106
+ get _isSuccess() {
107
+ return this.color === OnemrvaMatColor.SUCCESS;
108
+ }
109
+ /** @hidden @internal */
110
+ get _isPrimary() {
111
+ return this.color === OnemrvaMatColor.PRIMARY;
112
+ }
113
+ /** @hidden @internal */
114
+ get isGrayscale() {
115
+ return (this.color === OnemrvaMatColor.GRAYSCALE ||
116
+ this.color === OnemrvaMatColor.NONE);
117
+ }
118
+ /** @hidden @internal */
119
+ get _isInfo() {
120
+ return (this.color !== OnemrvaMatColor.ERROR &&
121
+ this.color !== OnemrvaMatColor.WARN &&
122
+ this.color !== OnemrvaMatColor.NONE &&
123
+ this.color !== OnemrvaMatColor.ACCENT &&
124
+ this.color !== OnemrvaMatColor.GRAYSCALE &&
125
+ this.color !== OnemrvaMatColor.PRIMARY &&
126
+ this.color !== OnemrvaMatColor.SUCCESS);
127
+ }
128
+ ngAfterViewInit() {
129
+ if (this.messageCode !== '') {
130
+ console.warn('messageCode input has been deprecated in message-box component, please review documentation to fix this!');
131
+ this.mbcontent.nativeElement.insertAdjacentHTML('beforeend', this.messageCode);
132
+ }
133
+ }
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMessageBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
135
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaMatMessageBoxComponent, isStandalone: true, selector: "onemrva-mat-message-box", inputs: { label: "label", messageCode: "messageCode", id: "id", dataCy: "dataCy", color: "color" }, host: { properties: { "attr.aria-label": "this.ariaLabel", "class.show-icon": "this.showIcon", "attr.role": "this.role", "class.onemrva-mat-message-box": "this.cssClass", "attr.id": "this.id", "attr.data-cy": "this.dataCy", "class.mat-error": "this._isError", "class.mat-warn": "this._isWarn", "class.mat-success": "this._isSuccess", "class.mat-primary": "this._isPrimary", "class.mat-neutral": "this.isGrayscale", "class.mat-info": "this._isInfo" } }, viewQueries: [{ propertyName: "mbcontent", first: true, predicate: ["mbcontent"], descendants: true }], ngImport: i0, template: "<div #mbcontent>\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-flex;align-items:center;position:relative;padding:var(--spacer) var(--spacer) var(--spacer) var(--half-spacer);border-radius:var(--half-spacer);gap:var(--spacer);font:var(--mat-sys-body-small);background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}:host onemrva-mat-sticker{line-height:calc(var(--spacer) * 2.25);margin-right:var(--double-spacer)}\n"] }); }
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMessageBoxComponent, decorators: [{
138
+ type: Component,
139
+ args: [{ selector: 'onemrva-mat-message-box', standalone: true, template: "<div #mbcontent>\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-flex;align-items:center;position:relative;padding:var(--spacer) var(--spacer) var(--spacer) var(--half-spacer);border-radius:var(--half-spacer);gap:var(--spacer);font:var(--mat-sys-body-small);background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}:host onemrva-mat-sticker{line-height:calc(var(--spacer) * 2.25);margin-right:var(--double-spacer)}\n"] }]
140
+ }], propDecorators: { label: [{
141
+ type: Input
142
+ }], messageCode: [{
143
+ type: Input
144
+ }], mbcontent: [{
145
+ type: ViewChild,
146
+ args: ['mbcontent']
147
+ }], ariaLabel: [{
148
+ type: HostBinding,
149
+ args: ['attr.aria-label']
150
+ }], showIcon: [{
151
+ type: HostBinding,
152
+ args: ['class.show-icon']
153
+ }], role: [{
154
+ type: HostBinding,
155
+ args: ['attr.role']
156
+ }], cssClass: [{
157
+ type: HostBinding,
158
+ args: ['class.onemrva-mat-message-box']
159
+ }], id: [{
160
+ type: HostBinding,
161
+ args: ['attr.id']
162
+ }, {
163
+ type: Input
164
+ }], dataCy: [{
165
+ type: HostBinding,
166
+ args: ['attr.data-cy']
167
+ }, {
168
+ type: Input
169
+ }], color: [{
170
+ type: Input
171
+ }], _isError: [{
172
+ type: HostBinding,
173
+ args: ['class.mat-error']
174
+ }], _isWarn: [{
175
+ type: HostBinding,
176
+ args: ['class.mat-warn']
177
+ }], _isSuccess: [{
178
+ type: HostBinding,
179
+ args: ['class.mat-success']
180
+ }], _isPrimary: [{
181
+ type: HostBinding,
182
+ args: ['class.mat-primary']
183
+ }], isGrayscale: [{
184
+ type: HostBinding,
185
+ args: ['class.mat-neutral']
186
+ }], _isInfo: [{
187
+ type: HostBinding,
188
+ args: ['class.mat-info']
189
+ }] } });
190
+
191
+ class OnemrvaMatMessageBoxModule {
192
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMessageBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
193
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMessageBoxModule, imports: [OnemrvaMatMessageBoxComponent] }); }
194
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMessageBoxModule }); }
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMessageBoxModule, decorators: [{
197
+ type: NgModule,
198
+ args: [{
199
+ declarations: [],
200
+ imports: [OnemrvaMatMessageBoxComponent],
201
+ exports: [],
202
+ }]
203
+ }] });
204
+
205
+ /**
206
+ * Generated bundle index. Do not edit.
207
+ */
208
+
209
+ export { OnemrvaMatMessageBoxComponent, OnemrvaMatMessageBoxModule };
210
+ //# sourceMappingURL=onemrvapublic-design-system-mat-message-box.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-message-box.mjs","sources":["../../../../projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.component.ts","../../../../projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.component.html","../../../../projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.module.ts","../../../../projects/onemrva/design-system/mat-message-box/onemrvapublic-design-system-mat-message-box.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n ElementRef,\n HostBinding,\n Input,\n ViewChild,\n} from '@angular/core';\nimport { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';\n\nlet NEXT_ID = 0;\n\n@Component({\n selector: 'onemrva-mat-message-box',\n templateUrl: 'onemrva-mat-message-box.component.html',\n styleUrl: 'onemrva-mat-message-box.component.scss',\n standalone: true,\n})\nexport class OnemrvaMatMessageBoxComponent implements AfterViewInit {\n @Input()\n public label: false | string = false;\n\n @Input()\n public messageCode = '';\n\n @ViewChild('mbcontent')\n public mbcontent!: ElementRef;\n /**\n * Returns the `aria-label` attribute of the element.\n *\n * @example\n * ```typescript\n * let elementLabel = this.<element>.ariaLabel;\n * ```\n *\n */\n @HostBinding('attr.aria-label')\n public ariaLabel = 'message-box';\n\n @HostBinding('class.show-icon')\n public showIcon = true;\n\n /**\n * Returns the `role` attribute of the element.\n *\n * @example\n * ```typescript\n * let elementRole = this.<element>.role;\n * ```\n */\n @HostBinding('attr.role')\n public role = 'alert';\n\n /**\n * Host `class.onemrva-mat-message-box` binding.\n *\n * @hidden\n * @internal\n */\n @HostBinding('class.onemrva-mat-message-box')\n public cssClass = 'onemrva-mat-message-box';\n\n /**\n * Sets the `id` of the element. If not set, the first component instance will have `id` = `\"onemrva-mat-*-0\"`.\n *\n * @example\n * ```html\n * <onemrva-mat-* id=\"my-first-*\"></onemrva-mat-*>\n * ```\n */\n @HostBinding('attr.id')\n @Input()\n public id = `onemrva-mat-message-box-${NEXT_ID++}`;\n\n /**\n * Sets the `data-cy` of the element. If not set, the first component instance will have `data-cy` = `\"onemrva-mat-*-0\"`.\n *\n * @example\n * ```html\n * <onemrva-mat-* id=\"my-first-*\"></onemrva-mat-*>\n * ```\n */\n @HostBinding('attr.data-cy')\n @Input()\n public dataCy = `onemrva-mat-message-box-${NEXT_ID++}`;\n\n /**\n * @hidden\n * @internal\n */\n private _color: OnemrvaMatColor = OnemrvaMatColor.NONE;\n\n /**\n * Returns the color of the element.\n *\n * @example\n * ```typescript\n * let color = this.<element>.color;\n * ```\n */\n @Input()\n public get color(): OnemrvaMatColor {\n return this._color;\n }\n\n /**\n * Sets the size of the element.\n * By default, the size is `\"small\"`. It can be set to `\"medium\"` or `\"large\"`.\n *\n * @example\n * ```html\n * <onemrva-mat-* size=\"large\"></onemrva-mat-*>\n * ```\n */\n public set color(value: OnemrvaMatColor) {\n switch (value) {\n case OnemrvaMatColor.SUCCESS:\n case OnemrvaMatColor.WARN:\n case OnemrvaMatColor.NONE:\n case OnemrvaMatColor.INFO:\n case OnemrvaMatColor.GRAYSCALE:\n case OnemrvaMatColor.PRIMARY:\n case OnemrvaMatColor.NEUTRAL:\n case OnemrvaMatColor.ERROR:\n this._color = value;\n break;\n default:\n this._color = OnemrvaMatColor.INFO;\n }\n }\n\n /** @hidden @internal */\n @HostBinding('class.mat-error')\n public get _isError(): boolean {\n return this.color === OnemrvaMatColor.ERROR;\n }\n /** @hidden @internal */\n @HostBinding('class.mat-warn')\n public get _isWarn(): boolean {\n return this.color === OnemrvaMatColor.WARN;\n }\n /** @hidden @internal */\n @HostBinding('class.mat-success')\n public get _isSuccess(): boolean {\n return this.color === OnemrvaMatColor.SUCCESS;\n }\n /** @hidden @internal */\n @HostBinding('class.mat-primary')\n public get _isPrimary(): boolean {\n return this.color === OnemrvaMatColor.PRIMARY;\n }\n /** @hidden @internal */\n @HostBinding('class.mat-neutral')\n public get isGrayscale(): boolean {\n return (\n this.color === OnemrvaMatColor.GRAYSCALE ||\n this.color === OnemrvaMatColor.NONE\n );\n }\n /** @hidden @internal */\n @HostBinding('class.mat-info')\n public get _isInfo(): boolean {\n return (\n this.color !== OnemrvaMatColor.ERROR &&\n this.color !== OnemrvaMatColor.WARN &&\n this.color !== OnemrvaMatColor.NONE &&\n this.color !== OnemrvaMatColor.ACCENT &&\n this.color !== OnemrvaMatColor.GRAYSCALE &&\n this.color !== OnemrvaMatColor.PRIMARY &&\n this.color !== OnemrvaMatColor.SUCCESS\n );\n }\n\n ngAfterViewInit(): void {\n if (this.messageCode !== '') {\n console.warn(\n 'messageCode input has been deprecated in message-box component, please review documentation to fix this!',\n );\n this.mbcontent.nativeElement.insertAdjacentHTML(\n 'beforeend',\n this.messageCode,\n );\n }\n }\n}\n","<div #mbcontent>\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { OnemrvaMatMessageBoxComponent } from './onemrva-mat-message-box.component';\n\n@NgModule({\n declarations: [],\n imports: [OnemrvaMatMessageBoxComponent],\n exports: [],\n})\nexport class OnemrvaMatMessageBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAUA,IAAI,OAAO,GAAG,CAAC;MAQF,6BAA6B,CAAA;AAN1C,IAAA,WAAA,GAAA;QAQS,IAAA,CAAA,KAAK,GAAmB,KAAK;QAG7B,IAAA,CAAA,WAAW,GAAG,EAAE;AAIvB;;;;;;;;AAQG;QAEI,IAAA,CAAA,SAAS,GAAG,aAAa;QAGzB,IAAA,CAAA,QAAQ,GAAG,IAAI;AAEtB;;;;;;;AAOG;QAEI,IAAA,CAAA,IAAI,GAAG,OAAO;AAErB;;;;;AAKG;QAEI,IAAA,CAAA,QAAQ,GAAG,yBAAyB;AAE3C;;;;;;;AAOG;AAGI,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,wBAAA,EAA2B,OAAO,EAAE,EAAE;AAElD;;;;;;;AAOG;AAGI,QAAA,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