intl-tel-input 23.0.6 → 23.0.7
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 +2 -2
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +2 -2
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/build/IntlTelInput.cjs +11 -3
- package/react/build/IntlTelInput.d.ts +4 -0
- package/react/build/IntlTelInput.js +11 -3
- package/react/build/IntlTelInputWithUtils.cjs +11 -3
- package/react/build/IntlTelInputWithUtils.js +11 -3
package/package.json
CHANGED
|
@@ -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
|
|
|
@@ -2773,7 +2774,7 @@ var intlTelInput = Object.assign(
|
|
|
2773
2774
|
//* A map from instance ID to instance object.
|
|
2774
2775
|
instances: {},
|
|
2775
2776
|
loadUtils,
|
|
2776
|
-
version: "23.0.
|
|
2777
|
+
version: "23.0.7"
|
|
2777
2778
|
}
|
|
2778
2779
|
);
|
|
2779
2780
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2797,7 +2798,14 @@ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
|
|
|
2797
2798
|
const inputRef = (0, import_react.useRef)(null);
|
|
2798
2799
|
const itiRef = (0, import_react.useRef)(null);
|
|
2799
2800
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
2800
|
-
getInstance: () =>
|
|
2801
|
+
getInstance: () => ({
|
|
2802
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
2803
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
2804
|
+
setNumber: (num) => {
|
|
2805
|
+
itiRef.current?.setNumber(num);
|
|
2806
|
+
update();
|
|
2807
|
+
}
|
|
2808
|
+
}),
|
|
2801
2809
|
getInput: () => inputRef.current
|
|
2802
2810
|
}));
|
|
2803
2811
|
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;
|
|
@@ -2738,7 +2738,7 @@ var intlTelInput = Object.assign(
|
|
|
2738
2738
|
//* A map from instance ID to instance object.
|
|
2739
2739
|
instances: {},
|
|
2740
2740
|
loadUtils,
|
|
2741
|
-
version: "23.0.
|
|
2741
|
+
version: "23.0.7"
|
|
2742
2742
|
}
|
|
2743
2743
|
);
|
|
2744
2744
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -2762,7 +2762,14 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
2762
2762
|
const inputRef = useRef(null);
|
|
2763
2763
|
const itiRef = useRef(null);
|
|
2764
2764
|
useImperativeHandle(ref, () => ({
|
|
2765
|
-
getInstance: () =>
|
|
2765
|
+
getInstance: () => ({
|
|
2766
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
2767
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
2768
|
+
setNumber: (num) => {
|
|
2769
|
+
itiRef.current?.setNumber(num);
|
|
2770
|
+
update();
|
|
2771
|
+
}
|
|
2772
|
+
}),
|
|
2766
2773
|
getInput: () => inputRef.current
|
|
2767
2774
|
}));
|
|
2768
2775
|
const update = () => {
|
|
@@ -2809,5 +2816,6 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
2809
2816
|
});
|
|
2810
2817
|
var react_default = IntlTelInput;
|
|
2811
2818
|
export {
|
|
2812
|
-
react_default as default
|
|
2819
|
+
react_default as default,
|
|
2820
|
+
intl_tel_input_default as intlTelInput
|
|
2813
2821
|
};
|
|
@@ -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
|
|
|
@@ -2773,7 +2774,7 @@ var intlTelInput = Object.assign(
|
|
|
2773
2774
|
//* A map from instance ID to instance object.
|
|
2774
2775
|
instances: {},
|
|
2775
2776
|
loadUtils,
|
|
2776
|
-
version: "23.0.
|
|
2777
|
+
version: "23.0.7"
|
|
2777
2778
|
}
|
|
2778
2779
|
);
|
|
2779
2780
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -8995,7 +8996,14 @@ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
|
|
|
8995
8996
|
const inputRef = (0, import_react.useRef)(null);
|
|
8996
8997
|
const itiRef = (0, import_react.useRef)(null);
|
|
8997
8998
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
8998
|
-
getInstance: () =>
|
|
8999
|
+
getInstance: () => ({
|
|
9000
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
9001
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
9002
|
+
setNumber: (num) => {
|
|
9003
|
+
itiRef.current?.setNumber(num);
|
|
9004
|
+
update();
|
|
9005
|
+
}
|
|
9006
|
+
}),
|
|
8999
9007
|
getInput: () => inputRef.current
|
|
9000
9008
|
}));
|
|
9001
9009
|
const update = () => {
|
|
@@ -2738,7 +2738,7 @@ var intlTelInput = Object.assign(
|
|
|
2738
2738
|
//* A map from instance ID to instance object.
|
|
2739
2739
|
instances: {},
|
|
2740
2740
|
loadUtils,
|
|
2741
|
-
version: "23.0.
|
|
2741
|
+
version: "23.0.7"
|
|
2742
2742
|
}
|
|
2743
2743
|
);
|
|
2744
2744
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -8960,7 +8960,14 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
8960
8960
|
const inputRef = useRef(null);
|
|
8961
8961
|
const itiRef = useRef(null);
|
|
8962
8962
|
useImperativeHandle(ref, () => ({
|
|
8963
|
-
getInstance: () =>
|
|
8963
|
+
getInstance: () => ({
|
|
8964
|
+
setCountry: (country) => itiRef.current?.setCountry(country),
|
|
8965
|
+
// override setNumber to also call update, to trigger onChangeNumber etc
|
|
8966
|
+
setNumber: (num) => {
|
|
8967
|
+
itiRef.current?.setNumber(num);
|
|
8968
|
+
update();
|
|
8969
|
+
}
|
|
8970
|
+
}),
|
|
8964
8971
|
getInput: () => inputRef.current
|
|
8965
8972
|
}));
|
|
8966
8973
|
const update = () => {
|
|
@@ -9007,5 +9014,6 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
|
|
|
9007
9014
|
});
|
|
9008
9015
|
var reactWithUtils_default = IntlTelInput;
|
|
9009
9016
|
export {
|
|
9010
|
-
reactWithUtils_default as default
|
|
9017
|
+
reactWithUtils_default as default,
|
|
9018
|
+
intlTelInputWithUtils_default as intlTelInput
|
|
9011
9019
|
};
|