@descope/web-components-ui 1.0.372 → 1.0.374
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +21 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +21 -2
- 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/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-enriched-text/EnrichedTextClass.js +9 -1
- package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +4 -1
- package/src/theme/components/enrichedText.js +8 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -5487,7 +5487,6 @@ class EnrichedText extends createBaseClass({ componentName: componentName$F, bas
|
|
5487
5487
|
this.attachShadow({ mode: 'open' }).innerHTML = `
|
5488
5488
|
<style>
|
5489
5489
|
:host {
|
5490
|
-
display: inline-block;
|
5491
5490
|
line-height: 1em;
|
5492
5491
|
word-break: break-word;
|
5493
5492
|
}
|
@@ -5618,6 +5617,14 @@ class EnrichedText extends createBaseClass({ componentName: componentName$F, bas
|
|
5618
5617
|
|
5619
5618
|
let html = decodeHTML(this.innerHTML);
|
5620
5619
|
|
5620
|
+
if (!html) {
|
5621
|
+
this.setAttribute('empty', 'true');
|
5622
|
+
|
5623
|
+
return;
|
5624
|
+
}
|
5625
|
+
|
5626
|
+
this.removeAttribute('empty');
|
5627
|
+
|
5621
5628
|
try {
|
5622
5629
|
const tokens = this.processor.parse(html, { references: undefined });
|
5623
5630
|
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
@@ -5642,6 +5649,7 @@ const EnrichedTextClass = compose(
|
|
5642
5649
|
createStyleMixin({
|
5643
5650
|
mappings: {
|
5644
5651
|
hostWidth: { selector: () => ':host', property: 'width' },
|
5652
|
+
hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
|
5645
5653
|
hostDirection: { selector: () => ':host', property: 'direction' },
|
5646
5654
|
fontSize: {},
|
5647
5655
|
fontFamily: {},
|
@@ -5796,6 +5804,14 @@ const enrichedText = {
|
|
5796
5804
|
[vars$w.fontWeightBold]: '900',
|
5797
5805
|
[vars$w.minWidth]: '0.25em',
|
5798
5806
|
[vars$w.minHeight]: '1.35em',
|
5807
|
+
|
5808
|
+
[vars$w.hostDisplay]: 'inline-block',
|
5809
|
+
|
5810
|
+
_empty: {
|
5811
|
+
_hideWhenEmpty: {
|
5812
|
+
[vars$w.hostDisplay]: 'none',
|
5813
|
+
},
|
5814
|
+
},
|
5799
5815
|
};
|
5800
5816
|
|
5801
5817
|
var enrichedText$1 = /*#__PURE__*/Object.freeze({
|
@@ -12079,7 +12095,10 @@ const MappingsFieldClass = compose(
|
|
12079
12095
|
{ ...labelsText, property: 'line-height' },
|
12080
12096
|
{ ...labels, property: 'line-height' },
|
12081
12097
|
],
|
12082
|
-
labelTextColor:
|
12098
|
+
labelTextColor: [
|
12099
|
+
{ ...labels, property: TextClass.cssVarList.textColor },
|
12100
|
+
{ ...separator, property: 'color' },
|
12101
|
+
],
|
12083
12102
|
itemMarginBottom: { ...mappingItem, property: 'margin-bottom' },
|
12084
12103
|
valueLabelMinWidth: { ...valueLabel, property: 'min-width' },
|
12085
12104
|
attrLabelMinWidth: { ...attrLabel, property: 'min-width' },
|