intl-tel-input 25.15.0 → 26.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -38
- package/angular/build/IntlTelInput.js +78 -324
- package/angular/build/IntlTelInputWithUtils.js +78 -324
- package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ee/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/index.d.ts +43 -43
- package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +2 -4
- package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input.d.ts +1 -1
- package/angular/build/types/modules/constants.d.ts +1 -1
- package/angular/build/types/modules/core/icons.d.ts +2 -0
- package/angular/build/types/modules/core/options.d.ts +1 -2
- package/angular/build/types/modules/core/ui.d.ts +2 -3
- package/angular/build/types/modules/data/country-data.d.ts +2 -2
- package/angular/build/types/modules/format/formatting.d.ts +2 -2
- package/angular/build/types/modules/types/public-api.d.ts +3 -1
- package/build/css/demo.css +1 -3
- package/build/css/intlTelInput-no-assets.css +17 -19
- package/build/css/intlTelInput-no-assets.min.css +1 -1
- package/build/css/intlTelInput.css +18 -21
- package/build/css/intlTelInput.min.css +1 -1
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/i18n/ar/index.js +23 -5
- package/build/js/i18n/bg/index.js +17 -5
- package/build/js/i18n/bn/index.js +17 -5
- package/build/js/i18n/bs/index.js +23 -5
- package/build/js/i18n/ca/index.js +17 -5
- package/build/js/i18n/cs/index.js +20 -5
- package/build/js/i18n/da/index.js +17 -5
- package/build/js/i18n/de/index.js +17 -5
- package/build/js/i18n/ee/index.js +17 -5
- package/build/js/i18n/el/index.js +17 -5
- package/build/js/i18n/en/index.js +18 -5
- package/build/js/i18n/es/index.js +17 -5
- package/build/js/i18n/fa/index.js +17 -5
- package/build/js/i18n/fi/index.js +17 -5
- package/build/js/i18n/fr/index.js +17 -5
- package/build/js/i18n/hi/index.js +17 -5
- package/build/js/i18n/hr/index.js +23 -5
- package/build/js/i18n/hu/index.js +17 -5
- package/build/js/i18n/id/index.js +17 -5
- package/build/js/i18n/index.js +43 -43
- package/build/js/i18n/it/index.js +17 -5
- package/build/js/i18n/ja/index.js +17 -5
- package/build/js/i18n/ko/index.js +17 -5
- package/build/js/i18n/lt/index.js +26 -5
- package/build/js/i18n/mr/index.js +17 -5
- package/build/js/i18n/nl/index.js +17 -5
- package/build/js/i18n/no/index.js +17 -5
- package/build/js/i18n/pl/index.js +21 -5
- package/build/js/i18n/pt/index.js +17 -5
- package/build/js/i18n/ro/index.js +21 -5
- package/build/js/i18n/ru/index.js +23 -5
- package/build/js/i18n/sk/index.js +23 -5
- package/build/js/i18n/sl/index.js +25 -5
- package/build/js/i18n/sq/index.js +18 -5
- package/build/js/i18n/sr/index.js +24 -5
- package/build/js/i18n/sv/index.js +17 -5
- package/build/js/i18n/te/index.js +17 -5
- package/build/js/i18n/th/index.js +17 -5
- package/build/js/i18n/tr/index.js +17 -5
- package/build/js/i18n/uk/index.js +23 -5
- package/build/js/i18n/ur/index.js +17 -5
- package/build/js/i18n/uz/index.js +17 -5
- package/build/js/i18n/vi/index.js +17 -5
- package/build/js/i18n/zh/index.js +17 -5
- package/build/js/intlTelInput.d.ts +118 -677
- package/build/js/intlTelInput.js +79 -329
- package/build/js/intlTelInput.min.js +8 -4
- package/build/js/intlTelInputWithUtils.js +79 -329
- package/build/js/intlTelInputWithUtils.min.js +7 -3
- package/package.json +10 -4
- package/react/build/IntlTelInput.cjs +78 -328
- package/react/build/IntlTelInput.d.ts +118 -677
- package/react/build/IntlTelInput.js +78 -328
- package/react/build/IntlTelInputWithUtils.cjs +78 -328
- package/react/build/IntlTelInputWithUtils.js +78 -328
- package/svelte/build/IntlTelInput.mjs +1170 -1413
- package/svelte/build/IntlTelInputWithUtils.mjs +935 -1178
- package/vue/build/exports/IntlTelInput.mjs +1 -1
- package/vue/build/exports/IntlTelInputWithUtils.mjs +1 -1
- package/vue/build/intl-tel-input/data.d.ts +18 -0
- package/vue/build/intl-tel-input/i18n/ar/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bg/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bn/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bs/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ca/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/cs/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/da/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/de/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ee/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/el/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/en/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/es/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fa/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hu/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/id/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/index.d.ts +43 -0
- package/vue/build/intl-tel-input/i18n/it/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ja/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ko/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/lt/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/mr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/nl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/no/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/pl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/pt/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ro/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ru/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sk/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sq/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sv/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/te/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/th/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/tr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/types.d.ts +10 -0
- package/vue/build/intl-tel-input/i18n/uk/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ur/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/uz/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/vi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/zh/index.d.ts +3 -0
- package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
- package/vue/build/{intl-tel-input-Db39yQmC.mjs → intl-tel-input-f0-6rrpA.mjs} +136 -138
- package/vue/build/modules/core/ui.d.ts +0 -1
- package/vue/build/modules/format/formatting.d.ts +1 -1
- package/vue/build/modules/types/public-api.d.ts +2 -1
- package/build/js/i18n/ar/countries.js +0 -245
- package/build/js/i18n/ar/interface.js +0 -23
- package/build/js/i18n/bg/countries.js +0 -245
- package/build/js/i18n/bg/interface.js +0 -13
- package/build/js/i18n/bn/countries.js +0 -245
- package/build/js/i18n/bn/interface.js +0 -13
- package/build/js/i18n/bs/countries.js +0 -245
- package/build/js/i18n/bs/interface.js +0 -20
- package/build/js/i18n/ca/countries.js +0 -245
- package/build/js/i18n/ca/interface.js +0 -13
- package/build/js/i18n/cs/countries.js +0 -245
- package/build/js/i18n/cs/interface.js +0 -20
- package/build/js/i18n/da/countries.js +0 -245
- package/build/js/i18n/da/interface.js +0 -13
- package/build/js/i18n/de/countries.js +0 -245
- package/build/js/i18n/de/interface.js +0 -13
- package/build/js/i18n/ee/countries.js +0 -245
- package/build/js/i18n/ee/interface.js +0 -13
- package/build/js/i18n/el/countries.js +0 -245
- package/build/js/i18n/el/interface.js +0 -13
- package/build/js/i18n/en/countries.js +0 -245
- package/build/js/i18n/en/interface.js +0 -14
- package/build/js/i18n/es/countries.js +0 -245
- package/build/js/i18n/es/interface.js +0 -13
- package/build/js/i18n/fa/countries.js +0 -245
- package/build/js/i18n/fa/interface.js +0 -13
- package/build/js/i18n/fi/countries.js +0 -245
- package/build/js/i18n/fi/interface.js +0 -13
- package/build/js/i18n/fr/countries.js +0 -245
- package/build/js/i18n/fr/interface.js +0 -13
- package/build/js/i18n/hi/countries.js +0 -245
- package/build/js/i18n/hi/interface.js +0 -13
- package/build/js/i18n/hr/countries.js +0 -245
- package/build/js/i18n/hr/interface.js +0 -20
- package/build/js/i18n/hu/countries.js +0 -245
- package/build/js/i18n/hu/interface.js +0 -13
- package/build/js/i18n/id/countries.js +0 -245
- package/build/js/i18n/id/interface.js +0 -13
- package/build/js/i18n/it/countries.js +0 -245
- package/build/js/i18n/it/interface.js +0 -13
- package/build/js/i18n/ja/countries.js +0 -245
- package/build/js/i18n/ja/interface.js +0 -13
- package/build/js/i18n/ko/countries.js +0 -245
- package/build/js/i18n/ko/interface.js +0 -13
- package/build/js/i18n/lt/countries.js +0 -245
- package/build/js/i18n/lt/interface.js +0 -26
- package/build/js/i18n/mr/countries.js +0 -245
- package/build/js/i18n/mr/interface.js +0 -13
- package/build/js/i18n/nl/countries.js +0 -245
- package/build/js/i18n/nl/interface.js +0 -13
- package/build/js/i18n/no/countries.js +0 -245
- package/build/js/i18n/no/interface.js +0 -13
- package/build/js/i18n/pl/countries.js +0 -245
- package/build/js/i18n/pl/interface.js +0 -19
- package/build/js/i18n/pt/countries.js +0 -245
- package/build/js/i18n/pt/interface.js +0 -13
- package/build/js/i18n/ro/countries.js +0 -245
- package/build/js/i18n/ro/interface.js +0 -18
- package/build/js/i18n/ru/countries.js +0 -245
- package/build/js/i18n/ru/interface.js +0 -20
- package/build/js/i18n/sk/countries.js +0 -245
- package/build/js/i18n/sk/interface.js +0 -20
- package/build/js/i18n/sl/countries.js +0 -245
- package/build/js/i18n/sl/interface.js +0 -25
- package/build/js/i18n/sq/countries.js +0 -245
- package/build/js/i18n/sq/interface.js +0 -14
- package/build/js/i18n/sr/countries.js +0 -245
- package/build/js/i18n/sr/interface.js +0 -21
- package/build/js/i18n/sv/countries.js +0 -245
- package/build/js/i18n/sv/interface.js +0 -13
- package/build/js/i18n/te/countries.js +0 -245
- package/build/js/i18n/te/interface.js +0 -13
- package/build/js/i18n/th/countries.js +0 -245
- package/build/js/i18n/th/interface.js +0 -13
- package/build/js/i18n/tr/countries.js +0 -245
- package/build/js/i18n/tr/interface.js +0 -13
- package/build/js/i18n/uk/countries.js +0 -245
- package/build/js/i18n/uk/interface.js +0 -20
- package/build/js/i18n/ur/countries.js +0 -245
- package/build/js/i18n/ur/interface.js +0 -13
- package/build/js/i18n/uz/countries.js +0 -245
- package/build/js/i18n/uz/interface.js +0 -13
- package/build/js/i18n/vi/countries.js +0 -245
- package/build/js/i18n/vi/interface.js +0 -13
- package/build/js/i18n/zh/countries.js +0 -245
- package/build/js/i18n/zh/interface.js +0 -13
- package/vue/build/IntlTelInput.mjs +0 -3398
- package/vue/build/IntlTelInputWithUtils.mjs +0 -9540
|
@@ -1699,273 +1699,6 @@ for (const c of rawCountryData) {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
var data_default = allCountries;
|
|
1701
1701
|
|
|
1702
|
-
// src/js/intl-tel-input/i18n/en/countries.ts
|
|
1703
|
-
var countryTranslations = {
|
|
1704
|
-
ad: "Andorra",
|
|
1705
|
-
ae: "United Arab Emirates",
|
|
1706
|
-
af: "Afghanistan",
|
|
1707
|
-
ag: "Antigua & Barbuda",
|
|
1708
|
-
ai: "Anguilla",
|
|
1709
|
-
al: "Albania",
|
|
1710
|
-
am: "Armenia",
|
|
1711
|
-
ao: "Angola",
|
|
1712
|
-
ar: "Argentina",
|
|
1713
|
-
as: "American Samoa",
|
|
1714
|
-
at: "Austria",
|
|
1715
|
-
au: "Australia",
|
|
1716
|
-
aw: "Aruba",
|
|
1717
|
-
ax: "\xC5land Islands",
|
|
1718
|
-
az: "Azerbaijan",
|
|
1719
|
-
ba: "Bosnia & Herzegovina",
|
|
1720
|
-
bb: "Barbados",
|
|
1721
|
-
bd: "Bangladesh",
|
|
1722
|
-
be: "Belgium",
|
|
1723
|
-
bf: "Burkina Faso",
|
|
1724
|
-
bg: "Bulgaria",
|
|
1725
|
-
bh: "Bahrain",
|
|
1726
|
-
bi: "Burundi",
|
|
1727
|
-
bj: "Benin",
|
|
1728
|
-
bl: "St. Barth\xE9lemy",
|
|
1729
|
-
bm: "Bermuda",
|
|
1730
|
-
bn: "Brunei",
|
|
1731
|
-
bo: "Bolivia",
|
|
1732
|
-
bq: "Caribbean Netherlands",
|
|
1733
|
-
br: "Brazil",
|
|
1734
|
-
bs: "Bahamas",
|
|
1735
|
-
bt: "Bhutan",
|
|
1736
|
-
bw: "Botswana",
|
|
1737
|
-
by: "Belarus",
|
|
1738
|
-
bz: "Belize",
|
|
1739
|
-
ca: "Canada",
|
|
1740
|
-
cc: "Cocos (Keeling) Islands",
|
|
1741
|
-
cd: "Congo - Kinshasa",
|
|
1742
|
-
cf: "Central African Republic",
|
|
1743
|
-
cg: "Congo - Brazzaville",
|
|
1744
|
-
ch: "Switzerland",
|
|
1745
|
-
ci: "C\xF4te d\u2019Ivoire",
|
|
1746
|
-
ck: "Cook Islands",
|
|
1747
|
-
cl: "Chile",
|
|
1748
|
-
cm: "Cameroon",
|
|
1749
|
-
cn: "China",
|
|
1750
|
-
co: "Colombia",
|
|
1751
|
-
cr: "Costa Rica",
|
|
1752
|
-
cu: "Cuba",
|
|
1753
|
-
cv: "Cape Verde",
|
|
1754
|
-
cw: "Cura\xE7ao",
|
|
1755
|
-
cx: "Christmas Island",
|
|
1756
|
-
cy: "Cyprus",
|
|
1757
|
-
cz: "Czechia",
|
|
1758
|
-
de: "Germany",
|
|
1759
|
-
dj: "Djibouti",
|
|
1760
|
-
dk: "Denmark",
|
|
1761
|
-
dm: "Dominica",
|
|
1762
|
-
do: "Dominican Republic",
|
|
1763
|
-
dz: "Algeria",
|
|
1764
|
-
ec: "Ecuador",
|
|
1765
|
-
ee: "Estonia",
|
|
1766
|
-
eg: "Egypt",
|
|
1767
|
-
eh: "Western Sahara",
|
|
1768
|
-
er: "Eritrea",
|
|
1769
|
-
es: "Spain",
|
|
1770
|
-
et: "Ethiopia",
|
|
1771
|
-
fi: "Finland",
|
|
1772
|
-
fj: "Fiji",
|
|
1773
|
-
fk: "Falkland Islands",
|
|
1774
|
-
fm: "Micronesia",
|
|
1775
|
-
fo: "Faroe Islands",
|
|
1776
|
-
fr: "France",
|
|
1777
|
-
ga: "Gabon",
|
|
1778
|
-
gb: "United Kingdom",
|
|
1779
|
-
gd: "Grenada",
|
|
1780
|
-
ge: "Georgia",
|
|
1781
|
-
gf: "French Guiana",
|
|
1782
|
-
gg: "Guernsey",
|
|
1783
|
-
gh: "Ghana",
|
|
1784
|
-
gi: "Gibraltar",
|
|
1785
|
-
gl: "Greenland",
|
|
1786
|
-
gm: "Gambia",
|
|
1787
|
-
gn: "Guinea",
|
|
1788
|
-
gp: "Guadeloupe",
|
|
1789
|
-
gq: "Equatorial Guinea",
|
|
1790
|
-
gr: "Greece",
|
|
1791
|
-
gt: "Guatemala",
|
|
1792
|
-
gu: "Guam",
|
|
1793
|
-
gw: "Guinea-Bissau",
|
|
1794
|
-
gy: "Guyana",
|
|
1795
|
-
hk: "Hong Kong SAR China",
|
|
1796
|
-
hn: "Honduras",
|
|
1797
|
-
hr: "Croatia",
|
|
1798
|
-
ht: "Haiti",
|
|
1799
|
-
hu: "Hungary",
|
|
1800
|
-
id: "Indonesia",
|
|
1801
|
-
ie: "Ireland",
|
|
1802
|
-
il: "Israel",
|
|
1803
|
-
im: "Isle of Man",
|
|
1804
|
-
in: "India",
|
|
1805
|
-
io: "British Indian Ocean Territory",
|
|
1806
|
-
iq: "Iraq",
|
|
1807
|
-
ir: "Iran",
|
|
1808
|
-
is: "Iceland",
|
|
1809
|
-
it: "Italy",
|
|
1810
|
-
je: "Jersey",
|
|
1811
|
-
jm: "Jamaica",
|
|
1812
|
-
jo: "Jordan",
|
|
1813
|
-
jp: "Japan",
|
|
1814
|
-
ke: "Kenya",
|
|
1815
|
-
kg: "Kyrgyzstan",
|
|
1816
|
-
kh: "Cambodia",
|
|
1817
|
-
ki: "Kiribati",
|
|
1818
|
-
km: "Comoros",
|
|
1819
|
-
kn: "St. Kitts & Nevis",
|
|
1820
|
-
kp: "North Korea",
|
|
1821
|
-
kr: "South Korea",
|
|
1822
|
-
kw: "Kuwait",
|
|
1823
|
-
ky: "Cayman Islands",
|
|
1824
|
-
kz: "Kazakhstan",
|
|
1825
|
-
la: "Laos",
|
|
1826
|
-
lb: "Lebanon",
|
|
1827
|
-
lc: "St. Lucia",
|
|
1828
|
-
li: "Liechtenstein",
|
|
1829
|
-
lk: "Sri Lanka",
|
|
1830
|
-
lr: "Liberia",
|
|
1831
|
-
ls: "Lesotho",
|
|
1832
|
-
lt: "Lithuania",
|
|
1833
|
-
lu: "Luxembourg",
|
|
1834
|
-
lv: "Latvia",
|
|
1835
|
-
ly: "Libya",
|
|
1836
|
-
ma: "Morocco",
|
|
1837
|
-
mc: "Monaco",
|
|
1838
|
-
md: "Moldova",
|
|
1839
|
-
me: "Montenegro",
|
|
1840
|
-
mf: "St. Martin",
|
|
1841
|
-
mg: "Madagascar",
|
|
1842
|
-
mh: "Marshall Islands",
|
|
1843
|
-
mk: "North Macedonia",
|
|
1844
|
-
ml: "Mali",
|
|
1845
|
-
mm: "Myanmar (Burma)",
|
|
1846
|
-
mn: "Mongolia",
|
|
1847
|
-
mo: "Macao SAR China",
|
|
1848
|
-
mp: "Northern Mariana Islands",
|
|
1849
|
-
mq: "Martinique",
|
|
1850
|
-
mr: "Mauritania",
|
|
1851
|
-
ms: "Montserrat",
|
|
1852
|
-
mt: "Malta",
|
|
1853
|
-
mu: "Mauritius",
|
|
1854
|
-
mv: "Maldives",
|
|
1855
|
-
mw: "Malawi",
|
|
1856
|
-
mx: "Mexico",
|
|
1857
|
-
my: "Malaysia",
|
|
1858
|
-
mz: "Mozambique",
|
|
1859
|
-
na: "Namibia",
|
|
1860
|
-
nc: "New Caledonia",
|
|
1861
|
-
ne: "Niger",
|
|
1862
|
-
nf: "Norfolk Island",
|
|
1863
|
-
ng: "Nigeria",
|
|
1864
|
-
ni: "Nicaragua",
|
|
1865
|
-
nl: "Netherlands",
|
|
1866
|
-
no: "Norway",
|
|
1867
|
-
np: "Nepal",
|
|
1868
|
-
nr: "Nauru",
|
|
1869
|
-
nu: "Niue",
|
|
1870
|
-
nz: "New Zealand",
|
|
1871
|
-
om: "Oman",
|
|
1872
|
-
pa: "Panama",
|
|
1873
|
-
pe: "Peru",
|
|
1874
|
-
pf: "French Polynesia",
|
|
1875
|
-
pg: "Papua New Guinea",
|
|
1876
|
-
ph: "Philippines",
|
|
1877
|
-
pk: "Pakistan",
|
|
1878
|
-
pl: "Poland",
|
|
1879
|
-
pm: "St. Pierre & Miquelon",
|
|
1880
|
-
pr: "Puerto Rico",
|
|
1881
|
-
ps: "Palestinian Territories",
|
|
1882
|
-
pt: "Portugal",
|
|
1883
|
-
pw: "Palau",
|
|
1884
|
-
py: "Paraguay",
|
|
1885
|
-
qa: "Qatar",
|
|
1886
|
-
re: "R\xE9union",
|
|
1887
|
-
ro: "Romania",
|
|
1888
|
-
rs: "Serbia",
|
|
1889
|
-
ru: "Russia",
|
|
1890
|
-
rw: "Rwanda",
|
|
1891
|
-
sa: "Saudi Arabia",
|
|
1892
|
-
sb: "Solomon Islands",
|
|
1893
|
-
sc: "Seychelles",
|
|
1894
|
-
sd: "Sudan",
|
|
1895
|
-
se: "Sweden",
|
|
1896
|
-
sg: "Singapore",
|
|
1897
|
-
sh: "St. Helena",
|
|
1898
|
-
si: "Slovenia",
|
|
1899
|
-
sj: "Svalbard & Jan Mayen",
|
|
1900
|
-
sk: "Slovakia",
|
|
1901
|
-
sl: "Sierra Leone",
|
|
1902
|
-
sm: "San Marino",
|
|
1903
|
-
sn: "Senegal",
|
|
1904
|
-
so: "Somalia",
|
|
1905
|
-
sr: "Suriname",
|
|
1906
|
-
ss: "South Sudan",
|
|
1907
|
-
st: "S\xE3o Tom\xE9 & Pr\xEDncipe",
|
|
1908
|
-
sv: "El Salvador",
|
|
1909
|
-
sx: "Sint Maarten",
|
|
1910
|
-
sy: "Syria",
|
|
1911
|
-
sz: "Eswatini",
|
|
1912
|
-
tc: "Turks & Caicos Islands",
|
|
1913
|
-
td: "Chad",
|
|
1914
|
-
tg: "Togo",
|
|
1915
|
-
th: "Thailand",
|
|
1916
|
-
tj: "Tajikistan",
|
|
1917
|
-
tk: "Tokelau",
|
|
1918
|
-
tl: "Timor-Leste",
|
|
1919
|
-
tm: "Turkmenistan",
|
|
1920
|
-
tn: "Tunisia",
|
|
1921
|
-
to: "Tonga",
|
|
1922
|
-
tr: "Turkey",
|
|
1923
|
-
tt: "Trinidad & Tobago",
|
|
1924
|
-
tv: "Tuvalu",
|
|
1925
|
-
tw: "Taiwan",
|
|
1926
|
-
tz: "Tanzania",
|
|
1927
|
-
ua: "Ukraine",
|
|
1928
|
-
ug: "Uganda",
|
|
1929
|
-
us: "United States",
|
|
1930
|
-
uy: "Uruguay",
|
|
1931
|
-
uz: "Uzbekistan",
|
|
1932
|
-
va: "Vatican City",
|
|
1933
|
-
vc: "St. Vincent & Grenadines",
|
|
1934
|
-
ve: "Venezuela",
|
|
1935
|
-
vg: "British Virgin Islands",
|
|
1936
|
-
vi: "U.S. Virgin Islands",
|
|
1937
|
-
vn: "Vietnam",
|
|
1938
|
-
vu: "Vanuatu",
|
|
1939
|
-
wf: "Wallis & Futuna",
|
|
1940
|
-
ws: "Samoa",
|
|
1941
|
-
ye: "Yemen",
|
|
1942
|
-
yt: "Mayotte",
|
|
1943
|
-
za: "South Africa",
|
|
1944
|
-
zm: "Zambia",
|
|
1945
|
-
zw: "Zimbabwe"
|
|
1946
|
-
};
|
|
1947
|
-
var countries_default = countryTranslations;
|
|
1948
|
-
|
|
1949
|
-
// src/js/intl-tel-input/i18n/en/interface.ts
|
|
1950
|
-
var interfaceTranslations = {
|
|
1951
|
-
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1952
|
-
noCountrySelected: "Select country",
|
|
1953
|
-
countryListAriaLabel: "List of countries",
|
|
1954
|
-
searchPlaceholder: "Search",
|
|
1955
|
-
clearSearchAriaLabel: "Clear search",
|
|
1956
|
-
zeroSearchResults: "No results found",
|
|
1957
|
-
oneSearchResult: "1 result found",
|
|
1958
|
-
multipleSearchResults: "${count} results found",
|
|
1959
|
-
// additional countries (not supported by country-list library)
|
|
1960
|
-
ac: "Ascension Island",
|
|
1961
|
-
xk: "Kosovo"
|
|
1962
|
-
};
|
|
1963
|
-
var interface_default = interfaceTranslations;
|
|
1964
|
-
|
|
1965
|
-
// src/js/intl-tel-input/i18n/en/index.ts
|
|
1966
|
-
var allTranslations = { ...countries_default, ...interface_default };
|
|
1967
|
-
var en_default = allTranslations;
|
|
1968
|
-
|
|
1969
1702
|
// src/js/modules/constants.ts
|
|
1970
1703
|
var EVENTS = {
|
|
1971
1704
|
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
@@ -2065,29 +1798,50 @@ var ARIA = {
|
|
|
2065
1798
|
MODAL: "aria-modal"
|
|
2066
1799
|
};
|
|
2067
1800
|
|
|
1801
|
+
// src/js/intl-tel-input/i18n/en/index.ts
|
|
1802
|
+
var interfaceTranslations = {
|
|
1803
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1804
|
+
noCountrySelected: "Select country",
|
|
1805
|
+
countryListAriaLabel: "List of countries",
|
|
1806
|
+
searchPlaceholder: "Search",
|
|
1807
|
+
clearSearchAriaLabel: "Clear search",
|
|
1808
|
+
searchEmptyState: "No results found",
|
|
1809
|
+
searchSummaryAria(count) {
|
|
1810
|
+
if (count === 0) {
|
|
1811
|
+
return "No results found";
|
|
1812
|
+
}
|
|
1813
|
+
if (count === 1) {
|
|
1814
|
+
return "1 result found";
|
|
1815
|
+
}
|
|
1816
|
+
return `${count} results found`;
|
|
1817
|
+
}
|
|
1818
|
+
};
|
|
1819
|
+
var en_default = interfaceTranslations;
|
|
1820
|
+
|
|
2068
1821
|
// src/js/modules/core/options.ts
|
|
2069
1822
|
var mq = (q) => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(q).matches;
|
|
2070
1823
|
var computeDefaultUseFullscreenPopup = () => {
|
|
2071
1824
|
if (typeof navigator !== "undefined" && typeof window !== "undefined") {
|
|
2072
|
-
const isMobileUserAgent = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
2073
|
-
navigator.userAgent
|
|
2074
|
-
);
|
|
2075
1825
|
const isNarrowViewport = mq("(max-width: 500px)");
|
|
2076
1826
|
const isShortViewport = mq("(max-height: 600px)");
|
|
2077
1827
|
const isCoarsePointer = mq("(pointer: coarse)");
|
|
2078
|
-
return
|
|
1828
|
+
return isNarrowViewport || isCoarsePointer && isShortViewport;
|
|
2079
1829
|
}
|
|
2080
1830
|
return false;
|
|
2081
1831
|
};
|
|
2082
1832
|
var defaults = {
|
|
2083
|
-
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
2084
|
-
allowPhonewords: false,
|
|
2085
1833
|
//* Whether or not to allow the dropdown.
|
|
2086
1834
|
allowDropdown: true,
|
|
1835
|
+
//* Whether or not to allow extensions after the main number.
|
|
1836
|
+
allowNumberExtensions: false,
|
|
1837
|
+
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
1838
|
+
allowPhonewords: false,
|
|
2087
1839
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
2088
1840
|
autoPlaceholder: PLACEHOLDER_MODES.POLITE,
|
|
2089
1841
|
//* Modify the parentClass.
|
|
2090
1842
|
containerClass: "",
|
|
1843
|
+
//* Locale for localising country names via Intl.DisplayNames.
|
|
1844
|
+
countryNameLocale: "en",
|
|
2091
1845
|
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
2092
1846
|
countryOrder: null,
|
|
2093
1847
|
//* Add a country search input at the top of the dropdown.
|
|
@@ -2129,9 +1883,9 @@ var defaults = {
|
|
|
2129
1883
|
//* Use full screen popup instead of dropdown for country list.
|
|
2130
1884
|
useFullscreenPopup: computeDefaultUseFullscreenPopup(),
|
|
2131
1885
|
//* The number type to enforce during validation.
|
|
2132
|
-
|
|
1886
|
+
allowedNumberTypes: ["MOBILE", "FIXED_LINE"]
|
|
2133
1887
|
};
|
|
2134
|
-
var applyOptionSideEffects = (o
|
|
1888
|
+
var applyOptionSideEffects = (o) => {
|
|
2135
1889
|
if (o.useFullscreenPopup) {
|
|
2136
1890
|
o.fixDropdownWidth = false;
|
|
2137
1891
|
}
|
|
@@ -2147,7 +1901,7 @@ var applyOptionSideEffects = (o, defaultEnglishStrings) => {
|
|
|
2147
1901
|
if (o.useFullscreenPopup && !o.dropdownContainer) {
|
|
2148
1902
|
o.dropdownContainer = document.body;
|
|
2149
1903
|
}
|
|
2150
|
-
o.i18n = { ...
|
|
1904
|
+
o.i18n = { ...en_default, ...o.i18n };
|
|
2151
1905
|
};
|
|
2152
1906
|
|
|
2153
1907
|
// src/js/modules/utils/string.ts
|
|
@@ -2231,6 +1985,11 @@ var buildClearIcon = (id2) => {
|
|
|
2231
1985
|
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${maskId})" />
|
|
2232
1986
|
</svg>`;
|
|
2233
1987
|
};
|
|
1988
|
+
var buildGlobeIcon = () => `
|
|
1989
|
+
<svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
|
|
1990
|
+
<path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
|
|
1991
|
+
<path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
|
|
1992
|
+
</svg>`;
|
|
2234
1993
|
|
|
2235
1994
|
// src/js/modules/core/ui.ts
|
|
2236
1995
|
var UI = class {
|
|
@@ -2250,19 +2009,13 @@ var UI = class {
|
|
|
2250
2009
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
2251
2010
|
generateMarkup(countries) {
|
|
2252
2011
|
this.countries = countries;
|
|
2253
|
-
this.
|
|
2012
|
+
this.telInput.classList.add("iti__tel-input");
|
|
2254
2013
|
const wrapper = this._createWrapperAndInsert();
|
|
2255
2014
|
this._maybeBuildCountryContainer(wrapper);
|
|
2256
2015
|
wrapper.appendChild(this.telInput);
|
|
2257
2016
|
this._maybeUpdateInputPaddingAndReveal();
|
|
2258
2017
|
this._maybeBuildHiddenInputs(wrapper);
|
|
2259
2018
|
}
|
|
2260
|
-
_prepareTelInput() {
|
|
2261
|
-
this.telInput.classList.add("iti__tel-input");
|
|
2262
|
-
if (!this.telInput.hasAttribute("autocomplete") && !this.telInput.form?.hasAttribute("autocomplete")) {
|
|
2263
|
-
this.telInput.setAttribute("autocomplete", "off");
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
2019
|
_createWrapperAndInsert() {
|
|
2267
2020
|
const { allowDropdown, showFlags, containerClass, useFullscreenPopup } = this.options;
|
|
2268
2021
|
const parentClasses = buildClassNames({
|
|
@@ -2449,7 +2202,7 @@ var UI = class {
|
|
|
2449
2202
|
},
|
|
2450
2203
|
this.dropdownContent
|
|
2451
2204
|
);
|
|
2452
|
-
this.searchNoResults.textContent = i18n.
|
|
2205
|
+
this.searchNoResults.textContent = i18n.searchEmptyState;
|
|
2453
2206
|
}
|
|
2454
2207
|
_maybeUpdateInputPaddingAndReveal() {
|
|
2455
2208
|
if (this.countryContainer) {
|
|
@@ -2566,22 +2319,7 @@ var UI = class {
|
|
|
2566
2319
|
updateSearchResultsA11yText() {
|
|
2567
2320
|
const { i18n } = this.options;
|
|
2568
2321
|
const count = this.countryList.childElementCount;
|
|
2569
|
-
|
|
2570
|
-
if (count === 0) {
|
|
2571
|
-
searchText = i18n.zeroSearchResults;
|
|
2572
|
-
} else {
|
|
2573
|
-
if (i18n.searchResultsText) {
|
|
2574
|
-
searchText = i18n.searchResultsText(count);
|
|
2575
|
-
} else if (count === 1) {
|
|
2576
|
-
searchText = i18n.oneSearchResult;
|
|
2577
|
-
} else {
|
|
2578
|
-
searchText = i18n.multipleSearchResults.replace(
|
|
2579
|
-
"${count}",
|
|
2580
|
-
count.toString()
|
|
2581
|
-
);
|
|
2582
|
-
}
|
|
2583
|
-
}
|
|
2584
|
-
this.searchResultsA11yText.textContent = searchText;
|
|
2322
|
+
this.searchResultsA11yText.textContent = i18n.searchSummaryAria(count);
|
|
2585
2323
|
}
|
|
2586
2324
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2587
2325
|
scrollTo(element) {
|
|
@@ -2713,12 +2451,14 @@ var processAllCountries = (options) => {
|
|
|
2713
2451
|
}
|
|
2714
2452
|
return data_default;
|
|
2715
2453
|
};
|
|
2716
|
-
var
|
|
2454
|
+
var generateCountryNames = (countries, options) => {
|
|
2455
|
+
const { countryNameLocale, i18n } = options;
|
|
2456
|
+
const hasDisplayNames = typeof Intl !== "undefined" && typeof Intl.DisplayNames === "function";
|
|
2457
|
+
const displayNames = hasDisplayNames ? new Intl.DisplayNames(countryNameLocale, {
|
|
2458
|
+
type: "region"
|
|
2459
|
+
}) : null;
|
|
2717
2460
|
for (const c of countries) {
|
|
2718
|
-
|
|
2719
|
-
if (options.i18n[iso2]) {
|
|
2720
|
-
c.name = options.i18n[iso2];
|
|
2721
|
-
}
|
|
2461
|
+
c.name = i18n[c.iso2] || displayNames?.of(c.iso2.toUpperCase());
|
|
2722
2462
|
}
|
|
2723
2463
|
};
|
|
2724
2464
|
var processDialCodes = (countries) => {
|
|
@@ -2798,11 +2538,11 @@ var cacheSearchTokens = (countries) => {
|
|
|
2798
2538
|
};
|
|
2799
2539
|
|
|
2800
2540
|
// src/js/modules/format/formatting.ts
|
|
2801
|
-
var beforeSetNumber = (fullNumber,
|
|
2541
|
+
var beforeSetNumber = (fullNumber, hasValidDialCode, separateDialCode, selectedCountryData) => {
|
|
2802
2542
|
let number = fullNumber;
|
|
2803
2543
|
if (separateDialCode) {
|
|
2804
|
-
if (
|
|
2805
|
-
dialCode = `+${selectedCountryData.dialCode}`;
|
|
2544
|
+
if (hasValidDialCode) {
|
|
2545
|
+
const dialCode = `+${selectedCountryData.dialCode}`;
|
|
2806
2546
|
const start = number[dialCode.length] === " " || number[dialCode.length] === "-" ? dialCode.length + 1 : dialCode.length;
|
|
2807
2547
|
number = number.substring(start);
|
|
2808
2548
|
}
|
|
@@ -2869,9 +2609,6 @@ var isRegionlessNanp = (number) => {
|
|
|
2869
2609
|
};
|
|
2870
2610
|
|
|
2871
2611
|
// src/js/intl-tel-input.ts
|
|
2872
|
-
for (const c of data_default) {
|
|
2873
|
-
c.name = en_default[c.iso2];
|
|
2874
|
-
}
|
|
2875
2612
|
var id = 0;
|
|
2876
2613
|
var iso2Set = new Set(data_default.map((c) => c.iso2));
|
|
2877
2614
|
var isIso2 = (val) => iso2Set.has(val);
|
|
@@ -2879,7 +2616,7 @@ var Iti = class _Iti {
|
|
|
2879
2616
|
constructor(input, customOptions = {}) {
|
|
2880
2617
|
this.id = id++;
|
|
2881
2618
|
this.options = { ...defaults, ...customOptions };
|
|
2882
|
-
applyOptionSideEffects(this.options
|
|
2619
|
+
applyOptionSideEffects(this.options);
|
|
2883
2620
|
this.ui = new UI(input, this.options, this.id);
|
|
2884
2621
|
this.isAndroid = _Iti._getIsAndroid();
|
|
2885
2622
|
this.promise = this._createInitPromises();
|
|
@@ -2961,7 +2698,7 @@ var Iti = class _Iti {
|
|
|
2961
2698
|
//********************
|
|
2962
2699
|
//* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
|
|
2963
2700
|
_processCountryData() {
|
|
2964
|
-
|
|
2701
|
+
generateCountryNames(this.countries, this.options);
|
|
2965
2702
|
sortCountries(this.countries, this.options);
|
|
2966
2703
|
cacheSearchTokens(this.countries);
|
|
2967
2704
|
}
|
|
@@ -3184,7 +2921,7 @@ var Iti = class _Iti {
|
|
|
3184
2921
|
inputValue,
|
|
3185
2922
|
intlTelInput.utils,
|
|
3186
2923
|
this.selectedCountryData,
|
|
3187
|
-
|
|
2924
|
+
separateDialCode
|
|
3188
2925
|
);
|
|
3189
2926
|
const newCaretPos = translateCursorPosition(
|
|
3190
2927
|
relevantCharsBeforeCaret,
|
|
@@ -3195,6 +2932,10 @@ var Iti = class _Iti {
|
|
|
3195
2932
|
this._setTelInputValue(formattedValue);
|
|
3196
2933
|
this.ui.telInput.setSelectionRange(newCaretPos, newCaretPos);
|
|
3197
2934
|
}
|
|
2935
|
+
if (separateDialCode && inputValue.startsWith("+") && this.selectedCountryData.dialCode) {
|
|
2936
|
+
const cleanNumber = beforeSetNumber(inputValue, true, separateDialCode, this.selectedCountryData);
|
|
2937
|
+
this._setTelInputValue(cleanNumber);
|
|
2938
|
+
}
|
|
3198
2939
|
};
|
|
3199
2940
|
this.ui.telInput.addEventListener(
|
|
3200
2941
|
"input",
|
|
@@ -3628,18 +3369,21 @@ var Iti = class _Iti {
|
|
|
3628
3369
|
}
|
|
3629
3370
|
if (this.ui.selectedCountry) {
|
|
3630
3371
|
const flagClass = iso2 && showFlags ? `${CLASSES.FLAG} iti__${iso2}` : `${CLASSES.FLAG} ${CLASSES.GLOBE}`;
|
|
3631
|
-
let ariaLabel, title;
|
|
3372
|
+
let ariaLabel, title, selectedCountryInner;
|
|
3632
3373
|
if (iso2) {
|
|
3633
3374
|
const { name, dialCode } = this.selectedCountryData;
|
|
3634
3375
|
title = name;
|
|
3635
3376
|
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
3377
|
+
selectedCountryInner = "";
|
|
3636
3378
|
} else {
|
|
3637
3379
|
title = i18n.noCountrySelected;
|
|
3638
3380
|
ariaLabel = i18n.noCountrySelected;
|
|
3381
|
+
selectedCountryInner = buildGlobeIcon();
|
|
3639
3382
|
}
|
|
3640
3383
|
this.ui.selectedCountryInner.className = flagClass;
|
|
3641
3384
|
this.ui.selectedCountry.setAttribute("title", title);
|
|
3642
3385
|
this.ui.selectedCountry.setAttribute(ARIA.LABEL, ariaLabel);
|
|
3386
|
+
this.ui.selectedCountryInner.innerHTML = selectedCountryInner;
|
|
3643
3387
|
}
|
|
3644
3388
|
if (separateDialCode) {
|
|
3645
3389
|
const dialCode = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
@@ -3652,7 +3396,7 @@ var Iti = class _Iti {
|
|
|
3652
3396
|
}
|
|
3653
3397
|
//* Update the maximum valid number length for the currently selected country.
|
|
3654
3398
|
_updateMaxLength() {
|
|
3655
|
-
const { strictMode, placeholderNumberType,
|
|
3399
|
+
const { strictMode, placeholderNumberType, allowedNumberTypes } = this.options;
|
|
3656
3400
|
const { iso2 } = this.selectedCountryData;
|
|
3657
3401
|
if (strictMode && intlTelInput.utils) {
|
|
3658
3402
|
if (iso2) {
|
|
@@ -3667,7 +3411,7 @@ var Iti = class _Iti {
|
|
|
3667
3411
|
while (intlTelInput.utils.isPossibleNumber(
|
|
3668
3412
|
exampleNumber,
|
|
3669
3413
|
iso2,
|
|
3670
|
-
|
|
3414
|
+
allowedNumberTypes
|
|
3671
3415
|
)) {
|
|
3672
3416
|
validNumber = exampleNumber;
|
|
3673
3417
|
exampleNumber += "0";
|
|
@@ -3806,10 +3550,10 @@ var Iti = class _Iti {
|
|
|
3806
3550
|
}
|
|
3807
3551
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
3808
3552
|
_beforeSetNumber(fullNumber) {
|
|
3809
|
-
const
|
|
3553
|
+
const hasValidDialCode = Boolean(this._getDialCode(fullNumber));
|
|
3810
3554
|
const number = beforeSetNumber(
|
|
3811
3555
|
fullNumber,
|
|
3812
|
-
|
|
3556
|
+
hasValidDialCode,
|
|
3813
3557
|
this.options.separateDialCode,
|
|
3814
3558
|
this.selectedCountryData
|
|
3815
3559
|
);
|
|
@@ -3933,7 +3677,7 @@ var Iti = class _Iti {
|
|
|
3933
3677
|
return intlTelInput.utils ? intlTelInput.utils.isPossibleNumber(
|
|
3934
3678
|
val,
|
|
3935
3679
|
this.selectedCountryData.iso2,
|
|
3936
|
-
this.options.
|
|
3680
|
+
this.options.allowedNumberTypes
|
|
3937
3681
|
) : null;
|
|
3938
3682
|
}
|
|
3939
3683
|
//* Shared internal validation logic to handle alpha character extension rules.
|
|
@@ -3944,23 +3688,29 @@ var Iti = class _Iti {
|
|
|
3944
3688
|
if (!this.selectedCountryData.iso2) {
|
|
3945
3689
|
return false;
|
|
3946
3690
|
}
|
|
3691
|
+
const { allowNumberExtensions, allowPhonewords } = this.options;
|
|
3947
3692
|
const testValidity = (s) => precise ? this._utilsIsValidNumber(s) : this._utilsIsPossibleNumber(s);
|
|
3948
3693
|
const val = this._getFullNumber();
|
|
3694
|
+
if (!testValidity(val)) {
|
|
3695
|
+
return false;
|
|
3696
|
+
}
|
|
3949
3697
|
const alphaCharPosition = val.search(REGEX.ALPHA_UNICODE);
|
|
3950
3698
|
const hasAlphaChar = alphaCharPosition > -1;
|
|
3951
|
-
if (hasAlphaChar
|
|
3952
|
-
const
|
|
3953
|
-
const
|
|
3954
|
-
|
|
3955
|
-
|
|
3699
|
+
if (hasAlphaChar) {
|
|
3700
|
+
const selectedIso2 = this.selectedCountryData.iso2;
|
|
3701
|
+
const hasExtension = Boolean(intlTelInput.utils.getExtension(val, selectedIso2));
|
|
3702
|
+
if (hasExtension) {
|
|
3703
|
+
return allowNumberExtensions;
|
|
3704
|
+
}
|
|
3705
|
+
return allowPhonewords;
|
|
3956
3706
|
}
|
|
3957
|
-
return
|
|
3707
|
+
return true;
|
|
3958
3708
|
}
|
|
3959
3709
|
_utilsIsValidNumber(val) {
|
|
3960
3710
|
return intlTelInput.utils ? intlTelInput.utils.isValidNumber(
|
|
3961
3711
|
val,
|
|
3962
3712
|
this.selectedCountryData.iso2,
|
|
3963
|
-
this.options.
|
|
3713
|
+
this.options.allowedNumberTypes
|
|
3964
3714
|
) : null;
|
|
3965
3715
|
}
|
|
3966
3716
|
//* Update the selected country, and update the input val accordingly.
|
|
@@ -4070,7 +3820,7 @@ var intlTelInput = Object.assign(
|
|
|
4070
3820
|
attachUtils,
|
|
4071
3821
|
startedLoadingUtilsScript: false,
|
|
4072
3822
|
startedLoadingAutoCountry: false,
|
|
4073
|
-
version: "
|
|
3823
|
+
version: "26.0.0-beta.1"
|
|
4074
3824
|
}
|
|
4075
3825
|
);
|
|
4076
3826
|
var intl_tel_input_default = intlTelInput;
|