stream-chat-angular 3.0.0-beta.2 → 3.0.0-beta.5
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 +557 -293
- 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 +27 -15
- package/esm2015/lib/attachment-preview-list/attachment-preview-list.component.js +28 -22
- package/esm2015/lib/avatar-placeholder/avatar-placeholder.component.js +41 -0
- package/esm2015/lib/channel-header/channel-header.component.js +4 -4
- package/esm2015/lib/channel-list/channel-list.component.js +4 -4
- package/esm2015/lib/channel-preview/channel-preview.component.js +3 -3
- package/esm2015/lib/channel.service.js +18 -18
- package/esm2015/lib/chat-client.service.js +2 -2
- package/esm2015/lib/custom-templates.service.js +95 -11
- package/esm2015/lib/icon-placeholder/icon-placeholder.component.js +34 -0
- package/esm2015/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.js +42 -0
- package/esm2015/lib/message/message.component.js +49 -8
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +98 -86
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +3 -3
- package/esm2015/lib/message-input/message-input.component.js +21 -4
- package/esm2015/lib/message-list/message-list.component.js +3 -3
- package/esm2015/lib/message-reactions/message-reactions.component.js +3 -3
- package/esm2015/lib/modal/modal.component.js +9 -6
- package/esm2015/lib/notification/notification.component.js +5 -2
- package/esm2015/lib/notification-list/notification-list.component.js +12 -10
- package/esm2015/lib/stream-avatar.module.js +5 -4
- package/esm2015/lib/stream-chat.module.js +13 -3
- package/esm2015/lib/thread/thread.component.js +19 -11
- package/esm2015/lib/types.js +1 -1
- package/esm2015/public-api.js +4 -1
- package/fesm2015/stream-chat-angular.js +511 -217
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-list/attachment-list.component.d.ts +7 -3
- package/lib/attachment-preview-list/attachment-preview-list.component.d.ts +17 -7
- package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +25 -0
- package/lib/channel.service.d.ts +5 -6
- package/lib/chat-client.service.d.ts +3 -3
- package/lib/custom-templates.service.d.ts +95 -11
- package/lib/icon-placeholder/icon-placeholder.component.d.ts +22 -0
- package/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +21 -0
- package/lib/message/message.component.d.ts +12 -4
- package/lib/message-actions-box/message-actions-box.component.d.ts +9 -13
- package/lib/message-input/message-input.component.d.ts +5 -1
- package/lib/message-reactions/message-reactions.component.d.ts +1 -2
- package/lib/modal/modal.component.d.ts +7 -3
- package/lib/notification/notification.component.d.ts +6 -1
- package/lib/notification-list/notification-list.component.d.ts +4 -2
- package/lib/stream-avatar.module.d.ts +4 -3
- package/lib/stream-chat.module.d.ts +6 -4
- package/lib/thread/thread.component.d.ts +6 -3
- package/lib/types.d.ts +67 -1
- package/package.json +2 -3
- package/public-api.d.ts +3 -0
- package/src/assets/styles/assets/EmojiOneColor.woff2 +0 -0
- package/src/assets/styles/assets/NotoColorEmoji-flags.woff2 +0 -0
- package/src/assets/styles/assets/Poweredby_100px-White_VertText.png +0 -0
- package/src/assets/styles/assets/str-chat__reaction-list-sprite@1x.png +0 -0
- package/src/assets/styles/assets/str-chat__reaction-list-sprite@2x.png +0 -0
- package/src/assets/styles/assets/str-chat__reaction-list-sprite@3x.png +0 -0
- package/src/assets/styles/css/index.css +1 -0
- package/src/assets/styles/css/index.css.map +1 -0
- package/src/assets/styles/scss/ActionsBox.scss +56 -0
- package/src/assets/styles/scss/Attachment.scss +227 -0
- package/src/assets/styles/scss/AttachmentActions.scss +44 -0
- package/src/assets/styles/scss/Audio.scss +112 -0
- package/src/assets/styles/scss/Avatar.scss +79 -0
- package/src/assets/styles/scss/Card.scss +100 -0
- package/src/assets/styles/scss/ChannelHeader.scss +282 -0
- package/src/assets/styles/scss/ChannelList.scss +117 -0
- package/src/assets/styles/scss/ChannelListMessenger.scss +9 -0
- package/src/assets/styles/scss/ChannelPreview.scss +108 -0
- package/src/assets/styles/scss/ChannelSearch.scss +111 -0
- package/src/assets/styles/scss/ChatDown.scss +15 -0
- package/src/assets/styles/scss/DateSeparator.scss +51 -0
- package/src/assets/styles/scss/EditMessageForm.scss +112 -0
- package/src/assets/styles/scss/EventComponent.scss +48 -0
- package/src/assets/styles/scss/Gallery.scss +135 -0
- package/src/assets/styles/scss/InfiniteScrollPaginator.scss +6 -0
- package/src/assets/styles/scss/LoadMoreButton.scss +44 -0
- package/src/assets/styles/scss/LoadingChannels.scss +70 -0
- package/src/assets/styles/scss/LoadingIndicator.scss +38 -0
- package/src/assets/styles/scss/Message.scss +1261 -0
- package/src/assets/styles/scss/MessageActions.scss +112 -0
- package/src/assets/styles/scss/MessageCommerce.scss +564 -0
- package/src/assets/styles/scss/MessageInput.scss +385 -0
- package/src/assets/styles/scss/MessageInputFlat.scss +305 -0
- package/src/assets/styles/scss/MessageList.scss +203 -0
- package/src/assets/styles/scss/MessageLivestream.scss +325 -0
- package/src/assets/styles/scss/MessageNotification.scss +49 -0
- package/src/assets/styles/scss/MessageRepliesCountButton.scss +33 -0
- package/src/assets/styles/scss/MessageTeam.scss +617 -0
- package/src/assets/styles/scss/Modal.scss +77 -0
- package/src/assets/styles/scss/ReactionList.scss +183 -0
- package/src/assets/styles/scss/ReactionSelector.scss +212 -0
- package/src/assets/styles/scss/SendButton.scss +14 -0
- package/src/assets/styles/scss/SimpleReactionsList.scss +76 -0
- package/src/assets/styles/scss/SmallMessageInput.scss +172 -0
- package/src/assets/styles/scss/Thread.scss +306 -0
- package/src/assets/styles/scss/Tooltip.scss +38 -0
- package/src/assets/styles/scss/TypingIndicator.scss +75 -0
- package/src/assets/styles/scss/VirtualMessage.scss +286 -0
- package/src/assets/styles/scss/_base.scss +206 -0
- package/src/assets/styles/scss/_variables.scss +158 -0
- package/src/assets/styles/scss/index.scss +50 -0
- package/src/assets/styles/scss/vendor/emoji-mart.scss +495 -0
- package/src/assets/styles/scss/vendor/mml-react.scss +1749 -0
- package/src/assets/styles/scss/vendor/react-file-utils.scss +378 -0
- package/src/assets/styles/scss/vendor/react-image-gallery.scss +224 -0
- package/src/assets/version.ts +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { OnChanges } from '@angular/core';
|
|
2
2
|
import { Action, Attachment } from 'stream-chat';
|
|
3
3
|
import { ImageLoadService } from '../message-list/image-load.service';
|
|
4
|
-
import { DefaultAttachmentType } from '../types';
|
|
4
|
+
import { DefaultAttachmentType, ModalContext } from '../types';
|
|
5
5
|
import { ChannelService } from '../channel.service';
|
|
6
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* The `AttachmentList` compontent displays the attachments of a message
|
|
9
10
|
*/
|
|
10
11
|
export declare class AttachmentListComponent implements OnChanges {
|
|
12
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
11
13
|
private imageLoadService;
|
|
12
14
|
private channelService;
|
|
13
15
|
/**
|
|
@@ -21,7 +23,8 @@ export declare class AttachmentListComponent implements OnChanges {
|
|
|
21
23
|
orderedAttachments: Attachment<DefaultAttachmentType>[];
|
|
22
24
|
imagesToView: Attachment<DefaultAttachmentType>[];
|
|
23
25
|
imagesToViewCurrentIndex: number;
|
|
24
|
-
|
|
26
|
+
private modalContent;
|
|
27
|
+
constructor(customTemplatesService: CustomTemplatesService, imageLoadService: ImageLoadService, channelService: ChannelService);
|
|
25
28
|
ngOnChanges(): void;
|
|
26
29
|
trackById(index: number): number;
|
|
27
30
|
isImage(attachment: Attachment): boolean;
|
|
@@ -31,16 +34,17 @@ export declare class AttachmentListComponent implements OnChanges {
|
|
|
31
34
|
imageLoaded(): void;
|
|
32
35
|
hasFileSize(attachment: Attachment<DefaultAttachmentType>): boolean | "" | 0 | undefined;
|
|
33
36
|
getFileSize(attachment: Attachment<DefaultAttachmentType>): string;
|
|
37
|
+
getModalContext(): ModalContext;
|
|
34
38
|
trimUrl(url?: string | null): string | null;
|
|
35
39
|
sendAction(action: Action): void;
|
|
36
40
|
trackByActionValue(_: number, item: Action): string | undefined;
|
|
37
41
|
openImageModal(attachments: Attachment[], selectedIndex?: number): void;
|
|
38
|
-
closeImageModal(): void;
|
|
39
42
|
stepImages(dir: -1 | 1): void;
|
|
40
43
|
trackByImageUrl(_: number, item: Attachment): unknown;
|
|
41
44
|
get isImageModalPrevButtonVisible(): boolean;
|
|
42
45
|
get isImageModalNextButtonVisible(): boolean;
|
|
43
46
|
private createGallery;
|
|
47
|
+
private closeImageModal;
|
|
44
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentListComponent, never>;
|
|
45
49
|
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentListComponent, "stream-attachment-list", never, { "messageId": "messageId"; "attachments": "attachments"; }, {}, never, never>;
|
|
46
50
|
}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { AttachmentService } from '../attachment.service';
|
|
3
3
|
import { AttachmentUpload } from '../types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* The `AttachmentPreviewList` compontent displays a preview of the attachments uploaded to a message. Users can delete attachments using the preview component, or retry upload if it failed previously.
|
|
7
7
|
*/
|
|
8
8
|
export declare class AttachmentPreviewListComponent {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
/**
|
|
10
|
+
* A stream that emits the current file uploads and their states
|
|
11
|
+
*/
|
|
12
|
+
attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* An output to notify the parent component if the user tries to retry a failed upload
|
|
15
|
+
*/
|
|
16
|
+
readonly retryAttachmentUpload: EventEmitter<File>;
|
|
17
|
+
/**
|
|
18
|
+
* An output to notify the parent component if the user wants to delete a file
|
|
19
|
+
*/
|
|
20
|
+
readonly deleteAttachment: EventEmitter<AttachmentUpload>;
|
|
21
|
+
constructor();
|
|
22
|
+
attachmentUploadRetried(file: File): void;
|
|
23
|
+
attachmentDeleted(upload: AttachmentUpload): void;
|
|
14
24
|
trackByFile(_: number, item: AttachmentUpload): File;
|
|
15
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentPreviewListComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentPreviewListComponent, "stream-attachment-preview-list", never, {}, {}, never, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentPreviewListComponent, "stream-attachment-preview-list", never, { "attachmentUploads$": "attachmentUploads$"; }, { "retryAttachmentUpload": "retryAttachmentUpload"; "deleteAttachment": "deleteAttachment"; }, never, never>;
|
|
17
27
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
2
|
+
import { AvatarContext } from '../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* The `AvatarPlaceholder` component displays the [default avatar](./AvatarComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This componet is used by the SDK internally, you likely won't need to use it.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AvatarPlaceholderComponent {
|
|
8
|
+
customTemplatesService: CustomTemplatesService;
|
|
9
|
+
/**
|
|
10
|
+
* An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
|
|
11
|
+
*/
|
|
12
|
+
name: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The URL of the image to be displayed. If the image can't be displayed the first letter of the name input is displayed.
|
|
15
|
+
*/
|
|
16
|
+
imageUrl: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The size in pixels of the avatar image.
|
|
19
|
+
*/
|
|
20
|
+
size: number;
|
|
21
|
+
constructor(customTemplatesService: CustomTemplatesService);
|
|
22
|
+
getAvatarContext(): AvatarContext;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarPlaceholderComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; }, {}, never, never>;
|
|
25
|
+
}
|
package/lib/channel.service.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, UserResponse } from 'stream-chat';
|
|
4
|
-
import { ChatClientService,
|
|
5
|
-
import { MessageReactionType } from './
|
|
6
|
-
import { AttachmentUpload, StreamMessage } from './types';
|
|
4
|
+
import { ChatClientService, ClientEvent } from './chat-client.service';
|
|
5
|
+
import { AttachmentUpload, MessageReactionType, StreamMessage } from './types';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
/**
|
|
9
8
|
* The `ChannelService` provides data and interaction for the channel list and message list. TEST
|
|
@@ -86,15 +85,15 @@ export declare class ChannelService {
|
|
|
86
85
|
/**
|
|
87
86
|
* Custom event handler to call if a new message received from a channel that is not being watched, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
88
87
|
*/
|
|
89
|
-
customNewMessageNotificationHandler?: (
|
|
88
|
+
customNewMessageNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels: (Channel | ChannelResponse)[]) => void) => void;
|
|
90
89
|
/**
|
|
91
90
|
* Custom event handler to call when the user is added to a channel, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
92
91
|
*/
|
|
93
|
-
customAddedToChannelNotificationHandler?: (
|
|
92
|
+
customAddedToChannelNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels: (Channel | ChannelResponse)[]) => void) => void;
|
|
94
93
|
/**
|
|
95
94
|
* Custom event handler to call when the user is removed from a channel, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
96
95
|
*/
|
|
97
|
-
customRemovedFromChannelNotificationHandler?: (
|
|
96
|
+
customRemovedFromChannelNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels: (Channel | ChannelResponse)[]) => void) => void;
|
|
98
97
|
/**
|
|
99
98
|
* Custom event handler to call when a channel is deleted, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
100
99
|
*/
|
|
@@ -4,7 +4,7 @@ import { Channel, ChannelResponse, OwnUserResponse, UserResponse } from 'stream-
|
|
|
4
4
|
import { AppSettings, Event, StreamChat, TokenOrProvider } from 'stream-chat';
|
|
5
5
|
import { NotificationService } from './notification.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type ClientEvent = {
|
|
8
8
|
eventType: string;
|
|
9
9
|
event: Event;
|
|
10
10
|
};
|
|
@@ -19,12 +19,12 @@ export declare class ChatClientService {
|
|
|
19
19
|
*/
|
|
20
20
|
chatClient: StreamChat;
|
|
21
21
|
/**
|
|
22
|
-
* Emits [`
|
|
22
|
+
* Emits [`ClientEvent`](https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/chat-client.service.ts) events. The platform documentation covers [the list of client, user presence and notification events](https://getstream.io/chat/docs/javascript/event_object/?language=javascript).
|
|
23
23
|
* :::important
|
|
24
24
|
* For performance reasons this Observable operates outside of the Angular change detection zone. If you subscribe to it, you need to manually reenter Angular's change detection zone, our [Change detection guide](../concepts/change-detection.mdx) explains this in detail.
|
|
25
25
|
* :::
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
events$: Observable<ClientEvent>;
|
|
28
28
|
/**
|
|
29
29
|
* Emits the current [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript). Since getting the application settings is an expensive API call and we don't always need the result, this is not initialized by default, you need to call `getApplicationSettings` to load them.
|
|
30
30
|
*/
|
|
@@ -1,47 +1,131 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { ChannelActionsContext, ChannelPreviewContext, CommandAutocompleteListItemContext, EmojiPickerContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageContext, MessageInputContext, TypingIndicatorContext } from './types';
|
|
3
|
+
import { AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelPreviewContext, CommandAutocompleteListItemContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ThreadHeaderContext, TypingIndicatorContext } from './types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
|
-
* A central location for registering your custom templates to override parts of the chat application
|
|
6
|
+
* A central location for registering your custom templates to override parts of the chat application.
|
|
7
|
+
*
|
|
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).
|
|
7
9
|
*/
|
|
8
10
|
export declare class CustomTemplatesService {
|
|
9
11
|
/**
|
|
10
|
-
* The autocomplete list item template for mentioning users
|
|
12
|
+
* The autocomplete list item template for mentioning users (used in the [`AutocompleteTextareaComponent`](../components/AutocompleteTextareaComponent.mdx))
|
|
11
13
|
*/
|
|
12
14
|
mentionAutocompleteItemTemplate$: BehaviorSubject<TemplateRef<MentionAutcompleteListItemContext> | undefined>;
|
|
13
15
|
/**
|
|
14
|
-
* The autocomplete list item template for commands
|
|
16
|
+
* The autocomplete list item template for commands (used in the [`AutocompleteTextareaComponent`](../components/AutocompleteTextareaComponent.mdx))
|
|
17
|
+
*
|
|
18
|
+
* 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).
|
|
15
19
|
*/
|
|
16
20
|
commandAutocompleteItemTemplate$: BehaviorSubject<TemplateRef<CommandAutocompleteListItemContext> | undefined>;
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* Template used to display an item in the [channel list](../components/ChannelListComponent.mdx) (instead of the default [channal list item](../components/ChannelPreviewComponent.mdx))
|
|
23
|
+
*
|
|
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).
|
|
19
25
|
*/
|
|
20
26
|
channelPreviewTemplate$: BehaviorSubject<TemplateRef<ChannelPreviewContext> | undefined>;
|
|
21
27
|
/**
|
|
22
|
-
* The message input template used when editing a message
|
|
28
|
+
* The message input template used when editing a message (instead of the [default message input](../components/MessageInputComponent.mdx))
|
|
29
|
+
*
|
|
30
|
+
* 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).
|
|
23
31
|
*/
|
|
24
32
|
messageInputTemplate$: BehaviorSubject<TemplateRef<MessageInputContext> | undefined>;
|
|
25
33
|
/**
|
|
26
|
-
* The template used for displaying a mention inside a message
|
|
34
|
+
* The template used for displaying a [mention inside a message](../code-examples/mention-actions.mdx)
|
|
35
|
+
*
|
|
36
|
+
* 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).
|
|
27
37
|
*/
|
|
28
38
|
mentionTemplate$: BehaviorSubject<TemplateRef<MentionTemplateContext> | undefined>;
|
|
29
39
|
/**
|
|
30
|
-
* The template for emoji picker
|
|
40
|
+
* The template for [emoji picker](../code-examples/emoji-picker.mdx)
|
|
41
|
+
*
|
|
42
|
+
* 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).
|
|
31
43
|
*/
|
|
32
44
|
emojiPickerTemplate$: BehaviorSubject<TemplateRef<EmojiPickerContext> | undefined>;
|
|
33
45
|
/**
|
|
34
|
-
* The typing indicator template used in the message list
|
|
46
|
+
* The typing indicator template used in the [message list](../components/MessageListComponent.mdx)
|
|
47
|
+
*
|
|
48
|
+
* 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).
|
|
35
49
|
*/
|
|
36
50
|
typingIndicatorTemplate$: BehaviorSubject<TemplateRef<TypingIndicatorContext> | undefined>;
|
|
37
51
|
/**
|
|
38
|
-
* The template used to display a message in the message list
|
|
52
|
+
* The template used to display a message in the [message list](../components/MessageListComponent.mdx) (instead of the [default message component](../components/MessageComponent.mdx))
|
|
53
|
+
*
|
|
54
|
+
* 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).
|
|
39
55
|
*/
|
|
40
56
|
messageTemplate$: BehaviorSubject<TemplateRef<MessageContext> | undefined>;
|
|
41
57
|
/**
|
|
42
|
-
* The template for channel actions
|
|
58
|
+
* The template for channel actions displayed in the [channel header](../components/ChannelHeaderComponent.mdx) (by default no channel action is displayed)
|
|
59
|
+
*
|
|
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).
|
|
43
61
|
*/
|
|
44
62
|
channelActionsTemplate$: BehaviorSubject<TemplateRef<ChannelActionsContext> | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* The template used to display attachments of a [message](../components/MessageComponent.mdx) (instead of the [default attachment list](../components/AttachmentListComponent.mdx))
|
|
65
|
+
*
|
|
66
|
+
* 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).
|
|
67
|
+
*/
|
|
68
|
+
attachmentListTemplate$: BehaviorSubject<TemplateRef<AttachmentListContext> | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* The template used to display attachments in the [message input](../components/MessageInputComponent.mdx) component (instead of the [default attachment preview](../components/AttachmentPreviewListComponent.mdx))
|
|
71
|
+
*
|
|
72
|
+
* 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).
|
|
73
|
+
*/
|
|
74
|
+
attachmentPreviewListTemplate$: BehaviorSubject<TemplateRef<AttachmentPreviewListContext> | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* The template used to display avatars for channels and users (instead of the [default avatar](../components/AvatarComponent.mdx))
|
|
77
|
+
*
|
|
78
|
+
* 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).
|
|
79
|
+
*/
|
|
80
|
+
avatarTemplate$: BehaviorSubject<TemplateRef<AvatarContext> | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* Template for displaying icons (instead of the [default icon component](../components/IconComponent.mdx))
|
|
83
|
+
*
|
|
84
|
+
* 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).
|
|
85
|
+
*/
|
|
86
|
+
iconTemplate$: BehaviorSubject<TemplateRef<IconContext> | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* Template for displaying the loading indicator (instead of the [default loading indicator](../components/LoadingIndicatorComponent.mdx))
|
|
89
|
+
*
|
|
90
|
+
* 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).
|
|
91
|
+
*/
|
|
92
|
+
loadingIndicatorTemplate$: BehaviorSubject<TemplateRef<LoadingIndicatorContext> | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* Template for displaying the message actions box (instead of the [default message actions box](../components/MessageActionsBoxComponent.mdx))
|
|
95
|
+
*
|
|
96
|
+
* 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).
|
|
97
|
+
*/
|
|
98
|
+
messageActionsBoxTemplate$: BehaviorSubject<TemplateRef<MessageActionsBoxContext> | undefined>;
|
|
99
|
+
/**
|
|
100
|
+
* The template used for displaying an item in the [message actions box](../components/MessageActionsBoxComponent.mdx)
|
|
101
|
+
*
|
|
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
|
+
*/
|
|
104
|
+
messageActionsBoxItemTemplate$: BehaviorSubject<TemplateRef<MessageActionBoxItemContext> | undefined>;
|
|
105
|
+
/**
|
|
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
|
+
*
|
|
108
|
+
* 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).
|
|
109
|
+
*/
|
|
110
|
+
messageReactionsTemplate$: BehaviorSubject<TemplateRef<MessageReactionsContext> | undefined>;
|
|
111
|
+
/**
|
|
112
|
+
* The template used to display a modal window (instead of the [default modal](../components/ModalComponent.mdx))
|
|
113
|
+
*
|
|
114
|
+
* 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).
|
|
115
|
+
*/
|
|
116
|
+
modalTemplate$: BehaviorSubject<TemplateRef<ModalContext> | undefined>;
|
|
117
|
+
/**
|
|
118
|
+
* The template used to override the [default notification component](../components/NotificationComponent.mdx)
|
|
119
|
+
*
|
|
120
|
+
* 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).
|
|
121
|
+
*/
|
|
122
|
+
notificationTemplate$: BehaviorSubject<TemplateRef<NotificationContext> | undefined>;
|
|
123
|
+
/**
|
|
124
|
+
* The template used for header of a [thread](../components/ThreadComponent.mdx)
|
|
125
|
+
*
|
|
126
|
+
* 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).
|
|
127
|
+
*/
|
|
128
|
+
threadHeaderTemplate$: BehaviorSubject<TemplateRef<ThreadHeaderContext> | undefined>;
|
|
45
129
|
constructor();
|
|
46
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService, never>;
|
|
47
131
|
static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
2
|
+
import { Icon } from '../icon/icon.component';
|
|
3
|
+
import { IconContext } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* The `IconPlaceholder` component displays the [default icons](./IconComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This componet is used by the SDK internally, you likely won't need to use it.
|
|
7
|
+
*/
|
|
8
|
+
export declare class IconPlaceholderComponent {
|
|
9
|
+
customTemplatesService: CustomTemplatesService;
|
|
10
|
+
/**
|
|
11
|
+
* The icon to display, the list of [supported icons](https://github.com/GetStream/stream-chat-angular/tree/master/projects/stream-chat-angular/src/lib/icon/icon.component.ts) can be found on GitHub.
|
|
12
|
+
*/
|
|
13
|
+
icon: Icon | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The size of the icon (in pixels)
|
|
16
|
+
*/
|
|
17
|
+
size: number | undefined;
|
|
18
|
+
constructor(customTemplatesService: CustomTemplatesService);
|
|
19
|
+
getIconContext(): IconContext;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconPlaceholderComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconPlaceholderComponent, "stream-icon-placeholder", never, { "icon": "icon"; "size": "size"; }, {}, never, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
2
|
+
import { LoadingIndicatorContext } from '../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* The `LoadingInficatorPlaceholder` component displays the [default loading indicator](./LoadingIndicatorComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This componet is used by the SDK internally, you likely won't need to use it.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LoadingIndicatorPlaceholderComponent {
|
|
8
|
+
customTemplatesService: CustomTemplatesService;
|
|
9
|
+
/**
|
|
10
|
+
* The size of the indicator (in pixels)
|
|
11
|
+
*/
|
|
12
|
+
size: number;
|
|
13
|
+
/**
|
|
14
|
+
* The color of the indicator
|
|
15
|
+
*/
|
|
16
|
+
color: string;
|
|
17
|
+
constructor(customTemplatesService: CustomTemplatesService);
|
|
18
|
+
getLoadingIndicatorContext(): LoadingIndicatorContext;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingIndicatorPlaceholderComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingIndicatorPlaceholderComponent, "stream-loading-indicator-placeholder", never, { "size": "size"; "color": "color"; }, {}, never, never>;
|
|
21
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TemplateRef, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
|
|
1
|
+
import { TemplateRef, OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { UserResponse } from 'stream-chat';
|
|
3
3
|
import { ChannelService } from '../channel.service';
|
|
4
4
|
import { ChatClientService } from '../chat-client.service';
|
|
5
|
-
import { DefaultUserType, MentionTemplateContext, StreamMessage } from '../types';
|
|
5
|
+
import { AttachmentListContext, DefaultUserType, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, StreamMessage } from '../types';
|
|
6
6
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
declare type MessagePart = {
|
|
@@ -13,10 +13,11 @@ declare type MessagePart = {
|
|
|
13
13
|
/**
|
|
14
14
|
* The `Message` component displays a message with additional information such as sender and date, and enables [interaction with the message (i.e. edit or react)](../concepts/message-interactions.mdx).
|
|
15
15
|
*/
|
|
16
|
-
export declare class MessageComponent implements OnChanges, OnDestroy {
|
|
16
|
+
export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
|
|
17
17
|
private chatClientService;
|
|
18
18
|
private channelService;
|
|
19
19
|
private customTemplatesService;
|
|
20
|
+
private cdRef;
|
|
20
21
|
/**
|
|
21
22
|
* The message to be displayed
|
|
22
23
|
*/
|
|
@@ -42,10 +43,14 @@ export declare class MessageComponent implements OnChanges, OnDestroy {
|
|
|
42
43
|
visibleMessageActionsCount: number;
|
|
43
44
|
messageTextParts: MessagePart[];
|
|
44
45
|
mentionTemplate: TemplateRef<MentionTemplateContext> | undefined;
|
|
46
|
+
attachmentListTemplate: TemplateRef<AttachmentListContext> | undefined;
|
|
47
|
+
messageActionsBoxTemplate: TemplateRef<MessageActionsBoxContext> | undefined;
|
|
48
|
+
messageReactionsTemplate: TemplateRef<MessageReactionsContext> | undefined;
|
|
45
49
|
private user;
|
|
46
50
|
private subscriptions;
|
|
47
51
|
private container;
|
|
48
|
-
constructor(chatClientService: ChatClientService, channelService: ChannelService, customTemplatesService: CustomTemplatesService);
|
|
52
|
+
constructor(chatClientService: ChatClientService, channelService: ChannelService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef);
|
|
53
|
+
ngOnInit(): void;
|
|
49
54
|
ngOnChanges(changes: SimpleChanges): void;
|
|
50
55
|
ngOnDestroy(): void;
|
|
51
56
|
get isSentByCurrentUser(): boolean;
|
|
@@ -63,10 +68,13 @@ export declare class MessageComponent implements OnChanges, OnDestroy {
|
|
|
63
68
|
};
|
|
64
69
|
get canDisplayReadStatus(): boolean;
|
|
65
70
|
get quotedMessageAttachments(): import("stream-chat").Attachment<import("../types").DefaultAttachmentType>[];
|
|
71
|
+
getAttachmentListContext(): AttachmentListContext;
|
|
72
|
+
getMessageReactionsContext(): MessageReactionsContext;
|
|
66
73
|
resendMessage(): void;
|
|
67
74
|
textClicked(): void;
|
|
68
75
|
setAsActiveParentMessage(): void;
|
|
69
76
|
getMentionContext(messagePart: MessagePart): MentionTemplateContext;
|
|
77
|
+
getMessageActionsBoxContext(): MessageActionsBoxContext;
|
|
70
78
|
private createMessageParts;
|
|
71
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
|
|
72
80
|
static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "message": "message"; "enabledMessageActions": "enabledMessageActions"; "isLastSentMessage": "isLastSentMessage"; "mode": "mode"; }, {}, never, never>;
|
|
@@ -4,7 +4,7 @@ import { ChannelService } from '../channel.service';
|
|
|
4
4
|
import { ChatClientService } from '../chat-client.service';
|
|
5
5
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
6
6
|
import { NotificationService } from '../notification.service';
|
|
7
|
-
import { MessageInputContext, StreamMessage } from '../types';
|
|
7
|
+
import { MessageActionBoxItemContext, MessageActionItem, MessageInputContext, ModalContext, StreamMessage } from '../types';
|
|
8
8
|
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.
|
|
@@ -40,26 +40,22 @@ export declare class MessageActionsBoxComponent implements OnChanges, OnDestroy
|
|
|
40
40
|
readonly isEditing: EventEmitter<boolean>;
|
|
41
41
|
isEditModalOpen: boolean;
|
|
42
42
|
messageInputTemplate: TemplateRef<MessageInputContext> | undefined;
|
|
43
|
+
messageActionItemTemplate: TemplateRef<MessageActionBoxItemContext> | undefined;
|
|
44
|
+
modalTemplate: TemplateRef<ModalContext> | undefined;
|
|
43
45
|
subscriptions: Subscription[];
|
|
46
|
+
visibleMessageActionItems: MessageActionItem[];
|
|
47
|
+
private readonly messageActionItems;
|
|
44
48
|
private messageInput;
|
|
49
|
+
private modalContent;
|
|
45
50
|
constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService, customTemplatesService: CustomTemplatesService);
|
|
46
51
|
ngOnChanges(changes: SimpleChanges): void;
|
|
47
52
|
ngOnDestroy(): void;
|
|
48
|
-
|
|
49
|
-
get isEditVisible(): boolean;
|
|
50
|
-
get isDeleteVisible(): boolean;
|
|
51
|
-
get isMuteVisible(): boolean;
|
|
52
|
-
get isFlagVisible(): boolean;
|
|
53
|
-
get isPinVisible(): boolean;
|
|
54
|
-
pinClicked(): void;
|
|
55
|
-
flagClicked(): Promise<void>;
|
|
56
|
-
muteClicked(): void;
|
|
57
|
-
quoteClicked(): void;
|
|
58
|
-
editClicked(): void;
|
|
53
|
+
getActionLabel(actionLabelOrTranslationKey: (() => string) | string): string;
|
|
59
54
|
sendClicked(): void;
|
|
60
55
|
modalClosed: () => void;
|
|
61
56
|
getMessageInputContext(): MessageInputContext;
|
|
62
|
-
|
|
57
|
+
getEditModalContext(): ModalContext;
|
|
58
|
+
trackByActionName(_: number, item: MessageActionItem): "mute" | "delete" | "flag" | "quote" | "pin" | "edit";
|
|
63
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageActionsBoxComponent, never>;
|
|
64
60
|
static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "isOpen": "isOpen"; "isMine": "isMine"; "message": "message"; "enabledActions": "enabledActions"; }, { "displayedActionsCount": "displayedActionsCount"; "isEditing": "isEditing"; }, never, never>;
|
|
65
61
|
}
|
|
@@ -5,7 +5,7 @@ import { UserResponse } from 'stream-chat';
|
|
|
5
5
|
import { AttachmentService } from '../attachment.service';
|
|
6
6
|
import { ChannelService } from '../channel.service';
|
|
7
7
|
import { NotificationService } from '../notification.service';
|
|
8
|
-
import { AttachmentUpload, EmojiPickerContext, StreamMessage } from '../types';
|
|
8
|
+
import { AttachmentPreviewListContext, AttachmentUpload, EmojiPickerContext, StreamMessage } from '../types';
|
|
9
9
|
import { MessageInputConfigService } from './message-input-config.service';
|
|
10
10
|
import { TextareaInterface } from './textarea.interface';
|
|
11
11
|
import { EmojiInputService } from './emoji-input.service';
|
|
@@ -65,6 +65,7 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
65
65
|
cooldown$: Observable<number> | undefined;
|
|
66
66
|
isCooldownInProgress: boolean;
|
|
67
67
|
emojiPickerTemplate: TemplateRef<EmojiPickerContext> | undefined;
|
|
68
|
+
attachmentPreviewListTemplate: TemplateRef<AttachmentPreviewListContext> | undefined;
|
|
68
69
|
private fileInput;
|
|
69
70
|
private textareaAnchor;
|
|
70
71
|
private subscriptions;
|
|
@@ -84,6 +85,9 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
84
85
|
filesSelected(fileList: FileList | null): Promise<void>;
|
|
85
86
|
deselectMessageToQuote(): void;
|
|
86
87
|
getEmojiPickerContext(): EmojiPickerContext;
|
|
88
|
+
getAttachmentPreviewListContext(): AttachmentPreviewListContext;
|
|
89
|
+
private deleteUpload;
|
|
90
|
+
private retryUpload;
|
|
87
91
|
private clearFileInput;
|
|
88
92
|
private get isUpdate();
|
|
89
93
|
private initTextarea;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AfterViewChecked, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ReactionResponse } from 'stream-chat';
|
|
3
3
|
import { ChannelService } from '../channel.service';
|
|
4
|
-
import { DefaultReactionType, DefaultUserType } from '../types';
|
|
4
|
+
import { DefaultReactionType, DefaultUserType, MessageReactionType } from '../types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare type MessageReactionType = 'angry' | 'haha' | 'like' | 'love' | 'sad' | 'wow';
|
|
7
6
|
/**
|
|
8
7
|
* The `MessageReactions` component displays the reactions of a message, the current user can add and remove reactions. You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation.
|
|
9
8
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* The `Modal` component displays its content in an overlay. The modal can be closed with a close button, if the user clicks outside of the modal content, or if the escape button is pressed. The modal can also be closed from outside.
|
|
@@ -8,11 +8,15 @@ export declare class ModalComponent implements OnChanges {
|
|
|
8
8
|
* If `true` the modal will be displayed, if `false` the modal will be hidden
|
|
9
9
|
*/
|
|
10
10
|
isOpen: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The content of the modal (can also be provided using `ng-content`)
|
|
13
|
+
*/
|
|
14
|
+
content: TemplateRef<void> | undefined;
|
|
11
15
|
/**
|
|
12
16
|
* Emits `true` if the modal becomes visible, and `false` if the modal is closed.
|
|
13
17
|
*/
|
|
14
18
|
readonly isOpenChange: EventEmitter<boolean>;
|
|
15
|
-
private
|
|
19
|
+
private innerContainer;
|
|
16
20
|
constructor();
|
|
17
21
|
ngOnChanges(changes: SimpleChanges): void;
|
|
18
22
|
close(): void;
|
|
@@ -21,5 +25,5 @@ export declare class ModalComponent implements OnChanges {
|
|
|
21
25
|
private watchForOutsideClicks;
|
|
22
26
|
private stopWatchForOutsideClicks;
|
|
23
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "stream-modal", never, { "isOpen": "isOpen"; }, { "isOpenChange": "isOpenChange"; }, never, ["*"]>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "stream-modal", never, { "isOpen": "isOpen"; "content": "content"; }, { "isOpenChange": "isOpenChange"; }, never, ["*"]>;
|
|
25
29
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import { NotificationType } from '../types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
@@ -8,7 +9,11 @@ export declare class NotificationComponent {
|
|
|
8
9
|
* The type of the notification
|
|
9
10
|
*/
|
|
10
11
|
type: NotificationType | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* The content of the notification (can also be provided using `ng-content`)
|
|
14
|
+
*/
|
|
15
|
+
content: TemplateRef<void> | undefined;
|
|
11
16
|
constructor();
|
|
12
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "stream-notification", never, { "type": "type"; }, {}, never, ["*"]>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "stream-notification", never, { "type": "type"; "content": "content"; }, {}, never, ["*"]>;
|
|
14
19
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
2
3
|
import { NotificationService } from '../notification.service';
|
|
3
4
|
import { NotificationPayload } from '../types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
@@ -6,11 +7,12 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
* The `NotificationList` component displays the list of active notifications.
|
|
7
8
|
*/
|
|
8
9
|
export declare class NotificationListComponent {
|
|
10
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
9
11
|
private notificationService;
|
|
10
12
|
notifications$: Observable<NotificationPayload[]>;
|
|
11
|
-
constructor(notificationService: NotificationService);
|
|
13
|
+
constructor(customTemplatesService: CustomTemplatesService, notificationService: NotificationService);
|
|
12
14
|
trackById(_: number, item: NotificationPayload): string;
|
|
13
|
-
|
|
15
|
+
getNotificationContentContext(notification: NotificationPayload): {
|
|
14
16
|
dismissFn: Function;
|
|
15
17
|
};
|
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationListComponent, never>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./avatar/avatar.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "@
|
|
3
|
+
import * as i2 from "./avatar-placeholder/avatar-placeholder.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@ngx-translate/core";
|
|
5
6
|
export declare class StreamAvatarModule {
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<StreamAvatarModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamAvatarModule, [typeof i1.AvatarComponent], [typeof
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamAvatarModule, [typeof i1.AvatarComponent, typeof i2.AvatarPlaceholderComponent], [typeof i3.CommonModule, typeof i4.TranslateModule], [typeof i1.AvatarComponent, typeof i2.AvatarPlaceholderComponent]>;
|
|
8
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<StreamAvatarModule>;
|
|
9
10
|
}
|
|
@@ -17,11 +17,13 @@ import * as i15 from "./attachment-preview-list/attachment-preview-list.componen
|
|
|
17
17
|
import * as i16 from "./modal/modal.component";
|
|
18
18
|
import * as i17 from "./message-input/textarea.directive";
|
|
19
19
|
import * as i18 from "./thread/thread.component";
|
|
20
|
-
import * as i19 from "
|
|
21
|
-
import * as i20 from "
|
|
22
|
-
import * as i21 from "
|
|
20
|
+
import * as i19 from "./icon-placeholder/icon-placeholder.component";
|
|
21
|
+
import * as i20 from "./loading-indicator-placeholder/loading-indicator-placeholder.component";
|
|
22
|
+
import * as i21 from "@angular/common";
|
|
23
|
+
import * as i22 from "@ngx-translate/core";
|
|
24
|
+
import * as i23 from "./stream-avatar.module";
|
|
23
25
|
export declare class StreamChatModule {
|
|
24
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<StreamChatModule, never>;
|
|
25
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamChatModule, [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i17.TextareaDirective, typeof i18.ThreadComponent], [typeof
|
|
27
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamChatModule, [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i17.TextareaDirective, typeof i18.ThreadComponent, typeof i19.IconPlaceholderComponent, typeof i20.LoadingIndicatorPlaceholderComponent], [typeof i21.CommonModule, typeof i22.TranslateModule, typeof i23.StreamAvatarModule], [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i23.StreamAvatarModule, typeof i18.ThreadComponent, typeof i19.IconPlaceholderComponent, typeof i20.LoadingIndicatorPlaceholderComponent]>;
|
|
26
28
|
static ɵinj: i0.ɵɵInjectorDeclaration<StreamChatModule>;
|
|
27
29
|
}
|