stream-chat-angular 2.6.0 → 2.8.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.
@@ -16,7 +16,7 @@ export declare class AttachmentService {
16
16
  filesSelected(fileList: FileList | null): Promise<void>;
17
17
  retryAttachmentUpload(file: File): Promise<void>;
18
18
  deleteAttachment(upload: AttachmentUpload): Promise<void>;
19
- mapToAttachments(): Attachment<import("stream-chat").UnknownType>[];
19
+ mapToAttachments(): Attachment<import("stream-chat").UR>[];
20
20
  createFromAttachments(attachments: Attachment[]): void;
21
21
  private createPreview;
22
22
  private uploadAttachments;
@@ -1,16 +1,17 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
1
+ import { NgZone, OnDestroy, OnInit } from '@angular/core';
2
2
  import { Channel } from 'stream-chat';
3
3
  import { ChannelService } from '../channel.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ChannelPreviewComponent implements OnInit, OnDestroy {
6
6
  private channelService;
7
+ private ngZone;
7
8
  channel: Channel | undefined;
8
9
  isActive: boolean;
9
10
  isUnread: boolean;
10
11
  latestMessage: string;
11
12
  private subscriptions;
12
13
  private canSendReadEvents;
13
- constructor(channelService: ChannelService);
14
+ constructor(channelService: ChannelService, ngZone: NgZone);
14
15
  ngOnInit(): void;
15
16
  ngOnDestroy(): void;
16
17
  get avatarImage(): unknown;
@@ -1,4 +1,4 @@
1
- import { ApplicationRef, NgZone } from '@angular/core';
1
+ import { NgZone } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelSort, Event, UserResponse } from 'stream-chat';
4
4
  import { ChatClientService, Notification } from './chat-client.service';
