1import{a as Gr}from"./chunk-FMC3Q5QU.js";import{a as Ur}from"./chunk-63V6WJPZ.js";import"./chunk-IUUW2YBO.js";import{b as nr}from"./chunk-APH2V3J4.js";import{a as Cr}from"./chunk-IHIDYCCT.js";import{a as Sr,b as pn}from"./chunk-TKGY2R6C.js";import{a as wr}from"./chunk-C745X2SC.js";import{a as Rr}from"./chunk-D7M5NRWE.js";import"./chunk-3VVFTJSN.js";import{a as rn}from"./chunk-XYNWAY7T.js";import"./chunk-53DRKK27.js";import{d as Pr}from"./chunk-2LU5KCEW.js";import"./chunk-5FUP2WAQ.js";import{a as tn,c as rr,e as ar,f as sr,l as pr,m as on,n as mr}from"./chunk-ARGE2QLS.js";import"./chunk-ZORQQVZX.js";import"./chunk-RXUH5EFX.js";import"./chunk-QRT62Y37.js";import"./chunk-GFK7UREF.js";import"./chunk-SZBZ53QS.js";import{a as Or}from"./chunk-H7LPU4JI.js";import"./chunk-GFJB3BBE.js";import"./chunk-5IIAVAX2.js";import"./chunk-QSWEDOLH.js";import"./chunk-GX4SAXJV.js";import{a as ln}from"./chunk-UBMSNTNI.js";import{a as Vr}from"./chunk-JSKNW222.js";import{a as kr}from"./chunk-3O5PBSXI.js";import"./chunk-LXX4IFVD.js";import"./chunk-52CTBXHD.js";import{a as Fe}from"./chunk-WT72IDYJ.js";import{F as Nr,G as Ar,a as Ii,b as sn,c as Yn,d as Li,e as Zn,f as wi,h as yr,o as vr,t as br,x as Mr,z as kt}from"./chunk-FSMGANNP.js";import{h as Lr}from"./chunk-2GCGGU75.js";import{c as ni}from"./chunk-2SZTXQZ3.js";import{a as Br}from"./chunk-2O2TWZAP.js";import"./chunk-ICABYBHC.js";import{b as bt,c as _t,e as ft,l as oi,n as Er}from"./chunk-7XSHQ2JZ.js";import{a as Ir}from"./chunk-BDDSILMW.js";import{a as cn}from"./chunk-6BQ7O2GO.js";import{a as xr,b as Dr,c as Si}from"./chunk-II4S2DSJ.js";import{a as Tr}from"./chunk-RHKSWEWJ.js";import{a as Ci}from"./chunk-3F4GKTAY.js";import"./chunk-TE22THZE.js";import"./chunk-HAJVNCKC.js";import{a as ve,b as Be,c as me,g as xt,h as Fr,j as mn}from"./chunk-RM5FKR3W.js";import"./chunk-OG5JBOO2.js";import"./chunk-HKJYGZTV.js";import{a as or}from"./chunk-HDAQP5OA.js";import{a as ir}from"./chunk-RTUPBDGK.js";import{b as dr,c as ur,g as _r,h as Kn,i as fr,j as Fi,k as gr}from"./chunk-EO6G7JZP.js";import"./chunk-L7CSSELW.js";import{g as lr,i as cr}from"./chunk-IHBRULXZ.js";import{a as nn,b as ii}from"./chunk-ETRVFD3K.js";import{a as hr}from"./chunk-6EBTZJ2C.js";import"./chunk-OXVJUPH2.js";import"./chunk-NODD4QCF.js";import"./chunk-WRHLYV72.js";import"./chunk-WYHT5LVI.js";import"./chunk-KGW4SCA2.js";import{a as an}from"./chunk-OPZSNKHX.js";import"./chunk-6GVXSXVR.js";import"./chunk-XRI75B37.js";import{a as it}from"./chunk-3RANQNYM.js";import{c as Kt,g as Ji}from"./chunk-FBOJBCTO.js";import"./chunk-M7E5MMOE.js";import"./chunk-AXD322OJ.js";import"./chunk-7TMAO3B2.js";import{a as Y,b as nt,c as ot}from"./chunk-737SADXK.js";import{a as Xt,b as ei,c as Xi,d as en,e as ti}from"./chunk-YVHUP7FX.js";import{b as tr}from"./chunk-FGOVRAJM.js";import"./chunk-IDXDMLN2.js";import"./chunk-MPXKXNFL.js";import"./chunk-ATNV2VT2.js";import{a as ke}from"./chunk-XXU4FZ4Q.js";import"./chunk-XZ77C7GC.js";import{a as Re,b as he}from"./chunk-6NEZQN5R.js";import{$ as W,$a as P,$b as Mo,Ab as r,Aj as zi,Ba as Rt,Bh as Nt,Bi as Ke,Bj as Ki,Ch as qi,Cj as hi,Da as mi,Dh as Pe,Di as Ye,E as se,Ec as Oo,Eh as Wi,Ei as G,Ej as Zo,Fc as X,Fd as $i,Fe as H,Fj as Jo,G as ae,Gc as di,Gd as zt,Ge as Ve,Hc as Ro,Hh as Wo,Hi as Yt,Jd as Ao,Jg as pt,Ji as yt,Kb as Lt,Kc as Bo,Kd as ji,Kh as Ue,Ki as pe,Lh as Hi,Li as ge,M as J,Mb as C,Mj as Xo,Nb as T,Ob as M,Oh as Ho,Oi as rt,Ph as Qo,Ra as Fo,Rf as Go,Rg as Pt,Rh as zo,Sb as li,Sd as ie,Se as De,Sh as fi,Sj as er,Tb as ci,Tj as Zt,Ua as s,Ub as pi,Uc as Po,Ud as ue,Uf as Ie,Uj as tt,Vb as Lo,Vd as ko,Vf as be,Wb as wo,Wc as Te,Wf as Uo,Wg as $o,Xb as mt,Xf as Bt,Xh as Qi,Ya as g,Yb as le,Yg as _e,Yh as Ne,Zb as j,Zh as Ko,_ as Do,_b as To,a as F,aa as Ot,b as I,bh as jo,ca as D,cb as Io,db as re,dh as qo,dk as Jt,e as bo,ea as oe,eb as u,ec as l,eh as ut,ek as wt,fc as c,fk as Ee,gc as He,gk as Yi,hh as ee,hk as Ae,ia as B,ib as p,ie as R,ih as h,ik as At,jc as Ge,je as ne,jh as Se,kc as Ui,ke as dt,kh as ye,kj as Qe,l as si,la as V,le as We,lk as Zi,ma as k,mb as Di,mh as fe,mk as Oe,ne as Vo,o as qe,oh as ui,p as U,pc as zn,pi as Me,q as S,qc as Eo,rb as d,ri as Yo,s as xo,sa as _,sb as m,sh as _i,t as de,ta as f,tb as L,tj as vt,ub as y,v as O,vb as v,vj as xe,w as we,wb as Gi,xb as E,xe as ce,yc as Qt,yd as No,yi as gi,zb as w,zc as Z,ze as K,zj as et}from"./chunk-IVN2VXRW.js";var $r=(()=>{class i{constructor(e,t,n,o,x){this.router=e,this.documentLibrary=t,this.dialogService=n,this.transloco=o,this.store=x}ngOnInit(){let e=sessionStorage.getItem("AVDH_DocumentInfo"),t=sessionStorage.getItem("AVDH_SourceType");if(e){let n=JSON.parse(e);this.router.navigate([`document-library/${t}`,n.documentId],{queryParams:{documentName:n.documentName}}).finally(()=>this.store.dispatch(new be.AddSuccessPushNotification({title:"documentLibrary.certificationSuccess",description:n.documentName}))),sessionStorage.removeItem("AVDH_DocumentInfo"),sessionStorage.removeItem("AVDH_SourceType")}else{let n=sessionStorage.getItem("AVDH_DocumentsToCertify");if(n){let o=JSON.parse(n);this.router.navigate([`document-library/${t}`]).finally(()=>
1{if(this.showCertifiactionSuccesNotification(),o.length>0){let x=o[0];sessionStorage.setItem("AVDH_DocumentsToCertify",JSON.stringify(o.splice(1))),this.dialogService.openDialog(Tr,{title:this.transloco.translate("documentLibrary.certificationIsInProgress"),description:this.transloco.translate("finances.pleaseDoNotNavigate")},{width:"512px"}),this.certifyDocument(x)}else sessionStorage.removeItem("AVDH_DocumentsToCertify"),sessionStorage.removeItem("AVDH_SourceType")})}}}certifyDocument(e){this.documentLibrary.signDocumentWithAvdh(e).pipe(J(1),D(t=>{t.avdhKauLoginRequestUrl&&this.navigateToUrl(t.avdhKauLoginRequestUrl)})).subscribe()}navigateToUrl(e){window.location.href=e}showCertifiactionSuccesNotification(){let e=sessionStorage.getItem("AVDH_DocumentNames");if(e){let t=JSON.parse(e),n=t[0];t.length>1?sessionStorage.setItem("AVDH_DocumentNames",JSON.stringify(t.splice(1))):sessionStorage.removeItem("AVDH_DocumentNames"),this.store.dispatch(new be.AddSuccessPushNotification({title:"documentLibrary.certificationSuccess",description:n}))}}static{this.\u0275fac=function(t){return new(t||i)(g(ue),g(ve),g(Oe),g(ce),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["ng-component"]],decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})}}return i})();var Pa=i=>({count:i}),Na=()=>({dateStyle:"long",timeStyle:"short"}),Aa=(i,a)=>[i,a];function ka(i,a){if(i&1){let e=E();d(0,"neptun-dashboard-tile",10),w("buttonClicked",function(){_(e);let n=r(3);return f(n.openUploadModeDialog())}),m()}if(i&2){let e=r(2).$implicit,t=r();p("icon",t.fileUploadIcon)("title",e("documentLibrary.documentUpload"))("description",e("documentLibrary.documentLibraryDashboardDescription"))("buttonText",e("fileUpload.upload"))("buttonHide",!1)("permission",t.uploadPermission)}}function Va(i,a){if(i&1&&L(0,"neptun-navigation-button",13),i&2){let e=a.$implicit;p("link",e)}}function Ga(i,a){if(i&1&&(d(0,"div",11),u(1,Va,1,1,"neptun-navigation-button",12),m()),i&2){let e=r().ngIf;s(),p("ngForOf",e.navButtonLinks)}}function Ua(i,a){if(i&1&&L(0,"neptun-data-list-item",20),i&2){let e=a.$implicit,t=a.index;p("id","certifiable-document"+t)("item",e)}}function $a(i,a){if(i&1){let e=E();d(0,"neptun-dashboard-list-card",18),w("linkClicked",function(){_(e);let n=r(5);return f(n.navigateToDocuments())}),u(1,Ua,1,2,"neptun-data-list-item",19),m()}if(i&2){let e=r(3).ngIf,t=r().$implicit;p("title",t("documentLibrary.toBeCertified"))("description",t("documentLibrary.documentsWaitingForStudentCertification"))("linkText",t("onlineOccasions.viewAll",To(4,Pa,e.documentDashboardData.trDocumentsThatShouldBeESignedCount))),s(),p("ngForOf",e.documentDashboardData.trDocumentsThatShouldBeESigned)}}function ja(i,a){if(i&1){let e=E();d(0,"div",23),w("click",function(){let n=_(e).$implicit,o=r(6);return f(o.download(n.id))}),L(1,"i",24),d(2,"div")(3,"div",25),C(4),m(),L(5,"neptun-string-list",26),l(6,"translocoDate"),m()()}if(i&2){let e=a.$implicit,t=a.index;p("id","latest-upload-"+t),s(4),M(" ",e.name," "),s(),p("text",Mo(7,Aa,e.type,He(6,3,e.uploadDate,j(6,Na))))}}function qa(i,a){if(i&1&&(d(0,"neptun-dashboard-list-card",21),y(1),u(2,ja,7,10,"div",22),v(),m()),i&2){let e=r(3).ngIf,t=r().$implicit;p("description",t("documentLibrary.recentlyUploadedList"))("title",t("documentLibrary.newest")),s(2),p("ngForOf",e.documentDashboardData.latestDocuments)}}function Wa(i,a){if(i&1&&(d(0,"div",15),u(1,$a,2,6,"neptun-dashboard-list-card",16)(2,qa,3,3,"neptun-dashboard-list-card",17),m()),i&2){let e=r(2).ngIf;s(),p("ngIf",e.documentDashboardData.trDocumentsThatShouldBeESignedCount),s(),p("ngIf",e.documentDashboardData.latestDocuments==null?null:e.documentDashboardData.latestDocuments.length)}}function Ha(i,a){i&1&&(d(0,"div",27),L(1,"img",28),l(2,"assetUrl"),m()),i&2&&(s(),p("src",c(2,1,"assets/images/no-documents.svg"),Fo))}function Qa(i,a){if(i&1&&u(0,Wa,3,2,"div",14)(1,Ha,3,3,"ng-template",null,1,Ge),i&2){let e=Lt(2),t=r().ngIf;p("ngIf",(t.documentDashboardData.latestDocuments==null?null:t.documentDashboardData.latestDocuments.length)||t.documentDashboardData.trDocumentsThatShouldBeESignedCount)("ngIfElse",e)}}function za(i,a){if(i&1&&(y(0),d(1,"div",5),u(2,ka,1,6,"neptun-dashboard-tile",6),y(3),d(4,"neptun-basic-layout",7),u(5,Ga,2,1,"ng-template",8)(6,Qa,3,2,"ng-template",9),m(),v(),m(),v()),i&2){let e=a.ngIf;s(2),p("ngIf",e.atLeastOnePermissionToUpload),s(2),p("reverse",!0)}}function Ka(i,a){i&1&&L(0,"neptun-dashboard-placeholder")}function Ya(i,a){if(i&1&&(y(0),L(1,"neptun-primary-title",3),u(2,za,7,2,"ng-container",4),l(3,"async"),u(4,Ka,1,0,"ng-template",null,0,Ge),v()),i&2){let e=a.$implicit,t=Lt(5),n=r();s(),p("title",e("menu.documentLibrary.subMenu")),s(),p("ngIf",c(3,3,n.vm$))("ngIfElse",t)}}var jr=(()=>{class i{constructor(e,t,n,o,x,b,z,$){this.router=e,this.activatedRoute=t,this.transloco=n,this.documentLibrary=o,this.dialog=x,this.fileService=b,this.documentLibraryService=z,this.dateLocalizationService=$,this.fileUploadIcon=H.FileUpload,this.chevronIcon=H.ChevronRight,this.requiredPermissionForGeneralUpload={controllerName:"DocumentContainer",actionName:"SaveFileDetails"}
1,this.requiredPermissionForCommunitySpaceUpload={controllerName:"DocumentContainer",actionName:"SaveFilesToContainer"},this.uploadPermission={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_UploadButton},this.navButtonLinks=[{text:this.transloco.translate("menu.documentLibrary.generalDocument"),subTitle:this.transloco.translate("documentLibrary.generalDocumentDescription"),icon:H.Frame,permission:this.requiredPermissionForGeneralUpload,callback:()=>{this.router.navigate(["document-library/standalone-upload"])}},{text:this.transloco.translate("menu.documentLibrary.relatedToCommunitySpace"),subTitle:this.transloco.translate("documentLibrary.relatedToCommunitySpaceDescription"),icon:H.IFrame,permission:this.requiredPermissionForCommunitySpaceUpload,callback:()=>{this.router.navigate(["document-library/group-related-upload"])}}],this.documentDashboardData$=this.documentLibrary.getDocumentsDashboard(),this.navButtonLinks$=this.documentDashboardData$.pipe(O(Q=>[{text:this.transloco.translate("menu.documentLibrary.trDocuments"),subTitle:this.transloco.translate("documentLibrary.trDescription"),icon:H.FilePlus,callback:()=>this.router.navigate(["document-library/tr-documents"]),badgeData:Q.trDocumentsCount},{text:this.transloco.translate("menu.documentLibrary.documentsForMe"),subTitle:this.transloco.translate("documentLibrary.documentsForMeDescription"),icon:H.FileUpload,callback:()=>this.router.navigate(["document-library/documents-for-me"]),badgeData:Q.documentsUploadedForStudentCount},{text:this.transloco.translate("documentLibrary.myUploadedDocuments"),subTitle:this.transloco.translate("documentLibrary.myUploadedDocumentsDescription"),icon:H.File,callback:()=>this.router.navigate(["document-library/uploaded-by-me"]),badgeData:Q.documentsUploadedByStudentCount},{text:this.transloco.translate("menu.documentLibrary.myFoldersToShare"),subTitle:this.transloco.translate("documentLibrary.myFoldersToShareDescription"),icon:H.Folder,callback:()=>this.router.navigate(["document-library/my-folders"]),badgeData:Q.shareableDocumentsCount},{text:this.transloco.translate("menu.documentLibrary.foldersSharedWithMe"),subTitle:this.transloco.translate("documentLibrary.foldersSharedWithMeDescription"),icon:H.FolderArrow,callback:()=>this.router.navigate(["document-library/recommended-folders"]),badgeData:Q.documentsSharedWithStudentCount}])),this.vm$=we([this.navButtonLinks$,this.documentDashboardData$]).pipe(O(([Q,Ce])=>({navButtonLinks:Q,documentDashboardData:I(F({},Ce),{trDocumentsThatShouldBeESigned:Ce.trDocumentsThatShouldBeESigned.length?Ce.trDocumentsThatShouldBeESigned.map(Je=>({primary:Je.fileName,secondaryLeft:[Je.documentationTypeName,this.dateLocalizationService.localizeDate(Je.creationDate,void 0,{dateStyle:"long",timeStyle:"short"})],icon:H.AlertTriangle,iconColor:Ie.Error,action:()=>this.navigateToTrDocumentDetails(Je),backgroundColor:Ie.WarningLightBg})):[]}),atLeastOnePermissionToUpload:!!this.navButtonLinks.length})))}openUploadModeDialog(){let e={title:this.transloco.translate("documentLibrary.selectUploadType"),componentData:this.navButtonLinks,component:Br,actions:[{type:"link",text:this.transloco.translate("button.cancel"),returnValue:!1}]};this.dialog.openGeneralDialog(e)}download(e){this.documentLibraryService.downloadDocumentationOrZip(e).pipe(D(t=>this.fileService.downloadFile(t)),ae(t=>t instanceof Po?this.fileService.readErrorFromBlob(t):de(()=>t))).subscribe()}navigateToDocuments(){this.router.navigate(["tr-documents"],{relativeTo:this.activatedRoute,queryParams:{mustBeCertified:!0}})}navigateToTrDocumentDetails(e){this.router.navigate(["tr-documents",e.documentationId],{queryParams:{documentName:e.fileName},relativeTo:this.activatedRoute})}static{this.\u0275fac=function(t){return new(t||i)(g(ue),g(ie),g(ce),g(ve),g(Oe),g(ke),g(ve),g(Xo))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-document-library"]],decls:1,vars:0,consts:[["loading",""],["noData",""],[4,"transloco"],[3,"title"],[4,"ngIf","ngIfElse"],[1,"neptun-wrapper"],["class","dashboard-tile","id","document-upload","iconColor","tertiary",3,"icon","title","description","buttonText","buttonHide","permission","buttonClicked",4,"ngIf"],[3,"reverse"],["neptunBasicLayoutLeftContent",""],["neptunBasicLayoutRightContent",""],["id","document-upload","iconColor","tertiary",1,"dashboard-tile",3,"buttonClicked","icon","title","description","buttonText","buttonHide","permission"],[1,"links"],["class","navigation-button",3,"link",4,"ngFor","ngForOf"],[1,"navigation-button",3,"link"],["class","list-card__wrapper",4,"ngIf","ngIfElse"],[1,"list-card__wrapper"],["class","list-item","id","certifiable-documents",3,"title","description","linkText","linkClicked",4,"ngIf"],["id","latest-documents","class","latest-uploads-container",3,"description","title",4,"ngIf"],["id","certifiable-documents",1,"list-item",3,"linkClicked","title","description","linkText"],["class","list__item",3,"id","item",4,"ngFor","ngForTrackByIndex","ngForOf"],[1,"list__item",3,"id","item"],["id","latest-documents",1,"latest-uploads-container",3,"description","title"],["class","latest-upload","focusElement","","focusElementType","general",3,"id","click",4,"ngFor","ngForOf"],["focusElement","","focusElementType","general",1,"latest-upload",3,"click","id"],[1,"latest-upload__icon","icon-file","primary"],[1,"latest-upload__title"],[1,"latest-upload__desc",3,"text"],[1,"flex-center-start"],[3,"src"]],template:function(t,n){t&1&&u(0,Ya,6,5,"ng-container",2)},dependencies:[K,xe,Z,Lr,ft,bt,Qt,Ji,_t,Or,gi,or,jo,Yo,wr,X,ut,Uo],styles:["neptun-navigation-button[_ngcontent-%COMP%]{margin-bottom:24px;max-width:400px;width:100%}neptun-navigation-button[_ngcontent-%COMP%]:last-child{margin-bottom:0}.list-card__wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.latest-upload[_ngcontent-%COMP%]{display:flex;cursor:pointer;align-items:center;gap:16px;padding:8px 12px 8px 16px;margin:2px}.latest-upload[_ngcontent-%COMP%] + .request-item[_ngcontent-%COMP%]{margin-top:8px}.latest-upload[_ngcontent-%COMP%]:hover{background:#f2f3fb;border-radius:8px}.latest-upload__title[_ngcontent-%COMP%]{max-width:300px;font-weight:800;color:#213055}.latest-upload__desc[_ngcontent-%COMP%]{font-size:13px}.latest-uploads-container[_ngcontent-%COMP%]{display:block;margin-bottom:16px}.latest-upload__icon[_ngcontent-%COMP%]{font-size:22px}.flex-center-start[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start}@media only screen and (max-width:767px){neptun-navigation-button[_ngcontent-%COMP%]{max-width:100%}.links[_ngcontent-%COMP%]{padding-top:16px;background-color:#f2f3fb;display:block;width:100%}.latest-upload[_ngcontent-%COMP%]{padding-left:0}}"]})}}return i})();var je=(function(i){return i[i.Thesis=0]="Thesis",i[i.DataModification_Entity=1]="DataModification_Entity",i[i.Datamodification_Field=2]="Datamodification_Field",i[i.StudentCard=3]="StudentCard",i[i.Task=4]="Task",i[i.Request=5]="Request",i[i.VirtualSpace=6]="VirtualSpace",i[i.Practice_Outer=7]="Practice_Outer",i[i.Publication=8]="Publication",i[i.Thesis_Topic_Signin=9]="Thesis_Topic_Signin",i[i.Practice=10]="Practice",i[i.Message=11]="Message",i[i.Unknown=12]="Unknown",i})(je||{});var st=(()=>{class i{constructor(e,t,n,o,x,b){this.transloco=e,this.dialogService=t,this.httpClient=n,this.router=o,this.route=x,this.store=b}certifyDocument(e,t,n){let o={isOpenedFromDetails:!0,certifiableDocuments:[{id:e,name:t,selected:!0,status:[]}],notCertifiableDocuments:[],sourceType:n};this.dialogService.openDialog(Ii,{avdhCertificationData:o})}
1certifyDocuments(e,t,n){let o={isOpenedFromDetails:!1,certifiableDocuments:e,notCertifiableDocuments:t,sourceType:n};this.dialogService.openDialog(Ii,{avdhCertificationData:o})}deleteDocument(e,t){this.dialogService.openConfirmActionDialog(this.deleteDocumentDialogData([e],()=>this.deleteDocumentsCallback([e],()=>{t(),this.router.navigate([".."],{relativeTo:this.route})})))}deleteDocuments(e,t){this.dialogService.openConfirmActionDialog(this.deleteDocumentDialogData(e,()=>this.deleteDocumentsCallback(e,t)))}deleteDocumentsRequest(e){return this.httpClient.post(`${De.settings.apiServer.url}DocumentContainer/DeleteFilesFromDocumentContainer`,{documentationIds:e})}navigateToConnection(e,t,n){[je.Task,je.Request,je.Practice_Outer,je.StudentCard,je.Thesis,je.Thesis_Topic_Signin,je.Practice].includes(t.connectionTypeEnum)&&n!==t.studentTrainingId?this.openNavigationDialog(t,e):this.navigateToConnectionDetails(t.connectionTypeEnum,t.connectionString,t.connectionId)}openNavigationDialog(e,t){return this.dialogService.openConfirmActionDialog(this.getConnectionNavigationDialogData(e,t))}getConnectionNavigationDialogData(e,t){let n=t.find(o=>o.studentTrainingId===e.studentTrainingId)?.trainingName;return{title:this.transloco.translate("calendar.changeToOtherTraining"),subTitle:n,body:this.transloco.translate("documentLibrary.changeTrainingDescription"),actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"primary",text:this.transloco.translate("button.change"),returnValue:!0,webRequestCallback:()=>this.store.dispatch(new $o.ChangeTraining(e.studentTrainingId)).pipe(D(()=>{this.navigateToConnectionDetails(e.connectionTypeEnum,e.connectionString,e.connectionId)}))})]}}navigateToConnectionDetails(e,t,n){switch(e){case je.Thesis:{this.router.navigate(["under-development"]);break}case je.DataModification_Entity:{this.router.navigate([`user-data/modification-history/${n}`],{queryParams:{title:t,"tab-personal-data":Rr.ChangeHistory,tab:this.transloco.translate("menu.changeHistory")}});break}case je.Datamodification_Field:{this.router.navigate([`user-data/modification-history/${n}`],{queryParams:{title:t}});break}case je.StudentCard:{this.router.navigate([`administrations/student-card/${n}`],{queryParams:{nekId:t}});break}case je.Task:{this.router.navigate([`subjects/tasks/future/${n}`],{queryParams:{taskName:t}});break}case je.Request:{this.router.navigate([`administrations/request-forms/submitted/${n}`],{queryParams:{requestForm:t}});break}case je.VirtualSpace:{this.router.navigate(["under-development"]);break}case je.Practice_Outer:{this.router.navigate(["under-development"]);break}case je.Publication:{this.router.navigate([`informations/publications/${n}`],{queryParams:{publicationTitle:t}});break}case je.Thesis_Topic_Signin:{this.router.navigate(["under-development"]);break}case je.Practice:{this.router.navigate([`studies/internship/${n}/`],{queryParams:{practiceName:t,tab:this.transloco.translate("menu.internships")}});break}case je.Message:{this.router.navigate(["under-development"]);break}case je.Unknown:{this.router.navigate(["under-development"]);break}default:break}}deleteDocumentDialogData(e,t){return{title:this.transloco.translate(e.length>pt.ONE?"fileUpload.deleteDocumentsQuestion":"fileUpload.deleteDocumentQuestion"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,webRequestCallback:()=>t()})]}}deleteDocumentsCallback(e,t){return this.deleteDocumentsRequest(e).pipe(D(n=>{n.notification.some(o=>o.type===hr.Info)&&t()}))}static{this.\u0275fac=function(t){return new(t||i)(V(ce),V(Oe),V(Te),V(ue),V(ie),V(R))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Ze="[DocumentLibrary]",ze={SaveMyShareableFoldersUserConnectionDetails:`${Ze} Save my shareable folders user connection details`,ResetMyShareableFoldersUserConnectionDetails:`${Ze} Reset my shareable folders user connection details`,SaveMyShareableFoldersVirtualSpacesList:`${Ze} Save my shareable folders virtual spaces list`,ResetMyShareableFoldersVirtualSpacesList:`${Ze} Reset my shareable folders virtual spaces list`,SaveUploadedByStudentList:`${Ze} Save uploaded by student list`,ResetUploadedByStudentList:`${Ze} Reset uploaded by student list`,SaveUploadedFromOthersList:`${Ze} Save uploaded from others list`,ResetUploadedFromOthersList:`${Ze} Reset uploaded from others list`,RefreshUploadedByStudentList:`${Ze} Refresh uploaded by student list`,SaveTrDocumentsList:`${Ze} Save tr documents list`,ResetTrDocumentst:`${Ze} Reset tr documents list`,SaveFoldersSharedWithMeList:`${Ze} Save folders shared with me list`,ResetFoldersSharedWithMe:`${Ze} Reset folders shared with me list`,SaveMyFoldersList:`${Ze} Save my folders list`,ResetMyFoldersList:`${Ze} Reset my folders list`,RefreshMyForldersListState:`${Ze} Refresh my folders list`,SaveMyFoldersDetailsList:`${Ze} Save my folders details list`,ResetMyFoldersDetailsList:`${Ze} Reset my folders details list`,ResetMyFoldersDetailsEntities:`${Ze} Reset my folders details entities`};var A;(function(i){class a{static{this.type=ze.SaveMyShareableFoldersUserConnectionDetail
1s}constructor(ct){this.listState=ct}}i.SaveMyShareableFoldersUserConnectionDetails=a;class e{static{this.type=ze.ResetMyShareableFoldersUserConnectionDetails}}i.ResetMyShareableFoldersUserConnectionDetails=e;class t{static{this.type=ze.SaveMyShareableFoldersVirtualSpacesList}constructor(ct){this.listState=ct}}i.SaveMyShareableFoldersVirtualSpacesList=t;class n{static{this.type=ze.ResetMyShareableFoldersVirtualSpacesList}}i.ResetMyShareableFoldersVirtualSpacesList=n;class o{static{this.type=ze.SaveUploadedByStudentList}constructor(ct){this.listState=ct}}i.SaveUploadedByStudentList=o;class x{static{this.type=ze.ResetUploadedByStudentList}}i.ResetUploadedByStudentList=x;class b{static{this.type=ze.RefreshUploadedByStudentList}}i.RefreshUploadedByStudentList=b;class z{static{this.type=ze.SaveUploadedFromOthersList}constructor(ct){this.listState=ct}}i.SaveUploadedFromOthersList=z;class ${static{this.type=ze.ResetUploadedFromOthersList}}i.ResetUploadedFromOthersList=$;class Q{static{this.type=ze.SaveTrDocumentsList}constructor(ct){this.listState=ct}}i.SaveTrDocumentsListState=Q;class Ce{static{this.type=ze.ResetTrDocumentst}}i.ResetTrDocumentsListState=Ce;class Je{static{this.type=ze.SaveFoldersSharedWithMeList}constructor(ct){this.listState=ct}}i.SaveFoldersSharedWithMeListState=Je;class lt{static{this.type=ze.ResetFoldersSharedWithMe}}i.ResetFoldersSharedWithMeListState=lt;class xi{static{this.type=ze.SaveMyFoldersList}constructor(ct){this.listState=ct}}i.SaveMyFoldersListState=xi;class Vi{static{this.type=ze.ResetMyFoldersList}}i.ResetMyFoldersListState=Vi;class Qn{static{this.type=ze.RefreshMyForldersListState}}i.RefreshMyForldersListState=Qn;class Oa{static{this.type=ze.SaveMyFoldersDetailsList}constructor(ct){this.listState=ct}}i.SaveMyFoldersDetailsListState=Oa;class Ra{static{this.type=ze.ResetMyFoldersDetailsList}}i.ResetMyFoldersDetailsListState=Ra;class Ba{static{this.type=ze.ResetMyFoldersDetailsEntities}}i.ResetMyFoldersDetailsEntities=Ba})(A||(A={}));var dn=(()=>{class i extends Jt{constructor(e,t,n,o,x){super({details:h,isFileDownloading:h}),this.dataFetcherService=e,this.documentLibraryService=t,this.documentLibraryFacade=n,this.store=o,this.fileService=x,this.details$=this.select(b=>b.details),this.isFileDownloading$=this.select(b=>b.isFileDownloading).pipe(O(b=>Yt(b))),this.trainings$=this.store.select(_i.trainings),this.currentTrainingId$=this.store.select(_i.currentTrainingId),this.addDetails=this.updater((b,z)=>I(F({},b),{details:z})),this.getDetails=this.effect(b=>b.pipe(D(()=>this.addDetails(Se)),W(z=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetDocumentUploadedByStudentDetails",{documentationId:z}).pipe(D($=>{this.addDetails(fe($))}),ae($=>(this.addDetails(ye),de(()=>$))))))),this.setIsFileDownloading=this.updater((b,z)=>I(F({},b),{isFileDownloading:z})),this.downloadFile=this.effect(b=>b.pipe(D(()=>this.setIsFileDownloading(Se)),W(z=>this.documentLibraryService.downloadDocumentationOrZip(z).pipe(D($=>{this.setIsFileDownloading(ui),this.fileService.downloadFile($)}),ae($=>(this.setIsFileDownloading(ye),de(()=>$))))))),this.deleteDocument=this.effect(b=>b.pipe(D(z=>this.documentLibraryFacade.deleteDocument(z,()=>{this.store.dispatch(new A.RefreshUploadedByStudentList)})))),this.navigateToConnection=this.effect(b=>b.pipe(oe(this.details$,this.trainings$.pipe(se(Boolean)),this.currentTrainingId$.pipe(se(Boolean))),D(([,z,$,Q])=>{ee(z)&&this.documentLibraryFacade.navigateToConnection($,z.data,Q)}))),this.certifyDocument=this.effect(b=>b.pipe(oe(this.details$),D(([z,$])=>{ee($)&&this.documentLibraryFacade.certifyDocument(z,$.data.name,"uploaded-by-me")})))}static{this.\u0275fac=function(t){return new(t||i)(V(Pt),V(ve),V(st),V(R),V(ke))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Ja=()=>({dateStyle:"long"}),Xn=()=>({dateStyle:"long",timeStyle:"short"}),Xa=()=>({fontSize:"16px",iconClass:"icon-chevron-right"});function es(i,a){if(i&1&&(d(0,"div",11)(1,"neptun-callout-box",12),C(2),m()()),i&2){let e=r(3).$implicit,t=r();s(),p("id","certification-unsuccessful-notification")("icon",t.Icons.AlertTriangle),s(),M("",e("roomSchedule.certificationUnsuccessfulNotification")," ")}}function ts(i,a){if(i&1){let e=E();d(0,"button",13),w("click",function(){_(e);let n=r(4);return f(n.certifyDocument())}),C(1),m()}if(i&2){let e=r(2).ngIf,t=r().$implicit,n=r();p("disabled",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesites_folyamatban)("accent","stroked")("permissionRequired",n.certifyDocumentPermission),s(),M(" ",t("documentLibrary.certify")," ")}}function is(i,a){if(i&1){let e=E();d(0,"button",14),w("click",function(){_(e);let n=r(4);return f(n.deleteDocument())}),C(1),m()}if(i&2){let e=r(2).ngIf,t=r().$implicit,n=r();p("accent","stroked")("color","error")("disabled",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesites_folyamatban)("permissionRequired",n.deleteFilesFromDocumentContainer),s(),M(" ",t("button.delete")," ")}}function ns(i,a){if(i&1&&(d(0,"neptun-card",16)(1,"div",17)(2,"p"),C(3),m(),d(4,"h4"),C(5),l(6,"hyphen"),m()(),d(7,"div",17)(8,"p"),C(9),m(),d(10,"h4"),C(11),l(12,"translocoDate"),l(13,"hyphen"),m()()()),i&2){let e=r(3).ngIf,t=r().$implicit;s(3),M("",t("global.status"),":"),s(2),T(c(6,4,e.data.status)),s(4),M("",t("requestForm.validity"),":"),s(2),T(c(13,9,He(12,6,e.data.acceptedTo,j(11,Ja))))}}function os(i,a){if(i&1&&u(0,ns,14,12,"neptun-card",15),i&2){let e=r(2).ngIf;p("ngIf",e.data.status)}}function rs(i,a){if(i&1){let e=E();y(0),d(1,"button",19),w("click",function(){_(e);let n=r(5);return f(n.navigateToConnection())}),C(2),l(3,"hyphen"),m(),v()}if(i&2){let e=r(3).ngIf;
1s(),p("color","primary")("hasLeftOffset",!0)("postfixIcon",j(6,Xa)),s(),M("",c(3,4,e.data.connectionString)," ")}}function as(i,a){if(i&1&&(y(0),L(1,"i"),C(2),v()),i&2){let e=r(5).$implicit,t=r();s(),Di("",t.Icons.ShieldOk," success status-icon"),s(),M(" ",e("documentLibrary.certificationSuccessful")," ")}}function ss(i,a){if(i&1&&(y(0),L(1,"i"),C(2),v()),i&2){let e=r(5).$implicit,t=r();s(),Di("",t.Icons.ShieldNo," error status-icon"),s(),M(" ",e("documentLibrary.unsuccessfulCertification")," ")}}function ls(i,a){if(i&1&&(y(0),L(1,"i"),C(2),v()),i&2){let e=r(5).$implicit,t=r();s(),Di("",t.Icons.Shield," in-progress status-icon"),s(),M(" ",e("documentLibrary.certificationIsInProgress")," ")}}function cs(i,a){if(i&1&&(y(0),L(1,"i"),C(2),v()),i&2){let e=r(5).$implicit,t=r();s(),Di("",t.Icons.Shield," can-be-certified status-icon"),s(),M(" ",e("documentLibrary.canBeCertified")," ")}}function ps(i,a){if(i&1&&(d(0,"div",18)(1,"dt"),C(2),m(),d(3,"dd"),C(4),l(5,"translocoDate"),l(6,"hyphen"),m()()),i&2){let e=r(4).ngIf,t=r().$implicit;s(2),T(t("documentLibrary.dateOfCertification")),s(2),T(c(6,5,He(5,2,e.data.certificationDate,j(7,Xn))))}}function ms(i,a){if(i&1&&(y(0),d(1,"div"),C(2),l(3,"translocoDate"),m(),v()),i&2){let e=a.$implicit;s(2),M(" ",He(3,1,e,j(4,Xn))," ")}}function ds(i,a){if(i&1&&(d(0,"div",18)(1,"dt"),C(2),m(),d(3,"dd",24),u(4,ms,4,5,"ng-container",25),m()()),i&2){let e=r(4).ngIf,t=r().$implicit;s(2),T(t("documentLibrary.dateOfSubmissions")),s(2),p("ngForOf",e.data.certificationRequestedOn)}}function us(i,a){if(i&1&&(y(0),L(1,"div",20),d(2,"h3",21),C(3),m(),d(4,"neptun-data-view")(5,"dl")(6,"div",18)(7,"dt"),C(8),m(),d(9,"div",22),u(10,as,3,4,"ng-container",1)(11,ss,3,4,"ng-container",1)(12,ls,3,4,"ng-container",1)(13,cs,3,4,"ng-container",1),m()(),u(14,ps,7,8,"div",23)(15,ds,5,2,"div",23),m()(),v()),i&2){let e=r(3).ngIf,t=r().$implicit,n=r();s(3),T(t("documentLibrary.avdhCertificationDetails")),s(5),T(t("firData.certificates.diplomasAwarded.state")),s(2),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesitve),s(),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Ujra_bekuldheto),s(),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesites_folyamatban),s(),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesitheto),s(),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesitheto||e.data.certificationDate),s(),p("ngIf",!!e.data.certificationRequestedOn.length)}}function _s(i,a){if(i&1&&(d(0,"neptun-data-view")(1,"dl")(2,"div",18)(3,"dt"),C(4),m(),d(5,"dd"),C(6),l(7,"hyphen"),m()(),d(8,"div",18)(9,"dt"),C(10),m(),d(11,"dd"),C(12),l(13,"hyphen"),m()(),d(14,"div",18)(15,"dt"),C(16),m(),d(17,"dd"),C(18),l(19,"translocoDate"),l(20,"hyphen"),m()(),d(21,"div",18)(22,"dt"),C(23),m(),d(24,"dd"),C(25),l(26,"hyphen"),m()(),d(27,"div",18)(28,"dt"),C(29),m(),d(30,"dd"),u(31,rs,4,7,"ng-container",1),m()(),d(32,"div",18)(33,"dt"),C(34),m(),d(35,"dd"),C(36),l(37,"hyphen"),m()(),d(38,"div",18)(39,"dt"),C(40),m(),d(41,"dd"),C(42),l(43,"hyphen"),m()()()(),u(44,us,16,8,"ng-container",1)),i&2){let e=r(2).ngIf,t=r().$implicit,n=r();s(4),T(t("global.type")),s(2),M(" ",c(7,15,e.data.documentationType)," "),s(4),T(t("global.language")),s(2),M(" ",c(13,17,e.data.language)," "),s(4),T(t("documentLibrary.uploadedAt")),s(2),M(" ",c(20,22,He(19,19,e.data.uploadDate,j(30,Xn)))," "),s(5),T(t("documentLibrary.typeOfConnection")),s(2),M(" ",c(26,24,e.data.connectionType)," "),s(4),T(t("documentLibrary.connection")),s(2),p("ngIf",e.data.connectionId),s(3),T(t("documentLibrary.registrationNumber")),s(2),M(" ",c(37,26,e.data.registrationNumber)," "),s(4),T(t("global.description")),s(2),M(" ",c(43,28,e.data.description)," "),s(2),p("ngIf",e.data.certificationStatus!==n.AVDHCertificationStatusEnum.Nem_hitelesitheto&&e.data.certificationStatus!==n.AVDHCertificationStatusEnum.DefaultValueConstant)}}function fs(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",2),u(2,es,3,3,"div",3),d(3,"div",4)(4,"button",5),l(5,"async"),w("click",function(){_(e);let n=r(3);return f(n.downloadDocument())}),C(6),m(),u(7,ts,2,4,"button",6)(8,is,2,5,"button",7),m(),d(9,"div",8)(10,"neptun-basic-layout"),u(11,os,1,1,"ng-template",9)(12,_s,45,31,"ng-template",10),m()(),v()}if(i&2){let e=r().ngIf,t=r().$implicit,n=r();s(),p("title",e.data.name),s(),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Ujra_bekuldheto),s(2),p("disabled",c(5,8,n.isFileDownloading$)===!0)("accent","flat")("permissionRequired",n.downloadDocumentUploadedByUserDownload),s(2),M(" ",t("button.download")," "),s(),p("ngIf",e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesitheto||e.data.certificationStatus===n.AVDHCertificationStatusEnum.Ujra_bekuldheto||e.data.certificationStatus===n.AVDHCertificationStatusEnum.Hitelesites_folyamatban),s(),p("ngIf",e.data.isDeletable)}}function gs(i,a){i&1&&(y(0),L(1,"neptun-request-error-indicator",26),v())}function hs(i,a){i&1&&(y(0),d(1,"div",27),L(2,"neptun-details-loading-placeholder",28),m(),v()),i&2&&(s(2),p("hasButton",!0))}function Cs(i,a){if(i&1&&(y(0),u(1,fs,13,10,"ng-container",1),l(2,"isResultRequest"),u(3,gs,2,0,"ng-container",1),l(4,"hasError"),u(5,hs,3,1,"ng-container",1),l(6,"isLoadingRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function Ss(i,a){if(i&1&&(y(0),u(1,Cs,7,9,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.details$))}}var Wr=(()=>{class i{constructor(e,t){this.uplodedByMeStore=e,this.route=t,this.Icons=H,this.AVDHCertificationStatusEnum=Be,this.documentId=this.route.
1snapshot.params.documentId,this.isFileDownloading$=this.uplodedByMeStore.isFileDownloading$,this.details$=this.uplodedByMeStore.details$,this.deleteFilesFromDocumentContainer={controllerName:"DocumentContainer",actionName:"DeleteFilesFromDocumentContainer"},this.certifyDocumentPermission={controllerName:"Avdh",actionName:"RequestFileSign"},this.downloadDocumentUploadedByUserDownload={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_DownloadDocumentsUploadedByUser}}ngOnInit(){this.uplodedByMeStore.getDetails(this.documentId)}downloadDocument(){this.uplodedByMeStore.downloadFile(this.documentId)}navigateToConnection(){this.uplodedByMeStore.navigateToConnection()}deleteDocument(){this.uplodedByMeStore.deleteDocument(this.documentId)}certifyDocument(){this.uplodedByMeStore.certifyDocument(this.documentId)}static{this.\u0275fac=function(t){return new(t||i)(g(dn),g(ie))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-by-me-details"]],features:[le([dn,st])],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],[3,"title"],["test-id","certification-unsuccessful-notification","class","neptun-wrapper",4,"ngIf"],[1,"neptun-wrapper-padding","document-actions"],["neptun-button","","id","uploaded-by-me-download-button",1,"responsive",3,"click","disabled","accent","permissionRequired"],["neptun-button","","test-id","certification-button","id","uploaded-by-me-certify-button","class","responsive",3,"disabled","accent","permissionRequired","click",4,"ngIf"],["neptun-button","","test-id","delete-button","id","uploaded-by-me-delete-button","class","responsive",3,"accent","color","disabled","permissionRequired","click",4,"ngIf"],["test-id","details",1,"neptun-wrapper"],["neptunBasicLayoutLeftContent",""],["neptunBasicLayoutRightContent",""],["test-id","certification-unsuccessful-notification",1,"neptun-wrapper"],["bgColor","warning-light",1,"callout-box",3,"id","icon"],["neptun-button","","test-id","certification-button","id","uploaded-by-me-certify-button",1,"responsive",3,"click","disabled","accent","permissionRequired"],["neptun-button","","test-id","delete-button","id","uploaded-by-me-delete-button",1,"responsive",3,"click","accent","color","disabled","permissionRequired"],["class","status",4,"ngIf"],[1,"status"],[1,"status__content"],["neptunDataViewItem",""],["neptun-button","","id","uploaded-by-me-connection-link",3,"click","color","hasLeftOffset","postfixIcon"],[1,"separator"],[1,"certification-title"],[1,"certification-status"],["neptunDataViewItem","",4,"ngIf"],[1,"certification-dates"],[4,"ngFor","ngForTrackByIndex","ngForOf"],["test-id","error"],["test-id","loading",1,"neptun-wrapper"],[3,"hasButton"]],template:function(t,n){t&1&&u(0,Ss,3,3,"ng-container",0)},dependencies:[K,Z,xe,Jo,_e,Me,ft,bt,At,_t,nt,ot,Qt,gi,Re,it,X,ut,tt,ge,pe,he],styles:['.status[_ngcontent-%COMP%]{color:#213055;width:400px;height:fit-content;margin-right:48px}.status__content[_ngcontent-%COMP%] + .status__content[_ngcontent-%COMP%]{margin-top:24px}.status-icon[_ngcontent-%COMP%]{font-size:20px}.document-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:16px}.certification-dates[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.certification-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.certification-title[_ngcontent-%COMP%]{margin-bottom:24px}.callout-box[_ngcontent-%COMP%]{margin-bottom:20px}.success[_ngcontent-%COMP%]{color:#00dea4}.error[_ngcontent-%COMP%]{color:#a62c2c}.in-progress[_ngcontent-%COMP%]{color:#0943d9}.can-be-certified[_ngcontent-%COMP%]{color:#c3c3c3}.connection-link[_ngcontent-%COMP%]:after{content:"";display:inline-block;padding:3px;transform:rotate(-45deg);-webkit-transform:rotate(-45deg);margin:1px 5px;border:solid #0943d9;border-width:0 2px 2px 0}@media only screen and (max-width:574px){.document-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column}}@media only screen and (max-width:767px){neptun-data-view[_ngcontent-%COMP%]{padding-left:20px}}'],changeDetection:0})}}return i})();var eo={entities:h,selectedEntities:[],contracts:{firstRow:0,lastRow:pn,filterModel:{name:"",documentId:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.UserConnectionList,defaultColumns:[],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isMoreFilterOpen:!1,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h};var to={entities:h,selectedEntities:[],contracts:{firstRow:0,lastRow:pn,filterModel:{name:"",type:"",term:"",isFavorite:!1,documentId:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.VirtualSpaceConnectionsList,defaultColumns:[],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,isMoreFilterOpen:!1,tableFunctionTypes:[],previousFilters:h};var io={entities:h,selectedEntities:[],contracts:{firstRow:0,lastRow:10,filterModel:{documentationName:"",documentationType:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryByMe,defaultColumns:[],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isMoreFilterOpen:!1,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h};var no={entities:h,selectedEntities:[],contracts:{firstRow:0,lastRow:10,filterModel:{documentationName:"",documentationType:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryFromOthers,defaultColumns:[],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isMoreFilterOpen:!1,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h};var oo={entities:h,selectedEntities:[],defaultOrderBy:{sortablePropertyName:"fileName",sort:"asc"},orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{interval:{intervalMin:"",intervalMax:""},folderName:"",description:"",shareType:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryRecommendedFolders,defaultColumns:[],columns:h,displayedColumns:h,isMoreFilterOpen:!1,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],tableActions:[],previousFilters:h};var yi={entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,isOrderBySaving:!1,isServerOrderLoaded:!1,keepMoreFilterOpen:!1,hiddenFilters:{},orderBy:h,defaultOrderBy:{sortablePropertyName:"documentationName",sort:"asc"},tableActions:[],contracts:{firstRow:0,lastRow:10,filterModel:{documentationName:"",documentationType:"",isOnlyCertificated:!1,mustBeCertified:!1,isOnlyLegalRemediableFilter:!1}},interfaceIdentity:Y.DocumentLibraryGenerated,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"documentationName"},{text:"global.type",key:"documentationType"},{text:"documentLibrary.createdAt",key:"documentationUploadDate",dateStyle:"long",timeStyle:"short",type:"date"},{text:"documentLibrary.registrationNumber",key:"registrationNumber"}],columns:h,displayedColumns:h,tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h,documentTypes:h};var Mi={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{folderId:""}},keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,interfaceIdentity:Y.DocumentLibrarySharablesFoldersDetail,defaultColumns:[{text:"global.name",key:"documentationName"},{text:"global.size",key:"size",type:"fileSize"},{text:"documentLibrary.uploadedAt",key:"uploadDate",dateStyle:"long",timeStyle:"short",type:"date"},{text:"documentLibrary.numberOfDownloads",key:"downloadCounter"}],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableActions:[],tableFunctionTypes:[G.EditColumns,G.Export],previousFilters:h,folderDetails:h,containerStatus:h,folderConnections:h};var ro={entities:h,selectedEntities:[],defaultOrderBy:{sortablePropertyName:"folderName",sort:"asc"},orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{interval:{intervalMin:"",intervalMax:""},folderName:"",description:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryMyFolders,defaultColumns:[],columns:h,displayedColumns:h,isMoreFilterOpen:!1,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],tableActions:[],previousFilters:h};
1var te=class un{static personGroupDetails(a){return a.myShareableFolders.userConnectionDetailsList}static virtualSpaceDetailsList(a){return a.myShareableFolders.virtualSpaceDetailsList}static uploadedByStudentList(a){return a.uploadedByStudentList}static uploadedFromOthersList(a){return a.uploadedFromOthersList}static trDocumentsList(a){return a.trDocumentsList}static foldersSharedWithMeList(a){return a.foldersSharedWithMeList}static myFoldersList(a){return a.myFoldersList}static myFoldersDetailsList(a){return a.myFoldersDetails}saveMyShareableFoldersUserConnectionDetails(a,e){let t=a.getState();a.patchState({myShareableFolders:I(F({},t.myShareableFolders),{userConnectionDetailsList:e.listState})})}resetMyShareableFoldersUserConnectionDetails(a){let e=a.getState();a.patchState({myShareableFolders:I(F({},e.myShareableFolders),{userConnectionDetailsList:eo})})}saveMyShareableFoldersVirtualSpacesList(a,e){let t=a.getState();a.patchState({myShareableFolders:I(F({},t.myShareableFolders),{virtualSpaceDetailsList:e.listState})})}resetMyShareableFoldersVirtualSpacesList(a){let e=a.getState();a.patchState({myShareableFolders:I(F({},e.myShareableFolders),{virtualSpaceDetailsList:to})})}saveUploadedByStudentList(a,e){a.patchState({uploadedByStudentList:e.listState})}resetUploadedByStudentList(a){a.patchState({uploadedByStudentList:io})}refreshUploadedByStudentList(a){let e=a.getState();a.patchState({uploadedByStudentList:I(F({},e.uploadedByStudentList),{entities:h})})}saveUploadedFromOthersList(a,e){a.patchState({uploadedFromOthersList:e.listState})}resetUploadedFromOthersList(a){a.patchState({uploadedFromOthersList:no})}saveTrDocumentsListState(a,e){a.patchState({trDocumentsList:e.listState})}resetTrDocumentsListState(a){a.patchState({trDocumentsList:yi})}saveFoldersSharedWithMeListState(a,e){a.patchState({foldersSharedWithMeList:e.listState})}resetFoldersSharedWithMeListState(a){a.patchState({foldersSharedWithMeList:oo})}saveMyFoldersListState(a,e){a.patchState({myFoldersList:e.listState})}resetMyFoldersListState(a){a.patchState({myFoldersList:ro})}refreshMyForldersListState(a){let e=a.getState();a.patchState({myFoldersList:F({},e.myFoldersList)})}saveMyFoldersDetailsListState(a,e){a.patchState({myFoldersDetails:e.listState})}resetMyFoldersDetailsListState(a){a.patchState({myFoldersDetails:Mi})}resetMyFoldersDetailsEntities(a){a.patchState({myFoldersDetails:I(F({},a.getState().myFoldersDetails),{entities:h})})}static{this.\u0275fac=function(e){return new(e||un)}}static{this.\u0275prov=B({token:un,factory:un.\u0275fac})}};U([ne(A.SaveMyShareableFoldersUserConnectionDetails),S("design:type",Function),S("design:paramtypes",[Object,A.SaveMyShareableFoldersUserConnectionDetails]),S("design:returntype",void 0)],te.prototype,"saveMyShareableFoldersUserConnectionDetails",null);U([ne(A.ResetMyShareableFoldersUserConnectionDetails),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetMyShareableFoldersUserConnectionDetails",null);U([ne(A.SaveMyShareableFoldersVirtualSpacesList),S("design:type",Function),S("design:paramtypes",[Object,A.SaveMyShareableFoldersVirtualSpacesList]),S("design:returntype",void 0)],te.prototype,"saveMyShareableFoldersVirtualSpacesList",null);U([ne(A.ResetMyShareableFoldersVirtualSpacesList),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetMyShareableFoldersVirtualSpacesList",null);U([ne(A.SaveUploadedByStudentList),S("design:type",Function),S("design:paramtypes",[Object,A.SaveUploadedByStudentList]),S("design:returntype",void 0)],te.prototype,"saveUploadedByStudentList",null);U([ne(A.ResetUploadedByStudentList),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetUploadedByStudentList",null);U([ne(A.RefreshUploadedByStudentList),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"refreshUploadedByStudentList",null);U([ne(A.SaveUploadedFromOthersList),S("design:type",Function),S("design:paramtypes",[Object,A.SaveUploadedFromOthersList]),S("design:returntype",void 0)],te.prototype,"saveUploadedFromOthersList",null);U([ne(A.ResetUploadedFromOthersList),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetUploadedFromOthersList",null);U([ne(A.SaveTrDocumentsListState),S("design:type",Function),S("design:paramtypes",[Object,A.SaveTrDocumentsListState]),S("design:returntype",void 0)],te.prototype,"saveTrDocumentsListState",null);U([ne(A.ResetTrDocumentsListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetTrDocumentsListState",null);U([ne(A.SaveFoldersSharedWithMeListState),S("design:type",Function),S("design:paramtypes",[Object,A.SaveFoldersSharedWithMeListState]),S("design:returntype",void 0)],te.prototype,"saveFoldersSharedWithMeListState",null);U([ne(A.ResetFoldersSharedWithMeListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetFoldersSharedWithMeListState",null);U([ne(A.SaveMyFoldersListState),S("design:type",Function),S("design:paramtypes",[Object,A.SaveMyFoldersListState]),S("design:returntype",void 0)],te.prototype,"saveMyFoldersListState",null);U([ne(A.ResetMyFoldersListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetMyFoldersListState",null);U([ne(A.RefreshMyForldersListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"refreshMyForldersListState",null);U([ne(A.SaveMyFoldersDetailsListState),S("design:type",Function),S("design:paramtypes",[Object,A.SaveMyFoldersDetailsListState]),S("design:returntype",void 0)],te.prototype,"saveMyFoldersDetailsListState",null);U([ne(A.ResetMyFoldersDetailsListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetMyFoldersDetailsListState",null);U([ne(A.ResetMyFoldersDetailsEntities),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],te.prototype,"resetMyFoldersDetailsEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"personGroupDetail
1s",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"virtualSpaceDetailsList",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"uploadedByStudentList",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"uploadedFromOthersList",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"trDocumentsList",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"foldersSharedWithMeList",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"myFoldersList",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],te,"myFoldersDetailsList",null);te=U([dt({name:"documentlibrary",defaults:{myShareableFolders:{userConnectionDetailsList:eo,virtualSpaceDetailsList:to},uploadedByStudentList:io,uploadedFromOthersList:no,trDocumentsList:yi,foldersSharedWithMeList:oo,myFoldersList:ro,myFoldersDetails:Mi}})],te);var _n=(()=>{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,defaultOrderBy:{sortablePropertyName:"documentationName",sort:"asc"},orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{documentationName:"",documentationType:""}},interfaceIdentity:Y.DocumentLibraryByMe,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"documentationName"},{text:"global.status",key:"uiDisplayStateText",onlyExport:!0,type:"computed",compute:e=>e.certificationStatus!==Be.Nem_hitelesitheto?this.avdhCertificationEvaluationService.getCertificationDetails(e.certificationStatus).text:"-"},{text:"global.type",key:"documentationType"},{text:"fileUpload.uploadDate",key:"documentationUploadDate",dateStyle:"long",timeStyle:"short",type:"date"},{text:"documentLibrary.typeOfConnection",key:"connectionType",disableSort:!0},{text:"documentLibrary.registrationNumber",key:"registrationNumber"}],columns:h,displayedColumns:h,documentTypes:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h}),this.endPoint="DocumentContainer/GetDocumentsUploadedByStudent",this.defaultPagingNumber=10,this.store=k(R),this.documentLibraryFacade=k(st),this.documentLibraryService=k(ve),this.fileService=k(ke),this.avdhCertificationEvaluationService=k(mn),this.documentType$=this.select(e=>e.documentTypes),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new A.SaveUploadedByStudentList(t))}))),this.updateDocumentTypes=this.updater((e,t)=>I(F({},e),{documentTypes:t})),this.getDocumentTypes=this.effect(e=>e.pipe(D(()=>this.updateDocumentTypes(Se)),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetDocumentsUploadedByStudentTypes",{}).pipe(wt(t=>{this.updateDocumentTypes({data:t})},t=>(this.updateDocumentTypes(ye),de(()=>t))))))),this.certifyDocuments=this.effect(e=>e.pipe(oe(this.selectedEntities$),O(([,t])=>({certifiableDocuments:t.filter(n=>n.certificationStatus===Be.Hitelesitheto||n.certificationStatus===Be.Ujra_bekuldheto).map(n=>this.convertToDocInfo(n,!0)),notCertifiableDocuments:t.filter(n=>n.certificationStatus===Be.Hitelesites_folyamatban||n.certificationStatus===Be.Hitelesitve||n.certificationStatus===Be.Nem_hitelesitheto).map(n=>this.convertToDocInfo(n,!1))})),D(t=>this.documentLibraryFacade.certifyDocuments(t.certifiableDocuments,t.notCertifiableDocuments,"uploaded-by-me")))),this.deleteDocuments=this.effect(e=>e.pipe(oe(this.selectedEntities$),O(([,t])=>t.map(n=>n.documentationId)),D(t=>this.documentLibraryFacade.deleteDocuments(t,()=>{this.updateSelectedEntities([]),this.reloadItemsFromServer()})))),this.downloadFiles=this.effect(e=>e.pipe(oe(this.selectedEntities$),O(([,t])=>t.map(n=>n.documentationId)),W(t=>this.documentLibraryService.downloadDocumentationOrZip(t).pipe(D(n=>{this.fileService.downloadFile(n)})))))}convertToDocInfo(e,t){return{id:e.documentationId,name:e.documentationName,selected:t,status:e.uiDisplayState.reasons}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var vs=()=>[];function bs(i,a){if(i&1&&(y(0),L(1,"neptun-filter-field-error-indicator",8),v()),i&2){let e=r(4).$implicit;s(),p("fieldName",e("global.type"))}}function xs(i,a){i&1&&(y(0),L(1,"neptun-rectangle-placeholder",9),v())}function Ds(i,a){if(i&1&&(y(0),L(1,"neptun-form-select",10),v()),i&2){let e=r().ngIf,t=r(2).ngIf,n=r().$implicit;s(),p("label",n("global.type"))("ngModel",t.documentationType)("isAllItemsAnOption",!0)("dataSource",e.data)}}function Fs(i,a){if(i&1&&(y(0),u(1,bs,2,1,"ng-container",7),l(2,"hasError"),u(3,xs,2,0,"ng-container",7),l(4,"isLoadingRequest"),u(5,Ds,2,4,"ng-container",7),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function Is(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",5),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),w("keepOpenChanged",function(){_(e);let n=r(3);return f(n.setKeepOpenChanged())})("filterClick",function(n){_(e);
1let o=r(3);return f(o.filterItems(n))})("latestFilterLoad",function(n){_(e);let o=r(3);return f(o.loadLatestFilter(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("closed",function(){_(e);let n=r(3);return f(n.toggleFilter())}),L(5,"neptun-form-input",6),u(6,Fs,7,9,"ng-container",7),l(7,"async"),m()}if(i&2){let e,t=r().ngIf,n=r().$implicit,o=r();p("keepOpen",c(1,7,o.keepFilterOpen$)===!0)("previousFilter",c(2,9,o.previousFilters$))("isLoading",c(3,11,o.isFiltering$)===!0)("canFilter",!((e=c(4,13,o.selectedEntities$))!=null&&e.length)),s(5),p("label",n("global.name"))("ngModel",t.documentationName),s(),p("ngIf",c(7,15,o.documentTypes$))}}function Ls(i,a){if(i&1&&(y(0,3),u(1,Is,8,17,"neptun-filter-v2",4),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function ws(i,a){if(i&1){let e=E();y(0),d(1,"neptun-sortable-filterable-table-view",1),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),l(8,"async"),l(9,"async"),l(10,"async"),w("sortItems",function(n){_(e);let o=r();return f(o.sortItems(n))})("toggleFilter",function(){_(e);let n=r();return f(n.toggleFilter())})("getNextItems",function(n){_(e);let o=r();return f(o.getNextItems(n))})("itemSelected",function(n){_(e);let o=r();return f(o.setSelectedItems(n))})("itemAction",function(n){_(e);let o=r();return f(o.itemAction(n))})("tableAction",function(n){_(e);let o=r();return f(o.callActionCallback(n))}),u(11,Ls,3,3,"ng-container",2),l(12,"async"),m(),v()}if(i&2){let e,t,n=a.$implicit,o=r();s(),p("data",c(2,13,o.dataSource$))("title",n("menu.documentLibrary.myUploadedDocuments"))("columns",c(3,15,o.displayedColumns$))("tableId","my-uploaded-documents")("headerActions",c(4,17,o.moreActionsMenuItems$))("filterCount",c(5,19,o.filterCount$))("isNextVisible",c(6,21,o.isNextVisible$)===!0)("orderByMenu",c(7,23,o.orderByMenu$))("isListLoading",c(8,25,o.isListLoading$)===!0)("isSelectable",!0)("selectedCount",(e=(e=c(9,27,o.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("tableActions",(t=c(10,29,o.tableActions$))!==null&&t!==void 0?t:j(33,vs)),s(10),p("ngIf",c(12,31,o.filterModel$))}}var Hr=(()=>{class i extends Ae{constructor(e,t,n,o,x,b){super(e),this.uploadedByMeStore=e,this.store=t,this.avdhCertificationEvaluationService=n,this.router=o,this.route=x,this.transloco=b,this.exportTitle="menu.documentLibrary.myUploadedDocuments",this.documentTypes$=this.uploadedByMeStore.documentType$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([z,$])=>ee(z)?fe(z.data.map(Q=>this.convertToTableRow(Q,$.some(Ce=>Ce.documentationId===Q.documentationId)),z.isPagingLoading??!1)):z))}initialize(){ee(this.listState.entities)?this.uploadedByMeStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.uploadedByMeStore.getColumns(),this.uploadedByMeStore.loadOrderBy(),this.uploadedByMeStore.getPreviousFilters(),this.uploadedByMeStore.getDocumentTypes(),this.uploadedByMeStore.updateFilterModel(F({},this.listState.contracts.filterModel)),this.uploadedByMeStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.uploadedByMeStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.uploadedByMeStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot(te.uploadedByStudentList)}resetModuleState(){this.store.dispatch(new A.ResetUploadedByStudentList)}setSelectedItems(e){let n=e.some(o=>o.certificationStatus===Be.Hitelesitheto||o.certificationStatus===Be.Ujra_bekuldheto)?[this.cancelAction,this.certifyAction,this.downloadAction]:[this.cancelAction,this.downloadAction];e.some(o=>o.isDeletable)&&n.push(this.deleteAction),this.uploadedByMeStore.updateTableActions(n),super.setSelectedItems(e)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.uploadedByMeStore.updateSelectedEntities([])}}get certifyAction(){let e={controllerName:"Avdh",actionName:"RequestFileSign"};return{text:this.transloco.translate("documentLibrary.certify"),icon:H.Shield,type:me.Certify,permission:e,callback:()=>this.uploadedByMeStore.certifyDocuments()}}get deleteAction(){let e={controllerName:"DocumentContainer",actionName:"DeleteFilesFromDocumentContainer"};return{text:this.transloco.translate("button.delete"),icon:H.Trash,type:me.Delete,permission:e,callback:()=>this.uploadedByMeStore.deleteDocuments()}}get downloadAction(){let e={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_DownloadDocumentsUploadedByUser};return{text:this.transloco.translate("button.download"),icon:H.Download,type:me.Download,permission:e,callback:()=>this.uploadedByMeStore.downloadFiles()}}convertToTableRow(e,t){let n=()=>{this.uploadedByMeStore.saveListState(),this.router.navigate([e.documentationId],{relativeTo:this.route,queryParams:I(F({}
1,this.route.snapshot.queryParams),{documentName:e.documentationName})})},o={controllerName:"DocumentContainer",actionName:"GetDocumentUploadedByStudentDetails"};return{data:I(F({},e),{uiDisplayState:I(F({},e.uiDisplayState),{reasons:this.avdhCertificationEvaluationService.getListElementCertification(e.uiDisplayState.reasons,e,"certificationStatus")})}),detailsCallback:n,selected:t,detailsPermission:o,actions:{details:{text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n,permission:o}}}}static{this.\u0275fac=function(t){return new(t||i)(g(_n),g(R),g(mn),g(ue),g(ie),g(ce))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-by-me"]],features:[le([st,_n]),re],decls:1,vars:0,consts:[[4,"transloco"],[1,"neptun-wrapper",3,"sortItems","toggleFilter","getNextItems","itemSelected","itemAction","tableAction","data","title","columns","tableId","headerActions","filterCount","isNextVisible","orderByMenu","isListLoading","isSelectable","selectedCount","tableActions"],["filters","",4,"ngIf"],["filters",""],["class","neptun-wrapper-padding",3,"keepOpen","previousFilter","isLoading","canFilter","keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed",4,"ngIf"],[1,"neptun-wrapper-padding",3,"keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed","keepOpen","previousFilter","isLoading","canFilter"],["id","documentationName","name","documentationName",1,"filter-element",3,"label","ngModel"],[4,"ngIf"],["test-id","status-error",3,"fieldName"],["test-id","documentTypes-loading",1,"placeholder"],["id","documentationType","name","documentationType",1,"filter-element",3,"label","ngModel","isAllItemsAnOption","dataSource"]],template:function(t,n){t&1&&u(0,ws,13,34,"ng-container",0)},dependencies:[K,ni,Z,rt,Qe,Ne,Pe,Ue,oi,yt,vt,X,ge,pe,he],encapsulation:2,changeDetection:0})}}return i})();var fn=(()=>{class i extends Jt{constructor(e){super({details:h,isFileDownloading:h}),this.dataFetcherService=e,this.fileService=k(ke),this.documentLibraryService=k(ve),this.details$=this.select(t=>t.details),this.isFileDownloading$=this.select(t=>t.isFileDownloading).pipe(O(t=>Yt(t))),this.addDetails=this.updater((t,n)=>I(F({},t),{details:n})),this.getDetails=this.effect(t=>t.pipe(D(()=>this.addDetails(Se)),W(n=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetFolderSharedWithStudentDocumentDetails",{documentId:n}).pipe(D(o=>{this.addDetails(fe(o))}),ae(o=>(this.addDetails(ye),de(()=>o))))))),this.setIsFileDownloading=this.updater((t,n)=>I(F({},t),{isFileDownloading:n})),this.downloadFile=this.effect(t=>t.pipe(D(()=>this.setIsFileDownloading(Se)),W(n=>this.documentLibraryService.downloadDocumentationOrZip(n).pipe(D(o=>{this.setIsFileDownloading(ui),this.fileService.downloadFile(o)}),ae(o=>(this.setIsFileDownloading(ye),de(()=>o)))))))}static{this.\u0275fac=function(t){return new(t||i)(V(Pt))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Ms=()=>({dateStyle:"long",timeStyle:"short"});function Es(i,a){}function Os(i,a){if(i&1&&(d(0,"neptun-data-view",8)(1,"dl")(2,"div",9)(3,"dt"),C(4),m(),d(5,"dd"),C(6),l(7,"hyphen"),m()(),d(8,"div",9)(9,"dt"),C(10),m(),d(11,"dd"),C(12),l(13,"hyphen"),m()(),d(14,"div",9)(15,"dt"),C(16),m(),d(17,"dd"),C(18),l(19,"translocoDate"),l(20,"hyphen"),m()(),d(21,"div",9)(22,"dt"),C(23),m(),d(24,"dd"),C(25),l(26,"hyphen"),m()(),d(27,"div",9)(28,"dt"),C(29),m(),d(30,"dd"),C(31),l(32,"hyphen"),m()()()()),i&2){let e=r(2).ngIf,t=r().$implicit;s(4),T(t("global.type")),s(2),M(" ",c(7,10,e.data.documentationType)," "),s(4),T(t("global.language")),s(2),M(" ",c(13,12,e.data.language)," "),s(4),T(t("documentLibrary.uploadedAt")),s(2),M(" ",c(20,17,He(19,14,e.data.uploadDate,j(23,Ms)))," "),s(5),T(t("documentLibrary.numberOfDownloads")),s(2),M(" ",c(26,19,e.data.downloadCounter)," "),s(4),T(t("global.description")),s(2),M(" ",c(32,21,e.data.description)," ")}}function Rs(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",2),d(2,"div",3)(3,"button",4),w("click",function(){_(e);let n=r(3);return f(n.downloadFile())}),C(4),m()(),d(5,"div",5)(6,"neptun-basic-layout"),u(7,Es,0,0,"ng-template",6)(8,Os,33,24,"ng-template",7),m()(),v()}if(i&2){let e=r().ngIf,t=r().$implicit,n=r();s(),p("title",e.data.documentationName),s(2),p("accent","flat")("permissionRequired",n.sharedWithMeFoldersDetailsViewDocumentDetailsDownloadButtonPermission),s(),M(" ",t("button.download")," ")}}function Bs(i,a){i&1&&(y(0),L(1,"neptun-request-error-indicator",10),v())}function Ps(i,a){i&1&&(y(0),d(1,"div",11),L(2,"neptun-details-loading-placeholder",12),m(),v()),i&2&&(s(2),p("hasButton",!0))}function Ns(i,a){if(i&1&&(y(0),u(1,Rs,9,4,"ng-container",1),l(2,"isResultRequest"),u(3,Bs,2,0,"ng-container",1),l(4,"hasError"),u(5,Ps,3,1,"ng-container",1),l(6,"isLoadingRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function As(i,a){if(i&1&&(y(0),u(1,Ns,7,9,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.details$))}}var Qr=(()=>{class i{constructor(e,t){this.route=e,this.documentDetailsStore=t,this.documentId=this.route.
1snapshot.params.documentId,this.isFileDownloading$=this.documentDetailsStore.isFileDownloading$,this.details$=this.documentDetailsStore.details$,this.sharedWithMeFoldersDetailsViewDocumentDetailsDownloadButtonPermission={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_SharedWithMeFoldersDetailsViewDownloadGridFunction}}ngOnInit(){this.documentDetailsStore.getDetails(this.documentId)}downloadFile(){this.documentDetailsStore.downloadFile(this.documentId)}static{this.\u0275fac=function(t){return new(t||i)(g(ie),g(fn))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-folders-shared-with-me-details-document-details"]],features:[le([fn])],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],[3,"title"],[1,"neptun-wrapper-padding"],["neptun-button","","id","shared-folder-download","color","primary",3,"click","accent","permissionRequired"],["test-id","details",1,"neptun-wrapper"],["neptunBasicLayoutLeftContent",""],["neptunBasicLayoutRightContent",""],[1,"detail"],["neptunDataViewItem",""],["test-id","error"],["test-id","loading",1,"neptun-wrapper"],[3,"hasButton"]],template:function(t,n){t&1&&u(0,As,3,3,"ng-container",0)},dependencies:[K,Z,xe,_e,Me,ft,bt,_t,nt,ot,Re,it,X,ut,tt,ge,pe,he],styles:["button[_ngcontent-%COMP%]{margin:24px 0}@media only screen and (max-width:767px){neptun-data-view[_ngcontent-%COMP%]{padding-left:20px}}"],changeDetection:0})}}return i})();var ao="[FoldersSharedWithMeDetails]",so={SetFoldersSharedWithMeDetailsState:`${ao} Set to be completed request state`,ResetFoldersSharedWithMeDetailsState:`${ao} Reset to be completed request state`,ResetEntites:`${ao} Reset Entites`},Tt;(function(i){class a{static{this.type=so.SetFoldersSharedWithMeDetailsState}constructor(o){this.foldersSharedWithMeDetailsList=o}}i.SetFoldersSharedWithMeDetailsState=a;class e{static{this.type=so.ResetFoldersSharedWithMeDetailsState}}i.ResetFoldersSharedWithMeDetailsState=e;class t{static{this.type=so.ResetEntites}}i.ResetEntites=t})(Tt||(Tt={}));var Ei={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{folderId:""}},keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryMyFolderDetails,defaultColumns:[{text:"global.name",key:"documentationName"},{text:"global.size",key:"size",type:"fileSize"},{text:"global.type",key:"documentationType"},{text:"documentLibrary.uploadedAt",key:"uploadDate",dateStyle:"long",timeStyle:"short",type:"date"},{text:"documentLibrary.numberOfDownloads",key:"downloadCounter"}],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableActions:[],tableFunctionTypes:[G.EditColumns,G.Export],previousFilters:h,folderDetails:h,hiddenFilters:{folderId:""}};var Gt=class gn{static getFoldersSharedWithMeDetailsState(a){return a.foldersSharedWithMeDetailsList}setFoldersSharedWithMeDetailsState(a,e){a.patchState({foldersSharedWithMeDetailsList:e.foldersSharedWithMeDetailsList})}resetFoldersSharedWithMeDetailsState(a){a.patchState({foldersSharedWithMeDetailsList:Ei})}resetEntities(a){a.patchState({foldersSharedWithMeDetailsList:I(F({},a.getState().foldersSharedWithMeDetailsList),{entities:h})})}static{this.\u0275fac=function(e){return new(e||gn)}}static{this.\u0275prov=B({token:gn,factory:gn.\u0275fac})}};U([ne(Tt.SetFoldersSharedWithMeDetailsState),S("design:type",Function),S("design:paramtypes",[Object,Tt.SetFoldersSharedWithMeDetailsState]),S("design:returntype",void 0)],Gt.prototype,"setFoldersSharedWithMeDetailsState",null);U([ne(Tt.ResetFoldersSharedWithMeDetailsState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],Gt.prototype,"resetFoldersSharedWithMeDetailsState",null);U([ne(Tt.ResetEntites),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],Gt.prototype,"resetEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],Gt,"getFoldersSharedWithMeDetailsState",null);Gt=U([dt({name:"foldersSharedWithMeDetailsList",defaults:{foldersSharedWithMeDetailsList:Ei}})],Gt);var hn=(()=>
1{class i extends Ee{constructor(e,t,n){super(Ei),this.store=e,this.fileService=t,this.documentLibraryService=n,this.endPoint="DocumentContainer/GetFolderSharedWithStudentDetailsFiles",this.defaultPagingNumber=10,this.folderDetails$=this.select(o=>o.folderDetails),this.saveListState=this.effect(o=>o.pipe(oe(this.state$),D(([,x])=>{this.store.dispatch(new Tt.SetFoldersSharedWithMeDetailsState(x))}))),this.getFolderDetails=this.effect(o=>o.pipe(D(()=>{this.patchState({folderDetails:Se})}),W(x=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetFolderSharedWithStudentDetails",x).pipe(D(b=>this.patchState({folderDetails:{data:b}})),ae(b=>(this.patchState({folderDetails:ye}),de(()=>b))))))),this.downloadFiles=this.effect(o=>o.pipe(oe(this.selectedEntities$),O(([,x])=>x.map(b=>b.id)),D(x=>this.documentLibraryService.downloadDocumentationOrZip(x).pipe(J(1),D(b=>{this.fileService.downloadFile(b),this.updateSelectedEntities([])}),ae(b=>de(()=>b))).subscribe())))}static{this.\u0275fac=function(t){return new(t||i)(V(R),V(ke),V(ve))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Vs=()=>[],Gs=()=>({dateStyle:"long",timeStyle:"short"});function Us(i,a){i&1&&(y(0),d(1,"div",3),L(2,"neptun-request-error-indicator",4),m(),v())}function $s(i,a){i&1&&(y(0),d(1,"div",3),L(2,"neptun-details-loading-placeholder",5),m(),v())}function js(i,a){if(i&1&&(y(0),L(1,"neptun-primary-title",6),d(2,"div",7)(3,"neptun-data-view")(4,"dl")(5,"div",8)(6,"dt"),C(7),m(),d(8,"dd"),C(9),l(10,"formatKBytes"),m()(),d(11,"div",8)(12,"dt"),C(13),m(),d(14,"dd"),C(15),l(16,"translocoDate"),m()(),d(17,"div",8)(18,"dt"),C(19),m(),d(20,"dd"),C(21),l(22,"hyphen"),m()()()()(),v()),i&2){let e=r().ngIf,t=r().$implicit;s(),p("title",e.data.folderName),s(6),T(t("global.size")),s(2),M(" ",c(10,7,e.data.folderSize)," "),s(4),T(t("tasks.lastModified")),s(2),M(" ",He(16,9,e.data.lastModified,j(14,Gs))," "),s(4),T(t("global.description")),s(2),M(" ",c(22,12,e.data.description)," ")}}function qs(i,a){if(i&1&&(y(0),u(1,Us,3,0,"ng-container",1),l(2,"hasError"),u(3,$s,3,0,"ng-container",1),l(4,"isLoadingRequest"),u(5,js,23,15,"ng-container",1),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function Ws(i,a){if(i&1){let e=E();y(0),u(1,qs,7,9,"ng-container",1),l(2,"async"),d(3,"neptun-sortable-table-view",2),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),l(8,"async"),l(9,"async"),l(10,"async"),l(11,"async"),w("itemSelected",function(n){_(e);let o=r();return f(o.setSelectedItems(n))})("sortItems",function(n){_(e);let o=r();return f(o.sortItems(n))})("getNextItems",function(n){_(e);let o=r();return f(o.getNextItems(n))})("itemAction",function(n){_(e);let o=r();return f(o.itemAction(n))})("tableAction",function(n){_(e);let o=r();return f(o.callActionCallback(n))}),m(),v()}if(i&2){let e,t,n=a.$implicit,o=r();s(),p("ngIf",c(2,12,o.folderDetails$)),s(2),p("tableId","folders-shared-with-me-details")("title",n("semesterRegistration.documents"))("data",c(4,14,o.dataSource$))("columns",c(5,16,o.displayedColumns$))("isSelectable",!0)("selectedCount",(e=(e=c(6,18,o.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("isNextVisible",c(7,20,o.isNextVisible$)===!0)("orderByMenu",c(8,22,o.orderByMenu$))("isListLoading",c(9,24,o.isListLoading$)===!0)("headerActions",c(10,26,o.moreActionsMenuItems$))("tableActions",(t=c(11,28,o.tableActions$))!==null&&t!==void 0?t:j(30,Vs))}}var zr=(()=>{class i extends Ae{constructor(e,t,n,o,x){super(e),this.foldersSharedWithMeDetailsStore=e,this.router=t,this.route=n,this.store=o,this.transloco=x,this.exportTitle="menu.documents",this.folderId=this.route.snapshot.params.folderId,this.folderDetails$=this.foldersSharedWithMeDetailsStore.folderDetails$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([b,z])=>ee(b)?fe(b.data.map($=>this.convertToTableRow($,z.some(Q=>Q.id===$.id))),b.isPagingLoading??!1):b))}initialize(){ee(this.listState.entities)?this.foldersSharedWithMeDetailsStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.foldersSharedWithMeDetailsStore.getColumns(),this.foldersSharedWithMeDetailsStore.loadOrderBy(),this.foldersSharedWithMeDetailsStore.getPreviousFilters(),this.foldersSharedWithMeDetailsStore.updateHiddenFilters({folderId:this.folderId}),this.foldersSharedWithMeDetailsStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),this.foldersSharedWithMeDetailsStore.getFolderDetails({folderId:this.folderId}),this.foldersSharedWithMeDetailsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.foldersSharedWithMeDetailsStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.foldersSharedWithMeDetailsStore.defaultPagingNumber})))).subscribe(),this.foldersSharedWithMeDetailsStore.updateTableActions([this.cancelAction,this.downloadAction]))}loadModuleState(){return this.store.selectSnapshot(Gt.getFoldersSharedWithMeDetailsState)}resetModuleState(){this.store.dispatch(new Tt.ResetEntites)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.foldersSharedWithMeDetailsStore.updateSelectedEntities([])}}get downloadAction(){let e={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_SharedWithMeFoldersDetailsViewDownloadGridFunction};return{text:this.transloco.translate("button.download"),permission:e,icon:H.Download,type:me.Download,callback:()=>this.foldersSharedWithMeDetailsStore.downloadFiles()}}convertToTableRow(e,t){let n=()=>{this.foldersSharedWithMeDetailsStore.saveListState(),this.router.navigate([e.id],{relativeTo:this.route,queryParams:I(F({}
1,this.route.snapshot.queryParams),{documentId:e.id,documentName:e.documentationName})})},o={controllerName:"DocumentContainer",actionName:"GetFolderSharedWithStudentDocumentDetails"};return{data:e,detailsCallback:n,detailsPermission:o,selected:t,actions:{details:{text:"button.details",permission:o,hasArrow:!0,color:Ie.Primary,callback:n}}}}static{this.\u0275fac=function(t){return new(t||i)(g(hn),g(ue),g(ie),g(R),g(ce))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-folders-shared-with-me-details"]],features:[le([hn]),re],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],[1,"neptun-wrapper",3,"itemSelected","sortItems","getNextItems","itemAction","tableAction","tableId","title","data","columns","isSelectable","selectedCount","isNextVisible","orderByMenu","isListLoading","headerActions","tableActions"],[1,"neptun-wrapper"],["test-id","error"],["test-id","loading"],[3,"title"],["test-id","details",1,"neptun-wrapper"],["neptunDataViewItem",""]],template:function(t,n){t&1&&u(0,Ws,12,31,"ng-container",0)},dependencies:[K,Z,Re,it,xe,nt,ot,kr,X,ut,tt,Zt,ge,pe,he],styles:["@media only screen and (max-width:767px){neptun-data-view[_ngcontent-%COMP%]{padding-left:20px}}"],changeDetection:0})}}return i})();var Cn=(()=>{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{interval:{intervalMin:"",intervalMax:""},folderName:"",description:"",shareType:""}},interfaceIdentity:Y.DocumentLibraryRecommendedFolders,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"folderName"},{text:"global.size",key:"folderSize",disableSort:!0,type:"fileSize"},{text:"documentLibrary.lastModified",key:"lastModified",dateStyle:"long",timeStyle:"short",type:"date"},{text:"global.description",key:"description"}],columns:h,displayedColumns:h,folderSharedTypes:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h}),this.endPoint="DocumentContainer/GetFoldersSharedWithStudent",this.defaultPagingNumber=10,this.store=k(R),this.fileUploadService=k(an),this.fileService=k(ke),this.errorHandler=k(Fe),this.folderSharedTypes$=this.select(e=>e.folderSharedTypes),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new A.SaveFoldersSharedWithMeListState(t))}))),this.updateFolderSharedTypes=this.updater((e,t)=>I(F({},e),{folderSharedTypes:t})),this.getFolderSharedTypes=this.effect(e=>e.pipe(D(()=>this.updateFolderSharedTypes(Se)),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetFoldersSharedWithStudentShareTypes",{}).pipe(wt(t=>{this.updateFolderSharedTypes({data:t})},t=>(this.updateFolderSharedTypes(ye),de(()=>t))))))),this.downloadFiles=this.effect(e=>e.pipe(oe(this.selectedEntities$),O(([,t])=>t.map(n=>n.id)),W(t=>this.fileUploadService.downloadDocumentsFromFolders(t).pipe(D(n=>{this.fileService.downloadFile(n)}),ae(n=>(this.errorHandler.handleError(n),qe))))))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Qs=()=>[];function zs(i,a){if(i&1&&(y(0),L(1,"neptun-filter-field-error-indicator",11),v()),i&2){let e=r(4).$implicit;s(),p("fieldName",e("documentLibrary.typeOfShare"))}}function Ks(i,a){i&1&&(y(0),L(1,"neptun-rectangle-placeholder",12),v())}function Ys(i,a){if(i&1&&(y(0),L(1,"neptun-form-select",13),v()),i&2){let e=r().ngIf,t=r(2).ngIf,n=r().$implicit;s(),p("label",n("documentLibrary.typeOfShare"))("isAllItemsAnOption",!0)("ngModel",t.shareType)("dataSource",e.data)}}function Zs(i,a){if(i&1&&(y(0),u(1,zs,2,1,"ng-container",8),l(2,"hasError"),u(3,Ks,2,0,"ng-container",8),l(4,"isLoadingRequest"),u(5,Ys,2,4,"ng-container",8),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function Js(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",5),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),w("keepOpenChanged",function(){_(e);let n=r(3);return f(n.setKeepOpenChanged())})("showMoreFilterChanged",function(n){_(e);
1let o=r(3);return f(o.setIsMoreFilterOpen(n))})("filterClick",function(n){_(e);let o=r(3);return f(o.filterItems(n))})("latestFilterLoad",function(n){_(e);let o=r(3);return f(o.loadLatestFilter(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("closed",function(){_(e);let n=r(3);return f(n.toggleFilter())}),L(6,"neptun-form-input",6)(7,"neptun-form-date-range-picker",7),u(8,Zs,7,9,"ng-container",8),l(9,"async"),y(10,9),L(11,"neptun-form-input",10),v(),m()}if(i&2){let e,t=r().ngIf,n=r().$implicit,o=r();p("keepOpen",c(1,14,o.keepFilterOpen$)===!0)("previousFilter",c(2,16,o.previousFilters$))("showMoreFilter",c(3,18,o.isMoreFilterOpen$)===!0)("hasMoreFilter",!0)("isLoading",c(4,20,o.isFiltering$)===!0)("canFilter",!((e=c(5,22,o.selectedEntities$))!=null&&e.length)),s(6),p("label",n("global.name"))("ngModel",t.folderName),s(),p("id","interval")("label",n("global.interval"))("ngModel",t.interval),s(),p("ngIf",c(9,24,o.filterSource$)),s(3),p("label",n("global.description"))("ngModel",t.description)}}function Xs(i,a){if(i&1&&(y(0,3),u(1,Js,12,26,"neptun-filter-v2",4),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function el(i,a){if(i&1){let e=E();y(0),d(1,"neptun-sortable-filterable-table-view",1),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),l(8,"async"),l(9,"async"),l(10,"async"),w("sortItems",function(n){_(e);let o=r();return f(o.sortItems(n))})("toggleFilter",function(){_(e);let n=r();return f(n.toggleFilter())})("getNextItems",function(n){_(e);let o=r();return f(o.getNextItems(n))})("itemSelected",function(n){_(e);let o=r();return f(o.setSelectedItems(n))})("itemAction",function(n){_(e);let o=r();return f(o.itemAction(n))})("tableAction",function(n){_(e);let o=r();return f(o.callActionCallback(n))}),u(11,Xs,3,3,"ng-container",2),l(12,"async"),m(),v()}if(i&2){let e,t,n=a.$implicit,o=r();s(),p("data",c(2,13,o.dataSource$))("title",n("menu.documentLibrary.foldersSharedWithMe"))("columns",c(3,15,o.displayedColumns$))("tableId","my-uploaded-documents")("headerActions",c(4,17,o.moreActionsMenuItems$))("filterCount",c(5,19,o.filterCount$))("isNextVisible",c(6,21,o.isNextVisible$)===!0)("orderByMenu",c(7,23,o.orderByMenu$))("isListLoading",c(8,25,o.isListLoading$)===!0)("isSelectable",!0)("selectedCount",(e=(e=c(9,27,o.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("tableActions",(t=c(10,29,o.tableActions$))!==null&&t!==void 0?t:j(33,Qs)),s(10),p("ngIf",c(12,31,o.filterModel$))}}var Kr=(()=>{class i extends Ae{constructor(e,t,n,o,x,b){super(e),this.foldersSharedWithMeStore=e,this.store=t,this.transloco=n,this.documentLibrary=o,this.router=x,this.route=b,this.exportTitle="menu.documentLibrary.foldersSharedWithMe",this.containerStatus$=this.documentLibrary.getContainerStatus(),this.filterSource$=this.foldersSharedWithMeStore.folderSharedTypes$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([z,$])=>ee(z)?fe(z.data.map(Q=>this.convertToTableRow(Q,$.some(Ce=>Ce.id===Q.id)),z.isPagingLoading??!1)):z))}initialize(){ee(this.listState.entities)?this.foldersSharedWithMeStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.foldersSharedWithMeStore.getColumns(),this.foldersSharedWithMeStore.loadOrderBy(),this.foldersSharedWithMeStore.getPreviousFilters(),this.foldersSharedWithMeStore.getFolderSharedTypes(),this.foldersSharedWithMeStore.updateFilterModel(F({},this.listState.contracts.filterModel)),this.foldersSharedWithMeStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.foldersSharedWithMeStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.foldersSharedWithMeStore.defaultPagingNumber})))).subscribe()),this.foldersSharedWithMeStore.updateTableActions([this.cancelAction,this.downloadAction])}loadModuleState(){return this.store.selectSnapshot(te.foldersSharedWithMeList)}resetModuleState(){this.store.dispatch(new A.ResetFoldersSharedWithMeListState)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.foldersSharedWithMeStore.updateSelectedEntities([])}}get downloadAction(){let e={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_SharedWithMeFoldersListViewDownloadGridFunction};return{text:this.transloco.translate("button.download"),icon:H.Download,permission:e,type:me.Download,callback:()=>this.foldersSharedWithMeStore.downloadFiles()}}convertToTableRow(e,t){let n=()=>{this.foldersSharedWithMeStore.saveListState(),this.router.navigate([e.id],{relativeTo:this.route,queryParams:I(F({}
1,this.route.snapshot.queryParams),{folderName:e.folderName})})},o={controllerName:"DocumentContainer",actionName:"GetFolderSharedWithStudentDetails"};return{data:e,detailsCallback:n,selected:t,detailsPermission:o,actions:{details:{text:"button.details",permission:o,hasArrow:!0,color:Ie.Primary,callback:n}}}}static{this.\u0275fac=function(t){return new(t||i)(g(Cn),g(R),g(ce),g(ve),g(ue),g(ie))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-folders-shared-with-me"]],features:[le([st,Cn,Fe]),re],decls:1,vars:0,consts:[[4,"transloco"],[1,"neptun-wrapper",3,"sortItems","toggleFilter","getNextItems","itemSelected","itemAction","tableAction","data","title","columns","tableId","headerActions","filterCount","isNextVisible","orderByMenu","isListLoading","isSelectable","selectedCount","tableActions"],["filters","",4,"ngIf"],["filters",""],["class","neptun-wrapper-padding",3,"keepOpen","previousFilter","showMoreFilter","hasMoreFilter","isLoading","canFilter","keepOpenChanged","showMoreFilterChanged","filterClick","latestFilterLoad","resetFilter","closed",4,"ngIf"],[1,"neptun-wrapper-padding",3,"keepOpenChanged","showMoreFilterChanged","filterClick","latestFilterLoad","resetFilter","closed","keepOpen","previousFilter","showMoreFilter","hasMoreFilter","isLoading","canFilter"],["id","folderName","name","folderName",1,"filter-element",3,"label","ngModel"],["name","interval","fromDateKey","start","toDateKey","end",1,"filter-element",3,"id","label","ngModel"],[4,"ngIf"],["moreFilter",""],["id","description","name","description",1,"filter-element",3,"label","ngModel"],["test-id","status-error",3,"fieldName"],["test-id","documentTypes-loading",1,"placeholder"],["id","shareType","name","shareType",1,"filter-element",3,"label","isAllItemsAnOption","ngModel","dataSource"]],template:function(t,n){t&1&&u(0,el,13,34,"ng-container",0)},dependencies:[K,ni,Z,rt,Qe,Ne,Pe,Ue,rn,oi,yt,vt,X,ge,pe,he],encapsulation:2,changeDetection:0})}}return i})();var Sn=(()=>{class i extends Jt{constructor(e,t,n){super({details:h,isDocumentDownloading:!1}),this.dataFetcherService=e,this.documentLibraryService=t,this.fileService=n,this.details$=this.select(o=>o.details),this.isDocumentDownloading$=this.select(o=>o.isDocumentDownloading),this.addDetails=this.updater((o,x)=>I(F({},o),{details:x})),this.updateIsDocumentDownloading=this.updater((o,x)=>I(F({},o),{isDocumentDownloading:x})),this.getDetails=this.effect(o=>o.pipe(D(()=>this.addDetails(Se)),W(x=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetDocumentDetailsUploadedForStudent",{documentationId:x}).pipe(D(b=>{this.addDetails({data:b})}),ae(b=>(this.addDetails(ye),de(()=>b))))))),this.downloadDocument=this.effect(o=>o.pipe(D(()=>this.updateIsDocumentDownloading(!0)),W(x=>this.documentLibraryService.downloadDocumentationOrZip(x).pipe(D(b=>{this.fileService.downloadFile(b),this.updateIsDocumentDownloading(!1)}),ae(b=>(this.updateIsDocumentDownloading(!1),de(()=>b)))))))}static{this.\u0275fac=function(t){return new(t||i)(V(Pt),V(ve),V(ke))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var il=()=>({dateStyle:"long"}),nl=()=>({dateStyle:"long",timeStyle:"short"});function ol(i,a){if(i&1){let e=E();d(0,"button",8),w("click",function(){_(e);let n=r(2).ngIf,o=r(2);return f(o.downloadDocument(n.data.id))}),C(1),m()}if(i&2){let e=a.ngIf,t=r(3).$implicit,n=r();p("accent","flat")("disabled",e.value)("loading",e.value)("permissionRequired",n.downloadDocumentPermission),s(),T(t("button.download"))}}function rl(i,a){if(i&1&&(d(0,"neptun-card",10)(1,"div",11)(2,"p"),C(3),m(),d(4,"h4"),C(5),m()(),d(6,"div",11)(7,"p"),C(8),m(),d(9,"h4"),C(10),l(11,"translocoDate"),l(12,"hyphen"),m()()()),i&2){let e=r(3).ngIf,t=r().$implicit;s(3),M("",t("global.status"),":"),s(2),T(e.data.status),s(3),M("",t("requestForm.validity"),":"),s(2),T(c(12,7,He(11,4,e.data.acceptedTo,j(9,il))))}}function al(i,a){if(i&1&&u(0,rl,13,10,"neptun-card",9),i&2){let e=r(2).ngIf;p("ngIf",e.data.status)}}function sl(i,a){if(i&1&&(d(0,"neptun-data-view")(1,"dl")(2,"div",12)(3,"dt"),C(4),m(),d(5,"dd"),C(6),l(7,"hyphen"),m()(),d(8,"div",12)(9,"dt"),C(10),m(),d(11,"dd"),C(12),l(13,"hyphen"),m()(),d(14,"div",12)(15,"dt"),C(16),m(),d(17,"dd"),C(18),l(19,"translocoDate"),l(20,"hyphen"),m()(),d(21,"div",12)(22,"dt"),C(23),m(),d(24,"dd"),C(25),l(26,"hy
1phen"),m()(),d(27,"div",12)(28,"dt"),C(29),m(),d(30,"dd"),C(31),l(32,"hyphen"),m()()()()),i&2){let e=r(2).ngIf,t=r().$implicit;s(4),T(t("global.type")),s(2),T(c(7,10,e.data.documentationType)),s(4),T(t("global.language")),s(2),T(c(13,12,e.data.language)),s(4),T(t("documentLibrary.uploadedAt")),s(2),T(c(20,17,He(19,14,e.data.created,j(23,nl)))),s(5),T(t("documentLibrary.registrationNumber")),s(2),T(c(26,19,e.data.registrationNumber)),s(4),T(t("global.description")),s(2),T(c(32,21,e.data.description))}}function ll(i,a){if(i&1&&(y(0),L(1,"neptun-primary-title",2),d(2,"div",3),u(3,ol,2,5,"button",4),l(4,"async"),m(),d(5,"div",5)(6,"neptun-basic-layout"),u(7,al,1,1,"ng-template",6)(8,sl,33,24,"ng-template",7),m()(),v()),i&2){let e=r().ngIf,t=r(2);s(),p("title",e.data.documentationName),s(2),p("ngIf",c(4,2,t.isDocumentDownloading$))}}function cl(i,a){i&1&&(y(0),d(1,"div",5),L(2,"neptun-details-loading-placeholder",13),m(),v()),i&2&&(s(2),p("hasButton",!0))}function pl(i,a){i&1&&(y(0),L(1,"neptun-request-error-indicator",14),v())}function ml(i,a){if(i&1&&(y(0),u(1,ll,9,4,"ng-container",1),l(2,"isResultRequest"),u(3,cl,3,1,"ng-container",1),l(4,"isLoadingRequest"),u(5,pl,2,0,"ng-container",1),l(6,"hasError"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function dl(i,a){if(i&1&&(y(0),u(1,ml,7,9,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.details$))}}var Yr=(()=>{class i{constructor(e,t){this.activatedRoute=e,this.fromOthersDetailsStore=t,this.details$=this.fromOthersDetailsStore.details$,this.isDocumentDownloading$=this.fromOthersDetailsStore.isDocumentDownloading$.pipe(O(n=>({value:n}))),this.downloadDocumentPermission={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_DownloadDocumentsUploadedForStudent}}ngOnInit(){this.fromOthersDetailsStore.getDetails(this.activatedRoute.snapshot.params.documentId)}downloadDocument(e){this.fromOthersDetailsStore.downloadDocument(e)}static{this.\u0275fac=function(t){return new(t||i)(g(ie),g(Sn))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-from-others-details"]],features:[le([Sn])],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],[3,"title"],[1,"neptun-wrapper-padding"],["neptun-button","","id","from-others-download-button","class","responsive","test-id","from-others-download-button",3,"accent","disabled","loading","permissionRequired","click",4,"ngIf"],[1,"neptun-wrapper"],["neptunBasicLayoutLeftContent",""],["neptunBasicLayoutRightContent",""],["neptun-button","","id","from-others-download-button","test-id","from-others-download-button",1,"responsive",3,"click","accent","disabled","loading","permissionRequired"],["class","status",4,"ngIf"],[1,"status"],[1,"status__content"],["neptunDataViewItem",""],["test-id","loading",3,"hasButton"],["test-id","details-error"]],template:function(t,n){t&1&&u(0,dl,3,3,"ng-container",0)},dependencies:[K,Z,xe,_e,Me,ft,bt,At,_t,nt,ot,it,Re,X,ut,tt,ge,pe,he],styles:[".status[_ngcontent-%COMP%]{color:#213055;width:400px;height:fit-content;margin-right:48px}.status__content[_ngcontent-%COMP%] + .status__content[_ngcontent-%COMP%]{margin-top:24px}button[_ngcontent-%COMP%]{margin-bottom:24px}@media only screen and (max-width:767px){neptun-data-view[_ngcontent-%COMP%]{padding-left:20px}}"],changeDetection:0})}}return i})();var yn=(()=>{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{documentationName:"",documentationType:""}},interfaceIdentity:Y.DocumentLibraryByMe,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"documentationName"},{text:"global.status",key:"uiDisplayStateText",onlyExport:!0,type:"computed",compute:e=>e.uiDisplayState.reasons.join(",")},{text:"global.type",key:"documentationType"},{text:"documentLibrary.uploadedAt",key:"documentationUploadDate",dateStyle:"long",timeStyle:"short",type:"date"},{text:"documentLibrary.registrationNumber",key:"registrationNumber"}],columns:h,displayedColumns:h,documentTypes:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h}),this.endPoint="DocumentContainer/GetDocumentsUploadedForStudent",this.defaultPagingNumber=10,this.store=k(R),this.documentLibraryService=k(ve),this.fileService=k(ke),this.documentType$=this.select(e=>e.documentTypes),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new A.SaveUploadedFromOthersList(t))}))),this.updateDocumentTypes=this.updater((e,t)=>
1I(F({},e),{documentTypes:t})),this.getDocumentTypes=this.effect(e=>e.pipe(D(()=>this.updateDocumentTypes(Se)),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetDocumentUploadedForStudentTypes",{}).pipe(wt(t=>{this.updateDocumentTypes({data:t})},t=>(this.updateDocumentTypes(ye),de(()=>t))))))),this.downloadFiles=this.effect(e=>e.pipe(oe(this.selectedEntities$),O(([,t])=>t.map(n=>n.id)),W(t=>this.documentLibraryService.downloadDocumentationOrZip(t).pipe(D(n=>{this.fileService.downloadFile(n)})))))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var _l=()=>[];function fl(i,a){if(i&1&&(y(0),L(1,"neptun-filter-field-error-indicator",8),v()),i&2){let e=r(4).$implicit;s(),p("fieldName",e("global.type"))}}function gl(i,a){i&1&&(y(0),L(1,"neptun-rectangle-placeholder",9),v())}function hl(i,a){if(i&1&&(y(0),L(1,"neptun-form-select",10),v()),i&2){let e=r().ngIf,t=r(2).ngIf,n=r().$implicit;s(),p("label",n("global.type"))("ngModel",t.documentationType)("isAllItemsAnOption",!0)("dataSource",e.data)}}function Cl(i,a){if(i&1&&(y(0),u(1,fl,2,1,"ng-container",7),l(2,"hasError"),u(3,gl,2,0,"ng-container",7),l(4,"isLoadingRequest"),u(5,hl,2,4,"ng-container",7),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function Sl(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",5),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),w("keepOpenChanged",function(){_(e);let n=r(3);return f(n.setKeepOpenChanged())})("filterClick",function(n){_(e);let o=r(3);return f(o.filterItems(n))})("latestFilterLoad",function(n){_(e);let o=r(3);return f(o.loadLatestFilter(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("closed",function(){_(e);let n=r(3);return f(n.toggleFilter())}),L(5,"neptun-form-input",6),u(6,Cl,7,9,"ng-container",7),l(7,"async"),m()}if(i&2){let e,t=r().ngIf,n=r().$implicit,o=r();p("keepOpen",c(1,7,o.keepFilterOpen$)===!0)("previousFilter",c(2,9,o.previousFilters$))("isLoading",c(3,11,o.isFiltering$)===!0)("canFilter",!((e=c(4,13,o.selectedEntities$))!=null&&e.length)),s(5),p("label",n("global.name"))("ngModel",t.documentationName),s(),p("ngIf",c(7,15,o.documentTypes$))}}function yl(i,a){if(i&1&&(y(0,3),u(1,Sl,8,17,"neptun-filter-v2",4),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function vl(i,a){if(i&1){let e=E();y(0),d(1,"neptun-sortable-filterable-table-view",1),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),l(8,"async"),l(9,"async"),l(10,"async"),w("sortItems",function(n){_(e);let o=r();return f(o.sortItems(n))})("toggleFilter",function(){_(e);let n=r();return f(n.toggleFilter())})("getNextItems",function(n){_(e);let o=r();return f(o.getNextItems(n))})("itemSelected",function(n){_(e);let o=r();return f(o.setSelectedItems(n))})("itemAction",function(n){_(e);let o=r();return f(o.itemAction(n))})("tableAction",function(n){_(e);let o=r();return f(o.callActionCallback(n))}),u(11,yl,3,3,"ng-container",2),l(12,"async"),m(),v()}if(i&2){let e,t,n=a.$implicit,o=r();s(),p("data",c(2,13,o.dataSource$))("title",n("menu.documentLibrary.documentsForMe"))("columns",c(3,15,o.displayedColumns$))("tableId","my-uploaded-documents")("headerActions",c(4,17,o.moreActionsMenuItems$))("filterCount",c(5,19,o.filterCount$))("isNextVisible",c(6,21,o.isNextVisible$)===!0)("orderByMenu",c(7,23,o.orderByMenu$))("isListLoading",c(8,25,o.isListLoading$)===!0)("isSelectable",!0)("selectedCount",(e=(e=c(9,27,o.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("tableActions",(t=c(10,29,o.tableActions$))!==null&&t!==void 0?t:j(33,_l)),s(10),p("ngIf",c(12,31,o.filterModel$))}}var Zr=(()=>{class i extends Ae{constructor(e,t,n,o,x){super(e),this.fromOthersStore=e,this.router=t,this.store=n,this.translocoService=o,this.activatedRoute=x,this.exportTitle="menu.documentLibrary.documentsForMe",this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([b,z])=>ee(b)?fe(b.data.map($=>this.convertToTableRow($,z.some(Q=>Q.id===$.id))),b.isPagingLoading??!1):b)),this.documentTypes$=this.fromOthersStore.documentType$}resetModuleState(){this.store.dispatch(new A.ResetUploadedFromOthersList)}initialize(){ee(this.listState.entities)?this.fromOthersStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.fromOthersStore.getColumns(),this.fromOthersStore.loadOrderBy(),this.fromOthersStore.getPreviousFilters(),this.fromOthersStore.getDocumentTypes(),this.fromOthersStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.fromOthersStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.fromOthersStore.defaultPagingNumber})))).subscribe()),this.fromOthersStore.updateTableActions([this.cancelAction,this.downloadAction])}loadModuleState(){return this.store.selectSnapshot(te.uploadedFromOthersList)}get cancelAction(){return{text:this.translocoService.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>{this.fromOthersStore.updateSelectedEntities([])}}}get downloadAction(){let e={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_DownloadDocumentsUploadedForStudent};return{text:this.translocoService.translate("button.download"),icon:H.Download,type:me.Download,permission:e,callback:()=>this.downloadFiles()}}downloadFiles(){this.fromOthersStore.downloadFiles()}convertToTableRow(e,t){let n=()=>{this.fromOthersStore.saveListState(),this.router.navigate([e.id],{relativeTo:this.activatedRoute,queryParams:I(F({},this.activatedRoute.snapshot.queryParams),{documentName:e.documentationName})})},o={controllerName:"DocumentContainer",actionName:"GetDocumentDetailsUploadedForStudent"};return{data:e,detailsCallback:n,selected:t,detailsPermission:o,actions:{details:{text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n,permission:o}}}}static{this.\u0275fac=function(t){return new(t||i)(g(yn),g(ue),g(R),g(ce),g(ie))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-from-others"]],features:[le([yn]),re],decls:1,vars:0,consts:[[4,"transloco"],[1,"neptun-wrapper",3,"sortItems","toggleFilter","getNextItems","itemSelected","itemAction","tableAction","data","title","columns","tableId","headerActions","filterCount","isNextVisible","orderByMenu","isListLoading","isSelectable","selectedCount","tableActions"],["filters","",4,"ngIf"],["filters",""],["class","neptun-wrapper-padding",3,"keepOpen","previousFilter","isLoading","canFilter","keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed",4,"ngIf"],[1,"neptun-wrapper-padding",3,"keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed","keepOpen","previousFilter","isLoading","canFilter"],["id","documentationName","name","documentationName",1,"filter-element",3,"label","ngModel"],[4,"ngIf"],["test-id","status-error",3,"fieldName"],["test-id","documentTypes-loading"],["id","documentationType","name","documentationType",1,"filter-element",3,"label","ngModel","isAllItemsAnOption","dataSource"]],template:function(t,n){t&1&&u(0,vl,13,34,"ng-container",0)},dependencies:[K,ni,Z,rt,Qe,Ne,Pe,Ue,oi,yt,vt,X,ge,pe,he],encapsulation:2,changeDetection:0})}}return i})();var lo=ur(fr(()=>{let i=k(ce),a=k(wi),e=k(Li),t=n=>{let o=[];return n.userCertificationStatus!==Be.Nem_hitelesitheto&&o.push(i.translate(a.transform(n.userCertificationStatus))),n.organizationCertificationStatus!==sn.Nem_hitelesitheto&&o.push(i.translate(e.transform(n.organizationCertificationStatus))),o.join(", ")};return I(F({},yi),{defaultColumns:[...yi.defaultColumns,{text:"global.status",onlyExport:!0,key:"status",type:"computed",compute:n=>t(n)}]})}),gr(),Gr({endPoint:"DocumentContainer/GetTrDocuments",resetAction:new A.ResetTrDocumentsListState,loadSelector:te.trDocumentsList}),Kn((i,a=k(R),e=k(Pt),t=k(ve),n=k(ke))=>({saveListState:Fi(o=>o.pipe(D(()=>{a.dispatch(new A.SaveTrDocumentsListState(dr(i)))}))),getDocumentTypes:Fi(o=>o.pipe(W(()=>i.execute("documentTypes",e.fetchItemFromServer("DocumentContainer/GetTrDocumentTypes",{}
1))))),downloadFiles:Fi(o=>o.pipe(O(()=>i.selectedEntities().map(x=>x.documentationId)),W(x=>t.downloadDocumentationOrZip(x).pipe(D(b=>n.downloadFile(b))))))})),Kn(i=>({initList:Fi(a=>a.pipe(se(()=>ir(i.entities())),D(()=>{i.getColumns(),i.loadOrderBy(),i.getPreviousFilters(),i.getDocumentTypes()}),W(()=>i.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>i.fetchItemsFromServer(I(F({},i.filterModel()),{firstRow:0,lastRow:i.defaultPagingNumber()})))))))})),_r(i=>({onInit(){i.handleNavigation(i.initList)}})));function bl(i,a){if(i&1&&(y(0),L(1,"neptun-filter-field-error-indicator",11),v()),i&2){let e=r(4).$implicit;s(),p("fieldName",e("global.type"))}}function xl(i,a){i&1&&(y(0),L(1,"neptun-rectangle-placeholder",12),v())}function Dl(i,a){if(i&1&&(y(0),L(1,"neptun-form-select",13),v()),i&2){let e=r().ngIf,t=r(2).ngIf,n=r().$implicit;s(),p("label",n("global.type"))("isAllItemsAnOption",!0)("ngModel",t.documentationType)("dataSource",e.data)}}function Fl(i,a){if(i&1&&(y(0),u(1,bl,2,1,"ng-container",7),l(2,"hasError"),u(3,xl,2,0,"ng-container",7),l(4,"isLoadingRequest"),u(5,Dl,2,4,"ng-container",7),l(6,"isResultRequest"),L(7,"neptun-form-checkbox",8)(8,"neptun-form-checkbox",9)(9,"neptun-form-checkbox",10),v()),i&2){let e=a.ngIf,t=r(2).ngIf,n=r().$implicit,o=r();s(),p("ngIf",c(2,10,e)),s(2),p("ngIf",c(4,12,e)),s(2),p("ngIf",c(6,14,e)),s(2),p("label",n("documentLibrary.onlyCertified"))("ngModel",t.isOnlyCertificated),s(),p("label",n("documentLibrary.toBeCertified"))("ngModel",t.mustBeCertified),s(),p("label",n("legalRemedy.onlyRemediable"))("permissionRequired",o.getLegalRemedyResolutionDetailsPermission)("ngModel",t.isOnlyLegalRemediableFilter)}}function Il(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",5),w("keepOpenChanged",function(){_(e),r(2);let n=mt(1);return f(n.setKeepOpenChanged())})("filterClick",function(n){_(e),r(2);let o=mt(1);return f(o.filterItems(n))})("latestFilterLoad",function(n){_(e),r(2);let o=mt(1);return f(o.loadLatestFilter(n))})("resetFilter",function(){_(e),r(2);let n=mt(1);return f(n.resetFilter())})("closed",function(){_(e),r(2);let n=mt(1);return f(n.toggleFilter())}),L(1,"neptun-form-input",6),u(2,Fl,10,16,"ng-container",7),m()}if(i&2){let e=r().ngIf,t=r().$implicit,n=mt(1);p("keepOpen",n.keepFilterOpen()===!0)("previousFilter",n.previousFilters())("isLoading",n.isFiltering()===!0)("canFilter",!n.selectedEntities().length),s(),p("label",t("global.name"))("ngModel",e.documentationName),s(),p("ngIf",n.documentTypes())}}function Ll(i,a){if(i&1&&(y(0,3),u(1,Il,3,7,"neptun-filter-v2",4),v()),i&2){r();let e=mt(1);s(),p("ngIf",e.isFilterOpen()===!0)}}function wl(i,a){if(i&1){let e=E();y(0),Lo(1),d(2,"neptun-sortable-filterable-table-view",1),w("sortItems",function(n){_(e);let o=mt(1);return f(o.sortItems(n))})("toggleFilter",function(){_(e);let n=mt(1);return f(n.toggleFilter())})("getNextItems",function(n){_(e);let o=mt(1);return f(o.getNextItems(n))})("itemSelected",function(n){_(e);let o=mt(1);return f(o.setSelectedItems(n))})("itemAction",function(n){_(e);let o=mt(1);return f(o.itemAction(n))})("tableAction",function(n){_(e);let o=mt(1);return f(o.callActionCallback(n))}),u(3,Ll,2,1,"ng-container",2),m(),v()}if(i&2){let e=a.$implicit,t=r();s();let n=wo(t.trDocumentsStore);s(),p("data",t.dataSource())("title",e("menu.documentLibrary.trDocuments"))("columns",n.displayedColumns())("tableId","my-uploaded-documents")("headerActions",n.moreActionsMenuItems())("filterCount",n.filterCount())("isNextVisible",n.isNextVisible()===!0)("orderByMenu",n.orderByMenu())("isListLoading",n.isListLoading()===!0)("isSelectable",!0)("selectedCount",n.selectedEntities().length)("tableActions",n.tableActions()),s(),p("ngIf",n.filterModel())}}var Jr=(()=>{class i{constructor(){this.trDocumentsStore=k(lo),this.translocoService=k(ce),this.router=k(ue),this.activatedRoute=k(ie),this.studentCertificationStateIconEvaluatorPipe=k(Zn),this.organizationCertificationStateIconEvaluatorPipe=k(Yn),this.studentCertificationStateTextEvaluatorPipe=k(wi),this.organizationCertificationStateTextEvaluatorPipe=k(Li),this.dialogService=k(Oe),this.getLegalRemedyResolutionDetail
1sPermission={controllerName:"LegalRemedy",actionName:"GetLegalRemedyResolutionDetails"},this.dataSource=zn(()=>{let e=this.trDocumentsStore.entities(),t=this.trDocumentsStore.selectedEntities();return ee(e)?fe(e.data.map(n=>this.convertToTableRow(n,t.some(o=>o.documentationId===n.documentationId))),e.isPagingLoading??!1):e}),this.tableActions=zn(()=>{let e=this.trDocumentsStore.selectedEntities();return e.length===0?[]:e.some(n=>n.userCertificationStatus===Be.Hitelesitheto||n.userCertificationStatus===Be.Ujra_bekuldheto)?[this.cancelAction,this.certifyAction,this.downloadAction]:[this.cancelAction,this.downloadAction]}),this.trDocumentsStore.updateExportTitle("menu.documentLibrary.trDocuments"),Eo(()=>{this.trDocumentsStore.updateTableActions(this.tableActions())})}get cancelAction(){return{text:this.translocoService.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>{this.trDocumentsStore.updateSelectedEntities([])}}}get downloadAction(){let e={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_TrDocumentsDownload};return{text:this.translocoService.translate("button.download"),icon:H.Download,type:me.Download,permission:e,callback:()=>this.downloadFiles()}}get certifyAction(){let e={controllerName:"Avdh",actionName:"RequestFileSign"};return{text:this.translocoService.translate("documentLibrary.certify"),icon:H.Shield,type:me.Certify,permission:e,callback:t=>this.openCertifyDialog(t)}}openCertifyDialog(e){let t={isOpenedFromDetails:!1,sourceType:"tr-documents",certifiableDocuments:e.filter(n=>n.userCertificationStatus===Be.Hitelesitheto||n.userCertificationStatus===Be.Ujra_bekuldheto).map(n=>this.convertToDocInfo(n,!0)),notCertifiableDocuments:e.filter(n=>n.userCertificationStatus===Be.Hitelesites_folyamatban||n.userCertificationStatus===Be.Hitelesitve||n.userCertificationStatus===Be.Nem_hitelesitheto).map(n=>this.convertToDocInfo(n,!1))};this.dialogService.openDialog(Ii,{avdhCertificationData:t})}convertToDocInfo(e,t){return{id:e.documentationId,name:e.documentationName,selected:t,status:[]}}downloadFiles(){this.trDocumentsStore.downloadFiles()}convertToTableRow(e,t){let n=()=>{this.trDocumentsStore.saveListState(),this.router.navigate([e.documentationId],{relativeTo:this.activatedRoute,queryParams:I(F({},this.activatedRoute.snapshot.queryParams),{documentName:e.documentationName})})},o={controllerName:"DocumentContainer",actionName:"GetTrDocumentDetails"};return{data:F({},e),elementInfo:this.getDocumentCertificationInfo(e),statusColor:this.getRowElementStatusColor(e),detailsCallback:n,selected:t,detailsPermission:o,actions:{details:{text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n,permission:o}}}}getRowElementStatusColor(e){return e.userCertificationStatus===Be.Hitelesitheto?Ie.Warning:e.userCertificationStatus===Be.Ujra_bekuldheto?Ie.Error:void 0}getDocumentCertificationInfo(e){let t=[];return e.userCertificationStatus!==Be.Nem_hitelesitheto&&t.push({iconClass:this.studentCertificationStateIconEvaluatorPipe.transform(e.userCertificationStatus),description:this.translocoService.translate(this.studentCertificationStateTextEvaluatorPipe.transform(e.userCertificationStatus))}),e.organizationCertificationStatus!==sn.Nem_hitelesitheto&&t.push({iconClass:this.organizationCertificationStateIconEvaluatorPipe.transform(e.organizationCertificationStatus),description:this.translocoService.translate(this.organizationCertificationStateTextEvaluatorPipe.transform(e.organizationCertificationStatus))}),t}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-generated"]],features:[le([Yn,Zn,Li,wi,lo])],decls:1,vars:0,consts:[[4,"transloco"],[1,"neptun-wrapper",3,"sortItems","toggleFilter","getNextItems","itemSelected","itemAction","tableAction","data","title","columns","tableId","headerActions","filterCount","isNextVisible","orderByMenu","isListLoading","isSelectable","selectedCount","tableActions"],["filters","",4,"ngIf"],["filters",""],["class","neptun-wrapper-padding",3,"keepOpen","previousFilter","isLoading","canFilter","keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed",4,"ngIf"],[1,"neptun-wrapper-padding",3,"keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed","keepOpen","previousFilter","isLoading","canFilter"],["id","documentationName","name","documentationName",1,"filter-element",3,"label","ngModel"],[4,"ngIf"],["id","isOnlyCertificated","name","isOnlyCertificated",1,"filter-element",3,"label","ngModel"],["id","mustBeCertified","name","mustBeCertified",1,"filter-element",3,"label","ngModel"],["id","isOnlyLegalRemediableFilter","name","isOnlyLegalRemediableFilter",3,"label","permissionRequired","ngModel"],["test-id","status-error",3,"fieldName"],["test-id","documentTypes-loading"],["id","documentationType","name","documentationType",1,"filter-element",3,"label","isAllItemsAnOption","ngModel","dataSource"]],template:function(t,n){t&1&&u(0,wl,4,14,"ng-container",0)},dependencies:[K,ni,Z,rt,Qe,Ne,Pe,Ue,oi,yt,vt,Zi,Me,ge,pe,he],encapsulation:2,changeDetection:0})}}return i})();function Xr(i,a){return e=>e.value.map(x=>x.size).reduce((x,b)=>x+b,0)>i?{serverError:a.translate("documentLibrary.fileSizeErrorMessage")}:null}var ea=(()=>{class i{transform(e){return e?.toString().replace(/,/g,"")||""}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275pipe=Io({name:"nocomma",type:i,pure:!0})}}return i})();function Tl(i,a){if(i&1&&(d(0,"div",1)(1,"div",2)(2,"neptun-semi-pie-chart",3)(3,"h1"),C(4),l(5,"number"),l(6,"nocomma"),m(),d(7,"h4"),C(8,"%"),m()()(),d(9,"div",4)(10,"div")(11,"p",5),C(12),l(13,"uppercase"),m(),d(14,"h3"),C(15),l(16,"formatKBytes"),m()(),d(17,"div")(18,"p",5),C(19),l(20,"uppercase"),m(),d(21,"h3"),C(22),l(23,"formatKBytes"),m()(),d(24,"div")(25,"p",5),C(26),l(27,"uppercase"),m(),d(28,"h3"),C(29),l(30,"formatKBytes"),m()()()()),i&2){let e=a.$implicit,t=r();s(2),p("chartPercentage",t.percentage)("size",180)("label",t.label),s(2),T(c(6,13,He(5,10,t.percentage*100,"1.0-0"))),s(8),T(c(13,15,e("documentLibrary.freeCapacity"))),s(3),M("",c(16,17,t.freeStorage)," "),s(4),T(c(20,19,e("documentLibrary.occupiedCapacity"))),s(3),T(c(23,21,t.reservedStorage)),s(4),T(c(27,23,e("documentLibrary.storageSize"))),s(3),T(c(30,25,t.storageSize))}}var vi=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-storage-statistics"]],inputs:{percentage:"percentage",storageSize:"storageSize",freeStorage:"freeStorage",reservedStorage:"reservedStorage",label:"label"},decls:1,vars:0,consts:[["class","storage-statistics",4,"transloco"],[1,"storage-statistics"],[1,"chart"],[3,"chartPercentage","size","label"],[1,"usage"],[1,"storage-statistics_title"]],template:function(t,n){t&1&&u(0,Tl,31,27,"div",0)},dependencies:[K,nr,Ro,Bo,Zt,ea],styles:[".storage-statistics[_ngcontent-%COMP%]{display:flex;margin:48px 0;max-width:814px}p[_ngcontent-%COMP%]{font-size:13px}.chart[_ngcontent-%COMP%]{margin-right:48px}.usage[_ngcontent-%COMP%]{display:flex}.usage[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-right:32px}.storage-statistics_title[_ngcontent-%COMP%]{color:#666}@media only screen and (min-width:320px){.storage-statistics[_ngcontent-%COMP%]{flex-direction:column}.chart[_ngcontent-%COMP%]{margin:auto}.usage[_ngcontent-%COMP%]{flex-direction:column;gap:32px;padding-top:32px;padding-left:20px}}@media only screen and (min-width:375px){.storage-statistics[_ngcontent-%COMP%]{gap:48px}.storage-statistics[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.usage[_ngcontent-%COMP%]{flex-wrap:wrap;gap:48px}}@media only screen and (min-width:375px)and (orientation:landscape){.storage-statistics[_ngcontent-%COMP%]{flex-direction:column;gap:20px;padding-left:unset;align-items:center}.usage[_ngcontent-%COMP%]{flex-direction:row;width:100%;justify-content:space-evenly}}@media only screen and (min-width:768px){.storage-statistics[_ngcontent-%COMP%]{gap:unset;flex-direction:row;padding-left:20px}.chart[_ngcontent-%COMP%]{margin:unset}.usage[_ngcontent-%COMP%]{gap:12px;padding:0 0 0 48px;align-items:center}}@media only screen and (min-width:993px){.usage[_ngcontent-%COMP%]{flex-wrap:nowrap}.usage[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;min-width:230px}}"]})}}return i})();var bi=(()=>{class i extends Kt{constructor(e){super(),this.http=e,this.columns=[{text:"finalExams.examName",key:"groupName"},{text:"documentLibrary.members",key:"groupMembersCount"}]}getItemsFromServer(e,t,n,o){let x={request:I(F({},n),{documentId:this.folderId}),sort:this.getSortModel(e,t,o)};return this.http.get(`${De.settings.apiServer.url}DocumentContainer/GetLinkablePersonGroups`,{params:Bt(x)}).pipe(O(b=>b.data))}linkPersonGroupsToFolder(e,t){return this.http.post(`${De.settings.apiServer.url}DocumentContainer/LinkPersonGroup`,{folderId:e,linkableIds:t})}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var vn=(()=>{class i extends Kt{constructor(e){super(),this.http=e,this.columns=[{text:"global.name",key:"name",disableSort:!0},{text:"global.type",key:"type",disableSort:!0}]}getItemsFromServer(e,t,n,o){let x=I(F({},n),{sort:this.getSortModel(e,t,o)});return this.http.get(`${De.settings.apiServer.url}DocumentContainer/GetLinkableVirtualSpaces`,{params:Bt(x)}).pipe(O(b=>b.data))}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var bn=(()=>{class i{constructor(e,t){this.http=e,this.actualTermService=t}deleteGroupConnections(e,t){return this.http.post(`${De.settings.apiServer.url}DocumentContainer/RemovePersonGroupFromFolder`,{virtualSpaceId:t,connectionIds:e})}getDetails(e){let t={virtualSpaceId:e};return this.http.get(`${De.settings.apiServer.url}DocumentContainer/GetVirtualSpaceDetails`,{params:Bt(t)}).pipe(O(n=>n.data))}getVirtualSpaceTypes(){return this.http.get(`${De.settings.apiServer.url}DocumentContainer/GetVirtualSpaceTypes`).pipe(O(e=>e.data))}getTermsForVirtualSpaces(){return this.actualTermService.getTermsWithActualTerm("DocumentContainer/GetStudentTerms")}static{this.\u0275fac=function(t){return new(t||i)(V(Te),V(Er))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var na=(()=>{class i extends Kt{constructor(e){super(),this.http=e,this.columns=[{text:"documentLibrary.person",key:"printName",disableSort:!0}
1,{text:"login.nickName",key:"nickName",disableSort:!0},{text:"menu.documentLibrary.membership",key:"memberType",disableSort:!0}]}getItemsFromServer(e,t,n,o){let x=I(F({},n),{sortAndPage:this.getSortModel(e,t,o)});return this.http.get(`${De.settings.apiServer.url}DocumentContainer/GetVirtualSpaceMembers`,{params:Bt(x)}).pipe(O(b=>b.data))}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var El=()=>({iconClass:"icon-chevron-left",fontSize:"12px"});function Ol(i,a){if(i&1&&(d(0,"neptun-data-view")(1,"dl")(2,"div",8)(3,"dt"),C(4),m(),d(5,"dd"),C(6),l(7,"hyphen"),m()(),d(8,"div",8)(9,"dt"),C(10),m(),d(11,"dd"),C(12),l(13,"hyphen"),m()(),d(14,"div",8)(15,"dt"),C(16),m(),d(17,"dd"),C(18),l(19,"hyphen"),m()(),d(20,"div",8)(21,"dt"),C(22),m(),d(23,"dd"),C(24),l(25,"boolToString"),l(26,"hyphen"),m()(),d(27,"div",8)(28,"div"),C(29),l(30,"hyphen"),m()()()()),i&2){let e=a.ngIf,t=r(2).$implicit;s(4),T(t("menu.documentLibrary.communitySpaceName")),s(2),T(c(7,9,e.name)),s(4),T(t("finalExams.periodType")),s(2),T(c(13,11,e.spaceType)),s(4),T(t("personal.term")),s(2),T(c(19,13,e.term)),s(4),T(t("documentLibrary.favourite")),s(2),T(c(26,17,c(25,15,e.isFavourite))),s(5),T(c(30,19,e.description))}}function Rl(i,a){i&1&&L(0,"neptun-details-loading-placeholder")}function Bl(i,a){if(i&1){let e=E();d(0,"neptun-data-table",9),l(1,"async"),l(2,"async"),w("getNext",function(n){_(e);let o=r(3);return f(o.getNextItems(n))}),m()}if(i&2){let e=a.ngIf,t=r(3);
1p("dataSource",e.result)("columns",c(1,6,t.displayedColumns$))("selectable",!1)("isNextVisible",e.isNextVisible)("loadingPlaceholder",c(2,8,t.loadingPlaceholder$))("backToTopEnabled",!1)}}function Pl(i,a){if(i&1&&(u(0,Ol,31,21,"neptun-data-view",5),l(1,"async"),u(2,Rl,1,0,"ng-template",null,2,Ge),d(4,"h3",6),C(5),m(),u(6,Bl,3,10,"neptun-data-table",7),l(7,"async")),i&2){let e=Lt(3),t=r().$implicit,n=r();p("ngIf",c(1,4,n.virtualSpaceDetails$))("ngIfElse",e),s(5),T(t("documentLibrary.members")),s(),p("ngIf",c(7,6,n.dataSource$))}}function Nl(i,a){if(i&1){let e=E();d(0,"button",10),w("click",function(){_(e);let n=r(2);return f(n.previous())}),C(1),m()}if(i&2){let e=r().$implicit;p("color","white")("prefixIcon",j(3,El)),s(),M(" ",e("button.back")," ")}}function Al(i,a){if(i&1&&(y(0),d(1,"neptun-multi-step-dialog-step-general-view",4),u(2,Pl,8,8,"ng-template",null,0,Ge)(4,Nl,2,4,"ng-template",null,1,Ge),m(),v()),i&2){let e=a.$implicit;s(),p("title",e("menu.documentLibrary.relatedCommunitySpaceDetails"))}}var oa=(()=>{class i extends Fr{constructor(e,t,n){super(t,n),this.virtualSpacesConnectionsService=e,this.previousClick=new Rt,this.virtualSpaceId="",this.interfaceIdentity=Y.VirtualSpacesDetails}ngOnInit(){this.defaultFilterModel={virtualSpaceId:this.virtualSpaceId},this.virtualSpaceDetails$=this.virtualSpacesConnectionsService.getDetails(this.virtualSpaceId),super.ngOnInit(),this.dataSource$=this.dataSourceWithPaging$.pipe(O(e=>({result:e.result.map(t=>this.convertToTableRow(t)),isNextVisible:e.isNextVisible})))}convertToTableRow(e){return{data:F({},e),imageData:I(F({},e.avatar),{image:e.avatar.image}),actions:{}}}previous(){this.previousClick.emit()}static{this.\u0275fac=function(t){return new(t||i)(g(bn),g(na),g(Zo))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-virtual-spaces-details"]],inputs:{virtualSpaceId:"virtualSpaceId"},outputs:{previousClick:"previousClick"},features:[re],decls:1,vars:0,consts:[["content",""],["actions",""],["loading",""],[4,"transloco"],[3,"title"],[4,"ngIf","ngIfElse"],[1,"details-title"],["class","user-list",3,"dataSource","columns","selectable","isNextVisible","loadingPlaceholder","backToTopEnabled","getNext",4,"ngIf"],["neptunDataViewItem",""],[1,"user-list",3,"getNext","dataSource","columns","selectable","isNextVisible","loadingPlaceholder","backToTopEnabled"],["neptun-button","","id","details-back-button",1,"details-back-button",3,"click","color","prefixIcon"]],template:function(t,n){t&1&&u(0,Al,6,1,"ng-container",3)},dependencies:[K,ei,Z,nt,ot,it,xt,_e,X,tt,er],styles:[".details-title[_ngcontent-%COMP%]{padding-top:24px;font-weight:900}.details-back-button[_ngcontent-%COMP%]{color:#fff}.neptun-data-view[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .mat-mdc-table .main-header-cell{width:unset;padding-left:0}[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .mat-mdc-table .mat-mdc-header-row .main-header-cell{padding-left:0}@media screen and (min-width:768px){[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .table-data-cell--image .table-data-cell-text{padding-left:0}[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .mat-mdc-table .mat-mdc-header-row .mat-mdc-header-cell{padding-left:0}[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .mat-mdc-table .mat-mdc-header-row .mat-mdc-header-cell:first-of-type{padding-left:64px}[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .mat-mdc-table .mat-mdc-row .mat-mdc-cell{padding:20px 0}[_nghost-%COMP%] .user-list[_ngcontent-%COMP%] .mat-mdc-table .mat-mdc-row .mat-mdc-cell:first-of-type:not(.table-sign-cell):not(.table-serial-number-cell){padding-left:0}}"],changeDetection:0})}}return i})();var xn=(()=>{class i extends Xt{constructor(){super()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-virtual-spaces-details-wrapper"]],features:[re],decls:1,vars:1,consts:[[3,"previousClick","virtualSpaceId"]],template:function(t,n){t&1&&(d(0,"neptun-virtual-spaces-details",0),w("previousClick",function(){return n.onPreviousClick()}),m()),t&2&&p("virtualSpaceId",n.result.virtualSpaceId)},dependencies:[oa],encapsulation:2,changeDetection:0})}}return i})();function kl(i,a){}var Dn=(()=>{class i extends en{constructor(e,t){super(e,t),this.dialogRef=e,this.dialogData=t}loadNextStep(){let e;if(this.currentStepIndex==-1)e=this.dialogData.dialogSteps[0].componentType;else if(this.dialogData.result.virtualSpaceId)e=this.dialogData.dialogSteps[1].componentType;else{this.close(this.dialogData.result);return}this.loadStep(e,!0)}static{this.\u0275fac=function(t){return new(t||i)(g($i),g(zt))}}static{this.\u0275cmp=P({type:i,selectors:[["ng-component"]],features:[re],decls:1,vars:0,consts:[["multiStepDialogHost",""]],template:function(t,n){t&1&&u(0,kl,0,0,"ng-template",0)},dependencies:[Xi],encapsulation:2,changeDetection:0})}}return i})();var Fn=(()=>
1{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,contracts:{firstRow:0,lastRow:10,filterModel:{name:"",type:"",term:"",isFavorite:!1}},interfaceIdentity:Y.VirtualSpaceConnectionsList,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"finalExams.examName",key:"name",disableSort:!0},{text:"global.type",key:"type",disableSort:!0}],columns:h,displayedColumns:h,orderBy:h,types:h,terms:h,isDialogCloseable:!0,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h,hiddenFilters:{documentId:""}}),this.endPoint="DocumentContainer/GetLinkableVirtualSpaces",this.store=k(R),this.defaultPagingNumber=10,this.types$=this.select(e=>e.types),this.terms$=this.select(e=>e.terms),this.isDialogCloseable$=this.select(e=>e.isDialogCloseable),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new A.SaveMyShareableFoldersVirtualSpacesList(t))}))),this.updateTypes=this.updater((e,t)=>I(F({},e),{types:t})),this.getTypes=this.effect(e=>e.pipe(D(()=>this.updateTypes(Se)),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetVirtualSpaceTypes",{}).pipe(wt(t=>{this.updateTypes({data:t})},t=>(this.updateTypes(ye),de(()=>t))))))),this.updateTerms=this.updater((e,t)=>I(F({},e),{terms:t})),this.updateIsDialogCloseable=this.updater((e,t)=>I(F({},e),{isDialogCloseable:t})),this.getTerms=this.effect(e=>e.pipe(D(()=>this.updateTerms(Se)),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetStudentTerms",{}).pipe(wt(t=>{this.updateTerms({data:t})},t=>(this.updateTerms(ye),de(()=>t)))))))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Gl=()=>[];function Ul(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",7),l(1,"async"),l(2,"async"),w("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("toggleFilter",function(){_(e);let n=r(3);return f(n.toggleFilter())})("itemAction",function(n){_(e);let o=r(3);return f(o.itemAction(n))}),m()}if(i&2){let e=a.ngIf,t=r(3);p("hasFilter",!0)("filterCount",c(1,4,t.filterCount$))("isFilterOpen",c(2,6,t.isFilterOpen$))("isAnyItemsSelected",e.length>0)}}function $l(i,a){if(i&1&&(u(0,Ul,3,8,"neptun-table-header-actions",6),l(1,"async")),i&2){let e=r(2);p("ngIf",c(1,1,e.selectedEntities$))}}function jl(i,a){if(i&1&&L(0,"neptun-form-select",15),i&2){let e=r().ngIf,t=r(2).ngIf,n=r(2).$implicit;p("label",n("global.type"))("dataSource",e.data)("isAllItemsAnOption",!0)("ngModel",t.type)}}function ql(i,a){i&1&&L(0,"neptun-rectangle-placeholder",16)}function Wl(i,a){if(i&1&&(y(0),u(1,jl,1,4,"neptun-form-select",13),l(2,"isResultRequest"),u(3,ql,1,0,"neptun-rectangle-placeholder",14),l(4,"isLoadingRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,2,e)),s(2),p("ngIf",c(4,4,e))}}function Hl(i,a){if(i&1&&L(0,"neptun-form-select",18),i&2){let e=r().ngIf,t=r(2).ngIf,n=r(2).$implicit;p("label",n("global.semester"))("dataSource",e.data)("isAllItemsAnOption",!0)("ngModel",t.term)}}function Ql(i,a){i&1&&L(0,"neptun-rectangle-placeholder",16)}function zl(i,a){if(i&1&&(y(0),u(1,Hl,1,4,"neptun-form-select",17),l(2,"isResultRequest"),u(3,Ql,1,0,"neptun-rectangle-placeholder",14),l(4,"isLoadingRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,2,e)),s(2),p("ngIf",c(4,4,e))}}function Kl(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",10),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),w("filterClick",function(n){_(e);let o=r(4);return f(o.filterItems(n))})("resetFilter",function(){_(e);let n=r(4);return f(n.resetFilter())})("keepOpenChanged",function(){_(e);let n=r(4);return f(n.setKeepOpenChanged())})("latestFilterLoad",function(n){_(e);let o=r(4);return f(o.loadLatestFilter(n))})("closed",function(){_(e);let n=r(4);return f(n.toggleFilter())}),L(5,"neptun-form-input",11),u(6,Wl,5,6,"ng-container",8),l(7,"async"),u(8,zl,5,6,"ng-container",8),l(9,"async"),L(10,"neptun-form-checkbox",12),m()}if(i&2){let e,t=r().ngIf,n=r(2).$implicit,o=r();p("previousFilter",c(1,11,o.previousFilters$))("keepOpen",c(2,13,o.keepFilterOpen$))("isLoading",c(3,15,o.isFiltering$)===!0)("canFilter",((e=c(4,17,o.selectedEntities$))==null?null:e.length)===0),s(5),p("label",n("global.name"))("ngModel",t.name),s(),p("ngIf",c(7,19,o.types$)),s(2),p("ngIf",c(9,21,o.terms$)),s(2),p("label",n("menu.favorites"))("ngModel",t.isFavorite)("required",!1)}}function Yl(i,a){if(i&1&&(y(0),u(1,Kl,11,23,"neptun-filter-v2",9),l(2,"async"),v()),i&2){let e=r(3);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function Zl(i,a){if(i&1&&(u(0,Yl,3,3,"ng-container",8),l(1,"async")),i&2){let e=r(2);p("ngIf",c(1,1,e.filterModel$))}}function Jl(i,a){i&1&&(y(0),L(1,"neptun-data-table-placeholder",19),v()),i&2&&(s(),p("loading",!0))}function Xl(i,a){i&1&&(d(0,"div",22),L(1,"neptun-request-error-indicator",23),m())}function ec(i,a){if(i&1){let e=E();d(0,"neptun-data-table",24),l(1,"isResultRequest"),l(2,"async"),l(3,"async"),l(4,"isResultRequest"),l(5,"async"),l(6,"async"),w("selected",function(n){_(e);
1let o=r(5);return f(o.setSelectedItems(n))})("sortEmitter",function(n){_(e);let o=r(5);return f(o.sortItems(n))})("getNext",function(n){_(e);let o=r(5);return f(o.getNextItems(n))}),m()}if(i&2){let e=r().ngIf,t=r().ngIf,n=r(3);p("dataSource",c(1,8,e)?e.data:j(20,Gl))("filterCount",c(2,10,n.filterCount$))("isFilterOpen",c(3,12,n.isFilterOpen$))("columns",c(4,14,t)?t.data:null)("selectable",!0)("isNextVisible",c(5,16,n.isNextVisible$)===!0)("loadingPlaceholder",c(6,18,n.isListLoading$)===!0)("backToTopEnabled",!1)}}function tc(i,a){if(i&1&&(y(0),u(1,Xl,2,0,"div",20),l(2,"hasError"),u(3,ec,7,21,"neptun-data-table",21),l(4,"isLoadingRequest"),l(5,"isResultRequest"),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf,t=r().ngIf;s(),p("ngIf",c(2,2,e)),s(2),p("ngIf",c(4,4,e)||c(5,6,e)&&c(6,8,t))}}function ic(i,a){if(i&1&&(y(0),u(1,Jl,2,1,"ng-container",8),l(2,"isLoadingRequest"),u(3,tc,7,10,"ng-container",8),l(4,"async"),v()),i&2){let e=a.ngIf,t=r(3);s(),p("ngIf",c(2,2,e)),s(2),p("ngIf",c(4,4,t.virtualSpaceConnections$))}}function nc(i,a){if(i&1&&(u(0,ic,5,6,"ng-container",8),l(1,"async")),i&2){let e=r(2);p("ngIf",c(1,1,e.columns$))}}function oc(i,a){if(i&1){let e=E();d(0,"button",25),l(1,"async"),w("click",function(){_(e);let n=r(2);return f(n.emitDataAfterClosing())}),C(2),m()}if(i&2){let e=r().$implicit,t=r();p("accent","flat")("disabled",!c(1,3,t.selectedEntities$).length),s(2),T(e("requestForm.selectItems"))}}function rc(i,a){if(i&1&&(y(0),d(1,"neptun-multi-step-dialog-step-general-view",5),l(2,"async"),u(3,$l,2,3,"ng-template",null,0,Ge)(5,Zl,2,3,"ng-template",null,1,Ge)(7,nc,2,3,"ng-template",null,2,Ge)(9,oc,3,5,"ng-template",null,3,Ge),m(),v()),i&2){let e=a.$implicit,t=r();s(),p("isCloseButtonEnabled",c(2,2,t.isDialogCloseable$)===!0)("title",e("documentLibrary.virtualSpaceConnection"))}}var aa=(()=>{class i extends Yi{constructor(e,t){super(e),this.virtualSpacesListStore=e,this.store=t,this.documentId="",this.navigateToLinkableVirtualSpacesDetails=new Rt,this.closeDialog=new Rt,this.isNextVisible$=this.virtualSpacesListStore.isNextVisible$,this.isOrderBySaving$=this.virtualSpacesListStore.isOrderBySaving$,this.listState=this.store.selectSnapshot(te.virtualSpaceDetailsList),this.types$=this.virtualSpacesListStore.types$,this.terms$=this.virtualSpacesListStore.terms$,this.isDialogCloseable$=this.virtualSpacesListStore.isDialogCloseable$,this.virtualSpaceConnections$=we([this.entities$,this.selectedEntities$]).pipe(O(([n,o])=>ee(n)?fe(n.data.map(x=>this.convertToTableRow(x,o.some(b=>b.id===x.id))),n.isPagingLoading??!1):n)),this.canShowLoadingPlaceholder$=this.virtualSpaceConnections$.pipe(O(n=>Yt(n)||ee(n)&&n.isPagingLoading))}ngOnInit(){this.virtualSpacesListStore.updateHiddenFilters({documentId:this.documentId}),ee(this.listState.entities)?this.virtualSpacesListStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.virtualSpacesListStore.getTypes(),this.virtualSpacesListStore.getTerms(),this.virtualSpacesListStore.getColumns(),this.virtualSpacesListStore.loadOrderBy(),this.virtualSpacesListStore.getPreviousFilters(),this.virtualSpacesListStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.virtualSpacesListStore.fetchItemsFromServer({firstRow:0,lastRow:10}))).subscribe())}setSelectedItems(e){let t=e.filter(n=>!n.isAlreadyLinked);this.listStore.updateSelectedEntities(t),this.virtualSpacesListStore.updateIsDialogCloseable(!t.length)}emitDataAfterClosing(){this.selectedEntities$.pipe(J(1),D(e=>this.closeDialog.emit(e))).subscribe()}convertToTableRow(e,t){let n=()=>{this.virtualSpacesListStore.saveListState(),this.navigateToLinkableVirtualSpacesDetails.emit({documentId:this.documentId,virtualSpaceId:e.id})};return{data:e,selected:t||e.isAlreadyLinked,detailsCallback:n,disabled:e.isAlreadyLinked,actions:{details:{text:"menu.details",hasArrow:!0,color:Ie.Primary,callback:n}}}}static{this.\u0275fac=function(t){return new(t||i)(g(Fn),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-virtual-spaces-list"]],inputs:{documentId:"documentId"},outputs:{navigateToLinkableVirtualSpacesDetails:"navigateToLinkableVirtualSpacesDetails",closeDialog:"closeDialog"},features:[le([Fn]),re],decls:1,vars:0,consts:[["headerActions",""],["filter",""],["content",""],["actions",""],[4,"transloco"],[3,"isCloseButtonEnabled","title"],[3,"hasFilter","filterCount","isFilterOpen","isAnyItemsSelected","resetFilter","toggleFilter","itemAction",4,"ngIf"],[3,"resetFilter","toggleFilter","itemAction","hasFilter","filterCount","isFilterOpen","isAnyItemsSelected"],[4,"ngIf"],["class","filter",3,"previousFilter","keepOpen","isLoading","canFilter","filterClick","resetFilter","keepOpenChanged","latestFilterLoad","closed",4,"ngIf"],[1,"filter",3,"filterClick","resetFilter","keepOpenChanged","latestFilterLoad","closed","previousFilter","keepOpen","isLoading","canFilter"],["id","name","name","name",1,"filter-element",3,"label","ngModel"],["id","favorites","name","isFavorite",1,"filter-element",3,"label","ngModel","required"],["id","type","name","type","class","filter-element",3,"label","dataSource","isAllItemsAnOption","ngModel",4,"ngIf"],["class","placeholder",4,"ngIf"],["id","type","name","type",1,"filter-element",3,"label","dataSource","isAllItemsAnOption","ngModel"],[1,"placeholder"],["id","term","name","term","class","filter-element",3,"label","dataSource","isAllItemsAnOption","ngModel",4,"ngIf"],["id","term","name","term",1,"filter-element",3,"label","dataSource","isAllItemsAnOption","ngModel"],[1,"neptun-wrapper",3,"loading"],["class","neptun-wrapper",4,"ngIf"],["class","virtual-sp
1aces-list",3,"dataSource","filterCount","isFilterOpen","columns","selectable","isNextVisible","loadingPlaceholder","backToTopEnabled","selected","sortEmitter","getNext",4,"ngIf"],[1,"neptun-wrapper"],["test-id","error"],[1,"virtual-spaces-list",3,"selected","sortEmitter","getNext","dataSource","filterCount","isFilterOpen","columns","selectable","isNextVisible","loadingPlaceholder","backToTopEnabled"],["neptun-button","","id","select-items-button",3,"click","accent","disabled"]],template:function(t,n){t&1&&u(0,rc,11,4,"ng-container",4)},dependencies:[K,ei,Z,et,rt,Qe,Ne,Pe,fi,Ue,vt,yt,Zi,ii,Re,xt,_e,X,ge,pe,he],encapsulation:2,changeDetection:0})}}return i})();var In=(()=>{class i extends Xt{constructor(){super()}navigateToLinkableVirtualSpacesDetails(e){this.result.virtualSpaceId=e.virtualSpaceId,this.result.virtualSpaces=e.virtualSpaces,this.next.emit()}closeDialog(e){this.result.virtualSpaceId="",this.result.virtualSpaces=e,this.next.emit()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-virtual-spaces-list-wrapper"]],features:[re],decls:1,vars:1,consts:[[3,"closeDialog","navigateToLinkableVirtualSpacesDetails","documentId"]],template:function(t,n){t&1&&(d(0,"neptun-virtual-spaces-list",0),w("closeDialog",function(x){return n.closeDialog(x)})("navigateToLinkableVirtualSpacesDetails",function(x){return n.navigateToLinkableVirtualSpacesDetails(x)}),m()),t&2&&p("documentId",n.data.componentData.documentId)},dependencies:[aa],encapsulation:2,changeDetection:0})}}return i})();var ac=["id",""],sa=(()=>{class i{get value(){return this._value}set value(e){this._value!==e&&(this._value=e??[],this.onChangeFn(this._value),this._chipsInputValue={dataList:this._value.map(t=>({data:t,view:{text:t.name,icon:H.Planet}}))},this.cdr.detectChanges())}get chipsInputValue(){return this._chipsInputValue}constructor(e,t,n,o,x){this.control=e,this.multiStepDialogService=t,this.linkableVirtualSpacesService=n,this.cdr=o,this.store=x,this.destroy$=new si,this.Icons=H,this.onChangeFn=b=>{},this.onTouchedFn=()=>{},this.control&&(this.control.valueAccessor=this)}ngAfterContentChecked(){this.cdr.detectChanges()}remove(e){this.value=this.value.filter(t=>t.id!==e.id),this.cdr.detectChanges(),this.linkableVirtualSpacesService.filterActions([],this.value)}openSelectDialog(){let e={data:this.getLinkableGroupData(),width:"820px",disableClose:!1};this.multiStepDialogService.openDialog(Dn,e).pipe(Ot(this.destroy$),D(t=>{this.store.dispatch(new A.ResetMyShareableFoldersVirtualSpacesList),t&&t.virtualSpaces&&(this.value=t.virtualSpaces,this._chipsInputValue={dataList:t.virtualSpaces.map(n=>({data:n,view:{text:n.name,icon:H.Planet}}))},this.cdr.detectChanges())})).subscribe()}getLinkableGroupData(){return{dialogSteps:[{componentType:In,data:{componentData:{documentId:""}}},{componentType:xn,data:{}}],stepCounterText:"",result:{virtualSpaceId:"",virtualSpaces:[]}}}get invalid(){return this.control?this.control.invalid??!1:!1}get showError(){if(!this.control)return!1;let{dirty:e,touched:t}=this.control;return this.invalid&&(e||t)||!1}get requiredControl(){return this.control?.errors?.required}get serverError(){return this.control?.errors?.serverError}writeValue(e){this.value=e}registerOnTouched(e){this.onTouchedFn=e}registerOnChange(e){this.onChangeFn=e}ngOnDestroy(){this.linkableVirtualSpacesService.resetSelectedItems(),this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(t){return new(t||i)(g(qi,10),g(ti),g(vn),g(Ui),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-social-group-select","id",""]],inputs:{id:"id",title:"title",label:"label",value:"value"},attrs:ac,decls:1,vars:8,consts:[[3,"iconClickEmitter","removeItemEmitter","id","label","title","value","showError","requiredControl","serverError"]],template:function(t,n){t&1&&(d(0,"neptun-chips-display",0),w("iconClickEmitter",function(){return n.openSelectDialog()})("removeItemEmitter",function(x){return n.remove(x)}),m()),t&2&&p("id",n.id)("label",n.label)("title",n.title)("value",n.chipsInputValue)("showError",n.showError)("requiredControl",n.requiredControl)("serverError",n.serverError)("id",n.id)},dependencies:[on],styles:[".input-title[_ngcontent-%COMP%]{margin-bottom:16px}.input-title__text[_ngcontent-%COMP%]{font-weight:800} .user-select-input__label{display:block;width:100%}.user-select-input__names[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.user-select-input__name[_ngcontent-%COMP%]{font-weight:400;font-size:20px}[_nghost-%COMP%] .has-data.mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex{align-items:flex-start;gap:8px} .mat-mdc-form-field-suffix{align-self:center}[_nghost-%COMP%] .select-button[_ngcontent-%COMP%]{height:44px;border-radius:4px;border:1px solid rgba(154,158,188,.8);padding:0 10px}"],changeDetection:0})}}return i})();function sc(i,a){}var Ln=(()=>{class i extends en{constructor(e,t){super(e,t),this.dialogData=t}ngOnInit(){super.ngOnInit()}loadNextStep(){let e;if(this.dialogData.result?.closeDialog&&this.close(this.dialogData.result),this.currentStepIndex==-1)e=this.dialogData.dialogSteps[0].componentType;else if(this.dialogData.result.personGroupId)e=this.dialogData.dialogSteps[1].componentType;else return;this.loadStep(e,!0)}static{this.\u0275fac=function(t){return new(t||i)(g($i),g(zt))}}static{this.\u0275cmp=P({type:i,selectors:[["ng-component"]],features:[re],decls:1,vars:0,consts:[["multiStepDialogHost",""]],template:function(t,n){t&1&&u(0,sc,0,0,"ng-template",0)},dependencies:[Xi],encapsulation:2})}}return i})();var Ft=(()=>{class i{constructor(e){this.http=e}deleteGroupConnections(e,t){return this.http.post(`${De.settings.apiServer.url}DocumentContainer/RemovePersonGroupFromFolder`,{folderId:e,connectionIds:t})}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();
1var Oi="[GroupConnectionDetails]",mo={SetGroupConnectionDetailsFilterModel:`${Oi} Set GroupConnection details Filter Model`,FetchGroupConnectionDetails:`${Oi} Set Fetch GroupConnection details`,SetGroupConnectionDetailsListState:`${Oi} Set GroupConnection details table state`,ResetGroupConnectionDetailsListState:`${Oi} Reset GroupConnection details table state`,ResetEntites:`${Oi} Reset Entites`},ht;(function(i){class a{static{this.type=mo.SetGroupConnectionDetailsListState}constructor(o){this.groupConnectionDetailsListState=o}}i.SetGroupConnectionDetailsListState=a;class e{static{this.type=mo.ResetGroupConnectionDetailsListState}}i.ResetGroupConnectionDetailsListState=e;class t{static{this.type=mo.ResetEntites}}i.ResetEntites=t})(ht||(ht={}));var Ri={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{personGroupId:""}},keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryGroupConnectionsDetail,defaultColumns:[{text:"documentLibrary.profile",key:"printName"}],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableActions:[],tableFunctionTypes:[G.EditColumns,G.Export],previousFilters:h,groupConnectionDetails:h};var It=class wn{static getGroupConnectionDetailsListState(a){return a.groupConnectionDetailsList}setGroupConnectionDetailsListState(a,e){a.patchState({groupConnectionDetailsList:e.groupConnectionDetailsListState})}resetGroupConnectionDetailsListState(a){a.patchState({groupConnectionDetailsList:Ri})}resetEntities(a){a.patchState({groupConnectionDetailsList:I(F({},a.getState().groupConnectionDetailsList),{entities:h})})}static{this.\u0275fac=function(e){return new(e||wn)}}static{this.\u0275prov=B({token:wn,factory:wn.\u0275fac})}};U([ne(ht.SetGroupConnectionDetailsListState),S("design:type",Function),S("design:paramtypes",[Object,ht.SetGroupConnectionDetailsListState]),S("design:returntype",void 0)],It.prototype,"setGroupConnectionDetailsListState",null);U([ne(ht.ResetGroupConnectionDetailsListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],It.prototype,"resetGroupConnectionDetailsListState",null);U([ne(ht.ResetEntites),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],It.prototype,"resetEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],It,"getGroupConnectionDetailsListState",null);It=U([dt({name:"groupconnectiondetails",defaults:{groupConnectionDetailsList:Ri}})],It);var Bi="[GroupConnections]",uo={SetGroupConnectionsFilterModel:`${Bi} Set GroupConnections Filter Model`,FetchGroupConnections:`${Bi} Set Fetch GroupConnections`,SetGroupConnectionsListState:`${Bi} Set GroupConnections table state`,ResetGroupConnectionsListState:`${Bi} Reset GroupConnections table state`,ResetEntites:`${Bi} Reset Entites`},Ct;(function(i){class a{static{this.type=uo.SetGroupConnectionsListState}constructor(o){this.groupConnectionsListState=o}}i.SetGroupConnectionsListState=a;class e{static{this.type=uo.ResetGroupConnectionsListState}}i.ResetGroupConnectionsState=e;class t{static{this.type=uo.ResetEntites}}i.ResetEntites=t})(Ct||(Ct={}));var ri=(()=>{class i extends Ee{constructor(e,t,n){super(Ri),this.store=e,this.router=t,this.activatedRoute=n,this.endPoint="DocumentContainer/GetPersonGroupMembers",this.defaultPagingNumber=10,this.groupConnectionDetails$=this.select(o=>o.groupConnectionDetails),this.groupConnectionsService=k(Ft),this.errorHandler=k(Fe),this.saveListState=this.effect(o=>o.pipe(oe(this.state$),D(([,x])=>{this.store.dispatch(new ht.SetGroupConnectionDetailsListState(x))}))),this.getGroupConnectionDetails=this.effect(o=>o.pipe(D(()=>{this.patchState({groupConnectionDetails:Se})}),W(x=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetPersonGroupDetails",x).pipe(D(b=>this.patchState({groupConnectionDetails:{data:b}})),ae(b=>(this.patchState({groupConnectionDetails:ye}),de(()=>b))))))),this.deleteGroupConnectionPeople=this.effect(o=>o.pipe(W(x=>this.groupConnectionsService.deleteGroupConnections(x.folderId,x.ids).pipe(D(()=>{this.store.dispatch(new Ct.ResetEntites),this.router.navigate([".."],{relativeTo:this.activatedRoute}),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(b=>(this.errorHandler.handleError(b),qe))))))}static{this.\u0275fac=function(t){return new(t||i)(V(R),V(ue),V(ie))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var cc=()=>({iconClass:"icon-chevron-left",fontSize:"12px"}),pc=()=>[];function mc(i,a){i&1&&(y(0),L(1,"neptun-request-error-indicator",7),v())}function dc(i,a){i&1&&Gi(0)}function uc(i,a){if(i&1&&(y(0),u(1,dc,1,0,"ng-container",8),v()),i&2){r();let e=Lt(12);s(),p("ngTemplateOutlet",e)}}function _c(i,a){if(i&1){let e=E();y(0),d(1,"neptun-data-table",11),l(2,"async"),l(3,"async"),w("getNext",function(n){_(e);
1let o=r(6);return f(o.getNextItems(n))}),m(),v()}if(i&2){let e=r().ngIf,t=r(5);s(),p("dataSource",e.data)("columns",t.columns)("isNextVisible",c(2,5,t.isNextVisible$)===!0)("loadingPlaceholder",c(3,7,t.isListLoading$)===!0)("backToTopEnabled",!1)}}function fc(i,a){i&1&&(y(0),L(1,"neptun-request-error-indicator",12),v())}function gc(i,a){i&1&&Gi(0)}function hc(i,a){if(i&1&&(y(0),u(1,gc,1,0,"ng-container",8),v()),i&2){r(4);let e=Lt(12);s(),p("ngTemplateOutlet",e)}}function Cc(i,a){if(i&1&&(y(0),u(1,_c,4,9,"ng-container",5),l(2,"isResultRequest"),u(3,fc,2,0,"ng-container",5),l(4,"hasError"),u(5,hc,2,1,"ng-container",5),l(6,"isLoadingRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function Sc(i,a){if(i&1&&(d(0,"p",9),C(1),m(),d(2,"h3",10),C(3),m(),u(4,Cc,7,9,"ng-container",5),l(5,"async")),i&2){let e=r(2).ngIf,t=r().$implicit,n=r();s(),T(e.data.groupDescription),s(2),T(t("documentLibrary.members")),s(),p("ngIf",c(5,3,n.dataSource$))}}function yc(i,a){if(i&1){let e=E();d(0,"button",13),w("click",function(){_(e);let n=r(4);return f(n.onPreviousClick())}),C(1),m()}if(i&2){let e=r(3).$implicit;p("color","white")("prefixIcon",j(3,cc)),s(),M(" ",e("button.back")," ")}}function vc(i,a){i&1&&(y(0),u(1,Sc,6,5,"ng-template",null,2,Ge)(3,yc,2,4,"ng-template",null,3,Ge),v())}function bc(i,a){i&1&&L(0,"div",14)}function xc(i,a){i&1&&Gi(0)}function Dc(i,a){if(i&1&&(y(0),d(1,"div",16),L(2,"neptun-logo-placeholder",17)(3,"neptun-rectangle-placeholder",18),m(),u(4,xc,1,0,"ng-container",8),v()),i&2){r(2);let e=Lt(10);s(2),p("size","l"),s(2),p("ngTemplateOutlet",e)}}function Fc(i,a){i&1&&u(0,Dc,5,2,"ng-container",15),i&2&&p("ngForOf",j(1,pc).constructor(5))}function Ic(i,a){if(i&1&&(y(0),d(1,"neptun-multi-step-dialog-step-general-view",6),l(2,"isResultRequest"),u(3,mc,2,0,"ng-container",5),l(4,"hasError"),u(5,uc,2,1,"ng-container",5),l(6,"isLoadingRequest"),u(7,vc,5,0,"ng-container",5),l(8,"isResultRequest"),m(),u(9,bc,1,0,"ng-template",null,0,Ge)(11,Fc,1,2,"ng-template",null,1,Ge),v()),i&2){let e=a.ngIf,t=r().$implicit;s(),p("title",c(2,5,e)?e.data.groupName:t("documentLibrary.personGroupConnectionDetails"))("isCloseButtonEnabled",!0),s(2),p("ngIf",c(4,7,e)),s(2),p("ngIf",c(6,9,e)),s(2),p("ngIf",c(8,11,e))}}function Lc(i,a){if(i&1&&(y(0),u(1,Ic,13,13,"ng-container",5),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.groupConnectionDetails$))}}var ca=(()=>{class i extends Ae{constructor(e,t){super(e),this.groupConnectionDetailsStore=e,this.store=t,this.previousClick=new Rt,this.columns=[{key:"printName",text:"documentLibrary.person",disableSort:!0},{key:"nickName",text:"login.nickName",disableSort:!0}],this.groupConnectionDetails$=this.groupConnectionDetailsStore.groupConnectionDetails$,this.isOrderBySaving$=this.groupConnectionDetailsStore.isOrderBySaving$,this.dataSource$=this.entities$.pipe(O(n=>ee(n)?fe(n.data.map(o=>this.convertToTableRow(o)),n.isPagingLoading??!1):n))}initialize(){ee(this.listState.entities)?this.groupConnectionDetailsStore.updateState(I(F({},this.listState),{contracts:I(F({},this.listState.contracts),{filterModel:{personGroupId:this.groupId}})})):(this.groupConnectionDetailsStore.getColumns(),this.groupConnectionDetailsStore.loadOrderBy(),this.groupConnectionDetailsStore.getPreviousFilters(),this.listStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{personGroupId:this.groupId})),this.groupConnectionDetailsStore.getGroupConnectionDetails({personGroupId:this.groupId}),this.groupConnectionDetailsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.groupConnectionDetailsStore.fetchItemsFromServer(I(F({},I(F({},this.listState.contracts.filterModel),{personGroupId:this.groupId})),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.groupConnectionDetailsStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot(It.getGroupConnectionDetailsListState)}resetModuleState(){this.store.dispatch(new ht.ResetGroupConnectionDetailsListState)}convertToTableRow(e){return{data:F({},e),imageData:{printName:e.avatar.printName,fallbackColorCodeInHexa:e.avatar.fallbackColorCodeInHexa,image:e.avatar.image,avatarType:null},actions:{}}}onPreviousClick(){this.previousClick.emit()}static{this.\u0275fac=function(t){return new(t||i)(g(ri),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-user-connection-detail
1s"]],inputs:{groupId:"groupId"},outputs:{previousClick:"previousClick"},features:[le([ri,Ft,Fe]),re],decls:1,vars:0,consts:[["userSeparator",""],["loadingTemplate",""],["content",""],["actions",""],[4,"transloco"],[4,"ngIf"],[3,"title","isCloseButtonEnabled"],["test-id","group-error"],[4,"ngTemplateOutlet"],[1,"subtitle"],[1,"details-title"],[1,"user-list",3,"getNext","dataSource","columns","isNextVisible","loadingPlaceholder","backToTopEnabled"],["test-id","error"],["neptun-button","","id","back-button",1,"actions",3,"click","color","prefixIcon"],[1,"user-separator"],[4,"ngFor","ngForTrackByIndex","ngForOf"],[1,"users-loading"],[3,"size"],[1,"users-loading__text"]],template:function(t,n){t&1&&u(0,Lc,3,3,"ng-container",4)},dependencies:[K,Z,ei,Re,Oo,xt,_e,Qt,gi,Ir,yt,X,ge,pe,he],styles:[".users-loading[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.users-loading__text[_ngcontent-%COMP%]{width:50px;height:14px}.user-list[_ngcontent-%COMP%]{padding:0}.subtitle[_ngcontent-%COMP%]{margin-bottom:24px}"],changeDetection:0})}}return i})();var Tn=(()=>{class i extends Xt{constructor(){super()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-user-connection-details-wrapper"]],features:[re],decls:1,vars:1,consts:[[3,"previousClick","groupId"]],template:function(t,n){if(t&1&&(d(0,"neptun-user-connection-details",0),w("previousClick",function(){return n.onPreviousClick()}),m()),t&2){let o;p("groupId",(o=n.result.personGroupId)!==null&&o!==void 0?o:"")}},dependencies:[ca],encapsulation:2,changeDetection:0})}}return i})();var pa=(()=>{class i extends Kt{constructor(e){super(),this.http=e,this.columns=[]}getItemsFromServer(e,t,n,o){let x={request:I(F({},n),{personGroupId:this.personGroupId}),filter:this.getSortModel(e,t,o)};return this.http.get(`${De.settings.apiServer.url}DocumentContainer/GetPersonGroupMembers`,{params:Bt(x)}).pipe(O(b=>b.data))}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Mn=(()=>{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,contracts:{firstRow:0,lastRow:10,filterModel:{name:""}},interfaceIdentity:Y.DormitoryPeriodsList,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"finalExams.examName",key:"groupName"},{text:"documentLibrary.members",key:"groupMembersCount"}],orderBy:h,columns:h,displayedColumns:h,isOrderBySaving:!1,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h,hiddenFilters:{documentId:""}}),this.endPoint="DocumentContainer/GetLinkablePersonGroups",this.defaultPagingNumber=10,this.store=k(R),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new A.SaveMyShareableFoldersUserConnectionDetails(t))})))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var _o=()=>[];function Mc(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",8),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"isResultRequest"),l(7,"async"),w("orderBy",function(n){_(e);let o=r(4);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(4);return f(o.itemAction(n))})("resetFilter",function(){_(e);let n=r(4);return f(n.resetFilter())})("toggleFilter",function(){_(e);let n=r(4);return f(n.toggleFilter())}),m()}if(i&2){let e=a.ngIf,t=r().ngIf,n=r(3);p("filterCount",c(1,9,n.filterCount$))("isFilterOpen",c(2,11,n.isFilterOpen$))("isListDataLoading",c(3,13,n.isListDataLoading$)===!0)("isOrderingSaving",c(4,15,n.isOrderBySaving$)===!0)("hasFilter",!0)("actionsMenu",c(5,17,n.moreActionsMenuItems$))("orderItems",c(6,19,t)?t.data:j(23,_o))("isOrderingSaving",c(7,21,n.isOrderBySaving$)===!0)("isAnyItemsSelected",e.length>0)}}function Ec(i,a){if(i&1&&(y(0),u(1,Mc,8,24,"neptun-table-header-actions",7),l(2,"async"),v()),i&2){let e=r(3);s(),p("ngIf",c(2,1,e.selectedEntities$))}}function Oc(i,a){if(i&1&&(u(0,Ec,3,3,"ng-container",6),l(1,"async")),i&2){let e=r(2);p("ngIf",c(1,1,e.orderByMenu$))}}function Rc(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",10),l(1,"async"),l(2,"async"),l(3,"async"),w("keepOpenChanged",function(){_(e);let n=r(4);return f(n.setKeepOpenChanged())})("filterClick",function(n){_(e);
1let o=r(4);return f(o.filterItems(n))})("latestFilterLoad",function(n){_(e);let o=r(4);return f(o.loadLatestFilter(n))})("closed",function(){_(e);let n=r(4);return f(n.toggleFilter())})("resetFilter",function(){_(e);let n=r(4);return f(n.resetFilter())}),L(4,"neptun-form-input",11),m()}if(i&2){let e=r().ngIf,t=r(2).$implicit,n=r();p("keepOpen",c(1,5,n.keepFilterOpen$))("previousFilter",c(2,7,n.previousFilters$))("isLoading",c(3,9,n.isFiltering$)===!0),s(4),p("label",t("global.name"))("ngModel",e.name)}}function Bc(i,a){if(i&1&&(y(0),u(1,Rc,5,11,"neptun-filter-v2",9),l(2,"async"),v()),i&2){let e=r(3);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function Pc(i,a){if(i&1&&(u(0,Bc,3,3,"ng-container",6),l(1,"async")),i&2){let e=r(2);p("ngIf",c(1,1,e.filterModel$))}}function Nc(i,a){i&1&&(y(0),L(1,"neptun-data-table-placeholder",12),v()),i&2&&(s(),p("loading",!0))}function Ac(i,a){i&1&&(y(0),d(1,"div",14),L(2,"neptun-request-error-indicator",15),m(),v())}function kc(i,a){if(i&1){let e=E();d(0,"neptun-data-table",16),l(1,"async"),l(2,"isResultRequest"),l(3,"isResultRequest"),l(4,"isResultRequest"),l(5,"async"),w("sortEmitter",function(n){_(e);let o=r(6);return f(o.sortItems(n))})("selected",function(n){_(e);let o=r(6);return f(o.setSelectedItems(n))})("getNext",function(n){_(e);let o=r(6);return f(o.getNextItems(n))}),m()}if(i&2){let e=r().ngIf,t=r().ngIf,n=r().ngIf,o=r(3);p("loadingPlaceholder",c(1,7,o.isListLoading$)===!0)("dataSource",c(2,9,e)?e.data:j(17,_o))("backToTopEnabled",!1)("selectable",!0)("orderItems",c(3,11,t)?t.data:j(18,_o))("columns",c(4,13,n)?n.data:null)("isNextVisible",c(5,15,o.isNextVisible$))}}function Vc(i,a){if(i&1&&(y(0),u(1,Ac,3,0,"ng-container",6),l(2,"hasError"),u(3,kc,6,19,"neptun-data-table",13),l(4,"isLoadingRequest"),l(5,"isResultRequest"),l(6,"isResultRequest"),l(7,"isResultRequest"),v()),i&2){let e=a.ngIf,t=r().ngIf,n=r().ngIf;s(),p("ngIf",c(2,2,e)),s(2),p("ngIf",c(4,4,e)||c(5,6,e)&&c(6,8,n)&&c(7,10,t))}}function Gc(i,a){if(i&1&&(y(0),u(1,Nc,2,1,"ng-container",6),l(2,"isLoadingRequest"),l(3,"isLoadingRequest"),u(4,Vc,8,12,"ng-container",6),l(5,"async"),v()),i&2){let e=a.ngIf,t=r().ngIf,n=r(3);s(),p("ngIf",c(2,2,t)||c(3,4,e)),s(3),p("ngIf",c(5,6,n.personGroupConnection$))}}function Uc(i,a){if(i&1&&(y(0),u(1,Gc,6,8,"ng-container",6),l(2,"async"),v()),i&2){let e=r(3);s(),p("ngIf",c(2,1,e.orderByMenu$))}}function $c(i,a){if(i&1&&(u(0,Uc,3,3,"ng-container",6),l(1,"async")),i&2){let e=r(2);p("ngIf",c(1,1,e.columns$))}}function jc(i,a){if(i&1){let e=E();d(0,"button",17),l(1,"async"),w("click",function(){_(e);let n=r(2);return f(n.emitDataAfterClosing())}),C(2),m()}if(i&2){let e,t=r().$implicit,n=r();p("accent","flat")("disabled",!((e=c(1,3,n.selectedEntities$))!=null&&e.length)),s(2),M(" ",t("requestForm.selectItems")," ")}}function qc(i,a){if(i&1&&(y(0),d(1,"neptun-multi-step-dialog-step-general-view",5),u(2,Oc,2,3,"ng-template",null,0,Ge)(4,Pc,2,3,"ng-template",null,1,Ge)(6,$c,2,3,"ng-template",null,2,Ge)(8,jc,3,5,"ng-template",null,3,Ge),m(),v()),i&2){let e=a.$implicit;s(),p("title",e("documentLibrary.ownUserGroups"))("isCloseButtonEnabled",!0)}}var ma=(()=>{class i extends Yi{constructor(e,t){super(t),this.store=e,this.userConnectionListStore=t,this.documentId="",this.navigateToPersonGroupDetails=new Rt,this.closeDialog=new Rt,this.listState=this.store.selectSnapshot(te.personGroupDetails),this.isOrderBySaving$=this.userConnectionListStore.isOrderBySaving$,this.personGroupConnection$=we([this.entities$,this.selectedEntities$]).pipe(O(([n,o])=>ee(n)?fe(n.data.map(x=>this.convertToTableRow(x,o.some(b=>b.id===x.id))),n.isPagingLoading??!1):n))}ngOnInit(){this.userConnectionListStore.updateHiddenFilters({documentId:this.documentId}),ee(this.listState.entities)?this.userConnectionListStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.userConnectionListStore.getColumns(),this.userConnectionListStore.loadOrderBy(),this.userConnectionListStore.getPreviousFilters(),this.userConnectionListStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.userConnectionListStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:10})))).subscribe())}setSelectedItems(e){let t=e.filter(n=>!n.isAlreadyLinked);this.listStore.updateSelectedEntities(t)}convertToTableRow(e,t){let n=()=>{this.userConnectionListStore.saveListState(),this.navigateToPersonGroupDetail
1s.emit({personGroupId:e.id})},o={controllerName:"Dormitory",actionName:"GetSelectedDormitoryApplicationPeriodDetails"};return{data:F({},e),disabled:e.isAlreadyLinked,detailsCallback:n,selected:this.evaluateSelectedFlag(e,t),detailsPermission:o,actions:{details:{text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n,permission:o}}}}evaluateSelectedFlag(e,t){return e.isAlreadyLinked?!0:t}emitDataAfterClosing(){this.selectedEntities$.pipe(J(1),D(e=>{this.closeDialog.emit({linkableIds:e.map(t=>({id:t.id,name:t.groupName}))})})).subscribe()}static{this.\u0275fac=function(t){return new(t||i)(g(R),g(Mn))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-user-connection-list"]],inputs:{documentId:"documentId"},outputs:{navigateToPersonGroupDetails:"navigateToPersonGroupDetails",closeDialog:"closeDialog"},features:[le([Mn]),re],decls:1,vars:0,consts:[["headerActions",""],["filter",""],["content",""],["actions",""],[4,"transloco"],[3,"title","isCloseButtonEnabled"],[4,"ngIf"],[3,"filterCount","isFilterOpen","isListDataLoading","isOrderingSaving","hasFilter","actionsMenu","orderItems","isAnyItemsSelected","orderBy","itemAction","resetFilter","toggleFilter",4,"ngIf"],[3,"orderBy","itemAction","resetFilter","toggleFilter","filterCount","isFilterOpen","isListDataLoading","isOrderingSaving","hasFilter","actionsMenu","orderItems","isAnyItemsSelected"],["class","filter",3,"keepOpen","previousFilter","isLoading","keepOpenChanged","filterClick","latestFilterLoad","closed","resetFilter",4,"ngIf"],[1,"filter",3,"keepOpenChanged","filterClick","latestFilterLoad","closed","resetFilter","keepOpen","previousFilter","isLoading"],["id","name","name","name",1,"filter-element",3,"label","ngModel"],[1,"neptun-wrapper",3,"loading"],["class","user-connections-list",3,"loadingPlaceholder","dataSource","backToTopEnabled","selectable","orderItems","columns","isNextVisible","sortEmitter","selected","getNext",4,"ngIf"],[1,"neptun-wrapper"],["test-id","error"],[1,"user-connections-list",3,"sortEmitter","selected","getNext","loadingPlaceholder","dataSource","backToTopEnabled","selectable","orderItems","columns","isNextVisible"],["neptun-button","","id","select-items-button",3,"click","accent","disabled"]],template:function(t,n){t&1&&u(0,qc,10,2,"ng-container",4)},dependencies:[K,ei,Z,et,rt,Qe,Ne,Pe,Ue,ii,Re,xt,_e,X,ge,pe,he],styles:["[_nghost-%COMP%] .user-connections-list[_ngcontent-%COMP%] .mat-mdc-table .main-header-cell.has-two-columns, [_nghost-%COMP%] .user-connections-list[_ngcontent-%COMP%] .mat-mdc-table .table-data-header{min-width:unset}@media screen and (min-width:768px){[_nghost-%COMP%] .user-connections-list[_ngcontent-%COMP%] .mat-mdc-table .mat-mdc-header-row .mat-mdc-header-cell.table-selection-all{width:35px!important;min-width:unset!important}}"],changeDetection:0})}}return i})();var En=(()=>{class i extends Xt{constructor(e){super(),this.linkablePersonGroupDetailsService=e}navigateToPersonGroupDetails(e){this.result.personGroupId=e.personGroupId,this.linkablePersonGroupDetailsService.personGroupId=e.personGroupId,this.next.emit()}closeDialog(e){this.result.linkablePersons=e.linkableIds,this.result.closeDialog=!0,this.next.emit()}static{this.\u0275fac=function(t){return new(t||i)(g(pa))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-user-connection-list-wrapper"]],features:[re],decls:1,vars:1,consts:[[3,"closeDialog","navigateToPersonGroupDetails","documentId"]],template:function(t,n){t&1&&(d(0,"neptun-user-connection-list",0),w("closeDialog",function(x){return n.closeDialog(x)})("navigateToPersonGroupDetails",function(x){return n.navigateToPersonGroupDetails(x)}),m()),t&2&&p("documentId",n.data.componentData.documentId)},dependencies:[ma],encapsulation:2,changeDetection:0})}}return i})();var Wc=["id",""],da=(()=>{class i{get value(){return this._value}set value(e){this._value!==e&&(this._value=e??[],this.onChangeFn(this._value),this._chipsInputValue={dataList:this._value.map(t=>({data:t,view:{text:t.name,icon:H.Planet}}))},this.cdr.detectChanges())}get chipsInputValue(){return this._chipsInputValue}constructor(e,t,n,o,x){this.control=e,this.multiStepDialogService=t,this.linkablePersonGroupsServie=n,this.cdr=o,this.store=x,this.destroy$=new si,this.Icons=H,this.onChangeFn=b=>{},this.onTouchedFn=()=>{},this.control&&(this.control.valueAccessor=this)}ngAfterContentChecked(){this.cdr.detectChanges()}remove(e){this.value=this.value.filter(t=>t.id!==e.id),this.cdr.detectChanges(),this.linkablePersonGroupsServie.filterActions([],this.value)}openSelectDialog(){let e={data:this.getLinkablePersonGroupData(),disableClose:!1,maxHeight:632,width:"820px",panelClass:"dialog-overlay-wrapper"};this.multiStepDialogService.openDialog(Ln,e).pipe(Ot(this.destroy$),D(t=>{this.store.dispatch(new A.ResetMyShareableFoldersUserConnectionDetail
1s),t&&t.linkablePersons&&(this.value=t.linkablePersons,this._chipsInputValue={dataList:t.linkablePersons.map(n=>({data:n,view:{text:n.name,icon:H.Planet}}))},this.cdr.detectChanges())})).subscribe()}getLinkablePersonGroupData(){return{dialogSteps:[{componentType:En,data:{componentData:{documentId:""}}},{componentType:Tn,data:{}}],stepCounterText:"",result:{closeDialog:!1,linkablePersons:[]}}}get invalid(){return this.control?this.control.invalid??!1:!1}get showError(){if(!this.control)return!1;let{dirty:e,touched:t}=this.control;return this.invalid&&(e||t)||!1}get requiredControl(){return this.control?.errors?.required}get serverError(){return this.control?.errors?.serverError}writeValue(e){this.value=e}registerOnTouched(e){this.onTouchedFn=e}registerOnChange(e){this.onChangeFn=e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(t){return new(t||i)(g(qi,10),g(ti),g(bi),g(Ui),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-user-group-select","id",""]],inputs:{id:"id",title:"title",label:"label",value:"value"},attrs:Wc,decls:1,vars:8,consts:[[3,"iconClickEmitter","removeItemEmitter","id","label","title","value","showError","requiredControl","serverError"]],template:function(t,n){t&1&&(d(0,"neptun-chips-display",0),w("iconClickEmitter",function(){return n.openSelectDialog()})("removeItemEmitter",function(x){return n.remove(x)}),m()),t&2&&p("id",n.id)("label",n.label)("title",n.title)("value",n.chipsInputValue)("showError",n.showError)("requiredControl",n.requiredControl)("serverError",n.serverError)("id",n.id)},dependencies:[on],styles:[".input-title[_ngcontent-%COMP%]{margin-bottom:16px}.input-title__text[_ngcontent-%COMP%]{font-weight:800} .user-select-input__label{display:block;width:100%}.user-select-input__names[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.user-select-input__name[_ngcontent-%COMP%]{font-weight:400;font-size:20px}[_nghost-%COMP%] .has-data.mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex{align-items:flex-start;gap:8px} .mat-mdc-form-field-suffix{align-self:center}[_nghost-%COMP%] .select-button[_ngcontent-%COMP%]{height:44px;border-radius:4px;border:1px solid rgba(154,158,188,.8);padding:0 10px}"],changeDetection:0})}}return i})();function Qc(i,a){if(i&1&&(d(0,"div"),L(1,"neptun-storage-statistics",9),l(2,"lowercase"),m()),i&2){let e=a.ngIf,t=r().$implicit;s(),p("percentage",e.collabSpacePercentage)("storageSize",e.collabSpace)("freeStorage",e.collabFreeSpace)("reservedStorage",e.collabUserSpace)("label",c(2,5,t("documentLibrary.storageOccupancy")))}}function zc(i,a){if(i&1&&L(0,"neptun-file-upload-simple",15),i&2){let e=a.ngIf,t=r(3);p("documentLibraryService",t.documentLibraryService)("documentationTypes",e)("interfaceIdentity",t.documentLibraryInterfaceIdentity)("multiple",!0)}}function Kc(i,a){if(i&1&&(d(0,"neptun-card",10)(1,"h4",11),C(2),m(),u(3,zc,1,4,"neptun-file-upload-simple",12),l(4,"async"),L(5,"neptun-form-input",13)(6,"neptun-form-textarea",14),m()),i&2){let e=r().$implicit,t=r();s(2),M(" ",e("menu.documents")," "),s(),p("ngIf",c(4,8,t.documentationTypes$)),s(2),p("title",e("documentLibrary.folderName"))("maxLength",100)("required",!0),s(),p("title",e("documentLibrary.folderDescription"))("maxLength",320)("placeholder",e("global.writeHere"))}}function Yc(i,a){if(i&1&&(d(0,"neptun-card",16)(1,"h4",17),C(2),m(),d(3,"p",18),C(4),m(),L(5,"neptun-form-user-select",19)(6,"neptun-social-group-select",20)(7,"neptun-user-group-select",21),m()),i&2){let e=r().$implicit,t=r();s(2),T(e("documentLibrary.shares")),s(2),T(e("documentLibrary.peopleAndCommunitiesChosenHereWillSeeThisfolder")),s(),p("userListContainerKey",t.listContainerKey)("userListByGroupContainerKey",t.listByGroupContainerKey)("title",e("documentLibrary.persons"))("label",e("documentLibrary.selectPersons")),s(),p("title",e("documentLibrary.socialGroups"))("label",e("documentLibrary.selectSpace")),s(),p("title",e("documentLibrary.personGroupConnection"))("label",e("subjects.selectGroup"))}}function Zc(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",1),d(2,"div",2),u(3,Qc,3,7,"div",3),l(4,"async"),m(),d(5,"form",4)(6,"div",2)(7,"neptun-tab-selector",5)(8,"neptun-tab",6),l(9,"async"),u(10,Kc,7,10,"ng-template",7),m(),d(11,"neptun-tab",6),l(12,"async"),u(13,Yc,8,10,"ng-template",7),m()()(),d(14,"neptun-context-bar",8),l(15,"async"),w("buttonClicked",function(){_(e);let n=r();return f(n.save())}),m()(),v()}if(i&2){let e=a.$implicit,t=r();s(),p("title",e("menu.documentLibrary.publicDocument")),s(2),p("ngIf",c(4,13,t.containerStatus$)),s(2),p("formGroup",t.formGroup)("neptunFocusInvalidInput",t.formGroup),s(2),p("hasNavigation",!0)("tabSelectorName","tab-selector-group-related-upload"),s(),p("label",e("admin.baseData"))("error",c(9,15,t.getErrorMessageForBaseData$)),s(3),p("label",e("documentLibrary.share"))("error",c(12,17,t.getErrorMessageForShare$)),s(3),p("text",e("requestJudgement.saveCaption"))("buttonText",e("button.save"))("loading",c(1
15,19,t.loading$))}}var fo=(()=>{class i{constructor(e,t,n,o,x,b,z,$,Q,Ce,Je,lt){this.documentLibraryService=e,this.formBuilder=t,this.formUtilitiesService=n,this.documentLibrary=o,this.activatedRoute=x,this.router=b,this.store=z,this.listItemConverter=$,this.loadingService=Q,this.linkableVirtualSpacesService=Ce,this.linkablePersonGroupsServie=Je,this.translocoService=lt,this.FilterContainerKey=Y,this.documentLibraryInterfaceIdentity=Y.DocumentLibraryGroupRelatedList,this.containerStatus$=this.documentLibrary.getContainerStatus(),this.documentationTypes$=this.documentLibrary.getNMSDocumentationTypeId(),this.loading$=this.loadingService.isLoadingByUrl("DocumentContainer/SaveFilesToContainer"),this.listContainerKey=Y.UserSelectUserList,this.listByGroupContainerKey=Y.UserSelectUserListByGroup,this.formGroup=this.formBuilder.group({baseData:this.formBuilder.group({filesArray:[[],Nt.required],name:["",Nt.required],description:[""]}),share:this.formBuilder.group({people:[[]],userGroup:[[]],socialGroup:[[]]})}),this.submittedSubject=ne
1w si,this.submit$=this.submittedSubject.asObservable(),this.getErrorMessageForBaseData$=this.formUtilitiesService.getErrorMessageForTab(this.formGroup,"baseData",this.submit$),this.getErrorMessageForShare$=this.formUtilitiesService.getErrorMessageForTab(this.formGroup,"share",this.submit$),this.isVirtualspaceFolderDescriptionRequired$=this.store.select(Go.isVirtualspaceFolderDescriptionRequired),this.destroy$=new si}ngOnInit(){this.isVirtualspaceFolderDescriptionRequired$.pipe(D(e=>{e&&this.formGroup.controls.baseData.controls.description.setValidators(Nt.required)}),J(1)).subscribe(),this.containerStatus$.pipe((J(1),D(e=>{this.formGroup.controls.baseData.controls.filesArray.addValidators(Xr(e.collabFreeSpace,this.translocoService)),this.formGroup.controls.baseData.controls.filesArray.updateValueAndValidity()}))).subscribe(),this.formGroup.controls.baseData.controls.filesArray.valueChanges.pipe(D(e=>{e.length===1&&!this.formGroup.controls.baseData.controls.description.value&&this.formGroup.controls.baseData.controls.description.patchValue(e[0].name)}),Ot(this.destroy$)).subscribe()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}save(){this.submittedSubject.next(),this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.documentLibrary.saveFilesToContainer(this.getSaveFilesToContainerRequest()).pipe(D(()=>{this.linkablePersonGroupsServie.resetSelectedItems(),this.linkableVirtualSpacesService.resetSelectedItems(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.successfulUpload",description:this.formGroup.controls.baseData.controls.name.value})),this.activatedRoute.snapshot.queryParams.fromMyFolders?this.router.navigate(["document-library","my-folders"]):this.router.navigate(["document-library"])}),J(1)).subscribe()}getSaveFilesToContainerRequest(){let e=this.formGroup.getRawValue(),t=e.baseData.filesArray.map(b=>b.guid).filter(Vr),n=this.listItemConverter.getOnlyUserIds(e.share.people),o=e.share.socialGroup.map(b=>b.id),x=e.share.userGroup.map(b=>b.id);return{folder:e.baseData.name,folderDescription:e.baseData.description,filesArray:t,userIds:n,personGroupIds:x,virtualSpaceIds:o}}static{this.\u0275fac=function(t){return new(t||i)(g(Si),g(Qi),g(Cr),g(ve),g(ie),g(ue),g(R),g(tn),g(hi),g(vn),g(bi),g(ce))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-group-related-upload"]],decls:1,vars:0,consts:[[4,"transloco"],[3,"title"],[1,"neptun-wrapper-padding"],[4,"ngIf"],[3,"formGroup","neptunFocusInvalidInput"],[3,"hasNavigation","tabSelectorName"],[3,"label","error"],["neptunTabContent",""],["buttonColor","primary",3,"buttonClicked","text","buttonText","loading"],[3,"percentage","storageSize","freeStorage","reservedStorage","label"],["formGroupName","baseData",1,"block"],[1,"block-title"],["formControlName","filesArray",3,"documentLibraryService","documentationTypes","interfaceIdentity","multiple",4,"ngIf"],["formControlName","name","id","name","name","folderName",1,"input","first-input",3,"title","maxLength","required"],["formControlName","description","id","description","name","folderDescription",1,"input",3,"title","maxLength","placeholder"],["formControlName","filesArray",3,"documentLibraryService","documentationTypes","interfaceIdentity","multiple"],["formGroupName","share",1,"block"],[1,"title"],[1,"description"],["formControlName","people","id","people",3,"userListContainerKey","userListByGroupContainerKey","title","label"],["formControlName","socialGroup","id","socialGroup",3,"title","label"],["formControlName","userGroup","id","userGroup",3,"title","label"]],template:function(t,n){t&1&&u(0,Zc,16,21,"ng-container",0)},dependencies:[K,xe,Z,vi,Ne,Hi,Pe,Wi,fi,Ko,Ho,zo,Qo,Dr,xr,cr,lr,At,Ci,Qe,nn,mr,sa,da,ln,X,di],styles:[".block-title[_ngcontent-%COMP%]{margin-bottom:16px;font-family:LatoWeb,sans-serif;font-size:16px}.block[_ngcontent-%COMP%]{max-width:610px}.block[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:8px}.block[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin-bottom:32px}neptun-card[_ngcontent-%COMP%]{margin-bottom:24px}.first-input[_ngcontent-%COMP%]{display:block;margin-top:16px}.input[_ngcontent-%COMP%] + .input[_ngcontent-%COMP%]{margin-top:16px;display:block}.block[_ngcontent-%COMP%] + .block[_ngcontent-%COMP%]{margin-top:24px}.block-title[_ngcontent-%COMP%]{margin-bottom:16px}@media screen and (min-width:768px){.navigation[_ngcontent-%COMP%]{width:610px;margin-left:420px}}@media screen and (min-width:574px){.neptun-wrapper[_ngcontent-%COMP%]{padding:0 20px!important}}"],changeDetection:0})}}return i})();var Ut=(()=>{class i{constructor(e){this.httpClient=e}deleteDocumentsFromFolder(e,t){return this.httpClient.post(`${De.settings.apiServer.url}DocumentContainer/DeleteFilesFromFolder`,{folderId:t,documentationIds:e})}modifyFolderDetails(e){return this.httpClient.post(`${De.settings.apiServer.url}DocumentContainer/ModifyFolderBaseDetails`,e).pipe(O(t=>t.data))}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var On=(()=>{class i extends Jt{constructor(e,t,n,o,x,b,z){super({details:h,isFileDownloading:h}),this.dataFetcherService=e,this.fileService=t,this.folderDetailsService=n,this.documentLibraryService=o,this.store=x,this.router=b,this.activatedRoute=z,this.details$=this.select($=>$.details),this.isFileDownloading$=this.select($=>$.isFileDownloading).pipe(O($=>Yt($))),this.errorHandler=k(Fe),this.addDetails=this.updater(($,Q)=>I(F({},$),{details:Q})),this.setIsFileDownloading=this.updater(($,Q)=>I(F({},$),{isFileDownloading:Q})),this.getDetails=this.effect($=>$.pipe(D(()=>this.addDetails(Se)),W(Q=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetShareableFolderDocumentDetails",{documentId:Q}).pipe(D(Ce=>{this.addDetails({data:Ce})}),ae(Ce=>(this.addDetails(ye),de(()=>Ce))))))),this.downloadDocuments=this.effect($=>$.pipe(D(()=>this.setIsFileDownloading(Se)),W(Q=>this.documentLibraryService.downloadDocumentationOrZip(Q).pipe(D(Ce=>{this.setIsFileDownloading(ui),this.fileService.downloadFile(Ce)}),ae(Ce=>(this.setIsFileDownloading(ye),this.errorHandler.handleError(Ce),qe)))))),this.deleteDocuments=this.effect($=>$.pipe(W(Q=>this.folderDetailsService.deleteDocumentsFromFolder([Q.documentId],Q.folderId).pipe(D(()=>{this.store.dispatch(new A.ResetMyFoldersDetailsEntities),this.store.dispatch(new A.ResetMyFoldersListState),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess",description:Q.documentName})),this.router.navigate([".."],{relativeTo:this.activatedRoute,queryParams:{folderName:Q.documentName}})}),ae(Ce=>(this.errorHandler.handleError(Ce),qe))))))}static{this.\u0275fac=function(t){return new(t||i)(V(Pt),V(ke),V(Ut),V(ve),V(R),V(ue),V(ie))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Xc=()=>({dateStyle:"long",timeStyle:"short"}),ep=()=>({iconClass:"icon-chevron-right",fontSize:"12px"});function tp(i,a){i&1&&(d(0,"div",3),L(1,"neptun-request-error-indicator",4),m())}function ip(i,a){i&1&&(d(0,"div",3),L(1,"neptun-details-loading-placeholder",5),m())}function np(i,a){if(i&1){let e=E();y(0),d(1,"button",13),w("click",function(){let n=_(e).ngIf,o=r(3).ngIf,x=r(2);return f(x.navigateToConnection(n.trainings,o.data,n.currentTrainingId))}),C(2),l(3,"hyphen"),m(),v()}if(i&2){let e=r(3).ngIf;
1s(),p("hasLeftOffset",!0)("postfixIcon",j(5,ep)),s(),M("",c(3,3,e.data.connectionString)," ")}}function op(i,a){if(i&1&&(y(0),u(1,np,4,6,"ng-container",1),l(2,"async"),v()),i&2){let e=r(4);s(),p("ngIf",c(2,1,e.trainingDetails$))}}function rp(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",6),d(2,"div",7)(3,"button",8),w("click",function(){_(e);let n=r(3);return f(n.openDeleteDialog())}),C(4),m(),d(5,"button",9),w("click",function(){_(e);let n=r(3);return f(n.downloadDocument())}),C(6),m()(),d(7,"div",10)(8,"neptun-data-view",11)(9,"dl")(10,"div",12)(11,"dt"),C(12),m(),d(13,"dd"),C(14),l(15,"hyphen"),m()(),d(16,"div",12)(17,"dt"),C(18),m(),d(19,"dd"),C(20),l(21,"formatKBytes"),l(22,"hyphen"),m()(),d(23,"div",12)(24,"dt"),C(25),m(),d(26,"dd"),C(27),m()(),d(28,"div",12)(29,"dt"),C(30),m(),d(31,"dd"),C(32),l(33,"translocoDate"),l(34,"hyphen"),m()(),d(35,"div",12)(36,"dt"),C(37),m(),d(38,"dd"),C(39),l(40,"hyphen"),m()(),d(41,"div",12)(42,"dt"),C(43),m(),d(44,"dd"),C(45),l(46,"hyphen"),m()(),d(47,"div",12)(48,"dt"),C(49),m(),d(50,"dd"),u(51,op,3,3,"ng-container",1),m()(),d(52,"div",12)(53,"dt"),C(54),m(),d(55,"dd"),C(56),l(57,"hyphen"),m()()()()(),v()}if(i&2){let e=r().ngIf,t=r().$implicit,n=r();s(),p("title",e.data.documentationName),s(2),p("accent","stroked")("color","error")("permissionRequired",n.deleteFilesFromFolderPermission),s(),M(" ",t("button.delete")," "),s(),p("accent","flat")("permissionRequired",n.downloadButtonPermission),s(),M(" ",t("button.download")," "),s(6),T(t("global.type")),s(2),M(" ",c(15,24,e.data.documentationType)," "),s(4),T(t("global.size")),s(2),M(" ",c(22,28,c(21,26,e.data.fileSize))," "),s(5),T(t("global.language")),s(2),M(" ",t("documentLibrary.notProvided")," "),s(3),T(t("documentLibrary.uploadedAt")),s(2),M(" ",c(34,33,He(33,30,e.data.uploadDate,j(41,Xc)))," "),s(5),T(t("documentLibrary.numberOfDownloads")),s(2),M(" ",c(40,35,e.data.downloadCounter)," "),s(4),T(t("documentLibrary.typeOfConnection")),s(2),M(" ",c(46,37,e.data.connectionType)," "),s(4),T(t("documentLibrary.relation")),s(2),p("ngIf",e.data.connectionId),s(3),T(t("global.description")),s(2),M(" ",c(57,39,e.data.description)," ")}}function ap(i,a){if(i&1&&(y(0),u(1,tp,2,0,"div",2),l(2,"hasError"),u(3,ip,2,0,"div",2),l(4,"isLoadingRequest"),u(5,rp,58,42,"ng-container",1),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function sp(i,a){if(i&1&&(y(0),u(1,ap,7,9,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.document$))}}var ga=(()=>{class i{constructor(e,t,n,o,x,b){this.myDocumentDetailsStore=e,this.documentLibrary=t,this.activatedRoute=n,this.transloco=o,this.dialogService=x,this.store=b,this.document$=this.myDocumentDetailsStore.details$,this.currentTrainingId$=this.store.select(_i.currentTrainingId),this.folderId=this.activatedRoute.snapshot.params.folderId,this.documentName=this.activatedRoute.snapshot.queryParams.documentName,this.documentId=this.activatedRoute.snapshot.params.documentId,this.trainings$=this.store.select(_i.trainings),this.trainingDetails$=we([this.trainings$,this.currentTrainingId$]).pipe(O(([z,$])=>({trainings:z,currentTrainingId:$}))),this.deleteFilesFromFolderPermission={controllerName:"DocumentContainer",actionName:"DeleteFilesFromFolder"},this.downloadButtonPermission={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_MyShareableFoldersDetailsDocumentDetailsDownloadButton}}ngOnInit(){this.myDocumentDetailsStore.getDetails(this.documentId)}downloadDocument(){this.myDocumentDetailsStore.downloadDocuments(this.documentId)}get deleteDialogData(){return{title:this.transloco.translate("fileUpload.deleteDocumentQuestion"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>this.myDocumentDetailsStore.deleteDocuments({documentId:this.documentId,folderId:this.folderId,documentName:this.documentName})})]}}openDeleteDialog(){this.dialogService.openConfirmActionDialog(this.deleteDialogData)}navigateToConnection(e,t,n){this.documentLibrary.navigateToConnection(e,t,n)}static{this.\u0275fac=function(t){return new(t||i)(g(On),g(st),g(ie),g(ce),g(Oe),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-document-details"]],features:[le([On,st,Ut,Fe])],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],["class","neptun-wrapper",4,"ngIf"],[1,"neptun-wrapper"],["test-id","error"],["test-id","loading"],[3,"title"],[1,"neptun-wrapper-padding","document-actions"],["neptun-button","","id","delete-button",3,"click","accent","color","permissionRequired"],["neptun-button","","id","download-button",3,"click","accent","permissionRequired"],["test-id","details",1,"neptun-wrapper"],[1,"detail"],["neptunDataViewItem",""],["neptun-button","","id","open-all-notifications-button",3,"click","hasLeftOffset","postfixIcon"]],template:function(t,n){t&1&&u(0,sp,3,3,"ng-container",0)},dependencies:[K,Z,Re,it,xe,_e,Me,nt,ot,X,ut,tt,Zt,ge,pe,he],styles:[".document-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:16px}@media only screen and (max-width:574px){.document-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column}}@media only screen and (max-width:767px){neptun-data-view[_ngcontent-%COMP%]{padding-left:20px}}"],changeDetection:0})}}return i})();var lp=()=>[];function cp(i,a){i&1&&(d(0,"div",3),L(1,"neptun-request-error-indicator",4),m())}function pp(i,a){i&1&&(d(0,"div",3),L(1,"neptun-details-loading-placeholder",5),m())}function mp(i,a){if(i&1&&(d(0,"neptun-data-view")(1,"dl")(2,"div",12)(3,"dt"),C(4),m(),d(5,"dd"),C(6),l(7,"hyphen"),m()()()()),i&2){let e=r(2).ngIf,t=r().$implicit;s(4),T(t("global.description")),s(2),M(" ",c(7,2,e.data.groupDescription)," ")}}function dp(i,a){if(i&1){let e=E();y(0),d(1,"neptun-secondary-title",6)(2,"neptun-table-header-actions",13),l(3,"async"),l(4,"isResultRequest"),l(5,"async"),l(6,"async"),w("itemAction",function(n){_(e);
1let o=r(4);return f(o.itemAction(n))})("orderBy",function(n){_(e);let o=r(4);return f(o.sortItems(n))}),m()(),v()}if(i&2){let e=a.ngIf,t=r(3).$implicit,n=r();s(),p("title",t("documentLibrary.members")),s(),p("actionsMenu",c(3,5,n.moreActionsMenuItems$))("orderItems",c(4,7,e)?e.data:j(13,lp))("isListDataLoading",c(5,9,n.isListLoading$)===!0)("isOrderingSaving",c(6,11,n.isOrderBySaving$)===!0)}}function up(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",6),d(2,"div",7)(3,"button",8),w("click",function(){_(e);let n=r().ngIf,o=r(2);return f(o.removeGroupFolder(n.data.personGroupId))}),C(4),m(),d(5,"neptun-basic-layout",9),u(6,mp,8,4,"ng-template",10),m()(),u(7,dp,7,14,"ng-container",1),l(8,"async"),d(9,"neptun-sortable-table-with-custom-header",11),l(10,"async"),l(11,"async"),l(12,"async"),l(13,"async"),l(14,"async"),w("sortItems",function(n){_(e);let o=r(3);return f(o.sortItems(n))})("getNextItems",function(n){_(e);let o=r(3);return f(o.getNextItems(n))}),m(),v()}if(i&2){let e=r().ngIf,t=r().$implicit,n=r();s(),p("title",e.data.groupName),s(2),p("accent","stroked")("color","error")("permissionRequired",n.removeGroupPermission),s(),M(" ",t("documentLibrary.remove")," "),s(),p("reverse",!0),s(2),p("ngIf",c(8,14,n.orderByMenu$)),s(2),p("data",c(10,16,n.dataSource$))("columns",c(11,18,n.displayedColumns$))("isListLoading",c(12,20,n.isListLoading$)===!0)("isSelectable",!1)("tableId","group-connection-details")("isNextVisible",c(13,22,n.isNextVisible$)===!0)("orderByMenu",c(14,24,n.orderByMenu$))}}function _p(i,a){if(i&1&&(y(0),u(1,cp,2,0,"div",2),l(2,"hasError"),u(3,pp,2,0,"div",2),l(4,"isLoadingRequest"),u(5,up,15,26,"ng-container",1),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function fp(i,a){if(i&1&&(y(0),u(1,_p,7,9,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.groupConnectionDetails$))}}var ha=(()=>{class i extends Ae{constructor(e,t,n,o,x){super(e),this.groupConnectionDetailsStore=e,this.store=t,this.route=n,this.transloco=o,this.dialogService=x,this.folderId=this.route.snapshot.params.folderId,this.groupConnectionId=this.route.snapshot.params.groupConnectionId,this.groupConnectionDetails$=this.groupConnectionDetailsStore.groupConnectionDetails$,this.isOrderBySaving$=this.groupConnectionDetailsStore.isOrderBySaving$,this.dataSource$=this.entities$.pipe(O(b=>ee(b)?fe(b.data.map(z=>this.convertToTableRow(z)),b.isPagingLoading??!1):b)),this.exportTitle="menu.documentLibrary.connectedUserGroups",this.removeGroupPermission={controllerName:"DocumentContainer",actionName:"RemovePersonGroupFromFolder"}}initialize(){ee(this.listState.entities)?this.groupConnectionDetailsStore.updateState(I(F({},this.listState),{contracts:I(F({},this.listState.contracts),{filterModel:{personGroupId:this.groupConnectionId}})})):(this.groupConnectionDetailsStore.getColumns(),this.groupConnectionDetailsStore.loadOrderBy(),this.groupConnectionDetailsStore.getPreviousFilters(),this.listStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{personGroupId:this.groupConnectionId})),this.groupConnectionDetailsStore.getGroupConnectionDetails({personGroupId:this.groupConnectionId}),this.groupConnectionDetailsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.groupConnectionDetailsStore.fetchItemsFromServer(I(F({},I(F({},this.listState.contracts.filterModel),{personGroupId:this.groupConnectionId})),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.groupConnectionDetailsStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot(It.getGroupConnectionDetailsListState)}resetModuleState(){this.store.dispatch(new ht.ResetGroupConnectionDetailsListState)}convertToTableRow(e){return{data:F({},e),imageData:{printName:e.avatar.printName,fallbackColorCodeInHexa:e.avatar.fallbackColorCodeInHexa,image:e.avatar.image,avatarType:null},actions:{}}}removeGroupFolder(e){let t=[e],n={title:this.transloco.translate("documentLibrary.groupDeletionConfirmation"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>
1this.groupConnectionDetailsStore.deleteGroupConnectionPeople({folderId:this.folderId,ids:t})})]};this.dialogService.openConfirmActionDialog(n)}static{this.\u0275fac=function(t){return new(t||i)(g(ri),g(R),g(ie),g(ce),g(Oe))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-group-connection-details"]],features:[le([Ft,ri,Fe]),re],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],["class","neptun-wrapper",4,"ngIf"],[1,"neptun-wrapper"],["test-id","error"],["test-id","loading"],[3,"title"],[1,"neptun-wrapper-padding"],["neptun-button","","id","remove-button",1,"responsive",3,"click","accent","color","permissionRequired"],[3,"reverse"],["neptunBasicLayoutRightContent",""],[1,"neptun-wrapper",3,"sortItems","getNextItems","data","columns","isListLoading","isSelectable","tableId","isNextVisible","orderByMenu"],["neptunDataViewItem",""],[3,"itemAction","orderBy","actionsMenu","orderItems","isListDataLoading","isOrderingSaving"]],template:function(t,n){t&1&&u(0,fp,3,3,"ng-container",0)},dependencies:[K,Z,Re,it,xe,_e,Me,ft,_t,nt,ot,cn,et,kt,X,tt,ge,pe,he],encapsulation:2,changeDetection:0})}}return i})();var go={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{folderId:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryGroupConnections,defaultColumns:[],columns:h,displayedColumns:h,isMoreFilterOpen:!1,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],tableActions:[],previousFilters:h,hiddenFilters:{folderId:""}};var $t=class Rn{constructor(){}static getGroupConnectionsListState(a){return a.groupConnectionsList}setGroupConnectionsListState(a,e){a.patchState({groupConnectionsList:e.groupConnectionsListState})}resetGroupConnectionsState(a){a.patchState({groupConnectionsList:go})}resetEntities(a){a.patchState({groupConnectionsList:I(F({},a.getState().groupConnectionsList),{entities:h})})}static{this.\u0275fac=function(e){return new(e||Rn)}}static{this.\u0275prov=B({token:Rn,factory:Rn.\u0275fac})}};U([ne(Ct.SetGroupConnectionsListState),S("design:type",Function),S("design:paramtypes",[Object,Ct.SetGroupConnectionsListState]),S("design:returntype",void 0)],$t.prototype,"setGroupConnectionsListState",null);U([ne(Ct.ResetGroupConnectionsState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],$t.prototype,"resetGroupConnectionsState",null);U([ne(Ct.ResetEntites),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],$t.prototype,"resetEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],$t,"getGroupConnectionsListState",null);$t=U([dt({name:"groupconnections",defaults:{groupConnectionsList:go}}),S("design:paramtypes",[])],$t);var Bn=(()=>{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{folderId:""}},interfaceIdentity:Y.DocumentLibraryGroupConnections,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"groupName"},{text:"documentLibrary.members",key:"groupMembersCount"},{text:"global.description",key:"groupDescription"}],columns:h,displayedColumns:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h}),this.endPoint="DocumentContainer/GetFolderPersonGroupConnections",this.defaultPagingNumber=10,this.store=k(R),this.groupConnectionsService=k(Ft),this.errorHandler=k(mi),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new Ct.SetGroupConnectionsListState(t))}))),this.deleteGroupConnections=this.effect(e=>e.pipe(oe(this.selectedEntities$),W(([t,n])=>this.groupConnectionsService.deleteGroupConnections(t,n.map(o=>o.id)).pipe(D(()=>{this.updateSelectedEntities([]),this.reloadItemsFromServer(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(o=>(this.errorHandler.handleError(o),qe))))))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();
1var Ca=()=>[];function hp(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",8),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"isResultRequest"),l(5,"async"),w("orderBy",function(n){_(e);let o=r(3);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(3);return f(o.itemAction(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("toggleFilter",function(){_(e);let n=r(3);return f(n.toggleFilter())}),m()}if(i&2){let e=a.ngIf,t=r().ngIf,n=r(2);p("actionsMenu",c(1,6,n.moreActionsMenuItems$))("isListDataLoading",c(2,8,n.isListDataLoading$)===!0)("actionsMenu",c(3,10,n.moreActionsMenuItems$))("orderItems",c(4,12,t)?t.data:j(16,Ca))("isOrderingSaving",c(5,14,n.isOrderBySaving$)===!0)("isAnyItemsSelected",e.length>0)}}function Cp(i,a){if(i&1&&(y(0),u(1,hp,6,17,"neptun-table-header-actions",7),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.selectedEntities$))}}function Sp(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",1),d(2,"div",2)(3,"button",3),w("click",function(){_(e);let n=r();return f(n.addNew())}),C(4),m(),u(5,Cp,3,3,"ng-container",4),l(6,"async"),m(),d(7,"div",5)(8,"neptun-sortable-table-with-custom-header",6),l(9,"async"),l(10,"async"),l(11,"async"),l(12,"async"),l(13,"async"),l(14,"async"),l(15,"async"),w("tableAction",function(n){_(e);let o=r();return f(o.callActionCallback(n))})("itemSelected",function(n){_(e);let o=r();return f(o.setSelectedItems(n))})("sortItems",function(n){_(e);let o=r();return f(o.sortItems(n))})("getNextItems",function(n){_(e);let o=r();return f(o.getNextItems(n))}),m()(),v()}if(i&2){let e,t,n=a.$implicit,o=r();s(),p("title",n("menu.documentLibrary.connectedUserGroups")),s(2),p("accent","flat")("permissionRequired",o.linkGroupPermission),s(),M(" ",n("button.add")," "),s(),p("ngIf",c(6,14,o.orderByMenu$)),s(3),p("data",c(9,16,o.dataSource$))("columns",c(10,18,o.displayedColumns$))("isSelectable",!0)("tableActions",(e=c(11,20,o.tableActions$))!==null&&e!==void 0?e:j(30,Ca))("selectedCount",(t=(t=c(12,22,o.selectedEntities$))==null?null:t.length)!==null&&t!==void 0?t:0)("tableId","attachments")("isNextVisible",c(13,24,o.isNextVisible$)===!0)("orderByMenu",c(14,26,o.orderByMenu$))("isListLoading",c(15,28,o.isListLoading$)===!0)}}var Sa=(()=>{class i extends Ae{constructor(e,t,n,o,x,b,z,$,Q){super(e),this.groupConnectionsStore=e,this.groupConnections=t,this.linkablePersonGroupsServie=n,this.multiStepDialogService=o,this.transloco=x,this.dialogService=b,this.store=z,this.router=$,this.route=Q,this.exportTitle="menu.documentLibrary.connectedUserGroups",this.folderId=this.route.snapshot.params.folderId,this.linkGroupPermission={controllerName:"DocumentContainer",actionName:"LinkPersonGroup"},this.removeGroupPermission={controllerName:"DocumentContainer",actionName:"RemovePersonGroupFromFolder"},this.isOrderBySaving$=this.groupConnectionsStore.isOrderBySaving$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([Ce,Je])=>ee(Ce)?fe(Ce.data.map(lt=>this.convertToTableRow(lt,Je.some(xi=>xi.id===lt.id))),Ce.isPagingLoading??!1):Ce))}initialize(){ee(this.listState.entities)?this.groupConnectionsStore.updateState(I(F({},this.listState),{contracts:I(F({},this.listState.contracts),{filterModel:{folderId:this.folderId}})})):(this.groupConnectionsStore.getColumns(),this.groupConnectionsStore.loadOrderBy(),this.groupConnectionsStore.getPreviousFilters(),this.listStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),this.groupConnectionsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.groupConnectionsStore.fetchItemsFromServer(I(F({},I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.groupConnectionsStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot($t.getGroupConnectionsListState)}resetModuleState(){this.store.dispatch(new Ct.ResetGroupConnectionsState)}setSelectedItems(e){let t=[this.cancelAction,this.deleteAction];this.groupConnectionsStore.updateTableActions(t),super.setSelectedItems(e)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.groupConnectionsStore.updateSelectedEntities([])}}get deleteAction(){return{text:this.transloco.translate("documentLibrary.remove"),icon:H.Trash,type:me.Delete,callback:e=>this.openDeleteDialog(e),permission:this.removeGroupPermission}}openDeleteDialog(e){let t={title:this.transloco.translate(e.length>pt.ONE?"documentLibrary.groupsDeletionConfirmation":"documentLibrary.groupDeletionConfirmation"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>this.groupConnectionsStore.deleteGroupConnections(this.folderId)})]};this.dialogService.openConfirmActionDialog(t)}
1convertToTableRow(e,t){let n=()=>{this.router.navigate([e.id],{relativeTo:this.route,queryParamsHandling:"merge",queryParams:{groupConnectionId:e.id,groupName:e.groupName}})};return{data:e,detailsCallback:n,selected:t,actions:{details:{text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n}}}}addNew(){let e={data:this.getLinkablePersonGroupData(this.folderId),disableClose:!1,width:"820px"};this.multiStepDialogService.openDialog(Ln,e).pipe(D(()=>this.store.dispatch(new A.ResetMyShareableFoldersUserConnectionDetails)),se(t=>!!t&&t.linkablePersons.length>0),Ot(this.destroy$),W(t=>{let n=t.linkablePersons.map(o=>o.id);return this.linkablePersonGroupsServie.linkPersonGroupsToFolder(this.folderId,n)})).subscribe(()=>{this.groupConnectionsStore.reloadItemsFromServer()})}getLinkablePersonGroupData(e){return{dialogSteps:[{componentType:En,data:{componentData:{documentId:e}}},{componentType:Tn,data:{}}],stepCounterText:"",result:{closeDialog:!1,linkablePersons:[]}}}static{this.\u0275fac=function(t){return new(t||i)(g(Bn),g(Ft),g(bi),g(ti),g(ce),g(Oe),g(R),g(ue),g(ie))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-group-connections"]],features:[le([Bn,Ft]),re],decls:1,vars:0,consts:[[4,"transloco"],[3,"title"],[1,"neptun-wrapper-padding"],["neptun-button","","id","add-new-button",1,"action-container__add-button",3,"click","accent","permissionRequired"],[4,"ngIf"],[1,"neptun-wrapper"],[1,"neptun-wrapper",3,"tableAction","itemSelected","sortItems","getNextItems","data","columns","isSelectable","tableActions","selectedCount","tableId","isNextVisible","orderByMenu","isListLoading"],["class","action-container__actions",3,"actionsMenu","isListDataLoading","orderItems","isOrderingSaving","isAnyItemsSelected","orderBy","itemAction","resetFilter","toggleFilter",4,"ngIf"],[1,"action-container__actions",3,"orderBy","itemAction","resetFilter","toggleFilter","actionsMenu","isListDataLoading","orderItems","isOrderingSaving","isAnyItemsSelected"]],template:function(t,n){t&1&&u(0,Sp,16,31,"ng-container",0)},dependencies:[K,xe,_e,Me,Z,et,kt,X,pe],styles:[".neptun-wrapper-padding[_ngcontent-%COMP%]{display:flex;justify-content:space-between}@media only screen and (max-width:767px){.neptun-wrapper-padding[_ngcontent-%COMP%]{flex-direction:column;gap:16px}}"],changeDetection:0})}}return i})();function yp(i,a){if(i&1){let e=E();d(0,"neptun-file-upload-simple",8),pi("ngModelChange",function(n){_(e);let o=r(2);return ci(o.documents,n)||(o.documents=n),f(n)}),m()}if(i&2){let e=a.ngIf,t=r(2);p("documentationTypes",e)("documentLibraryService",t.documentationLibraryService)("multiple",!1),li("ngModel",t.documents)}}function vp(i,a){if(i&1){let e=E();d(0,"neptun-basic-dialog-layout"),y(1,1),d(2,"h2"),C(3),m(),v(),y(4,2),u(5,yp,1,4,"neptun-file-upload-simple",3),l(6,"async"),v(),y(7,4),d(8,"div",5)(9,"button",6),C(10),m(),d(11,"button",7),w("click",function(){_(e);let n=r();return f(n.save())}),C(12),m()(),v(),m()}if(i&2){let e=a.$implicit,t=r();s(3),T(e("menu.newDocument")),s(2),p("ngIf",c(6,7,t.docTypes$)),s(4),p("color","white"),s(),M(" ",e("button.cancel")," "),s(),p("disabled",t.documents.length===0)("accent","flat"),s(),M(" ",e("button.save")," ")}}var ya=(()=>{class i{constructor(e,t,n,o,x){this.documentationLibraryService=e,this.data=t,this.documentLibrary=n,this.dialogRef=o,this.store=x,this.documents=[],this.docTypes$=this.documentLibrary.getNMSDocumentationTypeId()}save(){this.documentLibrary.uploadDocumentationsToFolder(this.saveFilesToContainerFactory()).pipe(D(()=>{this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.successfulUpload"})),this.dialogRef.close(),this.data.callback()}),J(1)).subscribe()}saveFilesToContainerFactory(){let e=this.documents.map(t=>t.guid);return{folderId:this.data.folderId,filesArray:e}}static{this.\u0275fac=function(t){return new(t||i)(g(Si),g(zt),g(ve),g(No),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-file-upload"]],decls:1,vars:0,consts:[[4,"transloco"],["title",""],["content",""],["id","documentId","name","documentId",3,"documentationTypes","documentLibraryService","multiple","ngModel","ngModelChange",4,"ngIf"],["actions",""],["neptunBasicDialogLayoutActions",""],["neptun-button","","id","cancel-button","matDialogClose","",3,"color"],["neptun-button","","id","save-button","matDialogClose","",3,"click","disabled","accent"],["id","documentId","name","documentId",3,"ngModelChange","documentationTypes","documentLibraryService","multiple","ngModel"]],template:function(t,n){t&1&&u(0,vp,13,9,"neptun-basic-dialog-layout",0)},dependencies:[K,Ki,Z,Ci,Ne,Pe,Ue,zi,_e,ji,X],encapsulation:2,changeDetection:0})}}return i})();var Pn=(()=>{class i{constructor(e){this.httpClient=e}deleteFolders(e){return this.httpClient.post(`${De.settings.apiServer.url}DocumentContainer/DeleteContainers/`,{documentIds:e})}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function xp(i,a){if(i&1){let e=E();d(0,"button",11),w("click",function(){_(e);let n=r(2);return f(n.save())}),C(1),m()}if(i&2){let e=a.ngIf,t=r().$implicit,n=Lt(7),o=r();p("accent","flat")("permissionRequired",o.modifyFolderBaseDetailsPermission)("disabled",!!n.invalid)("loading",e.value),s(),M(" ",t("button.save")," ")}}function Dp(i,a){if(i&1){let e=E();y(0),d(1,"neptun-basic-dialog-layout"),y(2,2),d(3,"h2",3),C(4),m(),v(),y(5,4),d(6,"form",null,0)(8,"neptun-form-input",5),pi("ngModelChange",function(n){_(e);
1let o=r();return ci(o.folderName,n)||(o.folderName=n),f(n)}),m(),d(9,"neptun-form-textarea",6),pi("ngModelChange",function(n){_(e);let o=r();return ci(o.folderDescription,n)||(o.folderDescription=n),f(n)}),m()(),v(),y(10,7),d(11,"div",8)(12,"button",9),C(13),m(),u(14,xp,2,5,"button",10),l(15,"async"),m(),v(),m(),v()}if(i&2){let e=a.$implicit,t=r();s(4),T(e("button.modifyBaseData")),s(4),p("title",e("documentLibrary.folderName")),li("ngModel",t.folderName),p("maxLength",200)("required",!0),s(),li("ngModel",t.folderDescription),p("title",e("documentLibrary.folderDescription"))("maxLength",2e3),s(3),p("color","white"),s(),T(e("button.cancel")),s(),p("ngIf",c(15,11,t.isLoading$))}}var va=(()=>{class i{constructor(e,t,n,o){this.data=e,this.loadingService=t,this.fb=n,this.myFoldersService=o,this.folderName=this.data.folderName,this.folderDescription=this.data.folderDescription,this.modifyFolderBaseDetailsPermission={controllerName:"DocumentContainer",actionName:"ModifyFolderBaseDetails"},this.returnValue=this.fb.group({folderName:["",[Nt.required,Nt.maxLength(pt.TWO_HUNDRED)]],folderDescription:["",[Nt.required,Nt.maxLength(pt.TWO_THOUSAND)]],folderId:["",[Nt.required]]}),this.isLoading$=this.loadingService.isLoadingByUrl("DocumentContainer/ModifyFolderBaseDetails").pipe(Do(!1),O(x=>({value:x})))}save(){this.data.callback({folderName:this.folderName,description:this.folderDescription})}static{this.\u0275fac=function(t){return new(t||i)(g(zt),g(hi),g(Qi),g(Pn))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-my-folders-edit"]],decls:1,vars:0,consts:[["form","ngForm"],[4,"transloco"],["title",""],[1,"mat-h2"],["content",""],["id","folder-name","name","folderName",1,"input",3,"ngModelChange","title","ngModel","maxLength","required"],["id","folder-description","name","description",1,"input",3,"ngModelChange","ngModel","title","maxLength"],["actions",""],["neptunBasicDialogLayoutActions",""],["neptun-button","","id","cancel-button","matDialogClose","",3,"color"],["neptun-button","","id","save-button",3,"accent","permissionRequired","disabled","loading","click",4,"ngIf"],["neptun-button","","id","save-button",3,"click","accent","permissionRequired","disabled","loading"]],template:function(t,n){t&1&&u(0,Dp,16,13,"ng-container",1)},dependencies:[K,Ki,Ne,Hi,Pe,Wi,fi,Ue,Wo,Qe,nn,zi,_e,ji,Z,Me,X],styles:[".w-100[_ngcontent-%COMP%]{display:block;width:100%}.h-100[_ngcontent-%COMP%]{height:100%!important}.hidden[_ngcontent-%COMP%]{display:none}.flex-end[_ngcontent-%COMP%]{justify-content:flex-end!important}
1.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:#2223;margin:32px 0}.no-scrollbar[_ngcontent-%COMP%]{scrollbar-width:none;margin-bottom:0;padding-bottom:0}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.action-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:32px}.action-container[_ngcontent-%COMP%] .action-container__buttons[_ngcontent-%COMP%]{display:flex;gap:12px}.action-container__actions[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.neptun-page-description[_ngcontent-%COMP%]{margin-bottom:32px}.onboarding-dialog-panel-class[_ngcontent-%COMP%] mat-dialog-container[_ngcontent-%COMP%]{border-radius:8px!important}.neptun-basic-dialog-layout-actions[_ngcontent-%COMP%]{display:flex;align-items:center;color:#fff;width:100%;gap:16px;justify-content:flex-end;flex-basis:0;flex-grow:1}.neptun-basic-dialog-layout-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff}.neptun-basic-dialog-layout-actions.dialog-container--confirm[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#0943d9}neptun-multi-step-dialog-step-general-view[_ngcontent-%COMP%] .actions__buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff}.neptun-wrapper-padding[_ngcontent-%COMP%], .neptun-wrapper[_ngcontent-%COMP%], .neptun-wrapper--max-width-xxl[_ngcontent-%COMP%]{display:block;max-width:1280px;margin-left:auto;margin-right:auto;padding:0 20px;width:-webkit-fill-available}.neptun-wrapper--max-width-xxl[_ngcontent-%COMP%]{max-width:1700px;padding:0}.context-bar[_ngcontent-%COMP%]{margin-top:16px}@media screen and (max-width:768px){.context-bar--top[_ngcontent-%COMP%]{display:none}.context-bar--bottom[_ngcontent-%COMP%]{position:sticky;bottom:0;z-index:3}}b[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}.browser-default-style[_ngcontent-%COMP%] ol[_ngcontent-%COMP%], .browser-default-style[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding-left:32px}.text-wrap[_ngcontent-%COMP%]{white-space:normal}mat-datepicker-content[_ngcontent-%COMP%] .time-picker-container[_ngcontent-%COMP%] neptun-form-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:48px!important;height:48px!important;text-align:center}mat-datepicker-content[_ngcontent-%COMP%] .time-picker-container[_ngcontent-%COMP%] neptun-form-input[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%]{padding:unset}mat-datepicker-content[_ngcontent-%COMP%] .time-picker-container[_ngcontent-%COMP%] neptun-form-input[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{margin-bottom:unset}mat-datepicker-content[_ngcontent-%COMP%] .time-picker-container[_ngcontent-%COMP%] neptun-form-input[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper[_ngcontent-%COMP%]{margin:unset}.text-underline-position-under[_ngcontent-%COMP%]{text-underline-position:under}.link-focus[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;margin-left:-12px}.link-focus[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4d94ff;border-radius:8px}button.link-button.spinner[_ngcontent-%COMP%] .link-button__label[_ngcontent-%COMP%]{visibility:hidden}.checkbox-left[_ngcontent-%COMP%]{margin-left:-10px}.general-focus[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4d94ff;border-radius:8px}.anchor-reset[_ngcontent-%COMP%]:hover{text-decoration:none;transition:unset}.mat-typography[_ngcontent-%COMP%] h3.h3-unformatted[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h5.h5-unformatted[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h6.h6-unformatted[_ngcontent-%COMP%]{font:unset}.mat-typography[_ngcontent-%COMP%] h5.h5-unformatted[_ngcontent-%COMP%]{margin:unset;font-size:16px;font-weight:400}.mat-typography[_ngcontent-%COMP%] h6.h6-unformatted[_ngcontent-%COMP%]{margin:0}.router-container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(router-outlet){flex:1}app-root[_ngcontent-%COMP%]:has(~.cdk-overlay-container .dialog-backdrop) .layout[_ngcontent-%COMP%] .app-main[_ngcontent-%COMP%] .push-notifications-wrapper[_ngcontent-%COMP%] .push-notifications[_ngcontent-%COMP%]{position:fixed}@media only screen and (max-width:767px){.neptun-page-description[_ngcontent-%COMP%]{padding:0 20px}.neptun-basic-dialog-layout-actions[_ngcontent-%COMP%]{flex-direction:column-reverse}.dialog-overlay-wrapper[_ngcontent-%COMP%]{padding-right:8px;padding-left:8px}.neptun-wrapper[_ngcontent-%COMP%], .neptun-wrapper--max-width-xxl[_ngcontent-%COMP%]{padding:0}}@media only screen and (max-width:992px){.action-container[_ngcontent-%COMP%]{padding:0 20px}}@media screen and (max-width:767px){neptun-multi-step-dialog-step-general-view[_ngcontent-%COMP%] .actions__buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}.input[_ngcontent-%COMP%] + .input[_ngcontent-%COMP%]{margin-top:32px;display:block}.mat-h2[_ngcontent-%COMP%]{margin-bottom:32px}"],changeDetection:0})}}return i})();var Nn=(()=>
1{class i extends Ee{constructor(e,t,n){super(Mi),this.store=e,this.fileService=t,this.documentLibraryService=n,this.endPoint="DocumentContainer/GetShareableFolderDetailsFiles",this.defaultPagingNumber=10,this.folderDetails$=this.select(o=>o.folderDetails),this.containerStatus$=this.select(o=>o.containerStatus),this.folderConnections$=this.select(o=>o.folderConnections),this.myFolderDetailsService=k(Ut),this.errorHandler=k(Fe),this.saveListState=this.effect(o=>o.pipe(oe(this.state$),D(([,x])=>{this.store.dispatch(new A.SaveMyFoldersDetailsListState(x))}))),this.getFolderDetails=this.effect(o=>o.pipe(D(()=>{this.patchState({folderDetails:Se})}),W(x=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetShareableFolderDetails",x).pipe(D(b=>this.patchState({folderDetails:{data:b}})),ae(b=>(this.patchState({folderDetails:ye}),de(()=>b))))))),this.getContainerStatus=this.effect(o=>o.pipe(D(()=>{this.patchState({folderDetails:Se})}),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetContainerStatus").pipe(D(x=>this.patchState({containerStatus:{data:x}})),ae(x=>(this.patchState({folderDetails:ye}),de(()=>x))))))),this.getFolderConnections=this.effect(o=>o.pipe(D(()=>{this.patchState({folderDetails:Se})}),W(x=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetFolderConnections",x).pipe(D(b=>this.patchState({folderConnections:{data:b}})),ae(b=>(this.patchState({folderDetails:ye}),de(()=>b))))))),this.downloadFiles=this.effect(o=>o.pipe(oe(this.selectedEntities$),O(([,x])=>x.map(b=>b.id)),W(x=>this.documentLibraryService.downloadDocumentationOrZip(x).pipe(J(1),D(b=>{this.fileService.downloadFile(b),this.updateSelectedEntities([])}),ae(b=>(this.errorHandler.handleError(b),qe)))))),this.deleteFolders=this.effect(o=>o.pipe(oe(this.selectedEntities$),W(([x,b])=>this.myFolderDetailsService.deleteDocumentsFromFolder(b.map(z=>z.id),x).pipe(J(1),D(()=>{this.updateSelectedEntities([]),this.getFolderDetails({folderId:x}),this.store.dispatch(new A.ResetMyFoldersListState),this.reloadItemsFromServer(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(z=>(this.errorHandler.handleError(z),qe))))))}static{this.\u0275fac=function(t){return new(t||i)(V(R),V(ke),V(ve))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var ba=()=>[],Ip=()=>({dateStyle:"long",timeStyle:"short"});function Lp(i,a){i&1&&(y(0),d(1,"div",3),L(2,"neptun-request-error-indicator",4),m(),v())}function wp(i,a){i&1&&(y(0),d(1,"div",3),L(2,"neptun-details-loading-placeholder",5),m(),v())}function Tp(i,a){if(i&1&&L(0,"neptun-navigation-button",14),i&2){let e=a.$implicit;p("link",e)}}function Mp(i,a){if(i&1&&(d(0,"div",12),u(1,Tp,1,1,"neptun-navigation-button",13),l(2,"async"),m()),i&2){let e=r(4);s(),p("ngForOf",c(2,1,e.links$))}}function Ep(i,a){if(i&1){let e=E();d(0,"div",15)(1,"button",16),w("click",function(){_(e);let n=r(2).ngIf,o=r(2);return f(o.openUpdateFolderDialog(n.data))}),C(2),m(),d(3,"neptun-data-view",17)(4,"dl")(5,"div",18)(6,"dt"),C(7),m(),d(8,"dd"),C(9),l(10,"formatKBytes"),l(11,"hyphen"),m()(),d(12,"div",18)(13,"dt"),C(14),m(),d(15,"dd"),C(16),l(17,"translocoDate"),l(18,"hyphen"),m()(),d(19,"div",18)(20,"dt"),C(21),m(),d(22,"dd"),C(23),l(24,"hyphen"),m()(),d(25,"div",18)(26,"dt"),C(27),m(),d(28,"dd"),C(29),l(30,"hyphen"),m()()()()()}if(i&2){let e=r(2).ngIf,t=r().$implicit,n=r();s(),p("accent","stroked")("permissionRequired",n.documentContainerBasicDataEditButtonPermission),s(),M(" ",t("button.modifyBaseData")," "),s(5),T(t("global.size")),s(2),M(" ",c(11,13,c(10,11,e.data.folderSize))," "),s(5),T(t("tasks.lastModified")),s(2),M(" ",c(18,18,He(17,15,e.data.lastModified,j(24,Ip)))," "),s(5),T(t("documentLibrary.numberOfDownloads")),s(2),M(" ",c(24,20,e.data.downloadCounter)," "),s(4),T(t("global.description")),s(2),M(" ",c(30,22,e.data.description)," ")}}function Op(i,a){if(i&1&&(y(0),L(1,"neptun-storage-statistics",19),l(2,"lowercase"),v()),i&2){let e=r().ngIf,t=r(3).$implicit;s(),p("percentage",e.data.collabSpacePercentage)("storageSize",e.data.collabSpace)("freeStorage",e.data.collabFreeSpace)("label",c(2,5,t("documentLibrary.storageOccupancy")))("reservedStorage",e.data.collabUserSpace)}}function Rp(i,a){if(i&1&&(d(0,"div"),u(1,Op,3,7,"ng-container",1),l(2,"isResultRequest"),m()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,1,e))}}function Bp(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",22),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"isResultRequest"),w("orderBy",function(n){_(e);
1let o=r(5);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(5);return f(o.itemAction(n))}),m()}if(i&2){let e=a.ngIf,t=r().ngIf,n=r(4);p("actionsMenu",c(1,5,n.moreActionsMenuItems$))("isListDataLoading",c(2,7,n.isListLoading$)===!0)("isOrderingSaving",c(3,9,n.isOrderBySaving$)===!0)("orderItems",c(4,11,t)?t.data:j(13,ba))("isAnyItemsSelected",e.length>0)}}function Pp(i,a){if(i&1&&(y(0),d(1,"div",20),u(2,Bp,5,14,"neptun-table-header-actions",21),l(3,"async"),m(),v()),i&2){let e=r(4);s(2),p("ngIf",c(3,1,e.selectedEntities$))}}function Np(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",6),d(2,"div",7)(3,"neptun-basic-layout"),u(4,Mp,3,3,"ng-template",8)(5,Ep,31,25,"ng-template",9),m(),u(6,Rp,3,3,"div",1),l(7,"async"),d(8,"div",10)(9,"button",11),w("click",function(){_(e);let n=r(3);return f(n.openUploadDialog())}),C(10),m(),u(11,Pp,4,3,"ng-container",1),l(12,"async"),m()(),v()}if(i&2){let e=r().ngIf,t=r().$implicit,n=r();s(),p("title",e.data.folderName),s(5),p("ngIf",c(7,6,n.containerStatus$)),s(3),p("accent","flat")("permissionRequired",n.uploadDocumentationsToFolderPermission),s(),M(" ",t("button.addNew")," "),s(),p("ngIf",c(12,8,n.orderByMenu$))}}function Ap(i,a){if(i&1){let e=E();y(0),u(1,Lp,3,0,"ng-container",1),l(2,"hasError"),u(3,wp,3,0,"ng-container",1),l(4,"isLoadingRequest"),u(5,Np,13,10,"ng-container",1),l(6,"isResultRequest"),d(7,"neptun-sortable-table-with-custom-header",2),l(8,"async"),l(9,"async"),l(10,"async"),l(11,"async"),l(12,"async"),l(13,"async"),l(14,"async"),w("itemAction",function(n){_(e);let o=r(2);return f(o.itemAction(n))})("itemSelected",function(n){_(e);let o=r(2);return f(o.setSelectedItems(n))})("tableAction",function(n){_(e);let o=r(2);return f(o.callActionCallback(n))})("sortItems",function(n){_(e);let o=r(2);return f(o.sortItems(n))})("getNextItems",function(n){_(e);let o=r(2);return f(o.getNextItems(n))}),m(),v()}if(i&2){let e,t,n=a.ngIf,o=r(2);s(),p("ngIf",c(2,12,n)),s(2),p("ngIf",c(4,14,n)),s(2),p("ngIf",c(6,16,n)),s(2),p("data",c(8,18,o.dataSource$))("columns",c(9,20,o.displayedColumns$))("isListLoading",c(10,22,o.isListLoading$)===!0)("isSelectable",!0)("selectedCount",(e=(e=c(11,24,o.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("tableId","my-folders-details-list")("isNextVisible",c(12,26,o.isNextVisible$)===!0)("orderByMenu",c(13,28,o.orderByMenu$))("tableActions",(t=c(14,30,o.tableActions$))!==null&&t!==void 0?t:j(32,ba))}}function kp(i,a){if(i&1&&(y(0),u(1,Ap,15,33,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.folderDetails$))}}var xa=(()=>{class i extends Ae{constructor(e,t,n,o,x,b,z,$){super(e),this.myFoldersDetailsStore=e,this.fileService=t,this.dialogService=n,this.router=o,this.dialog=x,this.route=b,this.store=z,this.transloco=$,this.folderId=this.route.snapshot.params.folderId,this.folderDetails$=this.myFoldersDetailsStore.folderDetails$,this.containerStatus$=this.myFoldersDetailsStore.containerStatus$,this.folderConnections$=this.myFoldersDetailsStore.folderConnections$,this.documentContainerBasicDataEditButtonPermission={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_BasicDataEditButton},this.uploadDocumentationsToFolderPermission={controllerName:"DocumentContainer",actionName:"UploadDocumentationsToFolder"},this.isOrderBySaving$=this.myFoldersDetailsStore.isOrderBySaving$,this.links$=this.folderConnections$.pipe(O(Q=>ee(Q)?[{text:this.transloco.translate("menu.documentLibrary.connectedUsers"),icon:H.Group,badgeData:Q.data.userConnectionsCount,callback:()=>{this.router.navigate(["user-connections"],{relativeTo:this.route,queryParams:F({},this.route.snapshot.queryParams)})}},{text:this.transloco.translate("menu.documentLibrary.connectedUserGroups"),icon:H.Share,badgeData:Q.data.personGroupConnectionsCount,callback:()=>{this.router.navigate(["own-group-connections"],{relativeTo:this.route,queryParams:F({},this.route.snapshot.queryParams)})}},{text:this.transloco.translate("menu.documentLibrary.connectedSocialGroups"),icon:H.Apps,badgeData:Q.data.virtualSpaceConnectionsCount,callback:()=>{this.router.navigate(["group-connections"],{relativeTo:this.route,queryParams:F({}
1,this.route.snapshot.queryParams)})}}]:[])),this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([Q,Ce])=>ee(Q)?fe(Q.data.map(Je=>this.convertToTableRow(Je,Ce.some(lt=>lt.id===Je.id))),Q.isPagingLoading??!1):Q))}initialize(){ee(this.listState.entities)?this.myFoldersDetailsStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.myFoldersDetailsStore.getColumns(),this.myFoldersDetailsStore.loadOrderBy(),this.myFoldersDetailsStore.getPreviousFilters(),this.myFoldersDetailsStore.updateHiddenFilters({folderId:this.folderId}),this.myFoldersDetailsStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),this.myFoldersDetailsStore.getFolderDetails({folderId:this.folderId}),this.myFoldersDetailsStore.getContainerStatus(),this.myFoldersDetailsStore.getFolderConnections({folderId:this.folderId}),this.myFoldersDetailsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.myFoldersDetailsStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.myFoldersDetailsStore.defaultPagingNumber})))).subscribe())}setSelectedItems(e){this.myFoldersDetailsStore.updateTableActions([this.cancelAction,this.downloadAction,this.deleteAction]),super.setSelectedItems(e)}loadModuleState(){return this.store.selectSnapshot(te.myFoldersDetailsList)}resetModuleState(){this.store.dispatch(new A.ResetMyFoldersDetailsListState)}get deleteAction(){return{permission:{controllerName:"DocumentContainer",actionName:"DeleteFilesFromFolder"},text:this.transloco.translate("button.delete"),icon:H.Trash,type:me.Delete,callback:e=>this.openDeleteDialog(e)}}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.myFoldersDetailsStore.updateSelectedEntities([])}}get downloadAction(){let e={controllerName:"",actionName:"",permissionGuid:Ve.DocumentContainer_MyShareableFoldersDetailsDocumentDetailsDownloadButton};return{text:this.transloco.translate("button.download"),permission:e,icon:H.Download,type:me.Download,callback:()=>this.myFoldersDetailsStore.downloadFiles()}}openDeleteDialog(e){let t={title:this.transloco.translate(e.length>pt.ONE?"fileUpload.deleteDocumentsQuestion":"fileUpload.deleteDocumentQuestion"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>this.myFoldersDetailsStore.deleteFolders(this.folderId)})]};this.dialogService.openConfirmActionDialog(t)}openUpdateFolderDialog(e){this.dialog.openDialogs.length>0||(this.dialogRef=this.dialogService.openDialog(va,{folderName:e.folderName,folderDescription:e.description,callback:t=>this.updateRequest(t)}))}updateRequest(e){this.fileService.modifyFolderDetails({folderId:this.route.snapshot.params.folderId,folderName:e.folderName,folderDescription:e.description}).pipe(D(()=>{this.myFoldersDetailsStore.getFolderDetails({folderId:this.folderId}),this.dialogRef.close(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.saveSuccess"}))})).subscribe()}convertToTableRow(e,t){let n=()=>{this.router.navigate([e.id],{relativeTo:this.route,queryParams:I(F({},this.route.snapshot.queryParams),{documentName:e.documentationName})})},o={controllerName:"DocumentContainer",actionName:"GetShareableFolderDocumentDetails"};return{data:e,detailsCallback:n,selected:t,detailsPermission:o,actions:{details:{permission:o,text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n}}}}openUploadDialog(){this.dialogService.openDialog(ya,{folderId:this.folderId,callback:()=>{this.myFoldersDetailsStore.getFolderDetails({folderId:this.folderId}),this.store.dispatch(new A.ResetMyFoldersListState),this.myFoldersDetailsStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.myFoldersDetailsStore.defaultPagingNumber}))}})}static{this.\u0275fac=function(t){return new(t||i)(g(Nn),g(Ut),g(Oe),g(ue),g(Ao),g(ie),g(R),g(ce))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-my-folders-details"]],features:[le([Nn,Fe,Ut]),re],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],[1,"neptun-wrapper",3,"itemAction","itemSelected","tableAction","sortItems","getNextItems","data","columns","isListLoading","isSelectable","selectedCount","tableId","isNextVisible","orderByMenu","tableActions"],[1,"neptun-wrapper"],["test-id","error"],["test-id","loading"],[3,"title"],["test-id","details",1,"neptun-wrapper"],["neptunBasicLayoutLeftContent",""],["neptunBasicLayoutRightContent",""],[1,"action-container"],["neptun-button","","id","add-new-button",1,"action-container__add-button",3,"click","accent","permissionRequired"],[1,"folder-data__links"],[3,"link",4,"ngFor","ngForOf"],[3,"link"],[1,"folder-data__info","neptun-wrapper-padding"],["neptun-button","","id","modify-base-data-button",1,"responsive",3,"click","accent","permissionRequired"],[1,"detail"],["neptunDataViewItem",""],[3,"percentage","storageSize","freeStorage","label","reservedStorage"],[1,"action-container__actions"],[3,"actionsMenu","isListDataLoading","isOrderingSaving","orderItems","isAnyItemsSelected","orderBy","itemAction",4,"ngIf"],[3,"orderBy","itemAction","actionsMenu","isListDataLoading","isOrderingSaving","orderItems","isAnyItemsSelected"]],template:function(t,n){t&1&&u(0,kp,3,3,"ng-container",0)},dependencies:[K,Z,Re,it,xe,ft,bt,Qt,Ji,_t,_e,Me,nt,ot,vi,et,kt,X,di,ut,tt,Zt,ge,pe,he],styles:[".folder-data[_ngcontent-%COMP%]{display:flex}.folder-data__links[_ngcontent-%COMP%]{width:100%;margin-right:48px}.folder-data__links[_ngcontent-%COMP%] *[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-top:16px}.folder-data__info[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:24px}@media only screen and (max-width:767px){.folder-data[_ngcontent-%COMP%]{display:block}}@media screen and (min-width:768px){.action-container[_ngcontent-%COMP%]{align-items:center}}@media screen and (max-width:574px){neptun-data-view[_ngcontent-%COMP%]{padding:0}.action-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}}"],changeDetection:0})}}return i})();function Vp(i,a){if(i&1&&(d(0,"div")(1,"p"),C(2),m(),d(3,"div",2),C(4),m(),d(5,"p",3),C(6),m()()),i&2){let e=a.$implicit,t=r(2).ngIf;s(2),M(" ",e("documentLibrary.connectionTypesOfFolders"),""),s(2),M(" ",t.join(", ")," "),s(2),M(" ",e("exams.operationCanNotBeCanceled"),"")}}function Gp(i,a){i&1&&(d(0,"div"),u(1,Vp,7,3,"div",1),m())}function Up(i,a){if(i&1&&(y(0),u(1,Gp,2,0,"div",0),v()),i&2){let e=a.ngIf;s(),p("ngIf",e.length)}}var Da=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-folder-deletion-confirmation"]],inputs:{data:"data"},decls:2,vars:3,consts:[[4,"ngIf"],[4,"transloco"],[1,"connection-type-container"],[1,"not-be-cancelled"]],template:function(t,n){t&1&&(u(0,Up,2,1,"ng-container",0),l(1,"async")),t&2&&p("ngIf",c(1,1,n.data))},dependencies:[Z,K,X],styles:[".text-uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-lowercase[_ngcontent-%COMP%]{text-transform:lowercase}.break-text-with-hyphen[_ngcontent-%COMP%]{hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-webkit-hyphens:auto;word-break:break-word}@media only screen and (min-width:768px){.break-text-with-hyphen--mobile-view-only[_ngcontent-%COMP%]{hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;-webkit-hyphens:manual;word-break:normal}}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0}.line-clamp[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;-webkit-box-orient:vertical;word-break:break-word;white-space:break-spaces;line-height:1.375}.connection-type-container[_ngcontent-%COMP%]{padding:16px;border-radius:8px;background:#f2f3fb;margin-top:16px;margin-bottom:16px;font-size:13px;font-family:LatoWeb,sans-serif;font-weight:800}.not-be-cancelled[_ngcontent-%COMP%]{font-size:16px;font-family:LatoWeb,sans-serif;font-weight:900;color:#444}"],changeDetection:0})}}return i})();var An=(()=>{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,defaultOrderBy:{sortablePropertyName:"folderName",sort:"asc"},orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{interval:{intervalMin:"",intervalMax:""},folderName:"",description:""}},interfaceIdentity:Y.DocumentLibraryMyFolders,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"folderName"},{text:"global.size",key:"folderSize",disableSort:!0,type:"fileSize"},{text:"documentLibrary.lastModified",key:"lastModified",dateStyle:"long",timeStyle:"short",type:"date"},{text:"global.description",key:"description"}],columns:h,displayedColumns:h,containerStatus:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h}),this.endPoint="DocumentContainer/GetShareableFolders",this.defaultPagingNumber=10,this.store=k(R),this.fileUploadService=k(an),this.fileService=k(ke),this.myFoldersService=k(Pn),this.errorHandler=k(Fe),this.dialogService=k(Oe),this.containerStatus$=this.select(e=>e.containerStatus),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new A.SaveMyFoldersListState(t))}))),this.updateContainerStatus=this.updater((e,t)=>I(F({},e),{containerStatus:t})),this.getContainerStatus=this.effect(e=>e.pipe(D(()=>this.updateContainerStatus(Se)),W(()=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetContainerStatus",{}).pipe(wt(t=>{this.updateContainerStatus({data:t})},t=>(this.updateContainerStatus(ye),de(()=>t))))))),this.downloadFiles=this.effect(e=>e.pipe(oe(this.selectedEntities$),O(([,t])=>t.map(n=>n.id)),W(t=>this.fileUploadService.downloadDocumentsFromFolders(t).pipe(D({next:n=>{this.fileService.downloadFile(n),this.updateSelectedEntities([])},error:n=>{this.errorHandler.handleError(n)}}),ae(()=>qe))))),this.deleteFolders=this.effect(e=>e.pipe(oe(this.selectedEntities$),W(([,t])=>this.dialogService.openGeneralDialog(this.dialogData(t)).afterClosed().pipe(se(Boolean),W(()=>this.myFoldersService.deleteFolders(t.map(n=>n.id)).pipe(D(()=>{this.updateSelectedEntities([]),this.reloadItemsFromServer(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(n=>(this.store.dispatch(new be.AddErrorPushNotification({title:"notification.unsuccessfulAction"})),this.errorHandler.handleError(n),qe))))))))}dialogData(e){return{title:this.transloco.translate(e.length>pt.ONE?"documentLibrary.foldersDeleteQuestion":"documentLibrary.folderDeleteQuestion"),actions:[new Ye({text:this.transloco.translate("button.cancel"),returnValue:!1}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0})],componentData:this.evaluateConnectionTypes(),component:Da}}evaluateConnectionTypes(){return this.selectedEntities$.pipe(O(t=>({userConnection:t.some(n=>n.hasUserConnection),virtualSpaceConnection:t.some(n=>n.hasVirtualSpaceConnection),personGroupConnection:t.some(n=>n.hasPersonGroupConnection)})),O(t=>Object.keys(t).filter(n=>t[n])),O(t=>t.map(n=>this.transloco.translate(`documentLibrary.${n}`))))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var jp=()=>({fromMyFolders:!0}),qp=()=>["group-related-upload"],kn=()=>[];function Wp(i,a){if(i&1&&(y(0),L(1,"neptun-storage-statistics",7),l(2,"lowercase"),v()),i&2){let e=r().ngIf,t=r().$implicit;s(),p("percentage",e.data.collabSpacePercentage)("storageSize",e.data.collabSpace)("freeStorage",e.data.collabFreeSpace)("label",c(2,5,t("documentLibrary.storageOccupancy")))("reservedStorage",e.data.collabUserSpace)}}function Hp(i,a){if(i&1&&(y(0),u(1,Wp,3,7,"ng-container",3),l(2,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,1,e))}}function Qp(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",9),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"isResultRequest"),l(7,"async"),w("orderBy",function(n){_(e);
1let o=r(3);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(3);return f(o.itemAction(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("toggleFilter",function(){_(e);let n=r(3);return f(n.toggleFilter())}),m()}if(i&2){let e=a.ngIf,t=r().ngIf,n=r(2);p("filterCount",c(1,9,n.filterCount$))("actionsMenu",c(2,11,n.moreActionsMenuItems$))("isFilterOpen",c(3,13,n.isFilterOpen$))("hasFilter",!0)("isListDataLoading",c(4,15,n.isListDataLoading$)===!0)("actionsMenu",c(5,17,n.moreActionsMenuItems$))("orderItems",c(6,19,t)?t.data:j(23,kn))("isOrderingSaving",c(7,21,n.isOrderBySaving$)===!0)("isAnyItemsSelected",e.length>0)}}function zp(i,a){if(i&1&&(y(0),u(1,Qp,8,24,"neptun-table-header-actions",8),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.selectedEntities$))}}function Kp(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",12),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),w("keepOpenChanged",function(){_(e);let n=r(3);return f(n.setKeepOpenChanged())})("filterClick",function(n){_(e);let o=r(3);return f(o.filterItems(n))})("latestFilterLoad",function(n){_(e);let o=r(3);return f(o.loadLatestFilter(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("closed",function(){_(e);let n=r(3);return f(n.toggleFilter())}),L(5,"neptun-form-input",13)(6,"neptun-form-date-range-picker",14)(7,"neptun-form-input",15),m()}if(i&2){let e,t=r().ngIf,n=r().$implicit,o=r();p("keepOpen",c(1,11,o.keepFilterOpen$)===!0)("previousFilter",c(2,13,o.previousFilters$))("isLoading",c(3,15,o.isFiltering$)===!0)("canFilter",!((e=c(4,17,o.selectedEntities$))!=null&&e.length)),s(5),p("label",n("global.name"))("ngModel",t.folderName),s(),p("id","interval")("label",n("global.interval"))("ngModel",t.interval),s(),p("label",n("global.description"))("ngModel",t.description)}}function Yp(i,a){if(i&1&&(y(0,10),u(1,Kp,8,19,"neptun-filter-v2",11),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function Zp(i,a){i&1&&(y(0),d(1,"div",16),L(2,"neptun-data-table-placeholder",17),m(),v()),i&2&&(s(2),p("loading",!0))}function Jp(i,a){i&1&&(y(0),d(1,"div",2),L(2,"neptun-request-error-indicator",19),m(),v())}function Xp(i,a){if(i&1){let e=E();d(0,"neptun-data-table",20),l(1,"async"),l(2,"isResultRequest"),l(3,"async"),l(4,"async"),l(5,"isResultRequest"),l(6,"isResultRequest"),l(7,"async"),l(8,"async"),l(9,"async"),w("sortEmitter",function(n){_(e);let o=r(5);return f(o.sortItems(n))})("selected",function(n){_(e);let o=r(5);return f(o.setSelectedItems(n))})("getNext",function(n){_(e);let o=r(5);return f(o.getNextItems(n))})("actionClick",function(n){_(e);let o=r(5);return f(o.callActionCallback(n))}),m()}if(i&2){let e,t,n=r().ngIf,o=r().ngIf,x=r().ngIf,b=r(2);p("tableId","my-folders")("loadingPlaceholder",c(1,11,b.isListLoading$)===!0)("dataSource",c(2,13,n)?n.data:j(29,kn))("filterCount",c(3,15,b.filterCount$))("isFilterOpen",c(4,17,b.isFilterOpen$))("columns",c(5,19,x)?x.data:null)("orderItems",c(6,21,o)?o.data:j(30,kn))("isNextVisible",c(7,23,b.isNextVisible$))("selectable",!0)("selectedCount",(e=(e=c(8,25,b.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("actions",(t=c(9,27,b.tableActions$))!==null&&t!==void 0?t:j(31,kn))}}function em(i,a){if(i&1&&(y(0),u(1,Jp,3,0,"ng-container",3),l(2,"hasError"),d(3,"div",2),u(4,Xp,10,32,"neptun-data-table",18),l(5,"isLoadingRequest"),l(6,"isResultRequest"),l(7,"isResultRequest"),l(8,"isResultRequest"),m(),v()),i&2){let e=a.ngIf,t=r().ngIf,n=r().ngIf;s(),p("ngIf",c(2,2,e)),s(3),p("ngIf",c(5,4,e)||c(6,6,e)&&c(7,8,t)&&c(8,10,n))}}function tm(i,a){if(i&1&&(y(0),u(1,Zp,3,1,"ng-container",3),l(2,"isLoadingRequest"),l(3,"isLoadingRequest"),u(4,em,9,12,"ng-container",3),l(5,"async"),v()),i&2){let e=a.ngIf,t=r().ngIf,n=r(2);s(),p("ngIf",c(2,2,t)||c(3,4,e)),s(3),p("ngIf",c(5,6,n.dataSource$))}}function im(i,a){if(i&1&&(y(0),u(1,tm,6,8,"ng-container",3),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.orderByMenu$))}}function nm(i,a){if(i&1&&(y(0),L(1,"neptun-primary-title",1),d(2,"div",2),u(3,Hp,3,3,"ng-container",3),l(4,"async"),d(5,"div",4)(6,"button",5),C(7),m(),u(8,zp,3,3,"ng-container",3),l(9,"async"),m()(),u(10,Yp,3,3,"ng-container",6),l(11,"async"),u(12,im,3,3,"ng-container",3),l(13,"async"),v()),i&2){let e=a.$implicit,t=r();s(),p("title",e("menu.documentLibrary.myFoldersToShare")),s(2),p("ngIf",c(4,10,t.containerStatus$)),s(3),p("accent","flat")("permissionRequired",t.saveFilesToContainerPermission)("queryParams",j(18,jp))("routerLink",j(19,qp)),s(),M(" ",e("button.addNew")," "),s(),p("ngIf",c(9,12,t.orderByMenu$)),s(2),p("ngIf",c(11,14,t.f
1ilterModel$)),s(2),p("ngIf",c(13,16,t.displayedColumns$))}}var Fa=(()=>{class i extends Ae{constructor(e,t,n,o,x){super(e),this.myFoldersStore=e,this.transloco=t,this.router=n,this.route=o,this.store=x,this.exportTitle="menu.documentLibrary.myFoldersToShare",this.containerStatus$=this.myFoldersStore.containerStatus$,this.isOrderBySaving$=this.myFoldersStore.isOrderBySaving$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([b,z])=>ee(b)?fe(b.data.map($=>this.convertToTableRow($,z.some(Q=>Q.id===$.id)),b.isPagingLoading??!1)):b)),this.saveFilesToContainerPermission={controllerName:"DocumentContainer",actionName:"SaveFilesToContainer"}}initialize(){ee(this.listState.entities)?this.myFoldersStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.myFoldersStore.getColumns(),this.myFoldersStore.loadOrderBy(),this.myFoldersStore.getPreviousFilters(),this.myFoldersStore.getContainerStatus(),this.myFoldersStore.updateFilterModel(F({},this.listState.contracts.filterModel)),this.myFoldersStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.myFoldersStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.myFoldersStore.defaultPagingNumber})))).subscribe()),this.myFoldersStore.updateTableActions([this.cancelAction,this.downloadAction,this.deleteAction])}loadModuleState(){return this.store.selectSnapshot(te.myFoldersList)}resetModuleState(){this.store.dispatch(new A.ResetMyFoldersListState)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.myFoldersStore.updateSelectedEntities([])}}get downloadAction(){return{text:this.transloco.translate("button.download"),icon:H.Download,type:me.Download,callback:()=>this.myFoldersStore.downloadFiles()}}get deleteAction(){return{text:this.transloco.translate("button.delete"),icon:H.Trash,type:me.Delete,callback:()=>this.myFoldersStore.deleteFolders()}}convertToTableRow(e,t){let n=()=>{this.myFoldersStore.saveListState(),this.router.navigate([e.id],{relativeTo:this.route,queryParams:I(F({},this.route.snapshot.queryParams),{folderName:e.folderName})})},o={controllerName:"DocumentContainer",actionName:"GetShareableFolderDetails"};return{data:e,detailsCallback:n,selected:t,detailsPermission:o,actions:{details:{text:"button.details",permission:o,hasArrow:!0,color:Ie.Primary,callback:n}}}}static{this.\u0275fac=function(t){return new(t||i)(g(An),g(ce),g(ue),g(ie),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-my-folders"]],features:[le([An,st,Fe]),re],decls:1,vars:0,consts:[[4,"transloco"],[3,"title"],[1,"neptun-wrapper"],[4,"ngIf"],[1,"action-container"],["neptun-button","","id","add-new-button",3,"accent","permissionRequired","queryParams","routerLink"],["filters","",4,"ngIf"],[3,"percentage","storageSize","freeStorage","label","reservedStorage"],["class","action-container__actions",3,"filterCount","actionsMenu","isFilterOpen","hasFilter","isListDataLoading","orderItems","isOrderingSaving","isAnyItemsSelected","orderBy","itemAction","resetFilter","toggleFilter",4,"ngIf"],[1,"action-container__actions",3,"orderBy","itemAction","resetFilter","toggleFilter","filterCount","actionsMenu","isFilterOpen","hasFilter","isListDataLoading","orderItems","isOrderingSaving","isAnyItemsSelected"],["filters",""],["class","neptun-wrapper-padding",3,"keepOpen","previousFilter","isLoading","canFilter","keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed",4,"ngIf"],[1,"neptun-wrapper-padding",3,"keepOpenChanged","filterClick","latestFilterLoad","resetFilter","closed","keepOpen","previousFilter","isLoading","canFilter"],["id","folderName","name","folderName",1,"filter-element",3,"label","ngModel"],["name","interval","fromDateKey","start","toDateKey","end",1,"filter-element",3,"id","label","ngModel"],["id","description","name","description",1,"filter-element",3,"label","ngModel"],[1,"neptun-wrapper-padding"],["test-id","loading",1,"neptun-wrapper",3,"loading"],[3,"tableId","loadingPlaceholder","dataSource","filterCount","isFilterOpen","columns","orderItems","isNextVisible","selectable","selectedCount","actions","sortEmitter","selected","getNext","actionClick",4,"ngIf"],["test-id","error"],[3,"sortEmitter","selected","getNext","actionClick","tableId","loadingPlaceholder","dataSource","filterCount","isFilterOpen","columns","orderItems","isNextVisible","selectable","selectedCount","actions"]],template:function(t,n){t&1&&u(0,nm,14,20,"ng-container",0)},dependencies:[K,xe,Z,vi,_e,Me,ko,et,rt,Qe,Ne,Pe,Ue,rn,ii,Re,xt,X,di,ge,pe,he],styles:[".neptun-wrapper[_ngcontent-%COMP%]{margin-bottom:16px}@media only screen and (max-width:574px){.action-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.action-container__actions[_ngcontent-%COMP%]{align-self:flex-end}}"],changeDetection:0})}}return i})();var ai=(()=>{class i{constructor(e){this.http=e}deleteOwnGroupConnections(e,t){return this.http.post(`${De.settings.apiServer.url}DocumentContainer/RemoveVirtualSpaceFromFolder`,{folderId:t,connectionIds:e})}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();
1var Pi="[OwnGroupConnectionDetails]",ho={SetOwnGroupConnectionDetailsFilterModel:`${Pi} Set OwnGroupConnectionDetails details Filter Model`,FetchOwnGroupConnectionDetails:`${Pi} Set Fetch OwnGroupConnectionDetails details`,SetOwnGroupConnectionDetailsListState:`${Pi} Set OwnGroupConnectionDetails details table state`,ResetOwnGroupConnectionDetailsListState:`${Pi} Reset OwnGroupConnectionDetails details table state`,ResetEntities:`${Pi} Reset ResetEntities`},Mt;(function(i){class a{static{this.type=ho.SetOwnGroupConnectionDetailsListState}constructor(o){this.ownGroupConnectionDetailsListState=o}}i.SetOwnGroupConnectionDetailsListState=a;class e{static{this.type=ho.ResetOwnGroupConnectionDetailsListState}}i.ResetOwnGroupConnectionDetailsListState=e;class t{static{this.type=ho.ResetEntities}}i.ResetEntities=t})(Mt||(Mt={}));var Ni={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{virtualSpaceId:""}},keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,defaultOrderBy:{sortablePropertyName:"printName",sort:"asc"},interfaceIdentity:Y.DocumentOwnGroupConnectionDetails,defaultColumns:[{text:"global.name",key:"printName"},{text:"documentLibrary.typeOfMembership",key:"memberType"}],columns:h,displayedColumns:h,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableActions:[],tableFunctionTypes:[G.EditColumns,G.Export],previousFilters:h,ownGroupConnectionDetails:h};var jt=class Vn{static getOwnGroupConnectionDetailsListState(a){return a.ownGroupConnectionDetailsList}setOwnGroupConnectionDetailsListState(a,e){a.patchState({ownGroupConnectionDetailsList:e.ownGroupConnectionDetailsListState})}resetOwnGroupConnectionDetailsListState(a){a.patchState({ownGroupConnectionDetailsList:Ni})}resetEntities(a){a.patchState({ownGroupConnectionDetailsList:I(F({},a.getState().ownGroupConnectionDetailsList),{entities:h})})}static{this.\u0275fac=function(e){return new(e||Vn)}}static{this.\u0275prov=B({token:Vn,factory:Vn.\u0275fac})}};U([ne(Mt.SetOwnGroupConnectionDetailsListState),S("design:type",Function),S("design:paramtypes",[Object,Mt.SetOwnGroupConnectionDetailsListState]),S("design:returntype",void 0)],jt.prototype,"setOwnGroupConnectionDetailsListState",null);U([ne(Mt.ResetOwnGroupConnectionDetailsListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],jt.prototype,"resetOwnGroupConnectionDetailsListState",null);U([ne(Mt.ResetEntities),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],jt.prototype,"resetEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],jt,"getOwnGroupConnectionDetailsListState",null);jt=U([dt({name:"owngroupconnectiondetails",defaults:{ownGroupConnectionDetailsList:Ni}})],jt);var Ai="[OwnGroupConnections]",Co={SetOwnGroupConnectionsFilterModel:`${Ai} Set OwnGroupConnections Filter Model`,FetchOwnGroupConnections:`${Ai} Set Fetch OwnGroupConnections`,SetOwnGroupConnectionsListState:`${Ai} Set OwnGroupConnections table state`,ResetOwnGroupConnectionsListState:`${Ai} Reset OwnGroupConnections table state`,ResetEntites:`${Ai} Reset Entites`},St;(function(i){class a{static{this.type=Co.SetOwnGroupConnectionsListState}constructor(o){this.ownGroupConnectionsListState=o}}i.SetOwnGroupConnectionsListState=a;class e{static{this.type=Co.ResetOwnGroupConnectionsListState}}i.ResetOwnGroupConnectionsState=e;class t{static{this.type=Co.ResetEntites}}i.ResetEntities=t})(St||(St={}));var Gn=(()=>{class i extends Ee{constructor(e,t,n){super(Ni),this.store=e,this.router=t,this.activatedRoute=n,this.endPoint="DocumentContainer/GetVirtualSpaceMembers",this.defaultPagingNumber=10,this.ownGroupConnectionDetails$=this.select(o=>o.ownGroupConnectionDetails),this.ownGroupConnectionsService=k(ai),this.errorHandler=k(Fe),this.saveListState=this.effect(o=>o.pipe(oe(this.state$),D(([,x])=>{this.store.dispatch(new Mt.SetOwnGroupConnectionDetailsListState(x))}))),this.getGroupConnectionDetails=this.effect(o=>o.pipe(D(()=>
1{this.patchState({ownGroupConnectionDetails:Se})}),W(x=>this.dataFetcherService.fetchItemFromServer("DocumentContainer/GetVirtualSpaceDetails",x).pipe(D(b=>this.patchState({ownGroupConnectionDetails:{data:b}})),ae(b=>(this.patchState({ownGroupConnectionDetails:ye}),de(()=>b))))))),this.removeVirtualSpace=this.effect(o=>o.pipe(W(x=>this.ownGroupConnectionsService.deleteOwnGroupConnections([x.connectionId],x.folderId).pipe(D(()=>{this.store.dispatch(new St.ResetEntities),this.router.navigate([".."],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"}),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(b=>(this.errorHandler.handleError(b),qe))))))}static{this.\u0275fac=function(t){return new(t||i)(V(R),V(ue),V(ie))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var rm=()=>[];function am(i,a){i&1&&(d(0,"div",3),L(1,"neptun-request-error-indicator",4),m())}function sm(i,a){i&1&&(d(0,"div",3),L(1,"neptun-details-loading-placeholder",5),m())}function lm(i,a){if(i&1&&(d(0,"div")(1,"neptun-card")(2,"div",11)(3,"p"),C(4),m(),d(5,"h4"),C(6),m()()()()),i&2){let e=r(4).$implicit;s(4),M("",e("global.status"),":"),s(2),T(e("documentLibrary.favourite"))}}function cm(i,a){if(i&1&&u(0,lm,7,2,"div",1),i&2){let e=r(2).ngIf;p("ngIf",e.data.isFavourite)}}function pm(i,a){if(i&1){let e=E();d(0,"div",12)(1,"button",13),w("click",function(){_(e);let n=r(4);return f(n.openRemoveDialog())}),C(2),m(),d(3,"neptun-data-view")(4,"dl")(5,"div",14)(6,"dt"),C(7),m(),d(8,"dd"),C(9),l(10,"hyphen"),m()(),d(11,"div",14)(12,"dt"),C(13),m(),d(14,"dd"),C(15),l(16,"hyphen"),m()(),d(17,"div",14)(18,"dt"),C(19),m(),d(20,"dd"),C(21),l(22,"hyphen"),m()()()()()}if(i&2){let e=r(2).ngIf,t=r().$implicit,n=r();s(),p("accent","stroked")("color","error")("permissionRequired",n.removeVirtualSpacePermission),s(),M(" ",t("documentLibrary.remove")," "),s(5),T(t("global.type")),s(2),M(" ",c(10,10,e.data.spaceType)," "),s(4),T(t("global.semester")),s(2),M(" ",c(16,12,e.data.term)," "),s(4),T(t("global.description")),s(2),M(" ",c(22,14,e.data.description)," ")}}function mm(i,a){if(i&1){let e=E();y(0),d(1,"neptun-secondary-title",6)(2,"neptun-table-header-actions",15),l(3,"async"),l(4,"isResultRequest"),l(5,"async"),l(6,"async"),w("orderBy",function(n){_(e);let o=r(4);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(4);return f(o.itemAction(n))}),m()(),v()}if(i&2){let e=a.ngIf,t=r(3).$implicit,n=r();s(),p("title",t("documentLibrary.members")),s(),p("actionsMenu",c(3,5,n.moreActionsMenuItems$))("orderItems",c(4,7,e)?e.data:j(13,rm))("isListDataLoading",c(5,9,n.isListLoading$)===!0)("isOrderingSaving",c(6,11,n.isOrderBySaving$)===!0)}}function dm(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",6),d(2,"div",3)(3,"neptun-basic-layout",7),u(4,cm,1,1,"ng-template",8)(5,pm,23,16,"ng-template",9),m()(),u(6,mm,7,14,"ng-container",1),l(7,"async"),d(8,"neptun-sortable-table-with-custom-header",10),l(9,"async"),l(10,"async"),l(11,"async"),l(12,"async"),l(13,"async"),w("sortItems",function(n){_(e);let o=r(3);return f(o.sortItems(n))})("getNextItems",function(n){_(e);let o=r(3);return f(o.getNextItems(n))}),m(),v()}if(i&2){let e=r().ngIf,t=r(2);s(),p("title",e.data.name),s(2),p("reverse",!0),s(3),p("ngIf",c(7,10,t.orderByMenu$)),s(2),p("data",c(9,12,t.dataSource$))("columns",c(10,14,t.displayedColumns$))("isListLoading",c(11,16,t.isListLoading$)===!0)("isSelectable",!1)("tableId","own-group-connection-details")("isNextVisible",c(12,18,t.isNextVisible$)===!0)("orderByMenu",c(13,20,t.orderByMenu$))}}function um(i,a){if(i&1&&(y(0),u(1,am,2,0,"div",2),l(2,"hasError"),u(3,sm,2,0,"div",2),l(4,"isLoadingRequest"),u(5,dm,14,22,"ng-container",1),l(6,"isResultRequest"),v()),i&2){let e=a.ngIf;s(),p("ngIf",c(2,3,e)),s(2),p("ngIf",c(4,5,e)),s(2),p("ngIf",c(6,7,e))}}function _m(i,a){if(i&1&&(y(0),u(1,um,7,9,"ng-container",1),l(2,"async"),v()),i&2){let e=r();s(),p("ngIf",c(2,1,e.ownGroupConnectionDetails$))}}var Ia=(()=>{class i extends Ae{constructor(e,t,n,o,x,b,z){super(e),this.ownGroupConnectionDetailsStore=e,this.virtualGroupDetail
1s=t,this.transloco=n,this.store=o,this.route=x,this.dialogService=b,this.activatedRoute=z,this.virtualSpaceId=this.route.snapshot.params.groupConnectionId,this.ownGroupConnectionDetails$=this.ownGroupConnectionDetailsStore.ownGroupConnectionDetails$,this.removeVirtualSpacePermission={controllerName:"DocumentContainer",actionName:"RemoveVirtualSpaceFromFolder"},this.isOrderBySaving$=this.ownGroupConnectionDetailsStore.isOrderBySaving$,this.dataSource$=this.entities$.pipe(O($=>ee($)?fe($.data.map(Q=>this.convertToTableRow(Q)),$.isPagingLoading??!1):$))}initialize(){ee(this.listState.entities)?this.ownGroupConnectionDetailsStore.updateState(I(F({},this.listState),{contracts:I(F({},this.listState.contracts),{filterModel:{virtualSpaceId:this.virtualSpaceId}})})):(this.ownGroupConnectionDetailsStore.getColumns(),this.ownGroupConnectionDetailsStore.loadOrderBy(),this.ownGroupConnectionDetailsStore.getPreviousFilters(),this.listStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{virtualSpaceId:this.virtualSpaceId})),this.ownGroupConnectionDetailsStore.getGroupConnectionDetails({virtualSpaceId:this.virtualSpaceId}),this.ownGroupConnectionDetailsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.ownGroupConnectionDetailsStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.ownGroupConnectionDetailsStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot(jt.getOwnGroupConnectionDetailsListState)}resetModuleState(){this.store.dispatch(new Mt.ResetOwnGroupConnectionDetailsListState)}openRemoveDialog(){this.dialogService.openConfirmActionDialog(this.removeDialogDatas)}get removeDialogDatas(){let e=this.activatedRoute.snapshot.queryParams.connectionId,t=this.activatedRoute.snapshot.params.folderId;return{title:this.transloco.translate("documentLibrary.virtualSpaceDeleteQuestion"),body:[this.transloco.translate("communalSpace.sureAboutDeletingForumsDescription")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>this.ownGroupConnectionDetailsStore.removeVirtualSpace({connectionId:e,folderId:t})})]}}convertToTableRow(e){return{data:F({},e),imageData:{printName:e.avatar.printName,fallbackColorCodeInHexa:e.avatar.fallbackColorCodeInHexa,image:e.avatar.image,avatarType:null},actions:{}}}static{this.\u0275fac=function(t){return new(t||i)(g(Gn),g(bn),g(ce),g(R),g(ie),g(Oe),g(ie))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-own-group-connection-details"]],features:[le([ai,Gn,Fe]),re],decls:1,vars:0,consts:[[4,"transloco"],[4,"ngIf"],["class","neptun-wrapper",4,"ngIf"],[1,"neptun-wrapper"],["test-id","error"],["test-id","loading"],[3,"title"],[3,"reverse"],["neptunBasicLayoutLeftContent",""],["neptunBasicLayoutRightContent",""],[1,"neptun-wrapper",3,"sortItems","getNextItems","data","columns","isListLoading","isSelectable","tableId","isNextVisible","orderByMenu"],[1,"status-wrapper"],[1,"detail-container"],["neptun-button","","id","remove-button",1,"detail-remove-button",3,"click","accent","color","permissionRequired"],["neptunDataViewItem",""],[3,"orderBy","itemAction","actionsMenu","orderItems","isListDataLoading","isOrderingSaving"]],template:function(t,n){t&1&&u(0,_m,3,3,"ng-container",0)},dependencies:[K,Z,Re,it,xe,ft,bt,At,_t,_e,Me,nt,ot,cn,et,kt,X,tt,ge,pe,he],styles:[".detail-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;flex-direction:column;font-size:16px}.detail-remove-button[_ngcontent-%COMP%]{margin-bottom:24px}@media only screen and (max-width:767px){.detail-container[_ngcontent-%COMP%]{padding:0 20px}}"],changeDetection:0})}}return i})();var La=(()=>{class i{constructor(e){this.http=e}linkVirtualSpacesToFolder(e,t){let n={folderId:e,linkableIds:t};return this.http.post(`${De.settings.apiServer.url}DocumentContainer/LinkVirtualSpace`,n).pipe(O(o=>o.data))}static{this.\u0275fac=function(t){return new(t||i)(V(Te))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var So={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{folderId:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryOwnGroupConnections,defaultColumns:[],columns:h,displayedColumns:h,isMoreFilterOpen:!1,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],tableActions:[],previousFilters:h};var qt=class Un{constructor(){}static getOwnGroupConnectionsListState(a){return a.ownGroupConnectionsList}setOwnGroupConnectionsListState(a,e){a.patchState({ownGroupConnectionsList:e.ownGroupConnectionsListState})}resetOwnGroupConnectionsState(a){a.patchState({ownGroupConnectionsList:So})}resetEntities(a){a.patchState({ownGroupConnectionsList:I(F({},a.getState().ownGroupConnectionsList),{entities:h})})}static{this.\u0275fac=function(e){return new(e||Un)}}static{this.\u0275prov=B({token:Un,factory:Un.\u0275fac})}};U([ne(St.SetOwnGroupConnectionsListState),S("design:type",Function),S("design:paramtypes",[Object,St.SetOwnGroupConnectionsListState]),S("design:returntype",void 0)],qt.prototype,"setOwnGroupConnectionsListState",null);U([ne(St.ResetOwnGroupConnectionsState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],qt.prototype,"resetOwnGroupConnectionsState",null);U([ne(St.ResetEntities),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],qt.prototype,"resetEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],qt,"getOwnGroupConnectionsListState",null);qt=U([dt({name:"owngroupconnections",defaults:{ownGroupConnectionsList:So}}),S("design:paramtypes",[])],qt);var $n=(()=>
1{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{folderId:""}},interfaceIdentity:Y.DocumentLibraryOwnGroupConnections,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"global.name",key:"name"},{text:"global.semester",key:"term"},{text:"documentLibrary.members",key:"userCount"},{text:"global.type",key:"type"}],columns:h,displayedColumns:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h}),this.endPoint="DocumentContainer/GetFolderVirtualSpaceConnections",this.defaultPagingNumber=10,this.store=k(R),this.errorHandler=k(mi),this.ownGroupConnectionsService=k(ai),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new St.SetOwnGroupConnectionsListState(t))}))),this.deleteGroupConnections=this.effect(e=>e.pipe(oe(this.selectedEntities$),W(([t,n])=>this.ownGroupConnectionsService.deleteOwnGroupConnections(n.map(o=>o.connectionId),t).pipe(D(()=>{this.updateSelectedEntities([]),this.reloadItemsFromServer(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(o=>(this.errorHandler.handleError(o),qe))))))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var wa=()=>[];function hm(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",8),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"isResultRequest"),l(5,"async"),w("orderBy",function(n){_(e);let o=r(3);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(3);return f(o.itemAction(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("toggleFilter",function(){_(e);let n=r(3);return f(n.toggleFilter())}),m()}if(i&2){let e=a.ngIf,t=r().ngIf,n=r(2);p("actionsMenu",c(1,6,n.moreActionsMenuItems$))("isListDataLoading",c(2,8,n.isListDataLoading$)===!0)("actionsMenu",c(3,10,n.moreActionsMenuItems$))("orderItems",c(4,12,t)?t.data:j(16,wa))("isOrderingSaving",c(5,14,n.isOrderBySaving$)===!0)("isAnyItemsSelected",e.length>0)}}function Cm(i,a){if(i&1&&(y(0),u(1,hm,6,17,"neptun-table-header-actions",7),l(2,"async"),v()),i&2){let e=r(2);s(),p("ngIf",c(2,1,e.selectedEntities$))}}function Sm(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",1),d(2,"div",2)(3,"button",3),w("click",function(){_(e);let n=r();return f(n.addNew())}),C(4),m(),u(5,Cm,3,3,"ng-container",4),l(6,"async"),m(),d(7,"div",5)(8,"neptun-sortable-table-with-custom-header",6),l(9,"async"),l(10,"async"),l(11,"async"),l(12,"async"),l(13,"async"),l(14,"async"),l(15,"async"),w("tableAction",function(n){_(e);let o=r();return f(o.callActionCallback(n))})("itemSelected",function(n){_(e);let o=r();return f(o.setSelectedItems(n))})("sortItems",function(n){_(e);let o=r();return f(o.sortItems(n))})("getNextItems",function(n){_(e);let o=r();return f(o.getNextItems(n))}),m()(),v()}if(i&2){let e,t,n=a.$implicit,o=r();s(),p("title",n("menu.documentLibrary.connectedSocialGroups")),s(2),p("accent","flat")("permissionRequired",o.linkVirtualSpacePermission),s(),M(" ",n("button.add")," "),s(),p("ngIf",c(6,14,o.orderByMenu$)),s(3),p("data",c(9,16,o.dataSource$))("columns",c(10,18,o.displayedColumns$))("isSelectable",!0)("tableActions",(e=c(11,20,o.tableActions$))!==null&&e!==void 0?e:j(30,wa))("selectedCount",(t=(t=c(12,22,o.selectedEntities$))==null?null:t.length)!==null&&t!==void 0?t:0)("tableId","attachments")("isNextVisible",c(13,24,o.isNextVisible$)===!0)("orderByMenu",c(14,26,o.orderByMenu$))("isListLoading",c(15,28,o.isListLoading$)===!0)}}var Ta=(()=>{class i extends Ae{constructor(e,t,n,o,x,b,z,$){super(e),this.ownGroupConnectionsStore=e,this.linkVirtualSpacesService=t,this.transloco=n,this.dialogService=o,this.router=x,this.store=b,this.route=z,this.multiStepDialogService=$,this.exportTitle="menu.documentLibrary.connectedSocialGroups",this.folderId=this.route.snapshot.params.folderId,this.linkVirtualSpacePermission={controllerName:"DocumentContainer",actionName:"LinkVirtualSpace"},this.removeVirtualSpacePermission={controllerName:"DocumentContainer",actionName:"RemoveVirtualSpaceFromFolder"},this.isOrderBySaving$=this.ownGroupConnectionsStore.isOrderBySaving$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([Q,Ce])=>ee(Q)?fe(Q.data.map(Je=>this.convertToTableRow(Je,Ce.some(lt=>lt.id===Je.id))),Q.isPagingLoading??!1):Q))}initialize(){ee(this.listState.entities)?this.ownGroupConnectionsStore.updateState(I(F({},this.listState),{contracts:I(F({},this.listState.contracts),{filterModel:{folderId:this.folderId}})})):(this.ownGroupConnectionsStore.getColumns(),this.ownGroupConnectionsStore.loadOrderBy(),this.ownGroupConnectionsStore.getPreviousFilters(),this.listStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),this.ownGroupConnectionsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.ownGroupConnectionsStore.fetchItemsFromServer(I(F({},I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.ownGroupConnectionsStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot(qt.getOwnGroupConnectionsListState)}resetModuleState(){this.store.dispatch(new St.ResetOwnGroupConnectionsState)}setSelectedItems(e){let t=[this.cancelAction,this.deleteAction];this.ownGroupConnectionsStore.updateTableActions(t),super.setSelectedItems(e)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.ownGroupConnectionsStore.updateSelectedEntities([])}}get deleteAction(){return{text:this.transloco.translate("documentLibrary.remove"),icon:H.Trash,type:me.Delete,callback:e=>this.openDeleteDialog(e),permission:this.removeVirtualSpacePermission}}addNew(){let e={data:this.getVirtualSpacesDialogData(this.route.
1snapshot.params.folderId),disableClose:!1,width:"820px"};this.multiStepDialogService.openDialog(Dn,e).pipe(D(()=>this.store.dispatch(new A.ResetMyShareableFoldersVirtualSpacesList)),se(t=>!!t&&t.virtualSpaces.length>0),Ot(this.destroy$),W(t=>{let n=t.virtualSpaces.map(o=>o.id);return this.linkVirtualSpacesService.linkVirtualSpacesToFolder(this.folderId,n)})).subscribe(()=>{this.ownGroupConnectionsStore.reloadItemsFromServer(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.saveSuccess"}))})}getVirtualSpacesDialogData(e){return{dialogSteps:[{componentType:In,data:{componentData:{documentId:e}}},{componentType:xn,data:{}}],stepCounterText:"",result:{virtualSpaceId:"",virtualSpaces:[]}}}openDeleteDialog(e){let t={title:this.transloco.translate(e.length>pt.ONE?"documentLibrary.virtualSpacesDeleteQuestion":"documentLibrary.virtualSpaceDeleteQuestion"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>this.ownGroupConnectionsStore.deleteGroupConnections(this.folderId)})]};this.dialogService.openConfirmActionDialog(t)}convertToTableRow(e,t){let n=()=>{this.router.navigate([e.id],{relativeTo:this.route,queryParamsHandling:"merge",queryParams:{virtualSpaceId:e.id,virtualSpaceName:e.name,connectionId:e.connectionId}})};return{data:e,detailsCallback:n,selected:t,actions:{details:{text:"button.details",hasArrow:!0,color:Ie.Primary,callback:n}}}}static{this.\u0275fac=function(t){return new(t||i)(g($n),g(La),g(ce),g(Oe),g(ue),g(R),g(ie),g(ti))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-own-group-connections"]],features:[le([$n,ai]),re],decls:1,vars:0,consts:[[4,"transloco"],[3,"title"],[1,"neptun-wrapper-padding"],["neptun-button","","id","add-new-button",1,"action-container__add-button",3,"click","accent","permissionRequired"],[4,"ngIf"],[1,"neptun-wrapper"],[1,"neptun-wrapper",3,"tableAction","itemSelected","sortItems","getNextItems","data","columns","isSelectable","tableActions","selectedCount","tableId","isNextVisible","orderByMenu","isListLoading"],["class","action-container__actions",3,"actionsMenu","isListDataLoading","orderItems","isOrderingSaving","isAnyItemsSelected","orderBy","itemAction","resetFilter","toggleFilter",4,"ngIf"],[1,"action-container__actions",3,"orderBy","itemAction","resetFilter","toggleFilter","actionsMenu","isListDataLoading","orderItems","isOrderingSaving","isAnyItemsSelected"]],template:function(t,n){t&1&&u(0,Sm,16,31,"ng-container",0)},dependencies:[K,xe,_e,Me,Z,et,kt,X,pe],styles:[".neptun-wrapper-padding[_ngcontent-%COMP%]{display:flex;justify-content:space-between}[_nghost-%COMP%] .connections-table .mat-mdc-table .main-header-cell{min-width:270px!important}@media only screen and (max-width:767px){.neptun-wrapper-padding[_ngcontent-%COMP%]{flex-direction:column;gap:16px}}"],changeDetection:0})}}return i})();var yo={entities:h,selectedEntities:[],orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{printName:"",nickName:"",isStudent:"",folderId:""}},keepFilterOpen:!1,isFilterOpen:!1,interfaceIdentity:Y.DocumentLibraryUserConnections,defaultColumns:[],columns:h,displayedColumns:h,isMoreFilterOpen:!1,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,isNextVisible:!1,tableFunctionTypes:[G.Export,G.EditColumns],tableActions:[],previousFilters:h,hiddenFilters:{folderId:""}};var ki="[UserConnections]",vo={SetUserConnectionsFilterModel:`${ki} Set user connections Filter Model`,FetchUserConnections:`${ki} Set Fetch user connections`,SetUserConnectionsListState:`${ki} Set user connections table state`,ResetUserConnectionsListState:`${ki} Reset user connections table state`,ResetEntites:`${ki} Reset Entites`},Et;(function(i){class a{static{this.type=vo.SetUserConnectionsListState}constructor(o){this.userConnectionsList=o}}i.SetUserConnectionsListState=a;class e{static{this.type=vo.ResetUserConnectionsListState}}i.ResetUserConnectionssListState=e;class t{static{this.type=vo.ResetEntites}}i.ResetEntites=t})(Et||(Et={}));var Wt=class jn{static getUserConnectionsListState(a){return a.userConnectionsList}setUserConnectionsListState(a,e){a.patchState({userConnectionsList:e.userConnectionsList})}resetUserConnectionssListState(a){a.patchState({userConnectionsList:yo})}resetEntities(a){a.patchState({userConnectionsList:I(F({},a.getState().userConnectionsList),{entities:h})})}static{this.\u0275fac=function(e){return new(e||jn)}}static{this.\u0275prov=B({token:jn,factory:jn.\u0275fac})}};U([ne(Et.SetUserConnectionsListState),S("design:type",Function),S("design:paramtypes",[Object,Et.SetUserConnectionsListState]),S("design:returntype",void 0)],Wt.prototype,"setUserConnectionsListState",null);U([ne(Et.ResetUserConnectionssListState),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],Wt.prototype,"resetUserConnectionssListState",null);U([ne(Et.ResetEntites),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",void 0)],Wt.prototype,"resetEntities",null);U([We(),S("design:type",Function),S("design:paramtypes",[Object]),S("design:returntype",Object)],Wt,"getUserConnectionsListState",null);Wt=U([dt({name:"userconnections",defaults:{userConnectionsList:yo}})],Wt);var qn=(()=>{class i{constructor(e,t){this.http=e,this.transloco=t}getPersontypes(){return xo([{text:this.transloco.translate("documentLibrary.student"),value:!0},{text:this.transloco.translate("questionnaire.lecturers"),value:!1}])}deleteUserConnections(e,t){return this.http.post(`${De.settings.apiServer.url}DocumentContainer/RemoveUserFromFolder`,{folderId:e,connectionIds:t})}linkPersonsToFolder(e,t){return this.http.post(`${De.settings.apiServer.url}DocumentContainer/LinkUser`,{folderId:e,linkableIds:t})}static{this.\u0275fac=function(t){return new(t||i)(V(Te),V(ce))}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Wn=(()=>
1{class i extends Ee{constructor(){super({entities:h,selectedEntities:[],isNextVisible:!1,keepFilterOpen:!1,isFilterOpen:!1,isMoreFilterOpen:!1,orderBy:h,contracts:{firstRow:0,lastRow:10,filterModel:{printName:"",nickName:"",isStudent:"",folderId:""}},interfaceIdentity:Y.DocumentLibraryUserConnections,isMultiMobileActionSupported:!1,canReduceSortableColumns:!0,defaultColumns:[{text:"finalExams.examName",key:"printName"}],columns:h,displayedColumns:h,tableActions:[],tableFunctionTypes:[G.Export,G.EditColumns],previousFilters:h,hiddenFilters:{folderId:""}}),this.endPoint="DocumentContainer/GetFolderUserConnections",this.defaultPagingNumber=10,this.store=k(R),this.userConnectionsService=k(qn),this.errorHandler=k(mi),this.dialogService=k(Oe),this.saveListState=this.effect(e=>e.pipe(oe(this.state$),D(([,t])=>{this.store.dispatch(new Et.SetUserConnectionsListState(t))}))),this.deleteUserConnection=this.effect(e=>e.pipe(oe(this.selectedEntities$),W(([t,n])=>this.userConnectionsService.deleteUserConnections(t,n.map(o=>o.id)).pipe(D(()=>{this.updateSelectedEntities([]),this.reloadItemsFromServer(),this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.deleteSuccess"}))}),ae(o=>(this.errorHandler.handleError(o),qe)))))),this.openNewMessageDialog=this.effect(e=>e.pipe(oe(this.selectedEntities$),D(([t,n])=>{let o=n.map(x=>({userName:x.printName,userId:x.id}));this.dialogService.openDialog(Pr,{targetUsers:o,endpoint:"documentlibrary/sharedfolders/users/send"})})))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=B({token:i,factory:i.\u0275fac})}}return i})();var Hn=()=>[];function bm(i,a){if(i&1){let e=E();d(0,"neptun-table-header-actions",8),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"isResultRequest"),w("orderBy",function(n){_(e);let o=r(3);return f(o.sortItems(n))})("itemAction",function(n){_(e);let o=r(3);return f(o.itemAction(n))})("resetFilter",function(){_(e);let n=r(3);return f(n.resetFilter())})("toggleFilter",function(){_(e);let n=r(3);return f(n.toggleFilter())}),m()}if(i&2){let e=a.ngIf,t=r().ngIf,n=r(2);p("filterCount",c(1,8,n.filterCount$))("isFilterOpen",c(2,10,n.isFilterOpen$))("isListDataLoading",c(3,12,n.isListDataLoading$)===!0)("isOrderingSaving",c(4,14,n.isOrderBySaving$)===!0)("hasFilter",!0)("actionsMenu",c(5,16,n.moreActionsMenuItems$))("orderItems",c(6,18,t)?t.data:j(20,Hn))("isAnyItemsSelected",e.length>0)}}function xm(i,a){if(i&1){let e=E();d(0,"neptun-filter-v2",10),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),w("keepOpenChanged",function(){_(e);let n=r(4);return f(n.setKeepOpenChanged())})("latestFilterLoad",function(n){_(e);let o=r(4);return f(o.loadLatestFilter(n))})("filterClick",function(n){_(e);let o=r(4);return f(o.filterItems(n))})("closed",function(){_(e);let n=r(4);return f(n.toggleFilter())})("resetFilter",function(){_(e);let n=r(4);return f(n.resetFilter())}),L(5,"neptun-form-input",11)(6,"neptun-form-input",12)(7,"neptun-form-select",13),l(8,"async"),m()}if(i&2){let e,t=r().ngIf,n=r(2).$implicit,o=r();p("previousFilter",c(1,12,o.previousFilters$))("keepOpen",c(2,14,o.keepFilterOpen$))("isLoading",c(3,16,o.isFiltering$)===!0)("canFilter",((e=c(4,18,o.selectedEntities$))==null?null:e.length)===0),s(5),p("label",n("global.name"))("ngModel",t.printName),s(),p("label",n("login.nickName"))("ngModel",t.nickName),s(),p("label",n("global.type"))("isAllItemsAnOption",!0)("ngModel",t.isStudent)("dataSource",c(8,20,o.filterSource$))}}function Dm(i,a){if(i&1&&(y(0),u(1,xm,9,22,"neptun-filter-v2",9),l(2,"async"),v()),i&2){let e=r(3);s(),p("ngIf",c(2,1,e.isFilterOpen$))}}function Fm(i,a){i&1&&(d(0,"div",3),L(1,"neptun-data-table-placeholder",15),m()),i&2&&(s(),p("loading",!0))}function Im(i,a){i&1&&(d(0,"div",17),L(1,"neptun-request-error-indicator",19),m())}function Lm(i,a){if(i&1){let e=E();d(0,"neptun-data-table",20),l(1,"async"),l(2,"isResultRequest"),l(3,"async"),l(4,"async"),l(5,"isResultRequest"),l(6,"isResultRequest"),l(7,"async"),l(8,"async"),l(9,"async"),w("sortEmitter",function(n){_(e);let o=r(5);return f(o.sortItems(n))})("selected",function(n){_(e);
1let o=r(5);return f(o.setSelectedItems(n))})("getNext",function(n){_(e);let o=r(5);return f(o.getNextItems(n))})("actionClick",function(n){_(e);let o=r(5);return f(o.callActionCallback(n))}),m()}if(i&2){let e,t,n=r().ngIf,o=r().ngIf,x=r().ngIf,b=r(2);p("tableId","user-connections")("loadingPlaceholder",c(1,11,b.isListLoading$)===!0)("dataSource",c(2,13,n)?n.data:j(29,Hn))("filterCount",c(3,15,b.filterCount$))("isFilterOpen",c(4,17,b.isFilterOpen$))("columns",c(5,19,o)?o.data:null)("orderItems",c(6,21,x)?x.data:j(30,Hn))("isNextVisible",c(7,23,b.isNextVisible$))("selectable",!0)("selectedCount",(e=(e=c(8,25,b.selectedEntities$))==null?null:e.length)!==null&&e!==void 0?e:0)("actions",(t=c(9,27,b.tableActions$))!==null&&t!==void 0?t:j(31,Hn))}}function wm(i,a){if(i&1&&(y(0),u(1,Im,2,0,"div",16),l(2,"hasError"),d(3,"div",17),u(4,Lm,10,32,"neptun-data-table",18),l(5,"isLoadingRequest"),l(6,"isResultRequest"),l(7,"isResultRequest"),l(8,"isResultRequest"),m(),v()),i&2){let e=a.ngIf,t=r().ngIf,n=r().ngIf;s(),p("ngIf",c(2,2,e)),s(3),p("ngIf",c(5,4,e)||c(6,6,e)&&c(7,8,n)&&c(8,10,t))}}function Tm(i,a){if(i&1&&(y(0),u(1,Fm,2,1,"div",14),l(2,"isLoadingRequest"),l(3,"isLoadingRequest"),u(4,wm,9,12,"ng-container",2),l(5,"async"),v()),i&2){let e=a.ngIf,t=r().ngIf,n=r(2);s(),p("ngIf",c(2,2,e)||c(3,4,t)),s(3),p("ngIf",c(5,6,n.dataSource$))}}function Mm(i,a){if(i&1){let e=E();y(0),d(1,"div",3)(2,"div",4)(3,"button",5),w("click",function(){_(e);let n=r(2);return f(n.addNew())}),C(4),m(),d(5,"div",6),u(6,bm,7,21,"neptun-table-header-actions",7),l(7,"async"),m()()(),u(8,Dm,3,3,"ng-container",2),l(9,"async"),u(10,Tm,6,8,"ng-container",2),l(11,"async"),v()}if(i&2){let e=r().$implicit,t=r();s(3),p("accent","flat")("permissionRequired",t.linkUserPermission),s(),M(" ",e("button.add")," "),s(2),p("ngIf",c(7,6,t.selectedEntities$)),s(2),p("ngIf",c(9,8,t.filterModel$)),s(2),p("ngIf",c(11,10,t.columns$))}}function Em(i,a){if(i&1&&(y(0),L(1,"neptun-primary-title",1),u(2,Mm,12,12,"ng-container",2),l(3,"async"),v()),i&2){let e=a.$implicit,t=r();s(),p("title",e("menu.documentLibrary.connectedUsers")),s(),p("ngIf",c(3,2,t.orderByMenu$))}}var Ma=(()=>{class i extends Ae{constructor(e,t,n,o,x,b,z,$,Q,Ce,Je){super(e),this.userConnectionsStore=e,this.userConnections=t,this.listItemConverter=n,this.loadingService=o,this.userSearchApiService=x,this.http=b,this.userSelectDialogService=z,this.store=$,this.route=Q,this.transloco=Ce,this.dialogService=Je,this.exportTitle="menu.documentLibrary.connectedUsers",this.folderId=this.route.snapshot.params.folderId,this.filterSource$=this.userConnections.getPersontypes(),this.isOrderBySaving$=this.userConnectionsStore.isOrderBySaving$,this.dataSource$=we([this.entities$,this.selectedEntities$]).pipe(O(([lt,xi])=>ee(lt)?fe(lt.data.map(Vi=>this.convertToTableRow(Vi,xi.some(Qn=>Qn.id===Vi.id))),lt.isPagingLoading??!1):lt)),this.filterModel={printName:null,nickName:null,isStudent:null},this.userListService=new sr(this.loadingService,this.userSearchApiService,this.http),this.userListByGroupService=new ar(this.loadingService,this.http,this.userSearchApiService),this.sendMessagePermission={controllerName:"SharedFoldersUsersMessage",actionName:"SendMessage"},this.linkUserPermission={controllerName:"DocumentContainer",actionName:"LinkUser"},this.removeUserPermission={controllerName:"DocumentContainer",actionName:"RemoveUserFromFolder"}}initialize(){ee(this.listState.entities)?this.userConnectionsStore.updateState(I(F({},this.listState),{isFilterOpen:this.listState.keepFilterOpen})):(this.userConnectionsStore.getColumns(),this.userConnectionsStore.loadOrderBy(),this.userConnectionsStore.getPreviousFilters(),this.userConnectionsStore.updateHiddenFilters({folderId:this.folderId}),this.userConnectionsStore.updateFilterModel(I(F({},this.listState.contracts.filterModel),{folderId:this.folderId})),this.userConnectionsStore.isServerOrderLoaded$.pipe(se(Boolean),J(1),D(()=>this.userConnectionsStore.fetchItemsFromServer(I(F({},this.listState.contracts.filterModel),{firstRow:0,lastRow:this.listState.contracts.lastRow?this.listState.contracts.lastRow:this.userConnectionsStore.defaultPagingNumber})))).subscribe())}loadModuleState(){return this.store.selectSnapshot(Wt.getUserConnectionsListState)}
1resetModuleState(){this.store.dispatch(new Et.ResetUserConnectionssListState)}setSelectedItems(e){let t=[this.cancelAction,this.sendMessageAction,this.deleteAction];this.userConnectionsStore.updateTableActions(t),super.setSelectedItems(e)}get cancelAction(){return{text:this.transloco.translate("button.cancel"),icon:H.PlayerStop,type:me.Cancel,callback:()=>this.userConnectionsStore.updateSelectedEntities([])}}get deleteAction(){return{text:this.transloco.translate("documentLibrary.remove"),icon:H.Trash,type:me.Delete,callback:e=>this.openDeleteDialog(e),permission:this.removeUserPermission}}get sendMessageAction(){return{text:this.transloco.translate("button.sendMessage"),icon:H.CommentText,type:me.SendMessage,callback:()=>this.userConnectionsStore.openNewMessageDialog(),permission:this.sendMessagePermission}}openDeleteDialog(e){let t={title:this.transloco.translate(e.length>pt.ONE?"documentLibrary.personsDeletionQuestion":"documentLibrary.personDeletionQuestion"),body:[this.transloco.translate("notification.cannotUndo")],actions:[new Ye({text:this.transloco.translate("button.cancel")}),new Ke({color:"error",text:this.transloco.translate("button.delete"),returnValue:!0,callback:()=>this.userConnectionsStore.deleteUserConnection(this.folderId)})]};this.dialogService.openConfirmActionDialog(t)}convertToTableRow(e,t){return{data:I(F({},e),{uiDisplayState:I(F({},e.uiDisplayState),{reasons:[...e.uiDisplayState.reasons,e.nickName]})}),imageData:{printName:e.avatar.printName,fallbackColorCodeInHexa:e.avatar.fallbackColorCodeInHexa,image:e.avatar.image,avatarType:null},selected:t,actions:{}}}addPersonsConnections(e){this.userConnections.linkPersonsToFolder(this.folderId,e).pipe(J(1)).subscribe(()=>{this.userConnectionsStore.reloadItemsFromServer()})}addNew(){this.entities$.pipe(J(1),O(e=>ee(e)?e.data.map(t=>{let b=t,{id:n,printName:o}=b,x=bo(b,["id","printName"]);return{id:n,printName:o}}):[]),W(e=>this.listItemConverter.getUserSelectItem("id","printName",e).pipe(J(1),W(t=>this.userSelectDialogService.openUserSelectDialog(!1,this.userListService,this.userListByGroupService,this.userListContainerKey,this.userListByGroupContainerKey,t).pipe(J(1),se(n=>!!n),D(n=>{let o=n.selectedUsers?.filter(x=>x.newItem).map(x=>x.data.userId)??[];this.addPersonsConnections(o)})))))).subscribe()}static{this.\u0275fac=function(t){return new(t||i)(g(Wn),g(qn),g(tn),g(hi),g(rr),g(Te),g(pr),g(R),g(ie),g(ce),g(Oe))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-user-connections"]],features:[le([Wn,Fe]),re],decls:1,vars:0,consts:[[4,"transloco"],[3,"title"],[4,"ngIf"],[1,"neptun-wrapper-padding"],[1,"wrapper"],["neptun-button","","id","add-new-button",1,"responsive",3,"click","accent","permissionRequired"],[1,"wrapper__actions"],["class","action-container__actions",3,"filterCount","isFilterOpen","isListDataLoading","isOrderingSaving","hasFilter","actionsMenu","orderItems","isAnyItemsSelected","orderBy","itemAction","resetFilter","toggleFilter",4,"ngIf"],[1,"action-container__actions",3,"orderBy","itemAction","resetFilter","toggleFilter","filterCount","isFilterOpen","isListDataLoading","isOrderingSaving","hasFilter","actionsMenu","orderItems","isAnyItemsSelected"],["class","neptun-wrapper-padding",3,"previousFilter","keepOpen","isLoading","canFilter","keepOpenChanged","latestFilterLoad","filterClick","closed","resetFilter",4,"ngIf"],[1,"neptun-wrapper-padding",3,"keepOpenChanged","latestFilterLoad","filterClick","closed","resetFilter","previousFilter","keepOpen","isLoading","canFilter"],["id","printName","name","printName",1,"filter-element",3,"label","ngModel"],["id","nickName","name","nickName",1,"filter-element",3,"label","ngModel"],["id","isStudent","name","isStudent",1,"filter-element",3,"label","isAllItemsAnOption","ngModel","dataSource"],["class","neptun-wrapper-padding",4,"ngIf"],["test-id","loading",1,"neptun-wrapper",3,"loading"],["class","neptun-wrapper",4,"ngIf"],[1,"neptun-wrapper"],[3,"tableId","loadingPlaceholder","dataSource","filterCount","isFilterOpen","columns","orderItems","isNextVisible","selectable","selectedCount","actions","sortEmitter","selected","getNext","actionClick",4,"ngIf"],["test-id","error"],[3,"sortEmitter","selected","getNext","actionClick","tableId","loadingPlaceholder","dataSource","filterCount","isFilterOpen","columns","orderItems","isNextVisible","selectable","selectedCount","actions"]],template:function(t,n){t&1&&u(0,Em,4,4,"ng-container",0)},dependencies:[K,xe,Z,_e,Me,et,rt,Qe,Ne,Pe,Ue,vt,ii,Re,xt,X,ge,pe,he],styles:["[_nghost-%COMP%] .user-connections-table[_ngcontent-%COMP%] .mat-mdc-table .table-data-header{width:100%}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:16px}@media screen and (max-width:767px){.wrapper[_ngcontent-%COMP%]{flex-direction:column;gap:12px}.wrapper__actions[_ngcontent-%COMP%]{align-self:flex-end}}"],changeDetection:0})}}return i})();
1function Om(i,a){if(i&1){let e=E();d(0,"neptun-file-upload-simple",5),pi("ngModelChange",function(n){_(e);let o=r(2);return ci(o.documents,n)||(o.documents=n),f(n)}),m()}if(i&2){let e=a.ngIf,t=r().$implicit,n=r();p("documentationTypes",e)("documentLibraryService",n.documentationLibraryService)("multiple",!1),li("ngModel",n.documents),p("title",t("global.document"))("selectPlaceholderLabel",t("global.type"))}}function Rm(i,a){if(i&1){let e=E();y(0),L(1,"neptun-primary-title",1),d(2,"div",2)(3,"neptun-card"),u(4,Om,1,6,"neptun-file-upload-simple",3),l(5,"async"),m(),L(6,"neptun-scroll-top"),m(),d(7,"neptun-context-bar",4),w("buttonClicked",function(){_(e);let n=r();return f(n.save())}),m(),v()}if(i&2){let e=a.$implicit,t=r();s(),p("title",e("menu.documentLibrary.generalDocument")),s(3),p("ngIf",c(5,4,t.docTypes$)),s(3),p("text",e("requestJudgement.saveCaption"))("buttonText",e("button.save"))}}var Ea=(()=>{class i{constructor(e,t,n,o){this.documentationLibraryService=e,this.documentLibrary=t,this.router=n,this.store=o,this.documents=void 0,this.docTypes$=this.documentLibrary.getDocumentTypeId()}save(){let e=this.documents?this.documents[0]:void 0;e&&this.documentLibrary.saveFileDetails({type:e.documentationTypeId,fileGuid:e.guid,language:e.language,description:e.comment}).pipe(J(1),D(()=>{this.store.dispatch(new be.AddSuccessPushNotification({title:"notification.successfulUpload",description:e.name})),this.router.navigate(["document-library"])})).subscribe()}static{this.\u0275fac=function(t){return new(t||i)(g(Si),g(ve),g(ue),g(R))}}static{this.\u0275cmp=P({type:i,selectors:[["neptun-standalone-upload"]],decls:1,vars:0,consts:[[4,"transloco"],[3,"title"],[1,"neptun-wrapper"],["id","documentId","name","documentId","class","document-upload",3,"documentationTypes","documentLibraryService","multiple","ngModel","title","selectPlaceholderLabel","ngModelChange",4,"ngIf"],["buttonColor","primary",3,"buttonClicked","text","buttonText"],["id","documentId","name","documentId",1,"document-upload",3,"ngModelChange","documentationTypes","documentLibraryService","multiple","ngModel","title","selectPlaceholderLabel"]],template:function(t,n){t&1&&u(0,Rm,8,6,"ng-container",0)},dependencies:[K,xe,At,Z,Ci,Ne,Pe,Ue,tr,ln,X],styles:["neptun-card[_ngcontent-%COMP%]{max-width:610px}a[_ngcontent-%COMP%]{display:block;margin:32px 0}[_nghost-%COMP%] .document-upload .mat-mdc-select-arrow-wrapper{margin-bottom:12px}@media only screen and (max-width:767px){.neptun-wrapper[_ngcontent-%COMP%]{padding:0 20px}}"],changeDetection:0})}}return i})();var Bm=[{path:"",component:jr,data:{breadcrumb:""}},{path:"tr-documents",data:{breadcrumb:"documentLibrary.trDocuments"},children:[{path:"",component:Jr,data:{breadcrumb:""}},{path:":documentId",data:{breadcrumb:i=>i.documentName,prevRoute:Sr.TrDocuments},children:[{path:"",component:yr,data:{breadcrumb:""}},Ar(br,!0),Nr(vr,Mr,!1)]}]},{path:"documents-for-me",data:{breadcrumb:"documentLibrary.documentsForMe"},children:[{path:"",component:Zr,data:{breadcrumb:""}},{path:":documentId",component:Yr,data:{breadcrumb:i=>i.documentName}}]},{path:"uploaded-by-me",data:{breadcrumb:"documentLibrary.myUploadedDocuments"},children:[{path:"",component:Hr,data:{breadcrumb:""}},{path:":documentId",data:{breadcrumb:i=>i.documentName},children:[{path:"",component:Wr,data:{breadcrumb:""}},...Ur]}]},{path:"my-folders",data:{breadcrumb:"documentLibrary.myFoldersToShare"},children:[{path:"",component:Fa,data:{breadcrumb:""}},{path:"group-related-upload",component:fo,data:{breadcrumb:"documentLibrary.publicDocument"}},{path:":folderId",data:{breadcrumb:i=>i.folderName},children:[{path:"",component:xa,data:{breadcrumb:""}},{path:"user-connections",component:Ma,data:{breadcrumb:"documentLibrary.connectedUsers"}},{path:"own-group-connections",data:{breadcrumb:"documentLibrary.connectedUserGroups"},children:[{path:"",component:Sa,data:{breadcrumb:""}},{path:":groupConnectionId",component:ha,data:{breadcrumb:i=>i.groupName}}]},{path:"group-connections",data:{breadcrumb:"documentLibrary.connectedSocialGroups"},children:[{path:"",component:Ta,data:{breadcrumb:""}},{path:":groupConnectionId",component:Ia,data:{breadcrumb:i=>i.virtualSpaceName}}]},{path:":documentId",component:ga,data:{breadcrumb:i=>i.documentName}}]}]},{path:"recommended-folders",data:{breadcrumb:"documentLibrary.foldersSharedWithMe"},children:[{path:"",component:Kr,data:{breadcrumb:""}},{path:":folderId",data:{breadcrumb:i=>i.folderName},children:[{path:"",component:zr,data:{breadcrumb:""}},{path:":documentId",component:Qr,data:{breadcrumb:i=>i.documentName}}]}]},{path:"standalone-upload",component:Ea,data:{breadcrumb:"documentLibrary.generalDocument"}},{path:"group-related-upload",component:fo,data:{breadcrumb:"documentLibrary.publicDocument"}},{path:"avdhcallback",component:$r,data:{breadcrumb:""}}],$O=[{path:"",data:{breadcrumb:""},providers:[Vo([te,Gt,qt,$t,Wt,It,jt]),qo],children:Bm}];
1export{$O as routes};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.