@ngstarter-ui/components 22.3.5 → 22.4.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 (476) hide show
  1. package/README.md +27 -0
  2. package/ai/component-registry.json +186 -101
  3. package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
  4. package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
  5. package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
  6. package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
  7. package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
  8. package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
  9. package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
  10. package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
  11. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
  12. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
  13. package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
  14. package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
  15. package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
  16. package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
  17. package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
  18. package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
  19. package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
  20. package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
  21. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
  22. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
  23. package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
  24. package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
  25. package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
  26. package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
  27. package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
  28. package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
  29. package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
  30. package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
  31. package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
  32. package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
  33. package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
  34. package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
  35. package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
  36. package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
  37. package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
  38. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
  39. package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
  40. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
  42. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
  44. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
  46. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
  48. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
  50. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
  52. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
  54. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
  56. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
  58. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
  60. package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
  62. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
  64. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
  66. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
  68. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
  70. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
  71. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
  72. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
  73. package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
  74. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
  76. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
  77. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
  78. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
  79. package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
  80. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
  81. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
  82. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
  83. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
  84. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
  85. package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
  86. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
  88. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
  89. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
  90. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
  91. package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
  92. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  93. package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
  94. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
  95. package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
  96. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
  97. package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
  98. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
  99. package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
  100. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  101. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
  102. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
  103. package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
  104. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  105. package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
  106. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  107. package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
  108. package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
  109. package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
  110. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
  111. package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
  112. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
  113. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
  114. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
  115. package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
  116. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
  117. package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
  118. package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
  119. package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
  120. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
  121. package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
  122. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
  123. package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
  124. package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
  125. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
  126. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  127. package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
  128. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  129. package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
  130. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
  131. package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
  132. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
  133. package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
  134. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
  135. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
  136. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
  137. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
  138. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  139. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
  140. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
  141. package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
  142. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
  143. package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
  144. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  145. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
  146. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
  147. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
  148. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
  149. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
  150. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
  151. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
  152. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
  153. package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
  154. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
  155. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
  156. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
  157. package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
  158. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
  159. package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
  160. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
  161. package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
  162. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
  163. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
  164. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  165. package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
  166. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
  167. package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
  168. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
  169. package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
  170. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
  171. package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
  172. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
  173. package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
  174. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
  175. package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
  176. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  177. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
  178. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
  179. package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
  180. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
  181. package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
  182. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
  183. package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
  184. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
  185. package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
  186. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
  187. package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
  188. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
  189. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
  190. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
  191. package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
  192. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
  193. package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
  194. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
  195. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
  196. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  197. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
  198. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
  199. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
  200. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  201. package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
  202. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  203. package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
  204. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
  205. package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
  206. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
  207. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
  208. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
  209. package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
  210. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
  211. package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
  212. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
  213. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
  214. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
  215. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
  216. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
  217. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
  218. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
  219. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
  220. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
  221. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
  222. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
  223. package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
  224. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
  225. package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
  226. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
  227. package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
  228. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
  229. package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
  230. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
  231. package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
  232. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
  233. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
  234. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  235. package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
  236. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
  237. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
  238. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
  239. package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
  240. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
  241. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
  242. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
  243. package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
  244. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  245. package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
  246. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
  247. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
  248. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
  249. package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
  250. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
  251. package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
  252. package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
  253. package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
  255. package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
  257. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
  259. package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
  260. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  261. package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
  263. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
  264. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
  265. package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
  266. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
  267. package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
  268. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
  269. package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
  270. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
  271. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
  272. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
  273. package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
  274. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  275. package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
  276. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
  277. package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
  278. package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
  279. package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
  280. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
  281. package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
  282. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
  283. package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
  285. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
  287. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
  289. package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
  290. package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
  291. package/fesm2022/ngstarter-ui-components.mjs +3 -5
  292. package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
  293. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
  294. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
  295. package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
  296. package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
  297. package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
  298. package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
  299. package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
  300. package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
  301. package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
  302. package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
  303. package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
  304. package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
  305. package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
  306. package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
  307. package/package.json +11 -10
  308. package/styles/_tokens.scss +1 -0
  309. package/types/ngstarter-ui-components-action-required.d.ts +34 -14
  310. package/types/ngstarter-ui-components-alert.d.ts +53 -44
  311. package/types/ngstarter-ui-components-announcement.d.ts +74 -53
  312. package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
  313. package/types/ngstarter-ui-components-avatar.d.ts +113 -66
  314. package/types/ngstarter-ui-components-badge.d.ts +73 -37
  315. package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
  316. package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
  317. package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
  318. package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
  319. package/types/ngstarter-ui-components-button.d.ts +69 -27
  320. package/types/ngstarter-ui-components-calendar.d.ts +123 -71
  321. package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
  322. package/types/ngstarter-ui-components-card.d.ts +75 -71
  323. package/types/ngstarter-ui-components-carousel.d.ts +115 -69
  324. package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
  325. package/types/ngstarter-ui-components-chips.d.ts +288 -195
  326. package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
  327. package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
  328. package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
  329. package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
  330. package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
  331. package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
  332. package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
  333. package/types/ngstarter-ui-components-confirm.d.ts +24 -29
  334. package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
  335. package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
  336. package/types/ngstarter-ui-components-core.d.ts +513 -467
  337. package/types/ngstarter-ui-components-country-select.d.ts +170 -97
  338. package/types/ngstarter-ui-components-crop.d.ts +67 -52
  339. package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
  340. package/types/ngstarter-ui-components-data-view.d.ts +811 -567
  341. package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
  342. package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
  343. package/types/ngstarter-ui-components-dialog.d.ts +138 -116
  344. package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
  345. package/types/ngstarter-ui-components-divider.d.ts +29 -17
  346. package/types/ngstarter-ui-components-drawer.d.ts +39 -30
  347. package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
  348. package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
  349. package/types/ngstarter-ui-components-events.d.ts +73 -57
  350. package/types/ngstarter-ui-components-expand.d.ts +55 -25
  351. package/types/ngstarter-ui-components-expansion.d.ts +93 -64
  352. package/types/ngstarter-ui-components-file-type.d.ts +53 -27
  353. package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
  354. package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
  355. package/types/ngstarter-ui-components-form-field.d.ts +116 -105
  356. package/types/ngstarter-ui-components-gauge.d.ts +32 -20
  357. package/types/ngstarter-ui-components-grid.d.ts +66 -50
  358. package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
  359. package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
  360. package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
  361. package/types/ngstarter-ui-components-icon.d.ts +39 -38
  362. package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
  363. package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
  364. package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
  365. package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
  366. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
  367. package/types/ngstarter-ui-components-incidents.d.ts +97 -104
  368. package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
  369. package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
  370. package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
  371. package/types/ngstarter-ui-components-input.d.ts +82 -54
  372. package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
  373. package/types/ngstarter-ui-components-kbd.d.ts +8 -12
  374. package/types/ngstarter-ui-components-layout.d.ts +131 -87
  375. package/types/ngstarter-ui-components-list.d.ts +123 -88
  376. package/types/ngstarter-ui-components-logo.d.ts +21 -21
  377. package/types/ngstarter-ui-components-marquee.d.ts +41 -34
  378. package/types/ngstarter-ui-components-menu.d.ts +329 -221
  379. package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
  380. package/types/ngstarter-ui-components-navigation.d.ts +186 -125
  381. package/types/ngstarter-ui-components-notifications.d.ts +104 -89
  382. package/types/ngstarter-ui-components-number-input.d.ts +138 -96
  383. package/types/ngstarter-ui-components-option.d.ts +102 -68
  384. package/types/ngstarter-ui-components-overlay.d.ts +7 -12
  385. package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
  386. package/types/ngstarter-ui-components-paginator.d.ts +171 -129
  387. package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
  388. package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
  389. package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
  390. package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
  391. package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
  392. package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
  393. package/types/ngstarter-ui-components-popover.d.ts +128 -89
  394. package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
  395. package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
  396. package/types/ngstarter-ui-components-radio.d.ts +100 -47
  397. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
  398. package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
  399. package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
  400. package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
  401. package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
  402. package/types/ngstarter-ui-components-segmented.d.ts +93 -61
  403. package/types/ngstarter-ui-components-select.d.ts +366 -266
  404. package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
  405. package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
  406. package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
  407. package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
  408. package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
  409. package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
  410. package/types/ngstarter-ui-components-slider.d.ts +123 -82
  411. package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
  412. package/types/ngstarter-ui-components-sort.d.ts +99 -63
  413. package/types/ngstarter-ui-components-spinner.d.ts +49 -27
  414. package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
  415. package/types/ngstarter-ui-components-split.d.ts +276 -195
  416. package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
  417. package/types/ngstarter-ui-components-stepper.d.ts +57 -43
  418. package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
  419. package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
  420. package/types/ngstarter-ui-components-table.d.ts +256 -228
  421. package/types/ngstarter-ui-components-tabs.d.ts +231 -138
  422. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
  423. package/types/ngstarter-ui-components-tiles.d.ts +166 -104
  424. package/types/ngstarter-ui-components-timeline.d.ts +45 -57
  425. package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
  426. package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
  427. package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
  428. package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
  429. package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
  430. package/types/ngstarter-ui-components-tree.d.ts +355 -229
  431. package/types/ngstarter-ui-components-upload.d.ts +216 -131
  432. package/types/ngstarter-ui-components-video-player.d.ts +130 -67
  433. package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
  434. package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
  435. package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
  436. package/types/ngstarter-ui-components.d.ts +2 -2
  437. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
  443. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
  444. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
  445. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
  446. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
  447. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
  471. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
  472. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
  473. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
  475. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
  476. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
