@veltdev/sdk-dev 6.0.8-beta.4 → 6.0.8-beta.5
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/notification.model.d.ts +13 -0
- package/app/models/element/notification-element.model.d.ts +24 -1
- package/chunk-2H6D2UE5.js +1 -0
- package/{chunk-RD4WD7HR.js → chunk-2N7F6RD7.js} +1 -1
- package/{chunk-YMLBHLGQ.js → chunk-3BKUZ65V.js} +1 -1
- package/{chunk-YTAAOIBL.js → chunk-4EV2AXDK.js} +1 -1
- package/{chunk-F5F6L463.js → chunk-4ZVKEG33.js} +1 -1
- package/{chunk-6ARAZSKF.js → chunk-55ARQKHV.js} +1 -1
- package/{chunk-4Z6JEK4C.js → chunk-6AS4UBOQ.js} +1 -1
- package/{chunk-5AXDQN2Z.js → chunk-7AHH7XWM.js} +1 -1
- package/{chunk-3W7PWPIA.js → chunk-A2DMYJYR.js} +1 -1
- package/{chunk-PPIN2ZDO.js → chunk-CLE4JZBV.js} +1 -1
- package/{chunk-54WPSIBC.js → chunk-CQ2PFN5H.js} +1 -1
- package/{chunk-44QKIIUD.js → chunk-F7UEUUNI.js} +1 -1
- package/{chunk-WNQGJ6NQ.js → chunk-HAKNI7BB.js} +1 -1
- package/{chunk-4NY6TY72.js → chunk-ICDRH3KF.js} +1 -1
- package/{chunk-C45R3XT6.js → chunk-IHGYXGQ3.js} +1 -1
- package/{chunk-67WASIND.js → chunk-KPCULYW2.js} +1 -1
- package/{chunk-PSDDJB4F.js → chunk-MCPBCPXB.js} +1 -1
- package/{chunk-KGSCJNID.js → chunk-MUZB4ZRW.js} +1 -1
- package/{chunk-C6NXU52W.js → chunk-N6XSJOCG.js} +1 -1
- package/{chunk-2VSCJ7FP.js → chunk-OEOE4TD6.js} +1 -1
- package/{chunk-T4Z2W6NR.js → chunk-PPWVFIE5.js} +1 -1
- package/{chunk-5AD56Z43.js → chunk-PX2LBUTF.js} +1 -1
- package/{chunk-TYOTWEG4.js → chunk-QYY5QDZZ.js} +1 -1
- package/{chunk-F4COO6HD.js → chunk-R4Z2NW35.js} +1 -1
- package/{chunk-UZW6GB3Q.js → chunk-S4QHENVI.js} +1 -1
- package/{chunk-WUADE2PV.js → chunk-SHXQBB7N.js} +1 -1
- package/{chunk-ZDDZXCPC.js → chunk-TRPKCRP6.js} +1 -1
- package/{chunk-UGQYGMGF.js → chunk-UORQ3B6S.js} +1 -1
- package/{chunk-6VS6CXUM.js → chunk-W2OE7HCO.js} +1 -1
- package/{chunk-LC33EWB5.js → chunk-WLT43RAI.js} +1 -1
- package/{chunk-K47CMSNK.js → chunk-XFL4XVS4.js} +1 -1
- package/{chunk-Z4PTG3MC.js → chunk-XJUXSAIL.js} +1 -1
- package/{chunk-6GPW7ZK5.js → chunk-XZUEYYE3.js} +1 -1
- 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 +1 -1
- 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
- package/chunk-MIVF7JMQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as x,c as R,d as f,e as F,f as k}from"./chunk-
|
|
1
|
+
import{b as x,c as R,d as f,e as F,f as k}from"./chunk-PPWVFIE5.js";import{$ as v,Ch as E,Di as N,Ee as I,Fe as C,Ve as S,Vf as w,Wd as u,Yd as y,be as A,ca as d,g,ki as L,li as O,qi as D,ri as P,ti as j}from"./chunk-4EV2AXDK.js";var z=l=>{try{let n={USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onmouseenter","onmouseleave","onmousemove","onmousedown","onmouseup","onwheel","onscroll","onkeydown","onkeyup","onkeypress","onfocus","onblur","onchange","onsubmit","on*"],FORBID_TAGS:["script","style","iframe","object","embed","form"]};return P.sanitize(l,n)}catch(n){return u.catch("Error in File utils sanitizeSvg: ",n),""}},U=l=>{try{return l.name.split(".").slice(0,-1).join(".")}catch(n){u.catch("Error in File utils getFileName: ",n);return}},T=l=>{try{return/(?:\.([^.]+))?$/.exec(l?.name)[1]}catch(n){u.catch("Error in File utils getFileExtension: ",n);return}},M=(l,n)=>{try{let h=l.slice(0,-1,l.type);return new File([h],n+"."+T(l),{type:l.type})}catch(h){u.catch("Error in File utils updateFile: ",h);return}};var b={mp4:"video/mp4",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",webm:"video/webm",mkv:"video/x-matroska",m4v:"video/x-m4v",m4a:"audio/x-m4a",aac:"audio/aac","3gp":"video/3gpp","3g2":"video/3gpp2",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",zip:"application/zip",rar:"application/x-rar-compressed",txt:"text/plain",rtf:"application/rtf",html:"text/html",htm:"text/html",csv:"text/csv",ics:"text/calendar",vcf:"text/x-vcard",js:"application/javascript",css:"text/css",json:"application/json",xml:"application/xml",swf:"application/x-shockwave-flash"};var _=(()=>{let n=class n{getStorageInstance(t){return t?f(void 0,t):f()}ref(t,e){return F(t,e)}uploadBytesResumable(t,e,o){return k(t,e,o)}getDownloadURL(t){return R(t)}deleteObject(t){return x(t)}};n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var ae=(()=>{let n=class n{constructor(t,e,o,a,c,s){this.authService=t,this.configService=e,this.coreActionsService=o,this.loggingService=a,this.attachmentResolverService=c,this.storageAdapter=s,this.storage=this.storageAdapter.getStorageInstance();try{this.configService.getApiKey$().subscribe(r=>{this.apiKey=r}),this.authService.getFirebaseConfig$().subscribe(r=>{if(r&&r.firebaseOptions?.storageBucket){this.storage=this.storageAdapter.getStorageInstance(r?.firebaseOptions?.storageBucket);let i=this.configService.getProxyConfig();i?.storageHost&&(this.storage.host=i.storageHost)}},r=>{this.loggingService.catch("Error in StorageService constructor: ",r)})}catch(r){this.loggingService.catch("Error in StorageService constructor:",r)}}createAttachment({path:t,file:e}){try{let o=new C;o.name=e.name;let a=M(e,`${o.attachmentId}_${U(e)}`),c=`${this.apiKey}/${t}/${a?.name}`;return o.bucketPath=c,o.size=e.size,o.type=T(e),o?.type&&(o.mimeType=b[o?.type]),o}catch(o){return this.loggingService.catch("Error in StorageService createAttachment: ",o),null}}sanitizeSvgFile(t){return g(this,null,function*(){if(t.type===b.svg)try{let e=yield t.text(),o=z(e);return new File([o],t.name,{type:t.type})}catch(e){return this.loggingService.catch("Error in StorageService sanitizeSvgFile: ",e),t}return t})}uploadAttachmentToStorage(c){return g(this,arguments,function*({attachment:t,file:e,resolve:o,reject:a}){try{let s=this.storageAdapter.ref(this.storage,t.bucketPath),r=this.storageAdapter.uploadBytesResumable(s,e,{cacheControl:"public,max-age=3600"});r.on("state_changed",i=>{let m=i.bytesTransferred/i.totalBytes*100},i=>{a(i)},()=>{this.storageAdapter.getDownloadURL(r.snapshot.ref).then(i=>{t.url=i,o(t)})})}catch(s){this.loggingService.catch("Error in StorageService uploadAttachmentToStorage: ",s),a(s)}})}uploadToResolver(r){return g(this,arguments,function*({file:t,attachment:e,metadata:o,resolve:a,reject:c,scope:s}){try{o.attachmentId=e.attachmentId;let i={attachmentId:e.attachmentId,name:e.name,file:t,metadata:o,mimeType:e.mimeType},m=w();this.coreActionsService.triggerAction(A.ATTACHMENT_RESOLVER,{event:E.Events.Resolver.ATTACHMENT_SAVE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:m,methodName:S.UPLOAD_TO_RESOLVER,source:"internal",payload:{attachment:i,eventType:y.ATTACHMENT_ADD}});let p=yield this.attachmentResolverService.saveAttachment({attachment:i,eventType:y.ATTACHMENT_ADD},m,s);p&&p.data?.url?(e.url=p.data?.url,a(e)):c(new Error("Failed to upload attachment to resolver"))}catch(i){this.loggingService.catch("Error in StorageService uploadToResolver: ",i),c(i)}})}uploadFile({path:t,file:e,useAttachmentResolver:o,metadata:a,attachmentScope:c}){return new Promise((s,r)=>g(this,null,function*(){try{if(!this.apiKey)throw new Error("API key not configured");let i=yield this.sanitizeSvgFile(e),m=this.createAttachment({path:t,file:i});if(!m)throw new Error("Attachment not created");o?this.uploadToResolver({file:i,attachment:m,metadata:a,resolve:s,reject:r,scope:c}):this.uploadAttachmentToStorage({attachment:m,file:i,resolve:s,reject:r})}catch(i){this.loggingService.catch("Error in StorageService uploadFile:",i),r(i)}}))}uploadChunk(t,e,o,a){return new Promise((c,s)=>{try{if(a?.useAttachmentResolver){let r=this.createAttachment({path:t,file:e});if(!r){s(new Error("Attachment not created for chunk upload"));return}this.uploadToResolver({file:e,attachment:r,metadata:a.metadata,resolve:i=>c(i.url),reject:s,scope:a.attachmentScope});return}if(this.apiKey){let r=`${this.apiKey}/${t}/${e.name}`,i=this.storageAdapter.ref(this.storage,r),m=this.storageAdapter.uploadBytesResumable(i,e,{cacheControl:"public,max-age=3600"});m.on("state_changed",p=>{let H=p.bytesTransferred/p.totalBytes*100},p=>{s(p)},()=>{this.storageAdapter.getDownloadURL(m.snapshot.ref).then(p=>{c(p)}).catch(p=>{this.loggingService.catch(`[uploadChunk] Error getting download URL for chunk ${o}:`,p),s(p)})})}else{let r=new Error("API key not available");this.loggingService.catch("[uploadChunk] API key not available",r),s(r)}}catch(r){this.loggingService.catch(`[uploadChunk] Error in StorageService uploadChunk for chunk ${o}: `,r),s(r)}})}downloadAttachment(t){try{if(t.url){let e=new XMLHttpRequest;e.responseType="blob",e.onload=()=>{let o=e.response,a=document.createElement("a"),c=window.URL.createObjectURL(o);a.setAttribute("type","hidden"),a.setAttribute(I.ATTRIBUTES.VELT_DOWNLOAD_BUTTON,"true"),a.classList.add("snippyly-overlay-panel"),a.href=c,t?.name&&(a.download=t?.name),document.body.appendChild(a);let s=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(s),window.URL.revokeObjectURL(c),a.remove()},e.onerror=()=>{window.open(t.url,"_blank")},e.open("GET",t.url),e.send()}}catch(e){this.loggingService.catch("Error in StorageService downloadAttachment: ",e)}}deleteAttachment({attachment:t,metadata:e,useAttachmentResolver:o,attachmentScope:a}){return new Promise((c,s)=>{if(o){let r=w();this.coreActionsService.triggerAction(A.ATTACHMENT_RESOLVER,{event:E.Events.Resolver.ATTACHMENT_DELETE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:r,methodName:S.DELETE_ATTACHMENT,source:"internal",payload:{attachmentId:t.attachmentId,metadata:e}}),this.attachmentResolverService.deleteAttachment({attachmentId:t.attachmentId,metadata:e},r,a).then(()=>{c(null)}).catch(i=>{s(i)})}else{let r=this.storageAdapter.ref(this.storage,t.bucketPath);this.storageAdapter.deleteObject(r).then(()=>{c(null)}).catch(i=>{c(null)})}})}deleteFileFromPath(t){return new Promise((e,o)=>{let a=this.storageAdapter.ref(this.storage,t);this.storageAdapter.deleteObject(a).then(()=>{e(null)}).catch(c=>{o(c)})})}};n.\u0275fac=function(e){return new(e||n)(d(j),d(O),d(D),d(L),d(N),d(_))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();export{ae as a};
|