@descope/web-components-ui 1.0.343 → 1.0.345

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. package/dist/cjs/index.cjs.js +8 -1
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +8 -1
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/4392.js +1 -1
  6. package/dist/umd/DescopeDev.js +1 -1
  7. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  8. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  9. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  10. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  11. package/dist/umd/descope-combo-box-index-js.js +1 -1
  12. package/dist/umd/descope-email-field-index-js.js +1 -1
  13. package/dist/umd/descope-enriched-text-index-js.js +1 -1
  14. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  15. package/dist/umd/descope-grid-index-js.js +1 -1
  16. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  17. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  18. package/dist/umd/descope-new-password-index-js.js +1 -1
  19. package/dist/umd/descope-number-field-index-js.js +1 -1
  20. package/dist/umd/descope-passcode-index-js.js +1 -1
  21. package/dist/umd/descope-password-index-js.js +1 -1
  22. package/dist/umd/descope-radio-group-index-js.js +1 -1
  23. package/dist/umd/descope-recaptcha-index-js.js +1 -1
  24. package/dist/umd/descope-text-area-index-js.js +1 -1
  25. package/dist/umd/descope-text-field-index-js.js +1 -1
  26. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  27. package/package.json +1 -1
  28. package/src/components/descope-enriched-text/EnrichedTextClass.js +1 -1
  29. package/src/components/descope-recaptcha/RecaptchaClass.js +6 -0
  30. package/src/helpers/themeHelpers/resetHelpers.js +1 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see boolean-fields-descope-checkbox-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3726,769],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var i=n(2061),o=n(94978),r=n(33346);const a=(...e)=>(0,i.qC)(o.wX,o.li,o.QT,o.mE)((0,r.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>r});var i=n(54567),o=n(51250);const r=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,i.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.Db)(this.inputElement,this,["checked"]),(0,i.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(e,t,n)=>{n.d(t,{Z:()=>d,f:()=>r});var i=n(73878),o=n(54567);const r=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.P)({componentName:r,baseSelector:"div"}),d=class extends l{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:a}),(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}:{}}}},86676:(e,t,n)=>{n.r(t);var i=n(51250);customElements.define(i.f,i.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>k});var i=n(54567),o=n(2061),r=n(94978),a=n(40818),l=n(46882),d=n(54201);const s=(0,i.iY)("checkbox"),{host:p,component:c,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:f,helperText:x,errorMessage:g}={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)"}},k=(0,o.qC)((0,r.yk)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:[p,h,b],fontFamily:[b,x,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...g,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...c,property:"font-size"}]}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,a.h)((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.Z}\n ${(0,d.bi)(k.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:s}));n(43092),n(79789),n(86676),customElements.define(s,k)},54201:(e,t,n)=>{n.d(t,{B:()=>p,DY:()=>d,PH:()=>s,Pd:()=>a,TX:()=>o,Wf:()=>h,bi:()=>i,bz:()=>u,jI:()=>l,jl:()=>r,wm:()=>c});const i=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`,r=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,p=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${l(e)}\n ${r(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 ${p(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`,h=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`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(e,t,n)=>{n.d(t,{b:()=>o});var i=n(78591);class o extends i.n{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3726,769],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var i=n(2061),o=n(94978),r=n(33346);const a=(...e)=>(0,i.qC)(o.wX,o.li,o.QT,o.mE)((0,r.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>r});var i=n(54567),o=n(51250);const r=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,i.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.Db)(this.inputElement,this,["checked"]),(0,i.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(e,t,n)=>{n.d(t,{Z:()=>d,f:()=>r});var i=n(73878),o=n(54567);const r=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.P)({componentName:r,baseSelector:"div"}),d=class extends l{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:a}),(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}:{}}}},86676:(e,t,n)=>{n.r(t);var i=n(51250);customElements.define(i.f,i.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>k});var i=n(54567),o=n(2061),r=n(94978),a=n(40818),l=n(46882),d=n(54201);const s=(0,i.iY)("checkbox"),{host:p,component:c,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:f,helperText:x,errorMessage:g}={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)"}},k=(0,o.qC)((0,r.yk)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:[p,h,b],fontFamily:[b,x,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...g,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...c,property:"font-size"}]}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,a.h)((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.Z}\n ${(0,d.bi)(k.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:s}));n(43092),n(79789),n(86676),customElements.define(s,k)},54201:(e,t,n)=>{n.d(t,{B:()=>p,DY:()=>d,PH:()=>s,Pd:()=>a,TX:()=>o,Wf:()=>h,bi:()=>i,bz:()=>u,jI:()=>l,jl:()=>r,wm:()=>c});const i=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`,r=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,p=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${l(e)}\n ${r(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 ${p(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`,h=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`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},73208:(e,t,n)=>{n.d(t,{b:()=>o});var i=n(78591);class o extends i.n{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see boolean-fields-descope-switch-toggle-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4483,769],{73878:(t,e,n)=>{n.d(e,{P:()=>a});var i=n(2061),o=n(94978),r=n(33346);const a=(...t)=>(0,i.qC)(o.wX,o.li,o.QT,o.mE)((0,r.s)(...t))},40818:(t,e,n)=>{n.d(e,{h:()=>r});var i=n(54567),o=n(51250);const r=t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.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(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,i.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.Db)(this.inputElement,this,["checked"]),(0,i.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(t,e,n)=>{n.d(e,{Z:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(t,e,n)=>{n.d(e,{Z:()=>d,f:()=>r});var i=n(73878),o=n(54567);const r=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.P)({componentName:r,baseSelector:"div"}),d=class extends l{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(t){this.checkbox.checked=t}get checked(){return this.value}set checked(t){this.value=t}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:a}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},86676:(t,e,n)=>{n.r(e);var i=n(51250);customElements.define(i.f,i.Z)},89203:(t,e,n)=>{n.r(e),n.d(e,{SwitchToggleClass:()=>g});var i=n(54567),o=n(2061),r=n(94978),a=n(40818),l=n(46882),d=n(54201);const s=(0,i.iY)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:b,checkboxLabel:u,requiredIndicator:f,helperText:x,errorMessage:k}={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)"}},g=(0,o.qC)((0,r.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,u,u],fontFamily:[u,x,k],labelTextColor:{...u,property:"color"},labelSpacing:{...u,property:"padding-inline-start"},labelLineHeight:{...u,property:"line-height"},labelFontWeight:{...u,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...k,property:"color"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...b,property:"font-size"},{...h,property:"height"}],knobSize:[{...b,property:"width"},{...b,property:"height"}],knobTextColor:{...b,property:"color"},knobRadius:{...b,property:"border-radius"},knobTransitionDuration:{...b,property:"transition"},knobColor:{...b,property:"background-color"},knobTopOffset:{...b,property:"top"},knobLeftOffset:{...b,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,a.h)((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.Z}\n\t\t\t${(0,d.bi)(g.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 vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex"],componentName:s}));n(43092),n(79789),n(86676),customElements.define(s,g)},54201:(t,e,n)=>{n.d(e,{B:()=>c,DY:()=>d,PH:()=>s,Pd:()=>a,TX:()=>o,Wf:()=>h,bi:()=>i,bz:()=>b,jI:()=>l,jl:()=>r,wm:()=>p});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,r=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${r(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 ${c(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`,b=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>o});var i=n(78591);class o extends i.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4483,769],{73878:(t,e,n)=>{n.d(e,{P:()=>a});var i=n(2061),o=n(94978),r=n(33346);const a=(...t)=>(0,i.qC)(o.wX,o.li,o.QT,o.mE)((0,r.s)(...t))},40818:(t,e,n)=>{n.d(e,{h:()=>r});var i=n(54567),o=n(51250);const r=t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.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(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,i.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.Db)(this.inputElement,this,["checked"]),(0,i.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(t,e,n)=>{n.d(e,{Z:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(t,e,n)=>{n.d(e,{Z:()=>d,f:()=>r});var i=n(73878),o=n(54567);const r=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.P)({componentName:r,baseSelector:"div"}),d=class extends l{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(t){this.checkbox.checked=t}get checked(){return this.value}set checked(t){this.value=t}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:a}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},86676:(t,e,n)=>{n.r(e);var i=n(51250);customElements.define(i.f,i.Z)},89203:(t,e,n)=>{n.r(e),n.d(e,{SwitchToggleClass:()=>g});var i=n(54567),o=n(2061),r=n(94978),a=n(40818),l=n(46882),d=n(54201);const s=(0,i.iY)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:b,checkboxLabel:u,requiredIndicator:f,helperText:x,errorMessage:k}={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)"}},g=(0,o.qC)((0,r.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,u,u],fontFamily:[u,x,k],labelTextColor:{...u,property:"color"},labelSpacing:{...u,property:"padding-inline-start"},labelLineHeight:{...u,property:"line-height"},labelFontWeight:{...u,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...k,property:"color"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...b,property:"font-size"},{...h,property:"height"}],knobSize:[{...b,property:"width"},{...b,property:"height"}],knobTextColor:{...b,property:"color"},knobRadius:{...b,property:"border-radius"},knobTransitionDuration:{...b,property:"transition"},knobColor:{...b,property:"background-color"},knobTopOffset:{...b,property:"top"},knobLeftOffset:{...b,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,a.h)((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.Z}\n\t\t\t${(0,d.bi)(g.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 vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex"],componentName:s}));n(43092),n(79789),n(86676),customElements.define(s,g)},54201:(t,e,n)=>{n.d(e,{B:()=>c,DY:()=>d,PH:()=>s,Pd:()=>a,TX:()=>o,Wf:()=>h,bi:()=>i,bz:()=>b,jI:()=>l,jl:()=>r,wm:()=>p});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,r=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${r(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 ${c(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`,b=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>o});var i=n(78591);class o extends i.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5263,9122,6656],{73878:(t,e,n)=>{n.d(e,{P:()=>s});var i=n(2061),r=n(94978),o=n(33346);const s=(...t)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},49434:(t,e,n)=>{n.d(e,{Mc:()=>p,W2:()=>u,Xm:()=>o});var i=n(54567),r=n(54201);const o=t=>class extends t{#t=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#e;get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},u={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},itemsSpacing:{...d,property:"gap"}},p=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.Wf)("vaadin-text-field")}\n\t\t\t${(0,r.Pd)("vaadin-text-field")}\n `},99214:(t,e,n)=>{n.d(e,{D:()=>s});var i=n(73878),r=n(54567),o=n(37878);const s=t=>{class e extends((0,i.P)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <style>\n slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n }\n </style>\n <slot part="wrapper"></slot>\n '}dispatchChange=o.C.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.FX)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},78292:(t,e,n)=>{n.d(e,{G:()=>o,f:()=>s});var i=n(54567),r=n(99214);const o=(0,i.iY)("button-multi-selection-group-internal");class s extends((0,r.D)(o)){#n(){return this.items.filter((t=>t.hasAttribute("selected")))}onClick(t){t.target!==t.currentTarget&&(this.#n().includes(t.target)?t.target.removeAttribute("selected"):t.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#n().map((t=>t.value))}set value(t){this.items.forEach((e=>{t.includes(e.value)?e.setAttribute("selected","true"):e.removeAttribute("selected")}))}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#i(t){const e=Array.isArray(t);return e||console.error("default-values must be an array, received:",t),e}get defaultValues(){const t=this.getAttribute("default-values");if(t)try{const e=JSON.parse(t);if(this.#i(e))return e}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){setTimeout((()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())}))}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},66793:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupInternalClass:()=>i.f});var i=n(78292);customElements.define(i.G,i.f)},53795:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupClass:()=>d});var i=n(94978),r=n(78292),o=n(2061),s=n(54567),a=n(49434);const l=(0,s.iY)("button-multi-selection-group"),d=(0,o.qC)((0,i.yk)({mappings:{...a.W2}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,a.Xm,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.G}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.G}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.G),(0,s.oP)(this,this.inputElement,{includeAttrs:["size","default-values","min-items-selection","max-items-selection"]})}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.Mc,excludeAttrsSync:["tabindex"],componentName:l}));n(66793),n(84873),customElements.define(l,d)},84873:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>c});var i=n(94978),r=n(33346),o=n(2061),s=n(54567),a=n(15964);const l=(0,s.iY)("button-selection-group-item");class d extends((0,r.s)({componentName:l,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n\t\t</style>\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,s.oP)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.oP)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const c=(0,o.qC)((0,i.yk)({mappings:{hostDirection:{selector:()=>a.n.componentName,property:a.n.cssVarList.hostDirection},backgroundColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.labelTextColor},borderColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderColor},borderWidth:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderWidth},borderStyle:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderStyle},borderRadius:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderRadius},outlineColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.outlineColor}}}),i.e4,i.Ae)(d);n(72018),customElements.define(l,c)},15964:(t,e,n)=>{n.d(e,{f:()=>l,n:()=>p});var i=n(2061),r=n(54567),o=n(94978),s=n(2549),a=n(93804);const l=(0,r.iY)("button"),{host:d,label:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"}};let u;const p=(0,i.qC)((0,o.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>`::slotted(${s.q.componentName})`,property:s.q.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"}}}),a.v,o.e4,o.Ae)((0,o.DM)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${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:l})),{color:h,fontSize:b}=p.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${h});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},93804:(t,e,n)=>{n.d(e,{v:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.n}),n(71721);var i=n(15964);customElements.define(i.f,i.n)},2549:(t,e,n)=>{n.d(e,{f:()=>a,q:()=>d});var i=n(94978),r=n(33346),o=n(2061),s=n(54567);const a=(0,s.iY)("icon");class l extends((0,r.s)({componentName:a,baseSelector:"slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get items(){return this.shadowRoot.querySelector("slot").assignedNodes()}#r(){this.items?.length>0?this.shadowRoot.host.style.setProperty("display","inline-block"):this.shadowRoot.host.style.setProperty("display","none"),this.querySelectorAll("*[fill]").forEach((t=>t.setAttribute("fill",`var(${d.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)))}init(){(0,s.P$)(this,this.#r.bind(this))}}const d=(0,o.qC)((0,i.yk)({mappings:{fill:{}}}),i.e4,i.Ae)(l)},54201:(t,e,n)=>{n.d(e,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>r,Wf:()=>p,bi:()=>i,bz:()=>h,jI:()=>a,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(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`,p=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5263,9122,6656],{73878:(t,e,n)=>{n.d(e,{P:()=>s});var i=n(2061),r=n(94978),o=n(33346);const s=(...t)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},49434:(t,e,n)=>{n.d(e,{Mc:()=>p,W2:()=>u,Xm:()=>o});var i=n(54567),r=n(54201);const o=t=>class extends t{#t=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#e;get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},u={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},itemsSpacing:{...d,property:"gap"}},p=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.Wf)("vaadin-text-field")}\n\t\t\t${(0,r.Pd)("vaadin-text-field")}\n `},99214:(t,e,n)=>{n.d(e,{D:()=>s});var i=n(73878),r=n(54567),o=n(37878);const s=t=>{class e extends((0,i.P)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <style>\n slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n }\n </style>\n <slot part="wrapper"></slot>\n '}dispatchChange=o.C.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.FX)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},78292:(t,e,n)=>{n.d(e,{G:()=>o,f:()=>s});var i=n(54567),r=n(99214);const o=(0,i.iY)("button-multi-selection-group-internal");class s extends((0,r.D)(o)){#n(){return this.items.filter((t=>t.hasAttribute("selected")))}onClick(t){t.target!==t.currentTarget&&(this.#n().includes(t.target)?t.target.removeAttribute("selected"):t.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#n().map((t=>t.value))}set value(t){this.items.forEach((e=>{t.includes(e.value)?e.setAttribute("selected","true"):e.removeAttribute("selected")}))}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#i(t){const e=Array.isArray(t);return e||console.error("default-values must be an array, received:",t),e}get defaultValues(){const t=this.getAttribute("default-values");if(t)try{const e=JSON.parse(t);if(this.#i(e))return e}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){setTimeout((()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())}))}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},66793:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupInternalClass:()=>i.f});var i=n(78292);customElements.define(i.G,i.f)},53795:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupClass:()=>d});var i=n(94978),r=n(78292),o=n(2061),s=n(54567),a=n(49434);const l=(0,s.iY)("button-multi-selection-group"),d=(0,o.qC)((0,i.yk)({mappings:{...a.W2}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,a.Xm,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.G}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.G}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.G),(0,s.oP)(this,this.inputElement,{includeAttrs:["size","default-values","min-items-selection","max-items-selection"]})}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.Mc,excludeAttrsSync:["tabindex"],componentName:l}));n(66793),n(84873),customElements.define(l,d)},84873:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>c});var i=n(94978),r=n(33346),o=n(2061),s=n(54567),a=n(15964);const l=(0,s.iY)("button-selection-group-item");class d extends((0,r.s)({componentName:l,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n\t\t</style>\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,s.oP)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.oP)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const c=(0,o.qC)((0,i.yk)({mappings:{hostDirection:{selector:()=>a.n.componentName,property:a.n.cssVarList.hostDirection},backgroundColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.labelTextColor},borderColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderColor},borderWidth:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderWidth},borderStyle:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderStyle},borderRadius:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderRadius},outlineColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.outlineColor}}}),i.e4,i.Ae)(d);n(72018),customElements.define(l,c)},15964:(t,e,n)=>{n.d(e,{f:()=>l,n:()=>p});var i=n(2061),r=n(54567),o=n(94978),s=n(2549),a=n(93804);const l=(0,r.iY)("button"),{host:d,label:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"}};let u;const p=(0,i.qC)((0,o.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>`::slotted(${s.q.componentName})`,property:s.q.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"}}}),a.v,o.e4,o.Ae)((0,o.DM)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${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:l})),{color:h,fontSize:b}=p.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${h});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},93804:(t,e,n)=>{n.d(e,{v:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.n}),n(71721);var i=n(15964);customElements.define(i.f,i.n)},2549:(t,e,n)=>{n.d(e,{f:()=>a,q:()=>d});var i=n(94978),r=n(33346),o=n(2061),s=n(54567);const a=(0,s.iY)("icon");class l extends((0,r.s)({componentName:a,baseSelector:"slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get items(){return this.shadowRoot.querySelector("slot").assignedNodes()}#r(){this.items?.length>0?this.shadowRoot.host.style.setProperty("display","inline-block"):this.shadowRoot.host.style.setProperty("display","none"),this.querySelectorAll("*[fill]").forEach((t=>t.setAttribute("fill",`var(${d.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)))}init(){(0,s.P$)(this,this.#r.bind(this))}}const d=(0,o.qC)((0,i.yk)({mappings:{fill:{}}}),i.e4,i.Ae)(l)},54201:(t,e,n)=>{n.d(e,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>r,Wf:()=>p,bi:()=>i,bz:()=>h,jI:()=>a,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(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`,p=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2861,2313,6656],{73878:(t,e,n)=>{n.d(e,{P:()=>s});var i=n(2061),r=n(94978),o=n(33346);const s=(...t)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},49434:(t,e,n)=>{n.d(e,{Mc:()=>h,W2:()=>p,Xm:()=>o});var i=n(54567),r=n(54201);const o=t=>class extends t{#t=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#e;get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},p={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},itemsSpacing:{...d,property:"gap"}},h=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.Wf)("vaadin-text-field")}\n\t\t\t${(0,r.Pd)("vaadin-text-field")}\n `},99214:(t,e,n)=>{n.d(e,{D:()=>s});var i=n(73878),r=n(54567),o=n(37878);const s=t=>{class e extends((0,i.P)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <style>\n slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n }\n </style>\n <slot part="wrapper"></slot>\n '}dispatchChange=o.C.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.FX)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},28284:(t,e,n)=>{n.d(e,{B:()=>s,f:()=>o});var i=n(54567),r=n(99214);const o=(0,i.iY)("button-selection-group-internal");class s extends((0,r.D)(o)){getSelectedNode(){return this.items.find((t=>t.hasAttribute("selected")))}get allowDeselect(){return"true"===this.getAttribute("allow-deselect")}removeSelected(){this.getSelectedNode()?.removeAttribute("selected")}onClick(t){t.target!==t.currentTarget&&(t.target===this.getSelectedNode()&&this.allowDeselect?this.removeSelected():this.setSelected(t.target),this.dispatchChange())}setSelected(t){t!==this.getSelectedNode()&&(this.removeSelected(),t?.setAttribute("selected","true"))}get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue,this.setCustomValidity())}))}get value(){return this.getSelectedNode()?.value||""}set value(t){const e=this.items.find((e=>e.value===t));this.setSelected(e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}init(){super.init(),this.setDefaultValue(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},88901:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupInternalClass:()=>i.B});var i=n(28284);customElements.define(i.f,i.B)},84873:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>c});var i=n(94978),r=n(33346),o=n(2061),s=n(54567),a=n(15964);const l=(0,s.iY)("button-selection-group-item");class d extends((0,r.s)({componentName:l,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n\t\t</style>\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,s.oP)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.oP)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const c=(0,o.qC)((0,i.yk)({mappings:{hostDirection:{selector:()=>a.n.componentName,property:a.n.cssVarList.hostDirection},backgroundColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.labelTextColor},borderColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderColor},borderWidth:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderWidth},borderStyle:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderStyle},borderRadius:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderRadius},outlineColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.outlineColor}}}),i.e4,i.Ae)(d);n(72018),customElements.define(l,c)},94887:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>d});var i=n(94978),r=n(28284),o=n(2061),s=n(54567),a=n(49434);const l=(0,s.iY)("button-selection-group"),d=(0,o.qC)((0,i.yk)({mappings:{...a.W2}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,a.Xm,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.f}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,s.oP)(this,this.inputElement,{includeAttrs:["size","default-value","allow-deselect"]})}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.Mc,excludeAttrsSync:["tabindex"],componentName:l}));n(88901),n(84873),customElements.define(l,d)},15964:(t,e,n)=>{n.d(e,{f:()=>l,n:()=>h});var i=n(2061),r=n(54567),o=n(94978),s=n(2549),a=n(93804);const l=(0,r.iY)("button"),{host:d,label:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"}};let p;const h=(0,i.qC)((0,o.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>`::slotted(${s.q.componentName})`,property:s.q.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"}}}),a.v,o.e4,o.Ae)((0,o.DM)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:u,fontSize:b}=h.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${u});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},93804:(t,e,n)=>{n.d(e,{v:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.n}),n(71721);var i=n(15964);customElements.define(i.f,i.n)},2549:(t,e,n)=>{n.d(e,{f:()=>a,q:()=>d});var i=n(94978),r=n(33346),o=n(2061),s=n(54567);const a=(0,s.iY)("icon");class l extends((0,r.s)({componentName:a,baseSelector:"slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get items(){return this.shadowRoot.querySelector("slot").assignedNodes()}#n(){this.items?.length>0?this.shadowRoot.host.style.setProperty("display","inline-block"):this.shadowRoot.host.style.setProperty("display","none"),this.querySelectorAll("*[fill]").forEach((t=>t.setAttribute("fill",`var(${d.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)))}init(){(0,s.P$)(this,this.#n.bind(this))}}const d=(0,o.qC)((0,i.yk)({mappings:{fill:{}}}),i.e4,i.Ae)(l)},54201:(t,e,n)=>{n.d(e,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>r,Wf:()=>h,bi:()=>i,bz:()=>u,jI:()=>a,jl:()=>o,wm:()=>p});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(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`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2861,2313,6656],{73878:(t,e,n)=>{n.d(e,{P:()=>s});var i=n(2061),r=n(94978),o=n(33346);const s=(...t)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},49434:(t,e,n)=>{n.d(e,{Mc:()=>h,W2:()=>p,Xm:()=>o});var i=n(54567),r=n(54201);const o=t=>class extends t{#t=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#e;get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},p={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},itemsSpacing:{...d,property:"gap"}},h=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.Wf)("vaadin-text-field")}\n\t\t\t${(0,r.Pd)("vaadin-text-field")}\n `},99214:(t,e,n)=>{n.d(e,{D:()=>s});var i=n(73878),r=n(54567),o=n(37878);const s=t=>{class e extends((0,i.P)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <style>\n slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n }\n </style>\n <slot part="wrapper"></slot>\n '}dispatchChange=o.C.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.FX)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},28284:(t,e,n)=>{n.d(e,{B:()=>s,f:()=>o});var i=n(54567),r=n(99214);const o=(0,i.iY)("button-selection-group-internal");class s extends((0,r.D)(o)){getSelectedNode(){return this.items.find((t=>t.hasAttribute("selected")))}get allowDeselect(){return"true"===this.getAttribute("allow-deselect")}removeSelected(){this.getSelectedNode()?.removeAttribute("selected")}onClick(t){t.target!==t.currentTarget&&(t.target===this.getSelectedNode()&&this.allowDeselect?this.removeSelected():this.setSelected(t.target),this.dispatchChange())}setSelected(t){t!==this.getSelectedNode()&&(this.removeSelected(),t?.setAttribute("selected","true"))}get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue,this.setCustomValidity())}))}get value(){return this.getSelectedNode()?.value||""}set value(t){const e=this.items.find((e=>e.value===t));this.setSelected(e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}init(){super.init(),this.setDefaultValue(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},88901:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupInternalClass:()=>i.B});var i=n(28284);customElements.define(i.f,i.B)},84873:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>c});var i=n(94978),r=n(33346),o=n(2061),s=n(54567),a=n(15964);const l=(0,s.iY)("button-selection-group-item");class d extends((0,r.s)({componentName:l,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n\t\t</style>\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,s.oP)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.oP)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const c=(0,o.qC)((0,i.yk)({mappings:{hostDirection:{selector:()=>a.n.componentName,property:a.n.cssVarList.hostDirection},backgroundColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.labelTextColor},borderColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderColor},borderWidth:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderWidth},borderStyle:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderStyle},borderRadius:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderRadius},outlineColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.outlineColor}}}),i.e4,i.Ae)(d);n(72018),customElements.define(l,c)},94887:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>d});var i=n(94978),r=n(28284),o=n(2061),s=n(54567),a=n(49434);const l=(0,s.iY)("button-selection-group"),d=(0,o.qC)((0,i.yk)({mappings:{...a.W2}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,a.Xm,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.f}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,s.oP)(this,this.inputElement,{includeAttrs:["size","default-value","allow-deselect"]})}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.Mc,excludeAttrsSync:["tabindex"],componentName:l}));n(88901),n(84873),customElements.define(l,d)},15964:(t,e,n)=>{n.d(e,{f:()=>l,n:()=>h});var i=n(2061),r=n(54567),o=n(94978),s=n(2549),a=n(93804);const l=(0,r.iY)("button"),{host:d,label:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"}};let p;const h=(0,i.qC)((0,o.yk)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>`::slotted(${s.q.componentName})`,property:s.q.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"}}}),a.v,o.e4,o.Ae)((0,o.DM)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:u,fontSize:b}=h.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${u});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},93804:(t,e,n)=>{n.d(e,{v:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.n}),n(71721);var i=n(15964);customElements.define(i.f,i.n)},2549:(t,e,n)=>{n.d(e,{f:()=>a,q:()=>d});var i=n(94978),r=n(33346),o=n(2061),s=n(54567);const a=(0,s.iY)("icon");class l extends((0,r.s)({componentName:a,baseSelector:"slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get items(){return this.shadowRoot.querySelector("slot").assignedNodes()}#n(){this.items?.length>0?this.shadowRoot.host.style.setProperty("display","inline-block"):this.shadowRoot.host.style.setProperty("display","none"),this.querySelectorAll("*[fill]").forEach((t=>t.setAttribute("fill",`var(${d.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)))}init(){(0,s.P$)(this,this.#n.bind(this))}}const d=(0,o.qC)((0,i.yk)({mappings:{fill:{}}}),i.e4,i.Ae)(l)},54201:(t,e,n)=>{n.d(e,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>r,Wf:()=>h,bi:()=>i,bz:()=>u,jI:()=>a,jl:()=>o,wm:()=>p});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(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`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see descope-combo-box-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9483],{84049:(t,e,o)=>{o.d(e,{H:()=>g,f:()=>l});var r=o(2061),n=o(54567),i=o(54201),a=o(94978);const l=(0,n.iY)("combo-box"),{host:s,inputField:d,inputElement:p,placeholder:c,toggle:u,clearButton:b,label:h,requiredIndicator:m,helperText:v,errorMessage:y}={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)"}},g=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontSize:[{},s],fontFamily:[h,c,d,v,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:[{...h,property:"color"},{...m,property:"color"}],errorMessageTextColor:{...y,property:"color"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...m,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...u,property:"cursor"},{...b,property:"cursor"}],inputDropdownButtonColor:[{...u,property:"color"},{...b,property:"color"}],inputDropdownButtonSize:[{...u,property:"font-size"},{...b,property:"font-size"}],inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],labelPosition:{...h,property:"position"},labelTopPosition:{...h,property:"top"},labelHorizontalPosition:[{...h,property:"left"},{...h,property:"right"}],inputTransformY:{...h,property:"transform"},inputTransition:{...h,property:"transition"},marginInlineStart:{...h,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...p,property:"height"},valueInputMarginBottom:{...p,property:"margin-bottom"},overlayBackground:{property:()=>g.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>g.cssVarList.overlay.textColor},overlayBorder:{property:()=>g.cssVarList.overlay.border},overlayFontSize:{property:()=>g.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>g.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>g.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>g.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>g.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>g.cssVarList.overlay.itemPaddingInlineEnd}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.dj)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),a.Ae,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:o})=>`<span data-name="${o}" data-id="${e}">${t||o}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(o){if(!e.baseElement.items?.length)return;const r=e.customValueTransformFn(o)||"";r!==this.value&&t.set.call(this,r)}}})}#o(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,o)=>{t.innerHTML=o.item.outerHTML}}#r(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#r(),this.renderItems(),(0,n.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,n.P$)(this,this.#o.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&"label-type"===t&&("floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return this.baseElement.selectedItem?.["data-id"]||""}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.bi)(g.cssVarList)}\n\t\t${(0,i.PH)("vaadin-combo-box")}\n\t\t${(0,i.jI)("vaadin-combo-box")}\n\t\t${(0,i.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,i.Wf)("vaadin-combo-box")}\n ${(0,i.bz)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},21294:(t,e,o)=>{o.r(e),o.d(e,{ComboBoxClass:()=>r.H}),o(47583);var r=o(84049);customElements.define(r.f,r.H)},54201:(t,e,o)=>{o.d(e,{B:()=>p,DY:()=>s,PH:()=>d,Pd:()=>a,TX:()=>n,Wf:()=>u,bi:()=>r,bz:()=>b,jI:()=>l,jl:()=>i,wm:()=>c});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`,i=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",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`,c=(t,e)=>`\n ${n(t)}\n ${a(t)}\n ${l(t)}\n ${i(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`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,b=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},47583:(t,e,o)=>{o(48900),o(53891),o(21578),o(71189);var r=o(83208),n=o(46570);const i=n.iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9483],{84049:(t,e,o)=>{o.d(e,{H:()=>g,f:()=>l});var r=o(2061),n=o(54567),i=o(54201),a=o(94978);const l=(0,n.iY)("combo-box"),{host:s,inputField:d,inputElement:p,placeholder:c,toggle:u,clearButton:b,label:h,requiredIndicator:m,helperText:v,errorMessage:y}={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)"}},g=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontSize:[{},s],fontFamily:[h,c,d,v,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:[{...h,property:"color"},{...m,property:"color"}],errorMessageTextColor:{...y,property:"color"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...m,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...u,property:"cursor"},{...b,property:"cursor"}],inputDropdownButtonColor:[{...u,property:"color"},{...b,property:"color"}],inputDropdownButtonSize:[{...u,property:"font-size"},{...b,property:"font-size"}],inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],labelPosition:{...h,property:"position"},labelTopPosition:{...h,property:"top"},labelHorizontalPosition:[{...h,property:"left"},{...h,property:"right"}],inputTransformY:{...h,property:"transform"},inputTransition:{...h,property:"transition"},marginInlineStart:{...h,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...p,property:"height"},valueInputMarginBottom:{...p,property:"margin-bottom"},overlayBackground:{property:()=>g.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>g.cssVarList.overlay.textColor},overlayBorder:{property:()=>g.cssVarList.overlay.border},overlayFontSize:{property:()=>g.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>g.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>g.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>g.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>g.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>g.cssVarList.overlay.itemPaddingInlineEnd}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.dj)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),a.Ae,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:o})=>`<span data-name="${o}" data-id="${e}">${t||o}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(o){if(!e.baseElement.items?.length)return;const r=e.customValueTransformFn(o)||"";r!==this.value&&t.set.call(this,r)}}})}#o(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,o)=>{t.innerHTML=o.item.outerHTML}}#r(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#r(),this.renderItems(),(0,n.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,n.P$)(this,this.#o.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&"label-type"===t&&("floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return this.baseElement.selectedItem?.["data-id"]||""}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.bi)(g.cssVarList)}\n\t\t${(0,i.PH)("vaadin-combo-box")}\n\t\t${(0,i.jI)("vaadin-combo-box")}\n\t\t${(0,i.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,i.Wf)("vaadin-combo-box")}\n ${(0,i.bz)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},21294:(t,e,o)=>{o.r(e),o.d(e,{ComboBoxClass:()=>r.H}),o(47583);var r=o(84049);customElements.define(r.f,r.H)},54201:(t,e,o)=>{o.d(e,{B:()=>p,DY:()=>s,PH:()=>d,Pd:()=>a,TX:()=>n,Wf:()=>u,bi:()=>r,bz:()=>b,jI:()=>l,jl:()=>i,wm:()=>c});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`,i=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",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`,c=(t,e)=>`\n ${n(t)}\n ${a(t)}\n ${l(t)}\n ${i(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`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,b=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},47583:(t,e,o)=>{o(48900),o(53891),o(21578),o(71189);var r=o(83208),n=o(46570);const i=n.iv`
3
3
  :host {
4
4
  outline: none;
5
5
  }
@@ -16,7 +16,7 @@
16
16
  direction: rtl;
17
17
  text-align: left;
18
18
  }
19
- `;(0,r.hC)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.n{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,l.M)(s);var d=n(94978),u=n(4447),c=n(2061),h=n(54567),f=n(54201);const m=(0,h.iY)("email-field"),g=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.setAttribute("autocomplete",this.getAutocompleteType())}getAutocompleteType(){return this.getAttribute("autocomplete")||"username"}}))((0,d.DM)({slots:["","suffix"],wrappedEleName:"vaadin-email-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(${g.cssVarList.inputOutlineWidth}) + var(${g.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,f.Wf)("vaadin-email-field")}\n\t\t\t${(0,f.bi)(g.cssVarList)}\n\t\t\t${(0,f.wm)("vaadin-email-field",g.cssVarList)}\n ${(0,f.bz)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:m}));customElements.define(m,g)},4447:(t,e,n)=>{n.d(e,{Z:()=>f});const{host:i,label:r,placeholder:o,requiredIndicator:l,inputField:a,input:p,helperText:s,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,inputIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"}},f={fontSize:[{},i],fontFamily:[r,a,s,d],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...l,property:"color"},{...r,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputBackgroundColor:{...a,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...c,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},inputTextAlign:[{...p,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"}],labelPosition:{...r,property:"position"},labelTopPosition:{...r,property:"top"},labelHorizontalPosition:[{...r,property:"left"},{...r,property:"right"}],inputTransformY:{...r,property:"transform"},inputTransition:{...r,property:"transition"},marginInlineStart:{...r,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"}],valueInputHeight:[{...p,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"}],inputIconOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],inputIconSize:{...h,property:"font-size"},inputIconColor:{...h,property:"color"}}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>p,PH:()=>s,Pd:()=>l,TX:()=>r,Wf:()=>c,bi:()=>i,bz:()=>h,jI:()=>a,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${l(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>r});var i=n(78591);class r extends i.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,n)=>{n.d(e,{j:()=>r});var i=n(73406);const r=t=>class extends((0,i.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},18005:(t,e,n)=>{n.d(e,{n:()=>h}),n(13553);var i=n(74241),r=n(52807),o=n(12521),l=n(34463),a=n(62743),p=n(46570),s=n(73208),d=n(20422),u=n(46729);const c=t=>class extends((0,d.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,p.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.Tb)((0,o.S)(i.H3)))){static get is(){return"vaadin-text-field"}static get template(){return i.dy`
19
+ `;(0,r.hC)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.n{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,l.M)(s);var d=n(94978),u=n(4447),c=n(2061),h=n(54567),f=n(54201);const m=(0,h.iY)("email-field"),g=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.setAttribute("autocomplete",this.getAutocompleteType())}getAutocompleteType(){return this.getAttribute("autocomplete")||"username"}}))((0,d.DM)({slots:["","suffix"],wrappedEleName:"vaadin-email-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(${g.cssVarList.inputOutlineWidth}) + var(${g.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,f.Wf)("vaadin-email-field")}\n\t\t\t${(0,f.bi)(g.cssVarList)}\n\t\t\t${(0,f.wm)("vaadin-email-field",g.cssVarList)}\n ${(0,f.bz)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:m}));customElements.define(m,g)},4447:(t,e,n)=>{n.d(e,{Z:()=>f});const{host:i,label:r,placeholder:o,requiredIndicator:l,inputField:a,input:p,helperText:s,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,inputIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"}},f={fontSize:[{},i],fontFamily:[r,a,s,d],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...l,property:"color"},{...r,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputBackgroundColor:{...a,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...c,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},inputTextAlign:[{...p,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"}],labelPosition:{...r,property:"position"},labelTopPosition:{...r,property:"top"},labelHorizontalPosition:[{...r,property:"left"},{...r,property:"right"}],inputTransformY:{...r,property:"transform"},inputTransition:{...r,property:"transition"},marginInlineStart:{...r,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"}],valueInputHeight:[{...p,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"}],inputIconOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],inputIconSize:{...h,property:"font-size"},inputIconColor:{...h,property:"color"}}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>p,PH:()=>s,Pd:()=>l,TX:()=>r,Wf:()=>c,bi:()=>i,bz:()=>h,jI:()=>a,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${l(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>r});var i=n(78591);class r extends i.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,n)=>{n.d(e,{j:()=>r});var i=n(73406);const r=t=>class extends((0,i.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},18005:(t,e,n)=>{n.d(e,{n:()=>h}),n(13553);var i=n(74241),r=n(52807),o=n(12521),l=n(34463),a=n(62743),p=n(46570),s=n(73208),d=n(20422),u=n(46729);const c=t=>class extends((0,d.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,p.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.Tb)((0,o.S)(i.H3)))){static get is(){return"vaadin-text-field"}static get template(){return i.dy`
20
20
  <style>
21
21
  [part='input-field'] {
22
22
  flex-grow: 0;
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5158],{20212:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>d});var n=r(84569),o=r(94978),s=r(2061),i=r(54567);const l=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"];var h=r(33346);const a=(0,i.iY)("enriched-text");class c extends((0,h.s)({componentName:a,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n word-break: break-all;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n text-decoration: none;\n cursor: pointer;\n }\n a:hover {\n text-decoration: underline;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n </style>\n <slot part="text-wrapper" style="display:none"></slot>\n <div class="content"></div>\n ',this.textSlot=this.shadowRoot.querySelector("slot"),this.#r(),(0,i.P$)(this,this.#n.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o)),this.processor.renderer.rules.em_close=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,n,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,n,o)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(l)}#i(){this.#s()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,n,o)=>o.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,n,o)=>o.renderToken(e,t,r))}#r(){this.processor=new n.Z,this.#l(),this.#i(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#n(){if(!this.processor)return;let e=this.textContent;try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const d=(0,s.qC)((0,o.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:{selector:()=>":host strong",property:"font-weight"},textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},minHeight:{},minWidth:{}}}),(0,o.yk)({componentNameOverride:(0,i.iY)("link")}),o.e4,o.Ae)(c);customElements.define(a,d)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5158],{20212:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>c});var n=r(84569),o=r(94978),s=r(2061),i=r(54567);const l=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"];var h=r(33346);const a=(0,i.iY)("enriched-text");class d extends((0,h.s)({componentName:a,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n text-decoration: none;\n cursor: pointer;\n }\n a:hover {\n text-decoration: underline;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n </style>\n <slot part="text-wrapper" style="display:none"></slot>\n <div class="content"></div>\n ',this.textSlot=this.shadowRoot.querySelector("slot"),this.#r(),(0,i.P$)(this,this.#n.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o)),this.processor.renderer.rules.em_close=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,n,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,n,o)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(l)}#i(){this.#s()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,n,o)=>o.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,n,o)=>o.renderToken(e,t,r))}#r(){this.processor=new n.Z,this.#l(),this.#i(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#n(){if(!this.processor)return;let e=this.textContent;try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const c=(0,s.qC)((0,o.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:{selector:()=>":host strong",property:"font-weight"},textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},minHeight:{},minWidth:{}}}),(0,o.yk)({componentNameOverride:(0,i.iY)("link")}),o.e4,o.Ae)(d);customElements.define(a,c)}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see descope-grid-descope-grid-selection-column-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7487,769,3726],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var i=n(2061),r=n(94978),d=n(33346);const a=(...e)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,d.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>d});var i=n(54567),r=n(51250);const d=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${r.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${r.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,i.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.Db)(this.inputElement,this,["checked"]),(0,i.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>d});var i=n(73878),r=n(54567);const d=(0,r.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,i.P)({componentName:d,baseSelector:"div"}),l=class extends s{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,r.oP)(this,this.checkbox,{includeAttrs:a}),(0,r.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}:{}}}},86676:(e,t,n)=>{n.r(t);var i=n(51250);customElements.define(i.f,i.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>v});var i=n(54567),r=n(2061),d=n(94978),a=n(40818),s=n(46882),l=n(54201);const o=(0,i.iY)("checkbox"),{host:c,component:h,checkboxElement:_,checkboxSurface:p,checkboxLabel:u,requiredIndicator:g,helperText:b,errorMessage:m}={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)"}},v=(0,r.qC)((0,d.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,_,u],fontFamily:[u,b,m],labelTextColor:{...u,property:"color"},labelSpacing:{...u,property:"padding-inline-start"},labelLineHeight:{...u,property:"line-height"},labelFontWeight:{...u,property:"font-weight"},labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},inputValueTextColor:{...p,property:"color"},inputBackgroundColor:{..._,property:"background-color"},inputBorderRadius:{..._,property:"border-radius"},inputBorderWidth:{..._,property:"border-width"},inputBorderOffset:{..._,property:"border-offset"},inputBorderColor:{..._,property:"border-color"},inputBorderStyle:{..._,property:"border-style"},inputOutlineWidth:{..._,property:"outline-width"},inputOutlineOffset:{..._,property:"outline-offset"},inputOutlineColor:{..._,property:"outline-color"},inputOutlineStyle:{..._,property:"outline-style"},inputSize:[{..._,property:"width"},{..._,property:"height"},{...p,property:"font-size"},{...h,property:"font-size"}]}}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"]}),d.Ae,a.h)((0,d.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.Z}\n ${(0,l.bi)(v.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:o}));n(43092),n(79789),n(86676),customElements.define(o,v)},52238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(63483);var i=n(54567),r=n(28623);const d=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},a=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class s extends r.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=d(),n.addEventListener("input",(()=>{const e=a(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",a(t))}_defaultRenderer(e,t,n){const i=e.parentNode;let r=e.querySelector("descope-checkbox");r||(r=d(),e.appendChild(r)),r.onchange=()=>{r.checked?i.selectItem(n.item):i.deselectItem(n.item)},r.setAttribute("checked",n.selected)}}const l=(0,i.iY)("grid-selection-column");customElements.define(l,s)},54201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>o,Pd:()=>a,TX:()=>r,Wf:()=>_,bi:()=>i,bz:()=>p,jI:()=>s,jl:()=>d,wm:()=>h});const i=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,r=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,d=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(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",o=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 ${r(e)}\n ${a(e)}\n ${s(e)}\n ${d(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`,_=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`,p=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},14905:(e,t,n)=>{function i(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}n.d(t,{U:()=>i})},40262:(e,t,n)=>{function i(e){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}n.d(t,{k:()=>i})},73208:(e,t,n)=>{n.d(t,{b:()=>r});var i=n(78591);class r extends i.n{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},28623:(e,t,n)=>{n.d(t,{w:()=>l}),n(93556),n(20764);var i=n(52807),r=n(65517),d=n(99109);const a=e=>class extends e{static get properties(){return{width:{type:String,value:"58px",sync:!0},flexGrow:{type:Number,value:0,sync:!0},selectAll:{type:Boolean,value:!1,notify:!0,sync:!0},autoSelect:{type:Boolean,value:!1,sync:!0},dragSelect:{type:Boolean,value:!1,sync:!0},_indeterminate:{type:Boolean,sync:!0},_selectAllHidden:Boolean}}static get observers(){return["_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, selectAll, _indeterminate, _selectAllHidden)"]}_defaultHeaderRenderer(e,t){let n=e.firstElementChild;n||(n=document.createElement("vaadin-checkbox"),n.setAttribute("aria-label","Select All"),n.classList.add("vaadin-grid-select-all-checkbox"),e.appendChild(n),n.addEventListener("checked-changed",this.__onSelectAllCheckedChanged.bind(this)));const i=this.__isChecked(this.selectAll,this._indeterminate);n.__rendererChecked=i,n.checked=i,n.hidden=this._selectAllHidden,n.indeterminate=this._indeterminate}_defaultRenderer(e,t,{item:n,selected:i}){let r=e.firstElementChild;r||(r=document.createElement("vaadin-checkbox"),r.setAttribute("aria-label","Select Row"),e.appendChild(r),r.addEventListener("checked-changed",this.__onSelectRowCheckedChanged.bind(this)),(0,d.NH)(e,"track",this.__onCellTrack.bind(this)),e.addEventListener("mousedown",this.__onCellMouseDown.bind(this)),e.addEventListener("click",this.__onCellClick.bind(this))),r.__item=n,r.__rendererChecked=i,r.checked=i}__onSelectAllCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(this._indeterminate||e.target.checked?this._selectAll():this._deselectAll())}__onSelectRowCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(e.target.checked?this._selectItem(e.target.__item):this._deselectItem(e.target.__item))}__onCellTrack(e){if(this.dragSelect)if(this.__dragCurrentY=e.detail.y,this.__dragDy=e.detail.dy,"start"===e.detail.state){const t=this._grid._getRenderedRows().find((t=>t.contains(e.currentTarget.assignedSlot)));this.__selectOnDrag=!this._grid._isSelected(t._item),this.__dragStartIndex=t.index,this.__dragStartItem=t._item,this.__dragAutoScroller()}else"end"===e.detail.state&&(this.__dragStartItem&&(this.__selectOnDrag?this._selectItem(this.__dragStartItem):this._deselectItem(this.__dragStartItem)),setTimeout((()=>{this.__dragStartIndex=void 0})))}__onCellMouseDown(e){this.dragSelect&&e.preventDefault()}__onCellClick(e){void 0!==this.__dragStartIndex&&e.preventDefault()}__dragAutoScroller(){if(void 0===this.__dragStartIndex)return;const e=this._grid._getRenderedRows(),t=e.find((e=>{const t=e.getBoundingClientRect();return this.__dragCurrentY>=t.top&&this.__dragCurrentY<=t.bottom}));let n=t?t.index:void 0;const i=this.__getScrollableArea();this.__dragCurrentY<i.top?n=this._grid._firstVisibleIndex:this.__dragCurrentY>i.bottom&&(n=this._grid._lastVisibleIndex),void 0!==n&&e.forEach((e=>{(n>this.__dragStartIndex&&e.index>=this.__dragStartIndex&&e.index<=n||n<this.__dragStartIndex&&e.index<=this.__dragStartIndex&&e.index>=n)&&(this.__selectOnDrag?this._selectItem(e._item):this._deselectItem(e._item),this.__dragStartItem=void 0)}));const r=.15*i.height;if(this.__dragDy<0&&this.__dragCurrentY<i.top+r){const e=i.top+r-this.__dragCurrentY,t=Math.min(1,e/r);this._grid.$.table.scrollTop-=10*t}if(this.__dragDy>0&&this.__dragCurrentY>i.bottom-r){const e=this.__dragCurrentY-(i.bottom-r),t=Math.min(1,e/r);this._grid.$.table.scrollTop+=10*t}setTimeout((()=>this.__dragAutoScroller()),10)}__getScrollableArea(){const e=this._grid.$.table.getBoundingClientRect(),t=this._grid.$.header.getBoundingClientRect(),n=this._grid.$.footer.getBoundingClientRect();return{top:e.top+t.height,bottom:e.bottom-n.height,left:e.left,right:e.right,height:e.height-t.height-n.height,width:e.width}}_selectAll(){}_deselectAll(){}_selectItem(e){}_deselectItem(e){}__isChecked(e,t){return t||e}},s=e=>class extends(a(e)){static get properties(){return{__previousActiveItem:Object}}static get observers(){return["__onSelectAllChanged(selectAll)"]}constructor(){super(),this.__boundOnActiveItemChanged=this.__onActiveItemChanged.bind(this),this.__boundOnDataProviderChanged=this.__onDataProviderChanged.bind(this),this.__boundOnSelectedItemsChanged=this.__onSelectedItemsChanged.bind(this)}disconnectedCallback(){this._grid.removeEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.removeEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.removeEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.removeEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),this._grid&&(this._grid.addEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.addEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.addEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.addEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged))}__onSelectAllChanged(e){void 0!==e&&this._grid&&(this.__selectAllInitialized?this._selectAllChangeLock||(e&&this.__hasArrayDataProvider()?this.__withFilteredItemsArray((e=>{this._grid.selectedItems=e})):this._grid.selectedItems=[]):this.__selectAllInitialized=!0)}__arrayContains(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.every((t=>e.includes(t)))}_selectAll(){this.selectAll=!0}_deselectAll(){this.selectAll=!1}_selectItem(e){this._grid.selectItem(e)}_deselectItem(e){this._grid.deselectItem(e)}__onActiveItemChanged(e){const t=e.detail.value;if(this.autoSelect){const e=t||this.__previousActiveItem;e&&this._grid._toggleItem(e)}this.__previousActiveItem=t}__hasArrayDataProvider(){return Array.isArray(this._grid.items)&&!!this._grid.dataProvider}__onSelectedItemsChanged(){this._selectAllChangeLock=!0,this.__hasArrayDataProvider()&&this.__withFilteredItemsArray((e=>{this._grid.selectedItems.length?this.__arrayContains(this._grid.selectedItems,e)?(this.selectAll=!0,this._indeterminate=!1):(this.selectAll=!1,this._indeterminate=!0):(this.selectAll=!1,this._indeterminate=!1)})),this._selectAllChangeLock=!1}__onDataProviderChanged(){this._selectAllHidden=!Array.isArray(this._grid.items)}__withFilteredItemsArray(e){const t={page:0,pageSize:1/0,sortOrders:[],filters:this._grid._mapFilters()};this._grid.dataProvider(t,(t=>e(t)))}};class l extends(s(r.C)){static get is(){return"vaadin-grid-selection-column"}}(0,i.M)(l)}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7487,769,3726],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var i=n(2061),r=n(94978),d=n(33346);const a=(...e)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,d.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>d});var i=n(54567),r=n(51250);const d=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${r.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${r.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,i.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.Db)(this.inputElement,this,["checked"]),(0,i.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>d});var i=n(73878),r=n(54567);const d=(0,r.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,i.P)({componentName:d,baseSelector:"div"}),l=class extends s{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,r.oP)(this,this.checkbox,{includeAttrs:a}),(0,r.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}:{}}}},86676:(e,t,n)=>{n.r(t);var i=n(51250);customElements.define(i.f,i.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>v});var i=n(54567),r=n(2061),d=n(94978),a=n(40818),s=n(46882),l=n(54201);const o=(0,i.iY)("checkbox"),{host:c,component:h,checkboxElement:_,checkboxSurface:p,checkboxLabel:u,requiredIndicator:g,helperText:b,errorMessage:m}={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)"}},v=(0,r.qC)((0,d.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,_,u],fontFamily:[u,b,m],labelTextColor:{...u,property:"color"},labelSpacing:{...u,property:"padding-inline-start"},labelLineHeight:{...u,property:"line-height"},labelFontWeight:{...u,property:"font-weight"},labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},inputValueTextColor:{...p,property:"color"},inputBackgroundColor:{..._,property:"background-color"},inputBorderRadius:{..._,property:"border-radius"},inputBorderWidth:{..._,property:"border-width"},inputBorderOffset:{..._,property:"border-offset"},inputBorderColor:{..._,property:"border-color"},inputBorderStyle:{..._,property:"border-style"},inputOutlineWidth:{..._,property:"outline-width"},inputOutlineOffset:{..._,property:"outline-offset"},inputOutlineColor:{..._,property:"outline-color"},inputOutlineStyle:{..._,property:"outline-style"},inputSize:[{..._,property:"width"},{..._,property:"height"},{...p,property:"font-size"},{...h,property:"font-size"}]}}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"]}),d.Ae,a.h)((0,d.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.Z}\n ${(0,l.bi)(v.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:o}));n(43092),n(79789),n(86676),customElements.define(o,v)},52238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(63483);var i=n(54567),r=n(28623);const d=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},a=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class s extends r.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=d(),n.addEventListener("input",(()=>{const e=a(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",a(t))}_defaultRenderer(e,t,n){const i=e.parentNode;let r=e.querySelector("descope-checkbox");r||(r=d(),e.appendChild(r)),r.onchange=()=>{r.checked?i.selectItem(n.item):i.deselectItem(n.item)},r.setAttribute("checked",n.selected)}}const l=(0,i.iY)("grid-selection-column");customElements.define(l,s)},54201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>o,Pd:()=>a,TX:()=>r,Wf:()=>_,bi:()=>i,bz:()=>p,jI:()=>s,jl:()=>d,wm:()=>h});const i=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,r=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,d=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(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",o=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 ${r(e)}\n ${a(e)}\n ${s(e)}\n ${d(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`,_=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`,p=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},14905:(e,t,n)=>{function i(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}n.d(t,{U:()=>i})},40262:(e,t,n)=>{function i(e){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}n.d(t,{k:()=>i})},73208:(e,t,n)=>{n.d(t,{b:()=>r});var i=n(78591);class r extends i.n{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},28623:(e,t,n)=>{n.d(t,{w:()=>l}),n(93556),n(20764);var i=n(52807),r=n(65517),d=n(99109);const a=e=>class extends e{static get properties(){return{width:{type:String,value:"58px",sync:!0},flexGrow:{type:Number,value:0,sync:!0},selectAll:{type:Boolean,value:!1,notify:!0,sync:!0},autoSelect:{type:Boolean,value:!1,sync:!0},dragSelect:{type:Boolean,value:!1,sync:!0},_indeterminate:{type:Boolean,sync:!0},_selectAllHidden:Boolean}}static get observers(){return["_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, selectAll, _indeterminate, _selectAllHidden)"]}_defaultHeaderRenderer(e,t){let n=e.firstElementChild;n||(n=document.createElement("vaadin-checkbox"),n.setAttribute("aria-label","Select All"),n.classList.add("vaadin-grid-select-all-checkbox"),e.appendChild(n),n.addEventListener("checked-changed",this.__onSelectAllCheckedChanged.bind(this)));const i=this.__isChecked(this.selectAll,this._indeterminate);n.__rendererChecked=i,n.checked=i,n.hidden=this._selectAllHidden,n.indeterminate=this._indeterminate}_defaultRenderer(e,t,{item:n,selected:i}){let r=e.firstElementChild;r||(r=document.createElement("vaadin-checkbox"),r.setAttribute("aria-label","Select Row"),e.appendChild(r),r.addEventListener("checked-changed",this.__onSelectRowCheckedChanged.bind(this)),(0,d.NH)(e,"track",this.__onCellTrack.bind(this)),e.addEventListener("mousedown",this.__onCellMouseDown.bind(this)),e.addEventListener("click",this.__onCellClick.bind(this))),r.__item=n,r.__rendererChecked=i,r.checked=i}__onSelectAllCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(this._indeterminate||e.target.checked?this._selectAll():this._deselectAll())}__onSelectRowCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(e.target.checked?this._selectItem(e.target.__item):this._deselectItem(e.target.__item))}__onCellTrack(e){if(this.dragSelect)if(this.__dragCurrentY=e.detail.y,this.__dragDy=e.detail.dy,"start"===e.detail.state){const t=this._grid._getRenderedRows().find((t=>t.contains(e.currentTarget.assignedSlot)));this.__selectOnDrag=!this._grid._isSelected(t._item),this.__dragStartIndex=t.index,this.__dragStartItem=t._item,this.__dragAutoScroller()}else"end"===e.detail.state&&(this.__dragStartItem&&(this.__selectOnDrag?this._selectItem(this.__dragStartItem):this._deselectItem(this.__dragStartItem)),setTimeout((()=>{this.__dragStartIndex=void 0})))}__onCellMouseDown(e){this.dragSelect&&e.preventDefault()}__onCellClick(e){void 0!==this.__dragStartIndex&&e.preventDefault()}__dragAutoScroller(){if(void 0===this.__dragStartIndex)return;const e=this._grid._getRenderedRows(),t=e.find((e=>{const t=e.getBoundingClientRect();return this.__dragCurrentY>=t.top&&this.__dragCurrentY<=t.bottom}));let n=t?t.index:void 0;const i=this.__getScrollableArea();this.__dragCurrentY<i.top?n=this._grid._firstVisibleIndex:this.__dragCurrentY>i.bottom&&(n=this._grid._lastVisibleIndex),void 0!==n&&e.forEach((e=>{(n>this.__dragStartIndex&&e.index>=this.__dragStartIndex&&e.index<=n||n<this.__dragStartIndex&&e.index<=this.__dragStartIndex&&e.index>=n)&&(this.__selectOnDrag?this._selectItem(e._item):this._deselectItem(e._item),this.__dragStartItem=void 0)}));const r=.15*i.height;if(this.__dragDy<0&&this.__dragCurrentY<i.top+r){const e=i.top+r-this.__dragCurrentY,t=Math.min(1,e/r);this._grid.$.table.scrollTop-=10*t}if(this.__dragDy>0&&this.__dragCurrentY>i.bottom-r){const e=this.__dragCurrentY-(i.bottom-r),t=Math.min(1,e/r);this._grid.$.table.scrollTop+=10*t}setTimeout((()=>this.__dragAutoScroller()),10)}__getScrollableArea(){const e=this._grid.$.table.getBoundingClientRect(),t=this._grid.$.header.getBoundingClientRect(),n=this._grid.$.footer.getBoundingClientRect();return{top:e.top+t.height,bottom:e.bottom-n.height,left:e.left,right:e.right,height:e.height-t.height-n.height,width:e.width}}_selectAll(){}_deselectAll(){}_selectItem(e){}_deselectItem(e){}__isChecked(e,t){return t||e}},s=e=>class extends(a(e)){static get properties(){return{__previousActiveItem:Object}}static get observers(){return["__onSelectAllChanged(selectAll)"]}constructor(){super(),this.__boundOnActiveItemChanged=this.__onActiveItemChanged.bind(this),this.__boundOnDataProviderChanged=this.__onDataProviderChanged.bind(this),this.__boundOnSelectedItemsChanged=this.__onSelectedItemsChanged.bind(this)}disconnectedCallback(){this._grid.removeEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.removeEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.removeEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.removeEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),this._grid&&(this._grid.addEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.addEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.addEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.addEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged))}__onSelectAllChanged(e){void 0!==e&&this._grid&&(this.__selectAllInitialized?this._selectAllChangeLock||(e&&this.__hasArrayDataProvider()?this.__withFilteredItemsArray((e=>{this._grid.selectedItems=e})):this._grid.selectedItems=[]):this.__selectAllInitialized=!0)}__arrayContains(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.every((t=>e.includes(t)))}_selectAll(){this.selectAll=!0}_deselectAll(){this.selectAll=!1}_selectItem(e){this._grid.selectItem(e)}_deselectItem(e){this._grid.deselectItem(e)}__onActiveItemChanged(e){const t=e.detail.value;if(this.autoSelect){const e=t||this.__previousActiveItem;e&&this._grid._toggleItem(e)}this.__previousActiveItem=t}__hasArrayDataProvider(){return Array.isArray(this._grid.items)&&!!this._grid.dataProvider}__onSelectedItemsChanged(){this._selectAllChangeLock=!0,this.__hasArrayDataProvider()&&this.__withFilteredItemsArray((e=>{this._grid.selectedItems.length?this.__arrayContains(this._grid.selectedItems,e)?(this.selectAll=!0,this._indeterminate=!1):(this.selectAll=!1,this._indeterminate=!0):(this.selectAll=!1,this._indeterminate=!1)})),this._selectAllChangeLock=!1}__onDataProviderChanged(){this._selectAllHidden=!Array.isArray(this._grid.items)}__withFilteredItemsArray(e){const t={page:0,pageSize:1/0,sortOrders:[],filters:this._grid._mapFilters()};this._grid.dataProvider(t,(t=>e(t)))}};class l extends(s(r.C)){static get is(){return"vaadin-grid-selection-column"}}(0,i.M)(l)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9461,769],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(2061),o=n(94978),i=n(33346);const a=(...e)=>(0,r.qC)(o.wX,o.li,o.QT,o.mE)((0,i.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(54567),o=n(51250);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"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(73878),o=n(54567);const i=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends s{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:a}),(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}:{}}}},86676:(e,t,n)=>{n.r(t);var r=n(51250);customElements.define(r.f,r.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(54567),o=n(2061),i=n(94978),a=n(40818),s=n(46882),l=n(54201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,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,b],fontFamily:[b,g,f],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,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,a.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.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(43092),n(79789),n(86676),customElements.define(d,x)},19278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>a});var r=n(54567),o=n(57044);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 a=(0,r.iY)("grid-custom-column");customElements.define(a,i)},52238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(63483);var r=n(54567),o=n(28623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},a=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class s extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=a(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",a(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,s)},57044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(30322);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))}}},42356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(54567),o=n(57044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},19950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(94595),n(42356),n(19278),n(52238);var r=n(2061),o=n(54567),i=n(94978);const a=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},s=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:b,selectedRow:m,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:{...b,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...m,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"},hostDirection:{...l,property:"direction",fallback:"ltr"}}}),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);a(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(a(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:s}));customElements.define(s,x)},54201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>o,Wf:()=>p,bi:()=>r,bz:()=>u,jI:()=>s,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`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(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 ${a(e)}\n ${s(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`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9461,769],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(2061),o=n(94978),i=n(33346);const a=(...e)=>(0,r.qC)(o.wX,o.li,o.QT,o.mE)((0,i.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(54567),o=n(51250);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"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).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`},51250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(73878),o=n(54567);const i=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends s{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:a}),(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}:{}}}},86676:(e,t,n)=>{n.r(t);var r=n(51250);customElements.define(r.f,r.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(54567),o=n(2061),i=n(94978),a=n(40818),s=n(46882),l=n(54201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,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,b],fontFamily:[b,g,f],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,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,a.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.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(43092),n(79789),n(86676),customElements.define(d,x)},19278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>a});var r=n(54567),o=n(57044);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 a=(0,r.iY)("grid-custom-column");customElements.define(a,i)},52238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(63483);var r=n(54567),o=n(28623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},a=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class s extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=a(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",a(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,s)},57044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(30322);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))}}},42356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(54567),o=n(57044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},19950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(94595),n(42356),n(19278),n(52238);var r=n(2061),o=n(54567),i=n(94978);const a=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},s=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:b,selectedRow:m,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:{...b,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...m,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"},hostDirection:{...l,property:"direction",fallback:"ltr"}}}),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);a(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(a(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:s}));customElements.define(s,x)},54201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>o,Wf:()=>p,bi:()=>r,bz:()=>u,jI:()=>s,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`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(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 ${a(e)}\n ${s(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`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);