intl-tel-input 25.4.7 → 25.4.8

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 (273) hide show
  1. package/README.md +5 -5
  2. package/angular/build/IntlTelInput.cjs +9 -9
  3. package/angular/build/IntlTelInput.d.ts +1 -1
  4. package/angular/build/IntlTelInput.js +9 -9
  5. package/angular/build/IntlTelInputWithUtils.cjs +9 -9
  6. package/angular/build/IntlTelInputWithUtils.js +9 -9
  7. package/angular/build/intl-tel-input/angular.js +205 -0
  8. package/angular/build/intl-tel-input/angularWithUtils.js +206 -0
  9. package/angular/build/intl-tel-input/data.js +1096 -0
  10. package/angular/build/intl-tel-input/i18n/ar/countries.js +245 -0
  11. package/angular/build/intl-tel-input/i18n/ar/index.js +5 -0
  12. package/angular/build/intl-tel-input/i18n/ar/interface.js +13 -0
  13. package/angular/build/intl-tel-input/i18n/bg/countries.js +245 -0
  14. package/angular/build/intl-tel-input/i18n/bg/index.js +5 -0
  15. package/angular/build/intl-tel-input/i18n/bg/interface.js +13 -0
  16. package/angular/build/intl-tel-input/i18n/bn/countries.js +245 -0
  17. package/angular/build/intl-tel-input/i18n/bn/index.js +5 -0
  18. package/angular/build/intl-tel-input/i18n/bn/interface.js +13 -0
  19. package/angular/build/intl-tel-input/i18n/bs/countries.js +245 -0
  20. package/angular/build/intl-tel-input/i18n/bs/index.js +5 -0
  21. package/angular/build/intl-tel-input/i18n/bs/interface.js +13 -0
  22. package/angular/build/intl-tel-input/i18n/ca/countries.js +245 -0
  23. package/angular/build/intl-tel-input/i18n/ca/index.js +5 -0
  24. package/angular/build/intl-tel-input/i18n/ca/interface.js +13 -0
  25. package/angular/build/intl-tel-input/i18n/cs/countries.js +245 -0
  26. package/angular/build/intl-tel-input/i18n/cs/index.js +5 -0
  27. package/angular/build/intl-tel-input/i18n/cs/interface.js +13 -0
  28. package/angular/build/intl-tel-input/i18n/da/countries.js +245 -0
  29. package/angular/build/intl-tel-input/i18n/da/index.js +5 -0
  30. package/angular/build/intl-tel-input/i18n/da/interface.js +13 -0
  31. package/angular/build/intl-tel-input/i18n/de/countries.js +245 -0
  32. package/angular/build/intl-tel-input/i18n/de/index.js +5 -0
  33. package/angular/build/intl-tel-input/i18n/de/interface.js +13 -0
  34. package/angular/build/intl-tel-input/i18n/ee/countries.js +245 -0
  35. package/angular/build/intl-tel-input/i18n/ee/index.js +5 -0
  36. package/angular/build/intl-tel-input/i18n/ee/interface.js +13 -0
  37. package/angular/build/intl-tel-input/i18n/el/countries.js +245 -0
  38. package/angular/build/intl-tel-input/i18n/el/index.js +5 -0
  39. package/angular/build/intl-tel-input/i18n/el/interface.js +13 -0
  40. package/angular/build/intl-tel-input/i18n/en/countries.js +245 -0
  41. package/angular/build/intl-tel-input/i18n/en/index.js +5 -0
  42. package/angular/build/intl-tel-input/i18n/en/interface.js +13 -0
  43. package/angular/build/intl-tel-input/i18n/es/countries.js +245 -0
  44. package/angular/build/intl-tel-input/i18n/es/index.js +5 -0
  45. package/angular/build/intl-tel-input/i18n/es/interface.js +13 -0
  46. package/angular/build/intl-tel-input/i18n/fa/countries.js +245 -0
  47. package/angular/build/intl-tel-input/i18n/fa/index.js +5 -0
  48. package/angular/build/intl-tel-input/i18n/fa/interface.js +13 -0
  49. package/angular/build/intl-tel-input/i18n/fi/countries.js +245 -0
  50. package/angular/build/intl-tel-input/i18n/fi/index.js +5 -0
  51. package/angular/build/intl-tel-input/i18n/fi/interface.js +13 -0
  52. package/angular/build/intl-tel-input/i18n/fr/countries.js +245 -0
  53. package/angular/build/intl-tel-input/i18n/fr/index.js +5 -0
  54. package/angular/build/intl-tel-input/i18n/fr/interface.js +13 -0
  55. package/angular/build/intl-tel-input/i18n/hi/countries.js +245 -0
  56. package/angular/build/intl-tel-input/i18n/hi/index.js +5 -0
  57. package/angular/build/intl-tel-input/i18n/hi/interface.js +13 -0
  58. package/angular/build/intl-tel-input/i18n/hr/countries.js +245 -0
  59. package/angular/build/intl-tel-input/i18n/hr/index.js +5 -0
  60. package/angular/build/intl-tel-input/i18n/hr/interface.js +13 -0
  61. package/angular/build/intl-tel-input/i18n/hu/countries.js +245 -0
  62. package/angular/build/intl-tel-input/i18n/hu/index.js +5 -0
  63. package/angular/build/intl-tel-input/i18n/hu/interface.js +13 -0
  64. package/angular/build/intl-tel-input/i18n/id/countries.js +245 -0
  65. package/angular/build/intl-tel-input/i18n/id/index.js +5 -0
  66. package/angular/build/intl-tel-input/i18n/id/interface.js +13 -0
  67. package/angular/build/intl-tel-input/i18n/index.js +40 -0
  68. package/angular/build/intl-tel-input/i18n/it/countries.js +245 -0
  69. package/angular/build/intl-tel-input/i18n/it/index.js +5 -0
  70. package/angular/build/intl-tel-input/i18n/it/interface.js +13 -0
  71. package/angular/build/intl-tel-input/i18n/ja/countries.js +245 -0
  72. package/angular/build/intl-tel-input/i18n/ja/index.js +5 -0
  73. package/angular/build/intl-tel-input/i18n/ja/interface.js +13 -0
  74. package/angular/build/intl-tel-input/i18n/ko/countries.js +245 -0
  75. package/angular/build/intl-tel-input/i18n/ko/index.js +5 -0
  76. package/angular/build/intl-tel-input/i18n/ko/interface.js +13 -0
  77. package/angular/build/intl-tel-input/i18n/mr/countries.js +245 -0
  78. package/angular/build/intl-tel-input/i18n/mr/index.js +5 -0
  79. package/angular/build/intl-tel-input/i18n/mr/interface.js +13 -0
  80. package/angular/build/intl-tel-input/i18n/nl/countries.js +245 -0
  81. package/angular/build/intl-tel-input/i18n/nl/index.js +5 -0
  82. package/angular/build/intl-tel-input/i18n/nl/interface.js +13 -0
  83. package/angular/build/intl-tel-input/i18n/no/countries.js +245 -0
  84. package/angular/build/intl-tel-input/i18n/no/index.js +5 -0
  85. package/angular/build/intl-tel-input/i18n/no/interface.js +13 -0
  86. package/angular/build/intl-tel-input/i18n/pl/countries.js +245 -0
  87. package/angular/build/intl-tel-input/i18n/pl/index.js +5 -0
  88. package/angular/build/intl-tel-input/i18n/pl/interface.js +24 -0
  89. package/angular/build/intl-tel-input/i18n/pt/countries.js +245 -0
  90. package/angular/build/intl-tel-input/i18n/pt/index.js +5 -0
  91. package/angular/build/intl-tel-input/i18n/pt/interface.js +13 -0
  92. package/angular/build/intl-tel-input/i18n/ro/countries.js +245 -0
  93. package/angular/build/intl-tel-input/i18n/ro/index.js +5 -0
  94. package/angular/build/intl-tel-input/i18n/ro/interface.js +13 -0
  95. package/angular/build/intl-tel-input/i18n/ru/countries.js +245 -0
  96. package/angular/build/intl-tel-input/i18n/ru/index.js +5 -0
  97. package/angular/build/intl-tel-input/i18n/ru/interface.js +13 -0
  98. package/angular/build/intl-tel-input/i18n/sk/countries.js +245 -0
  99. package/angular/build/intl-tel-input/i18n/sk/index.js +5 -0
  100. package/angular/build/intl-tel-input/i18n/sk/interface.js +13 -0
  101. package/angular/build/intl-tel-input/i18n/sv/countries.js +245 -0
  102. package/angular/build/intl-tel-input/i18n/sv/index.js +5 -0
  103. package/angular/build/intl-tel-input/i18n/sv/interface.js +13 -0
  104. package/angular/build/intl-tel-input/i18n/te/countries.js +245 -0
  105. package/angular/build/intl-tel-input/i18n/te/index.js +5 -0
  106. package/angular/build/intl-tel-input/i18n/te/interface.js +13 -0
  107. package/angular/build/intl-tel-input/i18n/th/countries.js +245 -0
  108. package/angular/build/intl-tel-input/i18n/th/index.js +5 -0
  109. package/angular/build/intl-tel-input/i18n/th/interface.js +13 -0
  110. package/angular/build/intl-tel-input/i18n/tr/countries.js +245 -0
  111. package/angular/build/intl-tel-input/i18n/tr/index.js +5 -0
  112. package/angular/build/intl-tel-input/i18n/tr/interface.js +13 -0
  113. package/angular/build/intl-tel-input/i18n/types.js +1 -0
  114. package/angular/build/intl-tel-input/i18n/uk/countries.js +245 -0
  115. package/angular/build/intl-tel-input/i18n/uk/index.js +5 -0
  116. package/angular/build/intl-tel-input/i18n/uk/interface.js +13 -0
  117. package/angular/build/intl-tel-input/i18n/ur/countries.js +245 -0
  118. package/angular/build/intl-tel-input/i18n/ur/index.js +5 -0
  119. package/angular/build/intl-tel-input/i18n/ur/interface.js +13 -0
  120. package/angular/build/intl-tel-input/i18n/uz/countries.js +245 -0
  121. package/angular/build/intl-tel-input/i18n/uz/index.js +5 -0
  122. package/angular/build/intl-tel-input/i18n/uz/interface.js +13 -0
  123. package/angular/build/intl-tel-input/i18n/vi/countries.js +245 -0
  124. package/angular/build/intl-tel-input/i18n/vi/index.js +5 -0
  125. package/angular/build/intl-tel-input/i18n/vi/interface.js +13 -0
  126. package/angular/build/intl-tel-input/i18n/zh/countries.js +245 -0
  127. package/angular/build/intl-tel-input/i18n/zh/index.js +5 -0
  128. package/angular/build/intl-tel-input/i18n/zh/interface.js +13 -0
  129. package/angular/build/intl-tel-input/intlTelInputWithUtils.js +4 -0
  130. package/angular/build/intl-tel-input/utils.js +1341 -0
  131. package/angular/build/intl-tel-input.js +1780 -0
  132. package/angular/build/types/intl-tel-input/angular.d.ts +40 -0
  133. package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +40 -0
  134. package/angular/build/types/intl-tel-input/data.d.ts +11 -0
  135. package/angular/build/types/intl-tel-input/i18n/ar/countries.d.ts +3 -0
  136. package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +6 -0
  137. package/angular/build/types/intl-tel-input/i18n/ar/interface.d.ts +3 -0
  138. package/angular/build/types/intl-tel-input/i18n/bg/countries.d.ts +3 -0
  139. package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +6 -0
  140. package/angular/build/types/intl-tel-input/i18n/bg/interface.d.ts +3 -0
  141. package/angular/build/types/intl-tel-input/i18n/bn/countries.d.ts +3 -0
  142. package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +6 -0
  143. package/angular/build/types/intl-tel-input/i18n/bn/interface.d.ts +3 -0
  144. package/angular/build/types/intl-tel-input/i18n/bs/countries.d.ts +3 -0
  145. package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +6 -0
  146. package/angular/build/types/intl-tel-input/i18n/bs/interface.d.ts +3 -0
  147. package/angular/build/types/intl-tel-input/i18n/ca/countries.d.ts +3 -0
  148. package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +6 -0
  149. package/angular/build/types/intl-tel-input/i18n/ca/interface.d.ts +3 -0
  150. package/angular/build/types/intl-tel-input/i18n/cs/countries.d.ts +3 -0
  151. package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +6 -0
  152. package/angular/build/types/intl-tel-input/i18n/cs/interface.d.ts +3 -0
  153. package/angular/build/types/intl-tel-input/i18n/da/countries.d.ts +3 -0
  154. package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +6 -0
  155. package/angular/build/types/intl-tel-input/i18n/da/interface.d.ts +3 -0
  156. package/angular/build/types/intl-tel-input/i18n/de/countries.d.ts +3 -0
  157. package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +6 -0
  158. package/angular/build/types/intl-tel-input/i18n/de/interface.d.ts +3 -0
  159. package/angular/build/types/intl-tel-input/i18n/ee/countries.d.ts +3 -0
  160. package/angular/build/types/intl-tel-input/i18n/ee/index.d.ts +6 -0
  161. package/angular/build/types/intl-tel-input/i18n/ee/interface.d.ts +3 -0
  162. package/angular/build/types/intl-tel-input/i18n/el/countries.d.ts +3 -0
  163. package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +6 -0
  164. package/angular/build/types/intl-tel-input/i18n/el/interface.d.ts +3 -0
  165. package/angular/build/types/intl-tel-input/i18n/en/countries.d.ts +3 -0
  166. package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +6 -0
  167. package/angular/build/types/intl-tel-input/i18n/en/interface.d.ts +3 -0
  168. package/angular/build/types/intl-tel-input/i18n/es/countries.d.ts +3 -0
  169. package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +6 -0
  170. package/angular/build/types/intl-tel-input/i18n/es/interface.d.ts +3 -0
  171. package/angular/build/types/intl-tel-input/i18n/fa/countries.d.ts +3 -0
  172. package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +6 -0
  173. package/angular/build/types/intl-tel-input/i18n/fa/interface.d.ts +3 -0
  174. package/angular/build/types/intl-tel-input/i18n/fi/countries.d.ts +3 -0
  175. package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +6 -0
  176. package/angular/build/types/intl-tel-input/i18n/fi/interface.d.ts +3 -0
  177. package/angular/build/types/intl-tel-input/i18n/fr/countries.d.ts +3 -0
  178. package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +6 -0
  179. package/angular/build/types/intl-tel-input/i18n/fr/interface.d.ts +3 -0
  180. package/angular/build/types/intl-tel-input/i18n/hi/countries.d.ts +3 -0
  181. package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +6 -0
  182. package/angular/build/types/intl-tel-input/i18n/hi/interface.d.ts +3 -0
  183. package/angular/build/types/intl-tel-input/i18n/hr/countries.d.ts +3 -0
  184. package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +6 -0
  185. package/angular/build/types/intl-tel-input/i18n/hr/interface.d.ts +3 -0
  186. package/angular/build/types/intl-tel-input/i18n/hu/countries.d.ts +3 -0
  187. package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +6 -0
  188. package/angular/build/types/intl-tel-input/i18n/hu/interface.d.ts +3 -0
  189. package/angular/build/types/intl-tel-input/i18n/id/countries.d.ts +3 -0
  190. package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +6 -0
  191. package/angular/build/types/intl-tel-input/i18n/id/interface.d.ts +3 -0
  192. package/angular/build/types/intl-tel-input/i18n/index.d.ts +39 -0
  193. package/angular/build/types/intl-tel-input/i18n/it/countries.d.ts +3 -0
  194. package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +6 -0
  195. package/angular/build/types/intl-tel-input/i18n/it/interface.d.ts +3 -0
  196. package/angular/build/types/intl-tel-input/i18n/ja/countries.d.ts +3 -0
  197. package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +6 -0
  198. package/angular/build/types/intl-tel-input/i18n/ja/interface.d.ts +3 -0
  199. package/angular/build/types/intl-tel-input/i18n/ko/countries.d.ts +3 -0
  200. package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +6 -0
  201. package/angular/build/types/intl-tel-input/i18n/ko/interface.d.ts +3 -0
  202. package/angular/build/types/intl-tel-input/i18n/mr/countries.d.ts +3 -0
  203. package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +6 -0
  204. package/angular/build/types/intl-tel-input/i18n/mr/interface.d.ts +3 -0
  205. package/angular/build/types/intl-tel-input/i18n/nl/countries.d.ts +3 -0
  206. package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +6 -0
  207. package/angular/build/types/intl-tel-input/i18n/nl/interface.d.ts +3 -0
  208. package/angular/build/types/intl-tel-input/i18n/no/countries.d.ts +3 -0
  209. package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +6 -0
  210. package/angular/build/types/intl-tel-input/i18n/no/interface.d.ts +3 -0
  211. package/angular/build/types/intl-tel-input/i18n/pl/countries.d.ts +3 -0
  212. package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +6 -0
  213. package/angular/build/types/intl-tel-input/i18n/pl/interface.d.ts +3 -0
  214. package/angular/build/types/intl-tel-input/i18n/pt/countries.d.ts +3 -0
  215. package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +6 -0
  216. package/angular/build/types/intl-tel-input/i18n/pt/interface.d.ts +3 -0
  217. package/angular/build/types/intl-tel-input/i18n/ro/countries.d.ts +3 -0
  218. package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +6 -0
  219. package/angular/build/types/intl-tel-input/i18n/ro/interface.d.ts +3 -0
  220. package/angular/build/types/intl-tel-input/i18n/ru/countries.d.ts +3 -0
  221. package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +6 -0
  222. package/angular/build/types/intl-tel-input/i18n/ru/interface.d.ts +3 -0
  223. package/angular/build/types/intl-tel-input/i18n/sk/countries.d.ts +3 -0
  224. package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +6 -0
  225. package/angular/build/types/intl-tel-input/i18n/sk/interface.d.ts +3 -0
  226. package/angular/build/types/intl-tel-input/i18n/sv/countries.d.ts +3 -0
  227. package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +6 -0
  228. package/angular/build/types/intl-tel-input/i18n/sv/interface.d.ts +3 -0
  229. package/angular/build/types/intl-tel-input/i18n/te/countries.d.ts +3 -0
  230. package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +6 -0
  231. package/angular/build/types/intl-tel-input/i18n/te/interface.d.ts +3 -0
  232. package/angular/build/types/intl-tel-input/i18n/th/countries.d.ts +3 -0
  233. package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +6 -0
  234. package/angular/build/types/intl-tel-input/i18n/th/interface.d.ts +3 -0
  235. package/angular/build/types/intl-tel-input/i18n/tr/countries.d.ts +3 -0
  236. package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +6 -0
  237. package/angular/build/types/intl-tel-input/i18n/tr/interface.d.ts +3 -0
  238. package/angular/build/types/intl-tel-input/i18n/types.d.ts +254 -0
  239. package/angular/build/types/intl-tel-input/i18n/uk/countries.d.ts +3 -0
  240. package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +6 -0
  241. package/angular/build/types/intl-tel-input/i18n/uk/interface.d.ts +3 -0
  242. package/angular/build/types/intl-tel-input/i18n/ur/countries.d.ts +3 -0
  243. package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +6 -0
  244. package/angular/build/types/intl-tel-input/i18n/ur/interface.d.ts +3 -0
  245. package/angular/build/types/intl-tel-input/i18n/uz/countries.d.ts +3 -0
  246. package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +6 -0
  247. package/angular/build/types/intl-tel-input/i18n/uz/interface.d.ts +3 -0
  248. package/angular/build/types/intl-tel-input/i18n/vi/countries.d.ts +3 -0
  249. package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +6 -0
  250. package/angular/build/types/intl-tel-input/i18n/vi/interface.d.ts +3 -0
  251. package/angular/build/types/intl-tel-input/i18n/zh/countries.d.ts +3 -0
  252. package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +6 -0
  253. package/angular/build/types/intl-tel-input/i18n/zh/interface.d.ts +3 -0
  254. package/angular/build/types/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
  255. package/angular/build/types/intl-tel-input/utils.d.ts +2 -0
  256. package/angular/build/types/intl-tel-input.d.ts +199 -0
  257. package/build/js/data.js +1 -1
  258. package/build/js/data.min.js +1 -1
  259. package/build/js/intlTelInput.d.ts +1 -1
  260. package/build/js/intlTelInput.js +11 -11
  261. package/build/js/intlTelInput.min.js +2 -2
  262. package/build/js/intlTelInputWithUtils.js +11 -11
  263. package/build/js/intlTelInputWithUtils.min.js +2 -2
  264. package/package.json +5 -7
  265. package/react/README.md +1 -1
  266. package/react/build/IntlTelInput.cjs +10 -10
  267. package/react/build/IntlTelInput.d.ts +1 -1
  268. package/react/build/IntlTelInput.js +10 -10
  269. package/react/build/IntlTelInputWithUtils.cjs +10 -10
  270. package/react/build/IntlTelInputWithUtils.js +10 -10
  271. package/vue/README.md +1 -1
  272. package/vue/build/IntlTelInput.mjs +70 -72
  273. package/vue/build/IntlTelInputWithUtils.mjs +271 -273
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "25.4.7",
3
+ "version": "25.4.8",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
@@ -146,14 +146,12 @@
146
146
  "import": "./vue/build/IntlTelInputWithUtils.mjs"
