@qaecy/cue-ui 0.0.60 → 0.0.61
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/1359.js +1 -1
- package/1837.js +1 -1
- package/1842.js +1 -0
- package/2317.js +1 -1
- package/2538.js +1 -0
- package/2713.js +7 -0
- package/2775.js +1 -1
- package/2839.js +1 -1
- package/3036.js +1 -1
- package/3202.js +1 -1
- package/3418.js +1 -1
- package/3523.js +1 -1
- package/3577.js +1 -1
- package/3614.js +1 -1
- package/3654.js +1 -0
- package/3656.js +1 -1
- package/366.js +1 -0
- package/4098.js +1 -1
- package/426.js +1 -0
- package/468.js +1 -0
- package/4791.js +1 -1
- package/5649.js +1 -1
- package/5872.js +1 -1
- package/6233.js +1 -1
- package/6419.js +1 -1
- package/6947.js +1 -1
- package/7019.js +1 -0
- package/7193.js +1 -0
- package/7719.js +1 -1
- package/7727.js +1 -1
- package/8725.js +1 -0
- package/9396.js +1 -1
- package/992.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/1701.js +0 -1
- package/2530.js +0 -1
- package/329.js +0 -1
- package/3842.js +0 -1
- package/3869.js +0 -1
- package/4311.js +0 -1
- package/6040.js +0 -1
- package/7154.js +0 -1
- package/928.js +0 -1
package/3656.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3656],{3656(k,S,c){c.d(S,{g:()=>be});var M=c(467),l=c(7705),u=c(2271),o=c(5802),x=c(2065),O=c(4323),t=c(5547);let F=(()=>{class s{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,l.hFB)([]),this.width=(0,l.hFB)(),this.height=(0,l.hFB)(),this.step=(0,l.hFB)(),this.overflow=(0,l.hFB)(),this.strict=(0,l.hFB)(),this.zoomOnHover=(0,l.hFB)(),this.realignOnResize=(0,l.hFB)(),this.randomizeAngle=(0,l.hFB)(),this.background=(0,l.hFB)(),this.font=(0,l.hFB)(),this.delay=(0,l.hFB)(),this.config=(0,l.hFB)({}),this.log=(0,l.hFB)(),this.clicked=(0,l.CGW)(),this.afterInit=(0,l.CGW)(),this.afterChecked=(0,l.CGW)(),this.localConfig=(0,u.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,o.WQX)(t.aKT),this.r2=(0,o.WQX)(t.sFG);const e=this.el.nativeElement;(0,o.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,a)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(a))),this.dataArr.sort((i,a)=>a.weight-i.weight);const e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,a)=>{this.drawWord(a,i)}),n.forEach((i,a)=>{this.drawWord(a,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:a,offsetWidth:d,offsetHeight:m}=n;return!(e.right<i||e.left>i+d||e.bottom<a||e.top>a+m)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const a=this.r2.createText(n);i.appendChild(a),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,n,i,a){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${a}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${a}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let a=this.options.randomizeAngle?6.28*Math.random():0,d=0;const m=e.style;m.position="absolute";const g=!!(n.position&&n.position.left&&n.position.top),r=e.offsetWidth,p=e.offsetHeight;let _=g&&n.position?.left?n.position.left:this.options.center.x-r/2,v=g&&n.position?.top?n.position.top:this.options.center.y-p/2;if(m.left=_+"px",m.top=v+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),m.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!g)if(0===i)m.left=_+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",m.top=v+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(_,v,e.offsetWidth,e.offsetHeight));)d+=this.options.step||1,a+=(i%2==0?1:-1)*(this.options.step||1),_=this.options.center.x-r/2+d*Math.cos(a)*this.options.aspectRatio,v=this.options.center.y+d*Math.sin(a)-p/2;m.left=_+"px",m.top=v+"px"}if(!this.options.overflow&&(_<0||v<0||_+r>this.calculatedWidth||v+p>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,n){let i;const a=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${a}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let d=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const m=this.setWordRotation(i,n.rotate);n.link&&(d=this.wrapNodeIntoAnchorElement(d,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(d,i,n.link,m),i.appendChild(d),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(d){return i.onResize(d)},t.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return s})();var w=c(5970);const b=["wordCloudContainer"];function y(s,h){if(1&s){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){o.eBV(e);const a=t.XpG();return o.Njj(a.handleClicked(i))}),t.k0s()}if(2&s){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.overflow())("realignOnResize",!0)}}let R=(()=>{class s{words=(0,l.hFB)();entries=(0,l.hFB)();caseSensitive=(0,l.hFB)(!1);clickable=(0,l.hFB)(!1);multiSelect=(0,l.hFB)(!1);highlightSelection=(0,l.hFB)(!1);minWeight=(0,l.hFB)(1);maxWeight=(0,l.hFB)(5);maxWords=(0,l.hFB)(50);colorScheme=(0,l.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,l.hFB)(!1);clickedWord=(0,l.CGW)();selectionChanged=(0,l.CGW)();wordCloudContainer;containerSize=(0,o.vPA)({width:0,height:0});selection=(0,o.vPA)([]);data=(0,u.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,o.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,u.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const r of e){const p=this.caseSensitive()?r:r.toLowerCase();n.set(p,(n.get(p)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const a=i.map(([,r])=>r),d=Math.min(...a),m=Math.max(...a);return m===d?i.map(([r])=>({text:r,weight:this.maxWeight()})):i.sort(([,r],[,p])=>p-r).slice(0,this.maxWords()).map(([r,p])=>({text:r,weight:this.minWeight()+(p-d)*(this.maxWeight()-this.minWeight())/(m-d),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(b,5),2&n){let a;t.mGM(a=t.lsd())&&(i.wordCloudContainer=a.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(t.j41(0,"div",1,0),t.bIt("resized",function(d){return i.handleResize(d)}),t.nVh(2,y,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[F,w.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return s})();var B=c(5971),P=c(5448),E=c(3319),z=c(4372),G=c(2611),j=c(5661),V=c(1096),L=c(5764),$=c(2217);let X=(()=>{class s{suffix=(0,o.vPA)("");iconSize=(0,o.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[$.o],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return s})();var U=c(6117),Y=c(29),Q=c(1951),K=c(1493),C=c(9352),Z=c(5381),J=c(9769),q=c(5187),ee=c(356),te=c(6279),ne=c(7717),ie=c(7089),oe=c(2245);const se=(s,h)=>h.id;function ae(s,h){if(1&s){const e=t.RV6();t.j41(0,"li",9),t.bIt("click",function(){const i=o.eBV(e).$implicit,a=t.XpG(3);return o.Njj(a.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",10),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",11),t.EFF(4),t.k0s()()}if(2&s){const e=h.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function le(s,h){if(1&s&&(t.j41(0,"ul",5),t.Z7z(1,ae,5,6,"li",8,se),t.k0s()),2&s){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function ce(s,h){if(1&s&&(t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),t.EFF(2),t.k0s()()),2&s){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function re(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",16),t.k0s(),t.j41(6,"cue-button",15),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",17),t.k0s()()()}if(2&s){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function de(s,h){if(1&s&&(t.j41(0,"div",3),t.nVh(1,le,3,0,"ul",5)(2,ce,3,1,"cue-flexcontainer",6),t.nVh(3,re,8,5,"cue-flexcontainer",7),t.k0s()),2&s){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function ue(s,h){if(1&s&&t.nrm(0,"cue-svg-icon",34),2&s){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function he(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-menu-item",33),t.bIt("click",function(){const i=o.eBV(e).$implicit;return o.Njj(null==i?null:i.action())}),t.nVh(1,ue,1,1,"cue-svg-icon",34),t.EFF(2),t.k0s()}if(2&s){const e=h.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function ge(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),t.nrm(4,"cue-button-icon",27),t.k0s(),t.j41(5,"cue-menu-wrap",28),t.Z7z(6,he,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(8,"cue-button",29),t.nI1(9,"transloco"),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.flipped.set(!0))}),t.nrm(10,"cue-button-icon",30),t.k0s()(),t.j41(11,"div",31)(12,"cue-ag-grid",32),t.bIt("gridApiReady",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.onGridReady(i))})("selectedRows",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.clickedDocument.emit(i[0]))})("viewMarkdown",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.viewMarkdown.emit(i))}),t.k0s()()}if(2&s){const e=t.XpG(2);t.R7$(6),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(9,10,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("size",e.size())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions())}}function me(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",41),t.bIt("click",function(){o.eBV(e);const i=t.XpG(3);return o.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",42)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function pe(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.showFront())}),t.nrm(2,"cue-button-icon",36),t.k0s()(),t.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),t.bIt("selectionChanged",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.tagSelection.set(i))}),t.k0s(),t.nVh(5,me,4,0,"cue-flexcontainer",39),t.k0s(),t.j41(6,"cue-ag-grid-column-select",40),t.mxI("columnDefsChange",function(i){o.eBV(e);const a=t.XpG(2);return t.DH7(a.columnDefs,i)||(a.columnDefs=i),o.Njj(i)}),t.k0s()}if(2&s){const e=t.XpG(2);t.R7$(3),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?5:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}function fe(s,h){if(1&s&&(t.j41(0,"cue-card",20),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(3),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function ve(s,h){if(1&s&&(t.j41(0,"div",21),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(3);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function _e(s,h){if(1&s&&(t.j41(0,"cue-card",22),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(5),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Ce(s,h){if(1&s&&(t.j41(0,"div",23),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(5);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function De(s,h){if(1&s){const e=t.RV6();t.j41(0,"div",18),t.mxI("cueFlipChange",function(i){o.eBV(e);const a=t.XpG();return t.DH7(a.flipped,i)||(a.flipped=i),o.Njj(i)}),t.j41(1,"div",19),t.DNE(2,ge,13,12,"ng-template",null,0,t.C5r)(4,pe,7,13,"ng-template",null,1,t.C5r),t.nVh(6,fe,2,2,"cue-card",20)(7,ve,2,1,"div",21),t.nVh(8,_e,2,2,"cue-card",22)(9,Ce,2,1,"div",23),t.k0s()()}if(2&s){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(6),t.vxM("none"!==e.variant()?6:7),t.R7$(2),t.vxM("none"!==e.variant()?8:9)}}let be=(()=>{class s{documents=(0,l.hFB)([]);availableContentCategories=(0,l.hFB)(void 0);detailedView=(0,l.hFB)(!1);simple=(0,l.hFB)(!1);pageSize=(0,l.hFB)(10);size=(0,l.hFB)("m");prefetchPages=(0,l.hFB)(3);privileges=(0,l.hFB)();showOpenInDocumentViewerAction=(0,l.hFB)(!0);showOpenInFileManagerAction=(0,l.hFB)(!0);customOverlayActions=(0,l.hFB)([]);variant=(0,l.hFB)("default");_cardVariant=(0,u.EW)(()=>this.variant());documentRefs=(0,l.hFB)([]);handlers=(0,l.hFB)(void 0);documentData=(0,l.hFB)({});clickedDocument=(0,l.CGW)();clickedDownloadDocument=(0,l.CGW)();clickedOpenInDir=(0,l.CGW)();clickedOpen=(0,l.CGW)();viewMarkdown=(0,l.CGW)();flipped=(0,o.vPA)(!1);simplePageIndex=(0,o.vPA)(0);selectedSimpleDocumentId=(0,o.vPA)(null);_simpleBufferedUntilIndex=(0,o.vPA)(0);_tableBufferedUntilIndex=(0,o.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,u.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,u.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,C.Xx)("components.documentList.labelDownload");labelName=(0,C.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,C.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,C.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,C.Xx)("components.documentList.labelSubject");labelSummary=(0,C.Xx)("components.documentList.labelSummary");labelPages=(0,C.Xx)("components.documentList.labelPages");labelSize=(0,C.Xx)("components.documentList.labelSize");labelCategories=(0,C.Xx)("components.documentList.labelCategories");labelType=(0,C.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,C.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,C.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,C.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,C.Xx)("components.documentList.infoLoading");overlaySettings=(0,u.EW)(()=>({...new Q.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,u.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&e.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,u.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(a=>{const d=i[a.id];return d?{...d,pages:a.pages??d.pages,...void 0!==a.sources?{sources:a.sources}:{},...void 0!==a.relevance?{relevance:a.relevance}:{},name:(0,z.M)(d.path),loading:!1}:{id:a.id,path:a.id,suffix:"",size:0,contentIRI:a.id,tags:[],summary:"",categories:[],relevance:a.relevance??0,pages:a.pages,sources:a.sources,name:this.infoLoading(),loading:!0}})}else e=(this.documents()||[]).map(n=>({...n,name:(0,z.M)(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(a=>a.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,u.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,u.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,u.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,u.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,u.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,u.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,u.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,u.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,u.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(a=>n.push(a))}),n});showPageColumn=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.subject));columnSelectSettings=new V.e;columnDefs=(0,o.vPA)([]);columnDefsGross=(0,o.vPA)([]);tagSelection=(0,o.vPA)([]);tagFilter=(0,o.vPA)([]);showTagFilterCloud=(0,o.vPA)(!1);filterToBeApplied=(0,u.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,u.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function I(s,h,e="table.csv"){const n=(0,O.gJ)(s,h);(0,x.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,u.EW)(()=>this.showTagFilterCloud()||this.flipped());rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};whenTableDataKnown=(0,o.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,o.QZP)(()=>{const e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,o.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,o.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),a=n*Math.max(1,this.prefetchPages()),d=e.length,m=this.simpleStartIndex(),g=Math.min(d,m+n),r=this._simpleBufferedUntilIndex();let p=null;if(0===r?p=0:(m>=Math.max(0,r-n)||g>r)&&(p=r),null===p||p>=d)return;const _=Math.min(d,p+a),v=e.slice(p,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._simpleBufferedUntilIndex.set(Math.max(r,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,M.A)(function*(){n.clickedDocument.emit(e),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),d=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(n,d+i),g=this._tableBufferedUntilIndex();let r=null;if(0===g?r=0:(d>=Math.max(0,g-i)||m>g)&&(r=g),null===r||r>=n)return;const p=i*Math.max(1,this.prefetchPages()),_=Math.min(n,r+p),v=e.slice(r,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._tableBufferedUntilIndex.set(Math.max(g,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:g=>!g.data?.name&&g.data?.loading?"Loading...":g.data?.name||g.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:L.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const a={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:L.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(a.tooltipField="summary"),e?n.push(a):i.push(a),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:g=>Array.isArray(g.data?.pages)?g.data.pages.map(r=>r.page).join(", "):""});const d={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:g=>(0,K.b)(g.data?.size||0)};e?n.push(d):i.push(d);const m={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:g=>{const r=g.data?.categories||[],p=this._leafContentCategoryIris(),_=p?r.filter(f=>p.has(f)):r,v=_.slice(0,3).map(f=>this._getContentCategoryLabel(f)).join(", ");return _.length>3?`${v}...`:v}};e?n.push(m):i.push(m),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:X}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(a=>a.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(s=>{const h=s.split("#").pop()??s,e={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===e[h]&&console.log(`No pretty label for category: ${h}`),e[h]??h})(e)}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],size:[1,"size"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen",viewMarkdown:"viewMarkdown"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","viewMarkdown","paginationPageSize","size","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&t.nVh(0,de,4,2,"div",3)(1,De,10,3,"div",4),2&n&&t.vxM(i.simple()?0:1)},dependencies:[Z.FlexContainer,R,B.Button,P.ButtonLabel,ne.R,q.Card,J.T3,E.ButtonIcon,G.R,j.pL,ee.M,te.D,U.W,Y.A,ie.d,oe.Typography,C.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return s})()},4372(k,S,c){c.d(S,{M:()=>M});const M=l=>{const u=l.split("/");return u[u.length-1]}},2217(k,S,c){c.d(S,{o:()=>T});var M=c(7705),l=c(2271),u=c(2245),o=c(5547),x=c(5802);function O(D,F){if(1&D&&(x.qSk(),o.j41(0,"svg",0),o.nrm(1,"path",3)(2,"path",4),o.k0s()),2&D){const w=o.XpG();o.R7$(),o.BMQ("fill",w.colorDark()),o.R7$(),o.BMQ("fill",w.color())}}function I(D,F){if(1&D&&(x.qSk(),o.j41(0,"svg",1),o.nrm(1,"path",5)(2,"path",6)(3,"path",7),o.k0s()),2&D){const w=o.XpG();o.R7$(2),o.BMQ("fill",w.color())}}const t_blue="#175EBB",N={".dwg":t_blue,".dxf":t_blue,".doc":t_blue,".docx":t_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":t_blue,".pptx":t_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let T=(()=>{class D{suffix=M.hFB.required();size=(0,M.hFB)("m");color=(0,l.EW)(()=>N[this.suffix()]??"#9D9998");label=(0,l.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,l.EW)(()=>`size-${this.size()}`);colorDark=(0,l.EW)(()=>{const w=this.color(),b=parseInt(w.slice(1),16),R=b>>8&255,B=255&b;return`#${(Math.floor(.8*(b>>16&255))<<16|Math.floor(.8*R)<<8|Math.floor(.8*B)).toString(16).padStart(6,"0")}`});static \u0275fac=function(b){return new(b||D)};static \u0275cmp=o.VBU({type:D,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(b,y){2&b&&o.HbH(y.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(b,y){1&b&&(o.nVh(0,O,3,2,":svg:svg",0)(1,I,4,1,":svg:svg",1),o.j41(2,"cue-typography",2),o.EFF(3),o.k0s()),2&b&&(o.vxM("folder"===y.suffix()?0:1),o.R7$(3),o.JRh(y.label()))},dependencies:[u.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return D})()},1493(k,S,c){function M(l,u=!1,o=1){const x=u?1e3:1024;if(Math.abs(l)<x)return l+" B";const O=u?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let I=-1;const t=10**o;do{l/=x,++I}while(Math.round(Math.abs(l)*t)/t>=x&&I<O.length-1);return l.toFixed(o)+" "+O[I]}c.d(S,{b:()=>M})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3656],{3656(k,S,c){c.d(S,{g:()=>be});var M=c(467),l=c(7705),u=c(2271),o=c(5802),x=c(2065),O=c(4323),t=c(5547);let T=(()=>{class s{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,l.hFB)([]),this.width=(0,l.hFB)(),this.height=(0,l.hFB)(),this.step=(0,l.hFB)(),this.overflow=(0,l.hFB)(),this.strict=(0,l.hFB)(),this.zoomOnHover=(0,l.hFB)(),this.realignOnResize=(0,l.hFB)(),this.randomizeAngle=(0,l.hFB)(),this.background=(0,l.hFB)(),this.font=(0,l.hFB)(),this.delay=(0,l.hFB)(),this.config=(0,l.hFB)({}),this.log=(0,l.hFB)(),this.clicked=(0,l.CGW)(),this.afterInit=(0,l.CGW)(),this.afterChecked=(0,l.CGW)(),this.localConfig=(0,u.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,o.WQX)(t.aKT),this.r2=(0,o.WQX)(t.sFG);const e=this.el.nativeElement;(0,o.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,a)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(a))),this.dataArr.sort((i,a)=>a.weight-i.weight);const e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,a)=>{this.drawWord(a,i)}),n.forEach((i,a)=>{this.drawWord(a,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:a,offsetWidth:d,offsetHeight:m}=n;return!(e.right<i||e.left>i+d||e.bottom<a||e.top>a+m)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const a=this.r2.createText(n);i.appendChild(a),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,n,i,a){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${a}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${a}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let a=this.options.randomizeAngle?6.28*Math.random():0,d=0;const m=e.style;m.position="absolute";const g=!!(n.position&&n.position.left&&n.position.top),r=e.offsetWidth,p=e.offsetHeight;let _=g&&n.position?.left?n.position.left:this.options.center.x-r/2,v=g&&n.position?.top?n.position.top:this.options.center.y-p/2;if(m.left=_+"px",m.top=v+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),m.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!g)if(0===i)m.left=_+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",m.top=v+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(_,v,e.offsetWidth,e.offsetHeight));)d+=this.options.step||1,a+=(i%2==0?1:-1)*(this.options.step||1),_=this.options.center.x-r/2+d*Math.cos(a)*this.options.aspectRatio,v=this.options.center.y+d*Math.sin(a)-p/2;m.left=_+"px",m.top=v+"px"}if(!this.options.overflow&&(_<0||v<0||_+r>this.calculatedWidth||v+p>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,n){let i;const a=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${a}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let d=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const m=this.setWordRotation(i,n.rotate);n.link&&(d=this.wrapNodeIntoAnchorElement(d,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(d,i,n.link,m),i.appendChild(d),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(d){return i.onResize(d)},t.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return s})();var w=c(5970);const b=["wordCloudContainer"];function y(s,h){if(1&s){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){o.eBV(e);const a=t.XpG();return o.Njj(a.handleClicked(i))}),t.k0s()}if(2&s){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.overflow())("realignOnResize",!0)}}let R=(()=>{class s{words=(0,l.hFB)();entries=(0,l.hFB)();caseSensitive=(0,l.hFB)(!1);clickable=(0,l.hFB)(!1);multiSelect=(0,l.hFB)(!1);highlightSelection=(0,l.hFB)(!1);minWeight=(0,l.hFB)(1);maxWeight=(0,l.hFB)(5);maxWords=(0,l.hFB)(50);colorScheme=(0,l.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,l.hFB)(!1);clickedWord=(0,l.CGW)();selectionChanged=(0,l.CGW)();wordCloudContainer;containerSize=(0,o.vPA)({width:0,height:0});selection=(0,o.vPA)([]);data=(0,u.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,o.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,u.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const r of e){const p=this.caseSensitive()?r:r.toLowerCase();n.set(p,(n.get(p)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const a=i.map(([,r])=>r),d=Math.min(...a),m=Math.max(...a);return m===d?i.map(([r])=>({text:r,weight:this.maxWeight()})):i.sort(([,r],[,p])=>p-r).slice(0,this.maxWords()).map(([r,p])=>({text:r,weight:this.minWeight()+(p-d)*(this.maxWeight()-this.minWeight())/(m-d),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(b,5),2&n){let a;t.mGM(a=t.lsd())&&(i.wordCloudContainer=a.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(t.j41(0,"div",1,0),t.bIt("resized",function(d){return i.handleResize(d)}),t.nVh(2,y,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[T,w.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return s})();var B=c(5971),P=c(5448),E=c(3319),z=c(4372),L=c(2611),j=c(5661),V=c(1096),G=c(5764),$=c(2217);let X=(()=>{class s{suffix=(0,o.vPA)("");iconSize=(0,o.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[$.o],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return s})();var U=c(6117),Y=c(29),Q=c(1951),K=c(1493),C=c(9352),Z=c(5381),J=c(9769),q=c(5187),ee=c(356),te=c(6279),ne=c(7717),ie=c(7089),oe=c(2245);const se=(s,h)=>h.id;function ae(s,h){if(1&s){const e=t.RV6();t.j41(0,"li",9),t.bIt("click",function(){const i=o.eBV(e).$implicit,a=t.XpG(3);return o.Njj(a.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",10),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",11),t.EFF(4),t.k0s()()}if(2&s){const e=h.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function le(s,h){if(1&s&&(t.j41(0,"ul",5),t.Z7z(1,ae,5,6,"li",8,se),t.k0s()),2&s){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function ce(s,h){if(1&s&&(t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),t.EFF(2),t.k0s()()),2&s){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function re(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",16),t.k0s(),t.j41(6,"cue-button",15),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",17),t.k0s()()()}if(2&s){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function de(s,h){if(1&s&&(t.j41(0,"div",3),t.nVh(1,le,3,0,"ul",5)(2,ce,3,1,"cue-flexcontainer",6),t.nVh(3,re,8,5,"cue-flexcontainer",7),t.k0s()),2&s){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function ue(s,h){if(1&s&&t.nrm(0,"cue-svg-icon",34),2&s){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function he(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-menu-item",33),t.bIt("click",function(){const i=o.eBV(e).$implicit;return o.Njj(null==i?null:i.action())}),t.nVh(1,ue,1,1,"cue-svg-icon",34),t.EFF(2),t.k0s()}if(2&s){const e=h.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function ge(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),t.nrm(4,"cue-button-icon",27),t.k0s(),t.j41(5,"cue-menu-wrap",28),t.Z7z(6,he,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(8,"cue-button",29),t.nI1(9,"transloco"),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.flipped.set(!0))}),t.nrm(10,"cue-button-icon",30),t.k0s()(),t.j41(11,"div",31)(12,"cue-ag-grid",32),t.bIt("gridApiReady",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.onGridReady(i))})("selectedRows",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.onSelectedRows(i))})("viewMarkdown",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.viewMarkdown.emit(i))}),t.k0s()()}if(2&s){const e=t.XpG(2);t.R7$(6),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(9,10,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("size",e.size())("rowSelection",e._rowSelection())("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions())}}function me(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",41),t.bIt("click",function(){o.eBV(e);const i=t.XpG(3);return o.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",42)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function pe(s,h){if(1&s){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),t.bIt("click",function(){o.eBV(e);const i=t.XpG(2);return o.Njj(i.showFront())}),t.nrm(2,"cue-button-icon",36),t.k0s()(),t.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),t.bIt("selectionChanged",function(i){o.eBV(e);const a=t.XpG(2);return o.Njj(a.tagSelection.set(i))}),t.k0s(),t.nVh(5,me,4,0,"cue-flexcontainer",39),t.k0s(),t.j41(6,"cue-ag-grid-column-select",40),t.mxI("columnDefsChange",function(i){o.eBV(e);const a=t.XpG(2);return t.DH7(a.columnDefs,i)||(a.columnDefs=i),o.Njj(i)}),t.k0s()}if(2&s){const e=t.XpG(2);t.R7$(3),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?5:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}function fe(s,h){if(1&s&&(t.j41(0,"cue-card",20),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(3),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function ve(s,h){if(1&s&&(t.j41(0,"div",21),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(3);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function _e(s,h){if(1&s&&(t.j41(0,"cue-card",22),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(5),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function Ce(s,h){if(1&s&&(t.j41(0,"div",23),t.eu8(1,43),t.k0s()),2&s){t.XpG();const e=t.sdS(5);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function De(s,h){if(1&s){const e=t.RV6();t.j41(0,"div",18),t.mxI("cueFlipChange",function(i){o.eBV(e);const a=t.XpG();return t.DH7(a.flipped,i)||(a.flipped=i),o.Njj(i)}),t.j41(1,"div",19),t.DNE(2,ge,13,12,"ng-template",null,0,t.C5r)(4,pe,7,13,"ng-template",null,1,t.C5r),t.nVh(6,fe,2,2,"cue-card",20)(7,ve,2,1,"div",21),t.nVh(8,_e,2,2,"cue-card",22)(9,Ce,2,1,"div",23),t.k0s()()}if(2&s){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(6),t.vxM("none"!==e.variant()?6:7),t.R7$(2),t.vxM("none"!==e.variant()?8:9)}}let be=(()=>{class s{documents=(0,l.hFB)([]);availableContentCategories=(0,l.hFB)(void 0);detailedView=(0,l.hFB)(!1);simple=(0,l.hFB)(!1);pageSize=(0,l.hFB)(10);size=(0,l.hFB)("m");prefetchPages=(0,l.hFB)(3);privileges=(0,l.hFB)();showOpenInDocumentViewerAction=(0,l.hFB)(!0);showOpenInFileManagerAction=(0,l.hFB)(!0);customOverlayActions=(0,l.hFB)([]);variant=(0,l.hFB)("default");_cardVariant=(0,u.EW)(()=>this.variant());documentRefs=(0,l.hFB)([]);handlers=(0,l.hFB)(void 0);documentData=(0,l.hFB)({});selectable=(0,l.hFB)(!1);clickedDocument=(0,l.CGW)();clickedDownloadDocument=(0,l.CGW)();clickedOpenInDir=(0,l.CGW)();clickedOpen=(0,l.CGW)();selectionChanged=(0,l.CGW)();viewMarkdown=(0,l.CGW)();flipped=(0,o.vPA)(!1);simplePageIndex=(0,o.vPA)(0);selectedSimpleDocumentId=(0,o.vPA)(null);_simpleBufferedUntilIndex=(0,o.vPA)(0);_tableBufferedUntilIndex=(0,o.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,u.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,u.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,C.Xx)("components.documentList.labelDownload");labelName=(0,C.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,C.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,C.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,C.Xx)("components.documentList.labelSubject");labelSummary=(0,C.Xx)("components.documentList.labelSummary");labelPages=(0,C.Xx)("components.documentList.labelPages");labelSize=(0,C.Xx)("components.documentList.labelSize");labelCategories=(0,C.Xx)("components.documentList.labelCategories");labelType=(0,C.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,C.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,C.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,C.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,C.Xx)("components.documentList.infoLoading");overlaySettings=(0,u.EW)(()=>({...new Q.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,u.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&e.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,u.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(a=>{const d=i[a.id];return d?{...d,pages:a.pages??d.pages,...void 0!==a.sources?{sources:a.sources}:{},...void 0!==a.relevance?{relevance:a.relevance}:{},name:(0,z.M)(d.path),loading:!1}:{id:a.id,path:a.id,suffix:"",size:0,contentIRI:a.id,tags:[],summary:"",categories:[],relevance:a.relevance??0,pages:a.pages,sources:a.sources,name:this.infoLoading(),loading:!0}})}else e=(this.documents()||[]).map(n=>({...n,name:(0,z.M)(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(a=>a.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,u.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,u.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,u.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,u.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,u.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,u.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,u.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,u.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,u.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(a=>n.push(a))}),n});showPageColumn=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.subject));columnSelectSettings=new V.e;columnDefs=(0,o.vPA)([]);columnDefsGross=(0,o.vPA)([]);tagSelection=(0,o.vPA)([]);tagFilter=(0,o.vPA)([]);showTagFilterCloud=(0,o.vPA)(!1);filterToBeApplied=(0,u.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,u.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function I(s,h,e="table.csv"){const n=(0,O.gJ)(s,h);(0,x.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,u.EW)(()=>this.showTagFilterCloud()||this.flipped());_rowSelection=(0,u.EW)(()=>this.selectable()?{mode:"multiRow",checkboxes:!0,headerCheckbox:!0,enableClickSelection:!1}:{mode:"singleRow",checkboxes:!1,enableClickSelection:!0});onSelectedRows(e){this.selectable()?this.selectionChanged.emit(e??[]):e?.[0]&&this.clickedDocument.emit(e[0])}whenTableDataKnown=(0,o.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,o.QZP)(()=>{const e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,o.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,o.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),a=n*Math.max(1,this.prefetchPages()),d=e.length,m=this.simpleStartIndex(),g=Math.min(d,m+n),r=this._simpleBufferedUntilIndex();let p=null;if(0===r?p=0:(m>=Math.max(0,r-n)||g>r)&&(p=r),null===p||p>=d)return;const _=Math.min(d,p+a),v=e.slice(p,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._simpleBufferedUntilIndex.set(Math.max(r,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,M.A)(function*(){n.clickedDocument.emit(e),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),d=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(n,d+i),g=this._tableBufferedUntilIndex();let r=null;if(0===g?r=0:(d>=Math.max(0,g-i)||m>g)&&(r=g),null===r||r>=n)return;const p=i*Math.max(1,this.prefetchPages()),_=Math.min(n,r+p),v=e.slice(r,_).map(f=>f.id).filter(f=>!this._requestedIds.has(f));this._tableBufferedUntilIndex.set(Math.max(g,_)),v.length&&(v.forEach(f=>this._requestedIds.add(f)),setTimeout(()=>this.handlers()?.requestData(v)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:g=>!g.data?.name&&g.data?.loading?"Loading...":g.data?.name||g.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:G.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const a={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:G.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(a.tooltipField="summary"),e?n.push(a):i.push(a),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:g=>Array.isArray(g.data?.pages)?g.data.pages.map(r=>r.page).join(", "):""});const d={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:g=>(0,K.b)(g.data?.size||0)};e?n.push(d):i.push(d);const m={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:g=>{const r=g.data?.categories||[],p=this._leafContentCategoryIris(),_=p?r.filter(f=>p.has(f)):r,v=_.slice(0,3).map(f=>this._getContentCategoryLabel(f)).join(", ");return _.length>3?`${v}...`:v}};e?n.push(m):i.push(m),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:X}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(a=>a.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(s=>{const h=s.split("#").pop()??s,e={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===e[h]&&console.log(`No pretty label for category: ${h}`),e[h]??h})(e)}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],size:[1,"size"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"],selectable:[1,"selectable"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen",selectionChanged:"selectionChanged",viewMarkdown:"viewMarkdown"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","viewMarkdown","paginationPageSize","size","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&t.nVh(0,de,4,2,"div",3)(1,De,10,3,"div",4),2&n&&t.vxM(i.simple()?0:1)},dependencies:[Z.FlexContainer,R,B.Button,P.ButtonLabel,ne.R,q.Card,J.T3,E.ButtonIcon,L.R,j.pL,ee.M,te.D,U.W,Y.A,ie.d,oe.Typography,C.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return s})()},4372(k,S,c){c.d(S,{M:()=>M});const M=l=>{const u=l.split("/");return u[u.length-1]}},2217(k,S,c){c.d(S,{o:()=>F});var M=c(7705),l=c(2271),u=c(2245),o=c(5547),x=c(5802);function O(D,T){if(1&D&&(x.qSk(),o.j41(0,"svg",0),o.nrm(1,"path",3)(2,"path",4),o.k0s()),2&D){const w=o.XpG();o.R7$(),o.BMQ("fill",w.colorDark()),o.R7$(),o.BMQ("fill",w.color())}}function I(D,T){if(1&D&&(x.qSk(),o.j41(0,"svg",1),o.nrm(1,"path",5)(2,"path",6)(3,"path",7),o.k0s()),2&D){const w=o.XpG();o.R7$(2),o.BMQ("fill",w.color())}}const t_blue="#175EBB",N={".dwg":t_blue,".dxf":t_blue,".doc":t_blue,".docx":t_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":t_blue,".pptx":t_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let F=(()=>{class D{suffix=M.hFB.required();size=(0,M.hFB)("m");color=(0,l.EW)(()=>N[this.suffix()]??"#9D9998");label=(0,l.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,l.EW)(()=>`size-${this.size()}`);colorDark=(0,l.EW)(()=>{const w=this.color(),b=parseInt(w.slice(1),16),R=b>>8&255,B=255&b;return`#${(Math.floor(.8*(b>>16&255))<<16|Math.floor(.8*R)<<8|Math.floor(.8*B)).toString(16).padStart(6,"0")}`});static \u0275fac=function(b){return new(b||D)};static \u0275cmp=o.VBU({type:D,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(b,y){2&b&&o.HbH(y.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(b,y){1&b&&(o.nVh(0,O,3,2,":svg:svg",0)(1,I,4,1,":svg:svg",1),o.j41(2,"cue-typography",2),o.EFF(3),o.k0s()),2&b&&(o.vxM("folder"===y.suffix()?0:1),o.R7$(3),o.JRh(y.label()))},dependencies:[u.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return D})()},1493(k,S,c){function M(l,u=!1,o=1){const x=u?1e3:1024;if(Math.abs(l)<x)return l+" B";const O=u?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let I=-1;const t=10**o;do{l/=x,++I}while(Math.round(Math.abs(l)*t)/t>=x&&I<O.length-1);return l.toFixed(o)+" "+O[I]}c.d(S,{b:()=>M})}}]);
|
package/366.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[366],{366(V,O,p){p.r(O),p.d(O,{debug_file:()=>j,default:()=>P,initSync:()=>N,scan:()=>R,scan_file_map:()=>k});var W=p(467);function j(n,e){const t=w(n,i.__wbindgen_malloc,i.__wbindgen_realloc);return i.debug_file(t,a,e)}function R(n){const e=i.scan(n);if(e[2])throw y(e[1]);return y(e[0])}function k(n){const e=i.scan_file_map(n);if(e[2])throw y(e[1]);return y(e[0])}function I(){return{__proto__:null,"./dir_scanner_wasm_bg.js":{__proto__:null,__wbg_Error_960c155d3d49e4c2:function(e,t){return Error(A(e,t))},__wbg_String_8564e559799eccda:function(e,t){const s=w(String(t),i.__wbindgen_malloc,i.__wbindgen_realloc),o=a;f().setInt32(e+4,o,!0),f().setInt32(e+0,s,!0)},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(e,t){const s=w(h(t),i.__wbindgen_malloc,i.__wbindgen_realloc),o=a;f().setInt32(e+4,o,!0),f().setInt32(e+0,s,!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(e,t){const s="string"==typeof t?t:void 0;var o=function F(n){return null==n}(s)?0:w(s,i.__wbindgen_malloc,i.__wbindgen_realloc),c=a;f().setInt32(e+4,c,!0),f().setInt32(e+0,o,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw new Error(A(e,t))},__wbg_get_6011fa3a58f61074:function(){return M(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_17f53dad852b9588:function(e,t){return e[t>>>0]},__wbg_length_3d4ecd04bd8d22f1:function(e){return e.length},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_log_7e1aa9064a1dbdbd:function(e){console.log(e)},__wbg_new_0c7403db6e782f19:function(e){return new Uint8Array(e)},__wbg_new_682678e2f47e32bc:function(){return new Array},__wbg_new_aa8d0fa9762c29bd:function(){return new Object},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,r){Uint8Array.prototype.set.call(function U(n,e){return n>>>=0,d().subarray(n/1,n/1+e)}(e,t),r)},__wbg_set_022bee52d0b05b19:function(){return M(function(e,t,r){return Reflect.set(e,t,r)},arguments)},__wbg_set_3bf1de9fab0cd644:function(e,t,r){e[t>>>0]=r},__wbg_set_6be42768c690e380:function(e,t,r){e[t]=r},__wbg_warn_3cc416af27dbdc02:function(e){console.warn(e)},__wbindgen_cast_0000000000000001:function(e){return e},__wbindgen_cast_0000000000000002:function(e,t){return A(e,t)},__wbindgen_cast_0000000000000003:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){const e=i.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function h(n){const e=typeof n;if("number"==e||"boolean"==e||null==n)return`${n}`;if("string"==e)return`"${n}"`;if("symbol"==e){const s=n.description;return null==s?"Symbol":`Symbol(${s})`}if("function"==e){const s=n.name;return"string"==typeof s&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(n)){const s=n.length;let o="[";s>0&&(o+=h(n[0]));for(let c=1;c<s;c++)o+=", "+h(n[c]);return o+="]",o}const t=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(!(t&&t.length>1))return toString.call(n);if(r=t[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}let u=null;function f(){return(null===u||!0===u.buffer.detached||void 0===u.buffer.detached&&u.buffer!==i.memory.buffer)&&(u=new DataView(i.memory.buffer)),u}function A(n,e){return function C(n,e){return x+=e,x>=B&&(m=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),m.decode(),x=e),m.decode(d().subarray(n,n+e))}(n>>>=0,e)}let b=null;function d(){return(null===b||0===b.byteLength)&&(b=new Uint8Array(i.memory.buffer)),b}function M(n,e){try{return n.apply(this,e)}catch(t){const r=function D(n){const e=i.__externref_table_alloc();return i.__wbindgen_externrefs.set(e,n),e}(t);i.__wbindgen_exn_store(r)}}function w(n,e,t){if(void 0===t){const _=l.encode(n),g=e(_.length,1)>>>0;return d().subarray(g,g+_.length).set(_),a=_.length,g}let r=n.length,s=e(r,1)>>>0;const o=d();let c=0;for(;c<r;c++){const _=n.charCodeAt(c);if(_>127)break;o[s+c]=_}if(c!==r){0!==c&&(n=n.slice(c)),s=t(s,r,r=c+3*n.length,1)>>>0;const _=d().subarray(s+c,s+r);c+=l.encodeInto(n,_).written,s=t(s,r,c,1)>>>0}return a=c,s}function y(n){const e=i.__wbindgen_externrefs.get(n);return i.__externref_table_dealloc(n),e}let m=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});m.decode();const B=2146435072;let x=0;const l=new TextEncoder;"encodeInto"in l||(l.encodeInto=function(n,e){const t=l.encode(n);return e.set(t),{read:n.length,written:t.length}});let L,i,a=0;function T(n,e){return i=n.exports,L=e,u=null,b=null,i.__wbindgen_start(),i}function S(){return(S=(0,W.A)(function*(n,e){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return yield WebAssembly.instantiateStreaming(n,e)}catch(s){if(!n.ok||!function t(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}(n.type)||"application/wasm"===n.headers.get("Content-Type"))throw s;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",s)}const r=yield n.arrayBuffer();return yield WebAssembly.instantiate(r,e)}{const r=yield WebAssembly.instantiate(n,e);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}})).apply(this,arguments)}function N(n){if(void 0!==i)return i;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module:n}=n):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const e=I();return n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n)),T(new WebAssembly.Instance(n,e),n)}function P(n){return E.apply(this,arguments)}function E(){return E=(0,W.A)(function*(n){if(void 0!==i)return i;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("dir_scanner_wasm_bg.wasm","file:///Users/manos/Documents/Work/Qaecy/code/ui-components/node_modules/@qaecy/cue-sdk/assets/wasm/dir_scanner_wasm.mjs"));const e=I();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:t,module:r}=yield function $(n,e){return S.apply(this,arguments)}(yield n,e);return T(t,r)}),E.apply(this,arguments)}}}]);
|