intl-tel-input 25.14.1 → 26.0.0-beta.0
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 +27 -43
- package/angular/README.md +1 -1
- 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 +1257 -0
- package/build/css/intlTelInput-no-assets.min.css +1 -0
- package/build/css/intlTelInput.css +21 -22
- 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/README.md +1 -1
- 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/README.md +1 -1
- package/svelte/build/IntlTelInput.mjs +1170 -1413
- package/svelte/build/IntlTelInputWithUtils.mjs +935 -1178
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.vue.d.ts +34 -0
- package/vue/build/IntlTelInputWithUtils.vue.d.ts +34 -0
- package/vue/build/exports/IntlTelInput.d.ts +3 -0
- package/vue/build/exports/IntlTelInput.mjs +66 -0
- package/vue/build/exports/IntlTelInputWithUtils.d.ts +3 -0
- package/vue/build/{IntlTelInputWithUtils.mjs → exports/IntlTelInputWithUtils.mjs} +533 -3866
- package/vue/build/{IntlTelInput.mjs → intl-tel-input-BY4WpieT.mjs} +403 -720
- package/vue/build/intl-tel-input.d.ts +97 -0
- package/vue/build/modules/constants.d.ts +85 -0
- package/vue/build/modules/core/countrySearch.d.ts +17 -0
- package/vue/build/modules/core/icons.d.ts +9 -0
- package/vue/build/modules/core/options.d.ts +3 -0
- package/vue/build/modules/core/ui.d.ts +45 -0
- package/vue/build/modules/data/country-data.d.ts +12 -0
- package/vue/build/modules/data/nanp-regionless.d.ts +2 -0
- package/vue/build/modules/format/caret.d.ts +1 -0
- package/vue/build/modules/format/formatting.d.ts +3 -0
- package/vue/build/modules/types/events.d.ts +9 -0
- package/vue/build/modules/types/public-api.d.ts +79 -0
- package/vue/build/modules/utils/dom.d.ts +6 -0
- package/vue/build/modules/utils/string.d.ts +2 -0
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input
|
|
2
|
+
* International Telephone Input v26.0.0-beta.0
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -1739,273 +1739,6 @@ var factoryOutput = (() => {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
var data_default = allCountries;
|
|
1741
1741
|
|
|
1742
|
-
// src/js/intl-tel-input/i18n/en/countries.ts
|
|
1743
|
-
var countryTranslations = {
|
|
1744
|
-
ad: "Andorra",
|
|
1745
|
-
ae: "United Arab Emirates",
|
|
1746
|
-
af: "Afghanistan",
|
|
1747
|
-
ag: "Antigua & Barbuda",
|
|
1748
|
-
ai: "Anguilla",
|
|
1749
|
-
al: "Albania",
|
|
1750
|
-
am: "Armenia",
|
|
1751
|
-
ao: "Angola",
|
|
1752
|
-
ar: "Argentina",
|
|
1753
|
-
as: "American Samoa",
|
|
1754
|
-
at: "Austria",
|
|
1755
|
-
au: "Australia",
|
|
1756
|
-
aw: "Aruba",
|
|
1757
|
-
ax: "\xC5land Islands",
|
|
1758
|
-
az: "Azerbaijan",
|
|
1759
|
-
ba: "Bosnia & Herzegovina",
|
|
1760
|
-
bb: "Barbados",
|
|
1761
|
-
bd: "Bangladesh",
|
|
1762
|
-
be: "Belgium",
|
|
1763
|
-
bf: "Burkina Faso",
|
|
1764
|
-
bg: "Bulgaria",
|
|
1765
|
-
bh: "Bahrain",
|
|
1766
|
-
bi: "Burundi",
|
|
1767
|
-
bj: "Benin",
|
|
1768
|
-
bl: "St. Barth\xE9lemy",
|
|
1769
|
-
bm: "Bermuda",
|
|
1770
|
-
bn: "Brunei",
|
|
1771
|
-
bo: "Bolivia",
|
|
1772
|
-
bq: "Caribbean Netherlands",
|
|
1773
|
-
br: "Brazil",
|
|
1774
|
-
bs: "Bahamas",
|
|
1775
|
-
bt: "Bhutan",
|
|
1776
|
-
bw: "Botswana",
|
|
1777
|
-
by: "Belarus",
|
|
1778
|
-
bz: "Belize",
|
|
1779
|
-
ca: "Canada",
|
|
1780
|
-
cc: "Cocos (Keeling) Islands",
|
|
1781
|
-
cd: "Congo - Kinshasa",
|
|
1782
|
-
cf: "Central African Republic",
|
|
1783
|
-
cg: "Congo - Brazzaville",
|
|
1784
|
-
ch: "Switzerland",
|
|
1785
|
-
ci: "C\xF4te d\u2019Ivoire",
|
|
1786
|
-
ck: "Cook Islands",
|
|
1787
|
-
cl: "Chile",
|
|
1788
|
-
cm: "Cameroon",
|
|
1789
|
-
cn: "China",
|
|
1790
|
-
co: "Colombia",
|
|
1791
|
-
cr: "Costa Rica",
|
|
1792
|
-
cu: "Cuba",
|
|
1793
|
-
cv: "Cape Verde",
|
|
1794
|
-
cw: "Cura\xE7ao",
|
|
1795
|
-
cx: "Christmas Island",
|
|
1796
|
-
cy: "Cyprus",
|
|
1797
|
-
cz: "Czechia",
|
|
1798
|
-
de: "Germany",
|
|
1799
|
-
dj: "Djibouti",
|
|
1800
|
-
dk: "Denmark",
|
|
1801
|
-
dm: "Dominica",
|
|
1802
|
-
do: "Dominican Republic",
|
|
1803
|
-
dz: "Algeria",
|
|
1804
|
-
ec: "Ecuador",
|
|
1805
|
-
ee: "Estonia",
|
|
1806
|
-
eg: "Egypt",
|
|
1807
|
-
eh: "Western Sahara",
|
|
1808
|
-
er: "Eritrea",
|
|
1809
|
-
es: "Spain",
|
|
1810
|
-
et: "Ethiopia",
|
|
1811
|
-
fi: "Finland",
|
|
1812
|
-
fj: "Fiji",
|
|
1813
|
-
fk: "Falkland Islands",
|
|
1814
|
-
fm: "Micronesia",
|
|
1815
|
-
fo: "Faroe Islands",
|
|
1816
|
-
fr: "France",
|
|
1817
|
-
ga: "Gabon",
|
|
1818
|
-
gb: "United Kingdom",
|
|
1819
|
-
gd: "Grenada",
|
|
1820
|
-
ge: "Georgia",
|
|
1821
|
-
gf: "French Guiana",
|
|
1822
|
-
gg: "Guernsey",
|
|
1823
|
-
gh: "Ghana",
|
|
1824
|
-
gi: "Gibraltar",
|
|
1825
|
-
gl: "Greenland",
|
|
1826
|
-
gm: "Gambia",
|
|
1827
|
-
gn: "Guinea",
|
|
1828
|
-
gp: "Guadeloupe",
|
|
1829
|
-
gq: "Equatorial Guinea",
|
|
1830
|
-
gr: "Greece",
|
|
1831
|
-
gt: "Guatemala",
|
|
1832
|
-
gu: "Guam",
|
|
1833
|
-
gw: "Guinea-Bissau",
|
|
1834
|
-
gy: "Guyana",
|
|
1835
|
-
hk: "Hong Kong SAR China",
|
|
1836
|
-
hn: "Honduras",
|
|
1837
|
-
hr: "Croatia",
|
|
1838
|
-
ht: "Haiti",
|
|
1839
|
-
hu: "Hungary",
|
|
1840
|
-
id: "Indonesia",
|
|
1841
|
-
ie: "Ireland",
|
|
1842
|
-
il: "Israel",
|
|
1843
|
-
im: "Isle of Man",
|
|
1844
|
-
in: "India",
|
|
1845
|
-
io: "British Indian Ocean Territory",
|
|
1846
|
-
iq: "Iraq",
|
|
1847
|
-
ir: "Iran",
|
|
1848
|
-
is: "Iceland",
|
|
1849
|
-
it: "Italy",
|
|
1850
|
-
je: "Jersey",
|
|
1851
|
-
jm: "Jamaica",
|
|
1852
|
-
jo: "Jordan",
|
|
1853
|
-
jp: "Japan",
|
|
1854
|
-
ke: "Kenya",
|
|
1855
|
-
kg: "Kyrgyzstan",
|
|
1856
|
-
kh: "Cambodia",
|
|
1857
|
-
ki: "Kiribati",
|
|
1858
|
-
km: "Comoros",
|
|
1859
|
-
kn: "St. Kitts & Nevis",
|
|
1860
|
-
kp: "North Korea",
|
|
1861
|
-
kr: "South Korea",
|
|
1862
|
-
kw: "Kuwait",
|
|
1863
|
-
ky: "Cayman Islands",
|
|
1864
|
-
kz: "Kazakhstan",
|
|
1865
|
-
la: "Laos",
|
|
1866
|
-
lb: "Lebanon",
|
|
1867
|
-
lc: "St. Lucia",
|
|
1868
|
-
li: "Liechtenstein",
|
|
1869
|
-
lk: "Sri Lanka",
|
|
1870
|
-
lr: "Liberia",
|
|
1871
|
-
ls: "Lesotho",
|
|
1872
|
-
lt: "Lithuania",
|
|
1873
|
-
lu: "Luxembourg",
|
|
1874
|
-
lv: "Latvia",
|
|
1875
|
-
ly: "Libya",
|
|
1876
|
-
ma: "Morocco",
|
|
1877
|
-
mc: "Monaco",
|
|
1878
|
-
md: "Moldova",
|
|
1879
|
-
me: "Montenegro",
|
|
1880
|
-
mf: "St. Martin",
|
|
1881
|
-
mg: "Madagascar",
|
|
1882
|
-
mh: "Marshall Islands",
|
|
1883
|
-
mk: "North Macedonia",
|
|
1884
|
-
ml: "Mali",
|
|
1885
|
-
mm: "Myanmar (Burma)",
|
|
1886
|
-
mn: "Mongolia",
|
|
1887
|
-
mo: "Macao SAR China",
|
|
1888
|
-
mp: "Northern Mariana Islands",
|
|
1889
|
-
mq: "Martinique",
|
|
1890
|
-
mr: "Mauritania",
|
|
1891
|
-
ms: "Montserrat",
|
|
1892
|
-
mt: "Malta",
|
|
1893
|
-
mu: "Mauritius",
|
|
1894
|
-
mv: "Maldives",
|
|
1895
|
-
mw: "Malawi",
|
|
1896
|
-
mx: "Mexico",
|
|
1897
|
-
my: "Malaysia",
|
|
1898
|
-
mz: "Mozambique",
|
|
1899
|
-
na: "Namibia",
|
|
1900
|
-
nc: "New Caledonia",
|
|
1901
|
-
ne: "Niger",
|
|
1902
|
-
nf: "Norfolk Island",
|
|
1903
|
-
ng: "Nigeria",
|
|
1904
|
-
ni: "Nicaragua",
|
|
1905
|
-
nl: "Netherlands",
|
|
1906
|
-
no: "Norway",
|
|
1907
|
-
np: "Nepal",
|
|
1908
|
-
nr: "Nauru",
|
|
1909
|
-
nu: "Niue",
|
|
1910
|
-
nz: "New Zealand",
|
|
1911
|
-
om: "Oman",
|
|
1912
|
-
pa: "Panama",
|
|
1913
|
-
pe: "Peru",
|
|
1914
|
-
pf: "French Polynesia",
|
|
1915
|
-
pg: "Papua New Guinea",
|
|
1916
|
-
ph: "Philippines",
|
|
1917
|
-
pk: "Pakistan",
|
|
1918
|
-
pl: "Poland",
|
|
1919
|
-
pm: "St. Pierre & Miquelon",
|
|
1920
|
-
pr: "Puerto Rico",
|
|
1921
|
-
ps: "Palestinian Territories",
|
|
1922
|
-
pt: "Portugal",
|
|
1923
|
-
pw: "Palau",
|
|
1924
|
-
py: "Paraguay",
|
|
1925
|
-
qa: "Qatar",
|
|
1926
|
-
re: "R\xE9union",
|
|
1927
|
-
ro: "Romania",
|
|
1928
|
-
rs: "Serbia",
|
|
1929
|
-
ru: "Russia",
|
|
1930
|
-
rw: "Rwanda",
|
|
1931
|
-
sa: "Saudi Arabia",
|
|
1932
|
-
sb: "Solomon Islands",
|
|
1933
|
-
sc: "Seychelles",
|
|
1934
|
-
sd: "Sudan",
|
|
1935
|
-
se: "Sweden",
|
|
1936
|
-
sg: "Singapore",
|
|
1937
|
-
sh: "St. Helena",
|
|
1938
|
-
si: "Slovenia",
|
|
1939
|
-
sj: "Svalbard & Jan Mayen",
|
|
1940
|
-
sk: "Slovakia",
|
|
1941
|
-
sl: "Sierra Leone",
|
|
1942
|
-
sm: "San Marino",
|
|
1943
|
-
sn: "Senegal",
|
|
1944
|
-
so: "Somalia",
|
|
1945
|
-
sr: "Suriname",
|
|
1946
|
-
ss: "South Sudan",
|
|
1947
|
-
st: "S\xE3o Tom\xE9 & Pr\xEDncipe",
|
|
1948
|
-
sv: "El Salvador",
|
|
1949
|
-
sx: "Sint Maarten",
|
|
1950
|
-
sy: "Syria",
|
|
1951
|
-
sz: "Eswatini",
|
|
1952
|
-
tc: "Turks & Caicos Islands",
|
|
1953
|
-
td: "Chad",
|
|
1954
|
-
tg: "Togo",
|
|
1955
|
-
th: "Thailand",
|
|
1956
|
-
tj: "Tajikistan",
|
|
1957
|
-
tk: "Tokelau",
|
|
1958
|
-
tl: "Timor-Leste",
|
|
1959
|
-
tm: "Turkmenistan",
|
|
1960
|
-
tn: "Tunisia",
|
|
1961
|
-
to: "Tonga",
|
|
1962
|
-
tr: "Turkey",
|
|
1963
|
-
tt: "Trinidad & Tobago",
|
|
1964
|
-
tv: "Tuvalu",
|
|
1965
|
-
tw: "Taiwan",
|
|
1966
|
-
tz: "Tanzania",
|
|
1967
|
-
ua: "Ukraine",
|
|
1968
|
-
ug: "Uganda",
|
|
1969
|
-
us: "United States",
|
|
1970
|
-
uy: "Uruguay",
|
|
1971
|
-
uz: "Uzbekistan",
|
|
1972
|
-
va: "Vatican City",
|
|
1973
|
-
vc: "St. Vincent & Grenadines",
|
|
1974
|
-
ve: "Venezuela",
|
|
1975
|
-
vg: "British Virgin Islands",
|
|
1976
|
-
vi: "U.S. Virgin Islands",
|
|
1977
|
-
vn: "Vietnam",
|
|
1978
|
-
vu: "Vanuatu",
|
|
1979
|
-
wf: "Wallis & Futuna",
|
|
1980
|
-
ws: "Samoa",
|
|
1981
|
-
ye: "Yemen",
|
|
1982
|
-
yt: "Mayotte",
|
|
1983
|
-
za: "South Africa",
|
|
1984
|
-
zm: "Zambia",
|
|
1985
|
-
zw: "Zimbabwe"
|
|
1986
|
-
};
|
|
1987
|
-
var countries_default = countryTranslations;
|
|
1988
|
-
|
|
1989
|
-
// src/js/intl-tel-input/i18n/en/interface.ts
|
|
1990
|
-
var interfaceTranslations = {
|
|
1991
|
-
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1992
|
-
noCountrySelected: "Select country",
|
|
1993
|
-
countryListAriaLabel: "List of countries",
|
|
1994
|
-
searchPlaceholder: "Search",
|
|
1995
|
-
clearSearchAriaLabel: "Clear search",
|
|
1996
|
-
zeroSearchResults: "No results found",
|
|
1997
|
-
oneSearchResult: "1 result found",
|
|
1998
|
-
multipleSearchResults: "${count} results found",
|
|
1999
|
-
// additional countries (not supported by country-list library)
|
|
2000
|
-
ac: "Ascension Island",
|
|
2001
|
-
xk: "Kosovo"
|
|
2002
|
-
};
|
|
2003
|
-
var interface_default = interfaceTranslations;
|
|
2004
|
-
|
|
2005
|
-
// src/js/intl-tel-input/i18n/en/index.ts
|
|
2006
|
-
var allTranslations = { ...countries_default, ...interface_default };
|
|
2007
|
-
var en_default = allTranslations;
|
|
2008
|
-
|
|
2009
1742
|
// src/js/modules/constants.ts
|
|
2010
1743
|
var EVENTS = {
|
|
2011
1744
|
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
@@ -2105,29 +1838,50 @@ var factoryOutput = (() => {
|
|
|
2105
1838
|
MODAL: "aria-modal"
|
|
2106
1839
|
};
|
|
2107
1840
|
|
|
1841
|
+
// src/js/intl-tel-input/i18n/en/index.ts
|
|
1842
|
+
var interfaceTranslations = {
|
|
1843
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1844
|
+
noCountrySelected: "Select country",
|
|
1845
|
+
countryListAriaLabel: "List of countries",
|
|
1846
|
+
searchPlaceholder: "Search",
|
|
1847
|
+
clearSearchAriaLabel: "Clear search",
|
|
1848
|
+
searchEmptyState: "No results found",
|
|
1849
|
+
searchSummaryAria(count) {
|
|
1850
|
+
if (count === 0) {
|
|
1851
|
+
return "No results found";
|
|
1852
|
+
}
|
|
1853
|
+
if (count === 1) {
|
|
1854
|
+
return "1 result found";
|
|
1855
|
+
}
|
|
1856
|
+
return `${count} results found`;
|
|
1857
|
+
}
|
|
1858
|
+
};
|
|
1859
|
+
var en_default = interfaceTranslations;
|
|
1860
|
+
|
|
2108
1861
|
// src/js/modules/core/options.ts
|
|
2109
1862
|
var mq = (q) => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(q).matches;
|
|
2110
1863
|
var computeDefaultUseFullscreenPopup = () => {
|
|
2111
1864
|
if (typeof navigator !== "undefined" && typeof window !== "undefined") {
|
|
2112
|
-
const isMobileUserAgent = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
2113
|
-
navigator.userAgent
|
|
2114
|
-
);
|
|
2115
1865
|
const isNarrowViewport = mq("(max-width: 500px)");
|
|
2116
1866
|
const isShortViewport = mq("(max-height: 600px)");
|
|
2117
1867
|
const isCoarsePointer = mq("(pointer: coarse)");
|
|
2118
|
-
return
|
|
1868
|
+
return isNarrowViewport || isCoarsePointer && isShortViewport;
|
|
2119
1869
|
}
|
|
2120
1870
|
return false;
|
|
2121
1871
|
};
|
|
2122
1872
|
var defaults = {
|
|
2123
|
-
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
2124
|
-
allowPhonewords: false,
|
|
2125
1873
|
//* Whether or not to allow the dropdown.
|
|
2126
1874
|
allowDropdown: true,
|
|
1875
|
+
//* Whether or not to allow extensions after the main number.
|
|
1876
|
+
allowNumberExtensions: false,
|
|
1877
|
+
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
1878
|
+
allowPhonewords: false,
|
|
2127
1879
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
2128
1880
|
autoPlaceholder: PLACEHOLDER_MODES.POLITE,
|
|
2129
1881
|
//* Modify the parentClass.
|
|
2130
1882
|
containerClass: "",
|
|
1883
|
+
//* Locale for localising country names via Intl.DisplayNames.
|
|
1884
|
+
countryNameLocale: "en",
|
|
2131
1885
|
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
2132
1886
|
countryOrder: null,
|
|
2133
1887
|
//* Add a country search input at the top of the dropdown.
|
|
@@ -2169,9 +1923,9 @@ var factoryOutput = (() => {
|
|
|
2169
1923
|
//* Use full screen popup instead of dropdown for country list.
|
|
2170
1924
|
useFullscreenPopup: computeDefaultUseFullscreenPopup(),
|
|
2171
1925
|
//* The number type to enforce during validation.
|
|
2172
|
-
|
|
1926
|
+
allowedNumberTypes: ["MOBILE", "FIXED_LINE"]
|
|
2173
1927
|
};
|
|
2174
|
-
var applyOptionSideEffects = (o
|
|
1928
|
+
var applyOptionSideEffects = (o) => {
|
|
2175
1929
|
if (o.useFullscreenPopup) {
|
|
2176
1930
|
o.fixDropdownWidth = false;
|
|
2177
1931
|
}
|
|
@@ -2187,7 +1941,7 @@ var factoryOutput = (() => {
|
|
|
2187
1941
|
if (o.useFullscreenPopup && !o.dropdownContainer) {
|
|
2188
1942
|
o.dropdownContainer = document.body;
|
|
2189
1943
|
}
|
|
2190
|
-
o.i18n = { ...
|
|
1944
|
+
o.i18n = { ...en_default, ...o.i18n };
|
|
2191
1945
|
};
|
|
2192
1946
|
|
|
2193
1947
|
// src/js/modules/utils/string.ts
|
|
@@ -2271,6 +2025,11 @@ var factoryOutput = (() => {
|
|
|
2271
2025
|
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${maskId})" />
|
|
2272
2026
|
</svg>`;
|
|
2273
2027
|
};
|
|
2028
|
+
var buildGlobeIcon = () => `
|
|
2029
|
+
<svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
|
|
2030
|
+
<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"/>
|
|
2031
|
+
<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"/>
|
|
2032
|
+
</svg>`;
|
|
2274
2033
|
|
|
2275
2034
|
// src/js/modules/core/ui.ts
|
|
2276
2035
|
var UI = class {
|
|
@@ -2290,19 +2049,13 @@ var factoryOutput = (() => {
|
|
|
2290
2049
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
2291
2050
|
generateMarkup(countries) {
|
|
2292
2051
|
this.countries = countries;
|
|
2293
|
-
this.
|
|
2052
|
+
this.telInput.classList.add("iti__tel-input");
|
|
2294
2053
|
const wrapper = this._createWrapperAndInsert();
|
|
2295
2054
|
this._maybeBuildCountryContainer(wrapper);
|
|
2296
2055
|
wrapper.appendChild(this.telInput);
|
|
2297
2056
|
this._maybeUpdateInputPaddingAndReveal();
|
|
2298
2057
|
this._maybeBuildHiddenInputs(wrapper);
|
|
2299
2058
|
}
|
|
2300
|
-
_prepareTelInput() {
|
|
2301
|
-
this.telInput.classList.add("iti__tel-input");
|
|
2302
|
-
if (!this.telInput.hasAttribute("autocomplete") && !this.telInput.form?.hasAttribute("autocomplete")) {
|
|
2303
|
-
this.telInput.setAttribute("autocomplete", "off");
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
2059
|
_createWrapperAndInsert() {
|
|
2307
2060
|
const { allowDropdown, showFlags, containerClass, useFullscreenPopup } = this.options;
|
|
2308
2061
|
const parentClasses = buildClassNames({
|
|
@@ -2489,7 +2242,7 @@ var factoryOutput = (() => {
|
|
|
2489
2242
|
},
|
|
2490
2243
|
this.dropdownContent
|
|
2491
2244
|
);
|
|
2492
|
-
this.searchNoResults.textContent = i18n.
|
|
2245
|
+
this.searchNoResults.textContent = i18n.searchEmptyState;
|
|
2493
2246
|
}
|
|
2494
2247
|
_maybeUpdateInputPaddingAndReveal() {
|
|
2495
2248
|
if (this.countryContainer) {
|
|
@@ -2606,22 +2359,7 @@ var factoryOutput = (() => {
|
|
|
2606
2359
|
updateSearchResultsA11yText() {
|
|
2607
2360
|
const { i18n } = this.options;
|
|
2608
2361
|
const count = this.countryList.childElementCount;
|
|
2609
|
-
|
|
2610
|
-
if (count === 0) {
|
|
2611
|
-
searchText = i18n.zeroSearchResults;
|
|
2612
|
-
} else {
|
|
2613
|
-
if (i18n.searchResultsText) {
|
|
2614
|
-
searchText = i18n.searchResultsText(count);
|
|
2615
|
-
} else if (count === 1) {
|
|
2616
|
-
searchText = i18n.oneSearchResult;
|
|
2617
|
-
} else {
|
|
2618
|
-
searchText = i18n.multipleSearchResults.replace(
|
|
2619
|
-
"${count}",
|
|
2620
|
-
count.toString()
|
|
2621
|
-
);
|
|
2622
|
-
}
|
|
2623
|
-
}
|
|
2624
|
-
this.searchResultsA11yText.textContent = searchText;
|
|
2362
|
+
this.searchResultsA11yText.textContent = i18n.searchSummaryAria(count);
|
|
2625
2363
|
}
|
|
2626
2364
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2627
2365
|
scrollTo(element) {
|
|
@@ -2753,12 +2491,14 @@ var factoryOutput = (() => {
|
|
|
2753
2491
|
}
|
|
2754
2492
|
return data_default;
|
|
2755
2493
|
};
|
|
2756
|
-
var
|
|
2494
|
+
var generateCountryNames = (countries, options) => {
|
|
2495
|
+
const { countryNameLocale, i18n } = options;
|
|
2496
|
+
const hasDisplayNames = typeof Intl !== "undefined" && typeof Intl.DisplayNames === "function";
|
|
2497
|
+
const displayNames = hasDisplayNames ? new Intl.DisplayNames(countryNameLocale, {
|
|
2498
|
+
type: "region"
|
|
2499
|
+
}) : null;
|
|
2757
2500
|
for (const c of countries) {
|
|
2758
|
-
|
|
2759
|
-
if (options.i18n[iso2]) {
|
|
2760
|
-
c.name = options.i18n[iso2];
|
|
2761
|
-
}
|
|
2501
|
+
c.name = i18n[c.iso2] || displayNames?.of(c.iso2.toUpperCase());
|
|
2762
2502
|
}
|
|
2763
2503
|
};
|
|
2764
2504
|
var processDialCodes = (countries) => {
|
|
@@ -2838,11 +2578,11 @@ var factoryOutput = (() => {
|
|
|
2838
2578
|
};
|
|
2839
2579
|
|
|
2840
2580
|
// src/js/modules/format/formatting.ts
|
|
2841
|
-
var beforeSetNumber = (fullNumber,
|
|
2581
|
+
var beforeSetNumber = (fullNumber, hasValidDialCode, separateDialCode, selectedCountryData) => {
|
|
2842
2582
|
let number = fullNumber;
|
|
2843
2583
|
if (separateDialCode) {
|
|
2844
|
-
if (
|
|
2845
|
-
dialCode = `+${selectedCountryData.dialCode}`;
|
|
2584
|
+
if (hasValidDialCode) {
|
|
2585
|
+
const dialCode = `+${selectedCountryData.dialCode}`;
|
|
2846
2586
|
const start = number[dialCode.length] === " " || number[dialCode.length] === "-" ? dialCode.length + 1 : dialCode.length;
|
|
2847
2587
|
number = number.substring(start);
|
|
2848
2588
|
}
|
|
@@ -2909,9 +2649,6 @@ var factoryOutput = (() => {
|
|
|
2909
2649
|
};
|
|
2910
2650
|
|
|
2911
2651
|
// src/js/intl-tel-input.ts
|
|
2912
|
-
for (const c of data_default) {
|
|
2913
|
-
c.name = en_default[c.iso2];
|
|
2914
|
-
}
|
|
2915
2652
|
var id = 0;
|
|
2916
2653
|
var iso2Set = new Set(data_default.map((c) => c.iso2));
|
|
2917
2654
|
var isIso2 = (val) => iso2Set.has(val);
|
|
@@ -2919,7 +2656,7 @@ var factoryOutput = (() => {
|
|
|
2919
2656
|
constructor(input, customOptions = {}) {
|
|
2920
2657
|
this.id = id++;
|
|
2921
2658
|
this.options = { ...defaults, ...customOptions };
|
|
2922
|
-
applyOptionSideEffects(this.options
|
|
2659
|
+
applyOptionSideEffects(this.options);
|
|
2923
2660
|
this.ui = new UI(input, this.options, this.id);
|
|
2924
2661
|
this.isAndroid = _Iti._getIsAndroid();
|
|
2925
2662
|
this.promise = this._createInitPromises();
|
|
@@ -3001,7 +2738,7 @@ var factoryOutput = (() => {
|
|
|
3001
2738
|
//********************
|
|
3002
2739
|
//* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
|
|
3003
2740
|
_processCountryData() {
|
|
3004
|
-
|
|
2741
|
+
generateCountryNames(this.countries, this.options);
|
|
3005
2742
|
sortCountries(this.countries, this.options);
|
|
3006
2743
|
cacheSearchTokens(this.countries);
|
|
3007
2744
|
}
|
|
@@ -3224,7 +2961,7 @@ var factoryOutput = (() => {
|
|
|
3224
2961
|
inputValue,
|
|
3225
2962
|
intlTelInput.utils,
|
|
3226
2963
|
this.selectedCountryData,
|
|
3227
|
-
|
|
2964
|
+
separateDialCode
|
|
3228
2965
|
);
|
|
3229
2966
|
const newCaretPos = translateCursorPosition(
|
|
3230
2967
|
relevantCharsBeforeCaret,
|
|
@@ -3235,6 +2972,10 @@ var factoryOutput = (() => {
|
|
|
3235
2972
|
this._setTelInputValue(formattedValue);
|
|
3236
2973
|
this.ui.telInput.setSelectionRange(newCaretPos, newCaretPos);
|
|
3237
2974
|
}
|
|
2975
|
+
if (separateDialCode && inputValue.startsWith("+") && this.selectedCountryData.dialCode) {
|
|
2976
|
+
const cleanNumber = beforeSetNumber(inputValue, true, separateDialCode, this.selectedCountryData);
|
|
2977
|
+
this._setTelInputValue(cleanNumber);
|
|
2978
|
+
}
|
|
3238
2979
|
};
|
|
3239
2980
|
this.ui.telInput.addEventListener(
|
|
3240
2981
|
"input",
|
|
@@ -3668,18 +3409,21 @@ var factoryOutput = (() => {
|
|
|
3668
3409
|
}
|
|
3669
3410
|
if (this.ui.selectedCountry) {
|
|
3670
3411
|
const flagClass = iso2 && showFlags ? `${CLASSES.FLAG} iti__${iso2}` : `${CLASSES.FLAG} ${CLASSES.GLOBE}`;
|
|
3671
|
-
let ariaLabel, title;
|
|
3412
|
+
let ariaLabel, title, selectedCountryInner;
|
|
3672
3413
|
if (iso2) {
|
|
3673
3414
|
const { name, dialCode } = this.selectedCountryData;
|
|
3674
3415
|
title = name;
|
|
3675
3416
|
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
3417
|
+
selectedCountryInner = "";
|
|
3676
3418
|
} else {
|
|
3677
3419
|
title = i18n.noCountrySelected;
|
|
3678
3420
|
ariaLabel = i18n.noCountrySelected;
|
|
3421
|
+
selectedCountryInner = buildGlobeIcon();
|
|
3679
3422
|
}
|
|
3680
3423
|
this.ui.selectedCountryInner.className = flagClass;
|
|
3681
3424
|
this.ui.selectedCountry.setAttribute("title", title);
|
|
3682
3425
|
this.ui.selectedCountry.setAttribute(ARIA.LABEL, ariaLabel);
|
|
3426
|
+
this.ui.selectedCountryInner.innerHTML = selectedCountryInner;
|
|
3683
3427
|
}
|
|
3684
3428
|
if (separateDialCode) {
|
|
3685
3429
|
const dialCode = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
@@ -3692,7 +3436,7 @@ var factoryOutput = (() => {
|
|
|
3692
3436
|
}
|
|
3693
3437
|
//* Update the maximum valid number length for the currently selected country.
|
|
3694
3438
|
_updateMaxLength() {
|
|
3695
|
-
const { strictMode, placeholderNumberType,
|
|
3439
|
+
const { strictMode, placeholderNumberType, allowedNumberTypes } = this.options;
|
|
3696
3440
|
const { iso2 } = this.selectedCountryData;
|
|
3697
3441
|
if (strictMode && intlTelInput.utils) {
|
|
3698
3442
|
if (iso2) {
|
|
@@ -3707,7 +3451,7 @@ var factoryOutput = (() => {
|
|
|
3707
3451
|
while (intlTelInput.utils.isPossibleNumber(
|
|
3708
3452
|
exampleNumber,
|
|
3709
3453
|
iso2,
|
|
3710
|
-
|
|
3454
|
+
allowedNumberTypes
|
|
3711
3455
|
)) {
|
|
3712
3456
|
validNumber = exampleNumber;
|
|
3713
3457
|
exampleNumber += "0";
|
|
@@ -3846,10 +3590,10 @@ var factoryOutput = (() => {
|
|
|
3846
3590
|
}
|
|
3847
3591
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
3848
3592
|
_beforeSetNumber(fullNumber) {
|
|
3849
|
-
const
|
|
3593
|
+
const hasValidDialCode = Boolean(this._getDialCode(fullNumber));
|
|
3850
3594
|
const number = beforeSetNumber(
|
|
3851
3595
|
fullNumber,
|
|
3852
|
-
|
|
3596
|
+
hasValidDialCode,
|
|
3853
3597
|
this.options.separateDialCode,
|
|
3854
3598
|
this.selectedCountryData
|
|
3855
3599
|
);
|
|
@@ -3973,7 +3717,7 @@ var factoryOutput = (() => {
|
|
|
3973
3717
|
return intlTelInput.utils ? intlTelInput.utils.isPossibleNumber(
|
|
3974
3718
|
val,
|
|
3975
3719
|
this.selectedCountryData.iso2,
|
|
3976
|
-
this.options.
|
|
3720
|
+
this.options.allowedNumberTypes
|
|
3977
3721
|
) : null;
|
|
3978
3722
|
}
|
|
3979
3723
|
//* Shared internal validation logic to handle alpha character extension rules.
|
|
@@ -3984,23 +3728,29 @@ var factoryOutput = (() => {
|
|
|
3984
3728
|
if (!this.selectedCountryData.iso2) {
|
|
3985
3729
|
return false;
|
|
3986
3730
|
}
|
|
3731
|
+
const { allowNumberExtensions, allowPhonewords } = this.options;
|
|
3987
3732
|
const testValidity = (s) => precise ? this._utilsIsValidNumber(s) : this._utilsIsPossibleNumber(s);
|
|
3988
3733
|
const val = this._getFullNumber();
|
|
3734
|
+
if (!testValidity(val)) {
|
|
3735
|
+
return false;
|
|
3736
|
+
}
|
|
3989
3737
|
const alphaCharPosition = val.search(REGEX.ALPHA_UNICODE);
|
|
3990
3738
|
const hasAlphaChar = alphaCharPosition > -1;
|
|
3991
|
-
if (hasAlphaChar
|
|
3992
|
-
const
|
|
3993
|
-
const
|
|
3994
|
-
|
|
3995
|
-
|
|
3739
|
+
if (hasAlphaChar) {
|
|
3740
|
+
const selectedIso2 = this.selectedCountryData.iso2;
|
|
3741
|
+
const hasExtension = Boolean(intlTelInput.utils.getExtension(val, selectedIso2));
|
|
3742
|
+
if (hasExtension) {
|
|
3743
|
+
return allowNumberExtensions;
|
|
3744
|
+
}
|
|
3745
|
+
return allowPhonewords;
|
|
3996
3746
|
}
|
|
3997
|
-
return
|
|
3747
|
+
return true;
|
|
3998
3748
|
}
|
|
3999
3749
|
_utilsIsValidNumber(val) {
|
|
4000
3750
|
return intlTelInput.utils ? intlTelInput.utils.isValidNumber(
|
|
4001
3751
|
val,
|
|
4002
3752
|
this.selectedCountryData.iso2,
|
|
4003
|
-
this.options.
|
|
3753
|
+
this.options.allowedNumberTypes
|
|
4004
3754
|
) : null;
|
|
4005
3755
|
}
|
|
4006
3756
|
//* Update the selected country, and update the input val accordingly.
|
|
@@ -4110,7 +3860,7 @@ var factoryOutput = (() => {
|
|
|
4110
3860
|
attachUtils,
|
|
4111
3861
|
startedLoadingUtilsScript: false,
|
|
4112
3862
|
startedLoadingAutoCountry: false,
|
|
4113
|
-
version: "
|
|
3863
|
+
version: "26.0.0-beta.0"
|
|
4114
3864
|
}
|
|
4115
3865
|
);
|
|
4116
3866
|
var intl_tel_input_default = intlTelInput;
|