intl-tel-input 24.3.3 → 24.3.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 +6 -6
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +5 -6
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +5 -6
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +4 -5
- package/react/build/IntlTelInput.js +4 -5
- package/react/build/IntlTelInputWithUtils.cjs +4 -5
- package/react/build/IntlTelInputWithUtils.js +4 -5
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +190 -190
- package/vue/build/IntlTelInputWithUtils.mjs +440 -440
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 `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.
|
|
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 `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.4/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.
|
|
@@ -1763,7 +1763,6 @@ var Iti = class {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
if (this.options.separateDialCode) {
|
|
1765
1765
|
this.options.nationalMode = false;
|
|
1766
|
-
this.options.countrySearch = true;
|
|
1767
1766
|
}
|
|
1768
1767
|
if (this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode) {
|
|
1769
1768
|
this.options.nationalMode = false;
|
|
@@ -2243,13 +2242,13 @@ var Iti = class {
|
|
|
2243
2242
|
}
|
|
2244
2243
|
//* Initialize the tel input listeners.
|
|
2245
2244
|
_initTelInputListeners() {
|
|
2246
|
-
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown } = this.options;
|
|
2245
|
+
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown, countrySearch } = this.options;
|
|
2247
2246
|
let userOverrideFormatting = false;
|
|
2248
2247
|
if (/\p{L}/u.test(this.telInput.value)) {
|
|
2249
2248
|
userOverrideFormatting = true;
|
|
2250
2249
|
}
|
|
2251
2250
|
this._handleInputEvent = (e) => {
|
|
2252
|
-
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown) {
|
|
2251
|
+
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
|
|
2253
2252
|
const currentCaretPos = this.telInput.selectionStart || 0;
|
|
2254
2253
|
const valueBeforeCaret = this.telInput.value.substring(0, currentCaretPos - 1);
|
|
2255
2254
|
const valueAfterCaret = this.telInput.value.substring(currentCaretPos);
|
|
@@ -2283,7 +2282,7 @@ var Iti = class {
|
|
|
2283
2282
|
if (strictMode || separateDialCode) {
|
|
2284
2283
|
this._handleKeydownEvent = (e) => {
|
|
2285
2284
|
if (e.key && e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
2286
|
-
if (separateDialCode && allowDropdown && e.key === "+") {
|
|
2285
|
+
if (separateDialCode && allowDropdown && countrySearch && e.key === "+") {
|
|
2287
2286
|
e.preventDefault();
|
|
2288
2287
|
this._openDropdownWithPlus();
|
|
2289
2288
|
return;
|
|
@@ -3099,7 +3098,7 @@ var intlTelInput = Object.assign(
|
|
|
3099
3098
|
//* A map from instance ID to instance object.
|
|
3100
3099
|
instances: {},
|
|
3101
3100
|
loadUtils,
|
|
3102
|
-
version: "24.3.
|
|
3101
|
+
version: "24.3.4"
|
|
3103
3102
|
}
|
|
3104
3103
|
);
|
|
3105
3104
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1727,7 +1727,6 @@ var Iti = class {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
if (this.options.separateDialCode) {
|
|
1729
1729
|
this.options.nationalMode = false;
|
|
1730
|
-
this.options.countrySearch = true;
|
|
1731
1730
|
}
|
|
1732
1731
|
if (this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode) {
|
|
1733
1732
|
this.options.nationalMode = false;
|
|
@@ -2207,13 +2206,13 @@ var Iti = class {
|
|
|
2207
2206
|
}
|
|
2208
2207
|
//* Initialize the tel input listeners.
|
|
2209
2208
|
_initTelInputListeners() {
|
|
2210
|
-
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown } = this.options;
|
|
2209
|
+
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown, countrySearch } = this.options;
|
|
2211
2210
|
let userOverrideFormatting = false;
|
|
2212
2211
|
if (/\p{L}/u.test(this.telInput.value)) {
|
|
2213
2212
|
userOverrideFormatting = true;
|
|
2214
2213
|
}
|
|
2215
2214
|
this._handleInputEvent = (e) => {
|
|
2216
|
-
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown) {
|
|
2215
|
+
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
|
|
2217
2216
|
const currentCaretPos = this.telInput.selectionStart || 0;
|
|
2218
2217
|
const valueBeforeCaret = this.telInput.value.substring(0, currentCaretPos - 1);
|
|
2219
2218
|
const valueAfterCaret = this.telInput.value.substring(currentCaretPos);
|
|
@@ -2247,7 +2246,7 @@ var Iti = class {
|
|
|
2247
2246
|
if (strictMode || separateDialCode) {
|
|
2248
2247
|
this._handleKeydownEvent = (e) => {
|
|
2249
2248
|
if (e.key && e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
2250
|
-
if (separateDialCode && allowDropdown && e.key === "+") {
|
|
2249
|
+
if (separateDialCode && allowDropdown && countrySearch && e.key === "+") {
|
|
2251
2250
|
e.preventDefault();
|
|
2252
2251
|
this._openDropdownWithPlus();
|
|
2253
2252
|
return;
|
|
@@ -3063,7 +3062,7 @@ var intlTelInput = Object.assign(
|
|
|
3063
3062
|
//* A map from instance ID to instance object.
|
|
3064
3063
|
instances: {},
|
|
3065
3064
|
loadUtils,
|
|
3066
|
-
version: "24.3.
|
|
3065
|
+
version: "24.3.4"
|
|
3067
3066
|
}
|
|
3068
3067
|
);
|
|
3069
3068
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1763,7 +1763,6 @@ var Iti = class {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
if (this.options.separateDialCode) {
|
|
1765
1765
|
this.options.nationalMode = false;
|
|
1766
|
-
this.options.countrySearch = true;
|
|
1767
1766
|
}
|
|
1768
1767
|
if (this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode) {
|
|
1769
1768
|
this.options.nationalMode = false;
|
|
@@ -2243,13 +2242,13 @@ var Iti = class {
|
|
|
2243
2242
|
}
|
|
2244
2243
|
//* Initialize the tel input listeners.
|
|
2245
2244
|
_initTelInputListeners() {
|
|
2246
|
-
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown } = this.options;
|
|
2245
|
+
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown, countrySearch } = this.options;
|
|
2247
2246
|
let userOverrideFormatting = false;
|
|
2248
2247
|
if (/\p{L}/u.test(this.telInput.value)) {
|
|
2249
2248
|
userOverrideFormatting = true;
|
|
2250
2249
|
}
|
|
2251
2250
|
this._handleInputEvent = (e) => {
|
|
2252
|
-
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown) {
|
|
2251
|
+
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
|
|
2253
2252
|
const currentCaretPos = this.telInput.selectionStart || 0;
|
|
2254
2253
|
const valueBeforeCaret = this.telInput.value.substring(0, currentCaretPos - 1);
|
|
2255
2254
|
const valueAfterCaret = this.telInput.value.substring(currentCaretPos);
|
|
@@ -2283,7 +2282,7 @@ var Iti = class {
|
|
|
2283
2282
|
if (strictMode || separateDialCode) {
|
|
2284
2283
|
this._handleKeydownEvent = (e) => {
|
|
2285
2284
|
if (e.key && e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
2286
|
-
if (separateDialCode && allowDropdown && e.key === "+") {
|
|
2285
|
+
if (separateDialCode && allowDropdown && countrySearch && e.key === "+") {
|
|
2287
2286
|
e.preventDefault();
|
|
2288
2287
|
this._openDropdownWithPlus();
|
|
2289
2288
|
return;
|
|
@@ -3099,7 +3098,7 @@ var intlTelInput = Object.assign(
|
|
|
3099
3098
|
//* A map from instance ID to instance object.
|
|
3100
3099
|
instances: {},
|
|
3101
3100
|
loadUtils,
|
|
3102
|
-
version: "24.3.
|
|
3101
|
+
version: "24.3.4"
|
|
3103
3102
|
}
|
|
3104
3103
|
);
|
|
3105
3104
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1727,7 +1727,6 @@ var Iti = class {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
if (this.options.separateDialCode) {
|
|
1729
1729
|
this.options.nationalMode = false;
|
|
1730
|
-
this.options.countrySearch = true;
|
|
1731
1730
|
}
|
|
1732
1731
|
if (this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode) {
|
|
1733
1732
|
this.options.nationalMode = false;
|
|
@@ -2207,13 +2206,13 @@ var Iti = class {
|
|
|
2207
2206
|
}
|
|
2208
2207
|
//* Initialize the tel input listeners.
|
|
2209
2208
|
_initTelInputListeners() {
|
|
2210
|
-
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown } = this.options;
|
|
2209
|
+
const { strictMode, formatAsYouType, separateDialCode, formatOnDisplay, allowDropdown, countrySearch } = this.options;
|
|
2211
2210
|
let userOverrideFormatting = false;
|
|
2212
2211
|
if (/\p{L}/u.test(this.telInput.value)) {
|
|
2213
2212
|
userOverrideFormatting = true;
|
|
2214
2213
|
}
|
|
2215
2214
|
this._handleInputEvent = (e) => {
|
|
2216
|
-
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown) {
|
|
2215
|
+
if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
|
|
2217
2216
|
const currentCaretPos = this.telInput.selectionStart || 0;
|
|
2218
2217
|
const valueBeforeCaret = this.telInput.value.substring(0, currentCaretPos - 1);
|
|
2219
2218
|
const valueAfterCaret = this.telInput.value.substring(currentCaretPos);
|
|
@@ -2247,7 +2246,7 @@ var Iti = class {
|
|
|
2247
2246
|
if (strictMode || separateDialCode) {
|
|
2248
2247
|
this._handleKeydownEvent = (e) => {
|
|
2249
2248
|
if (e.key && e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
2250
|
-
if (separateDialCode && allowDropdown && e.key === "+") {
|
|
2249
|
+
if (separateDialCode && allowDropdown && countrySearch && e.key === "+") {
|
|
2251
2250
|
e.preventDefault();
|
|
2252
2251
|
this._openDropdownWithPlus();
|
|
2253
2252
|
return;
|
|
@@ -3063,7 +3062,7 @@ var intlTelInput = Object.assign(
|
|
|
3063
3062
|
//* A map from instance ID to instance object.
|
|
3064
3063
|
instances: {},
|
|
3065
3064
|
loadUtils,
|
|
3066
|
-
version: "24.3.
|
|
3065
|
+
version: "24.3.4"
|
|
3067
3066
|
}
|
|
3068
3067
|
);
|
|
3069
3068
|
var intl_tel_input_default = intlTelInput;
|
package/vue/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Try it for yourself by downloading the project and running `npm install` and the
|
|
|
29
29
|
|
|
30
30
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/vue/demo/validation/App.vue) for a more fleshed-out example of how to handle validation [COMING SOON].
|
|
31
31
|
|
|
32
|
-
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 `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.
|
|
32
|
+
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 `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.4/build/js/utils.js"`.
|
|
33
33
|
|
|
34
34
|
## Props
|
|
35
35
|
Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
|