intl-tel-input 25.8.5 → 25.8.6
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 +7 -7
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +7 -6
- package/angular/build/IntlTelInputWithUtils.js +7 -6
- package/angular/build/types/countryDataManager.d.ts +25 -0
- package/angular/build/types/dropdown.d.ts +56 -0
- package/angular/build/types/types.d.ts +53 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/i18n/en/interface.js +1 -1
- package/build/js/intlTelInput.js +8 -7
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +8 -7
- package/build/js/intlTelInputWithUtils.min.js +4 -4
- package/package.json +2 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +7 -6
- package/react/build/IntlTelInput.js +7 -6
- package/react/build/IntlTelInputWithUtils.cjs +7 -6
- package/react/build/IntlTelInputWithUtils.js +7 -6
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +91 -86
- package/vue/build/IntlTelInputWithUtils.mjs +156 -151
- package/build/js/i18n/index.mjs +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intl-tel-input",
|
|
3
|
-
"version": "25.8.
|
|
3
|
+
"version": "25.8.6",
|
|
4
4
|
"description": "A JavaScript plugin for entering and validating international telephone numbers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"international",
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"build:react": "grunt react",
|
|
111
111
|
"build:vue": "grunt vue",
|
|
112
112
|
"build:angular": "grunt angular",
|
|
113
|
+
"build:travis": "grunt build:travis",
|
|
113
114
|
"vue:demo": "vite --config vue/demo/validation/vite.config.js"
|
|
114
115
|
},
|
|
115
116
|
"style": "build/css/intlTelInput.css",
|
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.8.
|
|
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.8.6/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.
|
|
@@ -1624,7 +1624,7 @@ var countries_default = countryTranslations;
|
|
|
1624
1624
|
|
|
1625
1625
|
// src/js/intl-tel-input/i18n/en/interface.ts
|
|
1626
1626
|
var interfaceTranslations = {
|
|
1627
|
-
selectedCountryAriaLabel: "Change country, selected ${
|
|
1627
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1628
1628
|
noCountrySelected: "Select country",
|
|
1629
1629
|
countryListAriaLabel: "List of countries",
|
|
1630
1630
|
searchPlaceholder: "Search",
|
|
@@ -2768,7 +2768,7 @@ var Iti = class _Iti {
|
|
|
2768
2768
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2769
2769
|
_setCountry(iso2) {
|
|
2770
2770
|
const { separateDialCode, showFlags, i18n } = this.options;
|
|
2771
|
-
const
|
|
2771
|
+
const prevIso2 = this.selectedCountryData.iso2 || "";
|
|
2772
2772
|
this.selectedCountryData = iso2 ? this._getCountryData(iso2, false) || {} : {};
|
|
2773
2773
|
if (this.selectedCountryData.iso2) {
|
|
2774
2774
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
@@ -2777,8 +2777,9 @@ var Iti = class _Iti {
|
|
|
2777
2777
|
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2778
2778
|
let ariaLabel, title;
|
|
2779
2779
|
if (iso2) {
|
|
2780
|
-
|
|
2781
|
-
|
|
2780
|
+
const { name, dialCode } = this.selectedCountryData;
|
|
2781
|
+
title = name;
|
|
2782
|
+
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
2782
2783
|
} else {
|
|
2783
2784
|
title = i18n.noCountrySelected;
|
|
2784
2785
|
ariaLabel = i18n.noCountrySelected;
|
|
@@ -2794,7 +2795,7 @@ var Iti = class _Iti {
|
|
|
2794
2795
|
}
|
|
2795
2796
|
this._updatePlaceholder();
|
|
2796
2797
|
this._updateMaxLength();
|
|
2797
|
-
return
|
|
2798
|
+
return prevIso2 !== iso2;
|
|
2798
2799
|
}
|
|
2799
2800
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2800
2801
|
_updateInputPadding() {
|
|
@@ -3267,7 +3268,7 @@ var intlTelInput = Object.assign(
|
|
|
3267
3268
|
attachUtils,
|
|
3268
3269
|
startedLoadingUtilsScript: false,
|
|
3269
3270
|
startedLoadingAutoCountry: false,
|
|
3270
|
-
version: "25.8.
|
|
3271
|
+
version: "25.8.6"
|
|
3271
3272
|
}
|
|
3272
3273
|
);
|
|
3273
3274
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1588,7 +1588,7 @@ var countries_default = countryTranslations;
|
|
|
1588
1588
|
|
|
1589
1589
|
// src/js/intl-tel-input/i18n/en/interface.ts
|
|
1590
1590
|
var interfaceTranslations = {
|
|
1591
|
-
selectedCountryAriaLabel: "Change country, selected ${
|
|
1591
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1592
1592
|
noCountrySelected: "Select country",
|
|
1593
1593
|
countryListAriaLabel: "List of countries",
|
|
1594
1594
|
searchPlaceholder: "Search",
|
|
@@ -2732,7 +2732,7 @@ var Iti = class _Iti {
|
|
|
2732
2732
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2733
2733
|
_setCountry(iso2) {
|
|
2734
2734
|
const { separateDialCode, showFlags, i18n } = this.options;
|
|
2735
|
-
const
|
|
2735
|
+
const prevIso2 = this.selectedCountryData.iso2 || "";
|
|
2736
2736
|
this.selectedCountryData = iso2 ? this._getCountryData(iso2, false) || {} : {};
|
|
2737
2737
|
if (this.selectedCountryData.iso2) {
|
|
2738
2738
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
@@ -2741,8 +2741,9 @@ var Iti = class _Iti {
|
|
|
2741
2741
|
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2742
2742
|
let ariaLabel, title;
|
|
2743
2743
|
if (iso2) {
|
|
2744
|
-
|
|
2745
|
-
|
|
2744
|
+
const { name, dialCode } = this.selectedCountryData;
|
|
2745
|
+
title = name;
|
|
2746
|
+
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
2746
2747
|
} else {
|
|
2747
2748
|
title = i18n.noCountrySelected;
|
|
2748
2749
|
ariaLabel = i18n.noCountrySelected;
|
|
@@ -2758,7 +2759,7 @@ var Iti = class _Iti {
|
|
|
2758
2759
|
}
|
|
2759
2760
|
this._updatePlaceholder();
|
|
2760
2761
|
this._updateMaxLength();
|
|
2761
|
-
return
|
|
2762
|
+
return prevIso2 !== iso2;
|
|
2762
2763
|
}
|
|
2763
2764
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2764
2765
|
_updateInputPadding() {
|
|
@@ -3231,7 +3232,7 @@ var intlTelInput = Object.assign(
|
|
|
3231
3232
|
attachUtils,
|
|
3232
3233
|
startedLoadingUtilsScript: false,
|
|
3233
3234
|
startedLoadingAutoCountry: false,
|
|
3234
|
-
version: "25.8.
|
|
3235
|
+
version: "25.8.6"
|
|
3235
3236
|
}
|
|
3236
3237
|
);
|
|
3237
3238
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1624,7 +1624,7 @@ var countries_default = countryTranslations;
|
|
|
1624
1624
|
|
|
1625
1625
|
// src/js/intl-tel-input/i18n/en/interface.ts
|
|
1626
1626
|
var interfaceTranslations = {
|
|
1627
|
-
selectedCountryAriaLabel: "Change country, selected ${
|
|
1627
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1628
1628
|
noCountrySelected: "Select country",
|
|
1629
1629
|
countryListAriaLabel: "List of countries",
|
|
1630
1630
|
searchPlaceholder: "Search",
|
|
@@ -2768,7 +2768,7 @@ var Iti = class _Iti {
|
|
|
2768
2768
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2769
2769
|
_setCountry(iso2) {
|
|
2770
2770
|
const { separateDialCode, showFlags, i18n } = this.options;
|
|
2771
|
-
const
|
|
2771
|
+
const prevIso2 = this.selectedCountryData.iso2 || "";
|
|
2772
2772
|
this.selectedCountryData = iso2 ? this._getCountryData(iso2, false) || {} : {};
|
|
2773
2773
|
if (this.selectedCountryData.iso2) {
|
|
2774
2774
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
@@ -2777,8 +2777,9 @@ var Iti = class _Iti {
|
|
|
2777
2777
|
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2778
2778
|
let ariaLabel, title;
|
|
2779
2779
|
if (iso2) {
|
|
2780
|
-
|
|
2781
|
-
|
|
2780
|
+
const { name, dialCode } = this.selectedCountryData;
|
|
2781
|
+
title = name;
|
|
2782
|
+
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
2782
2783
|
} else {
|
|
2783
2784
|
title = i18n.noCountrySelected;
|
|
2784
2785
|
ariaLabel = i18n.noCountrySelected;
|
|
@@ -2794,7 +2795,7 @@ var Iti = class _Iti {
|
|
|
2794
2795
|
}
|
|
2795
2796
|
this._updatePlaceholder();
|
|
2796
2797
|
this._updateMaxLength();
|
|
2797
|
-
return
|
|
2798
|
+
return prevIso2 !== iso2;
|
|
2798
2799
|
}
|
|
2799
2800
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2800
2801
|
_updateInputPadding() {
|
|
@@ -3267,7 +3268,7 @@ var intlTelInput = Object.assign(
|
|
|
3267
3268
|
attachUtils,
|
|
3268
3269
|
startedLoadingUtilsScript: false,
|
|
3269
3270
|
startedLoadingAutoCountry: false,
|
|
3270
|
-
version: "25.8.
|
|
3271
|
+
version: "25.8.6"
|
|
3271
3272
|
}
|
|
3272
3273
|
);
|
|
3273
3274
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1588,7 +1588,7 @@ var countries_default = countryTranslations;
|
|
|
1588
1588
|
|
|
1589
1589
|
// src/js/intl-tel-input/i18n/en/interface.ts
|
|
1590
1590
|
var interfaceTranslations = {
|
|
1591
|
-
selectedCountryAriaLabel: "Change country, selected ${
|
|
1591
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1592
1592
|
noCountrySelected: "Select country",
|
|
1593
1593
|
countryListAriaLabel: "List of countries",
|
|
1594
1594
|
searchPlaceholder: "Search",
|
|
@@ -2732,7 +2732,7 @@ var Iti = class _Iti {
|
|
|
2732
2732
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2733
2733
|
_setCountry(iso2) {
|
|
2734
2734
|
const { separateDialCode, showFlags, i18n } = this.options;
|
|
2735
|
-
const
|
|
2735
|
+
const prevIso2 = this.selectedCountryData.iso2 || "";
|
|
2736
2736
|
this.selectedCountryData = iso2 ? this._getCountryData(iso2, false) || {} : {};
|
|
2737
2737
|
if (this.selectedCountryData.iso2) {
|
|
2738
2738
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
@@ -2741,8 +2741,9 @@ var Iti = class _Iti {
|
|
|
2741
2741
|
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2742
2742
|
let ariaLabel, title;
|
|
2743
2743
|
if (iso2) {
|
|
2744
|
-
|
|
2745
|
-
|
|
2744
|
+
const { name, dialCode } = this.selectedCountryData;
|
|
2745
|
+
title = name;
|
|
2746
|
+
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
2746
2747
|
} else {
|
|
2747
2748
|
title = i18n.noCountrySelected;
|
|
2748
2749
|
ariaLabel = i18n.noCountrySelected;
|
|
@@ -2758,7 +2759,7 @@ var Iti = class _Iti {
|
|
|
2758
2759
|
}
|
|
2759
2760
|
this._updatePlaceholder();
|
|
2760
2761
|
this._updateMaxLength();
|
|
2761
|
-
return
|
|
2762
|
+
return prevIso2 !== iso2;
|
|
2762
2763
|
}
|
|
2763
2764
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2764
2765
|
_updateInputPadding() {
|
|
@@ -3231,7 +3232,7 @@ var intlTelInput = Object.assign(
|
|
|
3231
3232
|
attachUtils,
|
|
3232
3233
|
startedLoadingUtilsScript: false,
|
|
3233
3234
|
startedLoadingAutoCountry: false,
|
|
3234
|
-
version: "25.8.
|
|
3235
|
+
version: "25.8.6"
|
|
3235
3236
|
}
|
|
3236
3237
|
);
|
|
3237
3238
|
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.8.
|
|
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.8.6/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.
|