@descope/web-components-ui 3.27.0 → 3.27.2
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 +11 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/9439.js +1 -1
- package/dist/umd/9439.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-button.js +1 -1
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-multi-line-mappings.js +1 -1
- package/dist/umd/descope-multi-line-mappings.js.map +1 -1
- package/dist/umd/descope-multi-sso.js +1 -1
- package/dist/umd/descope-multi-sso.js.map +1 -1
- package/dist/umd/descope-outbound-app-button.js +1 -1
- package/dist/umd/descope-outbound-app-button.js.map +1 -1
- package/dist/umd/descope-outbound-apps.js +1 -1
- package/dist/umd/descope-outbound-apps.js.map +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-recovery-codes.js +1 -1
- package/dist/umd/descope-recovery-codes.js.map +1 -1
- package/dist/umd/descope-timer-button.js +1 -1
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-tooltip.js +1 -1
- package/dist/umd/descope-tooltip.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/descope-user-passkeys.js +1 -1
- package/dist/umd/descope-user-passkeys.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/package.json +46 -46
- package/src/components/descope-passcode/PasscodeClass.js +1 -0
- package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +4 -2
- package/src/components/descope-upload-file/UploadFileClass.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-user-attribute-index-js.js","mappings":"yIAAAA,EAAAC,QAAA,+RCAAD,EAAAC,QAAA,uYCAAD,EAAAC,QAAA,+WCAAD,EAAAC,QAAA,qjDCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,SAE7C,MAAAC,WAAuB,EAAAC,EAAAC,IAAe,CACtCL,gBACAM,aAAA,iBAEA,6BAAAC,GACA,8DACA,CAEA,WAAAC,GACAC,QAEAC,KAAAC,aAAA,CAAwBC,KAAA,SAAcC,UAAA,sDAMlC,EAAAZ,EAAAa,IACJ,8OAYAJ,KAEA,CAEA,8BAAAK,GACA,OAAAL,KAAAM,aAAA,oCACA,CAEA,EAAAC,CAAAC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A,IAAuBpD,EAAAtK,SAAA,aACvB2N,gBAAA,IAAyBN,EAAArN,SAAA,aACzB4N,cAAA,IAAuBvD,EAAArK,SAAA,aACvB6N,SAAA,EAAmB7N,SAAA,OAAiB,IAAIqN,EAAArN,SAAA,QACxC6C,UAAA,CACA,CAAU9C,SAAA,mBAAAC,SAA0CmE,EAAApB,EAASC,WAAAC,MAG7D,CAAUlD,SAAA,kBAAAC,SAAyCmE,EAAApB,EAASC,WAAAC,UAI1DuK,EAAArM,GACAqM,EAAApM,GAzBgC,CA0BlCyI,uCC5ZAxI,eAAAC,OAAsBvD,EAAeuP","sources":["webpack://@descope/web-components-ui/./src/components/descope-user-attribute/check.svg","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/copy.svg","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/delete.svg","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/edit.svg","webpack://@descope/web-components-ui/../components/descope-badge/src/component/BadgeClass.js","webpack://@descope/web-components-ui/../components/descope-badge/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/UserAttributeClass.js","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNCA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DguMzEyMTZMMTEuMjcyMiAyLjYyNDE1Wk0xMS45MjAyIDEuODU2MTVMMTMuMjg4MiAwLjMyMDE0OUMxMy42NDgyIC0wLjA4Nzg1MTYgMTQuMjcyMiAtMC4xMTE4NTIgMTQuNjgwMiAwLjI3MjE0OUMxNS4wODgyIDAuNjMyMTQ5IDE1LjExMjIgMS4yODAxNSAxNC43NTIyIDEuNjg4MTVMMTMuMjY0MiAzLjM2ODE1TDExLjkyMDIgMS44NTYxNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPiA8L3N2Zz4g\"","import {\n componentNameValidationMixin,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('badge');\n\nclass RawBadge extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['data-attachment-size', 'shrink-to-indicator-threshold'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this,\n );\n }\n\n get shrinkToIndicatorThreshold() {\n return this.getAttribute('shrink-to-indicator-threshold') || 65;\n }\n\n #handleShrinkToIndicator(value) {\n this.toggleAttribute(\n 'shrink-to-indicator',\n parseFloat(value) < this.shrinkToIndicatorThreshold,\n );\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n super.attributeChangedCallback?.(name, oldVal, newVal);\n if (name === 'data-attachment-size' && oldVal !== newVal) {\n this.#handleShrinkToIndicator(newVal);\n }\n }\n}\n\nexport const BadgeClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }],\n hostHeight: [{ selector: () => ':host', property: 'height' }],\n hostDirection: { property: 'direction' },\n\n fontFamily: {},\n fontSize: {},\n fontWeight: {},\n lineHeight: {},\n textTransform: {},\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n borderRadius: {},\n\n backgroundColor: {},\n\n textColor: { property: 'color' },\n textAlign: {},\n boxShadow: {},\n textIndent: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawBadge);\n","import { componentName, BadgeClass } from './BadgeClass';\n\ncustomElements.define(componentName, BadgeClass);\n\nexport { BadgeClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { TextClass } from '@descope-ui/descope-text/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\nimport { BadgeClass } from '@descope-ui/descope-badge/class';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport deleteIcon from './delete.svg';\nimport editIcon from './edit.svg';\nimport copyIcon from './copy.svg';\nimport checkIcon from './check.svg';\n\nexport const componentName = getComponentName('user-attribute');\nclass RawUserAttribute extends createBaseClass({\n componentName,\n baseSelector: ':host > .root',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"root\">\n <descope-text st-text-align=\"auto\" data-id=\"label-text\" variant=\"body1\" mode=\"secondary\" class=\"label\"></descope-text>\n <div class=\"content-wrapper\">\n <descope-text st-text-align=\"auto\" data-id=\"value-text\" variant=\"body1\" mode=\"primary\" class=\"value\"></descope-text>\n <div class=\"btn-wrapper\">\n <descope-badge mode=\"default\" bordered=\"true\" size=\"xs\"></descope-badge>\n <descope-button size=\"sm\" data-id=\"copy-btn\" variant=\"link\" mode=\"primary\">\n <slot name=\"copy-icon\"></slot>\n <descope-icon class=\"check-icon\" src=\"${checkIcon}\" src-dark=\"${checkIcon}\"></descope-icon>\n </descope-button>\n <descope-button size=\"sm\" data-id=\"delete-btn\" variant=\"link\" mode=\"primary\">\n <slot name=\"delete-icon\"></slot>\n </descope-button>\n <descope-button size=\"sm\" data-id=\"edit-btn\" variant=\"link\" mode=\"primary\">\n <slot name=\"edit-icon\"></slot>\n </descope-button>\n </div>\n </div>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n container-type: inline-size;\n\t\t\t\t}\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n ::slotted(*) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n @container (max-width: 529px) {\n .root {\n flex-wrap: wrap;\n }\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n slot[name=\"edit-icon\"],\n slot[name=\"delete-icon\"],\n slot[name=\"copy-icon\"] {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n }\n\n descope-button[data-id=\"copy-btn\"].hidden {\n display: none;\n }\n\n descope-button[data-id=\"copy-btn\"] .check-icon {\n display: none;\n }\n\n descope-button[data-id=\"copy-btn\"].copied slot[name=\"copy-icon\"] {\n display: none;\n }\n\n descope-button[data-id=\"copy-btn\"].copied .check-icon {\n display: inline-flex;\n }\n\n .content-wrapper {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n }\n\n .label {\n flex-grow: 1;\n width: 100%;\n }\n\n .value {\n flex-grow: 1;\n }\n\n descope-badge {\n margin-inline-end: 10px;\n }\n\n .hidden {\n visibility: hidden;\n width: 0;\n }\n\n descope-text[data-id=\"label-text\"].required:after {\n content: '*';\n color: var(${TextClass.cssVarList.textColor});\n }\n\n :host([readonly=\"true\"]) descope-button:not([data-id=\"copy-btn\"]) {\n visibility: hidden;\n width: 0;\n }\n `,\n this\n );\n\n this.copyButton = this.shadowRoot.querySelector('descope-button[data-id=\"copy-btn\"]');\n this.deleteButton = this.shadowRoot.querySelector('descope-button[data-id=\"delete-btn\"]');\n this.editButton = this.shadowRoot.querySelector('descope-button[data-id=\"edit-btn\"]');\n this.badge = this.shadowRoot.querySelector('descope-badge');\n this.labelText = this.shadowRoot.querySelector('descope-text[data-id=\"label-text\"]');\n this.valueText = this.shadowRoot.querySelector('descope-text[data-id=\"value-text\"]');\n }\n\n onLabelChange() {\n this.labelText.innerText = this.label;\n this.labelText.setAttribute('title', this.label);\n }\n\n onValueOrPlaceholderChange() {\n const text = this.value || this.placeholder;\n const mode = this.value ? 'primary' : 'secondary';\n\n this.valueText.innerText = text;\n this.valueText.setAttribute('title', text);\n this.valueText.setAttribute('mode', mode);\n }\n\n onBadgeLabelChange() {\n if (!this.badgeLabel) {\n this.badge.style.display = 'none';\n } else {\n this.badge.innerText = this.badgeLabel;\n this.badge.style.display = '';\n }\n }\n\n onBadgeTooltipTextChange() {\n this.badge.setAttribute('title', this.badgeTooltipText || this.badgeLabel);\n }\n\n updateButtonLabel(btnRef, label) {\n let textSpanEle = btnRef.querySelector('span.btn-label');\n\n if (label) {\n if (!textSpanEle) {\n textSpanEle = document.createElement('span');\n textSpanEle.classList.add('btn-label');\n btnRef.appendChild(textSpanEle);\n }\n textSpanEle.innerText = label;\n } else {\n textSpanEle?.remove();\n }\n }\n\n onIsRequiredChange() {\n this.labelText.classList.toggle('required', this.isRequired);\n }\n\n get label() {\n return this.getAttribute('label') || '';\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n get placeholder() {\n return this.getAttribute('placeholder') || '';\n }\n\n get isRequired() {\n return this.getAttribute('required') === 'true';\n }\n\n get badgeLabel() {\n return this.getAttribute('badge-label') || '';\n }\n\n get badgeTooltipText() {\n return this.getAttribute('badge-tooltip-text') || '';\n }\n\n get editButtonLabel() {\n return this.getAttribute('edit-button-label') || '';\n }\n\n get deleteButtonLabel() {\n return this.getAttribute('delete-button-label') || '';\n }\n\n get isDeleteHidden() {\n return this.getAttribute('hide-delete') === 'true';\n }\n\n get isCopyEnabled() {\n return this.getAttribute('show-copy') === 'true';\n }\n\n get copyButtonLabel() {\n return this.getAttribute('copy-button-label') || '';\n }\n\n init() {\n this.onLabelChange();\n this.onValueOrPlaceholderChange();\n this.onIsRequiredChange();\n this.onBadgeLabelChange();\n this.onBadgeTooltipTextChange();\n this.updateButtonLabel(this.editButton, this.editButtonLabel);\n this.updateButtonLabel(this.deleteButton, this.deleteButtonLabel);\n this.updateButtonLabel(this.copyButton, this.copyButtonLabel);\n this.handleDeleteButtonVisibility();\n this.handleCopyButtonState();\n\n this.deleteButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('delete-clicked', { bubbles: true, composed: true }))\n );\n\n this.editButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('edit-clicked', { bubbles: true, composed: true }))\n );\n\n this.copyButton.addEventListener('click', () => this.#handleCopyClick());\n\n this.setDefaultChildren();\n }\n\n #handleCopyClick() {\n // isDraggable is true only inside the page editor (craftjs sets draggable=\"true\"\n // for drag-and-drop); there the copy action must not run.\n if (!this.value || this.isDraggable || !navigator.clipboard) return;\n\n navigator.clipboard\n .writeText(this.value)\n .then(() => {\n this.copyButton.classList.add('copied');\n setTimeout(() => this.copyButton.classList.remove('copied'), 2000);\n })\n .catch(() => {});\n }\n\n handleCopyButtonState() {\n this.copyButton.classList.toggle('hidden', !this.isCopyEnabled);\n\n if (this.value) {\n this.copyButton.removeAttribute('disabled');\n } else {\n this.copyButton.setAttribute('disabled', 'true');\n }\n }\n\n #addIcon(src, slotName) {\n const icon = document.createElement('descope-icon');\n icon.setAttribute('src', src);\n icon.setAttribute('src-dark', src);\n icon.setAttribute('slot', slotName);\n this.appendChild(icon);\n }\n\n setDefaultChildren() {\n if (!this.querySelector('[slot=\"delete-icon\"]')) {\n this.#addIcon(deleteIcon, 'delete-icon');\n }\n if (!this.querySelector('[slot=\"edit-icon\"]')) {\n this.#addIcon(editIcon, 'edit-icon');\n }\n this.setDefaultCopyIcon();\n }\n\n setDefaultCopyIcon() {\n if (this.isCopyEnabled && !this.querySelector('[slot=\"copy-icon\"]')) {\n this.#addIcon(copyIcon, 'copy-icon');\n }\n }\n\n static get observedAttributes() {\n return [\n 'label',\n 'value',\n 'placeholder',\n 'required',\n 'badge-label',\n 'badge-tooltip-text',\n 'edit-button-label',\n 'delete-button-label',\n 'copy-button-label',\n 'hide-delete',\n 'show-copy',\n ].concat(super.observedAttributes);\n }\n\n handleDeleteButtonVisibility() {\n this.deleteButton.classList.toggle(\n 'hidden',\n this.isRequired || !this.value || this.isDeleteHidden\n );\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n if (oldValue === newValue) {\n return;\n }\n\n if (name === 'label') {\n this.onLabelChange();\n } else if (name === 'value' || name === 'placeholder') {\n this.onValueOrPlaceholderChange();\n } else if (name === 'required') {\n this.onIsRequiredChange();\n } else if (name === 'badge-label') {\n this.onBadgeLabelChange();\n } else if (name === 'badge-tooltip-text') {\n this.onBadgeTooltipTextChange();\n } else if (name === 'edit-button-label') {\n this.updateButtonLabel(this.editButton, this.editButtonLabel);\n } else if (name === 'delete-button-label') {\n this.updateButtonLabel(this.deleteButton, this.deleteButtonLabel);\n } else if (name === 'copy-button-label') {\n this.updateButtonLabel(this.copyButton, this.copyButtonLabel);\n } else if (name === 'show-copy') {\n this.setDefaultCopyIcon();\n }\n\n if (name === 'value' || name === 'required' || name === 'hide-delete') {\n this.handleDeleteButtonVisibility();\n }\n\n if (name === 'value' || name === 'show-copy') {\n this.handleCopyButtonState();\n }\n }\n}\n\nconst { host, textFields, buttons, badge, labelText, contentWrapper } = {\n host: { selector: () => ':host' },\n textFields: { selector: 'descope-text' },\n labelText: { selector: 'descope-text[data-id=\"label-text\"]' },\n buttons: { selector: 'descope-button' },\n badge: { selector: 'descope-badge' },\n contentWrapper: { selector: ' .content-wrapper' },\n};\n\nexport const UserAttributeClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...textFields, property: TextClass.cssVarList.hostDirection },\n { ...buttons, property: ButtonClass.cssVarList.hostDirection },\n { ...badge, property: BadgeClass.cssVarList.hostDirection },\n ],\n labelMinWidth: { ...labelText, property: 'min-width' },\n contentMinWidth: { ...contentWrapper, property: 'min-width' },\n badgeMaxWidth: { ...badge, property: 'max-width' },\n itemsGap: [{ property: 'gap' }, { ...contentWrapper, property: 'gap' }],\n iconColor: [\n { selector: () => '::slotted(*)', property: IconClass.cssVarList.fill },\n // the copied check-icon lives in the shadow DOM (not slotted), so it\n // needs its own mapping to follow the same icon color\n { selector: () => '.check-icon', property: IconClass.cssVarList.fill },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawUserAttribute);\n","import { componentName, UserAttributeClass } from './UserAttributeClass';\nimport '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-badge';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, UserAttributeClass);\n\nexport { UserAttributeClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","xE","RawBadge","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","fz","shrinkToIndicatorThreshold","getAttribute","handleShrinkToIndicator","value","toggleAttribute","parseFloat","attributeChangedCallback","name","oldVal","newVal","BadgeClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","hostWidth","selector","property","hostHeight","hostDirection","fontFamily","fontSize","fontWeight","lineHeight","textTransform","verticalPadding","horizontalPadding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","textAlign","boxShadow","textIndent","VO","tQ","customElements","define","_BadgeClass__WEBPACK_IMPORTED_MODULE_0__","T","e","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","host","label","slottedIcon","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","hostMaxWidth","cursor","outlineOffset","outlineColor","outlineStyle","outlineWidth","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","click","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","J","IconClass","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","TextClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textLineHeight","textLetterSpacing","textShadow","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__","s","componentHelpers","RawUserAttribute","createBaseClass","check_default","componentsHelpers","copyButton","shadowRoot","deleteButton","editButton","badge","labelText","valueText","onLabelChange","innerText","onValueOrPlaceholderChange","placeholder","onBadgeLabelChange","badgeLabel","onBadgeTooltipTextChange","badgeTooltipText","updateButtonLabel","btnRef","textSpanEle","onIsRequiredChange","toggle","isRequired","editButtonLabel","deleteButtonLabel","isDeleteHidden","isCopyEnabled","copyButtonLabel","handleDeleteButtonVisibility","handleCopyButtonState","addEventListener","dispatchEvent","CustomEvent","bubbles","composed","handleCopyClick","setDefaultChildren","isDraggable","navigator","clipboard","writeText","setTimeout","catch","removeAttribute","addIcon","slotName","icon","delete_default","edit_default","setDefaultCopyIcon","copy_default","concat","textFields","buttons","contentWrapper","UserAttributeClass","helpers","mixins","hostMinWidth","labelMinWidth","contentMinWidth","badgeMaxWidth","itemsGap"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-user-attribute-index-js.js","mappings":"yIAAAA,EAAAC,QAAA,+RCAAD,EAAAC,QAAA,uYCAAD,EAAAC,QAAA,+WCAAD,EAAAC,QAAA,qjDCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,SAE7C,MAAAC,WAAuB,EAAAC,EAAAC,IAAe,CACtCL,gBACAM,aAAA,iBAEA,6BAAAC,GACA,8DACA,C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AUmN,EAAAnN,SAAyBoJ,EAAAO,EAAS3G,WAAA9C,eAC5C,IAAUkN,EAAApN,SAAsB+B,EAAAmC,EAAWlB,WAAA9C,eAC3C,IAAUmK,EAAArK,SAAoBR,EAAAiC,EAAUuB,WAAA9C,gBAExCwN,cAAA,IAAuBpD,EAAAtK,SAAA,aACvB2N,gBAAA,IAAyBN,EAAArN,SAAA,aACzB4N,cAAA,IAAuBvD,EAAArK,SAAA,aACvB6N,SAAA,EAAmB7N,SAAA,OAAiB,IAAIqN,EAAArN,SAAA,QACxC6C,UAAA,CACA,CAAU9C,SAAA,mBAAAC,SAA0CmE,EAAApB,EAASC,WAAAC,MAG7D,CAAUlD,SAAA,kBAAAC,SAAyCmE,EAAApB,EAASC,WAAAC,UAI1DuK,EAAArM,GACAqM,EAAApM,GAzBgC,CA0BlCyI,uCC5ZAxI,eAAAC,OAAsBvD,EAAeuP","sources":["webpack://@descope/web-components-ui/./src/components/descope-user-attribute/check.svg","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/copy.svg","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/delete.svg","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/edit.svg","webpack://@descope/web-components-ui/../components/descope-badge/src/component/BadgeClass.js","webpack://@descope/web-components-ui/../components/descope-badge/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/UserAttributeClass.js","webpack://@descope/web-components-ui/./src/components/descope-user-attribute/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTkgMTYuMTcgNC44MyAxMmwtMS40MiAxLjQxTDkgMTkgMjEgN2wtMS40MS0xLjQxeiIgZmlsbD0iY3VycmVudGNvbG9yIi8+IDwvc3ZnPiA=\"","module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTE2IDFINGMtMS4xIDAtMiAuOS0yIDJ2MTRoMlYzaDEyVjF6bTMgNEg4Yy0xLjEgMC0yIC45LTIgMnYxNGMwIDEuMS45IDIgMiAyaDExYzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJ6bTAgMTZIOFY3aDExdjE0eiIgZmlsbD0iY3VycmVudGNvbG9yIi8+IDwvc3ZnPiA=\"","module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTEgMTZDMSAxNy4xIDEuOSAxOCAzIDE4SDExQzEyLjEgMTggMTMgMTcuMSAxMyAxNlY0SDFWMTZaTTMgNkgxMVYxNkgzVjZaTTEwLjUgMUw5LjUgMEg0LjVMMy41IDFIMFYzSDE0VjFIMTAuNVoiIGZpbGw9ImN1cnJlbnRj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gMTAuNjQwMiA1LjU2MDE5IDEwLjYxNjJDNS40NjQxOSAxMC41OTIyIDUuMzkyMTkgMTAuNDcyMiA1LjQ0MDE5IDEwLjM3NjJDNS43NTIxOSA5LjI0ODE2IDYuMDQwMTkgOC41NTIxNiA2LjI1NjE5IDguMzEyMTZMMTEuMjcyMiAyLjYyNDE1Wk0xMS45MjAyIDEuODU2MTVMMTMuMjg4MiAwLjMyMDE0OUMxMy42NDgyIC0wLjA4Nzg1MTYgMTQuMjcyMiAtMC4xMTE4NTIgMTQuNjgwMiAwLjI3MjE0OUMxNS4wODgyIDAuNjMyMTQ5IDE1LjExMjIgMS4yODAxNSAxNC43NTIyIDEuNjg4MTVMMTMuMjY0MiAzLjM2ODE1TDExLjkyMDIgMS44NTYxNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPiA8L3N2Zz4g\"","import {\n componentNameValidationMixin,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('badge');\n\nclass RawBadge extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['data-attachment-size', 'shrink-to-indicator-threshold'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this,\n );\n }\n\n get shrinkToIndicatorThreshold() {\n return this.getAttribute('shrink-to-indicator-threshold') || 65;\n }\n\n #handleShrinkToIndicator(value) {\n this.toggleAttribute(\n 'shrink-to-indicator',\n parseFloat(value) < this.shrinkToIndicatorThreshold,\n );\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n super.attributeChangedCallback?.(name, oldVal, newVal);\n if (name === 'data-attachment-size' && oldVal !== newVal) {\n this.#handleShrinkToIndicator(newVal);\n }\n }\n}\n\nexport const BadgeClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }],\n hostHeight: [{ selector: () => ':host', property: 'height' }],\n hostDirection: { property: 'direction' },\n\n fontFamily: {},\n fontSize: {},\n fontWeight: {},\n lineHeight: {},\n textTransform: {},\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n borderRadius: {},\n\n backgroundColor: {},\n\n textColor: { property: 'color' },\n textAlign: {},\n boxShadow: {},\n textIndent: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawBadge);\n","import { componentName, BadgeClass } from './BadgeClass';\n\ncustomElements.define(componentName, BadgeClass);\n\nexport { BadgeClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'role'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { TextClass } from '@descope-ui/descope-text/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\nimport { BadgeClass } from '@descope-ui/descope-badge/class';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport deleteIcon from './delete.svg';\nimport editIcon from './edit.svg';\nimport copyIcon from './copy.svg';\nimport checkIcon from './check.svg';\n\nexport const componentName = getComponentName('user-attribute');\nclass RawUserAttribute extends createBaseClass({\n componentName,\n baseSelector: ':host > .root',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"root\">\n <descope-text st-text-align=\"auto\" data-id=\"label-text\" variant=\"body1\" mode=\"secondary\" class=\"label\"></descope-text>\n <div class=\"content-wrapper\">\n <descope-text st-text-align=\"auto\" data-id=\"value-text\" variant=\"body1\" mode=\"primary\" class=\"value\"></descope-text>\n <div class=\"btn-wrapper\">\n <descope-badge mode=\"default\" bordered=\"true\" size=\"xs\"></descope-badge>\n <descope-button size=\"sm\" data-id=\"copy-btn\" variant=\"link\" mode=\"primary\">\n <slot name=\"copy-icon\"></slot>\n <descope-icon class=\"check-icon\" src=\"${checkIcon}\" src-dark=\"${checkIcon}\"></descope-icon>\n </descope-button>\n <descope-button size=\"sm\" data-id=\"delete-btn\" variant=\"link\" mode=\"primary\">\n <slot name=\"delete-icon\"></slot>\n </descope-button>\n <descope-button size=\"sm\" data-id=\"edit-btn\" variant=\"link\" mode=\"primary\">\n <slot name=\"edit-icon\"></slot>\n </descope-button>\n </div>\n </div>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n container-type: inline-size;\n\t\t\t\t}\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n ::slotted(*) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n @container (max-width: 529px) {\n .root {\n flex-wrap: wrap;\n }\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n slot[name=\"edit-icon\"],\n slot[name=\"delete-icon\"],\n slot[name=\"copy-icon\"] {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n }\n\n descope-button[data-id=\"copy-btn\"].hidden {\n display: none;\n }\n\n descope-button[data-id=\"copy-btn\"] .check-icon {\n display: none;\n }\n\n descope-button[data-id=\"copy-btn\"].copied slot[name=\"copy-icon\"] {\n display: none;\n }\n\n descope-button[data-id=\"copy-btn\"].copied .check-icon {\n display: inline-flex;\n }\n\n .content-wrapper {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n }\n\n .label {\n flex-grow: 1;\n width: 100%;\n }\n\n .value {\n flex-grow: 1;\n }\n\n descope-badge {\n margin-inline-end: 10px;\n }\n\n .hidden {\n visibility: hidden;\n width: 0;\n }\n\n descope-text[data-id=\"label-text\"].required:after {\n content: '*';\n color: var(${TextClass.cssVarList.textColor});\n }\n\n :host([readonly=\"true\"]) descope-button:not([data-id=\"copy-btn\"]) {\n visibility: hidden;\n width: 0;\n }\n `,\n this\n );\n\n this.copyButton = this.shadowRoot.querySelector('descope-button[data-id=\"copy-btn\"]');\n this.deleteButton = this.shadowRoot.querySelector('descope-button[data-id=\"delete-btn\"]');\n this.editButton = this.shadowRoot.querySelector('descope-button[data-id=\"edit-btn\"]');\n this.badge = this.shadowRoot.querySelector('descope-badge');\n this.labelText = this.shadowRoot.querySelector('descope-text[data-id=\"label-text\"]');\n this.valueText = this.shadowRoot.querySelector('descope-text[data-id=\"value-text\"]');\n }\n\n onLabelChange() {\n this.labelText.innerText = this.label;\n this.labelText.setAttribute('title', this.label);\n }\n\n onValueOrPlaceholderChange() {\n const text = this.value || this.placeholder;\n const mode = this.value ? 'primary' : 'secondary';\n\n this.valueText.innerText = text;\n this.valueText.setAttribute('title', text);\n this.valueText.setAttribute('mode', mode);\n }\n\n onBadgeLabelChange() {\n if (!this.badgeLabel) {\n this.badge.style.display = 'none';\n } else {\n this.badge.innerText = this.badgeLabel;\n this.badge.style.display = '';\n }\n }\n\n onBadgeTooltipTextChange() {\n this.badge.setAttribute('title', this.badgeTooltipText || this.badgeLabel);\n }\n\n updateButtonLabel(btnRef, label) {\n let textSpanEle = btnRef.querySelector('span.btn-label');\n\n if (label) {\n if (!textSpanEle) {\n textSpanEle = document.createElement('span');\n textSpanEle.classList.add('btn-label');\n btnRef.appendChild(textSpanEle);\n }\n textSpanEle.innerText = label;\n } else {\n textSpanEle?.remove();\n }\n }\n\n onIsRequiredChange() {\n this.labelText.classList.toggle('required', this.isRequired);\n }\n\n get label() {\n return this.getAttribute('label') || '';\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n get placeholder() {\n return this.getAttribute('placeholder') || '';\n }\n\n get isRequired() {\n return this.getAttribute('required') === 'true';\n }\n\n get badgeLabel() {\n return this.getAttribute('badge-label') || '';\n }\n\n get badgeTooltipText() {\n return this.getAttribute('badge-tooltip-text') || '';\n }\n\n get editButtonLabel() {\n return this.getAttribute('edit-button-label') || '';\n }\n\n get deleteButtonLabel() {\n return this.getAttribute('delete-button-label') || '';\n }\n\n get isDeleteHidden() {\n return this.getAttribute('hide-delete') === 'true';\n }\n\n get isCopyEnabled() {\n return this.getAttribute('show-copy') === 'true';\n }\n\n get copyButtonLabel() {\n return this.getAttribute('copy-button-label') || '';\n }\n\n init() {\n this.onLabelChange();\n this.onValueOrPlaceholderChange();\n this.onIsRequiredChange();\n this.onBadgeLabelChange();\n this.onBadgeTooltipTextChange();\n this.updateButtonLabel(this.editButton, this.editButtonLabel);\n this.updateButtonLabel(this.deleteButton, this.deleteButtonLabel);\n this.updateButtonLabel(this.copyButton, this.copyButtonLabel);\n this.handleDeleteButtonVisibility();\n this.handleCopyButtonState();\n\n this.deleteButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('delete-clicked', { bubbles: true, composed: true }))\n );\n\n this.editButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('edit-clicked', { bubbles: true, composed: true }))\n );\n\n this.copyButton.addEventListener('click', () => this.#handleCopyClick());\n\n this.setDefaultChildren();\n }\n\n #handleCopyClick() {\n // isDraggable is true only inside the page editor (craftjs sets draggable=\"true\"\n // for drag-and-drop); there the copy action must not run.\n if (!this.value || this.isDraggable || !navigator.clipboard) return;\n\n navigator.clipboard\n .writeText(this.value)\n .then(() => {\n this.copyButton.classList.add('copied');\n setTimeout(() => this.copyButton.classList.remove('copied'), 2000);\n })\n .catch(() => {});\n }\n\n handleCopyButtonState() {\n this.copyButton.classList.toggle('hidden', !this.isCopyEnabled);\n\n if (this.value) {\n this.copyButton.removeAttribute('disabled');\n } else {\n this.copyButton.setAttribute('disabled', 'true');\n }\n }\n\n #addIcon(src, slotName) {\n const icon = document.createElement('descope-icon');\n icon.setAttribute('src', src);\n icon.setAttribute('src-dark', src);\n icon.setAttribute('slot', slotName);\n this.appendChild(icon);\n }\n\n setDefaultChildren() {\n if (!this.querySelector('[slot=\"delete-icon\"]')) {\n this.#addIcon(deleteIcon, 'delete-icon');\n }\n if (!this.querySelector('[slot=\"edit-icon\"]')) {\n this.#addIcon(editIcon, 'edit-icon');\n }\n this.setDefaultCopyIcon();\n }\n\n setDefaultCopyIcon() {\n if (this.isCopyEnabled && !this.querySelector('[slot=\"copy-icon\"]')) {\n this.#addIcon(copyIcon, 'copy-icon');\n }\n }\n\n static get observedAttributes() {\n return [\n 'label',\n 'value',\n 'placeholder',\n 'required',\n 'badge-label',\n 'badge-tooltip-text',\n 'edit-button-label',\n 'delete-button-label',\n 'copy-button-label',\n 'hide-delete',\n 'show-copy',\n ].concat(super.observedAttributes);\n }\n\n handleDeleteButtonVisibility() {\n this.deleteButton.classList.toggle(\n 'hidden',\n this.isRequired || !this.value || this.isDeleteHidden\n );\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n if (oldValue === newValue) {\n return;\n }\n\n if (name === 'label') {\n this.onLabelChange();\n } else if (name === 'value' || name === 'placeholder') {\n this.onValueOrPlaceholderChange();\n } else if (name === 'required') {\n this.onIsRequiredChange();\n } else if (name === 'badge-label') {\n this.onBadgeLabelChange();\n } else if (name === 'badge-tooltip-text') {\n this.onBadgeTooltipTextChange();\n } else if (name === 'edit-button-label') {\n this.updateButtonLabel(this.editButton, this.editButtonLabel);\n } else if (name === 'delete-button-label') {\n this.updateButtonLabel(this.deleteButton, this.deleteButtonLabel);\n } else if (name === 'copy-button-label') {\n this.updateButtonLabel(this.copyButton, this.copyButtonLabel);\n } else if (name === 'show-copy') {\n this.setDefaultCopyIcon();\n }\n\n if (name === 'value' || name === 'required' || name === 'hide-delete') {\n this.handleDeleteButtonVisibility();\n }\n\n if (name === 'value' || name === 'show-copy') {\n this.handleCopyButtonState();\n }\n }\n}\n\nconst { host, textFields, buttons, badge, labelText, contentWrapper } = {\n host: { selector: () => ':host' },\n textFields: { selector: 'descope-text' },\n labelText: { selector: 'descope-text[data-id=\"label-text\"]' },\n buttons: { selector: 'descope-button' },\n badge: { selector: 'descope-badge' },\n contentWrapper: { selector: ' .content-wrapper' },\n};\n\nexport const UserAttributeClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...textFields, property: TextClass.cssVarList.hostDirection },\n { ...buttons, property: ButtonClass.cssVarList.hostDirection },\n { ...badge, property: BadgeClass.cssVarList.hostDirection },\n ],\n labelMinWidth: { ...labelText, property: 'min-width' },\n contentMinWidth: { ...contentWrapper, property: 'min-width' },\n badgeMaxWidth: { ...badge, property: 'max-width' },\n itemsGap: [{ property: 'gap' }, { ...contentWrapper, property: 'gap' }],\n iconColor: [\n { selector: () => '::slotted(*)', property: IconClass.cssVarList.fill },\n // the copied check-icon lives in the shadow DOM (not slotted), so it\n // needs its own mapping to follow the same icon color\n { selector: () => '.check-icon', property: IconClass.cssVarList.fill },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawUserAttribute);\n","import { componentName, UserAttributeClass } from './UserAttributeClass';\nimport '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-badge';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, UserAttributeClass);\n\nexport { UserAttributeClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","xE","RawBadge","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","fz","shrinkToIndicatorThreshold","getAttribute","handleShrinkToIndicator","value","toggleAttribute","parseFloat","attributeChangedCallback","name","oldVal","newVal","BadgeClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","hostWidth","selector","property","hostHeight","hostDirection","fontFamily","fontSize","fontWeight","lineHeight","textTransform","verticalPadding","horizontalPadding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","textAlign","boxShadow","textIndent","VO","tQ","customElements","define","_BadgeClass__WEBPACK_IMPORTED_MODULE_0__","T","e","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","host","label","slottedIcon","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","hostMaxWidth","cursor","outlineOffset","outlineColor","outlineStyle","outlineWidth","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","click","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","J","IconClass","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","TextClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textLineHeight","textLetterSpacing","textShadow","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__","s","componentHelpers","RawUserAttribute","createBaseClass","check_default","componentsHelpers","copyButton","shadowRoot","deleteButton","editButton","badge","labelText","valueText","onLabelChange","innerText","onValueOrPlaceholderChange","placeholder","onBadgeLabelChange","badgeLabel","onBadgeTooltipTextChange","badgeTooltipText","updateButtonLabel","btnRef","textSpanEle","onIsRequiredChange","toggle","isRequired","editButtonLabel","deleteButtonLabel","isDeleteHidden","isCopyEnabled","copyButtonLabel","handleDeleteButtonVisibility","handleCopyButtonState","addEventListener","dispatchEvent","CustomEvent","bubbles","composed","handleCopyClick","setDefaultChildren","isDraggable","navigator","clipboard","writeText","setTimeout","catch","removeAttribute","addIcon","slotName","icon","delete_default","edit_default","setDefaultCopyIcon","copy_default","concat","textFields","buttons","contentWrapper","UserAttributeClass","helpers","mixins","hostMinWidth","labelMinWidth","contentMinWidth","badgeMaxWidth","itemsGap"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,4188,9990],{9427(t){t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA=="},77888(t,e,n){"use strict";n.d(e,{T:()=>r,e:()=>d});var i=n(88961),s=n(72270),l=n(25964),o=n(63200);const r=(0,l.xE)("badge");class a extends((0,s.qu)({componentName:r,baseSelector:":host > div"})){static get observedAttributes(){return["data-attachment-size","shrink-to-indicator-threshold"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t",(0,l.fz)("\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ",this)}get shrinkToIndicatorThreshold(){return this.getAttribute("shrink-to-indicator-threshold")||65}#t(t){this.toggleAttribute("shrink-to-indicator",parseFloat(t)<this.shrinkToIndicatorThreshold)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"data-attachment-size"===t&&e!==n&&this.#t(n)}}const d=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostHeight:[{selector:()=>":host",property:"height"}],hostDirection:{property:"direction"},fontFamily:{},fontSize:{},fontWeight:{},lineHeight:{},textTransform:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],borderWidth:{},borderStyle:{},borderColor:{},borderRadius:{},backgroundColor:{},textColor:{property:"color"},textAlign:{},boxShadow:{},textIndent:{}}}),i.VO,i.tQ)(a)},11065(t,e,n){"use strict";n.r(e),n.d(e,{BadgeClass:()=>i.e,componentName:()=>i.T});var i=n(77888);customElements.define(i.T,i.e)},19624(t,e,n){"use strict";n.d(e,{J:()=>p,T:()=>a});var i=n(63200),s=n(25964),l=n(88961),o=n(98538),r=n(10767);const a=(0,s.xE)("button"),{host:d,label:h,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const p=(0,i.Zz)((0,l.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,l.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...d,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:o.S.cssVarList.fill},labelTextDecoration:{...h,property:"text-decoration"},labelSpacing:{...h,property:"gap"},textAlign:{...h,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),r.G,l.VO,l.tQ)((0,l.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${p.cssVarList.outlineWidth}) + var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${p.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${p.cssVarList.hostHeight}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${p.cssVarList.hostWidth}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:a})),{color:b,fontSize:g}=p.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,n){"use strict";n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,n){"use strict";n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T});var i=n(19624);n(83799),customElements.define(i.T,i.J)},98538(t,e,n){"use strict";n.d(e,{S:()=>a,T:()=>r});var i=n(88961),s=n(25964),l=n(8512),o=n(63200);const r=(0,s.xE)("icon"),a=(0,o.Zz)((0,i.RF)({mappings:{fill:[{},{property:l.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),i.VO,i.tQ)((0,i.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:r}))},8512(t,e,n){"use strict";n.d(e,{T:()=>a,q:()=>c});var i=n(88961),s=n(72270),l=n(63200),o=n(25964),r=n(18782);const a=(0,o.xE)("image"),d=["src","src-dark"];class h extends((0,s.qu)({componentName:a,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,o.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,r.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&this.shouldRender(t)&&this.renderImage()}}const c=(0,l.Zz)((0,i.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),i.VO,i.tQ)(h)},18782(t,e,n){"use strict";n.d(e,{m:()=>l});var i=n(25414);const s=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},l=async(t,e)=>{try{let n;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));n=s(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),i=await e.text();n=s(i)}else n=((t,e)=>{const n=document.createElement("img");return n.setAttribute("src",t),n.setAttribute("alt",e),n})(t,e);return n.style.setProperty("max-width","100%"),n.style.setProperty("max-height","100%"),n}catch{return null}}},66434(t,e,n){"use strict";n.d(e,{T:()=>r,s:()=>h});var i=n(88961),s=n(63200),l=n(25964),o=n(72270);const r=(0,l.xE)("text");class a extends((0,o.qu)({componentName:r,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,l.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,l.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:d}={host:{selector:()=>":host"}},h=(0,s.Zz)((0,i.RF)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,i.DM)({triggers:[{attr:"full-width",value:"true"}]}),i.VO,i.tQ)(a)},63595(t,e,n){"use strict";n.r(e),n.d(e,{TextClass:()=>i.s,componentName:()=>i.T});var i=n(66434);customElements.define(i.T,i.s)},67760(t,e,n){"use strict";n.r(e),n.d(e,{UserAuthMethodClass:()=>L,componentName:()=>b});var i=n(66434),s=n(19624),l=n(98538),o=n(77888),r=n(25964),a=n(79365),d=n(81365),h=n(9696),c=n(97810),u=n(9427),p=n.n(u);const b=(0,c.xE)("user-auth-method");class g extends((0,d.q)({componentName:b,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button class="btn unfulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <descope-button class="btn fulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="fulfilled-button-icon"></slot>\n </descope-button>\n <div class="status-indicator hidden">\n <vaadin-icon src=${p()}></vaadin-icon>\n </div>\n <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t`,(0,r.fz)('\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n min-width: 0;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n min-width: 0;\n }\n\n .status-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name="method-icon"]:not(:empty) {\n display: inline-flex;\n align-items: center;\n }\n ',this),this.unfulfilledButton=this.shadowRoot.querySelector(".btn.unfulfilled"),this.fulfilledButton=this.shadowRoot.querySelector(".btn.fulfilled"),this.statusIndicator=this.shadowRoot.querySelector(".status-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}updateButtonLabel(t,e){let n=t.querySelector("span");e?(n||(n=document.createElement("span"),t.appendChild(n)),n.innerText=e):n&&t.removeChild(n)}onFulfilledChange(){this.isFulfilled?(this.unfulfilledButton.classList.add("hidden"),this.handleFulfilled()):(this.fulfilledButton.classList.add("hidden"),this.handleUnfulfilled())}handleFulfilled(){this.fulfilledButton.classList.toggle("hidden",!this.isFulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isFulfilledEditable)}handleUnfulfilled(){this.unfulfilledButton.classList.toggle("hidden",!this.isUnfulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isUnfulfilledEditable)}get label(){return this.getAttribute("label")||""}get unfulfilledButtonLabel(){return this.getAttribute("button-label")||""}get fulfilledButtonLabel(){return this.getAttribute("fulfilled-button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}get isFulfilledEditable(){return"true"===this.getAttribute("fulfilled-editable")}get isUnfulfilledEditable(){return"false"!==this.getAttribute("unfulfilled-editable")}init(){this.onLabelChange(),this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel),this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel),this.onFulfilledChange(),this.unfulfilledButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))),this.fulfilledButton.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("fulfilled-button-clicked",{bubbles:!0,composed:!0}))})}static get observedAttributes(){return["label","fulfilled","button-label","fulfilled-button-label","fulfilled-editable","unfulfilled-editable"].concat(super.observedAttributes)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("label"===t?this.onLabelChange():"fulfilled"===t?this.onFulfilledChange():"button-label"===t?this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel):"fulfilled-button-label"===t?this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel):"fulfilled-editable"===t&&this.isFulfilled?this.handleFulfilled():"unfulfilled-editable"!==t||this.isFulfilled||this.handleUnfulfilled())}}const{host:f,textField:m,buttons:y,badge:x,textWrapper:v,methodIconSlot:w}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]:not(:empty)'}},L=(0,h.Zz)((0,a.RF)({mappings:{hostWidth:{...f,property:"width"},hostMinWidth:{...f,property:"min-width"},hostMaxWidth:{...f,property:"max-width"},hostDirection:[{...f,property:"direction"},{...m,property:i.s.cssVarList.hostDirection},{...y,property:s.J.cssVarList.hostDirection},{...x,property:o.e.cssVarList.hostDirection}],itemsGap:[{property:"gap"},{...v,property:"gap"}],iconSize:[{...w,property:"width"},{...w,property:"height"}],iconColor:[{selector:()=>"::slotted(*)",property:l.S.cssVarList.fill}]}}),a.VO,a.tQ)(g);n(63595),n(30576),n(11065),n(95260),customElements.define(b,L)}}]);
|
|
1
|
+
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,4188,9990],{9427(t){t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA=="},77888(t,e,n){"use strict";n.d(e,{T:()=>r,e:()=>d});var i=n(88961),s=n(72270),l=n(25964),o=n(63200);const r=(0,l.xE)("badge");class a extends((0,s.qu)({componentName:r,baseSelector:":host > div"})){static get observedAttributes(){return["data-attachment-size","shrink-to-indicator-threshold"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t",(0,l.fz)("\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ",this)}get shrinkToIndicatorThreshold(){return this.getAttribute("shrink-to-indicator-threshold")||65}#t(t){this.toggleAttribute("shrink-to-indicator",parseFloat(t)<this.shrinkToIndicatorThreshold)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"data-attachment-size"===t&&e!==n&&this.#t(n)}}const d=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostHeight:[{selector:()=>":host",property:"height"}],hostDirection:{property:"direction"},fontFamily:{},fontSize:{},fontWeight:{},lineHeight:{},textTransform:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],borderWidth:{},borderStyle:{},borderColor:{},borderRadius:{},backgroundColor:{},textColor:{property:"color"},textAlign:{},boxShadow:{},textIndent:{}}}),i.VO,i.tQ)(a)},11065(t,e,n){"use strict";n.r(e),n.d(e,{BadgeClass:()=>i.e,componentName:()=>i.T});var i=n(77888);customElements.define(i.T,i.e)},19624(t,e,n){"use strict";n.d(e,{J:()=>p,T:()=>a});var i=n(63200),s=n(25964),l=n(88961),o=n(98538),r=n(10767);const a=(0,s.xE)("button"),{host:d,label:h,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const p=(0,i.Zz)((0,l.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,l.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...d,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:o.S.cssVarList.fill},labelTextDecoration:{...h,property:"text-decoration"},labelSpacing:{...h,property:"gap"},textAlign:{...h,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),r.G,l.VO,l.tQ)((0,l.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${p.cssVarList.outlineWidth}) + var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${p.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${p.cssVarList.hostHeight}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${p.cssVarList.hostWidth}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style","role"],componentName:a})),{color:b,fontSize:g}=p.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,n){"use strict";n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,n){"use strict";n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T});var i=n(19624);n(83799),customElements.define(i.T,i.J)},98538(t,e,n){"use strict";n.d(e,{S:()=>a,T:()=>r});var i=n(88961),s=n(25964),l=n(8512),o=n(63200);const r=(0,s.xE)("icon"),a=(0,o.Zz)((0,i.RF)({mappings:{fill:[{},{property:l.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),i.VO,i.tQ)((0,i.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:r}))},8512(t,e,n){"use strict";n.d(e,{T:()=>a,q:()=>c});var i=n(88961),s=n(72270),l=n(63200),o=n(25964),r=n(18782);const a=(0,o.xE)("image"),d=["src","src-dark"];class h extends((0,s.qu)({componentName:a,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,o.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,r.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&this.shouldRender(t)&&this.renderImage()}}const c=(0,l.Zz)((0,i.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),i.VO,i.tQ)(h)},18782(t,e,n){"use strict";n.d(e,{m:()=>l});var i=n(25414);const s=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},l=async(t,e)=>{try{let n;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));n=s(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),i=await e.text();n=s(i)}else n=((t,e)=>{const n=document.createElement("img");return n.setAttribute("src",t),n.setAttribute("alt",e),n})(t,e);return n.style.setProperty("max-width","100%"),n.style.setProperty("max-height","100%"),n}catch{return null}}},66434(t,e,n){"use strict";n.d(e,{T:()=>r,s:()=>h});var i=n(88961),s=n(63200),l=n(25964),o=n(72270);const r=(0,l.xE)("text");class a extends((0,o.qu)({componentName:r,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,l.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,l.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:d}={host:{selector:()=>":host"}},h=(0,s.Zz)((0,i.RF)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,i.DM)({triggers:[{attr:"full-width",value:"true"}]}),i.VO,i.tQ)(a)},63595(t,e,n){"use strict";n.r(e),n.d(e,{TextClass:()=>i.s,componentName:()=>i.T});var i=n(66434);customElements.define(i.T,i.s)},67760(t,e,n){"use strict";n.r(e),n.d(e,{UserAuthMethodClass:()=>L,componentName:()=>b});var i=n(66434),s=n(19624),l=n(98538),o=n(77888),r=n(25964),a=n(79365),d=n(81365),h=n(9696),c=n(97810),u=n(9427),p=n.n(u);const b=(0,c.xE)("user-auth-method");class g extends((0,d.q)({componentName:b,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button class="btn unfulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <descope-button class="btn fulfilled hidden" size="sm" variant="link" mode="primary">\n <slot name="fulfilled-button-icon"></slot>\n </descope-button>\n <div class="status-indicator hidden">\n <vaadin-icon src=${p()}></vaadin-icon>\n </div>\n <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t`,(0,r.fz)('\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n min-width: 0;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n min-width: 0;\n }\n\n .status-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name="method-icon"]:not(:empty) {\n display: inline-flex;\n align-items: center;\n }\n ',this),this.unfulfilledButton=this.shadowRoot.querySelector(".btn.unfulfilled"),this.fulfilledButton=this.shadowRoot.querySelector(".btn.fulfilled"),this.statusIndicator=this.shadowRoot.querySelector(".status-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}updateButtonLabel(t,e){let n=t.querySelector("span");e?(n||(n=document.createElement("span"),t.appendChild(n)),n.innerText=e):n&&t.removeChild(n)}onFulfilledChange(){this.isFulfilled?(this.unfulfilledButton.classList.add("hidden"),this.handleFulfilled()):(this.fulfilledButton.classList.add("hidden"),this.handleUnfulfilled())}handleFulfilled(){this.fulfilledButton.classList.toggle("hidden",!this.isFulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isFulfilledEditable)}handleUnfulfilled(){this.unfulfilledButton.classList.toggle("hidden",!this.isUnfulfilledEditable),this.statusIndicator.classList.toggle("hidden",this.isUnfulfilledEditable)}get label(){return this.getAttribute("label")||""}get unfulfilledButtonLabel(){return this.getAttribute("button-label")||""}get fulfilledButtonLabel(){return this.getAttribute("fulfilled-button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}get isFulfilledEditable(){return"true"===this.getAttribute("fulfilled-editable")}get isUnfulfilledEditable(){return"false"!==this.getAttribute("unfulfilled-editable")}init(){this.onLabelChange(),this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel),this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel),this.onFulfilledChange(),this.unfulfilledButton.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))),this.fulfilledButton.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("fulfilled-button-clicked",{bubbles:!0,composed:!0}))})}static get observedAttributes(){return["label","fulfilled","button-label","fulfilled-button-label","fulfilled-editable","unfulfilled-editable"].concat(super.observedAttributes)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("label"===t?this.onLabelChange():"fulfilled"===t?this.onFulfilledChange():"button-label"===t?this.updateButtonLabel(this.unfulfilledButton,this.unfulfilledButtonLabel):"fulfilled-button-label"===t?this.updateButtonLabel(this.fulfilledButton,this.fulfilledButtonLabel):"fulfilled-editable"===t&&this.isFulfilled?this.handleFulfilled():"unfulfilled-editable"!==t||this.isFulfilled||this.handleUnfulfilled())}}const{host:f,textField:m,buttons:y,badge:x,textWrapper:v,methodIconSlot:w}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]:not(:empty)'}},L=(0,h.Zz)((0,a.RF)({mappings:{hostWidth:{...f,property:"width"},hostMinWidth:{...f,property:"min-width"},hostMaxWidth:{...f,property:"max-width"},hostDirection:[{...f,property:"direction"},{...m,property:i.s.cssVarList.hostDirection},{...y,property:s.J.cssVarList.hostDirection},{...x,property:o.e.cssVarList.hostDirection}],itemsGap:[{property:"gap"},{...v,property:"gap"}],iconSize:[{...w,property:"width"},{...w,property:"height"}],iconColor:[{selector:()=>"::slotted(*)",property:l.S.cssVarList.fill}]}}),a.VO,a.tQ)(g);n(63595),n(30576),n(11065),n(95260),customElements.define(b,L)}}]);
|
|
2
2
|
//# sourceMappingURL=descope-user-auth-method-index-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-user-auth-method-index-js.js","mappings":"8HAAAA,EAAAC,QAAA,qeCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,SAE7C,MAAAC,WAAuB,EAAAC,EAAAC,IAAe,CACtCL,gBACAM,aAAA,iBAEA,6BAAAC,GACA,8DACA,CAEA,WAAAC,GACAC,QAEAC,KAAAC,aAAA,CAAwBC,KAAA,SAAcC,UAAA,sDAMlC,EAAAZ,EAAAa,IACJ,8OAYAJ,KAEA,CAEA,8BAAAK,GACA,OAAAL,KAAAM,aAAA,oCACA,CAEA,EAAAC,CAAAC,GACAR,KAAAS,gBACA,sBACAC,WAAAF,GAAAR,KAAAK,2BAEA,CAEA,wBAAAM,CAAAC,EAAAC,EAAAC,GACAf,MAAAY,2BAAAC,EAAAC,EAAAC,GACA,yBAAAF,GAAAC,IAAAC,GACAd,MAAAO,EAAAO,EAEA,EAGO,MAAAC,GAAmB,EAAAC,EAAAC,KACxB,EAAAC,EAAAC,IAAgB,CAClBC,SAAA,CACAC,UAAA,EAAoBC,SAAA,YAAAC,SAAA,UACpBC,WAAA,EAAqBF,SAAA,YAAAC,SAAA,WACrBE,cAAA,CAAuBF,SAAA,aAEvBG,WAAA,GACAC,SAAA,GACAC,WAAA,GACAC,WAAA,GACAC,cAAA,GACAC,gBAAA,CACA,CAAUR,SAAA,eACV,CAAUA,SAAA,mBAEVS,kBAAA,CACA,CAAUT,SAAA,gBACV,CAAUA,SAAA,kBAGVU,YAAA,GACAC,YAAA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L,SAAA,QACxCoD,SAAA,CACA,IAAUyI,EAAA7L,SAAA,SACV,IAAU6L,EAAA7L,SAAA,WAEV6C,UAAA,EAAoB9C,SAAA,mBAAAC,SAA0CmE,EAAApB,EAASC,WAAAC,UAGrE+I,EAAA7K,GACA6K,EAAA5K,GArBiC,CAsBnCuI,uCChQAtI,eAAAC,OAAsBvD,EAAe+N","sources":["webpack://@descope/web-components-ui/./src/components/descope-user-auth-method/green-v.svg","webpack://@descope/web-components-ui/../components/descope-badge/src/component/BadgeClass.js","webpack://@descope/web-components-ui/../components/descope-badge/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/./src/components/descope-user-auth-method/UserAuthMethodClass.js","webpack://@descope/web-components-ui/./src/components/descope-user-auth-method/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA==\"","import {\n componentNameValidationMixin,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('badge');\n\nclass RawBadge extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['data-attachment-size', 'shrink-to-indicator-threshold'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this,\n );\n }\n\n get shrinkToIndicatorThreshold() {\n return this.getAttribute('shrink-to-indicator-threshold') || 65;\n }\n\n #handleShrinkToIndicator(value) {\n this.toggleAttribute(\n 'shrink-to-indicator',\n parseFloat(value) < this.shrinkToIndicatorThreshold,\n );\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n super.attributeChangedCallback?.(name, oldVal, newVal);\n if (name === 'data-attachment-size' && oldVal !== newVal) {\n this.#handleShrinkToIndicator(newVal);\n }\n }\n}\n\nexport const BadgeClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }],\n hostHeight: [{ selector: () => ':host', property: 'height' }],\n hostDirection: { property: 'direction' },\n\n fontFamily: {},\n fontSize: {},\n fontWeight: {},\n lineHeight: {},\n textTransform: {},\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n borderRadius: {},\n\n backgroundColor: {},\n\n textColor: { property: 'color' },\n textAlign: {},\n boxShadow: {},\n textIndent: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawBadge);\n","import { componentName, BadgeClass } from './BadgeClass';\n\ncustomElements.define(componentName, BadgeClass);\n\nexport { BadgeClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { TextClass } from '@descope-ui/descope-text/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { BadgeClass } from '@descope-ui/descope-badge/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport greenVIcon from './green-v.svg';\n\nexport const componentName = getComponentName('user-auth-method');\nclass RawUserAuthMethod extends createBaseClass({\n componentName,\n baseSelector: ':host > .root',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"root\">\n <div class=\"text-wrapper\">\n <slot name=\"method-icon\"></slot>\n <descope-text st-text-align=\"auto\" data-id=\"label-text\" variant=\"body1\" mode=\"primary\"></descope-text>\n </div>\n\n <div class=\"btn-wrapper\">\n <descope-button class=\"btn unfulfilled hidden\" size=\"sm\" variant=\"link\" mode=\"primary\">\n <slot name=\"button-icon\"></slot>\n </descope-button>\n <descope-button class=\"btn fulfilled hidden\" size=\"sm\" variant=\"link\" mode=\"primary\">\n <slot name=\"fulfilled-button-icon\"></slot>\n </descope-button>\n <div class=\"status-indicator hidden\">\n <vaadin-icon src=${greenVIcon}></vaadin-icon>\n </div>\n <descope-button class=\"hidden-btn\" size=\"sm\" variant=\"link\" mode=\"primary\"></descope-button>\n </div>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n min-width: 0;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n min-width: 0;\n }\n\n .status-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name=\"method-icon\"]:not(:empty) {\n display: inline-flex;\n align-items: center;\n }\n `,\n this\n );\n\n this.unfulfilledButton = this.shadowRoot.querySelector('.btn.unfulfilled');\n this.fulfilledButton = this.shadowRoot.querySelector('.btn.fulfilled');\n this.statusIndicator = this.shadowRoot.querySelector('.status-indicator');\n this.labelText = this.shadowRoot.querySelector('descope-text[data-id=\"label-text\"]');\n }\n\n onLabelChange() {\n this.labelText.innerText = this.label;\n this.labelText.setAttribute('title', this.label);\n }\n\n updateButtonLabel(btnRef, label) {\n let textSpanEle = btnRef.querySelector('span');\n\n if (label) {\n if (!textSpanEle) {\n textSpanEle = document.createElement('span');\n btnRef.appendChild(textSpanEle);\n }\n textSpanEle.innerText = label;\n } else if (textSpanEle) {\n btnRef.removeChild(textSpanEle);\n }\n }\n\n onFulfilledChange() {\n if (this.isFulfilled) {\n this.unfulfilledButton.classList.add('hidden');\n this.handleFulfilled();\n } else {\n this.fulfilledButton.classList.add('hidden');\n this.handleUnfulfilled();\n }\n }\n\n handleFulfilled() {\n this.fulfilledButton.classList.toggle('hidden', !this.isFulfilledEditable);\n this.statusIndicator.classList.toggle('hidden', this.isFulfilledEditable);\n }\n\n handleUnfulfilled() {\n this.unfulfilledButton.classList.toggle('hidden', !this.isUnfulfilledEditable);\n this.statusIndicator.classList.toggle('hidden', this.isUnfulfilledEditable);\n }\n\n get label() {\n return this.getAttribute('label') || '';\n }\n\n get unfulfilledButtonLabel() {\n return this.getAttribute('button-label') || '';\n }\n\n get fulfilledButtonLabel() {\n return this.getAttribute('fulfilled-button-label') || '';\n }\n\n get isFulfilled() {\n return this.getAttribute('fulfilled') === 'true';\n }\n\n get isFulfilledEditable() {\n return this.getAttribute('fulfilled-editable') === 'true';\n }\n\n get isUnfulfilledEditable() {\n // this is to keep backward compatibility with previous versions\n return this.getAttribute('unfulfilled-editable') !== 'false';\n }\n\n init() {\n this.onLabelChange();\n this.updateButtonLabel(this.fulfilledButton, this.fulfilledButtonLabel);\n this.updateButtonLabel(this.unfulfilledButton, this.unfulfilledButtonLabel);\n this.onFulfilledChange();\n\n this.unfulfilledButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('button-clicked', { bubbles: true, composed: true }))\n );\n\n this.fulfilledButton.addEventListener('click', () => {\n this.dispatchEvent(\n new CustomEvent('fulfilled-button-clicked', { bubbles: true, composed: true })\n );\n });\n }\n\n static get observedAttributes() {\n return [\n 'label',\n 'fulfilled',\n 'button-label',\n 'fulfilled-button-label',\n 'fulfilled-editable',\n 'unfulfilled-editable',\n ].concat(super.observedAttributes);\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n if (oldValue === newValue) {\n return;\n }\n\n if (name === 'label') {\n this.onLabelChange();\n } else if (name === 'fulfilled') {\n this.onFulfilledChange();\n } else if (name === 'button-label') {\n this.updateButtonLabel(this.unfulfilledButton, this.unfulfilledButtonLabel);\n } else if (name === 'fulfilled-button-label') {\n this.updateButtonLabel(this.fulfilledButton, this.fulfilledButtonLabel);\n } else if (name === 'fulfilled-editable' && this.isFulfilled) {\n this.handleFulfilled();\n } else if (name === 'unfulfilled-editable' && !this.isFulfilled) {\n this.handleUnfulfilled();\n }\n }\n}\n\nconst { host, textField, buttons, badge, textWrapper, methodIconSlot } = {\n host: { selector: () => ':host' },\n textField: { selector: 'descope-text' },\n buttons: { selector: 'descope-button' },\n badge: { selector: 'descope-badge' },\n textWrapper: { selector: ' .text-wrapper' },\n methodIconSlot: { selector: 'slot[name=\"method-icon\"]:not(:empty)' },\n};\n\nexport const UserAuthMethodClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...textField, property: TextClass.cssVarList.hostDirection },\n { ...buttons, property: ButtonClass.cssVarList.hostDirection },\n { ...badge, property: BadgeClass.cssVarList.hostDirection },\n ],\n itemsGap: [{ property: 'gap' }, { ...textWrapper, property: 'gap' }],\n iconSize: [\n { ...methodIconSlot, property: 'width' },\n { ...methodIconSlot, property: 'height' },\n ],\n iconColor: [{ selector: () => '::slotted(*)', property: IconClass.cssVarList.fill }],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawUserAuthMethod);\n","import { componentName, UserAuthMethodClass } from './UserAuthMethodClass';\nimport '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-badge';\nimport '@vaadin/icon';\n\ncustomElements.define(componentName, UserAuthMethodClass);\n\nexport { UserAuthMethodClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","xE","RawBadge","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","fz","shrinkToIndicatorThreshold","getAttribute","handleShrinkToIndicator","value","toggleAttribute","parseFloat","attributeChangedCallback","name","oldVal","newVal","BadgeClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","hostWidth","selector","property","hostHeight","hostDirection","fontFamily","fontSize","fontWeight","lineHeight","textTransform","verticalPadding","horizontalPadding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","textAlign","boxShadow","textIndent","VO","tQ","customElements","define","_BadgeClass__WEBPACK_IMPORTED_MODULE_0__","T","e","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","host","label","slottedIcon","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","hostMaxWidth","cursor","outlineOffset","outlineColor","outlineStyle","outlineWidth","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","click","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","J","IconClass","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","TextClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textLineHeight","textLetterSpacing","textShadow","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__","s","componentHelpers","RawUserAuthMethod","createBaseClass","green_v_default","componentsHelpers","unfulfilledButton","shadowRoot","fulfilledButton","statusIndicator","labelText","onLabelChange","innerText","updateButtonLabel","btnRef","textSpanEle","removeChild","onFulfilledChange","isFulfilled","handleFulfilled","handleUnfulfilled","toggle","isFulfilledEditable","isUnfulfilledEditable","unfulfilledButtonLabel","fulfilledButtonLabel","addEventListener","dispatchEvent","CustomEvent","bubbles","composed","concat","textField","buttons","badge","textWrapper","methodIconSlot","UserAuthMethodClass","helpers","mixins","hostMinWidth","itemsGap"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-user-auth-method-index-js.js","mappings":"8HAAAA,EAAAC,QAAA,qeCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,SAE7C,MAAAC,WAAuB,EAAAC,EAAAC,IAAe,CACtCL,gBACAM,aAAA,iBAEA,6BAAAC,GACA,8DACA,CAEA,WAAAC,GACAC,QAEAC,KAAAC,aAAA,CAAwBC,KAAA,SAAcC,UAAA,sDAMlC,EAAAZ,EAAAa,IACJ,8OAYAJ,KAEA,CAEA,8BAAAK,GACA,OAAAL,KAAAM,aAAA,oCACA,CAEA,EAAAC,CAAAC,GACAR,KAAAS,gBACA,sBACAC,WAAAF,GAAAR,KAAAK,2BAEA,CAEA,wBAAAM,CAAAC,EAAAC,EAAAC,GACAf,MAAAY,2BAAAC,EAAAC,EAAAC,GACA,yBAAAF,GAAAC,IAAAC,GACAd,MAAAO,EAAAO,EAEA,EAGO,MAAAC,GAAmB,EAAAC,EAAAC,KACxB,EAAAC,EAAAC,IAAgB,CAClBC,SAAA,CACAC,UAAA,EAAoBC,SAAA,YAAAC,SAAA,UACpBC,WAAA,EAAqBF,SAAA,YAAAC,SAAA,WACrBE,cAAA,CAAuBF,SAAA,aAEvBG,WAAA,GACAC,SAAA,GACAC,WAAA,GACAC,WAAA,GACAC,cAAA,GACAC,gBAAA,CACA,CAAUR,SAAA,eACV,CAAUA,SAAA,mBAEVS,kBAAA,CACA,CAAUT,SAAA,gBACV,CAAU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mBlM,SAAA,OAAiB,IAAI4L,EAAA5L,SAAA,QACxCoD,SAAA,CACA,IAAUyI,EAAA7L,SAAA,SACV,IAAU6L,EAAA7L,SAAA,WAEV6C,UAAA,EAAoB9C,SAAA,mBAAAC,SAA0CmE,EAAApB,EAASC,WAAAC,UAGrE+I,EAAA7K,GACA6K,EAAA5K,GArBiC,CAsBnCuI,uCChQAtI,eAAAC,OAAsBvD,EAAe+N","sources":["webpack://@descope/web-components-ui/./src/components/descope-user-auth-method/green-v.svg","webpack://@descope/web-components-ui/../components/descope-badge/src/component/BadgeClass.js","webpack://@descope/web-components-ui/../components/descope-badge/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/./src/components/descope-user-auth-method/UserAuthMethodClass.js","webpack://@descope/web-components-ui/./src/components/descope-user-auth-method/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA==\"","import {\n componentNameValidationMixin,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('badge');\n\nclass RawBadge extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['data-attachment-size', 'shrink-to-indicator-threshold'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n position: relative;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this,\n );\n }\n\n get shrinkToIndicatorThreshold() {\n return this.getAttribute('shrink-to-indicator-threshold') || 65;\n }\n\n #handleShrinkToIndicator(value) {\n this.toggleAttribute(\n 'shrink-to-indicator',\n parseFloat(value) < this.shrinkToIndicatorThreshold,\n );\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n super.attributeChangedCallback?.(name, oldVal, newVal);\n if (name === 'data-attachment-size' && oldVal !== newVal) {\n this.#handleShrinkToIndicator(newVal);\n }\n }\n}\n\nexport const BadgeClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }],\n hostHeight: [{ selector: () => ':host', property: 'height' }],\n hostDirection: { property: 'direction' },\n\n fontFamily: {},\n fontSize: {},\n fontWeight: {},\n lineHeight: {},\n textTransform: {},\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n borderRadius: {},\n\n backgroundColor: {},\n\n textColor: { property: 'color' },\n textAlign: {},\n boxShadow: {},\n textIndent: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawBadge);\n","import { componentName, BadgeClass } from './BadgeClass';\n\ncustomElements.define(componentName, BadgeClass);\n\nexport { BadgeClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'role'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { TextClass } from '@descope-ui/descope-text/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { BadgeClass } from '@descope-ui/descope-badge/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport greenVIcon from './green-v.svg';\n\nexport const componentName = getComponentName('user-auth-method');\nclass RawUserAuthMethod extends createBaseClass({\n componentName,\n baseSelector: ':host > .root',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"root\">\n <div class=\"text-wrapper\">\n <slot name=\"method-icon\"></slot>\n <descope-text st-text-align=\"auto\" data-id=\"label-text\" variant=\"body1\" mode=\"primary\"></descope-text>\n </div>\n\n <div class=\"btn-wrapper\">\n <descope-button class=\"btn unfulfilled hidden\" size=\"sm\" variant=\"link\" mode=\"primary\">\n <slot name=\"button-icon\"></slot>\n </descope-button>\n <descope-button class=\"btn fulfilled hidden\" size=\"sm\" variant=\"link\" mode=\"primary\">\n <slot name=\"fulfilled-button-icon\"></slot>\n </descope-button>\n <div class=\"status-indicator hidden\">\n <vaadin-icon src=${greenVIcon}></vaadin-icon>\n </div>\n <descope-button class=\"hidden-btn\" size=\"sm\" variant=\"link\" mode=\"primary\"></descope-button>\n </div>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n min-width: 0;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n min-width: 0;\n }\n\n .status-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name=\"method-icon\"]:not(:empty) {\n display: inline-flex;\n align-items: center;\n }\n `,\n this\n );\n\n this.unfulfilledButton = this.shadowRoot.querySelector('.btn.unfulfilled');\n this.fulfilledButton = this.shadowRoot.querySelector('.btn.fulfilled');\n this.statusIndicator = this.shadowRoot.querySelector('.status-indicator');\n this.labelText = this.shadowRoot.querySelector('descope-text[data-id=\"label-text\"]');\n }\n\n onLabelChange() {\n this.labelText.innerText = this.label;\n this.labelText.setAttribute('title', this.label);\n }\n\n updateButtonLabel(btnRef, label) {\n let textSpanEle = btnRef.querySelector('span');\n\n if (label) {\n if (!textSpanEle) {\n textSpanEle = document.createElement('span');\n btnRef.appendChild(textSpanEle);\n }\n textSpanEle.innerText = label;\n } else if (textSpanEle) {\n btnRef.removeChild(textSpanEle);\n }\n }\n\n onFulfilledChange() {\n if (this.isFulfilled) {\n this.unfulfilledButton.classList.add('hidden');\n this.handleFulfilled();\n } else {\n this.fulfilledButton.classList.add('hidden');\n this.handleUnfulfilled();\n }\n }\n\n handleFulfilled() {\n this.fulfilledButton.classList.toggle('hidden', !this.isFulfilledEditable);\n this.statusIndicator.classList.toggle('hidden', this.isFulfilledEditable);\n }\n\n handleUnfulfilled() {\n this.unfulfilledButton.classList.toggle('hidden', !this.isUnfulfilledEditable);\n this.statusIndicator.classList.toggle('hidden', this.isUnfulfilledEditable);\n }\n\n get label() {\n return this.getAttribute('label') || '';\n }\n\n get unfulfilledButtonLabel() {\n return this.getAttribute('button-label') || '';\n }\n\n get fulfilledButtonLabel() {\n return this.getAttribute('fulfilled-button-label') || '';\n }\n\n get isFulfilled() {\n return this.getAttribute('fulfilled') === 'true';\n }\n\n get isFulfilledEditable() {\n return this.getAttribute('fulfilled-editable') === 'true';\n }\n\n get isUnfulfilledEditable() {\n // this is to keep backward compatibility with previous versions\n return this.getAttribute('unfulfilled-editable') !== 'false';\n }\n\n init() {\n this.onLabelChange();\n this.updateButtonLabel(this.fulfilledButton, this.fulfilledButtonLabel);\n this.updateButtonLabel(this.unfulfilledButton, this.unfulfilledButtonLabel);\n this.onFulfilledChange();\n\n this.unfulfilledButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('button-clicked', { bubbles: true, composed: true }))\n );\n\n this.fulfilledButton.addEventListener('click', () => {\n this.dispatchEvent(\n new CustomEvent('fulfilled-button-clicked', { bubbles: true, composed: true })\n );\n });\n }\n\n static get observedAttributes() {\n return [\n 'label',\n 'fulfilled',\n 'button-label',\n 'fulfilled-button-label',\n 'fulfilled-editable',\n 'unfulfilled-editable',\n ].concat(super.observedAttributes);\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n if (oldValue === newValue) {\n return;\n }\n\n if (name === 'label') {\n this.onLabelChange();\n } else if (name === 'fulfilled') {\n this.onFulfilledChange();\n } else if (name === 'button-label') {\n this.updateButtonLabel(this.unfulfilledButton, this.unfulfilledButtonLabel);\n } else if (name === 'fulfilled-button-label') {\n this.updateButtonLabel(this.fulfilledButton, this.fulfilledButtonLabel);\n } else if (name === 'fulfilled-editable' && this.isFulfilled) {\n this.handleFulfilled();\n } else if (name === 'unfulfilled-editable' && !this.isFulfilled) {\n this.handleUnfulfilled();\n }\n }\n}\n\nconst { host, textField, buttons, badge, textWrapper, methodIconSlot } = {\n host: { selector: () => ':host' },\n textField: { selector: 'descope-text' },\n buttons: { selector: 'descope-button' },\n badge: { selector: 'descope-badge' },\n textWrapper: { selector: ' .text-wrapper' },\n methodIconSlot: { selector: 'slot[name=\"method-icon\"]:not(:empty)' },\n};\n\nexport const UserAuthMethodClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...textField, property: TextClass.cssVarList.hostDirection },\n { ...buttons, property: ButtonClass.cssVarList.hostDirection },\n { ...badge, property: BadgeClass.cssVarList.hostDirection },\n ],\n itemsGap: [{ property: 'gap' }, { ...textWrapper, property: 'gap' }],\n iconSize: [\n { ...methodIconSlot, property: 'width' },\n { ...methodIconSlot, property: 'height' },\n ],\n iconColor: [{ selector: () => '::slotted(*)', property: IconClass.cssVarList.fill }],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawUserAuthMethod);\n","import { componentName, UserAuthMethodClass } from './UserAuthMethodClass';\nimport '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-badge';\nimport '@vaadin/icon';\n\ncustomElements.define(componentName, UserAuthMethodClass);\n\nexport { UserAuthMethodClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","xE","RawBadge","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","fz","shrinkToIndicatorThreshold","getAttribute","handleShrinkToIndicator","value","toggleAttribute","parseFloat","attributeChangedCallback","name","oldVal","newVal","BadgeClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","hostWidth","selector","property","hostHeight","hostDirection","fontFamily","fontSize","fontWeight","lineHeight","textTransform","verticalPadding","horizontalPadding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","textAlign","boxShadow","textIndent","VO","tQ","customElements","define","_BadgeClass__WEBPACK_IMPORTED_MODULE_0__","T","e","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","host","label","slottedIcon","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","hostMaxWidth","cursor","outlineOffset","outlineColor","outlineStyle","outlineWidth","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","click","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","J","IconClass","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","TextClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textLineHeight","textLetterSpacing","textShadow","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__","s","componentHelpers","RawUserAuthMethod","createBaseClass","green_v_default","componentsHelpers","unfulfilledButton","shadowRoot","fulfilledButton","statusIndicator","labelText","onLabelChange","innerText","updateButtonLabel","btnRef","textSpanEle","removeChild","onFulfilledChange","isFulfilled","handleFulfilled","handleUnfulfilled","toggle","isFulfilledEditable","isUnfulfilledEditable","unfulfilledButtonLabel","fulfilledButtonLabel","addEventListener","dispatchEvent","CustomEvent","bubbles","composed","concat","textField","buttons","badge","textWrapper","methodIconSlot","UserAuthMethodClass","helpers","mixins","hostMinWidth","itemsGap"],"sourceRoot":""}
|