@descope/flow-components 2.1.18 → 2.2.1
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/fm/222.js +1 -1
- package/dist/fm/921.js +1 -1
- package/dist/fm/985.js +1 -1
- package/dist/fm/996.js +1 -1
- package/dist/fm/@mf-types.zip +0 -0
- package/dist/fm/__federation_expose_componentClasses.js +1 -1
- package/dist/fm/__federation_expose_components.js +1 -1
- package/dist/fm/__federation_expose_theme.js +1 -1
- package/dist/fm/flowComponents.js +1 -1
- package/dist/fm/main.js +1 -1
- package/dist/fm/mf-manifest.json +1 -1
- package/dist/fm/mf-stats.json +1 -1
- package/dist/index.cjs.js +290 -255
- package/package.json +7 -7
package/dist/index.cjs.js
CHANGED
|
@@ -85660,6 +85660,230 @@ function requireIndex_cjs () {
|
|
|
85660
85660
|
vars: vars$Y
|
|
85661
85661
|
});
|
|
85662
85662
|
|
|
85663
|
+
const disableRules = [
|
|
85664
|
+
'blockquote',
|
|
85665
|
+
'list',
|
|
85666
|
+
'image',
|
|
85667
|
+
'table',
|
|
85668
|
+
'code',
|
|
85669
|
+
'hr',
|
|
85670
|
+
'backticks',
|
|
85671
|
+
'fence',
|
|
85672
|
+
'reference',
|
|
85673
|
+
'heading',
|
|
85674
|
+
'lheading',
|
|
85675
|
+
'html_block',
|
|
85676
|
+
];
|
|
85677
|
+
|
|
85678
|
+
const decodeHTML = (html) => {
|
|
85679
|
+
const textArea = document.createElement('textarea');
|
|
85680
|
+
textArea.innerHTML = html;
|
|
85681
|
+
return textArea.value;
|
|
85682
|
+
};
|
|
85683
|
+
|
|
85684
|
+
/* eslint-disable no-param-reassign */
|
|
85685
|
+
|
|
85686
|
+
|
|
85687
|
+
const componentName$16 = getComponentName('enriched-text');
|
|
85688
|
+
|
|
85689
|
+
class EnrichedText extends createBaseClass$1({ componentName: componentName$16, baseSelector: ':host > div' }) {
|
|
85690
|
+
#origLinkRenderer;
|
|
85691
|
+
|
|
85692
|
+
#origEmRenderer;
|
|
85693
|
+
|
|
85694
|
+
constructor() {
|
|
85695
|
+
super();
|
|
85696
|
+
|
|
85697
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
|
85698
|
+
<div class="content"></div>
|
|
85699
|
+
`;
|
|
85700
|
+
|
|
85701
|
+
injectStyle(
|
|
85702
|
+
`
|
|
85703
|
+
:host {
|
|
85704
|
+
line-height: 1em;
|
|
85705
|
+
word-break: break-word;
|
|
85706
|
+
}
|
|
85707
|
+
:host > slot {
|
|
85708
|
+
width: 100%;
|
|
85709
|
+
display: inline-block;
|
|
85710
|
+
}
|
|
85711
|
+
*, *:last-child {
|
|
85712
|
+
margin: 0;
|
|
85713
|
+
}
|
|
85714
|
+
h1,
|
|
85715
|
+
h2,
|
|
85716
|
+
h3,
|
|
85717
|
+
h4,
|
|
85718
|
+
h5,
|
|
85719
|
+
h6,
|
|
85720
|
+
p {
|
|
85721
|
+
margin-bottom: 1em;
|
|
85722
|
+
}
|
|
85723
|
+
a {
|
|
85724
|
+
cursor: pointer;
|
|
85725
|
+
}
|
|
85726
|
+
blockquote {
|
|
85727
|
+
padding: 0 2em;
|
|
85728
|
+
}
|
|
85729
|
+
u {
|
|
85730
|
+
text-decoration: underline
|
|
85731
|
+
}
|
|
85732
|
+
s {
|
|
85733
|
+
color: currentColor;
|
|
85734
|
+
}
|
|
85735
|
+
`,
|
|
85736
|
+
this
|
|
85737
|
+
);
|
|
85738
|
+
|
|
85739
|
+
this.#initProcessor();
|
|
85740
|
+
|
|
85741
|
+
observeChildren(this, this.#parseChildren.bind(this));
|
|
85742
|
+
}
|
|
85743
|
+
|
|
85744
|
+
static get observedAttributes() {
|
|
85745
|
+
return ['readonly', 'link-target-blank'];
|
|
85746
|
+
}
|
|
85747
|
+
|
|
85748
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
85749
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
|
85750
|
+
|
|
85751
|
+
if (newValue !== oldValue) {
|
|
85752
|
+
if (attrName === 'readonly') {
|
|
85753
|
+
this.onReadOnlyChange(newValue === 'true');
|
|
85754
|
+
}
|
|
85755
|
+
|
|
85756
|
+
if (attrName === 'link-target-blank') {
|
|
85757
|
+
this.#initProcessor();
|
|
85758
|
+
}
|
|
85759
|
+
}
|
|
85760
|
+
}
|
|
85761
|
+
|
|
85762
|
+
// We're overriding the rule for em with single underscore to perform as underline. (_underline_)
|
|
85763
|
+
customUnderlineRenderer() {
|
|
85764
|
+
this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {
|
|
85765
|
+
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
85766
|
+
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
85767
|
+
};
|
|
85768
|
+
this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {
|
|
85769
|
+
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
85770
|
+
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
85771
|
+
};
|
|
85772
|
+
}
|
|
85773
|
+
|
|
85774
|
+
#customizeLinkRenderer() {
|
|
85775
|
+
if (this.linkTargetBlank) {
|
|
85776
|
+
this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {
|
|
85777
|
+
// Add a new `target` attribute, or replace the value of the existing one.
|
|
85778
|
+
tokens[idx].attrSet('target', '_blank');
|
|
85779
|
+
// Pass the token to the default renderer.
|
|
85780
|
+
return this.#origLinkRenderer(tokens, idx, options, env, self);
|
|
85781
|
+
};
|
|
85782
|
+
} else {
|
|
85783
|
+
this.processor.renderer.rules.link_open = this.#origLinkRenderer;
|
|
85784
|
+
}
|
|
85785
|
+
}
|
|
85786
|
+
|
|
85787
|
+
#disableCustomRules() {
|
|
85788
|
+
if (!this.processor) {
|
|
85789
|
+
return;
|
|
85790
|
+
}
|
|
85791
|
+
this.processor.disable(disableRules);
|
|
85792
|
+
}
|
|
85793
|
+
|
|
85794
|
+
#updateProcessorRules() {
|
|
85795
|
+
this.#disableCustomRules();
|
|
85796
|
+
}
|
|
85797
|
+
|
|
85798
|
+
#storeOrigRenderers() {
|
|
85799
|
+
const defaultLinkRenderer = (tokens, idx, options, _, self) =>
|
|
85800
|
+
self.renderToken(tokens, idx, options);
|
|
85801
|
+
this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;
|
|
85802
|
+
|
|
85803
|
+
const defaultStrongRenderer = (tokens, idx, options, _, self) =>
|
|
85804
|
+
self.renderToken(tokens, idx, options);
|
|
85805
|
+
this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;
|
|
85806
|
+
}
|
|
85807
|
+
|
|
85808
|
+
#initProcessor() {
|
|
85809
|
+
this.processor = new MarkdownIt('commonmark', { html: true });
|
|
85810
|
+
this.#storeOrigRenderers();
|
|
85811
|
+
this.#updateProcessorRules();
|
|
85812
|
+
this.#customizeLinkRenderer();
|
|
85813
|
+
this.customUnderlineRenderer();
|
|
85814
|
+
}
|
|
85815
|
+
|
|
85816
|
+
get linkTargetBlank() {
|
|
85817
|
+
return this.getAttribute('link-target-blank') === 'true';
|
|
85818
|
+
}
|
|
85819
|
+
|
|
85820
|
+
get contentNode() {
|
|
85821
|
+
return this.shadowRoot.querySelector('.content');
|
|
85822
|
+
}
|
|
85823
|
+
|
|
85824
|
+
#parseChildren() {
|
|
85825
|
+
if (!this.processor) {
|
|
85826
|
+
return;
|
|
85827
|
+
}
|
|
85828
|
+
|
|
85829
|
+
let html = decodeHTML(this.innerHTML);
|
|
85830
|
+
|
|
85831
|
+
if (!html?.trim() && this.isConnected) {
|
|
85832
|
+
this.setAttribute('empty', 'true');
|
|
85833
|
+
} else {
|
|
85834
|
+
this.removeAttribute('empty');
|
|
85835
|
+
}
|
|
85836
|
+
|
|
85837
|
+
try {
|
|
85838
|
+
const tokens = this.processor.parse(html, { references: undefined });
|
|
85839
|
+
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
|
85840
|
+
} catch (e) {
|
|
85841
|
+
// eslint-disable-next-line no-console
|
|
85842
|
+
console.warn('Not parsing invalid markdown token');
|
|
85843
|
+
}
|
|
85844
|
+
|
|
85845
|
+
this.contentNode.innerHTML = html;
|
|
85846
|
+
this.contentNode.firstChild?.setAttribute('part', 'content');
|
|
85847
|
+
}
|
|
85848
|
+
|
|
85849
|
+
onReadOnlyChange(isReadOnly) {
|
|
85850
|
+
if (isReadOnly) {
|
|
85851
|
+
this.contentNode.setAttribute('inert', isReadOnly);
|
|
85852
|
+
} else {
|
|
85853
|
+
this.contentNode.removeAttribute('inert');
|
|
85854
|
+
}
|
|
85855
|
+
}
|
|
85856
|
+
}
|
|
85857
|
+
|
|
85858
|
+
const EnrichedTextClass = compose(
|
|
85859
|
+
createStyleMixin$1({
|
|
85860
|
+
mappings: {
|
|
85861
|
+
hostWidth: { selector: () => ':host', property: 'width' },
|
|
85862
|
+
hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
|
|
85863
|
+
hostDirection: { selector: () => ':host', property: 'direction' },
|
|
85864
|
+
fontSize: {},
|
|
85865
|
+
fontFamily: {},
|
|
85866
|
+
fontWeight: {},
|
|
85867
|
+
fontWeightBold: [
|
|
85868
|
+
{ selector: () => ':host strong', property: 'font-weight' },
|
|
85869
|
+
{ selector: () => ':host b', property: 'font-weight' },
|
|
85870
|
+
],
|
|
85871
|
+
textColor: { property: 'color' },
|
|
85872
|
+
textLineHeight: { property: 'line-height' },
|
|
85873
|
+
textAlign: {},
|
|
85874
|
+
linkColor: { selector: 'a', property: 'color' },
|
|
85875
|
+
linkTextDecoration: { selector: 'a', property: 'text-decoration' },
|
|
85876
|
+
linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },
|
|
85877
|
+
minHeight: {},
|
|
85878
|
+
minWidth: {},
|
|
85879
|
+
},
|
|
85880
|
+
}),
|
|
85881
|
+
createStyleMixin$1({ componentNameOverride: getComponentName('link') }),
|
|
85882
|
+
createStyleMixin$1({ componentNameOverride: getComponentName('text') }),
|
|
85883
|
+
draggableMixin$1,
|
|
85884
|
+
componentNameValidationMixin$1
|
|
85885
|
+
)(EnrichedText);
|
|
85886
|
+
|
|
85663
85887
|
const createBaseInputClass = (...args) =>
|
|
85664
85888
|
compose$1(
|
|
85665
85889
|
inputValidationMixin,
|
|
@@ -85668,9 +85892,9 @@ function requireIndex_cjs () {
|
|
|
85668
85892
|
inputEventsDispatchingMixin
|
|
85669
85893
|
)(createBaseClass(...args));
|
|
85670
85894
|
|
|
85671
|
-
const componentName$
|
|
85895
|
+
const componentName$15 = getComponentName$1('boolean-field-internal');
|
|
85672
85896
|
|
|
85673
|
-
createBaseInputClass({ componentName: componentName$
|
|
85897
|
+
createBaseInputClass({ componentName: componentName$15, baseSelector: 'div' });
|
|
85674
85898
|
|
|
85675
85899
|
const booleanFieldMixin = (superclass) =>
|
|
85676
85900
|
class BooleanFieldMixinClass extends superclass {
|
|
@@ -85679,14 +85903,14 @@ function requireIndex_cjs () {
|
|
|
85679
85903
|
|
|
85680
85904
|
const template = document.createElement('template');
|
|
85681
85905
|
template.innerHTML = `
|
|
85682
|
-
<${componentName$
|
|
85906
|
+
<${componentName$15}
|
|
85683
85907
|
tabindex="-1"
|
|
85684
85908
|
slot="input"
|
|
85685
|
-
></${componentName$
|
|
85909
|
+
></${componentName$15}>
|
|
85686
85910
|
`;
|
|
85687
85911
|
|
|
85688
85912
|
this.baseElement.appendChild(template.content.cloneNode(true));
|
|
85689
|
-
this.inputElement = this.shadowRoot.querySelector(componentName$
|
|
85913
|
+
this.inputElement = this.shadowRoot.querySelector(componentName$15);
|
|
85690
85914
|
this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
|
|
85691
85915
|
|
|
85692
85916
|
forwardAttrs$1(this, this.inputElement, {
|
|
@@ -85706,7 +85930,7 @@ function requireIndex_cjs () {
|
|
|
85706
85930
|
}
|
|
85707
85931
|
};
|
|
85708
85932
|
|
|
85709
|
-
var commonStyles = `
|
|
85933
|
+
var commonStyles = (cssVarList) => `
|
|
85710
85934
|
:host {
|
|
85711
85935
|
display: inline-flex;
|
|
85712
85936
|
}
|
|
@@ -85753,9 +85977,18 @@ descope-boolean-field-internal {
|
|
|
85753
85977
|
-webkit-mask-image: none;
|
|
85754
85978
|
min-height: initial;
|
|
85755
85979
|
}
|
|
85980
|
+
|
|
85981
|
+
descope-enriched-text[empty] {
|
|
85982
|
+
${EnrichedTextClass.cssVarList.hostDisplay}: none;
|
|
85983
|
+
}
|
|
85984
|
+
|
|
85985
|
+
descope-enriched-text {
|
|
85986
|
+
${EnrichedTextClass.cssVarList.hostDirection}: var(${cssVarList.hostDirection});
|
|
85987
|
+
}
|
|
85988
|
+
|
|
85756
85989
|
`;
|
|
85757
85990
|
|
|
85758
|
-
const componentName$
|
|
85991
|
+
const componentName$14 = getComponentName$1('checkbox');
|
|
85759
85992
|
|
|
85760
85993
|
const {
|
|
85761
85994
|
host: host$s,
|
|
@@ -85768,7 +86001,9 @@ descope-boolean-field-internal {
|
|
|
85768
86001
|
errorMessage: errorMessage$a,
|
|
85769
86002
|
} = {
|
|
85770
86003
|
host: { selector: () => ':host' },
|
|
85771
|
-
requiredIndicator: {
|
|
86004
|
+
requiredIndicator: {
|
|
86005
|
+
selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after',
|
|
86006
|
+
},
|
|
85772
86007
|
component: { selector: 'vaadin-checkbox' },
|
|
85773
86008
|
checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },
|
|
85774
86009
|
checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },
|
|
@@ -85814,6 +86049,16 @@ descope-boolean-field-internal {
|
|
|
85814
86049
|
inputOutlineColor: { ...checkboxElement, property: 'outline-color' },
|
|
85815
86050
|
inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },
|
|
85816
86051
|
|
|
86052
|
+
inputContainerPadding: { ...component$1, property: 'padding' },
|
|
86053
|
+
inputContainerBorderRadius: { ...component$1, property: 'border-radius' },
|
|
86054
|
+
inputContainerBorderWidth: { ...component$1, property: 'border-width' },
|
|
86055
|
+
inputContainerBorderColor: { ...component$1, property: 'border-color' },
|
|
86056
|
+
inputContainerBorderStyle: { ...component$1, property: 'border-style' },
|
|
86057
|
+
inputContainerOutlineWidth: { ...component$1, property: 'outline-width' },
|
|
86058
|
+
inputContainerOutlineOffset: { ...component$1, property: 'outline-offset' },
|
|
86059
|
+
inputContainerOutlineColor: { ...component$1, property: 'outline-color' },
|
|
86060
|
+
inputContainerOutlineStyle: { ...component$1, property: 'outline-style' },
|
|
86061
|
+
|
|
85817
86062
|
inputSize: [
|
|
85818
86063
|
{ ...checkboxElement, property: 'width' },
|
|
85819
86064
|
{ ...checkboxElement, property: 'height' },
|
|
@@ -85831,7 +86076,7 @@ descope-boolean-field-internal {
|
|
|
85831
86076
|
slots: [],
|
|
85832
86077
|
wrappedEleName: 'vaadin-text-field',
|
|
85833
86078
|
style: () => `
|
|
85834
|
-
${commonStyles}
|
|
86079
|
+
${commonStyles(CheckboxClass.cssVarList)}
|
|
85835
86080
|
${useHostExternalPadding(CheckboxClass.cssVarList)}
|
|
85836
86081
|
|
|
85837
86082
|
:host {
|
|
@@ -85873,7 +86118,7 @@ descope-boolean-field-internal {
|
|
|
85873
86118
|
}
|
|
85874
86119
|
`,
|
|
85875
86120
|
excludeAttrsSync: ['label', 'tabindex', 'style'],
|
|
85876
|
-
componentName: componentName$
|
|
86121
|
+
componentName: componentName$14,
|
|
85877
86122
|
})
|
|
85878
86123
|
);
|
|
85879
86124
|
|
|
@@ -85918,7 +86163,7 @@ descope-boolean-field-internal {
|
|
|
85918
86163
|
vars: vars$X
|
|
85919
86164
|
});
|
|
85920
86165
|
|
|
85921
|
-
const componentName$
|
|
86166
|
+
const componentName$13 = getComponentName$1('switch-toggle');
|
|
85922
86167
|
|
|
85923
86168
|
const {
|
|
85924
86169
|
host: host$r,
|
|
@@ -85931,7 +86176,9 @@ descope-boolean-field-internal {
|
|
|
85931
86176
|
errorMessage: errorMessage$9,
|
|
85932
86177
|
} = {
|
|
85933
86178
|
host: { selector: () => ':host' },
|
|
85934
|
-
requiredIndicator: {
|
|
86179
|
+
requiredIndicator: {
|
|
86180
|
+
selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after',
|
|
86181
|
+
},
|
|
85935
86182
|
component: { selector: 'vaadin-checkbox' },
|
|
85936
86183
|
checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },
|
|
85937
86184
|
checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },
|
|
@@ -86004,7 +86251,7 @@ descope-boolean-field-internal {
|
|
|
86004
86251
|
slots: [],
|
|
86005
86252
|
wrappedEleName: 'vaadin-text-field',
|
|
86006
86253
|
style: () => `
|
|
86007
|
-
${commonStyles}
|
|
86254
|
+
${commonStyles(SwitchToggleClass.cssVarList)}
|
|
86008
86255
|
${useHostExternalPadding(SwitchToggleClass.cssVarList)}
|
|
86009
86256
|
|
|
86010
86257
|
:host {
|
|
@@ -86060,7 +86307,7 @@ descope-boolean-field-internal {
|
|
|
86060
86307
|
}
|
|
86061
86308
|
`,
|
|
86062
86309
|
excludeAttrsSync: ['label', 'tabindex', 'style'],
|
|
86063
|
-
componentName: componentName$
|
|
86310
|
+
componentName: componentName$13,
|
|
86064
86311
|
})
|
|
86065
86312
|
);
|
|
86066
86313
|
|
|
@@ -86141,9 +86388,9 @@ descope-boolean-field-internal {
|
|
|
86141
86388
|
vars: vars$W
|
|
86142
86389
|
});
|
|
86143
86390
|
|
|
86144
|
-
const componentName$
|
|
86391
|
+
const componentName$12 = getComponentName$1('container');
|
|
86145
86392
|
|
|
86146
|
-
class RawContainer extends createBaseClass({ componentName: componentName$
|
|
86393
|
+
class RawContainer extends createBaseClass({ componentName: componentName$12, baseSelector: 'slot' }) {
|
|
86147
86394
|
constructor() {
|
|
86148
86395
|
super();
|
|
86149
86396
|
|
|
@@ -86228,7 +86475,7 @@ descope-boolean-field-internal {
|
|
|
86228
86475
|
horizontalAlignment,
|
|
86229
86476
|
shadowColor: '#00000020', // if we want to support transparency vars, we should use different color format
|
|
86230
86477
|
},
|
|
86231
|
-
componentName$
|
|
86478
|
+
componentName$12
|
|
86232
86479
|
);
|
|
86233
86480
|
|
|
86234
86481
|
const { shadowColor: shadowColor$4 } = helperRefs$4;
|
|
@@ -86393,10 +86640,10 @@ descope-boolean-field-internal {
|
|
|
86393
86640
|
return CssVarImageClass;
|
|
86394
86641
|
};
|
|
86395
86642
|
|
|
86396
|
-
const componentName$
|
|
86643
|
+
const componentName$11 = getComponentName$1('logo');
|
|
86397
86644
|
|
|
86398
86645
|
const LogoClass = createCssVarImageClass({
|
|
86399
|
-
componentName: componentName$
|
|
86646
|
+
componentName: componentName$11,
|
|
86400
86647
|
varName: 'url',
|
|
86401
86648
|
fallbackVarName: 'fallbackUrl',
|
|
86402
86649
|
});
|
|
@@ -86413,10 +86660,10 @@ descope-boolean-field-internal {
|
|
|
86413
86660
|
vars: vars$U
|
|
86414
86661
|
});
|
|
86415
86662
|
|
|
86416
|
-
const componentName$
|
|
86663
|
+
const componentName$10 = getComponentName$1('totp-image');
|
|
86417
86664
|
|
|
86418
86665
|
const TotpImageClass = createCssVarImageClass({
|
|
86419
|
-
componentName: componentName$
|
|
86666
|
+
componentName: componentName$10,
|
|
86420
86667
|
varName: 'url',
|
|
86421
86668
|
fallbackVarName: 'fallbackUrl',
|
|
86422
86669
|
});
|
|
@@ -86433,10 +86680,10 @@ descope-boolean-field-internal {
|
|
|
86433
86680
|
vars: vars$T
|
|
86434
86681
|
});
|
|
86435
86682
|
|
|
86436
|
-
const componentName
|
|
86683
|
+
const componentName$$ = getComponentName$1('notp-image');
|
|
86437
86684
|
|
|
86438
86685
|
const NotpImageClass = createCssVarImageClass({
|
|
86439
|
-
componentName: componentName
|
|
86686
|
+
componentName: componentName$$,
|
|
86440
86687
|
varName: 'url',
|
|
86441
86688
|
fallbackVarName: 'fallbackUrl',
|
|
86442
86689
|
});
|
|
@@ -86453,10 +86700,10 @@ descope-boolean-field-internal {
|
|
|
86453
86700
|
vars: vars$S
|
|
86454
86701
|
});
|
|
86455
86702
|
|
|
86456
|
-
const componentName
|
|
86703
|
+
const componentName$_ = getComponentName('text');
|
|
86457
86704
|
|
|
86458
86705
|
class RawText extends createBaseClass$1({
|
|
86459
|
-
componentName: componentName
|
|
86706
|
+
componentName: componentName$_,
|
|
86460
86707
|
baseSelector: ':host > slot',
|
|
86461
86708
|
}) {
|
|
86462
86709
|
constructor() {
|
|
@@ -86528,7 +86775,7 @@ descope-boolean-field-internal {
|
|
|
86528
86775
|
const text$3 = {
|
|
86529
86776
|
[vars$R.hostDirection]: globalRefs$A.direction,
|
|
86530
86777
|
[vars$R.textLineHeight]: '1.35em',
|
|
86531
|
-
[vars$R.textAlign]: '
|
|
86778
|
+
[vars$R.textAlign]: 'start',
|
|
86532
86779
|
[vars$R.textColor]: globalRefs$A.colors.surface.dark,
|
|
86533
86780
|
|
|
86534
86781
|
variant: {
|
|
@@ -86625,229 +86872,6 @@ descope-boolean-field-internal {
|
|
|
86625
86872
|
vars: vars$R
|
|
86626
86873
|
});
|
|
86627
86874
|
|
|
86628
|
-
const disableRules = [
|
|
86629
|
-
'blockquote',
|
|
86630
|
-
'list',
|
|
86631
|
-
'image',
|
|
86632
|
-
'table',
|
|
86633
|
-
'code',
|
|
86634
|
-
'hr',
|
|
86635
|
-
'backticks',
|
|
86636
|
-
'fence',
|
|
86637
|
-
'reference',
|
|
86638
|
-
'heading',
|
|
86639
|
-
'lheading',
|
|
86640
|
-
'html_block',
|
|
86641
|
-
];
|
|
86642
|
-
|
|
86643
|
-
const decodeHTML = (html) => {
|
|
86644
|
-
const textArea = document.createElement('textarea');
|
|
86645
|
-
textArea.innerHTML = html;
|
|
86646
|
-
return textArea.value;
|
|
86647
|
-
};
|
|
86648
|
-
|
|
86649
|
-
/* eslint-disable no-param-reassign */
|
|
86650
|
-
|
|
86651
|
-
|
|
86652
|
-
const componentName$_ = getComponentName('enriched-text');
|
|
86653
|
-
|
|
86654
|
-
class EnrichedText extends createBaseClass$1({ componentName: componentName$_, baseSelector: ':host > div' }) {
|
|
86655
|
-
#origLinkRenderer;
|
|
86656
|
-
|
|
86657
|
-
#origEmRenderer;
|
|
86658
|
-
|
|
86659
|
-
constructor() {
|
|
86660
|
-
super();
|
|
86661
|
-
|
|
86662
|
-
this.attachShadow({ mode: 'open' }).innerHTML = `
|
|
86663
|
-
<div class="content"></div>
|
|
86664
|
-
`;
|
|
86665
|
-
|
|
86666
|
-
injectStyle(
|
|
86667
|
-
`
|
|
86668
|
-
:host {
|
|
86669
|
-
line-height: 1em;
|
|
86670
|
-
word-break: break-word;
|
|
86671
|
-
}
|
|
86672
|
-
:host > slot {
|
|
86673
|
-
width: 100%;
|
|
86674
|
-
display: inline-block;
|
|
86675
|
-
}
|
|
86676
|
-
*, *:last-child {
|
|
86677
|
-
margin: 0;
|
|
86678
|
-
}
|
|
86679
|
-
h1,
|
|
86680
|
-
h2,
|
|
86681
|
-
h3,
|
|
86682
|
-
h4,
|
|
86683
|
-
h5,
|
|
86684
|
-
h6,
|
|
86685
|
-
p {
|
|
86686
|
-
margin-bottom: 1em;
|
|
86687
|
-
}
|
|
86688
|
-
a {
|
|
86689
|
-
cursor: pointer;
|
|
86690
|
-
}
|
|
86691
|
-
blockquote {
|
|
86692
|
-
padding: 0 2em;
|
|
86693
|
-
}
|
|
86694
|
-
u {
|
|
86695
|
-
text-decoration: underline
|
|
86696
|
-
}
|
|
86697
|
-
s {
|
|
86698
|
-
color: currentColor;
|
|
86699
|
-
}
|
|
86700
|
-
`,
|
|
86701
|
-
this
|
|
86702
|
-
);
|
|
86703
|
-
|
|
86704
|
-
this.#initProcessor();
|
|
86705
|
-
|
|
86706
|
-
observeChildren(this, this.#parseChildren.bind(this));
|
|
86707
|
-
}
|
|
86708
|
-
|
|
86709
|
-
static get observedAttributes() {
|
|
86710
|
-
return ['readonly', 'link-target-blank'];
|
|
86711
|
-
}
|
|
86712
|
-
|
|
86713
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
86714
|
-
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
|
86715
|
-
|
|
86716
|
-
if (newValue !== oldValue) {
|
|
86717
|
-
if (attrName === 'readonly') {
|
|
86718
|
-
this.onReadOnlyChange(newValue === 'true');
|
|
86719
|
-
}
|
|
86720
|
-
|
|
86721
|
-
if (attrName === 'link-target-blank') {
|
|
86722
|
-
this.#initProcessor();
|
|
86723
|
-
}
|
|
86724
|
-
}
|
|
86725
|
-
}
|
|
86726
|
-
|
|
86727
|
-
// We're overriding the rule for em with single underscore to perform as underline. (_underline_)
|
|
86728
|
-
customUnderlineRenderer() {
|
|
86729
|
-
this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {
|
|
86730
|
-
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
86731
|
-
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
86732
|
-
};
|
|
86733
|
-
this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {
|
|
86734
|
-
if (tokens[idx].markup === '_') tokens[idx].tag = 'u';
|
|
86735
|
-
return this.#origEmRenderer(tokens, idx, options, env, self);
|
|
86736
|
-
};
|
|
86737
|
-
}
|
|
86738
|
-
|
|
86739
|
-
#customizeLinkRenderer() {
|
|
86740
|
-
if (this.linkTargetBlank) {
|
|
86741
|
-
this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {
|
|
86742
|
-
// Add a new `target` attribute, or replace the value of the existing one.
|
|
86743
|
-
tokens[idx].attrSet('target', '_blank');
|
|
86744
|
-
// Pass the token to the default renderer.
|
|
86745
|
-
return this.#origLinkRenderer(tokens, idx, options, env, self);
|
|
86746
|
-
};
|
|
86747
|
-
} else {
|
|
86748
|
-
this.processor.renderer.rules.link_open = this.#origLinkRenderer;
|
|
86749
|
-
}
|
|
86750
|
-
}
|
|
86751
|
-
|
|
86752
|
-
#disableCustomRules() {
|
|
86753
|
-
if (!this.processor) {
|
|
86754
|
-
return;
|
|
86755
|
-
}
|
|
86756
|
-
this.processor.disable(disableRules);
|
|
86757
|
-
}
|
|
86758
|
-
|
|
86759
|
-
#updateProcessorRules() {
|
|
86760
|
-
this.#disableCustomRules();
|
|
86761
|
-
}
|
|
86762
|
-
|
|
86763
|
-
#storeOrigRenderers() {
|
|
86764
|
-
const defaultLinkRenderer = (tokens, idx, options, _, self) =>
|
|
86765
|
-
self.renderToken(tokens, idx, options);
|
|
86766
|
-
this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;
|
|
86767
|
-
|
|
86768
|
-
const defaultStrongRenderer = (tokens, idx, options, _, self) =>
|
|
86769
|
-
self.renderToken(tokens, idx, options);
|
|
86770
|
-
this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;
|
|
86771
|
-
}
|
|
86772
|
-
|
|
86773
|
-
#initProcessor() {
|
|
86774
|
-
this.processor = new MarkdownIt('commonmark', { html: true });
|
|
86775
|
-
this.#storeOrigRenderers();
|
|
86776
|
-
this.#updateProcessorRules();
|
|
86777
|
-
this.#customizeLinkRenderer();
|
|
86778
|
-
this.customUnderlineRenderer();
|
|
86779
|
-
}
|
|
86780
|
-
|
|
86781
|
-
get linkTargetBlank() {
|
|
86782
|
-
return this.getAttribute('link-target-blank') === 'true';
|
|
86783
|
-
}
|
|
86784
|
-
|
|
86785
|
-
get contentNode() {
|
|
86786
|
-
return this.shadowRoot.querySelector('.content');
|
|
86787
|
-
}
|
|
86788
|
-
|
|
86789
|
-
#parseChildren() {
|
|
86790
|
-
if (!this.processor) {
|
|
86791
|
-
return;
|
|
86792
|
-
}
|
|
86793
|
-
|
|
86794
|
-
let html = decodeHTML(this.innerHTML);
|
|
86795
|
-
|
|
86796
|
-
if (!html?.trim() && this.isConnected) {
|
|
86797
|
-
this.setAttribute('empty', 'true');
|
|
86798
|
-
} else {
|
|
86799
|
-
this.removeAttribute('empty');
|
|
86800
|
-
}
|
|
86801
|
-
|
|
86802
|
-
try {
|
|
86803
|
-
const tokens = this.processor.parse(html, { references: undefined });
|
|
86804
|
-
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
|
86805
|
-
} catch (e) {
|
|
86806
|
-
// eslint-disable-next-line no-console
|
|
86807
|
-
console.warn('Not parsing invalid markdown token');
|
|
86808
|
-
}
|
|
86809
|
-
|
|
86810
|
-
this.contentNode.innerHTML = html;
|
|
86811
|
-
}
|
|
86812
|
-
|
|
86813
|
-
onReadOnlyChange(isReadOnly) {
|
|
86814
|
-
if (isReadOnly) {
|
|
86815
|
-
this.contentNode.setAttribute('inert', isReadOnly);
|
|
86816
|
-
} else {
|
|
86817
|
-
this.contentNode.removeAttribute('inert');
|
|
86818
|
-
}
|
|
86819
|
-
}
|
|
86820
|
-
}
|
|
86821
|
-
|
|
86822
|
-
const EnrichedTextClass = compose(
|
|
86823
|
-
createStyleMixin$1({
|
|
86824
|
-
mappings: {
|
|
86825
|
-
hostWidth: { selector: () => ':host', property: 'width' },
|
|
86826
|
-
hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
|
|
86827
|
-
hostDirection: { selector: () => ':host', property: 'direction' },
|
|
86828
|
-
fontSize: {},
|
|
86829
|
-
fontFamily: {},
|
|
86830
|
-
fontWeight: {},
|
|
86831
|
-
fontWeightBold: [
|
|
86832
|
-
{ selector: () => ':host strong', property: 'font-weight' },
|
|
86833
|
-
{ selector: () => ':host b', property: 'font-weight' },
|
|
86834
|
-
],
|
|
86835
|
-
textColor: { property: 'color' },
|
|
86836
|
-
textLineHeight: { property: 'line-height' },
|
|
86837
|
-
textAlign: {},
|
|
86838
|
-
linkColor: { selector: 'a', property: 'color' },
|
|
86839
|
-
linkTextDecoration: { selector: 'a', property: 'text-decoration' },
|
|
86840
|
-
linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },
|
|
86841
|
-
minHeight: {},
|
|
86842
|
-
minWidth: {},
|
|
86843
|
-
},
|
|
86844
|
-
}),
|
|
86845
|
-
createStyleMixin$1({ componentNameOverride: getComponentName('link') }),
|
|
86846
|
-
createStyleMixin$1({ componentNameOverride: getComponentName('text') }),
|
|
86847
|
-
draggableMixin$1,
|
|
86848
|
-
componentNameValidationMixin$1
|
|
86849
|
-
)(EnrichedText);
|
|
86850
|
-
|
|
86851
86875
|
const componentName$Z = getComponentName('link');
|
|
86852
86876
|
|
|
86853
86877
|
class RawLink extends createBaseClass$1({ componentName: componentName$Z, baseSelector: ':host a' }) {
|
|
@@ -97894,11 +97918,13 @@ descope-boolean-field-internal {
|
|
|
97894
97918
|
const itemRenderer$4 = ({ name, icon, url }, _, ref) => `
|
|
97895
97919
|
<a ${url ? `href="${url}" title="${url}"` : ''} target="_blank">
|
|
97896
97920
|
<descope-list-item>
|
|
97897
|
-
<
|
|
97898
|
-
|
|
97899
|
-
|
|
97900
|
-
|
|
97901
|
-
|
|
97921
|
+
<div class="avatar-wrapper">
|
|
97922
|
+
<descope-avatar
|
|
97923
|
+
${icon ? `img="${icon}"` : ''}
|
|
97924
|
+
${name ? `display-name="${name}" abbr=${limitAbbreviation(name)}` : ''}
|
|
97925
|
+
size="${ref.logoSize || ref.size}"
|
|
97926
|
+
></descope-avatar>
|
|
97927
|
+
</div>
|
|
97902
97928
|
<descope-text
|
|
97903
97929
|
variant="${ref.itemTextVariant}"
|
|
97904
97930
|
mode="primary"
|
|
@@ -97970,7 +97996,7 @@ descope-boolean-field-internal {
|
|
|
97970
97996
|
property: ListItemClass.cssVarList.horizontalPaddingOverride,
|
|
97971
97997
|
},
|
|
97972
97998
|
itemAlignment: [
|
|
97973
|
-
{ selector:
|
|
97999
|
+
{ selector: () => '.avatar-wrapper', property: 'text-align' },
|
|
97974
98000
|
{ selector: TextClass.componentName, property: TextClass.cssVarList.textAlign },
|
|
97975
98001
|
]
|
|
97976
98002
|
},
|
|
@@ -97998,6 +98024,14 @@ descope-boolean-field-internal {
|
|
|
97998
98024
|
overflow: hidden;
|
|
97999
98025
|
}
|
|
98000
98026
|
|
|
98027
|
+
descope-list-item[variant="tile"] .avatar-wrapper {
|
|
98028
|
+
width: 100%;
|
|
98029
|
+
}
|
|
98030
|
+
|
|
98031
|
+
.avatar-wrapper {
|
|
98032
|
+
line-height: 0;
|
|
98033
|
+
}
|
|
98034
|
+
|
|
98001
98035
|
a {
|
|
98002
98036
|
text-decoration: none;
|
|
98003
98037
|
}
|
|
@@ -98005,6 +98039,7 @@ descope-boolean-field-internal {
|
|
|
98005
98039
|
descope-text {
|
|
98006
98040
|
${TextClass.cssVarList.hostDirection}: var(${AppsListClass.cssVarList.hostDirection});
|
|
98007
98041
|
max-width: 100%;
|
|
98042
|
+
width: 100%;
|
|
98008
98043
|
}
|
|
98009
98044
|
`,
|
|
98010
98045
|
})
|