intl-tel-input 19.5.2 → 19.5.3
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 +12 -6
- 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 +75 -65
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +75 -65
- package/build/js/intlTelInput.min.js +3 -3
- package/composer.json +1 -1
- package/demo.html +1 -1
- package/grunt/replace.js +3 -3
- 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 +139 -139
- package/react/demo/validation-bundle.js +139 -139
- package/react/src/IntlTelInput.js +4 -0
- package/screenshots/empty-country.png +0 -0
- package/src/js/intlTelInput.js +77 -66
- package/src/spec/helpers/helpers.js +2 -2
- package/src/spec/tests/core/multipleInstances.js +14 -14
- package/src/spec/tests/core/usingDropdown.js +4 -4
- package/src/spec/tests/methods/getValidationError.js +1 -1
- package/src/spec/tests/methods/setCountry.js +5 -20
- package/src/spec/tests/options/onlyCountries.js +3 -3
|
@@ -24291,7 +24291,7 @@ var import_client = __toESM(require_client());
|
|
|
24291
24291
|
var import_react = __toESM(require_react());
|
|
24292
24292
|
var import_prop_types = __toESM(require_prop_types());
|
|
24293
24293
|
var X = Object.create;
|
|
24294
|
-
var
|
|
24294
|
+
var V = Object.defineProperty;
|
|
24295
24295
|
var tt = Object.getOwnPropertyDescriptor;
|
|
24296
24296
|
var et = Object.getOwnPropertyNames;
|
|
24297
24297
|
var it = Object.getPrototypeOf;
|
|
@@ -24299,12 +24299,12 @@ var nt = Object.prototype.hasOwnProperty;
|
|
|
24299
24299
|
var ot = (c, p) => () => (p || c((p = { exports: {} }).exports, p), p.exports);
|
|
24300
24300
|
var rt = (c, p, g, m) => {
|
|
24301
24301
|
if (p && typeof p == "object" || typeof p == "function")
|
|
24302
|
-
for (let
|
|
24303
|
-
!nt.call(c,
|
|
24302
|
+
for (let _ of et(p))
|
|
24303
|
+
!nt.call(c, _) && _ !== g && V(c, _, { get: () => p[_], enumerable: !(m = tt(p, _)) || m.enumerable });
|
|
24304
24304
|
return c;
|
|
24305
24305
|
};
|
|
24306
|
-
var
|
|
24307
|
-
var
|
|
24306
|
+
var at = (c, p, g) => (g = c != null ? X(it(c)) : {}, rt(p || !c || !c.__esModule ? V(g, "default", { value: c, enumerable: true }) : g, c));
|
|
24307
|
+
var H = ot((dt, F) => {
|
|
24308
24308
|
(function(c) {
|
|
24309
24309
|
typeof F == "object" && F.exports ? F.exports = c() : window.intlTelInput = c();
|
|
24310
24310
|
})(function(c) {
|
|
@@ -24314,55 +24314,55 @@ var V = ot((dt, F) => {
|
|
|
24314
24314
|
var m = p[g];
|
|
24315
24315
|
p[g] = { name: m[0], iso2: m[1], dialCode: m[2], priority: m[3] || 0, areaCodes: m[4] || null, nodeById: {} };
|
|
24316
24316
|
}
|
|
24317
|
-
function
|
|
24317
|
+
function _(a) {
|
|
24318
24318
|
for (var n = 1; n < arguments.length; n++) {
|
|
24319
24319
|
var t = arguments[n] != null ? Object(arguments[n]) : {}, e = Object.keys(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
|
-
P(
|
|
24323
|
+
P(a, i, t[i]);
|
|
24324
24324
|
});
|
|
24325
24325
|
}
|
|
24326
|
-
return
|
|
24326
|
+
return a;
|
|
24327
24327
|
}
|
|
24328
|
-
function P(
|
|
24329
|
-
return n =
|
|
24328
|
+
function P(a, n, t) {
|
|
24329
|
+
return n = E(n), n in a ? Object.defineProperty(a, n, { value: t, enumerable: true, configurable: true, writable: true }) : a[n] = t, a;
|
|
24330
24330
|
}
|
|
24331
|
-
function
|
|
24332
|
-
return
|
|
24331
|
+
function M(a, n) {
|
|
24332
|
+
return D(a) || U(a, n) || O(a, n) || x();
|
|
24333
24333
|
}
|
|
24334
|
-
function
|
|
24334
|
+
function x() {
|
|
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
|
|
24339
|
-
if (
|
|
24340
|
-
if (typeof
|
|
24341
|
-
return
|
|
24342
|
-
var t = Object.prototype.toString.call(
|
|
24343
|
-
if (t === "Object" &&
|
|
24344
|
-
return Array.from(
|
|
24338
|
+
function O(a, n) {
|
|
24339
|
+
if (a) {
|
|
24340
|
+
if (typeof a == "string")
|
|
24341
|
+
return A(a, n);
|
|
24342
|
+
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
24343
|
+
if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set")
|
|
24344
|
+
return Array.from(a);
|
|
24345
24345
|
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
24346
|
-
return
|
|
24346
|
+
return A(a, n);
|
|
24347
24347
|
}
|
|
24348
24348
|
}
|
|
24349
|
-
function
|
|
24350
|
-
(n == null || n >
|
|
24349
|
+
function A(a, n) {
|
|
24350
|
+
(n == null || n > a.length) && (n = a.length);
|
|
24351
24351
|
for (var t = 0, e = new Array(n); t < n; t++)
|
|
24352
|
-
e[t] =
|
|
24352
|
+
e[t] = a[t];
|
|
24353
24353
|
return e;
|
|
24354
24354
|
}
|
|
24355
|
-
function
|
|
24356
|
-
var t =
|
|
24355
|
+
function U(a, n) {
|
|
24356
|
+
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
24357
24357
|
if (t != null) {
|
|
24358
|
-
var e, i, o, r,
|
|
24358
|
+
var e, i, o, r, s = [], l = true, u = false;
|
|
24359
24359
|
try {
|
|
24360
|
-
if (o = (t = t.call(
|
|
24360
|
+
if (o = (t = t.call(a)).next, n === 0) {
|
|
24361
24361
|
if (Object(t) !== t)
|
|
24362
24362
|
return;
|
|
24363
24363
|
l = false;
|
|
24364
24364
|
} else
|
|
24365
|
-
for (; !(l = (e = o.call(t)).done) && (
|
|
24365
|
+
for (; !(l = (e = o.call(t)).done) && (s.push(e.value), s.length !== n); l = true)
|
|
24366
24366
|
;
|
|
24367
24367
|
} catch (h) {
|
|
24368
24368
|
u = true, i = h;
|
|
@@ -24375,68 +24375,68 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24375
24375
|
throw i;
|
|
24376
24376
|
}
|
|
24377
24377
|
}
|
|
24378
|
-
return
|
|
24378
|
+
return s;
|
|
24379
24379
|
}
|
|
24380
24380
|
}
|
|
24381
|
-
function
|
|
24382
|
-
if (Array.isArray(
|
|
24383
|
-
return
|
|
24381
|
+
function D(a) {
|
|
24382
|
+
if (Array.isArray(a))
|
|
24383
|
+
return a;
|
|
24384
24384
|
}
|
|
24385
|
-
function
|
|
24386
|
-
if (!(
|
|
24385
|
+
function C(a, n) {
|
|
24386
|
+
if (!(a instanceof n))
|
|
24387
24387
|
throw new TypeError("Cannot call a class as a function");
|
|
24388
24388
|
}
|
|
24389
|
-
function b(
|
|
24389
|
+
function b(a, 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(
|
|
24392
|
+
e.enumerable = e.enumerable || false, e.configurable = true, "value" in e && (e.writable = true), Object.defineProperty(a, E(e.key), e);
|
|
24393
24393
|
}
|
|
24394
24394
|
}
|
|
24395
|
-
function
|
|
24396
|
-
return n && b(
|
|
24395
|
+
function w(a, n, t) {
|
|
24396
|
+
return n && b(a.prototype, n), t && b(a, t), Object.defineProperty(a, "prototype", { writable: false }), a;
|
|
24397
24397
|
}
|
|
24398
|
-
function
|
|
24399
|
-
var n =
|
|
24398
|
+
function E(a) {
|
|
24399
|
+
var n = B(a, "string");
|
|
24400
24400
|
return typeof n == "symbol" ? n : String(n);
|
|
24401
24401
|
}
|
|
24402
|
-
function
|
|
24403
|
-
if (typeof
|
|
24404
|
-
return
|
|
24405
|
-
var t =
|
|
24402
|
+
function B(a, n) {
|
|
24403
|
+
if (typeof a != "object" || a === null)
|
|
24404
|
+
return a;
|
|
24405
|
+
var t = a[Symbol.toPrimitive];
|
|
24406
24406
|
if (t !== c) {
|
|
24407
|
-
var e = t.call(
|
|
24407
|
+
var e = t.call(a, n || "default");
|
|
24408
24408
|
if (typeof e != "object")
|
|
24409
24409
|
return e;
|
|
24410
24410
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
24411
24411
|
}
|
|
24412
|
-
return (n === "string" ? String : Number)(
|
|
24412
|
+
return (n === "string" ? String : Number)(a);
|
|
24413
24413
|
}
|
|
24414
|
-
var
|
|
24414
|
+
var S = { 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 Y = 0,
|
|
24420
|
+
typeof window == "object" && (window.intlTelInputGlobals = S);
|
|
24421
|
+
var Y = 0, K = { 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"], k = 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
|
-
function
|
|
24427
|
+
function a(n) {
|
|
24428
24428
|
var t = arguments.length > 1 && arguments[1] !== c ? arguments[1] : {};
|
|
24429
|
-
|
|
24429
|
+
C(this, a), this.id = Y++, this.telInput = n, this.activeItem = null, this.highlightedItem = null, this.options = Object.assign({}, K, t), this.hadInitialPlaceholder = !!n.getAttribute("placeholder");
|
|
24430
24430
|
}
|
|
24431
|
-
return
|
|
24431
|
+
return w(a, [{ 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;
|
|
24435
24435
|
if (!this.options.showFlags && e && (this.options.showFlags = true), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isRTL = !!this.telInput.closest("[dir=rtl]"), typeof Promise < "u") {
|
|
24436
|
-
var i = new Promise(function(r,
|
|
24437
|
-
t.resolveAutoCountryPromise = r, t.rejectAutoCountryPromise =
|
|
24438
|
-
}), o = new Promise(function(r,
|
|
24439
|
-
t.resolveUtilsScriptPromise = r, t.rejectUtilsScriptPromise =
|
|
24436
|
+
var i = new Promise(function(r, s) {
|
|
24437
|
+
t.resolveAutoCountryPromise = r, t.rejectAutoCountryPromise = s;
|
|
24438
|
+
}), o = new Promise(function(r, s) {
|
|
24439
|
+
t.resolveUtilsScriptPromise = r, t.rejectUtilsScriptPromise = s;
|
|
24440
24440
|
});
|
|
24441
24441
|
this.promise = Promise.all([i, o]);
|
|
24442
24442
|
} else
|
|
@@ -24445,14 +24445,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24445
24445
|
};
|
|
24446
24446
|
this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
|
|
24447
24447
|
} }, { key: "_processCountryData", value: function() {
|
|
24448
|
-
this._processAllCountries(), this.
|
|
24449
|
-
} }, { key: "
|
|
24450
|
-
e.length > this.
|
|
24451
|
-
for (var o = 0; o < this.
|
|
24452
|
-
if (this.
|
|
24448
|
+
this._processAllCountries(), this._processDialCodes(), this._processPreferredCountries(), this._translateCountryNames(), (this.options.onlyCountries.length || this.options.i18n) && this.countries.sort(this._countryNameSort);
|
|
24449
|
+
} }, { key: "_addToDialCodeMap", value: function(t, e, i) {
|
|
24450
|
+
e.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = e.length), this.dialCodeToIso2Map.hasOwnProperty(e) || (this.dialCodeToIso2Map[e] = []);
|
|
24451
|
+
for (var o = 0; o < this.dialCodeToIso2Map[e].length; o++)
|
|
24452
|
+
if (this.dialCodeToIso2Map[e][o] === t)
|
|
24453
24453
|
return;
|
|
24454
|
-
var r = i !== c ? i : this.
|
|
24455
|
-
this.
|
|
24454
|
+
var r = i !== c ? i : this.dialCodeToIso2Map[e].length;
|
|
24455
|
+
this.dialCodeToIso2Map[e][r] = t;
|
|
24456
24456
|
} }, { key: "_processAllCountries", value: function() {
|
|
24457
24457
|
if (this.options.onlyCountries.length) {
|
|
24458
24458
|
var t = this.options.onlyCountries.map(function(i) {
|
|
@@ -24477,21 +24477,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24477
24477
|
}
|
|
24478
24478
|
} }, { key: "_countryNameSort", value: function(t, e) {
|
|
24479
24479
|
return t.name < e.name ? -1 : t.name > e.name ? 1 : 0;
|
|
24480
|
-
} }, { key: "
|
|
24481
|
-
this.
|
|
24480
|
+
} }, { key: "_processDialCodes", value: function() {
|
|
24481
|
+
this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
|
|
24482
24482
|
for (var t = 0; t < this.countries.length; t++) {
|
|
24483
24483
|
var e = this.countries[t];
|
|
24484
|
-
this.dialCodes[e.dialCode] || (this.dialCodes[e.dialCode] = true), this.
|
|
24484
|
+
this.dialCodes[e.dialCode] || (this.dialCodes[e.dialCode] = true), this._addToDialCodeMap(e.iso2, e.dialCode, e.priority);
|
|
24485
24485
|
}
|
|
24486
24486
|
for (var i = 0; i < this.countries.length; i++) {
|
|
24487
24487
|
var o = this.countries[i];
|
|
24488
24488
|
if (o.areaCodes)
|
|
24489
|
-
for (var r = this.
|
|
24490
|
-
for (var l = o.areaCodes[
|
|
24489
|
+
for (var r = this.dialCodeToIso2Map[o.dialCode][0], s = 0; s < o.areaCodes.length; s++) {
|
|
24490
|
+
for (var l = o.areaCodes[s], u = 1; u < l.length; u++) {
|
|
24491
24491
|
var h = o.dialCode + l.substr(0, u);
|
|
24492
|
-
this.
|
|
24492
|
+
this._addToDialCodeMap(r, h), this._addToDialCodeMap(o.iso2, h);
|
|
24493
24493
|
}
|
|
24494
|
-
this.
|
|
24494
|
+
this._addToDialCodeMap(o.iso2, o.dialCode + l);
|
|
24495
24495
|
}
|
|
24496
24496
|
}
|
|
24497
24497
|
} }, { key: "_processPreferredCountries", value: function() {
|
|
@@ -24503,17 +24503,17 @@ 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
|
|
24506
|
+
var s = M(r, 2), l = s[0], u = s[1];
|
|
24507
24507
|
return o.setAttribute(l, u);
|
|
24508
24508
|
}), i && i.appendChild(o), o;
|
|
24509
24509
|
} }, { key: "_generateMarkup", value: function() {
|
|
24510
24510
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
24511
|
-
var t = this.options, e = t.allowDropdown, i = t.showSelectedDialCode, o = t.showFlags, r = t.containerClass,
|
|
24511
|
+
var t = this.options, e = t.allowDropdown, i = t.showSelectedDialCode, o = t.showFlags, r = t.containerClass, s = t.hiddenInput, l = t.dropdownContainer, u = t.fixDropdownWidth, h = t.useFullscreenPopup, y = t.countrySearch, v = "iti";
|
|
24512
24512
|
e && (v += " iti--allow-dropdown"), i && (v += " iti--show-selected-dial-code"), o && (v += " iti--show-flags"), r && (v += " ".concat(r)), h || (v += " iti--inline-dropdown");
|
|
24513
24513
|
var f = this._createEl("div", { class: v });
|
|
24514
24514
|
this.telInput.parentNode.insertBefore(f, this.telInput);
|
|
24515
|
-
var
|
|
24516
|
-
if (
|
|
24515
|
+
var I = e || o || i;
|
|
24516
|
+
if (I && (this.flagsContainer = this._createEl("div", { class: "iti__flag-container" }, f)), f.appendChild(this.telInput), I && (this.selectedFlag = this._createEl("div", _({ 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 iti__globe" }, 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
24518
|
var $ = u ? "" : "iti--flexible-dropdown-width";
|
|
24519
24519
|
if (this.dropdownContent = this._createEl("div", { class: "iti__dropdown-content iti__hide ".concat($) }), y && (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 && !y && (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) {
|
|
@@ -24522,26 +24522,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24522
24522
|
} else
|
|
24523
24523
|
this.flagsContainer.appendChild(this.dropdownContent);
|
|
24524
24524
|
}
|
|
24525
|
-
if (
|
|
24526
|
-
var
|
|
24527
|
-
if (Q ? (
|
|
24525
|
+
if (s) {
|
|
24526
|
+
var j = this.telInput.getAttribute("name"), T = s(j), Q = T !== null && typeof T == "object", L, G;
|
|
24527
|
+
if (Q ? (L = T.phone || j, G = T.country || "".concat(L, "_country")) : (L = T || j, G = "".concat(L, "_country")), !L)
|
|
24528
24528
|
return;
|
|
24529
|
-
this.hiddenInput = this._createEl("input", { type: "hidden", name:
|
|
24529
|
+
this.hiddenInput = this._createEl("input", { type: "hidden", name: L }), this.hiddenInputCountry = this._createEl("input", { type: "hidden", name: G }), f.appendChild(this.hiddenInput), f.appendChild(this.hiddenInputCountry);
|
|
24530
24530
|
}
|
|
24531
24531
|
} }, { key: "_appendListItems", value: function(t, e, i) {
|
|
24532
24532
|
for (var o = 0; o < t.length; o++) {
|
|
24533
|
-
var r = t[o],
|
|
24533
|
+
var r = t[o], s = i ? "-preferred" : "", l = this._createEl("li", { id: "iti-".concat(this.id, "__item-").concat(r.iso2).concat(s), class: "iti__country ".concat(e), tabindex: "-1", role: "option", "data-dial-code": r.dialCode, "data-country-code": r.iso2, "aria-selected": "false" }, this.countryList);
|
|
24534
24534
|
r.nodeById[this.id] = l;
|
|
24535
24535
|
var u = "";
|
|
24536
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);
|
|
24537
24537
|
}
|
|
24538
24538
|
} }, { key: "_setInitialState", value: function() {
|
|
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,
|
|
24540
|
-
if (
|
|
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, s = this._getDialCode(r), l = this._isRegionlessNanp(r), u = this.options, h = u.initialCountry, y = u.autoInsertDialCode, v = u.defaultToFirstCountry;
|
|
24540
|
+
if (s && !l)
|
|
24541
24541
|
this._updateFlagFromNumber(r);
|
|
24542
24542
|
else if (h !== "auto" || t) {
|
|
24543
|
-
var f = h ? h.toLowerCase() : "",
|
|
24544
|
-
|
|
24543
|
+
var f = h ? h.toLowerCase() : "", I = f && this._getCountryData(f, true);
|
|
24544
|
+
I ? this._setFlag(f) : s && l ? this._setFlag("us") : v && (this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2, r || this._setFlag(this.defaultCountry)), !r && y && (this.telInput.value = "+".concat(this.selectedCountryData.dialCode));
|
|
24545
24545
|
}
|
|
24546
24546
|
r && this._updateValFromNumber(r);
|
|
24547
24547
|
} }, { key: "_initListeners", value: function() {
|
|
@@ -24573,16 +24573,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24573
24573
|
window.intlTelInputGlobals.autoCountry ? this.handleAutoCountry() : window.intlTelInputGlobals.startedLoadingAutoCountry || (window.intlTelInputGlobals.startedLoadingAutoCountry = true, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(function() {
|
|
24574
24574
|
var e = arguments.length > 0 && arguments[0] !== c ? arguments[0] : "", i = e.toLowerCase(), o = i && t._getCountryData(i, true);
|
|
24575
24575
|
o ? (window.intlTelInputGlobals.autoCountry = i, setTimeout(function() {
|
|
24576
|
-
return
|
|
24577
|
-
})) : (t._setInitialState(true),
|
|
24576
|
+
return k("handleAutoCountry");
|
|
24577
|
+
})) : (t._setInitialState(true), k("rejectAutoCountryPromise"));
|
|
24578
24578
|
}, function() {
|
|
24579
|
-
return
|
|
24579
|
+
return k("rejectAutoCountryPromise");
|
|
24580
24580
|
}));
|
|
24581
24581
|
} }, { key: "_initKeyListeners", value: function() {
|
|
24582
24582
|
var t = this, e = false;
|
|
24583
24583
|
this._handleKeyEvent = function(i) {
|
|
24584
24584
|
if (t._updateFlagFromNumber(t.telInput.value) && t._triggerCountryChange(), i && i.data && /[^+0-9]/.test(i.data) ? e = true : /[^+0-9]/.test(t.telInput.value) || (e = false), t.options.formatAsYouType && !e) {
|
|
24585
|
-
var o = t.telInput.selectionStart, r = t.telInput.value.substring(0, o),
|
|
24585
|
+
var o = t.telInput.selectionStart, r = t.telInput.value.substring(0, o), s = r.replace(/[^+0-9]/g, "").length, l = i && i.inputType === "deleteContentForward", u = t._formatNumberAsYouType(), h = t._translateCursorPosition(s, u, o, l);
|
|
24586
24586
|
t.telInput.value = u, t.telInput.setSelectionRange(h, h);
|
|
24587
24587
|
}
|
|
24588
24588
|
}, this.telInput.addEventListener("input", this._handleKeyEvent), this._handleClipboardEvent = function() {
|
|
@@ -24591,11 +24591,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24591
24591
|
} }, { key: "_translateCursorPosition", value: function(t, e, i, o) {
|
|
24592
24592
|
if (i === 0 && !o)
|
|
24593
24593
|
return 0;
|
|
24594
|
-
for (var r = 0,
|
|
24595
|
-
if (/[+0-9]/.test(e[
|
|
24596
|
-
return
|
|
24594
|
+
for (var r = 0, s = 0; s < e.length; s++) {
|
|
24595
|
+
if (/[+0-9]/.test(e[s]) && r++, r === t && !o)
|
|
24596
|
+
return s + 1;
|
|
24597
24597
|
if (o && r === t + 1)
|
|
24598
|
-
return
|
|
24598
|
+
return s;
|
|
24599
24599
|
}
|
|
24600
24600
|
return e.length;
|
|
24601
24601
|
} }, { key: "_cap", value: function(t) {
|
|
@@ -24628,7 +24628,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24628
24628
|
} }, { key: "_setDropdownPosition", value: function() {
|
|
24629
24629
|
var t = this;
|
|
24630
24630
|
if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
|
|
24631
|
-
var e = this.telInput.getBoundingClientRect(), i = document.documentElement.scrollTop, o = e.top + i, r = this.dropdownContent.offsetHeight,
|
|
24631
|
+
var e = this.telInput.getBoundingClientRect(), i = document.documentElement.scrollTop, o = e.top + i, r = this.dropdownContent.offsetHeight, s = o + this.telInput.offsetHeight + r < i + window.innerHeight, l = o - r > i, u = !this.options.countrySearch && !s && l;
|
|
24632
24632
|
if (this._toggleClass(this.dropdownContent, "iti__dropdown-content--dropup", u), this.options.dropdownContainer) {
|
|
24633
24633
|
var h = u ? 0 : this.telInput.offsetHeight;
|
|
24634
24634
|
this.dropdown.style.top = "".concat(o + h, "px"), this.dropdown.style.left = "".concat(e.left + document.body.scrollLeft, "px"), this._handleWindowScroll = function() {
|
|
@@ -24658,10 +24658,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24658
24658
|
var r = function() {
|
|
24659
24659
|
var u = t.searchInput.value.trim();
|
|
24660
24660
|
u ? t._filterCountries(u) : t._filterCountries("", true);
|
|
24661
|
-
},
|
|
24661
|
+
}, s = null;
|
|
24662
24662
|
this._handleSearchChange = function() {
|
|
24663
|
-
|
|
24664
|
-
r(),
|
|
24663
|
+
s && clearTimeout(s), s = setTimeout(function() {
|
|
24664
|
+
r(), s = null;
|
|
24665
24665
|
}, 100);
|
|
24666
24666
|
}, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", function(l) {
|
|
24667
24667
|
return l.stopPropagation();
|
|
@@ -24674,8 +24674,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24674
24674
|
var e = arguments.length > 1 && arguments[1] !== c ? arguments[1] : false, i = true;
|
|
24675
24675
|
this.countryList.innerHTML = "";
|
|
24676
24676
|
for (var o = this._normaliseString(t), r = 0; r < this.countries.length; r++) {
|
|
24677
|
-
var
|
|
24678
|
-
(e || l.includes(o) || u.includes(o) ||
|
|
24677
|
+
var s = this.countries[r], l = this._normaliseString(s.name), u = "+".concat(s.dialCode);
|
|
24678
|
+
(e || l.includes(o) || u.includes(o) || s.iso2.includes(o)) && (this.countryList.appendChild(s.nodeById[this.id]), i && (this._highlightListItem(s.nodeById[this.id], false), i = false));
|
|
24679
24679
|
}
|
|
24680
24680
|
} }, { key: "_handleUpDownKey", value: function(t) {
|
|
24681
24681
|
var e = t === "ArrowUp" ? this.highlightedItem.previousElementSibling : this.highlightedItem.nextElementSibling;
|
|
@@ -24697,16 +24697,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24697
24697
|
} }, { key: "_updateValFromNumber", value: function(t) {
|
|
24698
24698
|
var e = t;
|
|
24699
24699
|
if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) {
|
|
24700
|
-
var i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.showSelectedDialCode, o = intlTelInputUtils.numberFormat, r = o.NATIONAL,
|
|
24700
|
+
var i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.showSelectedDialCode, o = intlTelInputUtils.numberFormat, r = o.NATIONAL, s = o.INTERNATIONAL, l = i ? r : s;
|
|
24701
24701
|
e = intlTelInputUtils.formatNumber(e, this.selectedCountryData.iso2, l);
|
|
24702
24702
|
}
|
|
24703
24703
|
e = this._beforeSetNumber(e), this.telInput.value = e;
|
|
24704
24704
|
} }, { key: "_updateFlagFromNumber", value: function(t) {
|
|
24705
24705
|
var e = t.indexOf("+"), i = e ? t.substring(e) : t, o = this.selectedCountryData.dialCode, r = o === "1";
|
|
24706
24706
|
i && r && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = "1".concat(i)), i = "+".concat(i)), this.options.showSelectedDialCode && o && i.charAt(0) !== "+" && (i = "+".concat(o).concat(i));
|
|
24707
|
-
var
|
|
24708
|
-
if (
|
|
24709
|
-
var h = this.
|
|
24707
|
+
var s = this._getDialCode(i, true), l = this._getNumeric(i), u = null;
|
|
24708
|
+
if (s) {
|
|
24709
|
+
var h = this.dialCodeToIso2Map[this._getNumeric(s)], y = h.indexOf(this.selectedCountryData.iso2) !== -1 && l.length <= s.length - 1, v = o === "1" && this._isRegionlessNanp(l);
|
|
24710
24710
|
if (!v && !y) {
|
|
24711
24711
|
for (var f = 0; f < h.length; f++)
|
|
24712
24712
|
if (h[f]) {
|
|
@@ -24735,7 +24735,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24735
24735
|
return null;
|
|
24736
24736
|
throw new Error("No country data for '".concat(t, "'"));
|
|
24737
24737
|
} }, { key: "_setFlag", value: function(t) {
|
|
24738
|
-
var e = this.options, i = e.allowDropdown, o = e.showSelectedDialCode, r = e.showFlags,
|
|
24738
|
+
var e = this.options, i = e.allowDropdown, o = e.showSelectedDialCode, r = e.showFlags, s = e.countrySearch, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
24739
24739
|
if (this.selectedCountryData = t ? this._getCountryData(t, false) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), r) {
|
|
24740
24740
|
var u = t ? "iti__".concat(t) : "iti__globe";
|
|
24741
24741
|
this.selectedFlagInner.setAttribute("class", "iti__flag ".concat(u));
|
|
@@ -24746,7 +24746,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24746
24746
|
var y = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();
|
|
24747
24747
|
this.isRTL ? this.telInput.style.paddingRight = "".concat(y + 6, "px") : this.telInput.style.paddingLeft = "".concat(y + 6, "px");
|
|
24748
24748
|
}
|
|
24749
|
-
if (this._updatePlaceholder(), i && !
|
|
24749
|
+
if (this._updatePlaceholder(), i && !s) {
|
|
24750
24750
|
var v = this.activeItem;
|
|
24751
24751
|
if (v && (v.classList.remove("iti__active"), v.setAttribute("aria-selected", "false")), t) {
|
|
24752
24752
|
var f = this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(t, "-preferred")) || this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(t));
|
|
@@ -24780,13 +24780,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24780
24780
|
} }, { key: "_closeDropdown", value: function() {
|
|
24781
24781
|
this.dropdownContent.classList.add("iti__hide"), this.selectedFlag.setAttribute("aria-expanded", "false"), this.selectedFlag.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), document.removeEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch && this.searchInput.removeEventListener("input", this._handleSearchChange), document.documentElement.removeEventListener("click", this._handleClickOffToClose), this.countryList.removeEventListener("mouseover", this._handleMouseoverCountryList), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._trigger("close:countrydropdown");
|
|
24782
24782
|
} }, { key: "_scrollTo", value: function(t, e) {
|
|
24783
|
-
var i = this.countryList, o = document.documentElement.scrollTop, r = i.offsetHeight,
|
|
24784
|
-
if (h <
|
|
24783
|
+
var i = this.countryList, o = document.documentElement.scrollTop, r = i.offsetHeight, s = i.getBoundingClientRect().top + o, l = s + r, u = t.offsetHeight, h = t.getBoundingClientRect().top + o, y = h + u, v = h - s + i.scrollTop, f = r / 2 - u / 2;
|
|
24784
|
+
if (h < s)
|
|
24785
24785
|
e && (v -= f), i.scrollTop = v;
|
|
24786
24786
|
else if (y > l) {
|
|
24787
24787
|
e && (v += f);
|
|
24788
|
-
var
|
|
24789
|
-
i.scrollTop = v -
|
|
24788
|
+
var I = r - u;
|
|
24789
|
+
i.scrollTop = v - I;
|
|
24790
24790
|
}
|
|
24791
24791
|
} }, { key: "_updateDialCode", value: function(t) {
|
|
24792
24792
|
var e = this.telInput.value, i = "+".concat(t), o;
|
|
@@ -24799,15 +24799,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24799
24799
|
var i = "";
|
|
24800
24800
|
if (t.charAt(0) === "+")
|
|
24801
24801
|
for (var o = "", r = 0; r < t.length; r++) {
|
|
24802
|
-
var
|
|
24803
|
-
if (!isNaN(parseInt(
|
|
24804
|
-
if (o +=
|
|
24805
|
-
this.
|
|
24802
|
+
var s = t.charAt(r);
|
|
24803
|
+
if (!isNaN(parseInt(s, 10))) {
|
|
24804
|
+
if (o += s, e)
|
|
24805
|
+
this.dialCodeToIso2Map[o] && (i = t.substr(0, r + 1));
|
|
24806
24806
|
else if (this.dialCodes[o]) {
|
|
24807
24807
|
i = t.substr(0, r + 1);
|
|
24808
24808
|
break;
|
|
24809
24809
|
}
|
|
24810
|
-
if (o.length === this.
|
|
24810
|
+
if (o.length === this.dialCodeMaxLen)
|
|
24811
24811
|
break;
|
|
24812
24812
|
}
|
|
24813
24813
|
}
|
|
@@ -24881,62 +24881,62 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24881
24881
|
this._updateValFromNumber(t), e && this._triggerCountryChange();
|
|
24882
24882
|
} }, { key: "setPlaceholderNumberType", value: function(t) {
|
|
24883
24883
|
this.options.placeholderNumberType = t, this._updatePlaceholder();
|
|
24884
|
-
} }]),
|
|
24884
|
+
} }]), a;
|
|
24885
24885
|
}();
|
|
24886
|
-
|
|
24886
|
+
S.getCountryData = function() {
|
|
24887
24887
|
return p;
|
|
24888
24888
|
};
|
|
24889
|
-
var
|
|
24889
|
+
var z = function(n, t, e) {
|
|
24890
24890
|
var i = document.createElement("script");
|
|
24891
24891
|
i.onload = function() {
|
|
24892
|
-
|
|
24892
|
+
k("handleUtils"), t && t();
|
|
24893
24893
|
}, i.onerror = function() {
|
|
24894
|
-
|
|
24894
|
+
k("rejectUtilsScriptPromise"), e && e();
|
|
24895
24895
|
}, i.className = "iti-load-utils", i.async = true, i.src = n, document.body.appendChild(i);
|
|
24896
24896
|
};
|
|
24897
|
-
return
|
|
24897
|
+
return S.loadUtils = function(a) {
|
|
24898
24898
|
if (!window.intlTelInputUtils && !window.intlTelInputGlobals.startedLoadingUtilsScript) {
|
|
24899
24899
|
if (window.intlTelInputGlobals.startedLoadingUtilsScript = true, typeof Promise < "u")
|
|
24900
24900
|
return new Promise(function(n, t) {
|
|
24901
|
-
return
|
|
24901
|
+
return z(a, n, t);
|
|
24902
24902
|
});
|
|
24903
|
-
|
|
24903
|
+
z(a);
|
|
24904
24904
|
}
|
|
24905
24905
|
return null;
|
|
24906
|
-
},
|
|
24907
|
-
var t = new Z(
|
|
24908
|
-
return t._init(),
|
|
24906
|
+
}, S.defaults = K, S.version = "19.5.3", function(a, n) {
|
|
24907
|
+
var t = new Z(a, n);
|
|
24908
|
+
return t._init(), a.setAttribute("data-intl-tel-input-id", t.id), window.intlTelInputGlobals.instances[t.id] = t, t;
|
|
24909
24909
|
};
|
|
24910
24910
|
}();
|
|
24911
24911
|
});
|
|
24912
24912
|
});
|
|
24913
|
-
var
|
|
24914
|
-
var
|
|
24915
|
-
let
|
|
24916
|
-
let
|
|
24917
|
-
if (p(
|
|
24918
|
-
m(true),
|
|
24913
|
+
var q = at(H());
|
|
24914
|
+
var R = ({ initialValue: c, onChangeNumber: p, onChangeCountry: g, onChangeValidity: m, onChangeErrorCode: _, initOptions: P, className: M, disabled: x, onFocus: O, onBlur: A, placeholder: U }) => {
|
|
24915
|
+
let D = (0, import_react.useRef)(null), C = (0, import_react.useRef)(null), b = () => {
|
|
24916
|
+
let w = C.current.getNumber(), E = C.current.getSelectedCountryData().iso2;
|
|
24917
|
+
if (p(w), g(E), C.current.isValidNumber())
|
|
24918
|
+
m(true), _(null);
|
|
24919
24919
|
else {
|
|
24920
|
-
let
|
|
24921
|
-
m(false),
|
|
24920
|
+
let B = C.current.getValidationError();
|
|
24921
|
+
m(false), _(B);
|
|
24922
24922
|
}
|
|
24923
24923
|
};
|
|
24924
24924
|
return (0, import_react.useEffect)(() => {
|
|
24925
|
-
let
|
|
24926
|
-
return
|
|
24927
|
-
|
|
24925
|
+
let w = D.current;
|
|
24926
|
+
return C.current = (0, q.default)(D.current, P), w.addEventListener("countrychange", b), () => {
|
|
24927
|
+
w.removeEventListener("countrychange", b), C.current.destroy();
|
|
24928
24928
|
};
|
|
24929
|
-
}, []), import_react.default.createElement("input", { type: "tel", ref:
|
|
24929
|
+
}, []), import_react.default.createElement("input", { type: "tel", ref: D, onInput: b, defaultValue: c, className: M, disabled: x, onFocus: O, onBlur: A, placeholder: U });
|
|
24930
24930
|
};
|
|
24931
|
-
|
|
24932
|
-
|
|
24931
|
+
R.propTypes = { initialValue: import_prop_types.default.string, placeholder: 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 };
|
|
24932
|
+
R.defaultProps = { initialValue: "", placeholder: "", onChangeNumber: () => {
|
|
24933
24933
|
}, onChangeCountry: () => {
|
|
24934
24934
|
}, onChangeValidity: () => {
|
|
24935
24935
|
}, onChangeErrorCode: () => {
|
|
24936
24936
|
}, initOptions: {}, className: "", disabled: false, onFocus: () => {
|
|
24937
24937
|
}, onBlur: () => {
|
|
24938
24938
|
} };
|
|
24939
|
-
var pt =
|
|
24939
|
+
var pt = R;
|
|
24940
24940
|
|
|
24941
24941
|
// react/demo/ValidationApp.js
|
|
24942
24942
|
var errorMap = [
|
|
@@ -14,6 +14,7 @@ const IntlTelInput = ({
|
|
|
14
14
|
disabled,
|
|
15
15
|
onFocus,
|
|
16
16
|
onBlur,
|
|
17
|
+
placeholder,
|
|
17
18
|
}) => {
|
|
18
19
|
const inputRef = useRef(null);
|
|
19
20
|
const itiRef = useRef(null);
|
|
@@ -58,12 +59,14 @@ const IntlTelInput = ({
|
|
|
58
59
|
disabled={disabled}
|
|
59
60
|
onFocus={onFocus}
|
|
60
61
|
onBlur={onBlur}
|
|
62
|
+
placeholder={placeholder}
|
|
61
63
|
/>
|
|
62
64
|
);
|
|
63
65
|
};
|
|
64
66
|
|
|
65
67
|
IntlTelInput.propTypes = {
|
|
66
68
|
initialValue: PropTypes.string,
|
|
69
|
+
placeholder: PropTypes.string,
|
|
67
70
|
onChangeNumber: PropTypes.func,
|
|
68
71
|
onChangeCountry: PropTypes.func,
|
|
69
72
|
onChangeValidity: PropTypes.func,
|
|
@@ -101,6 +104,7 @@ IntlTelInput.propTypes = {
|
|
|
101
104
|
|
|
102
105
|
IntlTelInput.defaultProps = {
|
|
103
106
|
initialValue: "",
|
|
107
|
+
placeholder: "",
|
|
104
108
|
onChangeNumber: () => {},
|
|
105
109
|
onChangeCountry: () => {},
|
|
106
110
|
onChangeValidity: () => {},
|
|
Binary file
|