@descope/flow-components 3.27.6 → 3.27.7
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/222.js.map +1 -1
- package/dist/fm/734.js +1 -1
- package/dist/fm/734.js.map +1 -1
- package/dist/fm/761.js +1 -1
- package/dist/fm/761.js.map +1 -1
- package/dist/fm/985.js +1 -1
- package/dist/fm/985.js.map +1 -1
- package/dist/fm/__federation_expose_componentClasses.js +1 -1
- package/dist/fm/__federation_expose_componentClasses.js.map +1 -1
- package/dist/fm/__federation_expose_components.js +1 -1
- package/dist/fm/__federation_expose_theme.js +1 -1
- package/dist/fm/__federation_expose_theme.js.map +1 -1
- package/dist/fm/flowComponents.js +1 -1
- package/dist/fm/flowComponents.js.map +1 -1
- package/dist/fm/main.js +1 -1
- package/dist/fm/main.js.map +1 -1
- package/dist/fm/mf-manifest.json +1 -1
- package/dist/fm/mf-stats.json +1 -1
- package/dist/index.cjs.js +89 -18
- package/package.json +2 -2
package/dist/fm/mf-manifest.json
CHANGED
package/dist/fm/mf-stats.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -79995,6 +79995,31 @@ function requireIndex_cjs () {
|
|
|
79995
79995
|
|
|
79996
79996
|
const isFunction = (maybeFunc) => typeof maybeFunc === 'function';
|
|
79997
79997
|
|
|
79998
|
+
const BLOCKED_URL_PROTOCOLS = ['javascript:', 'vbscript:', 'file:'];
|
|
79999
|
+
// A fixed base, so only an explicit scheme is checked (a relative URL on a file:// page is kept)
|
|
80000
|
+
const URL_CHECK_BASE = 'https://base.invalid';
|
|
80001
|
+
|
|
80002
|
+
// Returns the url when it is safe to use as a link or image source, otherwise ''.
|
|
80003
|
+
// A block-list (not an allow-list), so custom schemes (myapp://, mailto:) keep working.
|
|
80004
|
+
// The result must only be set with setAttribute, never put inside an HTML string.
|
|
80005
|
+
const getSafeUrl = (url, { allowDataImage = false } = {}) => {
|
|
80006
|
+
if (typeof url !== 'string' || !url) return '';
|
|
80007
|
+
|
|
80008
|
+
try {
|
|
80009
|
+
// eslint-disable-next-line no-undef
|
|
80010
|
+
const { protocol } = new URL(url, URL_CHECK_BASE);
|
|
80011
|
+
|
|
80012
|
+
if (BLOCKED_URL_PROTOCOLS.includes(protocol)) return '';
|
|
80013
|
+
if (protocol === 'data:') {
|
|
80014
|
+
return allowDataImage && /^\s*data:image\//i.test(url) ? url : '';
|
|
80015
|
+
}
|
|
80016
|
+
|
|
80017
|
+
return url;
|
|
80018
|
+
} catch {
|
|
80019
|
+
return '';
|
|
80020
|
+
}
|
|
80021
|
+
};
|
|
80022
|
+
|
|
79998
80023
|
/**
|
|
79999
80024
|
* Compares two arrays unorderedly.
|
|
80000
80025
|
* @param {Array} arr1 - The first array to compare.
|
|
@@ -84428,9 +84453,12 @@ function requireIndex_cjs () {
|
|
|
84428
84453
|
}
|
|
84429
84454
|
|
|
84430
84455
|
#renderItem = ({ displayName, value, label }) => {
|
|
84431
|
-
|
|
84432
|
-
|
|
84433
|
-
|
|
84456
|
+
const ele = document.createElement('span');
|
|
84457
|
+
ele.setAttribute('data-name', label);
|
|
84458
|
+
ele.setAttribute('data-id', value);
|
|
84459
|
+
ele.textContent = displayName || label;
|
|
84460
|
+
|
|
84461
|
+
return ele.outerHTML;
|
|
84434
84462
|
};
|
|
84435
84463
|
|
|
84436
84464
|
#data;
|
|
@@ -86009,24 +86037,45 @@ function requireIndex_cjs () {
|
|
|
86009
86037
|
|
|
86010
86038
|
const componentName$1k = getComponentName('apps-list');
|
|
86011
86039
|
|
|
86012
|
-
|
|
86013
|
-
|
|
86040
|
+
// we return a template instead of a string, and fill the item data with DOM APIs, so we can avoid XSS
|
|
86041
|
+
const itemRenderer$6 = ({ name, icon, url }, _, ref) => {
|
|
86042
|
+
const template = document.createElement('template');
|
|
86043
|
+
template.innerHTML = `
|
|
86044
|
+
<a ${ref.openInSameWindow ? '' : 'target="_blank"'}>
|
|
86014
86045
|
<descope-list-item>
|
|
86015
86046
|
<div class="avatar-wrapper">
|
|
86016
86047
|
<descope-avatar
|
|
86017
|
-
${icon ? `img="${icon}"` : ''}
|
|
86018
|
-
${name ? `display-name="${name}" abbr=${limitAbbreviation(name)}` : ''}
|
|
86019
86048
|
size="${ref.logoSize || ref.size}"
|
|
86020
86049
|
></descope-avatar>
|
|
86021
86050
|
</div>
|
|
86022
86051
|
<descope-text
|
|
86023
86052
|
variant="${ref.itemTextVariant}"
|
|
86024
86053
|
mode="primary"
|
|
86025
|
-
|
|
86054
|
+
></descope-text>
|
|
86026
86055
|
</descope-list-item>
|
|
86027
86056
|
</a>
|
|
86028
86057
|
`;
|
|
86029
86058
|
|
|
86059
|
+
const link = template.content.querySelector('a');
|
|
86060
|
+
const safeUrl = getSafeUrl(url);
|
|
86061
|
+
if (safeUrl) {
|
|
86062
|
+
link.setAttribute('href', safeUrl);
|
|
86063
|
+
link.setAttribute('title', safeUrl);
|
|
86064
|
+
}
|
|
86065
|
+
|
|
86066
|
+
const avatar = template.content.querySelector('descope-avatar');
|
|
86067
|
+
const safeIcon = getSafeUrl(icon, { allowDataImage: true });
|
|
86068
|
+
if (safeIcon) avatar.setAttribute('img', safeIcon);
|
|
86069
|
+
if (name) {
|
|
86070
|
+
avatar.setAttribute('display-name', name);
|
|
86071
|
+
avatar.setAttribute('abbr', limitAbbreviation(name));
|
|
86072
|
+
}
|
|
86073
|
+
|
|
86074
|
+
template.content.querySelector('descope-text').textContent = name ?? '';
|
|
86075
|
+
|
|
86076
|
+
return template;
|
|
86077
|
+
};
|
|
86078
|
+
|
|
86030
86079
|
const customMixin$g = (superclass) =>
|
|
86031
86080
|
class AppsListMixinClass extends superclass {
|
|
86032
86081
|
// size controls both item logo size and font size
|
|
@@ -90583,13 +90632,12 @@ function requireIndex_cjs () {
|
|
|
90583
90632
|
ref,
|
|
90584
90633
|
) => {
|
|
90585
90634
|
const action = isConnected ? 'disconnect' : 'connect';
|
|
90586
|
-
return
|
|
90635
|
+
// we return a template instead of a string, and fill the item data with DOM APIs, so we can avoid XSS
|
|
90636
|
+
const template = document.createElement('template');
|
|
90637
|
+
template.innerHTML = `
|
|
90587
90638
|
<descope-list-item>
|
|
90588
90639
|
<descope-avatar
|
|
90589
|
-
${logo ? `img="${logo}"` : ''}
|
|
90590
|
-
${name ? `display-name="${name}" abbr=${limitAbbreviation(name)}` : ''}
|
|
90591
90640
|
size=${ref.size}
|
|
90592
|
-
${logo ? 'st-avatar-background-color="none"' : ''}
|
|
90593
90641
|
class="app-logo"
|
|
90594
90642
|
></descope-avatar>
|
|
90595
90643
|
|
|
@@ -90598,7 +90646,7 @@ function requireIndex_cjs () {
|
|
|
90598
90646
|
class="app-title"
|
|
90599
90647
|
variant="subtitle1"
|
|
90600
90648
|
mode="primary"
|
|
90601
|
-
|
|
90649
|
+
></descope-text>
|
|
90602
90650
|
${
|
|
90603
90651
|
description
|
|
90604
90652
|
? `
|
|
@@ -90606,18 +90654,41 @@ function requireIndex_cjs () {
|
|
|
90606
90654
|
class="app-description"
|
|
90607
90655
|
variant="body2"
|
|
90608
90656
|
mode="primary"
|
|
90609
|
-
|
|
90657
|
+
></descope-text>
|
|
90610
90658
|
`
|
|
90611
90659
|
: ''
|
|
90612
90660
|
}
|
|
90613
90661
|
</div>
|
|
90614
90662
|
<div class="controls">
|
|
90615
|
-
<descope-button variant="link" mode="primary" size=${ref.size} data-action="${action}" data-
|
|
90663
|
+
<descope-button variant="link" mode="primary" size=${ref.size} data-action="${action}" data-id="${action}">
|
|
90616
90664
|
${isConnected ? ref.disconnectButtonLabel : ref.connectButtonLabel}
|
|
90617
90665
|
</descope-button>
|
|
90618
90666
|
</div>
|
|
90619
90667
|
</descope-list-item>
|
|
90620
90668
|
`;
|
|
90669
|
+
|
|
90670
|
+
const avatar = template.content.querySelector('descope-avatar');
|
|
90671
|
+
const safeLogo = getSafeUrl(logo, { allowDataImage: true });
|
|
90672
|
+
if (safeLogo) {
|
|
90673
|
+
avatar.setAttribute('img', safeLogo);
|
|
90674
|
+
avatar.setAttribute('st-avatar-background-color', 'none');
|
|
90675
|
+
}
|
|
90676
|
+
if (name) {
|
|
90677
|
+
avatar.setAttribute('display-name', name);
|
|
90678
|
+
avatar.setAttribute('abbr', limitAbbreviation(name));
|
|
90679
|
+
}
|
|
90680
|
+
|
|
90681
|
+
template.content.querySelector('.app-title').textContent = name ?? '';
|
|
90682
|
+
if (description) {
|
|
90683
|
+
template.content.querySelector('.app-description').textContent =
|
|
90684
|
+
description;
|
|
90685
|
+
}
|
|
90686
|
+
|
|
90687
|
+
template.content
|
|
90688
|
+
.querySelector('descope-button')
|
|
90689
|
+
.setAttribute('data-outbound-app-id', appId);
|
|
90690
|
+
|
|
90691
|
+
return template;
|
|
90621
90692
|
};
|
|
90622
90693
|
|
|
90623
90694
|
const BaseClass$6 = createBaseClass$1({
|
|
@@ -106566,7 +106637,7 @@ descope-enriched-text {
|
|
|
106566
106637
|
const escapeXML = (s) => {
|
|
106567
106638
|
const dom = document.createElement('div');
|
|
106568
106639
|
dom.textContent = s;
|
|
106569
|
-
return dom.innerHTML;
|
|
106640
|
+
return dom.innerHTML.replace(/"/g, '"');
|
|
106570
106641
|
};
|
|
106571
106642
|
|
|
106572
106643
|
const getValueType = (value) => {
|
|
@@ -106581,7 +106652,7 @@ descope-enriched-text {
|
|
|
106581
106652
|
`<descope-code-snippet copy-button="true" lang="${lang}" class="row-details__value code">${escapeXML(value)}</descope-code-snippet>`;
|
|
106582
106653
|
|
|
106583
106654
|
const renderText = (text) =>
|
|
106584
|
-
`<div class="row-details__value text" title="${text}">${escapeXML(text)}</div>`;
|
|
106655
|
+
`<div class="row-details__value text" title="${escapeXML(text)}">${escapeXML(text)}</div>`;
|
|
106585
106656
|
const renderJson = (value) => renderCodeSnippet(JSON.stringify(value, null, 2), 'json');
|
|
106586
106657
|
const renderXml = (value) => renderCodeSnippet(value, 'xml');
|
|
106587
106658
|
|
|
@@ -106619,7 +106690,7 @@ descope-enriched-text {
|
|
|
106619
106690
|
<div class="row-details">
|
|
106620
106691
|
${Object.entries(item)
|
|
106621
106692
|
.map(([key, value]) => {
|
|
106622
|
-
const label = itemLabelsMapping[key] || toTitle(key);
|
|
106693
|
+
const label = escapeXML(itemLabelsMapping[key] || toTitle(key));
|
|
106623
106694
|
if (isCodeSnippetValue(value)) {
|
|
106624
106695
|
return `<details class="row-details__item">
|
|
106625
106696
|
<summary class="row-details__label">${label}</summary>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"webpack-subresource-integrity": "5.2.0-rc.1"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@descope/web-components-ui": "3.27.
|
|
101
|
+
"@descope/web-components-ui": "3.27.7"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"react": ">= 18"
|