@descope/web-components-ui 1.46.0 → 1.47.0

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/dist/index.esm.js CHANGED
@@ -10481,15 +10481,15 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$8 {
10481
10481
  const parsed = parsePhoneNumberFromString(this.value);
10482
10482
 
10483
10483
  return (
10484
- parsed && // Parsed successfully (not undefined)
10485
- parsed.isValid?.() && // Parsed object is valid
10486
- parsed.country && // Parsed object with a country code
10487
- this.#isAllowedCountry(parsed.country) // Parsed with allowed country code
10484
+ !!parsed && // Parsed successfully (not undefined)
10485
+ !!parsed.isValid?.() && // Parsed object is valid
10486
+ !!parsed.country && // Parsed object with a country code
10487
+ !!this.#isAllowedCountry(parsed.country) // Parsed with allowed country code
10488
10488
  );
10489
10489
  }
10490
10490
 
10491
10491
  #isAllowedCountry(countryCode) {
10492
- if (!this.restrictCountries) {
10492
+ if (!this.restrictCountries.length) {
10493
10493
  return true;
10494
10494
  }
10495
10495
 
@@ -11101,16 +11101,16 @@ class PhoneFieldInternal extends BaseInputClass$7 {
11101
11101
  #isValidParsedValue() {
11102
11102
  const parsed = parsePhoneNumberFromString$1(this.value);
11103
11103
  return (
11104
- parsed && // parsed successfully (not undefined)
11105
- parsed.isValid?.() && // Parsed object is valid
11106
- parsed.country && // Parsed object with a country code
11107
- this.#isAllowedCountry(parsed.country) && // Parsed with allowed country code
11104
+ !!parsed && // parsed successfully (not undefined)
11105
+ !!parsed.isValid?.() && // Parsed object is valid
11106
+ !!parsed.country && // Parsed object with a country code
11107
+ !!this.#isAllowedCountry(parsed.country) && // Parsed with allowed country code
11108
11108
  (this.defaultCode ? this.defaultCode === parsed.country : true) // In case default country code is set validate parsed country matches it
11109
11109
  );
11110
11110
  }
11111
11111
 
11112
11112
  #isAllowedCountry(countryCode) {
11113
- if (!this.restrictCountries) {
11113
+ if (!this.restrictCountries.length) {
11114
11114
  return true;
11115
11115
  }
11116
11116