@descope/web-components-ui 1.0.378 → 1.0.379
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +3166 -1257
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +4738 -2826
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1224.js +1 -1
- package/dist/umd/1438.js +3 -3
- package/dist/umd/1612.js +1 -1
- package/dist/umd/2773.js +4 -4
- package/dist/umd/3830.js +1 -1
- package/dist/umd/3951.js +1 -1
- package/dist/umd/3966.js +319 -0
- package/dist/umd/4024.js +1 -1
- package/dist/umd/4052.js +1 -1
- package/dist/umd/4392.js +1 -1
- package/dist/umd/4525.js +1 -1
- package/dist/umd/4978.js +1 -1
- package/dist/umd/5135.js +2 -2
- package/dist/umd/5517.js +1 -1
- package/dist/umd/5778.js +275 -0
- package/dist/umd/5806.js +1 -1
- package/dist/umd/5977.js +140 -0
- package/dist/umd/5977.js.LICENSE.txt +29 -0
- package/dist/umd/63.js +4 -4
- package/dist/umd/6770.js +1 -1
- package/dist/umd/7056.js +3 -3
- package/dist/umd/7284.js +1 -1
- package/dist/umd/7541.js +449 -0
- package/dist/umd/7541.js.LICENSE.txt +17 -0
- package/dist/umd/7911.js +2 -2
- package/dist/umd/{4028.js → 8060.js} +3 -3
- package/dist/umd/8137.js +1 -1
- package/dist/umd/8191.js +2 -2
- package/dist/umd/8655.js +123 -0
- package/dist/umd/9314.js +2 -2
- package/dist/umd/9423.js +6 -6
- package/dist/umd/9562.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-apps-list-index-js.js +1 -1
- package/dist/umd/descope-avatar-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-combo-box-index-js.js +5 -5
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -0
- package/dist/umd/descope-date-field-index-js.js +1 -0
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -4
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/package.json +11 -5
- package/src/components/descope-combo-box/ComboBoxClass.js +7 -1
- package/src/components/descope-date-field/DateCounterClass.js +83 -0
- package/src/components/descope-date-field/DateFieldClass.js +675 -0
- package/src/components/descope-date-field/consts.js +55 -0
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +666 -0
- package/src/components/descope-date-field/descope-calendar/helpers.js +186 -0
- package/src/components/descope-date-field/descope-calendar/index.js +9 -0
- package/src/components/descope-date-field/formats.js +49 -0
- package/src/components/descope-date-field/helpers.js +72 -0
- package/src/components/descope-date-field/icons.js +14 -0
- package/src/components/descope-date-field/index.js +10 -0
- package/src/components/descope-text-field/textFieldMappings.js +2 -0
- package/src/index.cjs.js +2 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -1
- package/src/mixins/inputValidationMixin.js +8 -2
- package/src/mixins/portalMixin.js +6 -3
- package/src/theme/components/calendar.js +94 -0
- package/src/theme/components/dateField.js +63 -0
- package/src/theme/components/index.js +4 -0
- package/src/theme/components/inputWrapper.js +6 -0
- package/src/theme/components/textField.js +1 -0
- package/dist/umd/4746.js +0 -124
- package/dist/umd/7531.js +0 -319
- package/dist/umd/8866.js +0 -275
- package/dist/umd/9092.js +0 -1086
- package/dist/umd/9092.js.LICENSE.txt +0 -27
- package/dist/umd/descope-date-picker-index-js.js +0 -1
- package/src/components/descope-date-picker/index.js +0 -20
- /package/dist/umd/{7531.js.LICENSE.txt → 3966.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8866.js.LICENSE.txt → 5778.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4028.js.LICENSE.txt → 8060.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4746.js.LICENSE.txt → 8655.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8569,8873,257,2528],{19843:(t,e,n)=>{n.r(e),n.d(e,{AppsListClass:()=>p}),n(78781),n(33120),n(31876);var s=n(2061),i=n(54567),o=n(94978);const r=()=>!0,a=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`;var l=n(32138);const d=(0,i.iY)("apps-list"),p=(0,s.qC)((0,o.yk)({mappings:{maxHeight:{selector:()=>":host"},minHeight:{selector:()=>":host"},hostDirection:{selector:()=>":host",property:"direction"},itemsFontWeight:{selector:l.k.componentName,property:l.k.cssVarList.fontWeight},itemsFontSize:{selector:l.k.componentName,property:l.k.cssVarList.fontSize},itemsTextAlign:{selector:l.k.componentName,property:l.k.cssVarList.textAlign}}}),(({itemRenderer:t=a,validateSchema:e=r,slotName:n,rerenderAttrsList:s=[]})=>o=>class extends o{#t=[];#e(t){if(!e)return!0;const n=e(t);return!0===n||(console.error("Data schema validation failed",n||""),!1)}#n(){const t=n?`*[slot="${n}"]`:":not([slot])";this.baseElement.querySelectorAll(t).forEach((t=>t.remove()))}#s(){this.#n(),this.data.forEach(((e,n)=>{const s="string"==typeof(i=t(e,n,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(i).content:i instanceof HTMLTemplateElement?i.content:(console.error("Invalid template",i),null);var i;this.baseElement.appendChild(s?.cloneNode(!0))}))}set data(t){this.#e(t)&&(this.#t=t,this.#s())}get data(){return this.#t}init(){super.init?.(),s.length?(0,i.FX)(this,(t=>{t.includes("data")&&this.#i(),t.some((t=>"data"!==t))&&this.#s()}),{includeAttrs:[...s,"data"]}):this.#s()}#i(){const t=this.getAttribute("data");if(t)try{this.#t=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback?.(t,e,n),n!==e&&"data"===t)try{this.data=JSON.parse(n)}catch(t){console.warn("Invalid JSON data",n)}}})({itemRenderer:({name:t,icon:e,url:n},s,i)=>`\n <a ${n?`href="${n}" title="${n}"`:""} target="_blank">\n <descope-list-item>\n <descope-avatar\n ${e?`img="${e}"`:""}\n ${t?`display-name="${t}" abbr=${((t,e=2)=>t.trim().split(" ").splice(0,e).map((t=>t[0]?.toUpperCase())).join(""))(t)}`:""}\n size=${i.size}\n ></descope-avatar>\n <descope-text\n variant="body1"\n mode="primary"\n >${t}</descope-text>\n </descope-list-item>\n </a>\n`,rerenderAttrsList:["size"]}),o.e4,o.Ae,(t=>class extends t{get size(){return this.getAttribute("size")||"sm"}}))((0,o.DM)({slots:["empty-state"],wrappedEleName:"descope-list",excludeAttrsSync:["tabindex","class","empty"],componentName:d,style:()=>`\n :host {\n width: 100%;\n display: inline-flex;\n }\n\n descope-text::part(text-wrapper) {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n a {\n text-decoration: none;\n }\n\n descope-text {\n ${l.k.cssVarList.hostDirection}: var(${p.cssVarList.hostDirection});\n }\n `}));customElements.define(d,p)},33120:(t,e,n)=>{n.r(e),n.d(e,{AvatarClass:()=>h});var s=n(94978),i=n(33346),o=n(2061),r=n(54567);const a=(0,r.iY)("avatar");class l extends((0,i.s)({componentName:a,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n </style>\n\n\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),(0,r.oP)(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const t=this.shadowRoot.querySelector(".editableBadge");(0,r.FX)(this,(()=>{t.style.display=this.isEditable?"":"none"}),{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:d,editableBadge:p,avatar:c}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},h=(0,o.qC)((0,s.yk)({mappings:{hostWidth:[{...d,property:"width"},{...d,property:"min-width"}],hostHeight:{...d,property:"height"},cursor:[c,d],hostDirection:{...d,property:"direction"},avatarTextColor:{...c,property:"color"},avatarBackgroundColor:{...c,property:"background-color"},editableIconColor:{...p,property:"color"},editableBorderColor:{...p,property:"border-color"},editableBackgroundColor:{...p,property:"background-color"}}}),s.e4,s.Ae)(l);n(62775),n(57911),n(56594),customElements.define(a,h)},78781:(t,e,n)=>{n.r(e),n.d(e,{ListClass:()=>c});var s=n(94978),i=n(33346),o=n(2061),r=n(54567);const a=(0,r.iY)("list-item"),l=(0,o.qC)((0,s.yk)({mappings:{padding:{},backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),s.e4,s.Ae,(t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <style>\n /*css*/\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n\n /*!css*/\n </style>\n <slot></slot>\n "}}),(t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",(t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",(()=>this.removeAttribute("active")),{once:!0})}))}}))((0,i.s)({componentName:a,baseSelector:"slot"})),d=(0,r.iY)("list");class p extends((0,i.s)({componentName:d,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<style>\n\t /*css*/\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n /*!css*/\n\t\t</style>\n\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t'}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#o(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#r(){this.items.forEach((t=>{let e=t;e.localName!==l.componentName&&(e=t.querySelector(l.componentName));const n="tiles"===this.variant?"tile":"row";e.setAttribute("variant",n)}))}init(){super.init?.(),(0,r.P$)(this,(()=>{this.#o(),this.#r(),this.#a()}))}get isReadOnly(){return"true"===this.getAttribute("readonly")}#a(){this.items.forEach((t=>{this.isReadOnly?t.setAttribute("inert",""):t.removeAttribute("inert")}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("variant"===t?this.#r():"readonly"===t&&this.#a())}}const c=(0,o.qC)((0,s.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),s.e4,s.Ae)(p);customElements.define(d,c),customElements.define(a,l)},32138:(t,e,n)=>{n.d(e,{f:()=>a,k:()=>d});var s=n(94978),i=n(2061),o=n(54567),r=n(33346);const a=(0,o.iY)("text");class l extends((0,r.s)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,o.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const d=(0,i.qC)((0,s.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),s.e4,s.Ae)(l)},31876:(t,e,n)=>{n.r(e),n.d(e,{TextClass:()=>s.k});var s=n(32138);customElements.define(s.f,s.k)}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8569,8873,257,2528],{19843:(t,e,n)=>{n.r(e),n.d(e,{AppsListClass:()=>p}),n(78781),n(33120),n(31876);var s=n(2061),i=n(54567),o=n(94978);const r=()=>!0,a=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`;var l=n(32138);const d=(0,i.iY)("apps-list"),p=(0,s.qC)((0,o.yk)({mappings:{maxHeight:{selector:()=>":host"},minHeight:{selector:()=>":host"},hostDirection:{selector:()=>":host",property:"direction"},itemsFontWeight:{selector:l.k.componentName,property:l.k.cssVarList.fontWeight},itemsFontSize:{selector:l.k.componentName,property:l.k.cssVarList.fontSize},itemsTextAlign:{selector:l.k.componentName,property:l.k.cssVarList.textAlign}}}),(({itemRenderer:t=a,validateSchema:e=r,slotName:n,rerenderAttrsList:s=[]})=>o=>class extends o{#t=[];#e(t){if(!e)return!0;const n=e(t);return!0===n||(console.error("Data schema validation failed",n||""),!1)}#n(){const t=n?`*[slot="${n}"]`:":not([slot])";this.baseElement.querySelectorAll(t).forEach((t=>t.remove()))}#s(){this.#n(),this.data.forEach(((e,n)=>{const s="string"==typeof(i=t(e,n,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(i).content:i instanceof HTMLTemplateElement?i.content:(console.error("Invalid template",i),null);var i;this.baseElement.appendChild(s?.cloneNode(!0))}))}set data(t){this.#e(t)&&(this.#t=t,this.#s())}get data(){return this.#t}init(){super.init?.(),s.length?(0,i.FX)(this,(t=>{t.includes("data")&&this.#i(),t.some((t=>"data"!==t))&&this.#s()}),{includeAttrs:[...s,"data"]}):this.#s()}#i(){const t=this.getAttribute("data");if(t)try{this.#t=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback?.(t,e,n),n!==e&&"data"===t)try{this.data=JSON.parse(n)}catch(t){console.warn("Invalid JSON data",n)}}})({itemRenderer:({name:t,icon:e,url:n},s,i)=>`\n <a ${n?`href="${n}" title="${n}"`:""} target="_blank">\n <descope-list-item>\n <descope-avatar\n ${e?`img="${e}"`:""}\n ${t?`display-name="${t}" abbr=${((t,e=2)=>t.trim().split(" ").splice(0,e).map((t=>t[0]?.toUpperCase())).join(""))(t)}`:""}\n size=${i.size}\n ></descope-avatar>\n <descope-text\n variant="body1"\n mode="primary"\n >${t}</descope-text>\n </descope-list-item>\n </a>\n`,rerenderAttrsList:["size"]}),o.e4,o.Ae,(t=>class extends t{get size(){return this.getAttribute("size")||"sm"}}))((0,o.DM)({slots:["empty-state"],wrappedEleName:"descope-list",excludeAttrsSync:["tabindex","class","empty"],componentName:d,style:()=>`\n :host {\n width: 100%;\n display: inline-flex;\n }\n\n descope-text::part(text-wrapper) {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n a {\n text-decoration: none;\n }\n\n descope-text {\n ${l.k.cssVarList.hostDirection}: var(${p.cssVarList.hostDirection});\n }\n `}));customElements.define(d,p)},33120:(t,e,n)=>{n.r(e),n.d(e,{AvatarClass:()=>h});var s=n(94978),i=n(33346),o=n(2061),r=n(54567);const a=(0,r.iY)("avatar");class l extends((0,i.s)({componentName:a,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n </style>\n\n\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),(0,r.oP)(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const t=this.shadowRoot.querySelector(".editableBadge");(0,r.FX)(this,(()=>{t.style.display=this.isEditable?"":"none"}),{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:d,editableBadge:p,avatar:c}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},h=(0,o.qC)((0,s.yk)({mappings:{hostWidth:[{...d,property:"width"},{...d,property:"min-width"}],hostHeight:{...d,property:"height"},cursor:[c,d],hostDirection:{...d,property:"direction"},avatarTextColor:{...c,property:"color"},avatarBackgroundColor:{...c,property:"background-color"},editableIconColor:{...p,property:"color"},editableBorderColor:{...p,property:"border-color"},editableBackgroundColor:{...p,property:"background-color"}}}),s.e4,s.Ae)(l);n(2131),n(57911),n(56594),customElements.define(a,h)},78781:(t,e,n)=>{n.r(e),n.d(e,{ListClass:()=>c});var s=n(94978),i=n(33346),o=n(2061),r=n(54567);const a=(0,r.iY)("list-item"),l=(0,o.qC)((0,s.yk)({mappings:{padding:{},backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),s.e4,s.Ae,(t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <style>\n /*css*/\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n\n /*!css*/\n </style>\n <slot></slot>\n "}}),(t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",(t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",(()=>this.removeAttribute("active")),{once:!0})}))}}))((0,i.s)({componentName:a,baseSelector:"slot"})),d=(0,r.iY)("list");class p extends((0,i.s)({componentName:d,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<style>\n\t /*css*/\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n /*!css*/\n\t\t</style>\n\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t'}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#o(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#r(){this.items.forEach((t=>{let e=t;e.localName!==l.componentName&&(e=t.querySelector(l.componentName));const n="tiles"===this.variant?"tile":"row";e.setAttribute("variant",n)}))}init(){super.init?.(),(0,r.P$)(this,(()=>{this.#o(),this.#r(),this.#a()}))}get isReadOnly(){return"true"===this.getAttribute("readonly")}#a(){this.items.forEach((t=>{this.isReadOnly?t.setAttribute("inert",""):t.removeAttribute("inert")}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("variant"===t?this.#r():"readonly"===t&&this.#a())}}const c=(0,o.qC)((0,s.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),s.e4,s.Ae)(p);customElements.define(d,c),customElements.define(a,l)},32138:(t,e,n)=>{n.d(e,{f:()=>a,k:()=>d});var s=n(94978),i=n(2061),o=n(54567),r=n(33346);const a=(0,o.iY)("text");class l extends((0,r.s)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,o.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const d=(0,i.qC)((0,s.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),s.e4,s.Ae)(l)},31876:(t,e,n)=>{n.r(e),n.d(e,{TextClass:()=>s.k});var s=n(32138);customElements.define(s.f,s.k)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8873],{33120:(t,e,n)=>{n.r(e),n.d(e,{AvatarClass:()=>h});var a=n(94978),o=n(33346),r=n(2061),i=n(54567);const s=(0,i.iY)("avatar");class d extends((0,o.s)({componentName:s,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n </style>\n\n\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),(0,i.oP)(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const t=this.shadowRoot.querySelector(".editableBadge");(0,i.FX)(this,(()=>{t.style.display=this.isEditable?"":"none"}),{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:l,editableBadge:c,avatar:p}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},h=(0,r.qC)((0,a.yk)({mappings:{hostWidth:[{...l,property:"width"},{...l,property:"min-width"}],hostHeight:{...l,property:"height"},cursor:[p,l],hostDirection:{...l,property:"direction"},avatarTextColor:{...p,property:"color"},avatarBackgroundColor:{...p,property:"background-color"},editableIconColor:{...c,property:"color"},editableBorderColor:{...c,property:"border-color"},editableBackgroundColor:{...c,property:"background-color"}}}),a.e4,a.Ae)(d);n(
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8873],{33120:(t,e,n)=>{n.r(e),n.d(e,{AvatarClass:()=>h});var a=n(94978),o=n(33346),r=n(2061),i=n(54567);const s=(0,i.iY)("avatar");class d extends((0,o.s)({componentName:s,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n </style>\n\n\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),(0,i.oP)(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const t=this.shadowRoot.querySelector(".editableBadge");(0,i.FX)(this,(()=>{t.style.display=this.isEditable?"":"none"}),{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:l,editableBadge:c,avatar:p}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},h=(0,r.qC)((0,a.yk)({mappings:{hostWidth:[{...l,property:"width"},{...l,property:"min-width"}],hostHeight:{...l,property:"height"},cursor:[p,l],hostDirection:{...l,property:"direction"},avatarTextColor:{...p,property:"color"},avatarBackgroundColor:{...p,property:"background-color"},editableIconColor:{...c,property:"color"},editableBorderColor:{...c,property:"border-color"},editableBackgroundColor:{...c,property:"background-color"}}}),a.e4,a.Ae)(d);n(2131),n(57911),n(56594),customElements.define(s,h)}}]);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-button-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9662,4024,4052],{15964:(t,e,o)=>{o.d(e,{f:()=>l,n:()=>m});var r=o(2061),n=o(54567),i=o(94978),a=o(2549),s=o(93804);const l=(0,n.iY)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const m=(0,r.qC)((0,i.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(${a.q.componentName})`,property:a.q.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),s.v,i.e4,i.Ae)((0,i.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(${m.cssVarList.outlineWidth}) + var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${m.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${m.cssVarList.hostHeight}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${m.cssVarList.hostWidth}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:p}=m.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${p}) / 2));\n\t\tleft: calc(50% - (var(${p}) / 2));\n\t\tborder-width: calc(var(${p}) / 10);\n\t\twidth: var(${p});\n\t\theight: var(${p});\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,o)=>{o.d(e,{v:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,o)=>{o.r(e),o.d(e,{ButtonClass:()=>r.n}),o(71721);var r=o(15964);customElements.define(r.f,r.n)},2549:(t,e,o)=>{o.d(e,{f:()=>l,q:()=>c});var r=o(94978),n=o(33346),i=o(2061),a=o(54567),s=o(52118);const l=(0,a.iY)("icon");class d extends((0,n.s)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&"src"===t&&(0,s.I)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const c=(0,i.qC)((0,r.yk)({mappings:{fill:{}}}),r.e4,r.Ae)(d)},52118:(t,e,o)=>{o.d(e,{I:()=>a});var r=o(27856),n=o.n(r);const i=t=>{const e=n().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},a=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const o=atob(t.slice(26));e=i(o)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const o=await fetch(t),r=await o.text();e=i(r)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},95229:(t,e,o)=>{o.d(e,{f:()=>r});const r=(0,o(91014).o)((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},21360:(t,e,o)=>{o.d(e,{W:()=>i});var r=o(91014),n=o(3550);const i=(0,r.o)((t=>class extends t{get _keyboardActive(){return(0,n.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},3550:(t,e,o)=>{o.d(e,{GF:()=>d,GO:()=>u,Gf:()=>n,LQ:()=>i,Qw:()=>c});let r=!1;function n(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function i(){return r}function a(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function s(t,e){const o=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===o||0===r?r>o:o>r}function l(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)s(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(l(t.slice(0,o)),l(t.slice(o)))}function d(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||a(t)}function c(t){return t.getRootNode().activeElement===t}function h(t,e){if(t.nodeType!==Node.ELEMENT_NODE||a(t))return!1;const o=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let n=r>0;r>=0&&e.push(o);let i=[];return i="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...i].forEach((t=>{n=h(t,e)||n})),n}function u(t){const e=[];return h(t,e)?l(e):e}window.addEventListener("keydown",(()=>{r=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{r=!1}),{capture:!0})},52628:(t,e,o)=>{o.d(e,{L:()=>r});const r=(0,o(91014).o)((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}))},58298:(t,e,o)=>{o.d(e,{N:()=>n});var r=o(95229);const n=t=>class extends((0,r.f)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},17078:(t,e,o)=>{o.d(e,{z:()=>b});var r=o(
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9662,4024,4052],{15964:(t,e,o)=>{o.d(e,{f:()=>l,n:()=>m});var r=o(2061),n=o(54567),i=o(94978),a=o(2549),s=o(93804);const l=(0,n.iY)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const m=(0,r.qC)((0,i.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(${a.q.componentName})`,property:a.q.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),s.v,i.e4,i.Ae)((0,i.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(${m.cssVarList.outlineWidth}) + var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${m.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${m.cssVarList.hostHeight}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${m.cssVarList.hostWidth}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:p}=m.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${p}) / 2));\n\t\tleft: calc(50% - (var(${p}) / 2));\n\t\tborder-width: calc(var(${p}) / 10);\n\t\twidth: var(${p});\n\t\theight: var(${p});\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,o)=>{o.d(e,{v:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},72018:(t,e,o)=>{o.r(e),o.d(e,{ButtonClass:()=>r.n}),o(71721);var r=o(15964);customElements.define(r.f,r.n)},2549:(t,e,o)=>{o.d(e,{f:()=>l,q:()=>c});var r=o(94978),n=o(33346),i=o(2061),a=o(54567),s=o(52118);const l=(0,a.iY)("icon");class d extends((0,n.s)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&"src"===t&&(0,s.I)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const c=(0,i.qC)((0,r.yk)({mappings:{fill:{}}}),r.e4,r.Ae)(d)},52118:(t,e,o)=>{o.d(e,{I:()=>a});var r=o(27856),n=o.n(r);const i=t=>{const e=n().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},a=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const o=atob(t.slice(26));e=i(o)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const o=await fetch(t),r=await o.text();e=i(r)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},95229:(t,e,o)=>{o.d(e,{f:()=>r});const r=(0,o(91014).o)((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},21360:(t,e,o)=>{o.d(e,{W:()=>i});var r=o(91014),n=o(3550);const i=(0,r.o)((t=>class extends t{get _keyboardActive(){return(0,n.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},3550:(t,e,o)=>{o.d(e,{GF:()=>d,GO:()=>u,Gf:()=>n,LQ:()=>i,Qw:()=>c});let r=!1;function n(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function i(){return r}function a(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function s(t,e){const o=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===o||0===r?r>o:o>r}function l(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)s(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(l(t.slice(0,o)),l(t.slice(o)))}function d(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||a(t)}function c(t){return t.getRootNode().activeElement===t}function h(t,e){if(t.nodeType!==Node.ELEMENT_NODE||a(t))return!1;const o=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let n=r>0;r>=0&&e.push(o);let i=[];return i="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...i].forEach((t=>{n=h(t,e)||n})),n}function u(t){const e=[];return h(t,e)?l(e):e}window.addEventListener("keydown",(()=>{r=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{r=!1}),{capture:!0})},52628:(t,e,o)=>{o.d(e,{L:()=>r});const r=(0,o(91014).o)((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}))},58298:(t,e,o)=>{o.d(e,{N:()=>n});var r=o(95229);const n=t=>class extends((0,r.f)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},17078:(t,e,o)=>{o.d(e,{z:()=>b});var r=o(3354),n=o(16155),i=o(52807),a=o(12521),s=o(34463),l=o(46570);const d=o(9392).iv`
|
3
3
|
:host {
|
4
4
|
display: inline-block;
|
5
5
|
position: relative;
|
@@ -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 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`
|
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"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.bi)(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
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
[part='toggle-button']::before {
|
8
8
|
content: var(--lumo-icons-dropdown);
|
9
9
|
}
|
10
|
-
`;(0,n.hC)("vaadin-combo-box",[r.J,i],{moduleId:"lumo-combo-box"}),o(13553);var a=o(
|
10
|
+
`;(0,n.hC)("vaadin-combo-box",[r.J,i],{moduleId:"lumo-combo-box"}),o(13553);var a=o(3354),l=o(52807),s=o(51914),d=o(45115);class p extends((0,d.O)((0,n.Tb)((0,s.U)(a.H3)))){static get template(){return a.dy`
|
11
11
|
<style>
|
12
12
|
:host {
|
13
13
|
display: block;
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<div part="content">
|
22
22
|
<slot></slot>
|
23
23
|
</div>
|
24
|
-
`}static get is(){return"vaadin-combo-box-item"}}(0,l.M)(p);var c=o(
|
24
|
+
`}static get is(){return"vaadin-combo-box-item"}}(0,l.M)(p);var c=o(14932),u=o(6196),b=o(43515);const h=n.iv`
|
25
25
|
#overlay {
|
26
26
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
27
27
|
}
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<div id="selector">
|
65
65
|
<slot></slot>
|
66
66
|
</div>
|
67
|
-
`}}(0,l.M)(y);var g=o(12521),f=o(34463),x=o(73406),w=o(73208),C=o(46729),$=o(39091);const k=t=>class extends((0,$.t)(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var I=o(62743),_=o(99031),S=o(
|
67
|
+
`}}(0,l.M)(y);var g=o(12521),f=o(34463),x=o(73406),w=o(73208),C=o(46729),$=o(39091);const k=t=>class extends((0,$.t)(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var I=o(62743),_=o(99031),S=o(66599);(0,n.hC)("vaadin-combo-box",I.J,{moduleId:"vaadin-combo-box-styles"});class E extends((0,_.Y)((0,S.t)(k((0,x.L)((0,n.Tb)((0,g.S)(a.H3))))))){static get is(){return"vaadin-combo-box"}static get template(){return a.dy`
|
68
68
|
<style>
|
69
69
|
:host([opened]) {
|
70
70
|
pointer-events: auto;
|
@@ -110,4 +110,4 @@
|
|
110
110
|
></vaadin-combo-box-overlay>
|
111
111
|
|
112
112
|
<slot name="tooltip"></slot>
|
113
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new w.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new C.v(this.inputElement,this._labelController)),this._tooltipController=new f.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}(0,l.M)(
|
113
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new w.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new C.v(this.inputElement,this._labelController)),this._tooltipController=new f.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}(0,l.M)(E)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9332,4348],{73878:(t,e,n)=>{n.d(e,{P:()=>i});var r=n(2061),a=n(94978),o=n(33346);const i=(...t)=>(0,r.qC)(a.wX,a.li,a.QT,a.mE)((0,o.s)(...t))},15964:(t,e,n)=>{n.d(e,{f:()=>l,n:()=>u});var r=n(2061),a=n(54567),o=n(94978),i=n(2549),s=n(93804);const l=(0,a.iY)("button"),{host:d,label:p,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let h;const u=(0,r.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(${i.q.componentName})`,property:i.q.cssVarList.fill},labelTextDecoration:{...p,property:"text-decoration"},labelSpacing:{...p,property:"gap"},textAlign:{...p,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),s.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${h}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:y}=u.cssVarList;h=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${y}) / 2));\n\t\tleft: calc(50% - (var(${y}) / 2));\n\t\tborder-width: calc(var(${y}) / 10);\n\t\twidth: var(${y});\n\t\theight: var(${y});\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:()=>r});const r=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:()=>r.n}),n(71721);var r=n(15964);customElements.define(r.f,r.n)},84049:(t,e,n)=>{n.d(e,{H:()=>v,f:()=>s});var r=n(2061),a=n(54567),o=n(54201),i=n(94978);const s=(0,a.iY)("combo-box"),{host:l,inputField:d,inputElement:p,placeholder:c,toggle:h,clearButton:u,label:b,requiredIndicator:y,helperText:m,errorMessage:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,r.qC)((0,i.yk)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:[{},l],fontFamily:[b,c,d,m,g],labelFontSize:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...y,property:"color"}],errorMessageTextColor:{...g,property:"color"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...y,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...h,property:"cursor"},{...u,property:"cursor"}],inputDropdownButtonColor:[{...h,property:"color"},{...u,property:"color"}],inputDropdownButtonSize:[{...h,property:"font-size"},{...u,property:"font-size"}],inputDropdownButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...p,property:"height"},valueInputMarginBottom:{...p,property:"margin-bottom"},overlayBackground:{property:()=>v.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>v.cssVarList.overlay.textColor},overlayBorder:{property:()=>v.cssVarList.overlay.border},overlayFontSize:{property:()=>v.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>v.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>v.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>v.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>v.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>v.cssVarList.overlay.itemPaddingInlineEnd}}}),i.e4,(0,i.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,i.dj)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),i.Ae,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:n})=>`<span data-name="${n}" data-id="${e}">${t||n}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}handleSelectedItem(){const t=this.baseElement.selectedItem?.["data-id"];this.baseElement.selectedItem=void 0,t&&(this.value=t),this.value||this.setDefaultValue()}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(n){if(!e.baseElement.items?.length)return;const r=e.customValueTransformFn(n)||"";r!==this.value&&t.set.call(this,r)}}})}#n(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),t.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)),t.renderer=(t,e,n)=>{t.innerHTML=n.item.outerHTML}}#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,a.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,a.P$)(this,this.#n.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"label-type"===t&&("floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.value=this.defaultValue}set value(t){if(t){const e=this.baseElement.items?.find((e=>e["data-id"]===t));e&&(this.baseElement.selectedItem=e)}else this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,i.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,o.bi)(v.cssVarList)}\n\t\t${(0,o.PH)("vaadin-combo-box")}\n\t\t${(0,o.jI)("vaadin-combo-box")}\n\t\t${(0,o.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n \n ${(0,o.Wf)("vaadin-combo-box")}\n ${(0,o.bz)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data"],componentName:s,includeForwardProps:["items","renderer","selectedItem"]}))},21294:(t,e,n)=>{n.r(e),n.d(e,{ComboBoxClass:()=>r.H}),n(47583);var r=n(84049);customElements.define(r.f,r.H)},82050:(t,e,n)=>{n.d(e,{Jm:()=>h,K3:()=>c,KY:()=>l,Nd:()=>i,OO:()=>b,TA:()=>o,UP:()=>a,d:()=>s,e7:()=>d,jt:()=>u,vz:()=>p,zb:()=>r});const r=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],a=r[0],o="YYYY-MM-DD",i=100,s="/",l=["Backspace","ArrowLeft","ArrowRight","ArrowDown","ArrowUp","PageUp","PageDown","Meta"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c={MONTH:{id:"month",min:1,max:12,placeholder:"MM",count:5,shiftCount:10},DAY:{id:"day",min:1,max:31,placeholder:"DD",count:5,shiftCount:10},YEAR:{id:"year",min:0,max:9999,placeholder:"YYYY",count:10,shiftCount:100}},h="Done",u="Cancel",b="Today"},8467:(t,e,n)=>{n.r(e),n.d(e,{CalendarClass:()=>N}),n(21294),n(72449),n(72018);var r=n(73878),a=n(2061),o=n(54567),i=n(54201),s=n(94978),l=n(52763),d=n(63359),p=n(82050);const c=(t,e)=>Array.isArray(t)&&t.length===e&&t.filter(Boolean).length===e,h=({label:t,dataId:e,dataName:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${n}"\n\t>\n\t\t\t${t}\n\t</div>\n`,u=(t,e)=>{const[n,r]=(0,l.T9)(e),[a,o]=(0,l.T9)(t);return a===n&&o===r},b=(t,e,n)=>(t.addEventListener("input",e),t.addEventListener("focusout",n),t);var y=n(15964);const m=(0,o.iY)("calendar"),g=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],v=["calendar-label-submit","calendar-label-cancel"],C=(0,r.P)({componentName:m,baseSelector:"div"}),{calendar:f,day:w,dayEntry:x,currentDay:D,selectedDay:V,disabledDay:S,weekday:$,topNav:M,topNavSelectors:I,bottomNav:H,navPrev:k,navNext:E,navPrevRTL:A,navNextRTL:T,yearInput:L,monthInput:B}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>":host(:dir(rtl)) .nav-prev"},navNextRTL:{selector:()=>":host(:dir(rtl)) .nav-next"},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},N=(0,a.qC)((0,s.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,s.yk)({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...M,property:"padding-top"},{...M,property:"padding-bottom"}],topNavHorizointalPadding:[{...M,property:"padding-right"},{...M,property:"padding-left"}],topNavAlignment:{...M,property:"justify-content"},topNavGap:{...M,property:"gap"},topNavSelectorsGap:{...I,property:"gap"},bottomNavVerticalPadding:[{...H,property:"padding-top"},{...H,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...H,property:"padding-right"},{...H,property:"padding-left"}],bottomNavAlignment:{...H,property:"justify-content"},bottomNavGap:{...H,property:"gap"},navMarginBottom:{...M,property:"margin-bottom"},calendarPadding:[{...f,property:"padding-bottom"},{...f,property:"padding-right"},{...f,property:"padding-left"}],navBorderBottomWidth:{...M,property:"border-bottom-width"},navBorderBottomColor:{...M,property:"border-bottom-color"},navBorderBottomStyle:{...M,property:"border-bottom-style"},weekdayFontSize:{...$,property:"font-size"},weekdayFontWeight:{...$,property:"font-weight"},currentDayBorderColor:{...D,property:"border-color"},currentDayBorderWidth:{...D,property:"border-width"},currentDayBorderStyle:{...D,property:"border-style"},dayHeight:{...x,property:"height"},daySize:[{...w,property:"height"},{...w,property:"width"}],dayPadding:{...w,property:"padding"},dayRadius:{...w,property:"border-radius"},dayTextAlign:{...w,property:"text-align"},dayBlockAlign:{...w,property:"margin"},dayTextColor:{...w,property:"color"},dayFontWeight:{...w,property:"font-weight"},dayBackgroundColor:{...w,property:"background-color"},dayCursor:{...w,property:"cursor"},dayFontSize:{...w,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...V,property:"color"},daySelectedBackgroundColor:{...V,property:"background-color"},dayDisabledTextdColor:{...S,property:"color"},yearInputWidth:{...L,property:"width"},monthInputWidth:{...B,property:"width"},navButtonSize:[{...k,property:"width"},{...k,property:"height"},{...E,property:"width"},{...E,property:"height"}],navButtonCursor:[{...k,property:"cursor"},{...E,property:"cursor"}],navButtonRotation:[{...A,property:"transform"},{...T,property:"transform"}],navButtonOpacity:[{...k,property:"opacity"},{...E,property:"opacity"}]}}),s.e4,s.Ae)(class extends C{static get observedAttributes(){return[].concat(C.observedAttributes||[],g,v)}preview;timestamp;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${y.n.cssVarList.horizontalPadding}: 0;\n ${y.n.cssVarList.verticalPadding}: 0;\n ${y.n.cssVarList.outlineWidth}: 0;\n }\n\n ${(0,i.bz)()}\n </style>\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n <descope-icon></descope-icon>\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n <descope-icon></descope-icon>\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n `}set value(t){if(!t)return;const e=(0,l.D3)(t).getTime();(0,l.HP)(e)&&e!==this.timestmap&&(this.timestamp=e,this.renderCalendar())}get value(){return this.timestamp?(0,l.i$)(this.timestamp,p.TA):""}get isSelectedView(){return u(this.preview,this.timestamp)}get isTodayView(){return u((0,l.Xn)(),this.preview)}get monthNames(){return(t=>{const e=t?.split(",");return c(e,12)?e:p.e7})(this.getAttribute("calendar-months"))}get weekdayNames(){return(t=>{const e=t?.split?.(",");return c(e,7)?e:p.vz})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const t=this.getAttribute("years-range")?.split("-");if(2===t?.length){const[e,n]=t.map(Number);if(e<=n)return[e,n]}const e=(0,l.D3)().getFullYear();return[e,e+p.Nd]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",(()=>this.submitButton.removeAttribute("disabled"))),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const t=(()=>{const t=document.createElement("span");return t.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${((t=p.e7)=>t.map(((t,e)=>h({label:t,dataId:e+1,dataName:t}))).join(""))()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,t})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(t),this.monthInput=b(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=b(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach((t=>(0,o.oP)(this,t,{includeAttrs:["disabled","size","st-host-direction"]})))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach((t=>(0,o.oP)(this,t,{includeAttrs:["size"]}))),this.shadowRoot.querySelector(".nav-next descope-icon").innerHTML=d.nj,this.shadowRoot.querySelector(".nav-prev descope-icon").innerHTML=d.VT}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:(0,l.D3)(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.timestamp=""}updateInputs(){if(this.yearInput&&this.monthInput){const t=this.preview||(0,l.Xn)(),e=(0,l.D$)(t),n=(0,l.jw)(t);this.monthInput.value=n,this.yearInput.baseElement.value=e}}renderCalendar(){const t=(0,l.D3)(this.preview||(0,l.Xn)()).getTime(),[e,n]=(0,l.T9)(t);this.calendar&&(this.calendar.innerHTML=((t,e,n)=>{const r=((t,e)=>new Date(t,e,0).getDate())(t,e),a=new Date(t,e-1,1).getDay();let o="<table>";o+=`<thead><tr>${n.reduce(((t,e)=>`${t}<th><span class="weekday">${e}</span></th>`),"")}</tr></thead>`,o+="<tbody>",o+="<tr>";for(let t=0;t<a;t++)o+="<td></td>";let i=a;for(let t=1;t<=r;t++)7===i&&(i=0,o+="</tr><tr>"),o+=`\n <td\n data-date-day="${t}"\n class="day-entry">\n <span class="day" data-date-day=${t}>\n ${t}\n </span>\n </td>\n `,i++;for(;i<7;)o+="<td></td>",i++;return o+="</tr></tbody></table>",o})(e,n,this.weekdayNames.map((t=>t.substring(0,3))))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach((t=>t.addEventListener("click",this.onDayChange.bind(this)))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(t){if(this.isDisabled)return;const e=(0,l.D3)(this.preview);e.setDate(Number(t.target.getAttribute("data-date-day"))),this.value=(0,l.i$)(e.getTime(),p.TA),this.dispatchEvent(new CustomEvent("day-changed",{detail:e}))}onYearChange(t){if(!t.target.value)return;const e=(0,l.D3)(this.preview);e.setFullYear(Number(t.target.value.trim())),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:e}))}onMonthChange(t){if(!t.target.value)return;const e=(0,l.D3)(this.preview);e.setMonth(Number(t.target.value)-1),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:e}))}onYearInputBlur(t){this.yearInput.baseElement.value=t.target.value||(0,l.D$)(this.preview)}onMonthInputBlur(t){this.monthInput.baseElement.value=t.target.value||(0,l.jw)(this.preview)}getSelectedDayEle(){const t=(0,l.D3)(this.timestamp).getDate();return this.calendar?.querySelector(`[data-date-day="${t}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${(0,l.QH)()}"]`)}clearSelectedDays(){const t=this.calendar?.querySelectorAll("[data-selected]");t&&t.forEach((t=>t.removeAttribute("data-selected")))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const t=this.getCurrentDayEle(),e=this.getAttribute("calendar-label-today")||p.OO;t.setAttribute("data-current-day","true"),t.setAttribute("title",e)}}navPrevMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,l.D3)(t),n=e.getMonth();if(0===n){const t=e.getFullYear();e.setFullYear(t-1),e.setMonth(11)}else e.setMonth(n-1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,l.D3)(t),n=e.getMonth();if(11===n){const t=e.getFullYear();e.setFullYear(t+1),e.setMonth(0)}else e.setMonth(n+1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}clearValue(){this.timestamp="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(t){if(this.value)return;const e=(0,l.D3)(t).getTime();(0,l.HP)(e)?(this.timestamp=e,this.preview=e):this.clearValue()}onYearsRangeChange(){setTimeout((()=>{this.yearInput&&(this.yearInput.innerHTML=(t=>{const[e,n]=t,r=[];for(let t=e;t<=n;t++)r.push(t);return r})(this.yearsRange).map((t=>h({label:t,dataId:t,dataName:t}))).join(""))}))}onMonthNamesChange(){Array.from(this.monthInput?.children||[]).forEach(((t,e)=>{const n=this.monthNames[e];t.setAttribute("data-name",n),t.textContent=n}))}onSubmitLabelChange(t){this.submitButton&&(this.submitButton.textContent=t||p.Jm)}onCancelLabelChange(t){this.cancelButton&&(this.cancelButton.textContent=t||p.jt)}onInitialMonthChange(t){const e=(0,l.D$)(this.preview);this.preview=(0,l.D3)(`${e}/${t}/1`).getTime()}onInitialYearChange(t){const e=(0,l.jw)(this.preview);this.preview=(0,l.D3)(`${t}/${e}/1`).getTime()}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),e!==n&&(v.includes(t)?("calendar-label-submit"===t&&this.onSubmitLabelChange(n),"calendar-label-cancel"===t&&this.onCancelLabelChange(n)):(n&&"initial-value"===t&&this.onInitialValueChange(n),n&&"initial-month"===t&&this.onInitialMonthChange(n),n&&"initial-year"===t&&this.onInitialYearChange(n),"years-range"===t&&this.onYearsRangeChange(Number(n)),"calendar-months"===t&&this.onMonthNamesChange(),"calendar-label-today"===t&&this.setCurrentDay(n),"disabled"===t&&setTimeout((()=>{this.cancelButton?.setAttribute("disabled","true"===n)})),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(m,N)},52763:(t,e,n)=>{n.d(e,{CY:()=>d,D$:()=>h,D3:()=>l,HP:()=>a,LL:()=>y,QH:()=>b,T9:()=>i,Xn:()=>c,hj:()=>o,i$:()=>s,jw:()=>u,rY:()=>p});var r=n(82050);const a=t=>!Number.isNaN(Number(t)),o=t=>!Number.isNaN(Number(t)),i=t=>{const e=new Date(t);return[e.getFullYear(),e.getMonth()+1,e.getDate()]},s=(t,e)=>{const[n,r,a]=i(t),o={DD:String(a).padStart(2,"0"),MM:String(r).padStart(2,"0"),YYYY:String(n)};return e.replace(/DD|MM|YYYY/g,(t=>o[t]))},l=t=>"number"==typeof t?new Date(t):"string"==typeof t?new Date(t.replace(/-/g,"/")):new Date,d=t=>r.KY.includes(t),p=(t,e,n)=>({refresh:n&&"r"===t.toLowerCase(),tab:"Tab"===t,shiftTab:e&&"Tab"===t,backspace:"Backspace"===t,arrowUp:!e&&"ArrowUp"===t,arrowDown:!e&&"ArrowDown"===t,arrowLeft:!e&&"ArrowLeft"===t,arrowRight:!e&&"ArrowRight"===t,pageUp:!e&&"PageUp"===t,pageDown:!e&&"PageDown"===t,shiftArrowUp:e&&"ArrowUp"===t,shiftArrowDown:e&&"ArrowDown"===t,shiftPageUp:e&&"PageUp"===t,shiftPageDown:e&&"PageDown"===t}),c=()=>l().getTime(),h=t=>l(t).getFullYear().toString(),u=t=>(l(t).getMonth()+1).toString(),b=()=>l().getDate(),y=t=>{const e=new CSSStyleSheet;e.insertRule(":host{display:block!important;}"),t?.shadowRoot?.adoptedStyleSheets?.push(e)}},63359:(t,e,n)=>{n.d(e,{CH:()=>r,VT:()=>o,nj:()=>a});const r='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n',a='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',o='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'},2549:(t,e,n)=>{n.d(e,{f:()=>l,q:()=>p});var r=n(94978),a=n(33346),o=n(2061),i=n(54567),s=n(52118);const l=(0,i.iY)("icon");class d extends((0,a.s)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#a;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${p.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(0,s.I)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const p=(0,o.qC)((0,r.yk)({mappings:{fill:{}}}),r.e4,r.Ae)(d)},52118:(t,e,n)=>{n.d(e,{I:()=>i});var r=n(27856),a=n.n(r);const o=t=>{const e=a().sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},i=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=o(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),r=await n.text();e=o(r)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("width","100%"),e.style.setProperty("height","100%"),e}catch{return null}}},72449:(t,e,n)=>{n.r(e),n.d(e,{IconClass:()=>r.q});var r=n(2549);customElements.define(r.f,r.q)},54201:(t,e,n)=>{n.d(e,{B:()=>p,DY:()=>l,PH:()=>d,Pd:()=>i,TX:()=>a,Wf:()=>h,bi:()=>r,bz:()=>u,jI:()=>s,jl:()=>o,wm:()=>c});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,a=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`,i=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${a(t)}\n ${i(t)}\n ${s(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 ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,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 '}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5709],{66194:(e,t,i)=>{i.r(t),i.d(t,{DateFieldClass:()=>I}),i(85079),i(8467),i(19357),i(72449);var r=i(73878),n=i(94978),o=i(54567),a=i(2061),s=i(52763),l=i(82050);const p={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},d=e=>{const t=(e=>`^${e.split(l.d).map((e=>p[e])).join("\\D")}$`)(e),i=(e=>{const t=e.split(l.d);return e=>{const i={};return t.forEach(((t,r)=>{i[t]=e[r+1]})),[i.YYYY,i.MM,i.DD]}})(e),r=new RegExp(t);return{pattern:t,validate:e=>r.test(e),getDate:e=>((e,t,i)=>{const r=t.exec(e);if(!r)return null;const[n,o,a]=i(r);return(0,s.D3)([n,o,a].join(l.d))})(e,r,i)}},h=Object.fromEntries(l.zb.map((e=>[e,d(e)])));var u=i(63359);class c{constructor({id:e,min:t,max:i,placeholder:r}){this.id=e,this.data=[],this.min=t,this.max=i,this.placeholder=r}get#e(){return this.data.length?this.numberValue:0}get numberValue(){return Number(this.stringValue)}get stringValue(){return(this.data.join("")||this.placeholder).padStart(this.length,"0")}get isFull(){return 10*this.numberValue>this.max||this.data.length===this.length}get isEmpty(){return this.stringValue===this.placeholder}get length(){return this.max.toString().length}set(e){this.data=e.toString().split("")}add(e){return this.data.push(e),this.numberValue>this.max?(this.data.length=0,this.data.push(e)):this.length<this.data.length&&this.data.shift(),e}del(){this.data.filter((e=>"0"!==e)).filter(Boolean).length?this.data.pop():this.data.length=0}clear(){this.data=[]}inc(e){this.replaceValue(this.#e+(e||1))}dec(e){this.replaceValue(this.#e-(e||1))}isInRange(e){return e>=this.min&&e<=this.max}replaceValue(e){this.isInRange(e)&&(this.data=e.toString().padStart(this.length,0).split(""))}}const y=(0,o.iY)("date-field"),g=(0,r.P)({componentName:y,baseSelector:"vaadin-popover"}),v=["format","opened","initial-value"],m=["years-range","calendar-months","calendar-weekdays"],b=[...v,...m],{host:C,input:f,toggleButton:x,overlayAnchor:w,overlayAnchorRTL:E,overlay:k,backdrop:P}={host:{selector:()=>":host"},input:{selector:()=>"descope-text-field"},toggleButton:{selector:()=>".toggle-calendar"},overlayAnchor:{selector:()=>":host .overlay-position-anchor"},overlayAnchorRTL:{selector:':host([st-host-direction="rtl"]) .overlay-position-anchor'},overlay:{selector:"vaadin-popover-overlay::part(overlay)"},backdrop:{selector:"vaadin-popover-overlay::part(backdrop)"}},I=(0,a.qC)((0,n.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,n.yk)({mappings:{iconMargin:{...x,property:"margin-inline-end"},hostWidth:{...C,property:"width"},hostDirection:{...C,property:"direction"},textAlign:{...f,property:"text-align"},overlayAnchorPos:[{...w,property:"right"},{...E,property:"left"}],overlayGap:{property:()=>I.cssVarList.overlayGap},overlayBackgroundColor:{property:()=>I.cssVarList.overlayBackgroundColor},overlayPadding:{property:()=>I.cssVarList.overlayPadding},overlayBoxShadow:{property:()=>I.overlayBoxShadow},overlayOutlineWidth:{property:()=>I.cssVarList.overlayOutlineWidth},overlayOutlineColor:{property:()=>I.cssVarList.overlayOutlineColor},overlayOutlineStyle:{property:()=>I.cssVarList.overlayOutlineStyle}}}),(0,n.Iw)({name:"overlay",selector:"",mappings:{marginTop:{...k,property:"margin-top"},backgroundColor:{...k},backdropBackgroundColor:{...P,property:"background-color"},backdropPointerEvents:{...P,property:"pointer-events"},padding:{...k},boxShadow:{...k},outlineWidth:{...k},outlineColor:{...k},outlineStyle:{...k}}}),n.e4,n.Ae)(class extends g{timestamp="";format=l.UP;selectedCounterIdx=0;dateCounters=[new c(l.K3.MONTH),new c(l.K3.DAY),new c(l.K3.YEAR)];static get observedAttributes(){return[].concat(g.observedAttributes||[],b)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n .toggle-calendar {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n descope-text-field .overlay-position-anchor {\n position: absolute;\n height: 100%;\n width: 0;\n z-index: 1;\n pointer-events: none;\n }\n </style>\n <div>\n <descope-text-field>\n <span slot="prefix" class="overlay-position-anchor"></span>\n <span slot="suffix" class="toggle-calendar">\n <descope-icon>${u.CH}</descope-icon>\n </span>\n </descope-text-field>\n <vaadin-popover></vaadin-popover>\n </div>\n `,this.inputElement=this.shadowRoot.querySelector("descope-text-field"),this.popoverToggleButton=this.inputElement.querySelector(".toggle-calendar"),this.overlayPositionAnchor=this.inputElement.querySelector(".overlay-position-anchor"),this.oninvalid=()=>{this.inputElement.setAttribute("invalid","true"),this.inputElement.focus()}}get opened(){return"true"===this.getAttribute("opened")}get inputValueTimestamp(){const e=h[this.format].getDate(this.inputElement.value);return(0,s.HP)(e?.getTime())?e.getTime():null}get sortedCounters(){return this.format.split(l.d).map((e=>this.dateCounters.find((t=>t.placeholder===e))))}get activeCounter(){return this.sortedCounters[this.selectedCounterIdx]}get countersValue(){return this.sortedCounters.map((e=>e.stringValue)).join(l.d)}get overlay(){return this.baseElement.shadowRoot?.querySelector("vaadin-popover-overlay")}get backdrop(){return this.overlay.shadowRoot?.querySelector("#backdrop")}get calendar(){return this.overlay?.querySelector("descope-calendar")}get value(){return this.timestamp}set value(e){if(!e)return;const t=Number(e);let i,r;Number.isNaN(t)?(i=(0,s.D3)(e),r=i.getTime()):(i=(0,s.D3)(t),r=t),(0,s.HP)(r)&&r!==this.timestamp&&(this.timestamp=r,this.updateInputDisplay(),this.updateDateCounters(i),this.dispatchEvent(new Event("input")))}updateInputDisplay(){this.inputElement.value=(0,s.i$)((0,s.D3)(this.value).getTime(),this.format)}init(){super.init?.(),this.updateFormatPattern(),this.initPopover(),this.initInputElement(),setTimeout((()=>{this.#t()}),0)}initInputElement(){this.popoverToggleButton.addEventListener("click",this.onPopoverToggle.bind(this)),this.inputElement.addEventListener("focus",this.onFocus.bind(this)),this.inputElement.addEventListener("blur",this.onBlur.bind(this)),this.inputElement.addEventListener("input",this.onInput.bind(this)),this.inputElement.addEventListener("click",this.handleMouseCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeyDownValueChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeydownCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleValueChange.bind(this)),(0,o.oP)(this,this.inputElement,{includeAttrs:["label","label-type","placeholder","disabled","readonly","bordered","required","full-width","st-host-direction","pattern","invalid","bordered"]})}initPopover(){this.baseElement.target=this.overlayPositionAnchor,this.baseElement.trigger=["click"],this.baseElement.withBackdrop=!0,this.baseElement.noCloseOnOutsideClick=!0,this.baseElement.renderer=this.#i.bind(this),(0,s.LL)(this.baseElement),this.baseElement.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation()}))}#i(e){e.firstChild||(e.appendChild(this.#r()),e.style.setProperty("opacity","0"),setTimeout((()=>{this.#n(),e.style.setProperty("opacity","1"),this.backdrop.addEventListener("click",this.closePopover.bind(this))}))),this.updateCalendarView()}#r(){const e=document.createElement("span");e.innerHTML="<descope-calendar></descope-calendar>";const t=e.querySelector("descope-calendar");return t.addEventListener("date-submit",this.onCalendarSubmit.bind(this)),t.addEventListener("cancel",this.closePopover.bind(this)),e}#n(){const{width:e}=this.inputElement.getClientRects()[0],{width:t}=this.calendar.getClientRects()[0],i=e-t/2;this.overlayPositionAnchor.style.setProperty(I.cssVarList.overlayAnchorPos,`${i}px`)}#t(){this.overlay._attachOverlay=()=>this.overlay.bringToFront(),this.overlay._detachOverlay=()=>{},this.overlay._enterModalState=()=>{}}onPopoverToggle(){this.opened?this.closePopover():this.openPopover()}openPopover(){this.setAttribute("opened","true")}closePopover(){this.removeAttribute("opened"),this.inputElement.focus()}getCounterById(e){return this.dateCounters.find((t=>t.id===e))}onCalendarSubmit(){if(!this.isReadOnly){if(!this.calendar.value)return;const e=(0,s.D3)(this.calendar.value);this.value=e.getTime(),this.getCounterById("year").replaceValue(e.getFullYear()),this.getCounterById("month").replaceValue(e.getMonth()+1),this.getCounterById("day").replaceValue(e.getDate()),this.dispatchEvent(new Event("input"))}this.closePopover()}updateCalendarView(){const e=(0,s.HP)((0,s.D3)(this.inputElement.value||"").getTime())&&h[this.format].validate(this.inputElement.value);this.inputValueTimestamp||e?this.calendar.setAttribute("initial-value",(0,s.i$)(this.inputValueTimestamp||this.timestamp,l.TA)):(this.calendar.clearValue(),this.calendar.setAttribute("preview",(0,s.i$)((0,s.Xn)(),l.TA))),(0,o.oP)(this,this.calendar,{includeAttrs:["st-host-direction","readonly","initial-month","initial-year","years-range","calendar-label-submit","calendar-label-cancel","calendar-months","calendar-weekdays","calendar-weekdays-short"]})}onInput(e){e.target.value||(this.calendar?.clear(),this.calendar?.renderCalendar())}onFocus(){this.inputElement.value||(this.inputElement.value=this.format,this.setInputSelectionRange())}clearInputValue(){this.inputElement.value="",this.resetDateCounters()}onBlur(){this.inputValueTimestamp?this.value=this.inputValueTimestamp:this.opened||this.countersValue!==this.format||this.clearInputValue()}onFormatUpdate(e){Object.keys(h).includes(e)&&(this.format=e,this.updateFormatPattern())}updateFormatPattern(){const e=this.getAttribute("format")||this.format||l.UP;this.setAttribute("type","date"),this.setAttribute("pattern",h[e].pattern)}handleValueChange(e){(0,s.hj)(e.key)&&(e.preventDefault(),this.handleCountersValue(e.key),this.activeCounter.isFull&&this.selectNextCounter(),this.setInputSelectionRange())}getCounterIdx(e){const[t,i]=this.sortedCounters.map((e=>e.length));return[e<=t,e>=t&&e<=t+i+1,e>=t+i+2].indexOf(!0)}handleCountersValue(e){this.activeCounter.add(e),this.inputElement.value=this.countersValue}setSelectedCounterByCaretPosition(e){this.selectedCounterIdx=this.getCounterIdx(e.target.selectionStart)}selectNextCounter(){this.selectedCounterIdx<this.dateCounters.length&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx+1,2))}selectPrevCounter(){this.selectedCounterIdx>0&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx-1,1))}setInputSelectionRange(){if(this.selectedCounterIdx<0)return;const e=this.sortedCounters.slice(0,this.selectedCounterIdx).reduce(((e,t)=>e+t.length),this.selectedCounterIdx);this.inputElement.setSelectionRange(e,e+this.sortedCounters[this.selectedCounterIdx].length)}resetDateCounters(){this.dateCounters.forEach((e=>e.clear()))}updateDateCounters(e){this.dateCounters.forEach((t=>{switch(t.id){case l.K3.MONTH.id:t.set(e.getMonth()+1);break;case l.K3.YEAR.id:t.set(e.getFullYear());break;case l.K3.DAY.id:t.set(e.getDate())}}))}handleKeyDownValueChange(e){if(this.isReadOnly)return;const{key:t,shiftKey:i,metaKey:r}=e,n=(0,s.rY)(t,i,r),o=n.refresh||n.tab||n.shiftTab;if(this.opened&&this.closePopover(),(0,s.CY)(t)){e.preventDefault();const t=this.activeCounter;if(!t)return;const i=Object.values(l.K3).find((e=>e.id===t.id)),{count:r,shiftCount:o}=i;n.backspace?this.handleBackspace():n.arrowUp?t.inc():n.arrowDown?t.dec():n.shiftArrowUp?t.inc(r):n.shiftArrowDown?t.dec(r):n.pageUp?t.inc(r):n.pageDown?t.dec(r):n.shiftPageUp?t.inc(o):n.shiftPageDown&&t.dec(o),this.inputElement.value=this.countersValue,this.setInputSelectionRange()}else o||e.preventDefault()}handleBackspace(){const e=this.activeCounter;e.isEmpty?(this.selectPrevCounter(),this.setInputSelectionRange()):e.del()}handleKeydownCaretPositionChange(e){if(this.opened)return;const{key:t}=e;if((0,s.CY)(t)){e.preventDefault();const i=(0,s.rY)(t,!1);i.arrowRight?this.selectNextCounter():i.arrowLeft&&this.selectPrevCounter(),this.setInputSelectionRange()}}handleMouseCaretPositionChange(e){this.opened||(e.preventDefault(),this.setSelectedCounterByCaretPosition(e),this.setInputSelectionRange())}onInitialValueChange(e){this.value||setTimeout((()=>{this.value=e}))}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),t!==i&&(v.includes(e)?(i&&"format"===e&&this.onFormatUpdate(i),"initial-value"===e&&this.onInitialValueChange(i)):m.includes(e)&&(i?this.calendar?.setAttribute(e,i):this.calendar?.removeAttribute(e)))}getValidity(){return this.isRequired&&!this.inputElement.value?{valueMissing:!0}:{}}});customElements.define(y,I)},56417:(e,t,i)=>{i.d(t,{f:()=>l,z:()=>d});var r=i(94978),n=i(4447),o=i(2061),a=i(54567),s=i(54201);const l=(0,a.iY)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.qC)((0,r.yk)({mappings:n.Z}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.Ae,(e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,t)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(e,t,i){super.attributeChangeCallback?.(e,t,i),"type"===e&&this.baseElement._setType(i),t!==i&&("label-type"===e?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===i))}}))((0,r.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.Wf)("vaadin-text-field")}\n\t\t\t${(0,s.bi)(d.cssVarList)}\n\t\t\t${(0,s.wm)("vaadin-text-field",d.cssVarList)}\n ${(0,s.bz)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},19357:(e,t,i)=>{i.r(t),i.d(t,{TextFieldClass:()=>r.z}),i(79789),i(56594),i(57911);var r=i(56417);customElements.define(r.f,r.z)},4447:(e,t,i)=>{i.d(t,{Z:()=>C});const{host:r,label:n,placeholder:o,requiredIndicator:a,inputField:s,input:l,inputMask:p,helperText:d,errorMessage:h,disabledPlaceholder:u,inputDisabled:c,inputIcon:y,externalInput:g,externalInputDisabled:v,externalPlaceholder:m,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},C={fontSize:[{},r],fontFamily:[n,s,d,h],labelFontSize:{...n,property:"font-size"},labelFontWeight:{...n,property:"font-weight"},labelTextColor:[{...n,property:"color"},{...a,property:"color"},{...n,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:[{...s,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...h,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...c,property:"-webkit-text-fill-color"},{...v,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...n,property:"position"},labelTopPosition:{...n,property:"top"},labelHorizontalPosition:[{...n,property:"left"},{...n,property:"right"}],inputTransformY:{...n,property:"transform"},inputTransition:{...n,property:"transition"},marginInlineStart:{...n,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...s,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}}}]);
|
@@ -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 y=(0,h.iY)("email-field"),m=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.J1)({inputType:"text",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(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.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}}))((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(${m.cssVarList.inputOutlineWidth}) + var(${m.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)(m.cssVarList)}\n\t\t\t${(0,f.wm)("vaadin-email-field",m.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\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:y}));customElements.define(y,m)},4447:(t,e,n)=>{n.d(e,{Z:()=>v});const{host:i,label:r,placeholder:o,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:f,externalInput:y,externalInputDisabled:m,externalPlaceholder:b,externalDisabledPlaceholder:g}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},v={fontSize:[{},i],fontFamily:[r,a,d,u],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"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...y,property:"caret-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"},{...y,property:"padding-left"},{...y,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"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...b,property:"color"},{...o,property:"color"},{...c,property:"-webkit-text-fill-color"},{...g,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"},{...b,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...f,property:"margin-right"},{...f,property:"margin-left"}],inputIconSize:{...f,property:"font-size"},inputIconColor:{...f,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`
|
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 y=(0,h.iY)("email-field"),m=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.J1)({inputType:"text",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(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.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}}))((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(${m.cssVarList.inputOutlineWidth}) + var(${m.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)(m.cssVarList)}\n\t\t\t${(0,f.wm)("vaadin-email-field",m.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\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:y}));customElements.define(y,m)},4447:(t,e,n)=>{n.d(e,{Z:()=>x});const{host:i,label:r,placeholder:o,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:f,externalInput:y,externalInputDisabled:m,externalPlaceholder:b,externalDisabledPlaceholder:g}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},i],fontFamily:[r,a,d,u],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"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...y,property:"caret-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"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...b,property:"color"},{...o,property:"color"},{...c,property:"-webkit-text-fill-color"},{...g,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"},{...b,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...f,property:"margin-right"},{...f,property:"margin-left"}],inputIconSize:{...f,property:"font-size"},inputIconColor:{...f,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(3354),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,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5988],{19278:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>A});var i=r(54567),n=r(57044);class o extends n.C{_defaultRenderer(e,t,r){const i=r.item[this.path]||"",n=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(i)}));if(!n)return void this.__setTextContent(e,r.item[this.path]||"");const o=n.cloneNode(!0);o.textContent=i||"",e.innerHTML="",e.append(o)}}const A=(0,i.iY)("grid-custom-column");customElements.define(A,o)},57044:(e,t,r)=>{r.d(t,{C:()=>n});var i=r(30322);class n extends i.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,r){const i=r.item[this.path]||"",n=Array.isArray(i)?i.join(", "):i;this.__setTextContent(e,n),e.title=n}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},65279:(e,t,r)=>{r.d(t,{gh:()=>i,k4:()=>n,qM:()=>A,qg:()=>o});const i="descope",n=3,o="host",A="@"},54567:(e,t,r)=>{r.d(t,{Db:()=>h,FX:()=>o,P$:()=>A,Tk:()=>c,iY:()=>d,oP:()=>l,tg:()=>a});var i=r(2061),n=r(65279);const o=(e,t,{excludeAttrs:r=[],includeAttrs:i=[]})=>{const n=Array.from(e.attributes).filter((e=>!r.includes(e.name)&&(!i.length||i.includes(e.name)))).map((e=>e.name));t(n),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||r.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},A=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},s=(e,t,r={})=>i=>{i.forEach((i=>{const n=r[i]||i,o=e.getAttribute(i);null!==o?t.getAttribute(n)!==o&&t.setAttribute(n,o):t.removeAttribute(n)}))},a=(e,t,r)=>{o(e,s(e,t),r),o(t,s(t,e),r)},d=e=>(0,i.E3)(n.gh,e),c=(...e)=>`--${(0,i.E3)(...e)}`,l=(e,t,r={})=>{o(e,s(e,t,r.mapAttrs),r)},h=(e,t,r=[])=>{if(!r.length)return;const i=r.reduce(((t,r)=>Object.assign(t,{[r]:{get:()=>e[r],set(t){e[r]=t}}})),{});Object.defineProperties(t,i)}},2061:(e,t,r)=>{r.d(t,{E3:()=>n,GL:()=>i,_k:()=>a,lo:()=>s,mf:()=>A,qC:()=>o});const i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...e)=>i(e.filter((e=>!!e)).join("-")),o=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),A=e=>"function"==typeof e,s=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const r=e.slice().sort(),i=t.slice().sort();for(let e=0;e<r.length;e++)if(r[e]!==i[e])return!1;return!0},a=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},63726:(e,t,r)=>{function i(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}function n(e){const t=[];let r;return"slot"===e.localName?r=e.assignedElements():(t.push(e),r=[...e.children]),r.forEach((e=>t.push(...n(e)))),t}function o(e,t){return t?t.closest(e)||o(e,t.getRootNode().host):null}function A(e){return e?new Set(e.split(" ")):new Set}function s(e){return e?[...e].join(" "):""}function a(e,t,r){const i=A(e.getAttribute(t));i.add(r),e.setAttribute(t,s(i))}function d(e,t,r){const i=A(e.getAttribute(t));i.delete(r),0!==i.size?e.setAttribute(t,s(i)):e.removeAttribute(t)}function c(e){return e.nodeType===Node.TEXT_NODE&&""===e.textContent.trim()}r.d(t,{$2:()=>a,AD:()=>i,Q4:()=>o,dV:()=>s,eC:()=>c,hK:()=>A,xX:()=>n,x_:()=>d})},14905:(e,t,r)=>{function i(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}r.d(t,{U:()=>i})},40262:(e,t,r)=>{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.`)}r.d(t,{k:()=>i})},30322:(e,t,r)=>{r.d(t,{n:()=>h}),r(51195),r(29849),r(29416);var i=r(46570);(0,i.hC)("vaadin-grid-sorter",i.iv`
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5988],{19278:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>A});var i=r(54567),n=r(57044);class o extends n.C{_defaultRenderer(e,t,r){const i=r.item[this.path]||"",n=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(i)}));if(!n)return void this.__setTextContent(e,r.item[this.path]||"");const o=n.cloneNode(!0);o.textContent=i||"",e.innerHTML="",e.append(o)}}const A=(0,i.iY)("grid-custom-column");customElements.define(A,o)},57044:(e,t,r)=>{r.d(t,{C:()=>n});var i=r(30322);class n extends i.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,r){const i=r.item[this.path]||"",n=Array.isArray(i)?i.join(", "):i;this.__setTextContent(e,n),e.title=n}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},65279:(e,t,r)=>{r.d(t,{gh:()=>i,k4:()=>n,qM:()=>A,qg:()=>o});const i="descope",n=3,o="host",A="@"},54567:(e,t,r)=>{r.d(t,{Db:()=>h,FX:()=>o,P$:()=>A,Tk:()=>c,iY:()=>d,oP:()=>l,tg:()=>a});var i=r(2061),n=r(65279);const o=(e,t,{excludeAttrs:r=[],includeAttrs:i=[]})=>{const n=Array.from(e.attributes).filter((e=>!r.includes(e.name)&&(!i.length||i.includes(e.name)))).map((e=>e.name));t(n),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||r.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},A=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},s=(e,t,r={})=>i=>{i.forEach((i=>{const n=r[i]||i,o=e.getAttribute(i);null!==o?t.getAttribute(n)!==o&&t.setAttribute(n,o):t.removeAttribute(n)}))},a=(e,t,r)=>{o(e,s(e,t),r),o(t,s(t,e),r)},d=e=>(0,i.E3)(n.gh,e),c=(...e)=>`--${(0,i.E3)(...e)}`,l=(e,t,r={})=>{o(e,s(e,t,r.mapAttrs),r)},h=(e,t,r=[])=>{if(!r.length)return;const i=r.reduce(((t,r)=>Object.assign(t,{[r]:{get:()=>e[r],set(t){e[r]=t}}})),{});Object.defineProperties(t,i)}},2061:(e,t,r)=>{r.d(t,{E3:()=>n,GL:()=>i,_k:()=>a,lo:()=>s,mf:()=>A,qC:()=>o});const i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...e)=>i(e.filter((e=>!!e)).join("-")),o=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),A=e=>"function"==typeof e,s=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const r=e.slice().sort(),i=t.slice().sort();for(let e=0;e<r.length;e++)if(r[e]!==i[e])return!1;return!0},a=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},63726:(e,t,r)=>{function i(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}function n(e){const t=[];let r;return"slot"===e.localName?r=e.assignedElements():(t.push(e),r=[...e.children]),r.forEach((e=>t.push(...n(e)))),t}function o(e,t){return t?t.closest(e)||o(e,t.getRootNode().host):null}function A(e){return e?new Set(e.split(" ")):new Set}function s(e){return e?[...e].join(" "):""}function a(e,t,r){const i=A(e.getAttribute(t));i.add(r),e.setAttribute(t,s(i))}function d(e,t,r){const i=A(e.getAttribute(t));i.delete(r),0!==i.size?e.setAttribute(t,s(i)):e.removeAttribute(t)}function c(e){return e.nodeType===Node.TEXT_NODE&&""===e.textContent.trim()}r.d(t,{$2:()=>a,AD:()=>i,Q4:()=>o,dV:()=>s,eC:()=>c,hK:()=>A,xX:()=>n,x_:()=>d})},14905:(e,t,r)=>{function i(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}function n(e,t,r){const i=e.split("."),n=i.pop();i.reduce(((e,t)=>e[t]),r)[n]=t}r.d(t,{U:()=>i,t:()=>n})},40262:(e,t,r)=>{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.`)}r.d(t,{k:()=>i})},30322:(e,t,r)=>{r.d(t,{n:()=>h}),r(51195),r(29849),r(29416);var i=r(46570);(0,i.hC)("vaadin-grid-sorter",i.iv`
|
3
3
|
:host {
|
4
4
|
justify-content: flex-start;
|
5
5
|
align-items: baseline;
|
@@ -42,7 +42,7 @@
|
|
42
42
|
margin-right: var(--lumo-space-s);
|
43
43
|
margin-left: 0;
|
44
44
|
}
|
45
|
-
`,{moduleId:"lumo-grid-sorter"});var n=r(
|
45
|
+
`,{moduleId:"lumo-grid-sorter"});var n=r(3354),o=r(52807),A=r(51914);const s=document.createElement("template");s.innerHTML="\n <style>\n @font-face {\n font-family: 'vaadin-grid-sorter-icons';\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAQwAA0AAAAABuwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAEFAAAABkAAAAcfep+mUdERUYAAAP4AAAAHAAAAB4AJwAOT1MvMgAAAZgAAAA/AAAAYA8TBPpjbWFwAAAB7AAAAFUAAAFeF1fZ4mdhc3AAAAPwAAAACAAAAAgAAAAQZ2x5ZgAAAlgAAABcAAAAnMvguMloZWFkAAABMAAAAC8AAAA2C5Ap72hoZWEAAAFgAAAAHQAAACQGbQPHaG10eAAAAdgAAAAUAAAAHAoAAABsb2NhAAACRAAAABIAAAASAIwAYG1heHAAAAGAAAAAFgAAACAACwAKbmFtZQAAArQAAAECAAACZxWCgKhwb3N0AAADuAAAADUAAABZCrApUXicY2BkYGAA4rDECVrx/DZfGbhZGEDgyqNPOxH0/wNMq5kPALkcDEwgUQBWRA0dAHicY2BkYGA+8P8AAwMLAwgwrWZgZEAFbABY4QM8AAAAeJxjYGRgYOAAQiYGEICQSAAAAi8AFgAAeJxjYGY6yziBgZWBgWkm0xkGBoZ+CM34msGYkZMBFTAKoAkwODAwvmRiPvD/AIMDMxCD1CDJKjAwAgBktQsXAHicY2GAAMZQCM0EwqshbAALxAEKeJxjYGBgZoBgGQZGBhCIAPIYwXwWBhsgzcXAwcAEhIwMCi+Z/v/9/x+sSuElA4T9/4k4K1gHFwMMMILMY2QDYmaoABOQYGJABUA7WBiGNwAAJd4NIQAAAAAAAAAACAAIABAAGAAmAEAATgAAeJyNjLENgDAMBP9tIURJwQCMQccSZgk2i5fIYBDAidJjycXr7x5EPwE2wY8si7jmyBNXGo/bNBerxJNrpxhbO3/fEFpx8ZICpV+ghxJ74fAMe+h7Ox14AbrsHB14nK2QQWrDMBRER4mTkhQK3ZRQKOgCNk7oGQqhhEIX2WSlWEI1BAlkJ5CDdNsj5Ey9Rncdi38ES+jzNJo/HwTgATcoDEthhY3wBHc4CE+pfwsX5F/hGe7Vo/AcK/UhvMSz+mGXKhZU6pww8ISz3oWn1BvhgnwTnuEJf8Jz1OpFeIlX9YULDLdFi4ASHolkSR0iuYdjLak1vAequBhj21D61Nqyi6l3qWybGPjySbPHGScGJl6dP58MYcQRI0bts7mjebBqrFENH7t3qWtj0OuqHnXcW7b0HOTZFnKryRGW2hFX1m0O2vEM3opNMfTau+CS6Z3Vx6veNnEXY6jwDxhsc2gAAHicY2BiwA84GBgYmRiYGJkZmBlZGFkZ2djScyoLMgzZS/MyDQwMwLSrpYEBlIbxjQDrzgsuAAAAAAEAAf//AA94nGNgZGBg4AFiMSBmYmAEQnYgZgHzGAAD6wA2eJxjYGBgZACCKyoz1cD0o087YTQATOcIewAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n",document.head.appendChild(s.content),(0,i.hC)("vaadin-grid-sorter",i.iv`
|
46
46
|
:host {
|
47
47
|
display: inline-flex;
|
48
48
|
cursor: pointer;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-grid-descope-grid-item-details-column-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6941],{79178:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>s});var i=r(54567),n=r(30322);class o extends n.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,r){const i=t._gridValue,n=i.detailsOpenedItems?.indexOf(r.item)??-1,o=-1!==n,s=document.createElement("vaadin-icon");s.icon=o?"vaadin:angle-up":"vaadin:angle-down",s.classList.add("toggle-details-button",o?"opened":"closed"),e.innerHTML="",e.append(s),s.onclick=()=>{i.detailsOpenedItems=o?i.detailsOpenedItems.toSpliced(n,1):[...i.detailsOpenedItems,r.item]}}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}r(57911),r(56594);const s=(0,i.iY)("grid-item-details-column");customElements.define(s,o)},65279:(e,t,r)=>{r.d(t,{gh:()=>i,k4:()=>n,qM:()=>s,qg:()=>o});const i="descope",n=3,o="host",s="@"},54567:(e,t,r)=>{r.d(t,{Db:()=>h,FX:()=>o,P$:()=>s,Tk:()=>c,iY:()=>d,oP:()=>l,tg:()=>A});var i=r(2061),n=r(65279);const o=(e,t,{excludeAttrs:r=[],includeAttrs:i=[]})=>{const n=Array.from(e.attributes).filter((e=>!r.includes(e.name)&&(!i.length||i.includes(e.name)))).map((e=>e.name));t(n),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||r.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},a=(e,t,r={})=>i=>{i.forEach((i=>{const n=r[i]||i,o=e.getAttribute(i);null!==o?t.getAttribute(n)!==o&&t.setAttribute(n,o):t.removeAttribute(n)}))},A=(e,t,r)=>{o(e,a(e,t),r),o(t,a(t,e),r)},d=e=>(0,i.E3)(n.gh,e),c=(...e)=>`--${(0,i.E3)(...e)}`,l=(e,t,r={})=>{o(e,a(e,t,r.mapAttrs),r)},h=(e,t,r=[])=>{if(!r.length)return;const i=r.reduce(((t,r)=>Object.assign(t,{[r]:{get:()=>e[r],set(t){e[r]=t}}})),{});Object.defineProperties(t,i)}},2061:(e,t,r)=>{r.d(t,{E3:()=>n,GL:()=>i,_k:()=>A,lo:()=>a,mf:()=>s,qC:()=>o});const i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...e)=>i(e.filter((e=>!!e)).join("-")),o=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),s=e=>"function"==typeof e,a=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const r=e.slice().sort(),i=t.slice().sort();for(let e=0;e<r.length;e++)if(r[e]!==i[e])return!1;return!0},A=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},61037:(e,t,r)=>{r.d(t,{Dt:()=>o,G6:()=>c,T:()=>l,gn:()=>d,i7:()=>s,vU:()=>a});const i=e=>e.test(navigator.userAgent),n=e=>e.test(navigator.platform),o=i(/Android/u),s=i(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),a=i(/Firefox/u),A=n(/^iPad/u)||n(/^Mac/u)&&navigator.maxTouchPoints>1,d=n(/^iPhone/u)||A,c=i(/^((?!chrome|android).)*safari/iu),l=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})()},14905:(e,t,r)=>{function i(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}r.d(t,{U:()=>i})},24946:(e,t,r)=>{r.d(t,{W:()=>o});var i=r(91014);const n=new WeakMap,o=(0,i.o)((e=>class extends e{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const e=this.getRootNode(),t=function(e){return n.has(e)||n.set(e,new Set),n.get(e)}(e);this.slotStyles.forEach((r=>{t.has(r)||(function(e,t){const r=document.createElement("style");r.textContent=e,t===document?document.head.appendChild(r):t.insertBefore(r,t.firstChild)}(r,e),t.add(r))}))}}))},40262:(e,t,r)=>{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.`)}r.d(t,{k:()=>i})},30322:(e,t,r)=>{r.d(t,{n:()=>h}),r(51195),r(29849),r(29416);var i=r(46570);(0,i.hC)("vaadin-grid-sorter",i.iv`
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6941],{79178:(e,t,r)=>{r.r(t),r.d(t,{componentName:()=>s});var i=r(54567),n=r(30322);class o extends n.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,r){const i=t._gridValue,n=i.detailsOpenedItems?.indexOf(r.item)??-1,o=-1!==n,s=document.createElement("vaadin-icon");s.icon=o?"vaadin:angle-up":"vaadin:angle-down",s.classList.add("toggle-details-button",o?"opened":"closed"),e.innerHTML="",e.append(s),s.onclick=()=>{i.detailsOpenedItems=o?i.detailsOpenedItems.toSpliced(n,1):[...i.detailsOpenedItems,r.item]}}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}r(57911),r(56594);const s=(0,i.iY)("grid-item-details-column");customElements.define(s,o)},65279:(e,t,r)=>{r.d(t,{gh:()=>i,k4:()=>n,qM:()=>s,qg:()=>o});const i="descope",n=3,o="host",s="@"},54567:(e,t,r)=>{r.d(t,{Db:()=>h,FX:()=>o,P$:()=>s,Tk:()=>c,iY:()=>d,oP:()=>l,tg:()=>A});var i=r(2061),n=r(65279);const o=(e,t,{excludeAttrs:r=[],includeAttrs:i=[]})=>{const n=Array.from(e.attributes).filter((e=>!r.includes(e.name)&&(!i.length||i.includes(e.name)))).map((e=>e.name));t(n),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||r.includes(e.attributeName)||i.length&&!i.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},a=(e,t,r={})=>i=>{i.forEach((i=>{const n=r[i]||i,o=e.getAttribute(i);null!==o?t.getAttribute(n)!==o&&t.setAttribute(n,o):t.removeAttribute(n)}))},A=(e,t,r)=>{o(e,a(e,t),r),o(t,a(t,e),r)},d=e=>(0,i.E3)(n.gh,e),c=(...e)=>`--${(0,i.E3)(...e)}`,l=(e,t,r={})=>{o(e,a(e,t,r.mapAttrs),r)},h=(e,t,r=[])=>{if(!r.length)return;const i=r.reduce(((t,r)=>Object.assign(t,{[r]:{get:()=>e[r],set(t){e[r]=t}}})),{});Object.defineProperties(t,i)}},2061:(e,t,r)=>{r.d(t,{E3:()=>n,GL:()=>i,_k:()=>A,lo:()=>a,mf:()=>s,qC:()=>o});const i=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...e)=>i(e.filter((e=>!!e)).join("-")),o=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),s=e=>"function"==typeof e,a=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const r=e.slice().sort(),i=t.slice().sort();for(let e=0;e<r.length;e++)if(r[e]!==i[e])return!1;return!0},A=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},61037:(e,t,r)=>{r.d(t,{Dt:()=>o,G6:()=>c,T:()=>l,gn:()=>d,i7:()=>s,vU:()=>a});const i=e=>e.test(navigator.userAgent),n=e=>e.test(navigator.platform),o=i(/Android/u),s=i(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),a=i(/Firefox/u),A=n(/^iPad/u)||n(/^Mac/u)&&navigator.maxTouchPoints>1,d=n(/^iPhone/u)||A,c=i(/^((?!chrome|android).)*safari/iu),l=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})()},14905:(e,t,r)=>{function i(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}function n(e,t,r){const i=e.split("."),n=i.pop();i.reduce(((e,t)=>e[t]),r)[n]=t}r.d(t,{U:()=>i,t:()=>n})},24946:(e,t,r)=>{r.d(t,{W:()=>o});var i=r(91014);const n=new WeakMap,o=(0,i.o)((e=>class extends e{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const e=this.getRootNode(),t=function(e){return n.has(e)||n.set(e,new Set),n.get(e)}(e);this.slotStyles.forEach((r=>{t.has(r)||(function(e,t){const r=document.createElement("style");r.textContent=e,t===document?document.head.appendChild(r):t.insertBefore(r,t.firstChild)}(r,e),t.add(r))}))}}))},40262:(e,t,r)=>{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.`)}r.d(t,{k:()=>i})},30322:(e,t,r)=>{r.d(t,{n:()=>h}),r(51195),r(29849),r(29416);var i=r(46570);(0,i.hC)("vaadin-grid-sorter",i.iv`
|
3
3
|
:host {
|
4
4
|
justify-content: flex-start;
|
5
5
|
align-items: baseline;
|
@@ -42,7 +42,7 @@
|
|
42
42
|
margin-right: var(--lumo-space-s);
|
43
43
|
margin-left: 0;
|
44
44
|
}
|
45
|
-
`,{moduleId:"lumo-grid-sorter"});var n=r(
|
45
|
+
`,{moduleId:"lumo-grid-sorter"});var n=r(3354),o=r(52807),s=r(51914);const a=document.createElement("template");a.innerHTML="\n <style>\n @font-face {\n font-family: 'vaadin-grid-sorter-icons';\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAQwAA0AAAAABuwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAEFAAAABkAAAAcfep+mUdERUYAAAP4AAAAHAAAAB4AJwAOT1MvMgAAAZgAAAA/AAAAYA8TBPpjbWFwAAAB7AAAAFUAAAFeF1fZ4mdhc3AAAAPwAAAACAAAAAgAAAAQZ2x5ZgAAAlgAAABcAAAAnMvguMloZWFkAAABMAAAAC8AAAA2C5Ap72hoZWEAAAFgAAAAHQAAACQGbQPHaG10eAAAAdgAAAAUAAAAHAoAAABsb2NhAAACRAAAABIAAAASAIwAYG1heHAAAAGAAAAAFgAAACAACwAKbmFtZQAAArQAAAECAAACZxWCgKhwb3N0AAADuAAAADUAAABZCrApUXicY2BkYGAA4rDECVrx/DZfGbhZGEDgyqNPOxH0/wNMq5kPALkcDEwgUQBWRA0dAHicY2BkYGA+8P8AAwMLAwgwrWZgZEAFbABY4QM8AAAAeJxjYGRgYOAAQiYGEICQSAAAAi8AFgAAeJxjYGY6yziBgZWBgWkm0xkGBoZ+CM34msGYkZMBFTAKoAkwODAwvmRiPvD/AIMDMxCD1CDJKjAwAgBktQsXAHicY2GAAMZQCM0EwqshbAALxAEKeJxjYGBgZoBgGQZGBhCIAPIYwXwWBhsgzcXAwcAEhIwMCi+Z/v/9/x+sSuElA4T9/4k4K1gHFwMMMILMY2QDYmaoABOQYGJABUA7WBiGNwAAJd4NIQAAAAAAAAAACAAIABAAGAAmAEAATgAAeJyNjLENgDAMBP9tIURJwQCMQccSZgk2i5fIYBDAidJjycXr7x5EPwE2wY8si7jmyBNXGo/bNBerxJNrpxhbO3/fEFpx8ZICpV+ghxJ74fAMe+h7Ox14AbrsHB14nK2QQWrDMBRER4mTkhQK3ZRQKOgCNk7oGQqhhEIX2WSlWEI1BAlkJ5CDdNsj5Ey9Rncdi38ES+jzNJo/HwTgATcoDEthhY3wBHc4CE+pfwsX5F/hGe7Vo/AcK/UhvMSz+mGXKhZU6pww8ISz3oWn1BvhgnwTnuEJf8Jz1OpFeIlX9YULDLdFi4ASHolkSR0iuYdjLak1vAequBhj21D61Nqyi6l3qWybGPjySbPHGScGJl6dP58MYcQRI0bts7mjebBqrFENH7t3qWtj0OuqHnXcW7b0HOTZFnKryRGW2hFX1m0O2vEM3opNMfTau+CS6Z3Vx6veNnEXY6jwDxhsc2gAAHicY2BiwA84GBgYmRiYGJkZmBlZGFkZ2djScyoLMgzZS/MyDQwMwLSrpYEBlIbxjQDrzgsuAAAAAAEAAf//AA94nGNgZGBg4AFiMSBmYmAEQnYgZgHzGAAD6wA2eJxjYGBgZACCKyoz1cD0o087YTQATOcIewAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n",document.head.appendChild(a.content),(0,i.hC)("vaadin-grid-sorter",i.iv`
|
46
46
|
:host {
|
47
47
|
display: inline-flex;
|
48
48
|
cursor: pointer;
|