stream-chat-angular 1.4.2 → 2.0.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/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +508 -51
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +29 -3
- package/esm2015/lib/chat-client.service.js +16 -1
- package/esm2015/lib/injection-tokens.js +3 -0
- package/esm2015/lib/message/highlight-mentions.pipe.js +23 -0
- package/esm2015/lib/message/message.component.js +3 -2
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +2 -2
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +145 -0
- package/esm2015/lib/message-input/message-input-config.service.js +3 -1
- package/esm2015/lib/message-input/message-input.component.js +52 -19
- package/esm2015/lib/message-input/textarea/textarea.component.js +42 -0
- package/esm2015/lib/message-input/textarea.directive.js +69 -0
- package/esm2015/lib/message-input/textarea.interface.js +2 -0
- package/esm2015/lib/message-preview.js +3 -2
- package/esm2015/lib/stream-autocomplete-textarea.module.js +33 -0
- package/esm2015/lib/stream-avatar.module.js +19 -0
- package/esm2015/lib/stream-chat.module.js +15 -11
- package/esm2015/lib/stream-textarea.module.js +31 -0
- package/esm2015/lib/types.js +1 -1
- package/esm2015/public-api.js +9 -1
- package/fesm2015/stream-chat-angular.js +454 -50
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +3 -2
- package/lib/chat-client.service.d.ts +1 -0
- package/lib/injection-tokens.d.ts +3 -0
- package/lib/message/highlight-mentions.pipe.d.ts +8 -0
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +42 -0
- package/lib/message-input/message-input-config.service.d.ts +5 -0
- package/lib/message-input/message-input.component.d.ts +18 -7
- package/lib/message-input/textarea/textarea.component.d.ts +16 -0
- package/lib/message-input/textarea.directive.d.ts +21 -0
- package/lib/message-input/textarea.interface.d.ts +12 -0
- package/lib/message-preview.d.ts +1 -1
- package/lib/stream-autocomplete-textarea.module.d.ts +11 -0
- package/lib/stream-avatar.module.d.ts +9 -0
- package/lib/stream-chat.module.d.ts +23 -21
- package/lib/stream-textarea.module.d.ts +9 -0
- package/lib/types.d.ts +7 -1
- package/package.json +2 -1
- package/public-api.d.ts +8 -0
- package/src/assets/version.ts +1 -1
package/lib/channel.service.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApplicationRef, NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelSort, Event } from 'stream-chat';
|
|
3
|
+
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelSort, Event, UserResponse } from 'stream-chat';
|
|
4
4
|
import { ChatClientService, Notification } from './chat-client.service';
|
|
5
5
|
import { MessageReactionType } from './message-reactions/message-reactions.component';
|
|
6
6
|
import { AttachmentUpload, StreamMessage } from './types';
|
|
@@ -39,12 +39,13 @@ export declare class ChannelService {
|
|
|
39
39
|
loadMoreChannels(): Promise<void>;
|
|
40
40
|
addReaction(messageId: string, reactionType: MessageReactionType): Promise<void>;
|
|
41
41
|
removeReaction(messageId: string, reactionType: MessageReactionType): Promise<void>;
|
|
42
|
-
sendMessage(text: string, attachments?: Attachment[]): Promise<void>;
|
|
42
|
+
sendMessage(text: string, attachments?: Attachment[], mentionedUsers?: UserResponse[]): Promise<void>;
|
|
43
43
|
resendMessage(message: StreamMessage): Promise<void>;
|
|
44
44
|
updateMessage(message: StreamMessage): Promise<void>;
|
|
45
45
|
deleteMessage(message: StreamMessage): Promise<void>;
|
|
46
46
|
uploadAttachments(uploads: AttachmentUpload[]): Promise<AttachmentUpload[]>;
|
|
47
47
|
deleteAttachment(attachmentUpload: AttachmentUpload): Promise<void>;
|
|
48
|
+
autocompleteMembers(searchTerm: string): Promise<import("stream-chat").ChannelMemberResponse<import("stream-chat").UnknownType>[]>;
|
|
48
49
|
private sendMessageRequest;
|
|
49
50
|
private handleNotification;
|
|
50
51
|
private handleRemovedFromChannelNotification;
|
|
@@ -19,6 +19,7 @@ export declare class ChatClientService {
|
|
|
19
19
|
constructor(ngZone: NgZone, appRef: ApplicationRef, notificationService: NotificationService);
|
|
20
20
|
init(apiKey: string, userId: string, userToken: string): Promise<void>;
|
|
21
21
|
flagMessage(messageId: string): Promise<void>;
|
|
22
|
+
autocompleteUsers(searchTerm: string): Promise<import("stream-chat").UserResponse<import("stream-chat").UnknownType>[]>;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatClientService, never>;
|
|
23
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<ChatClientService>;
|
|
24
25
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { UserResponse } from 'stream-chat';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class HighlightMentionsPipe implements PipeTransform {
|
|
5
|
+
transform(value?: string, mentionedUsers?: UserResponse[]): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightMentionsPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<HighlightMentionsPipe, "highlightMentions">;
|
|
8
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { MentionConfig } from 'angular-mentions';
|
|
3
|
+
import { MentionAutcompleteListItemContext, MentionAutcompleteListItem } from '../../types';
|
|
4
|
+
import { UserResponse } from 'stream-chat';
|
|
5
|
+
import { ChannelService } from '../../channel.service';
|
|
6
|
+
import { TextareaInterface } from '../textarea.interface';
|
|
7
|
+
import { ChatClientService } from '../../chat-client.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class AutocompleteTextareaComponent implements TextareaInterface, OnChanges {
|
|
10
|
+
private channelService;
|
|
11
|
+
private chatClientService;
|
|
12
|
+
class: string;
|
|
13
|
+
value: string;
|
|
14
|
+
areMentionsEnabled: boolean | undefined;
|
|
15
|
+
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
16
|
+
mentionScope: 'channel' | 'application';
|
|
17
|
+
readonly valueChange: EventEmitter<string>;
|
|
18
|
+
readonly send: EventEmitter<void>;
|
|
19
|
+
readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UnknownType>[]>;
|
|
20
|
+
private readonly labelKey;
|
|
21
|
+
private readonly triggerChar;
|
|
22
|
+
autocompleteConfig: MentionConfig;
|
|
23
|
+
private messageInput;
|
|
24
|
+
private subscriptions;
|
|
25
|
+
private mentionedUsers;
|
|
26
|
+
private userMentionConfig;
|
|
27
|
+
private searchTerm$;
|
|
28
|
+
constructor(channelService: ChannelService, chatClientService: ChatClientService);
|
|
29
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
+
filter(searchString: string, items: {
|
|
31
|
+
autocompleteLabel: string;
|
|
32
|
+
}[]): any[];
|
|
33
|
+
mentioned(item: MentionAutcompleteListItem, triggerChar?: string): string;
|
|
34
|
+
autcompleteSearchTermChanged(searchTerm: string): void;
|
|
35
|
+
inputChanged(): void;
|
|
36
|
+
inputLeft(): void;
|
|
37
|
+
sent(event: Event): void;
|
|
38
|
+
private updateMentionOptions;
|
|
39
|
+
private updateMentionedUsersFromText;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteTextareaComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteTextareaComponent, "stream-autocomplete-textarea", never, { "value": "value"; "areMentionsEnabled": "areMentionsEnabled"; "mentionAutocompleteItemTemplate": "mentionAutocompleteItemTemplate"; "mentionScope": "mentionScope"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never, never>;
|
|
42
|
+
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { MentionAutcompleteListItemContext } from '../types';
|
|
1
3
|
import * as i0 from "@angular/core";
|
|
2
4
|
export declare class MessageInputConfigService {
|
|
3
5
|
isFileUploadEnabled: boolean | undefined;
|
|
6
|
+
areMentionsEnabled: boolean | undefined;
|
|
7
|
+
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
4
8
|
acceptedFileTypes: string[] | undefined;
|
|
5
9
|
isMultipleFileUploadEnabled: boolean | undefined;
|
|
10
|
+
mentionScope: 'channel' | 'application' | undefined;
|
|
6
11
|
constructor();
|
|
7
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputConfigService, never>;
|
|
8
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<MessageInputConfigService>;
|
|
@@ -1,35 +1,46 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, Type } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { UserResponse } from 'stream-chat';
|
|
3
4
|
import { AttachmentService } from '../attachment.service';
|
|
4
5
|
import { ChannelService } from '../channel.service';
|
|
5
6
|
import { NotificationService } from '../notification.service';
|
|
6
|
-
import { AttachmentUpload, StreamMessage } from '../types';
|
|
7
|
+
import { AttachmentUpload, MentionAutcompleteListItemContext, StreamMessage } from '../types';
|
|
7
8
|
import { MessageInputConfigService } from './message-input-config.service';
|
|
9
|
+
import { TextareaInterface } from './textarea.interface';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class MessageInputComponent implements OnChanges, OnDestroy {
|
|
11
|
+
export declare class MessageInputComponent implements OnInit, OnChanges, OnDestroy {
|
|
10
12
|
private channelService;
|
|
11
13
|
private notificationService;
|
|
12
14
|
private attachmentService;
|
|
13
15
|
private configService;
|
|
16
|
+
private textareaType;
|
|
17
|
+
private componentFactoryResolver;
|
|
14
18
|
isFileUploadEnabled: boolean | undefined;
|
|
19
|
+
areMentionsEnabled: boolean | undefined;
|
|
20
|
+
mentionScope: 'channel' | 'application' | undefined;
|
|
21
|
+
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
15
22
|
acceptedFileTypes: string[] | undefined;
|
|
16
23
|
isMultipleFileUploadEnabled: boolean | undefined;
|
|
17
24
|
message: StreamMessage | undefined;
|
|
18
25
|
readonly messageUpdate: EventEmitter<void>;
|
|
19
26
|
isFileUploadAuthorized: boolean | undefined;
|
|
20
27
|
attachmentUploads$: Observable<AttachmentUpload[]>;
|
|
21
|
-
|
|
28
|
+
textareaValue: string;
|
|
29
|
+
textareaRef: ComponentRef<TextareaInterface> | undefined;
|
|
30
|
+
mentionedUsers: UserResponse[];
|
|
22
31
|
private fileInput;
|
|
32
|
+
private textareaAnchor;
|
|
23
33
|
private subscriptions;
|
|
24
34
|
private hideNotification;
|
|
25
|
-
constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService);
|
|
35
|
+
constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver);
|
|
36
|
+
ngOnInit(): void;
|
|
26
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
27
38
|
ngOnDestroy(): void;
|
|
28
|
-
messageSent(
|
|
39
|
+
messageSent(): Promise<void>;
|
|
29
40
|
get accept(): string;
|
|
30
41
|
filesSelected(fileList: FileList | null): Promise<void>;
|
|
31
42
|
private clearFileInput;
|
|
32
43
|
private get isUpdate();
|
|
33
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "acceptedFileTypes": "acceptedFileTypes"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; }, { "messageUpdate": "messageUpdate"; }, never, never>;
|
|
45
|
+
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>;
|
|
35
46
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
|
2
|
+
import { TextareaInterface } from '../textarea.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TextareaComponent implements TextareaInterface, OnChanges {
|
|
5
|
+
class: string;
|
|
6
|
+
value: string;
|
|
7
|
+
readonly valueChange: EventEmitter<string>;
|
|
8
|
+
readonly send: EventEmitter<void>;
|
|
9
|
+
private messageInput;
|
|
10
|
+
constructor();
|
|
11
|
+
ngOnChanges(): void;
|
|
12
|
+
inputChanged(): void;
|
|
13
|
+
sent(event: Event): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "stream-textarea", never, { "value": "value"; }, { "valueChange": "valueChange"; "send": "send"; }, never, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { UserResponse } from 'stream-chat';
|
|
3
|
+
import { MentionAutcompleteListItemContext } from '../types';
|
|
4
|
+
import { TextareaInterface } from './textarea.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TextareaDirective implements OnChanges {
|
|
7
|
+
viewContainerRef: ViewContainerRef;
|
|
8
|
+
componentRef: ComponentRef<TextareaInterface> | undefined;
|
|
9
|
+
areMentionsEnabled: boolean | undefined;
|
|
10
|
+
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
11
|
+
mentionScope?: 'channel' | 'application';
|
|
12
|
+
value: string;
|
|
13
|
+
readonly valueChange: EventEmitter<string>;
|
|
14
|
+
readonly send: EventEmitter<void>;
|
|
15
|
+
readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UnknownType>[]>;
|
|
16
|
+
private subscriptions;
|
|
17
|
+
constructor(viewContainerRef: ViewContainerRef);
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextareaDirective, "[streamTextarea]", never, { "componentRef": "componentRef"; "areMentionsEnabled": "areMentionsEnabled"; "mentionAutocompleteItemTemplate": "mentionAutocompleteItemTemplate"; "mentionScope": "mentionScope"; "value": "value"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { UserResponse } from 'stream-chat';
|
|
3
|
+
import { MentionAutcompleteListItemContext } from '../types';
|
|
4
|
+
export interface TextareaInterface extends OnChanges {
|
|
5
|
+
value: string;
|
|
6
|
+
valueChange: EventEmitter<string>;
|
|
7
|
+
send: EventEmitter<void>;
|
|
8
|
+
userMentions?: EventEmitter<UserResponse[]>;
|
|
9
|
+
areMentionsEnabled?: boolean;
|
|
10
|
+
mentionAutocompleteItemTemplate?: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
11
|
+
mentionScope?: 'channel' | 'application';
|
|
12
|
+
}
|
package/lib/message-preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Attachment, MessageResponse, UserResponse } from 'stream-chat';
|
|
2
|
-
export declare const createMessagePreview: (user: UserResponse, text: string, attachments: Attachment[]) => 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").UnknownType, import("stream-chat").UnknownType, import("stream-chat").LiteralStringForUnion, import("stream-chat").UnknownType, import("stream-chat").UnknownType, import("stream-chat").UnknownType>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./message-input/autocomplete-textarea/autocomplete-textarea.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@ngx-translate/core";
|
|
5
|
+
import * as i4 from "angular-mentions";
|
|
6
|
+
import * as i5 from "./stream-avatar.module";
|
|
7
|
+
export declare class StreamAutocompleteTextareaModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StreamAutocompleteTextareaModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamAutocompleteTextareaModule, [typeof i1.AutocompleteTextareaComponent], [typeof i2.CommonModule, typeof i3.TranslateModule, typeof i4.MentionModule, typeof i5.StreamAvatarModule], [typeof i1.AutocompleteTextareaComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StreamAutocompleteTextareaModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./avatar/avatar.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@ngx-translate/core";
|
|
5
|
+
export declare class StreamAvatarModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StreamAvatarModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamAvatarModule, [typeof i1.AvatarComponent], [typeof i2.CommonModule, typeof i3.TranslateModule], [typeof i1.AvatarComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StreamAvatarModule>;
|
|
9
|
+
}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./
|
|
3
|
-
import * as i2 from "./channel/channel.component";
|
|
4
|
-
import * as i3 from "./channel-
|
|
5
|
-
import * as i4 from "./channel-
|
|
6
|
-
import * as i5 from "./
|
|
7
|
-
import * as i6 from "./message/message.component";
|
|
8
|
-
import * as i7 from "./message-
|
|
9
|
-
import * as i8 from "./
|
|
10
|
-
import * as i9 from "./
|
|
11
|
-
import * as i10 from "./
|
|
12
|
-
import * as i11 from "./
|
|
13
|
-
import * as i12 from "./
|
|
14
|
-
import * as i13 from "./
|
|
15
|
-
import * as i14 from "./notification/notification.component";
|
|
16
|
-
import * as i15 from "./
|
|
17
|
-
import * as i16 from "./
|
|
18
|
-
import * as i17 from "./
|
|
19
|
-
import * as i18 from "
|
|
20
|
-
import * as i19 from "@
|
|
21
|
-
import * as i20 from "@ngx-
|
|
2
|
+
import * as i1 from "./channel/channel.component";
|
|
3
|
+
import * as i2 from "./channel-header/channel-header.component";
|
|
4
|
+
import * as i3 from "./channel-list/channel-list.component";
|
|
5
|
+
import * as i4 from "./channel-preview/channel-preview.component";
|
|
6
|
+
import * as i5 from "./message/message.component";
|
|
7
|
+
import * as i6 from "./message-input/message-input.component";
|
|
8
|
+
import * as i7 from "./message-list/message-list.component";
|
|
9
|
+
import * as i8 from "./loading-indicator/loading-indicator.component";
|
|
10
|
+
import * as i9 from "./icon/icon.component";
|
|
11
|
+
import * as i10 from "./message-actions-box/message-actions-box.component";
|
|
12
|
+
import * as i11 from "./attachment-list/attachment-list.component";
|
|
13
|
+
import * as i12 from "./message-reactions/message-reactions.component";
|
|
14
|
+
import * as i13 from "./notification/notification.component";
|
|
15
|
+
import * as i14 from "./notification-list/notification-list.component";
|
|
16
|
+
import * as i15 from "./attachment-preview-list/attachment-preview-list.component";
|
|
17
|
+
import * as i16 from "./modal/modal.component";
|
|
18
|
+
import * as i17 from "./message-input/textarea.directive";
|
|
19
|
+
import * as i18 from "./message/highlight-mentions.pipe";
|
|
20
|
+
import * as i19 from "@angular/common";
|
|
21
|
+
import * as i20 from "@ctrl/ngx-emoji-mart/ngx-emoji";
|
|
22
|
+
import * as i21 from "@ngx-translate/core";
|
|
23
|
+
import * as i22 from "./stream-avatar.module";
|
|
22
24
|
export declare class StreamChatModule {
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<StreamChatModule, never>;
|
|
24
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamChatModule, [typeof i1.
|
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamChatModule, [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i17.TextareaDirective, typeof i18.HighlightMentionsPipe], [typeof i19.CommonModule, typeof i20.EmojiModule, typeof i21.TranslateModule, typeof i22.StreamAvatarModule], [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i18.HighlightMentionsPipe]>;
|
|
25
27
|
static ɵinj: i0.ɵɵInjectorDeclaration<StreamChatModule>;
|
|
26
28
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./message-input/textarea/textarea.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@ngx-translate/core";
|
|
5
|
+
export declare class StreamTextareaModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StreamTextareaModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StreamTextareaModule, [typeof i1.TextareaComponent], [typeof i2.CommonModule, typeof i3.TranslateModule], [typeof i1.TextareaComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StreamTextareaModule>;
|
|
9
|
+
}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Event, FormatMessageResponse, LiteralStringForUnion, Mute, UserResponse } from 'stream-chat';
|
|
1
|
+
import type { ChannelMemberResponse, Event, FormatMessageResponse, LiteralStringForUnion, Mute, UserResponse } from 'stream-chat';
|
|
2
2
|
export declare type UnknownType = Record<string, unknown>;
|
|
3
3
|
export declare type CustomTrigger = {
|
|
4
4
|
[key: string]: {
|
|
@@ -47,3 +47,9 @@ export declare type AttachmentUpload = {
|
|
|
47
47
|
type: 'image' | 'file';
|
|
48
48
|
previewUri?: string | ArrayBuffer;
|
|
49
49
|
};
|
|
50
|
+
export declare type MentionAutcompleteListItemContext = {
|
|
51
|
+
item: MentionAutcompleteListItem;
|
|
52
|
+
};
|
|
53
|
+
export declare type MentionAutcompleteListItem = (ChannelMemberResponse | UserResponse) & {
|
|
54
|
+
autocompleteLabel: string;
|
|
55
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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/",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"stream-chat-css": "^1.0.23"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"angular-mentions": "^1.4.0",
|
|
19
20
|
"@ctrl/ngx-emoji-mart": "^6.0.1",
|
|
20
21
|
"dayjs": "^1.10.7",
|
|
21
22
|
"pretty-bytes": "^5.6.0",
|
package/public-api.d.ts
CHANGED
|
@@ -15,8 +15,13 @@ export * from './lib/channel-list/channel-list-toggle.service';
|
|
|
15
15
|
export * from './lib/message/message.component';
|
|
16
16
|
export * from './lib/message/parse-date';
|
|
17
17
|
export * from './lib/message/read-by-text';
|
|
18
|
+
export * from './lib/message/highlight-mentions.pipe';
|
|
18
19
|
export * from './lib/message-input/message-input.component';
|
|
20
|
+
export * from './lib/message-input/textarea/textarea.component';
|
|
21
|
+
export * from './lib/message-input/autocomplete-textarea/autocomplete-textarea.component';
|
|
19
22
|
export * from './lib/message-input/message-input-config.service';
|
|
23
|
+
export * from './lib/message-input/textarea.directive';
|
|
24
|
+
export * from './lib/message-input/textarea.interface';
|
|
20
25
|
export * from './lib/message-list/message-list.component';
|
|
21
26
|
export * from './lib/message-list/image-load.service';
|
|
22
27
|
export * from './lib/message-list/group-styles';
|
|
@@ -32,4 +37,7 @@ export * from './lib/device-width';
|
|
|
32
37
|
export * from './lib/message-preview';
|
|
33
38
|
export * from './lib/notification.service';
|
|
34
39
|
export * from './lib/stream-chat.module';
|
|
40
|
+
export * from './lib/stream-autocomplete-textarea.module';
|
|
41
|
+
export * from './lib/stream-textarea.module';
|
|
42
|
+
export * from './lib/injection-tokens';
|
|
35
43
|
export * from './lib/types';
|
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '
|
|
1
|
+
export const version = '2.0.0';
|