intl-tel-input 19.5.3 → 19.5.4
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 +3 -3
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput-jquery.js +8 -7
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +8 -7
- package/build/js/intlTelInput.min.js +3 -3
- package/composer.json +1 -1
- package/package.json +1 -1
- package/react/build/IntlTelInput.cjs.js +2 -2
- package/react/build/IntlTelInput.cjs.js.map +2 -2
- package/react/build/IntlTelInput.esm.js +2 -2
- package/react/build/IntlTelInput.esm.js.map +2 -2
- package/react/demo/simple-bundle.js +7 -7
- package/react/demo/validation-bundle.js +7 -7
- package/src/js/intlTelInput.js +6 -5
|
@@ -24304,9 +24304,9 @@ var rt = (c, p, g, m) => {
|
|
|
24304
24304
|
return c;
|
|
24305
24305
|
};
|
|
24306
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,
|
|
24307
|
+
var H = ot((dt, N) => {
|
|
24308
24308
|
(function(c) {
|
|
24309
|
-
typeof
|
|
24309
|
+
typeof N == "object" && N.exports ? N.exports = c() : window.intlTelInput = c();
|
|
24310
24310
|
})(function(c) {
|
|
24311
24311
|
"use strict";
|
|
24312
24312
|
return function() {
|
|
@@ -24513,12 +24513,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24513
24513
|
var f = this._createEl("div", { class: v });
|
|
24514
24514
|
this.telInput.parentNode.insertBefore(f, this.telInput);
|
|
24515
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
|
|
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" }, 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) {
|
|
24520
|
-
var
|
|
24521
|
-
h ?
|
|
24520
|
+
var F = "iti iti--container";
|
|
24521
|
+
h ? F += " iti--fullscreen-popup" : F += " iti--inline-dropdown", y && (F += " iti--country-search"), this.dropdown = this._createEl("div", { class: F }), this.dropdown.appendChild(this.dropdownContent);
|
|
24522
24522
|
} else
|
|
24523
24523
|
this.flagsContainer.appendChild(this.dropdownContent);
|
|
24524
24524
|
}
|
|
@@ -24541,7 +24541,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24541
24541
|
this._updateFlagFromNumber(r);
|
|
24542
24542
|
else if (h !== "auto" || t) {
|
|
24543
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,
|
|
24544
|
+
I ? this._setFlag(f) : s && l ? this._setFlag("us") : v && !r ? (this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2, this._setFlag(this.defaultCountry)) : this._setFlag(), !r && y && (this.telInput.value = "+".concat(this.selectedCountryData.dialCode));
|
|
24545
24545
|
}
|
|
24546
24546
|
r && this._updateValFromNumber(r);
|
|
24547
24547
|
} }, { key: "_initListeners", value: function() {
|
|
@@ -24903,7 +24903,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24903
24903
|
z(a);
|
|
24904
24904
|
}
|
|
24905
24905
|
return null;
|
|
24906
|
-
}, S.defaults = K, S.version = "19.5.
|
|
24906
|
+
}, S.defaults = K, S.version = "19.5.4", function(a, n) {
|
|
24907
24907
|
var t = new Z(a, n);
|
|
24908
24908
|
return t._init(), a.setAttribute("data-intl-tel-input-id", t.id), window.intlTelInputGlobals.instances[t.id] = t, t;
|
|
24909
24909
|
};
|
|
@@ -24304,9 +24304,9 @@ var rt = (c, p, g, m) => {
|
|
|
24304
24304
|
return c;
|
|
24305
24305
|
};
|
|
24306
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,
|
|
24307
|
+
var H = ot((dt, N) => {
|
|
24308
24308
|
(function(c) {
|
|
24309
|
-
typeof
|
|
24309
|
+
typeof N == "object" && N.exports ? N.exports = c() : window.intlTelInput = c();
|
|
24310
24310
|
})(function(c) {
|
|
24311
24311
|
"use strict";
|
|
24312
24312
|
return function() {
|
|
@@ -24513,12 +24513,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24513
24513
|
var f = this._createEl("div", { class: v });
|
|
24514
24514
|
this.telInput.parentNode.insertBefore(f, this.telInput);
|
|
24515
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
|
|
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" }, 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) {
|
|
24520
|
-
var
|
|
24521
|
-
h ?
|
|
24520
|
+
var F = "iti iti--container";
|
|
24521
|
+
h ? F += " iti--fullscreen-popup" : F += " iti--inline-dropdown", y && (F += " iti--country-search"), this.dropdown = this._createEl("div", { class: F }), this.dropdown.appendChild(this.dropdownContent);
|
|
24522
24522
|
} else
|
|
24523
24523
|
this.flagsContainer.appendChild(this.dropdownContent);
|
|
24524
24524
|
}
|
|
@@ -24541,7 +24541,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24541
24541
|
this._updateFlagFromNumber(r);
|
|
24542
24542
|
else if (h !== "auto" || t) {
|
|
24543
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,
|
|
24544
|
+
I ? this._setFlag(f) : s && l ? this._setFlag("us") : v && !r ? (this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2, this._setFlag(this.defaultCountry)) : this._setFlag(), !r && y && (this.telInput.value = "+".concat(this.selectedCountryData.dialCode));
|
|
24545
24545
|
}
|
|
24546
24546
|
r && this._updateValFromNumber(r);
|
|
24547
24547
|
} }, { key: "_initListeners", value: function() {
|
|
@@ -24903,7 +24903,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24903
24903
|
z(a);
|
|
24904
24904
|
}
|
|
24905
24905
|
return null;
|
|
24906
|
-
}, S.defaults = K, S.version = "19.5.
|
|
24906
|
+
}, S.defaults = K, S.version = "19.5.4", function(a, n) {
|
|
24907
24907
|
var t = new Z(a, n);
|
|
24908
24908
|
return t._init(), a.setAttribute("data-intl-tel-input-id", t.id), window.intlTelInputGlobals.instances[t.id] = t, t;
|
|
24909
24909
|
};
|
package/src/js/intlTelInput.js
CHANGED
|
@@ -436,7 +436,7 @@ class Iti {
|
|
|
436
436
|
if (showFlags) {
|
|
437
437
|
this.selectedFlagInner = this._createEl(
|
|
438
438
|
"div",
|
|
439
|
-
{ class: "iti__flag
|
|
439
|
+
{ class: "iti__flag" },
|
|
440
440
|
this.selectedFlag
|
|
441
441
|
);
|
|
442
442
|
}
|
|
@@ -631,14 +631,15 @@ class Iti {
|
|
|
631
631
|
if (dialCode && isRegionlessNanp) {
|
|
632
632
|
// has intl dial code, is regionless nanp, and no initialCountry, so default to US
|
|
633
633
|
this._setFlag("us");
|
|
634
|
-
} else if (defaultToFirstCountry) {
|
|
634
|
+
} else if (defaultToFirstCountry && !val) {
|
|
635
635
|
// no dial code and no initialCountry, so default to first in list
|
|
636
636
|
this.defaultCountry = this.preferredCountries.length
|
|
637
637
|
? this.preferredCountries[0].iso2
|
|
638
638
|
: this.countries[0].iso2;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
639
|
+
this._setFlag(this.defaultCountry);
|
|
640
|
+
} else {
|
|
641
|
+
// display the empty state (globe icon)
|
|
642
|
+
this._setFlag();
|
|
642
643
|
}
|
|
643
644
|
}
|
|
644
645
|
|