intl-tel-input 23.0.8 → 23.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "23.0.8",
3
+ "version": "23.0.9",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "homepage": "https://intl-tel-input.com",
85
85
  "scripts": {
86
- "test": "grunt travis",
86
+ "test": "grunt travis && jest",
87
87
  "jest": "jest",
88
88
  "lint:js": "eslint .",
89
89
  "lint:spelling": "cspell --dot --gitignore --no-progress '**'",
@@ -2729,6 +2729,7 @@ var Iti = class {
2729
2729
  if (countryChanged) {
2730
2730
  this._triggerCountryChange();
2731
2731
  }
2732
+ this._trigger("input");
2732
2733
  }
2733
2734
  //* Set the placeholder number typ
2734
2735
  setPlaceholderNumberType(type) {
@@ -2777,7 +2778,7 @@ var intlTelInput = Object.assign(
2777
2778
  //* A map from instance ID to instance object.
2778
2779
  instances: {},
2779
2780
  loadUtils,
2780
- version: "23.0.8"
2781
+ version: "23.0.9"
2781
2782
  }
2782
2783
  );
2783
2784
  var intl_tel_input_default = intlTelInput;
@@ -2801,14 +2802,7 @@ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
2801
2802
  const inputRef = (0, import_react.useRef)(null);
2802
2803
  const itiRef = (0, import_react.useRef)(null);
2803
2804
  (0, import_react.useImperativeHandle)(ref, () => ({
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
- }),
2805
+ getInstance: () => itiRef.current,
2812
2806
  getInput: () => inputRef.current
2813
2807
  }));
2814
2808
  const update = () => {
@@ -2693,6 +2693,7 @@ var Iti = class {
2693
2693
  if (countryChanged) {
2694
2694
  this._triggerCountryChange();
2695
2695
  }
2696
+ this._trigger("input");
2696
2697
  }
2697
2698
  //* Set the placeholder number typ
2698
2699
  setPlaceholderNumberType(type) {
@@ -2741,7 +2742,7 @@ var intlTelInput = Object.assign(
2741
2742
  //* A map from instance ID to instance object.
2742
2743
  instances: {},
2743
2744
  loadUtils,
2744
- version: "23.0.8"
2745
+ version: "23.0.9"
2745
2746
  }
2746
2747
  );
2747
2748
  var intl_tel_input_default = intlTelInput;
@@ -2765,14 +2766,7 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
2765
2766
  const inputRef = useRef(null);
2766
2767
  const itiRef = useRef(null);
2767
2768
  useImperativeHandle(ref, () => ({
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
- }),
2769
+ getInstance: () => itiRef.current,
2776
2770
  getInput: () => inputRef.current
2777
2771
  }));
2778
2772
  const update = () => {
@@ -2729,6 +2729,7 @@ var Iti = class {
2729
2729
  if (countryChanged) {
2730
2730
  this._triggerCountryChange();
2731
2731
  }
2732
+ this._trigger("input");
2732
2733
  }
2733
2734
  //* Set the placeholder number typ
2734
2735
  setPlaceholderNumberType(type) {
@@ -2777,7 +2778,7 @@ var intlTelInput = Object.assign(
2777
2778
  //* A map from instance ID to instance object.
2778
2779
  instances: {},
2779
2780
  loadUtils,
2780
- version: "23.0.8"
2781
+ version: "23.0.9"
2781
2782
  }
2782
2783
  );
2783
2784
  var intl_tel_input_default = intlTelInput;
@@ -8999,14 +9000,7 @@ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
8999
9000
  const inputRef = (0, import_react.useRef)(null);
9000
9001
  const itiRef = (0, import_react.useRef)(null);
9001
9002
  (0, import_react.useImperativeHandle)(ref, () => ({
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
- }),
9003
+ getInstance: () => itiRef.current,
9010
9004
  getInput: () => inputRef.current
9011
9005
  }));
9012
9006
  const update = () => {
@@ -2693,6 +2693,7 @@ var Iti = class {
2693
2693
  if (countryChanged) {
2694
2694
  this._triggerCountryChange();
2695
2695
  }
2696
+ this._trigger("input");
2696
2697
  }
2697
2698
  //* Set the placeholder number typ
2698
2699
  setPlaceholderNumberType(type) {
@@ -2741,7 +2742,7 @@ var intlTelInput = Object.assign(
2741
2742
  //* A map from instance ID to instance object.
2742
2743
  instances: {},
2743
2744
  loadUtils,
2744
- version: "23.0.8"
2745
+ version: "23.0.9"
2745
2746
  }
2746
2747
  );
2747
2748
  var intl_tel_input_default = intlTelInput;
@@ -8963,14 +8964,7 @@ var IntlTelInput = forwardRef(function IntlTelInput2({
8963
8964
  const inputRef = useRef(null);
8964
8965
  const itiRef = useRef(null);
8965
8966
  useImperativeHandle(ref, () => ({
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
- }),
8967
+ getInstance: () => itiRef.current,
8974
8968
  getInput: () => inputRef.current
8975
8969
  }));
8976
8970
  const update = () => {