intl-tel-input 25.10.8 → 25.10.10
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 +9 -8
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +11 -8
- package/angular/build/IntlTelInputWithUtils.js +11 -8
- package/angular/build/types/intl-tel-input.d.ts +1 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +1 -0
- package/build/js/intlTelInput.js +12 -9
- package/build/js/intlTelInput.min.js +3 -3
- package/build/js/intlTelInputWithUtils.js +12 -9
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +11 -8
- package/react/build/IntlTelInput.d.ts +1 -0
- package/react/build/IntlTelInput.js +11 -8
- package/react/build/IntlTelInputWithUtils.cjs +11 -8
- package/react/build/IntlTelInputWithUtils.js +11 -8
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +17 -15
- package/vue/build/IntlTelInputWithUtils.mjs +10 -8
package/package.json
CHANGED
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.10.
|
|
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.10.10/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.
|
|
@@ -2372,14 +2372,16 @@ var Iti = class _Iti {
|
|
|
2372
2372
|
_initRequests() {
|
|
2373
2373
|
let { loadUtils, initialCountry, geoIpLookup } = this.options;
|
|
2374
2374
|
if (loadUtils && !intlTelInput.utils) {
|
|
2375
|
-
this.
|
|
2376
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
2375
|
+
this._doAttachUtils = () => {
|
|
2377
2376
|
intlTelInput.attachUtils(loadUtils)?.catch(() => {
|
|
2378
2377
|
});
|
|
2379
2378
|
};
|
|
2380
2379
|
if (intlTelInput.documentReady()) {
|
|
2381
|
-
this.
|
|
2380
|
+
this._doAttachUtils();
|
|
2382
2381
|
} else {
|
|
2382
|
+
this._handlePageLoad = () => {
|
|
2383
|
+
this._doAttachUtils();
|
|
2384
|
+
};
|
|
2383
2385
|
window.addEventListener("load", this._handlePageLoad);
|
|
2384
2386
|
}
|
|
2385
2387
|
} else {
|
|
@@ -3044,6 +3046,7 @@ var Iti = class _Iti {
|
|
|
3044
3046
|
this.searchInput.removeEventListener("input", this._handleSearchChange);
|
|
3045
3047
|
this.searchClearButton.removeEventListener("click", this._handleSearchClear);
|
|
3046
3048
|
}
|
|
3049
|
+
document.removeEventListener("keydown", this._handleKeydownOnDropdown);
|
|
3047
3050
|
document.documentElement.removeEventListener(
|
|
3048
3051
|
"click",
|
|
3049
3052
|
this._handleClickOffToClose
|
|
@@ -3061,9 +3064,6 @@ var Iti = class _Iti {
|
|
|
3061
3064
|
this.dropdown.parentNode.removeChild(this.dropdown);
|
|
3062
3065
|
}
|
|
3063
3066
|
}
|
|
3064
|
-
if (this._handlePageLoad) {
|
|
3065
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
3066
|
-
}
|
|
3067
3067
|
this._trigger("close:countrydropdown");
|
|
3068
3068
|
}
|
|
3069
3069
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
@@ -3108,7 +3108,7 @@ var Iti = class _Iti {
|
|
|
3108
3108
|
let numericChars = "";
|
|
3109
3109
|
for (let i = 0; i < number.length; i++) {
|
|
3110
3110
|
const c = number.charAt(i);
|
|
3111
|
-
if (
|
|
3111
|
+
if (/[0-9]/.test(c)) {
|
|
3112
3112
|
numericChars += c;
|
|
3113
3113
|
if (includeAreaCode) {
|
|
3114
3114
|
if (this.dialCodeToIso2Map[numericChars]) {
|
|
@@ -3216,6 +3216,9 @@ var Iti = class _Iti {
|
|
|
3216
3216
|
if (this._handlePasteEvent) {
|
|
3217
3217
|
this.telInput.removeEventListener("paste", this._handlePasteEvent);
|
|
3218
3218
|
}
|
|
3219
|
+
if (this._handlePageLoad) {
|
|
3220
|
+
window.removeEventListener("load", this._handlePageLoad);
|
|
3221
|
+
}
|
|
3219
3222
|
this.telInput.removeAttribute("data-intl-tel-input-id");
|
|
3220
3223
|
if (separateDialCode) {
|
|
3221
3224
|
if (this.isRTL) {
|
|
@@ -3397,7 +3400,7 @@ var intlTelInput = Object.assign(
|
|
|
3397
3400
|
attachUtils,
|
|
3398
3401
|
startedLoadingUtilsScript: false,
|
|
3399
3402
|
startedLoadingAutoCountry: false,
|
|
3400
|
-
version: "25.10.
|
|
3403
|
+
version: "25.10.10"
|
|
3401
3404
|
}
|
|
3402
3405
|
);
|
|
3403
3406
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -227,6 +227,7 @@ declare module "intl-tel-input" {
|
|
|
227
227
|
private _handleSearchChange;
|
|
228
228
|
private _handleSearchClear;
|
|
229
229
|
private _handlePageLoad;
|
|
230
|
+
private _doAttachUtils;
|
|
230
231
|
private resolveAutoCountryPromise;
|
|
231
232
|
private rejectAutoCountryPromise;
|
|
232
233
|
private resolveUtilsScriptPromise;
|
|
@@ -2336,14 +2336,16 @@ var Iti = class _Iti {
|
|
|
2336
2336
|
_initRequests() {
|
|
2337
2337
|
let { loadUtils, initialCountry, geoIpLookup } = this.options;
|
|
2338
2338
|
if (loadUtils && !intlTelInput.utils) {
|
|
2339
|
-
this.
|
|
2340
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
2339
|
+
this._doAttachUtils = () => {
|
|
2341
2340
|
intlTelInput.attachUtils(loadUtils)?.catch(() => {
|
|
2342
2341
|
});
|
|
2343
2342
|
};
|
|
2344
2343
|
if (intlTelInput.documentReady()) {
|
|
2345
|
-
this.
|
|
2344
|
+
this._doAttachUtils();
|
|
2346
2345
|
} else {
|
|
2346
|
+
this._handlePageLoad = () => {
|
|
2347
|
+
this._doAttachUtils();
|
|
2348
|
+
};
|
|
2347
2349
|
window.addEventListener("load", this._handlePageLoad);
|
|
2348
2350
|
}
|
|
2349
2351
|
} else {
|
|
@@ -3008,6 +3010,7 @@ var Iti = class _Iti {
|
|
|
3008
3010
|
this.searchInput.removeEventListener("input", this._handleSearchChange);
|
|
3009
3011
|
this.searchClearButton.removeEventListener("click", this._handleSearchClear);
|
|
3010
3012
|
}
|
|
3013
|
+
document.removeEventListener("keydown", this._handleKeydownOnDropdown);
|
|
3011
3014
|
document.documentElement.removeEventListener(
|
|
3012
3015
|
"click",
|
|
3013
3016
|
this._handleClickOffToClose
|
|
@@ -3025,9 +3028,6 @@ var Iti = class _Iti {
|
|
|
3025
3028
|
this.dropdown.parentNode.removeChild(this.dropdown);
|
|
3026
3029
|
}
|
|
3027
3030
|
}
|
|
3028
|
-
if (this._handlePageLoad) {
|
|
3029
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
3030
|
-
}
|
|
3031
3031
|
this._trigger("close:countrydropdown");
|
|
3032
3032
|
}
|
|
3033
3033
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
@@ -3072,7 +3072,7 @@ var Iti = class _Iti {
|
|
|
3072
3072
|
let numericChars = "";
|
|
3073
3073
|
for (let i = 0; i < number.length; i++) {
|
|
3074
3074
|
const c = number.charAt(i);
|
|
3075
|
-
if (
|
|
3075
|
+
if (/[0-9]/.test(c)) {
|
|
3076
3076
|
numericChars += c;
|
|
3077
3077
|
if (includeAreaCode) {
|
|
3078
3078
|
if (this.dialCodeToIso2Map[numericChars]) {
|
|
@@ -3180,6 +3180,9 @@ var Iti = class _Iti {
|
|
|
3180
3180
|
if (this._handlePasteEvent) {
|
|
3181
3181
|
this.telInput.removeEventListener("paste", this._handlePasteEvent);
|
|
3182
3182
|
}
|
|
3183
|
+
if (this._handlePageLoad) {
|
|
3184
|
+
window.removeEventListener("load", this._handlePageLoad);
|
|
3185
|
+
}
|
|
3183
3186
|
this.telInput.removeAttribute("data-intl-tel-input-id");
|
|
3184
3187
|
if (separateDialCode) {
|
|
3185
3188
|
if (this.isRTL) {
|
|
@@ -3361,7 +3364,7 @@ var intlTelInput = Object.assign(
|
|
|
3361
3364
|
attachUtils,
|
|
3362
3365
|
startedLoadingUtilsScript: false,
|
|
3363
3366
|
startedLoadingAutoCountry: false,
|
|
3364
|
-
version: "25.10.
|
|
3367
|
+
version: "25.10.10"
|
|
3365
3368
|
}
|
|
3366
3369
|
);
|
|
3367
3370
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2372,14 +2372,16 @@ var Iti = class _Iti {
|
|
|
2372
2372
|
_initRequests() {
|
|
2373
2373
|
let { loadUtils, initialCountry, geoIpLookup } = this.options;
|
|
2374
2374
|
if (loadUtils && !intlTelInput.utils) {
|
|
2375
|
-
this.
|
|
2376
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
2375
|
+
this._doAttachUtils = () => {
|
|
2377
2376
|
intlTelInput.attachUtils(loadUtils)?.catch(() => {
|
|
2378
2377
|
});
|
|
2379
2378
|
};
|
|
2380
2379
|
if (intlTelInput.documentReady()) {
|
|
2381
|
-
this.
|
|
2380
|
+
this._doAttachUtils();
|
|
2382
2381
|
} else {
|
|
2382
|
+
this._handlePageLoad = () => {
|
|
2383
|
+
this._doAttachUtils();
|
|
2384
|
+
};
|
|
2383
2385
|
window.addEventListener("load", this._handlePageLoad);
|
|
2384
2386
|
}
|
|
2385
2387
|
} else {
|
|
@@ -3044,6 +3046,7 @@ var Iti = class _Iti {
|
|
|
3044
3046
|
this.searchInput.removeEventListener("input", this._handleSearchChange);
|
|
3045
3047
|
this.searchClearButton.removeEventListener("click", this._handleSearchClear);
|
|
3046
3048
|
}
|
|
3049
|
+
document.removeEventListener("keydown", this._handleKeydownOnDropdown);
|
|
3047
3050
|
document.documentElement.removeEventListener(
|
|
3048
3051
|
"click",
|
|
3049
3052
|
this._handleClickOffToClose
|
|
@@ -3061,9 +3064,6 @@ var Iti = class _Iti {
|
|
|
3061
3064
|
this.dropdown.parentNode.removeChild(this.dropdown);
|
|
3062
3065
|
}
|
|
3063
3066
|
}
|
|
3064
|
-
if (this._handlePageLoad) {
|
|
3065
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
3066
|
-
}
|
|
3067
3067
|
this._trigger("close:countrydropdown");
|
|
3068
3068
|
}
|
|
3069
3069
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
@@ -3108,7 +3108,7 @@ var Iti = class _Iti {
|
|
|
3108
3108
|
let numericChars = "";
|
|
3109
3109
|
for (let i = 0; i < number.length; i++) {
|
|
3110
3110
|
const c = number.charAt(i);
|
|
3111
|
-
if (
|
|
3111
|
+
if (/[0-9]/.test(c)) {
|
|
3112
3112
|
numericChars += c;
|
|
3113
3113
|
if (includeAreaCode) {
|
|
3114
3114
|
if (this.dialCodeToIso2Map[numericChars]) {
|
|
@@ -3216,6 +3216,9 @@ var Iti = class _Iti {
|
|
|
3216
3216
|
if (this._handlePasteEvent) {
|
|
3217
3217
|
this.telInput.removeEventListener("paste", this._handlePasteEvent);
|
|
3218
3218
|
}
|
|
3219
|
+
if (this._handlePageLoad) {
|
|
3220
|
+
window.removeEventListener("load", this._handlePageLoad);
|
|
3221
|
+
}
|
|
3219
3222
|
this.telInput.removeAttribute("data-intl-tel-input-id");
|
|
3220
3223
|
if (separateDialCode) {
|
|
3221
3224
|
if (this.isRTL) {
|
|
@@ -3397,7 +3400,7 @@ var intlTelInput = Object.assign(
|
|
|
3397
3400
|
attachUtils,
|
|
3398
3401
|
startedLoadingUtilsScript: false,
|
|
3399
3402
|
startedLoadingAutoCountry: false,
|
|
3400
|
-
version: "25.10.
|
|
3403
|
+
version: "25.10.10"
|
|
3401
3404
|
}
|
|
3402
3405
|
);
|
|
3403
3406
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2336,14 +2336,16 @@ var Iti = class _Iti {
|
|
|
2336
2336
|
_initRequests() {
|
|
2337
2337
|
let { loadUtils, initialCountry, geoIpLookup } = this.options;
|
|
2338
2338
|
if (loadUtils && !intlTelInput.utils) {
|
|
2339
|
-
this.
|
|
2340
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
2339
|
+
this._doAttachUtils = () => {
|
|
2341
2340
|
intlTelInput.attachUtils(loadUtils)?.catch(() => {
|
|
2342
2341
|
});
|
|
2343
2342
|
};
|
|
2344
2343
|
if (intlTelInput.documentReady()) {
|
|
2345
|
-
this.
|
|
2344
|
+
this._doAttachUtils();
|
|
2346
2345
|
} else {
|
|
2346
|
+
this._handlePageLoad = () => {
|
|
2347
|
+
this._doAttachUtils();
|
|
2348
|
+
};
|
|
2347
2349
|
window.addEventListener("load", this._handlePageLoad);
|
|
2348
2350
|
}
|
|
2349
2351
|
} else {
|
|
@@ -3008,6 +3010,7 @@ var Iti = class _Iti {
|
|
|
3008
3010
|
this.searchInput.removeEventListener("input", this._handleSearchChange);
|
|
3009
3011
|
this.searchClearButton.removeEventListener("click", this._handleSearchClear);
|
|
3010
3012
|
}
|
|
3013
|
+
document.removeEventListener("keydown", this._handleKeydownOnDropdown);
|
|
3011
3014
|
document.documentElement.removeEventListener(
|
|
3012
3015
|
"click",
|
|
3013
3016
|
this._handleClickOffToClose
|
|
@@ -3025,9 +3028,6 @@ var Iti = class _Iti {
|
|
|
3025
3028
|
this.dropdown.parentNode.removeChild(this.dropdown);
|
|
3026
3029
|
}
|
|
3027
3030
|
}
|
|
3028
|
-
if (this._handlePageLoad) {
|
|
3029
|
-
window.removeEventListener("load", this._handlePageLoad);
|
|
3030
|
-
}
|
|
3031
3031
|
this._trigger("close:countrydropdown");
|
|
3032
3032
|
}
|
|
3033
3033
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
@@ -3072,7 +3072,7 @@ var Iti = class _Iti {
|
|
|
3072
3072
|
let numericChars = "";
|
|
3073
3073
|
for (let i = 0; i < number.length; i++) {
|
|
3074
3074
|
const c = number.charAt(i);
|
|
3075
|
-
if (
|
|
3075
|
+
if (/[0-9]/.test(c)) {
|
|
3076
3076
|
numericChars += c;
|
|
3077
3077
|
if (includeAreaCode) {
|
|
3078
3078
|
if (this.dialCodeToIso2Map[numericChars]) {
|
|
@@ -3180,6 +3180,9 @@ var Iti = class _Iti {
|
|
|
3180
3180
|
if (this._handlePasteEvent) {
|
|
3181
3181
|
this.telInput.removeEventListener("paste", this._handlePasteEvent);
|
|
3182
3182
|
}
|
|
3183
|
+
if (this._handlePageLoad) {
|
|
3184
|
+
window.removeEventListener("load", this._handlePageLoad);
|
|
3185
|
+
}
|
|
3183
3186
|
this.telInput.removeAttribute("data-intl-tel-input-id");
|
|
3184
3187
|
if (separateDialCode) {
|
|
3185
3188
|
if (this.isRTL) {
|
|
@@ -3361,7 +3364,7 @@ var intlTelInput = Object.assign(
|
|
|
3361
3364
|
attachUtils,
|
|
3362
3365
|
startedLoadingUtilsScript: false,
|
|
3363
3366
|
startedLoadingAutoCountry: false,
|
|
3364
|
-
version: "25.10.
|
|
3367
|
+
version: "25.10.10"
|
|
3365
3368
|
}
|
|
3366
3369
|
);
|
|
3367
3370
|
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.10.
|
|
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.10.10/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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mergeModels as S, useModel as E, ref as L, onMounted as M, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as z, openBlock as V, mergeProps as
|
|
2
|
-
const
|
|
1
|
+
import { mergeModels as S, useModel as E, ref as L, onMounted as M, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as z, openBlock as V, mergeProps as O, vModelText as $ } from "vue";
|
|
2
|
+
const U = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
5
5
|
// Afghanistan
|
|
@@ -1323,7 +1323,7 @@ const j = [
|
|
|
1323
1323
|
"263"
|
|
1324
1324
|
]
|
|
1325
1325
|
], _ = [];
|
|
1326
|
-
for (const r of
|
|
1326
|
+
for (const r of U)
|
|
1327
1327
|
_.push({
|
|
1328
1328
|
name: "",
|
|
1329
1329
|
// populated in the plugin
|
|
@@ -1335,7 +1335,7 @@ for (const r of j)
|
|
|
1335
1335
|
// populated by the plugin
|
|
1336
1336
|
nationalPrefix: r[4] || null
|
|
1337
1337
|
});
|
|
1338
|
-
const
|
|
1338
|
+
const j = {
|
|
1339
1339
|
ad: "Andorra",
|
|
1340
1340
|
ae: "United Arab Emirates",
|
|
1341
1341
|
af: "Afghanistan",
|
|
@@ -1590,7 +1590,7 @@ const U = {
|
|
|
1590
1590
|
// additional countries (not supported by country-list library)
|
|
1591
1591
|
ac: "Ascension Island",
|
|
1592
1592
|
xk: "Kosovo"
|
|
1593
|
-
}, k = { ...
|
|
1593
|
+
}, k = { ...j, ...H }, N = (r) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(r).matches, K = () => {
|
|
1594
1594
|
if (typeof navigator < "u" && typeof window < "u") {
|
|
1595
1595
|
const r = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), t = N("(max-width: 500px)"), e = N("(max-height: 600px)"), i = N("(pointer: coarse)");
|
|
1596
1596
|
return r || t || i && e;
|
|
@@ -2077,11 +2077,13 @@ class v {
|
|
|
2077
2077
|
//* Init many requests: utils script / geo ip lookup.
|
|
2078
2078
|
_initRequests() {
|
|
2079
2079
|
let { loadUtils: t, initialCountry: e, geoIpLookup: i } = this.options;
|
|
2080
|
-
t && !u.utils ? (this.
|
|
2080
|
+
t && !u.utils ? (this._doAttachUtils = () => {
|
|
2081
2081
|
var n;
|
|
2082
|
-
|
|
2082
|
+
(n = u.attachUtils(t)) == null || n.catch(() => {
|
|
2083
2083
|
});
|
|
2084
|
-
}, u.documentReady() ? this.
|
|
2084
|
+
}, u.documentReady() ? this._doAttachUtils() : (this._handlePageLoad = () => {
|
|
2085
|
+
this._doAttachUtils();
|
|
2086
|
+
}, window.addEventListener("load", this._handlePageLoad))) : this.resolveUtilsScriptPromise(), e === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
|
|
2085
2087
|
}
|
|
2086
2088
|
//* Perform the geo ip lookup.
|
|
2087
2089
|
_loadAutoCountry() {
|
|
@@ -2443,13 +2445,13 @@ class v {
|
|
|
2443
2445
|
}
|
|
2444
2446
|
//* Close the dropdown and unbind any listeners.
|
|
2445
2447
|
_closeDropdown() {
|
|
2446
|
-
this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.documentElement.removeEventListener(
|
|
2448
|
+
this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.removeEventListener("keydown", this._handleKeydownOnDropdown), document.documentElement.removeEventListener(
|
|
2447
2449
|
"click",
|
|
2448
2450
|
this._handleClickOffToClose
|
|
2449
2451
|
), this.countryList.removeEventListener(
|
|
2450
2452
|
"mouseover",
|
|
2451
2453
|
this._handleMouseoverCountryList
|
|
2452
|
-
), 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.
|
|
2454
|
+
), 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");
|
|
2453
2455
|
}
|
|
2454
2456
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2455
2457
|
_scrollTo(t) {
|
|
@@ -2479,7 +2481,7 @@ class v {
|
|
|
2479
2481
|
let s = "";
|
|
2480
2482
|
for (let n = 0; n < t.length; n++) {
|
|
2481
2483
|
const o = t.charAt(n);
|
|
2482
|
-
if (
|
|
2484
|
+
if (/[0-9]/.test(o)) {
|
|
2483
2485
|
if (s += o, e)
|
|
2484
2486
|
this.dialCodeToIso2Map[s] && (i = t.substring(0, n + 1));
|
|
2485
2487
|
else if (this.dialCodes.has(s)) {
|
|
@@ -2545,7 +2547,7 @@ class v {
|
|
|
2545
2547
|
a && a.removeEventListener("click", this._handleLabelClick);
|
|
2546
2548
|
}
|
|
2547
2549
|
const { form: i } = this.telInput;
|
|
2548
|
-
this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), e && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2550
|
+
this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this.telInput.removeAttribute("data-intl-tel-input-id"), e && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2549
2551
|
const s = this.telInput.parentNode;
|
|
2550
2552
|
(n = s == null ? void 0 : s.parentNode) == null || n.insertBefore(this.telInput, s), (o = s == null ? void 0 : s.parentNode) == null || o.removeChild(s), delete u.instances[this.id];
|
|
2551
2553
|
}
|
|
@@ -2675,7 +2677,7 @@ const nt = (r) => {
|
|
|
2675
2677
|
attachUtils: nt,
|
|
2676
2678
|
startedLoadingUtilsScript: !1,
|
|
2677
2679
|
startedLoadingAutoCountry: !1,
|
|
2678
|
-
version: "25.10.
|
|
2680
|
+
version: "25.10.10"
|
|
2679
2681
|
}
|
|
2680
2682
|
), at = {
|
|
2681
2683
|
__name: "IntlTelInput",
|
|
@@ -2734,7 +2736,7 @@ const nt = (r) => {
|
|
|
2734
2736
|
), R(() => {
|
|
2735
2737
|
var c;
|
|
2736
2738
|
return (c = a.value) == null ? void 0 : c.destroy();
|
|
2737
|
-
}), t({ instance: a, input: o }), (c, C) => F((V(), z("input",
|
|
2739
|
+
}), t({ instance: a, input: o }), (c, C) => F((V(), z("input", O({
|
|
2738
2740
|
ref_key: "input",
|
|
2739
2741
|
ref: o,
|
|
2740
2742
|
"onUpdate:modelValue": C[0] || (C[0] = (y) => i.value = y),
|
|
@@ -2743,7 +2745,7 @@ const nt = (r) => {
|
|
|
2743
2745
|
onInput: p
|
|
2744
2746
|
}, r.inputProps), null, 16)), [
|
|
2745
2747
|
[
|
|
2746
|
-
|
|
2748
|
+
$,
|
|
2747
2749
|
i.value,
|
|
2748
2750
|
void 0,
|
|
2749
2751
|
{ lazy: !0 }
|
|
@@ -2077,11 +2077,13 @@ class c1 {
|
|
|
2077
2077
|
//* Init many requests: utils script / geo ip lookup.
|
|
2078
2078
|
_initRequests() {
|
|
2079
2079
|
let { loadUtils: e, initialCountry: $, geoIpLookup: i } = this.options;
|
|
2080
|
-
e && !y.utils ? (this.
|
|
2080
|
+
e && !y.utils ? (this._doAttachUtils = () => {
|
|
2081
2081
|
var u;
|
|
2082
|
-
|
|
2082
|
+
(u = y.attachUtils(e)) == null || u.catch(() => {
|
|
2083
2083
|
});
|
|
2084
|
-
}, y.documentReady() ? this.
|
|
2084
|
+
}, y.documentReady() ? this._doAttachUtils() : (this._handlePageLoad = () => {
|
|
2085
|
+
this._doAttachUtils();
|
|
2086
|
+
}, window.addEventListener("load", this._handlePageLoad))) : this.resolveUtilsScriptPromise(), $ === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
|
|
2085
2087
|
}
|
|
2086
2088
|
//* Perform the geo ip lookup.
|
|
2087
2089
|
_loadAutoCountry() {
|
|
@@ -2443,13 +2445,13 @@ class c1 {
|
|
|
2443
2445
|
}
|
|
2444
2446
|
//* Close the dropdown and unbind any listeners.
|
|
2445
2447
|
_closeDropdown() {
|
|
2446
|
-
this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.documentElement.removeEventListener(
|
|
2448
|
+
this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.removeEventListener("keydown", this._handleKeydownOnDropdown), document.documentElement.removeEventListener(
|
|
2447
2449
|
"click",
|
|
2448
2450
|
this._handleClickOffToClose
|
|
2449
2451
|
), this.countryList.removeEventListener(
|
|
2450
2452
|
"mouseover",
|
|
2451
2453
|
this._handleMouseoverCountryList
|
|
2452
|
-
), 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.
|
|
2454
|
+
), 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");
|
|
2453
2455
|
}
|
|
2454
2456
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2455
2457
|
_scrollTo(e) {
|
|
@@ -2479,7 +2481,7 @@ class c1 {
|
|
|
2479
2481
|
let s = "";
|
|
2480
2482
|
for (let u = 0; u < e.length; u++) {
|
|
2481
2483
|
const h = e.charAt(u);
|
|
2482
|
-
if (
|
|
2484
|
+
if (/[0-9]/.test(h)) {
|
|
2483
2485
|
if (s += h, $)
|
|
2484
2486
|
this.dialCodeToIso2Map[s] && (i = e.substring(0, u + 1));
|
|
2485
2487
|
else if (this.dialCodes.has(s)) {
|
|
@@ -2545,7 +2547,7 @@ class c1 {
|
|
|
2545
2547
|
c && c.removeEventListener("click", this._handleLabelClick);
|
|
2546
2548
|
}
|
|
2547
2549
|
const { form: i } = this.telInput;
|
|
2548
|
-
this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), $ && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2550
|
+
this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this.telInput.removeAttribute("data-intl-tel-input-id"), $ && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2549
2551
|
const s = this.telInput.parentNode;
|
|
2550
2552
|
(u = s == null ? void 0 : s.parentNode) == null || u.insertBefore(this.telInput, s), (h = s == null ? void 0 : s.parentNode) == null || h.removeChild(s), delete y.instances[this.id];
|
|
2551
2553
|
}
|
|
@@ -2675,7 +2677,7 @@ const n0 = (f) => {
|
|
|
2675
2677
|
attachUtils: n0,
|
|
2676
2678
|
startedLoadingUtilsScript: !1,
|
|
2677
2679
|
startedLoadingAutoCountry: !1,
|
|
2678
|
-
version: "25.10.
|
|
2680
|
+
version: "25.10.10"
|
|
2679
2681
|
}
|
|
2680
2682
|
);
|
|
2681
2683
|
(function() {
|