intl-tel-input 19.2.20 → 19.4.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 +13 -5
- 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/intlTelInput-jquery.js +26 -10
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +26 -10
- package/build/js/intlTelInput.min.js +3 -3
- package/composer.json +1 -1
- package/demo.html +2 -1
- package/package.json +1 -1
- package/react/build/IntlTelInput.cjs.js +2 -2
- package/react/build/IntlTelInput.cjs.js.map +3 -3
- package/react/build/IntlTelInput.esm.js +2 -2
- package/react/build/IntlTelInput.esm.js.map +3 -3
- package/react/demo/simple-bundle.js +80 -78
- package/react/demo/validation-bundle.js +80 -78
- package/spec.html +2 -0
- package/src/js/intlTelInput.js +30 -8
- package/src/spec/helpers/helpers.js +5 -0
- package/src/spec/tests/options/hiddenInput.js +120 -0
|
@@ -24290,23 +24290,23 @@ var import_client = __toESM(require_client());
|
|
|
24290
24290
|
// react/build/IntlTelInput.esm.js
|
|
24291
24291
|
var import_react = __toESM(require_react());
|
|
24292
24292
|
var import_prop_types = __toESM(require_prop_types());
|
|
24293
|
-
var
|
|
24294
|
-
var
|
|
24295
|
-
var
|
|
24296
|
-
var
|
|
24297
|
-
var
|
|
24298
|
-
var
|
|
24299
|
-
var
|
|
24300
|
-
var
|
|
24293
|
+
var X = Object.create;
|
|
24294
|
+
var z = Object.defineProperty;
|
|
24295
|
+
var tt = Object.getOwnPropertyDescriptor;
|
|
24296
|
+
var et = Object.getOwnPropertyNames;
|
|
24297
|
+
var it = Object.getPrototypeOf;
|
|
24298
|
+
var nt = Object.prototype.hasOwnProperty;
|
|
24299
|
+
var ot = (c, p) => () => (p || c((p = { exports: {} }).exports, p), p.exports);
|
|
24300
|
+
var rt = (c, p, y, m) => {
|
|
24301
24301
|
if (p && typeof p == "object" || typeof p == "function")
|
|
24302
|
-
for (let C of
|
|
24303
|
-
!
|
|
24302
|
+
for (let C of et(p))
|
|
24303
|
+
!nt.call(c, C) && C !== y && z(c, C, { get: () => p[C], enumerable: !(m = tt(p, C)) || m.enumerable });
|
|
24304
24304
|
return c;
|
|
24305
24305
|
};
|
|
24306
|
-
var
|
|
24307
|
-
var
|
|
24306
|
+
var st = (c, p, y) => (y = c != null ? X(it(c)) : {}, rt(p || !c || !c.__esModule ? z(y, "default", { value: c, enumerable: true }) : y, c));
|
|
24307
|
+
var V = ot((dt, F) => {
|
|
24308
24308
|
(function(c) {
|
|
24309
|
-
typeof
|
|
24309
|
+
typeof F == "object" && F.exports ? F.exports = c() : window.intlTelInput = c();
|
|
24310
24310
|
})(function(c) {
|
|
24311
24311
|
"use strict";
|
|
24312
24312
|
return function() {
|
|
@@ -24320,39 +24320,39 @@ var R = et((at, T) => {
|
|
|
24320
24320
|
typeof Object.getOwnPropertySymbols == "function" && e.push.apply(e, Object.getOwnPropertySymbols(t).filter(function(i) {
|
|
24321
24321
|
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
24322
24322
|
})), e.forEach(function(i) {
|
|
24323
|
-
|
|
24323
|
+
P(s, i, t[i]);
|
|
24324
24324
|
});
|
|
24325
24325
|
}
|
|
24326
24326
|
return s;
|
|
24327
24327
|
}
|
|
24328
|
-
function
|
|
24329
|
-
return n =
|
|
24328
|
+
function P(s, n, t) {
|
|
24329
|
+
return n = T(n), n in s ? Object.defineProperty(s, n, { value: t, enumerable: true, configurable: true, writable: true }) : s[n] = t, s;
|
|
24330
24330
|
}
|
|
24331
|
-
function
|
|
24332
|
-
return _(s) ||
|
|
24331
|
+
function x(s, n) {
|
|
24332
|
+
return _(s) || L(s, n) || U(s, n) || O();
|
|
24333
24333
|
}
|
|
24334
|
-
function
|
|
24334
|
+
function O() {
|
|
24335
24335
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24336
24336
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
24337
24337
|
}
|
|
24338
|
-
function
|
|
24338
|
+
function U(s, n) {
|
|
24339
24339
|
if (s) {
|
|
24340
24340
|
if (typeof s == "string")
|
|
24341
|
-
return
|
|
24341
|
+
return E(s, n);
|
|
24342
24342
|
var t = Object.prototype.toString.call(s).slice(8, -1);
|
|
24343
24343
|
if (t === "Object" && s.constructor && (t = s.constructor.name), t === "Map" || t === "Set")
|
|
24344
24344
|
return Array.from(s);
|
|
24345
24345
|
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
24346
|
-
return
|
|
24346
|
+
return E(s, n);
|
|
24347
24347
|
}
|
|
24348
24348
|
}
|
|
24349
|
-
function
|
|
24349
|
+
function E(s, n) {
|
|
24350
24350
|
(n == null || n > s.length) && (n = s.length);
|
|
24351
24351
|
for (var t = 0, e = new Array(n); t < n; t++)
|
|
24352
24352
|
e[t] = s[t];
|
|
24353
24353
|
return e;
|
|
24354
24354
|
}
|
|
24355
|
-
function
|
|
24355
|
+
function L(s, n) {
|
|
24356
24356
|
var t = s == null ? null : typeof Symbol < "u" && s[Symbol.iterator] || s["@@iterator"];
|
|
24357
24357
|
if (t != null) {
|
|
24358
24358
|
var e, i, o, r, a = [], l = true, u = false;
|
|
@@ -24382,24 +24382,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24382
24382
|
if (Array.isArray(s))
|
|
24383
24383
|
return s;
|
|
24384
24384
|
}
|
|
24385
|
-
function
|
|
24385
|
+
function S(s, n) {
|
|
24386
24386
|
if (!(s instanceof n))
|
|
24387
24387
|
throw new TypeError("Cannot call a class as a function");
|
|
24388
24388
|
}
|
|
24389
24389
|
function b(s, n) {
|
|
24390
24390
|
for (var t = 0; t < n.length; t++) {
|
|
24391
24391
|
var e = n[t];
|
|
24392
|
-
e.enumerable = e.enumerable || false, e.configurable = true, "value" in e && (e.writable = true), Object.defineProperty(s,
|
|
24392
|
+
e.enumerable = e.enumerable || false, e.configurable = true, "value" in e && (e.writable = true), Object.defineProperty(s, T(e.key), e);
|
|
24393
24393
|
}
|
|
24394
24394
|
}
|
|
24395
|
-
function
|
|
24395
|
+
function M(s, n, t) {
|
|
24396
24396
|
return n && b(s.prototype, n), t && b(s, t), Object.defineProperty(s, "prototype", { writable: false }), s;
|
|
24397
24397
|
}
|
|
24398
|
-
function
|
|
24399
|
-
var n =
|
|
24398
|
+
function T(s) {
|
|
24399
|
+
var n = q(s, "string");
|
|
24400
24400
|
return typeof n == "symbol" ? n : String(n);
|
|
24401
24401
|
}
|
|
24402
|
-
function
|
|
24402
|
+
function q(s, n) {
|
|
24403
24403
|
if (typeof s != "object" || s === null)
|
|
24404
24404
|
return s;
|
|
24405
24405
|
var t = s[Symbol.toPrimitive];
|
|
@@ -24411,24 +24411,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24411
24411
|
}
|
|
24412
24412
|
return (n === "string" ? String : Number)(s);
|
|
24413
24413
|
}
|
|
24414
|
-
var
|
|
24414
|
+
var k = { getInstance: function(n) {
|
|
24415
24415
|
var t = n.getAttribute("data-intl-tel-input-id");
|
|
24416
24416
|
return window.intlTelInputGlobals.instances[t];
|
|
24417
24417
|
}, instances: {}, documentReady: function() {
|
|
24418
24418
|
return document.readyState === "complete";
|
|
24419
24419
|
} };
|
|
24420
|
-
typeof window == "object" && (window.intlTelInputGlobals =
|
|
24421
|
-
var
|
|
24420
|
+
typeof window == "object" && (window.intlTelInputGlobals = k);
|
|
24421
|
+
var Y = 0, R = { allowDropdown: true, autoInsertDialCode: false, autoPlaceholder: "polite", countrySearch: true, containerClass: "", customPlaceholder: null, defaultToFirstCountry: true, dropdownContainer: null, excludeCountries: [], fixDropdownWidth: true, formatAsYouType: true, formatOnDisplay: true, geoIpLookup: null, hiddenInput: null, i18n: {}, initialCountry: "", nationalMode: true, onlyCountries: [], placeholderNumberType: "MOBILE", preferredCountries: [], showFlags: true, showSelectedDialCode: false, useFullscreenPopup: typeof navigator < "u" && typeof window < "u" ? /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 500 : false, utilsScript: "" }, J = ["800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889"], D = function(n) {
|
|
24422
24422
|
var t = window.intlTelInputGlobals.instances;
|
|
24423
24423
|
Object.values(t).forEach(function(e) {
|
|
24424
24424
|
return e[n]();
|
|
24425
24425
|
});
|
|
24426
|
-
},
|
|
24426
|
+
}, Z = function() {
|
|
24427
24427
|
function s(n) {
|
|
24428
24428
|
var t = arguments.length > 1 && arguments[1] !== c ? arguments[1] : {};
|
|
24429
|
-
|
|
24429
|
+
S(this, s), this.id = Y++, this.telInput = n, this.activeItem = null, this.highlightedItem = null, this.options = Object.assign({}, R, t), this.hadInitialPlaceholder = !!n.getAttribute("placeholder");
|
|
24430
24430
|
}
|
|
24431
|
-
return
|
|
24431
|
+
return M(s, [{ key: "_init", value: function() {
|
|
24432
24432
|
var t = this;
|
|
24433
24433
|
this.options.useFullscreenPopup && (this.options.fixDropdownWidth = false), this.options.countrySearch && !this.options.useFullscreenPopup && (this.options.fixDropdownWidth = true), this.options.nationalMode && (this.options.autoInsertDialCode = false), this.options.showSelectedDialCode && (this.options.autoInsertDialCode = false);
|
|
24434
24434
|
var e = this.options.allowDropdown && !this.options.showSelectedDialCode;
|
|
@@ -24503,7 +24503,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24503
24503
|
} }, { key: "_createEl", value: function(t, e, i) {
|
|
24504
24504
|
var o = document.createElement(t);
|
|
24505
24505
|
return e && Object.entries(e).forEach(function(r) {
|
|
24506
|
-
var a =
|
|
24506
|
+
var a = x(r, 2), l = a[0], u = a[1];
|
|
24507
24507
|
return o.setAttribute(l, u);
|
|
24508
24508
|
}), i && i.appendChild(o), o;
|
|
24509
24509
|
} }, { key: "_generateMarkup", value: function() {
|
|
@@ -24512,19 +24512,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24512
24512
|
e && (f += " iti--allow-dropdown"), i && (f += " iti--show-selected-dial-code"), o && (f += " iti--show-flags"), r && (f += " ".concat(r)), h || (f += " iti--inline-dropdown");
|
|
24513
24513
|
var v = this._createEl("div", { class: f });
|
|
24514
24514
|
this.telInput.parentNode.insertBefore(v, this.telInput);
|
|
24515
|
-
var
|
|
24516
|
-
if (
|
|
24515
|
+
var w = e || o || i;
|
|
24516
|
+
if (w && (this.flagsContainer = this._createEl("div", { class: "iti__flag-container" }, v)), v.appendChild(this.telInput), w && (this.selectedFlag = this._createEl("div", C({ class: "iti__selected-flag" }, e && { role: "combobox", "aria-haspopup": "listbox", "aria-controls": "iti-".concat(this.id, "__country-listbox"), "aria-expanded": "false", "aria-label": this.options.i18n.selectedCountryAriaLabel || "Selected country" }), this.flagsContainer)), o && (this.selectedFlagInner = this._createEl("div", { class: "iti__flag" }, this.selectedFlag)), this.selectedFlag && this.telInput.disabled && this.selectedFlag.setAttribute("aria-disabled", "true"), i && (this.selectedDialCode = this._createEl("div", { class: "iti__selected-dial-code" }, this.selectedFlag)), e) {
|
|
24517
24517
|
this.telInput.disabled || this.selectedFlag.setAttribute("tabindex", "0"), this.dropdownArrow = this._createEl("div", { class: "iti__arrow" }, this.selectedFlag);
|
|
24518
|
-
var
|
|
24519
|
-
if (this.dropdownContent = this._createEl("div", { class: "iti__dropdown-content iti__hide ".concat(
|
|
24520
|
-
var
|
|
24521
|
-
h ?
|
|
24518
|
+
var $ = u ? "" : "iti--flexible-dropdown-width";
|
|
24519
|
+
if (this.dropdownContent = this._createEl("div", { class: "iti__dropdown-content iti__hide ".concat($) }), g && (this.searchInput = this._createEl("input", { type: "text", class: "iti__search-input", placeholder: this.options.i18n.searchPlaceholder || "Search" }, this.dropdownContent)), this.countryList = this._createEl("ul", { class: "iti__country-list", id: "iti-".concat(this.id, "__country-listbox"), role: "listbox", "aria-label": this.options.i18n.countryListAriaLabel || "List of countries" }, this.dropdownContent), this.preferredCountries.length && !g && (this._appendListItems(this.preferredCountries, "iti__preferred", true), this._createEl("li", { class: "iti__divider", "aria-hidden": "true" }, this.countryList)), this._appendListItems(this.countries, "iti__standard"), l) {
|
|
24520
|
+
var N = "iti iti--container";
|
|
24521
|
+
h ? N += " iti--fullscreen-popup" : N += " iti--inline-dropdown", g && (N += " iti--country-search"), this.dropdown = this._createEl("div", { class: N }), this.dropdown.appendChild(this.dropdownContent);
|
|
24522
24522
|
} else
|
|
24523
24523
|
this.flagsContainer.appendChild(this.dropdownContent);
|
|
24524
24524
|
}
|
|
24525
24525
|
if (a) {
|
|
24526
|
-
var
|
|
24527
|
-
|
|
24526
|
+
var B = this.telInput.getAttribute("name"), A = a(B), Q = A !== null && typeof A == "object", I, j;
|
|
24527
|
+
if (Q ? (I = A.phone || B, j = A.country || "".concat(I, "_country")) : (I = A || B, j = "".concat(I, "_country")), !I)
|
|
24528
|
+
return;
|
|
24529
|
+
this.hiddenInput = this._createEl("input", { type: "hidden", name: I }), this.hiddenInputCountry = this._createEl("input", { type: "hidden", name: j }), v.appendChild(this.hiddenInput), v.appendChild(this.hiddenInputCountry);
|
|
24528
24530
|
}
|
|
24529
24531
|
} }, { key: "_appendListItems", value: function(t, e, i) {
|
|
24530
24532
|
for (var o = 0; o < t.length; o++) {
|
|
@@ -24534,12 +24536,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24534
24536
|
this.options.showFlags && (u += "<div class='iti__flag-box'><div class='iti__flag iti__".concat(r.iso2, "'></div></div>")), u += "<span class='iti__country-name'>".concat(r.name, "</span>"), u += "<span class='iti__dial-code'>+".concat(r.dialCode, "</span>"), l.insertAdjacentHTML("beforeend", u);
|
|
24535
24537
|
}
|
|
24536
24538
|
} }, { key: "_setInitialState", value: function() {
|
|
24537
|
-
var t = arguments.length > 0 && arguments[0] !== c ? arguments[0] : false, e = this.telInput.getAttribute("value"), i = this.telInput.value, o = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+"), r = o ? e : i, a = this._getDialCode(r), l = this._isRegionlessNanp(r), u = this.options, h = u.initialCountry, g = u.autoInsertDialCode;
|
|
24539
|
+
var t = arguments.length > 0 && arguments[0] !== c ? arguments[0] : false, e = this.telInput.getAttribute("value"), i = this.telInput.value, o = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+"), r = o ? e : i, a = this._getDialCode(r), l = this._isRegionlessNanp(r), u = this.options, h = u.initialCountry, g = u.autoInsertDialCode, f = u.defaultToFirstCountry;
|
|
24538
24540
|
if (a && !l)
|
|
24539
24541
|
this._updateFlagFromNumber(r);
|
|
24540
24542
|
else if (h !== "auto" || t) {
|
|
24541
|
-
var
|
|
24542
|
-
|
|
24543
|
+
var v = h ? h.toLowerCase() : "", w = v && this._getCountryData(v, true);
|
|
24544
|
+
w ? this._setFlag(v) : a && l ? this._setFlag("us") : f && (this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2, r || this._setFlag(this.defaultCountry)), !r && g && (this.telInput.value = "+".concat(this.selectedCountryData.dialCode));
|
|
24543
24545
|
}
|
|
24544
24546
|
r && this._updateValFromNumber(r);
|
|
24545
24547
|
} }, { key: "_initListeners", value: function() {
|
|
@@ -24571,10 +24573,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24571
24573
|
window.intlTelInputGlobals.autoCountry ? this.handleAutoCountry() : window.intlTelInputGlobals.startedLoadingAutoCountry || (window.intlTelInputGlobals.startedLoadingAutoCountry = true, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(function() {
|
|
24572
24574
|
var e = arguments.length > 0 && arguments[0] !== c ? arguments[0] : "", i = e.toLowerCase(), o = i && t._getCountryData(i, true);
|
|
24573
24575
|
o ? (window.intlTelInputGlobals.autoCountry = i, setTimeout(function() {
|
|
24574
|
-
return
|
|
24575
|
-
})) : (t._setInitialState(true),
|
|
24576
|
+
return D("handleAutoCountry");
|
|
24577
|
+
})) : (t._setInitialState(true), D("rejectAutoCountryPromise"));
|
|
24576
24578
|
}, function() {
|
|
24577
|
-
return
|
|
24579
|
+
return D("rejectAutoCountryPromise");
|
|
24578
24580
|
}));
|
|
24579
24581
|
} }, { key: "_initKeyListeners", value: function() {
|
|
24580
24582
|
var t = this, e = false;
|
|
@@ -24719,7 +24721,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24719
24721
|
var e = this._getNumeric(t);
|
|
24720
24722
|
if (e.charAt(0) === "1") {
|
|
24721
24723
|
var i = e.substr(1, 3);
|
|
24722
|
-
return
|
|
24724
|
+
return J.indexOf(i) !== -1;
|
|
24723
24725
|
}
|
|
24724
24726
|
return false;
|
|
24725
24727
|
} }, { key: "_highlightListItem", value: function(t, e) {
|
|
@@ -24779,8 +24781,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24779
24781
|
e && (f -= v), i.scrollTop = f;
|
|
24780
24782
|
else if (g > l) {
|
|
24781
24783
|
e && (f += v);
|
|
24782
|
-
var
|
|
24783
|
-
i.scrollTop = f -
|
|
24784
|
+
var w = r - u;
|
|
24785
|
+
i.scrollTop = f - w;
|
|
24784
24786
|
}
|
|
24785
24787
|
} }, { key: "_updateDialCode", value: function(t) {
|
|
24786
24788
|
var e = this.telInput.value, i = "+".concat(t), o;
|
|
@@ -24877,64 +24879,64 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24877
24879
|
this.options.placeholderNumberType = t, this._updatePlaceholder();
|
|
24878
24880
|
} }]), s;
|
|
24879
24881
|
}();
|
|
24880
|
-
|
|
24882
|
+
k.getCountryData = function() {
|
|
24881
24883
|
return p;
|
|
24882
24884
|
};
|
|
24883
|
-
var
|
|
24885
|
+
var K = function(n, t, e) {
|
|
24884
24886
|
var i = document.createElement("script");
|
|
24885
24887
|
i.onload = function() {
|
|
24886
|
-
|
|
24888
|
+
D("handleUtils"), t && t();
|
|
24887
24889
|
}, i.onerror = function() {
|
|
24888
|
-
|
|
24890
|
+
D("rejectUtilsScriptPromise"), e && e();
|
|
24889
24891
|
}, i.className = "iti-load-utils", i.async = true, i.src = n, document.body.appendChild(i);
|
|
24890
24892
|
};
|
|
24891
|
-
return
|
|
24893
|
+
return k.loadUtils = function(s) {
|
|
24892
24894
|
if (!window.intlTelInputUtils && !window.intlTelInputGlobals.startedLoadingUtilsScript) {
|
|
24893
24895
|
if (window.intlTelInputGlobals.startedLoadingUtilsScript = true, typeof Promise < "u")
|
|
24894
24896
|
return new Promise(function(n, t) {
|
|
24895
|
-
return
|
|
24897
|
+
return K(s, n, t);
|
|
24896
24898
|
});
|
|
24897
|
-
|
|
24899
|
+
K(s);
|
|
24898
24900
|
}
|
|
24899
24901
|
return null;
|
|
24900
|
-
},
|
|
24901
|
-
var t = new
|
|
24902
|
+
}, k.defaults = R, k.version = "19.4.0", function(s, n) {
|
|
24903
|
+
var t = new Z(s, n);
|
|
24902
24904
|
return t._init(), s.setAttribute("data-intl-tel-input-id", t.id), window.intlTelInputGlobals.instances[t.id] = t, t;
|
|
24903
24905
|
};
|
|
24904
24906
|
}();
|
|
24905
24907
|
});
|
|
24906
24908
|
});
|
|
24907
|
-
var
|
|
24908
|
-
var
|
|
24909
|
-
let
|
|
24910
|
-
let b = _.current.getNumber(),
|
|
24911
|
-
if (p(b), y(
|
|
24909
|
+
var W = st(V());
|
|
24910
|
+
var G = ({ initialValue: c, onChangeNumber: p, onChangeCountry: y, onChangeValidity: m, onChangeErrorCode: C, initOptions: P, className: x, disabled: O, onFocus: U, onBlur: E }) => {
|
|
24911
|
+
let L = (0, import_react.useRef)(null), _ = (0, import_react.useRef)(null), S = () => {
|
|
24912
|
+
let b = _.current.getNumber(), M = _.current.getSelectedCountryData().iso2;
|
|
24913
|
+
if (p(b), y(M), _.current.isValidNumber())
|
|
24912
24914
|
m(true), C(null);
|
|
24913
24915
|
else {
|
|
24914
|
-
let
|
|
24915
|
-
m(false), C(
|
|
24916
|
+
let T = _.current.getValidationError();
|
|
24917
|
+
m(false), C(T);
|
|
24916
24918
|
}
|
|
24917
24919
|
};
|
|
24918
24920
|
return (0, import_react.useEffect)(() => {
|
|
24919
|
-
let b =
|
|
24920
|
-
return _.current = (0,
|
|
24921
|
-
b.removeEventListener("countrychange",
|
|
24921
|
+
let b = L.current;
|
|
24922
|
+
return _.current = (0, W.default)(L.current, P), b.addEventListener("countrychange", S), () => {
|
|
24923
|
+
b.removeEventListener("countrychange", S), _.current.destroy();
|
|
24922
24924
|
};
|
|
24923
|
-
}, []), import_react.default.createElement("input", { type: "tel", ref:
|
|
24925
|
+
}, []), import_react.default.createElement("input", { type: "tel", ref: L, onInput: S, defaultValue: c, className: x, disabled: O, onFocus: U, onBlur: E });
|
|
24924
24926
|
};
|
|
24925
|
-
|
|
24926
|
-
|
|
24927
|
+
G.propTypes = { initialValue: import_prop_types.default.string, onChangeNumber: import_prop_types.default.func, onChangeCountry: import_prop_types.default.func, onChangeValidity: import_prop_types.default.func, onChangeErrorCode: import_prop_types.default.func, initOptions: import_prop_types.default.shape({ allowDropdown: import_prop_types.default.bool, autoInsertDialCode: import_prop_types.default.bool, autoPlaceholder: import_prop_types.default.string, containerClass: import_prop_types.default.string, countrySearch: import_prop_types.default.bool, customPlaceholder: import_prop_types.default.func, dropdownContainer: import_prop_types.default.node, excludeCountries: import_prop_types.default.arrayOf(import_prop_types.default.string), fixDropdownWidth: import_prop_types.default.bool, formatAsYouType: import_prop_types.default.bool, formatOnDisplay: import_prop_types.default.bool, geoIpLookup: import_prop_types.default.func, hiddenInput: import_prop_types.default.func, i18n: import_prop_types.default.objectOf(import_prop_types.default.string), initialCountry: import_prop_types.default.string, nationalMode: import_prop_types.default.bool, onlyCountries: import_prop_types.default.arrayOf(import_prop_types.default.string), placeholderNumberType: import_prop_types.default.string, preferredCountries: import_prop_types.default.arrayOf(import_prop_types.default.string), showFlags: import_prop_types.default.bool, showSelectedDialCode: import_prop_types.default.bool, useFullscreenPopup: import_prop_types.default.bool, utilsScript: import_prop_types.default.string }), className: import_prop_types.default.string, disabled: import_prop_types.default.bool, onFocus: import_prop_types.default.func, onBlur: import_prop_types.default.func };
|
|
24928
|
+
G.defaultProps = { initialValue: "", onChangeNumber: () => {
|
|
24927
24929
|
}, onChangeCountry: () => {
|
|
24928
24930
|
}, onChangeValidity: () => {
|
|
24929
24931
|
}, onChangeErrorCode: () => {
|
|
24930
24932
|
}, initOptions: {}, className: "", disabled: false, onFocus: () => {
|
|
24931
24933
|
}, onBlur: () => {
|
|
24932
24934
|
} };
|
|
24933
|
-
var
|
|
24935
|
+
var pt = G;
|
|
24934
24936
|
|
|
24935
24937
|
// react/demo/SimpleApp.js
|
|
24936
24938
|
var App = () => /* @__PURE__ */ import_react2.default.createElement(
|
|
24937
|
-
|
|
24939
|
+
pt,
|
|
24938
24940
|
{
|
|
24939
24941
|
initOptions: {
|
|
24940
24942
|
initialCountry: "us",
|