stream-chat-angular 4.63.0 → 4.64.0

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.
@@ -20,7 +20,7 @@ import transliterate from '@stream-io/transliterate';
20
20
  import * as i8$1 from 'angular-mentions';
21
21
  import { MentionModule } from 'angular-mentions';
22
22
 
23
- const version = '4.63.0';
23
+ const version = '4.64.0';
24
24
 
25
25
  /**
26
26
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
@@ -2676,6 +2676,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
2676
2676
  * A central location for registering your custom templates to override parts of the chat application.
2677
2677
  *
2678
2678
  * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2679
+ *
2680
+ * You can find the type definitions of the context that is provided for each template [on GitHub](https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angu)
2679
2681
  */
2680
2682
  class CustomTemplatesService {
2681
2683
  constructor() {
@@ -2685,116 +2687,96 @@ class CustomTemplatesService {
2685
2687
  this.mentionAutocompleteItemTemplate$ = new BehaviorSubject(undefined);
2686
2688
  /**
2687
2689
  * The autocomplete list item template for commands (used in the [`AutocompleteTextareaComponent`](../components/AutocompleteTextareaComponent.mdx))
2688
- *
2689
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2690
2690
  */
2691
2691
  this.commandAutocompleteItemTemplate$ = new BehaviorSubject(undefined);
2692
2692
  /**
2693
2693
  * Template used to display an item in the [channel list](../components/ChannelListComponent.mdx) (instead of the default [channal list item](../components/ChannelPreviewComponent.mdx))
2694
2694
  *
2695
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2696
2695
  */
2697
2696
  this.channelPreviewTemplate$ = new BehaviorSubject(undefined);
2698
2697
  /**
2699
2698
  * The message input template used when editing a message (instead of the [default message input](../components/MessageInputComponent.mdx))
2700
2699
  *
2701
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2702
2700
  */
2703
2701
  this.messageInputTemplate$ = new BehaviorSubject(undefined);
2704
2702
  /**
2705
2703
  * The template used for displaying a [mention inside a message](../code-examples/mention-actions.mdx)
2706
2704
  *
2707
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2708
2705
  */
2709
2706
  this.mentionTemplate$ = new BehaviorSubject(undefined);
2710
2707
  /**
2711
2708
  * The template for [emoji picker](../code-examples/emoji-picker.mdx)
2712
2709
  *
2713
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2714
2710
  */
2715
2711
  this.emojiPickerTemplate$ = new BehaviorSubject(undefined);
2716
2712
  /**
2717
2713
  * The typing indicator template used in the [message list](../components/MessageListComponent.mdx)
2718
2714
  *
2719
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2720
2715
  */
2721
2716
  this.typingIndicatorTemplate$ = new BehaviorSubject(undefined);
2722
2717
  /**
2723
2718
  * The template used to display a message in the [message list](../components/MessageListComponent.mdx) (instead of the [default message component](../components/MessageComponent.mdx))
2724
2719
  *
2725
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2726
2720
  */
2727
2721
  this.messageTemplate$ = new BehaviorSubject(undefined);
2728
2722
  /**
2729
2723
  * The template for channel actions displayed in the [channel header](../components/ChannelHeaderComponent.mdx) (by default no channel action is displayed)
2730
2724
  *
2731
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2732
2725
  */
2733
2726
  this.channelActionsTemplate$ = new BehaviorSubject(undefined);
2734
2727
  /**
2735
2728
  * The template used to display attachments of a [message](../components/MessageComponent.mdx) (instead of the [default attachment list](../components/AttachmentListComponent.mdx))
2736
2729
  *
2737
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2738
2730
  */
2739
2731
  this.attachmentListTemplate$ = new BehaviorSubject(undefined);
2740
2732
  /**
2741
2733
  * The template used to display attachments in the [message input](../components/MessageInputComponent.mdx) component (instead of the [default attachment preview](../components/AttachmentPreviewListComponent.mdx))
2742
2734
  *
2743
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2744
2735
  */
2745
2736
  this.attachmentPreviewListTemplate$ = new BehaviorSubject(undefined);
2746
2737
  /**
2747
2738
  * The template used to display avatars for channels and users (instead of the [default avatar](../components/AvatarComponent.mdx))
2748
2739
  *
2749
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2750
2740
  */
2751
2741
  this.avatarTemplate$ = new BehaviorSubject(undefined);
2752
2742
  /**
2753
2743
  * Template for displaying icons (instead of the [default icon component](../components/IconComponent.mdx))
2754
2744
  *
2755
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2756
2745
  */
2757
2746
  this.iconTemplate$ = new BehaviorSubject(undefined);
2758
2747
  /**
2759
2748
  * Template for displaying the loading indicator (instead of the [default loading indicator](../components/LoadingIndicatorComponent.mdx))
2760
2749
  *
2761
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2762
2750
  */
2763
2751
  this.loadingIndicatorTemplate$ = new BehaviorSubject(undefined);
2764
2752
  /**
2765
2753
  * Template for displaying the message actions box (instead of the [default message actions box](../components/MessageActionsBoxComponent.mdx))
2766
2754
  *
2767
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2768
2755
  */
2769
2756
  this.messageActionsBoxTemplate$ = new BehaviorSubject(undefined);
2770
2757
  /**
2771
2758
  * The template used for displaying an item in the [message actions box](../components/MessageActionsBoxComponent.mdx)
2772
2759
  *
2773
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2774
2760
  */
2775
2761
  this.messageActionsBoxItemTemplate$ = new BehaviorSubject(undefined);
2776
2762
  /**
2777
2763
  * The template used to display the reactions of a [message](../components/MessageComponent.mdx), and the selector to add a reaction to a message (instead of the [default message reactions component](../components/MessageReactionsComponent.mdx))
2778
2764
  *
2779
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2780
2765
  */
2781
2766
  this.messageReactionsTemplate$ = new BehaviorSubject(undefined);
2782
2767
  /**
2783
2768
  * The template used to display a modal window (instead of the [default modal](../components/ModalComponent.mdx))
2784
2769
  *
2785
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2786
2770
  */
2787
2771
  this.modalTemplate$ = new BehaviorSubject(undefined);
2788
2772
  /**
2789
2773
  * The template used to override the [default notification component](../components/NotificationComponent.mdx)
2790
2774
  *
2791
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2792
2775
  */
2793
2776
  this.notificationTemplate$ = new BehaviorSubject(undefined);
2794
2777
  /**
2795
2778
  * The template used for header of a [thread](../components/ThreadComponent.mdx)
2796
2779
  *
2797
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2798
2780
  */
2799
2781
  this.threadHeaderTemplate$ = new BehaviorSubject(undefined);
2800
2782
  /**
@@ -2802,7 +2784,6 @@ class CustomTemplatesService {
2802
2784
  *
2803
2785
  * Displayed for the last message sent by the current user, if the message isn't yet read by anyone
2804
2786
  *
2805
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2806
2787
  */
2807
2788
  this.deliveredStatusTemplate$ = new BehaviorSubject(undefined);
2808
2789
  /**
@@ -2810,7 +2791,6 @@ class CustomTemplatesService {
2810
2791
  *
2811
2792
  * Displayed for the last message sent by the current user, if the message is currently being sent
2812
2793
  *
2813
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2814
2794
  */
2815
2795
  this.sendingStatusTemplate$ = new BehaviorSubject(undefined);
2816
2796
  /**
@@ -2818,25 +2798,21 @@ class CustomTemplatesService {
2818
2798
  *
2819
2799
  * Displayed for the last message sent by the current user, if the message is read at least by one user
2820
2800
  *
2821
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2822
2801
  */
2823
2802
  this.readStatusTemplate$ = new BehaviorSubject(undefined);
2824
2803
  /**
2825
2804
  * Template to display custom metadata inside [message component](../components/MessageComponent.mdx)
2826
2805
  *
2827
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2828
2806
  */
2829
2807
  this.customMessageMetadataTemplate$ = new BehaviorSubject(undefined);
2830
2808
  /**
2831
2809
  * The template used to display additional information about a channel under the channel name inside the [channel header component](../components/ChannelHeaderComponent.mdx)
2832
2810
  *
2833
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2834
2811
  */
2835
2812
  this.channelHeaderInfoTemplate$ = new BehaviorSubject(undefined);
2836
2813
  /**
2837
2814
  * The template used for displaying file upload/attachment selector inside the [message input](../components/MessageInputComponent.mdx)
2838
2815
  *
2839
- * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
2840
2816
  */
2841
2817
  this.customAttachmentUploadTemplate$ = new BehaviorSubject(undefined);
2842
2818
  /**
@@ -2903,6 +2879,11 @@ class CustomTemplatesService {
2903
2879
  * The template used to display the [message bounce prompt](../components/MessageBouncePromptComponent.mdx)
2904
2880
  */
2905
2881
  this.messageBouncePromptTemplate$ = new BehaviorSubject(undefined);
2882
+ /**
2883
+ * Template used to display the channel information inside the [channel list item](../components/ChannelPreviewComponent.mdx)
2884
+ *
2885
+ */
2886
+ this.channelPreviewInfoTemplate$ = new BehaviorSubject(undefined);
2906
2887
  }
2907
2888
  }
2908
2889
  CustomTemplatesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: CustomTemplatesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -4956,14 +4937,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
4956
4937
  * The `ChannelPreview` component displays a channel preview in the channel list, it consists of the image, name and latest message of the channel.
4957
4938
  */
4958
4939
  class ChannelPreviewComponent {
4959
- constructor(channelService, ngZone, chatClientService, messageService) {
4940
+ constructor(channelService, ngZone, chatClientService, messageService, customTemplatesService) {
4960
4941
  this.channelService = channelService;
4961
4942
  this.ngZone = ngZone;
4962
4943
  this.chatClientService = chatClientService;
4944
+ this.customTemplatesService = customTemplatesService;
4963
4945
  this.isActive = false;
4964
4946
  this.isUnreadMessageWasCalled = false;
4965
4947
  this.isUnread = false;
4966
- this.latestMessage = 'streamChat.Nothing yet...';
4948
+ this.latestMessageText = 'streamChat.Nothing yet...';
4967
4949
  this.subscriptions = [];
4968
4950
  this.canSendReadEvents = true;
4969
4951
  this.displayAs = messageService.displayAs;
@@ -5023,7 +5005,8 @@ class ChannelPreviewComponent {
5023
5005
  this.ngZone.run(() => {
5024
5006
  var _a, _b, _c;
5025
5007
  if (((_a = this.channel) === null || _a === void 0 ? void 0 : _a.state.latestMessages.length) === 0) {
5026
- this.latestMessage = 'streamChat.Nothing yet...';
5008
+ this.latestMessage = undefined;
5009
+ this.latestMessageText = 'streamChat.Nothing yet...';
5027
5010
  return;
5028
5011
  }
5029
5012
  if (!event.message ||
@@ -5035,15 +5018,16 @@ class ChannelPreviewComponent {
5035
5018
  });
5036
5019
  }
5037
5020
  setLatestMessage(message) {
5021
+ this.latestMessage = message;
5038
5022
  if (message === null || message === void 0 ? void 0 : message.deleted_at) {
5039
- this.latestMessage = 'streamChat.Message deleted';
5023
+ this.latestMessageText = 'streamChat.Message deleted';
5040
5024
  }
5041
5025
  else if (message === null || message === void 0 ? void 0 : message.text) {
5042
- this.latestMessage =
5026
+ this.latestMessageText =
5043
5027
  getMessageTranslation(message, this.channel, this.chatClientService.chatClient.user) || message.text;
5044
5028
  }
5045
5029
  else if ((message === null || message === void 0 ? void 0 : message.attachments) && message.attachments.length) {
5046
- this.latestMessage = 'streamChat.🏙 Attachment...';
5030
+ this.latestMessageText = 'streamChat.🏙 Attachment...';
5047
5031
  }
5048
5032
  }
5049
5033
  updateUnreadState() {
@@ -5057,8 +5041,8 @@ class ChannelPreviewComponent {
5057
5041
  this.isUnread = !!this.unreadCount;
5058
5042
  }
5059
5043
  }
5060
- ChannelPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: ChannelPreviewComponent, deps: [{ token: ChannelService }, { token: i0.NgZone }, { token: ChatClientService }, { token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
5061
- ChannelPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelPreviewComponent, selector: "stream-channel-preview", inputs: { channel: "channel" }, ngImport: i0, template: "<button\n class=\"str-chat__channel-preview-messenger str-chat__channel-preview\"\n [class.str-chat__channel-preview-messenger--active]=\"isActive\"\n [class.str-chat__channel-preview--active]=\"isActive\"\n [class.str-chat__channel-preview-messenger--unread]=\"isUnread\"\n (click)=\"setAsActiveChannel()\"\n data-testid=\"channel-preview-container\"\n>\n <div class=\"str-chat__channel-preview-messenger--left\">\n <stream-avatar-placeholder\n name=\"{{ avatarName }}\"\n imageUrl=\"{{ avatarImage }}\"\n type=\"channel\"\n [channel]=\"channel\"\n location=\"channel-preview\"\n [size]=\"49\"\n ></stream-avatar-placeholder>\n </div>\n <div\n class=\"\n str-chat__channel-preview-messenger--right str-chat__channel-preview-end\n \"\n >\n <div class=\"str-chat__channel-preview-end-first-row\">\n <div class=\"str-chat__channel-preview-messenger--name\">\n <span data-testid=\"channel-preview-title\">{{ title }}</span>\n </div>\n <div\n data-testid=\"unread-badge\"\n *ngIf=\"unreadCount\"\n class=\"str-chat__channel-preview-unread-badge\"\n >\n {{ unreadCount }}\n </div>\n </div>\n <div\n data-testid=\"latest-message\"\n class=\"str-chat__channel-preview-messenger--last-message\"\n >\n <ng-container *ngIf=\"displayAs === 'text'; else asHTML\">\n {{ latestMessage | translate }}\n </ng-container>\n <ng-template #asHTML>\n <span\n data-testid=\"html-content\"\n [innerHTML]=\"latestMessage | translate\"\n ></span>\n </ng-template>\n </div>\n </div>\n</button>\n", components: [{ type: AvatarPlaceholderComponent, selector: "stream-avatar-placeholder", inputs: ["name", "imageUrl", "size", "location", "channel", "user", "type", "initialsType", "showOnlineIndicator"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i6.TranslatePipe } });
5044
+ ChannelPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: ChannelPreviewComponent, deps: [{ token: ChannelService }, { token: i0.NgZone }, { token: ChatClientService }, { token: MessageService }, { token: CustomTemplatesService }], target: i0.ɵɵFactoryTarget.Component });
5045
+ ChannelPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelPreviewComponent, selector: "stream-channel-preview", inputs: { channel: "channel" }, ngImport: i0, template: "<button\n class=\"str-chat__channel-preview-messenger str-chat__channel-preview\"\n [class.str-chat__channel-preview-messenger--active]=\"isActive\"\n [class.str-chat__channel-preview--active]=\"isActive\"\n [class.str-chat__channel-preview-messenger--unread]=\"isUnread\"\n (click)=\"setAsActiveChannel()\"\n data-testid=\"channel-preview-container\"\n>\n <div class=\"str-chat__channel-preview-messenger--left\">\n <stream-avatar-placeholder\n name=\"{{ avatarName }}\"\n imageUrl=\"{{ avatarImage }}\"\n type=\"channel\"\n [channel]=\"channel\"\n location=\"channel-preview\"\n [size]=\"49\"\n ></stream-avatar-placeholder>\n </div>\n <div\n class=\"\n str-chat__channel-preview-messenger--right str-chat__channel-preview-end\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.channelPreviewInfoTemplate$ | async) ||\n defaultChannelInfo;\n context: {\n channelDisplayTitle: title,\n channel: channel,\n unreadCount: unreadCount,\n latestMessageText: latestMessageText,\n latestMessage: latestMessage\n }\n \"\n ></ng-container>\n <ng-template\n #defaultChannelInfo\n let-channelDisplayTitle=\"channelDisplayTitle\"\n let-unreadCount=\"unreadCount\"\n let-latestMessageText=\"latestMessageText\"\n >\n <div class=\"str-chat__channel-preview-end-first-row\">\n <div class=\"str-chat__channel-preview-messenger--name\">\n <span data-testid=\"channel-preview-title\">{{\n channelDisplayTitle\n }}</span>\n </div>\n <div\n data-testid=\"unread-badge\"\n *ngIf=\"unreadCount\"\n class=\"str-chat__channel-preview-unread-badge\"\n >\n {{ unreadCount }}\n </div>\n </div>\n <div\n data-testid=\"latest-message\"\n class=\"str-chat__channel-preview-messenger--last-message\"\n >\n <ng-container *ngIf=\"displayAs === 'text'; else asHTML\">\n {{ latestMessageText | translate }}\n </ng-container>\n <ng-template #asHTML>\n <span\n data-testid=\"html-content\"\n [innerHTML]=\"latestMessageText | translate\"\n ></span>\n </ng-template>\n </div>\n </ng-template>\n </div>\n</button>\n", components: [{ type: AvatarPlaceholderComponent, selector: "stream-avatar-placeholder", inputs: ["name", "imageUrl", "size", "location", "channel", "user", "type", "initialsType", "showOnlineIndicator"] }], directives: [{ type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i8.AsyncPipe, "translate": i6.TranslatePipe } });
5062
5046
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: ChannelPreviewComponent, decorators: [{
5063
5047
  type: Component,
5064
5048
  args: [{
@@ -5066,7 +5050,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
5066
5050
  templateUrl: './channel-preview.component.html',
5067
5051
  styles: [],
5068
5052
  }]
5069
- }], ctorParameters: function () { return [{ type: ChannelService }, { type: i0.NgZone }, { type: ChatClientService }, { type: MessageService }]; }, propDecorators: { channel: [{
5053
+ }], ctorParameters: function () { return [{ type: ChannelService }, { type: i0.NgZone }, { type: ChatClientService }, { type: MessageService }, { type: CustomTemplatesService }]; }, propDecorators: { channel: [{
5070
5054
  type: Input
5071
5055
  }] } });
5072
5056