stream-chat-angular 2.5.1 → 2.6.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/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 +145 -51
- 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/chat-client.service.js +14 -2
- package/esm2015/lib/is-image-file.js +5 -0
- 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 +100 -28
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/chat-client.service.d.ts +4 -1
- package/lib/is-image-file.d.ts +1 -0
- 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,6 +1,6 @@
|
|
|
1
1
|
import { ApplicationRef, 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 = {
|
|
@@ -13,11 +13,14 @@ export declare class ChatClientService {
|
|
|
13
13
|
private notificationService;
|
|
14
14
|
chatClient: StreamChat;
|
|
15
15
|
notification$: Observable<Notification>;
|
|
16
|
+
appSettings$: Observable<AppSettings | undefined>;
|
|
16
17
|
connectionState$: Observable<'offline' | 'online'>;
|
|
17
18
|
private notificationSubject;
|
|
18
19
|
private connectionStateSubject;
|
|
20
|
+
private appSettingsSubject;
|
|
19
21
|
constructor(ngZone: NgZone, appRef: ApplicationRef, notificationService: NotificationService);
|
|
20
22
|
init(apiKey: string, userId: string, userToken: string): Promise<void>;
|
|
23
|
+
getAppSettings(): Promise<void>;
|
|
21
24
|
flagMessage(messageId: string): Promise<void>;
|
|
22
25
|
autocompleteUsers(searchTerm: string): Promise<import("stream-chat").UserResponse<import("stream-chat").UnknownType>[]>;
|
|
23
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatClientService, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isImageFile: (file: File) => boolean;
|
|
@@ -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.0';
|