@@ -1,773 +1,2084 @@
1
- import { FocusMonitor } from '@angular/cdk/a11y';
2
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
3
- import * as i0 from '@angular/core';
4
- import { Injectable, inject, DestroyRef, ChangeDetectorRef, ElementRef, viewChild, signal, output, computed, input, booleanAttribute, effect, Input as Input$1, Optional, Self, ChangeDetectionStrategy, Component, Pipe } from '@angular/core';
5
- import * as i1 from '@angular/forms';
6
- import { NgForm, ReactiveFormsModule, FormsModule, NG_VALIDATORS } from '@angular/forms';
7
- import * as i2 from '@ngstarter-ui/components/core';
8
- import { ErrorStateMatcher, Ripple } from '@ngstarter-ui/components/core';
9
- import { FormFieldControl } from '@ngstarter-ui/components/form-field';
10
- import { MenuTrigger, Menu, MenuHeader, MenuItem, MenuDivider } from '@ngstarter-ui/components/menu';
11
- import { parsePhoneNumber, parsePhoneNumberFromString, AsYouType } from 'libphonenumber-js';
12
- import { Subject } from 'rxjs';
13
- import { Icon } from '@ngstarter-ui/components/icon';
14
- import { Input } from '@ngstarter-ui/components/input';
15
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
16
- import { Button } from '@ngstarter-ui/components/button';
17
-
18
- class CountryCode {
19
- allCountries = [
20
- { name: "Afghanistan", shortCode: "af", phoneCode: "+93" },
21
- { name: "Albania", shortCode: "al", phoneCode: "+355" },
22
- { name: "Algeria", shortCode: "dz", phoneCode: "+213" },
23
- { name: "American Samoa", shortCode: "as", phoneCode: "+1-684" },
24
- { name: "Andorra", shortCode: "ad", phoneCode: "+376" },
25
- { name: "Angola", shortCode: "ao", phoneCode: "+244" },
26
- { name: "Anguilla", shortCode: "ai", phoneCode: "+1-264" },
27
- { name: "Antigua and Barbuda", shortCode: "ag", phoneCode: "+1-268" },
28
- { name: "Argentina", shortCode: "ar", phoneCode: "+54" },
29
- { name: "Armenia", shortCode: "am", phoneCode: "+374" },
30
- { name: "Aruba", shortCode: "aw", phoneCode: "+297" },
31
- { name: "Australia", shortCode: "au", phoneCode: "+61" },
32
- { name: "Austria", shortCode: "at", phoneCode: "+43" },
33
- { name: "Azerbaijan", shortCode: "az", phoneCode: "+994" },
34
- { name: "Bahamas", shortCode: "bs", phoneCode: "+1-242" },
35
- { name: "Bahrain", shortCode: "bh", phoneCode: "+973" },
36
- { name: "Bangladesh", shortCode: "bd", phoneCode: "+880" },
37
- { name: "Barbados", shortCode: "bb", phoneCode: "+1-246" },
38
- { name: "Belarus", shortCode: "by", phoneCode: "+375" },
39
- { name: "Belgium", shortCode: "be", phoneCode: "+32" },
40
- { name: "Belize", shortCode: "bz", phoneCode: "+501" },
41
- { name: "Benin", shortCode: "bj", phoneCode: "+229" },
42
- { name: "Bermuda", shortCode: "bm", phoneCode: "+1-441" },
43
- { name: "Bhutan", shortCode: "bt", phoneCode: "+975" },
44
- { name: "Bolivia", shortCode: "bo", phoneCode: "+591" },
45
- { name: "Bonaire, Sint Eustatius and Saba", shortCode: "bq", phoneCode: "+599" },
46
- { name: "Bosnia and Herzegovina", shortCode: "ba", phoneCode: "+387" },
47
- { name: "Botswana", shortCode: "bw", phoneCode: "+267" },
48
- { name: "Bouvet Island", shortCode: "bv", phoneCode: "" },
49
- { name: "Brazil", shortCode: "br", phoneCode: "+55" },
50
- { name: "British Indian Ocean Territory", shortCode: "io", phoneCode: "+246" },
51
- { name: "Brunei Darussalam", shortCode: "bn", phoneCode: "+673" },
52
- { name: "Bulgaria", shortCode: "bg", phoneCode: "+359" },
53
- { name: "Burkina Faso", shortCode: "bf", phoneCode: "+226" },
54
- { name: "Burundi", shortCode: "bi", phoneCode: "+257" },
55
- { name: "Cabo Verde", shortCode: "cv", phoneCode: "+238" },
56
- { name: "Cambodia", shortCode: "kh", phoneCode: "+855" },
57
- { name: "Cameroon", shortCode: "cm", phoneCode: "+237" },
58
- { name: "Canada", shortCode: "ca", phoneCode: "+1" },
59
- { name: "Cayman Islands", shortCode: "ky", phoneCode: "+1-345" },
60
- { name: "Central African Republic", shortCode: "cf", phoneCode: "+236" },
61
- { name: "Chad", shortCode: "td", phoneCode: "+235" },
62
- { name: "Chile", shortCode: "cl", phoneCode: "+56" },
63
- { name: "China", shortCode: "cn", phoneCode: "+86" },
64
- { name: "Christmas Island", shortCode: "cx", phoneCode: "+61" },
65
- { name: "Cocos (Keeling) Islands", shortCode: "cc", phoneCode: "+61" },
66
- { name: "Colombia", shortCode: "co", phoneCode: "+57" },
67
- { name: "Comoros", shortCode: "km", phoneCode: "+269" },
68
- { name: "Congo (DRC)", shortCode: "cd", phoneCode: "+243" },
69
- { name: "Congo (Republic)", shortCode: "cg", phoneCode: "+242" },
70
- { name: "Cook Islands", shortCode: "ck", phoneCode: "+682" },
71
- { name: "Costa Rica", shortCode: "cr", phoneCode: "+506" },
72
- { name: "Côte d'Ivoire", shortCode: "ci", phoneCode: "+225" },
73
- { name: "Croatia", shortCode: "hr", phoneCode: "+385" },
74
- { name: "Cuba", shortCode: "cu", phoneCode: "+53" },
75
- { name: "Curaçao", shortCode: "cw", phoneCode: "+599" },
76
- { name: "Cyprus", shortCode: "cy", phoneCode: "+357" },
77
- { name: "Czechia", shortCode: "cz", phoneCode: "+420" },
78
- { name: "Denmark", shortCode: "dk", phoneCode: "+45" },
79
- { name: "Djibouti", shortCode: "dj", phoneCode: "+253" },
80
- { name: "Dominica", shortCode: "dm", phoneCode: "+1-767" },
81
- { name: "Dominican Republic", shortCode: "do", phoneCode: "+1-809" },
82
- { name: "Ecuador", shortCode: "ec", phoneCode: "+593" },
83
- { name: "Egypt", shortCode: "eg", phoneCode: "+20" },
84
- { name: "El Salvador", shortCode: "sv", phoneCode: "+503" },
85
- { name: "Equatorial Guinea", shortCode: "gq", phoneCode: "+240" },
86
- { name: "Eritrea", shortCode: "er", phoneCode: "+291" },
87
- { name: "Estonia", shortCode: "ee", phoneCode: "+372" },
88
- { name: "Eswatini", shortCode: "sz", phoneCode: "+268" },
89
- { name: "Ethiopia", shortCode: "et", phoneCode: "+251" },
90
- { name: "Falkland Islands (Malvinas)", shortCode: "fk", phoneCode: "+500" },
91
- { name: "Faroe Islands", shortCode: "fo", phoneCode: "+298" },
92
- { name: "Fiji", shortCode: "fj", phoneCode: "+679" },
93
- { name: "Finland", shortCode: "fi", phoneCode: "+358" },
94
- { name: "France", shortCode: "fr", phoneCode: "+33" },
95
- { name: "French Guiana", shortCode: "gf", phoneCode: "+594" },
96
- { name: "French Polynesia", shortCode: "pf", phoneCode: "+689" },
97
- { name: "Gabon", shortCode: "ga", phoneCode: "+241" },
98
- { name: "Gambia", shortCode: "gm", phoneCode: "+220" },
99
- { name: "Georgia", shortCode: "ge", phoneCode: "+995" },
100
- { name: "Germany", shortCode: "de", phoneCode: "+49" },
101
- { name: "Ghana", shortCode: "gh", phoneCode: "+233" },
102
- { name: "Gibraltar", shortCode: "gi", phoneCode: "+350" },
103
- { name: "Greece", shortCode: "gr", phoneCode: "+30" },
104
- { name: "Greenland", shortCode: "gl", phoneCode: "+299" },
105
- { name: "Grenada", shortCode: "gd", phoneCode: "+1-473" },
106
- { name: "Guadeloupe", shortCode: "gp", phoneCode: "+590" },
107
- { name: "Guam", shortCode: "gu", phoneCode: "+1-671" },
108
- { name: "Guatemala", shortCode: "gt", phoneCode: "+502" },
109
- { name: "Guernsey", shortCode: "gg", phoneCode: "+44-1481" },
110
- { name: "Guinea", shortCode: "gn", phoneCode: "+224" },
111
- { name: "Guinea-Bissau", shortCode: "gw", phoneCode: "+245" },
112
- { name: "Guyana", shortCode: "gy", phoneCode: "+592" },
113
- { name: "Haiti", shortCode: "ht", phoneCode: "+509" },
114
- { name: "Honduras", shortCode: "hn", phoneCode: "+504" },
115
- { name: "Hong Kong", shortCode: "hk", phoneCode: "+852" },
116
- { name: "Hungary", shortCode: "hu", phoneCode: "+36" },
117
- { name: "Iceland", shortCode: "is", phoneCode: "+354" },
118
- { name: "India", shortCode: "in", phoneCode: "+91" },
119
- { name: "Indonesia", shortCode: "id", phoneCode: "+62" },
120
- { name: "Iran", shortCode: "ir", phoneCode: "+98" },
121
- { name: "Iraq", shortCode: "iq", phoneCode: "+964" },
122
- { name: "Ireland", shortCode: "ie", phoneCode: "+353" },
123
- { name: "Isle of Man", shortCode: "im", phoneCode: "+44-1624" },
124
- { name: "Israel", shortCode: "il", phoneCode: "+972" },
125
- { name: "Italy", shortCode: "it", phoneCode: "+39" },
126
- { name: "Jamaica", shortCode: "jm", phoneCode: "+1-876" },
127
- { name: "Japan", shortCode: "jp", phoneCode: "+81" },
128
- { name: "Jersey", shortCode: "je", phoneCode: "+44-1534" },
129
- { name: "Jordan", shortCode: "jo", phoneCode: "+962" },
130
- { name: "Kazakhstan", shortCode: "kz", phoneCode: "+7" },
131
- { name: "Kenya", shortCode: "ke", phoneCode: "+254" },
132
- { name: "Kiribati", shortCode: "ki", phoneCode: "+686" },
133
- { name: "Kuwait", shortCode: "kw", phoneCode: "+965" },
134
- { name: "Kyrgyzstan", shortCode: "kg", phoneCode: "+996" },
135
- { name: "Laos", shortCode: "la", phoneCode: "+856" },
136
- { name: "Latvia", shortCode: "lv", phoneCode: "+371" },
137
- { name: "Lebanon", shortCode: "lb", phoneCode: "+961" },
138
- { name: "Lesotho", shortCode: "ls", phoneCode: "+266" },
139
- { name: "Liberia", shortCode: "lr", phoneCode: "+231" },
140
- { name: "Libya", shortCode: "ly", phoneCode: "+218" },
141
- { name: "Liechtenstein", shortCode: "li", phoneCode: "+423" },
142
- { name: "Lithuania", shortCode: "lt", phoneCode: "+370" },
143
- { name: "Luxembourg", shortCode: "lu", phoneCode: "+352" },
144
- { name: "Macao", shortCode: "mo", phoneCode: "+853" },
145
- { name: "Madagascar", shortCode: "mg", phoneCode: "+261" },
146
- { name: "Malawi", shortCode: "mw", phoneCode: "+265" },
147
- { name: "Malaysia", shortCode: "my", phoneCode: "+60" },
148
- { name: "Maldives", shortCode: "mv", phoneCode: "+960" },
149
- { name: "Mali", shortCode: "ml", phoneCode: "+223" },
150
- { name: "Malta", shortCode: "mt", phoneCode: "+356" },
151
- { name: "Marshall Islands", shortCode: "mh", phoneCode: "+692" },
152
- { name: "Martinique", shortCode: "mq", phoneCode: "+596" },
153
- { name: "Mauritania", shortCode: "mr", phoneCode: "+222" },
154
- { name: "Mauritius", shortCode: "mu", phoneCode: "+230" },
155
- { name: "Mayotte", shortCode: "yt", phoneCode: "+262" },
156
- { name: "Mexico", shortCode: "mx", phoneCode: "+52" },
157
- { name: "Micronesia", shortCode: "fm", phoneCode: "+691" },
158
- { name: "Moldova", shortCode: "md", phoneCode: "+373" },
159
- { name: "Monaco", shortCode: "mc", phoneCode: "+377" },
160
- { name: "Mongolia", shortCode: "mn", phoneCode: "+976" },
161
- { name: "Montenegro", shortCode: "me", phoneCode: "+382" },
162
- { name: "Montserrat", shortCode: "ms", phoneCode: "+1-664" },
163
- { name: "Morocco", shortCode: "ma", phoneCode: "+212" },
164
- { name: "Mozambique", shortCode: "mz", phoneCode: "+258" },
165
- { name: "Myanmar", shortCode: "mm", phoneCode: "+95" },
166
- { name: "Namibia", shortCode: "na", phoneCode: "+264" },
167
- { name: "Nauru", shortCode: "nr", phoneCode: "+674" },
168
- { name: "Nepal", shortCode: "np", phoneCode: "+977" },
169
- { name: "Netherlands", shortCode: "nl", phoneCode: "+31" },
170
- { name: "New Caledonia", shortCode: "nc", phoneCode: "+687" },
171
- { name: "New Zealand", shortCode: "nz", phoneCode: "+64" },
172
- { name: "Nicaragua", shortCode: "ni", phoneCode: "+505" },
173
- { name: "Niger", shortCode: "ne", phoneCode: "+227" },
174
- { name: "Nigeria", shortCode: "ng", phoneCode: "+234" },
175
- { name: "Niue", shortCode: "nu", phoneCode: "+683" },
176
- { name: "Norfolk Island", shortCode: "nf", phoneCode: "+672" },
177
- { name: "North Korea", shortCode: "kp", phoneCode: "+850" },
178
- { name: "North Macedonia", shortCode: "mk", phoneCode: "+389" },
179
- { name: "Northern Mariana Islands", shortCode: "mp", phoneCode: "+1-670" },
180
- { name: "Norway", shortCode: "no", phoneCode: "+47" },
181
- { name: "Oman", shortCode: "om", phoneCode: "+968" },
182
- { name: "Pakistan", shortCode: "pk", phoneCode: "+92" },
183
- { name: "Palau", shortCode: "pw", phoneCode: "+680" },
184
- { name: "Palestine, State of", shortCode: "ps", phoneCode: "+970" },
185
- { name: "Panama", shortCode: "pa", phoneCode: "+507" },
186
- { name: "Papua New Guinea", shortCode: "pg", phoneCode: "+675" },
187
- { name: "Paraguay", shortCode: "py", phoneCode: "+595" },
188
- { name: "Peru", shortCode: "pe", phoneCode: "+51" },
189
- { name: "Philippines", shortCode: "ph", phoneCode: "+63" },
190
- { name: "Pitcairn Islands", shortCode: "pn", phoneCode: "+64" },
191
- { name: "Poland", shortCode: "pl", phoneCode: "+48" },
192
- { name: "Portugal", shortCode: "pt", phoneCode: "+351" },
193
- { name: "Puerto Rico", shortCode: "pr", phoneCode: "+1-787" },
194
- { name: "Qatar", shortCode: "qa", phoneCode: "+974" },
195
- { name: "Réunion", shortCode: "re", phoneCode: "+262" },
196
- { name: "Romania", shortCode: "ro", phoneCode: "+40" },
197
- { name: "Russia", shortCode: "ru", phoneCode: "+7" },
198
- { name: "Rwanda", shortCode: "rw", phoneCode: "+250" },
199
- { name: "Saint Barthélemy", shortCode: "bl", phoneCode: "+590" },
200
- { name: "Saint Helena, Ascension and Tristan da Cunha", shortCode: "sh", phoneCode: "+290" },
201
- { name: "Saint Kitts and Nevis", shortCode: "kn", phoneCode: "+1-869" },
202
- { name: "Saint Lucia", shortCode: "lc", phoneCode: "+1-758" },
203
- { name: "Saint Martin (French part)", shortCode: "mf", phoneCode: "+590" },
204
- { name: "Saint Pierre and Miquelon", shortCode: "pm", phoneCode: "+508" },
205
- { name: "Saint Vincent and the Grenadines", shortCode: "vc", phoneCode: "+1-784" },
206
- { name: "Samoa", shortCode: "ws", phoneCode: "+685" },
207
- { name: "San Marino", shortCode: "sm", phoneCode: "+378" },
208
- { name: "Sao Tome and Principe", shortCode: "st", phoneCode: "+239" },
209
- { name: "Saudi Arabia", shortCode: "sa", phoneCode: "+966" },
210
- { name: "Senegal", shortCode: "sn", phoneCode: "+221" },
211
- { name: "Serbia", shortCode: "rs", phoneCode: "+381" },
212
- { name: "Seychelles", shortCode: "sc", phoneCode: "+248" },
213
- { name: "Sierra Leone", shortCode: "sl", phoneCode: "+232" },
214
- { name: "Singapore", shortCode: "sg", phoneCode: "+65" },
215
- { name: "Sint Maarten (Dutch part)", shortCode: "sx", phoneCode: "+1-721" },
216
- { name: "Slovakia", shortCode: "sk", phoneCode: "+421" },
217
- { name: "Slovenia", shortCode: "si", phoneCode: "+386" },
218
- { name: "Solomon Islands", shortCode: "sb", phoneCode: "+677" },
219
- { name: "Somalia", shortCode: "so", phoneCode: "+252" },
220
- { name: "South Africa", shortCode: "za", phoneCode: "+27" },
221
- { name: "South Georgia and the South Sandwich Islands", shortCode: "gs", phoneCode: "+500" },
222
- { name: "South Korea", shortCode: "kr", phoneCode: "+82" },
223
- { name: "South Sudan", shortCode: "ss", phoneCode: "+211" },
224
- { name: "Spain", shortCode: "es", phoneCode: "+34" },
225
- { name: "Sri Lanka", shortCode: "lk", phoneCode: "+94" },
226
- { name: "Sudan", shortCode: "sd", phoneCode: "+249" },
227
- { name: "Suriname", shortCode: "sr", phoneCode: "+597" },
228
- { name: "Svalbard and Jan Mayen", shortCode: "sj", phoneCode: "+47" },
229
- { name: "Sweden", shortCode: "se", phoneCode: "+46" },
230
- { name: "Switzerland", shortCode: "ch", phoneCode: "+41" },
231
- { name: "Syria", shortCode: "sy", phoneCode: "+963" },
232
- { name: "Taiwan", shortCode: "tw", phoneCode: "+886" },
233
- { name: "Tajikistan", shortCode: "tj", phoneCode: "+992" },
234
- { name: "Tanzania", shortCode: "tz", phoneCode: "+255" },
235
- { name: "Thailand", shortCode: "th", phoneCode: "+66" },
236
- { name: "Timor-Leste", shortCode: "tl", phoneCode: "+670" },
237
- { name: "Togo", shortCode: "tg", phoneCode: "+228" },
238
- { name: "Tokelau", shortCode: "tk", phoneCode: "+690" },
239
- { name: "Tonga", shortCode: "to", phoneCode: "+676" },
240
- { name: "Trinidad and Tobago", shortCode: "tt", phoneCode: "+1-868" },
241
- { name: "Tunisia", shortCode: "tn", phoneCode: "+216" },
242
- { name: "Türkiye", shortCode: "tr", phoneCode: "+90" },
243
- { name: "Turkmenistan", shortCode: "tm", phoneCode: "+993" },
244
- { name: "Turks and Caicos Islands", shortCode: "tc", phoneCode: "+1-649" },
245
- { name: "Tuvalu", shortCode: "tv", phoneCode: "+688" },
246
- { name: "Uganda", shortCode: "ug", phoneCode: "+256" },
247
- { name: "Ukraine", shortCode: "ua", phoneCode: "+380" },
248
- { name: "United Arab Emirates", shortCode: "ae", phoneCode: "+971" },
249
- { name: "United Kingdom", shortCode: "gb", phoneCode: "+44" },
250
- { name: "United States", shortCode: "us", phoneCode: "+1" },
251
- { name: "Uruguay", shortCode: "uy", phoneCode: "+598" },
252
- { name: "Uzbekistan", shortCode: "uz", phoneCode: "+998" },
253
- { name: "Vanuatu", shortCode: "vu", phoneCode: "+678" },
254
- { name: "Vatican City", shortCode: "va", phoneCode: "+379" }, // Changed from +39-06 to specific Vatican code
255
- { name: "Venezuela", shortCode: "ve", phoneCode: "+58" },
256
- { name: "Vietnam", shortCode: "vn", phoneCode: "+84" },
257
- { name: "Virgin Islands (British)", shortCode: "vg", phoneCode: "+1-284" },
258
- { name: "Virgin Islands (U.S.)", shortCode: "vi", phoneCode: "+1-340" },
259
- { name: "Wallis and Futuna", shortCode: "wf", phoneCode: "+681" },
260
- { name: "Western Sahara", shortCode: "eh", phoneCode: "+212" },
261
- { name: "Yemen", shortCode: "ye", phoneCode: "+967" },
262
- { name: "Zambia", shortCode: "zm", phoneCode: "+260" },
263
- { name: "Zimbabwe", shortCode: "zw", phoneCode: "+263" },
264
- ];
265
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CountryCode, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
266
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CountryCode });
267
- }
268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CountryCode, decorators: [{
269
- type: Injectable
270
- }] });
271
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, ElementRef, Injectable, Pipe, booleanAttribute, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { Icon } from "@ngstarter-ui/components/icon";
4
+ import { Button } from "@ngstarter-ui/components/button";
5
+ import { ErrorStateMatcher, Ripple } from "@ngstarter-ui/components/core";
6
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
7
+ import { Subject } from "rxjs";
8
+ import { FormFieldControl } from "@ngstarter-ui/components/form-field";
9
+ import * as i1 from "@angular/forms";
10
+ import { FormsModule, NG_VALIDATORS, NgControl, NgForm } from "@angular/forms";
11
+ import { FocusMonitor } from "@angular/cdk/a11y";
12
+ import { Input as Input$1 } from "@ngstarter-ui/components/input";
13
+ import { Menu, MenuDivider, MenuHeader, MenuItem, MenuTrigger } from "@ngstarter-ui/components/menu";
14
+ import { AsYouType, parsePhoneNumber, parsePhoneNumberFromString } from "libphonenumber-js";
15
+ var CountryCode = class CountryCode {
16
+ allCountries = [
17
+ {
18
+ name: "Afghanistan",
19
+ shortCode: "af",
20
+ phoneCode: "+93"
21
+ },
22
+ {
23
+ name: "Albania",
24
+ shortCode: "al",
25
+ phoneCode: "+355"
26
+ },
27
+ {
28
+ name: "Algeria",
29
+ shortCode: "dz",
30
+ phoneCode: "+213"
31
+ },
32
+ {
33
+ name: "American Samoa",
34
+ shortCode: "as",
35
+ phoneCode: "+1-684"
36
+ },
37
+ {
38
+ name: "Andorra",
39
+ shortCode: "ad",
40
+ phoneCode: "+376"
41
+ },
42
+ {
43
+ name: "Angola",
44
+ shortCode: "ao",
45
+ phoneCode: "+244"
46
+ },
47
+ {
48
+ name: "Anguilla",
49
+ shortCode: "ai",
50
+ phoneCode: "+1-264"
51
+ },
52
+ {
53
+ name: "Antigua and Barbuda",
54
+ shortCode: "ag",
55
+ phoneCode: "+1-268"
56
+ },
57
+ {
58
+ name: "Argentina",
59
+ shortCode: "ar",
60
+ phoneCode: "+54"
61
+ },
62
+ {
63
+ name: "Armenia",
64
+ shortCode: "am",
65
+ phoneCode: "+374"
66
+ },
67
+ {
68
+ name: "Aruba",
69
+ shortCode: "aw",
70
+ phoneCode: "+297"
71
+ },
72
+ {
73
+ name: "Australia",
74
+ shortCode: "au",
75
+ phoneCode: "+61"
76
+ },
77
+ {
78
+ name: "Austria",
79
+ shortCode: "at",
80
+ phoneCode: "+43"
81
+ },
82
+ {
83
+ name: "Azerbaijan",
84
+ shortCode: "az",
85
+ phoneCode: "+994"
86
+ },
87
+ {
88
+ name: "Bahamas",
89
+ shortCode: "bs",
90
+ phoneCode: "+1-242"
91
+ },
92
+ {
93
+ name: "Bahrain",
94
+ shortCode: "bh",
95
+ phoneCode: "+973"
96
+ },
97
+ {
98
+ name: "Bangladesh",
99
+ shortCode: "bd",
100
+ phoneCode: "+880"
101
+ },
102
+ {
103
+ name: "Barbados",
104
+ shortCode: "bb",
105
+ phoneCode: "+1-246"
106
+ },
107
+ {
108
+ name: "Belarus",
109
+ shortCode: "by",
110
+ phoneCode: "+375"
111
+ },
112
+ {
113
+ name: "Belgium",
114
+ shortCode: "be",
115
+ phoneCode: "+32"
116
+ },
117
+ {
118
+ name: "Belize",
119
+ shortCode: "bz",
120
+ phoneCode: "+501"
121
+ },
122
+ {
123
+ name: "Benin",
124
+ shortCode: "bj",
125
+ phoneCode: "+229"
126
+ },
127
+ {
128
+ name: "Bermuda",
129
+ shortCode: "bm",
130
+ phoneCode: "+1-441"
131
+ },
132
+ {
133
+ name: "Bhutan",
134
+ shortCode: "bt",
135
+ phoneCode: "+975"
136
+ },
137
+ {
138
+ name: "Bolivia",
139
+ shortCode: "bo",
140
+ phoneCode: "+591"
141
+ },
142
+ {
143
+ name: "Bonaire, Sint Eustatius and Saba",
144
+ shortCode: "bq",
145
+ phoneCode: "+599"
146
+ },
147
+ {
148
+ name: "Bosnia and Herzegovina",
149
+ shortCode: "ba",
150
+ phoneCode: "+387"
151
+ },
152
+ {
153
+ name: "Botswana",
154
+ shortCode: "bw",
155
+ phoneCode: "+267"
156
+ },
157
+ {
158
+ name: "Bouvet Island",
159
+ shortCode: "bv",
160
+ phoneCode: ""
161
+ },
162
+ {
163
+ name: "Brazil",
164
+ shortCode: "br",
165
+ phoneCode: "+55"
166
+ },
167
+ {
168
+ name: "British Indian Ocean Territory",
169
+ shortCode: "io",
170
+ phoneCode: "+246"
171
+ },
172
+ {
173
+ name: "Brunei Darussalam",
174
+ shortCode: "bn",
175
+ phoneCode: "+673"
176
+ },
177
+ {
178
+ name: "Bulgaria",
179
+ shortCode: "bg",
180
+ phoneCode: "+359"
181
+ },
182
+ {
183
+ name: "Burkina Faso",
184
+ shortCode: "bf",
185
+ phoneCode: "+226"
186
+ },
187
+ {
188
+ name: "Burundi",
189
+ shortCode: "bi",
190
+ phoneCode: "+257"
191
+ },
192
+ {
193
+ name: "Cabo Verde",
194
+ shortCode: "cv",
195
+ phoneCode: "+238"
196
+ },
197
+ {
198
+ name: "Cambodia",
199
+ shortCode: "kh",
200
+ phoneCode: "+855"
201
+ },
202
+ {
203
+ name: "Cameroon",
204
+ shortCode: "cm",
205
+ phoneCode: "+237"
206
+ },
207
+ {
208
+ name: "Canada",
209
+ shortCode: "ca",
210
+ phoneCode: "+1"
211
+ },
212
+ {
213
+ name: "Cayman Islands",
214
+ shortCode: "ky",
215
+ phoneCode: "+1-345"
216
+ },
217
+ {
218
+ name: "Central African Republic",
219
+ shortCode: "cf",
220
+ phoneCode: "+236"
221
+ },
222
+ {
223
+ name: "Chad",
224
+ shortCode: "td",
225
+ phoneCode: "+235"
226
+ },
227
+ {
228
+ name: "Chile",
229
+ shortCode: "cl",
230
+ phoneCode: "+56"
231
+ },
232
+ {
233
+ name: "China",
234
+ shortCode: "cn",
235
+ phoneCode: "+86"
236
+ },
237
+ {
238
+ name: "Christmas Island",
239
+ shortCode: "cx",
240
+ phoneCode: "+61"
241
+ },
242
+ {
243
+ name: "Cocos (Keeling) Islands",
244
+ shortCode: "cc",
245
+ phoneCode: "+61"
246
+ },
247
+ {
248
+ name: "Colombia",
249
+ shortCode: "co",
250
+ phoneCode: "+57"
251
+ },
252
+ {
253
+ name: "Comoros",
254
+ shortCode: "km",
255
+ phoneCode: "+269"
256
+ },
257
+ {
258
+ name: "Congo (DRC)",
259
+ shortCode: "cd",
260
+ phoneCode: "+243"
261
+ },
262
+ {
263
+ name: "Congo (Republic)",
264
+ shortCode: "cg",
265
+ phoneCode: "+242"
266
+ },
267
+ {
268
+ name: "Cook Islands",
269
+ shortCode: "ck",
270
+ phoneCode: "+682"
271
+ },
272
+ {
273
+ name: "Costa Rica",
274
+ shortCode: "cr",
275
+ phoneCode: "+506"
276
+ },
277
+ {
278
+ name: "Côte d'Ivoire",
279
+ shortCode: "ci",
280
+ phoneCode: "+225"
281
+ },
282
+ {
283
+ name: "Croatia",
284
+ shortCode: "hr",
285
+ phoneCode: "+385"
286
+ },
287
+ {
288
+ name: "Cuba",
289
+ shortCode: "cu",
290
+ phoneCode: "+53"
291
+ },
292
+ {
293
+ name: "Curaçao",
294
+ shortCode: "cw",
295
+ phoneCode: "+599"
296
+ },
297
+ {
298
+ name: "Cyprus",
299
+ shortCode: "cy",
300
+ phoneCode: "+357"
301
+ },
302
+ {
303
+ name: "Czechia",
304
+ shortCode: "cz",
305
+ phoneCode: "+420"
306
+ },
307
+ {
308
+ name: "Denmark",
309
+ shortCode: "dk",
310
+ phoneCode: "+45"
311
+ },
312
+ {
313
+ name: "Djibouti",
314
+ shortCode: "dj",
315
+ phoneCode: "+253"
316
+ },
317
+ {
318
+ name: "Dominica",
319
+ shortCode: "dm",
320
+ phoneCode: "+1-767"
321
+ },
322
+ {
323
+ name: "Dominican Republic",
324
+ shortCode: "do",
325
+ phoneCode: "+1-809"
326
+ },
327
+ {
328
+ name: "Ecuador",
329
+ shortCode: "ec",
330
+ phoneCode: "+593"
331
+ },
332
+ {
333
+ name: "Egypt",
334
+ shortCode: "eg",
335
+ phoneCode: "+20"
336
+ },
337
+ {
338
+ name: "El Salvador",
339
+ shortCode: "sv",
340
+ phoneCode: "+503"
341
+ },
342
+ {
343
+ name: "Equatorial Guinea",
344
+ shortCode: "gq",
345
+ phoneCode: "+240"
346
+ },
347
+ {
348
+ name: "Eritrea",
349
+ shortCode: "er",
350
+ phoneCode: "+291"
351
+ },
352
+ {
353
+ name: "Estonia",
354
+ shortCode: "ee",
355
+ phoneCode: "+372"
356
+ },
357
+ {
358
+ name: "Eswatini",
359
+ shortCode: "sz",
360
+ phoneCode: "+268"
361
+ },
362
+ {
363
+ name: "Ethiopia",
364
+ shortCode: "et",
365
+ phoneCode: "+251"
366
+ },
367
+ {
368
+ name: "Falkland Islands (Malvinas)",
369
+ shortCode: "fk",
370
+ phoneCode: "+500"
371
+ },
372
+ {
373
+ name: "Faroe Islands",
374
+ shortCode: "fo",
375
+ phoneCode: "+298"
376
+ },
377
+ {
378
+ name: "Fiji",
379
+ shortCode: "fj",
380
+ phoneCode: "+679"
381
+ },
382
+ {
383
+ name: "Finland",
384
+ shortCode: "fi",
385
+ phoneCode: "+358"
386
+ },
387
+ {
388
+ name: "France",
389
+ shortCode: "fr",
390
+ phoneCode: "+33"
391
+ },
392
+ {
393
+ name: "French Guiana",
394
+ shortCode: "gf",
395
+ phoneCode: "+594"
396
+ },
397
+ {
398
+ name: "French Polynesia",
399
+ shortCode: "pf",
400
+ phoneCode: "+689"
401
+ },
402
+ {
403
+ name: "Gabon",
404
+ shortCode: "ga",
405
+ phoneCode: "+241"
406
+ },
407
+ {
408
+ name: "Gambia",
409
+ shortCode: "gm",
410
+ phoneCode: "+220"
411
+ },
412
+ {
413
+ name: "Georgia",
414
+ shortCode: "ge",
415
+ phoneCode: "+995"
416
+ },
417
+ {
418
+ name: "Germany",
419
+ shortCode: "de",
420
+ phoneCode: "+49"
421
+ },
422
+ {
423
+ name: "Ghana",
424
+ shortCode: "gh",
425
+ phoneCode: "+233"
426
+ },
427
+ {
428
+ name: "Gibraltar",
429
+ shortCode: "gi",
430
+ phoneCode: "+350"
431
+ },
432
+ {
433
+ name: "Greece",
434
+ shortCode: "gr",
435
+ phoneCode: "+30"
436
+ },
437
+ {
438
+ name: "Greenland",
439
+ shortCode: "gl",
440
+ phoneCode: "+299"
441
+ },
442
+ {
443
+ name: "Grenada",
444
+ shortCode: "gd",
445
+ phoneCode: "+1-473"
446
+ },
447
+ {
448
+ name: "Guadeloupe",
449
+ shortCode: "gp",
450
+ phoneCode: "+590"
451
+ },
452
+ {
453
+ name: "Guam",
454
+ shortCode: "gu",
455
+ phoneCode: "+1-671"
456
+ },
457
+ {
458
+ name: "Guatemala",
459
+ shortCode: "gt",
460
+ phoneCode: "+502"
461
+ },
462
+ {
463
+ name: "Guernsey",
464
+ shortCode: "gg",
465
+ phoneCode: "+44-1481"
466
+ },
467
+ {
468
+ name: "Guinea",
469
+ shortCode: "gn",
470
+ phoneCode: "+224"
471
+ },
472
+ {
473
+ name: "Guinea-Bissau",
474
+ shortCode: "gw",
475
+ phoneCode: "+245"
476
+ },
477
+ {
478
+ name: "Guyana",
479
+ shortCode: "gy",
480
+ phoneCode: "+592"
481
+ },
482
+ {
483
+ name: "Haiti",
484
+ shortCode: "ht",
485
+ phoneCode: "+509"
486
+ },
487
+ {
488
+ name: "Honduras",
489
+ shortCode: "hn",
490
+ phoneCode: "+504"
491
+ },
492
+ {
493
+ name: "Hong Kong",
494
+ shortCode: "hk",
495
+ phoneCode: "+852"
496
+ },
497
+ {
498
+ name: "Hungary",
499
+ shortCode: "hu",
500
+ phoneCode: "+36"
501
+ },
502
+ {
503
+ name: "Iceland",
504
+ shortCode: "is",
505
+ phoneCode: "+354"
506
+ },
507
+ {
508
+ name: "India",
509
+ shortCode: "in",
510
+ phoneCode: "+91"
511
+ },
512
+ {
513
+ name: "Indonesia",
514
+ shortCode: "id",
515
+ phoneCode: "+62"
516
+ },
517
+ {
518
+ name: "Iran",
519
+ shortCode: "ir",
520
+ phoneCode: "+98"
521
+ },
522
+ {
523
+ name: "Iraq",
524
+ shortCode: "iq",
525
+ phoneCode: "+964"
526
+ },
527
+ {
528
+ name: "Ireland",
529
+ shortCode: "ie",
530
+ phoneCode: "+353"
531
+ },
532
+ {
533
+ name: "Isle of Man",
534
+ shortCode: "im",
535
+ phoneCode: "+44-1624"
536
+ },
537
+ {
538
+ name: "Israel",
539
+ shortCode: "il",
540
+ phoneCode: "+972"
541
+ },
542
+ {
543
+ name: "Italy",
544
+ shortCode: "it",
545
+ phoneCode: "+39"
546
+ },
547
+ {
548
+ name: "Jamaica",
549
+ shortCode: "jm",
550
+ phoneCode: "+1-876"
551
+ },
552
+ {
553
+ name: "Japan",
554
+ shortCode: "jp",
555
+ phoneCode: "+81"
556
+ },
557
+ {
558
+ name: "Jersey",
559
+ shortCode: "je",
560
+ phoneCode: "+44-1534"
561
+ },
562
+ {
563
+ name: "Jordan",
564
+ shortCode: "jo",
565
+ phoneCode: "+962"
566
+ },
567
+ {
568
+ name: "Kazakhstan",
569
+ shortCode: "kz",
570
+ phoneCode: "+7"
571
+ },
572
+ {
573
+ name: "Kenya",
574
+ shortCode: "ke",
575
+ phoneCode: "+254"
576
+ },
577
+ {
578
+ name: "Kiribati",
579
+ shortCode: "ki",
580
+ phoneCode: "+686"
581
+ },
582
+ {
583
+ name: "Kuwait",
584
+ shortCode: "kw",
585
+ phoneCode: "+965"
586
+ },
587
+ {
588
+ name: "Kyrgyzstan",
589
+ shortCode: "kg",
590
+ phoneCode: "+996"
591
+ },
592
+ {
593
+ name: "Laos",
594
+ shortCode: "la",
595
+ phoneCode: "+856"
596
+ },
597
+ {
598
+ name: "Latvia",
599
+ shortCode: "lv",
600
+ phoneCode: "+371"
601
+ },
602
+ {
603
+ name: "Lebanon",
604
+ shortCode: "lb",
605
+ phoneCode: "+961"
606
+ },
607
+ {
608
+ name: "Lesotho",
609
+ shortCode: "ls",
610
+ phoneCode: "+266"
611
+ },
612
+ {
613
+ name: "Liberia",
614
+ shortCode: "lr",
615
+ phoneCode: "+231"
616
+ },
617
+ {
618
+ name: "Libya",
619
+ shortCode: "ly",
620
+ phoneCode: "+218"
621
+ },
622
+ {
623
+ name: "Liechtenstein",
624
+ shortCode: "li",
625
+ phoneCode: "+423"
626
+ },
627
+ {
628
+ name: "Lithuania",
629
+ shortCode: "lt",
630
+ phoneCode: "+370"
631
+ },
632
+ {
633
+ name: "Luxembourg",
634
+ shortCode: "lu",
635
+ phoneCode: "+352"
636
+ },
637
+ {
638
+ name: "Macao",
639
+ shortCode: "mo",
640
+ phoneCode: "+853"
641
+ },
642
+ {
643
+ name: "Madagascar",
644
+ shortCode: "mg",
645
+ phoneCode: "+261"
646
+ },
647
+ {
648
+ name: "Malawi",
649
+ shortCode: "mw",
650
+ phoneCode: "+265"
651
+ },
652
+ {
653
+ name: "Malaysia",
654
+ shortCode: "my",
655
+ phoneCode: "+60"
656
+ },
657
+ {
658
+ name: "Maldives",
659
+ shortCode: "mv",
660
+ phoneCode: "+960"
661
+ },
662
+ {
663
+ name: "Mali",
664
+ shortCode: "ml",
665
+ phoneCode: "+223"
666
+ },
667
+ {
668
+ name: "Malta",
669
+ shortCode: "mt",
670
+ phoneCode: "+356"
671
+ },
672
+ {
673
+ name: "Marshall Islands",
674
+ shortCode: "mh",
675
+ phoneCode: "+692"
676
+ },
677
+ {
678
+ name: "Martinique",
679
+ shortCode: "mq",
680
+ phoneCode: "+596"
681
+ },
682
+ {
683
+ name: "Mauritania",
684
+ shortCode: "mr",
685
+ phoneCode: "+222"
686
+ },
687
+ {
688
+ name: "Mauritius",
689
+ shortCode: "mu",
690
+ phoneCode: "+230"
691
+ },
692
+ {
693
+ name: "Mayotte",
694
+ shortCode: "yt",
695
+ phoneCode: "+262"
696
+ },
697
+ {
698
+ name: "Mexico",
699
+ shortCode: "mx",
700
+ phoneCode: "+52"
701
+ },
702
+ {
703
+ name: "Micronesia",
704
+ shortCode: "fm",
705
+ phoneCode: "+691"
706
+ },
707
+ {
708
+ name: "Moldova",
709
+ shortCode: "md",
710
+ phoneCode: "+373"
711
+ },
712
+ {
713
+ name: "Monaco",
714
+ shortCode: "mc",
715
+ phoneCode: "+377"
716
+ },
717
+ {
718
+ name: "Mongolia",
719
+ shortCode: "mn",
720
+ phoneCode: "+976"
721
+ },
722
+ {
723
+ name: "Montenegro",
724
+ shortCode: "me",
725
+ phoneCode: "+382"
726
+ },
727
+ {
728
+ name: "Montserrat",
729
+ shortCode: "ms",
730
+ phoneCode: "+1-664"
731
+ },
732
+ {
733
+ name: "Morocco",
734
+ shortCode: "ma",
735
+ phoneCode: "+212"
736
+ },
737
+ {
738
+ name: "Mozambique",
739
+ shortCode: "mz",
740
+ phoneCode: "+258"
741
+ },
742
+ {
743
+ name: "Myanmar",
744
+ shortCode: "mm",
745
+ phoneCode: "+95"
746
+ },
747
+ {
748
+ name: "Namibia",
749
+ shortCode: "na",
750
+ phoneCode: "+264"
751
+ },
752
+ {
753
+ name: "Nauru",
754
+ shortCode: "nr",
755
+ phoneCode: "+674"
756
+ },
757
+ {
758
+ name: "Nepal",
759
+ shortCode: "np",
760
+ phoneCode: "+977"
761
+ },
762
+ {
763
+ name: "Netherlands",
764
+ shortCode: "nl",
765
+ phoneCode: "+31"
766
+ },
767
+ {
768
+ name: "New Caledonia",
769
+ shortCode: "nc",
770
+ phoneCode: "+687"
771
+ },
772
+ {
773
+ name: "New Zealand",
774
+ shortCode: "nz",
775
+ phoneCode: "+64"
776
+ },
777
+ {
778
+ name: "Nicaragua",
779
+ shortCode: "ni",
780
+ phoneCode: "+505"
781
+ },
782
+ {
783
+ name: "Niger",
784
+ shortCode: "ne",
785
+ phoneCode: "+227"
786
+ },
787
+ {
788
+ name: "Nigeria",
789
+ shortCode: "ng",
790
+ phoneCode: "+234"
791
+ },
792
+ {
793
+ name: "Niue",
794
+ shortCode: "nu",
795
+ phoneCode: "+683"
796
+ },
797
+ {
798
+ name: "Norfolk Island",
799
+ shortCode: "nf",
800
+ phoneCode: "+672"
801
+ },
802
+ {
803
+ name: "North Korea",
804
+ shortCode: "kp",
805
+ phoneCode: "+850"
806
+ },
807
+ {
808
+ name: "North Macedonia",
809
+ shortCode: "mk",
810
+ phoneCode: "+389"
811
+ },
812
+ {
813
+ name: "Northern Mariana Islands",
814
+ shortCode: "mp",
815
+ phoneCode: "+1-670"
816
+ },
817
+ {
818
+ name: "Norway",
819
+ shortCode: "no",
820
+ phoneCode: "+47"
821
+ },
822
+ {
823
+ name: "Oman",
824
+ shortCode: "om",
825
+ phoneCode: "+968"
826
+ },
827
+ {
828
+ name: "Pakistan",
829
+ shortCode: "pk",
830
+ phoneCode: "+92"
831
+ },
832
+ {
833
+ name: "Palau",
834
+ shortCode: "pw",
835
+ phoneCode: "+680"
836
+ },
837
+ {
838
+ name: "Palestine, State of",
839
+ shortCode: "ps",
840
+ phoneCode: "+970"
841
+ },
842
+ {
843
+ name: "Panama",
844
+ shortCode: "pa",
845
+ phoneCode: "+507"
846
+ },
847
+ {
848
+ name: "Papua New Guinea",
849
+ shortCode: "pg",
850
+ phoneCode: "+675"
851
+ },
852
+ {
853
+ name: "Paraguay",
854
+ shortCode: "py",
855
+ phoneCode: "+595"
856
+ },
857
+ {
858
+ name: "Peru",
859
+ shortCode: "pe",
860
+ phoneCode: "+51"
861
+ },
862
+ {
863
+ name: "Philippines",
864
+ shortCode: "ph",
865
+ phoneCode: "+63"
866
+ },
867
+ {
868
+ name: "Pitcairn Islands",
869
+ shortCode: "pn",
870
+ phoneCode: "+64"
871
+ },
872
+ {
873
+ name: "Poland",
874
+ shortCode: "pl",
875
+ phoneCode: "+48"
876
+ },
877
+ {
878
+ name: "Portugal",
879
+ shortCode: "pt",
880
+ phoneCode: "+351"
881
+ },
882
+ {
883
+ name: "Puerto Rico",
884
+ shortCode: "pr",
885
+ phoneCode: "+1-787"
886
+ },
887
+ {
888
+ name: "Qatar",
889
+ shortCode: "qa",
890
+ phoneCode: "+974"
891
+ },
892
+ {
893
+ name: "Réunion",
894
+ shortCode: "re",
895
+ phoneCode: "+262"
896
+ },
897
+ {
898
+ name: "Romania",
899
+ shortCode: "ro",
900
+ phoneCode: "+40"
901
+ },
902
+ {
903
+ name: "Russia",
904
+ shortCode: "ru",
905
+ phoneCode: "+7"
906
+ },
907
+ {
908
+ name: "Rwanda",
909
+ shortCode: "rw",
910
+ phoneCode: "+250"
911
+ },
912
+ {
913
+ name: "Saint Barthélemy",
914
+ shortCode: "bl",
915
+ phoneCode: "+590"
916
+ },
917
+ {
918
+ name: "Saint Helena, Ascension and Tristan da Cunha",
919
+ shortCode: "sh",
920
+ phoneCode: "+290"
921
+ },
922
+ {
923
+ name: "Saint Kitts and Nevis",
924
+ shortCode: "kn",
925
+ phoneCode: "+1-869"
926
+ },
927
+ {
928
+ name: "Saint Lucia",
929
+ shortCode: "lc",
930
+ phoneCode: "+1-758"
931
+ },
932
+ {
933
+ name: "Saint Martin (French part)",
934
+ shortCode: "mf",
935
+ phoneCode: "+590"
936
+ },
937
+ {
938
+ name: "Saint Pierre and Miquelon",
939
+ shortCode: "pm",
940
+ phoneCode: "+508"
941
+ },
942
+ {
943
+ name: "Saint Vincent and the Grenadines",
944
+ shortCode: "vc",
945
+ phoneCode: "+1-784"
946
+ },
947
+ {
948
+ name: "Samoa",
949
+ shortCode: "ws",
950
+ phoneCode: "+685"
951
+ },
952
+ {
953
+ name: "San Marino",
954
+ shortCode: "sm",
955
+ phoneCode: "+378"
956
+ },
957
+ {
958
+ name: "Sao Tome and Principe",
959
+ shortCode: "st",
960
+ phoneCode: "+239"
961
+ },
962
+ {
963
+ name: "Saudi Arabia",
964
+ shortCode: "sa",
965
+ phoneCode: "+966"
966
+ },
967
+ {
968
+ name: "Senegal",
969
+ shortCode: "sn",
970
+ phoneCode: "+221"
971
+ },
972
+ {
973
+ name: "Serbia",
974
+ shortCode: "rs",
975
+ phoneCode: "+381"
976
+ },
977
+ {
978
+ name: "Seychelles",
979
+ shortCode: "sc",
980
+ phoneCode: "+248"
981
+ },
982
+ {
983
+ name: "Sierra Leone",
984
+ shortCode: "sl",
985
+ phoneCode: "+232"
986
+ },
987
+ {
988
+ name: "Singapore",
989
+ shortCode: "sg",
990
+ phoneCode: "+65"
991
+ },
992
+ {
993
+ name: "Sint Maarten (Dutch part)",
994
+ shortCode: "sx",
995
+ phoneCode: "+1-721"
996
+ },
997
+ {
998
+ name: "Slovakia",
999
+ shortCode: "sk",
1000
+ phoneCode: "+421"
1001
+ },
1002
+ {
1003
+ name: "Slovenia",
1004
+ shortCode: "si",
1005
+ phoneCode: "+386"
1006
+ },
1007
+ {
1008
+ name: "Solomon Islands",
1009
+ shortCode: "sb",
1010
+ phoneCode: "+677"
1011
+ },
1012
+ {
1013
+ name: "Somalia",
1014
+ shortCode: "so",
1015
+ phoneCode: "+252"
1016
+ },
1017
+ {
1018
+ name: "South Africa",
1019
+ shortCode: "za",
1020
+ phoneCode: "+27"
1021
+ },
1022
+ {
1023
+ name: "South Georgia and the South Sandwich Islands",
1024
+ shortCode: "gs",
1025
+ phoneCode: "+500"
1026
+ },
1027
+ {
1028
+ name: "South Korea",
1029
+ shortCode: "kr",
1030
+ phoneCode: "+82"
1031
+ },
1032
+ {
1033
+ name: "South Sudan",
1034
+ shortCode: "ss",
1035
+ phoneCode: "+211"
1036
+ },
1037
+ {
1038
+ name: "Spain",
1039
+ shortCode: "es",
1040
+ phoneCode: "+34"
1041
+ },
1042
+ {
1043
+ name: "Sri Lanka",
1044
+ shortCode: "lk",
1045
+ phoneCode: "+94"
1046
+ },
1047
+ {
1048
+ name: "Sudan",
1049
+ shortCode: "sd",
1050
+ phoneCode: "+249"
1051
+ },
1052
+ {
1053
+ name: "Suriname",
1054
+ shortCode: "sr",
1055
+ phoneCode: "+597"
1056
+ },
1057
+ {
1058
+ name: "Svalbard and Jan Mayen",
1059
+ shortCode: "sj",
1060
+ phoneCode: "+47"
1061
+ },
1062
+ {
1063
+ name: "Sweden",
1064
+ shortCode: "se",
1065
+ phoneCode: "+46"
1066
+ },
1067
+ {
1068
+ name: "Switzerland",
1069
+ shortCode: "ch",
1070
+ phoneCode: "+41"
1071
+ },
1072
+ {
1073
+ name: "Syria",
1074
+ shortCode: "sy",
1075
+ phoneCode: "+963"
1076
+ },
1077
+ {
1078
+ name: "Taiwan",
1079
+ shortCode: "tw",
1080
+ phoneCode: "+886"
1081
+ },
1082
+ {
1083
+ name: "Tajikistan",
1084
+ shortCode: "tj",
1085
+ phoneCode: "+992"
1086
+ },
1087
+ {
1088
+ name: "Tanzania",
1089
+ shortCode: "tz",
1090
+ phoneCode: "+255"
1091
+ },
1092
+ {
1093
+ name: "Thailand",
1094
+ shortCode: "th",
1095
+ phoneCode: "+66"
1096
+ },
1097
+ {
1098
+ name: "Timor-Leste",
1099
+ shortCode: "tl",
1100
+ phoneCode: "+670"
1101
+ },
1102
+ {
1103
+ name: "Togo",
1104
+ shortCode: "tg",
1105
+ phoneCode: "+228"
1106
+ },
1107
+ {
1108
+ name: "Tokelau",
1109
+ shortCode: "tk",
1110
+ phoneCode: "+690"
1111
+ },
1112
+ {
1113
+ name: "Tonga",
1114
+ shortCode: "to",
1115
+ phoneCode: "+676"
1116
+ },
1117
+ {
1118
+ name: "Trinidad and Tobago",
1119
+ shortCode: "tt",
1120
+ phoneCode: "+1-868"
1121
+ },
1122
+ {
1123
+ name: "Tunisia",
1124
+ shortCode: "tn",
1125
+ phoneCode: "+216"
1126
+ },
1127
+ {
1128
+ name: "Türkiye",
1129
+ shortCode: "tr",
1130
+ phoneCode: "+90"
1131
+ },
1132
+ {
1133
+ name: "Turkmenistan",
1134
+ shortCode: "tm",
1135
+ phoneCode: "+993"
1136
+ },
1137
+ {
1138
+ name: "Turks and Caicos Islands",
1139
+ shortCode: "tc",
1140
+ phoneCode: "+1-649"
1141
+ },
1142
+ {
1143
+ name: "Tuvalu",
1144
+ shortCode: "tv",
1145
+ phoneCode: "+688"
1146
+ },
1147
+ {
1148
+ name: "Uganda",
1149
+ shortCode: "ug",
1150
+ phoneCode: "+256"
1151
+ },
1152
+ {
1153
+ name: "Ukraine",
1154
+ shortCode: "ua",
1155
+ phoneCode: "+380"
1156
+ },
1157
+ {
1158
+ name: "United Arab Emirates",
1159
+ shortCode: "ae",
1160
+ phoneCode: "+971"
1161
+ },
1162
+ {
1163
+ name: "United Kingdom",
1164
+ shortCode: "gb",
1165
+ phoneCode: "+44"
1166
+ },
1167
+ {
1168
+ name: "United States",
1169
+ shortCode: "us",
1170
+ phoneCode: "+1"
1171
+ },
1172
+ {
1173
+ name: "Uruguay",
1174
+ shortCode: "uy",
1175
+ phoneCode: "+598"
1176
+ },
1177
+ {
1178
+ name: "Uzbekistan",
1179
+ shortCode: "uz",
1180
+ phoneCode: "+998"
1181
+ },
1182
+ {
1183
+ name: "Vanuatu",
1184
+ shortCode: "vu",
1185
+ phoneCode: "+678"
1186
+ },
1187
+ {
1188
+ name: "Vatican City",
1189
+ shortCode: "va",
1190
+ phoneCode: "+379"
1191
+ },
1192
+ {
1193
+ name: "Venezuela",
1194
+ shortCode: "ve",
1195
+ phoneCode: "+58"
1196
+ },
1197
+ {
1198
+ name: "Vietnam",
1199
+ shortCode: "vn",
1200
+ phoneCode: "+84"
1201
+ },
1202
+ {
1203
+ name: "Virgin Islands (British)",
1204
+ shortCode: "vg",
1205
+ phoneCode: "+1-284"
1206
+ },
1207
+ {
1208
+ name: "Virgin Islands (U.S.)",
1209
+ shortCode: "vi",
1210
+ phoneCode: "+1-340"
1211
+ },
1212
+ {
1213
+ name: "Wallis and Futuna",
1214
+ shortCode: "wf",
1215
+ phoneCode: "+681"
1216
+ },
1217
+ {
1218
+ name: "Western Sahara",
1219
+ shortCode: "eh",
1220
+ phoneCode: "+212"
1221
+ },
1222
+ {
1223
+ name: "Yemen",
1224
+ shortCode: "ye",
1225
+ phoneCode: "+967"
1226
+ },
1227
+ {
1228
+ name: "Zambia",
1229
+ shortCode: "zm",
1230
+ phoneCode: "+260"
1231
+ },
1232
+ {
1233
+ name: "Zimbabwe",
1234
+ shortCode: "zw",
1235
+ phoneCode: "+263"
1236
+ }
1237
+ ];
1238
+ static ɵfac = i0.ɵɵngDeclareFactory({
1239
+ minVersion: "12.0.0",
1240
+ version: "22.3.0",
1241
+ ngImport: i0,
1242
+ type: CountryCode,
1243
+ deps: [],
1244
+ target: i0.ɵɵFactoryTarget.Injectable
1245
+ });
1246
+ static ɵprov = i0.ɵɵngDeclareInjectable({
1247
+ minVersion: "12.0.0",
1248
+ version: "22.3.0",
1249
+ ngImport: i0,
1250
+ type: CountryCode
1251
+ });
1252
+ };
1253
+ i0.ɵɵngDeclareClassMetadata({
1254
+ minVersion: "12.0.0",
1255
+ version: "22.3.0",
1256
+ ngImport: i0,
1257
+ type: CountryCode,
1258
+ decorators: [{ type: Injectable }]
1259
+ });
272
1260
  const phoneValidator = (control) => {
273
- const error = { invalidPhone: true };
274
- let numberInstance;
275
- if (control.value) {
276
- try {
277
- numberInstance = parsePhoneNumber(control.value);
278
- }
279
- catch (e) {
280
- return error;
281
- }
282
- if (numberInstance && !numberInstance.isValid()) {
283
- return error;
284
- }
285
- }
286
- return null;
1261
+ const error = { invalidPhone: true };
1262
+ let numberInstance;
1263
+ if (control.value) {
1264
+ try {
1265
+ numberInstance = parsePhoneNumber(control.value);
1266
+ } catch (e) {
1267
+ return error;
1268
+ }
1269
+ if (numberInstance && !numberInstance.isValid()) return error;
1270
+ }
1271
+ return null;
287
1272
  };
