stream-chat-angular 4.9.1 → 4.10.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.
@@ -1,6 +1,6 @@
1
1
  import { TemplateRef } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
- import { AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelPreviewContext, CommandAutocompleteListItemContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ThreadHeaderContext, TypingIndicatorContext } from './types';
3
+ import { AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelPreviewContext, CommandAutocompleteListItemContext, DeliveredStatusContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ReadStatusContext, SendingStatusContext, ThreadHeaderContext, TypingIndicatorContext } from './types';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * A central location for registering your custom templates to override parts of the chat application.
@@ -126,6 +126,18 @@ export declare class CustomTemplatesService {
126
126
  * 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).
127
127
  */
128
128
  threadHeaderTemplate$: BehaviorSubject<TemplateRef<ThreadHeaderContext> | undefined>;
129
+ /**
130
+ * The template used for displaying the delivered state of the message inside the [message component](../components/MessageComponent.mdx)
131
+ */
132
+ deliveredStatusTemplate$: BehaviorSubject<TemplateRef<DeliveredStatusContext> | undefined>;
133
+ /**
134
+ * The template used for displaying the sending state of the message inside the [message component](../components/MessageComponent.mdx)
135
+ */
136
+ sendingStatusTemplate$: BehaviorSubject<TemplateRef<SendingStatusContext> | undefined>;
137
+ /**
138
+ * The template used for displaying the sent state of the message inside the [message component](../components/MessageComponent.mdx)
139
+ */
140
+ readStatusTemplate$: BehaviorSubject<TemplateRef<ReadStatusContext> | undefined>;
129
141
  constructor();
130
142
  static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService, never>;
131
143
  static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService>;
@@ -2,7 +2,7 @@ import { TemplateRef, OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetecto
2
2
  import { UserResponse } from 'stream-chat';
3
3
  import { ChannelService } from '../channel.service';
4
4
  import { ChatClientService } from '../chat-client.service';
5
- import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage } from '../types';
5
+ import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage, DeliveredStatusContext, SendingStatusContext, ReadStatusContext } from '../types';
6
6
  import { CustomTemplatesService } from '../custom-templates.service';
7
7
  import { ThemeService } from '../theme.service';
8
8
  import { NgxPopperjsTriggers, NgxPopperjsPlacements } from 'ngx-popperjs';
@@ -49,6 +49,9 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
49
49
  visibleMessageActionsCount: number;
50
50
  messageTextParts: MessagePart[];
51
51
  mentionTemplate: TemplateRef<MentionTemplateContext> | undefined;
52
+ customDeliveredStatusTemplate: TemplateRef<DeliveredStatusContext> | undefined;
53
+ customSendingStatusTemplate: TemplateRef<SendingStatusContext> | undefined;
54
+ customReadStatusTemplate: TemplateRef<ReadStatusContext> | undefined;
52
55
  attachmentListTemplate: TemplateRef<AttachmentListContext> | undefined;
53
56
  messageActionsBoxTemplate: TemplateRef<MessageActionsBoxContext> | undefined;
54
57
  messageReactionsTemplate: TemplateRef<MessageReactionsContext> | undefined;
@@ -87,6 +90,9 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
87
90
  setAsActiveParentMessage(): void;
88
91
  getMentionContext(messagePart: MessagePart): MentionTemplateContext;
89
92
  getMessageActionsBoxContext(): MessageActionsBoxContext;
93
+ getDeliveredStatusContext(): DeliveredStatusContext;
94
+ getSendingStatusContext(): SendingStatusContext;
95
+ getReadStatusContext(): ReadStatusContext;
90
96
  jumpToMessage(messageId: string, parentMessageId?: string): void;
91
97
  displayTranslatedMessage(): void;
92
98
  displayOriginalMessage(): void;
package/lib/types.d.ts CHANGED
@@ -195,3 +195,13 @@ export declare type ImageAttachmentConfiguration = AttachmentConfigration & {
195
195
  export declare type VideoAttachmentConfiguration = ImageAttachmentConfiguration & {
196
196
  thumbUrl?: string;
197
197
  };
198
+ export declare type DeliveredStatusContext = {
199
+ message: StreamMessage;
200
+ };
201
+ export declare type SendingStatusContext = {
202
+ message: StreamMessage;
203
+ };
204
+ export declare type ReadStatusContext = {
205
+ message: StreamMessage;
206
+ readByText: string;
207
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "4.9.1",
3
+ "version": "4.10.1",
4
4
  "description": "Angular components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -1 +1 @@
1
- export const version = '4.9.1';
1
+ export const version = '4.10.1';