stream-chat-angular 5.0.0-v5.8 → 5.0.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/i18n/en.d.ts +1 -0
- package/assets/version.d.ts +1 -1
- package/esm2020/assets/i18n/en.mjs +3 -2
- package/esm2020/assets/version.mjs +2 -2
- package/esm2020/lib/attachment-list/attachment-list.component.mjs +3 -3
- package/esm2020/lib/attachment-preview-list/attachment-preview-list.component.mjs +3 -3
- package/esm2020/lib/attachment.service.mjs +103 -7
- package/esm2020/lib/avatar/avatar.component.mjs +3 -9
- package/esm2020/lib/avatar-placeholder/avatar-placeholder.component.mjs +3 -11
- package/esm2020/lib/channel/channel.component.mjs +5 -6
- package/esm2020/lib/channel-header/channel-header.component.mjs +3 -3
- package/esm2020/lib/channel-list/channel-list.component.mjs +5 -6
- package/esm2020/lib/channel-preview/channel-preview.component.mjs +3 -3
- package/esm2020/lib/channel-query.mjs +77 -0
- package/esm2020/lib/channel.service.mjs +197 -135
- package/esm2020/lib/chat-client.service.mjs +33 -11
- package/esm2020/lib/custom-templates.service.mjs +6 -10
- package/esm2020/lib/icon/icon.component.mjs +3 -7
- package/esm2020/lib/icon-placeholder/icon-placeholder.component.mjs +4 -7
- package/esm2020/lib/loading-indicator/loading-indicator.component.mjs +6 -22
- package/esm2020/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.mjs +5 -23
- package/esm2020/lib/message/message.component.mjs +129 -16
- package/esm2020/lib/message-actions-box/message-actions-box.component.mjs +39 -14
- package/esm2020/lib/message-actions.service.mjs +66 -2
- package/esm2020/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.mjs +16 -6
- package/esm2020/lib/message-input/message-input.component.mjs +76 -74
- package/esm2020/lib/message-input/textarea/textarea.component.mjs +13 -1
- package/esm2020/lib/message-list/message-list.component.mjs +83 -15
- package/esm2020/lib/message-reactions/message-reactions.component.mjs +7 -78
- package/esm2020/lib/message-reactions-selector/message-reactions-selector.component.mjs +61 -0
- package/esm2020/lib/message-reactions.service.mjs +3 -4
- package/esm2020/lib/modal/modal.component.mjs +1 -1
- package/esm2020/lib/stream-chat.module.mjs +8 -8
- package/esm2020/lib/thread/thread.component.mjs +3 -3
- package/esm2020/lib/types.mjs +1 -1
- package/esm2020/lib/voice-recording/voice-recording.component.mjs +3 -3
- package/esm2020/public-api.mjs +3 -2
- package/fesm2015/stream-chat-angular.mjs +2747 -2338
- package/fesm2015/stream-chat-angular.mjs.map +1 -1
- package/fesm2020/stream-chat-angular.mjs +2687 -2284
- package/fesm2020/stream-chat-angular.mjs.map +1 -1
- package/lib/attachment.service.d.ts +11 -4
- package/lib/avatar/avatar.component.d.ts +1 -5
- package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +1 -5
- package/lib/channel-query.d.ts +26 -0
- package/lib/channel.service.d.ts +86 -57
- package/lib/chat-client.service.d.ts +7 -3
- package/lib/custom-templates.service.d.ts +8 -12
- package/lib/icon/icon.component.d.ts +2 -6
- package/lib/icon-placeholder/icon-placeholder.component.d.ts +1 -5
- package/lib/loading-indicator/loading-indicator.component.d.ts +1 -10
- package/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +1 -11
- package/lib/message/message.component.d.ts +31 -9
- package/lib/message-actions-box/message-actions-box.component.d.ts +11 -6
- package/lib/message-actions.service.d.ts +3 -2
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +1 -0
- package/lib/message-input/message-input.component.d.ts +19 -7
- package/lib/message-input/textarea/textarea.component.d.ts +1 -0
- package/lib/message-list/message-list.component.d.ts +11 -6
- package/lib/message-reactions/message-reactions.component.d.ts +6 -30
- package/lib/message-reactions-selector/message-reactions-selector.component.d.ts +35 -0
- package/lib/stream-chat.module.d.ts +5 -5
- package/lib/types.d.ts +28 -29
- package/package.json +5 -5
- package/public-api.d.ts +2 -1
- package/src/assets/assets/EmojiOneColor.woff2 +0 -0
- package/src/assets/assets/NotoColorEmoji-flags.woff2 +0 -0
- package/src/assets/assets/Poweredby_100px-White_VertText.png +0 -0
- package/src/assets/assets/icons/stream-chat-icons.eot +0 -0
- package/src/assets/assets/icons/stream-chat-icons.svg +46 -0
- package/src/assets/assets/icons/stream-chat-icons.ttf +0 -0
- package/src/assets/assets/icons/stream-chat-icons.woff +0 -0
- package/src/assets/assets/icons/stream-chat-icons.woff2 +0 -0
- package/src/assets/assets/str-chat__reaction-list-sprite@1x.png +0 -0
- package/src/assets/assets/str-chat__reaction-list-sprite@2x.png +0 -0
- package/src/assets/assets/str-chat__reaction-list-sprite@3x.png +0 -0
- package/src/assets/i18n/en.ts +2 -1
- package/src/assets/styles/css/index.css +2 -2
- package/src/assets/styles/css/index.layout.css +2 -2
- package/src/assets/styles/scss/AttachmentList/AttachmentList-layout.scss +74 -12
- package/src/assets/styles/scss/AttachmentList/AttachmentList-theme.scss +52 -0
- package/src/assets/styles/scss/AttachmentPreviewList/AttachmentPreviewList-layout.scss +24 -9
- package/src/assets/styles/scss/AttachmentPreviewList/AttachmentPreviewList-theme.scss +29 -0
- package/src/assets/styles/scss/AudioRecorder/AudioRecorder-layout.scss +89 -0
- package/src/assets/styles/scss/AudioRecorder/AudioRecorder-theme.scss +51 -0
- package/src/assets/styles/scss/Autocomplete/Autocomplete-layout.scss +1 -1
- package/src/assets/styles/scss/Avatar/Avatar-layout.scss +46 -0
- package/src/assets/styles/scss/Channel/Channel-layout.scss +1 -0
- package/src/assets/styles/scss/Channel/Channel-theme.scss +1 -0
- package/src/assets/styles/scss/ChannelList/ChannelList-layout.scss +2 -2
- package/src/assets/styles/scss/ChannelList/ChannelList-theme.scss +4 -2
- package/src/assets/styles/scss/ChannelPreview/ChannelPreview-layout.scss +2 -0
- package/src/assets/styles/scss/ChannelPreview/ChannelPreview-theme.scss +1 -0
- package/src/assets/styles/scss/EditMessageForm/EditMessageForm-theme.scss +9 -9
- package/src/assets/styles/scss/Icon/Icon-layout.scss +87 -0
- package/src/assets/styles/scss/Icon/Icon-theme.scss +13 -0
- package/src/assets/styles/scss/ImageCarousel/ImageCarousel-layout.scss +1 -0
- package/src/assets/styles/scss/ImageCarousel/ImageCarousel-theme.scss +1 -0
- package/src/assets/styles/scss/LoadingIndicator/LoadingIndicator-layout.scss +10 -1
- package/src/assets/styles/scss/LoadingIndicator/LoadingIndicator-theme.scss +6 -4
- package/src/assets/styles/scss/Message/Message-layout.scss +45 -6
- package/src/assets/styles/scss/Message/Message-theme.scss +6 -0
- package/src/assets/styles/scss/MessageInput/MessageInput-layout.scss +33 -1
- package/src/assets/styles/scss/MessageInput/MessageInput-theme.scss +65 -2
- package/src/assets/styles/scss/MessageList/MessageList-theme.scss +2 -0
- package/src/assets/styles/scss/MessageReactions/MessageReactionsSelector-layout.scss +18 -0
- package/src/assets/styles/scss/MessageReactions/MessageReactionsSelector-theme.scss +5 -0
- package/src/assets/styles/scss/Modal/Modal-layout.scss +1 -0
- package/src/assets/styles/scss/Modal/Modal-theme.scss +6 -0
- package/src/assets/styles/scss/_base.scss +4 -2
- package/src/assets/styles/scss/_emoji-replacement.scss +4 -2
- package/src/assets/styles/scss/_icons.scss +24 -2
- package/src/assets/styles/scss/_variables.scss +2 -0
- package/src/assets/styles/scss/index.layout.scss +2 -0
- package/src/assets/styles/scss/index.scss +2 -0
- package/src/assets/version.ts +1 -1
- package/esm2020/lib/edit-message-form/edit-message-form.component.mjs +0 -83
- package/lib/edit-message-form/edit-message-form.component.d.ts +0 -31
|
@@ -3,13 +3,17 @@ import { Attachment } from 'stream-chat';
|
|
|
3
3
|
import { ChannelService } from './channel.service';
|
|
4
4
|
import { NotificationService } from './notification.service';
|
|
5
5
|
import { AttachmentUpload, DefaultStreamChatGenerics } from './types';
|
|
6
|
+
import { ChatClientService } from './chat-client.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* The `AttachmentService` manages the uploads of a message input.
|
|
10
|
+
*
|
|
11
|
+
* You can read more about [uploads](https://getstream.io/chat/docs/javascript/file_uploads/?language=javascript&q=size) in the Stream API documentation. You can use Stream's API or the dashboard to customize the [file](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript&q=size#file-uploads) and [image upload](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript&q=size#image-uploads) configuration.
|
|
9
12
|
*/
|
|
10
13
|
export declare class AttachmentService<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> {
|
|
11
14
|
private channelService;
|
|
12
15
|
private notificationService;
|
|
16
|
+
private chatClientService;
|
|
13
17
|
/**
|
|
14
18
|
* Emits the number of uploads in progress.
|
|
15
19
|
*/
|
|
@@ -20,17 +24,18 @@ export declare class AttachmentService<T extends DefaultStreamChatGenerics = Def
|
|
|
20
24
|
attachmentUploads$: Observable<AttachmentUpload[]>;
|
|
21
25
|
private attachmentUploadInProgressCounterSubject;
|
|
22
26
|
private attachmentUploadsSubject;
|
|
23
|
-
|
|
27
|
+
private appSettings;
|
|
28
|
+
constructor(channelService: ChannelService, notificationService: NotificationService, chatClientService: ChatClientService);
|
|
24
29
|
/**
|
|
25
30
|
* Resets the attachments uploads (for example after the message with the attachments sent successfully)
|
|
26
31
|
*/
|
|
27
32
|
resetAttachmentUploads(): void;
|
|
28
33
|
/**
|
|
29
34
|
* Uploads the selected files, and creates preview for image files. The result is propagated throught the `attachmentUploads$` stream.
|
|
30
|
-
* @param fileList The files selected by the user
|
|
31
|
-
* @returns A promise with the
|
|
35
|
+
* @param fileList The files selected by the user, if you have Blobs instead of Files, you can convert them with this method: https://developer.mozilla.org/en-US/docs/Web/API/File/File
|
|
36
|
+
* @returns A promise with true or false. If false is returned the upload was canceled because of a client side error. The error is emitted via the `NotificationService`.
|
|
32
37
|
*/
|
|
33
|
-
filesSelected(fileList: FileList | null): Promise<
|
|
38
|
+
filesSelected(fileList: FileList | File[] | null): Promise<boolean | undefined>;
|
|
34
39
|
/**
|
|
35
40
|
* You can add custom `image`, `video` and `file` attachments using this method.
|
|
36
41
|
*
|
|
@@ -61,6 +66,8 @@ export declare class AttachmentService<T extends DefaultStreamChatGenerics = Def
|
|
|
61
66
|
createFromAttachments(attachments: Attachment<T>[]): void;
|
|
62
67
|
private createPreview;
|
|
63
68
|
private uploadAttachments;
|
|
69
|
+
private areAttachmentsHaveValidExtension;
|
|
70
|
+
private areAttachmentsHaveValidSize;
|
|
64
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentService<any>, never>;
|
|
65
72
|
static ɵprov: i0.ɵɵInjectableDeclaration<AttachmentService<any>>;
|
|
66
73
|
}
|
|
@@ -18,10 +18,6 @@ export declare class AvatarComponent implements OnChanges, OnInit, OnChanges, Af
|
|
|
18
18
|
* The URL of the image to be displayed. If the image can't be displayed the first letter of the name input is displayed.
|
|
19
19
|
*/
|
|
20
20
|
imageUrl: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* The size in pixels of the avatar image.
|
|
23
|
-
*/
|
|
24
|
-
size: number;
|
|
25
21
|
/**
|
|
26
22
|
* The location the avatar will be displayed in
|
|
27
23
|
*/
|
|
@@ -63,5 +59,5 @@ export declare class AvatarComponent implements OnChanges, OnInit, OnChanges, Af
|
|
|
63
59
|
ngAfterViewInit(): void;
|
|
64
60
|
private getOtherMemberIfOneToOneChannel;
|
|
65
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
66
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "stream-avatar", never, { "name": "name"; "imageUrl": "imageUrl"; "
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "stream-avatar", never, { "name": "name"; "imageUrl": "imageUrl"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; "showOnlineIndicator": "showOnlineIndicator"; "initialsType": "initialsType"; }, {}, never, never, false, never>;
|
|
67
63
|
}
|
|
@@ -16,10 +16,6 @@ export declare class AvatarPlaceholderComponent implements OnChanges {
|
|
|
16
16
|
* The URL of the image to be displayed. If the image can't be displayed the first letter of the name input is displayed.
|
|
17
17
|
*/
|
|
18
18
|
imageUrl: string | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* The size in pixels of the avatar image.
|
|
21
|
-
*/
|
|
22
|
-
size: number;
|
|
23
19
|
/**
|
|
24
20
|
* The location the avatar will be displayed in
|
|
25
21
|
*/
|
|
@@ -48,5 +44,5 @@ export declare class AvatarPlaceholderComponent implements OnChanges {
|
|
|
48
44
|
constructor(customTemplatesService: CustomTemplatesService);
|
|
49
45
|
ngOnChanges(): void;
|
|
50
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarPlaceholderComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; "initialsType": "initialsType"; "showOnlineIndicator": "showOnlineIndicator"; }, {}, never, never, false, never>;
|
|
52
48
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Channel, ChannelFilters, ChannelOptions, ChannelSort } from 'stream-chat';
|
|
2
|
+
import { ChannelService } from './channel.service';
|
|
3
|
+
import { ChannelQueryResult, ChannelQueryType, DefaultStreamChatGenerics, NextPageConfiguration } from './types';
|
|
4
|
+
import { ChatClientService } from './chat-client.service';
|
|
5
|
+
/**
|
|
6
|
+
* This class allows you to make paginated channel query requests.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ChannelQuery<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> {
|
|
9
|
+
private chatService;
|
|
10
|
+
private channelService;
|
|
11
|
+
private filters;
|
|
12
|
+
private sort;
|
|
13
|
+
private options;
|
|
14
|
+
/**
|
|
15
|
+
* By default the SDK uses an offset based pagination, you can change/extend this by providing your own custom paginator method.
|
|
16
|
+
*
|
|
17
|
+
* The method will be called with the result of the latest channel query.
|
|
18
|
+
*
|
|
19
|
+
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](https://getstream.io/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
|
|
20
|
+
*/
|
|
21
|
+
customPaginator?: (channelQueryResult: Channel<T>[]) => NextPageConfiguration;
|
|
22
|
+
private nextPageConfiguration?;
|
|
23
|
+
constructor(chatService: ChatClientService<T>, channelService: ChannelService<T>, filters: ChannelFilters<T>, sort?: ChannelSort<T>, options?: ChannelOptions);
|
|
24
|
+
query(queryType: ChannelQueryType): Promise<ChannelQueryResult<T>>;
|
|
25
|
+
setNextPageConfiguration(channelQueryResult: Channel<T>[]): void;
|
|
26
|
+
}
|
package/lib/channel.service.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
-
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, FormatMessageResponse, MessageResponse,
|
|
3
|
+
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, FormatMessageResponse, MessageResponse, ReactionResponse, UserResponse } from 'stream-chat';
|
|
4
4
|
import { ChatClientService, ClientEvent } from './chat-client.service';
|
|
5
5
|
import { NotificationService } from './notification.service';
|
|
6
|
-
import { AttachmentUpload, ChannelQueryState, DefaultStreamChatGenerics, MessageInput, MessageReactionType, NextPageConfiguration, StreamMessage } from './types';
|
|
6
|
+
import { AttachmentUpload, ChannelQueryResult, ChannelQueryState, ChannelQueryType, DefaultStreamChatGenerics, MessageInput, MessageReactionType, NextPageConfiguration, StreamMessage } from './types';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* The `ChannelService` provides data and interaction for the channel list and message list.
|
|
@@ -22,25 +22,6 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
22
22
|
* :::important
|
|
23
23
|
* If you want to subscribe to channel events, you need to manually reenter Angular's change detection zone, our [Change detection guide](../concepts/change-detection.mdx) explains this in detail.
|
|
24
24
|
* :::
|
|
25
|
-
*
|
|
26
|
-
* Apart from pagination, the channel list is also updated on the following events:
|
|
27
|
-
*
|
|
28
|
-
* | Event type | Default behavior | Custom handler to override |
|
|
29
|
-
* | ----------------------------------- | ------------------------------------------------------------------ | --------------------------------------------- |
|
|
30
|
-
* | `channel.deleted` | Remove channel from the list | `customChannelDeletedHandler` |
|
|
31
|
-
* | `channel.hidden` | Remove channel from the list | `customChannelHiddenHandler` |
|
|
32
|
-
* | `channel.truncated` | Updates the channel | `customChannelTruncatedHandler` |
|
|
33
|
-
* | `channel.updated` | Updates the channel | `customChannelUpdatedHandler` |
|
|
34
|
-
* | `channel.visible` | Adds the channel to the list | `customChannelVisibleHandler` |
|
|
35
|
-
* | `message.new` | Moves the channel to top of the list | `customNewMessageHandler` |
|
|
36
|
-
* | `notification.added_to_channel` | Adds the new channel to the top of the list and starts watching it | `customAddedToChannelNotificationHandler` |
|
|
37
|
-
* | `notification.message_new` | Adds the new channel to the top of the list and starts watching it | `customNewMessageNotificationHandler` |
|
|
38
|
-
* | `notification.removed_from_channel` | Removes the channel from the list | `customRemovedFromChannelNotificationHandler` |
|
|
39
|
-
*
|
|
40
|
-
* It's important to note that filters don't apply to updates to the list from events.
|
|
41
|
-
*
|
|
42
|
-
* Our platform documentation covers the topic of [channel events](https://getstream.io/chat/docs/javascript/event_object/?language=javascript#events) in depth.
|
|
43
|
-
*
|
|
44
25
|
*/
|
|
45
26
|
channels$: Observable<Channel<T>[] | undefined>;
|
|
46
27
|
/**
|
|
@@ -122,40 +103,58 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
122
103
|
activeChannelUnreadCount?: number;
|
|
123
104
|
/**
|
|
124
105
|
* 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)
|
|
106
|
+
*
|
|
107
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
125
108
|
*/
|
|
126
|
-
customNewMessageNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels:
|
|
109
|
+
customNewMessageNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void) => void;
|
|
127
110
|
/**
|
|
128
|
-
* 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)
|
|
111
|
+
* 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).
|
|
112
|
+
*
|
|
113
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
129
114
|
*/
|
|
130
|
-
customAddedToChannelNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels:
|
|
115
|
+
customAddedToChannelNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void) => void;
|
|
131
116
|
/**
|
|
132
|
-
* 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)
|
|
117
|
+
* 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).
|
|
118
|
+
*
|
|
119
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
133
120
|
*/
|
|
134
|
-
customRemovedFromChannelNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels:
|
|
121
|
+
customRemovedFromChannelNotificationHandler?: (clientEvent: ClientEvent, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void) => void;
|
|
135
122
|
/**
|
|
136
|
-
* 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)
|
|
123
|
+
* 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).
|
|
124
|
+
*
|
|
125
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
137
126
|
*/
|
|
138
|
-
customChannelDeletedHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels:
|
|
127
|
+
customChannelDeletedHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void, messageListSetter: (messages: StreamMessage<T>[]) => void, threadListSetter: (messages: StreamMessage<T>[]) => void, parentMessageSetter: (message: StreamMessage<T> | undefined) => void) => void;
|
|
139
128
|
/**
|
|
140
|
-
* Custom event handler to call when a channel is updated, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
129
|
+
* Custom event handler to call when a channel is updated, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels).
|
|
130
|
+
*
|
|
131
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
141
132
|
*/
|
|
142
|
-
customChannelUpdatedHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels:
|
|
133
|
+
customChannelUpdatedHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void, messageListSetter: (messages: StreamMessage[]) => void, threadListSetter: (messages: StreamMessage[]) => void, parentMessageSetter: (message: StreamMessage | undefined) => void) => void;
|
|
143
134
|
/**
|
|
144
|
-
* Custom event handler to call when a channel is truncated, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
135
|
+
* Custom event handler to call when a channel is truncated, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels).
|
|
136
|
+
*
|
|
137
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
145
138
|
*/
|
|
146
|
-
customChannelTruncatedHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels:
|
|
139
|
+
customChannelTruncatedHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void, messageListSetter: (messages: StreamMessage<T>[]) => void, threadListSetter: (messages: StreamMessage<T>[]) => void, parentMessageSetter: (message: StreamMessage<T> | undefined) => void) => void;
|
|
147
140
|
/**
|
|
148
|
-
* Custom event handler to call when a channel becomes hidden, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
141
|
+
* Custom event handler to call when a channel becomes hidden, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels).
|
|
142
|
+
*
|
|
143
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
149
144
|
*/
|
|
150
|
-
customChannelHiddenHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels:
|
|
145
|
+
customChannelHiddenHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void, messageListSetter: (messages: StreamMessage<T>[]) => void, threadListSetter: (messages: StreamMessage<T>[]) => void, parentMessageSetter: (message: StreamMessage<T> | undefined) => void) => void;
|
|
151
146
|
/**
|
|
152
|
-
* Custom event handler to call when a channel becomes visible, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
147
|
+
* Custom event handler to call when a channel becomes visible, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels).
|
|
148
|
+
*
|
|
149
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
153
150
|
*/
|
|
154
|
-
customChannelVisibleHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels:
|
|
151
|
+
customChannelVisibleHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void, messageListSetter: (messages: StreamMessage<T>[]) => void, threadListSetter: (messages: StreamMessage<T>[]) => void, parentMessageSetter: (message: StreamMessage<T> | undefined) => void) => void;
|
|
155
152
|
/**
|
|
156
|
-
* Custom event handler to call if a new message received from a channel that is being watched, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
|
|
153
|
+
* Custom event handler to call if a new message received from a channel that is being watched, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels).
|
|
154
|
+
*
|
|
155
|
+
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
|
|
157
156
|
*/
|
|
158
|
-
customNewMessageHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels:
|
|
157
|
+
customNewMessageHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: Channel<T>[], shouldStopWatchingRemovedChannels?: boolean) => void, messageListSetter: (messages: StreamMessage<T>[]) => void, threadListSetter: (messages: StreamMessage<T>[]) => void, parentMessageSetter: (message: StreamMessage<T> | undefined) => void) => void;
|
|
159
158
|
/**
|
|
160
159
|
* You can override the default file upload request - you can use this to upload files to your own CDN
|
|
161
160
|
*/
|
|
@@ -189,15 +188,11 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
189
188
|
*/
|
|
190
189
|
beforeUpdateMessage?: (message: StreamMessage<T>) => StreamMessage<T> | Promise<StreamMessage<T>>;
|
|
191
190
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* The method will be called with the result of the latest channel query.
|
|
195
|
-
*
|
|
196
|
-
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](https://getstream.io/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
|
|
191
|
+
* @internal
|
|
197
192
|
*/
|
|
198
|
-
|
|
193
|
+
static readonly MAX_MESSAGE_COUNT_IN_MESSAGE_LIST = 250;
|
|
199
194
|
/**
|
|
200
|
-
* internal
|
|
195
|
+
* @internal
|
|
201
196
|
*/
|
|
202
197
|
static readonly MAX_MESSAGE_REACTIONS_TO_FETCH = 1200;
|
|
203
198
|
private channelsSubject;
|
|
@@ -211,10 +206,8 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
211
206
|
private activeThreadMessagesSubject;
|
|
212
207
|
private jumpToMessageSubject;
|
|
213
208
|
private latestMessageDateByUserByChannelsSubject;
|
|
214
|
-
private
|
|
215
|
-
private
|
|
216
|
-
private options;
|
|
217
|
-
private readonly messagePageSize;
|
|
209
|
+
private messagePageSize;
|
|
210
|
+
private readonly attachmentMaxSizeFallbackInMB;
|
|
218
211
|
private messageToQuoteSubject;
|
|
219
212
|
private usersTypingInChannelSubject;
|
|
220
213
|
private usersTypingInThreadSubject;
|
|
@@ -223,14 +216,19 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
223
216
|
private clientEventsSubscription;
|
|
224
217
|
private isStateRecoveryInProgress;
|
|
225
218
|
private channelQueryStateSubject;
|
|
219
|
+
private channelQuery?;
|
|
220
|
+
private _customPaginator;
|
|
226
221
|
private channelListSetter;
|
|
227
222
|
private messageListSetter;
|
|
228
223
|
private threadListSetter;
|
|
229
224
|
private parentMessageSetter;
|
|
230
225
|
private dismissErrorNotification?;
|
|
231
|
-
private nextPageConfiguration?;
|
|
232
226
|
private areReadEventsPaused;
|
|
233
227
|
constructor(chatClientService: ChatClientService<T>, ngZone: NgZone, notificationService: NotificationService);
|
|
228
|
+
/**
|
|
229
|
+
* internal
|
|
230
|
+
*/
|
|
231
|
+
removeOldMessageFromMessageList(): void;
|
|
234
232
|
/**
|
|
235
233
|
* If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
|
|
236
234
|
*/
|
|
@@ -239,6 +237,14 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
239
237
|
* If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
|
|
240
238
|
*/
|
|
241
239
|
set shouldMarkActiveChannelAsRead(shouldMarkActiveChannelAsRead: boolean);
|
|
240
|
+
/**
|
|
241
|
+
* By default the SDK uses an offset based pagination, you can change/extend this by providing your own custom paginator method.
|
|
242
|
+
*
|
|
243
|
+
* The method will be called with the result of the latest channel query.
|
|
244
|
+
*
|
|
245
|
+
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](https://getstream.io/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
|
|
246
|
+
*/
|
|
247
|
+
set customPaginator(paginator: ((channelQueryResult: Channel<T>[]) => NextPageConfiguration) | undefined);
|
|
242
248
|
/**
|
|
243
249
|
* Sets the given `channel` as active and marks it as read.
|
|
244
250
|
* If the channel wasn't previously part of the channel, it will be added to the beginning of the list.
|
|
@@ -259,21 +265,33 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
259
265
|
* Loads the next page of messages of the active channel. The page size can be set in the [query option](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript#query-options) object.
|
|
260
266
|
* @param direction
|
|
261
267
|
*/
|
|
262
|
-
loadMoreMessages(direction?: 'older' | 'newer'): false | Promise<QueryChannelAPIResponse<T>> | undefined;
|
|
268
|
+
loadMoreMessages(direction?: 'older' | 'newer'): false | Promise<import("stream-chat").QueryChannelAPIResponse<T>> | undefined;
|
|
263
269
|
/**
|
|
264
270
|
* Loads the next page of messages of the active thread. The page size can be set in the [query option](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript#query-options) object.
|
|
265
271
|
* @param direction
|
|
266
272
|
*/
|
|
267
|
-
loadMoreThreadReplies(direction?: 'older' | 'newer'): Promise<void>;
|
|
273
|
+
loadMoreThreadReplies(direction?: 'older' | 'newer'): false | Promise<void>;
|
|
268
274
|
/**
|
|
269
275
|
* Queries the channels with the given filters, sorts and options. More info about [channel querying](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript) can be found in the platform documentation. By default the first channel in the list will be set as active channel and will be marked as read.
|
|
270
276
|
* @param filters
|
|
271
277
|
* @param sort
|
|
272
278
|
* @param options
|
|
273
|
-
* @param shouldSetActiveChannel Decides if the first channel in the result should be made as an active channel
|
|
279
|
+
* @param shouldSetActiveChannel Decides if the first channel in the result should be made as an active channel or not.
|
|
274
280
|
* @returns the list of channels found by the query
|
|
275
281
|
*/
|
|
276
282
|
init(filters: ChannelFilters<T>, sort?: ChannelSort<T>, options?: ChannelOptions, shouldSetActiveChannel?: boolean): Promise<Channel<T>[]>;
|
|
283
|
+
/**
|
|
284
|
+
* Queries the channels with the given query function. More info about [channel querying](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript) can be found in the platform documentation.
|
|
285
|
+
* @param query
|
|
286
|
+
* @param options
|
|
287
|
+
* @param options.shouldSetActiveChannel The `shouldSetActiveChannel` specifies if the first channel in the result should be selected as the active channel or not. Default is `true`.
|
|
288
|
+
* @param options.messagePageSize How many messages should we load? The default is 25
|
|
289
|
+
* @returns the channels that were loaded
|
|
290
|
+
*/
|
|
291
|
+
initWithCustomQuery(query: (queryType: ChannelQueryType) => Promise<ChannelQueryResult<T>>, options?: {
|
|
292
|
+
shouldSetActiveChannel: boolean;
|
|
293
|
+
messagePageSize: number;
|
|
294
|
+
}): Promise<Channel<T>[]>;
|
|
277
295
|
/**
|
|
278
296
|
* Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observables. Useful when disconnecting a chat user, use in combination with [`disconnectUser`](./ChatClientService.mdx/#disconnectuser).
|
|
279
297
|
*/
|
|
@@ -363,7 +381,9 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
363
381
|
} | null | undefined;
|
|
364
382
|
reply_count?: number | undefined;
|
|
365
383
|
shadowed?: boolean | undefined;
|
|
366
|
-
status?: string | undefined;
|
|
384
|
+
status?: string | undefined; /**
|
|
385
|
+
* If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
|
|
386
|
+
*/
|
|
367
387
|
thread_participants?: UserResponse<T>[] | undefined;
|
|
368
388
|
updated_at?: string | undefined;
|
|
369
389
|
} & {
|
|
@@ -425,6 +445,12 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
425
445
|
* @param channel
|
|
426
446
|
*/
|
|
427
447
|
addChannel(channel: Channel<T>): void;
|
|
448
|
+
/**
|
|
449
|
+
*
|
|
450
|
+
* @param cid
|
|
451
|
+
* @param shouldStopWatching
|
|
452
|
+
*/
|
|
453
|
+
removeChannel(cid: string, shouldStopWatching?: boolean): void;
|
|
428
454
|
private sendMessageRequest;
|
|
429
455
|
/**
|
|
430
456
|
* Jumps to the selected message inside the message list, if the message is not yet loaded, it'll load the message (and it's surroundings) from the API.
|
|
@@ -432,6 +458,10 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
432
458
|
* @param parentMessageId The ID of the parent message if we want to load a thread message
|
|
433
459
|
*/
|
|
434
460
|
jumpToMessage(messageId: string, parentMessageId?: string): Promise<void>;
|
|
461
|
+
/**
|
|
462
|
+
* Clears the currently selected message to jump
|
|
463
|
+
*/
|
|
464
|
+
clearMessageJump(): void;
|
|
435
465
|
/**
|
|
436
466
|
* Pins the given message in the channel
|
|
437
467
|
* @param message
|
|
@@ -446,8 +476,7 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
446
476
|
private handleRemovedFromChannelNotification;
|
|
447
477
|
private handleNewMessageNotification;
|
|
448
478
|
private handleAddedToChannelNotification;
|
|
449
|
-
private
|
|
450
|
-
private removeChannelsFromChannelList;
|
|
479
|
+
private addChannelFromNotification;
|
|
451
480
|
private watchForActiveChannelEvents;
|
|
452
481
|
/**
|
|
453
482
|
* Call this method if user started typing in the active channel
|
|
@@ -504,7 +533,7 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
504
533
|
private updateLatestMessages;
|
|
505
534
|
private setChannelState;
|
|
506
535
|
private markRead;
|
|
507
|
-
private
|
|
536
|
+
private _init;
|
|
508
537
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChannelService<any>, never>;
|
|
509
538
|
static ɵprov: i0.ɵɵInjectableDeclaration<ChannelService<any>>;
|
|
510
539
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Channel,
|
|
3
|
+
import { Channel, ConnectAPIResponse, OwnUserResponse, StreamChatOptions, UserResponse } from 'stream-chat';
|
|
4
4
|
import { AppSettings, Event, StreamChat, TokenOrProvider } from 'stream-chat';
|
|
5
5
|
import { NotificationService } from './notification.service';
|
|
6
6
|
import { DefaultStreamChatGenerics } from './types';
|
|
@@ -37,7 +37,7 @@ export declare class ChatClientService<T extends DefaultStreamChatGenerics = Def
|
|
|
37
37
|
/**
|
|
38
38
|
* Emits the list of pending invites of the user. It emits every pending invitation during initialization and then extends the list when a new invite is received. More information can be found in the [channel invitations](../code-examples/channel-invites.mdx) guide.
|
|
39
39
|
*/
|
|
40
|
-
pendingInvites$: Observable<
|
|
40
|
+
pendingInvites$: Observable<Channel<T>[]>;
|
|
41
41
|
/**
|
|
42
42
|
* Emits the current chat user
|
|
43
43
|
*/
|
|
@@ -48,6 +48,8 @@ export declare class ChatClientService<T extends DefaultStreamChatGenerics = Def
|
|
|
48
48
|
private pendingInvitesSubject;
|
|
49
49
|
private userSubject;
|
|
50
50
|
private subscriptions;
|
|
51
|
+
private trackPendingChannelInvites;
|
|
52
|
+
private appSettingsPromise?;
|
|
51
53
|
constructor(ngZone: NgZone, notificationService: NotificationService);
|
|
52
54
|
/**
|
|
53
55
|
* Creates a [`StreamChat`](https://github.com/GetStream/stream-chat-js/blob/668b3e5521339f4e14fc657834531b4c8bf8176b/src/client.ts#L124) instance using the provided `apiKey`, and connects a user with the given meta data and token. More info about [connecting users](https://getstream.io/chat/docs/javascript/init_and_users/?language=javascript) can be found in the platform documentation.
|
|
@@ -61,7 +63,9 @@ export declare class ChatClientService<T extends DefaultStreamChatGenerics = Def
|
|
|
61
63
|
* </ul>
|
|
62
64
|
* @param clientOptions Setting to provide to the Stream client instance
|
|
63
65
|
*/
|
|
64
|
-
init(apiKey: string, userOrId: string | OwnUserResponse<T> | UserResponse<T> | undefined, userTokenOrProvider: TokenOrProvider, clientOptions?: StreamChatOptions
|
|
66
|
+
init(apiKey: string, userOrId: string | OwnUserResponse<T> | UserResponse<T> | undefined, userTokenOrProvider: TokenOrProvider, clientOptions?: StreamChatOptions & {
|
|
67
|
+
trackPendingChannelInvites?: boolean;
|
|
68
|
+
}): ConnectAPIResponse<T>;
|
|
65
69
|
/**
|
|
66
70
|
* Disconnects the current user, and closes the WebSocket connection. Useful when disconnecting a chat user, use in combination with [`reset`](./ChannelService.mdx/#reset).
|
|
67
71
|
*/
|
|
@@ -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, CustomAttachmentUploadContext, CustomMetadataContext, DateSeparatorContext, DefaultStreamChatGenerics, DeliveredStatusContext, EmojiPickerContext, IconContext,
|
|
3
|
+
import { AttachmentContext, AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelHeaderInfoContext, ChannelPreviewContext, ChannelPreviewInfoContext, CommandAutocompleteListItemContext, 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';
|
|
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.
|
|
@@ -23,11 +23,6 @@ export declare class CustomTemplatesService<T extends DefaultStreamChatGenerics
|
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
channelPreviewTemplate$: BehaviorSubject<TemplateRef<ChannelPreviewContext<DefaultStreamChatGenerics>> | undefined>;
|
|
26
|
-
/**
|
|
27
|
-
* The message input template used when editing a message (instead of the [default message input](../components/MessageInputComponent.mdx))
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
messageInputTemplate$: BehaviorSubject<TemplateRef<MessageInputContext> | undefined>;
|
|
31
26
|
/**
|
|
32
27
|
* The template used for displaying a [mention inside a message](../code-examples/mention-actions.mdx)
|
|
33
28
|
*
|
|
@@ -77,12 +72,12 @@ export declare class CustomTemplatesService<T extends DefaultStreamChatGenerics
|
|
|
77
72
|
* Template for displaying the loading indicator (instead of the [default loading indicator](../components/LoadingIndicatorComponent.mdx))
|
|
78
73
|
*
|
|
79
74
|
*/
|
|
80
|
-
loadingIndicatorTemplate$: BehaviorSubject<TemplateRef<
|
|
75
|
+
loadingIndicatorTemplate$: BehaviorSubject<TemplateRef<void> | undefined>;
|
|
81
76
|
/**
|
|
82
77
|
* Template for displaying the message actions box (instead of the [default message actions box](../components/MessageActionsBoxComponent.mdx))
|
|
83
78
|
*
|
|
84
79
|
*/
|
|
85
|
-
messageActionsBoxTemplate$: BehaviorSubject<TemplateRef<MessageActionsBoxContext
|
|
80
|
+
messageActionsBoxTemplate$: BehaviorSubject<TemplateRef<MessageActionsBoxContext<DefaultStreamChatGenerics>> | undefined>;
|
|
86
81
|
/**
|
|
87
82
|
* The template used for displaying an item in the [message actions box](../components/MessageActionsBoxComponent.mdx)
|
|
88
83
|
*
|
|
@@ -93,6 +88,11 @@ export declare class CustomTemplatesService<T extends DefaultStreamChatGenerics
|
|
|
93
88
|
*
|
|
94
89
|
*/
|
|
95
90
|
messageReactionsTemplate$: BehaviorSubject<TemplateRef<MessageReactionsContext> | undefined>;
|
|
91
|
+
/**
|
|
92
|
+
* 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))
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
messageReactionsSelectorTemplate$: BehaviorSubject<TemplateRef<MessageReactionsSelectorContext> | undefined>;
|
|
96
96
|
/**
|
|
97
97
|
* The template used to display a modal window (instead of the [default modal](../components/ModalComponent.mdx))
|
|
98
98
|
*
|
|
@@ -200,10 +200,6 @@ export declare class CustomTemplatesService<T extends DefaultStreamChatGenerics
|
|
|
200
200
|
* The template to show if the thread message list is empty
|
|
201
201
|
*/
|
|
202
202
|
emptyThreadMessageListPlaceholder$: BehaviorSubject<TemplateRef<void> | undefined>;
|
|
203
|
-
/**
|
|
204
|
-
* The template used to display the [edit message form](../components/EditMessageFormComponent.mdx)
|
|
205
|
-
*/
|
|
206
|
-
editMessageFormTemplate$: BehaviorSubject<TemplateRef<void> | undefined>;
|
|
207
203
|
/**
|
|
208
204
|
* The template used to display the [message bounce prompt](../components/MessageBouncePromptComponent.mdx)
|
|
209
205
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare type Icon = 'action
|
|
2
|
+
export declare type Icon = 'action' | 'delivered' | 'read' | 'reaction' | 'send' | 'retry' | 'close' | 'audio-file' | 'reply-in-thread' | 'arrow-left' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'chat-bubble' | 'attach' | 'unspecified-filetype' | 'download' | 'error' | 'play' | 'pause';
|
|
3
3
|
/**
|
|
4
4
|
* The `Icon` component can be used to display different icons (i. e. message delivered icon).
|
|
5
5
|
*/
|
|
@@ -8,11 +8,7 @@ export declare class IconComponent {
|
|
|
8
8
|
* 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.
|
|
9
9
|
*/
|
|
10
10
|
icon: Icon | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* The size of the icon (in pixels)
|
|
13
|
-
*/
|
|
14
|
-
size: number | undefined;
|
|
15
11
|
constructor();
|
|
16
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "stream-icon", never, { "icon": "icon";
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "stream-icon", never, { "icon": "icon"; }, {}, never, never, false, never>;
|
|
18
14
|
}
|
|
@@ -12,13 +12,9 @@ export declare class IconPlaceholderComponent implements OnChanges {
|
|
|
12
12
|
* 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.
|
|
13
13
|
*/
|
|
14
14
|
icon: Icon | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* The size of the icon (in pixels)
|
|
17
|
-
*/
|
|
18
|
-
size: number | undefined;
|
|
19
15
|
iconContext: IconContext;
|
|
20
16
|
constructor(customTemplatesService: CustomTemplatesService);
|
|
21
17
|
ngOnChanges(): void;
|
|
22
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconPlaceholderComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IconPlaceholderComponent, "stream-icon-placeholder", never, { "icon": "icon";
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconPlaceholderComponent, "stream-icon-placeholder", never, { "icon": "icon"; }, {}, never, never, false, never>;
|
|
24
20
|
}
|
|
@@ -3,16 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
* The `LoadingIndicator` component displays a spinner to indicate that an action is in progress.
|
|
4
4
|
*/
|
|
5
5
|
export declare class LoadingIndicatorComponent {
|
|
6
|
-
/**
|
|
7
|
-
* The size of the indicator (in pixels)
|
|
8
|
-
*/
|
|
9
|
-
size: number;
|
|
10
|
-
/**
|
|
11
|
-
* The color of the indicator
|
|
12
|
-
*/
|
|
13
|
-
color: string;
|
|
14
|
-
linearGradientId: string;
|
|
15
6
|
constructor();
|
|
16
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingIndicatorComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingIndicatorComponent, "stream-loading-indicator", never, {
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingIndicatorComponent, "stream-loading-indicator", never, {}, {}, never, never, false, never>;
|
|
18
9
|
}
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
2
|
-
import { LoadingIndicatorContext } from '../types';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
/**
|
|
5
4
|
* The `LoadingInficatorPlaceholder` component displays the [default loading indicator](./LoadingIndicatorComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This component is used by the SDK internally, you likely won't need to use it.
|
|
6
5
|
*/
|
|
7
6
|
export declare class LoadingIndicatorPlaceholderComponent {
|
|
8
7
|
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
8
|
constructor(customTemplatesService: CustomTemplatesService);
|
|
18
|
-
getLoadingIndicatorContext(): LoadingIndicatorContext;
|
|
19
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingIndicatorPlaceholderComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingIndicatorPlaceholderComponent, "stream-loading-indicator-placeholder", never, {
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingIndicatorPlaceholderComponent, "stream-loading-indicator-placeholder", never, {}, {}, never, never, false, never>;
|
|
21
11
|
}
|