stream-chat-angular 2.1.0 → 2.4.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.
@@ -6,6 +6,7 @@ export declare class ChannelHeaderComponent {
6
6
  private channelService;
7
7
  private channelListToggleService;
8
8
  activeChannel: Channel | undefined;
9
+ canReceiveConnectEvents: boolean | undefined;
9
10
  constructor(channelService: ChannelService, channelListToggleService: ChannelListToggleService);
10
11
  toggleMenu(event: Event): void;
11
12
  get memberCountParam(): {
@@ -9,6 +9,7 @@ export declare class ChannelPreviewComponent implements OnInit, OnDestroy {
9
9
  isUnread: boolean;
10
10
  latestMessage: string;
11
11
  private subscriptions;
12
+ private canSendReadEvents;
12
13
  constructor(channelService: ChannelService);
13
14
  ngOnInit(): void;
14
15
  ngOnDestroy(): void;
@@ -69,6 +69,7 @@ export declare class ChannelService {
69
69
  private handleChannelUpdate;
70
70
  private handleChannelTruncate;
71
71
  private get channels();
72
+ private get canSendReadEvents();
72
73
  static ɵfac: i0.ɵɵFactoryDeclaration<ChannelService, never>;
73
74
  static ɵprov: i0.ɵɵInjectableDeclaration<ChannelService>;
74
75
  }
@@ -1,3 +1,4 @@
1
+ import { TemplateRef } from '@angular/core';
1
2
  import { UserResponse } from 'stream-chat';
2
3
  import { ChannelService } from '../channel.service';
3
4
  import { ChatClientService } from '../chat-client.service';
@@ -7,11 +8,13 @@ import * as i0 from "@angular/core";
7
8
  export declare class MessageComponent {
8
9
  private chatClientService;
9
10
  private channelService;
11
+ messageInputTemplate: TemplateRef<any> | undefined;
10
12
  message: StreamMessage | undefined;
11
13
  enabledMessageActions: MessageActions[];
12
14
  areReactionsEnabled: boolean | undefined;
13
15
  canReactToMessage: boolean | undefined;
14
16
  isLastSentMessage: boolean | undefined;
17
+ canReceiveReadEvents: boolean | undefined;
15
18
  isEditing: boolean | undefined;
16
19
  isActionBoxOpen: boolean;
17
20
  isReactionSelectorOpen: boolean;
@@ -33,5 +36,5 @@ export declare class MessageComponent {
33
36
  resendMessage(): void;
34
37
  textClicked(): void;
35
38
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "message": "message"; "enabledMessageActions": "enabledMessageActions"; "areReactionsEnabled": "areReactionsEnabled"; "canReactToMessage": "canReactToMessage"; "isLastSentMessage": "isLastSentMessage"; }, {}, never, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "messageInputTemplate": "messageInputTemplate"; "message": "message"; "enabledMessageActions": "enabledMessageActions"; "areReactionsEnabled": "areReactionsEnabled"; "canReactToMessage": "canReactToMessage"; "isLastSentMessage": "isLastSentMessage"; "canReceiveReadEvents": "canReceiveReadEvents"; }, {}, never, never>;
37
40
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { ChannelService } from '../channel.service';
3
3
  import { ChatClientService } from '../chat-client.service';
4
4
  import { NotificationService } from '../notification.service';
@@ -9,6 +9,7 @@ export declare class MessageActionsBoxComponent implements OnChanges {
9
9
  private chatClientService;
10
10
  private notificationService;
11
11
  private channelService;
12
+ messageInputTemplate: TemplateRef<any> | undefined;
12
13
  isOpen: boolean;
13
14
  isMine: boolean;
14
15
  message: StreamMessage | undefined;
@@ -31,8 +32,8 @@ export declare class MessageActionsBoxComponent implements OnChanges {
31
32
  quoteClicked(): void;
32
33
  editClicked(): void;
33
34
  sendClicked(): void;
34
- modalClosed(): void;
35
+ modalClosed: () => void;
35
36
  deleteClicked(): Promise<void>;
36
37
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageActionsBoxComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "isOpen": "isOpen"; "isMine": "isMine"; "message": "message"; "enabledActions": "enabledActions"; }, { "displayedActionsCount": "displayedActionsCount"; "isEditing": "isEditing"; }, never, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "messageInputTemplate": "messageInputTemplate"; "isOpen": "isOpen"; "isMine": "isMine"; "message": "message"; "enabledActions": "enabledActions"; }, { "displayedActionsCount": "displayedActionsCount"; "isEditing": "isEditing"; }, never, never>;
38
39
  }
@@ -1,4 +1,4 @@
1
- import { ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, Type } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef, Type } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { UserResponse } from 'stream-chat';
4
4
  import { AttachmentService } from '../attachment.service';
@@ -8,13 +8,14 @@ import { AttachmentUpload, MentionAutcompleteListItemContext, StreamMessage } fr
8
8
  import { MessageInputConfigService } from './message-input-config.service';
9
9
  import { TextareaInterface } from './textarea.interface';
10
10
  import * as i0 from "@angular/core";
11
- export declare class MessageInputComponent implements OnInit, OnChanges, OnDestroy {
11
+ export declare class MessageInputComponent implements OnChanges, OnDestroy, AfterViewInit {
12
12
  private channelService;
13
13
  private notificationService;
14
14
  private attachmentService;
15
15
  private configService;
16
16
  private textareaType;
17
17
  private componentFactoryResolver;
18
+ private cdRef;
18
19
  isFileUploadEnabled: boolean | undefined;
19
20
  areMentionsEnabled: boolean | undefined;
20
21
  mentionScope: 'channel' | 'application' | undefined;
@@ -24,6 +25,8 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
24
25
  message: StreamMessage | undefined;
25
26
  readonly messageUpdate: EventEmitter<void>;
26
27
  isFileUploadAuthorized: boolean | undefined;
28
+ canSendLinks: boolean | undefined;
29
+ canSendMessages: boolean | undefined;
27
30
  attachmentUploads$: Observable<AttachmentUpload[]>;
28
31
  textareaValue: string;
29
32
  textareaRef: ComponentRef<TextareaInterface> | undefined;
@@ -32,15 +35,18 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
32
35
  private textareaAnchor;
33
36
  private subscriptions;
34
37
  private hideNotification;
35
- constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver);
36
- ngOnInit(): void;
38
+ private isViewInited;
39
+ constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver, cdRef: ChangeDetectorRef);
40
+ ngAfterViewInit(): void;
37
41
  ngOnChanges(changes: SimpleChanges): void;
38
42
  ngOnDestroy(): void;
39
43
  messageSent(): Promise<void>;
44
+ get containsLinks(): boolean;
40
45
  get accept(): string;
41
46
  filesSelected(fileList: FileList | null): Promise<void>;
42
47
  private clearFileInput;
43
48
  private get isUpdate();
49
+ private initTextarea;
44
50
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
45
51
  static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mentionAutocompleteItemTemplate": "mentionAutocompleteItemTemplate"; "acceptedFileTypes": "acceptedFileTypes"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; }, { "messageUpdate": "messageUpdate"; }, never, never>;
46
52
  }
