@qaecy/cue-ui 0.0.26 → 0.0.28
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/112.js +1 -1
- package/240.js +1 -0
- package/311.js +1 -1
- package/360.js +1 -0
- package/368.js +1 -0
- package/376.js +1 -1
- package/393.js +1 -1
- package/418.js +1 -1
- package/419.js +1 -1
- package/446.js +1 -0
- package/499.js +1 -0
- package/571.js +1 -1
- package/611.js +1 -0
- package/613.js +1 -0
- package/{544.js → 629.js} +1 -1
- package/645.js +1 -0
- package/741.js +1 -1
- package/773.js +1 -0
- package/911.js +1 -1
- package/919.js +1 -0
- package/964.js +1 -0
- package/README.md +4 -0
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/104.js +0 -1
- package/382.js +0 -1
- package/540.js +0 -1
- package/60.js +0 -1
- package/960.js +0 -1
package/645.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[613,645],{4613(R,M,a){a.d(M,{Logo:()=>d});var c=a(7705),n=a(5802),s=a(5547),u=a(2271),y=a(6170);let d=(()=>{class h{size=(0,c.hFB)("m");sizeMap={xs:"40px",s:"80px",m:"160px",l:"222px"};active=(0,c.hFB)(!0,{transform:c.L39});continuous=(0,c.hFB)(!1,{transform:c.L39});mode=(0,c.hFB)("default");isDarkMode=(0,c.geq)(!1);handleDarkModeChange(e){this.isDarkMode.set(e),-1===this.raf&&this.animate()}colorA=(0,u.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=e=>{if(void 0!==e){const o=5e-4*(e-this.appearTime);"glow"===this.mode()?this.tip=o%1:(this.tip=Math.min(1,o),this.active()||(this.toe=Math.min(1,6e-4*(e-this.disappearTime))))}if("glow"===this.mode()){const o=.06666666666666667,t=this.rgbToSvg(this.colorA());return this.paths.forEach((i,l)=>{this.norm=1/this.paths.length*l;let r=this.tip-this.norm;if(r<-(1-o)&&(r+=1),r>=0&&r<o){const p=1-r/o;i.setAttribute("stroke",this.rgbToSvg(this.colorB)),i.setAttribute("stroke-opacity",p.toFixed(3))}else i.setAttribute("stroke",t),i.setAttribute("stroke-opacity","0.005")}),void(this.raf=requestAnimationFrame(this.animate))}if(this.paths.forEach((o,t)=>{this.norm=1/this.paths.length*t,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),o.setAttribute("stroke",this.tip*this.paths.length>t&&(this.active()||this.toe*this.paths.length<t)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}mixChannel(e,o,t){return parseInt((e*t+o*(1-t)).toFixed())}mixRgb(e,o,t){return[this.mixChannel(e[0],o[0],t),this.mixChannel(e[1],o[1],t),this.mixChannel(e[2],o[2],t)]}rgbToSvg(e){return`rgb(${e[0]},${e[1]},${e[2]})`}constructor(){(0,n.QZP)(()=>{"glow"===this.mode()||this.active()?this.activate():this.deactivate()}),(0,n.QZP)(()=>{this.isDarkMode(),this.animate()});const e=(0,n.WQX)(s.aKT);(0,s.mal)({read:()=>{if(this.paths.length)return;const o=e.nativeElement.querySelector("svg"),t=e.nativeElement.querySelector("#original-path");if(!t)return;const i=t.getTotalLength(),r=[];for(let p=0;p<400;p++){const g=t.getPointAtLength(i/400*p);r.push({x:parseFloat(g.x.toFixed(2)),y:parseFloat(g.y.toFixed(2))})}r.push(t.getPointAtLength(i)),r.reverse(),r.forEach((p,g)=>{if(0===g||1===g)return;const f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d",`M${r[g-2].x},${r[g-2].y}L${r[g-1].x},${r[g-1].y}L${p.x},${p.y}`),f.setAttribute("fill","none"),f.setAttribute("stroke","transparent"),f.setAttribute("stroke-width",t?.getAttribute("stroke-width")||"1"),f.setAttribute("stroke-miterlimit",t?.getAttribute("stroke-miterlimit")||"1"),o.appendChild(f),this.paths.push(f)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(o){return new(o||h)};static \u0275cmp=s.VBU({type:h,selectors:[["cue-logo"]],hostVars:2,hostBindings:function(o,t){2&o&&s.xc7("width",t.sizeMap[t.size()])},inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],mode:[1,"mode"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(o,t){1&o&&(n.qSk(),s.j41(0,"svg",0),s.bIt("darkModeChange",function(l){return t.handleDarkModeChange(l)}),s.nrm(1,"path",1),s.k0s())},dependencies:[y.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return h})()},3191(R,M,a){a.d(M,{g:()=>s});var c=a(467),n=a(5802);let s=(()=>{class u{searchPage(d,h,m){return(0,c.A)(function*(){if(!m||!m.trim())return[];const e=m.toLowerCase(),o=yield d.getPage(h),t=o.getViewport({scale:1}),l=(yield o.getTextContent()).items,r=[];let p="";const g=[],f=[];for(let _=0;_<l.length;_++){const D=l[_].str??"";for(let v=0;v<D.length;v++)p+=D[v],g.push(_),f.push(v)}const U=p.toLowerCase();let A=0;for(;A<U.length;){const _=U.indexOf(e,A);if(-1===_)break;const K=_+e.length-1;A=_+1;const D=new Set;for(let L=_;L<=K;L++)D.add(g[L]);let v=1/0,E=1/0,b=-1/0,w=-1/0;for(const L of D){const B=l[L],[x,W,q,z,k,C]=B.transform,P=B.width??0,O=B.height??Math.abs(x||z||12),T=Math.sqrt(x*x+W*W)||1,Q=x/T,X=W/T,j=q/T,H=z/T,ot=[[k,C],[k+Q*P,C+X*P],[k+Q*P+j*O,C+X*P+H*O],[k+j*O,C+H*O]];for(const[st,at]of ot){const[G,Z]=t.convertToViewportPoint(st,at);v=Math.min(v,G),E=Math.min(E,Z),b=Math.max(b,G),w=Math.max(w,Z)}}const F=t.width,I=t.height,V=.005*F,$=.005*I,J=(E-$)/I*100,S=(b-v+2*V)/F*100,N=(w-E+2*$)/I*100;S>0&&N>0&&r.push({page:h,xywhStr:`percent:${((v-V)/F*100).toFixed(2)},${J.toFixed(2)},${S.toFixed(2)},${N.toFixed(2)}`})}return r})()}searchAll(d,h){var m=this;return(0,c.A)(function*(){if(!h||!h.trim())return[];const e=d.numPages,o=[];for(let t=1;t<=e;t++){const i=yield m.searchPage(d,t,h);o.push(...i)}return o})()}static \u0275fac=function(h){return new(h||u)};static \u0275prov=n.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})()},6170(R,M,a){a.d(M,{R:()=>y});var c=a(7705),n=a(5802),s=a(2271),u=a(5547);let y=(()=>{class d{destroyRef=(0,n.WQX)(n.abz);_isDarkMode=(0,n.vPA)(this.hasDarkClass());isDarkMode=(0,s.EW)(()=>this._isDarkMode());darkModeChange=(0,c.CGW)();constructor(){const m=new MutationObserver(e=>{e.forEach(o=>{if("attributes"===o.type&&"class"===o.attributeName){const t=this.hasDarkClass();t!==this._isDarkMode()&&this._isDarkMode.set(t)}})});m.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>m.disconnect()),(0,n.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(e){return new(e||d)};static \u0275dir=u.FsC({type:d,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return d})()},7851(R,M,a){a.d(M,{k:()=>m});var c=a(7705),n=a(5802),s=a(5547),u=a(4613),y=a(2245);function d(e,o){if(1&e&&(s.j41(0,"cue-typography",1),s.EFF(1),s.k0s()),2&e){const t=s.XpG();s.R7$(),s.JRh(t.message)}}let h=(()=>{class e{message="";static \u0275fac=function(i){return new(i||e)};static \u0275cmp=s.VBU({type:e,selectors:[["cue-logo-loader-overlay"]],decls:2,vars:1,consts:[["size","m","mode","glow"],["size","s",1,"message"]],template:function(i,l){1&i&&(s.nrm(0,"cue-logo",0),s.nVh(1,d,2,1,"cue-typography",1)),2&i&&(s.R7$(),s.vxM(l.message?1:-1))},dependencies:[u.Logo,y.Typography],styles:["[_nghost-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;z-index:1000}.message[_ngcontent-%COMP%]{color:var(--color-text-secondary)}"],changeDetection:0})}return e})(),m=(()=>{class e{cueLogoLoader=(0,c.hFB)(!1);cueLogoLoaderMessage=(0,c.hFB)("");el=(0,n.WQX)(s.aKT);appRef=(0,n.WQX)(s.o8S);envInjector=(0,n.WQX)(n.uvJ);renderer=(0,n.WQX)(s.sFG);overlayRef;constructor(){(0,n.QZP)(()=>{const t=this.cueLogoLoader(),i=this.cueLogoLoaderMessage();t?(this.overlayRef||this.createOverlay(),this.overlayRef&&(this.overlayRef.instance.message=i,this.overlayRef.changeDetectorRef.markForCheck())):this.destroyOverlay()})}createOverlay(){this.overlayRef=(0,c.a0P)(h,{environmentInjector:this.envInjector}),this.appRef.attachView(this.overlayRef.hostView),this.renderer.appendChild(this.el.nativeElement,this.overlayRef.hostView.rootNodes[0])}destroyOverlay(){this.overlayRef&&(this.appRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),this.overlayRef=void 0)}ngOnDestroy(){this.destroyOverlay()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=s.FsC({type:e,selectors:[["","cueLogoLoader",""]],hostVars:2,hostBindings:function(i,l){2&i&&s.xc7("position","relative")},inputs:{cueLogoLoader:[1,"cueLogoLoader"],cueLogoLoaderMessage:[1,"cueLogoLoaderMessage"]}})}return e})()}}]);
|
package/741.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[741],{1741($,
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[741],{1741($,v,o){o.r(v),o.d(v,{DocumentViewer:()=>E});var p=o(467),b=o(9769),r=o(5802),l=o(7705),f=o(2271),s=o(5547),g=o(3418),P=o(8807),R=o(2065);const D=["*"];let M=(()=>{class c{width=(0,l.hFB)("auto");height=(0,l.hFB)("auto");style=(0,l.hFB)("");getStyles=(0,f.EW)(()=>this.style());static \u0275fac=function(n){return new(n||c)};static \u0275cmp=s.VBU({type:c,selectors:[["cue-container"]],hostVars:6,hostBindings:function(n,i){2&n&&(s.Aen(i.getStyles()),s.xc7("max-width",i.width())("max-height",i.height()))},inputs:{width:[1,"width"],height:[1,"height"],style:[1,"style"]},ngContentSelectors:D,decls:1,vars:0,template:function(n,i){1&n&&(s.NAR(),s.SdG(0))},styles:["[_nghost-%COMP%]{display:flex;align-items:stretch;container-name:cue-container;container-type:inline-size}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{flex:1;max-width:100%}"]})}return c})();var w=o(2245),T=o(5381),N=o(5971),C=o(3319),I=o(5448),B=o(2014),S=o(7851),V=o(3191);let L=(()=>{class c{searchService=(0,r.WQX)(V.g);entityBeingPlaced=(0,r.vPA)(void 0);confirmedPlacement=(0,r.vPA)(void 0);rdfBaseURL=(0,r.vPA)("");contentUUID=(0,r.vPA)("");activePdfDoc=(0,r.vPA)(null);currentPage=(0,r.vPA)(1);requestedPage=(0,r.vPA)(null);navigateToPage(e){this.currentPage.set(e),this.requestedPage.set(e)}entityTextSearchResults=(0,r.vPA)([]);entityTextSearchResultsOnCurrentPage=(0,f.EW)(()=>this.entityTextSearchResults().filter(e=>e.page===this.currentPage()));currentPlacementBbox=(0,r.vPA)(null);categoryPreviewBoxes=(0,r.vPA)([]);_lastMatchIndex=(0,r.vPA)(null);matchCycleDisplay=(0,f.EW)(()=>{const e=this._lastMatchIndex(),n=this.entityTextSearchResultsOnCurrentPage().length;return null===e||0===n?"":`${e+1}/${n}`});cycleTextMatch(){const e=this.entityTextSearchResultsOnCurrentPage();if(!e.length)return;const n=this._lastMatchIndex(),i=null===n?0:(n+1)%e.length;this._lastMatchIndex.set(i);const t=e[i].xywhStr.replace("percent:",""),[h,m,a,u]=t.split(",").map(Number),y=Math.max(0,h-.5),x=Math.max(0,m-.5),O=Math.min(100-y,a+1),U=Math.min(100-x,u+1);this.currentPlacementBbox.set({xywhStr:`percent:${y.toFixed(2)},${x.toFixed(2)},${O.toFixed(2)},${U.toFixed(2)}`,color:"rgba(255, 160, 0, 0.9)",allowRemove:!1})}setManualBbox(e){this._lastMatchIndex.set(null),this.currentPlacementBbox.set({...e,allowRemove:!1})}clearPlacement(){this.currentPlacementBbox.set(null),this._lastMatchIndex.set(null)}constructor(){(0,r.QZP)(()=>{const e=this.entityBeingPlaced(),n=this.activePdfDoc();e?.value&&n?this.searchService.searchAll(n,e.value).then(i=>{this.entityTextSearchResults.set(i)}):this.entityTextSearchResults.set([])}),(0,r.QZP)(()=>{this.currentPage(),this._lastMatchIndex.set(null),this.currentPlacementBbox.set(null)}),(0,r.QZP)(()=>{const e=this.entityBeingPlaced();this._lastMatchIndex.set(null),void 0===e&&this.currentPlacementBbox.set(null)})}static \u0275fac=function(n){return new(n||c)};static \u0275prov=r.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var F=o(9352);const A=["viewerTarget"];function j(c,Q){if(1&c){const e=s.RV6();s.j41(0,"cue-flexcontainer",2)(1,"cue-typography"),s.EFF(2),s.nI1(3,"transloco"),s.k0s(),s.j41(4,"cue-button",3),s.bIt("click",function(){r.eBV(e);const i=s.XpG();return r.Njj(i.downloadFile())}),s.j41(5,"cue-button-padder"),s.nrm(6,"cue-button-icon",4),s.k0s(),s.j41(7,"cue-button-label"),s.EFF(8),s.nI1(9,"transloco"),s.k0s()()()}2&c&&(s.R7$(2),s.JRh(s.bMT(3,2,"components.documentViewer.infoNoViewer")),s.R7$(6),s.JRh(s.bMT(9,4,"common.buttons.download")))}let E=(()=>{class c{_eps=(0,r.WQX)(L);_destroyed=!1;url=l.hFB.required();suffix=(0,l.hFB)();settings=(0,l.hFB)(new g.DocumentViewerSettings);viewerTypeOverride=(0,l.hFB)(void 0);interactions=(0,l.CGW)();viewerType=(0,f.EW)(()=>{const e=this.viewerTypeOverride();if(e)return e;const n=this.url(),i=void 0!==this.suffix()?this.suffix()?.trim():`.${n.split(".").pop()?.trim()}`,t=i?g.extViewerMap.get(i):void 0;return console.log("[DocumentViewer] viewerType resolved",{url:n?.substring(0,80),suffix:i,viewerType:t}),void 0!==i?t:void 0});currentComponent=(0,r.vPA)(null);noViewer=(0,f.EW)(()=>null===this.currentComponent());isLoading=(0,r.vPA)(!1);viewerTarget;currentRef;_interactionsState=(0,r.vPA)(new g.DocumentViewerInteractions);constructor(){(0,r.QZP)(()=>{const e=this.viewerType(),n=this.url();console.log("[DocumentViewer] url/viewerType effect \u2014",{viewerType:e,url:n?.substring(0,80),destroyed:this._destroyed}),e?("pdf"!==e&&this._eps.activePdfDoc.set(null),this.isLoading.set(!0),this.loadViewerComponent(e,n,this.settings())):(this.viewerTarget.clear(),this.currentRef?.destroy(),this.currentRef=void 0,console.info("No viewer available for this file type"),this.currentComponent.set(null),this.isLoading.set(!1),this._eps.activePdfDoc.set(null))}),(0,r.QZP)(()=>{this.interactions.emit(this._interactionsState())}),(0,r.QZP)(()=>{const e=this.settings().pdf,n=this.currentRef;n&&n.setInput("settings",e)})}ngOnDestroy(){this._destroyed=!0,this.viewerTarget.clear(),this.currentRef?.destroy(),this.currentRef=void 0}loadViewerComponent(e,n,i){var t=this;return(0,p.A)(function*(){console.log("[DocumentViewer] loadViewerComponent",{viewerType:e,url:n?.substring(0,100)});try{const h=g.viewerComponents[e],m=yield h();if(t._destroyed)return;if(t.currentComponent.set(m),t.isLoading.set(!1),t.viewerTarget.clear(),t.currentRef?.destroy(),t.currentRef=t.viewerTarget.createComponent(m),"pdf"===e)t.currentRef.setInput("src",n),void 0!==i?.pdf&&t.currentRef.setInput("settings",i.pdf),t.currentRef.instance.pdfLoaded&&t.currentRef.instance.pdfLoaded.subscribe(a=>{t._eps.currentPage.set(1),t._eps.activePdfDoc.set(a)}),t.currentRef.instance.settingsChange&&t.currentRef.instance.settingsChange.subscribe(a=>{const u=parseInt(a?.page,10);!isNaN(u)&&u>0&&t._eps.currentPage.set(u)}),t.currentRef.instance.artefactDrawn&&t.currentRef.instance.artefactDrawn.subscribe(a=>{"xywh"===a.type&&t._eps.setManualBbox(a.def)}),t.currentRef.instance.artefactEdited&&t.currentRef.instance.artefactEdited.subscribe(a=>{"bbox"===a.type&&t._eps.setManualBbox(a.after)});else if("bim"===e){const a=new P.di("model","Model",n);a.visible=!0,t.currentRef.setInput("data",{models:[a]}),void 0!==i?.bim&&t.currentRef.setInput("settings",i.bim),t.currentRef.instance.selectedElements&&t.currentRef.instance.selectedElements.subscribe(u=>{t._interactionsState.update(d=>(d.bim.selectedElements=u,Object.assign({},d)))}),t.currentRef.instance.clickedElement&&t.currentRef.instance.clickedElement.subscribe(u=>{t._interactionsState.update(d=>(d.bim.clickedElement=u,Object.assign({},d)))})}else if("cad"===e)t.currentRef.setInput("fileURL",n),void 0!==i?.cad&&t.currentRef.setInput("settings",i.cad);else if("image"===e)t.currentRef.setInput("src",n);else if("markdown"===e)t.currentRef.setInput("fileURL",n);else if("text"===e)t.currentRef.setInput("fileURL",n);else if("spreadsheet"===e){const a=t.suffix()?.split(".").pop()||n.split(".").pop()||"csv";t.currentRef.setInput("data",{url:n,format:a})}else if("code"===e){const d={".json":"json",".jsonld":"jsonld",".xml":"xml",".html":"xml",".htm":"xml",".css":"text",".js":"text",".sh":"text"}[t.suffix()??`.${n.split(".").pop()??""}`]??"text";t.currentRef.setInput("fileURL",n),t.currentRef.setInput("codeType",d)}else"email"===e&&t.currentRef.setInput("fileURL",n)}catch(h){console.error("Failed to load viewer component:",h),t.currentComponent.set(null)}})()}downloadFile(){var e=this;return(0,p.A)(function*(){const i=yield(yield fetch(e.url())).blob();(0,R.KE)(i,`document${e.suffix()??""}`)})()}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=s.VBU({type:c,selectors:[["cue-doc-viewer"]],viewQuery:function(n,i){if(1&n&&s.GBs(A,7,s.c1b),2&n){let t;s.mGM(t=s.lsd())&&(i.viewerTarget=t.first)}},inputs:{url:[1,"url"],suffix:[1,"suffix"],settings:[1,"settings"],viewerTypeOverride:[1,"viewerTypeOverride"]},outputs:{interactions:"interactions"},decls:4,vars:2,consts:[["viewerTarget",""],[2,"height","100%","width","100%",3,"cueLogoLoader"],["direction","column","align","center","justify","center",2,"height","100%","width","100%"],[3,"click"],["icon","download"]],template:function(n,i){1&n&&(s.j41(0,"cue-container",1),s.eu8(1,null,0),s.nVh(3,j,10,6,"cue-flexcontainer",2),s.k0s()),2&n&&(s.Y8G("cueLogoLoader",i.isLoading()),s.R7$(3),s.vxM(!i.isLoading()&&i.noViewer()?3:-1))},dependencies:[b.MD,M,w.Typography,T.n,N.$,C.a,I.L,B.z,S.k,F.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return c})()}}]);
|
package/773.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[773],{5903(j,P,r){r.d(P,{L:()=>Ye});var c=r(7705),a=r(5802),p=r(2271),F=r(4853),V=r(9495),k=r(467),s=r(9352),R=r(5745),b=r(5381),O=r(5971),M=r(2245),w=r(9421),x=r(8957),E=r(5448),D=r(2444),_=r(9417),v=r(7374),d=r.n(v),h=r(3319),e=r(5547);const H=(o,u)=>u.date;function $(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=u.$implicit,i=e.XpG();e.Y8G("size",i.size()),e.R7$(),e.JRh(e.bMT(2,2,t))}}function X(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",13),e.bIt("click",function(){const n=a.eBV(t).$implicit,l=e.XpG();return a.Njj(l.selectDay(n))}),e.j41(1,"cue-button-label"),e.EFF(2),e.k0s()()}if(2&o){const t=u.$implicit,i=e.XpG();e.AVh("other-month",!t.isCurrentMonth)("today",t.isToday),e.Y8G("selected",t.isSelected)("size",i.size()),e.R7$(2),e.JRh(t.day)}}let L=(()=>{class o{date=c.geq.required();size=(0,c.hFB)("m");weekdays=["mon","tue","wed","thu","fri","sat","sun"].map(t=>`common.weekdaysShort.${t}`);yearOptions=Array.from({length:101},(t,i)=>(d()().year()-50+i).toString()).reverse();monthOptions=Array.from({length:12},(t,i)=>(i+1).toString());chevronSize=(0,p.EW)(()=>{const t=this.size();return"l"===t?"m":"m"===t?"s":"s"===t?"xs":"s"});monthLabels={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"};today=(0,p.EW)(()=>d()().format("YYYY-MM-DD"));calendarDays=(0,p.EW)(()=>{const t=this.year(),i=this.month(),n=d()(this.date()),l=this.today(),g=d()(`${t}-${i}-01`),m=g.endOf("month"),y=0===g.day()?g.subtract(6,"day"):g.subtract(g.day()-1,"day"),z=0===m.day()?m:m.add(7-m.day(),"day"),C=[];let f=y;for(;f.isBefore(z)||f.isSame(z);){const A=f.format("YYYY-MM-DD");C.push({date:A,day:f.date(),isCurrentMonth:f.month()+1===i,isSelected:f.isSame(n,"day"),isToday:A===l,dayjs:f}),f=f.add(1,"day")}return C});jsDate=(0,p.EW)(()=>d()(this.date()));year=(0,p.uu)(()=>this.jsDate().year());month=(0,p.uu)(()=>this.jsDate().month()+1);day=(0,p.uu)(()=>this.jsDate().date());updateDate(){const t=d()(new Date(this.year(),this.month()-1,this.day())).format("YYYY-MM-DD");this.date.set(t)}navigateMonth(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"month"):i.subtract(1,"month");this.date.set(n.format("YYYY-MM-DD"))}navigateYear(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"year"):i.subtract(1,"year");this.date.set(n.format("YYYY-MM-DD"))}selectDay(t){this.date.set(t.date),t.isCurrentMonth||(this.year.set(t.dayjs.year()),this.month.set(t.dayjs.month()+1))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-datepicker"]],inputs:{date:[1,"date"],size:[1,"size"]},outputs:{date:"dateChange"},decls:17,vars:10,consts:[["direction","column"],["gap","m","justify","center","align","center",2,"width","100%"],["variant","ghost",3,"size"],["icon","paginator-first",3,"click"],["icon","paginator-back",3,"click"],["justify","center",2,"width","200px"],["label","Month",3,"valueChange","size","options","labelMap","value"],["label","Year",3,"valueChange","size","options","value"],["icon","paginator-next",3,"click"],["icon","paginator-last",3,"click"],[1,"calendar-grid"],[3,"size"],["variant","ghost",3,"other-month","today","selected","size"],["variant","ghost",3,"click","selected","size"]],template:function(i,n){1&i&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1)(2,"cue-button",2)(3,"cue-button-icon",3),e.bIt("click",function(){return n.navigateYear("prev")}),e.k0s(),e.j41(4,"cue-button-icon",4),e.bIt("click",function(){return n.navigateMonth("prev")}),e.k0s()(),e.j41(5,"cue-flexcontainer",5)(6,"cue-select",6),e.mxI("valueChange",function(g){return e.DH7(n.month,g)||(n.month=g),g}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s(),e.j41(7,"cue-select",7),e.mxI("valueChange",function(g){return e.DH7(n.year,g)||(n.year=g),g}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s()(),e.j41(8,"cue-button",2)(9,"cue-button-icon",8),e.bIt("click",function(){return n.navigateMonth("next")}),e.k0s()(),e.j41(10,"cue-button",2)(11,"cue-button-icon",9),e.bIt("click",function(){return n.navigateYear("next")}),e.k0s()()(),e.j41(12,"div",10),e.Z7z(13,$,3,4,"cue-typography",11,e.Vm6),e.Z7z(15,X,3,7,"cue-button",12,H),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(4),e.Y8G("size",n.size())("options",n.monthOptions)("labelMap",n.monthLabels),e.R50("value",n.month),e.R7$(),e.Y8G("size",n.size())("options",n.yearOptions),e.R50("value",n.year),e.R7$(),e.Y8G("size",n.chevronSize()),e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(3),e.Dyx(n.weekdays),e.R7$(2),e.Dyx(n.calendarDays()))},dependencies:[b.n,D.l,O.$,E.L,M.Typography,h.a,s.Kj],styles:[".calendar-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-top:12px}.other-month[_ngcontent-%COMP%]{opacity:.4}"],changeDetection:0})}return o})();var W=r(7023),K=r(5187);const Q=["inputField"];function J(o,u){1&o&&e.EFF(0," * ")}function Z(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-card",8)(1,"cue-datepicker",9),e.mxI("dateChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.internalDateValue,n)||(l.internalDateValue=n),a.Njj(n)}),e.bIt("dateChange",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onDateChange(n))})("click",function(n){return n.stopPropagation()}),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.R50("date",t.internalDateValue)}}function U(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let q=(()=>{class o{value=(0,c.geq)("");label=(0,c.hFB)("");placeholder=(0,c.hFB)("");error=(0,c.hFB)(void 0);required=(0,c.hFB)(!1);size=(0,c.hFB)("m");datePickerPositioning=(0,c.hFB)(void 0);isFocused=!1;disabled=!1;iconSize=(0,p.EW)(()=>{switch(this.size()){case"l":return"m";case"m":default:return"s";case"s":case"xs":return"xs"}});contextMenuRef=null;inputField;internalDateValue=(0,p.uu)(()=>{const t=this.value();if(t){if(d()(t,"YYYY-MM-DD",!0).isValid())return t;const i=d()(t);return i.isValid()?i.format("YYYY-MM-DD"):d()().format("YYYY-MM-DD")}return d()().format("YYYY-MM-DD")});formattedDateValue=(0,p.EW)(()=>{const t=this.value();if(t){const i=d()(t);return i.isValid()?i.format("MMM D, YYYY"):t}return""});onValueChange=(0,a.QZP)(()=>this.valueChange.emit(this.value()));valueChange=(0,c.CGW)();onChange=t=>{};onTouched=()=>{};writeValue(t){this.value.set(t||"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.value.set(i),this.onChange(i)}focus(){this.isFocused=!0,this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1,this.onTouched()}onDateChange(t){this.value.set(t),this.onChange(t)}onDatePickerOpen(t){this.contextMenuRef=t}onDatePickerClose(){this.contextMenuRef=null}closeDatePicker(){this.contextMenuRef&&document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-date"]],viewQuery:function(i,n){if(1&i&&e.GBs(Q,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],size:[1,"size"],datePickerPositioning:[1,"datePickerPositioning"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:_.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:11,vars:15,consts:[["inputField",""],["datePickerTemplate",""],[1,"form-field"],["size","s",1,"label"],["type","text","readonly","","trigger","leftclick",1,"input",3,"focus","blur","contextMenuOpen","contextMenuClose","value","placeholder","disabled","cueContextMenu","positioning"],["variant","ghost","trigger","leftclick",1,"calendar-button",3,"size","cueContextMenu","positioning"],["icon","calendar"],["size","s",1,"error-text"],[1,"date-picker-overlay","clickoutside-ignore"],["size","s",1,"clickoutside-ignore",3,"dateChange","click","date"]],template:function(i,n){if(1&i&&(e.j41(0,"div",2)(1,"cue-typography",3),e.EFF(2),e.nVh(3,J,1,0),e.k0s(),e.j41(4,"input",4,0),e.bIt("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()})("contextMenuOpen",function(g){return n.onDatePickerOpen(g)})("contextMenuClose",function(){return n.onDatePickerClose()}),e.k0s(),e.j41(6,"cue-button",5),e.nrm(7,"cue-button-icon",6),e.k0s(),e.DNE(8,Z,2,1,"ng-template",null,1,e.C5r),e.nVh(10,U,2,1,"cue-typography",7),e.k0s()),2&i){const l=e.sdS(9);e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n.value()),e.R7$(2),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(),e.Y8G("value",n.formattedDateValue())("placeholder",n.placeholder())("disabled",n.disabled)("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(2),e.Y8G("size",n.iconSize())("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(4),e.vxM(n.error()?10:-1)}},dependencies:[M.Typography,L,W.Q,K.Z,h.a,O.$],styles:['.form-field[_ngcontent-%COMP%]{position:relative}.input[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family)}.size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.underline[_ngcontent-%COMP%]{content:"";position:absolute;bottom:0;left:0;height:1px;width:0;background-color:var(--cue-input-border-bottom-color);transition:width .3s ease}.form-field.focused[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.date-picker-overlay[_ngcontent-%COMP%]{box-shadow:0 4px 12px #00000026;min-width:320px;position:relative;z-index:10001}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(cue-menu){z-index:10002!important}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(.clickoutside-ignore){pointer-events:auto}.calendar-button[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);z-index:10;opacity:.7;transition:opacity .2s ease}.calendar-button[_ngcontent-%COMP%]:hover{opacity:1}.input[_ngcontent-%COMP%]{padding-right:40px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%;max-width:none;box-sizing:border-box}'],changeDetection:0})}return o})();var ee=r(9695),N=r(1413),te=r(7421),ne=r(3293),I=r(7384),ie=r(3798);let oe=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,n){},styles:["textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"],encapsulation:2,changeDetection:0})}return o})(),le=(()=>{class o{_elementRef=(0,a.WQX)(e.aKT);_platform=(0,a.WQX)(te.O);_ngZone=(0,a.WQX)(a.SKi);_renderer=(0,a.WQX)(e.sFG);_resizeEvents=new N.B;_previousValue;_initialHeight;_destroyed=new N.B;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(t){this._minRows=(0,I.OE)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=(0,I.OE)(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(t){this._cachedPlaceholderHeight=void 0,t?this._textareaElement.setAttribute("placeholder",t):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=(0,a.WQX)(a.qQL);_hasFocus=!1;_isViewInited=!1;constructor(){(0,a.WQX)(ne.l).load(oe),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe((0,ie.Z)(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;const t=this._textareaElement.cloneNode(!1),i=t.style;t.rows=1,i.position="absolute",i.visibility="hidden",i.border="none",i.padding="0",i.height="",i.minHeight="",i.maxHeight="",i.top=i.bottom=i.left=i.right="auto",i.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,t.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){const t=this._textareaElement,i=t.style.marginBottom||"",l=this._hasFocus,g=this._platform.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";l&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(g);const m=t.scrollHeight-4;return t.classList.remove(g),l&&(t.style.marginBottom=i),m}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||null!=this._cachedPlaceholderHeight)return;if(!this.placeholder)return void(this._cachedPlaceholderHeight=0);const t=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=t}_handleFocusEvent=t=>{this._hasFocus="focus"===t.type};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;const i=this._elementRef.nativeElement,n=i.value;if(!t&&this._minRows===this._previousMinRows&&n===this._previousValue)return;const l=this._measureScrollHeight(),g=Math.max(l,this._cachedPlaceholderHeight||0);i.style.height=`${g}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=n,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(t){const{selectionStart:i,selectionEnd:n}=t;!this._destroyed.isStopped&&this._hasFocus&&t.setSelectionRange(i,n)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=e.FsC({type:o,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,n){1&i&&e.bIt("input",function(){return n._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",c.L39],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return o})(),ae=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=a.G2t({})}return o})();var G=r(29);const se=["inputField"];function ce(o,u){1&o&&e.EFF(0," * ")}function re(o,u){if(1&o&&(e.j41(0,"span",5),e.nrm(1,"cue-svg-icon",8),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Y8G("name",t.icon())}}function ue(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let de=(()=>{class o{value=(0,c.geq)("");label=(0,c.hFB)("");placeholder=(0,c.hFB)("");error=(0,c.hFB)(void 0);required=(0,c.hFB)(!1);icon=(0,c.hFB)(void 0);size=(0,c.hFB)("m");isFocused=!1;disabled=!1;inputField;valueChange=(0,c.CGW)();onChange=t=>{};onTouched=()=>{};constructor(){(0,a.QZP)(()=>{this.valueChange.emit(this.value())})}writeValue(t){this.value.set(t||"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.value.set(i),this.onChange(i)}focus(){this.isFocused=!0,this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1,this.onTouched()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-multiline"]],viewQuery:function(i,n){if(1&i&&e.GBs(se,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:_.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:10,vars:13,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label"],[1,"input-container"],["align","center","gap","s"],[2,"height","12px"],["cdkTextareaAutosize","",1,"input","textarea",2,"resize","none","overflow","hidden",3,"input","focus","blur","cdkAutosizeMinRows","cdkAutosizeMaxRows","placeholder","value","disabled"],["size","s",1,"error-text"],[3,"name"]],template:function(i,n){1&i&&(e.j41(0,"div",1)(1,"cue-typography",2),e.EFF(2),e.nVh(3,ce,1,0),e.k0s(),e.j41(4,"div",3)(5,"cue-flexcontainer",4),e.nVh(6,re,2,1,"span",5),e.j41(7,"textarea",6,0),e.bIt("input",function(g){return n.emitValue(g)})("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()}),e.k0s()()(),e.nVh(9,ue,2,1,"cue-typography",7),e.k0s()),2&i&&(e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n.value()),e.R7$(2),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(3),e.vxM(n.icon()?6:-1),e.R7$(),e.Y8G("cdkAutosizeMinRows",1)("cdkAutosizeMaxRows",8)("placeholder",n.placeholder())("value",n.value())("disabled",n.disabled),e.R7$(2),e.vxM(n.error()?9:-1))},dependencies:[M.Typography,b.n,G.A,ae,le],styles:[".form-field[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.input-container[_ngcontent-%COMP%]{position:relative;z-index:2}.input.textarea[_ngcontent-%COMP%]{width:100%;min-height:32px;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family);resize:none;overflow:hidden;color:var(--cue-input-value-color);position:relative;z-index:2}.size-xs[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input.textarea[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease;z-index:1;padding:0 4px;left:0}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.form-field[_ngcontent-%COMP%]:not(.focused) .input-container[_ngcontent-%COMP%]{margin-top:24px}.form-field.focused[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{margin-top:12px}"],changeDetection:0})}return o})();var T=r(6117),ge=r(356),pe=r(6279),_e=r(1359);function me(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-typography",11),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(!n.disabled()&&n.openMenu())}),e.EFF(1),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("info",t.info()),e.R7$(),e.JRh(t.label())}}function he(o,u){if(1&o&&e.nrm(0,"cue-svg-icon",12),2&o){const t=e.XpG();e.xc7("--cue-icon-width",t.iconSize()),e.Y8G("name",u)}}function fe(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",13),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.filterValue,n)||(l.filterValue=n),a.Njj(n)}),e.k0s(),e.nrm(2,"div",14)}if(2&o){const t=e.XpG();e.R50("value",t.filterValue),e.Y8G("placeholder",e.bMT(1,2,"components.input.select.placeholderFilter"))}}function ve(o,u){1&o&&e.nrm(0,"cue-svg-icon",17),2&o&&e.Y8G("name",u)}function Me(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",15),e.bIt("click",function(n){const l=a.eBV(t).$implicit,g=e.XpG();return a.Njj(g.handleSelect(n,l.value))})("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.j41(1,"cue-checkbox",16),e.bIt("click",function(n){const l=a.eBV(t).$implicit,g=e.XpG();return a.Njj(g.handleSelect(n,l.value))})("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.k0s(),e.nVh(2,ve,1,1,"cue-svg-icon",17),e.EFF(3),e.k0s()}if(2&o){let t;const i=u.$implicit,n=e.XpG();e.Y8G("size",n.size())("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value))("selected",n.isSelected(i.value)),e.R7$(),e.Y8G("checked",n.isSelected(i.value))("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value)),e.R7$(),e.vxM((t=n.icon(i.value))?2:-1,t),e.R7$(),e.SpI(" ",i.label," ")}}function be(o,u){if(1&o&&(e.j41(0,"cue-typography",10),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let Ce=(()=>{class o{label=(0,c.hFB)("");info=(0,c.hFB)("");placeholder=(0,c.hFB)(void 0);menuPosition=(0,c.hFB)(void 0);options=(0,c.hFB)();labelMap=(0,c.hFB)({});iconMap=(0,c.hFB)({});value=(0,c.geq)([]);valueChange=(0,c.CGW)();fixedValues=(0,c.hFB)([]);size=(0,c.hFB)("xs");disabled=(0,c.hFB)(!1);showFilter=(0,c.hFB)(!1);underline=(0,c.hFB)(!0);error=(0,c.hFB)(void 0);maxHeight=(0,c.hFB)(void 0);optionLabels=(0,p.EW)(()=>{const t=this.labelMap();return(this.options()??[]).map(n=>t[n]?t[n]:n.toString())});_multiSelectCount=(0,p.EW)(()=>(this.value()||[]).length);_multiSelectTranslated=(0,s.Xx)("components.input.multiSelect.itemsSelected",(0,p.EW)(()=>({count:this._multiSelectCount()})));_defaultPlaceholder=(0,s.Xx)("components.input.multiSelect.placeholderSelect");_placeholder=(0,p.EW)(()=>this.placeholder()??this._defaultPlaceholder());valueLabel=(0,p.EW)(()=>{const t=this.labelMap(),i=this.value()||[];if(0===i.length)return"";if(1===i.length){const n=i[0];return t[n]?t[n]:n.toString()}return this._multiSelectTranslated()});menuIsOpen=(0,a.vPA)(void 0);filterInputEl=(0,c.ebz)(x.p);menuEl=(0,c.ebz)(T.W);filterValue=(0,a.vPA)("");optionsFiltered=(0,p.EW)(()=>this._appendFilter(this.options()??[],this.filterValue(),this.labelMap()));iconSize=(0,p.EW)(()=>`var(--cue-input-${this.size()}-font-size)`);handleSelect(t,i){const l=t.target.closest("cue-multi-select");(null!==l?.closest(".ag-filter-wrapper")||null!==l?.closest(".ag-popup")||null!==l?.closest(".ag-filter-apply-panel")||null!==l?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&t.stopPropagation(),t.preventDefault();const m=this.value()||[],y=m.includes(i),z=this.fixedValues().includes(i);if(y&&z)return;let C;C=y?m.filter(f=>f!==i):[...m,i],this.value.update(()=>[...C]),this.valueChange.emit(C)}preventEventBubbling(t){const n=t.target.closest("cue-multi-select");(null!==n?.closest(".ag-filter-wrapper")||null!==n?.closest(".ag-popup")||null!==n?.closest(".ag-filter-apply-panel")||null!==n?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&(t.stopPropagation(),t.stopImmediatePropagation())}onMenuClosed(){this.menuIsOpen.set(!1)}openMenu(){this.menuIsOpen.set(!0),this.filterValue.set("")}handleSpace(t){t.preventDefault(),this.openMenu()}isSelected(t){return(this.value()||[]).includes(t)}isFixedValue(t){return this.fixedValues().includes(t)}constructor(){(0,a.QZP)(()=>{this.showFilter()&&this.menuIsOpen()&&setTimeout(()=>this.filterInputEl()?.focus(),20)}),(0,a.QZP)(()=>{const t=this.value()||[],n=this.fixedValues().filter(l=>!t.includes(l));if(n.length>0){const l=[...t,...n];this.value.set(l)}})}icon(t){if(void 0!==t)return this.iconMap()[t]}_appendFilter(t,i,n){const l=i.toLowerCase();return(""===i?t:t.filter(m=>(n[m]?n[m].toLowerCase():m.toString().toLowerCase()).startsWith(l))).map(m=>({value:m,label:n[m]?n[m]:m.toString()}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-multi-select"]],viewQuery:function(i,n){1&i&&e.wEZ(n.filterInputEl,x.p,5)(n.menuEl,T.W,5),2&i&&e.NyB(2)},inputs:{label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],menuPosition:[1,"menuPosition"],options:[1,"options"],labelMap:[1,"labelMap"],iconMap:[1,"iconMap"],value:[1,"value"],fixedValues:[1,"fixedValues"],size:[1,"size"],disabled:[1,"disabled"],showFilter:[1,"showFilter"],underline:[1,"underline"],error:[1,"error"],maxHeight:[1,"maxHeight"]},outputs:{value:"valueChange",valueChange:"valueChange"},decls:15,vars:20,consts:[["trigger",""],[1,"form-field"],["size","s",1,"label",3,"info"],[3,"menuClosed","positioning","contextEnabled"],["trigger","","tabindex","0",1,"select-trigger",3,"click","keydown.enter","keydown.space"],["align","center","gap","s",1,"select-value"],[3,"--cue-icon-width","name"],["name","arrow-dropdown",1,"select-arrow"],["menu","",1,"menu",3,"maxHeight"],[3,"size","disabled","selected"],["size","s",1,"error-text"],["size","s",1,"label",3,"click","info"],[3,"name"],[3,"valueChange","value","placeholder"],[2,"height","6px"],[3,"click","mousedown","size","disabled","selected"],["before","",3,"click","mousedown","checked","disabled"],["before","",3,"name"]],template:function(i,n){if(1&i&&(e.j41(0,"div",1),e.nVh(1,me,2,2,"cue-typography",2),e.j41(2,"cue-menu",3),e.bIt("menuClosed",function(){return n.onMenuClosed()}),e.EFF(3,"> "),e.j41(4,"div",4,0),e.bIt("click",function(){return!n.disabled()&&n.openMenu()})("keydown.enter",function(){return!n.disabled()&&n.openMenu()})("keydown.space",function(g){return!n.disabled()&&n.handleSpace(g)}),e.j41(6,"cue-flexcontainer",5),e.nVh(7,he,1,3,"cue-svg-icon",6),e.EFF(8),e.k0s(),e.nrm(9,"cue-svg-icon",7),e.k0s(),e.j41(10,"cue-menu-wrap",8),e.nVh(11,fe,3,4),e.Z7z(12,Me,4,7,"cue-menu-item",9,e.Vm6),e.k0s()(),e.nVh(14,be,2,1,"cue-typography",10),e.k0s()),2&i){let l;e.HbH("size-"+n.size()),e.AVh("focused",n.value()&&n.value().length>0||""!==n.placeholder())("menu-open",n.menuIsOpen())("underline",n.underline())("no-label",!n.label()),e.R7$(),e.vxM(n.label()?1:-1),e.R7$(),e.Y8G("positioning",n.menuPosition())("contextEnabled",!n.disabled()),e.R7$(2),e.AVh("disabled",n.disabled()),e.R7$(3),e.vxM((l=n.icon(1===n.value().length?n.value()[0]:void 0))?7:-1,l),e.R7$(),e.SpI(" ",n.value()&&n.value().length>0?n.valueLabel():n._placeholder()," "),e.R7$(2),e.Y8G("maxHeight",n.maxHeight()),e.R7$(),e.vxM(n.showFilter()?11:-1),e.R7$(),e.Dyx(n.optionsFiltered()),e.R7$(2),e.vxM(n.error()?14:-1)}},dependencies:[T.W,ge.M,pe.D,M.Typography,x.p,_e.S,G.A,b.n,s.Kj],styles:[".form-field[_ngcontent-%COMP%]{position:relative}.select-trigger[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;background:none;outline:none;font-family:var(--cue-font-family);display:flex;justify-content:space-between;align-items:center;cursor:pointer;box-sizing:border-box}.form-field.underline[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{border-bottom:1px solid var(--cue-input-border-bottom-color)}.form-field[_ngcontent-%COMP%]:not(.underline) .select-trigger[_ngcontent-%COMP%]{align-items:flex-start;padding-top:2px;padding-bottom:1px}.select-trigger.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.select-trigger[_ngcontent-%COMP%]:focus{outline:none}.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.form-field.no-label.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding-top:0}.select-value[_ngcontent-%COMP%]{color:var(--cue-input-value-color);font-family:var(--cue-font-family);flex:1;text-align:left}.form-field[_ngcontent-%COMP%]:not(.focused) .select-value[_ngcontent-%COMP%]{color:var(--cue-input-placeholder-color)}.select-arrow[_ngcontent-%COMP%]{color:var(--cue-input-value-color);margin-left:8px;display:inline-block;transition:transform .2s ease}.form-field.menu-open[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;transition:all .2s ease;cursor:pointer}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}cue-menu[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}"],changeDetection:0})}return o})();const xe=["*"],S=()=>[],B=()=>({});function ye(o,u){if(1&o&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.config().message)}}function Pe(o,u){if(1&o&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelExistingValue")))("val",t.existingValue())}}function Oe(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function De(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ze(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ke(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",8)(1,"cue-typography"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-input-switch",18),e.bIt("checkedChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.onBooleanChange(n))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"components.modals.rdfEdit.labelSetNewValue")),e.R7$(2),e.Y8G("checked","true"===t.newValue())}}function Ee(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,S))("labelMap",t.config().optionLabelMap||e.lJ4(10,B))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Fe(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,S))("labelMap",t.config().optionLabelMap||e.lJ4(10,B))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.comment,n)||(l.comment=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelComment"))),e.R50("value",t.comment)}}function Re(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.error())}}function we(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,ye,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,Pe,2,5,"cue-key-val",4),e.nVh(6,Oe,2,6,"cue-input",5),e.nVh(7,De,2,6,"cue-input",6),e.nVh(8,ze,2,6,"cue-input-date",7),e.nVh(9,ke,5,4,"cue-flexcontainer",8),e.nVh(10,Ee,2,11,"cue-select",9),e.nVh(11,Fe,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,Ve,2,5,"cue-input-multiline",10),e.nVh(13,Re,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(16,"cue-button-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s()(),e.j41(19,"cue-button",14),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onSave())}),e.j41(20,"cue-button-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s()()()()()}if(2&o){const t=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(t.config().message?3:-1),e.R7$(2),e.vxM("boolean"!==t.config().dataType?5:-1),e.R7$(),e.vxM("string"===t.config().dataType?6:-1),e.R7$(),e.vxM("number"===t.config().dataType?7:-1),e.R7$(),e.vxM("date"===t.config().dataType?8:-1),e.R7$(),e.vxM("boolean"===t.config().dataType?9:-1),e.R7$(),e.vxM("select"===t.config().dataType?10:-1),e.R7$(),e.vxM("multiselect"===t.config().dataType?11:-1),e.R7$(),e.vxM(t.identical()?-1:12),e.R7$(),e.vxM(t.error()?13:-1),e.R7$(2),e.Y8G("disabled",t.saving()),e.R7$(2),e.JRh(e.bMT(18,17,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",t.saving()||t.identical())("loading",t.saving()),e.R7$(2),e.JRh(e.bMT(22,19,"components.modals.rdfEdit.buttonSave"))}}let Te=(()=>{class o{visible=(0,c.geq)(!0);config=c.hFB.required();close=(0,c.CGW)();existingValue=(0,p.EW)(()=>{let t="";return t=Array.isArray(this.config().existingValue)?this.config().existingValue.map(n=>this._getLabel(n)).join(", "):this._getLabel(this.config().existingValue),t});newValue=(0,p.uu)(()=>this.config().existingValue);comment=(0,a.vPA)("");errorID=(0,c.geq)("");error=(0,s.Xx)(this.errorID);saving=(0,a.vPA)(!1);pristine=(0,a.vPA)(!0);identical=(0,p.EW)(()=>!this.config().hasExternalChanges&&this.newValue()===this.config().existingValue);valueErrorID=(0,p.EW)(()=>this.pristine()?"":this.identical()?"components.modals.rdfEdit.errorIdenticalValue":"");valueError=(0,s.Xx)(this.valueErrorID);optionsCount=(0,p.EW)(()=>this.config().options?.length||0);constructor(){(0,a.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var t=this;return(0,k.A)(function*(){t.saving.set(!0),t.errorID.set("");try{const i=t.config();yield i.requestSave({newValue:t.newValue(),comment:t.comment(),previousValue:i.existingValue}),t.visible.set(!1),t.close.emit(t.newValue())}catch(i){console.error("Error saving RDF edit:",i),t.errorID.set("components.modals.rdfEdit.errorSaving")}t.saving.set(!1)})()}onClose(){this.visible.set(!1),this.close.emit(null)}onBooleanChange(t){this.newValue.set(t?"true":"false")}_getLabel(t){const i=this.config().optionLabelMap;return void 0!==i&&i[t]||t}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-modal-rdf-edit"]],inputs:{visible:[1,"visible"],config:[1,"config"],errorID:[1,"errorID"]},outputs:{visible:"visibleChange",close:"close",errorID:"errorIDChange"},ngContentSelectors:xe,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column","align","center"],["direction","column","gap","m"],[3,"key","val"],["type","text",3,"label","value","error"],["type","number",3,"label","value","error"],[3,"label","value","error"],["direction","row","align","center","justify","space-between","gap","l"],[3,"value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"label","value"],[2,"color","var(--cue-error)"],["direction","row","justify","center",2,"width","100%"],[3,"click","disabled"],["variant","secondary",3,"click","disabled","loading"],["type","text",3,"valueChange","label","value","error"],["type","number",3,"valueChange","label","value","error"],[3,"valueChange","label","value","error"],[3,"checkedChange","checked"],[3,"valueChange","value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"valueChange","label","value"]],template:function(i,n){1&i&&(e.NAR(),e.nVh(0,we,23,21,"cue-modal",0)),2&i&&e.vxM(n.visible()?0:-1)},dependencies:[R.a,b.n,O.$,M.Typography,w.F,x.p,E.L,D.l,Ce,q,ee.d,de,s.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return o})();var Y=r(7335);function je(o,u){1&o&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.SpI("(",e.bMT(2,1,"components.keyVal.edited"),")"))}function Ne(o,u){if(1&o){const t=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,je,3,3,"span",7),e.k0s()}if(2&o){const t=e.XpG();e.AVh("interactive",!t.editDisabled()),e.Y8G("menuItems",t.hoverMenu()),e.R7$(2),e.Lme("",t.valueFormatted()," ",t.suffix()),e.R7$(),e.vxM(t.isDirty()?3:-1)}}function Ie(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.selectionChange(n))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("value",t.newValue())("options",t.options())}}function Ge(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.inputChange(n))}),e.k0s(),e.EFF(1)}if(2&o){const t=e.XpG(2);e.Y8G("value",t.valueFormatted()),e.R7$(),e.SpI(" ",t.suffix()," ")}}function Se(o,u){if(1&o&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,Ie,1,2,"cue-select",8)(2,Ge,2,2),e.nrm(3,"cue-entity-menu",9),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(void 0!==t.options()&&t.options().length?1:2),e.R7$(2),e.Y8G("items",t.saveCancelMenu())}}function Be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.rdfModalVisible,n)||(l.rdfModalVisible=n),a.Njj(n)}),e.bIt("close",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onRdfModalClose(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("config",u),e.R50("visible",t.rdfModalVisible)}}let Ye=(()=>{class o{entityMenuDirective;size=(0,c.hFB)("m");key=c.hFB.required();val=c.geq.required();originalValue=(0,c.hFB)(void 0);options=(0,c.hFB)([]);suffix=(0,c.hFB)("");rdfConfig=(0,c.hFB)();editDisabled=(0,c.hFB)(!1);valueChange=(0,c.CGW)();editModeEnabled=(0,a.vPA)(!1);isDirty=(0,p.EW)(()=>{const t=this.originalValue();return void 0!==t&&this.val()!==t});valueChanged=(0,p.EW)(()=>this.val()!==this.newValue());newValue=(0,p.uu)(()=>this.val());rdfModalVisible=(0,a.vPA)(!1);valueFormatted=(0,p.EW)(()=>this._idToString(this.val()));hoverMenu=(0,p.EW)(()=>{if(this.editModeEnabled()||this.editDisabled())return[];const t=[{icon:"edit",label:"Edit",action:()=>this.onReadClick()}];return this.isDirty()&&t.push({icon:"close",label:"Revert to original",action:()=>this._revert()}),t});onReadClick(){this.editDisabled()||(this.rdfConfig()?this.rdfModalVisible.set(!0):this.editModeEnabled.set(!0),this.entityMenuDirective?.removeOverlayMenu())}labelSize=(0,p.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(t){this.editModeEnabled()&&("Escape"===t.key?(this._reset(),t.stopPropagation()):"Enter"===t.key&&this._emitChange())}saveCancelMenu=(0,p.EW)(()=>{const t=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&t.push({icon:"save",label:"Save",action:()=>this._emitChange()}),t});selectionChange(t){this.newValue.set(t?.toString()??"")}inputChange(t){this.newValue.set(t)}_emitChange(){this.valueChange.emit(this.newValue()),this.val.set(this.newValue()),this.editModeEnabled.set(!1)}_reset(){this.newValue.set(this.val()),this.editModeEnabled.set(!1)}_revert(){const t=this.originalValue();void 0!==t&&(this.val.set(t),this.newValue.set(t),this.valueChange.emit(t),this.entityMenuDirective?.removeOverlayMenu())}_idToString(t){const i=this.rdfConfig()?.optionLabelMap;return i?i[t]??t:t}onRdfModalClose(t){if(this.rdfModalVisible.set(!1),null===t)return;const i=Array.isArray(t)?t.join(", "):t;this.val.set(i)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-key-val-editable"]],viewQuery:function(i,n){if(1&i&&e.GBs(Y.e,5),2&i){let l;e.mGM(l=e.lsd())&&(n.entityMenuDirective=l.first)}},hostBindings:function(i,n){1&i&&e.bIt("keydown",function(g){return n.onKeyPress(g)},e.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],originalValue:[1,"originalValue"],options:[1,"options"],suffix:[1,"suffix"],rdfConfig:[1,"rdfConfig"],editDisabled:[1,"editDisabled"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:9,vars:5,consts:[[1,"key-val-container"],[3,"size"],["cueEntityMenu","",1,"read-mode-container",3,"interactive","menuItems"],["direction","row","align","center"],[3,"config","visible"],["cueEntityMenu","",1,"read-mode-container",3,"click","menuItems"],[1,"value-content"],[1,"dirty-indicator"],[3,"value","options"],[3,"items"],[3,"valueChange","value","options"],[3,"valueChange","value"],[3,"visibleChange","close","config","visible"]],template:function(i,n){if(1&i&&(e.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),e.EFF(3),e.k0s()(),e.j41(4,"dd")(5,"cue-typography",1),e.nVh(6,Ne,4,6,"span",2)(7,Se,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Be,1,2,"cue-modal-rdf-edit",4)),2&i){let l;e.R7$(2),e.Y8G("size",n.labelSize()),e.R7$(),e.JRh(n.key()),e.R7$(2),e.Y8G("size",n.size()),e.R7$(),e.vxM(n.editModeEnabled()?n.rdfConfig()?-1:7:6),e.R7$(2),e.vxM((l=n.rdfConfig())?8:-1,l)}},dependencies:[M.Typography,Y.e,D.l,F.H,b.n,V.I,Te,s.Kj],styles:[".key-val-container[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:var(--cue-grid-gap-s, 8px)}dt[_ngcontent-%COMP%], dd[_ngcontent-%COMP%]{margin:0}.read-mode-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:100%;position:relative}.read-mode-container.interactive[_ngcontent-%COMP%]:hover{cursor:pointer}.value-content[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]{color:var(--cue-typography-text-color, inherit)}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], .value-content[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}[_ngcontent-%COMP%]:deep(cue-svg-icon), [_ngcontent-%COMP%]:deep(cue-entity-menu cue-svg-icon){color:var(--cue-icon-color, inherit)!important}.dirty-indicator[_ngcontent-%COMP%]{opacity:.8;margin-left:4px;color:var(--cue-typography-text-color, inherit)!important;font-weight:700;font-size:.4em;transform:translateY(-1em)}"]})}return o})()},8547(j,P,r){r.d(P,{T:()=>D});var c=r(7705),a=r(29),p=r(6117),F=r(6279),V=r(356),k=r(5802),s=r(5547);const R=(_,v)=>v.label;function b(_,v){if(1&_&&s.nrm(0,"cue-svg-icon",3),2&_){const d=s.XpG(2).$implicit;s.Y8G("name",d.icon)}}function O(_,v){if(1&_&&s.nrm(0,"cue-menu-nested",5),2&_){const d=s.XpG(2).$implicit,h=s.XpG();s.Y8G("items",d.children)("positioning",h.positioning())}}function M(_,v){if(1&_&&(s.j41(0,"cue-menu",0)(1,"cue-menu-item",2),s.nVh(2,b,1,1,"cue-svg-icon",3),s.EFF(3),s.nrm(4,"cue-svg-icon",4),s.k0s(),s.nVh(5,O,1,2,"cue-menu-nested",5),s.k0s()),2&_){const d=s.XpG().$implicit,h=s.XpG();s.Y8G("positioning",h.positioning()),s.R7$(),s.Y8G("title",d.tooltip),s.R7$(),s.vxM(d.icon?2:-1),s.R7$(),s.SpI(" ",d.label," "),s.R7$(2),s.vxM(d.children?5:-1)}}function w(_,v){if(1&_&&s.nrm(0,"cue-svg-icon",3),2&_){const d=s.XpG(2).$implicit;s.Y8G("name",d.icon)}}function x(_,v){if(1&_){const d=s.RV6();s.j41(0,"cue-menu-item",6),s.bIt("click",function(){k.eBV(d);const e=s.XpG().$implicit;return k.Njj(null==e.action?null:e.action())}),s.nVh(1,w,1,1,"cue-svg-icon",3),s.EFF(2),s.k0s()}if(2&_){const d=s.XpG().$implicit;s.Y8G("title",d.tooltip),s.R7$(),s.vxM(d.icon?1:-1),s.R7$(),s.SpI(" ",d.label," ")}}function E(_,v){if(1&_&&s.nVh(0,M,6,5,"cue-menu",0)(1,x,3,3,"cue-menu-item",1),2&_){const d=v.$implicit;s.vxM(null!=d.children&&d.children.length?0:1)}}let D=(()=>{class _{items=c.hFB.required();positioning=(0,c.hFB)(void 0);static \u0275fac=function(h){return new(h||_)};static \u0275cmp=s.VBU({type:_,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],positioning:[1,"positioning"]},decls:3,vars:0,consts:[["trigger","hover",3,"positioning"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","positioning"],[3,"click","title"]],template:function(h,e){1&h&&(s.j41(0,"cue-menu-wrap"),s.Z7z(1,E,2,1,null,null,R),s.k0s()),2&h&&(s.R7$(),s.Dyx(e.items()))},dependencies:[_,p.W,F.D,V.M,a.A],encapsulation:2})}return _})()},7573(j,P,r){r.d(P,{E:()=>c});const c={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"}}}]);
|
package/911.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[911],{6911(
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[613,911],{6911(f,v,o){o.d(v,{ByCueLogo:()=>_});var a=o(7705),n=o(4613),i=o(5547);let _=(()=>{class c{src=a.hFB.required();alt=(0,a.hFB)("");active=(0,a.hFB)(!0,{transform:a.L39});continuous=(0,a.hFB)(!1,{transform:a.L39});static \u0275fac=function(l){return new(l||c)};static \u0275cmp=i.VBU({type:c,selectors:[["cue-by-cue-logo"]],inputs:{src:[1,"src"],alt:[1,"alt"],active:[1,"active"],continuous:[1,"continuous"]},decls:7,vars:5,consts:[[1,"wrapper"],[1,"main-logo",3,"src","alt"],[1,"by-cue"],[1,"by-text"],[1,"logo-wrapper"],[3,"size","active","continuous"]],template:function(l,t){1&l&&(i.j41(0,"div",0),i.nrm(1,"img",1),i.j41(2,"div",2)(3,"span",3),i.EFF(4,"by"),i.k0s(),i.j41(5,"div",4),i.nrm(6,"cue-logo",5),i.k0s()()()),2&l&&(i.R7$(),i.Y8G("src",t.src(),i.B4B)("alt",t.alt()),i.R7$(5),i.Y8G("size","xs")("active",t.active())("continuous",t.continuous()))},dependencies:[n.Logo],styles:[":host{display:inline-block}.wrapper{position:relative;display:inline-block;width:var(--by-cue-logo-width, 200px);container-type:inline-size}.main-logo{display:block;width:100%;height:auto}.by-cue{position:absolute;bottom:clamp(-20px,-7cqi,-8px);right:clamp(-30px,-10cqi,-10px);display:flex;align-items:flex-end;gap:clamp(2px,2cqi,6px);opacity:.55}.by-cue:hover{opacity:1;transition:opacity .3s ease}.by-text{font-family:Poppins,sans-serif;font-size:clamp(8px,5cqi,13px);font-weight:300;font-style:italic;letter-spacing:.04em;color:currentColor;line-height:1}.logo-wrapper{width:clamp(24px,20cqi,56px);aspect-ratio:221.545 / 86.191;display:block}cue-logo{width:100%!important;height:100%!important;display:block}\n"],encapsulation:3})}return c})()},4613(f,v,o){o.d(v,{Logo:()=>g});var a=o(7705),n=o(5802),i=o(5547),_=o(2271),c=o(6170);let g=(()=>{class m{size=(0,a.hFB)("m");sizeMap={xs:"40px",s:"80px",m:"160px",l:"222px"};active=(0,a.hFB)(!0,{transform:a.L39});continuous=(0,a.hFB)(!1,{transform:a.L39});mode=(0,a.hFB)("default");isDarkMode=(0,a.geq)(!1);handleDarkModeChange(t){this.isDarkMode.set(t),-1===this.raf&&this.animate()}colorA=(0,_.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=t=>{if(void 0!==t){const s=5e-4*(t-this.appearTime);"glow"===this.mode()?this.tip=s%1:(this.tip=Math.min(1,s),this.active()||(this.toe=Math.min(1,6e-4*(t-this.disappearTime))))}if("glow"===this.mode()){const s=.06666666666666667,e=this.rgbToSvg(this.colorA());return this.paths.forEach((d,M)=>{this.norm=1/this.paths.length*M;let r=this.tip-this.norm;if(r<-(1-s)&&(r+=1),r>=0&&r<s){const u=1-r/s;d.setAttribute("stroke",this.rgbToSvg(this.colorB)),d.setAttribute("stroke-opacity",u.toFixed(3))}else d.setAttribute("stroke",e),d.setAttribute("stroke-opacity","0.005")}),void(this.raf=requestAnimationFrame(this.animate))}if(this.paths.forEach((s,e)=>{this.norm=1/this.paths.length*e,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),s.setAttribute("stroke",this.tip*this.paths.length>e&&(this.active()||this.toe*this.paths.length<e)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}mixChannel(t,s,e){return parseInt((t*e+s*(1-e)).toFixed())}mixRgb(t,s,e){return[this.mixChannel(t[0],s[0],e),this.mixChannel(t[1],s[1],e),this.mixChannel(t[2],s[2],e)]}rgbToSvg(t){return`rgb(${t[0]},${t[1]},${t[2]})`}constructor(){(0,n.QZP)(()=>{"glow"===this.mode()||this.active()?this.activate():this.deactivate()}),(0,n.QZP)(()=>{this.isDarkMode(),this.animate()});const t=(0,n.WQX)(i.aKT);(0,i.mal)({read:()=>{if(this.paths.length)return;const s=t.nativeElement.querySelector("svg"),e=t.nativeElement.querySelector("#original-path");if(!e)return;const d=e.getTotalLength(),r=[];for(let u=0;u<400;u++){const h=e.getPointAtLength(d/400*u);r.push({x:parseFloat(h.x.toFixed(2)),y:parseFloat(h.y.toFixed(2))})}r.push(e.getPointAtLength(d)),r.reverse(),r.forEach((u,h)=>{if(0===h||1===h)return;const p=document.createElementNS("http://www.w3.org/2000/svg","path");p.setAttribute("d",`M${r[h-2].x},${r[h-2].y}L${r[h-1].x},${r[h-1].y}L${u.x},${u.y}`),p.setAttribute("fill","none"),p.setAttribute("stroke","transparent"),p.setAttribute("stroke-width",e?.getAttribute("stroke-width")||"1"),p.setAttribute("stroke-miterlimit",e?.getAttribute("stroke-miterlimit")||"1"),s.appendChild(p),this.paths.push(p)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(s){return new(s||m)};static \u0275cmp=i.VBU({type:m,selectors:[["cue-logo"]],hostVars:2,hostBindings:function(s,e){2&s&&i.xc7("width",e.sizeMap[e.size()])},inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],mode:[1,"mode"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(s,e){1&s&&(n.qSk(),i.j41(0,"svg",0),i.bIt("darkModeChange",function(M){return e.handleDarkModeChange(M)}),i.nrm(1,"path",1),i.k0s())},dependencies:[c.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return m})()},6170(f,v,o){o.d(v,{R:()=>c});var a=o(7705),n=o(5802),i=o(2271),_=o(5547);let c=(()=>{class g{destroyRef=(0,n.WQX)(n.abz);_isDarkMode=(0,n.vPA)(this.hasDarkClass());isDarkMode=(0,i.EW)(()=>this._isDarkMode());darkModeChange=(0,a.CGW)();constructor(){const l=new MutationObserver(t=>{t.forEach(s=>{if("attributes"===s.type&&"class"===s.attributeName){const e=this.hasDarkClass();e!==this._isDarkMode()&&this._isDarkMode.set(e)}})});l.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>l.disconnect()),(0,n.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(t){return new(t||g)};static \u0275dir=_.FsC({type:g,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return g})()}}]);
|
package/919.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[919],{3183(k,O,c){c.d(O,{A:()=>g});var v=c(7705),r=c(5802),_=c(9417),m=c(1359),b=c(8957),E=c(2245),y=c(5381),s=c(5547);const l=(h,u)=>u.value;function d(h,u){if(1&h){const n=s.RV6();s.j41(0,"cue-input",6),s.bIt("valueChange",function(t){r.eBV(n);const e=s.XpG();return e.searchText=t,r.Njj(e.onSearchChange())}),s.k0s()}if(2&h){const n=s.XpG();s.Y8G("value",n.searchText)}}function x(h,u){if(1&h){const n=s.RV6();s.j41(0,"cue-checkbox",7),s.bIt("checkedChange",function(t){const e=r.eBV(n).$implicit,o=s.XpG();return e.selected=t,r.Njj(o.onSelectionChange())}),s.k0s()}if(2&h){const n=u.$implicit;s.Y8G("label",n.value||"(blank)")("checked",n.selected)}}function T(h,u){1&h&&(s.j41(0,"cue-typography",5),s.EFF(1,"No results"),s.k0s())}let g=(()=>{class h{_cdr=(0,r.WQX)(v.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(n){this._params=n}afterGuiAttached(n){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(n=>!n.selected)}doesFilterPass(n){const a=new Set(this.options.filter(i=>i.selected).map(i=>i.value)),t=this._params.getValue(n.node),e=null==t?"":String(t);return"..."===e||"Loading..."===e||(""===e?a.has(""):e.split(", ").map(i=>i.trim()).some(i=>a.has(i)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(n=>n.selected).map(n=>n.value)}:null}setModel(n){if(n){const a=new Set(n.selectedValues);this.options.forEach(t=>t.selected=a.has(t.value))}else this.options.forEach(a=>a.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(n=>n.selected)}toggleAll(n){this.options.forEach(a=>a.selected=n),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const n=new Set;this._params.api.forEachNode(t=>{const e=this._params.getValue(t);if(null==e||""===e)n.add("");else{const o=String(e);if("..."===o||"Loading..."===o)return;const i=o.split(", ").map(f=>f.trim());for(const f of i)n.add(f)}});const a=new Map(this.options.map(t=>[t.value,t.selected]));this.options=Array.from(n).sort((t,e)=>t.localeCompare(e)).map(t=>({value:t,selected:a.get(t)??!0})),this._applySearch()}_applySearch(){const n=this.searchText.toLowerCase().trim();this.filteredOptions=n?this.options.filter(a=>a.value.toLowerCase().includes(n)):this.options}static \u0275fac=function(a){return new(a||h)};static \u0275cmp=s.VBU({type:h,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(a,t){1&a&&(s.j41(0,"cue-flexcontainer",0),s.nVh(1,d,1,1,"cue-input",1),s.j41(2,"cue-checkbox",2),s.bIt("checkedChange",function(o){return t.toggleAll(o)}),s.k0s(),s.j41(3,"div",3),s.Z7z(4,x,1,2,"cue-checkbox",4,l),s.nVh(6,T,2,0,"cue-typography",5),s.k0s()()),2&a&&(s.R7$(),s.vxM(t.options.length>10?1:-1),s.R7$(),s.Y8G("checked",t.allSelected),s.R7$(2),s.Dyx(t.filteredOptions),s.R7$(2),s.vxM(0===t.filteredOptions.length?6:-1))},dependencies:[_.YN,m.S,b.p,E.Typography,y.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return h})()},5902(k,O,c){c.d(O,{U:()=>T});var v=c(7705),r=c(5802),_=c(2271),m=c(9352),b=c(8957),E=c(2444),y=c(2245),s=c(5381),l=c(5547);function d(g,h){if(1&g){const u=l.RV6();l.j41(0,"cue-input",4),l.bIt("valueChange",function(a){r.eBV(u);const t=l.XpG();return r.Njj(t.onValueChange(a))}),l.k0s()}if(2&g){const u=l.XpG();l.Y8G("value",u.filterText)}}function x(g,h){if(1&g){const u=l.RV6();l.j41(0,"cue-typography",5),l.bIt("click",function(){r.eBV(u);const a=l.XpG();return r.Njj(a.clear())}),l.EFF(1,"Clear"),l.k0s()}}let T=(()=>{class g{_cdr=(0,r.WQX)(v.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,m.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,m.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,m.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,m.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,m.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,m.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,m.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,m.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,_.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,_.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(u){this._params=u}afterGuiAttached(u){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(u){const n=this._params.getValue(u.node),a=null==n?"":String(n),t=this.filterText.toLowerCase().trim(),e=a.toLowerCase();switch(this.filterType){case"contains":default:return e.includes(t);case"notContains":return!e.includes(t);case"equals":return e===t;case"notEqual":return e!==t;case"startsWith":return e.startsWith(t);case"endsWith":return e.endsWith(t);case"blank":return""===a;case"notBlank":return""!==a}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(u){this.filterText=u?.filter??"",this.filterType=u?.type??"contains",this._cdr.markForCheck()}onValueChange(u){this.filterText=u,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(u){this.filterType=String(u||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=l.VBU({type:g,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(n,a){1&n&&(l.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),l.bIt("valueChange",function(e){return a.onFilterTypeChange(e)}),l.k0s(),l.nVh(2,d,1,1,"cue-input",2),l.nVh(3,x,2,0,"cue-typography",3),l.k0s()),2&n&&(l.R7$(),l.Y8G("value",a.filterType)("options",a.filterTypeOptions)("labelMap",a.filterTypeLabelMap()),l.R7$(),l.vxM(a.showTextInput()?2:-1),l.R7$(),l.vxM(a.filterText||"contains"!==a.filterType?3:-1))},dependencies:[b.p,E.l,y.Typography,s.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return g})()},2382(k,O,c){c.d(O,{CueDocumentList:()=>u});var v=c(467),r=c(7705),_=c(5802),m=c(2271),b=c(8611),E=c(2065),y=c(4372),s=c(5381),l=c(2245),d=c(5547);function x(n,a){if(1&n&&(d.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),d.EFF(2),d.k0s()()),2&n){const t=d.XpG();d.R7$(2),d.SpI(" ",t.errorMessage()," ")}}function T(n,a){if(1&n){const t=d.RV6();d.j41(0,"cue-doc-list",3),d.bIt("clickedDocument",function(o){_.eBV(t);const i=d.XpG();return _.Njj(i.clickedDocument.emit(o))})("clickedDownloadDocument",function(o){_.eBV(t);const i=d.XpG();return _.Njj(i.clickedDownloadDocument.emit(o))})("clickedOpenInDir",function(o){_.eBV(t);const i=d.XpG();return _.Njj(i.clickedOpenInDir.emit(o))})("clickedOpen",function(o){_.eBV(t);const i=d.XpG();return _.Njj(i.clickedOpen.emit(o))}),d.k0s()}if(2&n){const t=d.XpG();d.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t.handlers())("availableContentCategories",t.availableContentCategories())("detailedView",t.detailedView())("simple",t.simple())("pageSize",t.pageSize())("prefetchPages",t.prefetchPages())("showOpenInDocumentViewerAction",t.showOpenInDocumentViewerAction())("showOpenInFileManagerAction",t.showOpenInFileManagerAction())("customOverlayActions",t.customOverlayActions())("variant",t.variant())}}function g(n){return n.split("?")[0].trim()}let u=(()=>{class n{projectId=(0,r.hFB)(void 0);uuids=(0,r.hFB)([]);sdkState=(0,r.hFB)(void 0);detailedView=(0,r.hFB)(!1);simple=(0,r.hFB)(!1);pageSize=(0,r.hFB)(10);prefetchPages=(0,r.hFB)(3);showOpenInDocumentViewerAction=(0,r.hFB)(!1);showOpenInFileManagerAction=(0,r.hFB)(!1);customMenuItems=(0,r.hFB)([]);variant=(0,r.hFB)("none");clickedDocument=(0,r.CGW)();clickedDownloadDocument=(0,r.CGW)();clickedOpenInDir=(0,r.CGW)();clickedOpen=(0,r.CGW)();state=(0,_.vPA)("idle");errorMessage=(0,_.vPA)(null);documentData=(0,_.vPA)({});availableContentCategories=(0,_.vPA)(void 0);documentRefs=(0,m.EW)(()=>{const t=new Set;return(this.uuids()??[]).map(g).filter(e=>!!e).filter(e=>!t.has(e)&&(t.add(e),!0)).map(e=>({id:e}))});customOverlayActions=(0,m.EW)(()=>(this.customMenuItems()||[]).map(e=>({label:e.label,icon:e.icon,action:o=>{e.action(o.rowData,o)}})));handlers=(0,m.EW)(()=>{var t=this;const e=this._docs();if(e)return{requestData:(o=(0,v.A)(function*(i){const f=i.map(g).filter(p=>!!p),C=f.filter(p=>!t.documentData()[p]);if(console.debug("[CueDocumentListWC] requestData",{requestedCount:f.length,missingCount:C.length,missing:C}),C.length)try{const p=e,D=t.simple()&&p.fetchDocumentDataSimple?yield p.fetchDocumentDataSimple(C):yield e.fetchDocumentData(C);console.debug("[CueDocumentListWC] fetchDocumentData resolved",{fetchedCount:Object.keys(D).length,ids:Object.keys(D)});const w={};Object.values(D).forEach(M=>{w[M.id]=function h(n){return{id:n.id,path:n.path,suffix:n.suffix,size:n.size,contentIRI:n.contentIRI,providerId:n.providerId,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,relevance:0}}(M)}),Object.keys(w).length>0&&t.documentData.update(M=>({...M,...w}))}catch(p){console.error("[CueDocumentListWC] Failed to fetch document data:",p),t.errorMessage.set(p instanceof Error?p.message:String(p)),t.state.set("error")}}),function(f){return o.apply(this,arguments)}),requestDownload:function(){var o=(0,v.A)(function*(i){const f=t._cue(),C=t.projectId();if(f&&C)try{const p=yield f.storage.getDownloadUrl(C,i.id,i.suffix,"raw"),D=yield fetch(p);if(!D.ok)throw new Error(`Download failed: ${D.status} ${D.statusText}`);const w=yield D.blob(),M=(0,y.M)(i.path)||`${i.id}${i.suffix||""}`;(0,E.KE)(w,M)}catch(p){console.error("[CueDocumentListWC] Failed to download document:",p)}});return function(f){return o.apply(this,arguments)}}(),requestOpen:(o,i)=>{console.log("[CueDocumentListWC] requestOpen",{documentUUID:o,document:i})},requestOpenInDir:(o,i)=>{console.log("[CueDocumentListWC] requestOpenInDir",{documentUUID:o,document:i})}};var o});_cue=(0,_.vPA)(void 0);_docs=(0,_.vPA)(void 0);_ownedView;_unsubscribeCategories;_lastSetupSignature;constructor(){(0,_.QZP)(()=>{const t=this.projectId(),e=this.sdkState(),o=e?.language??"en";if(console.debug("[CueDocumentListWC] input state changed",{projectId:t,uuids:this.uuids().length,hasSdkState:!!e,hasCue:!!e?.cue,hasView:!!e?.view,hasDocuments:!!e?.documents}),!t||!e)return this._clearRuntimeState(),void this.state.set("idle");const i={projectId:t,cue:e.cue,view:e.view,documents:e.documents,language:o,simple:this.simple()};if(this._isSameSetupSignature(i))return this.state.set("ready"),void this.errorMessage.set(null);this._setupFromSdkState(t,e),this._lastSetupSignature=i,this.state.set("ready"),this.errorMessage.set(null)}),(0,_.QZP)(()=>{const t=new Set(this.documentRefs().map(e=>e.id));this.documentData.update(e=>Object.fromEntries(Object.entries(e).filter(([i])=>t.has(i))))})}ngOnDestroy(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0}_setupFromSdkState(t,e){const o=e.language??"en";if(this.documentData.set({}),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this.availableContentCategories.set(e.availableContentCategories?e.availableContentCategories:void 0),e.documents)return e.documents.setLanguage(o),this._docs.set(e.documents),void this._cue.set(e.cue);if(e.view)return e.view.setLanguage(o),this._docs.set(e.view.documents),this._cue.set(e.cue),void(this.simple()||this._bindCategoriesFromView(e.view));if(e.cue){if(this.simple())return this._docs.set(e.cue.createProjectDocuments(t)),this._cue.set(e.cue),void this.availableContentCategories.set(void 0);const i=e.cue.createProjectView(t,{language:o});return this._ownedView=i,this._docs.set(i.documents),this._cue.set(e.cue),void this._bindCategoriesFromView(i)}this._docs.set(void 0),this._cue.set(void 0),this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindCategoriesFromView(t){const e=()=>{this.availableContentCategories.set(t.availableContentCategories.get())};e(),this._unsubscribeCategories=t.availableContentCategories.subscribe(e)}_clearRuntimeState(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._docs.set(void 0),this._cue.set(void 0),this.documentData.set({}),this.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(t){const e=this._lastSetupSignature;return!!e&&e.projectId===t.projectId&&e.cue===t.cue&&e.view===t.view&&e.documents===t.documents&&e.language===t.language&&e.simple===t.simple}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=d.VBU({type:n,selectors:[["cue-document-list"]],inputs:{projectId:[1,"projectId"],uuids:[1,"uuids"],sdkState:[1,"sdkState"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customMenuItems:[1,"customMenuItems"],variant:[1,"variant"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[3,"documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions","variant"],[2,"color","#c44","font-size","13px"],[3,"clickedDocument","clickedDownloadDocument","clickedOpenInDir","clickedOpen","documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions","variant"]],template:function(e,o){1&e&&d.nVh(0,x,3,1,"cue-flexcontainer",0)(1,T,1,12,"cue-doc-list",1),2&e&&d.vxM("error"===o.state()?0:1)},dependencies:[b.g,s.n,l.Typography],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return n})()}}]);
|