147
147
  },
148
148
  "./angular": {
149
- "types": "./angular/build/IntlTelInput.d.ts",
150
- "require": "./angular/build/IntlTelInput.cjs",
151
- "default": "./angular/build/IntlTelInput.js"
149
+ "types": "./angular/build/types/intl-tel-input/angular.d.ts",
150
+ "default": "./angular/build/intl-tel-input/angular.js"
152
151
  },
153
152
  "./angularWithUtils": {
154
- "types": "./angular/build/IntlTelInput.d.ts",
155
- "require": "./angular/build/IntlTelInputWithUtils.cjs",
156
- "default": "./angular/build/IntlTelInputWithUtils.js"
153
+ "types": "./angular/build/types/intl-tel-input/angularWithUtils.d.ts",
154
+ "default": "./angular/build/intl-tel-input/angularWithUtils.js"
157
155
  },
158
156
  "./i18n": {
159
157
  "types": "./build/js/intlTelInput.d.ts",
package/react/README.md CHANGED
@@ -28,7 +28,7 @@ import "intl-tel-input/styles";
28
28
 
29
29
  See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/validation/ValidationApp.tsx) for a more fleshed-out example of how to handle validation.
30
30
 
31
- A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.7/build/js/utils.js"`.
31
+ A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.8/build/js/utils.js"`.
32
32
 
