stream-chat-angular 2.11.0 → 2.12.3

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.
@@ -15,6 +15,7 @@ export declare class ChannelService {
15
15
  activeParentMessageId$: Observable<string | undefined>;
16
16
  activeThreadMessages$: Observable<StreamMessage[]>;
17
17
  activeParentMessage$: Observable<StreamMessage | undefined>;
18
+ messageToQuote$: Observable<StreamMessage | undefined>;
18
19
  customNewMessageNotificationHandler?: (notification: Notification, channelListSetter: (channels: Channel[]) => void) => void;
19
20
  customAddedToChannelNotificationHandler?: (notification: Notification, channelListSetter: (channels: Channel[]) => void) => void;
20
21
  customRemovedFromChannelNotificationHandler?: (notification: Notification, channelListSetter: (channels: Channel[]) => void) => void;
@@ -35,6 +36,7 @@ export declare class ChannelService {
35
36
  private sort;
36
37
  private options;
37
38
  private readonly messagePageSize;
39
+ private messageToQuoteSubject;
38
40
  private channelListSetter;
39
41
  private messageListSetter;
40
42
  private threadListSetter;
@@ -49,7 +51,7 @@ export declare class ChannelService {
49
51
  loadMoreChannels(): Promise<void>;
50
52
  addReaction(messageId: string, reactionType: MessageReactionType): Promise<void>;
51
53
  removeReaction(messageId: string, reactionType: MessageReactionType): Promise<void>;
52
- sendMessage(text: string, attachments?: Attachment[], mentionedUsers?: UserResponse[], parentId?: string | undefined): Promise<void>;
54
+ sendMessage(text: string, attachments?: Attachment[], mentionedUsers?: UserResponse[], parentId?: string | undefined, quotedMessageId?: string | undefined): Promise<void>;
53
55
  resendMessage(message: StreamMessage): Promise<void>;
54
56
  updateMessage(message: StreamMessage): Promise<void>;
55
57
  deleteMessage(message: StreamMessage): Promise<void>;
@@ -57,6 +59,7 @@ export declare class ChannelService {
57
59
  deleteAttachment(attachmentUpload: AttachmentUpload): Promise<void>;
58
60
  autocompleteMembers(searchTerm: string): Promise<import("stream-chat").ChannelMemberResponse<import("stream-chat").UR>[]>;
59
61
  sendAction(messageId: string, formData: Record<string, string>): Promise<void>;
62
+ selectMessageToQuote(message: StreamMessage | undefined): void;
60
63
  private sendMessageRequest;
61
64
  private handleNotification;
62
65
  private handleRemovedFromChannelNotification;
@@ -4,6 +4,11 @@ import { ChannelService } from '../channel.service';
4
4
  import { ChatClientService } from '../chat-client.service';
5
5
  import { DefaultUserType, StreamMessage } from '../types';
6
6
  import * as i0 from "@angular/core";
7
+ declare type MessagePart = {
8
+ content: string;
9
+ type: 'text' | 'mention';
10
+ user?: UserResponse;
11
+ };
7
12
  export declare class MessageComponent implements OnChanges {
8
13
  private chatClientService;
9
14
  private channelService;
@@ -30,11 +35,7 @@ export declare class MessageComponent implements OnChanges {
30
35
  isReactionSelectorOpen: boolean;
31
36
  isPressedOnMobile: boolean;
32
37
  visibleMessageActionsCount: number;
33
- messageTextParts: {
34
- content: string;
35
- type: 'text' | 'mention';
36
- user?: UserResponse;
37
- }[];
38
+ messageTextParts: MessagePart[];
38
39
  private user;
39
40
  private container;
40
41
  constructor(chatClientService: ChatClientService, channelService: ChannelService);
@@ -53,9 +54,12 @@ export declare class MessageComponent implements OnChanges {
53
54
  replyCount: number | undefined;
54
55
  };
55
56
  get canDisplayReadStatus(): boolean;
57
+ get quotedMessageAttachments(): import("stream-chat").Attachment<import("../types").DefaultAttachmentType>[];
56
58
  resendMessage(): void;
57
59
  textClicked(): void;
58
60
  setAsActiveParentMessage(): void;
61
+ private createMessageParts;
59
62
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
60
63
  static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "messageInputTemplate": "messageInputTemplate"; "mentionTemplate": "mentionTemplate"; "message": "message"; "enabledMessageActions": "enabledMessageActions"; "areReactionsEnabled": "areReactionsEnabled"; "canReactToMessage": "canReactToMessage"; "isLastSentMessage": "isLastSentMessage"; "canReceiveReadEvents": "canReceiveReadEvents"; "mode": "mode"; }, {}, never, never>;
61
64
  }
65
+ export {};
@@ -38,6 +38,7 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
38
38
  textareaValue: string;
39
39
  textareaRef: ComponentRef<TextareaInterface> | undefined;
40
40
  mentionedUsers: UserResponse[];
41
+ quotedMessage: undefined | StreamMessage;
41
42
  private fileInput;
42
43
  private textareaAnchor;
43
44
  private subscriptions;
@@ -52,7 +53,9 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
52
53
  messageSent(): Promise<void>;
53
54
  get containsLinks(): boolean;
54
55
  get accept(): string;
56
+ get quotedMessageAttachments(): import("stream-chat").Attachment<import("../types").DefaultAttachmentType>[];
55
57
  filesSelected(fileList: FileList | null): Promise<void>;
58
+ deselectMessageToQuote(): void;
56
59
  private clearFileInput;
57
60
  private get isUpdate();
58
61
  private initTextarea;
@@ -1,2 +1,2 @@
1
1
  import { Attachment, MessageResponse, UserResponse } from 'stream-chat';
2
- export declare const createMessagePreview: (user: UserResponse, text: string, attachments: Attachment[], mentionedUsers: UserResponse[], parentId: undefined | string) => MessageResponse<import("stream-chat").UR, import("stream-chat").UR, import("stream-chat").LiteralStringForUnion, import("stream-chat").UR, import("stream-chat").UR, import("stream-chat").UR>;
2
+ export declare const createMessagePreview: (user: UserResponse, text: string, attachments?: Attachment[], mentionedUsers?: UserResponse[], parentId?: undefined | string, quotedMessageId?: undefined | string) => MessageResponse<import("stream-chat").UR, import("stream-chat").UR, import("stream-chat").LiteralStringForUnion, import("stream-chat").UR, import("stream-chat").UR, import("stream-chat").UR>;
@@ -6,6 +6,7 @@ export declare class ThemeService {
6
6
  private _customLightThemeVariables;
7
7
  private _customDarkThemeVariables;
8
8
  private defaultDarkModeVariables;
9
+ private variablesToDelete;
9
10
  constructor();
10
11
  get customLightThemeVariables(): {
11
12
  [key: string]: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "2.11.0",
3
+ "version": "2.12.3",
4
4
  "description": "Angular components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -13,16 +13,7 @@
13
13
  "@angular/core": "^12.2.0 || ^13.0.0",
14
14
  "@ngx-translate/core": "^13.0.0 || ^14.0.0",
15
15
  "stream-chat": ">=4.3.0",
16
- "stream-chat-css": "1.0.23",
17
- "@stream-io/stream-chat-css": "2.1.0"
18
- },
19
- "peerDependenciesMeta": {
20
- "stream-chat-css": {
21
- "optional": true
22
- },
23
- "@stream-io/stream-chat-css": {
24
- "optional": true
25
- }
16
+ "@stream-io/stream-chat-css": "2.2.0"
26
17
  },
27
18
  "dependencies": {
28
19
  "angular-mentions": "^1.4.0",
@@ -1 +1 @@
1
- export const version = '2.11.0';
1
+ export const version = '2.12.3';