@descope/web-components-ui 3.27.3 → 3.27.5
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 +88 -11
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +92 -13
- 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-collapsible-container.js +1 -1
- package/dist/umd/descope-collapsible-container.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-hybrid-field-index-js.js +3 -3
- package/dist/umd/descope-hybrid-field-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-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.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-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field.js +1 -1
- package/dist/umd/descope-text-field.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/index.js.map +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/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-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,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,2294,6724,9175],{19624(t,e,o){o.d(e,{J:()=>u,T:()=>l});var n=o(63200),i=o(25964),r=o(88961),s=o(98538),a=o(10767);const l=(0,i.xE)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,n.Zz)((0,r.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,r.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:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),a.G,r.VO,r.tQ)((0,r.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${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:b,fontSize:g}=u.cssVarList;p=`\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,o){o.d(e,{G:()=>n});const n=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,o){o.r(e),o.d(e,{ButtonClass:()=>n.J,componentName:()=>n.T});var n=o(19624);o(83799),customElements.define(n.T,n.J)},98538(t,e,o){o.d(e,{S:()=>l,T:()=>a});var n=o(88961),i=o(25964),r=o(8512),s=o(63200);const a=(0,i.xE)("icon"),l=(0,s.Zz)((0,n.RF)({mappings:{fill:[{},{property:r.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.VO,n.tQ)((0,n.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:a}))},56737(t,e,o){o.r(e),o.d(e,{IconClass:()=>n.S,componentName:()=>n.T}),o(53455);var n=o(98538);customElements.define(n.T,n.S)},8512(t,e,o){o.d(e,{T:()=>l,q:()=>h});var n=o(88961),i=o(72270),r=o(63200),s=o(25964),a=o(18782);const l=(0,s.xE)("image"),d=["src","src-dark"];class c extends((0,i.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.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(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,a.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,o){super.attributeChangedCallback?.(t,e,o),e!==o&&this.shouldRender(t)&&this.renderImage()}}const h=(0,r.Zz)((0,n.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.VO,n.tQ)(c)},18782(t,e,o){o.d(e,{m:()=>r});var n=o(25414);const i=t=>{const e=n.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")},r=async(t,e)=>{try{let o;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));o=i(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),n=await e.text();o=i(n)}else o=((t,e)=>{const o=document.createElement("img");return o.setAttribute("src",t),o.setAttribute("alt",e),o})(t,e);return o.style.setProperty("max-width","100%"),o.style.setProperty("max-height","100%"),o}catch{return null}}},53455(t,e,o){o.r(e),o.d(e,{ImageClass:()=>n.q,componentName:()=>n.T});var n=o(8512);customElements.define(n.T,n.q)},88568(t,e,o){o.r(e),o.d(e,{RecoveryCodesClass:()=>b,componentName:()=>l}),o(63595),o(30576),o(56737),o(37182),o(95260);var n=o(88961),i=o(63200),r=o(25964),s=o(72270),a=o(66434);const l=(0,r.xE)("recovery-codes"),d="none",c={copy:{defaultText:"Copy"},download:{defaultText:"Download"}},h=["text","variant","color","size","icon","icon-dark"],p=["show-download",...Object.keys(c).flatMap(t=>h.map(e=>`${t}-${e}`))];class u extends((0,s.qu)({componentName:l,baseSelector:":host > div"})){static get observedAttributes(){return["readonly","required",...p]}#t=d;#e=!1;#o=!1;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="codes-box">\n <div class="list"><div class="codes-list"></div></div>\n <descope-text class="icon-wrapper">\n <div class="icons">\n <vaadin-icon class="icon copy-icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n <vaadin-icon class="icon download-icon" icon="vaadin:download-alt" title="Download"></vaadin-icon>\n </div>\n </descope-text>\n </div>\n <div class="error-message"></div>\n <div class="buttons-row"></div>\n </div>\n ',this.list=this.shadowRoot.querySelector(".list"),this.copyIcon=this.shadowRoot.querySelector(".copy-icon"),this.downloadIcon=this.shadowRoot.querySelector(".download-icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),this.errorMessageEle=this.shadowRoot.querySelector(".error-message"),this.buttonsRow=this.shadowRoot.querySelector(".buttons-row"),(0,r.fz)('\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n }\n .codes-box {\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n /* border shows the error ring inside the box; style/width/color/radius come from theme */\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n /* text-align maps to align-items here, so it positions the codes block\n (start/center/end) inside the available space, not each row */\n }\n .codes-list {\n display: flex;\n flex-direction: column;\n /* rows always start-aligned so the bullets line up in any font.\n width:fit-content hugs the codes so .list can position the whole\n block (keep it, it also defeats the stretch fallback) */\n align-items: flex-start;\n width: fit-content;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: \'\\02022\';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icons {\n display: flex;\n flex-direction: column;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n /* block re-clicks while the checkmark shows, so rapid clicks cannot repeat the action */\n pointer-events: none;\n }\n /* readonly is a host attribute, so disable pointer events from one place */\n :host([readonly="true"]) .icon,\n :host([readonly="true"]) .buttons-row {\n pointer-events: none;\n }\n .download-icon {\n display: none;\n }\n :host([show-download="true"]) .download-icon {\n display: inline-flex;\n }\n .error-message {\n display: none;\n /* width:0 + min-width:100% lets the message wrap to the component width without\n its text expanding the (shrink-to-fit) component; full-width still fills the parent */\n width: 0;\n min-width: 100%;\n box-sizing: border-box;\n line-height: 1.2;\n overflow-wrap: break-word;\n }\n :host([invalid]) .error-message {\n display: block;\n }\n .buttons-row {\n display: none;\n }\n :host([display-variant="buttons"]) .icon-wrapper {\n display: none;\n }\n :host([display-variant="buttons"]) .buttons-row {\n display: flex;\n flex-wrap: wrap;\n }\n /* grow to fill equally; don\'t shrink below content, so they wrap to a new line\n when they don\'t fit (like a container with auto-fit items) */\n .buttons-row > descope-button {\n flex: 1 0 auto;\n }\n ',this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}get value(){return this.#t}#n(t){return this.hasAttribute(t)&&"false"!==this.getAttribute(t)}get isRequired(){return this.#n("required")}get isReadOnly(){return this.#n("readonly")}get errorMessage(){return this.getAttribute("data-errormessage-value-missing")||"Copy or download your recovery codes to continue."}get codesText(){return String((this.data||[]).map(t=>t.value).join("\n"))}init(){super.init(),this.copyIcon.addEventListener("click",this.onCopy.bind(this)),this.downloadIcon.addEventListener("click",this.onDownload.bind(this)),(0,r.EA)(this,this.iconWrapper,{includeAttrs:["variant","mode"]}),this.renderButtons(),this.#o=!0}get isDownloadEnabled(){return"true"===this.getAttribute("show-download")}renderButtons(){if(!this.buttonsRow)return;const t=[this.buildButton("copy")];this.isDownloadEnabled&&t.push(this.buildButton("download")),this.buttonsRow.replaceChildren(...t)}buildButton(t){const{defaultText:e}=c[t],o=(e,o)=>this.getAttribute(`${t}-${e}`)||o,n=document.createElement("descope-button");n.setAttribute("data-action",t),n.setAttribute("variant",o("variant","outline")),n.setAttribute("mode",o("color","primary")),n.setAttribute("size",o("size","md"));const i=this.getAttribute(`${t}-icon`);if(i){const e=document.createElement("descope-icon");e.setAttribute("src",i);const o=this.getAttribute(`${t}-icon-dark`);o&&e.setAttribute("src-dark",o),n.appendChild(e)}return n.appendChild(document.createTextNode(o("text",e))),n.addEventListener("click",()=>"copy"===t?this.onCopy():this.onDownload()),n}onCopy(){this.isReadOnly||(navigator.clipboard.writeText(this.codesText),this.showActionFeedback(this.copyIcon,"Copied"),this.recordAction("copied"))}onDownload(){if(this.isReadOnly)return;const t=new Blob([this.codesText],{type:"text/plain"}),e=URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download="recovery-codes.txt",o.click(),URL.revokeObjectURL(e),this.showActionFeedback(this.downloadIcon,"Downloaded"),this.recordAction("downloaded")}recordAction(t){this.#t=t,this.dispatchEvent(new Event("change",{bubbles:!0})),this.checkValidity()&&(this.#e=!1),this.syncValidityUI()}showActionFeedback(t,e){t.feedbackTimer?clearTimeout(t.feedbackTimer):(t.originalIcon=t.getAttribute("icon"),t.originalTitle=t.getAttribute("title")),t.setAttribute("icon","vaadin:check-circle-o"),t.setAttribute("title",e),t.classList.add("copied"),t.feedbackTimer=setTimeout(()=>{t.setAttribute("icon",t.originalIcon),t.setAttribute("title",t.originalTitle),t.classList.remove("copied"),t.feedbackTimer=null},5e3)}checkValidity(){return this.isReadOnly||!this.isRequired||this.value!==d}reportValidity(){const t=this.checkValidity();return this.#e=!t,this.syncValidityUI(),t}syncValidityUI(){this.toggleAttribute("invalid",this.#e),this.errorMessageEle&&(this.errorMessageEle.textContent=this.#e?this.errorMessage:"")}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("required"!==t||this.isRequired||(this.#e=!1,this.syncValidityUI()),this.#o&&p.includes(t)&&this.renderButtons())}}const b=(0,i.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".codes-box",property:"gap"},iconStackGap:{selector:()=>".icons",property:"gap"},buttonsGap:{selector:()=>".buttons-row",property:"gap"},sectionsGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"},verticalPadding:[{selector:()=>".codes-box",property:"padding-top"},{selector:()=>".codes-box",property:"padding-bottom"},{selector:()=>".buttons-row",property:"padding-bottom"}],horizontalPadding:[{selector:()=>".codes-box",property:"padding-left"},{selector:()=>".codes-box",property:"padding-right"},{selector:()=>".buttons-row",property:"padding-left"},{selector:()=>".buttons-row",property:"padding-right"}],errorBorderColor:{selector:()=>".codes-box",property:"border-color"},errorMessageColor:{selector:()=>".error-message",property:"color"},errorMessageFontSize:{selector:()=>".error-message",property:"font-size"},errorMessageFontWeight:{selector:()=>".error-message",property:"font-weight"},errorMessageFontFamily:{selector:()=>".error-message",property:"font-family"},boxBorderRadius:{selector:()=>".codes-box",property:"border-radius"},errorBorderWidth:{selector:()=>".codes-box",property:"border-width"},boxBorderStyle:{selector:()=>".codes-box",property:"border-style"}}}),(0,n.RF)({componentNameOverride:(0,r.xE)("input-wrapper")}),(0,n.t$)({itemRenderer:({value:t},e,o)=>`\n <descope-text variant="${o.variant}" mode="${o.mode}">\n <span>${t}</span>\n </descope-text>\n `,rerenderAttrsList:["variant","mode"],targetSelector:".codes-list"}),n.VO,n.tQ)(u);customElements.define(l,b)},66434(t,e,o){o.d(e,{T:()=>a,s:()=>c});var n=o(88961),i=o(63200),r=o(25964),s=o(72270);const a=(0,r.xE)("text");class l extends((0,s.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,r.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,r.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:d}={host:{selector:()=>":host"}},c=(0,i.Zz)((0,n.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,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,2294,6724,9175],{19624(t,e,o){o.d(e,{J:()=>u,T:()=>l});var n=o(63200),i=o(25964),r=o(88961),s=o(98538),a=o(10767);const l=(0,i.xE)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,n.Zz)((0,r.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,r.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:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),a.G,r.VO,r.tQ)((0,r.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${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style","role"],componentName:l})),{color:b,fontSize:g}=u.cssVarList;p=`\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,o){o.d(e,{G:()=>n});const n=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,o){o.r(e),o.d(e,{ButtonClass:()=>n.J,componentName:()=>n.T});var n=o(19624);o(83799),customElements.define(n.T,n.J)},98538(t,e,o){o.d(e,{S:()=>l,T:()=>a});var n=o(88961),i=o(25964),r=o(8512),s=o(63200);const a=(0,i.xE)("icon"),l=(0,s.Zz)((0,n.RF)({mappings:{fill:[{},{property:r.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.VO,n.tQ)((0,n.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:a}))},56737(t,e,o){o.r(e),o.d(e,{IconClass:()=>n.S,componentName:()=>n.T}),o(53455);var n=o(98538);customElements.define(n.T,n.S)},8512(t,e,o){o.d(e,{T:()=>l,q:()=>h});var n=o(88961),i=o(72270),r=o(63200),s=o(25964),a=o(18782);const l=(0,s.xE)("image"),d=["src","src-dark"];class c extends((0,i.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.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(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,a.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,o){super.attributeChangedCallback?.(t,e,o),e!==o&&this.shouldRender(t)&&this.renderImage()}}const h=(0,r.Zz)((0,n.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.VO,n.tQ)(c)},18782(t,e,o){o.d(e,{m:()=>r});var n=o(25414);const i=t=>{const e=n.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")},r=async(t,e)=>{try{let o;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));o=i(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),n=await e.text();o=i(n)}else o=((t,e)=>{const o=document.createElement("img");return o.setAttribute("src",t),o.setAttribute("alt",e),o})(t,e);return o.style.setProperty("max-width","100%"),o.style.setProperty("max-height","100%"),o}catch{return null}}},53455(t,e,o){o.r(e),o.d(e,{ImageClass:()=>n.q,componentName:()=>n.T});var n=o(8512);customElements.define(n.T,n.q)},88568(t,e,o){o.r(e),o.d(e,{RecoveryCodesClass:()=>b,componentName:()=>l}),o(63595),o(30576),o(56737),o(37182),o(95260);var n=o(88961),i=o(63200),r=o(25964),s=o(72270),a=o(66434);const l=(0,r.xE)("recovery-codes"),d="none",c={copy:{defaultText:"Copy"},download:{defaultText:"Download"}},h=["text","variant","color","size","icon","icon-dark"],p=["show-download",...Object.keys(c).flatMap(t=>h.map(e=>`${t}-${e}`))];class u extends((0,s.qu)({componentName:l,baseSelector:":host > div"})){static get observedAttributes(){return["readonly","required",...p]}#t=d;#e=!1;#o=!1;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="codes-box">\n <div class="list"><div class="codes-list"></div></div>\n <descope-text class="icon-wrapper">\n <div class="icons">\n <vaadin-icon class="icon copy-icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n <vaadin-icon class="icon download-icon" icon="vaadin:download-alt" title="Download"></vaadin-icon>\n </div>\n </descope-text>\n </div>\n <div class="error-message"></div>\n <div class="buttons-row"></div>\n </div>\n ',this.list=this.shadowRoot.querySelector(".list"),this.copyIcon=this.shadowRoot.querySelector(".copy-icon"),this.downloadIcon=this.shadowRoot.querySelector(".download-icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),this.errorMessageEle=this.shadowRoot.querySelector(".error-message"),this.buttonsRow=this.shadowRoot.querySelector(".buttons-row"),(0,r.fz)('\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n }\n .codes-box {\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n /* border shows the error ring inside the box; style/width/color/radius come from theme */\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n /* text-align maps to align-items here, so it positions the codes block\n (start/center/end) inside the available space, not each row */\n }\n .codes-list {\n display: flex;\n flex-direction: column;\n /* rows always start-aligned so the bullets line up in any font.\n width:fit-content hugs the codes so .list can position the whole\n block (keep it, it also defeats the stretch fallback) */\n align-items: flex-start;\n width: fit-content;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: \'\\02022\';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icons {\n display: flex;\n flex-direction: column;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n /* block re-clicks while the checkmark shows, so rapid clicks cannot repeat the action */\n pointer-events: none;\n }\n /* readonly is a host attribute, so disable pointer events from one place */\n :host([readonly="true"]) .icon,\n :host([readonly="true"]) .buttons-row {\n pointer-events: none;\n }\n .download-icon {\n display: none;\n }\n :host([show-download="true"]) .download-icon {\n display: inline-flex;\n }\n .error-message {\n display: none;\n /* width:0 + min-width:100% lets the message wrap to the component width without\n its text expanding the (shrink-to-fit) component; full-width still fills the parent */\n width: 0;\n min-width: 100%;\n box-sizing: border-box;\n line-height: 1.2;\n overflow-wrap: break-word;\n }\n :host([invalid]) .error-message {\n display: block;\n }\n .buttons-row {\n display: none;\n }\n :host([display-variant="buttons"]) .icon-wrapper {\n display: none;\n }\n :host([display-variant="buttons"]) .buttons-row {\n display: flex;\n flex-wrap: wrap;\n }\n /* grow to fill equally; don\'t shrink below content, so they wrap to a new line\n when they don\'t fit (like a container with auto-fit items) */\n .buttons-row > descope-button {\n flex: 1 0 auto;\n }\n ',this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}get value(){return this.#t}#n(t){return this.hasAttribute(t)&&"false"!==this.getAttribute(t)}get isRequired(){return this.#n("required")}get isReadOnly(){return this.#n("readonly")}get errorMessage(){return this.getAttribute("data-errormessage-value-missing")||"Copy or download your recovery codes to continue."}get codesText(){return String((this.data||[]).map(t=>t.value).join("\n"))}init(){super.init(),this.copyIcon.addEventListener("click",this.onCopy.bind(this)),this.downloadIcon.addEventListener("click",this.onDownload.bind(this)),(0,r.EA)(this,this.iconWrapper,{includeAttrs:["variant","mode"]}),this.renderButtons(),this.#o=!0}get isDownloadEnabled(){return"true"===this.getAttribute("show-download")}renderButtons(){if(!this.buttonsRow)return;const t=[this.buildButton("copy")];this.isDownloadEnabled&&t.push(this.buildButton("download")),this.buttonsRow.replaceChildren(...t)}buildButton(t){const{defaultText:e}=c[t],o=(e,o)=>this.getAttribute(`${t}-${e}`)||o,n=document.createElement("descope-button");n.setAttribute("data-action",t),n.setAttribute("variant",o("variant","outline")),n.setAttribute("mode",o("color","primary")),n.setAttribute("size",o("size","md"));const i=this.getAttribute(`${t}-icon`);if(i){const e=document.createElement("descope-icon");e.setAttribute("src",i);const o=this.getAttribute(`${t}-icon-dark`);o&&e.setAttribute("src-dark",o),n.appendChild(e)}return n.appendChild(document.createTextNode(o("text",e))),n.addEventListener("click",()=>"copy"===t?this.onCopy():this.onDownload()),n}onCopy(){this.isReadOnly||(navigator.clipboard.writeText(this.codesText),this.showActionFeedback(this.copyIcon,"Copied"),this.recordAction("copied"))}onDownload(){if(this.isReadOnly)return;const t=new Blob([this.codesText],{type:"text/plain"}),e=URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download="recovery-codes.txt",o.click(),URL.revokeObjectURL(e),this.showActionFeedback(this.downloadIcon,"Downloaded"),this.recordAction("downloaded")}recordAction(t){this.#t=t,this.dispatchEvent(new Event("change",{bubbles:!0})),this.checkValidity()&&(this.#e=!1),this.syncValidityUI()}showActionFeedback(t,e){t.feedbackTimer?clearTimeout(t.feedbackTimer):(t.originalIcon=t.getAttribute("icon"),t.originalTitle=t.getAttribute("title")),t.setAttribute("icon","vaadin:check-circle-o"),t.setAttribute("title",e),t.classList.add("copied"),t.feedbackTimer=setTimeout(()=>{t.setAttribute("icon",t.originalIcon),t.setAttribute("title",t.originalTitle),t.classList.remove("copied"),t.feedbackTimer=null},5e3)}checkValidity(){return this.isReadOnly||!this.isRequired||this.value!==d}reportValidity(){const t=this.checkValidity();return this.#e=!t,this.syncValidityUI(),t}syncValidityUI(){this.toggleAttribute("invalid",this.#e),this.errorMessageEle&&(this.errorMessageEle.textContent=this.#e?this.errorMessage:"")}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("required"!==t||this.isRequired||(this.#e=!1,this.syncValidityUI()),this.#o&&p.includes(t)&&this.renderButtons())}}const b=(0,i.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".codes-box",property:"gap"},iconStackGap:{selector:()=>".icons",property:"gap"},buttonsGap:{selector:()=>".buttons-row",property:"gap"},sectionsGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"},verticalPadding:[{selector:()=>".codes-box",property:"padding-top"},{selector:()=>".codes-box",property:"padding-bottom"},{selector:()=>".buttons-row",property:"padding-bottom"}],horizontalPadding:[{selector:()=>".codes-box",property:"padding-left"},{selector:()=>".codes-box",property:"padding-right"},{selector:()=>".buttons-row",property:"padding-left"},{selector:()=>".buttons-row",property:"padding-right"}],errorBorderColor:{selector:()=>".codes-box",property:"border-color"},errorMessageColor:{selector:()=>".error-message",property:"color"},errorMessageFontSize:{selector:()=>".error-message",property:"font-size"},errorMessageFontWeight:{selector:()=>".error-message",property:"font-weight"},errorMessageFontFamily:{selector:()=>".error-message",property:"font-family"},boxBorderRadius:{selector:()=>".codes-box",property:"border-radius"},errorBorderWidth:{selector:()=>".codes-box",property:"border-width"},boxBorderStyle:{selector:()=>".codes-box",property:"border-style"}}}),(0,n.RF)({componentNameOverride:(0,r.xE)("input-wrapper")}),(0,n.t$)({itemRenderer:({value:t},e,o)=>`\n <descope-text variant="${o.variant}" mode="${o.mode}">\n <span>${t}</span>\n </descope-text>\n `,rerenderAttrsList:["variant","mode"],targetSelector:".codes-list"}),n.VO,n.tQ)(u);customElements.define(l,b)},66434(t,e,o){o.d(e,{T:()=>a,s:()=>c});var n=o(88961),i=o(63200),r=o(25964),s=o(72270);const a=(0,r.xE)("text");class l extends((0,s.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,r.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,r.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:d}={host:{selector:()=>":host"}},c=(0,i.Zz)((0,n.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,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)}}]);
|
|
2
2
|
//# sourceMappingURL=descope-recovery-codes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-recovery-codes.js","mappings":"yOAYO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,YAC5B,EAAAJ,EAAAK,IAAgB,CAClBC,SAAA,CACAC,UAAA,CAAmBC,SAAA,SACnBC,aAAA,IAAsBjB,EAAAgB,SAAA,aACtBE,WAAA,CAAoBF,SAAA,UACpBG,cAAA,IAAuBnB,EAAAgB,SAAA,aACvBI,SAAA,GACAC,WAAA,GACAC,WAAA,GAEAC,OAAA,GACAC,gBAAA,GAEAC,cAAA,GACAC,aAAA,GACAC,aAAA,GACAC,aAAA,GAEAC,aAAA,GACAC,YAAA,GACAC,YAAA,GACAC,YAAA,GAEAC,gBAAA,CACA,CAAUjB,SAAA,eACV,CAAUA,SAAA,mBAEVkB,kBAAA,CACA,CAAUlB,SAAA,gBAAAmB,SAAA,WACV,CAAUnB,SAAA,eAAAmB,SAAA,YAGVC,eAAA,CAAwBpB,SAAA,SACxBqB,UAAA,CACAlC,SAAA,mBACAa,SAAkBsB,EAAAC,E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BnB,EAAAgB,SAAA,aACvBI,SAAA,GACA8P,UAAA,EAAoBlQ,SAAA,UACpBmQ,eAAA,CAAwBnQ,SAAA,eACxBoQ,kBAAA,CAA2BpQ,SAAA,kBAC3BqQ,WAAA,GACAzO,UAAA,GACA0O,cAAA,GACAjQ,WAAA,GACAkQ,UAAA,GACAjQ,WAAA,GACAU,YAAA,GACAD,YAAA,GACAD,YAAA,OAGE,EAAAwC,EAAA7D,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,WAC5B0D,EAAAtB,GACAsB,EAAArB,GAtBuB,CAuBzBwN,wFCjFA1M,eAAAC,OAAsBwN,EAAAtN,EAAesN,EAAArC","sources":["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-recovery-codes/src/component/RecoveryCodesClass.js","webpack://@descope/web-components-ui/../components/descope-recovery-codes/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"],"sourcesContent":["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 createDynamicDataMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('recovery-codes');\n\nconst NO_ACTION = 'none';\nconst DEFAULT_ERROR_MESSAGE =\n 'Copy or download your recovery codes to continue.';\n\n// default button label per action (buttons variant). the icons variant uses the vaadin\n// glyphs hardcoded in the shadow-DOM template below; the buttons variant uses image srcs.\nconst ACTIONS = {\n copy: { defaultText: 'Copy' },\n download: { defaultText: 'Download' },\n};\n\n// per-button config suffixes; the full attribute is `${action}-${suffix}`.\n// `icon`/`icon-dark` are image srcs (the seeded glyph or a custom upload), matching\n// the standard button's start-icon (light/dark), not a boolean.\nconst BUTTON_SUFFIXES = [\n 'text',\n 'variant',\n 'color',\n 'size',\n 'icon',\n 'icon-dark',\n];\n\n// changing any of these rebuilds the buttons (so the editor preview stays live)\nconst BUTTON_ATTRS = [\n 'show-download',\n ...Object.keys(ACTIONS).flatMap((action) =>\n BUTTON_SUFFIXES.map((suffix) => `${action}-${suffix}`),\n ),\n];\n\nconst itemRenderer = ({ value }, _, ref) => {\n return `\n <descope-text variant=\"${ref.variant}\" mode=\"${ref.mode}\">\n <span>${value}</span>\n </descope-text>\n `;\n};\n\nclass RawRecoveryCodes extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['readonly', 'required', ...BUTTON_ATTRS];\n }\n\n // 'none' | 'copied' | 'downloaded' - the last action the user took on the codes\n #action = NO_ACTION;\n\n // the error is shown only after a submit attempt (reportValidity), like inputs\n #showError = false;\n\n // init() builds the buttons once with all seeded attrs; guards against rebuilding\n // on every per-attribute change fired during element upgrade (before init runs)\n #initialized = false;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <div class=\"codes-box\">\n <div class=\"list\"><div class=\"codes-list\"></div></div>\n <descope-text class=\"icon-wrapper\">\n <div class=\"icons\">\n <vaadin-icon class=\"icon copy-icon\" icon=\"vaadin:copy-o\" title=\"Copy\"></vaadin-icon>\n <vaadin-icon class=\"icon download-icon\" icon=\"vaadin:download-alt\" title=\"Download\"></vaadin-icon>\n </div>\n </descope-text>\n </div>\n <div class=\"error-message\"></div>\n <div class=\"buttons-row\"></div>\n </div>\n `;\n\n this.list = this.shadowRoot.querySelector('.list');\n this.copyIcon = this.shadowRoot.querySelector('.copy-icon');\n this.downloadIcon = this.shadowRoot.querySelector('.download-icon');\n this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');\n this.errorMessageEle = this.shadowRoot.querySelector('.error-message');\n this.buttonsRow = this.shadowRoot.querySelector('.buttons-row');\n\n injectStyle(\n `\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n }\n .codes-box {\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n /* border shows the error ring inside the box; style/width/color/radius come from theme */\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n /* text-align maps to align-items here, so it positions the codes block\n (start/center/end) inside the available space, not each row */\n }\n .codes-list {\n display: flex;\n flex-direction: column;\n /* rows always start-aligned so the bullets line up in any font.\n width:fit-content hugs the codes so .list can position the whole\n block (keep it, it also defeats the stretch fallback) */\n align-items: flex-start;\n width: fit-content;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icons {\n display: flex;\n flex-direction: column;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n /* block re-clicks while the checkmark shows, so rapid clicks cannot repeat the action */\n pointer-events: none;\n }\n /* readonly is a host attribute, so disable pointer events from one place */\n :host([readonly=\"true\"]) .icon,\n :host([readonly=\"true\"]) .buttons-row {\n pointer-events: none;\n }\n .download-icon {\n display: none;\n }\n :host([show-download=\"true\"]) .download-icon {\n display: inline-flex;\n }\n .error-message {\n display: none;\n /* width:0 + min-width:100% lets the message wrap to the component width without\n its text expanding the (shrink-to-fit) component; full-width still fills the parent */\n width: 0;\n min-width: 100%;\n box-sizing: border-box;\n line-height: 1.2;\n overflow-wrap: break-word;\n }\n :host([invalid]) .error-message {\n display: block;\n }\n .buttons-row {\n display: none;\n }\n :host([display-variant=\"buttons\"]) .icon-wrapper {\n display: none;\n }\n :host([display-variant=\"buttons\"]) .buttons-row {\n display: flex;\n flex-wrap: wrap;\n }\n /* grow to fill equally; don't shrink below content, so they wrap to a new line\n when they don't fit (like a container with auto-fit items) */\n .buttons-row > descope-button {\n flex: 1 0 auto;\n }\n `,\n this,\n );\n }\n\n get variant() {\n return this.getAttribute('variant');\n }\n\n get mode() {\n return this.getAttribute('mode');\n }\n\n // the form value read by the flow SDK (#getFormData reads `.value`)\n get value() {\n return this.#action;\n }\n\n // a boolean attribute is \"on\" when present and not explicitly \"false\"\n #boolAttr(name) {\n return this.hasAttribute(name) && this.getAttribute(name) !== 'false';\n }\n\n get isRequired() {\n return this.#boolAttr('required');\n }\n\n get isReadOnly() {\n return this.#boolAttr('readonly');\n }\n\n get errorMessage() {\n return (\n this.getAttribute('data-errormessage-value-missing') ||\n DEFAULT_ERROR_MESSAGE\n );\n }\n\n get codesText() {\n return String((this.data || []).map((rc) => rc.value).join('\\n'));\n }\n\n init() {\n super.init();\n\n this.copyIcon.addEventListener('click', this.onCopy.bind(this));\n this.downloadIcon.addEventListener('click', this.onDownload.bind(this));\n\n forwardAttrs(this, this.iconWrapper, { includeAttrs: ['variant', 'mode'] });\n\n this.renderButtons();\n this.#initialized = true;\n }\n\n get isDownloadEnabled() {\n return this.getAttribute('show-download') === 'true';\n }\n\n // buttons variant: copy (+ download when enabled) as descope-buttons, each independently\n // configurable. rendered even in the icons variant (CSS hides the row) so a variant switch is instant.\n renderButtons() {\n if (!this.buttonsRow) return;\n\n const buttons = [this.buildButton('copy')];\n if (this.isDownloadEnabled) {\n buttons.push(this.buildButton('download'));\n }\n this.buttonsRow.replaceChildren(...buttons);\n }\n\n buildButton(action) {\n const { defaultText } = ACTIONS[action];\n const attr = (name, fallback) =>\n this.getAttribute(`${action}-${name}`) || fallback;\n\n const button = document.createElement('descope-button');\n button.setAttribute('data-action', action);\n button.setAttribute('variant', attr('variant', 'outline'));\n button.setAttribute('mode', attr('color', 'primary'));\n button.setAttribute('size', attr('size', 'md'));\n\n // icon is an image src - the seeded glyph or a custom upload (light/dark),\n // same as the standard button's start icon. rendered via descope-icon in the\n // default slot (not slot=\"prefix\") so it centers with the label when the\n // button grows. descope-icon inlines SVGs, so the glyph (authored with\n // fill=\"currentColor\") tracks the button text color while an uploaded image\n // keeps its own colors.\n const iconSrc = this.getAttribute(`${action}-icon`);\n if (iconSrc) {\n const icon = document.createElement('descope-icon');\n icon.setAttribute('src', iconSrc);\n const iconDark = this.getAttribute(`${action}-icon-dark`);\n if (iconDark) icon.setAttribute('src-dark', iconDark);\n button.appendChild(icon);\n }\n\n button.appendChild(document.createTextNode(attr('text', defaultText)));\n button.addEventListener('click', () =>\n action === 'copy' ? this.onCopy() : this.onDownload(),\n );\n return button;\n }\n\n onCopy() {\n if (this.isReadOnly) return;\n navigator.clipboard.writeText(this.codesText);\n this.showActionFeedback(this.copyIcon, 'Copied');\n this.recordAction('copied');\n }\n\n onDownload() {\n if (this.isReadOnly) return;\n const blob = new Blob([this.codesText], { type: 'text/plain' });\n const url = URL.createObjectURL(blob);\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = 'recovery-codes.txt';\n anchor.click();\n URL.revokeObjectURL(url);\n\n this.showActionFeedback(this.downloadIcon, 'Downloaded');\n this.recordAction('downloaded');\n }\n\n // copy/download share this - only the visual feedback differs by variant\n recordAction(action) {\n this.#action = action;\n // let the flow re-evaluate real-time conditions and pick up the new value\n this.dispatchEvent(new Event('change', { bubbles: true }));\n // acting clears the mandatory error\n if (this.checkValidity()) {\n this.#showError = false;\n }\n this.syncValidityUI();\n }\n\n // icons variant: swap the icon to a checkmark for 5s (buttons variant is static)\n showActionFeedback(iconEle, doneTitle) {\n // on a rapid re-click the checkmark is already showing, so cancel the pending restore\n // and keep the glyph/title we saved the first time (never capture the checkmark itself)\n if (iconEle.feedbackTimer) {\n clearTimeout(iconEle.feedbackTimer);\n } else {\n iconEle.originalIcon = iconEle.getAttribute('icon');\n iconEle.originalTitle = iconEle.getAttribute('title');\n }\n\n iconEle.setAttribute('icon', 'vaadin:check-circle-o');\n iconEle.setAttribute('title', doneTitle);\n iconEle.classList.add('copied');\n\n iconEle.feedbackTimer = setTimeout(() => {\n iconEle.setAttribute('icon', iconEle.originalIcon);\n iconEle.setAttribute('title', iconEle.originalTitle);\n iconEle.classList.remove('copied');\n iconEle.feedbackTimer = null;\n }, 5000);\n }\n\n // the flow SDK's #validateInputs calls checkValidity/reportValidity on every *[name]\n checkValidity() {\n return this.isReadOnly || !this.isRequired || this.value !== NO_ACTION;\n }\n\n reportValidity() {\n const valid = this.checkValidity();\n this.#showError = !valid;\n this.syncValidityUI();\n return valid;\n }\n\n // single source of truth for the error UI - reflects `invalid` (theme `_invalid`\n // draws the outline) and fills the message. never toggled anywhere else.\n syncValidityUI() {\n this.toggleAttribute('invalid', this.#showError);\n if (this.errorMessageEle) {\n this.errorMessageEle.textContent = this.#showError\n ? this.errorMessage\n : '';\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue === oldValue) return;\n\n // if it stops being required, drop any error already shown\n if (attrName === 'required' && !this.isRequired) {\n this.#showError = false;\n this.syncValidityUI();\n }\n\n // only rebuild for live edits after init (init already built once with all attrs);\n // avoids rebuilding once per attribute during the initial element upgrade\n if (this.#initialized && BUTTON_ATTRS.includes(attrName)) {\n this.renderButtons();\n }\n }\n}\n\nexport const RecoveryCodesClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostMinWidth: { selector: () => ':host', property: 'min-width' },\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => TextClass.componentName,\n property: TextClass.cssVarList.hostDirection,\n },\n ],\n textAlign: { selector: () => '.list', property: 'align-items' },\n iconColor: { selector: () => 'vaadin-icon', property: 'color' },\n iconSize: { selector: () => 'vaadin-icon', property: 'font-size' },\n iconGap: { selector: () => '.codes-box', property: 'gap' },\n iconStackGap: { selector: () => '.icons', property: 'gap' },\n buttonsGap: { selector: () => '.buttons-row', property: 'gap' },\n sectionsGap: { selector: () => '.wrapper', property: 'gap' },\n bulletGap: { selector: () => 'descope-text span', property: 'gap' },\n // top + bottom padding sit inside the border (below the codes) in both variants; in the\n // buttons variant the bottom padding also repeats below the buttons (the buttons-row entry\n // is inert in the icons variant, where the row is display:none).\n verticalPadding: [\n { selector: () => '.codes-box', property: 'padding-top' },\n { selector: () => '.codes-box', property: 'padding-bottom' },\n { selector: () => '.buttons-row', property: 'padding-bottom' },\n ],\n // horizontal padding insets the codes (inside the border) and the buttons, but NOT the\n // error message, which stays aligned to the component edge (like the input error).\n horizontalPadding: [\n { selector: () => '.codes-box', property: 'padding-left' },\n { selector: () => '.codes-box', property: 'padding-right' },\n { selector: () => '.buttons-row', property: 'padding-left' },\n { selector: () => '.buttons-row', property: 'padding-right' },\n ],\n errorBorderColor: {\n selector: () => '.codes-box',\n property: 'border-color',\n },\n errorMessageColor: {\n selector: () => '.error-message',\n property: 'color',\n },\n errorMessageFontSize: {\n selector: () => '.error-message',\n property: 'font-size',\n },\n errorMessageFontWeight: {\n selector: () => '.error-message',\n property: 'font-weight',\n },\n errorMessageFontFamily: {\n selector: () => '.error-message',\n property: 'font-family',\n },\n boxBorderRadius: {\n selector: () => '.codes-box',\n property: 'border-radius',\n },\n errorBorderWidth: {\n selector: () => '.codes-box',\n property: 'border-width',\n },\n boxBorderStyle: {\n selector: () => '.codes-box',\n property: 'border-style',\n },\n },\n }),\n // also inject the shared input-wrapper theme onto our host (like the input components do),\n // so the error message + border track the console \"customize inputs\" tokens\n createStyleMixin({\n componentNameOverride: getComponentName('input-wrapper'),\n }),\n createDynamicDataMixin({\n itemRenderer,\n rerenderAttrsList: ['variant', 'mode'],\n targetSelector: '.codes-list',\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawRecoveryCodes);\n","import '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-icon';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, RecoveryCodesClass } from './RecoveryCodesClass';\n\ncustomElements.define(componentName, RecoveryCodesClass);\n\nexport { RecoveryCodesClass, 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"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_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","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","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","attributeChangedCallback","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__","componentsHelpers","NO_ACTION","ACTIONS","copy","defaultText","download","BUTTON_SUFFIXES","BUTTON_ATTRS","Object","keys","flatMap","action","map","suffix","RawRecoveryCodes","baseClasses","showError","initialized","list","shadowRoot","copyIcon","downloadIcon","iconWrapper","errorMessageEle","buttonsRow","variant","boolAttr","name","hasAttribute","isRequired","isReadOnly","errorMessage","codesText","String","data","rc","join","addEventListener","onCopy","bind","onDownload","EA","includeAttrs","renderButtons","isDownloadEnabled","buttons","buildButton","push","replaceChildren","button","iconSrc","icon","iconDark","createTextNode","navigator","clipboard","writeText","showActionFeedback","recordAction","blob","Blob","type","url","URL","createObjectURL","anchor","href","revokeObjectURL","dispatchEvent","Event","bubbles","checkValidity","syncValidityUI","iconEle","doneTitle","feedbackTimer","clearTimeout","originalIcon","originalTitle","setTimeout","reportValidity","valid","toggleAttribute","textContent","includes","RecoveryCodesClass","utils","componentsMixins","hostMinWidth","TextClass","s","iconGap","iconStackGap","buttonsGap","sectionsGap","bulletGap","errorBorderColor","errorMessageColor","errorMessageFontSize","errorMessageFontWeight","errorMessageFontFamily","boxBorderRadius","errorBorderWidth","boxBorderStyle","componentNameOverride","t$","itemRenderer","_","ref","rerenderAttrsList","targetSelector","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-recovery-codes.js","mappings":"yOAYO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,YAC5B,EAAAJ,EAAAK,IAAgB,CAClBC,SAAA,CACAC,UAAA,CAAmBC,SAAA,SACnBC,aAAA,IAAsBjB,EAAAgB,SAAA,aACtBE,WAAA,CAAoBF,SAAA,UACpBG,cAAA,IAAuBnB,EAAAgB,SAAA,aACvBI,SAAA,GACAC,WAAA,GACAC,WAAA,GAEAC,OAAA,GACAC,gBAAA,GAEAC,cAAA,GACAC,aAAA,GACAC,aAAA,GACAC,aAAA,GAEAC,aAAA,GACAC,YAAA,GACAC,YAAA,GACAC,YAAA,GAEAC,gBAAA,CACA,CAAUjB,SAAA,eACV,CAAUA,SAAA,mBAEVkB,kBAAA,CACA,CAAUlB,SAAA,gBAAAmB,SAAA,WACV,CAAUnB,SAAA,eAAAmB,SAAA,YAGVC,eAAA,CAAwBpB,SAAA,SACxBqB,UAAA,CACAlC,SAAA,mBACAa,SAAkBsB,EAAAC,EAASC,WAAAC,MAE3BC,oBAAA,IAA6BzC,EAAAe,SAAA,mBAC7B2B,aAAA,IAA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,eAAA,CAAwBnQ,SAAA,eACxBoQ,kBAAA,CAA2BpQ,SAAA,kBAC3BqQ,WAAA,GACAzO,UAAA,GACA0O,cAAA,GACAjQ,WAAA,GACAkQ,UAAA,GACAjQ,WAAA,GACAU,YAAA,GACAD,YAAA,GACAD,YAAA,OAGE,EAAAwC,EAAA7D,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,WAC5B0D,EAAAtB,GACAsB,EAAArB,GAtBuB,CAuBzBwN,wFCjFA1M,eAAAC,OAAsBwN,EAAAtN,EAAesN,EAAArC","sources":["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-recovery-codes/src/component/RecoveryCodesClass.js","webpack://@descope/web-components-ui/../components/descope-recovery-codes/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"],"sourcesContent":["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 createDynamicDataMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('recovery-codes');\n\nconst NO_ACTION = 'none';\nconst DEFAULT_ERROR_MESSAGE =\n 'Copy or download your recovery codes to continue.';\n\n// default button label per action (buttons variant). the icons variant uses the vaadin\n// glyphs hardcoded in the shadow-DOM template below; the buttons variant uses image srcs.\nconst ACTIONS = {\n copy: { defaultText: 'Copy' },\n download: { defaultText: 'Download' },\n};\n\n// per-button config suffixes; the full attribute is `${action}-${suffix}`.\n// `icon`/`icon-dark` are image srcs (the seeded glyph or a custom upload), matching\n// the standard button's start-icon (light/dark), not a boolean.\nconst BUTTON_SUFFIXES = [\n 'text',\n 'variant',\n 'color',\n 'size',\n 'icon',\n 'icon-dark',\n];\n\n// changing any of these rebuilds the buttons (so the editor preview stays live)\nconst BUTTON_ATTRS = [\n 'show-download',\n ...Object.keys(ACTIONS).flatMap((action) =>\n BUTTON_SUFFIXES.map((suffix) => `${action}-${suffix}`),\n ),\n];\n\nconst itemRenderer = ({ value }, _, ref) => {\n return `\n <descope-text variant=\"${ref.variant}\" mode=\"${ref.mode}\">\n <span>${value}</span>\n </descope-text>\n `;\n};\n\nclass RawRecoveryCodes extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['readonly', 'required', ...BUTTON_ATTRS];\n }\n\n // 'none' | 'copied' | 'downloaded' - the last action the user took on the codes\n #action = NO_ACTION;\n\n // the error is shown only after a submit attempt (reportValidity), like inputs\n #showError = false;\n\n // init() builds the buttons once with all seeded attrs; guards against rebuilding\n // on every per-attribute change fired during element upgrade (before init runs)\n #initialized = false;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <div class=\"codes-box\">\n <div class=\"list\"><div class=\"codes-list\"></div></div>\n <descope-text class=\"icon-wrapper\">\n <div class=\"icons\">\n <vaadin-icon class=\"icon copy-icon\" icon=\"vaadin:copy-o\" title=\"Copy\"></vaadin-icon>\n <vaadin-icon class=\"icon download-icon\" icon=\"vaadin:download-alt\" title=\"Download\"></vaadin-icon>\n </div>\n </descope-text>\n </div>\n <div class=\"error-message\"></div>\n <div class=\"buttons-row\"></div>\n </div>\n `;\n\n this.list = this.shadowRoot.querySelector('.list');\n this.copyIcon = this.shadowRoot.querySelector('.copy-icon');\n this.downloadIcon = this.shadowRoot.querySelector('.download-icon');\n this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');\n this.errorMessageEle = this.shadowRoot.querySelector('.error-message');\n this.buttonsRow = this.shadowRoot.querySelector('.buttons-row');\n\n injectStyle(\n `\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n }\n .codes-box {\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n /* border shows the error ring inside the box; style/width/color/radius come from theme */\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n /* text-align maps to align-items here, so it positions the codes block\n (start/center/end) inside the available space, not each row */\n }\n .codes-list {\n display: flex;\n flex-direction: column;\n /* rows always start-aligned so the bullets line up in any font.\n width:fit-content hugs the codes so .list can position the whole\n block (keep it, it also defeats the stretch fallback) */\n align-items: flex-start;\n width: fit-content;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icons {\n display: flex;\n flex-direction: column;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n /* block re-clicks while the checkmark shows, so rapid clicks cannot repeat the action */\n pointer-events: none;\n }\n /* readonly is a host attribute, so disable pointer events from one place */\n :host([readonly=\"true\"]) .icon,\n :host([readonly=\"true\"]) .buttons-row {\n pointer-events: none;\n }\n .download-icon {\n display: none;\n }\n :host([show-download=\"true\"]) .download-icon {\n display: inline-flex;\n }\n .error-message {\n display: none;\n /* width:0 + min-width:100% lets the message wrap to the component width without\n its text expanding the (shrink-to-fit) component; full-width still fills the parent */\n width: 0;\n min-width: 100%;\n box-sizing: border-box;\n line-height: 1.2;\n overflow-wrap: break-word;\n }\n :host([invalid]) .error-message {\n display: block;\n }\n .buttons-row {\n display: none;\n }\n :host([display-variant=\"buttons\"]) .icon-wrapper {\n display: none;\n }\n :host([display-variant=\"buttons\"]) .buttons-row {\n display: flex;\n flex-wrap: wrap;\n }\n /* grow to fill equally; don't shrink below content, so they wrap to a new line\n when they don't fit (like a container with auto-fit items) */\n .buttons-row > descope-button {\n flex: 1 0 auto;\n }\n `,\n this,\n );\n }\n\n get variant() {\n return this.getAttribute('variant');\n }\n\n get mode() {\n return this.getAttribute('mode');\n }\n\n // the form value read by the flow SDK (#getFormData reads `.value`)\n get value() {\n return this.#action;\n }\n\n // a boolean attribute is \"on\" when present and not explicitly \"false\"\n #boolAttr(name) {\n return this.hasAttribute(name) && this.getAttribute(name) !== 'false';\n }\n\n get isRequired() {\n return this.#boolAttr('required');\n }\n\n get isReadOnly() {\n return this.#boolAttr('readonly');\n }\n\n get errorMessage() {\n return (\n this.getAttribute('data-errormessage-value-missing') ||\n DEFAULT_ERROR_MESSAGE\n );\n }\n\n get codesText() {\n return String((this.data || []).map((rc) => rc.value).join('\\n'));\n }\n\n init() {\n super.init();\n\n this.copyIcon.addEventListener('click', this.onCopy.bind(this));\n this.downloadIcon.addEventListener('click', this.onDownload.bind(this));\n\n forwardAttrs(this, this.iconWrapper, { includeAttrs: ['variant', 'mode'] });\n\n this.renderButtons();\n this.#initialized = true;\n }\n\n get isDownloadEnabled() {\n return this.getAttribute('show-download') === 'true';\n }\n\n // buttons variant: copy (+ download when enabled) as descope-buttons, each independently\n // configurable. rendered even in the icons variant (CSS hides the row) so a variant switch is instant.\n renderButtons() {\n if (!this.buttonsRow) return;\n\n const buttons = [this.buildButton('copy')];\n if (this.isDownloadEnabled) {\n buttons.push(this.buildButton('download'));\n }\n this.buttonsRow.replaceChildren(...buttons);\n }\n\n buildButton(action) {\n const { defaultText } = ACTIONS[action];\n const attr = (name, fallback) =>\n this.getAttribute(`${action}-${name}`) || fallback;\n\n const button = document.createElement('descope-button');\n button.setAttribute('data-action', action);\n button.setAttribute('variant', attr('variant', 'outline'));\n button.setAttribute('mode', attr('color', 'primary'));\n button.setAttribute('size', attr('size', 'md'));\n\n // icon is an image src - the seeded glyph or a custom upload (light/dark),\n // same as the standard button's start icon. rendered via descope-icon in the\n // default slot (not slot=\"prefix\") so it centers with the label when the\n // button grows. descope-icon inlines SVGs, so the glyph (authored with\n // fill=\"currentColor\") tracks the button text color while an uploaded image\n // keeps its own colors.\n const iconSrc = this.getAttribute(`${action}-icon`);\n if (iconSrc) {\n const icon = document.createElement('descope-icon');\n icon.setAttribute('src', iconSrc);\n const iconDark = this.getAttribute(`${action}-icon-dark`);\n if (iconDark) icon.setAttribute('src-dark', iconDark);\n button.appendChild(icon);\n }\n\n button.appendChild(document.createTextNode(attr('text', defaultText)));\n button.addEventListener('click', () =>\n action === 'copy' ? this.onCopy() : this.onDownload(),\n );\n return button;\n }\n\n onCopy() {\n if (this.isReadOnly) return;\n navigator.clipboard.writeText(this.codesText);\n this.showActionFeedback(this.copyIcon, 'Copied');\n this.recordAction('copied');\n }\n\n onDownload() {\n if (this.isReadOnly) return;\n const blob = new Blob([this.codesText], { type: 'text/plain' });\n const url = URL.createObjectURL(blob);\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = 'recovery-codes.txt';\n anchor.click();\n URL.revokeObjectURL(url);\n\n this.showActionFeedback(this.downloadIcon, 'Downloaded');\n this.recordAction('downloaded');\n }\n\n // copy/download share this - only the visual feedback differs by variant\n recordAction(action) {\n this.#action = action;\n // let the flow re-evaluate real-time conditions and pick up the new value\n this.dispatchEvent(new Event('change', { bubbles: true }));\n // acting clears the mandatory error\n if (this.checkValidity()) {\n this.#showError = false;\n }\n this.syncValidityUI();\n }\n\n // icons variant: swap the icon to a checkmark for 5s (buttons variant is static)\n showActionFeedback(iconEle, doneTitle) {\n // on a rapid re-click the checkmark is already showing, so cancel the pending restore\n // and keep the glyph/title we saved the first time (never capture the checkmark itself)\n if (iconEle.feedbackTimer) {\n clearTimeout(iconEle.feedbackTimer);\n } else {\n iconEle.originalIcon = iconEle.getAttribute('icon');\n iconEle.originalTitle = iconEle.getAttribute('title');\n }\n\n iconEle.setAttribute('icon', 'vaadin:check-circle-o');\n iconEle.setAttribute('title', doneTitle);\n iconEle.classList.add('copied');\n\n iconEle.feedbackTimer = setTimeout(() => {\n iconEle.setAttribute('icon', iconEle.originalIcon);\n iconEle.setAttribute('title', iconEle.originalTitle);\n iconEle.classList.remove('copied');\n iconEle.feedbackTimer = null;\n }, 5000);\n }\n\n // the flow SDK's #validateInputs calls checkValidity/reportValidity on every *[name]\n checkValidity() {\n return this.isReadOnly || !this.isRequired || this.value !== NO_ACTION;\n }\n\n reportValidity() {\n const valid = this.checkValidity();\n this.#showError = !valid;\n this.syncValidityUI();\n return valid;\n }\n\n // single source of truth for the error UI - reflects `invalid` (theme `_invalid`\n // draws the outline) and fills the message. never toggled anywhere else.\n syncValidityUI() {\n this.toggleAttribute('invalid', this.#showError);\n if (this.errorMessageEle) {\n this.errorMessageEle.textContent = this.#showError\n ? this.errorMessage\n : '';\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue === oldValue) return;\n\n // if it stops being required, drop any error already shown\n if (attrName === 'required' && !this.isRequired) {\n this.#showError = false;\n this.syncValidityUI();\n }\n\n // only rebuild for live edits after init (init already built once with all attrs);\n // avoids rebuilding once per attribute during the initial element upgrade\n if (this.#initialized && BUTTON_ATTRS.includes(attrName)) {\n this.renderButtons();\n }\n }\n}\n\nexport const RecoveryCodesClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostMinWidth: { selector: () => ':host', property: 'min-width' },\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => TextClass.componentName,\n property: TextClass.cssVarList.hostDirection,\n },\n ],\n textAlign: { selector: () => '.list', property: 'align-items' },\n iconColor: { selector: () => 'vaadin-icon', property: 'color' },\n iconSize: { selector: () => 'vaadin-icon', property: 'font-size' },\n iconGap: { selector: () => '.codes-box', property: 'gap' },\n iconStackGap: { selector: () => '.icons', property: 'gap' },\n buttonsGap: { selector: () => '.buttons-row', property: 'gap' },\n sectionsGap: { selector: () => '.wrapper', property: 'gap' },\n bulletGap: { selector: () => 'descope-text span', property: 'gap' },\n // top + bottom padding sit inside the border (below the codes) in both variants; in the\n // buttons variant the bottom padding also repeats below the buttons (the buttons-row entry\n // is inert in the icons variant, where the row is display:none).\n verticalPadding: [\n { selector: () => '.codes-box', property: 'padding-top' },\n { selector: () => '.codes-box', property: 'padding-bottom' },\n { selector: () => '.buttons-row', property: 'padding-bottom' },\n ],\n // horizontal padding insets the codes (inside the border) and the buttons, but NOT the\n // error message, which stays aligned to the component edge (like the input error).\n horizontalPadding: [\n { selector: () => '.codes-box', property: 'padding-left' },\n { selector: () => '.codes-box', property: 'padding-right' },\n { selector: () => '.buttons-row', property: 'padding-left' },\n { selector: () => '.buttons-row', property: 'padding-right' },\n ],\n errorBorderColor: {\n selector: () => '.codes-box',\n property: 'border-color',\n },\n errorMessageColor: {\n selector: () => '.error-message',\n property: 'color',\n },\n errorMessageFontSize: {\n selector: () => '.error-message',\n property: 'font-size',\n },\n errorMessageFontWeight: {\n selector: () => '.error-message',\n property: 'font-weight',\n },\n errorMessageFontFamily: {\n selector: () => '.error-message',\n property: 'font-family',\n },\n boxBorderRadius: {\n selector: () => '.codes-box',\n property: 'border-radius',\n },\n errorBorderWidth: {\n selector: () => '.codes-box',\n property: 'border-width',\n },\n boxBorderStyle: {\n selector: () => '.codes-box',\n property: 'border-style',\n },\n },\n }),\n // also inject the shared input-wrapper theme onto our host (like the input components do),\n // so the error message + border track the console \"customize inputs\" tokens\n createStyleMixin({\n componentNameOverride: getComponentName('input-wrapper'),\n }),\n createDynamicDataMixin({\n itemRenderer,\n rerenderAttrsList: ['variant', 'mode'],\n targetSelector: '.codes-list',\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawRecoveryCodes);\n","import '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-icon';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, RecoveryCodesClass } from './RecoveryCodesClass';\n\ncustomElements.define(componentName, RecoveryCodesClass);\n\nexport { RecoveryCodesClass, 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"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_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","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","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","attributeChangedCallback","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__","componentsHelpers","NO_ACTION","ACTIONS","copy","defaultText","download","BUTTON_SUFFIXES","BUTTON_ATTRS","Object","keys","flatMap","action","map","suffix","RawRecoveryCodes","baseClasses","showError","initialized","list","shadowRoot","copyIcon","downloadIcon","iconWrapper","errorMessageEle","buttonsRow","variant","boolAttr","name","hasAttribute","isRequired","isReadOnly","errorMessage","codesText","String","data","rc","join","addEventListener","onCopy","bind","onDownload","EA","includeAttrs","renderButtons","isDownloadEnabled","buttons","buildButton","push","replaceChildren","button","iconSrc","icon","iconDark","createTextNode","navigator","clipboard","writeText","showActionFeedback","recordAction","blob","Blob","type","url","URL","createObjectURL","anchor","href","revokeObjectURL","dispatchEvent","Event","bubbles","checkValidity","syncValidityUI","iconEle","doneTitle","feedbackTimer","clearTimeout","originalIcon","originalTitle","setTimeout","reportValidity","valid","toggleAttribute","textContent","includes","RecoveryCodesClass","utils","componentsMixins","hostMinWidth","TextClass","s","iconGap","iconStackGap","buttonsGap","sectionsGap","bulletGap","errorBorderColor","errorMessageColor","errorMessageFontSize","errorMessageFontWeight","errorMessageFontFamily","boxBorderRadius","errorBorderWidth","boxBorderStyle","componentNameOverride","t$","itemRenderer","_","ref","rerenderAttrsList","targetSelector","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3594],{28027(e,t,r){r.d(t,{T:()=>a,w:()=>c});var o=r(88961),i=r(63200),n=r(25964),s=r(79673),l=r(47656);const a=(0,n.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],c=(0,i.Zz)((0,o.RF)({mappings:l.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart","selectionEnd"],useProxyTargets:!0}),o.tQ,e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.(),(0,n.EA)(this,this.baseElement,{includeAttrs:["placeholder"]})}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,r){super.attributeChangeCallback?.(e,t,r),"type"===e&&this.baseElement._setType(r),t!==r&&("label-type"===e?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(c.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",c.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style","placeholder"],componentName:a}))},64014(e,t,r){r.r(t),r.d(t,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(28027);customElements.define(o.T,o.w)},47656(e,t,r){r.d(t,{A:()=>f});const{host:o,label:i,placeholder:n,requiredIndicator:s,inputField:l,input:a,inputMask:p,helperText:c,errorMessage:d,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:b,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},o],fontFamily:[i,l,c,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},inputValueFontWeight:[{...a,property:"font-weight"},{...b,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...m,property:"font-weight"}],helperTextFontWeight:{...c,property:"font-weight"},errorMessageFontWeight:{...d,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...s,property:"color"},{...i,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...a,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...d,property:"color"},errorMessageIcon:{...d,property:"background-image"},errorMessageIconSize:{...d,property:"background-size"},errorMessageIconPadding:{...d,property:"padding-inline-start"},errorMessageIconRepeat:{...d,property:"background-repeat"},errorMessageIconPosition:{...d,property:"background-position"},errorMessageFontSize:{...d,property:"font-size"},helperTextColor:{...c,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...a,property:"caret-color"},{...b,property:"caret-color"}],labelRequiredIndicator:{...s,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"},{...b,property:"padding-left"},{...b,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...a,property:"text-align"},{...b,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...b,property:"align-items"}],valueInputHeight:[{...a,property:"height"},{...b,property:"height"}],valueInputMarginBottom:[{...a,property:"margin-bottom"},{...b,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...a,property:"-webkit-text-security"},{...a,property:"text-security"},{...b,property:"-webkit-text-security"},{...b,property:"text-security"}]}},74460(e,t,r){r.r(t),r.d(t,{SecurityQuestionsSetupClass:()=>y,componentName:()=>c});var o=r(86365),i=r(25964),n=r(28027),s=r(81365),l=r(9696),a=r(97810),p=r(79365);const c=(0,a.xE)("security-questions-setup"),d=["full-width","readonly","size","label-type","question-label","question-placeholder","question-data-errormessage-value-missing","answer-label","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],u=["count","questions"];class h extends((0,s.q)({componentName:c,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,i.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get count(){return Number(this.getAttribute("count"))||0}#e(){const e=Array.from({length:this.count}).map((e,t)=>`\n <div class="question-wrapper">\n <descope-combo-box\n data-id="${t}"\n item-label-path="data-name"\n item-value-path="data-id"\n bordered="true"\n required="true"\n clear-button-visible="true"\n ></descope-combo-box>\n\n <descope-text-field\n data-id="${t}"\n required="true"\n bordered="true"\n minlength="2"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.comboBoxes.forEach(e=>{e.addEventListener("change",e=>{this.updateRemainingCombosData(e.target),this.getAttachedTextField(e.target).value=""}),e.data=this.data}),this.#t(d)}getAttachedTextField(e){const t=`descope-text-field[data-id="${e.getAttribute("data-id")}"]`;return this.baseElement.querySelector(t)}filterData(e){return this.data.filter(t=>t.value===e||!this.selectedQuestionIds.includes(t.value))}reportValidity(){return this.inputs.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return[...this.comboBoxes,...this.textFields].every(e=>e.checkValidity())}updateRemainingCombosData(e){this.comboBoxes.filter(t=>t!==e).forEach(e=>{e.data=this.filterData(e.value)})}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(c,"Error parsing questions attribute",e),[]}}get data(){return this.questions.map(({id:e,text:t})=>({value:e,label:t}))}get comboBoxes(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get inputs(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box, descope-text-field"))}get selectedQuestionIds(){return this.comboBoxes.map(e=>e.value)}get value(){return this.comboBoxes.map(e=>({id:e.value,answer:this.getAttachedTextField(e).value}))}set value(e=[]){e.forEach((e,t)=>{const r=this.comboBoxes[t],o=this.getAttachedTextField(r);r.value=e.id,o.value=e.answer})}#r(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}#t(e){const t={question:this.comboBoxes,answer:this.textFields};e.forEach(e=>{const[r,...o]=e.split("-"),i=t[r]||this.inputs,n=t[r]?o.join("-"):e;i.forEach(t=>{this.#r(t,n,this.getAttribute(e))})})}init(){super.init?.(),(0,a.mx)(this,()=>{this.#e()},{includeAttrs:u}),(0,a.mx)(this,this.#t.bind(this),{includeAttrs:d})}}const y=(0,l.Zz)((0,p.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>o.C.componentName,property:o.C.cssVarList.hostDirection},{selector:()=>n.w.componentName,property:n.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),p.VO,p.tQ)(h);r(64014),r(27092),customElements.define(c,y)}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3594],{28027(e,t,r){r.d(t,{T:()=>a,w:()=>c});var o=r(88961),i=r(63200),n=r(25964),s=r(79673),l=r(47656);const a=(0,n.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],c=(0,i.Zz)((0,o.RF)({mappings:l.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart","selectionEnd"],useProxyTargets:!0}),o.tQ,e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.(),(0,n.EA)(this,this.baseElement,{includeAttrs:["placeholder"]})}renderCopyToClipboard(e){if(!e)return this.icon?.remove(),void this.copyLiveRegion?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"},o=e=>{Object.assign(this.icon,e),this.icon.setAttribute("aria-label",e.title)};let i;this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",tabIndex:0}),this.icon.setAttribute("role","button"),o(t),this.copyLiveRegion=document.createElement("span"),this.copyLiveRegion.setAttribute("aria-live","polite"),this.copyLiveRegion.style.cssText="position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;",this.baseElement.appendChild(this.icon),this.shadowRoot.appendChild(this.copyLiveRegion);const n=async()=>{try{await navigator.clipboard.writeText(this.value)}catch{return}o(r),this.copyLiveRegion.textContent="Copied",clearTimeout(i),i=setTimeout(()=>{o(t),this.copyLiveRegion.textContent=""},3e3)};this.icon.addEventListener("click",n),this.icon.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),n())})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,r){super.attributeChangeCallback?.(e,t,r),"type"===e&&this.baseElement._setType(r),t!==r&&("label-type"===e?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(c.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",c.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style","placeholder"],componentName:a}))},64014(e,t,r){r.r(t),r.d(t,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(28027);customElements.define(o.T,o.w)},47656(e,t,r){r.d(t,{A:()=>f});const{host:o,label:i,placeholder:n,requiredIndicator:s,inputField:l,input:a,inputMask:p,helperText:c,errorMessage:d,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:b,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},o],fontFamily:[i,l,c,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},inputValueFontWeight:[{...a,property:"font-weight"},{...b,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...m,property:"font-weight"}],helperTextFontWeight:{...c,property:"font-weight"},errorMessageFontWeight:{...d,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...s,property:"color"},{...i,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...a,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...d,property:"color"},errorMessageIcon:{...d,property:"background-image"},errorMessageIconSize:{...d,property:"background-size"},errorMessageIconPadding:{...d,property:"padding-inline-start"},errorMessageIconRepeat:{...d,property:"background-repeat"},errorMessageIconPosition:{...d,property:"background-position"},errorMessageFontSize:{...d,property:"font-size"},helperTextColor:{...c,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...a,property:"caret-color"},{...b,property:"caret-color"}],labelRequiredIndicator:{...s,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"},{...b,property:"padding-left"},{...b,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...a,property:"text-align"},{...b,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...b,property:"align-items"}],valueInputHeight:[{...a,property:"height"},{...b,property:"height"}],valueInputMarginBottom:[{...a,property:"margin-bottom"},{...b,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...a,property:"-webkit-text-security"},{...a,property:"text-security"},{...b,property:"-webkit-text-security"},{...b,property:"text-security"}]}},74460(e,t,r){r.r(t),r.d(t,{SecurityQuestionsSetupClass:()=>y,componentName:()=>c});var o=r(86365),i=r(25964),n=r(28027),s=r(81365),l=r(9696),a=r(97810),p=r(79365);const c=(0,a.xE)("security-questions-setup"),d=["full-width","readonly","size","label-type","question-label","question-placeholder","question-data-errormessage-value-missing","answer-label","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],u=["count","questions"];class h extends((0,s.q)({componentName:c,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,i.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get count(){return Number(this.getAttribute("count"))||0}#e(){const e=Array.from({length:this.count}).map((e,t)=>`\n <div class="question-wrapper">\n <descope-combo-box\n data-id="${t}"\n item-label-path="data-name"\n item-value-path="data-id"\n bordered="true"\n required="true"\n clear-button-visible="true"\n ></descope-combo-box>\n\n <descope-text-field\n data-id="${t}"\n required="true"\n bordered="true"\n minlength="2"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.comboBoxes.forEach(e=>{e.addEventListener("change",e=>{this.updateRemainingCombosData(e.target),this.getAttachedTextField(e.target).value=""}),e.data=this.data}),this.#t(d)}getAttachedTextField(e){const t=`descope-text-field[data-id="${e.getAttribute("data-id")}"]`;return this.baseElement.querySelector(t)}filterData(e){return this.data.filter(t=>t.value===e||!this.selectedQuestionIds.includes(t.value))}reportValidity(){return this.inputs.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return[...this.comboBoxes,...this.textFields].every(e=>e.checkValidity())}updateRemainingCombosData(e){this.comboBoxes.filter(t=>t!==e).forEach(e=>{e.data=this.filterData(e.value)})}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(c,"Error parsing questions attribute",e),[]}}get data(){return this.questions.map(({id:e,text:t})=>({value:e,label:t}))}get comboBoxes(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get inputs(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box, descope-text-field"))}get selectedQuestionIds(){return this.comboBoxes.map(e=>e.value)}get value(){return this.comboBoxes.map(e=>({id:e.value,answer:this.getAttachedTextField(e).value}))}set value(e=[]){e.forEach((e,t)=>{const r=this.comboBoxes[t],o=this.getAttachedTextField(r);r.value=e.id,o.value=e.answer})}#r(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}#t(e){const t={question:this.comboBoxes,answer:this.textFields};e.forEach(e=>{const[r,...o]=e.split("-"),i=t[r]||this.inputs,n=t[r]?o.join("-"):e;i.forEach(t=>{this.#r(t,n,this.getAttribute(e))})})}init(){super.init?.(),(0,a.mx)(this,()=>{this.#e()},{includeAttrs:u}),(0,a.mx)(this,this.#t.bind(this),{includeAttrs:d})}}const y=(0,l.Zz)((0,p.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>o.C.componentName,property:o.C.cssVarList.hostDirection},{selector:()=>n.w.componentName,property:n.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),p.VO,p.tQ)(h);r(64014),r(27092),customElements.define(c,y)}}]);
|
|
2
2
|
//# sourceMappingURL=descope-security-questions-setup-index-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-security-questions-setup-index-js.js","mappings":"0NAoBO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,cAE7CC,EAAA,0CAmFOC,GAAuB,EAAAC,EAAAC,KAC5B,EAAAC,EAAAC,IAAgB,CAClBC,SAAcC,EAAAC,IAEZJ,EAAAK,IACA,EAAAL,EAAAM,IAAe,CACjBC,WAAA,0CACAC,iBAAA,IAEER,EAAAS,GA1FFC,GACA,cAAAA,EACA,6BAAAC,GACA,OAAAf,EAAAgB,OAAAF,EAAAC,oBAAA,GACA,CAEAE,KAEA,IAAAC,GACAC,MAAAD,UAIM,EAAApB,EAAAsB,IAAYC,KAAAA,KAAAC,YAAA,CAA2BC,aAAA,iBAC7C,CAEA,qBAAAC,CAAAC,GACA,IAAAA,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EA,EAGO,MAAAyE,GAAoC,EAAAC,EAAAlN,KACzC,EAAAmN,EAAAjN,IAAgB,CAClBC,SAAA,CACA2F,UAAA,EAAoBZ,SAAA,YAAAK,SAAA,SAA4C,CAAIA,SAAA,UACpES,cAAA,CACA,CAAUd,SAAA,YAAAK,SAAA,aACV,CACAL,SAAA,IAA0BkI,EAAAC,EAAa3N,cACvC6F,SAAoB6H,EAAAC,EAAajK,WAAA4C,eAEjC,CACAd,SAAA,IAA0BpF,EAAAmE,EAAcvE,cACxC6F,SAAoBzF,EAAAmE,EAAcb,WAAA4C,gBAGlCsH,IAAA,CAAapI,SAAA,UAAAK,SAAA,UAGX4H,EAAA7M,GACA6M,EAAAzM,GAnByC,CAoB3CgI,qBC5OA7E,eAAAC,OAAsBpE,EAAeuN","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/TextFieldClass.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/index.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n} from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\nimport textFieldMappings from './textFieldMappings';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n\n // Excluded from syncAttrs (bidirectional would let vaadin revert host\n // values). Push host → vaadin one-way so authored placeholder applies.\n forwardAttrs(this, this.baseElement, { includeAttrs: ['placeholder'] });\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart', 'selectionEnd'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style', 'placeholder'],\n componentName,\n }),\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: {\n selector: () => '::slotted(input:disabled::placeholder)',\n },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => ':host input:placeholder-shown',\n property: 'font-weight',\n },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n","import { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { TextFieldClass } from '@descope-ui/descope-text-field/class';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeAttributes } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\n\nexport const componentName = getComponentName('security-questions-setup');\n\nconst attrsToSync = [\n 'full-width',\n 'readonly',\n 'size',\n 'label-type',\n 'question-label',\n 'question-placeholder',\n 'question-data-errormessage-value-missing',\n 'answer-label',\n 'answer-placeholder',\n 'answer-data-errormessage-value-missing',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst attrsToReRender = ['count', 'questions'];\nclass RawSecurityQuestionsSetup extends createBaseClass({ componentName, baseSelector: 'div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div></div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n `,\n this\n );\n }\n\n get count() {\n return Number(this.getAttribute('count')) || 0;\n }\n\n #renderQuestions() {\n const res = Array.from({ length: this.count }).map(\n (_, index) =>\n // <!--html-->\n `\n <div class=\"question-wrapper\">\n <descope-combo-box\n data-id=\"${index}\"\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n bordered=\"true\"\n required=\"true\"\n clear-button-visible=\"true\"\n ></descope-combo-box>\n\n <descope-text-field\n data-id=\"${index}\"\n required=\"true\"\n bordered=\"true\"\n minlength=\"2\"\n ></descope-text-field>\n </div>\n `\n // <!--!html-->\n );\n\n this.baseElement.innerHTML = res.join(\n '<spacer></spacer><descope-divider></descope-divider><spacer></spacer>'\n );\n\n this.comboBoxes.forEach((el) => {\n el.addEventListener('change', (e) => {\n this.updateRemainingCombosData(e.target);\n const AttachedTextField = this.getAttachedTextField(e.target);\n\n AttachedTextField.value = '';\n });\n\n el.data = this.data;\n });\n\n this.#syncAttrs(attrsToSync);\n }\n\n getAttachedTextField(combo) {\n const selector = `descope-text-field[data-id=\"${combo.getAttribute('data-id')}\"]`;\n\n return this.baseElement.querySelector(selector);\n }\n\n filterData(comboValue) {\n const res = this.data.filter(\n (item) => item.value === comboValue || !this.selectedQuestionIds.includes(item.value)\n );\n\n return res;\n }\n\n reportValidity() {\n this.inputs.reverse().forEach((el) => el.reportValidity());\n\n return this.checkValidity();\n }\n\n checkValidity() {\n return [...this.comboBoxes, ...this.textFields].every((el) => el.checkValidity());\n }\n\n updateRemainingCombosData(sourceCombo) {\n this.comboBoxes\n .filter((combo) => combo !== sourceCombo)\n .forEach((combo) => {\n combo.data = this.filterData(combo.value);\n });\n }\n\n get questions() {\n try {\n return JSON.parse(this.getAttribute('questions')) || [];\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(componentName, 'Error parsing questions attribute', e);\n return [];\n }\n }\n\n // this returns the structure expected by the combo box\n get data() {\n return this.questions.map(({ id, text }) => ({ value: id, label: text }));\n }\n\n get comboBoxes() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box'));\n }\n\n get textFields() {\n return Array.from(this.baseElement.querySelectorAll('descope-text-field'));\n }\n\n get inputs() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box, descope-text-field'));\n }\n\n get selectedQuestionIds() {\n return this.comboBoxes.map((el) => el.value);\n }\n\n get value() {\n return this.comboBoxes.map((combo) => {\n const id = combo.value;\n const answer = this.getAttachedTextField(combo).value;\n\n return { id, answer };\n });\n }\n\n set value(val = []) {\n val.forEach((item, index) => {\n const combo = this.comboBoxes[index];\n const textField = this.getAttachedTextField(combo);\n\n combo.value = item.id;\n textField.value = item.answer;\n });\n }\n\n #updateAttribute(ele, attrName, value) {\n if (value === null) ele.removeAttribute(attrName);\n else ele.setAttribute(attrName, value);\n }\n\n #syncAttrs(attrs) {\n const componentMap = {\n question: this.comboBoxes,\n answer: this.textFields,\n };\n\n attrs.forEach((attr) => {\n const [maybeComponentType, ...rest] = attr.split('-');\n const elements = componentMap[maybeComponentType] || this.inputs;\n const attrName = componentMap[maybeComponentType] ? rest.join('-') : attr;\n\n elements.forEach((el) => {\n this.#updateAttribute(el, attrName, this.getAttribute(attr));\n });\n });\n }\n\n init() {\n super.init?.();\n // render new components\n observeAttributes(\n this,\n () => {\n this.#renderQuestions();\n },\n { includeAttrs: attrsToReRender }\n );\n\n // update existing components\n observeAttributes(this, this.#syncAttrs.bind(this), {\n includeAttrs: attrsToSync,\n });\n }\n}\n\nexport const SecurityQuestionsSetupClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }, { property: 'width' }],\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => ComboBoxClass.componentName,\n property: ComboBoxClass.cssVarList.hostDirection,\n },\n {\n selector: () => TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.hostDirection,\n },\n ],\n gap: { selector: () => 'div', property: 'gap' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawSecurityQuestionsSetup);\n","import { componentName, SecurityQuestionsSetupClass } from './SecurityQuestionsSetupClass';\nimport '@descope-ui/descope-text-field';\nimport '@descope-ui/descope-combo-box';\n\ncustomElements.define(componentName, SecurityQuestionsSetupClass);\n\nexport { SecurityQuestionsSetupClass, componentName };\n"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","xE","observedAttrs","TextFieldClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","_textFieldMappings__WEBPACK_IMPORTED_MODULE_4__","A","VO","OZ","proxyProps","useProxyTargets","tQ","superclass","observedAttributes","concat","icon","init","super","EA","this","baseElement","includeAttrs","renderCopyToClipboard","shouldRender","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","tz","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","_descope_ui_common_theme_helpers__WEBPACK_IMPORTED_MODULE_3__","$J","cy","LJ","Kl","excludeAttrsSync","customElements","define","_TextFieldClass__WEBPACK_IMPORTED_MODULE_3__","T","w","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","__WEBPACK_DEFAULT_EXPORT__","fontSize","fontFamily","labelFontSize","property","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","componentHelpers","attrsToSync","attrsToReRender","RawSecurityQuestionsSetup","createBaseClass","q","baseSelector","constructor","attachShadow","mode","innerHTML","componentsHelpers","fz","count","Number","getAttribute","renderQuestions","res","Array","from","length","map","_","index","join","comboBoxes","forEach","el","e","updateRemainingCombosData","target","getAttachedTextField","data","syncAttrs","combo","querySelector","filterData","comboValue","filter","item","selectedQuestionIds","includes","reportValidity","inputs","reverse","checkValidity","textFields","every","sourceCombo","questions","JSON","parse","console","error","id","text","querySelectorAll","answer","val","textField","updateAttribute","ele","removeAttribute","setAttribute","attrs","componentMap","question","attr","maybeComponentType","rest","split","elements","mx","bind","SecurityQuestionsSetupClass","helpers","mixins","ComboBoxClass","C","gap"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-security-questions-setup-index-js.js","mappings":"0NAoBO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,cAE7CC,EAAA,0CAqHOC,GAAuB,EAAAC,EAAAC,KAC5B,EAAAC,EAAAC,IAAgB,CAClBC,SAAcC,EAAAC,IAEZJ,EAAAK,IACA,EAAAL,EAAAM,IAAe,CACjBC,WAAA,0CACAC,iBAAA,IAEER,EAAAS,GA5HFC,GACA,cAAAA,EACA,6BAAAC,GACA,OAAAf,EAAAgB,OAAAF,EAAAC,oBAAA,GACA,CAEAE,KAEA,IAAAC,GACAC,MAAAD,UAIM,EAAApB,EAAAsB,IAAYC,KAAAA,KAAAC,YAAA,CAA2BC,aAAA,iBAC7C,CAEA,qBAAAC,CAAAC,GACA,IAAAA,EAGA,OAFAJ,KAAAJ,MAAAS,cACAL,KAAAM,gBAAAD,SAIA,MAAAE,EAAA,CACAX,KAAA,gBACAY,MAAA,OACAC,MAAA,mBAGAC,EAAA,CACAd,KAAA,wBACAY,MAAA,SACAC,MAAA,mBAGAE,EAAAC,IACAC,OAAAC,OAAAd,KAAAJ,KAAAgB,GACAZ,KAAAJ,KAAAmB,aAAA,aAAAH,EAAA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EAI,EAAA3C,QAAAC,IACAhK,MAAAgM,EAAAhC,EAAAvH,EAAAzC,KAAAoJ,aAAAkD,OAGA,CAEA,IAAAzM,GACAC,MAAAD,UAEI,EAAAwI,EAAAsE,IACJ3M,KACA,KACAA,MAAAqJ,KAEA,CAAQnJ,aAAAqI,KAIJ,EAAAF,EAAAsE,IAAiB3M,KAAAA,MAAAqK,EAAAuC,KAAA5M,MAAA,CACrBE,aAAAoI,GAEA,EAGO,MAAAuE,GAAoC,EAAAC,EAAAhO,KACzC,EAAAiO,EAAA/N,IAAgB,CAClBC,SAAA,CACA2G,UAAA,EAAoBZ,SAAA,YAAAK,SAAA,SAA4C,CAAIA,SAAA,UACpES,cAAA,CACA,CAAUd,SAAA,YAAAK,SAAA,aACV,CACAL,SAAA,IAA0BgI,EAAAC,EAAazO,cACvC6G,SAAoB2H,EAAAC,EAAa/J,WAAA4C,eAEjC,CACAd,SAAA,IAA0BpG,EAAAmF,EAAcvF,cACxC6G,SAAoBzG,EAAAmF,EAAcb,WAAA4C,gBAGlCoH,IAAA,CAAalI,SAAA,UAAAK,SAAA,UAGX0H,EAAA3N,GACA2N,EAAAvN,GAnByC,CAoB3CgJ,qBC5OA7E,eAAAC,OAAsBpF,EAAeqO","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/TextFieldClass.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/index.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n} from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\nimport textFieldMappings from './textFieldMappings';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n\n // Excluded from syncAttrs (bidirectional would let vaadin revert host\n // values). Push host → vaadin one-way so authored placeholder applies.\n forwardAttrs(this, this.baseElement, { includeAttrs: ['placeholder'] });\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n this.copyLiveRegion?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n const setIconState = (config) => {\n Object.assign(this.icon, config);\n this.icon.setAttribute('aria-label', config.title);\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n tabIndex: 0,\n });\n this.icon.setAttribute('role', 'button');\n setIconState(iconInitConfig);\n\n // visually hidden live region, so screen readers announce the copy\n this.copyLiveRegion = document.createElement('span');\n this.copyLiveRegion.setAttribute('aria-live', 'polite');\n this.copyLiveRegion.style.cssText =\n 'position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;';\n\n this.baseElement.appendChild(this.icon);\n this.shadowRoot.appendChild(this.copyLiveRegion);\n\n let resetTimer;\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(this.value);\n } catch {\n return;\n }\n setIconState(iconCopiedConfig);\n this.copyLiveRegion.textContent = 'Copied';\n\n // we want the icon to go back to the initial state after 3 seconds\n // a repeated copy restarts the countdown\n clearTimeout(resetTimer);\n resetTimer = setTimeout(() => {\n setIconState(iconInitConfig);\n this.copyLiveRegion.textContent = '';\n }, 3000);\n };\n\n this.icon.addEventListener('click', copy);\n this.icon.addEventListener('keydown', (e) => {\n if (e.key !== 'Enter' && e.key !== ' ') return;\n e.preventDefault();\n // the SDK submits the flow on any Enter that reaches the flow root\n e.stopPropagation();\n copy();\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart', 'selectionEnd'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style', 'placeholder'],\n componentName,\n }),\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: {\n selector: () => '::slotted(input:disabled::placeholder)',\n },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => ':host input:placeholder-shown',\n property: 'font-weight',\n },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n","import { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { TextFieldClass } from '@descope-ui/descope-text-field/class';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeAttributes } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\n\nexport const componentName = getComponentName('security-questions-setup');\n\nconst attrsToSync = [\n 'full-width',\n 'readonly',\n 'size',\n 'label-type',\n 'question-label',\n 'question-placeholder',\n 'question-data-errormessage-value-missing',\n 'answer-label',\n 'answer-placeholder',\n 'answer-data-errormessage-value-missing',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst attrsToReRender = ['count', 'questions'];\nclass RawSecurityQuestionsSetup extends createBaseClass({ componentName, baseSelector: 'div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div></div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n `,\n this\n );\n }\n\n get count() {\n return Number(this.getAttribute('count')) || 0;\n }\n\n #renderQuestions() {\n const res = Array.from({ length: this.count }).map(\n (_, index) =>\n // <!--html-->\n `\n <div class=\"question-wrapper\">\n <descope-combo-box\n data-id=\"${index}\"\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n bordered=\"true\"\n required=\"true\"\n clear-button-visible=\"true\"\n ></descope-combo-box>\n\n <descope-text-field\n data-id=\"${index}\"\n required=\"true\"\n bordered=\"true\"\n minlength=\"2\"\n ></descope-text-field>\n </div>\n `\n // <!--!html-->\n );\n\n this.baseElement.innerHTML = res.join(\n '<spacer></spacer><descope-divider></descope-divider><spacer></spacer>'\n );\n\n this.comboBoxes.forEach((el) => {\n el.addEventListener('change', (e) => {\n this.updateRemainingCombosData(e.target);\n const AttachedTextField = this.getAttachedTextField(e.target);\n\n AttachedTextField.value = '';\n });\n\n el.data = this.data;\n });\n\n this.#syncAttrs(attrsToSync);\n }\n\n getAttachedTextField(combo) {\n const selector = `descope-text-field[data-id=\"${combo.getAttribute('data-id')}\"]`;\n\n return this.baseElement.querySelector(selector);\n }\n\n filterData(comboValue) {\n const res = this.data.filter(\n (item) => item.value === comboValue || !this.selectedQuestionIds.includes(item.value)\n );\n\n return res;\n }\n\n reportValidity() {\n this.inputs.reverse().forEach((el) => el.reportValidity());\n\n return this.checkValidity();\n }\n\n checkValidity() {\n return [...this.comboBoxes, ...this.textFields].every((el) => el.checkValidity());\n }\n\n updateRemainingCombosData(sourceCombo) {\n this.comboBoxes\n .filter((combo) => combo !== sourceCombo)\n .forEach((combo) => {\n combo.data = this.filterData(combo.value);\n });\n }\n\n get questions() {\n try {\n return JSON.parse(this.getAttribute('questions')) || [];\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(componentName, 'Error parsing questions attribute', e);\n return [];\n }\n }\n\n // this returns the structure expected by the combo box\n get data() {\n return this.questions.map(({ id, text }) => ({ value: id, label: text }));\n }\n\n get comboBoxes() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box'));\n }\n\n get textFields() {\n return Array.from(this.baseElement.querySelectorAll('descope-text-field'));\n }\n\n get inputs() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box, descope-text-field'));\n }\n\n get selectedQuestionIds() {\n return this.comboBoxes.map((el) => el.value);\n }\n\n get value() {\n return this.comboBoxes.map((combo) => {\n const id = combo.value;\n const answer = this.getAttachedTextField(combo).value;\n\n return { id, answer };\n });\n }\n\n set value(val = []) {\n val.forEach((item, index) => {\n const combo = this.comboBoxes[index];\n const textField = this.getAttachedTextField(combo);\n\n combo.value = item.id;\n textField.value = item.answer;\n });\n }\n\n #updateAttribute(ele, attrName, value) {\n if (value === null) ele.removeAttribute(attrName);\n else ele.setAttribute(attrName, value);\n }\n\n #syncAttrs(attrs) {\n const componentMap = {\n question: this.comboBoxes,\n answer: this.textFields,\n };\n\n attrs.forEach((attr) => {\n const [maybeComponentType, ...rest] = attr.split('-');\n const elements = componentMap[maybeComponentType] || this.inputs;\n const attrName = componentMap[maybeComponentType] ? rest.join('-') : attr;\n\n elements.forEach((el) => {\n this.#updateAttribute(el, attrName, this.getAttribute(attr));\n });\n });\n }\n\n init() {\n super.init?.();\n // render new components\n observeAttributes(\n this,\n () => {\n this.#renderQuestions();\n },\n { includeAttrs: attrsToReRender }\n );\n\n // update existing components\n observeAttributes(this, this.#syncAttrs.bind(this), {\n includeAttrs: attrsToSync,\n });\n }\n}\n\nexport const SecurityQuestionsSetupClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }, { property: 'width' }],\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => ComboBoxClass.componentName,\n property: ComboBoxClass.cssVarList.hostDirection,\n },\n {\n selector: () => TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.hostDirection,\n },\n ],\n gap: { selector: () => 'div', property: 'gap' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawSecurityQuestionsSetup);\n","import { componentName, SecurityQuestionsSetupClass } from './SecurityQuestionsSetupClass';\nimport '@descope-ui/descope-text-field';\nimport '@descope-ui/descope-combo-box';\n\ncustomElements.define(componentName, SecurityQuestionsSetupClass);\n\nexport { SecurityQuestionsSetupClass, componentName };\n"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","xE","observedAttrs","TextFieldClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","_textFieldMappings__WEBPACK_IMPORTED_MODULE_4__","A","VO","OZ","proxyProps","useProxyTargets","tQ","superclass","observedAttributes","concat","icon","init","super","EA","this","baseElement","includeAttrs","renderCopyToClipboard","shouldRender","remove","copyLiveRegion","iconInitConfig","title","style","iconCopiedConfig","setIconState","config","Object","assign","setAttribute","resetTimer","document","createElement","slot","tabIndex","cssText","appendChild","shadowRoot","copy","async","navigator","clipboard","writeText","value","textContent","clearTimeout","setTimeout","addEventListener","e","key","preventDefault","stopPropagation","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","tz","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","_descope_ui_common_theme_helpers__WEBPACK_IMPORTED_MODULE_3__","$J","cy","LJ","Kl","excludeAttrsSync","customElements","define","_TextFieldClass__WEBPACK_IMPORTED_MODULE_3__","T","w","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","__WEBPACK_DEFAULT_EXPORT__","fontSize","fontFamily","labelFontSize","property","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","componentHelpers","attrsToSync","attrsToReRender","RawSecurityQuestionsSetup","createBaseClass","q","baseSelector","constructor","attachShadow","mode","innerHTML","componentsHelpers","fz","count","Number","getAttribute","renderQuestions","res","Array","from","length","map","_","index","join","comboBoxes","forEach","el","updateRemainingCombosData","target","getAttachedTextField","data","syncAttrs","combo","querySelector","filterData","comboValue","filter","item","selectedQuestionIds","includes","reportValidity","inputs","reverse","checkValidity","textFields","every","sourceCombo","questions","JSON","parse","console","error","id","text","querySelectorAll","answer","val","textField","updateAttribute","ele","removeAttribute","attrs","componentMap","question","attr","maybeComponentType","rest","split","elements","mx","bind","SecurityQuestionsSetupClass","helpers","mixins","ComboBoxClass","C","gap"],"sourceRoot":""}
|