@descope/web-components-ui 1.0.372 → 1.0.374
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/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/index.esm.js
CHANGED
@@ -4183,7 +4183,6 @@ class EnrichedText extends createBaseClass({ componentName: componentName$G, bas
|
|
4183
4183
|
this.attachShadow({ mode: 'open' }).innerHTML = `
|
4184
4184
|
<style>
|
4185
4185
|
:host {
|
4186
|
-
display: inline-block;
|
4187
4186
|
line-height: 1em;
|
4188
4187
|
word-break: break-word;
|
4189
4188
|
}
|
@@ -4314,6 +4313,14 @@ class EnrichedText extends createBaseClass({ componentName: componentName$G, bas
|
|
4314
4313
|
|
4315
4314
|
let html = decodeHTML(this.innerHTML);
|
4316
4315
|
|
4316
|
+
if (!html) {
|
4317
|
+
this.setAttribute('empty', 'true');
|
4318
|
+
|
4319
|
+
return;
|
4320
|
+
}
|
4321
|
+
|
4322
|
+
this.removeAttribute('empty');
|
4323
|
+
|
4317
4324
|
try {
|
4318
4325
|
const tokens = this.processor.parse(html, { references: undefined });
|
4319
4326
|
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
@@ -4338,6 +4345,7 @@ const EnrichedTextClass = compose(
|
|
4338
4345
|
createStyleMixin({
|
4339
4346
|
mappings: {
|
4340
4347
|
hostWidth: { selector: () => ':host', property: 'width' },
|
4348
|
+
hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
|
4341
4349
|
hostDirection: { selector: () => ':host', property: 'direction' },
|
4342
4350
|
fontSize: {},
|
4343
4351
|
fontFamily: {},
|
@@ -11120,7 +11128,10 @@ const MappingsFieldClass = compose(
|
|
11120
11128
|
{ ...labelsText, property: 'line-height' },
|
11121
11129
|
{ ...labels, property: 'line-height' },
|
11122
11130
|
],
|
11123
|
-
labelTextColor:
|
11131
|
+
labelTextColor: [
|
11132
|
+
{ ...labels, property: TextClass.cssVarList.textColor },
|
11133
|
+
{ ...separator, property: 'color' },
|
11134
|
+
],
|
11124
11135
|
itemMarginBottom: { ...mappingItem, property: 'margin-bottom' },
|
11125
11136
|
valueLabelMinWidth: { ...valueLabel, property: 'min-width' },
|
11126
11137
|
attrLabelMinWidth: { ...attrLabel, property: 'min-width' },
|
@@ -14021,6 +14032,14 @@ const enrichedText = {
|
|
14021
14032
|
[vars$w.fontWeightBold]: '900',
|
14022
14033
|
[vars$w.minWidth]: '0.25em',
|
14023
14034
|
[vars$w.minHeight]: '1.35em',
|
14035
|
+
|
14036
|
+
[vars$w.hostDisplay]: 'inline-block',
|
14037
|
+
|
14038
|
+
_empty: {
|
14039
|
+
_hideWhenEmpty: {
|
14040
|
+
[vars$w.hostDisplay]: 'none',
|
14041
|
+
},
|
14042
|
+
},
|
14024
14043
|
};
|
14025
14044
|
|
14026
14045
|
var enrichedText$1 = /*#__PURE__*/Object.freeze({
|