@cometchat/chat-uikit-angular 5.0.0 → 5.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-angular",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "license": "https://www.cometchat.com/legal-terms-of-service",
5
5
  "homepage": "https://www.cometchat.com",
6
6
  "repository": "https://github.com/cometchat/cometchat-uikit-angular",
@@ -623,7 +623,7 @@ declare global {
623
623
  * @example
624
624
  * // Injectable usage in components
625
625
  * constructor(private uiKit: CometChatUIKit) {
626
- * this.uiKit.loggedInUser$.subscribe(user => console.log(user));
626
+ * this.uiKit.loggedInUser$.subscribe(user => CometChatLogger.info(user));
627
627
  * }
628
628
  */
629
629
  declare class CometChatUIKit {
@@ -1161,8 +1161,16 @@ interface CometChatEmojiCategory {
1161
1161
  * @see Requirements 1.7, 1.8, 1.9, 1.10
1162
1162
  */
1163
1163
  interface MediaAttachment {
1164
- /** The URL of the media file */
1164
+ /** The URL of the media file — always the full-quality original */
1165
1165
  url: string;
1166
+ /**
1167
+ * The display URL for the thumbnail preview in the bubble.
1168
+ * When the CometChat Thumbnail Generation extension is enabled, this is the
1169
+ * compressed low-quality URL (url_medium for images, url_small for videos).
1170
+ * Falls back to `url` when no extension thumbnail is available.
1171
+ * The fullscreen viewer always uses `url` (full quality), never `displayUrl`.
1172
+ */
1173
+ displayUrl?: string;
1166
1174
  /** The type of media (image or video) - required for fullscreen viewer gallery mode */
1167
1175
  type?: 'image' | 'video';
1168
1176
  /** The filename for download purposes (optional) */
@@ -3760,6 +3768,8 @@ declare class MessageListService {
3760
3768
  fetchPreviousMessages(): Promise<boolean>;
3761
3769
  fetchNextMessages(): Promise<boolean>;
3762
3770
  fetchMessagesAroundId(messageId: number): Promise<void>;
3771
+ /** Returns the current fetch generation — used by fetchWithUnreadPivot to detect stale async calls. */
3772
+ getFetchGeneration(): number;
3763
3773
  private deduplicateMessages;
3764
3774
  private isRecoverableError;
3765
3775
  private isRecoverableErrorMessage;
@@ -3802,7 +3812,7 @@ declare class MessageListService {
3802
3812
  handleMessageEdited(message: CometChat.BaseMessage): void;
3803
3813
  handleMessageDeleted(message: CometChat.BaseMessage): void;
3804
3814
  handleReceipt(receipt: CometChat.MessageReceipt, isGroupReceipt: boolean): void;
3805
- handleReactionEvent(reactionEvent: CometChat.ReactionEvent): void;
3815
+ handleReactionEvent(reactionEvent: CometChat.ReactionEvent, action: 'added' | 'removed'): void;
3806
3816
  private setupGroupListener;
3807
3817
  private setupCallListener;
3808
3818
  private setupConnectionListener;
@@ -7443,7 +7453,6 @@ declare class CometChatConversationItemComponent implements OnInit, OnDestroy {
7443
7453
  private isURL;
7444
7454
  private hasMarkdownLink;
7445
7455
  private formatLastMessageSubtitle;
7446
- private convertMarkdownToHtml;
7447
7456
  private getFormattersForSubtitle;
7448
7457
  private hasSdkMentionTags;
7449
7458
  get subtitleHasHtml(): boolean;
@@ -7926,6 +7935,7 @@ declare class CometChatConversationsComponent implements OnInit, OnDestroy {
7926
7935
  activeFormatters: CometChatTextFormatter[];
7927
7936
  private typingAnnouncementTimeout;
7928
7937
  private lastAnnouncedTypingUser;
7938
+ private previousTypingSize;
7929
7939
  private readonly destroyRef;
7930
7940
  readonly SelectionMode: typeof SelectionMode;
7931
7941
  readonly Placement: typeof Placement;
@@ -8506,7 +8516,7 @@ declare class CometChatStickersKeyboardComponent implements OnInit, OnDestroy {
8506
8516
  */
8507
8517
  onCategoryClick(categoryName: string): void;
8508
8518
  /**
8509
- * Handles sticker click - emits the sticker selection event
8519
+ * Handles sticker click - emits the sticker selection event and closes the keyboard
8510
8520
  * @see Requirements 8.7
8511
8521
  */
8512
8522
  handleStickerClick(sticker: StickerItem): void;
@@ -8675,6 +8685,18 @@ declare class CometChatPopoverComponent implements OnInit, AfterViewInit, OnDest
8675
8685
  ariaLabelledBy?: string;
8676
8686
  ariaDescribedBy?: string;
8677
8687
  contentStyle: Record<string, string>;
8688
+ /**
8689
+ * When true (and useParentContainer is true), the popover will not overflow
8690
+ * the parent container horizontally. Use for popovers that must stay within
8691
+ * a bounded horizontal region (e.g. attachment menu in the message composer).
8692
+ */
8693
+ constrainHorizontal: boolean;
8694
+ /**
8695
+ * When true (and useParentContainer is true), the popover will not overflow
8696
+ * the parent container vertically. Use for popovers that must stay within
8697
+ * a bounded vertical region (e.g. message bubble context menus in the message list).
8698
+ */
8699
+ constrainVertical: boolean;
8678
8700
  popoverOpened: EventEmitter$1<void>;
8679
8701
  popoverClosed: EventEmitter$1<void>;
8680
8702
  outsideClick: EventEmitter$1<void>;
@@ -8723,7 +8745,7 @@ declare class CometChatPopoverComponent implements OnInit, AfterViewInit, OnDest
8723
8745
  private handleKeydownForFocusTrap;
8724
8746
  private focusFirstElement;
8725
8747
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CometChatPopoverComponent, never>;
8726
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CometChatPopoverComponent, "cometchat-popover", never, { "placement": { "alias": "placement"; "required": false; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; }; "showOnHover": { "alias": "showOnHover"; "required": false; }; "debounceOnHover": { "alias": "debounceOnHover"; "required": false; }; "content": { "alias": "content"; "required": false; }; "disableBackgroundInteraction": { "alias": "disableBackgroundInteraction"; "required": false; }; "useParentContainer": { "alias": "useParentContainer"; "required": false; }; "useParentHeight": { "alias": "useParentHeight"; "required": false; }; "showTooltip": { "alias": "showTooltip"; "required": false; }; "trapFocus": { "alias": "trapFocus"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; }; "contentStyle": { "alias": "contentStyle"; "required": false; }; }, { "popoverOpened": "popoverOpened"; "popoverClosed": "popoverClosed"; "outsideClick": "outsideClick"; }, never, ["*"], true, never>;
8748
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CometChatPopoverComponent, "cometchat-popover", never, { "placement": { "alias": "placement"; "required": false; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; }; "showOnHover": { "alias": "showOnHover"; "required": false; }; "debounceOnHover": { "alias": "debounceOnHover"; "required": false; }; "content": { "alias": "content"; "required": false; }; "disableBackgroundInteraction": { "alias": "disableBackgroundInteraction"; "required": false; }; "useParentContainer": { "alias": "useParentContainer"; "required": false; }; "useParentHeight": { "alias": "useParentHeight"; "required": false; }; "showTooltip": { "alias": "showTooltip"; "required": false; }; "trapFocus": { "alias": "trapFocus"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; }; "contentStyle": { "alias": "contentStyle"; "required": false; }; "constrainHorizontal": { "alias": "constrainHorizontal"; "required": false; }; "constrainVertical": { "alias": "constrainVertical"; "required": false; }; }, { "popoverOpened": "popoverOpened"; "popoverClosed": "popoverClosed"; "outsideClick": "outsideClick"; }, never, ["*"], true, never>;
8727
8749
  }
8728
8750
 
8729
8751
  declare const MENTIONS_LIMIT = 10;
@@ -9369,7 +9391,7 @@ type MessagePreviewMode = 'reply' | 'edit';
9369
9391
  * </cometchat-message-preview>
9370
9392
  * ```
9371
9393
  */
9372
- declare class CometChatMessagePreviewComponent implements AfterViewInit, OnDestroy {
9394
+ declare class CometChatMessagePreviewComponent implements OnInit, AfterViewInit, OnDestroy {
9373
9395
  private globalConfig;
9374
9396
  private textFormattersExplicitlySet;
9375
9397
  private _textFormatters;
@@ -9409,6 +9431,8 @@ declare class CometChatMessagePreviewComponent implements AfterViewInit, OnDestr
9409
9431
  elementRef: ElementRef<HTMLDivElement>;
9410
9432
  /** Internal width state for bubble view mode */
9411
9433
  width: number;
9434
+ /** Cached logged-in user for "You" detection in senderName */
9435
+ private loggedInUser;
9412
9436
  private resizeObserver;
9413
9437
  /**
9414
9438
  * Returns true if the message has been deleted
@@ -9475,11 +9499,9 @@ declare class CometChatMessagePreviewComponent implements AfterViewInit, OnDestr
9475
9499
  * Returns the CSS class for the container based on view mode
9476
9500
  */
9477
9501
  get containerClass(): string;
9502
+ ngOnInit(): void;
9478
9503
  ngAfterViewInit(): void;
9479
9504
  ngOnDestroy(): void;
9480
- /**
9481
- * Sets up ResizeObserver for bubble view mode width calculation
9482
- */
9483
9505
  private setupResizeObserver;
9484
9506
  /**
9485
9507
  * Cleans up the ResizeObserver
@@ -9589,6 +9611,7 @@ declare class CometChatTextBubbleComponent implements OnInit, OnChanges, AfterVi
9589
9611
  */
9590
9612
  declare class CometChatImageBubbleComponent implements OnInit, OnChanges {
9591
9613
  private cdr;
9614
+ private ngZone;
9592
9615
  /** The media message object. @see Requirements 1.1, 1.3, 1.5 */
9593
9616
  message: CometChat.MediaMessage;
9594
9617
  /** LEFT for incoming, RIGHT for outgoing. @see Requirements 1.5, 13.1, 13.2 */
@@ -9610,8 +9633,12 @@ declare class CometChatImageBubbleComponent implements OnInit, OnChanges {
9610
9633
  protected galleryStartIndex: number;
9611
9634
  protected senderName: string;
9612
9635
  protected senderAvatarUrl: string;
9636
+ /** Tracks which attachment indices have finished loading their real image */
9637
+ protected loadedIndices: Set<number>;
9638
+ /** Path to the placeholder image shown while the real image loads */
9639
+ readonly placeholderSrc = "assets/image_placeholder.png";
9613
9640
  readonly MessageBubbleAlignment: typeof MessageBubbleAlignment;
9614
- constructor(cdr: ChangeDetectorRef);
9641
+ constructor(cdr: ChangeDetectorRef, ngZone: NgZone);
9615
9642
  ngOnInit(): void;
9616
9643
  ngOnChanges(changes: SimpleChanges): void;
9617
9644
  /** Process the message to extract attachments, caption, and determine layout. */
@@ -9629,6 +9656,20 @@ declare class CometChatImageBubbleComponent implements OnInit, OnChanges {
9629
9656
  protected get imageAriaLabel(): string;
9630
9657
  protected get overflowAriaLabel(): string;
9631
9658
  protected trackByAttachment(index: number, attachment: MediaAttachment): string;
9659
+ /**
9660
+ * Returns the src to display for an image at the given index.
9661
+ * Shows the placeholder until the real image has loaded.
9662
+ */
9663
+ protected getImageSrc(index: number): string;
9664
+ /**
9665
+ * Called when the real image finishes loading.
9666
+ * Runs inside NgZone so OnPush change detection picks it up immediately.
9667
+ */
9668
+ protected onImageLoad(index: number, event: Event): void;
9669
+ /**
9670
+ * Called when the real image fails to load — keep showing placeholder.
9671
+ */
9672
+ protected onImageError(index: number): void;
9632
9673
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CometChatImageBubbleComponent, never>;
9633
9674
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CometChatImageBubbleComponent, "cometchat-image-bubble", never, { "message": { "alias": "message"; "required": true; }; "alignment": { "alias": "alignment"; "required": false; }; "disableInteraction": { "alias": "disableInteraction"; "required": false; }; }, { "imageClick": "imageClick"; "viewerOpen": "viewerOpen"; "viewerClose": "viewerClose"; }, never, never, true, never>;
9634
9675
  }
@@ -10124,7 +10165,8 @@ declare class CometChatGroupsComponent implements OnInit, OnDestroy {
10124
10165
  searchText: string;
10125
10166
  selectedGroups: Set<string>;
10126
10167
  focusedIndex: number;
10127
- lastSelectedIndex: _angular_core.WritableSignal<number>;
10168
+ lastSelectedIndex: number;
10169
+ private initialLoadComplete;
10128
10170
  isFetchingMore: _angular_core.WritableSignal<boolean>;
10129
10171
  hasMore: _angular_core.WritableSignal<boolean>;
10130
10172
  readonly SelectionMode: typeof SelectionMode;
@@ -11591,6 +11633,7 @@ declare class CometChatMessageBubbleComponent implements OnInit, OnChanges, OnDe
11591
11633
  message: CometChat.BaseMessage;
11592
11634
  }): void;
11593
11635
  private detectMobileDevice;
11636
+ private setupMobileResizeListener;
11594
11637
  private clearHoverTimeout;
11595
11638
  private setupContentViewResizeObserver;
11596
11639
  get accessibleLabel(): string;
@@ -14800,7 +14843,7 @@ declare class CometChatSearchMessagesListComponent implements OnInit, OnChanges,
14800
14843
  getTrailingViewType(message: CometChat.BaseMessage): 'image' | 'video' | 'date';
14801
14844
  /** Get attachment URL for image/video thumbnails */
14802
14845
  getAttachmentUrl(message: CometChat.BaseMessage): string;
14803
- /** Format date for trailing view (DD MMM, hh:mm) */
14846
+ /** Format date for trailing view using Angular DatePipe for locale-aware formatting */
14804
14847
  getFormattedDate(message: CometChat.BaseMessage): string;
14805
14848
  /** Check if metadata has link preview */
14806
14849
  private hasLinkPreview;