stream-chat-angular 3.0.0-beta.8 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -12
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +89 -35
- 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 +9 -2
- package/esm2015/lib/attachment-preview-list/attachment-preview-list.component.js +2 -2
- package/esm2015/lib/attachment.service.js +20 -5
- package/esm2015/lib/channel.service.js +42 -17
- package/esm2015/lib/message/message.component.js +7 -2
- package/esm2015/lib/message-input/message-input.component.js +8 -3
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +83 -26
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-list/attachment-list.component.d.ts +1 -0
- package/lib/channel.service.d.ts +28 -2
- package/lib/types.d.ts +1 -1
- package/package.json +2 -2
- package/src/assets/styles/css/index.css +1 -1
- package/src/assets/styles/css/index.css.map +1 -1
- package/src/assets/styles/scss/ActionsBox.scss +2 -2
- package/src/assets/styles/scss/Attachment.scss +1 -1
- package/src/assets/styles/scss/ChannelList.scss +6 -0
- package/src/assets/styles/scss/ChannelSearch.scss +12 -1
- package/src/assets/styles/scss/Message.scss +104 -93
- package/src/assets/styles/scss/MessageInput.scss +8 -2
- package/src/assets/styles/scss/MessageInputFlat.scss +6 -0
- package/src/assets/styles/scss/Thread.scss +15 -2
- package/src/assets/styles/scss/VirtualMessage.scss +1 -0
- package/src/assets/styles/scss/_base.scss +4 -0
- package/src/assets/version.ts +1 -1
|
@@ -30,6 +30,7 @@ export declare class AttachmentListComponent implements OnChanges {
|
|
|
30
30
|
isImage(attachment: Attachment): boolean;
|
|
31
31
|
isFile(attachment: Attachment): boolean;
|
|
32
32
|
isGallery(attachment: Attachment): boolean;
|
|
33
|
+
isVideo(attachment: Attachment): boolean | "" | undefined;
|
|
33
34
|
isCard(attachment: Attachment): boolean;
|
|
34
35
|
imageLoaded(): void;
|
|
35
36
|
hasFileSize(attachment: Attachment<DefaultStreamChatGenerics>): boolean | "" | 0 | undefined;
|
package/lib/channel.service.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ChatClientService, ClientEvent } from './chat-client.service';
|
|
|
5
5
|
import { AttachmentUpload, DefaultStreamChatGenerics, MessageReactionType, StreamMessage } from './types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
* The `ChannelService` provides data and interaction for the channel list and message list.
|
|
8
|
+
* The `ChannelService` provides data and interaction for the channel list and message list.
|
|
9
9
|
*/
|
|
10
10
|
export declare class ChannelService<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> {
|
|
11
11
|
private chatClientService;
|
|
@@ -118,6 +118,26 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
118
118
|
* 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)
|
|
119
119
|
*/
|
|
120
120
|
customNewMessageHandler?: (event: Event, channel: Channel<T>, channelListSetter: (channels: (Channel<T> | ChannelResponse<T>)[]) => void, messageListSetter: (messages: StreamMessage<T>[]) => void, threadListSetter: (messages: StreamMessage<T>[]) => void, parentMessageSetter: (message: StreamMessage<T> | undefined) => void) => void;
|
|
121
|
+
/**
|
|
122
|
+
* You can override the default file upload request - you can use this to upload files to your own CDN
|
|
123
|
+
*/
|
|
124
|
+
customFileUploadRequest?: (file: File, channel: Channel<T>) => Promise<{
|
|
125
|
+
file: string;
|
|
126
|
+
}>;
|
|
127
|
+
/**
|
|
128
|
+
* You can override the default image upload request - you can use this to upload images to your own CDN
|
|
129
|
+
*/
|
|
130
|
+
customImageUploadRequest?: (file: File, channel: Channel<T>) => Promise<{
|
|
131
|
+
file: string;
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* You can override the default file delete request - override this if you use your own CDN
|
|
135
|
+
*/
|
|
136
|
+
customFileDeleteRequest?: (url: string, channel: Channel<T>) => Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* You can override the default image delete request - override this if you use your own CDN
|
|
139
|
+
*/
|
|
140
|
+
customImageDeleteRequest?: (url: string, channel: Channel<T>) => Promise<void>;
|
|
121
141
|
private channelsSubject;
|
|
122
142
|
private activeChannelSubject;
|
|
123
143
|
private activeChannelMessagesSubject;
|
|
@@ -143,6 +163,10 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
143
163
|
* @param channel
|
|
144
164
|
*/
|
|
145
165
|
setAsActiveChannel(channel: Channel<T>): void;
|
|
166
|
+
/**
|
|
167
|
+
* Deselects the currently active (if any) channel
|
|
168
|
+
*/
|
|
169
|
+
deselectActiveChannel(): void;
|
|
146
170
|
/**
|
|
147
171
|
* Sets the given `message` as an active parent message. If `undefined` is provided, it will deleselect the current parent message.
|
|
148
172
|
* @param message
|
|
@@ -161,8 +185,10 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
161
185
|
* @param filters
|
|
162
186
|
* @param sort
|
|
163
187
|
* @param options
|
|
188
|
+
* @param shouldSetActiveChannel Decides if the first channel in the result should be made as an active channel, or no channel should be marked as active
|
|
189
|
+
* @returns the list of channels found by the query
|
|
164
190
|
*/
|
|
165
|
-
init(filters: ChannelFilters<T>, sort?: ChannelSort<T>, options?: ChannelOptions): Promise<
|
|
191
|
+
init(filters: ChannelFilters<T>, sort?: ChannelSort<T>, options?: ChannelOptions, shouldSetActiveChannel?: boolean): Promise<Channel<T>[]>;
|
|
166
192
|
/**
|
|
167
193
|
* Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observables. Useful when disconnecting a chat user, use in combination with [`disconnectUser`](./ChatClientService.mdx/#disconnectuser).
|
|
168
194
|
*/
|
package/lib/types.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare type AttachmentUpload = {
|
|
|
50
50
|
file: File;
|
|
51
51
|
state: 'error' | 'success' | 'uploading';
|
|
52
52
|
url?: string;
|
|
53
|
-
type: 'image' | 'file';
|
|
53
|
+
type: 'image' | 'file' | 'video';
|
|
54
54
|
previewUri?: string | ArrayBuffer;
|
|
55
55
|
};
|
|
56
56
|
export declare type MentionAutcompleteListItemContext = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-angular",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Angular components to create chat conversations or livestream style chat",
|
|
5
5
|
"author": "GetStream",
|
|
6
6
|
"homepage": "https://getstream.io/chat/",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@angular/common": "^12.2.0 || ^13.0.0",
|
|
13
13
|
"@angular/core": "^12.2.0 || ^13.0.0",
|
|
14
14
|
"@ngx-translate/core": "^13.0.0 || ^14.0.0",
|
|
15
|
-
"stream-chat": "^6.
|
|
15
|
+
"stream-chat": "^6.4.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"angular-mentions": "^1.4.0",
|