stream-chat-angular 4.32.2 → 4.33.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.
@@ -188,6 +188,10 @@ export declare class CustomTemplatesService {
188
188
  * The template used to display the date separator inside the [message list](../components/MessageListComponent.mdx)
189
189
  */
190
190
  dateSeparatorTemplate$: BehaviorSubject<TemplateRef<DateSeparatorContext> | undefined>;
191
+ /**
192
+ * The template used to display the new messages indicator inside the [message list](../components/MessageListComponent.mdx)
193
+ */
194
+ newMessagesIndicatorTemplate$: BehaviorSubject<TemplateRef<void> | undefined>;
191
195
  constructor();
192
196
  static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService, never>;
193
197
  static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService>;
@@ -43,10 +43,16 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
43
43
  displayDateSeparator: boolean;
44
44
  /**
45
45
  * If date separators are displayed, you can set the horizontal position of the date text.
46
+ * If `openMessageListAt` is `last-unread-message` it will also set the text position of the new messages indicator.
46
47
  */
47
48
  dateSeparatorTextPos: 'center' | 'right' | 'left';
49
+ /**
50
+ * `last-message` option will open the message list at the last message, `last-unread-message` will open the list at the last unread message. This option only works if mode is `main`.
51
+ */
52
+ openMessageListAt: 'last-message' | 'last-unread-message';
48
53
  messageTemplate: TemplateRef<MessageContext> | undefined;
49
54
  customDateSeparatorTemplate: TemplateRef<DateSeparatorContext> | undefined;
55
+ customnewMessagesIndicatorTemplate: TemplateRef<void> | undefined;
50
56
  messages$: Observable<StreamMessage[]>;
51
57
  enabledMessageActions: string[];
52
58
  private class;
@@ -59,6 +65,8 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
59
65
  isLoading: boolean;
60
66
  isScrollInProgress: boolean;
61
67
  scrollEndTimeout: any;
68
+ lastReadMessageId?: string;
69
+ isJumpingToLatestUnreadMessage: boolean;
62
70
  private scrollContainer;
63
71
  private parentMessageElement;
64
72
  private latestMessage;
@@ -88,7 +96,8 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
88
96
  scrolled(): void;
89
97
  getTypingIndicatorContext(): TypingIndicatorContext;
90
98
  getTypingIndicatorText(users: UserResponse[]): string;
91
- areOnSeparateDates(message: StreamMessage, nextMessage?: StreamMessage): boolean;
99
+ areOnSeparateDates(message?: StreamMessage, nextMessage?: StreamMessage): boolean;
100
+ isSentByCurrentUser(message?: StreamMessage): boolean;
92
101
  parseDate(date: Date): string;
93
102
  get replyCountParam(): {
94
103
  replyCount: number | undefined;
@@ -103,5 +112,5 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
103
112
  private scrollToLatestMessage;
104
113
  private newMessageReceived;
105
114
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageListComponent, never>;
106
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "stream-message-list", never, { "mode": "mode"; "direction": "direction"; "messageOptionsTrigger": "messageOptionsTrigger"; "hideJumpToLatestButtonDuringScroll": "hideJumpToLatestButtonDuringScroll"; "customMessageActions": "customMessageActions"; "displayDateSeparator": "displayDateSeparator"; "dateSeparatorTextPos": "dateSeparatorTextPos"; }, {}, never, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "stream-message-list", never, { "mode": "mode"; "direction": "direction"; "messageOptionsTrigger": "messageOptionsTrigger"; "hideJumpToLatestButtonDuringScroll": "hideJumpToLatestButtonDuringScroll"; "customMessageActions": "customMessageActions"; "displayDateSeparator": "displayDateSeparator"; "dateSeparatorTextPos": "dateSeparatorTextPos"; "openMessageListAt": "openMessageListAt"; }, {}, never, never>;
107
116
  }
package/lib/types.d.ts CHANGED
@@ -239,6 +239,7 @@ export declare type SystemMessageContext = MessageContext & {
239
239
  export declare type DateSeparatorContext = {
240
240
  date: Date;
241
241
  parsedDate: string;
242
+ isNewMessage: boolean;
242
243
  };
243
244
  export declare type ChannelQueryState = {
244
245
  state: 'in-progress' | 'success' | 'error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "4.32.2",
3
+ "version": "4.33.0",
4
4
  "description": "Angular components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -12,7 +12,7 @@
12
12
  "@angular/common": "^12.2.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
13
13
  "@angular/core": "^12.2.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
14
14
  "@ngx-translate/core": "^13.0.0 || ^14.0.0",
15
- "stream-chat": "^8.0.0"
15
+ "stream-chat": "^8.11.0"
16
16
  },
17
17
  "dependencies": {
18
18
  "angular-mentions": "^1.4.0",
@@ -1 +1 @@
1
- export const version = '4.32.2';
1
+ export const version = '4.33.0';