monkey-style-guide-v2 0.0.56 → 0.0.58

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.
@@ -5649,7 +5649,7 @@ class MonkeyInputPhoneComponent {
5649
5649
  getCountryByCallingCode(code) {
5650
5650
  const cleanCode = code.replace('+', '');
5651
5651
  return (getCountries().find((country) => {
5652
- return getCountryCallingCode(country) === cleanCode;
5652
+ return getCountryCallingCode(country) === cleanCode || country === code;
5653
5653
  }) || null);
5654
5654
  }
5655
5655
  isoToFlagEmoji(isoCode) {
@@ -5699,15 +5699,15 @@ class MonkeyInputPhoneComponent {
5699
5699
  }
5700
5700
  console.log('--1');
5701
5701
  const detectedCallingCode = this.getCountryFromPhoneNumber(value, changedCountry);
5702
- console.log('--2');
5702
+ console.log('--2', detectedCallingCode);
5703
5703
  const isCountryChanged = changedCountry || detectedCallingCode !== this.selectedCallingCode;
5704
- console.log('--3');
5704
+ console.log('--3', isCountryChanged);
5705
5705
  if (isCountryChanged && detectedCallingCode) {
5706
5706
  this.selectedCallingCode = detectedCallingCode;
5707
5707
  }
5708
- console.log('--4');
5708
+ console.log('--4', this.selectedCallingCode);
5709
5709
  const countryCode = this.getCountryByCallingCode(this.selectedCallingCode);
5710
- console.log('--5');
5710
+ console.log('--5', countryCode);
5711
5711
  if (!countryCode) {
5712
5712
  this.phoneFormatted = value;
5713
5713
  this.phoneValid = false;