stream-chat-angular 4.56.0 → 4.58.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 +39 -16
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/custom-templates.service.js +13 -1
- package/esm2015/lib/message/message.component.js +26 -13
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +2 -2
- package/esm2015/lib/message-actions.service.js +1 -1
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +39 -14
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/custom-templates.service.d.ts +20 -8
- package/lib/message/message.component.d.ts +3 -2
- package/lib/message-actions-box/message-actions-box.component.d.ts +1 -1
- package/lib/message-actions.service.d.ts +5 -1
- package/lib/types.d.ts +9 -0
- package/package.json +1 -1
- package/src/assets/styles/v2/css/index.css +1 -1
- package/src/assets/styles/v2/css/index.layout.css +1 -1
- package/src/assets/styles/v2/scss/Message/Message-layout.scss +20 -12
- package/src/assets/styles/v2/scss/Message/Message-theme.scss +4 -3
- package/src/assets/styles/v2/scss/MessageActionsBox/MessageActionsBox-layout.scss +0 -11
- package/src/assets/styles/v2/scss/MessageBounceOptions/MessageBounceOptions-layout.scss +18 -0
- package/src/assets/styles/v2/scss/MessageBounceOptions/MessageBounceOptions-theme.scss +51 -0
- package/src/assets/styles/v2/scss/MessageReactions/MessageReactions-layout.scss +5 -2
- package/src/assets/styles/v2/scss/_base.scss +3 -20
- package/src/assets/styles/v2/scss/index.layout.scss +1 -0
- package/src/assets/styles/v2/scss/index.scss +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { AttachmentContext, AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelHeaderInfoContext, ChannelPreviewContext, CommandAutocompleteListItemContext, CustomAttachmentUploadContext, DateSeparatorContext, DeliveredStatusContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ReadStatusContext, SendingStatusContext, SystemMessageContext, ThreadHeaderContext, TypingIndicatorContext } from './types';
|
|
3
|
+
import { AttachmentContext, AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelHeaderInfoContext, ChannelPreviewContext, CommandAutocompleteListItemContext, CustomAttachmentUploadContext, CustomMetadataContext, DateSeparatorContext, DefaultStreamChatGenerics, DeliveredStatusContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ReadStatusContext, SendingStatusContext, SystemMessageContext, 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.
|
|
7
7
|
*
|
|
8
8
|
* 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).
|
|
9
9
|
*/
|
|
10
|
-
export declare class CustomTemplatesService {
|
|
10
|
+
export declare class CustomTemplatesService<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> {
|
|
11
11
|
/**
|
|
12
12
|
* The autocomplete list item template for mentioning users (used in the [`AutocompleteTextareaComponent`](../components/AutocompleteTextareaComponent.mdx))
|
|
13
13
|
*/
|
|
@@ -23,7 +23,7 @@ export declare class CustomTemplatesService {
|
|
|
23
23
|
*
|
|
24
24
|
* 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).
|
|
25
25
|
*/
|
|
26
|
-
channelPreviewTemplate$: BehaviorSubject<TemplateRef<ChannelPreviewContext<
|
|
26
|
+
channelPreviewTemplate$: BehaviorSubject<TemplateRef<ChannelPreviewContext<DefaultStreamChatGenerics>> | undefined>;
|
|
27
27
|
/**
|
|
28
28
|
* The message input template used when editing a message (instead of the [default message input](../components/MessageInputComponent.mdx))
|
|
29
29
|
*
|
|
@@ -59,7 +59,7 @@ export declare class CustomTemplatesService {
|
|
|
59
59
|
*
|
|
60
60
|
* 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).
|
|
61
61
|
*/
|
|
62
|
-
channelActionsTemplate$: BehaviorSubject<TemplateRef<ChannelActionsContext<
|
|
62
|
+
channelActionsTemplate$: BehaviorSubject<TemplateRef<ChannelActionsContext<DefaultStreamChatGenerics>> | undefined>;
|
|
63
63
|
/**
|
|
64
64
|
* The template used to display attachments of a [message](../components/MessageComponent.mdx) (instead of the [default attachment list](../components/AttachmentListComponent.mdx))
|
|
65
65
|
*
|
|
@@ -101,7 +101,7 @@ export declare class CustomTemplatesService {
|
|
|
101
101
|
*
|
|
102
102
|
* 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).
|
|
103
103
|
*/
|
|
104
|
-
messageActionsBoxItemTemplate$: BehaviorSubject<TemplateRef<MessageActionBoxItemContext<
|
|
104
|
+
messageActionsBoxItemTemplate$: BehaviorSubject<TemplateRef<MessageActionBoxItemContext<DefaultStreamChatGenerics>> | undefined>;
|
|
105
105
|
/**
|
|
106
106
|
* 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))
|
|
107
107
|
*
|
|
@@ -129,27 +129,39 @@ export declare class CustomTemplatesService {
|
|
|
129
129
|
/**
|
|
130
130
|
* The template used for displaying the delivered state of the message inside the [message component](../components/MessageComponent.mdx)
|
|
131
131
|
*
|
|
132
|
+
* Displayed for the last message sent by the current user, if the message isn't yet read by anyone
|
|
133
|
+
*
|
|
132
134
|
* 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).
|
|
133
135
|
*/
|
|
134
136
|
deliveredStatusTemplate$: BehaviorSubject<TemplateRef<DeliveredStatusContext> | undefined>;
|
|
135
137
|
/**
|
|
136
138
|
* The template used for displaying the sending state of the message inside the [message component](../components/MessageComponent.mdx)
|
|
137
139
|
*
|
|
140
|
+
* Displayed for the last message sent by the current user, if the message is currently being sent
|
|
141
|
+
*
|
|
138
142
|
* 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).
|
|
139
143
|
*/
|
|
140
144
|
sendingStatusTemplate$: BehaviorSubject<TemplateRef<SendingStatusContext> | undefined>;
|
|
141
145
|
/**
|
|
142
146
|
* The template used for displaying the sent state of the message inside the [message component](../components/MessageComponent.mdx)
|
|
143
147
|
*
|
|
148
|
+
* Displayed for the last message sent by the current user, if the message is read at least by one user
|
|
149
|
+
*
|
|
144
150
|
* 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).
|
|
145
151
|
*/
|
|
146
152
|
readStatusTemplate$: BehaviorSubject<TemplateRef<ReadStatusContext> | undefined>;
|
|
153
|
+
/**
|
|
154
|
+
* Template to display custom metadata inside [message component](../components/MessageComponent.mdx)
|
|
155
|
+
*
|
|
156
|
+
* 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).
|
|
157
|
+
*/
|
|
158
|
+
customMessageMetadataTemplate$: BehaviorSubject<TemplateRef<CustomMetadataContext<T>> | undefined>;
|
|
147
159
|
/**
|
|
148
160
|
* The template used to display additional information about a channel under the channel name inside the [channel header component](../components/ChannelHeaderComponent.mdx)
|
|
149
161
|
*
|
|
150
162
|
* 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).
|
|
151
163
|
*/
|
|
152
|
-
channelHeaderInfoTemplate$: BehaviorSubject<TemplateRef<ChannelHeaderInfoContext<
|
|
164
|
+
channelHeaderInfoTemplate$: BehaviorSubject<TemplateRef<ChannelHeaderInfoContext<DefaultStreamChatGenerics>> | undefined>;
|
|
153
165
|
/**
|
|
154
166
|
* The template used for displaying file upload/attachment selector inside the [message input](../components/MessageInputComponent.mdx)
|
|
155
167
|
*
|
|
@@ -201,6 +213,6 @@ export declare class CustomTemplatesService {
|
|
|
201
213
|
*/
|
|
202
214
|
emptyThreadMessageListPlaceholder$: BehaviorSubject<TemplateRef<void> | undefined>;
|
|
203
215
|
constructor();
|
|
204
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService
|
|
205
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService<any>, never>;
|
|
217
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService<any>>;
|
|
206
218
|
}
|
|
@@ -2,7 +2,7 @@ import { OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetectorRef, NgZone,
|
|
|
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, DeliveredStatusContext, SendingStatusContext, ReadStatusContext, CustomMessageActionItem, SystemMessageContext } from '../types';
|
|
5
|
+
import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage, DeliveredStatusContext, SendingStatusContext, ReadStatusContext, CustomMessageActionItem, SystemMessageContext, CustomMetadataContext } 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';
|
|
@@ -96,6 +96,7 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
|
|
|
96
96
|
ngOnChanges(changes: SimpleChanges): void;
|
|
97
97
|
ngAfterViewInit(): void;
|
|
98
98
|
ngOnDestroy(): void;
|
|
99
|
+
messageActionsClicked(): void;
|
|
99
100
|
getAttachmentListContext(): AttachmentListContext;
|
|
100
101
|
getMessageContext(): SystemMessageContext;
|
|
101
102
|
getQuotedMessageAttachmentListContext(): AttachmentListContext;
|
|
@@ -107,10 +108,10 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
|
|
|
107
108
|
getDeliveredStatusContext(): DeliveredStatusContext;
|
|
108
109
|
getSendingStatusContext(): SendingStatusContext;
|
|
109
110
|
getReadStatusContext(): ReadStatusContext;
|
|
111
|
+
getMessageMetadataContext(): CustomMetadataContext;
|
|
110
112
|
jumpToMessage(messageId: string, parentMessageId?: string): void;
|
|
111
113
|
displayTranslatedMessage(): void;
|
|
112
114
|
displayOriginalMessage(): void;
|
|
113
|
-
mouseLeft(): void;
|
|
114
115
|
private createMessageParts;
|
|
115
116
|
private getMessageContent;
|
|
116
117
|
private fixEmojiDisplay;
|
|
@@ -47,7 +47,7 @@ export declare class MessageActionsBoxComponent implements OnInit, OnChanges, On
|
|
|
47
47
|
/**
|
|
48
48
|
* An event which emits `true` if the edit message modal is open, and `false` when it is closed.
|
|
49
49
|
*
|
|
50
|
-
* @deprecated components should use `messageReactionsService.
|
|
50
|
+
* @deprecated components should use `messageReactionsService.messageToEdit$` Observable
|
|
51
51
|
*
|
|
52
52
|
* More information: https://getstream.io/chat/docs/sdk/angular/services/MessageActionsService
|
|
53
53
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { CustomMessageActionItem, DefaultStreamChatGenerics, MessageActionItem, StreamMessage } from './types';
|
|
2
|
+
import { CustomMessageActionItem, DefaultStreamChatGenerics, MessageActionItem, MessageActionsClickDetails, StreamMessage } from './types';
|
|
3
3
|
import { ChatClientService } from './chat-client.service';
|
|
4
4
|
import { NotificationService } from './notification.service';
|
|
5
5
|
import { ChannelService } from './channel.service';
|
|
@@ -23,6 +23,10 @@ export declare class MessageActionsService<T extends DefaultStreamChatGenerics =
|
|
|
23
23
|
* You can pass your own custom actions that will be displayed inside the built-in message actions component
|
|
24
24
|
*/
|
|
25
25
|
customActions$: BehaviorSubject<CustomMessageActionItem<DefaultStreamChatGenerics>[]>;
|
|
26
|
+
/**
|
|
27
|
+
* By default the [`MessageComponent`](../../components/MessageComponent) will display the [`MessageActionsBoxComponent`](../../components/MessageActionsBoxComponent). You can override that behavior by providing your own event handler.
|
|
28
|
+
*/
|
|
29
|
+
customActionClickHandler?: (details: MessageActionsClickDetails<T>) => void;
|
|
26
30
|
constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService);
|
|
27
31
|
/**
|
|
28
32
|
* This method returns how many authorized actions are available to the given message
|
package/lib/types.d.ts
CHANGED
|
@@ -240,6 +240,9 @@ export declare type DeliveredStatusContext = {
|
|
|
240
240
|
export declare type SendingStatusContext = {
|
|
241
241
|
message: StreamMessage;
|
|
242
242
|
};
|
|
243
|
+
export declare type CustomMetadataContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
244
|
+
message: StreamMessage<T>;
|
|
245
|
+
};
|
|
243
246
|
export declare type ReadStatusContext = {
|
|
244
247
|
message: StreamMessage;
|
|
245
248
|
readByText: string;
|
|
@@ -287,4 +290,10 @@ export declare type MessageReactionClickDetails = {
|
|
|
287
290
|
messageId: string;
|
|
288
291
|
reactionType: string;
|
|
289
292
|
};
|
|
293
|
+
export declare type MessageActionsClickDetails<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
294
|
+
message: StreamMessage<T>;
|
|
295
|
+
enabledActions: string[];
|
|
296
|
+
isMine: boolean;
|
|
297
|
+
customActions: CustomMessageActionItem[];
|
|
298
|
+
};
|
|
290
299
|
export {};
|
package/package.json
CHANGED