monkey-style-guide-v2 0.0.64 → 0.0.66

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.
@@ -16,9 +16,8 @@ import { HttpClient } from '@angular/common/http';
16
16
  import { format, parseISO, addYears, subYears, subMonths, addMonths, getMonth, getYear, startOfWeek, startOfMonth, endOfWeek, endOfMonth, isSameMonth, isBefore, isAfter, isToday, addDays, isWithinInterval, subDays } from 'date-fns';
17
17
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
18
18
  import { getSupportedInputTypes } from '@angular/cdk/platform';
19
- import parsePhoneNumberFromString, { getCountries, getCountryCallingCode, getExampleNumber, AsYouType } from 'libphonenumber-js';
19
+ import parsePhoneNumberFromString, { getCountries, getCountryCallingCode, getExampleNumber, AsYouType, isValidPhoneNumber } from 'libphonenumber-js';
20
20
  import examples from 'libphonenumber-js/examples.mobile.json';
21
- import { isValidPhoneNumber } from 'libphonenumber-js/max';
22
21
  import { hasModifierKey } from '@angular/cdk/keycodes';
23
22
 
24
23
  const counters = {};
@@ -2764,7 +2763,7 @@ class MonkeyAutocompleteAddressComponent {
2764
2763
  }
2765
2764
  _onBlur(event) {
2766
2765
  const next = event?.relatedTarget;
2767
- if (next && this.containerWrapper.nativeElement.contains(next)) {
2766
+ if (next && this.containerWrapper?.nativeElement?.contains(next)) {
2768
2767
  return;
2769
2768
  }
2770
2769
  this.focused = false;
@@ -5650,7 +5649,7 @@ class MonkeyInputPhoneComponent {
5650
5649
  getCountryByCallingCode(code) {
5651
5650
  const cleanCode = code.replace('+', '');
5652
5651
  return (getCountries().find((country) => {
5653
- return getCountryCallingCode(country) === cleanCode || country === code;
5652
+ return getCountryCallingCode(country) === cleanCode;
5654
5653
  }) || null);
5655
5654
  }
5656
5655
  isoToFlagEmoji(isoCode) {
@@ -5686,9 +5685,6 @@ class MonkeyInputPhoneComponent {
5686
5685
  phoneAllowed: example?.nationalNumber
5687
5686
  });
5688
5687
  }
5689
- else {
5690
- this.ngControl?.control?.setErrors(null);
5691
- }
5692
5688
  }
5693
5689
  formatValue(value, changedCountry = false) {
5694
5690
  if (!value) {