intl-tel-input 25.4.4 → 25.4.7
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 +5 -5
- package/angular/build/IntlTelInput.cjs +5 -3
- package/angular/build/IntlTelInput.d.ts +374 -4
- package/angular/build/IntlTelInput.js +5 -3
- package/angular/build/IntlTelInputWithUtils.cjs +5 -3
- package/angular/build/IntlTelInputWithUtils.js +5 -3
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +5 -2
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +5 -2
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +3 -2
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +4 -1
- package/react/build/IntlTelInput.js +4 -1
- package/react/build/IntlTelInputWithUtils.cjs +4 -1
- package/react/build/IntlTelInputWithUtils.js +4 -1
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +2 -2
- package/vue/build/IntlTelInputWithUtils.mjs +20 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intl-tel-input",
|
|
3
|
-
"version": "25.4.
|
|
3
|
+
"version": "25.4.7",
|
|
4
4
|
"description": "A JavaScript plugin for entering and validating international telephone numbers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"international",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"author": "Jack O'Connor (http://jackocnr.com)",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@angular/compiler": "^19.
|
|
30
|
+
"@angular/compiler": "^19.2.14",
|
|
31
|
+
"@angular/compiler-cli": "^19.2.14",
|
|
31
32
|
"@angular/core": "^19.1.4",
|
|
32
33
|
"@angular/forms": "^19.1.4",
|
|
33
34
|
"@angular/platform-browser": "^19.1.4",
|
package/react/README.md
CHANGED
|
@@ -28,7 +28,7 @@ import "intl-tel-input/styles";
|
|
|
28
28
|
|
|
29
29
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/validation/ValidationApp.tsx) for a more fleshed-out example of how to handle validation.
|
|
30
30
|
|
|
31
|
-
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.
|
|
31
|
+
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.7/build/js/utils.js"`.
|
|
32
32
|
|
|
33
33
|
## Props
|
|
34
34
|
Here's a list of all of the current props you can pass to the IntlTelInput React component.
|
|
@@ -2056,6 +2056,9 @@ var Iti = class {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
if (dropdownContainer) {
|
|
2058
2058
|
let dropdownClasses = "iti iti--container";
|
|
2059
|
+
if (containerClass) {
|
|
2060
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2061
|
+
}
|
|
2059
2062
|
if (useFullscreenPopup) {
|
|
2060
2063
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2061
2064
|
} else {
|
|
@@ -3170,7 +3173,7 @@ var intlTelInput = Object.assign(
|
|
|
3170
3173
|
attachUtils,
|
|
3171
3174
|
startedLoadingUtilsScript: false,
|
|
3172
3175
|
startedLoadingAutoCountry: false,
|
|
3173
|
-
version: "25.4.
|
|
3176
|
+
version: "25.4.7"
|
|
3174
3177
|
}
|
|
3175
3178
|
);
|
|
3176
3179
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2020,6 +2020,9 @@ var Iti = class {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
if (dropdownContainer) {
|
|
2022
2022
|
let dropdownClasses = "iti iti--container";
|
|
2023
|
+
if (containerClass) {
|
|
2024
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2025
|
+
}
|
|
2023
2026
|
if (useFullscreenPopup) {
|
|
2024
2027
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2025
2028
|
} else {
|
|
@@ -3134,7 +3137,7 @@ var intlTelInput = Object.assign(
|
|
|
3134
3137
|
attachUtils,
|
|
3135
3138
|
startedLoadingUtilsScript: false,
|
|
3136
3139
|
startedLoadingAutoCountry: false,
|
|
3137
|
-
version: "25.4.
|
|
3140
|
+
version: "25.4.7"
|
|
3138
3141
|
}
|
|
3139
3142
|
);
|
|
3140
3143
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2056,6 +2056,9 @@ var Iti = class {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
if (dropdownContainer) {
|
|
2058
2058
|
let dropdownClasses = "iti iti--container";
|
|
2059
|
+
if (containerClass) {
|
|
2060
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2061
|
+
}
|
|
2059
2062
|
if (useFullscreenPopup) {
|
|
2060
2063
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2061
2064
|
} else {
|
|
@@ -3170,7 +3173,7 @@ var intlTelInput = Object.assign(
|
|
|
3170
3173
|
attachUtils,
|
|
3171
3174
|
startedLoadingUtilsScript: false,
|
|
3172
3175
|
startedLoadingAutoCountry: false,
|
|
3173
|
-
version: "25.4.
|
|
3176
|
+
version: "25.4.7"
|
|
3174
3177
|
}
|
|
3175
3178
|
);
|
|
3176
3179
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2020,6 +2020,9 @@ var Iti = class {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
if (dropdownContainer) {
|
|
2022
2022
|
let dropdownClasses = "iti iti--container";
|
|
2023
|
+
if (containerClass) {
|
|
2024
|
+
dropdownClasses += ` ${containerClass}`;
|
|
2025
|
+
}
|
|
2023
2026
|
if (useFullscreenPopup) {
|
|
2024
2027
|
dropdownClasses += " iti--fullscreen-popup";
|
|
2025
2028
|
} else {
|
|
@@ -3134,7 +3137,7 @@ var intlTelInput = Object.assign(
|
|
|
3134
3137
|
attachUtils,
|
|
3135
3138
|
startedLoadingUtilsScript: false,
|
|
3136
3139
|
startedLoadingAutoCountry: false,
|
|
3137
|
-
version: "25.4.
|
|
3140
|
+
version: "25.4.7"
|
|
3138
3141
|
}
|
|
3139
3142
|
);
|
|
3140
3143
|
var intl_tel_input_default = intlTelInput;
|
package/vue/README.md
CHANGED
|
@@ -34,7 +34,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master
|
|
|
34
34
|
"vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js"
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.
|
|
37
|
+
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.4.7/build/js/utils.js"`.
|
|
38
38
|
|
|
39
39
|
## Props
|
|
40
40
|
Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
|
|
@@ -1873,7 +1873,7 @@ class G {
|
|
|
1873
1873
|
this.dropdownContent
|
|
1874
1874
|
), this._appendListItems(), c && this._updateSearchResultsText(), o) {
|
|
1875
1875
|
let g = "iti iti--container";
|
|
1876
|
-
a ? g += " iti--fullscreen-popup" : g += " iti--inline-dropdown", this.dropdown = y("div", { class: g }), this.dropdown.appendChild(this.dropdownContent);
|
|
1876
|
+
s && (g += ` ${s}`), a ? g += " iti--fullscreen-popup" : g += " iti--inline-dropdown", this.dropdown = y("div", { class: g }), this.dropdown.appendChild(this.dropdownContent);
|
|
1877
1877
|
} else
|
|
1878
1878
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1879
1879
|
}
|
|
@@ -2530,7 +2530,7 @@ const W = (u) => {
|
|
|
2530
2530
|
attachUtils: W,
|
|
2531
2531
|
startedLoadingUtilsScript: !1,
|
|
2532
2532
|
startedLoadingAutoCountry: !1,
|
|
2533
|
-
version: "25.4.
|
|
2533
|
+
version: "25.4.7"
|
|
2534
2534
|
}
|
|
2535
2535
|
), J = {
|
|
2536
2536
|
__name: "IntlTelInput",
|
|
@@ -1872,8 +1872,8 @@ class j2 {
|
|
|
1872
1872
|
},
|
|
1873
1873
|
this.dropdownContent
|
|
1874
1874
|
), this._appendListItems(), S && this._updateSearchResultsText(), c) {
|
|
1875
|
-
let
|
|
1876
|
-
f ?
|
|
1875
|
+
let P = "iti iti--container";
|
|
1876
|
+
o && (P += ` ${o}`), f ? P += " iti--fullscreen-popup" : P += " iti--inline-dropdown", this.dropdown = T("div", { class: P }), this.dropdown.appendChild(this.dropdownContent);
|
|
1877
1877
|
} else
|
|
1878
1878
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1879
1879
|
}
|
|
@@ -1881,15 +1881,15 @@ class j2 {
|
|
|
1881
1881
|
if (w.appendChild(this.telInput), this._updateInputPadding(), a) {
|
|
1882
1882
|
const F = this.telInput.getAttribute("name") || "", M = a(F);
|
|
1883
1883
|
if (M.phone) {
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1884
|
+
const P = (A = this.telInput.form) == null ? void 0 : A.querySelector(`input[name="${M.phone}"]`);
|
|
1885
|
+
P ? this.hiddenInput = P : (this.hiddenInput = T("input", {
|
|
1886
1886
|
type: "hidden",
|
|
1887
1887
|
name: M.phone
|
|
1888
1888
|
}), w.appendChild(this.hiddenInput));
|
|
1889
1889
|
}
|
|
1890
1890
|
if (M.country) {
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1891
|
+
const P = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${M.country}"]`);
|
|
1892
|
+
P ? this.hiddenInputCountry = P : (this.hiddenInputCountry = T("input", {
|
|
1893
1893
|
type: "hidden",
|
|
1894
1894
|
name: M.country
|
|
1895
1895
|
}), w.appendChild(this.hiddenInputCountry));
|
|
@@ -2009,12 +2009,12 @@ class j2 {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
if (e) {
|
|
2011
2011
|
const S = this.telInput.value, _ = S.charAt(0) === "+", b = !_ && this.telInput.selectionStart === 0 && f.key === "+", w = /^[0-9]$/.test(f.key), I = s ? w : b || w, A = S.slice(0, this.telInput.selectionStart) + f.key + S.slice(this.telInput.selectionEnd), G = this._getFullNumber(A), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
|
|
2012
|
-
let
|
|
2012
|
+
let P = !1;
|
|
2013
2013
|
if (_) {
|
|
2014
2014
|
const f1 = this.selectedCountryData.iso2;
|
|
2015
|
-
|
|
2015
|
+
P = this._getCountryFromNumber(G) !== f1;
|
|
2016
2016
|
}
|
|
2017
|
-
(!I || M && !
|
|
2017
|
+
(!I || M && !P && !b) && f.preventDefault();
|
|
2018
2018
|
}
|
|
2019
2019
|
}
|
|
2020
2020
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2530,7 +2530,7 @@ const W2 = (y) => {
|
|
|
2530
2530
|
attachUtils: W2,
|
|
2531
2531
|
startedLoadingUtilsScript: !1,
|
|
2532
2532
|
startedLoadingAutoCountry: !1,
|
|
2533
|
-
version: "25.4.
|
|
2533
|
+
version: "25.4.7"
|
|
2534
2534
|
}
|
|
2535
2535
|
);
|
|
2536
2536
|
(function() {
|
|
@@ -2602,7 +2602,7 @@ const W2 = (y) => {
|
|
|
2602
2602
|
case G:
|
|
2603
2603
|
case F:
|
|
2604
2604
|
case M:
|
|
2605
|
-
case
|
|
2605
|
+
case P:
|
|
2606
2606
|
case f1:
|
|
2607
2607
|
case A:
|
|
2608
2608
|
case I:
|
|
@@ -2610,7 +2610,7 @@ const W2 = (y) => {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
this.j = t.defaultValue;
|
|
2612
2612
|
}
|
|
2613
|
-
var I = 1, A = 2, G = 3, F = 4, M = 6,
|
|
2613
|
+
var I = 1, A = 2, G = 3, F = 4, M = 6, P = 16, f1 = 18;
|
|
2614
2614
|
function v1(d, t) {
|
|
2615
2615
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2616
2616
|
var $ = t[d];
|
|
@@ -2641,7 +2641,7 @@ const W2 = (y) => {
|
|
|
2641
2641
|
d.g && delete d.g[r.g];
|
|
2642
2642
|
var l = r.h == 11 || r.h == 10;
|
|
2643
2643
|
if (r.l) {
|
|
2644
|
-
r =
|
|
2644
|
+
r = x(t, u);
|
|
2645
2645
|
for (var h = 0; h < r.length; h++) w1(d, u, l ? r[h].clone() : r[h]);
|
|
2646
2646
|
} else r = n1(t, u), l ? (l = n1(d, u)) ? S1(l, r) : E(d, u, r.clone()) : E(d, u, r);
|
|
2647
2647
|
}
|
|
@@ -2688,7 +2688,7 @@ const W2 = (y) => {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
return d;
|
|
2690
2690
|
}
|
|
2691
|
-
function
|
|
2691
|
+
function x(d, t) {
|
|
2692
2692
|
return n1(d, t) || [];
|
|
2693
2693
|
}
|
|
2694
2694
|
function K(d, t) {
|
|
@@ -8269,7 +8269,7 @@ const W2 = (y) => {
|
|
|
8269
8269
|
k(d), d.g(t);
|
|
8270
8270
|
}
|
|
8271
8271
|
function k1(d) {
|
|
8272
|
-
return d != null && (K(d, 9) != 1 ||
|
|
8272
|
+
return d != null && (K(d, 9) != 1 || x(d, 9)[0] != -1);
|
|
8273
8273
|
}
|
|
8274
8274
|
function r1(d, t) {
|
|
8275
8275
|
for (var $ = new N(), i, r = d.length, u = 0; u < r; ++u) i = d.charAt(u), i = t[i.toUpperCase()], i != null && $.g(i);
|
|
@@ -8293,7 +8293,7 @@ const W2 = (y) => {
|
|
|
8293
8293
|
var r = d1(this, $, e1($));
|
|
8294
8294
|
d = B(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : B(r, 13) ? p(r, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
|
|
8295
8295
|
d: {
|
|
8296
|
-
r =
|
|
8296
|
+
r = x(r, 20).length == 0 || t == 2 ? x(r, 19) : x(r, 20);
|
|
8297
8297
|
for (var u, l = r.length, h = 0; h < l; ++h) {
|
|
8298
8298
|
u = r[h];
|
|
8299
8299
|
var m = K(u, 3);
|
|
@@ -8375,7 +8375,7 @@ const W2 = (y) => {
|
|
|
8375
8375
|
}
|
|
8376
8376
|
function O(d, t) {
|
|
8377
8377
|
var $ = d.length;
|
|
8378
|
-
return 0 < K(t, 9) &&
|
|
8378
|
+
return 0 < K(t, 9) && x(t, 9).indexOf($) == -1 ? !1 : U(v(t, 2), d);
|
|
8379
8379
|
}
|
|
8380
8380
|
function N2(d, t) {
|
|
8381
8381
|
var $ = U1(d, t), i = v(t, 1), r = d1(d, i, $);
|
|
@@ -8413,8 +8413,8 @@ const W2 = (y) => {
|
|
|
8413
8413
|
return v(d, 10);
|
|
8414
8414
|
}
|
|
8415
8415
|
function l1(d, t, $, i) {
|
|
8416
|
-
var r = u1($, i), u = K(r, 9) == 0 ?
|
|
8417
|
-
if (r =
|
|
8416
|
+
var r = u1($, i), u = K(r, 9) == 0 ? x(p($, 1), 9) : x(r, 9);
|
|
8417
|
+
if (r = x(r, 10), i == 2) if (k1(u1($, 0))) d = u1($, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? x(p($, 1), 9) : x(d, 9)), u.sort(), r.length == 0 ? r = x(d, 10) : (r = r.concat(x(d, 10)), r.sort()));
|
|
8418
8418
|
else return l1(d, t, $, 1);
|
|
8419
8419
|
return u[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
|
|
8420
8420
|
}
|
|
@@ -8582,7 +8582,7 @@ const W2 = (y) => {
|
|
|
8582
8582
|
function m1(d) {
|
|
8583
8583
|
var t = d.g.toString();
|
|
8584
8584
|
if (3 <= t.length) {
|
|
8585
|
-
for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ?
|
|
8585
|
+
for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? x(d.l, 20) : x(d.l, 19), i = $.length, r = 0; r < i; ++r) {
|
|
8586
8586
|
var u = $[r];
|
|
8587
8587
|
0 < d.o.length && O1(v(u, 4)) && !p(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(v(u, 4)) || p(u, 6)) && A2.test(v(u, 2)) && d.j.push(u);
|
|
8588
8588
|
}
|