stream-chat-angular 5.6.0 → 5.7.1
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/i18n/en.d.ts +2 -0
- package/assets/version.d.ts +1 -1
- package/esm2020/assets/i18n/en.mjs +3 -1
- package/esm2020/assets/version.mjs +2 -2
- package/esm2020/lib/attachment.service.mjs +45 -2
- package/esm2020/lib/custom-templates.service.mjs +11 -1
- package/esm2020/lib/message/message.component.mjs +3 -3
- package/esm2020/lib/message-input/message-input.component.mjs +4 -4
- package/esm2020/lib/types.mjs +1 -1
- package/fesm2015/stream-chat-angular.mjs +66 -9
- package/fesm2015/stream-chat-angular.mjs.map +1 -1
- package/fesm2020/stream-chat-angular.mjs +62 -7
- package/fesm2020/stream-chat-angular.mjs.map +1 -1
- package/lib/attachment.service.d.ts +12 -0
- package/lib/custom-templates.service.d.ts +11 -1
- package/lib/types.d.ts +3 -0
- package/package.json +1 -1
- package/src/assets/i18n/en.ts +4 -0
- package/src/assets/version.ts +1 -1
|
@@ -34,8 +34,19 @@ export declare class AttachmentService<T extends DefaultStreamChatGenerics = Def
|
|
|
34
34
|
* By default the SDK components won't display these, but you can provide your own `customAttachmentPreviewListTemplate$` and `customAttachmentListTemplate$` for the [`CustomTemplatesService`](../../services/CustomTemplatesService).
|
|
35
35
|
*/
|
|
36
36
|
customAttachments$: BehaviorSubject<Attachment<T>[]>;
|
|
37
|
+
/**
|
|
38
|
+
* The current number of attachments
|
|
39
|
+
*/
|
|
40
|
+
attachmentsCounter$: Observable<number>;
|
|
41
|
+
/**
|
|
42
|
+
* The maximum number of attachments allowed for a message.
|
|
43
|
+
*
|
|
44
|
+
* The maximum is 30, you can set it to lower, but not higher.
|
|
45
|
+
*/
|
|
46
|
+
maxNumberOfAttachments: number;
|
|
37
47
|
private attachmentUploadsSubject;
|
|
38
48
|
private appSettings;
|
|
49
|
+
private attachmentLimitNotificationHide?;
|
|
39
50
|
constructor(channelService: ChannelService, notificationService: NotificationService, chatClientService: ChatClientService, messageService: MessageService);
|
|
40
51
|
/**
|
|
41
52
|
* Resets the attachments uploads (for example after the message with the attachments sent successfully)
|
|
@@ -85,6 +96,7 @@ export declare class AttachmentService<T extends DefaultStreamChatGenerics = Def
|
|
|
85
96
|
private uploadAttachments;
|
|
86
97
|
private areAttachmentsHaveValidExtension;
|
|
87
98
|
private areAttachmentsHaveValidSize;
|
|
99
|
+
private isWithinLimit;
|
|
88
100
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentService<any>, never>;
|
|
89
101
|
static ɵprov: i0.ɵɵInjectableDeclaration<AttachmentService<any>>;
|
|
90
102
|
}
|
|
@@ -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, ChannelPreviewInfoContext, CommandAutocompleteListItemContext, CustomAttachmentListContext, CustomAttachmentPreviewListContext, CustomAttachmentUploadContext, CustomMetadataContext, DateSeparatorContext, DefaultStreamChatGenerics, DeliveredStatusContext, EmojiPickerContext, IconContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageReactionsContext, MessageReactionsSelectorContext, ModalContext, NotificationContext, ReadStatusContext, SendingStatusContext, SystemMessageContext, ThreadHeaderContext, TypingIndicatorContext, UnreadMessagesIndicatorContext, UnreadMessagesNotificationContext } from './types';
|
|
3
|
+
import { AttachmentContext, AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelHeaderInfoContext, ChannelPreviewContext, ChannelPreviewInfoContext, CommandAutocompleteListItemContext, CustomAttachmentListContext, CustomAttachmentPreviewListContext, CustomAttachmentUploadContext, CustomMetadataContext, DateSeparatorContext, DefaultStreamChatGenerics, DeliveredStatusContext, EmojiPickerContext, IconContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageReactionsContext, MessageReactionsSelectorContext, ModalContext, NotificationContext, ReadStatusContext, SendingStatusContext, SystemMessageContext, ThreadHeaderContext, ThreadReplyButtonContext, TypingIndicatorContext, UnreadMessagesIndicatorContext, UnreadMessagesNotificationContext } 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.
|
|
@@ -217,6 +217,16 @@ export declare class CustomTemplatesService<T extends DefaultStreamChatGenerics
|
|
|
217
217
|
* The template used to display custom attachments in the [message component](../../components/MessageComponent.mdx)
|
|
218
218
|
*/
|
|
219
219
|
customAttachmentListTemplate$: BehaviorSubject<TemplateRef<CustomAttachmentListContext<DefaultStreamChatGenerics>> | undefined>;
|
|
220
|
+
/**
|
|
221
|
+
* The template used to display the number of thread replies inside the [message component](../../components/MessageComponent.mdx)
|
|
222
|
+
*/
|
|
223
|
+
threadLinkButton$: BehaviorSubject<TemplateRef<ThreadReplyButtonContext<DefaultStreamChatGenerics>> | undefined>;
|
|
224
|
+
/**
|
|
225
|
+
* Template to display custom metadata inside the message bubble of the [message component](../components/MessageComponent.mdx)
|
|
226
|
+
*
|
|
227
|
+
* To properly position your template you should override the `grid-template-areas` of the `.str-chat__message-inner` selector
|
|
228
|
+
*/
|
|
229
|
+
customMessageMetadataInsideBubbleTemplate$: BehaviorSubject<TemplateRef<CustomMetadataContext<DefaultStreamChatGenerics>> | undefined>;
|
|
220
230
|
constructor();
|
|
221
231
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService<any>, never>;
|
|
222
232
|
static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService<any>>;
|
package/lib/types.d.ts
CHANGED
|
@@ -335,4 +335,7 @@ export declare type MediaRecording = {
|
|
|
335
335
|
export declare type CustomAttachmentPreviewListContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
336
336
|
attachmentService: AttachmentService<T>;
|
|
337
337
|
};
|
|
338
|
+
export declare type ThreadReplyButtonContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
339
|
+
message: StreamMessage<T>;
|
|
340
|
+
};
|
|
338
341
|
export {};
|
package/package.json
CHANGED
package/src/assets/i18n/en.ts
CHANGED
|
@@ -126,5 +126,9 @@ export const en = {
|
|
|
126
126
|
'An error has occurred during recording':
|
|
127
127
|
'An error has occurred during recording',
|
|
128
128
|
'Media recording not supported': 'Media recording not supported',
|
|
129
|
+
"You can't uplod more than {{max}} attachments":
|
|
130
|
+
"You can't uplod more than {{max}} attachments",
|
|
131
|
+
'You currently have {{count}} attachments, the maximum is {{max}}':
|
|
132
|
+
'You currently have {{count}} attachments, the maximum is {{max}}',
|
|
129
133
|
},
|
|
130
134
|
};
|
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.
|
|
1
|
+
export const version = '5.7.1';
|