@@ -7,7 +7,6 @@ import { AttachmentUpload, StreamMessage } from './types';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class ChannelService {
9
9
  private chatClientService;
10
- private appRef;
11
10
  private ngZone;
12
11
  hasMoreChannels$: Observable<boolean>;
13
12
  channels$: Observable<Channel[] | undefined>;
@@ -32,7 +31,7 @@ export declare class ChannelService {
32
31
  private options;
33
32
  private channelListSetter;
34
33
  private messageListSetter;
35
- constructor(chatClientService: ChatClientService, appRef: ApplicationRef, ngZone: NgZone);
34
+ constructor(chatClientService: ChatClientService, ngZone: NgZone);
36
35
  setAsActiveChannel(channel: Channel): void;
37
36
  loadMoreMessages(): Promise<void>;
38
37
  init(filters: ChannelFilters, sort?: ChannelSort, options?: ChannelOptions): Promise<void>;
@@ -45,7 +44,7 @@ export declare class ChannelService {
45
44
  deleteMessage(message: StreamMessage): Promise<void>;
46
45
  uploadAttachments(uploads: AttachmentUpload[]): Promise<AttachmentUpload[]>;
47
46
  deleteAttachment(attachmentUpload: AttachmentUpload): Promise<void>;
48
- autocompleteMembers(searchTerm: string): Promise<import("stream-chat").ChannelMemberResponse<import("stream-chat").UnknownType>[]>;
47
+ autocompleteMembers(searchTerm: string): Promise<import("stream-chat").ChannelMemberResponse<import("stream-chat").UR>[]>;
49
48
  private sendMessageRequest;
50
49
  private handleNotification;
51
50
  private handleRemovedFromChannelNotification;
@@ -1,15 +1,15 @@
1
- import { ApplicationRef, NgZone } from '@angular/core';
1
+ import { NgZone } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { AppSettings, Event, StreamChat } from 'stream-chat';
3
+ import { OwnUserResponse } from 'stream-chat';
4
+ import { AppSettings, Event, StreamChat, TokenOrProvider } from 'stream-chat';
4
5
  import { NotificationService } from './notification.service';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare type Notification = {
7
- eventType: 'notification.added_to_channel' | 'notification.message_new' | 'notification.removed_from_channel';
8
+ eventType: string;
8
9
  event: Event;
9
10
  };
10
11
  export declare class ChatClientService {
11
12
  private ngZone;
12
- private appRef;
13
13
  private notificationService;
14
14
  chatClient: StreamChat;
15
15
  notification$: Observable<Notification>;
@@ -18,11 +18,11 @@ export declare class ChatClientService {
18
18
  private notificationSubject;
19
19
  private connectionStateSubject;
20
20
  private appSettingsSubject;
21
- constructor(ngZone: NgZone, appRef: ApplicationRef, notificationService: NotificationService);
22
- init(apiKey: string, userId: string, userToken: string): Promise<void>;
21
+ constructor(ngZone: NgZone, notificationService: NotificationService);
22
+ init(apiKey: string, userOrId: string | OwnUserResponse, userTokenOrProvider: TokenOrProvider): Promise<void>;
23
23
  getAppSettings(): Promise<void>;
24
24
  flagMessage(messageId: string): Promise<void>;
25
- autocompleteUsers(searchTerm: string): Promise<import("stream-chat").UserResponse<import("stream-chat").UnknownType>[]>;
25
+ autocompleteUsers(searchTerm: string): Promise<import("stream-chat").UserResponse<import("stream-chat").UR>[]>;
26
26
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatClientService, never>;
27
27
  static ɵprov: i0.ɵɵInjectableDeclaration<ChatClientService>;
28
28
  }
@@ -18,9 +18,9 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
18
18
  mentionScope: 'channel' | 'application';
19
19
  readonly valueChange: EventEmitter<string>;
20
20
  readonly send: EventEmitter<void>;
21
- readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UnknownType>[]>;
21
+ readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UR>[]>;
22
22
  private readonly labelKey;
23
- private readonly triggerChar;
23
+ private readonly mentionTriggerChar;
24
24
  autocompleteConfig: MentionConfig;
25
25
  private messageInput;
26
26
  private subscriptions;
@@ -34,7 +34,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
34
34
  }[]): {
35
35
  autocompleteLabel: string;
36
36
  }[];
37
- mentioned(item: MentionAutcompleteListItem, triggerChar?: string): string;
37
+ itemSelectedFromAutocompleteList(item: MentionAutcompleteListItem, triggerChar?: string): string;
38
38
  autcompleteSearchTermChanged(searchTerm: string): void;
39
39
  inputChanged(): void;
40
40
  inputLeft(): void;
@@ -12,7 +12,7 @@ export declare class TextareaDirective implements OnChanges {
12
12
  value: string;
13
13
  readonly valueChange: EventEmitter<string>;
14
14
  readonly send: EventEmitter<void>;
15
- readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UnknownType>[]>;
15
+ readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UR>[]>;
16
16
  private subscriptions;
17
17
  private unpropagatedChanges;
18
18
  constructor(viewContainerRef: ViewContainerRef);
@@ -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[]) => MessageResponse<import("stream-chat").UnknownType, import("stream-chat").UnknownType, import("stream-chat").LiteralStringForUnion, import("stream-chat").UnknownType, import("stream-chat").UnknownType, import("stream-chat").UnknownType>;
2
+ export declare const createMessagePreview: (user: UserResponse, text: string, attachments: Attachment[], mentionedUsers: UserResponse[]) => 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>;
package/lib/read-by.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { Channel, FormatMessageResponse, UserResponse } from 'stream-chat';
2
- export declare const getReadBy: (message: FormatMessageResponse, channel: Channel) => UserResponse<import("stream-chat").UnknownType>[];
2
+ export declare const getReadBy: (message: FormatMessageResponse, channel: Channel) => UserResponse<import("stream-chat").UR>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "2.6.0",
3
+ "version": "2.8.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/",
@@ -12,8 +12,8 @@
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": "^4.3.0",
16
- "stream-chat-css": "1.0.23",
15
+ "stream-chat": ">=4.3.0",
16
+ "stream-chat-css": "2.0.1",
17
17
  "@stream-io/stream-chat-css": "1.0.26"
18
18
  },
19
19
  "peerDependenciesMeta": {
@@ -1 +1 @@
1
- export const version = '2.6.0';
1
+ export const version = '2.8.0';