@cas-smartdesign/combo-box 7.2.6 → 7.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs/doc.mjs
CHANGED
|
@@ -1394,7 +1394,7 @@ function updateMandatory(combobox: ComboBox) {
|
|
|
1394
1394
|
\f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Hs=/-->/g,Fs=/>/g,Be=RegExp(`>|${Li}(?:([^\\s"'>=/]+)(${Li}*=${Li}*(?:[^
|
|
1395
1395
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),Vs=/'/g,Us=/"/g,La=/^(?:script|style|textarea|title)$/i,Pn=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),ae=Pn(1),Ue=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),Gs=new WeakMap,je=Ve.createTreeWalker(Ve,129,null,!1);function Da(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return js!==void 0?js.createHTML(e):e}const Tn=(i,e)=>{const t=i.length-1,s=[];let a,n=e===2?"<svg>":"",r=gt;for(let o=0;o<t;o++){const l=i[o];let c,m,u=-1,f=0;for(;f<l.length&&(r.lastIndex=f,m=r.exec(l),m!==null);)f=r.lastIndex,r===gt?m[1]==="!--"?r=Hs:m[1]!==void 0?r=Fs:m[2]!==void 0?(La.test(m[2])&&(a=RegExp("</"+m[2],"g")),r=Be):m[3]!==void 0&&(r=Be):r===Be?m[0]===">"?(r=a??gt,u=-1):m[1]===void 0?u=-2:(u=r.lastIndex-m[2].length,c=m[1],r=m[3]===void 0?Be:m[3]==='"'?Us:Vs):r===Us||r===Vs?r=Be:r===Hs||r===Fs?r=gt:(r=Be,a=void 0);const g=r===Be&&i[o+1].startsWith("/>")?" ":"";n+=r===gt?l+Ln:u>=0?(s.push(c),l.slice(0,u)+Gi+l.slice(u)+Me+g):l+Me+(u===-2?(s.push(void 0),o):g)}return[Da(i,n+(i[t]||"<?>")+(e===2?"</svg>":"")),s]};class At{constructor({strings:e,_$litType$:t},s){let a;this.parts=[];let n=0,r=0;const o=e.length-1,l=this.parts,[c,m]=Tn(e,t);if(this.el=At.createElement(c,s),je.currentNode=this.el.content,t===2){const u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(a=je.nextNode())!==null&&l.length<o;){if(a.nodeType===1){if(a.hasAttributes()){const u=[];for(const f of a.getAttributeNames())if(f.endsWith(Gi)||f.startsWith(Me)){const g=m[r++];if(u.push(f),g!==void 0){const _=a.getAttribute(g.toLowerCase()+Gi).split(Me),y=/([.?@])?(.*)/.exec(g);l.push({type:1,index:n,name:y[2],strings:_,ctor:y[1]==="."?zn:y[1]==="?"?Hn:y[1]==="@"?Fn:yi})}else l.push({type:6,index:n})}for(const f of u)a.removeAttribute(f)}if(La.test(a.tagName)){const u=a.textContent.split(Me),f=u.length-1;if(f>0){a.textContent=it?it.emptyScript:"";for(let g=0;g<f;g++)a.append(u[g],Ct()),je.nextNode(),l.push({type:2,index:++n});a.append(u[f],Ct())}}}else if(a.nodeType===8)if(a.data===Ia)l.push({type:2,index:n});else{let u=-1;for(;(u=a.data.indexOf(Me,u+1))!==-1;)l.push({type:7,index:n}),u+=Me.length-1}n++}}static createElement(e,t){const s=Ve.createElement("template");return s.innerHTML=e,s}}function st(i,e,t=i,s){var a,n,r,o;if(e===Ue)return e;let l=s!==void 0?(a=t._$Co)===null||a===void 0?void 0:a[s]:t._$Cl;const c=Et(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),c===void 0?l=void 0:(l=new c(i),l._$AT(i,t,s)),s!==void 0?((r=(o=t)._$Co)!==null&&r!==void 0?r:o._$Co=[])[s]=l:t._$Cl=l),l!==void 0&&(e=st(i,l._$AS(i,e.values),l,s)),e}class Bn{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:s},parts:a}=this._$AD,n=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ve).importNode(s,!0);je.currentNode=n;let r=je.nextNode(),o=0,l=0,c=a[0];for(;c!==void 0;){if(o===c.index){let m;c.type===2?m=new jt(r,r.nextSibling,this,e):c.type===1?m=new c.ctor(r,c.name,c.strings,this,e):c.type===6&&(m=new Vn(r,this,e)),this._$AV.push(m),c=a[++l]}o!==(c==null?void 0:c.index)&&(r=je.nextNode(),o++)}return je.currentNode=Ve,n}v(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class jt{constructor(e,t,s,a){var n;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=a,this._$Cp=(n=a==null?void 0:a.isConnected)===null||n===void 0||n}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=st(this,e,t),Et(e)?e===F||e==null||e===""?(this._$AH!==F&&this._$AR(),this._$AH=F):e!==this._$AH&&e!==Ue&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Dn(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==F&&Et(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ve.createTextNode(e)),this._$AH=e}g(e){var t;const{values:s,_$litType$:a}=e,n=typeof a=="number"?this._$AC(e):(a.el===void 0&&(a.el=At.createElement(Da(a.h,a.h[0]),this.options)),a);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===n)this._$AH.v(s);else{const r=new Bn(n,this),o=r.u(this.options);r.v(s),this.$(o),this._$AH=r}}_$AC(e){let t=Gs.get(e.strings);return t===void 0&&Gs.set(e.strings,t=new At(e)),t}T(e){Ra(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,a=0;for(const n of e)a===t.length?t.push(s=new jt(this.k(Ct()),this.k(Ct()),this,this.options)):s=t[a],s._$AI(n),a++;a<t.length&&(this._$AR(s&&s._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,t);e&&e!==this._$AB;){const a=e.nextSibling;e.remove(),e=a}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}let yi=class{constructor(e,t,s,a,n){this.type=1,this._$AH=F,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,a){const n=this.strings;let r=!1;if(n===void 0)e=st(this,e,t,0),r=!Et(e)||e!==this._$AH&&e!==Ue,r&&(this._$AH=e);else{const o=e;let l,c;for(e=n[0],l=0;l<n.length-1;l++)c=st(this,o[s+l],t,l),c===Ue&&(c=this._$AH[l]),r||(r=!Et(c)||c!==this._$AH[l]),c===F?e=F:e!==F&&(e+=(c??"")+n[l+1]),this._$AH[l]=c}r&&!a&&this.j(e)}j(e){e===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class zn extends yi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===F?void 0:e}}const jn=it?it.emptyScript:"";let Hn=class extends yi{constructor(){super(...arguments),this.type=4}j(e){e&&e!==F?this.element.setAttribute(this.name,jn):this.element.removeAttribute(this.name)}},Fn=class extends yi{constructor(e,t,s,a,n){super(e,t,s,a,n),this.type=5}_$AI(e,t=this){var s;if((e=(s=st(this,e,t,0))!==null&&s!==void 0?s:F)===Ue)return;const a=this._$AH,n=e===F&&a!==F||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,r=e!==F&&(a===F||n);n&&this.element.removeEventListener(this.name,this,a),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;typeof this._$AH=="function"?this._$AH.call((s=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&s!==void 0?s:this.element,e):this._$AH.handleEvent(e)}};class Vn{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){st(this,e)}}const Ws=ui.litHtmlPolyfillSupport;Ws==null||Ws(At,jt),((Ri=ui.litHtmlVersions)!==null&&Ri!==void 0?Ri:ui.litHtmlVersions=[]).push("2.8.0");const Un=(i,e,t)=>{var s,a;const n=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:e;let r=n._$litPart$;if(r===void 0){const o=(a=t==null?void 0:t.renderBefore)!==null&&a!==void 0?a:null;n._$litPart$=r=new jt(e.insertBefore(Ct(),o),o,void 0,t??{})}return r._$AI(i),r};var Di,Pi;let Ce=class extends et{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const s=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=s.firstChild),s}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Un(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Ue}};Ce.finalized=!0,Ce._$litElement$=!0,(Di=globalThis.litElementHydrateSupport)===null||Di===void 0||Di.call(globalThis,{LitElement:Ce});const Ks=globalThis.litElementPolyfillSupport;Ks==null||Ks({LitElement:Ce});((Pi=globalThis.litElementVersions)!==null&&Pi!==void 0?Pi:globalThis.litElementVersions=[]).push("3.3.3");const Gn=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},Wn=(i,e,t)=>{e.constructor.createProperty(t,i)};function v(i){return(e,t)=>t!==void 0?Wn(i,e,t):Gn(i,e)}var re="top",ue="bottom",fe="right",ne="left",fs="auto",Ht=[re,ue,fe,ne],at="start",kt="end",Kn="clippingParents",Pa="viewport",Nt="popper",qn="reference",qs=Ht.reduce(function(i,e){return i.concat([e+"-"+at,e+"-"+kt])},[]),Ta=[].concat(Ht,[fs]).reduce(function(i,e){return i.concat([e,e+"-"+at,e+"-"+kt])},[]),Jn="beforeRead",Zn="read",Xn="afterRead",Yn="beforeMain",Qn="main",eo="afterMain",to="beforeWrite",io="write",so="afterWrite",ao=[Jn,Zn,Xn,Yn,Qn,eo,to,io,so];function _e(i){return i?(i.nodeName||"").toLowerCase():null}function ce(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function Ge(i){var e=ce(i).Element;return i instanceof e||i instanceof Element}function de(i){var e=ce(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function hs(i){if(typeof ShadowRoot>"u")return!1;var e=ce(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function ro(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var s=e.styles[t]||{},a=e.attributes[t]||{},n=e.elements[t];!de(n)||!_e(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(r){var o=a[r];o===!1?n.removeAttribute(r):n.setAttribute(r,o===!0?"":o)}))})}function no(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(s){var a=e.elements[s],n=e.attributes[s]||{},r=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:t[s]),o=r.reduce(function(l,c){return l[c]="",l},{});!de(a)||!_e(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(l){a.removeAttribute(l)}))})}}const oo={name:"applyStyles",enabled:!0,phase:"write",fn:ro,effect:no,requires:["computeStyles"]};function we(i){return i.split("-")[0]}var He=Math.max,fi=Math.min,rt=Math.round;function Wi(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Ba(){return!/^((?!chrome|android).)*safari/i.test(Wi())}function nt(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var s=i.getBoundingClientRect(),a=1,n=1;e&&de(i)&&(a=i.offsetWidth>0&&rt(s.width)/i.offsetWidth||1,n=i.offsetHeight>0&&rt(s.height)/i.offsetHeight||1);var r=Ge(i)?ce(i):window,o=r.visualViewport,l=!Ba()&&t,c=(s.left+(l&&o?o.offsetLeft:0))/a,m=(s.top+(l&&o?o.offsetTop:0))/n,u=s.width/a,f=s.height/n;return{width:u,height:f,top:m,right:c+u,bottom:m+f,left:c,x:c,y:m}}function ps(i){var e=nt(i),t=i.offsetWidth,s=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:s}}function za(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&hs(t)){var s=e;do{if(s&&i.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Ee(i){return ce(i).getComputedStyle(i)}function lo(i){return["table","td","th"].indexOf(_e(i))>=0}function Re(i){return((Ge(i)?i.ownerDocument:i.document)||window.document).documentElement}function xi(i){return _e(i)==="html"?i:i.assignedSlot||i.parentNode||(hs(i)?i.host:null)||Re(i)}function Js(i){return!de(i)||Ee(i).position==="fixed"?null:i.offsetParent}function co(i){var e=/firefox/i.test(Wi()),t=/Trident/i.test(Wi());if(t&&de(i)){var s=Ee(i);if(s.position==="fixed")return null}var a=xi(i);for(hs(a)&&(a=a.host);de(a)&&["html","body"].indexOf(_e(a))<0;){var n=Ee(a);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return a;a=a.parentNode}return null}function Ft(i){for(var e=ce(i),t=Js(i);t&&lo(t)&&Ee(t).position==="static";)t=Js(t);return t&&(_e(t)==="html"||_e(t)==="body"&&Ee(t).position==="static")?e:t||co(i)||e}function gs(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function wt(i,e,t){return He(i,fi(e,t))}function mo(i,e,t){var s=wt(i,e,t);return s>t?t:s}function ja(){return{top:0,right:0,bottom:0,left:0}}function Ha(i){return Object.assign({},ja(),i)}function Fa(i,e){return e.reduce(function(t,s){return t[s]=i,t},{})}var uo=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ha(typeof e!="number"?e:Fa(e,Ht))};function fo(i){var e,t=i.state,s=i.name,a=i.options,n=t.elements.arrow,r=t.modifiersData.popperOffsets,o=we(t.placement),l=gs(o),c=[ne,fe].indexOf(o)>=0,m=c?"height":"width";if(!(!n||!r)){var u=uo(a.padding,t),f=ps(n),g=l==="y"?re:ne,_=l==="y"?ue:fe,y=t.rects.reference[m]+t.rects.reference[l]-r[l]-t.rects.popper[m],h=r[l]-t.rects.reference[l],A=Ft(n),M=A?l==="y"?A.clientHeight||0:A.clientWidth||0:0,I=y/2-h/2,x=u[g],E=M-f[m]-u[_],$=M/2-f[m]/2+I,R=wt(x,$,E),D=l;t.modifiersData[s]=(e={},e[D]=R,e.centerOffset=R-$,e)}}function ho(i){var e=i.state,t=i.options,s=t.element,a=s===void 0?"[data-popper-arrow]":s;a!=null&&(typeof a=="string"&&(a=e.elements.popper.querySelector(a),!a)||za(e.elements.popper,a)&&(e.elements.arrow=a))}const po={name:"arrow",enabled:!0,phase:"main",fn:fo,effect:ho,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ot(i){return i.split("-")[1]}var go={top:"auto",right:"auto",bottom:"auto",left:"auto"};function No(i,e){var t=i.x,s=i.y,a=e.devicePixelRatio||1;return{x:rt(t*a)/a||0,y:rt(s*a)/a||0}}function Zs(i){var e,t=i.popper,s=i.popperRect,a=i.placement,n=i.variation,r=i.offsets,o=i.position,l=i.gpuAcceleration,c=i.adaptive,m=i.roundOffsets,u=i.isFixed,f=r.x,g=f===void 0?0:f,_=r.y,y=_===void 0?0:_,h=typeof m=="function"?m({x:g,y}):{x:g,y};g=h.x,y=h.y;var A=r.hasOwnProperty("x"),M=r.hasOwnProperty("y"),I=ne,x=re,E=window;if(c){var $=Ft(t),R="clientHeight",D="clientWidth";if($===ce(t)&&($=Re(t),Ee($).position!=="static"&&o==="absolute"&&(R="scrollHeight",D="scrollWidth")),$=$,a===re||(a===ne||a===fe)&&n===kt){x=ue;var O=u&&$===E&&E.visualViewport?E.visualViewport.height:$[R];y-=O-s.height,y*=l?1:-1}if(a===ne||(a===re||a===ue)&&n===kt){I=fe;var B=u&&$===E&&E.visualViewport?E.visualViewport.width:$[D];g-=B-s.width,g*=l?1:-1}}var G=Object.assign({position:o},c&&go),ee=m===!0?No({x:g,y},ce(t)):{x:g,y};if(g=ee.x,y=ee.y,l){var K;return Object.assign({},G,(K={},K[x]=M?"0":"",K[I]=A?"0":"",K.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",K))}return Object.assign({},G,(e={},e[x]=M?y+"px":"",e[I]=A?g+"px":"",e.transform="",e))}function bo(i){var e=i.state,t=i.options,s=t.gpuAcceleration,a=s===void 0?!0:s,n=t.adaptive,r=n===void 0?!0:n,o=t.roundOffsets,l=o===void 0?!0:o,c={placement:we(e.placement),variation:ot(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:a,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Zs(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Zs(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const vo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bo,data:{}};var qt={passive:!0};function yo(i){var e=i.state,t=i.instance,s=i.options,a=s.scroll,n=a===void 0?!0:a,r=s.resize,o=r===void 0?!0:r,l=ce(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&c.forEach(function(m){m.addEventListener("scroll",t.update,qt)}),o&&l.addEventListener("resize",t.update,qt),function(){n&&c.forEach(function(m){m.removeEventListener("scroll",t.update,qt)}),o&&l.removeEventListener("resize",t.update,qt)}}const xo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yo,data:{}};var wo={left:"right",right:"left",bottom:"top",top:"bottom"};function oi(i){return i.replace(/left|right|bottom|top/g,function(e){return wo[e]})}var _o={start:"end",end:"start"};function Xs(i){return i.replace(/start|end/g,function(e){return _o[e]})}function Ns(i){var e=ce(i),t=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:t,scrollTop:s}}function bs(i){return nt(Re(i)).left+Ns(i).scrollLeft}function So(i,e){var t=ce(i),s=Re(i),a=t.visualViewport,n=s.clientWidth,r=s.clientHeight,o=0,l=0;if(a){n=a.width,r=a.height;var c=Ba();(c||!c&&e==="fixed")&&(o=a.offsetLeft,l=a.offsetTop)}return{width:n,height:r,x:o+bs(i),y:l}}function Co(i){var e,t=Re(i),s=Ns(i),a=(e=i.ownerDocument)==null?void 0:e.body,n=He(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),r=He(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-s.scrollLeft+bs(i),l=-s.scrollTop;return Ee(a||t).direction==="rtl"&&(o+=He(t.clientWidth,a?a.clientWidth:0)-n),{width:n,height:r,x:o,y:l}}function vs(i){var e=Ee(i),t=e.overflow,s=e.overflowX,a=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+a+s)}function Va(i){return["html","body","#document"].indexOf(_e(i))>=0?i.ownerDocument.body:de(i)&&vs(i)?i:Va(xi(i))}function _t(i,e){var t;e===void 0&&(e=[]);var s=Va(i),a=s===((t=i.ownerDocument)==null?void 0:t.body),n=ce(s),r=a?[n].concat(n.visualViewport||[],vs(s)?s:[]):s,o=e.concat(r);return a?o:o.concat(_t(xi(r)))}function Ki(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Eo(i,e){var t=nt(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function Ys(i,e,t){return e===Pa?Ki(So(i,t)):Ge(e)?Eo(e,t):Ki(Co(Re(i)))}function Ao(i){var e=_t(xi(i)),t=["absolute","fixed"].indexOf(Ee(i).position)>=0,s=t&&de(i)?Ft(i):i;return Ge(s)?e.filter(function(a){return Ge(a)&&za(a,s)&&_e(a)!=="body"}):[]}function ko(i,e,t,s){var a=e==="clippingParents"?Ao(i):[].concat(e),n=[].concat(a,[t]),r=n[0],o=n.reduce(function(l,c){var m=Ys(i,c,s);return l.top=He(m.top,l.top),l.right=fi(m.right,l.right),l.bottom=fi(m.bottom,l.bottom),l.left=He(m.left,l.left),l},Ys(i,r,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Ua(i){var e=i.reference,t=i.element,s=i.placement,a=s?we(s):null,n=s?ot(s):null,r=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(a){case re:l={x:r,y:e.y-t.height};break;case ue:l={x:r,y:e.y+e.height};break;case fe:l={x:e.x+e.width,y:o};break;case ne:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var c=a?gs(a):null;if(c!=null){var m=c==="y"?"height":"width";switch(n){case at:l[c]=l[c]-(e[m]/2-t[m]/2);break;case kt:l[c]=l[c]+(e[m]/2-t[m]/2);break}}return l}function $t(i,e){e===void 0&&(e={});var t=e,s=t.placement,a=s===void 0?i.placement:s,n=t.strategy,r=n===void 0?i.strategy:n,o=t.boundary,l=o===void 0?Kn:o,c=t.rootBoundary,m=c===void 0?Pa:c,u=t.elementContext,f=u===void 0?Nt:u,g=t.altBoundary,_=g===void 0?!1:g,y=t.padding,h=y===void 0?0:y,A=Ha(typeof h!="number"?h:Fa(h,Ht)),M=f===Nt?qn:Nt,I=i.rects.popper,x=i.elements[_?M:f],E=ko(Ge(x)?x:x.contextElement||Re(i.elements.popper),l,m,r),$=nt(i.elements.reference),R=Ua({reference:$,element:I,strategy:"absolute",placement:a}),D=Ki(Object.assign({},I,R)),O=f===Nt?D:$,B={top:E.top-O.top+A.top,bottom:O.bottom-E.bottom+A.bottom,left:E.left-O.left+A.left,right:O.right-E.right+A.right},G=i.modifiersData.offset;if(f===Nt&&G){var ee=G[a];Object.keys(B).forEach(function(K){var he=[fe,ue].indexOf(K)>=0?1:-1,te=[re,ue].indexOf(K)>=0?"y":"x";B[K]+=ee[te]*he})}return B}function $o(i,e){e===void 0&&(e={});var t=e,s=t.placement,a=t.boundary,n=t.rootBoundary,r=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?Ta:l,m=ot(s),u=m?o?qs:qs.filter(function(_){return ot(_)===m}):Ht,f=u.filter(function(_){return c.indexOf(_)>=0});f.length===0&&(f=u);var g=f.reduce(function(_,y){return _[y]=$t(i,{placement:y,boundary:a,rootBoundary:n,padding:r})[we(y)],_},{});return Object.keys(g).sort(function(_,y){return g[_]-g[y]})}function Oo(i){if(we(i)===fs)return[];var e=oi(i);return[Xs(i),e,Xs(e)]}function Mo(i){var e=i.state,t=i.options,s=i.name;if(!e.modifiersData[s]._skip){for(var a=t.mainAxis,n=a===void 0?!0:a,r=t.altAxis,o=r===void 0?!0:r,l=t.fallbackPlacements,c=t.padding,m=t.boundary,u=t.rootBoundary,f=t.altBoundary,g=t.flipVariations,_=g===void 0?!0:g,y=t.allowedAutoPlacements,h=e.options.placement,A=we(h),M=A===h,I=l||(M||!_?[oi(h)]:Oo(h)),x=[h].concat(I).reduce(function(pe,V){return pe.concat(we(V)===fs?$o(e,{placement:V,boundary:m,rootBoundary:u,padding:c,flipVariations:_,allowedAutoPlacements:y}):V)},[]),E=e.rects.reference,$=e.rects.popper,R=new Map,D=!0,O=x[0],B=0;B<x.length;B++){var G=x[B],ee=we(G),K=ot(G)===at,he=[re,ue].indexOf(ee)>=0,te=he?"width":"height",Z=$t(e,{placement:G,boundary:m,rootBoundary:u,altBoundary:f,padding:c}),d=he?K?fe:ne:K?ue:re;E[te]>$[te]&&(d=oi(d));var N=oi(d),w=[];if(n&&w.push(Z[ee]<=0),o&&w.push(Z[d]<=0,Z[N]<=0),w.every(function(pe){return pe})){O=G,D=!1;break}R.set(G,w)}if(D)for(var k=_?3:1,z=function(V){var X=x.find(function(Pe){var be=R.get(Pe);if(be)return be.slice(0,V).every(function(qe){return qe})});if(X)return O=X,"break"},q=k;q>0;q--){var oe=z(q);if(oe==="break")break}e.placement!==O&&(e.modifiersData[s]._skip=!0,e.placement=O,e.reset=!0)}}const Io={name:"flip",enabled:!0,phase:"main",fn:Mo,requiresIfExists:["offset"],data:{_skip:!1}};function Qs(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function ea(i){return[re,fe,ue,ne].some(function(e){return i[e]>=0})}function Ro(i){var e=i.state,t=i.name,s=e.rects.reference,a=e.rects.popper,n=e.modifiersData.preventOverflow,r=$t(e,{elementContext:"reference"}),o=$t(e,{altBoundary:!0}),l=Qs(r,s),c=Qs(o,a,n),m=ea(l),u=ea(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:m,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":u})}const Lo={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ro};function Do(i,e,t){var s=we(i),a=[ne,re].indexOf(s)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,r=n[0],o=n[1];return r=r||0,o=(o||0)*a,[ne,fe].indexOf(s)>=0?{x:o,y:r}:{x:r,y:o}}function Po(i){var e=i.state,t=i.options,s=i.name,a=t.offset,n=a===void 0?[0,0]:a,r=Ta.reduce(function(m,u){return m[u]=Do(u,e.rects,n),m},{}),o=r[e.placement],l=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[s]=r}const To={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Po};function Bo(i){var e=i.state,t=i.name;e.modifiersData[t]=Ua({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const zo={name:"popperOffsets",enabled:!0,phase:"read",fn:Bo,data:{}};function jo(i){return i==="x"?"y":"x"}function Ho(i){var e=i.state,t=i.options,s=i.name,a=t.mainAxis,n=a===void 0?!0:a,r=t.altAxis,o=r===void 0?!1:r,l=t.boundary,c=t.rootBoundary,m=t.altBoundary,u=t.padding,f=t.tether,g=f===void 0?!0:f,_=t.tetherOffset,y=_===void 0?0:_,h=$t(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:m}),A=we(e.placement),M=ot(e.placement),I=!M,x=gs(A),E=jo(x),$=e.modifiersData.popperOffsets,R=e.rects.reference,D=e.rects.popper,O=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,B=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),G=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ee={x:0,y:0};if($){if(n){var K,he=x==="y"?re:ne,te=x==="y"?ue:fe,Z=x==="y"?"height":"width",d=$[x],N=d+h[he],w=d-h[te],k=g?-D[Z]/2:0,z=M===at?R[Z]:D[Z],q=M===at?-D[Z]:-R[Z],oe=e.elements.arrow,pe=g&&oe?ps(oe):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ja(),X=V[he],Pe=V[te],be=wt(0,R[Z],pe[Z]),qe=I?R[Z]/2-k-be-X-B.mainAxis:z-be-X-B.mainAxis,$i=I?-R[Z]/2+k+be+Pe+B.mainAxis:q+be+Pe+B.mainAxis,ht=e.elements.arrow&&Ft(e.elements.arrow),Oi=ht?x==="y"?ht.clientTop||0:ht.clientLeft||0:0,Gt=(K=G==null?void 0:G[x])!=null?K:0,Je=d+qe-Gt-Oi,Wt=d+$i-Gt,le=wt(g?fi(N,Je):N,d,g?He(w,Wt):w);$[x]=le,ee[x]=le-d}if(o){var Kt,pt=x==="x"?re:ne,S=x==="x"?ue:fe,ve=$[E],U=E==="y"?"height":"width",P=ve+h[pt],Te=ve-h[S],ge=[re,ne].indexOf(A)!==-1,Ze=(Kt=G==null?void 0:G[E])!=null?Kt:0,Xe=ge?P:ve-R[U]-D[U]-Ze+B.altAxis,p=ge?ve+R[U]+D[U]-Ze-B.altAxis:Te,b=g&&ge?mo(Xe,ve,p):wt(g?Xe:P,ve,g?p:Te);$[E]=b,ee[E]=b-ve}e.modifiersData[s]=ee}}const Fo={name:"preventOverflow",enabled:!0,phase:"main",fn:Ho,requiresIfExists:["offset"]};function Vo(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function Uo(i){return i===ce(i)||!de(i)?Ns(i):Vo(i)}function Go(i){var e=i.getBoundingClientRect(),t=rt(e.width)/i.offsetWidth||1,s=rt(e.height)/i.offsetHeight||1;return t!==1||s!==1}function Wo(i,e,t){t===void 0&&(t=!1);var s=de(e),a=de(e)&&Go(e),n=Re(e),r=nt(i,a,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!t)&&((_e(e)!=="body"||vs(n))&&(o=Uo(e)),de(e)?(l=nt(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):n&&(l.x=bs(n))),{x:r.left+o.scrollLeft-l.x,y:r.top+o.scrollTop-l.y,width:r.width,height:r.height}}function Ko(i){var e=new Map,t=new Set,s=[];i.forEach(function(n){e.set(n.name,n)});function a(n){t.add(n.name);var r=[].concat(n.requires||[],n.requiresIfExists||[]);r.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&a(l)}}),s.push(n)}return i.forEach(function(n){t.has(n.name)||a(n)}),s}function qo(i){var e=Ko(i);return ao.reduce(function(t,s){return t.concat(e.filter(function(a){return a.phase===s}))},[])}function Jo(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function Zo(i){var e=i.reduce(function(t,s){var a=t[s.name];return t[s.name]=a?Object.assign({},a,s,{options:Object.assign({},a.options,s.options),data:Object.assign({},a.data,s.data)}):s,t},{});return Object.keys(e).map(function(t){return e[t]})}var ta={placement:"bottom",modifiers:[],strategy:"absolute"};function ia(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function Xo(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,s=t===void 0?[]:t,a=e.defaultOptions,n=a===void 0?ta:a;return function(o,l,c){c===void 0&&(c=n);var m={placement:"bottom",orderedModifiers:[],options:Object.assign({},ta,n),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},u=[],f=!1,g={state:m,setOptions:function(A){var M=typeof A=="function"?A(m.options):A;y(),m.options=Object.assign({},n,m.options,M),m.scrollParents={reference:Ge(o)?_t(o):o.contextElement?_t(o.contextElement):[],popper:_t(l)};var I=qo(Zo([].concat(s,m.options.modifiers)));return m.orderedModifiers=I.filter(function(x){return x.enabled}),_(),g.update()},forceUpdate:function(){if(!f){var A=m.elements,M=A.reference,I=A.popper;if(ia(M,I)){m.rects={reference:Wo(M,Ft(I),m.options.strategy==="fixed"),popper:ps(I)},m.reset=!1,m.placement=m.options.placement,m.orderedModifiers.forEach(function(B){return m.modifiersData[B.name]=Object.assign({},B.data)});for(var x=0;x<m.orderedModifiers.length;x++){if(m.reset===!0){m.reset=!1,x=-1;continue}var E=m.orderedModifiers[x],$=E.fn,R=E.options,D=R===void 0?{}:R,O=E.name;typeof $=="function"&&(m=$({state:m,options:D,name:O,instance:g})||m)}}}},update:Jo(function(){return new Promise(function(h){g.forceUpdate(),h(m)})}),destroy:function(){y(),f=!0}};if(!ia(o,l))return g;g.setOptions(c).then(function(h){!f&&c.onFirstUpdate&&c.onFirstUpdate(h)});function _(){m.orderedModifiers.forEach(function(h){var A=h.name,M=h.options,I=M===void 0?{}:M,x=h.effect;if(typeof x=="function"){var E=x({state:m,name:A,instance:g,options:I}),$=function(){};u.push(E||$)}})}function y(){u.forEach(function(h){return h()}),u=[]}return g}}var Yo=[xo,zo,vo,oo,To,Io,Fo,po,Lo],Qo=Xo({defaultModifiers:Yo});const me=i=>i??F,el=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",tl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",il="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",sl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e";var al=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,ys=(i,e,t,s)=>{for(var a=s>1?void 0:s?rl(e,t):e,n=i.length-1,r;n>=0;n--)(r=i[n])&&(a=(s?r(e,t,a):r(a))||a);return s&&a&&al(e,t,a),a},Ye;const Ot=(Ye=class extends Ce{static parseLevel(i){if(i){const e=Object.keys(Mt).find(t=>t.toLowerCase()===i.toLowerCase());return e&&Mt[e]}}static get styles(){return[zt`
|
|
1396
1396
|
${ft(el)}
|
|
1397
|
-
`]}render(){return ae`${this.iconToUse&&ae`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(i){return i.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(i)}get iconForLevel(){switch(Ye.parseLevel(this.level)){case"warn":return sl;case"suggest":return il;case"error":return tl;default:return null}}},Ye.ID="sd-field-validation-message",Ye.levelConverter={fromAttribute(i){return Ye.parseLevel(i)},toAttribute(i){return i&&i.toLowerCase()}},Ye);ys([v({type:String,attribute:!0})],Ot.prototype,"message",2);ys([v({type:String,attribute:!0})],Ot.prototype,"icon",2);ys([v({converter:Ot.levelConverter,reflect:!0})],Ot.prototype,"level",2);let Ti=Ot;var Mt=(i=>(i.Warn="warn",i.Suggest="suggest",i.Error="error",i))(Mt||{});customElements.get(Ti.ID)||customElements.define(Ti.ID,Ti);const nl=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}";var ol=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,J=(i,e,t,s)=>{for(var a=s>1?void 0:s?ll(e,t):e,n=i.length-1,r;n>=0;n--)(r=i[n])&&(a=(s?r(e,t,a):r(a))||a);return s&&a&&ol(e,t,a),a};const cl="sd-lit-input",sa="delegatesFocus"in window.ShadowRoot.prototype;let ml=0;var ye;const W=(ye=class extends Ce{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";const i=ml++;this._validationMessageId=ye.ID+"_message_"+i,this._inputId=ye.ID+"_input_"+i,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(i){super.firstUpdated(i),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=e=>{this.autocompleted=e.inputType==="insertReplacementText"||!("data"in e),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),sa||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",e=>{e.target===this&&this.inputElement.focus()})),this.addEventListener("keydown",e=>{var t,s;e.key=="Enter"&&((s=(t=this._internals)==null?void 0:t.form)==null||s.requestSubmit())}),this._initialized=!0}initAutocompleted(i){const e=t=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(t.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(t.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(i,"animationstart",e)):i.addEventListener("animationstart",e)}get activeShadyDOM(){const i=window.ShadyDOM;return i&&i.inUse?i:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(i){i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=i)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(i){this.currentText=i||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(i,e){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(i,e)})}static get styles(){return[zt`
|
|
1397
|
+
`]}render(){return ae`${this.iconToUse&&ae`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(i){return i.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(i)}get iconForLevel(){switch(Ye.parseLevel(this.level)){case"warn":return sl;case"suggest":return il;case"error":return tl;default:return null}}},Ye.ID="sd-field-validation-message",Ye.levelConverter={fromAttribute(i){return Ye.parseLevel(i)},toAttribute(i){return i&&i.toLowerCase()}},Ye);ys([v({type:String,attribute:!0})],Ot.prototype,"message",2);ys([v({type:String,attribute:!0})],Ot.prototype,"icon",2);ys([v({converter:Ot.levelConverter,reflect:!0})],Ot.prototype,"level",2);let Ti=Ot;var Mt=(i=>(i.Warn="warn",i.Suggest="suggest",i.Error="error",i))(Mt||{});customElements.get(Ti.ID)||customElements.define(Ti.ID,Ti);const nl=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}";var ol=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,J=(i,e,t,s)=>{for(var a=s>1?void 0:s?ll(e,t):e,n=i.length-1,r;n>=0;n--)(r=i[n])&&(a=(s?r(e,t,a):r(a))||a);return s&&a&&ol(e,t,a),a};const cl="sd-lit-input",sa="delegatesFocus"in window.ShadowRoot.prototype;let ml=0;var ye;const W=(ye=class extends Ce{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";const i=ml++;this._validationMessageId=ye.ID+"_message_"+i,this._inputId=ye.ID+"_input_"+i,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(i){super.firstUpdated(i),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=e=>{this.autocompleted=e.inputType==="insertReplacementText"||!("data"in e),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),sa||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",e=>{e.target===this&&this.inputElement.focus()})),this.addEventListener("keydown",e=>{var t,s;e.key=="Enter"&&((s=(t=this._internals)==null?void 0:t.form)==null||s.requestSubmit())}),this._initialized=!0}initAutocompleted(i){const e=t=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(t.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(t.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(i,"animationstart",e)):i.addEventListener("animationstart",e)}get activeShadyDOM(){const i=window.ShadyDOM;return i&&i.inUse?i:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(i){i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=i)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(i){this.currentText=i||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(i,e){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(i,e)})}static get styles(){return[zt`
|
|
1398
1398
|
${ft(nl)}
|
|
1399
1399
|
`]}render(){let i;return this.rows===1?i=ae`
|
|
1400
1400
|
<input
|
|
@@ -1498,7 +1498,7 @@ function updateMandatory(combobox: ComboBox) {
|
|
|
1498
1498
|
<div class="container" style="height: ${this.itemCount*this.itemHeight}px">
|
|
1499
1499
|
<slot name="items"></slot>
|
|
1500
1500
|
</div>
|
|
1501
|
-
`}updated(i){if(super.updated(i),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{const e=new MutationObserver(()=>{this.adjustWidthIfNeeded(),e.disconnect()});e.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{const i=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(i==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;const e=[...this.querySelectorAll("[item-index]")].map(s=>{if(s instanceof tt){s.enableLineClamp=!1;const a=s.missingWidthForTexts;return a>i&&(s.enableLineClamp=!0),a}}),t=Math.max(...e);t>0&&(this.style.width=`${this.offsetWidth+t}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(i=>{i instanceof tt&&(i.enableLineClamp=i.enableLineClamp||i.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){const i=[...this.querySelectorAll("[item-index]")],e=new Map,t=document.createDocumentFragment();for(const s of this._itemsRenderData){const a=this.renderItem(s);a.parentElement||t.appendChild(a),e.set(s.dataHash,a);const n=i.indexOf(a);n!==-1&&i.splice(n,1)}this.appendChild(t);for(const s of i)s instanceof tt&&(s.enableLineClamp=!1),this.removeChild(s);e.forEach((s,a)=>{this._elementCache.set(a,s)})}renderItem({index:i,top:e,dataHash:t,data:s}){let a;return s?this._elementCache.has(t)?(a=this._elementCache.get(t),this._elementCache.delete(t)):(a=this.itemGenerator(s,i),a.setAttribute("slot","items")):(a=document.createElement("div"),a.setAttribute("placeholder-item",""),a.setAttribute("slot","items")),Object.assign(a.style,{transform:`translateY(${e}px)`,height:`${this.itemHeight}px`}),a.setAttribute("item-index",i.toString()),a.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),a.setAttribute("aria-posinset",String(i+1)),(!a.id||a.id.startsWith(this.id+"_item_"))&&(a.id=this.id+"_item_"+i),this.itemCount-1==i?a.setAttribute("last",""):a.removeAttribute("last"),this.updateSelectedAttribute(i,a),this.updateFocusedAttribute(i,a),a}updateFocusedAttribute(i,e){this.focusIndex==i&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focused")}updateSelectedAttribute(i,e){const t=this.selectedIndices.indexOf(i)!==-1;t?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(t))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);const i=this.normalizeIndex(this._firstVisibleIndex-2),e=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(i,e);for(let t=i;t<=e;t++){const s=t-i,a=this.items[s];let n;a?n=JSON.stringify(a):n=`placeholder-${s}`,this._itemsRenderData.push({index:t,top:this.itemHeight*t,physicalIndex:s,dataHash:n,data:a})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(i){return Math.max(0,Math.min(i,this.itemCount-1))}get height(){return this.offsetHeight}requestData(i,e){!Number.isNaN(i)&&!Number.isNaN(e)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:i,stopIndex:e}}))}handleSelection(i,e){if(i<0||this.itemCount<=i)return;const t=i%this._visibleItemsNum,s=this.items[t];if(!s||s.disabled)return;let a=!0;if(this.selectionType!=="trigger-only"){const n=this.selectedIndices.indexOf(i);a=n==-1,a?this.selectionType==="single"?this.selectedIndices=[i]:this.selectedIndices.push(i):this.selectedIndices.splice(n,1),this.requestUpdate("selectedIndices")}this.focusIndex=i,this.dispatchSelectionEvent(i,a,e)}dispatchSelectionEvent(i,e,t){this.dispatchEvent(new CustomEvent("selection",{detail:{index:i,selected:e,hasModifier:t}}))}handleClick(i){const e=i.composedPath().find(t=>t.hasAttribute&&t.hasAttribute("item-index"));if(e){const t=parseInt(e.getAttribute("item-index"));if(Number.isInteger(t)){if(i.button==0||i.button==1){const s=i.type=="auxclick"&&i.button==1||i.metaKey||i.ctrlKey;this.handleSelection(t,s)}this.focusIndex=t}}}},Oe.ID="sd-virtual-list",Oe.ensureDefined=()=>{tt.ensureDefined(),customElements.get(Oe.ID)||customElements.define(Oe.ID,Oe)},Oe);Le([v({type:Number,attribute:"item-height",reflect:!0})],ke.prototype,"itemHeight",2);Le([v({type:Number})],ke.prototype,"itemCount",2);Le([v({type:Array,attribute:!1})],ke.prototype,"items",2);Le([v({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],ke.prototype,"selectionType",2);Le([v({type:String,attribute:!0,reflect:!0})],ke.prototype,"id",2);Le([v({type:String,reflect:!0})],ke.prototype,"role",2);Le([v({type:Number,attribute:"focus-index",reflect:!0})],ke.prototype,"focusIndex",1);Le([v({type:Array,attribute:!1})],ke.prototype,"selectedIndices",1);let Ji=ke;Ji.ensureDefined();const El=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}:host(:focus){outline:none}.suffix ::slotted(.clear-button),.suffix ::slotted(.toggle-button){cursor:pointer;width:16px;height:32px;padding:0 8px;margin-top:-8px;margin-bottom:-8px;fill:#666;outline:none;flex-shrink:0}.suffix ::slotted(.toggle-button){transition:transform .2s}:host([opened]) .suffix ::slotted(.toggle-button){transform:rotate(180deg)}:host([disabled]) .suffix ::slotted(.clear-button),:host([disabled]) .suffix ::slotted(.toggle-button){display:none!important}:host(:not([has-value])) .suffix ::slotted(.clear-button),:host([null-setting-disallowed]) .suffix ::slotted(.clear-button){display:none!important}:host(:not([allow-custom-value]):not([trigger-only])) .input{caret-color:transparent}:host(:not([allow-custom-value]):not([disabled])) .input{cursor:pointer}#default-slot{display:none}",Al=`<svg xmlns="http://www.w3.org/2000/svg" class="toggle-button" slot="suffix" viewBox="0 0 16 16">\r
|
|
1501
|
+
`}updated(i){if(super.updated(i),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{const e=new MutationObserver(()=>{this.adjustWidthIfNeeded(),e.disconnect()});e.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{const i=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(i==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;const e=[...this.querySelectorAll("[item-index]")].map(s=>{if(s instanceof tt){s.enableLineClamp=!1;const a=s.missingWidthForTexts;return a>i&&(s.enableLineClamp=!0),a}}),t=Math.max(...e);t>0&&(this.style.width=`${this.offsetWidth+t}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(i=>{i instanceof tt&&(i.enableLineClamp=i.enableLineClamp||i.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){const i=[...this.querySelectorAll("[item-index]")],e=new Map,t=document.createDocumentFragment();for(const s of this._itemsRenderData){const a=this.renderItem(s);a.parentElement||t.appendChild(a),e.set(s.dataHash,a);const n=i.indexOf(a);n!==-1&&i.splice(n,1)}this.appendChild(t);for(const s of i)s instanceof tt&&(s.enableLineClamp=!1),this.removeChild(s);e.forEach((s,a)=>{this._elementCache.set(a,s)})}renderItem({index:i,top:e,dataHash:t,data:s}){let a;return s?this._elementCache.has(t)?(a=this._elementCache.get(t),this._elementCache.delete(t)):(a=this.itemGenerator(s,i),a.setAttribute("slot","items")):(a=document.createElement("div"),a.setAttribute("placeholder-item",""),a.setAttribute("slot","items")),Object.assign(a.style,{transform:`translateY(${e}px)`,height:`${this.itemHeight}px`}),a.setAttribute("item-index",i.toString()),a.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),a.setAttribute("aria-posinset",String(i+1)),(!a.id||a.id.startsWith(this.id+"_item_"))&&(a.id=this.id+"_item_"+i),this.itemCount-1==i?a.setAttribute("last",""):a.removeAttribute("last"),this.updateSelectedAttribute(i,a),this.updateFocusedAttribute(i,a),a}updateFocusedAttribute(i,e){this.focusIndex==i&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focused")}updateSelectedAttribute(i,e){const t=this.selectedIndices.indexOf(i)!==-1;t?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(t))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);const i=this.normalizeIndex(this._firstVisibleIndex-2),e=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(i,e);for(let t=i;t<=e;t++){const s=t-i,a=this.items[s];let n;a?n=JSON.stringify(a):n=`placeholder-${s}`,this._itemsRenderData.push({index:t,top:this.itemHeight*t,physicalIndex:s,dataHash:n,data:a})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(i){return Math.max(0,Math.min(i,this.itemCount-1))}get height(){return this.offsetHeight}requestData(i,e){!Number.isNaN(i)&&!Number.isNaN(e)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:i,stopIndex:e}}))}handleSelection(i,e){if(i<0||this.itemCount<=i)return;const t=i%this._visibleItemsNum,s=this.items[t];if(!s||s.disabled)return;let a=!0;if(this.selectionType!=="trigger-only"){const n=this.selectedIndices.indexOf(i);a=n==-1,a?this.selectionType==="single"?this.selectedIndices=[i]:this.selectedIndices.push(i):this.selectedIndices.splice(n,1),this.requestUpdate("selectedIndices")}this.focusIndex=i,this.dispatchSelectionEvent(i,a,e)}dispatchSelectionEvent(i,e,t){this.dispatchEvent(new CustomEvent("selection",{detail:{index:i,selected:e,hasModifier:t}}))}handleClick(i){const e=i.composedPath().find(t=>t.hasAttribute&&t.hasAttribute("item-index"));if(e){const t=parseInt(e.getAttribute("item-index"));if(Number.isInteger(t)){if(i.button==0||i.button==1){const s=i.type=="auxclick"&&i.button==1||i.metaKey||i.ctrlKey;this.handleSelection(t,s)}this.focusIndex=t}}}},Oe.ID="sd-virtual-list",Oe.ensureDefined=()=>{tt.ensureDefined(),customElements.get(Oe.ID)||customElements.define(Oe.ID,Oe)},Oe);Le([v({type:Number,attribute:"item-height",reflect:!0})],ke.prototype,"itemHeight",2);Le([v({type:Number})],ke.prototype,"itemCount",2);Le([v({type:Array,attribute:!1})],ke.prototype,"items",2);Le([v({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],ke.prototype,"selectionType",2);Le([v({type:String,attribute:!0,reflect:!0})],ke.prototype,"id",2);Le([v({type:String,reflect:!0})],ke.prototype,"role",2);Le([v({type:Number,attribute:"focus-index",reflect:!0})],ke.prototype,"focusIndex",1);Le([v({type:Array,attribute:!1})],ke.prototype,"selectedIndices",1);let Ji=ke;Ji.ensureDefined();const El=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}:host(:focus){outline:none}.suffix ::slotted(.clear-button),.suffix ::slotted(.toggle-button){cursor:pointer;width:16px;height:32px;padding:0 8px;margin-top:-8px;margin-bottom:-8px;fill:#666;outline:none;flex-shrink:0}.suffix ::slotted(.toggle-button){transition:transform .2s}:host([opened]) .suffix ::slotted(.toggle-button){transform:rotate(180deg)}:host([disabled]) .suffix ::slotted(.clear-button),:host([disabled]) .suffix ::slotted(.toggle-button){display:none!important}:host(:not([has-value])) .suffix ::slotted(.clear-button),:host([null-setting-disallowed]) .suffix ::slotted(.clear-button){display:none!important}:host(:not([allow-custom-value]):not([trigger-only])) .input{caret-color:transparent}:host(:not([allow-custom-value]):not([disabled])) .input{cursor:pointer}#default-slot{display:none}",Al=`<svg xmlns="http://www.w3.org/2000/svg" class="toggle-button" slot="suffix" viewBox="0 0 16 16">\r
|
|
1502
1502
|
<path d="M13 4v2l-5 5-5-5v-2l5 5z"/>\r
|
|
1503
1503
|
</svg>\r
|
|
1504
1504
|
`,kl=`<svg xmlns="http://www.w3.org/2000/svg" class="clear-button" slot="suffix" viewBox="0 0 16 16">\r
|
|
@@ -1511,7 +1511,7 @@ function updateMandatory(combobox: ComboBox) {
|
|
|
1511
1511
|
<slot @slotchange=${this.onDefaultSlotChange} id="default-slot"></slot>
|
|
1512
1512
|
`}attributeChangedCallback(e,t,s){if(super.attributeChangedCallback(e,t,s),t!==s)switch(e){case"opened":{this.handleOpenedStateChange();break}case"item-height":{this._list&&(this._list.itemHeight=this.itemHeight);break}case"id":{this.updateListId();break}}}firstUpdated(e){super.firstUpdated(e),this.value&&!this.comboBoxValue&&this.updateComboBoxValueFromValue(),window.requestAnimationFrame(()=>{this.initClearButtton(),this.initToggleButtton(),this.addEventListener("click",()=>{this.disabled||(this.opened=!this.opened)}),this.addEventListener("keydown",t=>{this.disabled||this.handleKeyDown(t)})}),this.inputElement.setAttribute("role","combobox"),this.inputElement.setAttribute("aria-autocomplete","list")}updateComboBoxValueFromValue(){if(this.value){const e=this._itemCache.findIndex(t=>t[this.displayValuePath]===this.value);e>-1?this._comboBoxValue={index:e,item:this._itemCache[e]}:this.allowCustomValue?this._comboBoxValue=this.value:this._comboBoxValue=null}}updated(e){super.updated(e),e.has("currentText")?this.currentText?(this.setAttribute("has-value",""),this._clearButton&&(this._clearButton.style.display="")):this.removeAttribute("has-value"):e.has("triggerOnly")&&this._list&&(this._list.selectionType=this.triggerOnly?xt.TriggerOnly:xt.Single)}initClearButtton(){const e=document.createElement("template");e.innerHTML=kl,this._clearButton=e.content.firstChild,this.appendChild(this._clearButton),this._clearButton.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.opened=!1,this.clearValue()})}initToggleButtton(){const e=document.createElement("template");e.innerHTML=Al,this._toggleButton=e.content.firstChild,this.appendChild(this._toggleButton),this._toggleButton.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.opened=!this.opened,this.select()})}filterItemsInMemory(){if(this.isLazyLoadConfigured)return;let e=!1;this.filterText&&(this.filterProperty?(this._dataProvider.items=this._itemCache.filter(t=>t[this.filterProperty]&&String(t[this.filterProperty]).indexOf(this.filterText)>-1),e=!0):this.inMemoryFilter&&(this._dataProvider.items=this._itemCache.filter(t=>this.inMemoryFilter(this.filterText,t)),e=!0)),e?this._list.focusIndex=null:this._dataProvider.items=this._itemCache,this.opened&&this._popper&&this._popper.update()}ensureListAndPopperInitialized(){if(this._list||(this._list=document.createElement(Ji.ID),this.updateListId(),this._list.classList.add("combo-box-dropdown"),this._list.itemHeight=this.itemHeight,this._list.itemGenerator=this.itemGenerator,this._list.selectionType=this.triggerOnly?xt.TriggerOnly:xt.Single,this._list.setAttribute("focus-target",""),Object.assign(this._list.style,{zIndex:"21000",boxShadow:`rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
|
|
1513
1513
|
rgba(0, 0, 0, 0.12) 0px 1px 5px 0px,
|
|
1514
|
-
rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"}),this._list.addEventListener("selection",this.handleSelection),this._dataProvider.connectList(this._list)),!this._popper){const e=this;this._popper=Qo(this,this._list,{placement:"bottom-start",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!0}},{name:"hide",enabled:!1},{name:"closeIfReferenceHidden",enabled:!0,phase:"afterWrite",fn({state:t}){t.elements.reference.closeIfNotVisible()}},{name:"offset",options:{offset:({placement:t})=>t.indexOf("top")>-1?[0,-parseInt(getComputedStyle(e).paddingTop,10)]:t.indexOf("bottom")>-1?[0,-parseInt(getComputedStyle(e).paddingBottom,10)]:[0,0]}},{name:"adjustWidthIfNeeded",enabled:!0,phase:"read",fn({state:t}){t.elements.popper.increaseWidthOnNextRenderIfNeeded()}}]})}}closeIfNotVisible(){const e=this.elementFromMiddleOfComboBox();!this.contains(e)&&!this.shadowRoot.contains(e)&&e!==this._list&&(this.triggerOnly&&(this.value=null),this.opened=!1)}elementFromMiddleOfComboBox(){const e=this.getBoundingClientRect();return document.elementFromPoint(e.left+e.width/2,e.top+e.height/2)}async handleOpenedStateChange(){this.inputElement.setAttribute("aria-expanded",String(this.opened)),this.opened
|
|
1514
|
+
rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"}),this._list.addEventListener("selection",this.handleSelection),this._dataProvider.connectList(this._list)),!this._popper){const e=this;this._popper=Qo(this,this._list,{placement:"bottom-start",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!0}},{name:"hide",enabled:!1},{name:"closeIfReferenceHidden",enabled:!0,phase:"afterWrite",fn({state:t}){t.elements.reference.closeIfNotVisible()}},{name:"offset",options:{offset:({placement:t})=>t.indexOf("top")>-1?[0,-parseInt(getComputedStyle(e).paddingTop,10)]:t.indexOf("bottom")>-1?[0,-parseInt(getComputedStyle(e).paddingBottom,10)]:[0,0]}},{name:"adjustWidthIfNeeded",enabled:!0,phase:"read",fn({state:t}){t.elements.popper.increaseWidthOnNextRenderIfNeeded()}}]})}}closeIfNotVisible(){const e=this.elementFromMiddleOfComboBox();!this.contains(e)&&!this.shadowRoot.contains(e)&&e!==this._list&&(this.triggerOnly&&(this.value=null),this.opened=!1)}elementFromMiddleOfComboBox(){const e=this.getBoundingClientRect();return document.elementFromPoint(e.left+e.width/2,e.top+e.height/2)}async handleOpenedStateChange(){if(this.inputElement.setAttribute("aria-expanded",String(this.opened)),this.opened){if(!this.disabled){this.ensureListAndPopperInitialized();const e=(this.filterText||"")!==(this._lastRequestedFilterText||"");this.isLazyLoadConfigured&&(this.items.length==0||e)&&this.requestData(0,e),this.updateDropdownSizes(),this.ownerDocument.body.appendChild(this._list),this.updateFocusAndSelectedIndexFromValue(),window.requestAnimationFrame(()=>{this._popper&&this._popper.update()}),window.addEventListener("pointerdown",this.handleWindowPointerDown),!this.allowCustomValue&&!this._openedByFilterTextChange&&this.select()}this._openedByFilterTextChange=!1}else await this._list.updateComplete,this._popper&&await this._popper.update,this.ownerDocument.body.removeChild(this._list),window.removeEventListener("pointerdown",this.handleWindowPointerDown),this.updateValueOnClose(),this.clearFilter(),this.setSelectionRange(0,0),this.inputElement.removeAttribute("aria-activedescendant"),this._popper&&(this._popper.destroy(),this._popper=null)}updateValueOnClose(){const e=this.comboBoxValue||"";if(this.nullSettingDisallowed&&!this.value&&this.comboBoxValue)this.restorePreviousSelection();else if(this.value!==this.convertToDisplayValue(null)){const t=this._dataProvider.items[this._list.focusIndex];if(t&&t[this.displayValuePath]===this.value){if(t.disabled)return;this.comboBoxValue={index:this._itemCache.indexOf(t),item:t}}else if(this.allowCustomValue||!this.value)this.comboBoxValue=this.value;else{const s=this._itemCache.findIndex(a=>a[this.displayValuePath]===this.value&&!a.disabled);s>-1?this.comboBoxValue={index:s,item:this._itemCache[s]}:this.restorePreviousSelection()}}e!==(this.comboBoxValue||"")&&this.dispatchSelectionChangeEvent()}restorePreviousSelection(){this.updateInputValue(null)}updateFocusAndSelectedIndexFromValue(){if(this.comboBoxValue&&!this.isCustomValue(this.comboBoxValue)&&!this._openedByFilterTextChange){let e=this.comboBoxValue.index;if((e==-1||this.isLazyLoadConfigured)&&(e=this.items.indexOf(this.comboBoxValue.item),e==-1)){const t=this.comboBoxValue.item.id;t!=null&&(e=this.items.findIndex(s=>s.id==t))}this._list.focusIndex=e,this._list.selectedIndices=e==-1?[]:[e]}else this._list.focusIndex=-1,this._list.selectedIndices=[];this.updateActiveDescendant()}navigateInList(e){this.opened?(this._list.focusIndex==null?e>0?this._list.focusIndex=0:this._list.focusIndex=Math.max(0,this._dataProvider.items.length-1):this._list.focusIndex=Math.max(0,Math.min(this._dataProvider.items.length-1,this._list.focusIndex+e)),this.updateInputValue(this._dataProvider.items[this._list.focusIndex]),this.updateActiveDescendant(),this.allowCustomValue||this.select()):this.opened=!0}updateActiveDescendant(){const e=this._list&&this._list.getListItem(this._list.focusIndex);e?this.inputElement.setAttribute("aria-activedescendant",e.id):this.inputElement.removeAttribute("aria-activedescendant")}updateInputValue(e){this.updateComplete.then(()=>{this.value=this.convertToDisplayValue(e)})}convertToDisplayValue(e){return e?e[this.displayValuePath]:this.comboBoxValue?this.isCustomValue(this.comboBoxValue)?this.comboBoxValue:this.comboBoxValue.item[this.displayValuePath]:null}fireValueChange(e){if(e&&this.filterText!==this.value){const t=(this.filterText||"")!==this.value;this.filterText=this.value,this.opened||(this._openedByFilterTextChange=!0,this.opened=!0),t&&(this.dispatchFilterChangeEvent(),this.debouncedFilterItemsInMemory())}}clearValue(){this.nullSettingDisallowed||(this.value=null,this.inputElement.removeAttribute("aria-activedescendant"),this._list&&(this._list.selectedIndices=[]),this.clearFilter(),this.comboBoxValue&&(this.comboBoxValue=null,this.dispatchSelectionChangeEvent()))}clearFilter(){this.filterText!=null&&(this.filterText=void 0,this.filterItemsInMemory(),this.dispatchFilterChangeEvent())}updateDropdownSizes(){const t=((window.innerHeight||document.documentElement.clientHeight)-this.offsetHeight)*.5;Object.assign(this._list.style,{maxHeight:`${t}px`,minWidth:`${Math.max(this.offsetWidth,this.minimumOverlayWidth)}px`,maxWidth:`max(50vw, ${this.offsetWidth}px)`})}updateListId(){this.inputElement&&this._list&&(this._list.id=this.id+"_list",this.inputElement.setAttribute("aria-controls",this._list.id))}isCustomValue(e){return typeof e=="string"}dispatchSelectionChangeEvent(){this.updateComplete.then(()=>{var e;if(this.dispatchEvent(new CustomEvent("selection-change",{detail:{selection:this.comboBoxValue,isCustomValue:this.isCustomValue(this.comboBoxValue)}})),this.triggerOnly)this.comboBoxValue=null;else{const t=this.comboBoxValue;typeof t=="string"?this.setFormValue(t):this.setFormValue((e=t==null?void 0:t.item)==null?void 0:e.caption)}}).catch(e=>{console.error("Could not dispatch selection change event due to:",e)})}dispatchFilterChangeEvent(){this.dispatchEvent(new CustomEvent("filter-change",{detail:{value:this.filterText},composed:!0})),this.debouncedRequestData(0)}get isLazyLoadConfigured(){return!!this._onDataRequest}requestData(e,t){if(t==null&&(t=(this.filterText||"")!==(this._lastRequestedFilterText||"")),this.isLazyLoadConfigured){if(!this.opened){t&&(this._dataProvider.items=[],this._itemCache=[]);return}if(this._lastRequestedPage==e&&!t)return;this._pendingDataRequest&&this._pendingDataRequest.cancel(se.DATA_REQUEST_CANCELLED);const s=new Promise((a,n)=>{this._pendingDataRequest={cancel:n}});this._lastRequestedPage=e,this._lastRequestedFilterText=this.filterText,this.setAttribute("loading",""),Promise.race([s,this._onDataRequest(this._lastRequestedFilterText,e)]).then(a=>{if(this.filterText==this._lastRequestedFilterText&&this._lastRequestedPage==e&&(this._dataProvider.finalSizeIsKnown=a.finalSizeIsKnown,t?(this._dataProvider.items=a.items,this._itemCache=a.items):(this._dataProvider.addItems(a.items),this._itemCache=this._dataProvider.items),this._list&&(this._list.itemCount=this._dataProvider.items.length),this._popper&&this.opened)){if(this.comboBoxValue&&!this.isCustomValue(this.comboBoxValue)){const n=this.comboBoxValue.item;if(this._list.selectedIndices.length==0||this.items[this._list.selectedIndices[0]]!=n){let r=this.items.indexOf(n);if(r==-1){const o=n.id;o!=null&&(r=this.items.findIndex(l=>l.id==o))}this.comboBoxValue.index=r,this._list.selectedIndices=r==-1?[]:[r]}}this.updateDropdownSizes(),this._popper.update()}this._pendingDataRequest=null,this.removeAttribute("loading")}).catch(a=>{a!==se.DATA_REQUEST_CANCELLED&&(console.error(`Data could not be loaded for filter "${this._lastRequestedFilterText}" and page number "${e}" due to the following error:
|
|
1515
1515
|
${a}`),this._dataProvider.finalSizeIsKnown=!0,this.items.length==0?this.opened=!1:this._list&&(this._list.itemCount=this.items.length),this.removeAttribute("loading")),this._pendingDataRequest=null})}}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}onDefaultSlotChange(){this._declarativeItems=this.defaultSlot.assignedElements(),this._declarativeItems.length>0&&(this.finalSizeIsKnown=!0,this.itemGenerator=(e,t)=>this._declarativeItems[t].cloneNode(!0),this.items=this._declarativeItems.map(e=>{const t={caption:e.getAttribute("caption"),description:e.getAttribute("description")};return this.displayValuePath!="caption"&&this.displayValuePath!="description"&&(t[this.displayValuePath]=e[this.displayValuePath]||e.getAttribute(this.displayValuePath)),t}))}},se.ID=Ml,se.ensureDefined=()=>{Ji.ensureDefined(),customElements.get(se.ID)||customElements.define(se.ID,se)},se.formAssociated=!0,se.DATA_REQUEST_CANCELLED="cancel_data_request",se);De([v({type:Boolean,reflect:!0})],$e.prototype,"opened",2);De([v({type:Number,attribute:"item-height"})],$e.prototype,"itemHeight",2);De([v({type:Boolean,attribute:"allow-custom-value",reflect:!0})],$e.prototype,"allowCustomValue",2);De([v({type:Boolean,attribute:"trigger-only",reflect:!0})],$e.prototype,"triggerOnly",2);De([v({type:Boolean,attribute:"null-setting-disallowed",reflect:!0})],$e.prototype,"nullSettingDisallowed",2);De([v({type:String,attribute:"display-value-path",noAccessor:!0})],$e.prototype,"displayValuePath",2);De([v({type:String,attribute:"filter-property",noAccessor:!0})],$e.prototype,"filterProperty",2);De([v({type:String,attribute:!0,reflect:!0})],$e.prototype,"id",2);let Rl=$e;Rl.ensureDefined();function Wa(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Ll(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var a=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:function(){return i[s]}})}),t}var xs={exports:{}},j=String,Ka=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};xs.exports=Ka();xs.exports.createColors=Ka;var Dl=xs.exports;const Pl={},Tl=Object.freeze(Object.defineProperty({__proto__:null,default:Pl},Symbol.toStringTag,{value:"Module"})),Ne=Ll(Tl);let ra=Dl,na=Ne,Zi=class qa extends Error{constructor(e,t,s,a,n,r){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),a&&(this.source=a),r&&(this.plugin=r),typeof t<"u"&&typeof s<"u"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,qa)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=ra.isColorSupported),na&&e&&(t=na(t));let s=t.split(/\r?\n/),a=Math.max(this.line-3,0),n=Math.min(this.line+2,s.length),r=String(n).length,o,l;if(e){let{bold:c,gray:m,red:u}=ra.createColors(!0);o=f=>c(u(f)),l=f=>m(f)}else o=l=c=>c;return s.slice(a,n).map((c,m)=>{let u=a+1+m,f=" "+(" "+u).slice(-r)+" | ";if(u===this.line){let g=l(f.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+l(f)+c+`
|
|
1516
1516
|
`+g+o("^")}return" "+l(f)+c}).join(`
|
|
1517
1517
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cas-smartdesign/combo-box",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.7",
|
|
4
4
|
"description": "A combo-box element with the look and feel of the SmartDesign inputs & list item layouts",
|
|
5
5
|
"main": "dist/combo-box-with-externals.js",
|
|
6
6
|
"module": "dist/combo-box.mjs",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@popperjs/core": "^2.11.8",
|
|
11
11
|
"lit": "^2.8.0",
|
|
12
|
-
"@cas-smartdesign/virtual-list": "^6.2.3",
|
|
13
12
|
"@cas-smartdesign/list-item": "^7.2.3",
|
|
14
|
-
"@cas-smartdesign/
|
|
13
|
+
"@cas-smartdesign/virtual-list": "^6.2.3",
|
|
14
|
+
"@cas-smartdesign/lit-input": "^7.1.5"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@cas-smartdesign/
|
|
17
|
+
"@cas-smartdesign/element-preview": "^0.2.2",
|
|
18
18
|
"@cas-smartdesign/license-generator": "^1.6.3",
|
|
19
|
-
"@cas-smartdesign/
|
|
19
|
+
"@cas-smartdesign/field-validation-message": "^5.0.2"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|