intl-tel-input 23.9.3 → 24.0.1
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 +15 -12
- package/build/css/intlTelInput.css +303 -317
- package/build/css/intlTelInput.min.css +1 -1
- package/build/img/flags.png +0 -0
- package/build/img/flags.webp +0 -0
- package/build/img/flags@2x.png +0 -0
- package/build/img/flags@2x.webp +0 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +4 -3
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +4 -3
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/index.js +0 -1
- package/package.json +5 -10
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +3 -2
- package/react/build/IntlTelInput.js +3 -2
- package/react/build/IntlTelInputWithUtils.cjs +3 -2
- package/react/build/IntlTelInputWithUtils.js +3 -2
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intl-tel-input",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.1",
|
|
4
4
|
"description": "A JavaScript plugin for entering and validating international telephone numbers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"international",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@testing-library/user-event": "^14.5.2",
|
|
29
29
|
"@types/react": "^18.2.74",
|
|
30
30
|
"@types/react-dom": "^18.2.24",
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
32
|
-
"@typescript-eslint/parser": "^
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
32
|
+
"@typescript-eslint/parser": "^8.1.0",
|
|
33
33
|
"cspell": "^8.6.1",
|
|
34
34
|
"esbuild": "^0.23.0",
|
|
35
35
|
"eslint": "^8.57.0",
|
|
@@ -39,23 +39,18 @@
|
|
|
39
39
|
"eslint-plugin-jest": "^28.5.0",
|
|
40
40
|
"eslint-plugin-react": "^7.34.1",
|
|
41
41
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
42
|
-
"
|
|
42
|
+
"flag-icons": "^7.2.3",
|
|
43
43
|
"google-closure-compiler": "^20240317.0.0",
|
|
44
44
|
"google-closure-library": "^20230802.0.0",
|
|
45
45
|
"grunt": "^1.6.1",
|
|
46
46
|
"grunt-bump": "^0.8.0",
|
|
47
47
|
"grunt-cli": "^1.2.0",
|
|
48
48
|
"grunt-contrib-cssmin": "^5.0.0",
|
|
49
|
-
"grunt-contrib-imagemin": "^4.0.0",
|
|
50
49
|
"grunt-contrib-jasmine": "^4.0.0",
|
|
51
50
|
"grunt-contrib-watch": "^1.1.0",
|
|
52
|
-
"grunt-exec": "^3.0.0",
|
|
53
51
|
"grunt-replace": "^2.0.2",
|
|
54
|
-
"grunt-responsive-images": "^1.10.1",
|
|
55
52
|
"grunt-sass": "^3.0.0",
|
|
56
53
|
"grunt-shell": "^4.0.0",
|
|
57
|
-
"grunt-spritesmith": "^6.10.0",
|
|
58
|
-
"image-size": "^1.1.1",
|
|
59
54
|
"jasmine-jquery": "^2.1.1",
|
|
60
55
|
"jest": "^29.7.0",
|
|
61
56
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -64,8 +59,8 @@
|
|
|
64
59
|
"prettier": "^3.2.5",
|
|
65
60
|
"react": "^18.3.1",
|
|
66
61
|
"react-dom": "^18.3.1",
|
|
67
|
-
"region-flags": "https://github.com/fonttools/region-flags/archive/refs/tags/1.2.1.tar.gz",
|
|
68
62
|
"sass": "^1.74.1",
|
|
63
|
+
"sharp": "^0.33.5",
|
|
69
64
|
"time-grunt": "^2.0.0",
|
|
70
65
|
"typescript": "^5.5.3"
|
|
71
66
|
},
|
package/react/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import "intl-tel-input/styles";
|
|
|
29
29
|
|
|
30
30
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/ValidationApp.tsx) for a more fleshed-out example of how to handle validation.
|
|
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/reactWithUtils"` instead, 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@
|
|
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/reactWithUtils"` instead, 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.0.1/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 react component.
|
|
@@ -2206,8 +2206,9 @@ var Iti = class {
|
|
|
2206
2206
|
for (let i = 0; i < this.countries.length; i++) {
|
|
2207
2207
|
const c = this.countries[i];
|
|
2208
2208
|
const normalisedCountryName = normaliseString(c.name);
|
|
2209
|
+
const countryInitials = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((word) => word[0]).join("").toLowerCase();
|
|
2209
2210
|
const fullDialCode = `+${c.dialCode}`;
|
|
2210
|
-
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery)) {
|
|
2211
|
+
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery) || countryInitials.includes(normalisedQuery)) {
|
|
2211
2212
|
const listItem = c.nodeById[this.id];
|
|
2212
2213
|
if (listItem) {
|
|
2213
2214
|
this.countryList.appendChild(listItem);
|
|
@@ -2834,7 +2835,7 @@ var intlTelInput = Object.assign(
|
|
|
2834
2835
|
//* A map from instance ID to instance object.
|
|
2835
2836
|
instances: {},
|
|
2836
2837
|
loadUtils,
|
|
2837
|
-
version: "
|
|
2838
|
+
version: "24.0.1"
|
|
2838
2839
|
}
|
|
2839
2840
|
);
|
|
2840
2841
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2170,8 +2170,9 @@ var Iti = class {
|
|
|
2170
2170
|
for (let i = 0; i < this.countries.length; i++) {
|
|
2171
2171
|
const c = this.countries[i];
|
|
2172
2172
|
const normalisedCountryName = normaliseString(c.name);
|
|
2173
|
+
const countryInitials = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((word) => word[0]).join("").toLowerCase();
|
|
2173
2174
|
const fullDialCode = `+${c.dialCode}`;
|
|
2174
|
-
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery)) {
|
|
2175
|
+
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery) || countryInitials.includes(normalisedQuery)) {
|
|
2175
2176
|
const listItem = c.nodeById[this.id];
|
|
2176
2177
|
if (listItem) {
|
|
2177
2178
|
this.countryList.appendChild(listItem);
|
|
@@ -2798,7 +2799,7 @@ var intlTelInput = Object.assign(
|
|
|
2798
2799
|
//* A map from instance ID to instance object.
|
|
2799
2800
|
instances: {},
|
|
2800
2801
|
loadUtils,
|
|
2801
|
-
version: "
|
|
2802
|
+
version: "24.0.1"
|
|
2802
2803
|
}
|
|
2803
2804
|
);
|
|
2804
2805
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2206,8 +2206,9 @@ var Iti = class {
|
|
|
2206
2206
|
for (let i = 0; i < this.countries.length; i++) {
|
|
2207
2207
|
const c = this.countries[i];
|
|
2208
2208
|
const normalisedCountryName = normaliseString(c.name);
|
|
2209
|
+
const countryInitials = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((word) => word[0]).join("").toLowerCase();
|
|
2209
2210
|
const fullDialCode = `+${c.dialCode}`;
|
|
2210
|
-
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery)) {
|
|
2211
|
+
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery) || countryInitials.includes(normalisedQuery)) {
|
|
2211
2212
|
const listItem = c.nodeById[this.id];
|
|
2212
2213
|
if (listItem) {
|
|
2213
2214
|
this.countryList.appendChild(listItem);
|
|
@@ -2834,7 +2835,7 @@ var intlTelInput = Object.assign(
|
|
|
2834
2835
|
//* A map from instance ID to instance object.
|
|
2835
2836
|
instances: {},
|
|
2836
2837
|
loadUtils,
|
|
2837
|
-
version: "
|
|
2838
|
+
version: "24.0.1"
|
|
2838
2839
|
}
|
|
2839
2840
|
);
|
|
2840
2841
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2170,8 +2170,9 @@ var Iti = class {
|
|
|
2170
2170
|
for (let i = 0; i < this.countries.length; i++) {
|
|
2171
2171
|
const c = this.countries[i];
|
|
2172
2172
|
const normalisedCountryName = normaliseString(c.name);
|
|
2173
|
+
const countryInitials = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((word) => word[0]).join("").toLowerCase();
|
|
2173
2174
|
const fullDialCode = `+${c.dialCode}`;
|
|
2174
|
-
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery)) {
|
|
2175
|
+
if (isReset || normalisedCountryName.includes(normalisedQuery) || fullDialCode.includes(normalisedQuery) || c.iso2.includes(normalisedQuery) || countryInitials.includes(normalisedQuery)) {
|
|
2175
2176
|
const listItem = c.nodeById[this.id];
|
|
2176
2177
|
if (listItem) {
|
|
2177
2178
|
this.countryList.appendChild(listItem);
|
|
@@ -2798,7 +2799,7 @@ var intlTelInput = Object.assign(
|
|
|
2798
2799
|
//* A map from instance ID to instance object.
|
|
2799
2800
|
instances: {},
|
|
2800
2801
|
loadUtils,
|
|
2801
|
-
version: "
|
|
2802
|
+
version: "24.0.1"
|
|
2802
2803
|
}
|
|
2803
2804
|
);
|
|
2804
2805
|
var intl_tel_input_default = intlTelInput;
|