intl-tel-input 24.5.0 → 24.5.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 +11 -9
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +2 -0
- package/build/js/intlTelInput.js +32 -18
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +99 -132
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/build/js/utils.js +27 -27
- package/package.json +1 -1
- package/react/README.md +2 -2
- package/react/build/IntlTelInput.cjs +31 -17
- package/react/build/IntlTelInput.d.ts +2 -0
- package/react/build/IntlTelInput.js +31 -17
- package/react/build/IntlTelInputWithUtils.cjs +98 -131
- package/react/build/IntlTelInputWithUtils.js +98 -131
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +92 -78
- package/vue/build/IntlTelInputWithUtils.mjs +547 -580
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeModels as L, useModel as
|
|
1
|
+
import { mergeModels as L, useModel as x, ref as v, onMounted as E, watch as M, onUnmounted as F, withDirectives as B, openBlock as O, createElementBlock as V, mergeProps as z, vModelText as R } from "vue";
|
|
2
2
|
const D = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
@@ -1318,7 +1318,7 @@ for (let u = 0; u < D.length; u++) {
|
|
|
1318
1318
|
nodeById: {}
|
|
1319
1319
|
};
|
|
1320
1320
|
}
|
|
1321
|
-
const
|
|
1321
|
+
const $ = {
|
|
1322
1322
|
ad: "Andorra",
|
|
1323
1323
|
ae: "United Arab Emirates",
|
|
1324
1324
|
af: "Afghanistan",
|
|
@@ -1561,7 +1561,7 @@ const R = {
|
|
|
1561
1561
|
za: "South Africa",
|
|
1562
1562
|
zm: "Zambia",
|
|
1563
1563
|
zw: "Zimbabwe"
|
|
1564
|
-
},
|
|
1564
|
+
}, j = {
|
|
1565
1565
|
selectedCountryAriaLabel: "Selected country",
|
|
1566
1566
|
noCountrySelected: "No country selected",
|
|
1567
1567
|
countryListAriaLabel: "List of countries",
|
|
@@ -1572,10 +1572,10 @@ const R = {
|
|
|
1572
1572
|
// additional countries (not supported by country-list library)
|
|
1573
1573
|
ac: "Ascension Island",
|
|
1574
1574
|
xk: "Kosovo"
|
|
1575
|
-
}, S = { ...
|
|
1575
|
+
}, S = { ...$, ...j };
|
|
1576
1576
|
for (let u = 0; u < b.length; u++)
|
|
1577
1577
|
b[u].name = S[b[u].iso2];
|
|
1578
|
-
let
|
|
1578
|
+
let K = 0;
|
|
1579
1579
|
const k = {
|
|
1580
1580
|
//* Whether or not to allow the dropdown.
|
|
1581
1581
|
allowDropdown: !0,
|
|
@@ -1631,7 +1631,7 @@ const k = {
|
|
|
1631
1631
|
utilsScript: "",
|
|
1632
1632
|
//* The number type to enforce during validation.
|
|
1633
1633
|
validationNumberType: "MOBILE"
|
|
1634
|
-
},
|
|
1634
|
+
}, U = [
|
|
1635
1635
|
"800",
|
|
1636
1636
|
"822",
|
|
1637
1637
|
"833",
|
|
@@ -1649,14 +1649,14 @@ const k = {
|
|
|
1649
1649
|
"887",
|
|
1650
1650
|
"888",
|
|
1651
1651
|
"889"
|
|
1652
|
-
],
|
|
1653
|
-
const t =
|
|
1652
|
+
], w = (u) => u.replace(/\D/g, ""), N = (u = "") => u.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), A = (u) => {
|
|
1653
|
+
const t = w(u);
|
|
1654
1654
|
if (t.charAt(0) === "1") {
|
|
1655
1655
|
const e = t.substr(1, 3);
|
|
1656
|
-
return
|
|
1656
|
+
return U.indexOf(e) !== -1;
|
|
1657
1657
|
}
|
|
1658
1658
|
return !1;
|
|
1659
|
-
},
|
|
1659
|
+
}, H = (u, t, e, i) => {
|
|
1660
1660
|
if (e === 0 && !i)
|
|
1661
1661
|
return 0;
|
|
1662
1662
|
let s = 0;
|
|
@@ -1674,9 +1674,9 @@ const k = {
|
|
|
1674
1674
|
const { instances: t } = l;
|
|
1675
1675
|
Object.values(t).forEach((e) => e[u]());
|
|
1676
1676
|
};
|
|
1677
|
-
class
|
|
1677
|
+
class G {
|
|
1678
1678
|
constructor(t, e = {}) {
|
|
1679
|
-
this.id =
|
|
1679
|
+
this.id = K++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, k, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
|
|
1680
1680
|
}
|
|
1681
1681
|
//* Can't be private as it's called from intlTelInput convenience wrapper.
|
|
1682
1682
|
_init() {
|
|
@@ -1781,16 +1781,16 @@ class H {
|
|
|
1781
1781
|
fixDropdownWidth: a,
|
|
1782
1782
|
useFullscreenPopup: r,
|
|
1783
1783
|
countrySearch: p,
|
|
1784
|
-
i18n:
|
|
1784
|
+
i18n: c
|
|
1785
1785
|
} = this.options;
|
|
1786
|
-
let
|
|
1787
|
-
t && (
|
|
1788
|
-
const
|
|
1789
|
-
if ((h = this.telInput.parentNode) == null || h.insertBefore(
|
|
1786
|
+
let d = "iti";
|
|
1787
|
+
t && (d += " iti--allow-dropdown"), i && (d += " iti--show-flags"), s && (d += ` ${s}`), r || (d += " iti--inline-dropdown");
|
|
1788
|
+
const C = y("div", { class: d });
|
|
1789
|
+
if ((h = this.telInput.parentNode) == null || h.insertBefore(C, this.telInput), t || i || e) {
|
|
1790
1790
|
this.countryContainer = y(
|
|
1791
1791
|
"div",
|
|
1792
1792
|
{ class: "iti__country-container" },
|
|
1793
|
-
|
|
1793
|
+
C
|
|
1794
1794
|
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", t ? (this.selectedCountry = y(
|
|
1795
1795
|
"button",
|
|
1796
1796
|
{
|
|
@@ -1831,10 +1831,10 @@ class H {
|
|
|
1831
1831
|
{
|
|
1832
1832
|
type: "text",
|
|
1833
1833
|
class: "iti__search-input",
|
|
1834
|
-
placeholder:
|
|
1834
|
+
placeholder: c.searchPlaceholder,
|
|
1835
1835
|
role: "combobox",
|
|
1836
1836
|
"aria-expanded": "true",
|
|
1837
|
-
"aria-label":
|
|
1837
|
+
"aria-label": c.searchPlaceholder,
|
|
1838
1838
|
"aria-controls": `iti-${this.id}__country-listbox`,
|
|
1839
1839
|
"aria-autocomplete": "list",
|
|
1840
1840
|
autocomplete: "off"
|
|
@@ -1850,7 +1850,7 @@ class H {
|
|
|
1850
1850
|
class: "iti__country-list",
|
|
1851
1851
|
id: `iti-${this.id}__country-listbox`,
|
|
1852
1852
|
role: "listbox",
|
|
1853
|
-
"aria-label":
|
|
1853
|
+
"aria-label": c.countryListAriaLabel
|
|
1854
1854
|
},
|
|
1855
1855
|
this.dropdownContent
|
|
1856
1856
|
), this._appendListItems(), p && this._updateSearchResultsText(), o) {
|
|
@@ -1860,15 +1860,15 @@ class H {
|
|
|
1860
1860
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
|
-
if (
|
|
1863
|
+
if (C.appendChild(this.telInput), this._updateInputPadding(), n) {
|
|
1864
1864
|
const m = this.telInput.getAttribute("name") || "", f = n(m);
|
|
1865
1865
|
f.phone && (this.hiddenInput = y("input", {
|
|
1866
1866
|
type: "hidden",
|
|
1867
1867
|
name: f.phone
|
|
1868
|
-
}),
|
|
1868
|
+
}), C.appendChild(this.hiddenInput)), f.country && (this.hiddenInputCountry = y("input", {
|
|
1869
1869
|
type: "hidden",
|
|
1870
1870
|
name: f.country
|
|
1871
|
-
}),
|
|
1871
|
+
}), C.appendChild(this.hiddenInputCountry));
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
1874
|
//* For each country: add a country list item <li> to the countryList <ul> container.
|
|
@@ -1896,12 +1896,12 @@ class H {
|
|
|
1896
1896
|
//* 1. Extracting a dial code from the given number
|
|
1897
1897
|
//* 2. Using explicit initialCountry
|
|
1898
1898
|
_setInitialState(t = !1) {
|
|
1899
|
-
const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(n), a = A(n), { initialCountry: r, geoIpLookup: p } = this.options,
|
|
1899
|
+
const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(n), a = A(n), { initialCountry: r, geoIpLookup: p } = this.options, c = r === "auto" && p;
|
|
1900
1900
|
if (o && !a)
|
|
1901
1901
|
this._updateCountryFromNumber(n);
|
|
1902
|
-
else if (!
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1902
|
+
else if (!c || t) {
|
|
1903
|
+
const d = r ? r.toLowerCase() : "";
|
|
1904
|
+
d && this._getCountryData(d, !0) ? this._setCountry(d) : o && a ? this._setCountry("us") : this._setCountry();
|
|
1905
1905
|
}
|
|
1906
1906
|
n && this._updateValFromNumber(n);
|
|
1907
1907
|
}
|
|
@@ -1962,17 +1962,17 @@ class H {
|
|
|
1962
1962
|
let a = !1;
|
|
1963
1963
|
new RegExp("\\p{L}", "u").test(this.telInput.value) && (a = !0), this._handleInputEvent = (r) => {
|
|
1964
1964
|
if (this.isAndroid && (r == null ? void 0 : r.data) === "+" && i && n && o) {
|
|
1965
|
-
const
|
|
1965
|
+
const C = this.telInput.selectionStart || 0, h = this.telInput.value.substring(0, C - 1), m = this.telInput.value.substring(C);
|
|
1966
1966
|
this.telInput.value = h + m, this._openDropdownWithPlus();
|
|
1967
1967
|
return;
|
|
1968
1968
|
}
|
|
1969
1969
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
1970
|
-
const p = (r == null ? void 0 : r.data) && /[^+0-9]/.test(r.data),
|
|
1971
|
-
p ||
|
|
1972
|
-
const
|
|
1973
|
-
if (e && !a && !
|
|
1974
|
-
const
|
|
1975
|
-
this.telInput.value = g, this.telInput.setSelectionRange(
|
|
1970
|
+
const p = (r == null ? void 0 : r.data) && /[^+0-9]/.test(r.data), c = (r == null ? void 0 : r.inputType) === "insertFromPaste" && this.telInput.value;
|
|
1971
|
+
p || c && !t ? a = !0 : /[^+0-9]/.test(this.telInput.value) || (a = !1);
|
|
1972
|
+
const d = (r == null ? void 0 : r.detail) && r.detail.isSetNumber && !s;
|
|
1973
|
+
if (e && !a && !d) {
|
|
1974
|
+
const C = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, C).replace(/[^+0-9]/g, "").length, f = (r == null ? void 0 : r.inputType) === "deleteContentForward", g = this._formatNumberAsYouType(), I = H(m, g, C, f);
|
|
1975
|
+
this.telInput.value = g, this.telInput.setSelectionRange(I, I);
|
|
1976
1976
|
}
|
|
1977
1977
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (t || i) && (this._handleKeydownEvent = (r) => {
|
|
1978
1978
|
if (r.key && r.key.length === 1 && !r.altKey && !r.ctrlKey && !r.metaKey) {
|
|
@@ -1981,12 +1981,20 @@ class H {
|
|
|
1981
1981
|
return;
|
|
1982
1982
|
}
|
|
1983
1983
|
if (t) {
|
|
1984
|
-
const p = this.telInput.selectionStart === 0 && r.key === "+",
|
|
1985
|
-
(!
|
|
1984
|
+
const p = this.telInput.value, d = !(p.charAt(0) === "+") && this.telInput.selectionStart === 0 && r.key === "+", C = /^[0-9]$/.test(r.key), h = i ? C : d || C, m = this._getFullNumber(), f = l.utils.getCoreNumber(m, this.selectedCountryData.iso2), g = this.maxCoreNumberLength && f.length >= this.maxCoreNumberLength, I = p.substring(this.telInput.selectionStart, this.telInput.selectionEnd), T = /\d/.test(I), P = d ? !0 : this._isChangingDialCode(r.key);
|
|
1985
|
+
(!h || g && !T && !P) && r.preventDefault();
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
1989
1989
|
}
|
|
1990
|
+
_isChangingDialCode(t) {
|
|
1991
|
+
const e = this.telInput.value;
|
|
1992
|
+
if (e.charAt(0) === "+") {
|
|
1993
|
+
const i = this.selectedCountryData.iso2, s = e.slice(0, this.telInput.selectionStart) + t + e.slice(this.telInput.selectionEnd), n = this._getFullNumber(s);
|
|
1994
|
+
return this._getCountryFromNumber(n) !== i;
|
|
1995
|
+
}
|
|
1996
|
+
return !1;
|
|
1997
|
+
}
|
|
1990
1998
|
//* Adhere to the input's maxlength attr.
|
|
1991
1999
|
_cap(t) {
|
|
1992
2000
|
const e = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
|
|
@@ -2073,10 +2081,10 @@ class H {
|
|
|
2073
2081
|
this.countryList.innerHTML = "";
|
|
2074
2082
|
const s = N(t);
|
|
2075
2083
|
for (let n = 0; n < this.countries.length; n++) {
|
|
2076
|
-
const o = this.countries[n], a = N(o.name), r = o.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((
|
|
2084
|
+
const o = this.countries[n], a = N(o.name), r = o.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((c) => c[0]).join("").toLowerCase(), p = `+${o.dialCode}`;
|
|
2077
2085
|
if (e || a.includes(s) || p.includes(s) || o.iso2.includes(s) || r.includes(s)) {
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2086
|
+
const c = o.nodeById[this.id];
|
|
2087
|
+
c && this.countryList.appendChild(c), i && (this._highlightListItem(c, !1), i = !1);
|
|
2080
2088
|
}
|
|
2081
2089
|
}
|
|
2082
2090
|
i && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
|
|
@@ -2114,23 +2122,29 @@ class H {
|
|
|
2114
2122
|
//* Check if need to select a new country based on the given number
|
|
2115
2123
|
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
2116
2124
|
_updateCountryFromNumber(t) {
|
|
2125
|
+
const e = this._getCountryFromNumber(t);
|
|
2126
|
+
return e !== null ? this._setCountry(e) : !1;
|
|
2127
|
+
}
|
|
2128
|
+
_getCountryFromNumber(t) {
|
|
2117
2129
|
const e = t.indexOf("+");
|
|
2118
2130
|
let i = e ? t.substring(e) : t;
|
|
2119
2131
|
const s = this.selectedCountryData.dialCode;
|
|
2120
2132
|
i && s === "1" && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = `1${i}`), i = `+${i}`), this.options.separateDialCode && s && i.charAt(0) !== "+" && (i = `+${s}${i}`);
|
|
2121
|
-
const o = this._getDialCode(i, !0), a =
|
|
2122
|
-
let r = null;
|
|
2133
|
+
const o = this._getDialCode(i, !0), a = w(i);
|
|
2123
2134
|
if (o) {
|
|
2124
|
-
const
|
|
2125
|
-
if (!(s === "1" && A(a)) && !
|
|
2126
|
-
for (let
|
|
2127
|
-
if (
|
|
2128
|
-
r
|
|
2129
|
-
break;
|
|
2130
|
-
}
|
|
2135
|
+
const r = this.dialCodeToIso2Map[w(o)], p = r.indexOf(this.selectedCountryData.iso2) !== -1 && a.length <= o.length - 1;
|
|
2136
|
+
if (!(s === "1" && A(a)) && !p) {
|
|
2137
|
+
for (let d = 0; d < r.length; d++)
|
|
2138
|
+
if (r[d])
|
|
2139
|
+
return r[d];
|
|
2131
2140
|
}
|
|
2132
|
-
} else
|
|
2133
|
-
|
|
2141
|
+
} else {
|
|
2142
|
+
if (i.charAt(0) === "+" && a.length)
|
|
2143
|
+
return "";
|
|
2144
|
+
if ((!i || i === "+") && !this.selectedCountryData.iso2)
|
|
2145
|
+
return this.defaultCountry;
|
|
2146
|
+
}
|
|
2147
|
+
return null;
|
|
2134
2148
|
}
|
|
2135
2149
|
//* Remove highlighting from other list items and highlight the given item.
|
|
2136
2150
|
_highlightListItem(t, e) {
|
|
@@ -2252,12 +2266,12 @@ class H {
|
|
|
2252
2266
|
}
|
|
2253
2267
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2254
2268
|
_scrollTo(t) {
|
|
2255
|
-
const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, o = n + s, a = t.offsetHeight, r = t.getBoundingClientRect().top + i, p = r + a,
|
|
2269
|
+
const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, o = n + s, a = t.offsetHeight, r = t.getBoundingClientRect().top + i, p = r + a, c = r - n + e.scrollTop;
|
|
2256
2270
|
if (r < n)
|
|
2257
|
-
e.scrollTop =
|
|
2271
|
+
e.scrollTop = c;
|
|
2258
2272
|
else if (p > o) {
|
|
2259
|
-
const
|
|
2260
|
-
e.scrollTop =
|
|
2273
|
+
const d = s - a;
|
|
2274
|
+
e.scrollTop = c - d;
|
|
2261
2275
|
}
|
|
2262
2276
|
}
|
|
2263
2277
|
//* Replace any existing dial code with the new one
|
|
@@ -2293,11 +2307,11 @@ class H {
|
|
|
2293
2307
|
return i;
|
|
2294
2308
|
}
|
|
2295
2309
|
//* Get the input val, adding the dial code if separateDialCode is enabled.
|
|
2296
|
-
_getFullNumber() {
|
|
2297
|
-
const
|
|
2298
|
-
let
|
|
2299
|
-
const
|
|
2300
|
-
return this.options.separateDialCode &&
|
|
2310
|
+
_getFullNumber(t) {
|
|
2311
|
+
const e = t || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
|
|
2312
|
+
let s;
|
|
2313
|
+
const n = w(e);
|
|
2314
|
+
return this.options.separateDialCode && e.charAt(0) !== "+" && i && n ? s = `+${i}` : s = "", s + e;
|
|
2301
2315
|
}
|
|
2302
2316
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
2303
2317
|
_beforeSetNumber(t) {
|
|
@@ -2439,7 +2453,7 @@ class H {
|
|
|
2439
2453
|
this.telInput.disabled = t, t ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
|
|
2440
2454
|
}
|
|
2441
2455
|
}
|
|
2442
|
-
const
|
|
2456
|
+
const W = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUtilsScript = !0, new Promise((t, e) => {
|
|
2443
2457
|
import(
|
|
2444
2458
|
/* webpackIgnore: true */
|
|
2445
2459
|
/* @vite-ignore */
|
|
@@ -2451,7 +2465,7 @@ const G = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
|
|
|
2451
2465
|
});
|
|
2452
2466
|
})) : null, l = Object.assign(
|
|
2453
2467
|
(u, t) => {
|
|
2454
|
-
const e = new
|
|
2468
|
+
const e = new G(u, t);
|
|
2455
2469
|
return e._init(), u.setAttribute("data-intl-tel-input-id", e.id.toString()), l.instances[e.id] = e, e;
|
|
2456
2470
|
},
|
|
2457
2471
|
{
|
|
@@ -2467,10 +2481,10 @@ const G = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
|
|
|
2467
2481
|
},
|
|
2468
2482
|
//* A map from instance ID to instance object.
|
|
2469
2483
|
instances: {},
|
|
2470
|
-
loadUtils:
|
|
2471
|
-
version: "24.5.
|
|
2484
|
+
loadUtils: W,
|
|
2485
|
+
version: "24.5.1"
|
|
2472
2486
|
}
|
|
2473
|
-
),
|
|
2487
|
+
), Y = {
|
|
2474
2488
|
__name: "IntlTelInput",
|
|
2475
2489
|
props: /* @__PURE__ */ L({
|
|
2476
2490
|
disabled: {
|
|
@@ -2503,42 +2517,42 @@ const G = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
|
|
|
2503
2517
|
"changeErrorCode"
|
|
2504
2518
|
], ["update:modelValue"]),
|
|
2505
2519
|
setup(u, { expose: t, emit: e }) {
|
|
2506
|
-
const i =
|
|
2520
|
+
const i = x(u, "modelValue"), s = u, n = e, o = v(), a = v(), r = v(!1), p = () => a.value ? s.options.strictMode ? a.value.isValidNumberPrecise() : a.value.isValidNumber() : null, c = () => {
|
|
2507
2521
|
let h = p();
|
|
2508
2522
|
r.value !== h && (r.value = h, n("changeValidity", !!h), n(
|
|
2509
2523
|
"changeErrorCode",
|
|
2510
2524
|
h ? null : a.value.getValidationError()
|
|
2511
2525
|
));
|
|
2512
|
-
},
|
|
2526
|
+
}, d = () => {
|
|
2513
2527
|
var h;
|
|
2514
|
-
n("changeNumber", ((h = a.value) == null ? void 0 : h.getNumber()) ?? ""),
|
|
2515
|
-
},
|
|
2528
|
+
n("changeNumber", ((h = a.value) == null ? void 0 : h.getNumber()) ?? ""), c();
|
|
2529
|
+
}, C = () => {
|
|
2516
2530
|
var h;
|
|
2517
|
-
n("changeCountry", ((h = a.value) == null ? void 0 : h.getSelectedCountryData().iso2) ?? ""),
|
|
2531
|
+
n("changeCountry", ((h = a.value) == null ? void 0 : h.getSelectedCountryData().iso2) ?? ""), d(), c();
|
|
2518
2532
|
};
|
|
2519
|
-
return
|
|
2533
|
+
return E(() => {
|
|
2520
2534
|
o.value && (a.value = l(o.value, s.options), s.value && a.value.setNumber(s.value), s.disabled && a.value.setDisabled(s.disabled));
|
|
2521
|
-
}),
|
|
2535
|
+
}), M(
|
|
2522
2536
|
() => s.disabled,
|
|
2523
2537
|
(h) => {
|
|
2524
2538
|
var m;
|
|
2525
2539
|
return (m = a.value) == null ? void 0 : m.setDisabled(h);
|
|
2526
2540
|
}
|
|
2527
|
-
),
|
|
2541
|
+
), F(() => {
|
|
2528
2542
|
var h;
|
|
2529
2543
|
return (h = a.value) == null ? void 0 : h.destroy();
|
|
2530
|
-
}), t({ instance: a, input: o }), (h, m) => B((O(), V("input",
|
|
2544
|
+
}), t({ instance: a, input: o }), (h, m) => B((O(), V("input", z({
|
|
2531
2545
|
ref_key: "input",
|
|
2532
2546
|
ref: o,
|
|
2533
2547
|
"onUpdate:modelValue": m[0] || (m[0] = (f) => i.value = f),
|
|
2534
2548
|
type: "tel",
|
|
2535
|
-
onCountrychange:
|
|
2536
|
-
onInput:
|
|
2549
|
+
onCountrychange: C,
|
|
2550
|
+
onInput: d
|
|
2537
2551
|
}, u.inputProps), null, 16)), [
|
|
2538
|
-
[
|
|
2552
|
+
[R, i.value]
|
|
2539
2553
|
]);
|
|
2540
2554
|
}
|
|
2541
2555
|
};
|
|
2542
2556
|
export {
|
|
2543
|
-
|
|
2557
|
+
Y as default
|
|
2544
2558
|
};
|