288
-
289
- class PhoneInput {
290
- ngControl;
291
- static COUNTRY_RENDER_CHUNK_SIZE = 32;
292
- static COUNTRY_RENDER_CHUNK_DELAY = 50;
293
- _destroyRef = inject(DestroyRef);
294
- _changeDetectorRef = inject(ChangeDetectorRef);
295
- countryCodeData = inject(CountryCode);
296
- _focusMonitor = inject(FocusMonitor);
297
- _elementRef = inject((ElementRef));
298
- _errorStateMatcher = inject(ErrorStateMatcher);
299
- _parentForm = inject(NgForm, { optional: true });
300
- static nextId = 0;
301
- searchInput = viewChild('searchInput', /* @ts-ignore */
302
- ...(ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []));
303
- focusable = viewChild.required('focusable', /* @ts-ignore */
304
- ...(ngDevMode ? [{ debugName: "focusable" }] : /* istanbul ignore next */ []));
305
- _focused = signal(false, /* @ts-ignore */
306
- ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
307
- _errorState = signal(false, /* @ts-ignore */
308
- ...(ngDevMode ? [{ debugName: "_errorState" }] : /* istanbul ignore next */ []));
309
- id = '';
310
- _id = signal(`ngs-phone-input-${PhoneInput.nextId++}`, /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
312
- placeholder = '';
313
- countryChanged = output();
314
- stateChanges = new Subject();
315
- describedBy = '';
316
- phoneNumber = '';
317
- allCountries = [];
318
- preferredCountriesInDropDown = [];
319
- selectedCountry = signal(null, /* @ts-ignore */
320
- ...(ngDevMode ? [{ debugName: "selectedCountry" }] : /* istanbul ignore next */ []));
321
- numberInstance;
322
- _value;
323
- searchTerm = signal('', /* @ts-ignore */
324
- ...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
325
- visibleCountryCount = signal(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE, /* @ts-ignore */
326
- ...(ngDevMode ? [{ debugName: "visibleCountryCount" }] : /* istanbul ignore next */ []));
327
- filteredCountries = computed(() => {
328
- const searchTerm = this.searchTerm().trim().toLowerCase();
329
- if (!searchTerm) {
330
- return this.allCountries;
331
- }
332
- return this.allCountries.filter((country) => {
333
- return `${country.name}${country.phoneCode}`
334
- .toLowerCase()
335
- .includes(searchTerm);
336
- });
337
- }, /* @ts-ignore */
338
- ...(ngDevMode ? [{ debugName: "filteredCountries" }] : /* istanbul ignore next */ []));
339
- visibleCountries = computed(() => {
340
- return this.filteredCountries().slice(0, this.visibleCountryCount());
341
- }, /* @ts-ignore */
342
- ...(ngDevMode ? [{ debugName: "visibleCountries" }] : /* istanbul ignore next */ []));
343
- _previousFormattedNumber;
344
- _countryRenderTimeout;
345
- _countrySearchFocusTimeout;
346
- onTouched = () => { };
347
- propagateChange = (_) => { };
348
- get focused() {
349
- return this._focused();
350
- }
351
- get errorState() {
352
- return this._errorState();
353
- }
354
- get empty() {
355
- return !this.phoneNumber;
356
- }
357
- get shouldLabelFloat() {
358
- return this._focused() || !this.empty;
359
- }
360
- set value(value) {
361
- this.writeValue(value);
362
- }
363
- get value() {
364
- return this._value;
365
- }
366
- autocomplete = input('on', /* @ts-ignore */
367
- ...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
368
- errorStateMatcher = input(this._errorStateMatcher, /* @ts-ignore */
369
- ...(ngDevMode ? [{ debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
370
- onlyCountries = input([], /* @ts-ignore */
371
- ...(ngDevMode ? [{ debugName: "onlyCountries" }] : /* istanbul ignore next */ []));
372
- preferredCountries = input([], /* @ts-ignore */
373
- ...(ngDevMode ? [{ debugName: "preferredCountries" }] : /* istanbul ignore next */ []));
374
- format = input('default', /* @ts-ignore */
375
- ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
376
- defaultSelectedCountryCode = input('us', /* @ts-ignore */
377
- ...(ngDevMode ? [{ debugName: "defaultSelectedCountryCode" }] : /* istanbul ignore next */ []));
378
- _placeholder = input('', { ...(ngDevMode ? { debugName: "_placeholder" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
379
- set required(value) {
380
- this._required.set(coerceBooleanProperty(value));
381
- this.stateChanges.next();
382
- }
383
- get required() {
384
- return this._required();
385
- }
386
- _required = signal(false, /* @ts-ignore */
387
- ...(ngDevMode ? [{ debugName: "_required" }] : /* istanbul ignore next */ []));
388
- phoneDisabled = input(false, { ...(ngDevMode ? { debugName: "phoneDisabled" } : /* istanbul ignore next */ {}), alias: 'disabled',
389
- transform: booleanAttribute });
390
- _disabled = signal(false, /* @ts-ignore */
391
- ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
392
- _compositeDisabled = computed(() => {
393
- return this._disabled() || this.phoneDisabled();
394
- }, /* @ts-ignore */
395
- ...(ngDevMode ? [{ debugName: "_compositeDisabled" }] : /* istanbul ignore next */ []));
396
- disabled = false;
397
- constructor(ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher) {
398
- this.ngControl = ngControl;
399
- if (this.ngControl != null) {
400
- this.ngControl.valueAccessor = this;
401
- }
402
- effect(() => {
403
- this.disabled = this._compositeDisabled();
404
- });
405
- this._focusMonitor
406
- .monitor(this._elementRef, true)
407
- .pipe(takeUntilDestroyed(this._destroyRef))
408
- .subscribe((origin) => {
409
- if (this._focused() && !origin) {
410
- this.onTouched();
411
- }
412
- this._focused.set(!!origin);
413
- this.stateChanges.next();
414
- });
415
- this.fetchCountryData();
416
- effect(() => {
417
- this.format();
418
- if (this.numberInstance) {
419
- this.phoneNumber = this.formattedPhoneNumber;
420
- }
421
- this.stateChanges.next();
422
- });
423
- effect(() => {
424
- this.id = this._id();
425
- this.placeholder = this._placeholder();
426
- });
427
- }
428
- ngOnInit() {
429
- if (this.onlyCountries().length) {
430
- this.allCountries = this.allCountries.filter((c) => this.onlyCountries().includes(c.shortCode));
431
- }
432
- if (this.preferredCountries().length) {
433
- this.preferredCountries().forEach((shortCode) => {
434
- const preferredCountry = this.allCountries
435
- .filter((c) => {
436
- return c.shortCode === shortCode;
437
- })
438
- .shift();
439
- if (preferredCountry) {
440
- this.preferredCountriesInDropDown.push(preferredCountry);
441
- }
442
- });
443
- }
444
- if (this.numberInstance && this.numberInstance.country) {
445
- // If an existing number is present, we use it to determine selectedCountry
446
- this.selectedCountry.set(this.getCountry(this.numberInstance.country));
447
- }
448
- if (!this.selectedCountry()) {
449
- this.selectedCountry.set(this.allCountries.find((country) => country.shortCode === this.defaultSelectedCountryCode()));
450
- }
451
- this.countryChanged.emit(this.selectedCountry());
452
- this._changeDetectorRef.detectChanges();
453
- this.stateChanges.next();
454
- }
455
- ngDoCheck() {
456
- if (this.ngControl) {
457
- const isInvalid = this.errorStateMatcher().isErrorState(this.ngControl.control, this._parentForm);
458
- this._errorState.set((isInvalid && !this.ngControl.control?.value) || (!this._focused() ? isInvalid : false));
459
- }
460
- }
461
- updateErrorState() {
462
- }
463
- ngAfterViewInit() {
464
- this._changeDetectorRef.detectChanges();
465
- }
466
- ngOnDestroy() {
467
- this.clearCountryMenuTimeouts();
468
- this.stateChanges.complete();
469
- this._focusMonitor.stopMonitoring(this._elementRef);
470
- }
471
- onPhoneNumberChange() {
472
- if (!this.phoneNumber) {
473
- this.clearValue('');
474
- this.propagateChange(this.value);
475
- this._changeDetectorRef.markForCheck();
476
- this.stateChanges.next();
477
- return;
478
- }
479
- try {
480
- this.numberInstance = parsePhoneNumberFromString(this.phoneNumber.toString(), this.selectedCountry()?.shortCode.toUpperCase());
481
- this.formatAsYouTypeIfEnabled();
482
- this._value = this.numberInstance?.number ?? this.phoneNumber.toString();
483
- if (this.numberInstance && this.numberInstance.isValid()) {
484
- if (this.phoneNumber !== this.formattedPhoneNumber) {
485
- this.phoneNumber = this.formattedPhoneNumber;
486
- }
487
- if (this.selectedCountry()?.shortCode !== this.numberInstance.country &&
488
- this.numberInstance.country) {
489
- this.selectedCountry.set(this.getCountry(this.numberInstance.country));
490
- this.countryChanged.emit(this.selectedCountry());
491
- }
492
- }
493
- }
494
- catch (e) {
495
- // if no possible numbers are there,
496
- // then the full number is passed so that validator could be triggered and proper error could be shown
497
- this._value = this.phoneNumber.toString();
498
- }
499
- this.propagateChange(this.value);
500
- this._changeDetectorRef.markForCheck();
501
- this.stateChanges.next();
502
- }
503
- onCountrySelect(country, el) {
504
- if (this.phoneNumber) {
505
- this.phoneNumber = this.numberInstance?.nationalNumber;
506
- }
507
- if (this.selectedCountry() !== country) {
508
- this.reset();
509
- }
510
- this.selectedCountry.set(country);
511
- this.countryChanged.emit(this.selectedCountry());
512
- this.onPhoneNumberChange();
513
- el.focus();
514
- }
515
- focusSearchInput() {
516
- this.searchInput()?.nativeElement.focus();
517
- }
518
- openCountryMenu() {
519
- this.visibleCountryCount.set(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE);
520
- this.scheduleCountryRendering();
521
- this._countrySearchFocusTimeout = setTimeout(() => this.focusSearchInput());
522
- }
523
- closeCountryMenu() {
524
- this.clearCountryMenuTimeouts();
525
- this.searchTerm.set('');
526
- this.visibleCountryCount.set(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE);
527
- }
528
- onCountrySearch(searchTerm) {
529
- this.searchTerm.set(searchTerm);
530
- this.visibleCountryCount.set(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE);
531
- this.scheduleCountryRendering();
532
- }
533
- clearSearch(event) {
534
- event.stopPropagation();
535
- this.onCountrySearch('');
536
- this.focusSearchInput();
537
- }
538
- countryFlagEmoji(shortCode) {
539
- if (!shortCode || shortCode.length !== 2) {
540
- return '';
541
- }
542
- const upperShortCode = shortCode.toUpperCase();
543
- return Array.from(upperShortCode)
544
- .map((letter) => String.fromCodePoint(0x1F1E6 + letter.charCodeAt(0) - 65))
545
- .join('');
546
- }
547
- scheduleCountryRendering() {
548
- this.clearCountryRenderTimeout();
549
- if (this.visibleCountryCount() >= this.filteredCountries().length) {
550
- return;
551
- }
552
- this._countryRenderTimeout = setTimeout(() => {
553
- this.visibleCountryCount.update((count) => {
554
- return Math.min(count + PhoneInput.COUNTRY_RENDER_CHUNK_SIZE, this.filteredCountries().length);
555
- });
556
- this.scheduleCountryRendering();
557
- this._changeDetectorRef.markForCheck();
558
- }, PhoneInput.COUNTRY_RENDER_CHUNK_DELAY);
559
- }
560
- clearCountryMenuTimeouts() {
561
- this.clearCountryRenderTimeout();
562
- this.clearCountrySearchFocusTimeout();
563
- }
564
- clearCountryRenderTimeout() {
565
- if (!this._countryRenderTimeout) {
566
- return;
567
- }
568
- clearTimeout(this._countryRenderTimeout);
569
- this._countryRenderTimeout = undefined;
570
- }
571
- clearCountrySearchFocusTimeout() {
572
- if (!this._countrySearchFocusTimeout) {
573
- return;
574
- }
575
- clearTimeout(this._countrySearchFocusTimeout);
576
- this._countrySearchFocusTimeout = undefined;
577
- }
578
- getCountry(shortCode) {
579
- return (this.allCountries.find((c) => c.shortCode === shortCode.toLowerCase()) || {
580
- name: 'UN',
581
- shortCode: 'UN',
582
- dialCode: undefined,
583
- priority: 0,
584
- areaCodes: undefined,
585
- flagClass: 'UN',
586
- placeHolder: '',
587
- });
588
- }
589
- onInputKeyPress(event) {
590
- const pattern = /[0-9+\- ]/;
591
- if (!pattern.test(event.key)) {
592
- event.preventDefault();
593
- }
594
- }
595
- fetchCountryData() {
596
- this.allCountries = this.countryCodeData.allCountries;
597
- }
598
- registerOnChange(fn) {
599
- this.propagateChange = fn;
600
- }
601
- registerOnTouched(fn) {
602
- this.onTouched = fn;
603
- }
604
- setDisabledState(isDisabled) {
605
- this._disabled.set(isDisabled);
606
- this._changeDetectorRef.detectChanges();
607
- this.stateChanges.next();
608
- }
609
- writeValue(value) {
610
- if (!value) {
611
- this.clearValue(value);
612
- this.stateChanges.next();
613
- this._changeDetectorRef.detectChanges();
614
- return;
615
- }
616
- this._value = value;
617
- this.numberInstance = parsePhoneNumberFromString(value);
618
- if (this.numberInstance) {
619
- const countryCode = this.numberInstance.country;
620
- this.phoneNumber = this.formattedPhoneNumber;
621
- if (!countryCode) {
622
- this.stateChanges.next(undefined);
623
- this._changeDetectorRef.detectChanges();
624
- return;
625
- }
626
- const country = this.getCountry(countryCode);
627
- this.selectedCountry.set(country);
628
- this.countryChanged.emit(country);
629
- this._changeDetectorRef.detectChanges();
630
- this.stateChanges.next();
631
- }
632
- else {
633
- this.phoneNumber = value;
634
- }
635
- this.stateChanges.next(undefined);
636
- // Value is set from outside using setValue()
637
- this._changeDetectorRef.detectChanges();
638
- }
639
- setDescribedByIds(ids) {
640
- this.describedBy = ids.join(' ');
641
- }
642
- focus() {
643
- this.focusable().nativeElement.focus();
644
- }
645
- onContainerClick(event) {
646
- if (event.target.tagName.toLowerCase() !== 'input') {
647
- this.focus();
648
- }
649
- }
650
- reset() {
651
- this.clearValue(null);
652
- this.propagateChange(null);
653
- this._changeDetectorRef.markForCheck();
654
- this.stateChanges.next(undefined);
655
- }
656
- clearValue(value) {
657
- this._value = value ?? '';
658
- this.phoneNumber = '';
659
- this.numberInstance = undefined;
660
- this._previousFormattedNumber = undefined;
661
- }
662
- get formattedPhoneNumber() {
663
- if (!this.numberInstance) {
664
- return this.phoneNumber?.toString() || '';
665
- }
666
- switch (this.format()) {
667
- case 'national':
668
- return this.numberInstance.formatNational();
669
- case 'international':
670
- return this.numberInstance.formatInternational();
671
- default:
672
- return this.numberInstance.nationalNumber.toString();
673
- }
674
- }
675
- formatAsYouTypeIfEnabled() {
676
- if (this.format() === 'default') {
677
- return;
678
- }
679
- const selectedCountry = this.selectedCountry();
680
- if (!selectedCountry) {
681
- return;
682
- }
683
- const asYouType = new AsYouType(selectedCountry.shortCode.toUpperCase());
684
- // To avoid caret positioning, we apply formatting only if the caret is at the end:
685
- if (!this.phoneNumber) {
686
- return;
687
- }
688
- if (this.phoneNumber?.toString().startsWith(this._previousFormattedNumber || '')) {
689
- this.phoneNumber = asYouType.input(this.phoneNumber.toString());
690
- }
691
- this._previousFormattedNumber = this.phoneNumber.toString();
692
- }
693
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PhoneInput, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i2.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component });
694
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PhoneInput, isStandalone: true, selector: "ngs-phone-input", inputs: { autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, onlyCountries: { classPropertyName: "onlyCountries", publicName: "onlyCountries", isSignal: true, isRequired: false, transformFunction: null }, preferredCountries: { classPropertyName: "preferredCountries", publicName: "preferredCountries", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, defaultSelectedCountryCode: { classPropertyName: "defaultSelectedCountryCode", publicName: "defaultSelectedCountryCode", isSignal: true, isRequired: false, transformFunction: null }, _placeholder: { classPropertyName: "_placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, phoneDisabled: { classPropertyName: "phoneDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { countryChanged: "countryChanged" }, host: { properties: { "class.is-floating": "shouldLabelFloat" }, classAttribute: "ngs-phone-input" }, providers: [
695
- CountryCode,
696
- {
697
- provide: FormFieldControl,
698
- useExisting: PhoneInput
699
- },
700
- {
701
- provide: NG_VALIDATORS,
702
- useValue: phoneValidator,
703
- multi: true,
704
- },
705
- ], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "focusable", first: true, predicate: ["focusable"], descendants: true, isSignal: true }], exportAs: ["ngsPhoneInput"], ngImport: i0, template: "<div class=\"phone-input-container\">\n <button\n type=\"button\"\n ngsRipple\n [ngsMenuTriggerFor]=\"menu\"\n class=\"country-selector pe-1.5\"\n [disabled]=\"disabled\"\n (menuOpened)=\"openCountryMenu()\"\n (menuClosed)=\"closeCountryMenu()\">\n @if (selectedCountry()) {\n <span class=\"flag-icon\" aria-hidden=\"true\">{{ countryFlagEmoji($safeNavigationMigration(selectedCountry()?.shortCode)) }}</span>\n\n @if (selectedCountry()?.phoneCode) {\n <span class=\"country-selector-code\">{{ selectedCountry()?.phoneCode }}</span>\n }\n }\n <ngs-icon name=\"fluent:chevron-down-24-regular\" class=\"text-neutral-500 size-4 relative ms-0.5\"/>\n </button>\n\n <input\n ngsInput\n type=\"tel\"\n inputmode=\"tel\"\n [autocomplete]=\"autocomplete()\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [errorStateMatcher]=\"errorStateMatcher()\"\n [placeholder]=\"_placeholder()\"\n [disabled]=\"disabled\"\n class=\"grow\"\n #focusable>\n</div>\n\n<ngs-menu #menu=\"ngsMenu\">\n <ngs-menu-header>\n <div class=\"relative bg-surface-container-lowest\">\n <input #searchInput\n type=\"text\"\n placeholder=\"Search...\"\n aria-label=\"Search country\"\n autocomplete=\"off\"\n [ngModel]=\"searchTerm()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onCountrySearch($event)\"\n class=\"h-10 w-full border-0 border-b border-border bg-transparent px-3 text-sm text-on-surface outline-none focus:border-b-primary\">\n @if (searchTerm().trim()) {\n <div class=\"absolute end-1 top-1/2 -translate-y-1/2\">\n <button\n ngsIconButton\n (click)=\"clearSearch($event)\"\n class=\"clear-button\"\n type=\"button\"\n aria-label=\"Clear search\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </div>\n }\n </div>\n </ngs-menu-header>\n\n @for (country of preferredCountriesInDropDown; track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n }\n\n @if (preferredCountriesInDropDown.length) {\n <ngs-menu-divider/>\n }\n\n @for (country of visibleCountries(); track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n } @empty {\n @if (searchTerm()) {\n <div class=\"text-sm px-4 py-3\">\n <span i18n>No countries found</span>.\n </div>\n }\n }\n\n @if (visibleCountryCount() < filteredCountries().length) {\n <div class=\"country-loading\">\n Loading more countries...\n </div>\n }\n</ngs-menu>\n", styles: [":host{--ngs-phone-input-color: var(--ngs-color-neutral-600);--ngs-phone-input-opacity: 0}@media print{:host{--ngs-phone-input-flag-display: none}}:host .flag-icon{display:var(--ngs-phone-input-flag-display, inline-flex);align-items:center;justify-content:center;width:22px;margin-inline-end:var(--spacing, .25rem);font-size:22px;line-height:1}:host.is-floating .country-selector{opacity:1}:host .phone-input-container{display:flex;align-items:center}:host .country-empty,:host .country-loading{padding:calc(var(--spacing, .25rem) * 3);color:var(--ngs-color-on-surface-variant);font-size:var(--ngs-font-size-sm)}:host .country-loading{padding-block:calc(var(--spacing, .25rem) * 2)}:host .phone-input-container input{border:none;background:none;outline:none;font:inherit;width:max-content;box-sizing:border-box;padding-right:6px;padding-left:4px;position:relative;z-index:0}:host .icon-wrapper{padding-right:24px}:host .mdc-button__label{margin-right:auto}:host .country-selector{display:flex;align-items:center;line-height:0;border-radius:0;color:var(--ngs-phone-input-color);flex-shrink:0;height:initial;opacity:var(--ngs-phone-input-opacity, 0);transition:opacity .2s;border:unset}:host .country-selector:disabled{opacity:.8}:host .country-selector-code{color:var(--ngs-phone-input-color);padding-right:0}:host-context(html.dark){--ngs-phone-input-color: var(--ngs-color-neutral-500)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: Ripple, selector: "[ngsRipple]", inputs: ["ngsRippleColor", "ngsRippleUnbounded", "ngsRippleCentered", "ngsRippleRadius", "ngsRippleAnimation", "ngsRippleDisabled", "ngsRippleTrigger"], outputs: ["ngsRippleCenteredChange", "ngsRippleDisabledChange", "ngsRippleTriggerChange"], exportAs: ["ngsRipple"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MenuHeader, selector: "ngs-menu-header", exportAs: ["ngsMenuHeader"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "component", type: MenuDivider, selector: "ngs-menu-divider" }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
706
- }
707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PhoneInput, decorators: [{
708
- type: Component,
709
- args: [{ selector: 'ngs-phone-input', exportAs: 'ngsPhoneInput', imports: [
710
- Ripple,
711
- MenuTrigger,
712
- Icon,
713
- Menu,
714
- ReactiveFormsModule,
715
- FormsModule,
716
- MenuHeader,
717
- MenuItem,
718
- MenuDivider,
719
- Input,
720
- Button,
721
- ], providers: [
722
- CountryCode,
723
- {
724
- provide: FormFieldControl,
725
- useExisting: PhoneInput
726
- },
727
- {
728
- provide: NG_VALIDATORS,
729
- useValue: phoneValidator,
730
- multi: true,
731
- },
732
- ], changeDetection: ChangeDetectionStrategy.Eager, host: {
733
- 'class': 'ngs-phone-input',
734
- '[class.is-floating]': 'shouldLabelFloat',
735
- }, template: "<div class=\"phone-input-container\">\n <button\n type=\"button\"\n ngsRipple\n [ngsMenuTriggerFor]=\"menu\"\n class=\"country-selector pe-1.5\"\n [disabled]=\"disabled\"\n (menuOpened)=\"openCountryMenu()\"\n (menuClosed)=\"closeCountryMenu()\">\n @if (selectedCountry()) {\n <span class=\"flag-icon\" aria-hidden=\"true\">{{ countryFlagEmoji($safeNavigationMigration(selectedCountry()?.shortCode)) }}</span>\n\n @if (selectedCountry()?.phoneCode) {\n <span class=\"country-selector-code\">{{ selectedCountry()?.phoneCode }}</span>\n }\n }\n <ngs-icon name=\"fluent:chevron-down-24-regular\" class=\"text-neutral-500 size-4 relative ms-0.5\"/>\n </button>\n\n <input\n ngsInput\n type=\"tel\"\n inputmode=\"tel\"\n [autocomplete]=\"autocomplete()\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [errorStateMatcher]=\"errorStateMatcher()\"\n [placeholder]=\"_placeholder()\"\n [disabled]=\"disabled\"\n class=\"grow\"\n #focusable>\n</div>\n\n<ngs-menu #menu=\"ngsMenu\">\n <ngs-menu-header>\n <div class=\"relative bg-surface-container-lowest\">\n <input #searchInput\n type=\"text\"\n placeholder=\"Search...\"\n aria-label=\"Search country\"\n autocomplete=\"off\"\n [ngModel]=\"searchTerm()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onCountrySearch($event)\"\n class=\"h-10 w-full border-0 border-b border-border bg-transparent px-3 text-sm text-on-surface outline-none focus:border-b-primary\">\n @if (searchTerm().trim()) {\n <div class=\"absolute end-1 top-1/2 -translate-y-1/2\">\n <button\n ngsIconButton\n (click)=\"clearSearch($event)\"\n class=\"clear-button\"\n type=\"button\"\n aria-label=\"Clear search\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </div>\n }\n </div>\n </ngs-menu-header>\n\n @for (country of preferredCountriesInDropDown; track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n }\n\n @if (preferredCountriesInDropDown.length) {\n <ngs-menu-divider/>\n }\n\n @for (country of visibleCountries(); track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n } @empty {\n @if (searchTerm()) {\n <div class=\"text-sm px-4 py-3\">\n <span i18n>No countries found</span>.\n </div>\n }\n }\n\n @if (visibleCountryCount() < filteredCountries().length) {\n <div class=\"country-loading\">\n Loading more countries...\n </div>\n }\n</ngs-menu>\n", styles: [":host{--ngs-phone-input-color: var(--ngs-color-neutral-600);--ngs-phone-input-opacity: 0}@media print{:host{--ngs-phone-input-flag-display: none}}:host .flag-icon{display:var(--ngs-phone-input-flag-display, inline-flex);align-items:center;justify-content:center;width:22px;margin-inline-end:var(--spacing, .25rem);font-size:22px;line-height:1}:host.is-floating .country-selector{opacity:1}:host .phone-input-container{display:flex;align-items:center}:host .country-empty,:host .country-loading{padding:calc(var(--spacing, .25rem) * 3);color:var(--ngs-color-on-surface-variant);font-size:var(--ngs-font-size-sm)}:host .country-loading{padding-block:calc(var(--spacing, .25rem) * 2)}:host .phone-input-container input{border:none;background:none;outline:none;font:inherit;width:max-content;box-sizing:border-box;padding-right:6px;padding-left:4px;position:relative;z-index:0}:host .icon-wrapper{padding-right:24px}:host .mdc-button__label{margin-right:auto}:host .country-selector{display:flex;align-items:center;line-height:0;border-radius:0;color:var(--ngs-phone-input-color);flex-shrink:0;height:initial;opacity:var(--ngs-phone-input-opacity, 0);transition:opacity .2s;border:unset}:host .country-selector:disabled{opacity:.8}:host .country-selector-code{color:var(--ngs-phone-input-color);padding-right:0}:host-context(html.dark){--ngs-phone-input-color: var(--ngs-color-neutral-500)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
736
- }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
737
- type: Optional
738
- }, {
739
- type: Self
740
- }] }, { type: i1.NgForm, decorators: [{
741
- type: Optional
742
- }] }, { type: i1.FormGroupDirective, decorators: [{
743
- type: Optional
744
- }] }, { type: i2.ErrorStateMatcher }], propDecorators: { searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }], focusable: [{ type: i0.ViewChild, args: ['focusable', { isSignal: true }] }], countryChanged: [{ type: i0.Output, args: ["countryChanged"] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], onlyCountries: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyCountries", required: false }] }], preferredCountries: [{ type: i0.Input, args: [{ isSignal: true, alias: "preferredCountries", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], defaultSelectedCountryCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSelectedCountryCode", required: false }] }], _placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], required: [{
745
- type: Input$1,
746
- args: [{ alias: 'required', transform: booleanAttribute }]
747
- }], phoneDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
748
-
749
- class SearchPipe {
750
- transform(countries, searchCriteria) {
751
- if (!searchCriteria || searchCriteria === '') {
752
- return countries;
753
- }
754
- return countries.filter((country) => {
755
- return `${country.name}${country.phoneCode}`
756
- .toLowerCase()
757
- .includes(searchCriteria.toLowerCase());
758
- });
759
- }
760
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
761
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: SearchPipe, isStandalone: true, name: "search" });
762
- }
763
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SearchPipe, decorators: [{
764
- type: Pipe,
765
- args: [{ name: 'search' }]
766
- }] });
767
-
768
- /**
769
- * Generated bundle index. Do not edit.
770
- */
771
-
1273
+ var PhoneInput = class PhoneInput {
1274
+ static COUNTRY_RENDER_CHUNK_SIZE = 32;
1275
+ static COUNTRY_RENDER_CHUNK_DELAY = 50;
1276
+ _destroyRef = inject(DestroyRef);
1277
+ _changeDetectorRef = inject(ChangeDetectorRef);
1278
+ countryCodeData = inject(CountryCode);
1279
+ _focusMonitor = inject(FocusMonitor);
1280
+ _elementRef = inject(ElementRef);
1281
+ _errorStateMatcher = inject(ErrorStateMatcher);
1282
+ _parentForm = inject(NgForm, { optional: true });
1283
+ static nextId = 0;
1284
+ searchInput = viewChild("searchInput", ...ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []);
1285
+ focusable = viewChild.required("focusable", ...ngDevMode ? [{ debugName: "focusable" }] : /* istanbul ignore next */ []);
1286
+ _focused = signal(false, ...ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []);
1287
+ _errorState = signal(false, ...ngDevMode ? [{ debugName: "_errorState" }] : /* istanbul ignore next */ []);
1288
+ id = "";
1289
+ _id = signal(`ngs-phone-input-${PhoneInput.nextId++}`, ...ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []);
1290
+ placeholder = "";
1291
+ countryChanged = output();
1292
+ stateChanges = new Subject();
1293
+ describedBy = "";
1294
+ phoneNumber = "";
1295
+ allCountries = [];
1296
+ preferredCountriesInDropDown = [];
1297
+ selectedCountry = signal(null, ...ngDevMode ? [{ debugName: "selectedCountry" }] : /* istanbul ignore next */ []);
1298
+ numberInstance;
1299
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
1300
+ displayedValue = null;
1301
+ invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
1302
+ touched = input(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
1303
+ touch = output();
1304
+ readonly = input(false, {
1305
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
1306
+ transform: booleanAttribute
1307
+ });
1308
+ searchTerm = signal("", ...ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []);
1309
+ visibleCountryCount = signal(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE, ...ngDevMode ? [{ debugName: "visibleCountryCount" }] : /* istanbul ignore next */ []);
1310
+ filteredCountries = computed(() => {
1311
+ const searchTerm = this.searchTerm().trim().toLowerCase();
1312
+ if (!searchTerm) return this.allCountries;
1313
+ return this.allCountries.filter((country) => {
1314
+ return `${country.name}${country.phoneCode}`.toLowerCase().includes(searchTerm);
1315
+ });
1316
+ }, ...ngDevMode ? [{ debugName: "filteredCountries" }] : /* istanbul ignore next */ []);
1317
+ visibleCountries = computed(() => {
1318
+ return this.filteredCountries().slice(0, this.visibleCountryCount());
1319
+ }, ...ngDevMode ? [{ debugName: "visibleCountries" }] : /* istanbul ignore next */ []);
1320
+ _previousFormattedNumber;
1321
+ _countryRenderTimeout;
1322
+ _countrySearchFocusTimeout;
1323
+ get focused() {
1324
+ return this._focused();
1325
+ }
1326
+ get errorState() {
1327
+ return this._errorState();
1328
+ }
1329
+ get empty() {
1330
+ return !this.phoneNumber;
1331
+ }
1332
+ get shouldLabelFloat() {
1333
+ return this._focused() || !this.empty;
1334
+ }
1335
+ autocomplete = input("on", ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
1336
+ errorStateMatcher = input(this._errorStateMatcher, ...ngDevMode ? [{ debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []);
1337
+ onlyCountries = input([], ...ngDevMode ? [{ debugName: "onlyCountries" }] : /* istanbul ignore next */ []);
1338
+ preferredCountries = input([], ...ngDevMode ? [{ debugName: "preferredCountries" }] : /* istanbul ignore next */ []);
1339
+ format = input("default", ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
1340
+ defaultSelectedCountryCode = input("us", ...ngDevMode ? [{ debugName: "defaultSelectedCountryCode" }] : /* istanbul ignore next */ []);
1341
+ _placeholder = input("", {
1342
+ ...ngDevMode ? { debugName: "_placeholder" } : /* istanbul ignore next */ {},
1343
+ alias: "placeholder"
1344
+ });
1345
+ required = input(false, {
1346
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
1347
+ transform: booleanAttribute
1348
+ });
1349
+ disabled = input(false, {
1350
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
1351
+ transform: booleanAttribute
1352
+ });
1353
+ ngControl = inject(NgControl, {
1354
+ self: true,
1355
+ optional: true
1356
+ });
1357
+ constructor() {
1358
+ effect(() => {
1359
+ const value = this.value();
1360
+ untracked(() => {
1361
+ if (value !== this.displayedValue) {
1362
+ this.displayedValue = value;
1363
+ this.formatExternalValue(value);
1364
+ }
1365
+ });
1366
+ });
1367
+ this._focusMonitor.monitor(this._elementRef, true).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((origin) => {
1368
+ if (this._focused() && !origin) this.touch.emit();
1369
+ this._focused.set(!!origin);
1370
+ this.stateChanges.next();
1371
+ });
1372
+ this.fetchCountryData();
1373
+ effect(() => {
1374
+ this.format();
1375
+ if (this.numberInstance) this.phoneNumber = this.formattedPhoneNumber;
1376
+ this.stateChanges.next();
1377
+ });
1378
+ effect(() => {
1379
+ this.id = this._id();
1380
+ this.placeholder = this._placeholder();
1381
+ });
1382
+ }
1383
+ ngOnInit() {
1384
+ if (this.onlyCountries().length) this.allCountries = this.allCountries.filter((c) => this.onlyCountries().includes(c.shortCode));
1385
+ if (this.preferredCountries().length) this.preferredCountries().forEach((shortCode) => {
1386
+ const preferredCountry = this.allCountries.filter((c) => {
1387
+ return c.shortCode === shortCode;
1388
+ }).shift();
1389
+ if (preferredCountry) this.preferredCountriesInDropDown.push(preferredCountry);
1390
+ });
1391
+ if (this.numberInstance && this.numberInstance.country) this.selectedCountry.set(this.getCountry(this.numberInstance.country));
1392
+ if (!this.selectedCountry()) this.selectedCountry.set(this.allCountries.find((country) => country.shortCode === this.defaultSelectedCountryCode()));
1393
+ this.countryChanged.emit(this.selectedCountry());
1394
+ this._changeDetectorRef.detectChanges();
1395
+ this.stateChanges.next();
1396
+ }
1397
+ ngDoCheck() {
1398
+ if (this.ngControl) {
1399
+ const isInvalid = this.invalid() && this.touched() || this.errorStateMatcher().isErrorState(this.ngControl.control, this._parentForm);
1400
+ this._errorState.set(isInvalid && !this.ngControl.control?.value || (!this._focused() ? isInvalid : false));
1401
+ }
1402
+ }
1403
+ updateErrorState() {}
1404
+ ngAfterViewInit() {
1405
+ this._changeDetectorRef.detectChanges();
1406
+ }
1407
+ ngOnDestroy() {
1408
+ this.clearCountryMenuTimeouts();
1409
+ this.stateChanges.complete();
1410
+ this._focusMonitor.stopMonitoring(this._elementRef);
1411
+ }
1412
+ onPhoneNumberChange() {
1413
+ if (this.disabled() || this.readonly()) return;
1414
+ if (!this.phoneNumber) {
1415
+ this.clearDisplay();
1416
+ this.commit("");
1417
+ this._changeDetectorRef.markForCheck();
1418
+ this.stateChanges.next();
1419
+ return;
1420
+ }
1421
+ let value;
1422
+ try {
1423
+ this.numberInstance = parsePhoneNumberFromString(this.phoneNumber.toString(), this.selectedCountry()?.shortCode.toUpperCase());
1424
+ this.formatAsYouTypeIfEnabled();
1425
+ value = this.numberInstance?.number ?? this.phoneNumber.toString();
1426
+ if (this.numberInstance && this.numberInstance.isValid()) {
1427
+ if (this.phoneNumber !== this.formattedPhoneNumber) this.phoneNumber = this.formattedPhoneNumber;
1428
+ if (this.selectedCountry()?.shortCode !== this.numberInstance.country && this.numberInstance.country) {
1429
+ this.selectedCountry.set(this.getCountry(this.numberInstance.country));
1430
+ this.countryChanged.emit(this.selectedCountry());
1431
+ }
1432
+ }
1433
+ } catch (e) {
1434
+ value = this.phoneNumber.toString();
1435
+ }
1436
+ this.commit(value);
1437
+ this._changeDetectorRef.markForCheck();
1438
+ this.stateChanges.next();
1439
+ }
1440
+ onCountrySelect(country, el) {
1441
+ if (this.disabled() || this.readonly()) return;
1442
+ if (this.selectedCountry() !== country) this.clearDisplay();
1443
+ this.selectedCountry.set(country);
1444
+ this.countryChanged.emit(this.selectedCountry());
1445
+ this.onPhoneNumberChange();
1446
+ el.focus();
1447
+ }
1448
+ focusSearchInput() {
1449
+ this.searchInput()?.nativeElement.focus();
1450
+ }
1451
+ openCountryMenu() {
1452
+ this.visibleCountryCount.set(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE);
1453
+ this.scheduleCountryRendering();
1454
+ this._countrySearchFocusTimeout = setTimeout(() => this.focusSearchInput());
1455
+ }
1456
+ closeCountryMenu() {
1457
+ this.clearCountryMenuTimeouts();
1458
+ this.searchTerm.set("");
1459
+ this.visibleCountryCount.set(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE);
1460
+ }
1461
+ onCountrySearch(searchTerm) {
1462
+ this.searchTerm.set(searchTerm);
1463
+ this.visibleCountryCount.set(PhoneInput.COUNTRY_RENDER_CHUNK_SIZE);
1464
+ this.scheduleCountryRendering();
1465
+ }
1466
+ clearSearch(event) {
1467
+ event.stopPropagation();
1468
+ this.onCountrySearch("");
1469
+ this.focusSearchInput();
1470
+ }
1471
+ countryFlagEmoji(shortCode) {
1472
+ if (!shortCode || shortCode.length !== 2) return "";
1473
+ const upperShortCode = shortCode.toUpperCase();
1474
+ return Array.from(upperShortCode).map((letter) => String.fromCodePoint(127462 + letter.charCodeAt(0) - 65)).join("");
1475
+ }
1476
+ scheduleCountryRendering() {
1477
+ this.clearCountryRenderTimeout();
1478
+ if (this.visibleCountryCount() >= this.filteredCountries().length) return;
1479
+ this._countryRenderTimeout = setTimeout(() => {
1480
+ this.visibleCountryCount.update((count) => {
1481
+ return Math.min(count + PhoneInput.COUNTRY_RENDER_CHUNK_SIZE, this.filteredCountries().length);
1482
+ });
1483
+ this.scheduleCountryRendering();
1484
+ this._changeDetectorRef.markForCheck();
1485
+ }, PhoneInput.COUNTRY_RENDER_CHUNK_DELAY);
1486
+ }
1487
+ clearCountryMenuTimeouts() {
1488
+ this.clearCountryRenderTimeout();
1489
+ this.clearCountrySearchFocusTimeout();
1490
+ }
1491
+ clearCountryRenderTimeout() {
1492
+ if (!this._countryRenderTimeout) return;
1493
+ clearTimeout(this._countryRenderTimeout);
1494
+ this._countryRenderTimeout = void 0;
1495
+ }
1496
+ clearCountrySearchFocusTimeout() {
1497
+ if (!this._countrySearchFocusTimeout) return;
1498
+ clearTimeout(this._countrySearchFocusTimeout);
1499
+ this._countrySearchFocusTimeout = void 0;
1500
+ }
1501
+ getCountry(shortCode) {
1502
+ return this.allCountries.find((c) => c.shortCode === shortCode.toLowerCase()) || {
1503
+ name: "UN",
1504
+ shortCode: "UN",
1505
+ dialCode: void 0,
1506
+ priority: 0,
1507
+ areaCodes: void 0,
1508
+ flagClass: "UN",
1509
+ placeHolder: ""
1510
+ };
1511
+ }
1512
+ onInputKeyPress(event) {
1513
+ if (!/[0-9+\- ]/.test(event.key)) event.preventDefault();
1514
+ }
1515
+ fetchCountryData() {
1516
+ this.allCountries = this.countryCodeData.allCountries;
1517
+ }
1518
+ commit(value) {
1519
+ this.displayedValue = value;
1520
+ this.value.set(value);
1521
+ }
1522
+ formatExternalValue(value) {
1523
+ if (!value) {
1524
+ this.clearDisplay();
1525
+ this.stateChanges.next();
1526
+ this._changeDetectorRef.markForCheck();
1527
+ return;
1528
+ }
1529
+ this.numberInstance = parsePhoneNumberFromString(value);
1530
+ if (this.numberInstance) {
1531
+ const countryCode = this.numberInstance.country;
1532
+ this.phoneNumber = this.formattedPhoneNumber;
1533
+ if (!countryCode) {
1534
+ this.stateChanges.next(void 0);
1535
+ this._changeDetectorRef.markForCheck();
1536
+ return;
1537
+ }
1538
+ const country = this.getCountry(countryCode);
1539
+ this.selectedCountry.set(country);
1540
+ this.countryChanged.emit(country);
1541
+ this._changeDetectorRef.markForCheck();
1542
+ this.stateChanges.next();
1543
+ } else this.phoneNumber = value;
1544
+ this.stateChanges.next(void 0);
1545
+ this._changeDetectorRef.markForCheck();
1546
+ }
1547
+ setDescribedByIds(ids) {
1548
+ this.describedBy = ids.join(" ");
1549
+ }
1550
+ focus() {
1551
+ this.focusable().nativeElement.focus();
1552
+ }
1553
+ onContainerClick(event) {
1554
+ if (event.target.tagName.toLowerCase() !== "input") this.focus();
1555
+ }
1556
+ reset() {
1557
+ this.clearDisplay();
1558
+ this.commit(null);
1559
+ this._changeDetectorRef.markForCheck();
1560
+ this.stateChanges.next(void 0);
1561
+ }
1562
+ clearDisplay() {
1563
+ this.phoneNumber = "";
1564
+ this.numberInstance = void 0;
1565
+ this._previousFormattedNumber = void 0;
1566
+ }
1567
+ get formattedPhoneNumber() {
1568
+ if (!this.numberInstance) return this.phoneNumber?.toString() || "";
1569
+ switch (this.format()) {
1570
+ case "national": return this.numberInstance.formatNational();
1571
+ case "international": return this.numberInstance.formatInternational();
1572
+ default: return this.numberInstance.nationalNumber.toString();
1573
+ }
1574
+ }
1575
+ formatAsYouTypeIfEnabled() {
1576
+ if (this.format() === "default") return;
1577
+ const selectedCountry = this.selectedCountry();
1578
+ if (!selectedCountry) return;
1579
+ const asYouType = new AsYouType(selectedCountry.shortCode.toUpperCase());
1580
+ if (!this.phoneNumber) return;
1581
+ if (this.phoneNumber?.toString().startsWith(this._previousFormattedNumber || "")) this.phoneNumber = asYouType.input(this.phoneNumber.toString());
1582
+ this._previousFormattedNumber = this.phoneNumber.toString();
1583
+ }
1584
+ static ɵfac = i0.ɵɵngDeclareFactory({
1585
+ minVersion: "12.0.0",
1586
+ version: "22.3.0",
1587
+ ngImport: i0,
1588
+ type: PhoneInput,
1589
+ deps: [],
1590
+ target: i0.ɵɵFactoryTarget.Component
1591
+ });
1592
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1593
+ minVersion: "17.0.0",
1594
+ version: "22.3.0",
1595
+ type: PhoneInput,
1596
+ isStandalone: true,
1597
+ selector: "ngs-phone-input",
1598
+ inputs: {
1599
+ value: {
1600
+ classPropertyName: "value",
1601
+ publicName: "value",
1602
+ isSignal: true,
1603
+ isRequired: false,
1604
+ transformFunction: null
1605
+ },
1606
+ invalid: {
1607
+ classPropertyName: "invalid",
1608
+ publicName: "invalid",
1609
+ isSignal: true,
1610
+ isRequired: false,
1611
+ transformFunction: null
1612
+ },
1613
+ touched: {
1614
+ classPropertyName: "touched",
1615
+ publicName: "touched",
1616
+ isSignal: true,
1617
+ isRequired: false,
1618
+ transformFunction: null
1619
+ },
1620
+ readonly: {
1621
+ classPropertyName: "readonly",
1622
+ publicName: "readonly",
1623
+ isSignal: true,
1624
+ isRequired: false,
1625
+ transformFunction: null
1626
+ },
1627
+ autocomplete: {
1628
+ classPropertyName: "autocomplete",
1629
+ publicName: "autocomplete",
1630
+ isSignal: true,
1631
+ isRequired: false,
1632
+ transformFunction: null
1633
+ },
1634
+ errorStateMatcher: {
1635
+ classPropertyName: "errorStateMatcher",
1636
+ publicName: "errorStateMatcher",
1637
+ isSignal: true,
1638
+ isRequired: false,
1639
+ transformFunction: null
1640
+ },
1641
+ onlyCountries: {
1642
+ classPropertyName: "onlyCountries",
1643
+ publicName: "onlyCountries",
1644
+ isSignal: true,
1645
+ isRequired: false,
1646
+ transformFunction: null
1647
+ },
1648
+ preferredCountries: {
1649
+ classPropertyName: "preferredCountries",
1650
+ publicName: "preferredCountries",
1651
+ isSignal: true,
1652
+ isRequired: false,
1653
+ transformFunction: null
1654
+ },
1655
+ format: {
1656
+ classPropertyName: "format",
1657
+ publicName: "format",
1658
+ isSignal: true,
1659
+ isRequired: false,
1660
+ transformFunction: null
1661
+ },
1662
+ defaultSelectedCountryCode: {
1663
+ classPropertyName: "defaultSelectedCountryCode",
1664
+ publicName: "defaultSelectedCountryCode",
1665
+ isSignal: true,
1666
+ isRequired: false,
1667
+ transformFunction: null
1668
+ },
1669
+ _placeholder: {
1670
+ classPropertyName: "_placeholder",
1671
+ publicName: "placeholder",
1672
+ isSignal: true,
1673
+ isRequired: false,
1674
+ transformFunction: null
1675
+ },
1676
+ required: {
1677
+ classPropertyName: "required",
1678
+ publicName: "required",
1679
+ isSignal: true,
1680
+ isRequired: false,
1681
+ transformFunction: null
1682
+ },
1683
+ disabled: {
1684
+ classPropertyName: "disabled",
1685
+ publicName: "disabled",
1686
+ isSignal: true,
1687
+ isRequired: false,
1688
+ transformFunction: null
1689
+ }
1690
+ },
1691
+ outputs: {
1692
+ countryChanged: "countryChanged",
1693
+ value: "valueChange",
1694
+ touch: "touch"
1695
+ },
1696
+ host: {
1697
+ properties: { "class.is-floating": "shouldLabelFloat" },
1698
+ classAttribute: "ngs-phone-input"
1699
+ },
1700
+ providers: [
1701
+ CountryCode,
1702
+ {
1703
+ provide: FormFieldControl,
1704
+ useExisting: PhoneInput
1705
+ },
1706
+ {
1707
+ provide: NG_VALIDATORS,
1708
+ useValue: phoneValidator,
1709
+ multi: true
1710
+ }
1711
+ ],
1712
+ viewQueries: [{
1713
+ propertyName: "searchInput",
1714
+ first: true,
1715
+ predicate: ["searchInput"],
1716
+ descendants: true,
1717
+ isSignal: true
1718
+ }, {
1719
+ propertyName: "focusable",
1720
+ first: true,
1721
+ predicate: ["focusable"],
1722
+ descendants: true,
1723
+ isSignal: true
1724
+ }],
1725
+ exportAs: ["ngsPhoneInput"],
1726
+ ngImport: i0,
1727
+ template: "<div class=\"phone-input-container\">\n <button\n type=\"button\"\n ngsRipple\n [ngsMenuTriggerFor]=\"menu\"\n class=\"country-selector pe-1.5\"\n [disabled]=\"disabled() || readonly()\"\n (menuOpened)=\"openCountryMenu()\"\n (menuClosed)=\"closeCountryMenu()\">\n @if (selectedCountry()) {\n <span class=\"flag-icon\" aria-hidden=\"true\">{{ countryFlagEmoji($safeNavigationMigration(selectedCountry()?.shortCode)) }}</span>\n\n @if (selectedCountry()?.phoneCode) {\n <span class=\"country-selector-code\">{{ selectedCountry()?.phoneCode }}</span>\n }\n }\n <ngs-icon name=\"fluent:chevron-down-24-regular\" class=\"text-neutral-500 size-4 relative ms-0.5\"/>\n </button>\n\n <input\n ngsInput\n type=\"tel\"\n inputmode=\"tel\"\n [autocomplete]=\"autocomplete()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [errorStateMatcher]=\"errorStateMatcher()\"\n [placeholder]=\"_placeholder()\"\n [disabled]=\"disabled()\"\n class=\"grow\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n #focusable>\n</div>\n\n<ngs-menu #menu=\"ngsMenu\">\n <ngs-menu-header>\n <div class=\"relative bg-surface-container-lowest\">\n <input #searchInput\n type=\"text\"\n placeholder=\"Search...\"\n aria-label=\"Search country\"\n autocomplete=\"off\"\n [ngModel]=\"searchTerm()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onCountrySearch($event)\"\n class=\"h-10 w-full border-0 border-b border-border bg-transparent px-3 text-sm text-on-surface outline-none focus:border-b-primary\">\n @if (searchTerm().trim()) {\n <div class=\"absolute end-1 top-1/2 -translate-y-1/2\">\n <button\n ngsIconButton\n (click)=\"clearSearch($event)\"\n class=\"clear-button\"\n type=\"button\"\n aria-label=\"Clear search\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </div>\n }\n </div>\n </ngs-menu-header>\n\n @for (country of preferredCountriesInDropDown; track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n }\n\n @if (preferredCountriesInDropDown.length) {\n <ngs-menu-divider/>\n }\n\n @for (country of visibleCountries(); track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n } @empty {\n @if (searchTerm()) {\n <div class=\"text-sm px-4 py-3\">\n <span i18n>No countries found</span>.\n </div>\n }\n }\n\n @if (visibleCountryCount() < filteredCountries().length) {\n <div class=\"country-loading\">\n Loading more countries...\n </div>\n }\n</ngs-menu>\n",
1728
+ styles: [":host{--ngs-phone-input-color: var(--ngs-color-neutral-600);--ngs-phone-input-opacity: 0}@media print{:host{--ngs-phone-input-flag-display: none}}:host .flag-icon{display:var(--ngs-phone-input-flag-display, inline-flex);align-items:center;justify-content:center;width:22px;margin-inline-end:var(--spacing, .25rem);font-size:22px;line-height:1}:host.is-floating .country-selector{opacity:1}:host .phone-input-container{display:flex;align-items:center}:host .country-empty,:host .country-loading{padding:calc(var(--spacing, .25rem) * 3);color:var(--ngs-color-on-surface-variant);font-size:var(--ngs-font-size-sm)}:host .country-loading{padding-block:calc(var(--spacing, .25rem) * 2)}:host .phone-input-container input{border:none;background:none;outline:none;font:inherit;width:max-content;box-sizing:border-box;padding-right:6px;padding-left:4px;position:relative;z-index:0}:host .icon-wrapper{padding-right:24px}:host .mdc-button__label{margin-right:auto}:host .country-selector{display:flex;align-items:center;line-height:0;border-radius:0;color:var(--ngs-phone-input-color);flex-shrink:0;height:initial;opacity:var(--ngs-phone-input-opacity, 0);transition:opacity .2s;border:unset}:host .country-selector:disabled{opacity:.8}:host .country-selector-code{color:var(--ngs-phone-input-color);padding-right:0}:host-context(html.dark){--ngs-phone-input-color: var(--ngs-color-neutral-500)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
1729
+ dependencies: [
1730
+ {
1731
+ kind: "directive",
1732
+ type: Ripple,
1733
+ selector: "[ngsRipple]",
1734
+ inputs: [
1735
+ "ngsRippleColor",
1736
+ "ngsRippleUnbounded",
1737
+ "ngsRippleCentered",
1738
+ "ngsRippleRadius",
1739
+ "ngsRippleAnimation",
1740
+ "ngsRippleDisabled",
1741
+ "ngsRippleTrigger"
1742
+ ],
1743
+ outputs: [
1744
+ "ngsRippleCenteredChange",
1745
+ "ngsRippleDisabledChange",
1746
+ "ngsRippleTriggerChange"
1747
+ ],
1748
+ exportAs: ["ngsRipple"]
1749
+ },
1750
+ {
1751
+ kind: "directive",
1752
+ type: MenuTrigger,
1753
+ selector: "[ngsMenuTriggerFor]",
1754
+ inputs: [
1755
+ "ngsMenuTriggerFor",
1756
+ "ngsMenuTriggerData",
1757
+ "ngsMenuDisabled",
1758
+ "xPosition",
1759
+ "yPosition",
1760
+ "ngsMenuTriggerRestoreFocus"
1761
+ ],
1762
+ outputs: ["menuOpened", "menuClosed"],
1763
+ exportAs: ["ngsMenuTrigger"]
1764
+ },
1765
+ {
1766
+ kind: "component",
1767
+ type: Icon,
1768
+ selector: "ngs-icon",
1769
+ inputs: ["name"],
1770
+ exportAs: ["ngsIcon"]
1771
+ },
1772
+ {
1773
+ kind: "component",
1774
+ type: Menu,
1775
+ selector: "ngs-menu",
1776
+ inputs: [
1777
+ "themeSource",
1778
+ "role",
1779
+ "classList",
1780
+ "xPosition",
1781
+ "yPosition",
1782
+ "pushIntoViewport"
1783
+ ],
1784
+ outputs: ["closed"],
1785
+ exportAs: ["ngsMenu"]
1786
+ },
1787
+ {
1788
+ kind: "ngmodule",
1789
+ type: FormsModule
1790
+ },
1791
+ {
1792
+ kind: "directive",
1793
+ type: i1.DefaultValueAccessor,
1794
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
1795
+ },
1796
+ {
1797
+ kind: "directive",
1798
+ type: i1.NgControlStatus,
1799
+ selector: "[formControlName],[ngModel],[formControl]"
1800
+ },
1801
+ {
1802
+ kind: "directive",
1803
+ type: i1.RequiredValidator,
1804
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
1805
+ inputs: ["required"]
1806
+ },
1807
+ {
1808
+ kind: "directive",
1809
+ type: i1.NgModel,
1810
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
1811
+ inputs: [
1812
+ "name",
1813
+ "disabled",
1814
+ "ngModel",
1815
+ "ngModelOptions"
1816
+ ],
1817
+ outputs: ["ngModelChange"],
1818
+ exportAs: ["ngModel"]
1819
+ },
1820
+ {
1821
+ kind: "component",
1822
+ type: MenuHeader,
1823
+ selector: "ngs-menu-header",
1824
+ exportAs: ["ngsMenuHeader"]
1825
+ },
1826
+ {
1827
+ kind: "component",
1828
+ type: MenuItem,
1829
+ selector: "ngs-menu-item, [ngs-menu-item]",
1830
+ inputs: [
1831
+ "disabled",
1832
+ "role",
1833
+ "selected"
1834
+ ],
1835
+ outputs: ["_triggered"],
1836
+ exportAs: ["ngsMenuItem"]
1837
+ },
1838
+ {
1839
+ kind: "component",
1840
+ type: MenuDivider,
1841
+ selector: "ngs-menu-divider"
1842
+ },
1843
+ {
1844
+ kind: "directive",
1845
+ type: Input$1,
1846
+ selector: "input[ngsInput], textarea[ngsInput]",
1847
+ inputs: [
1848
+ "id",
1849
+ "placeholder",
1850
+ "required",
1851
+ "disabled",
1852
+ "readonly",
1853
+ "errorStateMatcher"
1854
+ ],
1855
+ exportAs: ["ngsInput"]
1856
+ },
1857
+ {
1858
+ kind: "component",
1859
+ type: Button,
1860
+ selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ",
1861
+ inputs: [
1862
+ "ngsButton",
1863
+ "ngsIconButton",
1864
+ "loading",
1865
+ "disabled",
1866
+ "disabledInteractive",
1867
+ "disableRipple",
1868
+ "reverse",
1869
+ "fullWidth",
1870
+ "hideTextOnMobile"
1871
+ ],
1872
+ exportAs: ["ngsButton"]
1873
+ }
1874
+ ],
1875
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1876
+ });
1877
+ };
1878
+ i0.ɵɵngDeclareClassMetadata({
1879
+ minVersion: "12.0.0",
1880
+ version: "22.3.0",
1881
+ ngImport: i0,
1882
+ type: PhoneInput,
1883
+ decorators: [{
1884
+ type: Component,
1885
+ args: [{
1886
+ selector: "ngs-phone-input",
1887
+ exportAs: "ngsPhoneInput",
1888
+ imports: [
1889
+ Ripple,
1890
+ MenuTrigger,
1891
+ Icon,
1892
+ Menu,
1893
+ FormsModule,
1894
+ MenuHeader,
1895
+ MenuItem,
1896
+ MenuDivider,
1897
+ Input$1,
1898
+ Button
1899
+ ],
1900
+ providers: [
1901
+ CountryCode,
1902
+ {
1903
+ provide: FormFieldControl,
1904
+ useExisting: PhoneInput
1905
+ },
1906
+ {
1907
+ provide: NG_VALIDATORS,
1908
+ useValue: phoneValidator,
1909
+ multi: true
1910
+ }
1911
+ ],
1912
+ changeDetection: ChangeDetectionStrategy.Eager,
1913
+ host: {
1914
+ "class": "ngs-phone-input",
1915
+ "[class.is-floating]": "shouldLabelFloat"
1916
+ },
1917
+ template: "<div class=\"phone-input-container\">\n <button\n type=\"button\"\n ngsRipple\n [ngsMenuTriggerFor]=\"menu\"\n class=\"country-selector pe-1.5\"\n [disabled]=\"disabled() || readonly()\"\n (menuOpened)=\"openCountryMenu()\"\n (menuClosed)=\"closeCountryMenu()\">\n @if (selectedCountry()) {\n <span class=\"flag-icon\" aria-hidden=\"true\">{{ countryFlagEmoji($safeNavigationMigration(selectedCountry()?.shortCode)) }}</span>\n\n @if (selectedCountry()?.phoneCode) {\n <span class=\"country-selector-code\">{{ selectedCountry()?.phoneCode }}</span>\n }\n }\n <ngs-icon name=\"fluent:chevron-down-24-regular\" class=\"text-neutral-500 size-4 relative ms-0.5\"/>\n </button>\n\n <input\n ngsInput\n type=\"tel\"\n inputmode=\"tel\"\n [autocomplete]=\"autocomplete()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [errorStateMatcher]=\"errorStateMatcher()\"\n [placeholder]=\"_placeholder()\"\n [disabled]=\"disabled()\"\n class=\"grow\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n #focusable>\n</div>\n\n<ngs-menu #menu=\"ngsMenu\">\n <ngs-menu-header>\n <div class=\"relative bg-surface-container-lowest\">\n <input #searchInput\n type=\"text\"\n placeholder=\"Search...\"\n aria-label=\"Search country\"\n autocomplete=\"off\"\n [ngModel]=\"searchTerm()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"onCountrySearch($event)\"\n class=\"h-10 w-full border-0 border-b border-border bg-transparent px-3 text-sm text-on-surface outline-none focus:border-b-primary\">\n @if (searchTerm().trim()) {\n <div class=\"absolute end-1 top-1/2 -translate-y-1/2\">\n <button\n ngsIconButton\n (click)=\"clearSearch($event)\"\n class=\"clear-button\"\n type=\"button\"\n aria-label=\"Clear search\">\n <ngs-icon name=\"fluent:dismiss-24-regular\"/>\n </button>\n </div>\n }\n </div>\n </ngs-menu-header>\n\n @for (country of preferredCountriesInDropDown; track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n }\n\n @if (preferredCountriesInDropDown.length) {\n <ngs-menu-divider/>\n }\n\n @for (country of visibleCountries(); track country.shortCode) {\n <button\n type=\"button\"\n ngs-menu-item\n [selected]=\"selectedCountry()?.shortCode === country.shortCode\"\n (click)=\"onCountrySelect(country, focusable)\">\n <span class=\"inline-flex size-6 shrink-0 items-center justify-center text-2xl leading-none\" aria-hidden=\"true\">\n {{ countryFlagEmoji(country.shortCode) }}\n </span>\n <span class=\"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap\">{{ country.name }}</span>\n <span class=\"ms-auto shrink-0 text-neutral-500\">{{ country.phoneCode }}</span>\n </button>\n } @empty {\n @if (searchTerm()) {\n <div class=\"text-sm px-4 py-3\">\n <span i18n>No countries found</span>.\n </div>\n }\n }\n\n @if (visibleCountryCount() < filteredCountries().length) {\n <div class=\"country-loading\">\n Loading more countries...\n </div>\n }\n</ngs-menu>\n",
1918
+ styles: [":host{--ngs-phone-input-color: var(--ngs-color-neutral-600);--ngs-phone-input-opacity: 0}@media print{:host{--ngs-phone-input-flag-display: none}}:host .flag-icon{display:var(--ngs-phone-input-flag-display, inline-flex);align-items:center;justify-content:center;width:22px;margin-inline-end:var(--spacing, .25rem);font-size:22px;line-height:1}:host.is-floating .country-selector{opacity:1}:host .phone-input-container{display:flex;align-items:center}:host .country-empty,:host .country-loading{padding:calc(var(--spacing, .25rem) * 3);color:var(--ngs-color-on-surface-variant);font-size:var(--ngs-font-size-sm)}:host .country-loading{padding-block:calc(var(--spacing, .25rem) * 2)}:host .phone-input-container input{border:none;background:none;outline:none;font:inherit;width:max-content;box-sizing:border-box;padding-right:6px;padding-left:4px;position:relative;z-index:0}:host .icon-wrapper{padding-right:24px}:host .mdc-button__label{margin-right:auto}:host .country-selector{display:flex;align-items:center;line-height:0;border-radius:0;color:var(--ngs-phone-input-color);flex-shrink:0;height:initial;opacity:var(--ngs-phone-input-opacity, 0);transition:opacity .2s;border:unset}:host .country-selector:disabled{opacity:.8}:host .country-selector-code{color:var(--ngs-phone-input-color);padding-right:0}:host-context(html.dark){--ngs-phone-input-color: var(--ngs-color-neutral-500)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
1919
+ }]
1920
+ }],
1921
+ ctorParameters: () => [],
1922
+ propDecorators: {
1923
+ searchInput: [{
1924
+ type: i0.ViewChild,
1925
+ args: ["searchInput", { isSignal: true }]
1926
+ }],
1927
+ focusable: [{
1928
+ type: i0.ViewChild,
1929
+ args: ["focusable", { isSignal: true }]
1930
+ }],
1931
+ countryChanged: [{
1932
+ type: i0.Output,
1933
+ args: ["countryChanged"]
1934
+ }],
1935
+ value: [{
1936
+ type: i0.Input,
1937
+ args: [{
1938
+ isSignal: true,
1939
+ alias: "value",
1940
+ required: false
1941
+ }]
1942
+ }, {
1943
+ type: i0.Output,
1944
+ args: ["valueChange"]
1945
+ }],
1946
+ invalid: [{
1947
+ type: i0.Input,
1948
+ args: [{
1949
+ isSignal: true,
1950
+ alias: "invalid",
1951
+ required: false
1952
+ }]
1953
+ }],
1954
+ touched: [{
1955
+ type: i0.Input,
1956
+ args: [{
1957
+ isSignal: true,
1958
+ alias: "touched",
1959
+ required: false
1960
+ }]
1961
+ }],
1962
+ touch: [{
1963
+ type: i0.Output,
1964
+ args: ["touch"]
1965
+ }],
1966
+ readonly: [{
1967
+ type: i0.Input,
1968
+ args: [{
1969
+ isSignal: true,
1970
+ alias: "readonly",
1971
+ required: false
1972
+ }]
1973
+ }],
1974
+ autocomplete: [{
1975
+ type: i0.Input,
1976
+ args: [{
1977
+ isSignal: true,
1978
+ alias: "autocomplete",
1979
+ required: false
1980
+ }]
1981
+ }],
1982
+ errorStateMatcher: [{
1983
+ type: i0.Input,
1984
+ args: [{
1985
+ isSignal: true,
1986
+ alias: "errorStateMatcher",
1987
+ required: false
1988
+ }]
1989
+ }],
1990
+ onlyCountries: [{
1991
+ type: i0.Input,
1992
+ args: [{
1993
+ isSignal: true,
1994
+ alias: "onlyCountries",
1995
+ required: false
1996
+ }]
1997
+ }],
1998
+ preferredCountries: [{
1999
+ type: i0.Input,
2000
+ args: [{
2001
+ isSignal: true,
2002
+ alias: "preferredCountries",
2003
+ required: false
2004
+ }]
2005
+ }],
2006
+ format: [{
2007
+ type: i0.Input,
2008
+ args: [{
2009
+ isSignal: true,
2010
+ alias: "format",
2011
+ required: false
2012
+ }]
2013
+ }],
2014
+ defaultSelectedCountryCode: [{
2015
+ type: i0.Input,
2016
+ args: [{
2017
+ isSignal: true,
2018
+ alias: "defaultSelectedCountryCode",
2019
+ required: false
2020
+ }]
2021
+ }],
2022
+ _placeholder: [{
2023
+ type: i0.Input,
2024
+ args: [{
2025
+ isSignal: true,
2026
+ alias: "placeholder",
2027
+ required: false
2028
+ }]
2029
+ }],
2030
+ required: [{
2031
+ type: i0.Input,
2032
+ args: [{
2033
+ isSignal: true,
2034
+ alias: "required",
2035
+ required: false
2036
+ }]
2037
+ }],
2038
+ disabled: [{
2039
+ type: i0.Input,
2040
+ args: [{
2041
+ isSignal: true,
2042
+ alias: "disabled",
2043
+ required: false
2044
+ }]
2045
+ }]
2046
+ }
2047
+ });
2048
+ var SearchPipe = class SearchPipe {
2049
+ transform(countries, searchCriteria) {
2050
+ if (!searchCriteria || searchCriteria === "") return countries;
2051
+ return countries.filter((country) => {
2052
+ return `${country.name}${country.phoneCode}`.toLowerCase().includes(searchCriteria.toLowerCase());
2053
+ });
2054
+ }
2055
+ static ɵfac = i0.ɵɵngDeclareFactory({
2056
+ minVersion: "12.0.0",
2057
+ version: "22.3.0",
2058
+ ngImport: i0,
2059
+ type: SearchPipe,
2060
+ deps: [],
2061
+ target: i0.ɵɵFactoryTarget.Pipe
2062
+ });
2063
+ static ɵpipe = i0.ɵɵngDeclarePipe({
2064
+ minVersion: "14.0.0",
2065
+ version: "22.3.0",
2066
+ ngImport: i0,
2067
+ type: SearchPipe,
2068
+ isStandalone: true,
2069
+ name: "search"
2070
+ });
2071
+ };
2072
+ i0.ɵɵngDeclareClassMetadata({
2073
+ minVersion: "12.0.0",
2074
+ version: "22.3.0",
2075
+ ngImport: i0,
2076
+ type: SearchPipe,
2077
+ decorators: [{
2078
+ type: Pipe,
2079
+ args: [{ name: "search" }]
2080
+ }]
2081
+ });
772
2082
  export { PhoneInput, SearchPipe, phoneValidator };
773
- //# sourceMappingURL=ngstarter-ui-components-phone-input.mjs.map
2083
+
2084
+ //# sourceMappingURL=ngstarter-ui-components-phone-input.mjs.map