stream-chat-angular 2.5.0 → 2.6.2
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 +2 -2
- package/assets/i18n/en.d.ts +1 -0
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +323 -204
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/i18n/en.js +2 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment.service.js +3 -3
- package/esm2015/lib/channel-preview/channel-preview.component.js +22 -17
- package/esm2015/lib/channel.service.js +93 -87
- package/esm2015/lib/chat-client.service.js +32 -33
- package/esm2015/lib/is-image-file.js +5 -0
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +23 -10
- package/esm2015/lib/message-input/message-input-config.service.js +1 -1
- package/esm2015/lib/message-input/message-input.component.js +67 -10
- package/esm2015/lib/notification-list/notification-list.component.js +2 -2
- package/esm2015/lib/notification.service.js +7 -7
- package/esm2015/public-api.js +2 -1
- package/fesm2015/stream-chat-angular.js +253 -170
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel-preview/channel-preview.component.d.ts +3 -2
- package/lib/channel.service.d.ts +2 -3
- package/lib/chat-client.service.d.ts +7 -5
- package/lib/is-image-file.d.ts +1 -0
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +2 -2
- package/lib/message-input/message-input-config.service.d.ts +3 -0
- package/lib/message-input/message-input.component.d.ts +8 -1
- package/lib/notification.service.d.ts +3 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/assets/i18n/en.ts +1 -0
- package/src/assets/version.ts +1 -1
|
@@ -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;
|
package/lib/channel.service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
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>;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Event, StreamChat } from 'stream-chat';
|
|
3
|
+
import { AppSettings, Event, StreamChat } from 'stream-chat';
|
|
4
4
|
import { NotificationService } from './notification.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare type Notification = {
|
|
7
|
-
eventType:
|
|
7
|
+
eventType: string;
|
|
8
8
|
event: Event;
|
|
9
9
|
};
|
|
10
10
|
export declare class ChatClientService {
|
|
11
11
|
private ngZone;
|
|
12
|
-
private appRef;
|
|
13
12
|
private notificationService;
|
|
14
13
|
chatClient: StreamChat;
|
|
15
14
|
notification$: Observable<Notification>;
|
|
15
|
+
appSettings$: Observable<AppSettings | undefined>;
|
|
16
16
|
connectionState$: Observable<'offline' | 'online'>;
|
|
17
17
|
private notificationSubject;
|
|
18
18
|
private connectionStateSubject;
|
|
19
|
-
|
|
19
|
+
private appSettingsSubject;
|
|
20
|
+
constructor(ngZone: NgZone, notificationService: NotificationService);
|
|
20
21
|
init(apiKey: string, userId: string, userToken: string): Promise<void>;
|
|
22
|
+
getAppSettings(): Promise<void>;
|
|
21
23
|
flagMessage(messageId: string): Promise<void>;
|
|
22
24
|
autocompleteUsers(searchTerm: string): Promise<import("stream-chat").UserResponse<import("stream-chat").UnknownType>[]>;
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatClientService, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isImageFile: (file: File) => boolean;
|
|
@@ -20,7 +20,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
|
|
|
20
20
|
readonly send: EventEmitter<void>;
|
|
21
21
|
readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UnknownType>[]>;
|
|
22
22
|
private readonly labelKey;
|
|
23
|
-
private readonly
|
|
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
|
-
|
|
37
|
+
itemSelectedFromAutocompleteList(item: MentionAutcompleteListItem, triggerChar?: string): string;
|
|
38
38
|
autcompleteSearchTermChanged(searchTerm: string): void;
|
|
39
39
|
inputChanged(): void;
|
|
40
40
|
inputLeft(): void;
|
|
@@ -5,6 +5,9 @@ export declare class MessageInputConfigService {
|
|
|
5
5
|
isFileUploadEnabled: boolean | undefined;
|
|
6
6
|
areMentionsEnabled: boolean | undefined;
|
|
7
7
|
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated https://getstream.io/chat/docs/sdk/angular/services/message-input-config/#overview
|
|
10
|
+
*/
|
|
8
11
|
acceptedFileTypes: string[] | undefined;
|
|
9
12
|
isMultipleFileUploadEnabled: boolean | undefined;
|
|
10
13
|
mentionScope: 'channel' | 'application' | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { ChatClientService } from '../chat-client.service';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
import { UserResponse } from 'stream-chat';
|
|
4
5
|
import { AttachmentService } from '../attachment.service';
|
|
@@ -16,10 +17,14 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
|
|
|
16
17
|
private textareaType;
|
|
17
18
|
private componentFactoryResolver;
|
|
18
19
|
private cdRef;
|
|
20
|
+
private chatClient;
|
|
19
21
|
isFileUploadEnabled: boolean | undefined;
|
|
20
22
|
areMentionsEnabled: boolean | undefined;
|
|
21
23
|
mentionScope: 'channel' | 'application' | undefined;
|
|
22
24
|
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated https://getstream.io/chat/docs/sdk/angular/components/message-input/#caution-acceptedfiletypes
|
|
27
|
+
*/
|
|
23
28
|
acceptedFileTypes: string[] | undefined;
|
|
24
29
|
isMultipleFileUploadEnabled: boolean | undefined;
|
|
25
30
|
message: StreamMessage | undefined;
|
|
@@ -36,7 +41,8 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
|
|
|
36
41
|
private subscriptions;
|
|
37
42
|
private hideNotification;
|
|
38
43
|
private isViewInited;
|
|
39
|
-
|
|
44
|
+
private appSettings;
|
|
45
|
+
constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver, cdRef: ChangeDetectorRef, chatClient: ChatClientService);
|
|
40
46
|
ngAfterViewInit(): void;
|
|
41
47
|
ngOnChanges(changes: SimpleChanges): void;
|
|
42
48
|
ngOnDestroy(): void;
|
|
@@ -47,6 +53,7 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
|
|
|
47
53
|
private clearFileInput;
|
|
48
54
|
private get isUpdate();
|
|
49
55
|
private initTextarea;
|
|
56
|
+
private areAttachemntsValid;
|
|
50
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
|
|
51
58
|
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>;
|
|
52
59
|
}
|
|
@@ -4,13 +4,14 @@ export declare type NotificationType = 'success' | 'error';
|
|
|
4
4
|
export declare type NotificationPayload = {
|
|
5
5
|
type: NotificationType;
|
|
6
6
|
text: string;
|
|
7
|
+
translateParams?: Object;
|
|
7
8
|
};
|
|
8
9
|
export declare class NotificationService {
|
|
9
10
|
notifications$: Observable<NotificationPayload[]>;
|
|
10
11
|
private notificationsSubject;
|
|
11
12
|
constructor();
|
|
12
|
-
addTemporaryNotification(text: string, type?: NotificationType, timeout?: number): () => void;
|
|
13
|
-
addPermanentNotification(text: string, type?: NotificationType): () => void;
|
|
13
|
+
addTemporaryNotification(text: string, type?: NotificationType, timeout?: number, translateParams?: Object): () => void;
|
|
14
|
+
addPermanentNotification(text: string, type?: NotificationType, translateParams?: Object): () => void;
|
|
14
15
|
private addNotification;
|
|
15
16
|
private removeNotification;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './lib/notification-list/notification-list.component';
|
|
|
32
32
|
export * from './lib/modal/modal.component';
|
|
33
33
|
export * from './lib/read-by';
|
|
34
34
|
export * from './lib/is-image-attachment';
|
|
35
|
+
export * from './lib/is-image-file';
|
|
35
36
|
export * from './lib/device-width';
|
|
36
37
|
export * from './lib/message-preview';
|
|
37
38
|
export * from './lib/notification.service';
|
package/src/assets/i18n/en.ts
CHANGED
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.6.2';
|