@veltdev/sdk-staging 6.0.8-beta.2 → 6.0.8-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/models/data/comment-action.data.model.d.ts +55 -0
- package/app/models/data/comment-annotation.data.model.d.ts +11 -0
- package/app/models/data/comment-events.data.model.d.ts +52 -0
- package/app/models/data/comment-progress.data.model.d.ts +127 -0
- package/app/models/data/comment.data.model.d.ts +29 -0
- package/app/models/element/comment-element.model.d.ts +9 -0
- package/app/utils/enums.d.ts +1 -0
- package/{chunk-LUSP4CU7.js → chunk-2CPFZPZL.js} +1 -1
- package/{chunk-5XIWDXFS.js → chunk-3HT5L4QS.js} +1 -1
- package/{chunk-5K66YWNT.js → chunk-3MAA6ORB.js} +1 -1
- package/{chunk-3XNLR5I6.js → chunk-44QKIIUD.js} +1 -1
- package/{chunk-O6F3BMUF.js → chunk-45RSUXWO.js} +1 -1
- package/{chunk-33F6VZ2D.js → chunk-4Z6JEK4C.js} +1 -1
- package/{chunk-IOANBPOF.js → chunk-54WPSIBC.js} +1 -1
- package/{chunk-HNZ452CD.js → chunk-5AXDQN2Z.js} +1 -1
- package/{chunk-5YU74OX2.js → chunk-67WASIND.js} +1 -1
- package/{chunk-7JVKTVLP.js → chunk-6GDK5ORV.js} +1 -1
- package/{chunk-L3RST2RO.js → chunk-6LQHVKDO.js} +1 -1
- package/{chunk-J3XMPD2L.js → chunk-6OH2EVLZ.js} +1 -1
- package/{chunk-556JP7KB.js → chunk-7GIX7FRK.js} +1 -1
- package/{chunk-SWIIDQSR.js → chunk-AN5PXX2C.js} +1 -1
- package/{chunk-Y6KJEASI.js → chunk-F5F6L463.js} +1 -1
- package/{chunk-BL3PIRRB.js → chunk-HG5ATWOH.js} +1 -1
- package/{chunk-7LAV2XPR.js → chunk-HO27RBDE.js} +1 -1
- package/{chunk-F425LPIZ.js → chunk-I545665X.js} +1 -1
- package/{chunk-KI5LFWRP.js → chunk-IEO673J4.js} +1 -1
- package/{chunk-LK3CGZV4.js → chunk-ITGK4UWR.js} +1 -1
- package/{chunk-WTWLL3QD.js → chunk-JGOSCTOU.js} +1 -1
- package/{chunk-24U4LEAT.js → chunk-KGSCJNID.js} +1 -1
- package/{chunk-NLHWZCYU.js → chunk-LZ6S3GDG.js} +1 -1
- package/{chunk-IWJMDNA6.js → chunk-O3SELCX3.js} +1 -1
- package/{chunk-PWKBFA6F.js → chunk-OBHASA4V.js} +1 -1
- package/{chunk-RTIZJ4JW.js → chunk-RD4WD7HR.js} +1 -1
- package/{chunk-L5DZYMH5.js → chunk-RVRKRO3G.js} +1 -1
- package/{chunk-TCRGSGLB.js → chunk-T3HQOEN5.js} +1 -1
- package/{chunk-WNW7AS77.js → chunk-T4Z2W6NR.js} +1 -1
- package/{chunk-H2PBKB34.js → chunk-TYOTWEG4.js} +1 -1
- package/{chunk-LFEKCFWQ.js → chunk-WUADE2PV.js} +1 -1
- package/{chunk-WG6SZMXC.js → chunk-XTVGC5C3.js} +1 -1
- package/{chunk-CRZGZZVQ.js → chunk-YTAAOIBL.js} +9 -9
- package/models.d.ts +2 -0
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +1 -1
- package/velt-comment.js +7 -7
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +1 -1
- package/velt-huddle.js +1 -1
- package/velt-live-state-sync.js +1 -1
- package/velt-notification.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +1 -1
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +1 -1
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +1 -1
- package/velt.js +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ca as F}from"./chunk-
|
|
1
|
+
import{ca as F}from"./chunk-HO27RBDE.js";import{$ as A,Ai as U,Cf as g,Ch as D,E as h,Ee as $,Fi as C,G as d,J as v,L as l,Pi as w,T as n,Xe as M,ca as s,ji as E,ki as R,l as p,li as y,qh as I,r as u,te as a,ti as k,ue as m,v as c}from"./chunk-YTAAOIBL.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.getUser(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent(D.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new M;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:$.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(k),s(F),s(U),s(C),s(y),s(R),s(w))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};
|