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