@banta/sdk 5.3.0 → 5.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.
- package/{esm2022 → esm2020}/banta-sdk.mjs +4 -4
- package/{esm2022 → esm2020}/lib/attachment-scraper.mjs +1 -1
- package/esm2020/lib/banta/banta.component.mjs +204 -0
- package/{esm2022 → esm2020}/lib/banta-logo.component.mjs +11 -11
- package/{esm2022 → esm2020}/lib/banta-sdk.module.mjs +135 -135
- package/esm2020/lib/chat/banta-chat/banta-chat.component.mjs +209 -0
- package/esm2020/lib/chat/chat-message/chat-message.component.mjs +62 -0
- package/esm2020/lib/chat/chat-view/chat-view.component.mjs +170 -0
- package/{esm2022 → esm2020}/lib/chat/chat.module.mjs +51 -51
- package/{esm2022 → esm2020}/lib/chat/index.mjs +5 -5
- package/esm2020/lib/chat/live-chat-message.component.mjs +80 -0
- package/{esm2022 → esm2020}/lib/chat-backend-base.mjs +30 -30
- package/esm2020/lib/chat-backend.mjs +194 -0
- package/{esm2022 → esm2020}/lib/chat-source-base.mjs +1 -1
- package/esm2020/lib/chat-source.mjs +233 -0
- package/esm2020/lib/comments/attachment-button/attachment-button.component.mjs +76 -0
- package/esm2020/lib/comments/attachment-scraper.directive.mjs +107 -0
- package/esm2020/lib/comments/banta-comments/banta-comments.component.mjs +749 -0
- package/esm2020/lib/comments/comment/comment.component.mjs +175 -0
- package/esm2020/lib/comments/comment-field/comment-field.component.mjs +401 -0
- package/esm2020/lib/comments/comment-sort/comment-sort.component.mjs +37 -0
- package/esm2020/lib/comments/comment-view/comment-view.component.mjs +470 -0
- package/{esm2022 → esm2020}/lib/comments/comments.module.mjs +111 -111
- package/{esm2022 → esm2020}/lib/comments/index.mjs +10 -10
- package/esm2020/lib/comments/live-comment.component.mjs +80 -0
- package/{esm2022 → esm2020}/lib/comments/reply-send-options.directive.mjs +13 -13
- package/esm2020/lib/common/attachment/attachment.component.mjs +128 -0
- package/{esm2022 → esm2020}/lib/common/attachments/attachments.component.mjs +75 -75
- package/{esm2022 → esm2020}/lib/common/common.module.mjs +68 -68
- package/{esm2022 → esm2020}/lib/common/index.mjs +10 -10
- package/{esm2022 → esm2020}/lib/common/lazy-connection.mjs +14 -14
- package/esm2020/lib/common/lightbox/lightbox.component.mjs +31 -0
- package/esm2020/lib/common/markdown-to-html.pipe.mjs +88 -0
- package/esm2020/lib/common/mention-linker.pipe.mjs +35 -0
- package/esm2020/lib/common/timer-pool.service.mjs +83 -0
- package/esm2020/lib/common/timestamp.component.mjs +123 -0
- package/{esm2022 → esm2020}/lib/common/trust-resource-url.pipe.mjs +22 -22
- package/esm2020/lib/emoji/emoji-selector-button.component.mjs +116 -0
- package/esm2020/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.mjs +98 -0
- package/{esm2022 → esm2020}/lib/emoji/emoji.module.mjs +55 -55
- package/{esm2022 → esm2020}/lib/emoji/emojis.mjs +6507 -6507
- package/{esm2022 → esm2020}/lib/emoji/index.mjs +4 -4
- package/esm2020/lib/giphy-attachments.mjs +16 -0
- package/{esm2022 → esm2020}/lib/index.mjs +19 -19
- package/{esm2022 → esm2020}/lib/live-message.component.mjs +61 -61
- package/{esm2022 → esm2020}/lib/message-menu-item.mjs +1 -1
- package/{esm2022 → esm2020}/lib/sdk-options.mjs +1 -1
- package/esm2020/lib/static-chat-source.mjs +71 -0
- package/esm2020/lib/tweet-attachments.mjs +13 -0
- package/esm2020/lib/url-attachments.mjs +42 -0
- package/esm2020/lib/youtube-attachments.mjs +29 -0
- package/{esm2022 → esm2020}/public-api.mjs +4 -4
- package/fesm2015/banta-sdk.mjs +11258 -0
- package/fesm2015/banta-sdk.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/banta-sdk.mjs +10823 -10822
- package/fesm2020/banta-sdk.mjs.map +1 -0
- package/index.d.ts +5 -5
- package/lib/attachment-scraper.d.ts +15 -15
- package/lib/banta/banta.component.d.ts +58 -58
- package/lib/banta-logo.component.d.ts +5 -5
- package/lib/banta-sdk.module.d.ts +31 -31
- package/lib/chat/banta-chat/banta-chat.component.d.ts +79 -79
- package/lib/chat/chat-message/chat-message.component.d.ts +21 -21
- package/lib/chat/chat-view/chat-view.component.d.ts +52 -52
- package/lib/chat/chat.module.d.ts +15 -15
- package/lib/chat/index.d.ts +5 -5
- package/lib/chat/live-chat-message.component.d.ts +23 -23
- package/lib/chat-backend-base.d.ts +72 -72
- package/lib/chat-backend.d.ts +67 -67
- package/lib/chat-source-base.d.ts +44 -44
- package/lib/chat-source.d.ts +65 -65
- package/lib/comments/attachment-button/attachment-button.component.d.ts +17 -17
- package/lib/comments/attachment-scraper.directive.d.ts +21 -21
- package/lib/comments/banta-comments/banta-comments.component.d.ts +203 -203
- package/lib/comments/comment/comment.component.d.ts +72 -72
- package/lib/comments/comment-field/comment-field.component.d.ts +89 -89
- package/lib/comments/comment-sort/comment-sort.component.d.ts +16 -16
- package/lib/comments/comment-view/comment-view.component.d.ts +121 -121
- package/lib/comments/comments.module.d.ts +30 -30
- package/lib/comments/index.d.ts +10 -10
- package/lib/comments/live-comment.component.d.ts +23 -23
- package/lib/comments/reply-send-options.directive.d.ts +5 -5
- package/lib/common/attachment/attachment.component.d.ts +34 -34
- package/lib/common/attachments/attachments.component.d.ts +26 -26
- package/lib/common/common.module.d.ts +19 -19
- package/lib/common/index.d.ts +10 -10
- package/lib/common/lazy-connection.d.ts +6 -6
- package/lib/common/lightbox/lightbox.component.d.ts +14 -14
- package/lib/common/markdown-to-html.pipe.d.ts +15 -15
- package/lib/common/mention-linker.pipe.d.ts +13 -13
- package/lib/common/timer-pool.service.d.ts +15 -15
- package/lib/common/timestamp.component.d.ts +19 -19
- package/lib/common/trust-resource-url.pipe.d.ts +10 -10
- package/lib/emoji/emoji-selector-button.component.d.ts +30 -30
- package/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.d.ts +26 -26
- package/lib/emoji/emoji.module.d.ts +16 -16
- package/lib/emoji/emojis.d.ts +6507 -6507
- package/lib/emoji/index.d.ts +4 -4
- package/lib/giphy-attachments.d.ts +5 -5
- package/lib/index.d.ts +19 -19
- package/lib/live-message.component.d.ts +22 -22
- package/lib/message-menu-item.d.ts +6 -6
- package/lib/sdk-options.d.ts +5 -5
- package/lib/static-chat-source.d.ts +42 -42
- package/lib/tweet-attachments.d.ts +5 -5
- package/lib/url-attachments.d.ts +14 -14
- package/lib/youtube-attachments.d.ts +5 -5
- package/package.json +11 -5
- package/public-api.d.ts +1 -1
- package/esm2022/lib/banta/banta.component.mjs +0 -204
- package/esm2022/lib/chat/banta-chat/banta-chat.component.mjs +0 -209
- package/esm2022/lib/chat/chat-message/chat-message.component.mjs +0 -62
- package/esm2022/lib/chat/chat-view/chat-view.component.mjs +0 -170
- package/esm2022/lib/chat/live-chat-message.component.mjs +0 -80
- package/esm2022/lib/chat-backend.mjs +0 -194
- package/esm2022/lib/chat-source.mjs +0 -233
- package/esm2022/lib/comments/attachment-button/attachment-button.component.mjs +0 -76
- package/esm2022/lib/comments/attachment-scraper.directive.mjs +0 -107
- package/esm2022/lib/comments/banta-comments/banta-comments.component.mjs +0 -748
- package/esm2022/lib/comments/comment/comment.component.mjs +0 -175
- package/esm2022/lib/comments/comment-field/comment-field.component.mjs +0 -401
- package/esm2022/lib/comments/comment-sort/comment-sort.component.mjs +0 -37
- package/esm2022/lib/comments/comment-view/comment-view.component.mjs +0 -470
- package/esm2022/lib/comments/live-comment.component.mjs +0 -80
- package/esm2022/lib/common/attachment/attachment.component.mjs +0 -128
- package/esm2022/lib/common/lightbox/lightbox.component.mjs +0 -31
- package/esm2022/lib/common/markdown-to-html.pipe.mjs +0 -88
- package/esm2022/lib/common/mention-linker.pipe.mjs +0 -35
- package/esm2022/lib/common/timer-pool.service.mjs +0 -83
- package/esm2022/lib/common/timestamp.component.mjs +0 -123
- package/esm2022/lib/emoji/emoji-selector-button.component.mjs +0 -115
- package/esm2022/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.mjs +0 -98
- package/esm2022/lib/giphy-attachments.mjs +0 -16
- package/esm2022/lib/static-chat-source.mjs +0 -71
- package/esm2022/lib/tweet-attachments.mjs +0 -13
- package/esm2022/lib/url-attachments.mjs +0 -42
- package/esm2022/lib/youtube-attachments.mjs +0 -29
- package/fesm2022/banta-sdk.mjs.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ChatMessage } from '@banta/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ChatBackendBase } from '../chat-backend-base';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class LiveChatMessageComponent {
|
|
6
|
-
private backend;
|
|
7
|
-
constructor(backend: ChatBackendBase);
|
|
8
|
-
private _message;
|
|
9
|
-
private _upvoted;
|
|
10
|
-
private _reported;
|
|
11
|
-
private _selected;
|
|
12
|
-
get upvoted(): Observable<void>;
|
|
13
|
-
get reported(): Observable<void>;
|
|
14
|
-
get selected(): Observable<void>;
|
|
15
|
-
get message(): ChatMessage;
|
|
16
|
-
private unsubscribe;
|
|
17
|
-
set message(value: ChatMessage);
|
|
18
|
-
report(): void;
|
|
19
|
-
upvote(): void;
|
|
20
|
-
select(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LiveChatMessageComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LiveChatMessageComponent, "banta-live-chat-message", never, { "message":
|
|
23
|
-
}
|
|
1
|
+
import { ChatMessage } from '@banta/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ChatBackendBase } from '../chat-backend-base';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LiveChatMessageComponent {
|
|
6
|
+
private backend;
|
|
7
|
+
constructor(backend: ChatBackendBase);
|
|
8
|
+
private _message;
|
|
9
|
+
private _upvoted;
|
|
10
|
+
private _reported;
|
|
11
|
+
private _selected;
|
|
12
|
+
get upvoted(): Observable<void>;
|
|
13
|
+
get reported(): Observable<void>;
|
|
14
|
+
get selected(): Observable<void>;
|
|
15
|
+
get message(): ChatMessage;
|
|
16
|
+
private unsubscribe;
|
|
17
|
+
set message(value: ChatMessage);
|
|
18
|
+
report(): void;
|
|
19
|
+
upvote(): void;
|
|
20
|
+
select(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LiveChatMessageComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LiveChatMessageComponent, "banta-live-chat-message", never, { "message": "message"; }, { "upvoted": "upvoted"; "reported": "reported"; "selected": "selected"; }, never, never, false>;
|
|
23
|
+
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ChatMessage, CommentsOrder, Notification, User, UrlCard, FilterMode, Topic } from '@banta/common';
|
|
3
|
-
import { ChatSourceBase } from './chat-source-base';
|
|
4
|
-
import { AttachmentResolver, AttachmentScraper } from './attachment-scraper';
|
|
5
|
-
export interface ChatSourceOptions {
|
|
6
|
-
sortOrder?: CommentsOrder;
|
|
7
|
-
filterMode?: FilterMode;
|
|
8
|
-
/**
|
|
9
|
-
* How many messages should be loaded initially?
|
|
10
|
-
*/
|
|
11
|
-
initialMessageCount?: number;
|
|
12
|
-
metadata?: Record<string, any>;
|
|
13
|
-
}
|
|
14
|
-
export declare abstract class ChatBackendBase {
|
|
15
|
-
constructor();
|
|
16
|
-
abstract getSourceForTopic(topicId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
17
|
-
abstract getSourceForThread(topicId: string, messageId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
18
|
-
/**
|
|
19
|
-
* Get the count of the given topic
|
|
20
|
-
* @param topicId
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
|
-
abstract getSourceCountForTopic(topicId: string): Promise<number>;
|
|
24
|
-
/**
|
|
25
|
-
* Get the count of the given topics.
|
|
26
|
-
* @param topicId Topics to count messages on. Maximum of 1000.
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
abstract getSourceCountForTopics(topicIds: string[]): Promise<Record<string, number>>;
|
|
30
|
-
/**
|
|
31
|
-
* Get information about the given topic.
|
|
32
|
-
* @param topicId
|
|
33
|
-
* @returns The topic object, or undefined if no such topic was found.
|
|
34
|
-
*/
|
|
35
|
-
abstract getTopic(topicId: string): Promise<Topic | undefined>;
|
|
36
|
-
/**
|
|
37
|
-
* Get information about the given topics
|
|
38
|
-
* @param topicIds The topic IDs to look up. Maximum of 1000.
|
|
39
|
-
* @returns An array of matching topic objects.
|
|
40
|
-
*/
|
|
41
|
-
abstract getTopicsById(topicIds: string[]): Promise<Topic[]>;
|
|
42
|
-
/**
|
|
43
|
-
* Get a set of messages from the given topic.
|
|
44
|
-
* @param topicId
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
|
-
abstract getMessages(topicId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
48
|
-
/**
|
|
49
|
-
* Get a set of messages from the given topic.
|
|
50
|
-
* @param topicId
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
|
-
abstract getReplies(parentMessageId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
54
|
-
abstract refreshMessage(message: ChatMessage): Promise<ChatMessage>;
|
|
55
|
-
abstract getMessage(topicId: string, messageId: string): Promise<ChatMessage>;
|
|
56
|
-
abstract getSubMessage(topicId: string, parentMessageId: string, messageId: string): Promise<ChatMessage>;
|
|
57
|
-
abstract watchMessage(message: ChatMessage, handler: (message: ChatMessage) => void): () => void;
|
|
58
|
-
abstract getCardForUrl(url: string): Promise<UrlCard>;
|
|
59
|
-
readonly notificationsChanged: Observable<Notification[]>;
|
|
60
|
-
readonly newNotification: Observable<Notification>;
|
|
61
|
-
private _userChanged;
|
|
62
|
-
private _user;
|
|
63
|
-
get userChanged(): Observable<User>;
|
|
64
|
-
set user(user: User);
|
|
65
|
-
get user(): User;
|
|
66
|
-
private _attachmentScrapers;
|
|
67
|
-
private _attachmentResolvers;
|
|
68
|
-
registerAttachmentScraper(scraper: AttachmentScraper): void;
|
|
69
|
-
registerAttachmentResolver(resolver: AttachmentResolver): void;
|
|
70
|
-
get attachmentScrapers(): AttachmentScraper[];
|
|
71
|
-
get attachmentResolvers(): AttachmentResolver[];
|
|
72
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ChatMessage, CommentsOrder, Notification, User, UrlCard, FilterMode, Topic } from '@banta/common';
|
|
3
|
+
import { ChatSourceBase } from './chat-source-base';
|
|
4
|
+
import { AttachmentResolver, AttachmentScraper } from './attachment-scraper';
|
|
5
|
+
export interface ChatSourceOptions {
|
|
6
|
+
sortOrder?: CommentsOrder;
|
|
7
|
+
filterMode?: FilterMode;
|
|
8
|
+
/**
|
|
9
|
+
* How many messages should be loaded initially?
|
|
10
|
+
*/
|
|
11
|
+
initialMessageCount?: number;
|
|
12
|
+
metadata?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export declare abstract class ChatBackendBase {
|
|
15
|
+
constructor();
|
|
16
|
+
abstract getSourceForTopic(topicId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
17
|
+
abstract getSourceForThread(topicId: string, messageId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
18
|
+
/**
|
|
19
|
+
* Get the count of the given topic
|
|
20
|
+
* @param topicId
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
abstract getSourceCountForTopic(topicId: string): Promise<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Get the count of the given topics.
|
|
26
|
+
* @param topicId Topics to count messages on. Maximum of 1000.
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
abstract getSourceCountForTopics(topicIds: string[]): Promise<Record<string, number>>;
|
|
30
|
+
/**
|
|
31
|
+
* Get information about the given topic.
|
|
32
|
+
* @param topicId
|
|
33
|
+
* @returns The topic object, or undefined if no such topic was found.
|
|
34
|
+
*/
|
|
35
|
+
abstract getTopic(topicId: string): Promise<Topic | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* Get information about the given topics
|
|
38
|
+
* @param topicIds The topic IDs to look up. Maximum of 1000.
|
|
39
|
+
* @returns An array of matching topic objects.
|
|
40
|
+
*/
|
|
41
|
+
abstract getTopicsById(topicIds: string[]): Promise<Topic[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Get a set of messages from the given topic.
|
|
44
|
+
* @param topicId
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
abstract getMessages(topicId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
48
|
+
/**
|
|
49
|
+
* Get a set of messages from the given topic.
|
|
50
|
+
* @param topicId
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
abstract getReplies(parentMessageId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
54
|
+
abstract refreshMessage(message: ChatMessage): Promise<ChatMessage>;
|
|
55
|
+
abstract getMessage(topicId: string, messageId: string): Promise<ChatMessage>;
|
|
56
|
+
abstract getSubMessage(topicId: string, parentMessageId: string, messageId: string): Promise<ChatMessage>;
|
|
57
|
+
abstract watchMessage(message: ChatMessage, handler: (message: ChatMessage) => void): () => void;
|
|
58
|
+
abstract getCardForUrl(url: string): Promise<UrlCard>;
|
|
59
|
+
readonly notificationsChanged: Observable<Notification[]>;
|
|
60
|
+
readonly newNotification: Observable<Notification>;
|
|
61
|
+
private _userChanged;
|
|
62
|
+
private _user;
|
|
63
|
+
get userChanged(): Observable<User>;
|
|
64
|
+
set user(user: User);
|
|
65
|
+
get user(): User;
|
|
66
|
+
private _attachmentScrapers;
|
|
67
|
+
private _attachmentResolvers;
|
|
68
|
+
registerAttachmentScraper(scraper: AttachmentScraper): void;
|
|
69
|
+
registerAttachmentResolver(resolver: AttachmentResolver): void;
|
|
70
|
+
get attachmentScrapers(): AttachmentScraper[];
|
|
71
|
+
get attachmentResolvers(): AttachmentResolver[];
|
|
72
|
+
}
|
package/lib/chat-backend.d.ts
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { ChatMessage, CommentsOrder, FilterMode, Notification, Topic, UrlCard } from "@banta/common";
|
|
2
|
-
import { Observable } from "rxjs";
|
|
3
|
-
import { ChatBackendBase, ChatSourceOptions } from "./chat-backend-base";
|
|
4
|
-
import { ChatSourceBase } from "./chat-source-base";
|
|
5
|
-
import { SdkOptions } from "./sdk-options";
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ChatBackend extends ChatBackendBase {
|
|
8
|
-
private options;
|
|
9
|
-
private platformId;
|
|
10
|
-
constructor(options: SdkOptions, platformId: any);
|
|
11
|
-
get serviceUrl(): string;
|
|
12
|
-
private connectToService;
|
|
13
|
-
private isServer;
|
|
14
|
-
/**
|
|
15
|
-
* Check if we are currently running inside a Googlebot user agent or via the Google inspection tool in Search Console.
|
|
16
|
-
* We'll use this to avoid WebSockets so that comments can be indexable.
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
private isGooglebot;
|
|
20
|
-
getSourceForTopic(topicId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
21
|
-
getSourceForThread(topicId: string, messageId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
22
|
-
/**
|
|
23
|
-
* Get the count of the given topic
|
|
24
|
-
* @param topicId
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
getSourceCountForTopic(topicId: string): Promise<number>;
|
|
28
|
-
/**
|
|
29
|
-
* Get the count of the given topics.
|
|
30
|
-
* @param topicId Topics to count messages on. Maximum of 1000.
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
getSourceCountForTopics(topicIds: string[]): Promise<Record<string, number>>;
|
|
34
|
-
/**
|
|
35
|
-
* Get information about the given topic.
|
|
36
|
-
* @param topicId
|
|
37
|
-
* @returns The topic object, or undefined if no such topic was found.
|
|
38
|
-
*/
|
|
39
|
-
getTopic(topicId: string): Promise<Topic | undefined>;
|
|
40
|
-
/**
|
|
41
|
-
* Get information about the given topics
|
|
42
|
-
* @param topicIds The topic IDs to look up. Maximum of 1000.
|
|
43
|
-
* @returns An array of matching topic objects.
|
|
44
|
-
*/
|
|
45
|
-
getTopicsById(topicIds: string[]): Promise<Topic[]>;
|
|
46
|
-
/**
|
|
47
|
-
* Get a set of messages from the given topic.
|
|
48
|
-
* @param topicId
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
getMessages(topicId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
52
|
-
/**
|
|
53
|
-
* Get a set of messages from the given topic.
|
|
54
|
-
* @param topicId
|
|
55
|
-
* @returns
|
|
56
|
-
*/
|
|
57
|
-
getReplies(parentMessageId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
58
|
-
refreshMessage(message: ChatMessage): Promise<ChatMessage>;
|
|
59
|
-
getMessage(topicId: string, messageId: string): Promise<ChatMessage>;
|
|
60
|
-
getSubMessage(topicId: string, parentMessageId: string, messageId: string): Promise<ChatMessage>;
|
|
61
|
-
watchMessage(message: ChatMessage, handler: (message: ChatMessage) => void): () => void;
|
|
62
|
-
notificationsChanged: Observable<Notification[]>;
|
|
63
|
-
newNotification: Observable<Notification>;
|
|
64
|
-
getCardForUrl(url: string): Promise<UrlCard>;
|
|
65
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChatBackend, never>;
|
|
66
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ChatBackend>;
|
|
67
|
-
}
|
|
1
|
+
import { ChatMessage, CommentsOrder, FilterMode, Notification, Topic, UrlCard } from "@banta/common";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { ChatBackendBase, ChatSourceOptions } from "./chat-backend-base";
|
|
4
|
+
import { ChatSourceBase } from "./chat-source-base";
|
|
5
|
+
import { SdkOptions } from "./sdk-options";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ChatBackend extends ChatBackendBase {
|
|
8
|
+
private options;
|
|
9
|
+
private platformId;
|
|
10
|
+
constructor(options: SdkOptions, platformId: any);
|
|
11
|
+
get serviceUrl(): string;
|
|
12
|
+
private connectToService;
|
|
13
|
+
private isServer;
|
|
14
|
+
/**
|
|
15
|
+
* Check if we are currently running inside a Googlebot user agent or via the Google inspection tool in Search Console.
|
|
16
|
+
* We'll use this to avoid WebSockets so that comments can be indexable.
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
private isGooglebot;
|
|
20
|
+
getSourceForTopic(topicId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
21
|
+
getSourceForThread(topicId: string, messageId: string, options?: ChatSourceOptions): Promise<ChatSourceBase>;
|
|
22
|
+
/**
|
|
23
|
+
* Get the count of the given topic
|
|
24
|
+
* @param topicId
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
getSourceCountForTopic(topicId: string): Promise<number>;
|
|
28
|
+
/**
|
|
29
|
+
* Get the count of the given topics.
|
|
30
|
+
* @param topicId Topics to count messages on. Maximum of 1000.
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
getSourceCountForTopics(topicIds: string[]): Promise<Record<string, number>>;
|
|
34
|
+
/**
|
|
35
|
+
* Get information about the given topic.
|
|
36
|
+
* @param topicId
|
|
37
|
+
* @returns The topic object, or undefined if no such topic was found.
|
|
38
|
+
*/
|
|
39
|
+
getTopic(topicId: string): Promise<Topic | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* Get information about the given topics
|
|
42
|
+
* @param topicIds The topic IDs to look up. Maximum of 1000.
|
|
43
|
+
* @returns An array of matching topic objects.
|
|
44
|
+
*/
|
|
45
|
+
getTopicsById(topicIds: string[]): Promise<Topic[]>;
|
|
46
|
+
/**
|
|
47
|
+
* Get a set of messages from the given topic.
|
|
48
|
+
* @param topicId
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
getMessages(topicId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Get a set of messages from the given topic.
|
|
54
|
+
* @param topicId
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
getReplies(parentMessageId: string, sort?: CommentsOrder, filter?: FilterMode, offset?: number, limit?: number): Promise<ChatMessage[]>;
|
|
58
|
+
refreshMessage(message: ChatMessage): Promise<ChatMessage>;
|
|
59
|
+
getMessage(topicId: string, messageId: string): Promise<ChatMessage>;
|
|
60
|
+
getSubMessage(topicId: string, parentMessageId: string, messageId: string): Promise<ChatMessage>;
|
|
61
|
+
watchMessage(message: ChatMessage, handler: (message: ChatMessage) => void): () => void;
|
|
62
|
+
notificationsChanged: Observable<Notification[]>;
|
|
63
|
+
newNotification: Observable<Notification>;
|
|
64
|
+
getCardForUrl(url: string): Promise<UrlCard>;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatBackend, never>;
|
|
66
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChatBackend>;
|
|
67
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ChatMessage, CommentsOrder, ChatPermissions, FilterMode } from '@banta/common';
|
|
3
|
-
export interface ChatSourceBase {
|
|
4
|
-
/**
|
|
5
|
-
* The topic identifier for the current chat/comments
|
|
6
|
-
*/
|
|
7
|
-
identifier: string;
|
|
8
|
-
permissions: ChatPermissions;
|
|
9
|
-
ready: Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* The ID of the parent message that this thread chat source is for.
|
|
12
|
-
* When this is not set, the chat source is a top-level ("topic") source.
|
|
13
|
-
* When it is set, this chat source is a thread source (ie replies).
|
|
14
|
-
*/
|
|
15
|
-
parentIdentifier?: string;
|
|
16
|
-
sortOrder?: CommentsOrder;
|
|
17
|
-
filterMode?: FilterMode;
|
|
18
|
-
messageReceived: Observable<ChatMessage>;
|
|
19
|
-
messageObserved: Observable<ChatMessage>;
|
|
20
|
-
messageUpdated: Observable<ChatMessage>;
|
|
21
|
-
messageSent: Observable<ChatMessage>;
|
|
22
|
-
messages: ChatMessage[];
|
|
23
|
-
send(message: ChatMessage): Promise<ChatMessage>;
|
|
24
|
-
close(): any;
|
|
25
|
-
getCount(): Promise<number>;
|
|
26
|
-
getExistingMessages(): Promise<ChatMessage[]>;
|
|
27
|
-
loadAfter(message: ChatMessage, count: number): Promise<ChatMessage[]>;
|
|
28
|
-
get(id: string): Promise<ChatMessage>;
|
|
29
|
-
likeMessage(messageId: string): Promise<void>;
|
|
30
|
-
unlikeMessage(messageId: string): Promise<void>;
|
|
31
|
-
editMessage(messageId: string, text: string): Promise<void>;
|
|
32
|
-
deleteMessage(messageId: string): Promise<void>;
|
|
33
|
-
connectionStateChanged?: Observable<'connected' | 'connecting' | 'lost' | 'restored'>;
|
|
34
|
-
state?: 'connecting' | 'connected' | 'lost' | 'restored';
|
|
35
|
-
/**
|
|
36
|
-
* When true, this source is readonly, so messages cannot be sent/edited/deleted, nor liked/unliked.
|
|
37
|
-
*/
|
|
38
|
-
readonly?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* When true/undefined, the source supports loading more messages. When false, it does not.
|
|
41
|
-
*/
|
|
42
|
-
canLoadMore?: boolean;
|
|
43
|
-
get errorState(): any;
|
|
44
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ChatMessage, CommentsOrder, ChatPermissions, FilterMode } from '@banta/common';
|
|
3
|
+
export interface ChatSourceBase {
|
|
4
|
+
/**
|
|
5
|
+
* The topic identifier for the current chat/comments
|
|
6
|
+
*/
|
|
7
|
+
identifier: string;
|
|
8
|
+
permissions: ChatPermissions;
|
|
9
|
+
ready: Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the parent message that this thread chat source is for.
|
|
12
|
+
* When this is not set, the chat source is a top-level ("topic") source.
|
|
13
|
+
* When it is set, this chat source is a thread source (ie replies).
|
|
14
|
+
*/
|
|
15
|
+
parentIdentifier?: string;
|
|
16
|
+
sortOrder?: CommentsOrder;
|
|
17
|
+
filterMode?: FilterMode;
|
|
18
|
+
messageReceived: Observable<ChatMessage>;
|
|
19
|
+
messageObserved: Observable<ChatMessage>;
|
|
20
|
+
messageUpdated: Observable<ChatMessage>;
|
|
21
|
+
messageSent: Observable<ChatMessage>;
|
|
22
|
+
messages: ChatMessage[];
|
|
23
|
+
send(message: ChatMessage): Promise<ChatMessage>;
|
|
24
|
+
close(): any;
|
|
25
|
+
getCount(): Promise<number>;
|
|
26
|
+
getExistingMessages(): Promise<ChatMessage[]>;
|
|
27
|
+
loadAfter(message: ChatMessage, count: number): Promise<ChatMessage[]>;
|
|
28
|
+
get(id: string): Promise<ChatMessage>;
|
|
29
|
+
likeMessage(messageId: string): Promise<void>;
|
|
30
|
+
unlikeMessage(messageId: string): Promise<void>;
|
|
31
|
+
editMessage(messageId: string, text: string): Promise<void>;
|
|
32
|
+
deleteMessage(messageId: string): Promise<void>;
|
|
33
|
+
connectionStateChanged?: Observable<'connected' | 'connecting' | 'lost' | 'restored'>;
|
|
34
|
+
state?: 'connecting' | 'connected' | 'lost' | 'restored';
|
|
35
|
+
/**
|
|
36
|
+
* When true, this source is readonly, so messages cannot be sent/edited/deleted, nor liked/unliked.
|
|
37
|
+
*/
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* When true/undefined, the source supports loading more messages. When false, it does not.
|
|
41
|
+
*/
|
|
42
|
+
canLoadMore?: boolean;
|
|
43
|
+
get errorState(): any;
|
|
44
|
+
}
|
package/lib/chat-source.d.ts
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { ChatMessage, ChatPermissions, DurableSocket } from "@banta/common";
|
|
2
|
-
import { SocketRPC } from "@banta/common";
|
|
3
|
-
import { ChatSourceBase } from "./chat-source-base";
|
|
4
|
-
import { ChatBackend } from "./chat-backend";
|
|
5
|
-
import { ChatSourceOptions } from "./chat-backend-base";
|
|
6
|
-
export type SignInState = 'signed-out' | 'signed-in' | 'signing-in';
|
|
7
|
-
export declare class ChatSource extends SocketRPC implements ChatSourceBase {
|
|
8
|
-
readonly backend: ChatBackend;
|
|
9
|
-
readonly identifier: string;
|
|
10
|
-
readonly parentIdentifier: string;
|
|
11
|
-
constructor(backend: ChatBackend, identifier: string, parentIdentifier: string, options: ChatSourceOptions);
|
|
12
|
-
private options;
|
|
13
|
-
private subscription;
|
|
14
|
-
private markReady;
|
|
15
|
-
readonly: boolean;
|
|
16
|
-
canLoadMore: boolean;
|
|
17
|
-
ready: Promise<void>;
|
|
18
|
-
permissions: ChatPermissions;
|
|
19
|
-
private _state;
|
|
20
|
-
get sortOrder(): "newest" | "oldest" | "likes";
|
|
21
|
-
get filterMode(): string;
|
|
22
|
-
get state(): "
|
|
23
|
-
set state(value: "
|
|
24
|
-
private _connectionStateChanged;
|
|
25
|
-
private _connectionStateChanged$;
|
|
26
|
-
get connectionStateChanged(): import("rxjs").Observable<"
|
|
27
|
-
private wasRestored;
|
|
28
|
-
bind(socket: DurableSocket): Promise<this>;
|
|
29
|
-
private mapOrUpdateMessages;
|
|
30
|
-
private mapOrUpdateMessage;
|
|
31
|
-
getExistingMessages(): Promise<ChatMessage[]>;
|
|
32
|
-
private ensureConnection;
|
|
33
|
-
editMessage(messageId: string, text: string): Promise<void>;
|
|
34
|
-
private subscribeAttempt;
|
|
35
|
-
private _errorState;
|
|
36
|
-
get errorState(): string;
|
|
37
|
-
subscribeToTopic(): Promise<void>;
|
|
38
|
-
private _signInState;
|
|
39
|
-
private _signInStateChanged;
|
|
40
|
-
private _signInStateChanged$;
|
|
41
|
-
get signInState(): SignInState;
|
|
42
|
-
get signInStateChanged(): import("rxjs").Observable<SignInState>;
|
|
43
|
-
private setSignInState;
|
|
44
|
-
authenticate(): Promise<void>;
|
|
45
|
-
close(): void;
|
|
46
|
-
onPermissions(permissions: ChatPermissions): void;
|
|
47
|
-
onChatMessage(message: ChatMessage): ChatMessage;
|
|
48
|
-
private messageMap;
|
|
49
|
-
private _messageReceived;
|
|
50
|
-
private _messageUpdated;
|
|
51
|
-
private _messageSent;
|
|
52
|
-
private _messageObserved;
|
|
53
|
-
get messageReceived(): import("rxjs").Observable<ChatMessage>;
|
|
54
|
-
get messageUpdated(): import("rxjs").Observable<ChatMessage>;
|
|
55
|
-
get messageSent(): import("rxjs").Observable<ChatMessage>;
|
|
56
|
-
get messageObserved(): import("rxjs").Observable<ChatMessage>;
|
|
57
|
-
messages: ChatMessage[];
|
|
58
|
-
send(message: ChatMessage): Promise<ChatMessage>;
|
|
59
|
-
loadAfter(message: ChatMessage, count: number): Promise<ChatMessage[]>;
|
|
60
|
-
get(id: string): Promise<ChatMessage>;
|
|
61
|
-
getCount(): Promise<number>;
|
|
62
|
-
likeMessage(messageId: string): Promise<void>;
|
|
63
|
-
unlikeMessage(messageId: string): Promise<void>;
|
|
64
|
-
deleteMessage(messageId: string): Promise<void>;
|
|
65
|
-
}
|
|
1
|
+
import { ChatMessage, ChatPermissions, DurableSocket } from "@banta/common";
|
|
2
|
+
import { SocketRPC } from "@banta/common";
|
|
3
|
+
import { ChatSourceBase } from "./chat-source-base";
|
|
4
|
+
import { ChatBackend } from "./chat-backend";
|
|
5
|
+
import { ChatSourceOptions } from "./chat-backend-base";
|
|
6
|
+
export declare type SignInState = 'signed-out' | 'signed-in' | 'signing-in';
|
|
7
|
+
export declare class ChatSource extends SocketRPC implements ChatSourceBase {
|
|
8
|
+
readonly backend: ChatBackend;
|
|
9
|
+
readonly identifier: string;
|
|
10
|
+
readonly parentIdentifier: string;
|
|
11
|
+
constructor(backend: ChatBackend, identifier: string, parentIdentifier: string, options: ChatSourceOptions);
|
|
12
|
+
private options;
|
|
13
|
+
private subscription;
|
|
14
|
+
private markReady;
|
|
15
|
+
readonly: boolean;
|
|
16
|
+
canLoadMore: boolean;
|
|
17
|
+
ready: Promise<void>;
|
|
18
|
+
permissions: ChatPermissions;
|
|
19
|
+
private _state;
|
|
20
|
+
get sortOrder(): "newest" | "oldest" | "likes";
|
|
21
|
+
get filterMode(): string;
|
|
22
|
+
get state(): "connected" | "connecting" | "lost" | "restored";
|
|
23
|
+
set state(value: "connected" | "connecting" | "lost" | "restored");
|
|
24
|
+
private _connectionStateChanged;
|
|
25
|
+
private _connectionStateChanged$;
|
|
26
|
+
get connectionStateChanged(): import("rxjs").Observable<"connected" | "connecting" | "lost" | "restored">;
|
|
27
|
+
private wasRestored;
|
|
28
|
+
bind(socket: DurableSocket): Promise<this>;
|
|
29
|
+
private mapOrUpdateMessages;
|
|
30
|
+
private mapOrUpdateMessage;
|
|
31
|
+
getExistingMessages(): Promise<ChatMessage[]>;
|
|
32
|
+
private ensureConnection;
|
|
33
|
+
editMessage(messageId: string, text: string): Promise<void>;
|
|
34
|
+
private subscribeAttempt;
|
|
35
|
+
private _errorState;
|
|
36
|
+
get errorState(): string;
|
|
37
|
+
subscribeToTopic(): Promise<void>;
|
|
38
|
+
private _signInState;
|
|
39
|
+
private _signInStateChanged;
|
|
40
|
+
private _signInStateChanged$;
|
|
41
|
+
get signInState(): SignInState;
|
|
42
|
+
get signInStateChanged(): import("rxjs").Observable<SignInState>;
|
|
43
|
+
private setSignInState;
|
|
44
|
+
authenticate(): Promise<void>;
|
|
45
|
+
close(): void;
|
|
46
|
+
onPermissions(permissions: ChatPermissions): void;
|
|
47
|
+
onChatMessage(message: ChatMessage): ChatMessage;
|
|
48
|
+
private messageMap;
|
|
49
|
+
private _messageReceived;
|
|
50
|
+
private _messageUpdated;
|
|
51
|
+
private _messageSent;
|
|
52
|
+
private _messageObserved;
|
|
53
|
+
get messageReceived(): import("rxjs").Observable<ChatMessage>;
|
|
54
|
+
get messageUpdated(): import("rxjs").Observable<ChatMessage>;
|
|
55
|
+
get messageSent(): import("rxjs").Observable<ChatMessage>;
|
|
56
|
+
get messageObserved(): import("rxjs").Observable<ChatMessage>;
|
|
57
|
+
messages: ChatMessage[];
|
|
58
|
+
send(message: ChatMessage): Promise<ChatMessage>;
|
|
59
|
+
loadAfter(message: ChatMessage, count: number): Promise<ChatMessage[]>;
|
|
60
|
+
get(id: string): Promise<ChatMessage>;
|
|
61
|
+
getCount(): Promise<number>;
|
|
62
|
+
likeMessage(messageId: string): Promise<void>;
|
|
63
|
+
unlikeMessage(messageId: string): Promise<void>;
|
|
64
|
+
deleteMessage(messageId: string): Promise<void>;
|
|
65
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { CDNProvider, ChatMessageAttachment } from '@banta/common';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AttachmentButtonComponent {
|
|
5
|
-
private cdnProvider;
|
|
6
|
-
constructor(cdnProvider: CDNProvider);
|
|
7
|
-
private _addedAttachment;
|
|
8
|
-
private _attachmentError;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
get addedAttachment(): import("rxjs").Observable<ChatMessageAttachment>;
|
|
11
|
-
get attachmentError(): import("rxjs").Observable<ChatMessageAttachment>;
|
|
12
|
-
fileInput: ElementRef<HTMLInputElement>;
|
|
13
|
-
show(): void;
|
|
14
|
-
fileChange(event: Event): Promise<void>;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentButtonComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentButtonComponent, "banta-attachment-button", never, { "disabled":
|
|
17
|
-
}
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { CDNProvider, ChatMessageAttachment } from '@banta/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AttachmentButtonComponent {
|
|
5
|
+
private cdnProvider;
|
|
6
|
+
constructor(cdnProvider: CDNProvider);
|
|
7
|
+
private _addedAttachment;
|
|
8
|
+
private _attachmentError;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
get addedAttachment(): import("rxjs").Observable<ChatMessageAttachment>;
|
|
11
|
+
get attachmentError(): import("rxjs").Observable<ChatMessageAttachment>;
|
|
12
|
+
fileInput: ElementRef<HTMLInputElement>;
|
|
13
|
+
show(): void;
|
|
14
|
+
fileChange(event: Event): Promise<void>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentButtonComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentButtonComponent, "banta-attachment-button", never, { "disabled": "disabled"; }, { "addedAttachment": "addedAttachment"; "attachmentError": "attachmentError"; }, never, never, false>;
|
|
17
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ElementRef } from "@angular/core";
|
|
2
|
-
import { ChatMessageAttachment } from "@banta/common";
|
|
3
|
-
import { Subject } from "rxjs";
|
|
4
|
-
import { ChatBackendBase } from "../chat-backend-base";
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class AttachmentScraperDirective {
|
|
7
|
-
private elementRef;
|
|
8
|
-
private chatBackend;
|
|
9
|
-
constructor(elementRef: ElementRef<HTMLTextAreaElement>, chatBackend: ChatBackendBase);
|
|
10
|
-
attachments: ChatMessageAttachment[];
|
|
11
|
-
attachmentsChange: Subject<ChatMessageAttachment[]>;
|
|
12
|
-
ngOnInit(): void;
|
|
13
|
-
get element(): HTMLTextAreaElement;
|
|
14
|
-
get text(): string;
|
|
15
|
-
private scrapeTimeout;
|
|
16
|
-
private scrapeDebounce;
|
|
17
|
-
private fragments;
|
|
18
|
-
private scrape;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentScraperDirective, never>;
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AttachmentScraperDirective, "[attachmentScraper]", never, { "attachments":
|
|
21
|
-
}
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { ChatMessageAttachment } from "@banta/common";
|
|
3
|
+
import { Subject } from "rxjs";
|
|
4
|
+
import { ChatBackendBase } from "../chat-backend-base";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AttachmentScraperDirective {
|
|
7
|
+
private elementRef;
|
|
8
|
+
private chatBackend;
|
|
9
|
+
constructor(elementRef: ElementRef<HTMLTextAreaElement>, chatBackend: ChatBackendBase);
|
|
10
|
+
attachments: ChatMessageAttachment[];
|
|
11
|
+
attachmentsChange: Subject<ChatMessageAttachment[]>;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
get element(): HTMLTextAreaElement;
|
|
14
|
+
get text(): string;
|
|
15
|
+
private scrapeTimeout;
|
|
16
|
+
private scrapeDebounce;
|
|
17
|
+
private fragments;
|
|
18
|
+
private scrape;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentScraperDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AttachmentScraperDirective, "[attachmentScraper]", never, { "attachments": "attachments"; }, { "attachmentsChange": "attachmentsChange"; }, never, never, false>;
|
|
21
|
+
}
|