@veltdev/sdk 6.0.13 → 6.0.14
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/element/activity-element.model.d.ts +9 -0
- package/app/models/element/autocomplete-element.model.d.ts +10 -0
- package/app/models/element/comment-element.model.d.ts +72 -0
- package/app/models/element/notification-element.model.d.ts +17 -0
- package/{chunk-5ERVDJVZ.js → chunk-2FEIHKKV.js} +1 -1
- package/chunk-2V7TTJKH.js +1 -0
- package/{chunk-F6M3P4UD.js → chunk-4FVMXAF7.js} +1 -1
- package/{chunk-FO63HKEV.js → chunk-64GL6WKY.js} +23 -23
- package/{chunk-IEARZHMW.js → chunk-65XLFMDJ.js} +1 -1
- package/{chunk-VLI7WZHI.js → chunk-72VT3VO3.js} +1 -1
- package/{chunk-IQPVDXAK.js → chunk-AR4T44MM.js} +1 -1
- package/{chunk-Z2THH5OJ.js → chunk-F2UI7E6N.js} +1 -1
- package/chunk-F5KOG4DN.js +1 -0
- package/{chunk-A33EWNC3.js → chunk-FJAHUNNB.js} +1 -1
- package/{chunk-W3NND5ZH.js → chunk-H2T34LM4.js} +1 -1
- package/{chunk-KQLWAW6K.js → chunk-IEQR2CEL.js} +1 -1
- package/chunk-L4AXPJQZ.js +93 -0
- package/{chunk-2XEJW2UG.js → chunk-LQG2TUSP.js} +1 -1
- package/{chunk-GZLMZO7P.js → chunk-ME557375.js} +1 -1
- package/chunk-MWDTJYYY.js +2 -0
- package/{chunk-SCWV6SMS.js → chunk-NMRSVQSF.js} +1 -1
- package/{chunk-HYH2T3QS.js → chunk-NPLOF2QS.js} +1 -1
- package/chunk-QIQIQCJU.js +1 -0
- package/{chunk-KW4XXZEB.js → chunk-QWZ5M6S5.js} +1 -1
- package/{chunk-IAN7GPO6.js → chunk-RM6DYFJ2.js} +1 -1
- package/{chunk-EFKI6V6K.js → chunk-RNJD4QCR.js} +1 -1
- package/{chunk-4SFS2KG2.js → chunk-SSYLZSDJ.js} +1 -1
- package/{chunk-RCHN5SRK.js → chunk-TKYUWYIS.js} +1 -1
- package/chunk-TVVTJPQP.js +1 -0
- package/chunk-UI4FQ45E.js +193 -0
- package/{chunk-UBBD4OMS.js → chunk-UKXVAUY2.js} +1 -1
- package/{chunk-BDEICPBX.js → chunk-WIBWKKPR.js} +1 -1
- package/chunk-WIWLWJ4R.js +1 -0
- package/chunk-XUZBUCP7.js +6 -0
- package/chunk-YD46V2HJ.js +1 -0
- package/{chunk-ZJVFBQPJ.js → chunk-YMQYY2F3.js} +1 -1
- package/{chunk-54FONR5K.js → chunk-ZXRARNBR.js} +1 -1
- package/{chunk-T3GZ6U2L.js → chunk-ZXZRV24Q.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 +2 -2
- package/velt-comment.js +7 -7
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +2 -2
- package/velt-huddle.js +2 -2
- package/velt-live-state-sync.js +2 -2
- package/velt-notification.js +1 -1
- package/velt-portable.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 +2 -2
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +2 -2
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +2 -2
- package/velt.js +6 -6
- package/chunk-DUSBHL6Z.js +0 -1
- package/chunk-HIDIH4Z6.js +0 -1
- package/chunk-JOSDM4NR.js +0 -193
- package/chunk-N6CMWQOO.js +0 -1
- package/chunk-OCTVYMYG.js +0 -93
- package/chunk-Q5PUAZ5X.js +0 -2
- package/chunk-UMXPQKWY.js +0 -1
- package/chunk-VLZ4PDIN.js +0 -1
- package/chunk-Z3MONV7V.js +0 -6
- package/chunk-ZQWAJQF7.js +0 -1
|
@@ -29,4 +29,13 @@ export declare class ActivityElement {
|
|
|
29
29
|
* Create a new activity record.
|
|
30
30
|
*/
|
|
31
31
|
private _createActivity;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
35
|
+
* @returns Observable<any>
|
|
36
|
+
*/
|
|
37
|
+
public getActivityLogConfig: () => Observable<any>;
|
|
38
|
+
|
|
39
|
+
private _getActivityLogConfig;
|
|
40
|
+
|
|
32
41
|
}
|
|
@@ -21,4 +21,14 @@ export declare class AutocompleteElement {
|
|
|
21
21
|
* To get callback on autocomplete chip click
|
|
22
22
|
*/
|
|
23
23
|
private _onAutocompleteChipClick;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
27
|
+
* @param autocompleteId Autocomplete Id
|
|
28
|
+
* @returns Observable<any>
|
|
29
|
+
*/
|
|
30
|
+
public getAutocompleteConfig: (config: { autocompleteId: string }) => Observable<any>;
|
|
31
|
+
|
|
32
|
+
private _getAutocompleteConfig;
|
|
33
|
+
|
|
24
34
|
}
|
|
@@ -964,6 +964,68 @@ export declare class CommentElement {
|
|
|
964
964
|
*/
|
|
965
965
|
public getCommentAnnotationById: (config: { annotationId: string, documentId?: string }) => Observable<CommentAnnotation | null>;
|
|
966
966
|
|
|
967
|
+
/**
|
|
968
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
969
|
+
* @param annotationId Annotation Id
|
|
970
|
+
* @returns Observable<any>
|
|
971
|
+
*/
|
|
972
|
+
public getCommentDialogConfig: (config: { annotationId: string }) => Observable<any>;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
976
|
+
* @param contextId Context Id (defaults to 'default')
|
|
977
|
+
* @returns Observable<any>
|
|
978
|
+
*/
|
|
979
|
+
public getCommentBubbleConfig: (config: { contextId?: string }) => Observable<any>;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
983
|
+
* @param contextId Context Id (defaults to 'default')
|
|
984
|
+
* @returns Observable<any>
|
|
985
|
+
*/
|
|
986
|
+
public getCommentPinConfig: (config: { contextId?: string }) => Observable<any>;
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
990
|
+
* @param contextId Context Id (defaults to 'default')
|
|
991
|
+
* @returns Observable<any>
|
|
992
|
+
*/
|
|
993
|
+
public getCommentsToolConfig: (config: { contextId?: string }) => Observable<any>;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
997
|
+
* @param contextId Context Id (defaults to 'default')
|
|
998
|
+
* @returns Observable<any>
|
|
999
|
+
*/
|
|
1000
|
+
public getMultiThreadDialogConfig: (config?: { contextId?: string }) => Observable<any>;
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
1004
|
+
* @param contextId Context Id (defaults to 'default')
|
|
1005
|
+
* @returns Observable<any>
|
|
1006
|
+
*/
|
|
1007
|
+
public getSidebarButtonConfig: (config: { contextId?: string }) => Observable<any>;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
1011
|
+
* @param contextId Context Id (defaults to 'default')
|
|
1012
|
+
* @returns Observable<any>
|
|
1013
|
+
*/
|
|
1014
|
+
public getTextCommentConfig: (config: { contextId?: string }) => Observable<any>;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
1018
|
+
* @param config Optional `{ targetElementId }` (defaults to the sole mounted section)
|
|
1019
|
+
* @returns Observable<any>
|
|
1020
|
+
*/
|
|
1021
|
+
public getInlineCommentsSectionConfig: (config?: { targetElementId?: string }) => Observable<any>;
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
1025
|
+
* @returns Observable<any>
|
|
1026
|
+
*/
|
|
1027
|
+
public getCommentSidebarConfig: () => Observable<any>;
|
|
1028
|
+
|
|
967
1029
|
/**
|
|
968
1030
|
* To enable collapsed comment
|
|
969
1031
|
*/
|
|
@@ -2383,6 +2445,15 @@ export declare class CommentElement {
|
|
|
2383
2445
|
* @returns Observable<CommentAnnotation | null>
|
|
2384
2446
|
*/
|
|
2385
2447
|
private _getCommentAnnotationById;
|
|
2448
|
+
private _getCommentDialogConfig;
|
|
2449
|
+
private _getCommentBubbleConfig;
|
|
2450
|
+
private _getCommentPinConfig;
|
|
2451
|
+
private _getCommentsToolConfig;
|
|
2452
|
+
private _getMultiThreadDialogConfig;
|
|
2453
|
+
private _getSidebarButtonConfig;
|
|
2454
|
+
private _getTextCommentConfig;
|
|
2455
|
+
private _getInlineCommentsSectionConfig;
|
|
2456
|
+
private _getCommentSidebarConfig;
|
|
2386
2457
|
|
|
2387
2458
|
/**
|
|
2388
2459
|
* To enable collapsed comment
|
|
@@ -2893,4 +2964,5 @@ export declare class CommentElement {
|
|
|
2893
2964
|
* To disable pin drag
|
|
2894
2965
|
*/
|
|
2895
2966
|
private _disablePinDrag;
|
|
2967
|
+
|
|
2896
2968
|
}
|
|
@@ -308,4 +308,21 @@ export declare class NotificationElement {
|
|
|
308
308
|
* Subscribe to notification events
|
|
309
309
|
*/
|
|
310
310
|
private _on;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
314
|
+
* @returns Observable<any>
|
|
315
|
+
*/
|
|
316
|
+
public getNotificationsPanelConfig: () => Observable<any>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @experimental Read this feature's live derived config. Read-only; its shape is internal and may change between releases.
|
|
320
|
+
* @returns Observable<any>
|
|
321
|
+
*/
|
|
322
|
+
public getNotificationsToolConfig: () => Observable<any>;
|
|
323
|
+
|
|
324
|
+
private _getNotificationsPanelConfig;
|
|
325
|
+
|
|
326
|
+
private _getNotificationsToolConfig;
|
|
327
|
+
|
|
311
328
|
}
|
|
@@ -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-FJAHUNNB.js";import{c as N}from"./chunk-4FVMXAF7.js";import{He as I,Ie as C,Ti as L,Ui as O,Yd as u,_d as y,ba as v,bf as S,ea as d,ee as A,g,ji as E,rg as w,uj as D,vj as P,xj as j}from"./chunk-64GL6WKY.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as V}from"./chunk-QIQIQCJU.js";import{Ga as x,Ha as L,Ja as D,M as C,R as v,S as I}from"./chunk-XUZBUCP7.js";import{Bi as y,Ri as E,Ti as U,Wa as m,_a as d,a as s,b as h,fa as o,sa as f,xc as u,ya as S,zc as p}from"./chunk-64GL6WKY.js";var A=(()=>{let r=class r extends D{set parentLocalUIState(t){try{t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1,this._localUIStateFromExplicitInput=!0)}catch{}}get elementRef(){try{return this.hostElementRef}catch{return null}}getServiceComponentConfigSignal(){}constructor(){let t=o(S),e=o(L),i=o(p),a=o(E).get(y),g=o(x),l=o(U);super(t,e,i,a??void 0,void 0,g,l),this.defaultCondition=u(!0,{transform:n=>{try{return typeof n=="string"?n==="true"||n==="":n}catch{return!0}}}),this.isLocalUIStateOwner=!1,this._localUIStateFromExplicitInput=!1,this.veltContextHost=new V({getHost:()=>this.hostElementRef?.nativeElement,ownerRef:this,getEntity:()=>this.getPublishedVeltEntity(),getLocalUIState:()=>this.isLocalUIStateOwner?this.localUIStateSignal:void 0,onContextChanged:()=>{this.adoptInheritedLocalUIState(),this.rebindServiceConfigFromPlacement(),this.onVeltContextChanged()},markForCheck:()=>this.cd?.markForCheck()}),this.isLocalUIStateRoot=!1,this.selfConnectedConfig=!1,this.ownsConfigSignal=!0;try{this.hostElementRef=t,this.themeService=e,this.dynamicDataService=g,this.loggingService=l,this.cd=i,this.commentService=a??void 0,this.initializeLocalUIState()}catch(n){this.loggingService=this.loggingService||l,this.loggingService?.catch?.("Error in V2PrimitiveThemedBase constructor:",n)}}initializeLocalUIState(){this.localUIStateSignal=f(this.getDefaultLocalUIState()),this.isLocalUIStateOwner=!0}getConditionalClassesContext(){return{componentConfigSignal:this.componentConfigSignal}}ngOnInit(){try{this.adoptInheritedLocalUIState(),this.connectToServiceSignalIfStandalone(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,this.getConditionalClassesContext()),this.setupA11yAttributes(),this.isLocalUIStateOwner&&this.setupDarkModeSync(),this.finalizeVeltContext()}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase ngOnInit:",t)}}adoptInheritedLocalUIState(){try{v({host:this.hostElementRef?.nativeElement,current:this.localUIStateSignal,isOwner:this.isLocalUIStateOwner,fromExplicitInput:this._localUIStateFromExplicitInput,isRoot:this.isLocalUIStateRoot,adopt:t=>{this.localUIStateSignal=t,this.isLocalUIStateOwner=!1}})}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase adoptInheritedLocalUIState:",t)}}rebindServiceConfigFromPlacement(){try{if(!this.selfConnectedConfig)return;let t=this.getServiceComponentConfigSignal();if(!t||t===this.componentConfigSignal)return;let e=this.componentConfigSignal,i=this.ownsConfigSignal;if(this.componentConfigSignal=t,this.ownsConfigSignal=!1,i)try{e?.update(a=>s({},a))}catch{}this.cd?.markForCheck()}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase rebindServiceConfigFromPlacement:",t)}}finalizeVeltContext(){this.veltContextHost.finalize()}getPublishedVeltEntity(){}getInheritedVeltEntity(){try{return I(this.hostElementRef?.nativeElement)}catch{return}}refreshVeltContextFromPlacement(){this.veltContextHost.refreshFromPlacement()}onVeltContextChanged(){}getInheritedVeltContextData(){try{return C(this.hostElementRef?.nativeElement)?.payload?.contextData||{}}catch{return{}}}connectToServiceSignalIfStandalone(){try{let t=this.componentConfigSignal();if(!t||!t?.uiState){this.selfConnectedConfig=!0;let e=this.getServiceComponentConfigSignal();e&&(this.componentConfigSignal=e,this.ownsConfigSignal=!1)}}catch(t){this.loggingService.catch("Error connecting to service signal:",t)}}ngOnDestroy(){try{this.darkModeConfigSyncSubscription&&this.darkModeConfigSyncSubscription.unsubscribe(),this.veltContextHost.destroy(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase ngOnDestroy:",t)}}setupA11yAttributes(){}setupDarkModeSync(){try{this.darkModeConfigSyncSubscription=this.onDarkModeChange().subscribe(t=>{try{if(this.componentConfigSignal&&typeof this.componentConfigSignal=="function"){let e=this.componentConfigSignal();e&&e.uiState&&e.uiState.darkMode!==t&&this.componentConfigSignal.update(i=>h(s({},i),{uiState:h(s({},i.uiState),{darkMode:t})}))}}catch(e){this.loggingService.catch("Error in darkMode sync subscription:",e)}})}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase setupDarkModeSync:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=m({type:r,selectors:[["app-v2-primitive-themed-base"]],inputs:{defaultCondition:[1,"defaultCondition"],parentLocalUIState:"parentLocalUIState"},standalone:!1,features:[d],decls:0,vars:0,template:function(e,i){},encapsulation:2});let c=r;return c})();export{A as a};
|