@descope/web-components-ui 1.0.376 → 1.0.378

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -4320,14 +4320,12 @@ class EnrichedText extends createBaseClass({ componentName: componentName$G, bas
4320
4320
 
4321
4321
  let html = decodeHTML(this.innerHTML);
4322
4322
 
4323
- if (!html) {
4323
+ if (!html?.trim() && this.isConnected) {
4324
4324
  this.setAttribute('empty', 'true');
4325
-
4326
- return;
4325
+ } else {
4326
+ this.removeAttribute('empty');
4327
4327
  }
4328
4328
 
4329
- this.removeAttribute('empty');
4330
-
4331
4329
  try {
4332
4330
  const tokens = this.processor.parse(html, { references: undefined });
4333
4331
  html = this.processor.renderer.render(tokens, { html: true, breaks: true });
@@ -6253,9 +6251,9 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$6 {
6253
6251
  }
6254
6252
 
6255
6253
  set value(val) {
6256
- const parsed = parsePhone(val);
6257
- const countryCode = `+${parsed.countryCallingCode}`;
6258
- const phoneNumber = parsed.nationalNumber;
6254
+ const parsed = parsePhone(val || '');
6255
+ const countryCode = parsed?.countryCallingCode ? `+${parsed.countryCallingCode}` : '';
6256
+ const phoneNumber = parsed?.nationalNumber || '';
6259
6257
 
6260
6258
  if (countryCode) {
6261
6259
  const countryCodeItem = this.getCountryByDialCode(countryCode);