stream-chat-angular 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +60 -35
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/avatar/avatar.component.js +37 -8
- package/esm2015/lib/avatar-placeholder/avatar-placeholder.component.js +14 -2
- package/esm2015/lib/channel-header/channel-header.component.js +4 -11
- package/esm2015/lib/channel-preview/channel-preview.component.js +4 -11
- package/esm2015/lib/message/message.component.js +2 -2
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +2 -2
- package/esm2015/lib/message-input/message-input.component.js +2 -2
- package/esm2015/lib/message-list/message-list.component.js +2 -2
- package/esm2015/lib/message-reactions/message-reactions.component.js +1 -1
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +59 -33
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/avatar/avatar.component.d.ts +22 -2
- package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +19 -2
- package/lib/message/message.component.d.ts +0 -3
- package/lib/types.d.ts +7 -1
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { Channel, User } from 'stream-chat';
|
|
2
|
+
import { ChatClientService } from '../chat-client.service';
|
|
3
|
+
import { AvatarLocation, AvatarType, DefaultStreamChatGenerics } from '../types';
|
|
1
4
|
import * as i0 from "@angular/core";
|
|
2
5
|
/**
|
|
3
6
|
* The `Avatar` component displays the provided image, with fallback to the first letter of the optional name input.
|
|
4
7
|
*/
|
|
5
8
|
export declare class AvatarComponent {
|
|
9
|
+
private chatClientService;
|
|
6
10
|
/**
|
|
7
11
|
* An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
|
|
8
12
|
*/
|
|
@@ -15,10 +19,26 @@ export declare class AvatarComponent {
|
|
|
15
19
|
* The size in pixels of the avatar image.
|
|
16
20
|
*/
|
|
17
21
|
size: number;
|
|
22
|
+
/**
|
|
23
|
+
* The location the avatar will be displayed in
|
|
24
|
+
*/
|
|
25
|
+
location: AvatarLocation | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The channel the avatar belongs to (if avatar of a channel is displayed)
|
|
28
|
+
*/
|
|
29
|
+
channel?: Channel<DefaultStreamChatGenerics>;
|
|
30
|
+
/**
|
|
31
|
+
* The user the avatar belongs to (if avatar of a user is displayed)
|
|
32
|
+
*/
|
|
33
|
+
user?: User<DefaultStreamChatGenerics>;
|
|
34
|
+
/**
|
|
35
|
+
* The type of the avatar: channel if channel avatar is displayed, user if user avatar is displayed
|
|
36
|
+
*/
|
|
37
|
+
type: AvatarType | undefined;
|
|
18
38
|
isLoaded: boolean;
|
|
19
39
|
isError: boolean;
|
|
20
|
-
constructor();
|
|
40
|
+
constructor(chatClientService: ChatClientService);
|
|
21
41
|
get initials(): string;
|
|
22
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "stream-avatar", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; }, {}, never, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "stream-avatar", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; }, {}, never, never>;
|
|
24
44
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Channel, User } from 'stream-chat';
|
|
1
2
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
2
|
-
import { AvatarContext } from '../types';
|
|
3
|
+
import { AvatarContext, AvatarLocation, AvatarType, DefaultStreamChatGenerics } from '../types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* 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.
|
|
@@ -18,8 +19,24 @@ export declare class AvatarPlaceholderComponent {
|
|
|
18
19
|
* The size in pixels of the avatar image.
|
|
19
20
|
*/
|
|
20
21
|
size: number;
|
|
22
|
+
/**
|
|
23
|
+
* The location the avatar will be displayed in
|
|
24
|
+
*/
|
|
25
|
+
location: AvatarLocation | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The channel the avatar belongs to (if avatar of a channel is displayed)
|
|
28
|
+
*/
|
|
29
|
+
channel?: Channel<DefaultStreamChatGenerics>;
|
|
30
|
+
/**
|
|
31
|
+
* The user the avatar belongs to (if avatar of a user is displayed)
|
|
32
|
+
*/
|
|
33
|
+
user?: User<DefaultStreamChatGenerics>;
|
|
34
|
+
/**
|
|
35
|
+
* The type of the avatar: channel if channel avatar is displayed, user if user avatar is displayed
|
|
36
|
+
*/
|
|
37
|
+
type: AvatarType | undefined;
|
|
21
38
|
constructor(customTemplatesService: CustomTemplatesService);
|
|
22
39
|
getAvatarContext(): AvatarContext;
|
|
23
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarPlaceholderComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; }, {}, never, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; }, {}, never, never>;
|
|
25
42
|
}
|
|
@@ -69,9 +69,6 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
69
69
|
get canDisplayReadStatus(): boolean;
|
|
70
70
|
get quotedMessageAttachments(): import("stream-chat").Attachment<{
|
|
71
71
|
attachmentType: import("stream-chat").UR & import("../types").UnknownType & {
|
|
72
|
-
/**
|
|
73
|
-
* 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).
|
|
74
|
-
*/
|
|
75
72
|
asset_url?: string | undefined;
|
|
76
73
|
id?: string | undefined;
|
|
77
74
|
images?: import("stream-chat").Attachment<DefaultStreamChatGenerics>[] | undefined;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
2
|
import { Observable, Subject } from 'rxjs';
|
|
3
|
-
import type { Attachment, Channel, ChannelMemberResponse, CommandResponse, Event, ExtendableGenerics, FormatMessageResponse, LiteralStringForUnion, Mute, ReactionResponse, UserResponse } from 'stream-chat';
|
|
3
|
+
import type { Attachment, Channel, ChannelMemberResponse, CommandResponse, Event, ExtendableGenerics, FormatMessageResponse, LiteralStringForUnion, Mute, ReactionResponse, User, UserResponse } from 'stream-chat';
|
|
4
4
|
import { Icon } from './icon/icon.component';
|
|
5
5
|
export declare type UnknownType = Record<string, unknown>;
|
|
6
6
|
export declare type CustomTrigger = {
|
|
@@ -111,10 +111,16 @@ export declare type AttachmentListContext = {
|
|
|
111
111
|
messageId: string;
|
|
112
112
|
attachments: Attachment<DefaultStreamChatGenerics>[];
|
|
113
113
|
};
|
|
114
|
+
export declare type AvatarType = 'channel' | 'user';
|
|
115
|
+
export declare type AvatarLocation = 'channel-preview' | 'channel-header' | 'message-sender' | 'message-reader' | 'quoted-message-sender' | 'autocomplete-item' | 'typing-indicator' | 'reaction';
|
|
114
116
|
export declare type AvatarContext = {
|
|
115
117
|
name: string | undefined;
|
|
116
118
|
imageUrl: string | undefined;
|
|
117
119
|
size: number | undefined;
|
|
120
|
+
type: AvatarType | undefined;
|
|
121
|
+
location: AvatarLocation | undefined;
|
|
122
|
+
channel?: Channel<DefaultStreamChatGenerics>;
|
|
123
|
+
user?: User<DefaultStreamChatGenerics>;
|
|
118
124
|
};
|
|
119
125
|
export declare type AttachmentPreviewListContext = {
|
|
120
126
|
attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
|
package/package.json
CHANGED
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.
|
|
1
|
+
export const version = '3.5.0';
|