intl-tel-input 23.0.6 → 23.0.8
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 +3 -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 +15 -3
- package/react/build/IntlTelInput.cjs +14 -3
- package/react/build/IntlTelInput.d.ts +4 -0
- package/react/build/IntlTelInput.js +14 -3
- package/react/build/IntlTelInputWithUtils.cjs +14 -3
- package/react/build/IntlTelInputWithUtils.js +14 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intl-tel-input",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.8",
|
|
4
4
|
"description": "A JavaScript plugin for entering and validating international telephone numbers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"international",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"author": "Jack O'Connor (http://jackocnr.com)",
|
|
26
26
|
"devDependencies": {
|
|
27
|
+
"@testing-library/user-event": "^14.5.2",
|
|
27
28
|
"@types/react": "^18.2.74",
|
|
28
29
|
"@types/react-dom": "^18.2.24",
|
|
29
30
|
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
35
36
|
"eslint-plugin-import": "^2.29.1",
|
|
36
37
|
"eslint-plugin-jasmine": "^4.1.3",
|
|
38
|
+
"eslint-plugin-jest": "^28.5.0",
|
|
37
39
|
"eslint-plugin-react": "^7.34.1",
|
|
38
40
|
"evenizer": "^0.1.17",
|
|
39
41
|
"google-closure-compiler": "^20240317.0.0",
|
|
@@ -53,6 +55,8 @@
|
|
|
53
55
|
"grunt-spritesmith": "^6.10.0",
|
|
54
56
|
"image-size": "^1.1.1",
|
|
55
57
|
"jasmine-jquery": "^2.1.1",
|
|
58
|
+
"jest": "^29.7.0",
|
|
59
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
56
60
|
"jquery": "^3.1.1",
|
|
57
61
|
"load-grunt-config": "^4.0.1",
|
|
58
62
|
"prettier": "^3.2.5",
|
|
@@ -80,6 +84,7 @@
|
|
|
80
84
|
"homepage": "https://intl-tel-input.com",
|
|
81
85
|
"scripts": {
|
|
82
86
|
"test": "grunt travis",
|
|
87
|
+
"jest": "jest",
|
|
83
88
|
"lint:js": "eslint .",
|
|
84
89
|
"lint:spelling": "cspell --dot --gitignore --no-progress '**'",
|
|
85
90
|
"watch": "grunt watch",
|
|
@@ -122,8 +127,15 @@
|
|
|
122
127
|
},
|
|
123
128
|
"typesVersions": {
|
|
124
129
|
"*": {
|
|
125
|
-
".": [
|
|
126
|
-
|
|
130
|
+
".": [
|
|
131
|
+
"build/js/intlTelInput.d.ts"
|
|
132
|
+
],
|
|
133
|
+
"react": [
|
|
134
|
+
"react/build/IntlTelInput.d.ts"
|
|
135
|
+
]
|
|
127
136
|
}
|
|
137
|
+
},
|
|
138
|
+
"jest": {
|
|
139
|
+
"moduleDirectories": ["node_modules", "build/js"]
|
|
128
140
|
}
|
|
129
141
|
}
|
|
@@ -29,7 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// react/src/intl-tel-input/react.tsx
|
|
30
30
|
var react_exports = {};
|
|
31
31
|
__export(react_exports, {
|
|
32
|
-
default: () => react_default
|
|
32
|
+
default: () => react_default,
|
|
33
|
+
intlTelInput: () => intl_tel_input_default
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(react_exports);
|
|
35
36
|
|
|
@@ -1383,6 +1384,9 @@ var interface_default = {
|
|
|
1383
1384
|
var en_default = { ...countries_default, ...interface_default };
|
|
1384
1385
|
|
|
1385
1386
|
// src/js/intl-tel-input.ts
|
|
1387
|
+
for (let i = 0; i < data_default.length; i++) {
|
|
1388
|
+
data_default[i].name = en_default[data_default[i].iso2];
|
|
1389
|
+
}
|
|
1386
1390
|
var id = 0;
|
|
1387
1391
|
var defaults = {
|
|
1388
1392
|
//* Whether or not to allow the dropdown.
|
|
@@ -2773,7 +2777,7 @@ var intlTelInput = Object.assign(
|
|
|
2773
2777
|
//* A map from instance ID to instance object.
|
|
2774
2778
|
instances: {},
|
|
2775
2779
|
loadUtils,
|
|
2776
|
-
version: "23.0.
|
|
2780
|
+
version: "23.0.8"
|
|
2777
2781
|
}
|
|
2778
2782
|
);
|
|
2779
2783
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2797,7 +2801,14 @@ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
|
|
|
2797
2801
|
const inputRef = (0, import_react.useRef)(null);
|
|
2798
2802
|
const itiRef = (0, import_react.useRef)(null);
|
|
2799
2803
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
2800
|
-
getInstance: () =>
|
|
2804
|
+
getInstance: () => ({
|
|
2805
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
2806
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
2807
|
+
setNumber: (num) => {
|
|
2808
|
+
itiRef.current?.setNumber(num);
|
|
2809
|
+
update();
|
|
2810
|
+
}
|
|
2811
|
+
}),
|
|
2801
2812
|
getInput: () => inputRef.current
|
|
2802
2813
|
}));
|
|
2803
2814
|
const update = () => {
|
|
@@ -974,8 +974,10 @@ declare module "intl-tel-input" {
|
|
|
974
974
|
export default intlTelInput;
|
|
975
975
|
}
|
|
976
976
|
declare module "intl-tel-input/react" {
|
|
977
|
+
import intlTelInput from "intl-tel-input";
|
|
977
978
|
import { SomeOptions } from "intl-tel-input";
|
|
978
979
|
import React from "react";
|
|
980
|
+
export { intlTelInput };
|
|
979
981
|
type ItiProps = {
|
|
980
982
|
initialValue?: string;
|
|
981
983
|
onChangeNumber?: (number: string) => void;
|
|
@@ -998,8 +1000,10 @@ declare module "intl-tel-input/intlTelInputWithUtils" {
|
|
|
998
1000
|
export default intlTelInput;
|
|
999
1001
|
}
|
|
1000
1002
|
declare module "intl-tel-input/reactWithUtils" {
|
|
1003
|
+
import intlTelInput from "intl-tel-input/intlTelInputWithUtils";
|
|
1001
1004
|
import { SomeOptions } from "intl-tel-input";
|
|
1002
1005
|
import React from "react";
|
|
1006
|
+
export { intlTelInput };
|
|
1003
1007
|
type ItiProps = {
|
|
1004
1008
|
initialValue?: string;
|
|
1005
1009
|
onChangeNumber?: (number: string) => void;
|
|
@@ -1348,6 +1348,9 @@ var interface_default = {
|
|
|
1348
1348
|
var en_default = { ...countries_default, ...interface_default };
|
|
1349
1349
|
|
|
1350
1350
|
// src/js/intl-tel-input.ts
|
|
1351
|
+
for (let i = 0; i < data_default.length; i++) {
|
|
1352
|
+
data_default[i].name = en_default[data_default[i].iso2];
|
|
1353
|
+
}
|
|
1351
1354
|
var id = 0;
|
|
1352
1355
|
var defaults = {
|
|
1353
1356
|
//* Whether or not to allow the dropdown.
|
|
@@ -2738,7 +2741,7 @@ var intlTelInput = Object.assign(
|
|
|
2738
2741
|
//* A map from instance ID to instance object.
|
|
2739
2742
|
instances: {},
|
|
2740
2743
|
loadUtils,
|
|
2741
|
-
version: "23.0.
|
|
2744
|
+
version: "23.0.8"
|
|
2742
2745
|
}
|
|
2743
2746
|
);
|
|
2744
2747
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2762,7 +2765,14 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
2762
2765
|
const inputRef = useRef(null);
|
|
2763
2766
|
const itiRef = useRef(null);
|
|
2764
2767
|
useImperativeHandle(ref, () => ({
|
|
2765
|
-
getInstance: () =>
|
|
2768
|
+
getInstance: () => ({
|
|
2769
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
2770
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
2771
|
+
setNumber: (num) => {
|
|
2772
|
+
itiRef.current?.setNumber(num);
|
|
2773
|
+
update();
|
|
2774
|
+
}
|
|
2775
|
+
}),
|
|
2766
2776
|
getInput: () => inputRef.current
|
|
2767
2777
|
}));
|
|
2768
2778
|
const update = () => {
|
|
@@ -2809,5 +2819,6 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
2809
2819
|
});
|
|
2810
2820
|
var react_default = IntlTelInput;
|
|
2811
2821
|
export {
|
|
2812
|
-
react_default as default
|
|
2822
|
+
react_default as default,
|
|
2823
|
+
intl_tel_input_default as intlTelInput
|
|
2813
2824
|
};
|
|
@@ -29,7 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// react/src/intl-tel-input/reactWithUtils.tsx
|
|
30
30
|
var reactWithUtils_exports = {};
|
|
31
31
|
__export(reactWithUtils_exports, {
|
|
32
|
-
default: () => reactWithUtils_default
|
|
32
|
+
default: () => reactWithUtils_default,
|
|
33
|
+
intlTelInput: () => intlTelInputWithUtils_default
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(reactWithUtils_exports);
|
|
35
36
|
|
|
@@ -1383,6 +1384,9 @@ var interface_default = {
|
|
|
1383
1384
|
var en_default = { ...countries_default, ...interface_default };
|
|
1384
1385
|
|
|
1385
1386
|
// src/js/intl-tel-input.ts
|
|
1387
|
+
for (let i = 0; i < data_default.length; i++) {
|
|
1388
|
+
data_default[i].name = en_default[data_default[i].iso2];
|
|
1389
|
+
}
|
|
1386
1390
|
var id = 0;
|
|
1387
1391
|
var defaults = {
|
|
1388
1392
|
//* Whether or not to allow the dropdown.
|
|
@@ -2773,7 +2777,7 @@ var intlTelInput = Object.assign(
|
|
|
2773
2777
|
//* A map from instance ID to instance object.
|
|
2774
2778
|
instances: {},
|
|
2775
2779
|
loadUtils,
|
|
2776
|
-
version: "23.0.
|
|
2780
|
+
version: "23.0.8"
|
|
2777
2781
|
}
|
|
2778
2782
|
);
|
|
2779
2783
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -8995,7 +8999,14 @@ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
|
|
|
8995
8999
|
const inputRef = (0, import_react.useRef)(null);
|
|
8996
9000
|
const itiRef = (0, import_react.useRef)(null);
|
|
8997
9001
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
8998
|
-
getInstance: () =>
|
|
9002
|
+
getInstance: () => ({
|
|
9003
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
9004
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
9005
|
+
setNumber: (num) => {
|
|
9006
|
+
itiRef.current?.setNumber(num);
|
|
9007
|
+
update();
|
|
9008
|
+
}
|
|
9009
|
+
}),
|
|
8999
9010
|
getInput: () => inputRef.current
|
|
9000
9011
|
}));
|
|
9001
9012
|
const update = () => {
|
|
@@ -1348,6 +1348,9 @@ var interface_default = {
|
|
|
1348
1348
|
var en_default = { ...countries_default, ...interface_default };
|
|
1349
1349
|
|
|
1350
1350
|
// src/js/intl-tel-input.ts
|
|
1351
|
+
for (let i = 0; i < data_default.length; i++) {
|
|
1352
|
+
data_default[i].name = en_default[data_default[i].iso2];
|
|
1353
|
+
}
|
|
1351
1354
|
var id = 0;
|
|
1352
1355
|
var defaults = {
|
|
1353
1356
|
//* Whether or not to allow the dropdown.
|
|
@@ -2738,7 +2741,7 @@ var intlTelInput = Object.assign(
|
|
|
2738
2741
|
//* A map from instance ID to instance object.
|
|
2739
2742
|
instances: {},
|
|
2740
2743
|
loadUtils,
|
|
2741
|
-
version: "23.0.
|
|
2744
|
+
version: "23.0.8"
|
|
2742
2745
|
}
|
|
2743
2746
|
);
|
|
2744
2747
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -8960,7 +8963,14 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
8960
8963
|
const inputRef = useRef(null);
|
|
8961
8964
|
const itiRef = useRef(null);
|
|
8962
8965
|
useImperativeHandle(ref, () => ({
|
|
8963
|
-
getInstance: () =>
|
|
8966
|
+
getInstance: () => ({
|
|
8967
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
8968
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
8969
|
+
setNumber: (num) => {
|
|
8970
|
+
itiRef.current?.setNumber(num);
|
|
8971
|
+
update();
|
|
8972
|
+
}
|
|
8973
|
+
}),
|
|
8964
8974
|
getInput: () => inputRef.current
|
|
8965
8975
|
}));
|
|
8966
8976
|
const update = () => {
|
|
@@ -9007,5 +9017,6 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
9007
9017
|
});
|
|
9008
9018
|
var reactWithUtils_default = IntlTelInput;
|
|
9009
9019
|
export {
|
|
9010
|
-
reactWithUtils_default as default
|
|
9020
|
+
reactWithUtils_default as default,
|
|
9021
|
+
intlTelInputWithUtils_default as intlTelInput
|
|
9011
9022
|
};
|