stream-chat-angular 4.38.0 → 4.39.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.
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +136 -170
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment-list/attachment-list.component.js +2 -14
- package/esm2015/lib/avatar-placeholder/avatar-placeholder.component.js +22 -12
- package/esm2015/lib/channel-header/channel-header.component.js +1 -1
- package/esm2015/lib/channel-preview/channel-preview.component.js +1 -1
- package/esm2015/lib/channel.service.js +9 -4
- package/esm2015/lib/chat-client.service.js +2 -2
- package/esm2015/lib/message/message.component.js +94 -78
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +2 -9
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +1 -1
- package/esm2015/lib/message-input/message-input.component.js +1 -1
- package/esm2015/lib/message-list/message-list.component.js +9 -1
- package/esm2015/lib/message-reactions/message-reactions.component.js +1 -1
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +136 -117
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-list/attachment-list.component.d.ts +2 -11
- package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +8 -2
- package/lib/message/message.component.d.ts +27 -24
- package/lib/message-actions-box/message-actions-box.component.d.ts +4 -6
- package/lib/message-list/message-list.component.d.ts +2 -1
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges,
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Action, Attachment } from 'stream-chat';
|
|
3
3
|
import { ModalContext, DefaultStreamChatGenerics, AttachmentConfigration, VideoAttachmentConfiguration, ImageAttachmentConfiguration, AttachmentContext } from '../types';
|
|
4
4
|
import { ChannelService } from '../channel.service';
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
/**
|
|
10
10
|
* The `AttachmentList` component displays the attachments of a message
|
|
11
11
|
*/
|
|
12
|
-
export declare class AttachmentListComponent implements OnChanges
|
|
12
|
+
export declare class AttachmentListComponent implements OnChanges {
|
|
13
13
|
readonly customTemplatesService: CustomTemplatesService;
|
|
14
14
|
private channelService;
|
|
15
15
|
private attachmentConfigurationService;
|
|
@@ -34,19 +34,10 @@ export declare class AttachmentListComponent implements OnChanges, OnInit, OnDes
|
|
|
34
34
|
imagesToView: Attachment<DefaultStreamChatGenerics>[];
|
|
35
35
|
imagesToViewCurrentIndex: number;
|
|
36
36
|
themeVersion: '1' | '2';
|
|
37
|
-
imageAttachmentTemplate?: TemplateRef<AttachmentContext>;
|
|
38
|
-
videoAttachmentTemplate?: TemplateRef<AttachmentContext>;
|
|
39
|
-
galleryAttachmentTemplate?: TemplateRef<AttachmentContext>;
|
|
40
|
-
fileAttachmentTemplate?: TemplateRef<AttachmentContext>;
|
|
41
|
-
cardAttachmentTemplate?: TemplateRef<AttachmentContext>;
|
|
42
|
-
attachmentActionsTemplate?: TemplateRef<AttachmentContext>;
|
|
43
37
|
private modalContent;
|
|
44
38
|
private attachmentConfigurations;
|
|
45
|
-
private subscriptions;
|
|
46
39
|
constructor(customTemplatesService: CustomTemplatesService, channelService: ChannelService, attachmentConfigurationService: AttachmentConfigurationService, themeService: ThemeService);
|
|
47
|
-
ngOnInit(): void;
|
|
48
40
|
ngOnChanges(changes: SimpleChanges): void;
|
|
49
|
-
ngOnDestroy(): void;
|
|
50
41
|
trackByUrl(_: number, attachment: Attachment): unknown;
|
|
51
42
|
isImage(attachment: Attachment): boolean;
|
|
52
43
|
isSvg(attachment: Attachment): boolean;
|
|
@@ -2,6 +2,7 @@ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy } fr
|
|
|
2
2
|
import { Channel, User } from 'stream-chat';
|
|
3
3
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
4
4
|
import { AvatarContext, AvatarLocation, AvatarType, DefaultStreamChatGenerics } from '../types';
|
|
5
|
+
import { ThemeService } from '../theme.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* The `AvatarPlaceholder` component displays the [default avatar](./AvatarComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This component is used by the SDK internally, you likely won't need to use it.
|
|
@@ -10,6 +11,7 @@ export declare class AvatarPlaceholderComponent implements OnChanges, AfterViewI
|
|
|
10
11
|
customTemplatesService: CustomTemplatesService;
|
|
11
12
|
private hostElement;
|
|
12
13
|
private cdRef;
|
|
14
|
+
private themeService;
|
|
13
15
|
/**
|
|
14
16
|
* An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
|
|
15
17
|
*/
|
|
@@ -42,14 +44,18 @@ export declare class AvatarPlaceholderComponent implements OnChanges, AfterViewI
|
|
|
42
44
|
* If channel/user image isn't provided the initials of the name of the channel/user is shown instead, you can choose how the initals should be computed
|
|
43
45
|
*/
|
|
44
46
|
initialsType: 'first-letter-of-first-word' | 'first-letter-of-each-word';
|
|
47
|
+
/**
|
|
48
|
+
* If a channel avatar is displayed, and if the channel has exactly two members a green dot is displayed if the other member is online. Set this flag to `false` to turn off this behavior.
|
|
49
|
+
*/
|
|
50
|
+
showOnlineIndicator: boolean;
|
|
45
51
|
context: AvatarContext;
|
|
46
52
|
isVisible: boolean;
|
|
47
53
|
private mutationObserver?;
|
|
48
|
-
constructor(customTemplatesService: CustomTemplatesService, hostElement: ElementRef<HTMLElement>, cdRef: ChangeDetectorRef);
|
|
54
|
+
constructor(customTemplatesService: CustomTemplatesService, hostElement: ElementRef<HTMLElement>, cdRef: ChangeDetectorRef, themeService: ThemeService);
|
|
49
55
|
ngAfterViewInit(): void;
|
|
50
56
|
ngOnChanges(): void;
|
|
51
57
|
ngOnDestroy(): void;
|
|
52
58
|
private checkIfVisible;
|
|
53
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarPlaceholderComponent, never>;
|
|
54
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; "initialsType": "initialsType"; }, {}, never, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; "initialsType": "initialsType"; "showOnlineIndicator": "showOnlineIndicator"; }, {}, never, never>;
|
|
55
61
|
}
|
|
@@ -3,6 +3,7 @@ import { UserResponse } from 'stream-chat';
|
|
|
3
3
|
import { ChannelService } from '../channel.service';
|
|
4
4
|
import { ChatClientService } from '../chat-client.service';
|
|
5
5
|
import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage, DeliveredStatusContext, SendingStatusContext, ReadStatusContext, CustomMessageActionItem, SystemMessageContext } from '../types';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
6
7
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
7
8
|
import { ThemeService } from '../theme.service';
|
|
8
9
|
import { NgxPopperjsTriggers, NgxPopperjsPlacements } from 'ngx-popperjs';
|
|
@@ -54,43 +55,43 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
54
55
|
isReactionSelectorOpen: boolean;
|
|
55
56
|
visibleMessageActionsCount: number;
|
|
56
57
|
messageTextParts: MessagePart[];
|
|
57
|
-
mentionTemplate
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
attachmentListTemplate
|
|
62
|
-
messageActionsBoxTemplate
|
|
63
|
-
messageReactionsTemplate
|
|
64
|
-
systemMessageTemplate
|
|
58
|
+
mentionTemplate$?: Observable<TemplateRef<MentionTemplateContext> | undefined>;
|
|
59
|
+
deliveredStatusTemplate$?: Observable<TemplateRef<DeliveredStatusContext> | undefined>;
|
|
60
|
+
sendingStatusTemplate$?: Observable<TemplateRef<SendingStatusContext> | undefined>;
|
|
61
|
+
readStatusTemplate$?: Observable<TemplateRef<ReadStatusContext> | undefined>;
|
|
62
|
+
attachmentListTemplate$?: Observable<TemplateRef<AttachmentListContext> | undefined>;
|
|
63
|
+
messageActionsBoxTemplate$?: Observable<TemplateRef<MessageActionsBoxContext> | undefined>;
|
|
64
|
+
messageReactionsTemplate$?: Observable<TemplateRef<MessageReactionsContext> | undefined>;
|
|
65
|
+
systemMessageTemplate$?: Observable<TemplateRef<SystemMessageContext> | undefined>;
|
|
65
66
|
popperTriggerClick: NgxPopperjsTriggers;
|
|
66
67
|
popperTriggerHover: NgxPopperjsTriggers;
|
|
67
68
|
popperPlacementAuto: NgxPopperjsPlacements;
|
|
68
69
|
shouldDisplayTranslationNotice: boolean;
|
|
69
70
|
displayedMessageTextContent: 'original' | 'translation';
|
|
70
71
|
imageAttachmentModalState: 'opened' | 'closed';
|
|
72
|
+
shouldDisplayThreadLink: boolean;
|
|
73
|
+
isSentByCurrentUser: boolean;
|
|
74
|
+
readByText: string;
|
|
75
|
+
lastReadUser: UserResponse<DefaultStreamChatGenerics> | undefined;
|
|
76
|
+
isOnlyReadByMe: boolean;
|
|
77
|
+
isReadByMultipleUsers: boolean;
|
|
78
|
+
isMessageDeliveredAndRead: boolean;
|
|
79
|
+
parsedDate: string;
|
|
80
|
+
areOptionsVisible: boolean;
|
|
81
|
+
hasAttachment: boolean;
|
|
82
|
+
hasReactions: boolean;
|
|
83
|
+
replyCountParam: {
|
|
84
|
+
replyCount: number | undefined;
|
|
85
|
+
};
|
|
86
|
+
canDisplayReadStatus: boolean;
|
|
71
87
|
private quotedMessageAttachments;
|
|
72
|
-
|
|
88
|
+
user: UserResponse<DefaultStreamChatGenerics> | undefined;
|
|
73
89
|
private subscriptions;
|
|
74
90
|
private container;
|
|
75
91
|
constructor(chatClientService: ChatClientService, channelService: ChannelService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef, themeService: ThemeService, dateParser: DateParserService);
|
|
76
92
|
ngOnInit(): void;
|
|
77
93
|
ngOnChanges(changes: SimpleChanges): void;
|
|
78
94
|
ngOnDestroy(): void;
|
|
79
|
-
get shouldDisplayThreadLink(): boolean;
|
|
80
|
-
get isSentByCurrentUser(): boolean;
|
|
81
|
-
get readByText(): string;
|
|
82
|
-
get lastReadUser(): UserResponse<DefaultStreamChatGenerics> | undefined;
|
|
83
|
-
get isOnlyReadByMe(): boolean | undefined;
|
|
84
|
-
get isReadByMultipleUsers(): boolean | undefined;
|
|
85
|
-
get isMessageDeliveredAndRead(): boolean | undefined;
|
|
86
|
-
get parsedDate(): string | undefined;
|
|
87
|
-
get areOptionsVisible(): boolean;
|
|
88
|
-
get hasAttachment(): boolean;
|
|
89
|
-
get hasReactions(): boolean;
|
|
90
|
-
get replyCountParam(): {
|
|
91
|
-
replyCount: number | undefined;
|
|
92
|
-
};
|
|
93
|
-
get canDisplayReadStatus(): boolean;
|
|
94
95
|
getAttachmentListContext(): AttachmentListContext;
|
|
95
96
|
getMessageContext(): SystemMessageContext;
|
|
96
97
|
getQuotedMessageAttachmentListContext(): AttachmentListContext;
|
|
@@ -109,6 +110,8 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
109
110
|
private getMessageContent;
|
|
110
111
|
private fixEmojiDisplay;
|
|
111
112
|
private wrapLinskWithAnchorTag;
|
|
113
|
+
private setIsSentByCurrentUser;
|
|
114
|
+
private setLastReadUser;
|
|
112
115
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
|
|
113
116
|
static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "message": "message"; "enabledMessageActions": "enabledMessageActions"; "isLastSentMessage": "isLastSentMessage"; "mode": "mode"; "isHighlighted": "isHighlighted"; "customActions": "customActions"; }, {}, never, never>;
|
|
114
117
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges,
|
|
2
|
-
import { Observable
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { ChannelService } from '../channel.service';
|
|
4
4
|
import { ChatClientService } from '../chat-client.service';
|
|
5
5
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
@@ -9,11 +9,11 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
/**
|
|
10
10
|
* The `MessageActionsBox` component displays a list of message actions (i.e edit), that can be opened or closed. You can find the [list of the supported actions](../concepts/message-interactions.mdx) in the message interaction guide.
|
|
11
11
|
*/
|
|
12
|
-
export declare class MessageActionsBoxComponent implements OnChanges
|
|
12
|
+
export declare class MessageActionsBoxComponent implements OnChanges {
|
|
13
13
|
private chatClientService;
|
|
14
14
|
private notificationService;
|
|
15
15
|
private channelService;
|
|
16
|
-
|
|
16
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
17
17
|
/**
|
|
18
18
|
* Indicates if the list should be opened or closed. Adding a UI element to open and close the list is the parent's component responsibility.
|
|
19
19
|
* @deprecated No need for this since [theme-v2](../theming/introduction.mdx)
|
|
@@ -47,7 +47,6 @@ export declare class MessageActionsBoxComponent implements OnChanges, OnDestroy
|
|
|
47
47
|
messageInputTemplate: TemplateRef<MessageInputContext> | undefined;
|
|
48
48
|
messageActionItemTemplate: TemplateRef<MessageActionBoxItemContext> | undefined;
|
|
49
49
|
modalTemplate: TemplateRef<ModalContext> | undefined;
|
|
50
|
-
subscriptions: Subscription[];
|
|
51
50
|
visibleMessageActionItems: (MessageActionItem | CustomMessageActionItem)[];
|
|
52
51
|
sendMessage$: Observable<void>;
|
|
53
52
|
private readonly messageActionItems;
|
|
@@ -55,7 +54,6 @@ export declare class MessageActionsBoxComponent implements OnChanges, OnDestroy
|
|
|
55
54
|
private sendMessageSubject;
|
|
56
55
|
constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService, customTemplatesService: CustomTemplatesService);
|
|
57
56
|
ngOnChanges(changes: SimpleChanges): void;
|
|
58
|
-
ngOnDestroy(): void;
|
|
59
57
|
getActionLabel(actionLabelOrTranslationKey: ((message: StreamMessage) => string) | string): string;
|
|
60
58
|
getMessageActionTemplateContext(item: MessageActionItem | CustomMessageActionItem): MessageActionBoxItemContext<any>;
|
|
61
59
|
sendClicked(): void;
|
|
@@ -28,7 +28,6 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
|
|
|
28
28
|
* Determines what triggers the appearance of the message options: by default you can hover (click on mobile) anywhere in the row of the message (`message-row` option), or you can set `message-bubble`, in that case only a hover (click on mobile) in the message bubble will trigger the options to appear.
|
|
29
29
|
*/
|
|
30
30
|
messageOptionsTrigger: 'message-row' | 'message-bubble';
|
|
31
|
-
typingIndicatorTemplate: TemplateRef<TypingIndicatorContext> | undefined;
|
|
32
31
|
/**
|
|
33
32
|
* You can hide the "jump to latest" button while scrolling. A potential use-case for this input would be to [workaround a known issue on iOS Safar](https://github.com/GetStream/stream-chat-angular/issues/418)
|
|
34
33
|
*/
|
|
@@ -54,6 +53,7 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
|
|
|
54
53
|
* You can turn on and off the loading indicator that signals to users that more messages are being loaded to the message list
|
|
55
54
|
*/
|
|
56
55
|
displayLoadingIndicator: boolean;
|
|
56
|
+
typingIndicatorTemplate: TemplateRef<TypingIndicatorContext> | undefined;
|
|
57
57
|
messageTemplate: TemplateRef<MessageContext> | undefined;
|
|
58
58
|
customDateSeparatorTemplate: TemplateRef<DateSeparatorContext> | undefined;
|
|
59
59
|
customnewMessagesIndicatorTemplate: TemplateRef<void> | undefined;
|
|
@@ -107,6 +107,7 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
|
|
|
107
107
|
replyCount: number | undefined;
|
|
108
108
|
};
|
|
109
109
|
private preserveScrollbarPosition;
|
|
110
|
+
private forceRepaint;
|
|
110
111
|
private getScrollPosition;
|
|
111
112
|
private shouldLoadMoreMessages;
|
|
112
113
|
private setMessages$;
|
package/lib/types.d.ts
CHANGED
|
@@ -132,6 +132,7 @@ export declare type AvatarContext = {
|
|
|
132
132
|
channel?: Channel<DefaultStreamChatGenerics>;
|
|
133
133
|
user?: User<DefaultStreamChatGenerics>;
|
|
134
134
|
initialsType?: 'first-letter-of-first-word' | 'first-letter-of-each-word';
|
|
135
|
+
showOnlineIndicator?: boolean;
|
|
135
136
|
};
|
|
136
137
|
export declare type AttachmentPreviewListContext = {
|
|
137
138
|
attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
|
package/package.json
CHANGED
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.
|
|
1
|
+
export const version = '4.39.0';
|