stream-chat-angular 4.26.0 → 4.27.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 +28 -3
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/custom-templates.service.js +5 -1
- package/esm2015/lib/message/message.component.js +14 -2
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +11 -2
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +28 -3
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/custom-templates.service.d.ts +5 -1
- package/lib/message/message.component.d.ts +3 -1
- package/lib/message-actions-box/message-actions-box.component.d.ts +1 -0
- package/lib/types.d.ts +6 -1
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { AttachmentContext, AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelHeaderInfoContext, ChannelPreviewContext, CommandAutocompleteListItemContext, CustomAttachmentUploadContext, DeliveredStatusContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ReadStatusContext, SendingStatusContext, ThreadHeaderContext, TypingIndicatorContext } from './types';
|
|
3
|
+
import { AttachmentContext, AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelHeaderInfoContext, ChannelPreviewContext, CommandAutocompleteListItemContext, CustomAttachmentUploadContext, 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.
|
|
@@ -180,6 +180,10 @@ export declare class CustomTemplatesService {
|
|
|
180
180
|
* The template that can be used to override how attachment actions are displayed inside the [attachment list](../components/AttachmentListComponent.mdx)
|
|
181
181
|
*/
|
|
182
182
|
attachmentActionsTemplate$: BehaviorSubject<TemplateRef<AttachmentContext> | undefined>;
|
|
183
|
+
/**
|
|
184
|
+
* The template used to display [system messages](https://getstream.io/chat/docs/javascript/silent_messages/?language=javascript&q=system) indise the [message component](../components/MessageComponent.mdx)
|
|
185
|
+
*/
|
|
186
|
+
systemMessageTemplate$: BehaviorSubject<TemplateRef<SystemMessageContext> | undefined>;
|
|
183
187
|
constructor();
|
|
184
188
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService, never>;
|
|
185
189
|
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, DeliveredStatusContext, SendingStatusContext, ReadStatusContext, CustomMessageActionItem } from '../types';
|
|
5
|
+
import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage, DeliveredStatusContext, SendingStatusContext, ReadStatusContext, CustomMessageActionItem, SystemMessageContext } 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';
|
|
@@ -59,6 +59,7 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
59
59
|
attachmentListTemplate: TemplateRef<AttachmentListContext> | undefined;
|
|
60
60
|
messageActionsBoxTemplate: TemplateRef<MessageActionsBoxContext> | undefined;
|
|
61
61
|
messageReactionsTemplate: TemplateRef<MessageReactionsContext> | undefined;
|
|
62
|
+
systemMessageTemplate: TemplateRef<SystemMessageContext> | undefined;
|
|
62
63
|
popperTriggerClick: NgxPopperjsTriggers;
|
|
63
64
|
popperTriggerHover: NgxPopperjsTriggers;
|
|
64
65
|
popperPlacementAuto: NgxPopperjsPlacements;
|
|
@@ -89,6 +90,7 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
89
90
|
};
|
|
90
91
|
get canDisplayReadStatus(): boolean;
|
|
91
92
|
getAttachmentListContext(): AttachmentListContext;
|
|
93
|
+
getMessageContext(): SystemMessageContext;
|
|
92
94
|
getQuotedMessageAttachmentListContext(): AttachmentListContext;
|
|
93
95
|
getMessageReactionsContext(): MessageReactionsContext;
|
|
94
96
|
resendMessage(): void;
|
|
@@ -57,6 +57,7 @@ export declare class MessageActionsBoxComponent implements OnChanges, OnDestroy
|
|
|
57
57
|
ngOnChanges(changes: SimpleChanges): void;
|
|
58
58
|
ngOnDestroy(): void;
|
|
59
59
|
getActionLabel(actionLabelOrTranslationKey: ((message: StreamMessage) => string) | string): string;
|
|
60
|
+
getMessageActionTemplateContext(item: MessageActionItem | CustomMessageActionItem): MessageActionBoxItemContext<any>;
|
|
60
61
|
sendClicked(): void;
|
|
61
62
|
modalClosed: () => void;
|
|
62
63
|
getMessageInputContext(): MessageInputContext;
|
package/lib/types.d.ts
CHANGED
|
@@ -162,7 +162,9 @@ export declare type MessageActionsBoxContext = {
|
|
|
162
162
|
export declare type MessageActionBoxItemContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
163
163
|
actionName: 'quote' | 'pin' | 'flag' | 'edit' | 'delete' | string;
|
|
164
164
|
actionLabelOrTranslationKey: ((message: StreamMessage<T>) => string) | string;
|
|
165
|
-
|
|
165
|
+
message: StreamMessage<T>;
|
|
166
|
+
isMine: boolean;
|
|
167
|
+
actionHandler: (message: StreamMessage<T>, isMine: boolean) => any;
|
|
166
168
|
};
|
|
167
169
|
declare type MessageActionItemBase<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
168
170
|
actionLabelOrTranslationKey: ((message: StreamMessage<T>) => string) | string;
|
|
@@ -231,4 +233,7 @@ export declare type CustomAttachmentUploadContext = {
|
|
|
231
233
|
export declare type AttachmentContext = {
|
|
232
234
|
attachment: Attachment<DefaultStreamChatGenerics>;
|
|
233
235
|
};
|
|
236
|
+
export declare type SystemMessageContext = MessageContext & {
|
|
237
|
+
parsedDate: string | undefined;
|
|
238
|
+
};
|
|
234
239
|
export {};
|
package/package.json
CHANGED
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.
|
|
1
|
+
export const version = '4.27.0';
|