intl-tel-input 25.4.5 → 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.
- package/README.md +5 -5
- package/angular/build/IntlTelInput.cjs +13 -10
- package/angular/build/IntlTelInput.d.ts +373 -1
- package/angular/build/IntlTelInput.js +13 -10
- package/angular/build/IntlTelInputWithUtils.cjs +13 -10
- package/angular/build/IntlTelInputWithUtils.js +13 -10
- package/angular/build/intl-tel-input/angular.js +205 -0
- package/angular/build/intl-tel-input/angularWithUtils.js +206 -0
- package/angular/build/intl-tel-input/data.js +1096 -0
- package/angular/build/intl-tel-input/i18n/ar/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ar/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ar/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/bg/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/bg/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/bg/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/bn/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/bn/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/bn/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/bs/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/bs/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/bs/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ca/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ca/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ca/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/cs/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/cs/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/cs/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/da/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/da/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/da/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/de/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/de/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/de/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ee/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ee/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ee/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/el/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/el/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/el/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/en/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/en/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/en/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/es/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/es/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/es/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/fa/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/fa/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/fa/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/fi/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/fi/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/fi/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/fr/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/fr/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/fr/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/hi/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/hi/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/hi/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/hr/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/hr/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/hr/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/hu/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/hu/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/hu/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/id/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/id/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/id/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/index.js +40 -0
- package/angular/build/intl-tel-input/i18n/it/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/it/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/it/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ja/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ja/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ja/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ko/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ko/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ko/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/mr/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/mr/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/mr/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/nl/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/nl/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/nl/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/no/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/no/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/no/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/pl/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/pl/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/pl/interface.js +24 -0
- package/angular/build/intl-tel-input/i18n/pt/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/pt/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/pt/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ro/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ro/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ro/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ru/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ru/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ru/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/sk/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/sk/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/sk/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/sv/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/sv/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/sv/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/te/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/te/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/te/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/th/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/th/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/th/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/tr/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/tr/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/tr/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/types.js +1 -0
- package/angular/build/intl-tel-input/i18n/uk/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/uk/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/uk/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/ur/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/ur/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/ur/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/uz/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/uz/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/uz/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/vi/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/vi/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/vi/interface.js +13 -0
- package/angular/build/intl-tel-input/i18n/zh/countries.js +245 -0
- package/angular/build/intl-tel-input/i18n/zh/index.js +5 -0
- package/angular/build/intl-tel-input/i18n/zh/interface.js +13 -0
- package/angular/build/intl-tel-input/intlTelInputWithUtils.js +4 -0
- package/angular/build/intl-tel-input/utils.js +1341 -0
- package/angular/build/intl-tel-input.js +1780 -0
- package/angular/build/types/intl-tel-input/angular.d.ts +40 -0
- package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +40 -0
- package/angular/build/types/intl-tel-input/data.d.ts +11 -0
- package/angular/build/types/intl-tel-input/i18n/ar/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ar/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/bg/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/bg/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/bn/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/bn/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/bs/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/bs/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ca/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ca/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/cs/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/cs/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/da/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/da/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/de/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/de/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ee/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ee/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ee/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/el/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/el/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/en/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/en/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/es/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/es/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/fa/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/fa/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/fi/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/fi/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/fr/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/fr/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/hi/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/hi/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/hr/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/hr/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/hu/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/hu/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/id/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/id/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/index.d.ts +39 -0
- package/angular/build/types/intl-tel-input/i18n/it/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/it/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ja/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ja/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ko/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ko/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/mr/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/mr/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/nl/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/nl/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/no/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/no/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/pl/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/pl/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/pt/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/pt/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ro/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ro/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ru/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ru/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/sk/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/sk/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/sv/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/sv/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/te/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/te/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/th/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/th/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/tr/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/tr/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +254 -0
- package/angular/build/types/intl-tel-input/i18n/uk/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/uk/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ur/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/ur/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/uz/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/uz/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/vi/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/vi/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/zh/countries.d.ts +3 -0
- package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +6 -0
- package/angular/build/types/intl-tel-input/i18n/zh/interface.d.ts +3 -0
- package/angular/build/types/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
- package/angular/build/types/intl-tel-input/utils.d.ts +2 -0
- package/angular/build/types/intl-tel-input.d.ts +199 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +1 -1
- package/build/js/intlTelInput.js +14 -11
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +14 -11
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +7 -8
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +13 -10
- package/react/build/IntlTelInput.d.ts +1 -1
- package/react/build/IntlTelInput.js +13 -10
- package/react/build/IntlTelInputWithUtils.cjs +13 -10
- package/react/build/IntlTelInputWithUtils.js +13 -10
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +71 -73
- package/vue/build/IntlTelInputWithUtils.mjs +265 -267
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intl-tel-input",
|
|
3
|
-
"version": "25.4.
|
|
3
|
+
"version": "25.4.8",
|
|
4
4
|
"description": "A JavaScript plugin for entering and validating international telephone numbers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"international",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"author": "Jack O'Connor (http://jackocnr.com)",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@angular/compiler": "^19.
|
|
30
|
+
"@angular/compiler": "^19.2.14",
|
|
31
|
+
"@angular/compiler-cli": "^19.2.14",
|
|
31
32
|
"@angular/core": "^19.1.4",
|
|
32
33
|
"@angular/forms": "^19.1.4",
|
|
33
34
|
"@angular/platform-browser": "^19.1.4",
|
|
@@ -145,14 +146,12 @@
|
|
|
145
146
|
"import": "./vue/build/IntlTelInputWithUtils.mjs"
|
|
146
147
|
},
|
|
147
148
|
"./angular": {
|
|
148
|
-
"types": "./angular/build/
|
|
149
|
-
"
|
|
150
|
-
"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"
|
|
151
151
|
},
|
|
152
152
|
"./angularWithUtils": {
|
|
153
|
-
"types": "./angular/build/
|
|
154
|
-
"
|
|
155
|
-
"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"
|
|
156
155
|
},
|
|
157
156
|
"./i18n": {
|
|
158
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.
|
|
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.
|
|
@@ -2056,6 +2056,9 @@ var Iti = class {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
if (dropdownContainer) {
|
|
2058
2058
|
let dropdownClasses = "iti iti--container";
|
|
2059
|
+
if (containerClass) {
|
|
2060
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2061
|
+
}
|
|
2059
2062
|
if (useFullscreenPopup) {
|
|
2060
2063
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2061
2064
|
} else {
|
|
@@ -2331,12 +2334,8 @@ var Iti = class {
|
|
|
2331
2334
|
const newFullNumber = this._getFullNumber(newValue);
|
|
2332
2335
|
const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
|
|
2333
2336
|
const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
const currentCountry = this.selectedCountryData.iso2;
|
|
2337
|
-
const newCountry = this._getCountryFromNumber(newFullNumber);
|
|
2338
|
-
isChangingDialCode = newCountry !== currentCountry;
|
|
2339
|
-
}
|
|
2337
|
+
const newCountry = this._getNewCountryFromNumber(newFullNumber);
|
|
2338
|
+
const isChangingDialCode = newCountry !== null;
|
|
2340
2339
|
if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
|
|
2341
2340
|
e.preventDefault();
|
|
2342
2341
|
}
|
|
@@ -2572,7 +2571,7 @@ var Iti = class {
|
|
|
2572
2571
|
//* Check if need to select a new country based on the given number
|
|
2573
2572
|
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
2574
2573
|
_updateCountryFromNumber(fullNumber) {
|
|
2575
|
-
const iso2 = this.
|
|
2574
|
+
const iso2 = this._getNewCountryFromNumber(fullNumber);
|
|
2576
2575
|
if (iso2 !== null) {
|
|
2577
2576
|
return this._setCountry(iso2);
|
|
2578
2577
|
}
|
|
@@ -2588,7 +2587,10 @@ var Iti = class {
|
|
|
2588
2587
|
const cleanNumber = hasPrefix ? number.substring(1) : number;
|
|
2589
2588
|
return `+${dialCode}${cleanNumber}`;
|
|
2590
2589
|
}
|
|
2591
|
-
|
|
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) {
|
|
2592
2594
|
const plusIndex = fullNumber.indexOf("+");
|
|
2593
2595
|
let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
|
|
2594
2596
|
const selectedIso2 = this.selectedCountryData.iso2;
|
|
@@ -2602,7 +2604,8 @@ var Iti = class {
|
|
|
2602
2604
|
if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
|
|
2603
2605
|
return this.defaultCountry;
|
|
2604
2606
|
}
|
|
2605
|
-
const
|
|
2607
|
+
const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
|
|
2608
|
+
const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
|
|
2606
2609
|
const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
|
|
2607
2610
|
if (!isRegionlessNanpNumber && !alreadySelected) {
|
|
2608
2611
|
for (let j = 0; j < iso2Codes.length; j++) {
|
|
@@ -3170,7 +3173,7 @@ var intlTelInput = Object.assign(
|
|
|
3170
3173
|
attachUtils,
|
|
3171
3174
|
startedLoadingUtilsScript: false,
|
|
3172
3175
|
startedLoadingAutoCountry: false,
|
|
3173
|
-
version: "25.4.
|
|
3176
|
+
version: "25.4.8"
|
|
3174
3177
|
}
|
|
3175
3178
|
);
|
|
3176
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
|
|
451
|
+
private _getNewCountryFromNumber;
|
|
452
452
|
private _highlightListItem;
|
|
453
453
|
private _getCountryData;
|
|
454
454
|
private _setCountry;
|
|
@@ -2020,6 +2020,9 @@ var Iti = class {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
if (dropdownContainer) {
|
|
2022
2022
|
let dropdownClasses = "iti iti--container";
|
|
2023
|
+
if (containerClass) {
|
|
2024
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2025
|
+
}
|
|
2023
2026
|
if (useFullscreenPopup) {
|
|
2024
2027
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2025
2028
|
} else {
|
|
@@ -2295,12 +2298,8 @@ var Iti = class {
|
|
|
2295
2298
|
const newFullNumber = this._getFullNumber(newValue);
|
|
2296
2299
|
const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
|
|
2297
2300
|
const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
const currentCountry = this.selectedCountryData.iso2;
|
|
2301
|
-
const newCountry = this._getCountryFromNumber(newFullNumber);
|
|
2302
|
-
isChangingDialCode = newCountry !== currentCountry;
|
|
2303
|
-
}
|
|
2301
|
+
const newCountry = this._getNewCountryFromNumber(newFullNumber);
|
|
2302
|
+
const isChangingDialCode = newCountry !== null;
|
|
2304
2303
|
if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
|
|
2305
2304
|
e.preventDefault();
|
|
2306
2305
|
}
|
|
@@ -2536,7 +2535,7 @@ var Iti = class {
|
|
|
2536
2535
|
//* Check if need to select a new country based on the given number
|
|
2537
2536
|
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
2538
2537
|
_updateCountryFromNumber(fullNumber) {
|
|
2539
|
-
const iso2 = this.
|
|
2538
|
+
const iso2 = this._getNewCountryFromNumber(fullNumber);
|
|
2540
2539
|
if (iso2 !== null) {
|
|
2541
2540
|
return this._setCountry(iso2);
|
|
2542
2541
|
}
|
|
@@ -2552,7 +2551,10 @@ var Iti = class {
|
|
|
2552
2551
|
const cleanNumber = hasPrefix ? number.substring(1) : number;
|
|
2553
2552
|
return `+${dialCode}${cleanNumber}`;
|
|
2554
2553
|
}
|
|
2555
|
-
|
|
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) {
|
|
2556
2558
|
const plusIndex = fullNumber.indexOf("+");
|
|
2557
2559
|
let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
|
|
2558
2560
|
const selectedIso2 = this.selectedCountryData.iso2;
|
|
@@ -2566,7 +2568,8 @@ var Iti = class {
|
|
|
2566
2568
|
if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
|
|
2567
2569
|
return this.defaultCountry;
|
|
2568
2570
|
}
|
|
2569
|
-
const
|
|
2571
|
+
const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
|
|
2572
|
+
const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
|
|
2570
2573
|
const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
|
|
2571
2574
|
if (!isRegionlessNanpNumber && !alreadySelected) {
|
|
2572
2575
|
for (let j = 0; j < iso2Codes.length; j++) {
|
|
@@ -3134,7 +3137,7 @@ var intlTelInput = Object.assign(
|
|
|
3134
3137
|
attachUtils,
|
|
3135
3138
|
startedLoadingUtilsScript: false,
|
|
3136
3139
|
startedLoadingAutoCountry: false,
|
|
3137
|
-
version: "25.4.
|
|
3140
|
+
version: "25.4.8"
|
|
3138
3141
|
}
|
|
3139
3142
|
);
|
|
3140
3143
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2056,6 +2056,9 @@ var Iti = class {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
if (dropdownContainer) {
|
|
2058
2058
|
let dropdownClasses = "iti iti--container";
|
|
2059
|
+
if (containerClass) {
|
|
2060
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2061
|
+
}
|
|
2059
2062
|
if (useFullscreenPopup) {
|
|
2060
2063
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2061
2064
|
} else {
|
|
@@ -2331,12 +2334,8 @@ var Iti = class {
|
|
|
2331
2334
|
const newFullNumber = this._getFullNumber(newValue);
|
|
2332
2335
|
const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
|
|
2333
2336
|
const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
const currentCountry = this.selectedCountryData.iso2;
|
|
2337
|
-
const newCountry = this._getCountryFromNumber(newFullNumber);
|
|
2338
|
-
isChangingDialCode = newCountry !== currentCountry;
|
|
2339
|
-
}
|
|
2337
|
+
const newCountry = this._getNewCountryFromNumber(newFullNumber);
|
|
2338
|
+
const isChangingDialCode = newCountry !== null;
|
|
2340
2339
|
if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
|
|
2341
2340
|
e.preventDefault();
|
|
2342
2341
|
}
|
|
@@ -2572,7 +2571,7 @@ var Iti = class {
|
|
|
2572
2571
|
//* Check if need to select a new country based on the given number
|
|
2573
2572
|
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
2574
2573
|
_updateCountryFromNumber(fullNumber) {
|
|
2575
|
-
const iso2 = this.
|
|
2574
|
+
const iso2 = this._getNewCountryFromNumber(fullNumber);
|
|
2576
2575
|
if (iso2 !== null) {
|
|
2577
2576
|
return this._setCountry(iso2);
|
|
2578
2577
|
}
|
|
@@ -2588,7 +2587,10 @@ var Iti = class {
|
|
|
2588
2587
|
const cleanNumber = hasPrefix ? number.substring(1) : number;
|
|
2589
2588
|
return `+${dialCode}${cleanNumber}`;
|
|
2590
2589
|
}
|
|
2591
|
-
|
|
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) {
|
|
2592
2594
|
const plusIndex = fullNumber.indexOf("+");
|
|
2593
2595
|
let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
|
|
2594
2596
|
const selectedIso2 = this.selectedCountryData.iso2;
|
|
@@ -2602,7 +2604,8 @@ var Iti = class {
|
|
|
2602
2604
|
if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
|
|
2603
2605
|
return this.defaultCountry;
|
|
2604
2606
|
}
|
|
2605
|
-
const
|
|
2607
|
+
const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
|
|
2608
|
+
const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
|
|
2606
2609
|
const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
|
|
2607
2610
|
if (!isRegionlessNanpNumber && !alreadySelected) {
|
|
2608
2611
|
for (let j = 0; j < iso2Codes.length; j++) {
|
|
@@ -3170,7 +3173,7 @@ var intlTelInput = Object.assign(
|
|
|
3170
3173
|
attachUtils,
|
|
3171
3174
|
startedLoadingUtilsScript: false,
|
|
3172
3175
|
startedLoadingAutoCountry: false,
|
|
3173
|
-
version: "25.4.
|
|
3176
|
+
version: "25.4.8"
|
|
3174
3177
|
}
|
|
3175
3178
|
);
|
|
3176
3179
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2020,6 +2020,9 @@ var Iti = class {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
if (dropdownContainer) {
|
|
2022
2022
|
let dropdownClasses = "iti iti--container";
|
|
2023
|
+
if (containerClass) {
|
|
2024
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2025
|
+
}
|
|
2023
2026
|
if (useFullscreenPopup) {
|
|
2024
2027
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2025
2028
|
} else {
|
|
@@ -2295,12 +2298,8 @@ var Iti = class {
|
|
|
2295
2298
|
const newFullNumber = this._getFullNumber(newValue);
|
|
2296
2299
|
const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, this.selectedCountryData.iso2);
|
|
2297
2300
|
const hasExceededMaxLength = this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength;
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
const currentCountry = this.selectedCountryData.iso2;
|
|
2301
|
-
const newCountry = this._getCountryFromNumber(newFullNumber);
|
|
2302
|
-
isChangingDialCode = newCountry !== currentCountry;
|
|
2303
|
-
}
|
|
2301
|
+
const newCountry = this._getNewCountryFromNumber(newFullNumber);
|
|
2302
|
+
const isChangingDialCode = newCountry !== null;
|
|
2304
2303
|
if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
|
|
2305
2304
|
e.preventDefault();
|
|
2306
2305
|
}
|
|
@@ -2536,7 +2535,7 @@ var Iti = class {
|
|
|
2536
2535
|
//* Check if need to select a new country based on the given number
|
|
2537
2536
|
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
2538
2537
|
_updateCountryFromNumber(fullNumber) {
|
|
2539
|
-
const iso2 = this.
|
|
2538
|
+
const iso2 = this._getNewCountryFromNumber(fullNumber);
|
|
2540
2539
|
if (iso2 !== null) {
|
|
2541
2540
|
return this._setCountry(iso2);
|
|
2542
2541
|
}
|
|
@@ -2552,7 +2551,10 @@ var Iti = class {
|
|
|
2552
2551
|
const cleanNumber = hasPrefix ? number.substring(1) : number;
|
|
2553
2552
|
return `+${dialCode}${cleanNumber}`;
|
|
2554
2553
|
}
|
|
2555
|
-
|
|
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) {
|
|
2556
2558
|
const plusIndex = fullNumber.indexOf("+");
|
|
2557
2559
|
let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
|
|
2558
2560
|
const selectedIso2 = this.selectedCountryData.iso2;
|
|
@@ -2566,7 +2568,8 @@ var Iti = class {
|
|
|
2566
2568
|
if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
|
|
2567
2569
|
return this.defaultCountry;
|
|
2568
2570
|
}
|
|
2569
|
-
const
|
|
2571
|
+
const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
|
|
2572
|
+
const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
|
|
2570
2573
|
const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
|
|
2571
2574
|
if (!isRegionlessNanpNumber && !alreadySelected) {
|
|
2572
2575
|
for (let j = 0; j < iso2Codes.length; j++) {
|
|
@@ -3134,7 +3137,7 @@ var intlTelInput = Object.assign(
|
|
|
3134
3137
|
attachUtils,
|
|
3135
3138
|
startedLoadingUtilsScript: false,
|
|
3136
3139
|
startedLoadingAutoCountry: false,
|
|
3137
|
-
version: "25.4.
|
|
3140
|
+
version: "25.4.8"
|
|
3138
3141
|
}
|
|
3139
3142
|
);
|
|
3140
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.
|
|
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
|
|
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:
|
|
1802
|
-
i18n:
|
|
1801
|
+
countrySearch: h,
|
|
1802
|
+
i18n: c
|
|
1803
1803
|
} = this.options;
|
|
1804
|
-
let
|
|
1805
|
-
t && (
|
|
1806
|
-
const
|
|
1807
|
-
if ((
|
|
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
|
-
|
|
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
|
-
}),
|
|
1847
|
+
}), h && (this.searchInput = y(
|
|
1848
1848
|
"input",
|
|
1849
1849
|
{
|
|
1850
1850
|
type: "text",
|
|
1851
1851
|
class: "iti__search-input",
|
|
1852
|
-
placeholder:
|
|
1852
|
+
placeholder: c.searchPlaceholder,
|
|
1853
1853
|
role: "combobox",
|
|
1854
1854
|
"aria-expanded": "true",
|
|
1855
|
-
"aria-label":
|
|
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":
|
|
1871
|
+
"aria-label": c.countryListAriaLabel
|
|
1872
1872
|
},
|
|
1873
1873
|
this.dropdownContent
|
|
1874
|
-
), this._appendListItems(),
|
|
1874
|
+
), this._appendListItems(), h && this._updateSearchResultsText(), o) {
|
|
1875
1875
|
let g = "iti iti--container";
|
|
1876
|
-
a ? g += " iti--fullscreen-popup" : g += " iti--inline-dropdown", this.dropdown = y("div", { class: g }), this.dropdown.appendChild(this.dropdownContent);
|
|
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 (
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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:
|
|
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 (!
|
|
1928
|
-
const
|
|
1929
|
-
|
|
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
|
|
1993
|
-
this.telInput.value =
|
|
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
|
|
1998
|
-
|
|
1999
|
-
const
|
|
2000
|
-
if (e && !r && !
|
|
2001
|
-
const
|
|
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
|
|
2012
|
-
|
|
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((
|
|
2109
|
-
if (e || r.includes(s) ||
|
|
2110
|
-
const
|
|
2111
|
-
|
|
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.
|
|
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
|
-
|
|
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),
|
|
2167
|
-
if (!s && 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
|
|
2170
|
-
if (!(n === "1" && S(r)) && !
|
|
2171
|
-
for (let
|
|
2172
|
-
if (
|
|
2173
|
-
return
|
|
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,
|
|
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 =
|
|
2306
|
-
else if (
|
|
2307
|
-
const
|
|
2308
|
-
e.scrollTop =
|
|
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.
|
|
2531
|
+
version: "25.4.8"
|
|
2534
2532
|
}
|
|
2535
|
-
),
|
|
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),
|
|
2569
|
-
let
|
|
2570
|
-
a.value !==
|
|
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
|
-
|
|
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
|
|
2579
|
-
n("
|
|
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 =
|
|
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
|
-
(
|
|
2583
|
+
(d) => {
|
|
2586
2584
|
var m;
|
|
2587
|
-
return (m = r.value) == null ? void 0 : m.setDisabled(
|
|
2585
|
+
return (m = r.value) == null ? void 0 : m.setDisabled(d);
|
|
2588
2586
|
}
|
|
2589
2587
|
), F(() => {
|
|
2590
|
-
var
|
|
2591
|
-
return (
|
|
2592
|
-
}), t({ instance: r, input: o }), (
|
|
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:
|
|
2598
|
-
onInput:
|
|
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
|
-
|
|
2608
|
+
Y as default
|
|
2611
2609
|
};
|