@descope/web-components-ui 1.0.385 → 1.0.386
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/umd/1033.js +2 -0
- package/dist/umd/{9423.js → 1053.js} +15 -15
- package/dist/umd/1414.js +352 -0
- package/dist/umd/{9314.js → 1437.js} +10 -10
- package/dist/umd/1672.js +1 -0
- package/dist/umd/{3830.js → 2566.js} +2 -2
- package/dist/umd/{7856.js → 2838.js} +2 -2
- package/dist/umd/286.js +148 -0
- package/dist/umd/{5135.js → 2919.js} +8 -8
- package/dist/umd/3222.js +282 -0
- package/dist/umd/{7056.js → 351.js} +10 -10
- package/dist/umd/3607.js +2 -0
- package/dist/umd/3711.js +123 -0
- package/dist/umd/4619.js +1 -0
- package/dist/umd/{3951.js → 4834.js} +8 -8
- package/dist/umd/{1612.js → 5026.js} +7 -7
- package/dist/umd/{7284.js → 5086.js} +8 -8
- package/dist/umd/{8191.js → 5273.js} +6 -6
- package/dist/umd/5412.js +109 -0
- package/dist/umd/{4024.js → 5443.js} +7 -7
- package/dist/umd/5459.js +1 -0
- package/dist/umd/{6594.js → 6418.js} +2 -2
- package/dist/umd/{1438.js → 6474.js} +16 -16
- package/dist/umd/650.js +1 -0
- package/dist/umd/6637.js +73 -0
- package/dist/umd/6726.js +148 -0
- package/dist/umd/{63.js → 7212.js} +9 -9
- package/dist/umd/{9562.js → 7407.js} +7 -7
- package/dist/umd/{7541.js → 7607.js} +11 -11
- package/dist/umd/{4052.js → 7824.js} +7 -7
- package/dist/umd/{4525.js → 8162.js} +3 -3
- package/dist/umd/8164.js +319 -0
- package/dist/umd/{5977.js → 8980.js} +10 -10
- package/dist/umd/{8137.js → 9167.js} +10 -10
- package/dist/umd/{5778.js → 9632.js} +10 -10
- package/dist/umd/9878.js +1 -0
- package/dist/umd/9895.js +17 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +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-internal-index-js.js +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-internal-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/descope-apps-list-index-js.js +1 -1
- package/dist/umd/descope-avatar-index-js.js +1 -1
- package/dist/umd/descope-badge-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +6 -6
- package/dist/umd/descope-code-snippet-index-js.js +1 -1
- package/dist/umd/descope-combo-box-index-js.js +7 -7
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-divider-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +4 -4
- package/dist/umd/descope-enriched-text-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -4
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +4 -4
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -4
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-icon-index-js.js +1 -1
- package/dist/umd/descope-image-index-js.js +1 -1
- package/dist/umd/descope-link-index-js.js +1 -1
- package/dist/umd/descope-list-index-js.js +1 -1
- package/dist/umd/descope-loader-linear-index-js.js +1 -1
- package/dist/umd/descope-loader-radial-index-js.js +1 -1
- package/dist/umd/descope-logo-index-js.js +1 -1
- package/dist/umd/descope-modal-index-js.js +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
- package/dist/umd/descope-notification-index-js.js +1 -1
- package/dist/umd/descope-notp-image-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-password-index-js.js +1 -1
- package/dist/umd/descope-policy-validation-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-recaptcha-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +2 -2
- package/dist/umd/descope-text-index-js.js +1 -1
- package/dist/umd/descope-totp-image-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +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-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/package.json +1 -1
- package/dist/umd/1224.js +0 -2
- package/dist/umd/2773.js +0 -148
- package/dist/umd/3227.js +0 -17
- package/dist/umd/3966.js +0 -319
- package/dist/umd/4392.js +0 -1
- package/dist/umd/4569.js +0 -1
- package/dist/umd/4978.js +0 -1
- package/dist/umd/5517.js +0 -2
- package/dist/umd/5806.js +0 -109
- package/dist/umd/5910.js +0 -1
- package/dist/umd/602.js +0 -282
- package/dist/umd/637.js +0 -1
- package/dist/umd/6770.js +0 -148
- package/dist/umd/7911.js +0 -73
- package/dist/umd/8060.js +0 -352
- package/dist/umd/8655.js +0 -123
- /package/dist/umd/{1224.js.LICENSE.txt → 1033.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9423.js.LICENSE.txt → 1053.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8060.js.LICENSE.txt → 1414.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1612.js.LICENSE.txt → 1437.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3830.js.LICENSE.txt → 2566.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7856.js.LICENSE.txt → 2838.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4024.js.LICENSE.txt → 286.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5135.js.LICENSE.txt → 2919.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3227.js.LICENSE.txt → 3222.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4052.js.LICENSE.txt → 351.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5517.js.LICENSE.txt → 3607.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8655.js.LICENSE.txt → 3711.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3951.js.LICENSE.txt → 4834.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4525.js.LICENSE.txt → 5026.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6770.js.LICENSE.txt → 5086.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7056.js.LICENSE.txt → 5273.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5806.js.LICENSE.txt → 5412.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7284.js.LICENSE.txt → 5443.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6594.js.LICENSE.txt → 6418.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1438.js.LICENSE.txt → 6474.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7911.js.LICENSE.txt → 6637.js.LICENSE.txt} +0 -0
- /package/dist/umd/{2773.js.LICENSE.txt → 6726.js.LICENSE.txt} +0 -0
- /package/dist/umd/{63.js.LICENSE.txt → 7212.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8191.js.LICENSE.txt → 7407.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7541.js.LICENSE.txt → 7607.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9314.js.LICENSE.txt → 7824.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9562.js.LICENSE.txt → 8162.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3966.js.LICENSE.txt → 8164.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5977.js.LICENSE.txt → 8980.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8137.js.LICENSE.txt → 9167.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5778.js.LICENSE.txt → 9632.js.LICENSE.txt} +0 -0
- /package/dist/umd/{602.js.LICENSE.txt → 9895.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1711,8012,2528],{10853:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA=="},7036:(t,e,n)=>{"use strict";n.d(e,{f:()=>r,z:()=>a});var i=n(94978),o=n(33346),s=n(2061);const r=(0,n(54567).iY)("badge");class l extends((0,o.s)({componentName:r,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n :host {\n display: inline-flex;\n }\n :host > div {\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n\t\t</style>\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t"}}const a=(0,s.qC)((0,i.yk)({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostDirection:{property:"direction"},fontFamily:{},fontSize:{},fontWeight:{},textTransform:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],borderWidth:{},borderStyle:{},borderColor:{},borderRadius:{},backgroundColor:{},textColor:{property:"color"},textAlign:{}}}),i.e4,i.Ae)(l)},4021:(t,e,n)=>{"use strict";n.r(e),n.d(e,{BadgeClass:()=>i.z});var i=n(7036);customElements.define(i.f,i.z)},15964:(t,e,n)=>{"use strict";n.d(e,{f:()=>a,n:()=>u});var i=n(2061),o=n(54567),s=n(94978),r=n(2549),l=n(93804);const a=(0,o.iY)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,i.qC)((0,s.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},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(${r.q.componentName})`,property:r.q.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"}]}}),l.v,s.e4,s.Ae)((0,s.DM)({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"],componentName:a})),{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`},93804:(t,e,n)=>{"use strict";n.d(e,{v:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ButtonClass:()=>i.n}),n(71721);var i=n(15964);customElements.define(i.f,i.n)},2549:(t,e,n)=>{"use strict";n.d(e,{f:()=>a,q:()=>c});var i=n(94978),o=n(33346),s=n(2061),r=n(54567),l=n(52118);const a=(0,r.iY)("icon");class d extends((0,o.s)({componentName:a,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(0,l.I)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const c=(0,s.qC)((0,i.yk)({mappings:{fill:{}}}),i.e4,i.Ae)(d)},52118:(t,e,n)=>{"use strict";n.d(e,{I:()=>r});var i=n(27856),o=n.n(i);const s=t=>{const e=o().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},r=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=s(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=s(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},32138:(t,e,n)=>{"use strict";n.d(e,{f:()=>l,k:()=>d});var i=n(94978),o=n(2061),s=n(54567),r=n(33346);const l=(0,s.iY)("text");class a extends((0,r.s)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const d=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),i.e4,i.Ae)(a)},31876:(t,e,n)=>{"use strict";n.r(e),n.d(e,{TextClass:()=>i.k});var i=n(32138);customElements.define(i.f,i.k)},29449:(t,e,n)=>{"use strict";n.r(e),n.d(e,{UserAuthMethodClass:()=>v});var i=n(94978),o=n(33346),s=n(2061),r=n(54567),l=n(10853),a=n.n(l),d=n(32138),c=n(15964),h=n(7036);const p=(0,r.iY)("user-auth-method");class u extends((0,o.s)({componentName:p,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n }\n\n .fulfilled-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n }\n\n slot[name="method-icon"]{\n display: inline-flex;\n align-items: center;\n }\n </style>\n\n\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <div class="fulfilled-indicator">\n <vaadin-icon src=${a()}></vaadin-icon>\n </div>\n <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t`,this.button=this.shadowRoot.querySelector("descope-button"),this.fulfilledIndicator=this.shadowRoot.querySelector(".fulfilled-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onButtonLabelChange(){let t=this.button.querySelector("span");this.buttonLabel?(t||(t=document.createElement("span"),this.button.appendChild(t)),t.innerText=this.buttonLabel):t&&this.button.removeChild(t)}onFulfilledChange(){this.button.classList.toggle("hidden",this.isFulfilled),this.fulfilledIndicator.classList.toggle("hidden",!this.isFulfilled)}get label(){return this.getAttribute("label")||""}get buttonLabel(){return this.getAttribute("button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}init(){this.onLabelChange(),this.onButtonLabelChange(),this.onFulfilledChange(),this.button.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))))}static get observedAttributes(){return["label","fulfilled"].concat(super.observedAttributes)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("label"===t?this.onLabelChange():"fulfilled"===t?this.onFulfilledChange():"button-label"===t&&this.onButtonLabelChange())}}const{host:b,textField:g,buttons:y,badge:f,textWrapper:m,methodIconSlot:x}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]'}},v=(0,s.qC)((0,i.yk)({mappings:{hostWidth:{...b,property:"width"},hostMinWidth:{...b,property:"min-width"},hostDirection:[{...b,property:"direction"},{...g,property:d.k.cssVarList.hostDirection},{...y,property:c.n.cssVarList.hostDirection},{...f,property:h.z.cssVarList.hostDirection}],labelTextWidth:{...g,property:"width"},itemsGap:[{property:"gap"},{...m,property:"gap"}],iconSize:[{...x,property:"width"},{...x,property:"height"}]}}),i.e4,i.Ae)(u);n(31876),n(72018),n(4021),n(57911),customElements.define(p,v)}}]);
|
1
|
+
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9990,9553,171],{92157:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA=="},97492:(t,e,n)=>{"use strict";n.d(e,{T:()=>r,e:()=>a});var i=n(94619),o=n(70263),s=n(7138);const r=(0,n(14944).xE)("badge");class l extends((0,o.q)({componentName:r,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n :host {\n display: inline-flex;\n }\n :host > div {\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n\t\t</style>\n\t\t<div>\n <slot></slot>\n\t\t</div>\n\t\t"}}const a=(0,s.Zz)((0,i.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"}],hostDirection:{property:"direction"},fontFamily:{},fontSize:{},fontWeight:{},textTransform:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],borderWidth:{},borderStyle:{},borderColor:{},borderRadius:{},backgroundColor:{},textColor:{property:"color"},textAlign:{}}}),i.VO,i.tQ)(l)},58765:(t,e,n)=>{"use strict";n.r(e),n.d(e,{BadgeClass:()=>i.e});var i=n(97492);customElements.define(i.T,i.e)},83942:(t,e,n)=>{"use strict";n.d(e,{J:()=>u,T:()=>a});var i=n(7138),o=n(14944),s=n(94619),r=n(55708),l=n(91805);const a=(0,o.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,i.Zz)((0,s.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},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(${r.S.componentName})`,property:r.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"}]}}),l.G,s.VO,s.tQ)((0,s.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"],componentName:a})),{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`},91805:(t,e,n)=>{"use strict";n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},1058:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ButtonClass:()=>i.J}),n(97745);var i=n(83942);customElements.define(i.T,i.J)},55708:(t,e,n)=>{"use strict";n.d(e,{S:()=>c,T:()=>a});var i=n(94619),o=n(70263),s=n(7138),r=n(14944),l=n(13390);const a=(0,r.xE)("icon");class d extends((0,o.q)({componentName:a,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(0,l.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const c=(0,s.Zz)((0,i.RF)({mappings:{fill:{}}}),i.VO,i.tQ)(d)},13390:(t,e,n)=>{"use strict";n.d(e,{w:()=>r});var i=n(42838),o=n.n(i);const s=t=>{const e=o().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},r=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=s(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=s(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},85108:(t,e,n)=>{"use strict";n.d(e,{T:()=>l,s:()=>d});var i=n(94619),o=n(7138),s=n(14944),r=n(70263);const l=(0,s.xE)("text");class a extends((0,r.q)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const d=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),i.VO,i.tQ)(a)},16429:(t,e,n)=>{"use strict";n.r(e),n.d(e,{TextClass:()=>i.s});var i=n(85108);customElements.define(i.T,i.s)},56780:(t,e,n)=>{"use strict";n.r(e),n.d(e,{UserAuthMethodClass:()=>v});var i=n(94619),o=n(70263),s=n(7138),r=n(14944),l=n(92157),a=n.n(l),d=n(85108),c=n(83942),h=n(97492);const p=(0,r.xE)("user-auth-method");class u extends((0,o.q)({componentName:p,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n }\n\n .fulfilled-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n overflow: hidden;\n }\n\n slot[name="method-icon"]{\n display: inline-flex;\n align-items: center;\n }\n </style>\n\n\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <div class="fulfilled-indicator">\n <vaadin-icon src=${a()}></vaadin-icon>\n </div>\n <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t`,this.button=this.shadowRoot.querySelector("descope-button"),this.fulfilledIndicator=this.shadowRoot.querySelector(".fulfilled-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onButtonLabelChange(){let t=this.button.querySelector("span");this.buttonLabel?(t||(t=document.createElement("span"),this.button.appendChild(t)),t.innerText=this.buttonLabel):t&&this.button.removeChild(t)}onFulfilledChange(){this.button.classList.toggle("hidden",this.isFulfilled),this.fulfilledIndicator.classList.toggle("hidden",!this.isFulfilled)}get label(){return this.getAttribute("label")||""}get buttonLabel(){return this.getAttribute("button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}init(){this.onLabelChange(),this.onButtonLabelChange(),this.onFulfilledChange(),this.button.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))))}static get observedAttributes(){return["label","fulfilled"].concat(super.observedAttributes)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("label"===t?this.onLabelChange():"fulfilled"===t?this.onFulfilledChange():"button-label"===t&&this.onButtonLabelChange())}}const{host:b,textField:g,buttons:y,badge:m,textWrapper:f,methodIconSlot:x}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]'}},v=(0,s.Zz)((0,i.RF)({mappings:{hostWidth:{...b,property:"width"},hostMinWidth:{...b,property:"min-width"},hostDirection:[{...b,property:"direction"},{...g,property:d.s.cssVarList.hostDirection},{...y,property:c.J.cssVarList.hostDirection},{...m,property:h.e.cssVarList.hostDirection}],labelTextWidth:{...g,property:"width"},itemsGap:[{property:"gap"},{...f,property:"gap"}],iconSize:[{...x,property:"width"},{...x,property:"height"}]}}),i.VO,i.tQ)(u);n(16429),n(1058),n(58765),n(56637),customElements.define(p,v)}}]);
|
package/dist/umd/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.DescopeUI=s():e.DescopeUI=s()}(self,(()=>(()=>{var e,s,o,d={20534:(e,s,o)=>{var d={"./boolean-fields/descope-boolean-field-internal/index.js":[86676,5910,4978,769],"./boolean-fields/descope-checkbox/index.js":[63483,5910,3966,3227,602,8137,1224,8191,4978,3726],"./boolean-fields/descope-switch-toggle/index.js":[89203,5910,3966,3227,602,8137,1224,8191,4978,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[66793,5910,4978,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[53795,5910,3966,3227,1224,7856,4024,4978,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[88901,5910,4978,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[84873,5910,3966,3227,1224,7856,4024,4978,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[94887,5910,3966,3227,1224,7856,4024,4978,2861],"./descope-apps-list/index.js":[19843,5910,3966,3227,7911,6594,8655,8060,4978,8569],"./descope-avatar/index.js":[33120,5910,3966,3227,7911,6594,8655,8060,4978,8873],"./descope-badge/index.js":[4021,5910,4978,8012],"./descope-button/index.js":[72018,5910,3966,3227,1224,7856,4978,9662],"./descope-code-snippet/index.js":[423,5910,637,4978,8807],"./descope-combo-box/index.js":[21294,5910,3966,3227,602,8137,8655,3830,5778,4978,9483],"./descope-container/index.js":[17107,5910,4978,7317],"./descope-date-field/descope-calendar/index.js":[8467,5910,3966,3227,602,8137,1224,7856,8655,3830,5778,7541,4978,9332],"./descope-date-field/index.js":[66194,5910,3966,3227,602,8137,1224,7911,6594,7856,8655,3830,5778,7541,5977,4978,9332,5709],"./descope-divider/index.js":[16162,5910,4978,4178],"./descope-email-field/index.js":[77840,5910,3966,3227,602,8137,4978,9760],"./descope-enriched-text/index.js":[20409,5910,4569,4978,5158],"./descope-grid/descope-grid-custom-column/index.js":[19278,3966,5517,5988],"./descope-grid/descope-grid-item-details-column/index.js":[79178,3966,3227,7911,6594,5517,6941],"./descope-grid/descope-grid-selection-column/index.js":[52238,5910,3966,3227,602,8137,1224,5517,8191,4978,7487],"./descope-grid/descope-grid-text-column/index.js":[42356,3966,5517,3705],"./descope-grid/index.js":[19950,5910,3966,3227,602,8137,1224,7911,6594,3830,5517,8191,637,5135,4978,9461],"./descope-icon/index.js":[72449,5910,7856,4978,4348],"./descope-image/index.js":[28278,5910,4978,6772],"./descope-link/index.js":[65846,5910,4978,58],"./descope-list/index.js":[78781,5910,4978,257],"./descope-loader-linear/index.js":[57845,5910,4978,6453],"./descope-loader-radial/index.js":[65747,5910,4978,3072],"./descope-logo/index.js":[61034,5910,4978,1984],"./descope-modal/index.js":[80958,5910,3966,8655,9314,4978,4641],"./descope-multi-select-combo-box/index.js":[99393,5910,3966,3227,602,8137,8655,3830,5778,1438,4978,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4978,1842],"./descope-new-password/index.js":[88974,5910,3966,3227,602,8137,1224,7911,6594,7056,4978,7055],"./descope-notification/descope-notification-card/index.js":[35400,5910,3966,3951,4978,7401],"./descope-notification/index.js":[91845,5910,3966,3951,4978,9655],"./descope-notp-image/index.js":[26016,5910,4978,869],"./descope-number-field/index.js":[66916,5910,3966,3227,602,8137,5806,4978,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4978,1841],"./descope-passcode/index.js":[64919,5910,3966,3227,602,8137,7911,6594,4525,4978,939],"./descope-password/index.js":[79279,5910,3966,3227,602,8137,1224,7056,4978,8106],"./descope-policy-validation/index.js":[38558,5910,4978,4570],"./descope-radio-group/index.js":[92031,5910,3966,3227,602,1224,7284,4978,9034],"./descope-recaptcha/index.js":[38164,5910,4978,964],"./descope-text-area/index.js":[71962,5910,3966,3227,602,8137,6770,4978,3322],"./descope-text-field/index.js":[19357,5910,3966,3227,602,8137,7911,6594,4978,2934],"./descope-text/index.js":[31876,5910,4978,2528],"./descope-totp-image/index.js":[91331,5910,4978,5364],"./descope-upload-file/index.js":[66667,5910,3966,3227,1224,7856,4052,4978,5874],"./descope-user-attribute/index.js":[84199,5910,3966,3227,1224,7911,7856,1612,4978,1722],"./descope-user-auth-method/index.js":[29449,5910,3966,3227,1224,7911,7856,9562,4978,1711],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[36751,5910,4978,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[33820,5910,4978,5130],"./mapping-fields/descope-mappings-field/index.js":[5894,5910,3966,3227,602,8137,1224,7911,6594,7856,8655,3830,5778,9423,4978,9299],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[74115,5910,4978,9656],"./mapping-fields/descope-saml-group-mappings/index.js":[73277,5910,3966,3227,602,8137,1224,7911,6594,7856,8655,3830,5778,9423,4978,9299,9476],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[99240,5910,3966,3227,602,8137,7911,6594,8655,3830,5778,2773,4978,4392,9288],"./phone-fields/descope-phone-field/index.js":[76581,5910,3966,3227,602,8137,7911,6594,8655,3830,5778,2773,4978,4392,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[83067,5910,3966,3227,602,8137,7911,6594,4978,4392,4981],"./phone-fields/descope-phone-input-box-field/index.js":[69423,5910,3966,3227,602,8137,7911,6594,8655,3830,5778,63,4978,4392,5119]};function n(e){if(!o.o(d,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=d[e],n=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(n)))}n.keys=()=>Object.keys(d),n.id=20534,e.exports=n},25561:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>d});const d=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#d(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#d()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#d()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,s,o)=>{const{componentsThemeManager:d}=o(25561),n=o(20534);e.exports=n.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>n(s)),e}),{}),e.exports.componentsThemeManager=d}},n={};function i(e){var s=n[e];if(void 0!==s)return s.exports;var o=n[e]={exports:{}};return d[e].call(o.exports,o,o.exports,i),o.exports}i.m=d,e=[],i.O=(s,o,d,n)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,d,n]=e[a],p=!0,c=0;c<o.length;c++)(!1&n||t>=n)&&Object.keys(i.O).every((e=>i.O[e](o[c])))?o.splice(c--,1):(p=!1,n<t&&(t=n));if(p){e.splice(a--,1);var r=d();void 0!==r&&(s=r)}}return s}n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[o,d,n]},i.F={},i.E=e=>{Object.keys(i.F).map((s=>{i.F[s](e)}))},i.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return i.d(s,{a:s}),s},i.d=(e,s)=>{for(var o in s)i.o(s,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((s,o)=>(i.f[o](e,s),s)),[])),i.u=e=>(({58:"descope-link-index-js",257:"descope-list-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",869:"descope-notp-image-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1711:"descope-user-auth-method-index-js",1722:"descope-user-attribute-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2313:"button-selection-group-fields-descope-button-selection-group-internal-index-js",2528:"descope-text-index-js",2861:"button-selection-group-fields-descope-button-selection-group-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3172:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",3322:"descope-text-area-index-js",3705:"descope-grid-descope-grid-text-column-index-js",3726:"boolean-fields-descope-checkbox-index-js",3840:"descope-multi-select-combo-box-index-js",4178:"descope-divider-index-js",4348:"descope-icon-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4570:"descope-policy-validation-index-js",4641:"descope-modal-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5130:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",5158:"descope-enriched-text-index-js",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-index-js",5709:"descope-date-field-index-js",5874:"descope-upload-file-index-js",5988:"descope-grid-descope-grid-custom-column-index-js",6453:"descope-loader-linear-index-js",6656:"button-selection-group-fields-descope-button-selection-group-item-index-js",6772:"descope-image-index-js",6941:"descope-grid-descope-grid-item-details-column-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",7401:"descope-notification-descope-notification-card-index-js",7487:"descope-grid-descope-grid-selection-column-index-js",8012:"descope-badge-index-js",8106:"descope-password-index-js",8569:"descope-apps-list-index-js",8807:"descope-code-snippet-index-js",8873:"descope-avatar-index-js",9034:"descope-radio-group-index-js",9122:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9299:"mapping-fields-descope-mappings-field-index-js",9332:"descope-date-field-descope-calendar-index-js",9461:"descope-grid-index-js",9476:"mapping-fields-descope-saml-group-mappings-index-js",9483:"descope-combo-box-index-js",9655:"descope-notification-index-js",9656:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="@descope/web-components-ui:",i.l=(e,d,n,t)=>{if(s[e])s[e].push(d);else{var p,c;if(void 0!==n)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,i.nc&&p.setAttribute("nonce",i.nc),p.setAttribute("data-webpack",o+n),p.src=e),s[e]=[d];var u=(o,d)=>{p.onerror=p.onload=null,clearTimeout(x);var n=s[e];if(delete s[e],p.parentNode&&p.parentNode.removeChild(p),n&&n.forEach((e=>e(d))),o)return o(d)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var s=i.g.document;if(!e&&s&&(s.currentScript&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");if(o.length)for(var d=o.length-1;d>-1&&!e;)e=o[d--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5524:0};i.f.j=(s,o)=>{var d=i.o(e,s)?e[s]:void 0;if(0!==d)if(d)o.push(d[2]);else{var n=new Promise(((o,n)=>d=e[s]=[o,n]));o.push(d[2]=n);var t=i.p+i.u(s),p=new Error;i.l(t,(o=>{if(i.o(e,s)&&(0!==(d=e[s])&&(e[s]=void 0),d)){var n=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;p.message="Loading chunk "+s+" failed.\n("+n+": "+t+")",p.name="ChunkLoadError",p.type=n,p.request=t,d[1](p)}}),"chunk-"+s,s)}},i.F.j=s=>{if(!i.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");i.nc&&o.setAttribute("nonce",i.nc),o.rel="prefetch",o.as="script",o.href=i.p+i.u(s),document.head.appendChild(o)}},i.O.j=s=>0===e[s];var s=(s,o)=>{var d,n,[t,p,c]=o,r=0;if(t.some((s=>0!==e[s]))){for(d in p)i.o(p,d)&&(i.m[d]=p[d]);if(c)var a=c(i)}for(s&&s(o);r<t.length;r++)n=t[r],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(a)},o=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),i.O(0,[5524],(()=>{[5910,4978,769,3966,3227,602,8137,1224,8191,3726,4483,9122,7856,4024,5263,2313,6656,2861,7911,6594,8655,8060,8569,8873,8012,9662,637,8807,3830,5778,9483,7317,7541,9332,5977,5709,4178,9760,4569,5158,5517,5988,6941,7487,3705,5135,9461,4348,6772,58,257,6453,3072,1984,9314,4641,1438,3840,1842,7056,7055,3951,7401,9655,869,5806,2142,1841,4525,939,8106,4570,7284,9034,964,6770,3322,2934,2528,5364,4052,5874,1612,1722,9562,1711,3172,5130,9423,9299,9656,9476,2773,4392,9288,9806,4981,63,5119].map(i.E)}),5);var t=i(7507);return i.O(t)})()));
|
1
|
+
!function(e,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.DescopeUI=s():e.DescopeUI=s()}(self,(()=>(()=>{var e,s,o,d={97301:(e,s,o)=>{var d={"./boolean-fields/descope-boolean-field-internal/index.js":[53716,650,4619,7362],"./boolean-fields/descope-checkbox/index.js":[10796,650,8164,9895,3222,9167,1033,5273,4619,4838],"./boolean-fields/descope-switch-toggle/index.js":[19792,650,8164,9895,3222,9167,1033,5273,4619,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[39173,650,4619,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[82329,650,8164,9895,1033,2838,7824,4619,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[19509,650,4619,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[42426,650,8164,9895,1033,2838,7824,4619,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[7815,650,8164,9895,1033,2838,7824,4619,2141],"./descope-apps-list/index.js":[78706,650,8164,9895,6637,6418,3711,1414,4619,3057],"./descope-avatar/index.js":[23008,650,8164,9895,6637,6418,3711,1414,4619,2645],"./descope-badge/index.js":[58765,650,4619,9553],"./descope-button/index.js":[1058,650,8164,9895,1033,2838,4619,9984],"./descope-code-snippet/index.js":[52475,650,9878,4619,3521],"./descope-combo-box/index.js":[4480,650,8164,9895,3222,9167,3711,2566,9632,4619,7052],"./descope-container/index.js":[43713,650,4619,8689],"./descope-date-field/descope-calendar/index.js":[18562,650,8164,9895,3222,9167,1033,2838,3711,2566,9632,7607,4619,6028],"./descope-date-field/index.js":[66509,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,7607,8980,4619,6028,9257],"./descope-divider/index.js":[53665,650,4619,8819],"./descope-email-field/index.js":[91046,650,8164,9895,3222,9167,4619,5695],"./descope-enriched-text/index.js":[39e3,650,1672,4619,5710],"./descope-grid/descope-grid-custom-column/index.js":[96969,8164,3607,9176],"./descope-grid/descope-grid-item-details-column/index.js":[85198,8164,9895,6637,6418,3607,2381],"./descope-grid/descope-grid-selection-column/index.js":[79120,650,8164,9895,3222,9167,1033,3607,5273,4619,3305],"./descope-grid/descope-grid-text-column/index.js":[36486,8164,3607,8108],"./descope-grid/index.js":[30954,650,8164,9895,3222,9167,1033,6637,6418,2566,3607,5273,9878,2919,4619,2200],"./descope-icon/index.js":[21471,650,2838,4619,7401],"./descope-image/index.js":[90313,650,4619,9175],"./descope-link/index.js":[31678,650,4619,7792],"./descope-list/index.js":[36911,650,4619,7640],"./descope-loader-linear/index.js":[22339,650,4619,8009],"./descope-loader-radial/index.js":[86715,650,4619,7163],"./descope-logo/index.js":[13959,650,4619,1239],"./descope-modal/index.js":[826,650,8164,3711,1437,4619,4139],"./descope-multi-select-combo-box/index.js":[10664,650,8164,9895,3222,9167,3711,2566,9632,6474,4619,1331],"./descope-new-password/descope-new-password-internal/index.js":[32039,650,4619,8603],"./descope-new-password/index.js":[26586,650,8164,9895,3222,9167,1033,6637,6418,351,4619,4364],"./descope-notification/descope-notification-card/index.js":[39749,650,8164,4834,4619,7326],"./descope-notification/index.js":[35592,650,8164,4834,4619,8019],"./descope-notp-image/index.js":[22529,650,4619,2251],"./descope-number-field/index.js":[37041,650,8164,9895,3222,9167,5412,4619,7944],"./descope-passcode/descope-passcode-internal/index.js":[81443,650,4619,3359],"./descope-passcode/index.js":[40868,650,8164,9895,3222,9167,6637,6418,8162,4619,8884],"./descope-password/index.js":[1279,650,8164,9895,3222,9167,1033,351,4619,6969],"./descope-policy-validation/index.js":[28184,650,4619,2996],"./descope-radio-group/index.js":[94702,650,8164,9895,3222,1033,5086,4619,9399],"./descope-recaptcha/index.js":[19552,650,4619,3847],"./descope-text-area/index.js":[641,650,8164,9895,3222,9167,286,4619,5686],"./descope-text-field/index.js":[89348,650,8164,9895,3222,9167,6637,6418,4619,5166],"./descope-text/index.js":[16429,650,4619,171],"./descope-totp-image/index.js":[89011,650,4619,6213],"./descope-upload-file/index.js":[82147,650,8164,9895,1033,2838,5443,4619,9636],"./descope-user-attribute/index.js":[91132,650,8164,9895,1033,6637,2838,5026,4619,1578],"./descope-user-auth-method/index.js":[56780,650,8164,9895,1033,6637,2838,7407,4619,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[91491,650,4619,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[88858,650,4619,9522],"./mapping-fields/descope-mappings-field/index.js":[64551,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,1053,4619,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[71828,650,4619,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[28511,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,1053,4619,7095,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[54930,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,6726,4619,5459,2878],"./phone-fields/descope-phone-field/index.js":[18638,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,6726,4619,5459,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[46633,650,8164,9895,3222,9167,6637,6418,4619,5459,8657],"./phone-fields/descope-phone-input-box-field/index.js":[65636,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,7212,4619,5459,4043]};function n(e){if(!o.o(d,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=d[e],n=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(n)))}n.keys=()=>Object.keys(d),n.id=97301,e.exports=n},6461:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>d});const d=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#d(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#d()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#d()}get hasThemes(){return!!Object.keys(this.#e).length}}},41216:(e,s,o)=>{const{componentsThemeManager:d}=o(6461),n=o(97301);e.exports=n.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>n(s)),e}),{}),e.exports.componentsThemeManager=d}},n={};function i(e){var s=n[e];if(void 0!==s)return s.exports;var o=n[e]={exports:{}};return d[e].call(o.exports,o,o.exports,i),o.exports}i.m=d,e=[],i.O=(s,o,d,n)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,d,n]=e[a],p=!0,c=0;c<o.length;c++)(!1&n||t>=n)&&Object.keys(i.O).every((e=>i.O[e](o[c])))?o.splice(c--,1):(p=!1,n<t&&(t=n));if(p){e.splice(a--,1);var r=d();void 0!==r&&(s=r)}}return s}n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[o,d,n]},i.F={},i.E=e=>{Object.keys(i.F).map((s=>{i.F[s](e)}))},i.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return i.d(s,{a:s}),s},i.d=(e,s)=>{for(var o in s)i.o(s,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((s,o)=>(i.f[o](e,s),s)),[])),i.u=e=>(({171:"descope-text-index-js",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1578:"descope-user-attribute-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2251:"descope-notp-image-index-js",2381:"descope-grid-descope-grid-item-details-column-index-js",2645:"descope-avatar-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5695:"descope-email-field-index-js",5710:"descope-enriched-text-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7052:"descope-combo-box-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7401:"descope-icon-index-js",7640:"descope-list-index-js",7792:"descope-link-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8819:"descope-divider-index-js",8884:"descope-passcode-index-js",9175:"descope-image-index-js",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9399:"descope-radio-group-index-js",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9984:"descope-button-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="@descope/web-components-ui:",i.l=(e,d,n,t)=>{if(s[e])s[e].push(d);else{var p,c;if(void 0!==n)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,i.nc&&p.setAttribute("nonce",i.nc),p.setAttribute("data-webpack",o+n),p.src=e),s[e]=[d];var u=(o,d)=>{p.onerror=p.onload=null,clearTimeout(x);var n=s[e];if(delete s[e],p.parentNode&&p.parentNode.removeChild(p),n&&n.forEach((e=>e(d))),o)return o(d)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var s=i.g.document;if(!e&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");if(o.length)for(var d=o.length-1;d>-1&&(!e||!/^http(s?):/.test(e));)e=o[d--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5536:0};i.f.j=(s,o)=>{var d=i.o(e,s)?e[s]:void 0;if(0!==d)if(d)o.push(d[2]);else{var n=new Promise(((o,n)=>d=e[s]=[o,n]));o.push(d[2]=n);var t=i.p+i.u(s),p=new Error;i.l(t,(o=>{if(i.o(e,s)&&(0!==(d=e[s])&&(e[s]=void 0),d)){var n=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;p.message="Loading chunk "+s+" failed.\n("+n+": "+t+")",p.name="ChunkLoadError",p.type=n,p.request=t,d[1](p)}}),"chunk-"+s,s)}},i.F.j=s=>{if(!i.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");i.nc&&o.setAttribute("nonce",i.nc),o.rel="prefetch",o.as="script",o.href=i.p+i.u(s),document.head.appendChild(o)}},i.O.j=s=>0===e[s];var s=(s,o)=>{var d,n,[t,p,c]=o,r=0;if(t.some((s=>0!==e[s]))){for(d in p)i.o(p,d)&&(i.m[d]=p[d]);if(c)var a=c(i)}for(s&&s(o);r<t.length;r++)n=t[r],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(a)},o=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),i.O(0,[5536],(()=>{[650,4619,7362,8164,9895,3222,9167,1033,5273,4838,1448,8399,2838,7824,3829,7079,1837,2141,6637,6418,3711,1414,3057,2645,9553,9984,9878,3521,2566,9632,7052,8689,7607,6028,8980,9257,8819,5695,1672,5710,3607,9176,2381,3305,8108,2919,2200,7401,9175,7792,7640,8009,7163,1239,1437,4139,6474,1331,8603,351,4364,4834,7326,8019,2251,5412,7944,3359,8162,8884,6969,2996,5086,9399,3847,286,5686,5166,171,6213,5443,9636,5026,1578,7407,9990,2230,9522,1053,7095,9708,6832,6726,5459,2878,9894,8657,7212,4043].map(i.E)}),5);var t=i(41216);return i.O(t)})()));
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2230],{25827:(t,e,i)=>{i.d(e,{y:()=>r});var a=i(7138),s=i(94619),n=i(70263);const r=(...t)=>(0,a.Zz)(s.XX,s._$,s.yF,s.jd)((0,n.q)(...t))},91491:(t,e,i)=>{var a=i(25827),s=i(14944);const n=(0,s.xE)("mapping-item"),r=["size","bordered","readonly","full-width","disabled"],u=(0,a.y)({componentName:n,baseSelector:"div"});customElements.define(n,class extends u{static get observedAttributes(){return[].concat(u.observedAttributes||[],r,["separator","options","invalid","disabled"])}get separator(){return this.getAttribute("separator")||"map to"}get value(){const t=this.attributeInput.value,e=this.valueInput.value;return t&&e?{[t]:e}:null}set value(t){if(1!==Object.entries(t).length)return void console.error("descope-mapping item expected expects only one key-value pair in the value but received: ",t);const[e,i]=Object.entries(t)[0];this.valueInput.value=i,this.attributeInput.value=e,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n </style>\n <div class="wrapper" part="wrapper">\n <descope-text-field required="true"></descope-text-field>\n <div class="separator" part="separator">${this.separator}</div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n required="true"\n >\n </descope-combo-box>\n <descope-button variant="link" mode="primary">\n <vaadin-icon icon="vaadin:minus"></vaadin-icon>\n </descope-button>\n </div>\n\t`,this.valueInput=this.shadowRoot.querySelector("descope-text-field"),this.attributeInput=this.shadowRoot.querySelector("descope-combo-box"),this.inputs=[this.valueInput,this.attributeInput],this.removeButton=this.shadowRoot.querySelector("descope-button"),(0,s.EA)(this,this.valueInput,{includeAttrs:r}),(0,s.EA)(this,this.attributeInput,{includeAttrs:[...r,"options"],mapAttrs:{options:"data"}}),(0,s.EA)(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("mapping-item-removed",{bubbles:!0,composed:!0}))))}init(){super.init?.(),this.initRemoveButton()}getValidity(){const t=this.attributeInput.value,e=this.valueInput.value;return t&&e?{}:{badInput:!0}}reportValidity(){this.inputs.forEach((t=>t.reportValidity()))}focus(){(this.checkValidity()||!this.valueInput.checkValidity()?this.valueInput:this.attributeInput).focus()}handleSeparatorChange(){this.shadowRoot.querySelector(".separator").textContent=this.separator}#t(t){"true"===t&&(this.valueInput.value||(this.valueInput.setAttribute("invalid","true"),this.valueInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)),this.attributeInput.value||(this.attributeInput.setAttribute("invalid","true"),this.attributeInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)))}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),"separator"===t&&this.handleSeparatorChange(),"invalid"===t&&this.#t(i)}})}}]);
|
package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9522],{25827:(t,e,i)=>{i.d(e,{y:()=>a});var n=i(7138),s=i(94619),r=i(70263);const a=(...t)=>(0,n.Zz)(s.XX,s._$,s.yF,s.jd)((0,r.q)(...t))},40154:(t,e,i)=>{i.d(e,{A:()=>l,T:()=>r});var n=i(25827),s=i(14944);const r=(0,s.xE)("mappings-field-internal"),a=(0,n.y)({componentName:r,baseSelector:"div"}),l=class extends a{#t;static get observedAttributes(){return[].concat(a.observedAttributes||[],["label-value","label-attr","button-label","invalid","readonly","disabled"])}isValidDataType(t){try{return t.every((t=>"object"==typeof t&&!Array.isArray(t)&&1===Object.getOwnPropertyNames(t).length&&"string"==typeof t[Object.keys(t)[0]]&&""!==t[Object.keys(t)[0]].trim()))}catch(t){return!1}}get labelValue(){return this.getAttribute("label-value")||"Value"}get labelAttr(){return this.getAttribute("label-attr")||"Attribute"}get buttonLabel(){return this.getAttribute("button-label")||"Add mapping"}get options(){return this.getAttribute("options")||[]}addNewMappingItem(t){const e=document.createElement("descope-mapping-item");return e.setAttribute("bordered","true"),this.mappingsContainerEle.appendChild(e),(0,s.EA)(this,e,{includeAttrs:["size","full-width","separator","options","disabled"]}),setTimeout((()=>{this.setCustomValidity(""),e.addEventListener("mapping-item-removed",(()=>{e===this.#t&&(this.resetInvalidIndication(),this.#t=void 0),e.remove(),this.setCustomValidity("")})),this.dispatchEvent(new CustomEvent("mapping-item-added",{bubbles:!0,composed:!0})),t&&e.focus()}),0),e}get items(){return Array.from(this.mappingsContainerEle.querySelectorAll("descope-mapping-item"))}get value(){return this.items.reduce(((t,e)=>e.value?[...t,e.value]:t),[])}set value(t){if(!this.isValidDataType(t))return void console.error("received invalid value to set - should be an array of objects with one key-value pair");const e=this.items;if(e.length>t.length)for(let i=t.length;i<e.length;i++)this.mappingsContainerEle.removeChild(e[i]);t.forEach(((t,i)=>{const n=e[i];if(n)n.value=t;else{const e=this.addNewMappingItem(!1);setTimeout((()=>{e.value=t}),0)}}))}constructor(){super(),this.innerHTML='\n <div class="labels-container" part="labels"></div>\n <div class="mappings-container"></div>\n <div class="button-container"></div>\n ',this.labelsEle=this.querySelector(".labels-container"),this.mappingsContainerEle=this.querySelector(".mappings-container"),this.buttonContainer=this.querySelector(".button-container")}initLabels(){this.labelsEle.innerHTML=`\n <descope-text variant="body2" part="value-label">${this.labelValue}</descope-text>\n <descope-text variant="body2" part="attr-label">${this.labelAttr}</descope-text>\n `}initAddButton(){this.buttonContainer.innerHTML=`\n <descope-button variant="link" mode="primary" disabled="${this.isDisabled}">\n <vaadin-icon icon="vaadin:plus"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;const t=this.querySelector("descope-button");t.onclick=()=>{this.addNewMappingItem(!0)},(0,s.EA)(this,t,{includeAttrs:["disabled"]})}#e(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",(t=>{t.isTrusted&&(this.#t||this.items[0]||this.querySelector("descope-button")).focus()})),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",(()=>{this.mappingsContainerEle.contains(this.#t)&&this.#t?.checkValidity()&&(this.resetInvalidIndication(),this.#t.removeAttribute("invalid"),this.#t=void 0)})),(0,s.Ge)(this.mappingsContainerEle,this.#e.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const t=this.items.find((t=>!t.checkValidity()));return t?t.validity:{}}#i(t){t&&(this.#t=this.items.find((t=>!t.checkValidity())),this.#t?.reportValidity(),this.#t?.setAttribute("invalid","true"))}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),"label-value"!==t&&"label-attr"!==t||this.initLabels(),"button-label"===t&&this.initAddButton(),"invalid"===t&&this.#i("true"===i),"readonly"===t&&this.toggleAttribute("inert","true"===i)}}},88858:(t,e,i)=>{i.r(e);var n=i(40154);customElements.define(n.T,n.A)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9299,2528,3172,5130],{73878:(t,e,r)=>{r.d(e,{P:()=>a});var n=r(2061),i=r(94978),o=r(33346);const a=(...t)=>(0,n.qC)(i.wX,i.li,i.QT,i.mE)((0,o.s)(...t))},15964:(t,e,r)=>{r.d(e,{f:()=>s,n:()=>h});var n=r(2061),i=r(54567),o=r(94978),a=r(2549),l=r(93804);const s=(0,i.iY)("button"),{host:p,label:d,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const h=(0,n.qC)((0,o.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...p,property:"direction"},fontSize:{},fontFamily:{},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(${a.q.componentName})`,property:a.q.cssVarList.fill},labelTextDecoration:{...d,property:"text-decoration"},labelSpacing:{...d,property:"gap"},textAlign:{...d,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),l.v,o.e4,o.Ae)((0,o.DM)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:s})),{color:b,fontSize:m}=h.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${m}) / 2));\n\t\tleft: calc(50% - (var(${m}) / 2));\n\t\tborder-width: calc(var(${m}) / 10);\n\t\twidth: var(${m});\n\t\theight: var(${m});\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`},93804:(t,e,r)=>{r.d(e,{v:()=>n});const n=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,r)=>{r.r(e),r.d(e,{ButtonClass:()=>n.n}),r(71721);var n=r(15964);customElements.define(n.f,n.n)},84049:(t,e,r)=>{r.d(e,{H:()=>v,f:()=>l});var n=r(2061),i=r(54567),o=r(54201),a=r(94978);const l=(0,i.iY)("combo-box"),{host:s,inputField:p,inputElement:d,placeholder:c,toggle:u,clearButton:h,label:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,n.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontSize:[{},s],fontFamily:[b,c,p,y,g],labelFontSize:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...m,property:"color"}],errorMessageTextColor:{...g,property:"color"},inputHeight:{...p,property:"height"},inputBackgroundColor:{...p,property:"background-color"},inputBorderColor:{...p,property:"border-color"},inputBorderWidth:{...p,property:"border-width"},inputBorderStyle:{...p,property:"border-style"},inputBorderRadius:{...p,property:"border-radius"},labelRequiredIndicator:{...m,property:"content"},inputValueTextColor:{...p,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...u,property:"cursor"},{...h,property:"cursor"}],inputDropdownButtonColor:[{...u,property:"color"},{...h,property:"color"}],inputDropdownButtonSize:[{...u,property:"font-size"},{...h,property:"font-size"}],inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...p,property:"outline-color"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineOffset:{...p,property:"outline-offset"},inputHorizontalPadding:[{...d,property:"padding-left"},{...d,property:"padding-right"}],labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...p,property:"align-items"},valueInputHeight:{...d,property:"height"},valueInputMarginBottom:{...d,property:"margin-bottom"},overlayBackground:{property:()=>v.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>v.cssVarList.overlay.textColor},overlayBorder:{property:()=>v.cssVarList.overlay.border},overlayFontSize:{property:()=>v.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>v.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>v.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>v.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>v.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>v.cssVarList.overlay.itemPaddingInlineEnd}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.dj)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),a.Ae,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:r})=>`<span data-name="${r}" data-id="${e}">${t||r}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(r){if(!e.baseElement.items?.length)return;const n=e.customValueTransformFn(r)||"";n!==this.value&&t.set.call(this,n)}}})}#r(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,r)=>{t.innerHTML=r.item.outerHTML}}#n(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#n(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,this.#r.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),e!==r&&"label-type"===t&&("floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,o.bi)(v.cssVarList)}\n\t\t${(0,o.PH)("vaadin-combo-box")}\n\t\t${(0,o.jI)("vaadin-combo-box")}\n\t\t${(0,o.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,o.Wf)("vaadin-combo-box")}\n ${(0,o.bz)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},21294:(t,e,r)=>{r.r(e),r.d(e,{ComboBoxClass:()=>n.H}),r(47583);var n=r(84049);customElements.define(n.f,n.H)},2549:(t,e,r)=>{r.d(e,{f:()=>s,q:()=>d});var n=r(94978),i=r(33346),o=r(2061),a=r(54567),l=r(52118);const s=(0,a.iY)("icon");class p extends((0,i.s)({componentName:s,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#i;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${d.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),e!==r&&"src"===t&&(0,l.I)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const d=(0,o.qC)((0,n.yk)({mappings:{fill:{}}}),n.e4,n.Ae)(p)},52118:(t,e,r)=>{r.d(e,{I:()=>a});var n=r(27856),i=r.n(n);const o=t=>{const e=i().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},a=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const r=atob(t.slice(26));e=o(r)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const r=await fetch(t),n=await r.text();e=o(n)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},56417:(t,e,r)=>{r.d(e,{f:()=>s,z:()=>d});var n=r(94978),i=r(4447),o=r(2061),a=r(54567),l=r(54201);const s=(0,a.iY)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.qC)((0,n.yk)({mappings:i.Z}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.Ae,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={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",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,r){super.attributeChangeCallback?.(t,e,r),"type"===t&&this.baseElement._setType(r),e!==r&&("label-type"===t?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===r))}}))((0,n.DM)({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(${d.cssVarList.inputOutlineWidth}) + var(${d.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,l.Wf)("vaadin-text-field")}\n\t\t\t${(0,l.bi)(d.cssVarList)}\n\t\t\t${(0,l.wm)("vaadin-text-field",d.cssVarList)}\n ${(0,l.bz)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:s}))},19357:(t,e,r)=>{r.r(e),r.d(e,{TextFieldClass:()=>n.z}),r(79789),r(56594),r(57911);var n=r(56417);customElements.define(n.f,n.z)},4447:(t,e,r)=>{r.d(e,{Z:()=>f});const{host:n,label:i,placeholder:o,requiredIndicator:a,inputField:l,input:s,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:m,externalInputDisabled:y,externalPlaceholder:g,externalDisabledPlaceholder:v}={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:[{},n],fontFamily:[i,l,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...y,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...s,property:"caret-color"},{...m,property:"caret-color"}],labelRequiredIndicator:{...a,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:[{...s,property:"padding-left"},{...s,property:"padding-right"},{...m,property:"padding-left"},{...m,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:[{...s,property:"text-align"},{...m,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...g,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...v,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"},{...g,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...m,property:"align-items"}],valueInputHeight:[{...s,property:"height"},{...m,property:"height"}],valueInputMarginBottom:[{...s,property:"margin-bottom"},{...m,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},32138:(t,e,r)=>{r.d(e,{f:()=>l,k:()=>p});var n=r(94978),i=r(2061),o=r(54567),a=r(33346);const l=(0,o.iY)("text");class s extends((0,a.s)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,o.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const p=(0,i.qC)((0,n.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.e4,n.Ae)(s)},31876:(t,e,r)=>{r.r(e),r.d(e,{TextClass:()=>n.k});var n=r(32138);customElements.define(n.f,n.k)},36751:(t,e,r)=>{r.r(e);var n=r(73878),i=r(54567);const o=(0,i.iY)("mapping-item"),a=["size","bordered","readonly","full-width","disabled"],l=(0,n.P)({componentName:o,baseSelector:"div"});customElements.define(o,class extends l{static get observedAttributes(){return[].concat(l.observedAttributes||[],a,["separator","options","invalid","disabled"])}get separator(){return this.getAttribute("separator")||"map to"}get value(){const t=this.attributeInput.value,e=this.valueInput.value;return t&&e?{[t]:e}:null}set value(t){if(1!==Object.entries(t).length)return void console.error("descope-mapping item expected expects only one key-value pair in the value but received: ",t);const[e,r]=Object.entries(t)[0];this.valueInput.value=r,this.attributeInput.value=e,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n </style>\n <div class="wrapper" part="wrapper">\n <descope-text-field required="true"></descope-text-field>\n <div class="separator" part="separator">${this.separator}</div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n required="true"\n >\n </descope-combo-box>\n <descope-button variant="link" mode="primary">\n <vaadin-icon icon="vaadin:minus"></vaadin-icon>\n </descope-button>\n </div>\n\t`,this.valueInput=this.shadowRoot.querySelector("descope-text-field"),this.attributeInput=this.shadowRoot.querySelector("descope-combo-box"),this.inputs=[this.valueInput,this.attributeInput],this.removeButton=this.shadowRoot.querySelector("descope-button"),(0,i.oP)(this,this.valueInput,{includeAttrs:a}),(0,i.oP)(this,this.attributeInput,{includeAttrs:[...a,"options"],mapAttrs:{options:"data"}}),(0,i.oP)(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("mapping-item-removed",{bubbles:!0,composed:!0}))))}init(){super.init?.(),this.initRemoveButton()}getValidity(){const t=this.attributeInput.value,e=this.valueInput.value;return t&&e?{}:{badInput:!0}}reportValidity(){this.inputs.forEach((t=>t.reportValidity()))}focus(){(this.checkValidity()||!this.valueInput.checkValidity()?this.valueInput:this.attributeInput).focus()}handleSeparatorChange(){this.shadowRoot.querySelector(".separator").textContent=this.separator}#o(t){"true"===t&&(this.valueInput.value||(this.valueInput.setAttribute("invalid","true"),this.valueInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)),this.attributeInput.value||(this.attributeInput.setAttribute("invalid","true"),this.attributeInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),"separator"===t&&this.handleSeparatorChange(),"invalid"===t&&this.#o(r)}})},97819:(t,e,r)=>{r.d(e,{Z:()=>l,f:()=>o});var n=r(73878),i=r(54567);const o=(0,i.iY)("mappings-field-internal"),a=(0,n.P)({componentName:o,baseSelector:"div"}),l=class extends a{#a;static get observedAttributes(){return[].concat(a.observedAttributes||[],["label-value","label-attr","button-label","invalid","readonly","disabled"])}isValidDataType(t){try{return t.every((t=>"object"==typeof t&&!Array.isArray(t)&&1===Object.getOwnPropertyNames(t).length&&"string"==typeof t[Object.keys(t)[0]]&&""!==t[Object.keys(t)[0]].trim()))}catch(t){return!1}}get labelValue(){return this.getAttribute("label-value")||"Value"}get labelAttr(){return this.getAttribute("label-attr")||"Attribute"}get buttonLabel(){return this.getAttribute("button-label")||"Add mapping"}get options(){return this.getAttribute("options")||[]}addNewMappingItem(t){const e=document.createElement("descope-mapping-item");return e.setAttribute("bordered","true"),this.mappingsContainerEle.appendChild(e),(0,i.oP)(this,e,{includeAttrs:["size","full-width","separator","options","disabled"]}),setTimeout((()=>{this.setCustomValidity(""),e.addEventListener("mapping-item-removed",(()=>{e===this.#a&&(this.resetInvalidIndication(),this.#a=void 0),e.remove(),this.setCustomValidity("")})),this.dispatchEvent(new CustomEvent("mapping-item-added",{bubbles:!0,composed:!0})),t&&e.focus()}),0),e}get items(){return Array.from(this.mappingsContainerEle.querySelectorAll("descope-mapping-item"))}get value(){return this.items.reduce(((t,e)=>e.value?[...t,e.value]:t),[])}set value(t){if(!this.isValidDataType(t))return void console.error("received invalid value to set - should be an array of objects with one key-value pair");const e=this.items;if(e.length>t.length)for(let r=t.length;r<e.length;r++)this.mappingsContainerEle.removeChild(e[r]);t.forEach(((t,r)=>{const n=e[r];if(n)n.value=t;else{const e=this.addNewMappingItem(!1);setTimeout((()=>{e.value=t}),0)}}))}constructor(){super(),this.innerHTML='\n <div class="labels-container" part="labels"></div>\n <div class="mappings-container"></div>\n <div class="button-container"></div>\n ',this.labelsEle=this.querySelector(".labels-container"),this.mappingsContainerEle=this.querySelector(".mappings-container"),this.buttonContainer=this.querySelector(".button-container")}initLabels(){this.labelsEle.innerHTML=`\n <descope-text variant="body2" part="value-label">${this.labelValue}</descope-text>\n <descope-text variant="body2" part="attr-label">${this.labelAttr}</descope-text>\n `}initAddButton(){this.buttonContainer.innerHTML=`\n <descope-button variant="link" mode="primary" disabled="${this.isDisabled}">\n <vaadin-icon icon="vaadin:plus"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;const t=this.querySelector("descope-button");t.onclick=()=>{this.addNewMappingItem(!0)},(0,i.oP)(this,t,{includeAttrs:["disabled"]})}#l(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",(t=>{t.isTrusted&&(this.#a||this.items[0]||this.querySelector("descope-button")).focus()})),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",(()=>{this.mappingsContainerEle.contains(this.#a)&&this.#a?.checkValidity()&&(this.resetInvalidIndication(),this.#a.removeAttribute("invalid"),this.#a=void 0)})),(0,i.P$)(this.mappingsContainerEle,this.#l.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const t=this.items.find((t=>!t.checkValidity()));return t?t.validity:{}}#s(t){t&&(this.#a=this.items.find((t=>!t.checkValidity())),this.#a?.reportValidity(),this.#a?.setAttribute("invalid","true"))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),"label-value"!==t&&"label-attr"!==t||this.initLabels(),"button-label"===t&&this.initAddButton(),"invalid"===t&&this.#s("true"===r),"readonly"===t&&this.toggleAttribute("inert","true"===r)}}},33820:(t,e,r)=>{r.r(e);var n=r(97819);customElements.define(n.f,n.Z)},5894:(t,e,r)=>{r.r(e),r.d(e,{MappingsFieldClass:()=>f}),r(99381),r(57911),r(56594);var n=r(94978),i=r(32138),o=r(2061),a=r(54567),l=r(97819);const s=(0,a.iY)("mappings-field"),{host:p,helperText:d,errorMessage:c,mappingItem:u,labels:h,labelsText:b,valueLabel:m,attrLabel:y,separator:g,labelsContainer:v}={host:{selector:()=>":host"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},mappingItem:{selector:"descope-mapping-item::part(wrapper)"},labels:{selector:'descope-mappings-field-internal [part="labels"] descope-text'},labelsText:{selector:'descope-mappings-field-internal [part="labels"] descope-text::part(text-wrapper)'},valueLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="value-label"]'},attrLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="attr-label"]'},separator:{selector:"descope-mapping-item::part(separator)"},labelsContainer:{selector:'descope-mappings-field-internal [part="labels"]'}},f=(0,o.qC)((0,n.yk)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:[{},p,{...g,property:"margin-top"}],fontFamily:[d,c,h],separatorFontSize:{...g,property:"font-size"},labelsFontSize:{...b,property:"font-size"},labelsLineHeight:[{...b,property:"line-height"},{...h,property:"line-height"}],labelTextColor:[{...h,property:i.k.cssVarList.textColor},{...g,property:"color"}],itemMarginBottom:{...u,property:"margin-bottom"},valueLabelMinWidth:{...m,property:"min-width"},attrLabelMinWidth:{...y,property:"min-width"},labelsMarginBottom:{...v,property:"margin-bottom"},separatorWidth:{},removeButtonWidth:{}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),n.Ae,(t=>class extends t{get defaultValues(){const t=this.getAttribute("default-values");if(t)try{return JSON.parse(t)}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){const t=this.defaultValues;Object.keys(t).length>0&&(this.inputElement.value=t)}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${l.f}\n tabindex="-1"\n ></${l.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(l.f),(0,a.oP)(this,this.inputElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","default-values","invalid","readonly","disabled"]}),(0,a.tg)(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValues()}}))((0,n.DM)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part="labels"] {\n display: none;\n grid-template-columns: 1fr var(${f.cssVarList.separatorWidth}) 1fr var(${f.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"],\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n ${i.k.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${f.cssVarList.separatorWidth}) 1fr var(${f.cssVarList.removeButtonWidth});\n }\n `,excludeAttrsSync:["tabindex","label-value","label-attr","button-label","options","error-message"],componentName:s}));r(31876),r(72018),r(19357),r(21294),r(33820),r(36751),customElements.define(s,f)},54201:(t,e,r)=>{r.d(e,{B:()=>d,DY:()=>s,PH:()=>p,Pd:()=>a,TX:()=>i,Wf:()=>u,bi:()=>n,bz:()=>h,jI:()=>l,jl:()=>o,wm:()=>c});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${i(t)}\n ${a(t)}\n ${l(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7095,171,2230,9522],{25827:(t,e,r)=>{r.d(e,{y:()=>a});var n=r(7138),i=r(94619),o=r(70263);const a=(...t)=>(0,n.Zz)(i.XX,i._$,i.yF,i.jd)((0,o.q)(...t))},83942:(t,e,r)=>{r.d(e,{J:()=>h,T:()=>s});var n=r(7138),i=r(14944),o=r(94619),a=r(55708),l=r(91805);const s=(0,i.xE)("button"),{host:p,label:d,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const h=(0,n.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...p,property:"direction"},fontSize:{},fontFamily:{},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(${a.S.componentName})`,property:a.S.cssVarList.fill},labelTextDecoration:{...d,property:"text-decoration"},labelSpacing:{...d,property:"gap"},textAlign:{...d,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),l.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:s})),{color:b,fontSize:m}=h.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${m}) / 2));\n\t\tleft: calc(50% - (var(${m}) / 2));\n\t\tborder-width: calc(var(${m}) / 10);\n\t\twidth: var(${m});\n\t\theight: var(${m});\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`},91805:(t,e,r)=>{r.d(e,{G:()=>n});const n=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},1058:(t,e,r)=>{r.r(e),r.d(e,{ButtonClass:()=>n.J}),r(97745);var n=r(83942);customElements.define(n.T,n.J)},78313:(t,e,r)=>{r.d(e,{C:()=>v,T:()=>l});var n=r(7138),i=r(14944),o=r(33177),a=r(94619);const l=(0,i.xE)("combo-box"),{host:s,inputField:p,inputElement:d,placeholder:c,toggle:u,clearButton:h,label:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,n.Zz)((0,a.RF)({mappings:{hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontSize:[{},s],fontFamily:[b,c,p,y,g],labelFontSize:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...m,property:"color"}],errorMessageTextColor:{...g,property:"color"},inputHeight:{...p,property:"height"},inputBackgroundColor:{...p,property:"background-color"},inputBorderColor:{...p,property:"border-color"},inputBorderWidth:{...p,property:"border-width"},inputBorderStyle:{...p,property:"border-style"},inputBorderRadius:{...p,property:"border-radius"},labelRequiredIndicator:{...m,property:"content"},inputValueTextColor:{...p,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...u,property:"cursor"},{...h,property:"cursor"}],inputDropdownButtonColor:[{...u,property:"color"},{...h,property:"color"}],inputDropdownButtonSize:[{...u,property:"font-size"},{...h,property:"font-size"}],inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...p,property:"outline-color"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineOffset:{...p,property:"outline-offset"},inputHorizontalPadding:[{...d,property:"padding-left"},{...d,property:"padding-right"}],labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...p,property:"align-items"},valueInputHeight:{...d,property:"height"},valueInputMarginBottom:{...d,property:"margin-bottom"},overlayBackground:{property:()=>v.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>v.cssVarList.overlay.textColor},overlayBorder:{property:()=>v.cssVarList.overlay.border},overlayFontSize:{property:()=>v.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>v.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>v.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>v.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>v.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>v.cssVarList.overlay.itemPaddingInlineEnd}}}),a.VO,(0,a.mA)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.OZ)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),a.tQ,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:r})=>`<span data-name="${r}" data-id="${e}">${t||r}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(r){if(!e.baseElement.items?.length)return;const n=e.customValueTransformFn(r)||"";n!==this.value&&t.set.call(this,n)}}})}#r(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,r)=>{t.innerHTML=r.item.outerHTML}}#n(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#n(),this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.Ge)(this,this.#r.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),e!==r&&"label-type"===t&&("floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,a.tz)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,o.cy)(v.cssVarList)}\n\t\t${(0,o.fu)("vaadin-combo-box")}\n\t\t${(0,o.lS)("vaadin-combo-box")}\n\t\t${(0,o.I4)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,o.$J)("vaadin-combo-box")}\n ${(0,o.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},4480:(t,e,r)=>{r.r(e),r.d(e,{ComboBoxClass:()=>n.C}),r(31111);var n=r(78313);customElements.define(n.T,n.C)},55708:(t,e,r)=>{r.d(e,{S:()=>d,T:()=>s});var n=r(94619),i=r(70263),o=r(7138),a=r(14944),l=r(13390);const s=(0,a.xE)("icon");class p extends((0,i.q)({componentName:s,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#i;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${d.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),e!==r&&"src"===t&&(0,l.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const d=(0,o.Zz)((0,n.RF)({mappings:{fill:{}}}),n.VO,n.tQ)(p)},13390:(t,e,r)=>{r.d(e,{w:()=>a});var n=r(42838),i=r.n(n);const o=t=>{const e=i().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},a=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const r=atob(t.slice(26));e=o(r)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const r=await fetch(t),n=await r.text();e=o(n)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},69473:(t,e,r)=>{r.d(e,{T:()=>s,w:()=>d});var n=r(94619),i=r(93826),o=r(7138),a=r(14944),l=r(33177);const s=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,n.RF)({mappings:i.A}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={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",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,r){super.attributeChangeCallback?.(t,e,r),"type"===t&&this.baseElement._setType(r),e!==r&&("label-type"===t?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===r))}}))((0,n.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(${d.cssVarList.inputOutlineWidth}) + var(${d.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,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(d.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:s}))},89348:(t,e,r)=>{r.r(e),r.d(e,{TextFieldClass:()=>n.w}),r(39542),r(66418),r(56637);var n=r(69473);customElements.define(n.T,n.w)},93826:(t,e,r)=>{r.d(e,{A:()=>f});const{host:n,label:i,placeholder:o,requiredIndicator:a,inputField:l,input:s,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:m,externalInputDisabled:y,externalPlaceholder:g,externalDisabledPlaceholder:v}={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:[{},n],fontFamily:[i,l,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...y,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...s,property:"caret-color"},{...m,property:"caret-color"}],labelRequiredIndicator:{...a,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:[{...s,property:"padding-left"},{...s,property:"padding-right"},{...m,property:"padding-left"},{...m,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:[{...s,property:"text-align"},{...m,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...g,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...v,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"},{...g,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...m,property:"align-items"}],valueInputHeight:[{...s,property:"height"},{...m,property:"height"}],valueInputMarginBottom:[{...s,property:"margin-bottom"},{...m,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},85108:(t,e,r)=>{r.d(e,{T:()=>l,s:()=>p});var n=r(94619),i=r(7138),o=r(14944),a=r(70263);const l=(0,o.xE)("text");class s extends((0,a.q)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,o.Ge)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const p=(0,i.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.VO,n.tQ)(s)},16429:(t,e,r)=>{r.r(e),r.d(e,{TextClass:()=>n.s});var n=r(85108);customElements.define(n.T,n.s)},91491:(t,e,r)=>{var n=r(25827),i=r(14944);const o=(0,i.xE)("mapping-item"),a=["size","bordered","readonly","full-width","disabled"],l=(0,n.y)({componentName:o,baseSelector:"div"});customElements.define(o,class extends l{static get observedAttributes(){return[].concat(l.observedAttributes||[],a,["separator","options","invalid","disabled"])}get separator(){return this.getAttribute("separator")||"map to"}get value(){const t=this.attributeInput.value,e=this.valueInput.value;return t&&e?{[t]:e}:null}set value(t){if(1!==Object.entries(t).length)return void console.error("descope-mapping item expected expects only one key-value pair in the value but received: ",t);const[e,r]=Object.entries(t)[0];this.valueInput.value=r,this.attributeInput.value=e,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n </style>\n <div class="wrapper" part="wrapper">\n <descope-text-field required="true"></descope-text-field>\n <div class="separator" part="separator">${this.separator}</div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n required="true"\n >\n </descope-combo-box>\n <descope-button variant="link" mode="primary">\n <vaadin-icon icon="vaadin:minus"></vaadin-icon>\n </descope-button>\n </div>\n\t`,this.valueInput=this.shadowRoot.querySelector("descope-text-field"),this.attributeInput=this.shadowRoot.querySelector("descope-combo-box"),this.inputs=[this.valueInput,this.attributeInput],this.removeButton=this.shadowRoot.querySelector("descope-button"),(0,i.EA)(this,this.valueInput,{includeAttrs:a}),(0,i.EA)(this,this.attributeInput,{includeAttrs:[...a,"options"],mapAttrs:{options:"data"}}),(0,i.EA)(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("mapping-item-removed",{bubbles:!0,composed:!0}))))}init(){super.init?.(),this.initRemoveButton()}getValidity(){const t=this.attributeInput.value,e=this.valueInput.value;return t&&e?{}:{badInput:!0}}reportValidity(){this.inputs.forEach((t=>t.reportValidity()))}focus(){(this.checkValidity()||!this.valueInput.checkValidity()?this.valueInput:this.attributeInput).focus()}handleSeparatorChange(){this.shadowRoot.querySelector(".separator").textContent=this.separator}#o(t){"true"===t&&(this.valueInput.value||(this.valueInput.setAttribute("invalid","true"),this.valueInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)),this.attributeInput.value||(this.attributeInput.setAttribute("invalid","true"),this.attributeInput.setAttribute("error-message",this.defaultErrorMsgValueMissing)))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),"separator"===t&&this.handleSeparatorChange(),"invalid"===t&&this.#o(r)}})},40154:(t,e,r)=>{r.d(e,{A:()=>l,T:()=>o});var n=r(25827),i=r(14944);const o=(0,i.xE)("mappings-field-internal"),a=(0,n.y)({componentName:o,baseSelector:"div"}),l=class extends a{#a;static get observedAttributes(){return[].concat(a.observedAttributes||[],["label-value","label-attr","button-label","invalid","readonly","disabled"])}isValidDataType(t){try{return t.every((t=>"object"==typeof t&&!Array.isArray(t)&&1===Object.getOwnPropertyNames(t).length&&"string"==typeof t[Object.keys(t)[0]]&&""!==t[Object.keys(t)[0]].trim()))}catch(t){return!1}}get labelValue(){return this.getAttribute("label-value")||"Value"}get labelAttr(){return this.getAttribute("label-attr")||"Attribute"}get buttonLabel(){return this.getAttribute("button-label")||"Add mapping"}get options(){return this.getAttribute("options")||[]}addNewMappingItem(t){const e=document.createElement("descope-mapping-item");return e.setAttribute("bordered","true"),this.mappingsContainerEle.appendChild(e),(0,i.EA)(this,e,{includeAttrs:["size","full-width","separator","options","disabled"]}),setTimeout((()=>{this.setCustomValidity(""),e.addEventListener("mapping-item-removed",(()=>{e===this.#a&&(this.resetInvalidIndication(),this.#a=void 0),e.remove(),this.setCustomValidity("")})),this.dispatchEvent(new CustomEvent("mapping-item-added",{bubbles:!0,composed:!0})),t&&e.focus()}),0),e}get items(){return Array.from(this.mappingsContainerEle.querySelectorAll("descope-mapping-item"))}get value(){return this.items.reduce(((t,e)=>e.value?[...t,e.value]:t),[])}set value(t){if(!this.isValidDataType(t))return void console.error("received invalid value to set - should be an array of objects with one key-value pair");const e=this.items;if(e.length>t.length)for(let r=t.length;r<e.length;r++)this.mappingsContainerEle.removeChild(e[r]);t.forEach(((t,r)=>{const n=e[r];if(n)n.value=t;else{const e=this.addNewMappingItem(!1);setTimeout((()=>{e.value=t}),0)}}))}constructor(){super(),this.innerHTML='\n <div class="labels-container" part="labels"></div>\n <div class="mappings-container"></div>\n <div class="button-container"></div>\n ',this.labelsEle=this.querySelector(".labels-container"),this.mappingsContainerEle=this.querySelector(".mappings-container"),this.buttonContainer=this.querySelector(".button-container")}initLabels(){this.labelsEle.innerHTML=`\n <descope-text variant="body2" part="value-label">${this.labelValue}</descope-text>\n <descope-text variant="body2" part="attr-label">${this.labelAttr}</descope-text>\n `}initAddButton(){this.buttonContainer.innerHTML=`\n <descope-button variant="link" mode="primary" disabled="${this.isDisabled}">\n <vaadin-icon icon="vaadin:plus"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;const t=this.querySelector("descope-button");t.onclick=()=>{this.addNewMappingItem(!0)},(0,i.EA)(this,t,{includeAttrs:["disabled"]})}#l(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",(t=>{t.isTrusted&&(this.#a||this.items[0]||this.querySelector("descope-button")).focus()})),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",(()=>{this.mappingsContainerEle.contains(this.#a)&&this.#a?.checkValidity()&&(this.resetInvalidIndication(),this.#a.removeAttribute("invalid"),this.#a=void 0)})),(0,i.Ge)(this.mappingsContainerEle,this.#l.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const t=this.items.find((t=>!t.checkValidity()));return t?t.validity:{}}#s(t){t&&(this.#a=this.items.find((t=>!t.checkValidity())),this.#a?.reportValidity(),this.#a?.setAttribute("invalid","true"))}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),"label-value"!==t&&"label-attr"!==t||this.initLabels(),"button-label"===t&&this.initAddButton(),"invalid"===t&&this.#s("true"===r),"readonly"===t&&this.toggleAttribute("inert","true"===r)}}},88858:(t,e,r)=>{r.r(e);var n=r(40154);customElements.define(n.T,n.A)},64551:(t,e,r)=>{r.r(e),r.d(e,{MappingsFieldClass:()=>f}),r(61228),r(56637),r(66418);var n=r(94619),i=r(85108),o=r(7138),a=r(14944),l=r(40154);const s=(0,a.xE)("mappings-field"),{host:p,helperText:d,errorMessage:c,mappingItem:u,labels:h,labelsText:b,valueLabel:m,attrLabel:y,separator:g,labelsContainer:v}={host:{selector:()=>":host"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},mappingItem:{selector:"descope-mapping-item::part(wrapper)"},labels:{selector:'descope-mappings-field-internal [part="labels"] descope-text'},labelsText:{selector:'descope-mappings-field-internal [part="labels"] descope-text::part(text-wrapper)'},valueLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="value-label"]'},attrLabel:{selector:'descope-mappings-field-internal [part="labels"] [part="attr-label"]'},separator:{selector:"descope-mapping-item::part(separator)"},labelsContainer:{selector:'descope-mappings-field-internal [part="labels"]'}},f=(0,o.Zz)((0,n.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:[{},p,{...g,property:"margin-top"}],fontFamily:[d,c,h],separatorFontSize:{...g,property:"font-size"},labelsFontSize:{...b,property:"font-size"},labelsLineHeight:[{...b,property:"line-height"},{...h,property:"line-height"}],labelTextColor:[{...h,property:i.s.cssVarList.textColor},{...g,property:"color"}],itemMarginBottom:{...u,property:"margin-bottom"},valueLabelMinWidth:{...m,property:"min-width"},attrLabelMinWidth:{...y,property:"min-width"},labelsMarginBottom:{...v,property:"margin-bottom"},separatorWidth:{},removeButtonWidth:{}}}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),n.tQ,(t=>class extends t{get defaultValues(){const t=this.getAttribute("default-values");if(t)try{return JSON.parse(t)}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){const t=this.defaultValues;Object.keys(t).length>0&&(this.inputElement.value=t)}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${l.T}\n tabindex="-1"\n ></${l.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(l.T),(0,a.EA)(this,this.inputElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","default-values","invalid","readonly","disabled"]}),(0,a.Gh)(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValues()}}))((0,n.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part="labels"] {\n display: none;\n grid-template-columns: 1fr var(${f.cssVarList.separatorWidth}) 1fr var(${f.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"],\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n ${i.s.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part="labels"] [part="value-label"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part="labels"] [part="attr-label"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${f.cssVarList.separatorWidth}) 1fr var(${f.cssVarList.removeButtonWidth});\n }\n `,excludeAttrsSync:["tabindex","label-value","label-attr","button-label","options","error-message"],componentName:s}));r(16429),r(1058),r(89348),r(4480),r(88858),r(91491),customElements.define(s,f)},33177:(t,e,r)=>{r.d(e,{$J:()=>u,I4:()=>a,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>s,cy:()=>n,fu:()=>p,kG:()=>d,lS:()=>l,zm:()=>i});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${i(t)}\n ${a(t)}\n ${l(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9708],{25827:(e,t,i)=>{i.d(t,{y:()=>l});var n=i(7138),s=i(94619),a=i(70263);const l=(...e)=>(0,n.Zz)(s.XX,s._$,s.yF,s.jd)((0,a.q)(...e))},53018:(e,t,i)=>{i.d(t,{A:()=>p,T:()=>a});var n=i(25827),s=i(14944);const a=(0,s.xE)("saml-group-mappings-internal"),l=(0,n.y)({componentName:a,baseSelector:""}),p=class extends l{static get observedAttributes(){return["invalid"].concat(l.observedAttributes||[])}constructor(){super(),this.innerHTML='\n <descope-text-field variant="body2" bordered="true"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n ',this.groupInputElement=this.querySelector("descope-text-field"),this.mappingsElement=this.querySelector("descope-mappings-field")}resetInvalidIndication(){this.removeAttribute("invalid")}handleMappingsInvalidChange(e){e.includes("invalid")&&(this.mappingsElement.hasAttribute("invalid")||this.resetInvalidIndication())}initFocusHandler(){this.addEventListener("focus",(e=>{e.isTrusted&&(this.mappingsElement.checkValidity()?this.groupInputElement:this.mappingsElement).focus()}))}init(){this.initFocusHandler(),super.init?.(),(0,s.EA)(this,this.groupInputElement,{mapAttrs:{"label-group":"label"},includeAttrs:["size","label-group","readonly","disabled"]}),(0,s.EA)(this,this.mappingsElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","readonly","disabled","data-errormessage-pattern-mismatch"]}),(0,s.mx)(this.mappingsElement,this.handleMappingsInvalidChange.bind(this),{includeAttrs:["invalid"]})}get value(){return{group:this.groupInputElement.value,mappings:this.mappingsElement.value}}set value(e){e?.group&&"string"==typeof e.group&&(this.groupInputElement.value=e.group),Array.isArray(e?.mappings)&&(this.mappingsElement.value=e.mappings)}getValidity(){return this.groupInputElement.checkValidity()?this.mappingsElement.checkValidity()?{}:this.mappingsElement.validity:this.groupInputElement.validity}#e(e){if(e){if(!this.groupInputElement.checkValidity())return void this.groupInputElement.setAttribute("invalid","true");this.mappingsElement.checkValidity()||this.mappingsElement.setAttribute("invalid","true")}}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),"invalid"===e&&this.#e("true"===i)}}},71828:(e,t,i)=>{i.r(t);var n=i(53018);customElements.define(n.T,n.A)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6832],{53018:(e,t,i)=>{i.d(t,{A:()=>p,T:()=>a});var n=i(25827),s=i(14944);const a=(0,s.xE)("saml-group-mappings-internal"),l=(0,n.y)({componentName:a,baseSelector:""}),p=class extends l{static get observedAttributes(){return["invalid"].concat(l.observedAttributes||[])}constructor(){super(),this.innerHTML='\n <descope-text-field variant="body2" bordered="true"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n ',this.groupInputElement=this.querySelector("descope-text-field"),this.mappingsElement=this.querySelector("descope-mappings-field")}resetInvalidIndication(){this.removeAttribute("invalid")}handleMappingsInvalidChange(e){e.includes("invalid")&&(this.mappingsElement.hasAttribute("invalid")||this.resetInvalidIndication())}initFocusHandler(){this.addEventListener("focus",(e=>{e.isTrusted&&(this.mappingsElement.checkValidity()?this.groupInputElement:this.mappingsElement).focus()}))}init(){this.initFocusHandler(),super.init?.(),(0,s.EA)(this,this.groupInputElement,{mapAttrs:{"label-group":"label"},includeAttrs:["size","label-group","readonly","disabled"]}),(0,s.EA)(this,this.mappingsElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","readonly","disabled","data-errormessage-pattern-mismatch"]}),(0,s.mx)(this.mappingsElement,this.handleMappingsInvalidChange.bind(this),{includeAttrs:["invalid"]})}get value(){return{group:this.groupInputElement.value,mappings:this.mappingsElement.value}}set value(e){e?.group&&"string"==typeof e.group&&(this.groupInputElement.value=e.group),Array.isArray(e?.mappings)&&(this.mappingsElement.value=e.mappings)}getValidity(){return this.groupInputElement.checkValidity()?this.mappingsElement.checkValidity()?{}:this.mappingsElement.validity:this.groupInputElement.validity}#e(e){if(e){if(!this.groupInputElement.checkValidity())return void this.groupInputElement.setAttribute("invalid","true");this.mappingsElement.checkValidity()||this.mappingsElement.setAttribute("invalid","true")}}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),"invalid"===e&&this.#e("true"===i)}}},71828:(e,t,i)=>{i.r(t);var n=i(53018);customElements.define(n.T,n.A)},28511:(e,t,i)=>{i.r(t),i.d(t,{SamlGroupMappingsClass:()=>d}),i(61228);var n=i(94619),s=i(7138),a=i(14944),l=i(53018);const p=(0,a.xE)("saml-group-mappings"),{host:r,groupInput:o}={host:{selector:()=>":host"},groupInput:{selector:"descope-text-field"}},d=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{...r,property:"width"},hostDirection:{...r,property:"direction"},groupNameInputMarginBottom:{...o,property:"margin-bottom"}}}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",triggerValidationEvents:["mapping-item-added","mapping-item-removed"],proxyParentValidation:!0}),n.tQ,(e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${l.T}\n tabindex="-1"\n ></${l.T}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(l.T),(0,a.EA)(this,this.inputElement,{includeAttrs:["size","full-width","label-group","label-value","label-attr","button-label","separator","options","readonly","disabled"]}),(0,a.Gh)(this,this.inputElement,{includeAttrs:["invalid"]})}}))((0,n.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-text-field {\n width: auto;\n }\n\n descope-mappings-field {\n display: block;\n }\n ",excludeAttrsSync:["tabindex","label-group","label-value","label-attr","button-label","separator","options","error-message"],componentName:p}));i(89348),i(64551),i(71828),customElements.define(p,d)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9288],{84049:(t,e,o)=>{o.d(e,{H:()=>v,f:()=>s});var r=o(2061),n=o(54567),i=o(54201),a=o(94978);const s=(0,n.iY)("combo-box"),{host:l,inputField:u,inputElement:d,placeholder:p,toggle:c,clearButton:h,label:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:[{},l],fontFamily:[b,p,u,y,g],labelFontSize:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...m,property:"color"}],errorMessageTextColor:{...g,property:"color"},inputHeight:{...u,property:"height"},inputBackgroundColor:{...u,property:"background-color"},inputBorderColor:{...u,property:"border-color"},inputBorderWidth:{...u,property:"border-width"},inputBorderStyle:{...u,property:"border-style"},inputBorderRadius:{...u,property:"border-radius"},labelRequiredIndicator:{...m,property:"content"},inputValueTextColor:{...u,property:"color"},inputPlaceholderTextColor:{...p,property:"color"},inputDropdownButtonCursor:[{...c,property:"cursor"},{...h,property:"cursor"}],inputDropdownButtonColor:[{...c,property:"color"},{...h,property:"color"}],inputDropdownButtonSize:[{...c,property:"font-size"},{...h,property:"font-size"}],inputDropdownButtonOffset:[{...c,property:"margin-right"},{...c,property:"margin-left"}],inputOutlineColor:{...u,property:"outline-color"},inputOutlineWidth:{...u,property:"outline-width"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputHorizontalPadding:[{...d,property:"padding-left"},{...d,property:"padding-right"}],labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,property:"margin-inline-start"},placeholderOpacity:{...p,property:"opacity"},inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...d,property:"height"},valueInputMarginBottom:{...d,property:"margin-bottom"},overlayBackground:{property:()=>v.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>v.cssVarList.overlay.textColor},overlayBorder:{property:()=>v.cssVarList.overlay.border},overlayFontSize:{property:()=>v.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>v.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>v.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>v.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>v.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>v.cssVarList.overlay.itemPaddingInlineEnd}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.dj)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),a.Ae,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:o})=>`<span data-name="${o}" data-id="${e}">${t||o}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(o){if(!e.baseElement.items?.length)return;const r=e.customValueTransformFn(o)||"";r!==this.value&&t.set.call(this,r)}}})}#o(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,o)=>{t.innerHTML=o.item.outerHTML}}#r(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#r(),this.renderItems(),(0,n.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,n.P$)(this,this.#o.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&"label-type"===t&&("floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.bi)(v.cssVarList)}\n\t\t${(0,i.PH)("vaadin-combo-box")}\n\t\t${(0,i.jI)("vaadin-combo-box")}\n\t\t${(0,i.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,i.Wf)("vaadin-combo-box")}\n ${(0,i.bz)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:s,includeForwardProps:["items","renderer","selectedItem"]}))},21294:(t,e,o)=>{o.r(e),o.d(e,{ComboBoxClass:()=>r.H}),o(47583);var r=o(84049);customElements.define(r.f,r.H)},4963:(t,e,o)=>{o.d(e,{Z:()=>m,f:()=>s});var r=o(73878),n=o(54567),i=o(87262),a=o(22485);const s=(0,n.iY)("phone-field-internal"),l=["disabled","size","bordered","invalid","readonly"],u=["country-input-placeholder","default-code","restrict-countries"],d=["phone-input-placeholder","maxlength","autocomplete","name"],p=["label-type","country-input-label","label"],c={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(l,u,d,p),b=(0,r.P)({componentName:s,baseSelector:"div"}),m=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${i.Z.map((t=>(0,a.Vn)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,n.oP)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,n.oP)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,o]=(0,a.SR)(t);if(e){const t=this.getCountryByDialCode(e);t&&(this.countryCodeInput.selectedItem=t)}else this.countryCodeInput.selectedItem=void 0;this.phoneNumberInput.value=this.phoneNumberInput.value||o}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,o=!t||!e,r=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&o?{valueMissing:!0}:r?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){return this.getAttribute("restrict-countries")?.split(",")||[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?i.Z.filter((e=>t.includes(e.code))):i.Z;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,a.Vn)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{const e=/^\d$/,o=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=o})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const o=c[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(o,e):"label"===t&&this.phoneNumberInput.setAttribute(o,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,o){if(super.attributeChangedCallback(t,e,o),e!==o){if("default-code"===t&&o)this.handleDefaultCountryCode(o);else if(h.includes(t)){const e=c[t]||t;l.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,o))):u.includes(t)?this.countryCodeInput.setAttribute(e,o):d.includes(t)&&this.phoneNumberInput.setAttribute(e,o)}p.includes(t)&&this.handleLabelTypeAttrs(t,o),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},99240:(t,e,o)=>{o.r(e),o(21294),o(19357);var r=o(4963);customElements.define(r.f,r.Z)},22485:(t,e,o)=>{o.d(e,{SR:()=>i,Vn:()=>n});var r=o(58096);const n=({code:t,dialCode:e,name:o})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${o}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${o}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,i=t=>{const e=t||"";let o="",n="";const i=(0,r.S)(e);if(i)i.countryCallingCode&&(o=`+${i.countryCallingCode}`),i.nationalNumber&&(n=i.nationalNumber);else{const[t,r]=e.split("-");o=t||"",n=r||""}return[o,n]}}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878],{78313:(t,e,n)=>{n.d(e,{C:()=>v,T:()=>s});var o=n(7138),i=n(14944),r=n(33177),a=n(94619);const s=(0,i.xE)("combo-box"),{host:l,inputField:d,inputElement:p,placeholder:u,toggle:c,clearButton:h,label:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,o.Zz)((0,a.RF)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:[{},l],fontFamily:[b,u,d,y,g],labelFontSize:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...m,property:"color"}],errorMessageTextColor:{...g,property:"color"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...m,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...u,property:"color"},inputDropdownButtonCursor:[{...c,property:"cursor"},{...h,property:"cursor"}],inputDropdownButtonColor:[{...c,property:"color"},{...h,property:"color"}],inputDropdownButtonSize:[{...c,property:"font-size"},{...h,property:"font-size"}],inputDropdownButtonOffset:[{...c,property:"margin-right"},{...c,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,property:"margin-inline-start"},placeholderOpacity:{...u,property:"opacity"},inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...p,property:"height"},valueInputMarginBottom:{...p,property:"margin-bottom"},overlayBackground:{property:()=>v.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>v.cssVarList.overlay.textColor},overlayBorder:{property:()=>v.cssVarList.overlay.border},overlayFontSize:{property:()=>v.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>v.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>v.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>v.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>v.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>v.cssVarList.overlay.itemPaddingInlineEnd}}}),a.VO,(0,a.mA)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.OZ)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),a.tQ,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:n})=>`<span data-name="${n}" data-id="${e}">${t||n}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(n){if(!e.baseElement.items?.length)return;const o=e.customValueTransformFn(n)||"";o!==this.value&&t.set.call(this,o)}}})}#n(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,n)=>{t.innerHTML=n.item.outerHTML}}#o(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#o(),this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.Ge)(this,this.#n.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"label-type"===t&&("floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,a.tz)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,r.cy)(v.cssVarList)}\n\t\t${(0,r.fu)("vaadin-combo-box")}\n\t\t${(0,r.lS)("vaadin-combo-box")}\n\t\t${(0,r.I4)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,r.$J)("vaadin-combo-box")}\n ${(0,r.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:s,includeForwardProps:["items","renderer","selectedItem"]}))},4480:(t,e,n)=>{n.r(e),n.d(e,{ComboBoxClass:()=>o.C}),n(31111);var o=n(78313);customElements.define(o.T,o.C)},69473:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>p});var o=n(94619),i=n(93826),r=n(7138),a=n(14944),s=n(33177);const l=(0,a.xE)("text-field"),d=["type","label-type","copy-to-clipboard"],p=(0,r.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,(t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((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(${p.cssVarList.inputOutlineWidth}) + var(${p.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)(p.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",p.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>o.w}),n(39542),n(66418),n(56637);var o=n(69473);customElements.define(o.T,o.w)},32413:(t,e,n)=>{n.d(e,{A:()=>m,T:()=>s});var o=n(25827),i=n(14944),r=n(44066),a=n(41611);const s=(0,i.xE)("phone-field-internal"),l=["disabled","size","bordered","invalid","readonly"],d=["country-input-placeholder","default-code","restrict-countries"],p=["phone-input-placeholder","maxlength","autocomplete","name"],u=["label-type","country-input-label","label"],c={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(l,d,p,u),b=(0,o.y)({componentName:s,baseSelector:"div"}),m=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map((t=>(0,a.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,i.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,i.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,a.lq)(t);if(e){const t=this.getCountryByDialCode(e);t&&(this.countryCodeInput.selectedItem=t)}else this.countryCodeInput.selectedItem=void 0;this.phoneNumberInput.value=this.phoneNumberInput.value||n}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,o=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:o?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){return this.getAttribute("restrict-countries")?.split(",")||[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?r.A.filter((e=>t.includes(e.code))):r.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,a.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=c[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=c[t]||t;l.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):d.includes(t)?this.countryCodeInput.setAttribute(e,n):p.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}u.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},54930:(t,e,n)=>{n.r(e),n(4480),n(89348);var o=n(32413);customElements.define(o.T,o.A)},41611:(t,e,n)=>{n.d(e,{$B:()=>i,lq:()=>r});var o=n(11211);const i=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",i="";const r=(0,o.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(i=r.nationalNumber);else{const[t,o]=e.split("-");n=t||"",i=o||""}return[n,i]}}}]);
|