@@ -14,6 +14,7 @@ export declare class TextareaDirective implements OnChanges {
14
14
  readonly send: EventEmitter<void>;
15
15
  readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UnknownType>[]>;
16
16
  private subscriptions;
17
+ private unpropagatedChanges;
17
18
  constructor(viewContainerRef: ViewContainerRef);
18
19
  ngOnChanges(changes: SimpleChanges): void;
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaDirective, never>;
@@ -12,10 +12,12 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
12
12
  private chatClientService;
13
13
  private imageLoadService;
14
14
  messageTemplate: TemplateRef<any> | undefined;
15
+ messageInputTemplate: TemplateRef<any> | undefined;
15
16
  areReactionsEnabled: boolean;
16
17
  enabledMessageActionsInput: MessageActions[];
17
18
  messages$: Observable<StreamMessage[]>;
18
19
  canReactToMessage: boolean | undefined;
20
+ canReceiveReadEvents: boolean | undefined;
19
21
  enabledMessageActions: MessageActions[];
20
22
  private class;
21
23
  unreadMessageCount: number;
@@ -40,5 +42,5 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
40
42
  private preserveScrollbarPosition;
41
43
  private setEnabledActions;
42
44
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageListComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "stream-message-list", never, { "messageTemplate": "messageTemplate"; "areReactionsEnabled": "areReactionsEnabled"; "enabledMessageActionsInput": "enabledMessageActions"; }, {}, never, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "stream-message-list", never, { "messageTemplate": "messageTemplate"; "messageInputTemplate": "messageInputTemplate"; "areReactionsEnabled": "areReactionsEnabled"; "enabledMessageActionsInput": "enabledMessageActions"; }, {}, never, never>;
44
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "2.1.0",
3
+ "version": "2.4.0",
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,7 +13,16 @@
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"
16
+ "stream-chat-css": "1.0.23",
17
+ "@stream-io/stream-chat-css": "1.0.26"
18
+ },
19
+ "peerDependenciesMeta": {
20
+ "stream-chat-css": {
21
+ "optional": true
22
+ },
23
+ "@stream-io/stream-chat-css": {
24
+ "optional": true
25
+ }
17
26
  },
18
27
  "dependencies": {
19
28
  "angular-mentions": "^1.4.0",
@@ -86,5 +86,9 @@ export const en = {
86
86
  failed: 'failed',
87
87
  retry: 'retry',
88
88
  test: 'success',
89
+ 'Sending links is not allowed in this conversation':
90
+ 'Sending links is not allowed in this conversation',
91
+ "You can't send messages in this channel":
92
+ "You can't send messages in this channel",
89
93
  },
90
94
  };
@@ -1 +1 @@
1
- export const version = '2.1.0';
1
+ export const version = '2.4.0';