@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/cjs/index.cjs.js +3 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-enriched-text-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-enriched-text/EnrichedTextClass.js +3 -5
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +3 -3
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
|
-
|
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
|
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);
|