@descope/web-components-ui 1.0.290 → 1.0.291

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/dist/cjs/index.cjs.js +961 -820
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.esm.js +1188 -920
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/1000.js +1 -1
  7. package/dist/umd/descope-grid-index-js.js +1 -1
  8. package/dist/umd/index.js +1 -1
  9. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
  10. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
  11. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +2 -2
  12. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +1 -0
  13. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -0
  14. package/package.json +1 -1
  15. package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +14 -1
  16. package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js +1 -1
  17. package/src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js +2 -2
  18. package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +110 -0
  19. package/src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/SamlGroupMappingsInternal.js +136 -0
  20. package/src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js +3 -0
  21. package/src/components/mapping-fields/descope-saml-group-mappings/index.js +10 -0
  22. package/src/index.cjs.js +1 -0
  23. package/src/index.d.ts +1 -0
  24. package/src/index.js +1 -0
  25. package/src/mixins/proxyInputMixin.js +7 -0
  26. package/src/theme/components/index.js +2 -0
  27. package/src/theme/components/mappingsField.js +3 -1
  28. package/src/theme/components/samlGroupMappings.js +13 -0
package/dist/umd/1000.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{2561:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}};var o=s(2666),l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o._,l.Q,a)(s)}},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},1e3:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>f.A,DM:()=>m,yk:()=>h,e4:()=>u,_A:()=>A._,mE:()=>x,wX:()=>g,QT:()=>w.Q,Iw:()=>C,dj:()=>y});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);class o{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const l=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),h=({mappings:t={},componentNameOverride:e=""})=>s=>{const h=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...l(h,{...t})}}#n;#r;#a;#o;#l;#h;#u;#c;#d;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#u=a??this.baseSelector,this.#d=e,this.#c=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#m(){return a.componentsThemeManager.currentTheme?.[h]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${h}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#p.bind(this)),this.#p()}#b(){if(this.#c.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${h}`;const s=(t=h,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(h,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#v(t=[]){let e=!1;t.forEach((t=>{this.#c.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#y(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${h}`,e.innerHTML=((t,e,s)=>{const i=new o;return Object.keys(s).forEach((a=>{const o=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(a,s[a]),l=(0,r.Tk)(t,a);o.forEach((({selector:t,property:s,important:r,fallback:a})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(r?"!important":""))}))})),i.toString()})((0,n.E3)(h,this.#o),this.#u,t),this.#h.prepend(e)}}#f(t){(this.#h.classList||this.#h.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#h=await(this.#d?.(this))||this.shadowRoot,this.#f(h),this.#y(),this.#g(),this.#b(),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},u=t=>class extends t{#A=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#A=document.createElement("style"),this.#A.innerText="* { cursor: inherit!important }"}#S(t){t?this.shadowRoot.appendChild(this.#A):this.#A.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#S("true"===s)}};var c=s(2561),d=s(7878);const m=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:h=!0})=>{class u extends((0,c.s)({componentName:t,baseSelector:e})){#C=d.C.bind(this,"blur");#M=d.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:h}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#C()})),this.baseElement.addEventListener("focus",(t=>{this.#M()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return u};s(5910);const p=["required","pattern"],g=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...p]}static get formAssociated(){return!0}#w;get internals(){return this.#w}set internals(t){this.#w=t}constructor(){super(),this.#w=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#x(){const t=this.isReadOnly?{}:this.getValidity();this.#w.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#w.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#w.validity.valid}reportValidity(){return this.#w.reportValidity()}get validity(){return this.#w.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#w.setValidity({customError:!0},t,this.validationTarget):(this.#w.setValidity({}),this.#x())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#w.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),p.includes(t)&&this.#x()}init(){super.init?.(),this.addEventListener("change",this.#x),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#x),setTimeout((()=>this.#x()))}},b=["invalid","required"],E=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},v=({proxyProps:t=[],inputEvent:e="input",proxyParentValidation:s=!1})=>i=>class extends(g(i)){static get observedAttributes(){return[...i.observedAttributes||[],...b]}#T;#L=d.C.bind(this,"change");constructor(){super(),this.#T=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#T&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#T)return this.#T;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#T=E(t)||E(e),this.#T}set inputElement(t){this.#T=t}getValidity(){return this.inputElement?.validity||{}}#V(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#V(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#V()}))})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#V()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),s){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},y=t=>(0,n.qC)(v(t),h({componentNameOverride:(0,r.iY)("input-wrapper")}));var f=s(357),A=s(2666);const S=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},C=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>u=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=h({mappings:s})(u);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:l((0,n.E3)(u.componentName,"_"+c),s)}}#k;constructor(){const t=S((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await S((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#$(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,r.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#$()}}},M=t=>class extends t{#L=d.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#L(),this.prevValue=this.value)}))}};var w=s(8084);const x=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,d.C.call(this,"blur"),d.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(d.C.call(this,"focus"),d.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{2561:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}};var o=s(2666),l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o._,l.Q,a)(s)}},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},1e3:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>f.A,DM:()=>m,yk:()=>h,e4:()=>u,_A:()=>A._,mE:()=>x,wX:()=>g,QT:()=>w.Q,Iw:()=>C,dj:()=>y});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);class o{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const l=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),h=({mappings:t={},componentNameOverride:e=""})=>s=>{const h=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...l(h,{...t})}}#n;#r;#a;#o;#l;#h;#u;#c;#d;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#u=a??this.baseSelector,this.#d=e,this.#c=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#m(){return a.componentsThemeManager.currentTheme?.[h]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${h}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#p.bind(this)),this.#p()}#b(){if(this.#c.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${h}`;const s=(t=h,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(h,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#v(t=[]){let e=!1;t.forEach((t=>{this.#c.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#y(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${h}`,e.innerHTML=((t,e,s)=>{const i=new o;return Object.keys(s).forEach((a=>{const o=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(a,s[a]),l=(0,r.Tk)(t,a);o.forEach((({selector:t,property:s,important:r,fallback:a})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(r?"!important":""))}))})),i.toString()})((0,n.E3)(h,this.#o),this.#u,t),this.#h.prepend(e)}}#f(t){(this.#h.classList||this.#h.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#h=await(this.#d?.(this))||this.shadowRoot,this.#f(h),this.#y(),this.#g(),this.#b(),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},u=t=>class extends t{#A=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#A=document.createElement("style"),this.#A.innerText="* { cursor: inherit!important }"}#S(t){t?this.shadowRoot.appendChild(this.#A):this.#A.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#S("true"===s)}};var c=s(2561),d=s(7878);const m=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:h=!0})=>{class u extends((0,c.s)({componentName:t,baseSelector:e})){#C=d.C.bind(this,"blur");#M=d.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:h}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#C()})),this.baseElement.addEventListener("focus",(t=>{this.#M()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return u};s(5910);const p=["required","pattern"],g=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...p]}static get formAssociated(){return!0}#w;get internals(){return this.#w}set internals(t){this.#w=t}constructor(){super(),this.#w=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#x(){const t=this.isReadOnly?{}:this.getValidity();this.#w.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#w.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#w.validity.valid}reportValidity(){return this.#w.reportValidity()}get validity(){return this.#w.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#w.setValidity({customError:!0},t,this.validationTarget):(this.#w.setValidity({}),this.#x())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#w.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),p.includes(t)&&this.#x()}init(){super.init?.(),this.addEventListener("change",this.#x),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#x),setTimeout((()=>this.#x()))}},b=["invalid","required"],E=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},v=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:s=[],proxyParentValidation:i=!1})=>n=>class extends(g(n)){static get observedAttributes(){return[...n.observedAttributes||[],...b]}#T;#L=d.C.bind(this,"change");constructor(){super(),this.#T=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#T&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#T)return this.#T;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#T=E(t)||E(e),this.#T}set inputElement(t){this.#T=t}getValidity(){return this.inputElement?.validity||{}}#V(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#V(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},s.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#V()}))})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#V()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},y=t=>(0,n.qC)(v(t),h({componentNameOverride:(0,r.iY)("input-wrapper")}));var f=s(357),A=s(2666);const S=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},C=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>u=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=h({mappings:s})(u);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:l((0,n.E3)(u.componentName,"_"+c),s)}}#k;constructor(){const t=S((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await S((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#$(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,r.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#$()}}},M=t=>class extends t{#L=d.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#L(),this.prevValue=this.value)}))}};var w=s(8084);const x=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,d.C.call(this,"blur"),d.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(d.C.call(this,"focus"),d.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9461,769,3726,5988,7487,3705,3878,4803,7044],{3878:(e,t,r)=>{r.d(t,{P:()=>s});var n=r(2061),o=r(1e3),i=r(2561);const s=(...e)=>(0,n.qC)(o.wX,o.li,o.QT,o.mE)((0,i.s)(...e))},818:(e,t,r)=>{r.d(t,{h:()=>i});var n=r(4567),o=r(1250);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,n.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,n.Db)(this.inputElement,this,["checked"]),(0,n.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},6882:(e,t,r)=>{r.d(t,{Z:()=>n});const n=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,r(4201).DY)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n\theight: 0;\n\tmargin: 0;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},1250:(e,t,r)=>{r.d(t,{Z:()=>l,f:()=>i});var n=r(3878),o=r(4567);const i=(0,o.iY)("boolean-field-internal"),s=["disabled","label","invalid","readonly"],a=(0,n.P)({componentName:i,baseSelector:"div"}),l=class extends a{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:s}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),"readonly"===e&&this.onReadOnlyChange(null!==r)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},6676:(e,t,r)=>{r.r(t);var n=r(1250);customElements.define(n.f,n.Z)},3483:(e,t,r)=>{r.r(t),r.d(t,{CheckboxClass:()=>x});var n=r(4567),o=r(2061),i=r(1e3),s=r(818),a=r(6882),l=r(4201);const d=(0,n.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:m,requiredIndicator:b,helperText:g,errorMessage:y}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,p,m],fontFamily:[m,g,y],labelTextColor:{...m,property:"color"},labelSpacing:{...m,property:"padding-inline-start"},labelLineHeight:{...m,property:"line-height"},labelFontWeight:{...m,property:"font-weight"},labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...y,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...p,property:"background-color"},inputBorderRadius:{...p,property:"border-radius"},inputBorderWidth:{...p,property:"border-width"},inputBorderOffset:{...p,property:"border-offset"},inputBorderColor:{...p,property:"border-color"},inputBorderStyle:{...p,property:"border-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputSize:[{...p,property:"width"},{...p,property:"height"},{...u,property:"font-size"},{...h,property:"font-size"}]}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,s.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${a.Z}\n ${(0,l.bi)(x.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}));r(3092),r(9789),r(6676),customElements.define(d,x)},9278:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>s});var n=r(4567),o=r(7044);class i extends o.C{_defaultRenderer(e,t,r){const n=r.item[this.path]||"",o=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(n)}));if(!o)return void this.__setTextContent(e,r.item[this.path]||"");const i=o.cloneNode(!0);i.textContent=n||"",e.innerHTML="",e.append(i)}}const s=(0,n.iY)("grid-custom-column");customElements.define(s,i)},2238:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>l}),r(3483);var n=r(4567),o=r(8623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},s=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class a extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let r=e.querySelector("descope-checkbox");r||(r=i(),r.addEventListener("input",(()=>{const e=s(t);t.selectedItems=e?[]:t.items})),e.appendChild(r)),r.setAttribute("checked",s(t))}_defaultRenderer(e,t,r){const n=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=i(),e.appendChild(o)),o.onchange=()=>{o.checked?n.selectItem(r.item):n.deselectItem(r.item)},o.setAttribute("checked",r.selected)}}const l=(0,n.iY)("grid-selection-column");customElements.define(l,a)},7044:(e,t,r)=>{r.d(t,{C:()=>o});var n=r(322);class o extends n.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,r){const n=r.item[this.path]||"",o=Array.isArray(n)?n.join(", "):n;this.__setTextContent(e,o),e.title=o}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},2356:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>i});var n=r(4567),o=r(7044);const i=(0,n.iY)("grid-text-column");customElements.define(i,o.C)},9950:(e,t,r)=>{r.r(t),r.d(t,{GridClass:()=>x}),r(4595),r(2356),r(9278),r(2238);var n=r(2061),o=r(4567),i=r(1e3);const s=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},a=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:m,selectedRow:b,rowSeparator:g,resizeHandle:y}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"}},x=(0,n.qC)((0,i.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...d},{...h}],fontSize:[{...d},{...h}],fontWeight:{...h},valueTextColor:{...h,property:"color"},backgroundColor:[{...l,property:"background-color"},{...h,property:"background-color"}],sortIndicatorsColor:{...u,property:"color"},activeSortIndicator:{...m,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...b,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...y,property:"background-color"}}}),i.e4,i.Ae,(e=>class extends e{#e;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",(e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))}))}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#e=Array.from(this.children).map((e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce(((t,r)=>{const n=e.getAttribute(r);return n&&(t[r]=n),t}),{})})))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);s(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#t=({path:e,header:t,type:r,attrs:n})=>{const o=`descope-grid-${r}-column`;return`<${o} header="${t}" path="${e}" ${Object.entries(n).map((([e,t])=>`${e}="${t}"`)).join(" ")}></${o}>`};get renderColumn(){return this.#t}set renderColumn(e){this.#t=e,this.renderColumns()}getColumnsTemplate(){return this.#e?.reduce?.(((e,t)=>e+(this.renderColumn?.(t||{})||"")),"")}renderColumns(){const e=this.getColumnsTemplate();e&&(this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(s(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map((e=>e[this.uniqueColumnId]??e))),t=this.grid.selectedItems.filter((t=>e.has(t[this.uniqueColumnId]??t)));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#e}set columns(e){this.#e=e,this.renderColumns()}get paths(){return this.columns.map((e=>e.path))}get uniqueColumnId(){return this.getAttribute("unique-column-id")}}))((0,i.DM)({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>"\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n }\n\t\t",excludeAttrsSync:["columns","tabindex"],componentName:a}));customElements.define(a,x)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9461,769,3726,5988,7487,3705,4201,4803,7044],{818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(4567),o=n(1250);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.Db)(this.inputElement,this,["checked"]),(0,r.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},6882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(4201).DY)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n\theight: 0;\n\tmargin: 0;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},1250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(3878),o=n(4567);const i=(0,o.iY)("boolean-field-internal"),s=["disabled","label","invalid","readonly"],a=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends a{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:s}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},6676:(e,t,n)=>{n.r(t);var r=n(1250);customElements.define(r.f,r.Z)},3483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(4567),o=n(2061),i=n(1e3),s=n(818),a=n(6882),l=n(4201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:m,requiredIndicator:b,helperText:g,errorMessage:f}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,p,m],fontFamily:[m,g,f],labelTextColor:{...m,property:"color"},labelSpacing:{...m,property:"padding-inline-start"},labelLineHeight:{...m,property:"line-height"},labelFontWeight:{...m,property:"font-weight"},labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...f,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...p,property:"background-color"},inputBorderRadius:{...p,property:"border-radius"},inputBorderWidth:{...p,property:"border-width"},inputBorderOffset:{...p,property:"border-offset"},inputBorderColor:{...p,property:"border-color"},inputBorderStyle:{...p,property:"border-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputSize:[{...p,property:"width"},{...p,property:"height"},{...u,property:"font-size"},{...h,property:"font-size"}]}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,s.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${a.Z}\n ${(0,l.bi)(x.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}));n(3092),n(9789),n(6676),customElements.define(d,x)},9278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>s});var r=n(4567),o=n(7044);class i extends o.C{_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(r)}));if(!o)return void this.__setTextContent(e,n.item[this.path]||"");const i=o.cloneNode(!0);i.textContent=r||"",e.innerHTML="",e.append(i)}}const s=(0,r.iY)("grid-custom-column");customElements.define(s,i)},2238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(3483);var r=n(4567),o=n(8623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},s=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class a extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=s(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",s(t))}_defaultRenderer(e,t,n){const r=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=i(),e.appendChild(o)),o.onchange=()=>{o.checked?r.selectItem(n.item):r.deselectItem(n.item)},o.setAttribute("checked",n.selected)}}const l=(0,r.iY)("grid-selection-column");customElements.define(l,a)},7044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(322);class o extends r.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.isArray(r)?r.join(", "):r;this.__setTextContent(e,o),e.title=o}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},2356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(4567),o=n(7044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},9950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(4595),n(2356),n(9278),n(2238);var r=n(2061),o=n(4567),i=n(1e3);const s=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},a=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:m,selectedRow:b,rowSeparator:g,resizeHandle:f}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"}},x=(0,r.qC)((0,i.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...d},{...h}],fontSize:[{...d},{...h}],fontWeight:{...h},valueTextColor:{...h,property:"color"},backgroundColor:[{...l,property:"background-color"},{...h,property:"background-color"}],sortIndicatorsColor:{...u,property:"color"},activeSortIndicator:{...m,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...b,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"}}}),i.e4,i.Ae,(e=>class extends e{#e;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",(e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))}))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#e=Array.from(this.children).map((e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce(((t,n)=>{const r=e.getAttribute(n);return r&&(t[n]=r),t}),{})})))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);s(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#t=({path:e,header:t,type:n,attrs:r})=>{const o=`descope-grid-${n}-column`;return`<${o} header="${t}" path="${e}" ${Object.entries(r).map((([e,t])=>`${e}="${t}"`)).join(" ")}></${o}>`};get renderColumn(){return this.#t}set renderColumn(e){this.#t=e,this.renderColumns()}getColumnsTemplate(){return this.#e?.reduce?.(((e,t)=>e+(this.renderColumn?.(t||{})||"")),"")}renderColumns(){const e=this.getColumnsTemplate();e&&(this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(s(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map((e=>e[this.uniqueColumnId]??e))),t=this.grid.selectedItems.filter((t=>e.has(t[this.uniqueColumnId]??t)));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#e}set columns(e){this.#e=e,this.renderColumns()}get paths(){return this.columns.map((e=>e.path))}get uniqueColumnId(){return this.getAttribute("unique-column-id")}}))((0,i.DM)({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>"\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n }\n\t\t",excludeAttrsSync:["columns","tabindex"],componentName:a}));customElements.define(a,x)},4201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>o,Wf:()=>p,bi:()=>r,jI:()=>a,jl:()=>i,wm:()=>h});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,h=(e,t)=>`\n ${o(e)}\n ${s(e)}\n ${a(e)}\n ${i(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${c(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,p=e=>`\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 ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
package/dist/umd/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,s,n={534:(e,o,s)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,5910,4567,1e3,3878,769],"./boolean-fields/descope-checkbox/index.js":[3483,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,4201,3878,769,4803,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,4201,3878,769,4803,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[6793,5910,4567,1e3,3878,9214,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[3795,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,4201,3878,9662,9214,6656,9434,9122,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[8901,5910,4567,1e3,3878,9214,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[4873,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[4887,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,4201,3878,9662,9214,6656,9434,2313,2861],"./descope-avatar/index.js":[3120,5910,7531,4226,2066,2269,6606,1037,4946,9320,9189,6091,3373,9680,6977,2106,2775,4567,1e3,8873],"./descope-badge/index.js":[4021,5910,4567,1e3,8012],"./descope-button/index.js":[2018,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662],"./descope-combo-box/index.js":[1294,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,9483],"./descope-container/index.js":[7107,5910,4567,1e3,7317],"./descope-date-picker/index.js":[2552,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,1224,9320,9211,9189,6091,3373,9383,9092,4567,1e3,8017],"./descope-divider/index.js":[6162,5910,4567,1e3,2528,4178],"./descope-email-field/index.js":[1272,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9437,4567,1e3,4201,4447,9760],"./descope-grid/descope-grid-custom-column/index.js":[9278,7531,2066,262,4905,5517,322,4567,7044,5988],"./descope-grid/descope-grid-selection-column/index.js":[2238,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,4905,5517,3092,8623,4567,1e3,4201,3878,769,4803,3726,7487],"./descope-grid/descope-grid-text-column/index.js":[2356,7531,2066,262,4905,5517,322,4567,7044,3705],"./descope-grid/index.js":[9950,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9189,4905,3003,9680,5517,3092,322,8623,63,4595,4567,1e3,4201,9461],"./descope-image/index.js":[8278,5910,4567,1e3,6772],"./descope-link/index.js":[5846,5910,4567,1e3,2528,58],"./descope-loader-linear/index.js":[7845,5910,4567,1e3,6453],"./descope-loader-radial/index.js":[5747,5910,4567,1e3,3072],"./descope-logo/index.js":[1034,5910,4567,1e3,3585,1984],"./descope-modal/index.js":[958,5910,7531,4226,2269,1037,262,9320,9189,6091,6687,1940,4567,1e3,4641],"./descope-multi-select-combo-box/index.js":[9393,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,9680,6687,63,1438,4567,1e3,4201,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4567,1e3,4201,3878,2481,1842],"./descope-new-password/index.js":[8974,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,9211,7056,4567,1e3,4201,3878,4447,2934,2481,1842,8106,7055],"./descope-notification/descope-notification-card/index.js":[5400,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401],"./descope-notification/index.js":[1845,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401,9655],"./descope-notp-image/index.js":[6016,5910,4567,1e3,3585,869],"./descope-number-field/index.js":[6916,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,5806,4567,1e3,4201,4447,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4567,1e3,3878,1841],"./descope-passcode/index.js":[4919,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,4201,3878,4447,2934,1841,3072,939],"./descope-password/index.js":[9279,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9211,7056,4567,1e3,4201,2481,8106],"./descope-recaptcha/index.js":[8164,5910,4567,1e3,964],"./descope-text-area/index.js":[1962,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,422,9680,6770,4567,1e3,4201,3322],"./descope-text-field/index.js":[9357,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,4201,4447,2934],"./descope-text/index.js":[1876,5910,4567,1e3,2528],"./descope-totp-image/index.js":[1331,5910,4567,1e3,3585,5364],"./descope-upload-file/index.js":[6667,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,9662,5874],"./descope-user-attribute/index.js":[4199,5910,7531,4226,2066,2269,6606,3249,1037,4946,1224,9211,1721,9680,6977,7911,4567,1e3,9662,2528,8012,1722],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[6751,5910,4567,1e3,3878,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[3820,5910,4567,1e3,3878,5130],"./mapping-fields/descope-mappings-field/index.js":[3325,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9320,9211,9189,4905,6091,3373,3003,9383,1721,8866,9680,7583,6977,2106,9299],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,3878,4447,9288],"./phone-fields/descope-phone-field/index.js":[6581,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,3878,4447,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,4201,3878,4447,2934,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,3878,4447,5119]};function i(e){if(!s.o(n,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=n[e],i=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(i)))}i.keys=()=>Object.keys(n),i.id=534,e.exports=i},5561:(e,o,s)=>{"use strict";s.r(o),s.d(o,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#s=new Set;#n(){this.#s.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#s.add(e),()=>{this.#s.delete(e)}}set themes(e){this.#e=e,this.#n()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,o,s)=>{const{componentsThemeManager:n}=s(5561),i=s(534);e.exports=i.keys().reduce(((e,o)=>{const s=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return s.endsWith("-internal")||(e[s]=()=>i(o)),e}),{}),e.exports.componentsThemeManager=n}},i={};function d(e){var o=i[e];if(void 0!==o)return o.exports;var s=i[e]={exports:{}};return n[e](s,s.exports,d),s.exports}d.m=n,e=[],d.O=(o,s,n,i)=>{if(!s){var t=1/0;for(a=0;a<e.length;a++){for(var[s,n,i]=e[a],p=!0,c=0;c<s.length;c++)(!1&i||t>=i)&&Object.keys(d.O).every((e=>d.O[e](s[c])))?s.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=n();void 0!==r&&(o=r)}}return o}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[s,n,i]},d.F={},d.E=e=>{Object.keys(d.F).map((o=>{d.F[o](e)}))},d.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return d.d(o,{a:o}),o},d.d=(e,o)=>{for(var s in o)d.o(o,s)&&!d.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((o,s)=>(d.f[s](e,o),o)),[])),d.u=e=>(({58:"descope-link-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",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",4483:"boolean-fields-descope-switch-toggle-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",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-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",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",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8873:"descope-avatar-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",9461:"descope-grid-index-js",9483:"descope-combo-box-index-js",9655:"descope-notification-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},s="DescopeUI:",d.l=(e,n,i,t)=>{if(o[e])o[e].push(n);else{var p,c;if(void 0!==i)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")==s+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,d.nc&&p.setAttribute("nonce",d.nc),p.setAttribute("data-webpack",s+i),p.src=e),o[e]=[n];var u=(s,n)=>{p.onerror=p.onload=null,clearTimeout(x);var i=o[e];if(delete o[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(n))),s)return s(n)},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)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var o=d.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var s=o.getElementsByTagName("script");if(s.length)for(var n=s.length-1;n>-1&&!e;)e=s[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={4826:0};d.f.j=(o,s)=>{var n=d.o(e,o)?e[o]:void 0;if(0!==n)if(n)s.push(n[2]);else{var i=new Promise(((s,i)=>n=e[o]=[s,i]));s.push(n[2]=i);var t=d.p+d.u(o),p=new Error;d.l(t,(s=>{if(d.o(e,o)&&(0!==(n=e[o])&&(e[o]=void 0),n)){var i=s&&("load"===s.type?"missing":s.type),t=s&&s.target&&s.target.src;p.message="Loading chunk "+o+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,n[1](p)}}),"chunk-"+o,o)}},d.F.j=o=>{if(!d.o(e,o)||void 0===e[o]){e[o]=null;var s=document.createElement("link");d.nc&&s.setAttribute("nonce",d.nc),s.rel="prefetch",s.as="script",s.href=d.p+d.u(o),document.head.appendChild(s)}},d.O.j=o=>0===e[o];var o=(o,s)=>{var n,i,[t,p,c]=s,r=0;if(t.some((o=>0!==e[o]))){for(n in p)d.o(p,n)&&(d.m[n]=p[n]);if(c)var a=c(d)}for(o&&o(s);r<t.length;r++)i=t[r],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(a)},s=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];s.forEach(o.bind(null,0)),s.push=o.bind(null,s.push.bind(s))})(),d.O(0,[4826],(()=>{[5910,4567,1e3,3878,769,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4201,4803,3726,4483,9214,9122,9211,1721,9662,6656,9434,5263,2313,2861,9320,9189,6091,3373,9680,6977,2106,2775,8873,8012,262,4905,3003,9383,8866,7583,9483,7317,9092,8017,2528,4178,9437,4447,9760,5517,322,7044,5988,8623,7487,3705,63,4595,9461,6772,58,6453,3072,3585,1984,6687,1940,4641,1438,3840,2481,1842,7056,2934,8106,7055,3951,7401,9655,869,5806,2142,1841,939,964,6770,3322,5364,5874,7911,1722,3172,5130,9299,9288,9806,4981,5119].map(d.E)}),5);var t=d(7507);return d.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,n={534:(e,s,o)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,5910,4567,1e3,3878,769],"./boolean-fields/descope-checkbox/index.js":[3483,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,3878,4201,769,4803,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,3878,4201,769,4803,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[6793,5910,4567,1e3,3878,9214,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[3795,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,4201,9662,9214,6656,9434,9122,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[8901,5910,4567,1e3,3878,9214,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[4873,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[4887,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,4201,9662,9214,6656,9434,2313,2861],"./descope-avatar/index.js":[3120,5910,7531,4226,2066,2269,6606,1037,4946,9320,9189,6091,3373,9680,6977,2106,2775,4567,1e3,8873],"./descope-badge/index.js":[4021,5910,4567,1e3,8012],"./descope-button/index.js":[2018,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662],"./descope-combo-box/index.js":[1294,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,9483],"./descope-container/index.js":[7107,5910,4567,1e3,7317],"./descope-date-picker/index.js":[2552,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,1224,9320,9211,9189,6091,3373,9383,9092,4567,1e3,8017],"./descope-divider/index.js":[6162,5910,4567,1e3,2528,4178],"./descope-email-field/index.js":[1272,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9437,4567,1e3,4201,4447,9760],"./descope-grid/descope-grid-custom-column/index.js":[9278,7531,2066,262,4905,5517,322,4567,7044,5988],"./descope-grid/descope-grid-selection-column/index.js":[2238,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,4905,5517,3092,8623,4567,1e3,3878,4201,769,4803,3726,7487],"./descope-grid/descope-grid-text-column/index.js":[2356,7531,2066,262,4905,5517,322,4567,7044,3705],"./descope-grid/index.js":[9950,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9189,4905,3003,9680,5517,3092,322,8623,63,4595,4567,1e3,3878,9461],"./descope-image/index.js":[8278,5910,4567,1e3,6772],"./descope-link/index.js":[5846,5910,4567,1e3,2528,58],"./descope-loader-linear/index.js":[7845,5910,4567,1e3,6453],"./descope-loader-radial/index.js":[5747,5910,4567,1e3,3072],"./descope-logo/index.js":[1034,5910,4567,1e3,3585,1984],"./descope-modal/index.js":[958,5910,7531,4226,2269,1037,262,9320,9189,6091,6687,1940,4567,1e3,4641],"./descope-multi-select-combo-box/index.js":[9393,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,9680,6687,63,1438,4567,1e3,4201,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4567,1e3,3878,4201,2481,1842],"./descope-new-password/index.js":[8974,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,9211,7056,4567,1e3,3878,4201,4447,2934,2481,1842,8106,7055],"./descope-notification/descope-notification-card/index.js":[5400,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401],"./descope-notification/index.js":[1845,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401,9655],"./descope-notp-image/index.js":[6016,5910,4567,1e3,3585,869],"./descope-number-field/index.js":[6916,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,5806,4567,1e3,4201,4447,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4567,1e3,3878,1841],"./descope-passcode/index.js":[4919,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,3878,4201,4447,2934,1841,3072,939],"./descope-password/index.js":[9279,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9211,7056,4567,1e3,4201,2481,8106],"./descope-recaptcha/index.js":[8164,5910,4567,1e3,964],"./descope-text-area/index.js":[1962,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,422,9680,6770,4567,1e3,4201,3322],"./descope-text-field/index.js":[9357,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,4201,4447,2934],"./descope-text/index.js":[1876,5910,4567,1e3,2528],"./descope-totp-image/index.js":[1331,5910,4567,1e3,3585,5364],"./descope-upload-file/index.js":[6667,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,9662,5874],"./descope-user-attribute/index.js":[4199,5910,7531,4226,2066,2269,6606,3249,1037,4946,1224,9211,1721,9680,6977,7911,4567,1e3,9662,2528,8012,1722],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[6751,5910,4567,1e3,3878,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[3820,5910,4567,1e3,3878,5130],"./mapping-fields/descope-mappings-field/index.js":[5894,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9320,9211,9189,4905,6091,3373,3003,9383,1721,8866,9680,7583,6977,2106,9299],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[4115,5910,4567,1e3,3878,9656],"./mapping-fields/descope-saml-group-mappings/index.js":[3277,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9320,9211,9189,4905,6091,3373,3003,9383,1721,8866,9680,7583,6977,2106,9299,9476],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,9288],"./phone-fields/descope-phone-field/index.js":[6581,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,3878,4201,4447,2934,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,5119]};function i(e){if(!o.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],i=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(i)))}i.keys=()=>Object.keys(n),i.id=534,e.exports=i},5561:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#n(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#n()}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.#n()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,s,o)=>{const{componentsThemeManager:n}=o(5561),i=o(534);e.exports=i.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>i(s)),e}),{}),e.exports.componentsThemeManager=n}},i={};function d(e){var s=i[e];if(void 0!==s)return s.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,d),o.exports}d.m=n,e=[],d.O=(s,o,n,i)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,n,i]=e[a],p=!0,c=0;c<o.length;c++)(!1&i||t>=i)&&Object.keys(d.O).every((e=>d.O[e](o[c])))?o.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=n();void 0!==r&&(s=r)}}return s}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[o,n,i]},d.F={},d.E=e=>{Object.keys(d.F).map((s=>{d.F[s](e)}))},d.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return d.d(s,{a:s}),s},d.d=(e,s)=>{for(var o in s)d.o(s,o)&&!d.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((s,o)=>(d.f[o](e,s),s)),[])),d.u=e=>(({58:"descope-link-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",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",4483:"boolean-fields-descope-switch-toggle-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",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-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",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",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8873:"descope-avatar-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",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"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="DescopeUI:",d.l=(e,n,i,t)=>{if(s[e])s[e].push(n);else{var p,c;if(void 0!==i)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+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,d.nc&&p.setAttribute("nonce",d.nc),p.setAttribute("data-webpack",o+i),p.src=e),s[e]=[n];var u=(o,n)=>{p.onerror=p.onload=null,clearTimeout(x);var i=s[e];if(delete s[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(n))),o)return o(n)},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)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var s=d.g.document;if(!e&&s&&(s.currentScript&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&!e;)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={4826:0};d.f.j=(s,o)=>{var n=d.o(e,s)?e[s]:void 0;if(0!==n)if(n)o.push(n[2]);else{var i=new Promise(((o,i)=>n=e[s]=[o,i]));o.push(n[2]=i);var t=d.p+d.u(s),p=new Error;d.l(t,(o=>{if(d.o(e,s)&&(0!==(n=e[s])&&(e[s]=void 0),n)){var i=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;p.message="Loading chunk "+s+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,n[1](p)}}),"chunk-"+s,s)}},d.F.j=s=>{if(!d.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");d.nc&&o.setAttribute("nonce",d.nc),o.rel="prefetch",o.as="script",o.href=d.p+d.u(s),document.head.appendChild(o)}},d.O.j=s=>0===e[s];var s=(s,o)=>{var n,i,[t,p,c]=o,r=0;if(t.some((s=>0!==e[s]))){for(n in p)d.o(p,n)&&(d.m[n]=p[n]);if(c)var a=c(d)}for(s&&s(o);r<t.length;r++)i=t[r],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(a)},o=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),d.O(0,[4826],(()=>{[5910,4567,1e3,3878,769,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4201,4803,3726,4483,9214,9122,9211,1721,9662,6656,9434,5263,2313,2861,9320,9189,6091,3373,9680,6977,2106,2775,8873,8012,262,4905,3003,9383,8866,7583,9483,7317,9092,8017,2528,4178,9437,4447,9760,5517,322,7044,5988,8623,7487,3705,63,4595,9461,6772,58,6453,3072,3585,1984,6687,1940,4641,1438,3840,2481,1842,7056,2934,8106,7055,3951,7401,9655,869,5806,2142,1841,939,964,6770,3322,5364,5874,7911,1722,3172,5130,9299,9656,9476,9288,9806,4981,5119].map(d.E)}),5);var t=d(7507);return d.O(t)})()));
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3172],{6751:(t,e,i)=>{i.r(e);var a=i(3878),s=i(4567);const n=(0,s.iY)("mapping-item"),r=["size","bordered","readonly","full-width","disabled"],u=(0,a.P)({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.oP)(this,this.valueInput,{includeAttrs:r}),(0,s.oP)(this,this.attributeInput,{includeAttrs:[...r,"options"],mapAttrs:{options:"data"}}),(0,s.oP)(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("mapping-item-removed"))))}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)}})}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3172],{6751:(t,e,i)=>{i.r(e);var a=i(3878),s=i(4567);const n=(0,s.iY)("mapping-item"),r=["size","bordered","readonly","full-width","disabled"],u=(0,a.P)({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.oP)(this,this.valueInput,{includeAttrs:r}),(0,s.oP)(this,this.attributeInput,{includeAttrs:[...r,"options"],mapAttrs:{options:"data"}}),(0,s.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}#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)}})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5130],{7819:(t,e,i)=>{i.d(e,{Z:()=>l,f:()=>r});var n=i(3878),s=i(4567);const r=(0,s.iY)("mappings-field-internal"),a=(0,n.P)({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.oP)(this,e,{includeAttrs:["size","full-width","separator","options","disabled"]}),setTimeout((()=>{this.setCustomValidity(""),e.addEventListener("mapping-item-removed",(t=>{e===this.#t&&(this.resetInvalidIndication(),this.#t=void 0),e.remove(),this.setCustomValidity(""),t.stopPropagation()})),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.oP)(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.P$)(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)}}},3820:(t,e,i)=>{i.r(e);var n=i(7819);customElements.define(n.f,n.Z)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5130],{7819:(t,e,i)=>{i.d(e,{Z:()=>l,f:()=>r});var n=i(3878),s=i(4567);const r=(0,s.iY)("mappings-field-internal"),a=(0,n.P)({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.oP)(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.oP)(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.P$)(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)}}},3820:(t,e,i)=>{i.r(e);var n=i(7819);customElements.define(n.f,n.Z)}}]);
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see mapping-fields-descope-mappings-field-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9299,9662,9483,2934,2528,3172,5130,4567,1e3,4201,3878,4447],{2561:(t,e,i)=>{i.d(e,{s:()=>d});var r=i(2061),n=i(357),s=i(7878);const a=t=>class extends t{#t=s.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}};var o=i(2666),l=i(8084);const d=({componentName:t,baseSelector:e=""})=>{class i extends HTMLElement{static get componentName(){return t}#e;#i=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#i&&(this.#i=!1,this.init?.())}}return(0,r.qC)(n.A,o._,l.Q,a)(i)}},3878:(t,e,i)=>{i.d(e,{P:()=>a});var r=i(2061),n=i(1e3),s=i(2561);const a=(...t)=>(0,r.qC)(n.wX,n.li,n.QT,n.mE)((0,s.s)(...t))},9690:(t,e,i)=>{i.d(e,{n:()=>p,f:()=>a});var r=i(2061),n=i(4567),s=i(1e3);const a=(0,n.iY)("button"),{host:o,label:l}={host:{selector:()=>":host"},label:{selector:"::part(label)"}};let d;const p=(0,r.qC)((0,s.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...o,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],labelTextColor:{property:"color"},labelTextDecoration:{...l,property:"text-decoration"},labelSpacing:{...l,property:"gap"},textAlign:{...l,property:"justify-content",fallback:"center"}}}),(t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}),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${d}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${p.cssVarList.outlineWidth}) + var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${p.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${p.cssVarList.hostHeight}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${p.cssVarList.hostWidth}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a})),{color:u,fontSize:h}=p.cssVarList;d=`\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(${u});\n\t\ttop: calc(50% - (var(${h}) / 2));\n\t\tleft: calc(50% - (var(${h}) / 2));\n\t\tborder-width: calc(var(${h}) / 10);\n\t\twidth: var(${h});\n\t\theight: var(${h});\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`},2018:(t,e,i)=>{i.r(e),i.d(e,{ButtonClass:()=>r.n}),i(1721);var r=i(9690);customElements.define(r.f,r.n)},4049:(t,e,i)=>{i.d(e,{H:()=>y,f:()=>o});var r=i(2061),n=i(4567),s=i(4201),a=i(1e3);const o=(0,n.iY)("combo-box"),{host:l,inputField:d,inputElement:p,placeholder:u,toggle:h,clearButton:c,label:m,requiredIndicator:b,helperText:g,errorMessage:v}={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)"}},y=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:[{},l],fontFamily:[m,u,d,g,v],labelTextColor:[{...m,property:"color"},{...b,property:"color"}],errorMessageTextColor:{...v,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:{...b,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...u,property:"color"},inputDropdownButtonCursor:[{...h,property:"cursor"},{...c,property:"cursor"}],inputDropdownButtonColor:[{...h,property:"color"},{...c,property:"color"}],inputDropdownButtonSize:[{...h,property:"font-size"},{...c,property:"font-size"}],inputDropdownButtonOffset:[{...h,property:"margin-right"},{...h,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"}],overlayBackground:{property:()=>y.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>y.cssVarList.overlay.textColor},overlayBorder:{property:()=>y.cssVarList.overlay.border},overlayFontSize:{property:()=>y.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>y.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>y.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>y.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>y.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>y.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{#r=({displayName:t,value:e,label:i})=>`<span data-name="${i}" data-id="${e}">${t||i}</span>`;#n;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#r}set renderItem(t){this.#r=t,this.renderItems()}get data(){if(this.#n)return this.#n;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.#n=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(i){if(!e.baseElement.items?.length)return;const r=e.customValueTransformFn(i)||"";r!==this.value&&t.set.call(this,r)}}})}#s(){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,i)=>{t.innerHTML=i.item.outerHTML}}#a(){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.#a(),this.renderItems(),(0,n.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,n.P$)(this,this.#s.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}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"]||""}}))((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,s.bi)(y.cssVarList)}\n\t\t${(0,s.PH)("vaadin-combo-box")}\n\t\t${(0,s.jI)("vaadin-combo-box")}\n\t\t${(0,s.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 ${(0,s.Wf)("vaadin-combo-box")}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:o,includeForwardProps:["items","renderer","selectedItem"]}))},1294:(t,e,i)=>{i.r(e),i.d(e,{ComboBoxClass:()=>r.H}),i(7583);var r=i(4049);customElements.define(r.f,r.H)},6417:(t,e,i)=>{i.d(e,{f:()=>l,z:()=>p});var r=i(1e3),n=i(4447),s=i(2061),a=i(4567),o=i(4201);const l=(0,a.iY)("text-field"),d=["type"],p=(0,s.qC)((0,r.yk)({mappings:n.Z}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,(t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i)}}))((0,r.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(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,o.Wf)("vaadin-text-field")}\n\t\t\t${(0,o.bi)(p.cssVarList)}\n\t\t\t${(0,o.wm)("vaadin-text-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},9357:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>r.z}),i(9789);var r=i(6417);customElements.define(r.f,r.z)},4447:(t,e,i)=>{i.d(e,{Z:()=>c});const{host:r,label:n,placeholder:s,requiredIndicator:a,inputField:o,input:l,helperText:d,errorMessage:p,disabledPlaceholder:u,inputDisabled:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:{selector:"> input:placeholder-shown"},disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},c={fontSize:[{},r],fontFamily:[n,o,d,p],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...o,property:"background-color"},labelTextColor:[{...n,property:"color"},{...a,property:"color"},{...n,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],errorMessageTextColor:{...p,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...o,property:"color"},{...h,property:"-webkit-text-fill-color"}],inputCaretTextColor:{...l,property:"color"},labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...o,property:"border-color"},inputBorderWidth:{...o,property:"border-width"},inputBorderStyle:{...o,property:"border-style"},inputBorderRadius:{...o,property:"border-radius"},inputHeight:{...o,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"}],inputOutlineColor:{...o,property:"outline-color"},inputOutlineStyle:{...o,property:"outline-style"},inputOutlineWidth:{...o,property:"outline-width"},inputOutlineOffset:{...o,property:"outline-offset"},inputTextAlign:{...l,property:"text-align"},inputPlaceholderColor:[{...s,property:"color"},{...u,property:"-webkit-text-fill-color"}]}},2138:(t,e,i)=>{i.d(e,{f:()=>o,k:()=>d});var r=i(1e3),n=i(2561),s=i(2061),a=i(4567);const o=(0,a.iY)("text");class l extends((0,n.s)({componentName:o,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<style>\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t\t:host > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot part="text-wrapper"></slot>\n\t\t'}}const d=(0,s.qC)((0,r.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:{}}}),r.e4,r.Ae,(t=>class extends t{get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,a.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}))(l)},1876:(t,e,i)=>{i.r(e),i.d(e,{TextClass:()=>r.k});var r=i(2138);customElements.define(r.f,r.k)},6751:(t,e,i)=>{i.r(e);var r=i(3878),n=i(4567);const s=(0,n.iY)("mapping-item"),a=["size","bordered","readonly","full-width","disabled"],o=(0,r.P)({componentName:s,baseSelector:"div"});customElements.define(s,class extends o{static get observedAttributes(){return[].concat(o.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,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,n.oP)(this,this.valueInput,{includeAttrs:a}),(0,n.oP)(this,this.attributeInput,{includeAttrs:[...a,"options"],mapAttrs:{options:"data"}}),(0,n.oP)(this,this.removeButton,{includeAttrs:["disabled"]})}initRemoveButton(){this.removeButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("mapping-item-removed"))))}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,i){super.attributeChangedCallback?.(t,e,i),"separator"===t&&this.handleSeparatorChange(),"invalid"===t&&this.#o(i)}})},7819:(t,e,i)=>{i.d(e,{Z:()=>o,f:()=>s});var r=i(3878),n=i(4567);const s=(0,n.iY)("mappings-field-internal"),a=(0,r.P)({componentName:s,baseSelector:"div"}),o=class extends a{#l;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,n.oP)(this,e,{includeAttrs:["size","full-width","separator","options","disabled"]}),setTimeout((()=>{this.setCustomValidity(""),e.addEventListener("mapping-item-removed",(t=>{e===this.#l&&(this.resetInvalidIndication(),this.#l=void 0),e.remove(),this.setCustomValidity(""),t.stopPropagation()})),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 r=e[i];if(r)r.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,n.oP)(this,t,{includeAttrs:["disabled"]})}#d(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",(t=>{t.isTrusted&&(this.#l||this.items[0]||this.querySelector("descope-button")).focus()})),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",(()=>{this.mappingsContainerEle.contains(this.#l)&&this.#l?.checkValidity()&&(this.resetInvalidIndication(),this.#l.removeAttribute("invalid"),this.#l=void 0)})),(0,n.P$)(this.mappingsContainerEle,this.#d.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const t=this.items.find((t=>!t.checkValidity()));return t?t.validity:{}}#p(t){t&&(this.#l=this.items.find((t=>!t.checkValidity())),this.#l?.reportValidity(),this.#l?.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.#p("true"===i),"readonly"===t&&this.toggleAttribute("inert","true"===i)}}},3820:(t,e,i)=>{i.r(e);var r=i(7819);customElements.define(r.f,r.Z)},3325:(t,e,i)=>{i.r(e),i.d(e,{MappingsFieldClass:()=>P}),i(1195),i(9098),i(9416),i(4173);var r=i(2982),n=i(1251),s=i(6570);const a=s.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9299,9662,9483,2934,2528,3172,5130,4567,1e3,3878,4201,4447],{2561:(t,e,i)=>{i.d(e,{s:()=>d});var r=i(2061),n=i(357),s=i(7878);const a=t=>class extends t{#t=s.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}};var o=i(2666),l=i(8084);const d=({componentName:t,baseSelector:e=""})=>{class i extends HTMLElement{static get componentName(){return t}#e;#i=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#i&&(this.#i=!1,this.init?.())}}return(0,r.qC)(n.A,o._,l.Q,a)(i)}},3878:(t,e,i)=>{i.d(e,{P:()=>a});var r=i(2061),n=i(1e3),s=i(2561);const a=(...t)=>(0,r.qC)(n.wX,n.li,n.QT,n.mE)((0,s.s)(...t))},9690:(t,e,i)=>{i.d(e,{n:()=>p,f:()=>a});var r=i(2061),n=i(4567),s=i(1e3);const a=(0,n.iY)("button"),{host:o,label:l}={host:{selector:()=>":host"},label:{selector:"::part(label)"}};let d;const p=(0,r.qC)((0,s.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...o,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],labelTextColor:{property:"color"},labelTextDecoration:{...l,property:"text-decoration"},labelSpacing:{...l,property:"gap"},textAlign:{...l,property:"justify-content",fallback:"center"}}}),(t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}),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${d}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${p.cssVarList.outlineWidth}) + var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${p.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${p.cssVarList.hostHeight}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${p.cssVarList.hostWidth}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a})),{color:u,fontSize:h}=p.cssVarList;d=`\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(${u});\n\t\ttop: calc(50% - (var(${h}) / 2));\n\t\tleft: calc(50% - (var(${h}) / 2));\n\t\tborder-width: calc(var(${h}) / 10);\n\t\twidth: var(${h});\n\t\theight: var(${h});\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`},2018:(t,e,i)=>{i.r(e),i.d(e,{ButtonClass:()=>r.n}),i(1721);var r=i(9690);customElements.define(r.f,r.n)},4049:(t,e,i)=>{i.d(e,{H:()=>y,f:()=>o});var r=i(2061),n=i(4567),s=i(4201),a=i(1e3);const o=(0,n.iY)("combo-box"),{host:l,inputField:d,inputElement:p,placeholder:u,toggle:h,clearButton:c,label:m,requiredIndicator:b,helperText:g,errorMessage:v}={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)"}},y=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:[{},l],fontFamily:[m,u,d,g,v],labelTextColor:[{...m,property:"color"},{...b,property:"color"}],errorMessageTextColor:{...v,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:{...b,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...u,property:"color"},inputDropdownButtonCursor:[{...h,property:"cursor"},{...c,property:"cursor"}],inputDropdownButtonColor:[{...h,property:"color"},{...c,property:"color"}],inputDropdownButtonSize:[{...h,property:"font-size"},{...c,property:"font-size"}],inputDropdownButtonOffset:[{...h,property:"margin-right"},{...h,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"}],overlayBackground:{property:()=>y.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>y.cssVarList.overlay.textColor},overlayBorder:{property:()=>y.cssVarList.overlay.border},overlayFontSize:{property:()=>y.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>y.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>y.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>y.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>y.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>y.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{#r=({displayName:t,value:e,label:i})=>`<span data-name="${i}" data-id="${e}">${t||i}</span>`;#n;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#r}set renderItem(t){this.#r=t,this.renderItems()}get data(){if(this.#n)return this.#n;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.#n=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(i){if(!e.baseElement.items?.length)return;const r=e.customValueTransformFn(i)||"";r!==this.value&&t.set.call(this,r)}}})}#s(){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,i)=>{t.innerHTML=i.item.outerHTML}}#a(){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.#a(),this.renderItems(),(0,n.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,n.P$)(this,this.#s.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}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"]||""}}))((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,s.bi)(y.cssVarList)}\n\t\t${(0,s.PH)("vaadin-combo-box")}\n\t\t${(0,s.jI)("vaadin-combo-box")}\n\t\t${(0,s.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 ${(0,s.Wf)("vaadin-combo-box")}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:o,includeForwardProps:["items","renderer","selectedItem"]}))},1294:(t,e,i)=>{i.r(e),i.d(e,{ComboBoxClass:()=>r.H}),i(7583);var r=i(4049);customElements.define(r.f,r.H)},6417:(t,e,i)=>{i.d(e,{f:()=>l,z:()=>p});var r=i(1e3),n=i(4447),s=i(2061),a=i(4567),o=i(4201);const l=(0,a.iY)("text-field"),d=["type"],p=(0,s.qC)((0,r.yk)({mappings:n.Z}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,(t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i)}}))((0,r.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(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,o.Wf)("vaadin-text-field")}\n\t\t\t${(0,o.bi)(p.cssVarList)}\n\t\t\t${(0,o.wm)("vaadin-text-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},9357:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>r.z}),i(9789);var r=i(6417);customElements.define(r.f,r.z)},4447:(t,e,i)=>{i.d(e,{Z:()=>c});const{host:r,label:n,placeholder:s,requiredIndicator:a,inputField:o,input:l,helperText:d,errorMessage:p,disabledPlaceholder:u,inputDisabled:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:{selector:"> input:placeholder-shown"},disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},c={fontSize:[{},r],fontFamily:[n,o,d,p],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...o,property:"background-color"},labelTextColor:[{...n,property:"color"},{...a,property:"color"},{...n,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],errorMessageTextColor:{...p,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...o,property:"color"},{...h,property:"-webkit-text-fill-color"}],inputCaretTextColor:{...l,property:"color"},labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...o,property:"border-color"},inputBorderWidth:{...o,property:"border-width"},inputBorderStyle:{...o,property:"border-style"},inputBorderRadius:{...o,property:"border-radius"},inputHeight:{...o,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"}],inputOutlineColor:{...o,property:"outline-color"},inputOutlineStyle:{...o,property:"outline-style"},inputOutlineWidth:{...o,property:"outline-width"},inputOutlineOffset:{...o,property:"outline-offset"},inputTextAlign:{...l,property:"text-align"},inputPlaceholderColor:[{...s,property:"color"},{...u,property:"-webkit-text-fill-color"}]}},2138:(t,e,i)=>{i.d(e,{f:()=>o,k:()=>d});var r=i(1e3),n=i(2561),s=i(2061),a=i(4567);const o=(0,a.iY)("text");class l extends((0,n.s)({componentName:o,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<style>\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t\t:host > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot part="text-wrapper"></slot>\n\t\t'}}const d=(0,s.qC)((0,r.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:{}}}),r.e4,r.Ae,(t=>class extends t{get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,a.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}))(l)},1876:(t,e,i)=>{i.r(e),i.d(e,{TextClass:()=>r.k});var r=i(2138);customElements.define(r.f,r.k)},6751:(t,e,i)=>{i.r(e);var r=i(3878),n=i(4567);const s=(0,n.iY)("mapping-item"),a=["size","bordered","readonly","full-width","disabled"],o=(0,r.P)({componentName:s,baseSelector:"div"});customElements.define(s,class extends o{static get observedAttributes(){return[].concat(o.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,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,n.oP)(this,this.valueInput,{includeAttrs:a}),(0,n.oP)(this,this.attributeInput,{includeAttrs:[...a,"options"],mapAttrs:{options:"data"}}),(0,n.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,i){super.attributeChangedCallback?.(t,e,i),"separator"===t&&this.handleSeparatorChange(),"invalid"===t&&this.#o(i)}})},7819:(t,e,i)=>{i.d(e,{Z:()=>o,f:()=>s});var r=i(3878),n=i(4567);const s=(0,n.iY)("mappings-field-internal"),a=(0,r.P)({componentName:s,baseSelector:"div"}),o=class extends a{#l;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,n.oP)(this,e,{includeAttrs:["size","full-width","separator","options","disabled"]}),setTimeout((()=>{this.setCustomValidity(""),e.addEventListener("mapping-item-removed",(()=>{e===this.#l&&(this.resetInvalidIndication(),this.#l=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 r=e[i];if(r)r.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,n.oP)(this,t,{includeAttrs:["disabled"]})}#d(){this.labelsEle.style.display=this.items.length?"grid":"none"}init(){this.addEventListener("focus",(t=>{t.isTrusted&&(this.#l||this.items[0]||this.querySelector("descope-button")).focus()})),super.init?.(),this.initLabels(),this.initAddButton(),this.addEventListener("input",(()=>{this.mappingsContainerEle.contains(this.#l)&&this.#l?.checkValidity()&&(this.resetInvalidIndication(),this.#l.removeAttribute("invalid"),this.#l=void 0)})),(0,n.P$)(this.mappingsContainerEle,this.#d.bind(this))}resetInvalidIndication(){this.removeAttribute("invalid")}getValidity(){const t=this.items.find((t=>!t.checkValidity()));return t?t.validity:{}}#p(t){t&&(this.#l=this.items.find((t=>!t.checkValidity())),this.#l?.reportValidity(),this.#l?.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.#p("true"===i),"readonly"===t&&this.toggleAttribute("inert","true"===i)}}},3820:(t,e,i)=>{i.r(e);var r=i(7819);customElements.define(r.f,r.Z)},5894:(t,e,i)=>{i.r(e),i.d(e,{MappingsFieldClass:()=>f}),i(9381),i(7911),i(6594);var r=i(1e3),n=i(2138),s=i(2061),a=i(4567),o=i(7819);const l=(0,a.iY)("mappings-field"),{host:d,helperText:p,errorMessage:u,mappingItem:h,labels:c,labelsText:m,valueLabel:b,attrLabel:g,separator:v,labelsContainer:y}={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,s.qC)((0,r.yk)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:[{},d,{...v,property:"margin-top"}],fontFamily:[p,u,c],separatorFontSize:{...v,property:"font-size"},labelsFontSize:{...m,property:"font-size"},labelsLineHeight:[{...m,property:"line-height"},{...c,property:"line-height"}],labelTextColor:{...c,property:n.k.cssVarList.textColor},itemMarginBottom:{...h,property:"margin-bottom"},valueLabelMinWidth:{...b,property:"min-width"},attrLabelMinWidth:{...g,property:"min-width"},labelsMarginBottom:{...y,property:"margin-bottom"},separatorWidth:{},removeButtonWidth:{}}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),r.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 <${o.f}\n tabindex="-1"\n ></${o.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.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,r.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 ${n.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:l}));i(1876),i(2018),i(9357),i(1294),i(3820),i(6751),customElements.define(l,f)},5279:(t,e,i)=>{i.d(e,{gh:()=>r,k4:()=>n,qM:()=>a,qg:()=>s});const r="descope",n=3,s="host",a="@"},4567:(t,e,i)=>{i.d(e,{Db:()=>h,FX:()=>s,P$:()=>a,Tk:()=>p,iY:()=>d,oP:()=>u,tg:()=>l});var r=i(2061),n=i(5279);const s=(t,e,{excludeAttrs:i=[],includeAttrs:r=[]})=>{const n=Array.from(t.attributes).filter((t=>!i.includes(t.name)&&(!r.length||r.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||i.includes(t.attributeName)||r.length&&!r.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).observe(t,{childList:!0})},o=(t,e,i={})=>r=>{r.forEach((r=>{const n=i[r]||r,s=t.getAttribute(r);null!==s?e.getAttribute(n)!==s&&e.setAttribute(n,s):e.removeAttribute(n)}))},l=(t,e,i)=>{s(t,o(t,e),i),s(e,o(e,t),i)},d=t=>(0,r.E3)(n.gh,t),p=(...t)=>`--${(0,r.E3)(...t)}`,u=(t,e,i={})=>{s(t,o(t,e,i.mapAttrs),i)},h=(t,e,i=[])=>{if(!i.length)return;const r=i.reduce(((e,i)=>Object.assign(e,{[i]:{get:()=>t[i],set(e){t[i]=e}}})),{});Object.defineProperties(e,r)}},2061:(t,e,i)=>{i.d(e,{E3:()=>n,GL:()=>r,lo:()=>o,mf:()=>a,qC:()=>s});const r=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>r(t.filter((t=>!!t)).join("-")),s=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const i=t.slice().sort(),r=e.slice().sort();for(let t=0;t<i.length;t++)if(i[t]!==r[t])return!1;return!0}},7878:(t,e,i)=>{function r(t,e={}){const i=new Event(t,e);this[`on${t}`]?.(i),this.dispatchEvent(i)}i.d(e,{C:()=>r})},4201:(t,e,i)=>{i.d(e,{B:()=>p,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>n,Wf:()=>h,bi:()=>r,jI:()=>o,jl:()=>s,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,n=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,s=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`,o=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${n(t)}\n ${a(t)}\n ${o(t)}\n ${s(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 ${p(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`,h=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`},357:(t,e,i)=>{i.d(e,{A:()=>r});const r=t=>class extends t{#u(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#u()}}},2666:(t,e,i)=>{i.d(e,{_:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},1e3:(t,e,i)=>{i.d(e,{li:()=>A,Ae:()=>x.A,DM:()=>c,yk:()=>d,e4:()=>p,_A:()=>E._,mE:()=>I,wX:()=>b,QT:()=>S.Q,Iw:()=>C,dj:()=>f});var r=i(5279),n=i(2061),s=i(4567),a=i(5561);class o{constructor(){this.styleMap=new Map}add(t,e,i){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:i}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,i])=>`${t}${e} { \n${i.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const l=(t,e)=>Object.keys(e).reduce(((e,i)=>Object.assign(e,{[i]:(0,s.Tk)(t,i)})),{}),d=({mappings:t={},componentNameOverride:e=""})=>i=>{const d=e||i.componentName;return class extends i{static get cssVarList(){return{...i.cssVarList,...l(d,{...t})}}#h;#c;#m;#b;#g;#v;#y;#f;#x;constructor({getRootElement:e,componentNameSuffix:i="",themeSection:s=r.qg,baseSelector:a}={}){super(),this.#b=i,this.#g=s,this.#y=a??this.baseSelector,this.#x=e,this.#f=Object.keys(t).map((t=>(0,n.E3)("st",i,t)))}get#E(){return a.componentsThemeManager.currentTheme?.[d]||""}#w(){this.#c.innerHTML=this.#E[this.#g]}#C(){this.#c=document.createElement("style"),this.#c.id=`style-mixin-theme__${d}`,this.#v.prepend(this.#c),this.#m=a.componentsThemeManager.onCurrentThemeChange(this.#w.bind(this)),this.#w()}#A(){if(this.#f.length){this.#h=document.createElement("style"),this.#h.id=`style-mixin-overrides__${d}`;const i=(t=d,e=r.k4,Array(e).fill(`.${t}`).join(""));this.#h.innerText=`:host(${i}) {}`,this.#v.append(this.#h)}var t,e}#S(t,e){const i=this.#h?.sheet?.cssRules[0].style;if(!i)return;const r=(0,s.Tk)(d,t.replace(new RegExp("^st-"),""));e?i?.setProperty(r,e):(i?.removeProperty(r),this.removeAttribute(t))}#I(t=[]){let e=!1;t.forEach((t=>{this.#f.includes(t)&&(this.#S(t,this.getAttribute(t)),e=!0)})),e&&(this.#h.innerHTML=this.#h?.sheet?.cssRules[0].cssText)}#V(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${d}`,e.innerHTML=((t,e,i)=>{const r=new o;return Object.keys(i).forEach((a=>{const o=((t,e)=>{const i={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...i,...t}))):[{...i,...e}]:[i]})(a,i[a]),l=(0,s.Tk)(t,a);o.forEach((({selector:t,property:i,important:s,fallback:a})=>{r.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(i)?i():i,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(s?"!important":""))}))})),r.toString()})((0,n.E3)(d,this.#b),this.#y,t),this.#v.prepend(e)}}#$(t){(this.#v.classList||this.#v.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#v=await(this.#x?.(this))||this.shadowRoot,this.#$(d),this.#V(),this.#C(),this.#A(),(0,s.FX)(this,this.#I.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#m?.()}}},p=t=>class extends t{#k=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#k=document.createElement("style"),this.#k.innerText="* { cursor: inherit!important }"}#L(t){t?this.shadowRoot.appendChild(this.#k):this.#k.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const i=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",i),t.target.removeEventListener("dragend",i)};t.target.addEventListener("mouseup",i,{once:!0}),t.target.addEventListener("dragend",i,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),"draggable"===t&&this.#L("true"===i)}};var u=i(2561),h=i(7878);const c=({componentName:t,wrappedEleName:e,slots:i=[],style:r,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:d=!0})=>{class p extends((0,u.s)({componentName:t,baseSelector:e})){#M=h.C.bind(this,"blur");#T=h.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:d}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(r)?r():r}</style>\n\t\t\t<${e}>\n\t\t\t${i.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#M()})),this.baseElement.addEventListener("focus",(t=>{this.#T()})),(0,s.Db)(this.baseElement,this,l),(0,s.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return p};i(5910);const m=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...m]}static get formAssociated(){return!0}#_;get internals(){return this.#_}set internals(t){this.#_=t}constructor(){super(),this.#_=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:i,typeMismatch:r,stepMismatch:n,tooShort:s,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:d,customError:p}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case i||r||n||d:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case s:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case p:return this.validationMessage;default:return""}}#O(){const t=this.isReadOnly?{}:this.getValidity();this.#_.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#_.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#_.validity.valid}reportValidity(){return this.#_.reportValidity()}get validity(){return this.#_.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#_.setValidity({customError:!0},t,this.validationTarget):(this.#_.setValidity({}),this.#O())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#_.form}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),m.includes(t)&&this.#O()}init(){super.init?.(),this.addEventListener("change",this.#O),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#O),setTimeout((()=>this.#O()))}},g=["invalid","required"],v=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},y=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:i=[],proxyParentValidation:r=!1})=>n=>class extends(b(n)){static get observedAttributes(){return[...n.observedAttributes||[],...g]}#P;#q=h.C.bind(this,"change");constructor(){super(),this.#P=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#P&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#P)return this.#P;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#P=v(t)||v(e),this.#P}set inputElement(t){this.#P=t}getValidity(){return this.inputElement?.validity||{}}#z(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#z(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#z()}))})),this.baseElement.addEventListener("change",(()=>{this.#q()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#z()})),t.forEach((t=>{var e,i;e=this.inputElement,i=t,Object.defineProperty(this,i,{set(t){e[i]=t},get:()=>e[i],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,s.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),r){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,i)=>"function"==typeof t[i]&&"setValidity"===i?(...r)=>{if(3===r.length){const t=r.slice(0,r.length-1);t.push(e.inputElement),e.internals[i](...t)}else e.internals[i](...r);return t[i](...r)}:"function"==typeof t[i]?(...r)=>(e.internals[i](...r),t[i](...r)):t[i]})}}},f=t=>(0,n.qC)(y(t),d({componentNameOverride:(0,s.iY)("input-wrapper")}));var x=i(357),E=i(2666);const w=t=>async e=>{const i=await t(e);return new Promise((t=>{let e=0;const r=()=>{if(e>20)return console.error("could not get shadow root for element",i),void t(i);e++,i?.shadowRoot?t(i.shadowRoot):setTimeout(r)};r()}))},C=({name:t,selector:e,mappings:i={},forward:{attributes:a=[],include:o=!0}={}})=>p=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),h=d({mappings:i})(p);return class extends h{static get cssVarList(){return{...h.cssVarList,[u]:l((0,n.E3)(p.componentName,"_"+u),i)}}#N;constructor(){const t=w((async t=>{const i=t.shadowRoot.querySelector(t.baseSelector);return e?(await w((()=>i))(t)).querySelector(e):i}));super({getRootElement:t,componentNameSuffix:"_"+u,themeSection:r.qM+u,baseSelector:":host"}),this.#N=t(this).then((t=>t.host))}async#D(){const t=await this.#N;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#N;(0,s.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#D()}}},A=t=>class extends t{#q=h.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#q(),this.prevValue=this.value)}))}};var S=i(8084);const I=t=>class extends t{init(){this.#R(),super.init?.()}#R(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,h.C.call(this,"blur"),h.C.call(this,"focusout",{bubbles:!0})}))}));const i=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(h.C.call(this,"focus"),h.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",i),t?.addEventListener("focus",i)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,i)=>{i.d(e,{Q:()=>s});var r=i(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],s=t=>class extends t{init(){super.init?.(),(0,r.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},9381:(t,e,i)=>{i(1195),i(9098),i(9416),i(4173);var r=i(2982),n=i(1251),s=i(6570);const a=s.iv`
3
3
  :host {
4
4
  --lumo-text-field-size: var(--lumo-size-m);
5
5
  color: var(--lumo-body-text-color);
@@ -123,4 +123,4 @@
123
123
  </div>
124
124
 
125
125
  <slot name="tooltip"></slot>
126
- `}}(0,l.M)(f),i(7911),i(6594);var x=i(1e3),E=i(2138),w=i(2061),C=i(4567),A=i(7819);const S=(0,C.iY)("mappings-field"),{host:I,helperText:V,errorMessage:$,mappingItem:k,labels:L,valueLabel:M,attrLabel:T,separator:_,labelsContainer:O}={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'},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"]'}},P=(0,w.qC)((0,x.yk)({mappings:{hostWidth:{...I,property:"width"},hostDirection:{...I,property:"direction"},fontSize:[{},I,{..._,property:"margin-top"}],fontFamily:[V,$,L],separatorFontSize:{..._,property:"font-size"},labelTextColor:{...L,property:E.k.cssVarList.textColor},itemMarginBottom:{...k,property:"margin-bottom"},valueLabelMinWidth:{...M,property:"min-width"},attrLabelMinWidth:{...T,property:"min-width"},labelsMarginBottom:{...O,property:"margin-bottom"},separatorWidth:{},removeButtonWidth:{}}}),x.e4,(0,x.dj)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),x.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 <${A.f}\n tabindex="-1"\n ></${A.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(A.f),(0,C.oP)(this,this.inputElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","default-values","invalid","readonly","disabled"]}),this.setDefaultValues()}}))((0,x.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(${P.cssVarList.separatorWidth}) 1fr var(${P.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 ${E.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(${P.cssVarList.separatorWidth}) 1fr var(${P.cssVarList.removeButtonWidth});\n }\n `,excludeAttrsSync:["tabindex","label-value","label-attr","button-label","options","error-message"],componentName:S}));i(1876),i(2018),i(9357),i(1294),i(3820),i(6751),customElements.define(S,P)},5279:(t,e,i)=>{i.d(e,{gh:()=>r,k4:()=>n,qM:()=>a,qg:()=>s});const r="descope",n=3,s="host",a="@"},4567:(t,e,i)=>{i.d(e,{Db:()=>h,FX:()=>s,P$:()=>a,Tk:()=>p,iY:()=>d,oP:()=>u,tg:()=>l});var r=i(2061),n=i(5279);const s=(t,e,{excludeAttrs:i=[],includeAttrs:r=[]})=>{const n=Array.from(t.attributes).filter((t=>!i.includes(t.name)&&(!r.length||r.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||i.includes(t.attributeName)||r.length&&!r.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).observe(t,{childList:!0})},o=(t,e,i={})=>r=>{r.forEach((r=>{const n=i[r]||r,s=t.getAttribute(r);null!==s?e.getAttribute(n)!==s&&e.setAttribute(n,s):e.removeAttribute(n)}))},l=(t,e,i)=>{s(t,o(t,e),i),s(e,o(e,t),i)},d=t=>(0,r.E3)(n.gh,t),p=(...t)=>`--${(0,r.E3)(...t)}`,u=(t,e,i={})=>{s(t,o(t,e,i.mapAttrs),i)},h=(t,e,i=[])=>{if(!i.length)return;const r=i.reduce(((e,i)=>Object.assign(e,{[i]:{get:()=>t[i],set(e){t[i]=e}}})),{});Object.defineProperties(e,r)}},2061:(t,e,i)=>{i.d(e,{E3:()=>n,GL:()=>r,lo:()=>o,mf:()=>a,qC:()=>s});const r=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>r(t.filter((t=>!!t)).join("-")),s=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const i=t.slice().sort(),r=e.slice().sort();for(let t=0;t<i.length;t++)if(i[t]!==r[t])return!1;return!0}},7878:(t,e,i)=>{function r(t,e={}){const i=new Event(t,e);this[`on${t}`]?.(i),this.dispatchEvent(i)}i.d(e,{C:()=>r})},4201:(t,e,i)=>{i.d(e,{B:()=>p,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>n,Wf:()=>h,bi:()=>r,jI:()=>o,jl:()=>s,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,n=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,s=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`,o=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${n(t)}\n ${a(t)}\n ${o(t)}\n ${s(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 ${p(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`,h=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`},357:(t,e,i)=>{i.d(e,{A:()=>r});const r=t=>class extends t{#u(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#u()}}},2666:(t,e,i)=>{i.d(e,{_:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},1e3:(t,e,i)=>{i.d(e,{li:()=>A,Ae:()=>x.A,DM:()=>c,yk:()=>d,e4:()=>p,_A:()=>E._,mE:()=>I,wX:()=>b,QT:()=>S.Q,Iw:()=>C,dj:()=>f});var r=i(5279),n=i(2061),s=i(4567),a=i(5561);class o{constructor(){this.styleMap=new Map}add(t,e,i){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:i}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,i])=>`${t}${e} { \n${i.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const l=(t,e)=>Object.keys(e).reduce(((e,i)=>Object.assign(e,{[i]:(0,s.Tk)(t,i)})),{}),d=({mappings:t={},componentNameOverride:e=""})=>i=>{const d=e||i.componentName;return class extends i{static get cssVarList(){return{...i.cssVarList,...l(d,{...t})}}#h;#c;#m;#b;#g;#v;#y;#f;#x;constructor({getRootElement:e,componentNameSuffix:i="",themeSection:s=r.qg,baseSelector:a}={}){super(),this.#b=i,this.#g=s,this.#y=a??this.baseSelector,this.#x=e,this.#f=Object.keys(t).map((t=>(0,n.E3)("st",i,t)))}get#E(){return a.componentsThemeManager.currentTheme?.[d]||""}#w(){this.#c.innerHTML=this.#E[this.#g]}#C(){this.#c=document.createElement("style"),this.#c.id=`style-mixin-theme__${d}`,this.#v.prepend(this.#c),this.#m=a.componentsThemeManager.onCurrentThemeChange(this.#w.bind(this)),this.#w()}#A(){if(this.#f.length){this.#h=document.createElement("style"),this.#h.id=`style-mixin-overrides__${d}`;const i=(t=d,e=r.k4,Array(e).fill(`.${t}`).join(""));this.#h.innerText=`:host(${i}) {}`,this.#v.append(this.#h)}var t,e}#S(t,e){const i=this.#h?.sheet?.cssRules[0].style;if(!i)return;const r=(0,s.Tk)(d,t.replace(new RegExp("^st-"),""));e?i?.setProperty(r,e):(i?.removeProperty(r),this.removeAttribute(t))}#I(t=[]){let e=!1;t.forEach((t=>{this.#f.includes(t)&&(this.#S(t,this.getAttribute(t)),e=!0)})),e&&(this.#h.innerHTML=this.#h?.sheet?.cssRules[0].cssText)}#V(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${d}`,e.innerHTML=((t,e,i)=>{const r=new o;return Object.keys(i).forEach((a=>{const o=((t,e)=>{const i={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...i,...t}))):[{...i,...e}]:[i]})(a,i[a]),l=(0,s.Tk)(t,a);o.forEach((({selector:t,property:i,important:s,fallback:a})=>{r.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(i)?i():i,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(s?"!important":""))}))})),r.toString()})((0,n.E3)(d,this.#b),this.#y,t),this.#v.prepend(e)}}#$(t){(this.#v.classList||this.#v.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#v=await(this.#x?.(this))||this.shadowRoot,this.#$(d),this.#V(),this.#C(),this.#A(),(0,s.FX)(this,this.#I.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#m?.()}}},p=t=>class extends t{#k=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#k=document.createElement("style"),this.#k.innerText="* { cursor: inherit!important }"}#L(t){t?this.shadowRoot.appendChild(this.#k):this.#k.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const i=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",i),t.target.removeEventListener("dragend",i)};t.target.addEventListener("mouseup",i,{once:!0}),t.target.addEventListener("dragend",i,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),"draggable"===t&&this.#L("true"===i)}};var u=i(2561),h=i(7878);const c=({componentName:t,wrappedEleName:e,slots:i=[],style:r,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:d=!0})=>{class p extends((0,u.s)({componentName:t,baseSelector:e})){#M=h.C.bind(this,"blur");#T=h.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:d}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(r)?r():r}</style>\n\t\t\t<${e}>\n\t\t\t${i.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#M()})),this.baseElement.addEventListener("focus",(t=>{this.#T()})),(0,s.Db)(this.baseElement,this,l),(0,s.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return p};i(5910);const m=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...m]}static get formAssociated(){return!0}#_;get internals(){return this.#_}set internals(t){this.#_=t}constructor(){super(),this.#_=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:i,typeMismatch:r,stepMismatch:n,tooShort:s,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:d,customError:p}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case i||r||n||d:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case s:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case p:return this.validationMessage;default:return""}}#O(){const t=this.isReadOnly?{}:this.getValidity();this.#_.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#_.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#_.validity.valid}reportValidity(){return this.#_.reportValidity()}get validity(){return this.#_.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#_.setValidity({customError:!0},t,this.validationTarget):(this.#_.setValidity({}),this.#O())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#_.form}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),m.includes(t)&&this.#O()}init(){super.init?.(),this.addEventListener("change",this.#O),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#O),setTimeout((()=>this.#O()))}},g=["invalid","required"],v=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},y=({proxyProps:t=[],inputEvent:e="input",proxyParentValidation:i=!1})=>r=>class extends(b(r)){static get observedAttributes(){return[...r.observedAttributes||[],...g]}#P;#q=h.C.bind(this,"change");constructor(){super(),this.#P=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#P&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#P)return this.#P;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#P=v(t)||v(e),this.#P}set inputElement(t){this.#P=t}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()}))})),this.baseElement.addEventListener("change",(()=>{this.#q()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()})),t.forEach((t=>{var e,i;e=this.inputElement,i=t,Object.defineProperty(this,i,{set(t){e[i]=t},get:()=>e[i],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,s.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,i)=>"function"==typeof t[i]&&"setValidity"===i?(...r)=>{if(3===r.length){const t=r.slice(0,r.length-1);t.push(e.inputElement),e.internals[i](...t)}else e.internals[i](...r);return t[i](...r)}:"function"==typeof t[i]?(...r)=>(e.internals[i](...r),t[i](...r)):t[i]})}}},f=t=>(0,n.qC)(y(t),d({componentNameOverride:(0,s.iY)("input-wrapper")}));var x=i(357),E=i(2666);const w=t=>async e=>{const i=await t(e);return new Promise((t=>{let e=0;const r=()=>{if(e>20)return console.error("could not get shadow root for element",i),void t(i);e++,i?.shadowRoot?t(i.shadowRoot):setTimeout(r)};r()}))},C=({name:t,selector:e,mappings:i={},forward:{attributes:a=[],include:o=!0}={}})=>p=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),h=d({mappings:i})(p);return class extends h{static get cssVarList(){return{...h.cssVarList,[u]:l((0,n.E3)(p.componentName,"_"+u),i)}}#z;constructor(){const t=w((async t=>{const i=t.shadowRoot.querySelector(t.baseSelector);return e?(await w((()=>i))(t)).querySelector(e):i}));super({getRootElement:t,componentNameSuffix:"_"+u,themeSection:r.qM+u,baseSelector:":host"}),this.#z=t(this).then((t=>t.host))}async#D(){const t=await this.#z;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#z;(0,s.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#D()}}},A=t=>class extends t{#q=h.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#q(),this.prevValue=this.value)}))}};var S=i(8084);const I=t=>class extends t{init(){this.#R(),super.init?.()}#R(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,h.C.call(this,"blur"),h.C.call(this,"focusout",{bubbles:!0})}))}));const i=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(h.C.call(this,"focus"),h.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",i),t?.addEventListener("focus",i)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,i)=>{i.d(e,{Q:()=>s});var r=i(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],s=t=>class extends t{init(){super.init?.(),(0,r.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
126
+ `}}(0,l.M)(f)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9656],{6867:(e,t,i)=>{i.d(t,{Z:()=>p,f:()=>a});var n=i(3878),s=i(4567);const a=(0,s.iY)("saml-group-mappings-internal"),l=(0,n.P)({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.oP)(this,this.groupInputElement,{mapAttrs:{"label-group":"label"},includeAttrs:["size","label-group","readonly","disabled"]}),(0,s.oP)(this,this.mappingsElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","readonly","disabled","data-errormessage-pattern-mismatch"]}),(0,s.FX)(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)}}},4115:(e,t,i)=>{i.r(t);var n=i(6867);customElements.define(n.f,n.Z)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9476,9656],{6867:(e,t,i)=>{i.d(t,{Z:()=>p,f:()=>a});var n=i(3878),s=i(4567);const a=(0,s.iY)("saml-group-mappings-internal"),l=(0,n.P)({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.oP)(this,this.groupInputElement,{mapAttrs:{"label-group":"label"},includeAttrs:["size","label-group","readonly","disabled"]}),(0,s.oP)(this,this.mappingsElement,{includeAttrs:["size","full-width","label-value","label-attr","button-label","separator","options","readonly","disabled","data-errormessage-pattern-mismatch"]}),(0,s.FX)(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)}}},4115:(e,t,i)=>{i.r(t);var n=i(6867);customElements.define(n.f,n.Z)},3277:(e,t,i)=>{i.r(t),i.d(t,{SamlGroupMappingsClass:()=>d}),i(9381);var n=i(1e3),s=i(2061),a=i(4567),l=i(6867);const p=(0,a.iY)("saml-group-mappings"),{host:r,groupInput:o}={host:{selector:()=>":host"},groupInput:{selector:"descope-text-field"}},d=(0,s.qC)((0,n.yk)({mappings:{hostWidth:{...r,property:"width"},hostDirection:{...r,property:"direction"},groupNameInputMarginBottom:{...o,property:"margin-bottom"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"],inputEvent:"input",triggerValidationEvents:["mapping-item-added","mapping-item-removed"],proxyParentValidation:!0}),n.Ae,(e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${l.f}\n tabindex="-1"\n ></${l.f}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(l.f),(0,a.oP)(this,this.inputElement,{includeAttrs:["size","full-width","label-group","label-value","label-attr","button-label","separator","options","readonly","disabled"]}),(0,a.tg)(this,this.inputElement,{includeAttrs:["invalid"]})}}))((0,n.DM)({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(9357),i(5894),i(4115),customElements.define(p,d)}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.290",
3
+ "version": "1.0.291",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",