stream-chat-angular 4.56.0 → 4.57.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 +19 -2
- 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 +7 -2
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +19 -2
- 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 +2 -1
- package/lib/types.d.ts +3 -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 +18 -11
- package/src/assets/styles/v2/scss/Message/Message-theme.scss +4 -3
- package/src/assets/styles/v2/scss/MessageReactions/MessageReactions-layout.scss +5 -2
- 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';
|
|
@@ -107,6 +107,7 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
|
|
|
107
107
|
getDeliveredStatusContext(): DeliveredStatusContext;
|
|
108
108
|
getSendingStatusContext(): SendingStatusContext;
|
|
109
109
|
getReadStatusContext(): ReadStatusContext;
|
|
110
|
+
getMessageMetadataContext(): CustomMetadataContext;
|
|
110
111
|
jumpToMessage(messageId: string, parentMessageId?: string): void;
|
|
111
112
|
displayTranslatedMessage(): void;
|
|
112
113
|
displayOriginalMessage(): void;
|
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;
|
package/package.json
CHANGED