33
33
  ## Props
34
34
  Here's a list of all of the current props you can pass to the IntlTelInput React component.
@@ -2334,12 +2334,8 @@ var Iti = class {
2334
2334
  const newFullNumber = this._getFullNumber(newValue);
2335
2335
  const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
2336
2336
  const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
2337
- let isChangingDialCode = false;
2338
- if (alreadyHasPlus) {
2339
- const currentCountry = this.selectedCountryData.iso2;
2340
- const newCountry = this._getCountryFromNumber(newFullNumber);
2341
- isChangingDialCode = newCountry !== currentCountry;
2342
- }
2337
+ const newCountry = this._getNewCountryFromNumber(newFullNumber);
2338
+ const isChangingDialCode = newCountry !== null;
2343
2339
  if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
2344
2340
  e.preventDefault();
2345
2341
  }
@@ -2575,7 +2571,7 @@ var Iti = class {
2575
2571
  //* Check if need to select a new country based on the given number
2576
2572
  //* Note: called from _setInitialState, keyup handler, setNumber.
2577
2573
  _updateCountryFromNumber(fullNumber) {
2578
- const iso2 = this._getCountryFromNumber(fullNumber);
2574
+ const iso2 = this._getNewCountryFromNumber(fullNumber);
2579
2575
  if (iso2 !== null) {
2580
2576
  return this._setCountry(iso2);
2581
2577
  }
@@ -2591,7 +2587,10 @@ var Iti = class {
2591
2587
  const cleanNumber = hasPrefix ? number.substring(1) : number;
2592
2588
  return `+${dialCode}${cleanNumber}`;
2593
2589
  }
2594
- _getCountryFromNumber(fullNumber) {
2590
+ // Get the country ISO2 code from the given number
2591
+ // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2592
+ // NOTE: consider refactoring this to be more clear
2593
+ _getNewCountryFromNumber(fullNumber) {
2595
2594
  const plusIndex = fullNumber.indexOf("+");
2596
2595
  let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
2597
2596
  const selectedIso2 = this.selectedCountryData.iso2;
@@ -2605,7 +2604,8 @@ var Iti = class {
2605
2604
  if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
2606
2605
  return this.defaultCountry;
2607
2606
  }
2608
- const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && (numeric.length === dialCodeMatchNumeric.length || !this.selectedCountryData.areaCodes);
2607
+ const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
2608
+ const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
2609
2609
  const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2610
2610
  if (!isRegionlessNanpNumber && !alreadySelected) {
2611
2611
  for (let j = 0; j < iso2Codes.length; j++) {
@@ -3173,7 +3173,7 @@ var intlTelInput = Object.assign(
3173
3173
  attachUtils,
3174
3174
  startedLoadingUtilsScript: false,
3175
3175
  startedLoadingAutoCountry: false,
3176
- version: "25.4.7"
3176
+ version: "25.4.8"
3177
3177
  }
3178
3178
  );
3179
3179
  var intl_tel_input_default = intlTelInput;
@@ -448,7 +448,7 @@ declare module "intl-tel-input" {
448
448
  private _updateValFromNumber;
449
449
  private _updateCountryFromNumber;
450
450
  private _ensureHasDialCode;
451
- private _getCountryFromNumber;
451
+ private _getNewCountryFromNumber;
452
452
  private _highlightListItem;
453
453
  private _getCountryData;
454
454
  private _setCountry;
@@ -2298,12 +2298,8 @@ var Iti = class {
2298
2298
  const newFullNumber = this._getFullNumber(newValue);
2299
2299
  const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
2300
2300
  const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
2301
- let isChangingDialCode = false;
2302
- if (alreadyHasPlus) {
2303
- const currentCountry = this.selectedCountryData.iso2;
2304
- const newCountry = this._getCountryFromNumber(newFullNumber);
2305
- isChangingDialCode = newCountry !== currentCountry;
2306
- }
2301
+ const newCountry = this._getNewCountryFromNumber(newFullNumber);
2302
+ const isChangingDialCode = newCountry !== null;
2307
2303
  if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
2308
2304
  e.preventDefault();
2309
2305
  }
@@ -2539,7 +2535,7 @@ var Iti = class {
2539
2535
  //* Check if need to select a new country based on the given number
2540
2536
  //* Note: called from _setInitialState, keyup handler, setNumber.
2541
2537
  _updateCountryFromNumber(fullNumber) {
2542
- const iso2 = this._getCountryFromNumber(fullNumber);
2538
+ const iso2 = this._getNewCountryFromNumber(fullNumber);
2543
2539
  if (iso2 !== null) {
2544
2540
  return this._setCountry(iso2);
2545
2541
  }
@@ -2555,7 +2551,10 @@ var Iti = class {
2555
2551
  const cleanNumber = hasPrefix ? number.substring(1) : number;
2556
2552
  return `+${dialCode}${cleanNumber}`;
2557
2553
  }
2558
- _getCountryFromNumber(fullNumber) {
2554
+ // Get the country ISO2 code from the given number
2555
+ // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2556
+ // NOTE: consider refactoring this to be more clear
2557
+ _getNewCountryFromNumber(fullNumber) {
2559
2558
  const plusIndex = fullNumber.indexOf("+");
2560
2559
  let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
2561
2560
  const selectedIso2 = this.selectedCountryData.iso2;
@@ -2569,7 +2568,8 @@ var Iti = class {
2569
2568
  if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
2570
2569
  return this.defaultCountry;
2571
2570
  }
2572
- const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && (numeric.length === dialCodeMatchNumeric.length || !this.selectedCountryData.areaCodes);
2571
+ const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
2572
+ const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
2573
2573
  const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2574
2574
  if (!isRegionlessNanpNumber && !alreadySelected) {
2575
2575
  for (let j = 0; j < iso2Codes.length; j++) {
@@ -3137,7 +3137,7 @@ var intlTelInput = Object.assign(
3137
3137
  attachUtils,
3138
3138
  startedLoadingUtilsScript: false,
3139
3139
  startedLoadingAutoCountry: false,
3140
- version: "25.4.7"
3140
+ version: "25.4.8"
3141
3141
  }
3142
3142
  );
3143
3143
  var intl_tel_input_default = intlTelInput;
@@ -2334,12 +2334,8 @@ var Iti = class {
2334
2334
  const newFullNumber = this._getFullNumber(newValue);
2335
2335
  const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
2336
2336
  const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
2337
- let isChangingDialCode = false;
2338
- if (alreadyHasPlus) {
2339
- const currentCountry = this.selectedCountryData.iso2;
2340
- const newCountry = this._getCountryFromNumber(newFullNumber);
2341
- isChangingDialCode = newCountry !== currentCountry;
2342
- }
2337
+ const newCountry = this._getNewCountryFromNumber(newFullNumber);
2338
+ const isChangingDialCode = newCountry !== null;
2343
2339
  if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
2344
2340
  e.preventDefault();
2345
2341
  }
@@ -2575,7 +2571,7 @@ var Iti = class {
2575
2571
  //* Check if need to select a new country based on the given number
2576
2572
  //* Note: called from _setInitialState, keyup handler, setNumber.
2577
2573
  _updateCountryFromNumber(fullNumber) {
2578
- const iso2 = this._getCountryFromNumber(fullNumber);
2574
+ const iso2 = this._getNewCountryFromNumber(fullNumber);
2579
2575
  if (iso2 !== null) {
2580
2576
  return this._setCountry(iso2);
2581
2577
  }
@@ -2591,7 +2587,10 @@ var Iti = class {
2591
2587
  const cleanNumber = hasPrefix ? number.substring(1) : number;
2592
2588
  return `+${dialCode}${cleanNumber}`;
2593
2589
  }
2594
- _getCountryFromNumber(fullNumber) {
2590
+ // Get the country ISO2 code from the given number
2591
+ // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2592
+ // NOTE: consider refactoring this to be more clear
2593
+ _getNewCountryFromNumber(fullNumber) {
2595
2594
  const plusIndex = fullNumber.indexOf("+");
2596
2595
  let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
2597
2596
  const selectedIso2 = this.selectedCountryData.iso2;
@@ -2605,7 +2604,8 @@ var Iti = class {
2605
2604
  if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
2606
2605
  return this.defaultCountry;
2607
2606
  }
2608
- const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && (numeric.length === dialCodeMatchNumeric.length || !this.selectedCountryData.areaCodes);
2607
+ const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
2608
+ const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
2609
2609
  const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2610
2610
  if (!isRegionlessNanpNumber && !alreadySelected) {
2611
2611
  for (let j = 0; j < iso2Codes.length; j++) {
@@ -3173,7 +3173,7 @@ var intlTelInput = Object.assign(
3173
3173
  attachUtils,
3174
3174
  startedLoadingUtilsScript: false,
3175
3175
  startedLoadingAutoCountry: false,
3176
- version: "25.4.7"
3176
+ version: "25.4.8"
3177
3177
  }
3178
3178
  );
3179
3179
  var intl_tel_input_default = intlTelInput;
@@ -2298,12 +2298,8 @@ var Iti = class {
2298
2298
  const newFullNumber = this._getFullNumber(newValue);
2299
2299
  const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
2300
2300
  const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
2301
- let isChangingDialCode = false;
2302
- if (alreadyHasPlus) {
2303
- const currentCountry = this.selectedCountryData.iso2;
2304
- const newCountry = this._getCountryFromNumber(newFullNumber);
2305
- isChangingDialCode = newCountry !== currentCountry;
2306
- }
2301
+ const newCountry = this._getNewCountryFromNumber(newFullNumber);
2302
+ const isChangingDialCode = newCountry !== null;
2307
2303
  if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
2308
2304
  e.preventDefault();
2309
2305
  }
@@ -2539,7 +2535,7 @@ var Iti = class {
2539
2535
  //* Check if need to select a new country based on the given number
2540
2536
  //* Note: called from _setInitialState, keyup handler, setNumber.
2541
2537
  _updateCountryFromNumber(fullNumber) {
2542
- const iso2 = this._getCountryFromNumber(fullNumber);
2538
+ const iso2 = this._getNewCountryFromNumber(fullNumber);
2543
2539
  if (iso2 !== null) {
2544
2540
  return this._setCountry(iso2);
2545
2541
  }
@@ -2555,7 +2551,10 @@ var Iti = class {
2555
2551
  const cleanNumber = hasPrefix ? number.substring(1) : number;
2556
2552
  return `+${dialCode}${cleanNumber}`;
2557
2553
  }
2558
- _getCountryFromNumber(fullNumber) {
2554
+ // Get the country ISO2 code from the given number
2555
+ // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2556
+ // NOTE: consider refactoring this to be more clear
2557
+ _getNewCountryFromNumber(fullNumber) {
2559
2558
  const plusIndex = fullNumber.indexOf("+");
2560
2559
  let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
2561
2560
  const selectedIso2 = this.selectedCountryData.iso2;
@@ -2569,7 +2568,8 @@ var Iti = class {
2569
2568
  if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
2570
2569
  return this.defaultCountry;
2571
2570
  }
2572
- const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && (numeric.length === dialCodeMatchNumeric.length || !this.selectedCountryData.areaCodes);
2571
+ const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
2572
+ const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
2573
2573
  const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2574
2574
  if (!isRegionlessNanpNumber && !alreadySelected) {
2575
2575
  for (let j = 0; j < iso2Codes.length; j++) {
@@ -3137,7 +3137,7 @@ var intlTelInput = Object.assign(
3137
3137
  attachUtils,
3138
3138
  startedLoadingUtilsScript: false,
3139
3139
  startedLoadingAutoCountry: false,
3140
- version: "25.4.7"
3140
+ version: "25.4.8"
3141
3141
  }
3142
3142
  );
3143
3143
  var intl_tel_input_default = intlTelInput;
package/vue/README.md CHANGED
@@ -34,7 +34,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master
34
34
  "vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js"
35
35
  ```
36
36
 
37
- A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.7/build/js/utils.js"`.
37
+ A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.8/build/js/utils.js"`.
38
38
 
39
39
  ## Props
40
40
  Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
@@ -1787,7 +1787,7 @@ class G {
1787
1787
  }
1788
1788
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1789
1789
  _generateMarkup() {
1790
- var h, m, b;
1790
+ var d, m, b;
1791
1791
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1792
1792
  const {
1793
1793
  allowDropdown: t,
@@ -1798,17 +1798,17 @@ class G {
1798
1798
  dropdownContainer: o,
1799
1799
  fixDropdownWidth: r,
1800
1800
  useFullscreenPopup: a,
1801
- countrySearch: c,
1802
- i18n: d
1801
+ countrySearch: h,
1802
+ i18n: c
1803
1803
  } = this.options;
1804
- let C = "iti";
1805
- t && (C += " iti--allow-dropdown"), i && (C += " iti--show-flags"), s && (C += ` ${s}`), a || (C += " iti--inline-dropdown");
1806
- const p = y("div", { class: C });
1807
- if ((h = this.telInput.parentNode) == null || h.insertBefore(p, this.telInput), t || i || e) {
1804
+ let p = "iti";
1805
+ t && (p += " iti--allow-dropdown"), i && (p += " iti--show-flags"), s && (p += ` ${s}`), a || (p += " iti--inline-dropdown");
1806
+ const C = y("div", { class: p });
1807
+ if ((d = this.telInput.parentNode) == null || d.insertBefore(C, this.telInput), t || i || e) {
1808
1808
  this.countryContainer = y(
1809
1809
  "div",
1810
1810
  { class: "iti__country-container" },
1811
- p
1811
+ C
1812
1812
  ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", t ? (this.selectedCountry = y(
1813
1813
  "button",
1814
1814
  {
@@ -1844,15 +1844,15 @@ class G {
1844
1844
  if (this.dropdownContent = y("div", {
1845
1845
  id: `iti-${this.id}__dropdown-content`,
1846
1846
  class: `iti__dropdown-content iti__hide ${f}`
1847
- }), c && (this.searchInput = y(
1847
+ }), h && (this.searchInput = y(
1848
1848
  "input",
1849
1849
  {
1850
1850
  type: "text",
1851
1851
  class: "iti__search-input",
1852
- placeholder: d.searchPlaceholder,
1852
+ placeholder: c.searchPlaceholder,
1853
1853
  role: "combobox",
1854
1854
  "aria-expanded": "true",
1855
- "aria-label": d.searchPlaceholder,
1855
+ "aria-label": c.searchPlaceholder,
1856
1856
  "aria-controls": `iti-${this.id}__country-listbox`,
1857
1857
  "aria-autocomplete": "list",
1858
1858
  autocomplete: "off"
@@ -1868,31 +1868,31 @@ class G {
1868
1868
  class: "iti__country-list",
1869
1869
  id: `iti-${this.id}__country-listbox`,
1870
1870
  role: "listbox",
1871
- "aria-label": d.countryListAriaLabel
1871
+ "aria-label": c.countryListAriaLabel
1872
1872
  },
1873
1873
  this.dropdownContent
1874
- ), this._appendListItems(), c && this._updateSearchResultsText(), o) {
1874
+ ), this._appendListItems(), h && this._updateSearchResultsText(), o) {
1875
1875
  let g = "iti iti--container";
1876
1876
  s && (g += ` ${s}`), a ? g += " iti--fullscreen-popup" : g += " iti--inline-dropdown", this.dropdown = y("div", { class: g }), this.dropdown.appendChild(this.dropdownContent);
1877
1877
  } else
1878
1878
  this.countryContainer.appendChild(this.dropdownContent);
1879
1879
  }
1880
1880
  }
1881
- if (p.appendChild(this.telInput), this._updateInputPadding(), n) {
1881
+ if (C.appendChild(this.telInput), this._updateInputPadding(), n) {
1882
1882
  const _ = this.telInput.getAttribute("name") || "", f = n(_);
1883
1883
  if (f.phone) {
1884
1884
  const g = (m = this.telInput.form) == null ? void 0 : m.querySelector(`input[name="${f.phone}"]`);
1885
1885
  g ? this.hiddenInput = g : (this.hiddenInput = y("input", {
1886
1886
  type: "hidden",
1887
1887
  name: f.phone
1888
- }), p.appendChild(this.hiddenInput));
1888
+ }), C.appendChild(this.hiddenInput));
1889
1889
  }
1890
1890
  if (f.country) {
1891
1891
  const g = (b = this.telInput.form) == null ? void 0 : b.querySelector(`input[name="${f.country}"]`);
1892
1892
  g ? this.hiddenInputCountry = g : (this.hiddenInputCountry = y("input", {
1893
1893
  type: "hidden",
1894
1894
  name: f.country
1895
- }), p.appendChild(this.hiddenInputCountry));
1895
+ }), C.appendChild(this.hiddenInputCountry));
1896
1896
  }
1897
1897
  }
1898
1898
  }
@@ -1921,12 +1921,12 @@ class G {
1921
1921
  //* 1. Extracting a dial code from the given number
1922
1922
  //* 2. Using explicit initialCountry
1923
1923
  _setInitialState(t = !1) {
1924
- const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(n), r = S(n), { initialCountry: a, geoIpLookup: c } = this.options, d = a === "auto" && c;
1924
+ const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(n), r = S(n), { initialCountry: a, geoIpLookup: h } = this.options, c = a === "auto" && h;
1925
1925
  if (o && !r)
1926
1926
  this._updateCountryFromNumber(n);
1927
- else if (!d || t) {
1928
- const C = a ? a.toLowerCase() : "";
1929
- C && this._getCountryData(C, !0) ? this._setCountry(C) : o && r ? this._setCountry("us") : this._setCountry();
1927
+ else if (!c || t) {
1928
+ const p = a ? a.toLowerCase() : "";
1929
+ p && this._getCountryData(p, !0) ? this._setCountry(p) : o && r ? this._setCountry("us") : this._setCountry();
1930
1930
  }
1931
1931
  n && this._updateValFromNumber(n);
1932
1932
  }
@@ -1989,16 +1989,16 @@ class G {
1989
1989
  let r = !1;
1990
1990
  new RegExp("\\p{L}", "u").test(this.telInput.value) && (r = !0), this._handleInputEvent = (a) => {
1991
1991
  if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && n && o) {
1992
- const p = this.telInput.selectionStart || 0, h = this.telInput.value.substring(0, p - 1), m = this.telInput.value.substring(p);
1993
- this.telInput.value = h + m, this._openDropdownWithPlus();
1992
+ const C = this.telInput.selectionStart || 0, d = this.telInput.value.substring(0, C - 1), m = this.telInput.value.substring(C);
1993
+ this.telInput.value = d + m, this._openDropdownWithPlus();
1994
1994
  return;
1995
1995
  }
1996
1996
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
1997
- const c = (a == null ? void 0 : a.data) && /[^+0-9]/.test(a.data), d = (a == null ? void 0 : a.inputType) === "insertFromPaste" && this.telInput.value;
1998
- c || d && !t ? r = !0 : /[^+0-9]/.test(this.telInput.value) || (r = !1);
1999
- const C = (a == null ? void 0 : a.detail) && a.detail.isSetNumber && !s;
2000
- if (e && !r && !C) {
2001
- const p = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, p).replace(/[^+0-9]/g, "").length, b = (a == null ? void 0 : a.inputType) === "deleteContentForward", _ = this._formatNumberAsYouType(), f = K(m, _, p, b);
1997
+ const h = (a == null ? void 0 : a.data) && /[^+0-9]/.test(a.data), c = (a == null ? void 0 : a.inputType) === "insertFromPaste" && this.telInput.value;
1998
+ h || c && !t ? r = !0 : /[^+0-9]/.test(this.telInput.value) || (r = !1);
1999
+ const p = (a == null ? void 0 : a.detail) && a.detail.isSetNumber && !s;
2000
+ if (e && !r && !p) {
2001
+ const C = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, C).replace(/[^+0-9]/g, "").length, b = (a == null ? void 0 : a.inputType) === "deleteContentForward", _ = this._formatNumberAsYouType(), f = K(m, _, C, b);
2002
2002
  this.telInput.value = _, this.telInput.setSelectionRange(f, f);
2003
2003
  }
2004
2004
  }, this.telInput.addEventListener("input", this._handleInputEvent), (t || i) && (this._handleKeydownEvent = (a) => {
@@ -2008,13 +2008,8 @@ class G {
2008
2008
  return;
2009
2009
  }
2010
2010
  if (t) {
2011
- const c = this.telInput.value, d = c.charAt(0) === "+", C = !d && this.telInput.selectionStart === 0 && a.key === "+", p = /^[0-9]$/.test(a.key), h = i ? p : C || p, m = c.slice(0, this.telInput.selectionStart) + a.key + c.slice(this.telInput.selectionEnd), b = this._getFullNumber(m), _ = l.utils.getCoreNumber(b, this.selectedCountryData.iso2), f = this.maxCoreNumberLength && _.length > this.maxCoreNumberLength;
2012
- let g = !1;
2013
- if (d) {
2014
- const P = this.selectedCountryData.iso2;
2015
- g = this._getCountryFromNumber(b) !== P;
2016
- }
2017
- (!h || f && !g && !C) && a.preventDefault();
2011
+ const h = this.telInput.value, p = !(h.charAt(0) === "+") && this.telInput.selectionStart === 0 && a.key === "+", C = /^[0-9]$/.test(a.key), d = i ? C : p || C, m = h.slice(0, this.telInput.selectionStart) + a.key + h.slice(this.telInput.selectionEnd), b = this._getFullNumber(m), _ = l.utils.getCoreNumber(b, this.selectedCountryData.iso2), f = this.maxCoreNumberLength && _.length > this.maxCoreNumberLength, P = this._getNewCountryFromNumber(b) !== null;
2012
+ (!d || f && !P && !p) && a.preventDefault();
2018
2013
  }
2019
2014
  }
2020
2015
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
@@ -2105,10 +2100,10 @@ class G {
2105
2100
  this.countryList.innerHTML = "";
2106
2101
  const s = A(t);
2107
2102
  for (let n = 0; n < this.countries.length; n++) {
2108
- const o = this.countries[n], r = A(o.name), a = o.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((d) => d[0]).join("").toLowerCase(), c = `+${o.dialCode}`;
2109
- if (e || r.includes(s) || c.includes(s) || o.iso2.includes(s) || a.includes(s)) {
2110
- const d = o.nodeById[this.id];
2111
- d && this.countryList.appendChild(d), i && (this._highlightListItem(d, !1), i = !1);
2103
+ const o = this.countries[n], r = A(o.name), a = o.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((c) => c[0]).join("").toLowerCase(), h = `+${o.dialCode}`;
2104
+ if (e || r.includes(s) || h.includes(s) || o.iso2.includes(s) || a.includes(s)) {
2105
+ const c = o.nodeById[this.id];
2106
+ c && this.countryList.appendChild(c), i && (this._highlightListItem(c, !1), i = !1);
2112
2107
  }
2113
2108
  }
2114
2109
  i && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
@@ -2146,7 +2141,7 @@ class G {
2146
2141
  //* Check if need to select a new country based on the given number
2147
2142
  //* Note: called from _setInitialState, keyup handler, setNumber.
2148
2143
  _updateCountryFromNumber(t) {
2149
- const e = this._getCountryFromNumber(t);
2144
+ const e = this._getNewCountryFromNumber(t);
2150
2145
  return e !== null ? this._setCountry(e) : !1;
2151
2146
  }
2152
2147
  _ensureHasDialCode(t) {
@@ -2156,21 +2151,24 @@ class G {
2156
2151
  const o = i && t.charAt(0) === i && !this.options.separateDialCode ? t.substring(1) : t;
2157
2152
  return `+${e}${o}`;
2158
2153
  }
2159
- _getCountryFromNumber(t) {
2154
+ // Get the country ISO2 code from the given number
2155
+ // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2156
+ // NOTE: consider refactoring this to be more clear
2157
+ _getNewCountryFromNumber(t) {
2160
2158
  const e = t.indexOf("+");
2161
2159
  let i = e ? t.substring(e) : t;
2162
2160
  const s = this.selectedCountryData.iso2, n = this.selectedCountryData.dialCode;
2163
2161
  i = this._ensureHasDialCode(i);
2164
2162
  const o = this._getDialCode(i, !0), r = v(i);
2165
2163
  if (o) {
2166
- const a = v(o), c = this.dialCodeToIso2Map[a];
2167
- if (!s && this.defaultCountry && c.includes(this.defaultCountry))
2164
+ const a = v(o), h = this.dialCodeToIso2Map[a];
2165
+ if (!s && this.defaultCountry && h.includes(this.defaultCountry))
2168
2166
  return this.defaultCountry;
2169
- const d = s && c.includes(s) && (r.length === a.length || !this.selectedCountryData.areaCodes);
2170
- if (!(n === "1" && S(r)) && !d) {
2171
- for (let p = 0; p < c.length; p++)
2172
- if (c[p])
2173
- return c[p];
2167
+ const c = this.selectedCountryData.areaCodes && r.length > a.length, p = s && h.includes(s) && !c;
2168
+ if (!(n === "1" && S(r)) && !p) {
2169
+ for (let d = 0; d < h.length; d++)
2170
+ if (h[d])
2171
+ return h[d];
2174
2172
  }
2175
2173
  } else {
2176
2174
  if (i.charAt(0) === "+" && r.length)
@@ -2300,12 +2298,12 @@ class G {
2300
2298
  }
2301
2299
  //* Check if an element is visible within it's container, else scroll until it is.
2302
2300
  _scrollTo(t) {
2303
- const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, o = n + s, r = t.offsetHeight, a = t.getBoundingClientRect().top + i, c = a + r, d = a - n + e.scrollTop;
2301
+ const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, o = n + s, r = t.offsetHeight, a = t.getBoundingClientRect().top + i, h = a + r, c = a - n + e.scrollTop;
2304
2302
  if (a < n)
2305
- e.scrollTop = d;
2306
- else if (c > o) {
2307
- const C = s - r;
2308
- e.scrollTop = d - C;
2303
+ e.scrollTop = c;
2304
+ else if (h > o) {
2305
+ const p = s - r;
2306
+ e.scrollTop = c - p;
2309
2307
  }
2310
2308
  }
2311
2309
  //* Replace any existing dial code with the new one
@@ -2530,9 +2528,9 @@ const W = (u) => {
2530
2528
  attachUtils: W,
2531
2529
  startedLoadingUtilsScript: !1,
2532
2530
  startedLoadingAutoCountry: !1,
2533
- version: "25.4.7"
2531
+ version: "25.4.8"
2534
2532
  }
2535
- ), J = {
2533
+ ), Y = {
2536
2534
  __name: "IntlTelInput",
2537
2535
  props: /* @__PURE__ */ D({
2538
2536
  disabled: {
@@ -2565,37 +2563,37 @@ const W = (u) => {
2565
2563
  "changeErrorCode"
2566
2564
  ], ["update:modelValue"]),
2567
2565
  setup(u, { expose: t, emit: e }) {
2568
- const i = x(u, "modelValue"), s = u, n = e, o = L(), r = L(), a = L(!1), c = () => r.value ? s.options.strictMode ? r.value.isValidNumberPrecise() : r.value.isValidNumber() : null, d = () => {
2569
- let h = c();
2570
- a.value !== h && (a.value = h, n("changeValidity", !!h), n(
2566
+ const i = x(u, "modelValue"), s = u, n = e, o = L(), r = L(), a = L(!1), h = () => r.value ? s.options.strictMode ? r.value.isValidNumberPrecise() : r.value.isValidNumber() : null, c = () => {
2567
+ let d = h();
2568
+ a.value !== d && (a.value = d, n("changeValidity", !!d), n(
2571
2569
  "changeErrorCode",
2572
- h ? null : r.value.getValidationError()
2570
+ d ? null : r.value.getValidationError()
2573
2571
  ));
2574
- }, C = () => {
2575
- var h;
2576
- n("changeNumber", ((h = r.value) == null ? void 0 : h.getNumber()) ?? ""), d();
2577
2572
  }, p = () => {
2578
- var h;
2579
- n("changeCountry", ((h = r.value) == null ? void 0 : h.getSelectedCountryData().iso2) ?? ""), C(), d();
2573
+ var d;
2574
+ n("changeNumber", ((d = r.value) == null ? void 0 : d.getNumber()) ?? ""), c();
2575
+ }, C = () => {
2576
+ var d;
2577
+ n("changeCountry", ((d = r.value) == null ? void 0 : d.getSelectedCountryData().iso2) ?? ""), p(), c();
2580
2578
  };
2581
2579
  return E(() => {
2582
- o.value && (r.value = l(o.value, s.options), s.value && r.value.setNumber(s.value), s.disabled && r.value.setDisabled(s.disabled), a.value = c());
2580
+ o.value && (r.value = l(o.value, s.options), s.value && r.value.setNumber(s.value), s.disabled && r.value.setDisabled(s.disabled), a.value = h());
2583
2581
  }), M(
2584
2582
  () => s.disabled,
2585
- (h) => {
2583
+ (d) => {
2586
2584
  var m;
2587
- return (m = r.value) == null ? void 0 : m.setDisabled(h);
2585
+ return (m = r.value) == null ? void 0 : m.setDisabled(d);
2588
2586
  }
2589
2587
  ), F(() => {
2590
- var h;
2591
- return (h = r.value) == null ? void 0 : h.destroy();
2592
- }), t({ instance: r, input: o }), (h, m) => B((z(), V("input", R({
2588
+ var d;
2589
+ return (d = r.value) == null ? void 0 : d.destroy();
2590
+ }), t({ instance: r, input: o }), (d, m) => B((z(), V("input", R({
2593
2591
  ref_key: "input",
2594
2592
  ref: o,
2595
2593
  "onUpdate:modelValue": m[0] || (m[0] = (b) => i.value = b),
2596
2594
  type: "tel",
2597
- onCountrychange: p,
2598
- onInput: C
2595
+ onCountrychange: C,
2596
+ onInput: p
2599
2597
  }, u.inputProps), null, 16)), [
2600
2598
  [
2601
2599
  O,
@@ -2607,5 +2605,5 @@ const W = (u) => {
2607
2605
  }
2608
2606
  };
2609
2607
  export {
2610
- J as default
2608
+ Y as default
2611
2609
  };