@banta/sdk 5.0.4 → 5.1.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/lib/banta/banta.component.mjs +3 -3
- package/esm2022/lib/banta-logo.component.mjs +3 -3
- package/esm2022/lib/banta-sdk.module.mjs +4 -4
- package/esm2022/lib/chat/banta-chat/banta-chat.component.mjs +3 -3
- package/esm2022/lib/chat/chat-message/chat-message.component.mjs +3 -3
- package/esm2022/lib/chat/chat-view/chat-view.component.mjs +3 -3
- package/esm2022/lib/chat/chat.module.mjs +4 -4
- package/esm2022/lib/chat/live-chat-message.component.mjs +3 -3
- package/esm2022/lib/chat-backend.mjs +38 -7
- package/esm2022/lib/comments/attachment-button/attachment-button.component.mjs +3 -3
- package/esm2022/lib/comments/attachment-scraper.directive.mjs +3 -3
- package/esm2022/lib/comments/banta-comments/banta-comments.component.mjs +7 -16
- package/esm2022/lib/comments/comment/comment.component.mjs +3 -3
- package/esm2022/lib/comments/comment-field/comment-field.component.mjs +3 -3
- package/esm2022/lib/comments/comment-sort/comment-sort.component.mjs +3 -3
- package/esm2022/lib/comments/comment-view/comment-view.component.mjs +3 -3
- package/esm2022/lib/comments/comments.module.mjs +4 -4
- package/esm2022/lib/comments/live-comment.component.mjs +3 -3
- package/esm2022/lib/comments/reply-send-options.directive.mjs +3 -3
- package/esm2022/lib/common/attachment/attachment.component.mjs +3 -3
- package/esm2022/lib/common/attachments/attachments.component.mjs +3 -3
- package/esm2022/lib/common/common.module.mjs +4 -4
- package/esm2022/lib/common/lightbox/lightbox.component.mjs +3 -3
- package/esm2022/lib/common/markdown-to-html.pipe.mjs +3 -3
- package/esm2022/lib/common/mention-linker.pipe.mjs +3 -3
- package/esm2022/lib/common/timestamp.component.mjs +3 -3
- package/esm2022/lib/common/trust-resource-url.pipe.mjs +3 -3
- package/esm2022/lib/emoji/emoji-selector-button.component.mjs +3 -3
- package/esm2022/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.mjs +3 -3
- package/esm2022/lib/emoji/emoji.module.mjs +4 -4
- package/esm2022/lib/live-message.component.mjs +3 -3
- package/esm2022/lib/url-attachments.mjs +3 -3
- package/fesm2022/banta-sdk.mjs +138 -116
- package/fesm2022/banta-sdk.mjs.map +1 -1
- package/lib/chat-backend.d.ts +15 -3
- package/lib/chat-source.d.ts +6 -6
- package/lib/comments/banta-comments/banta-comments.component.d.ts +7 -7
- package/lib/comments/comment-sort/comment-sort.component.d.ts +9 -5
- package/lib/comments/comment-view/comment-view.component.d.ts +3 -3
- package/lib/static-chat-source.d.ts +1 -1
- package/package.json +2 -2
package/lib/chat-backend.d.ts
CHANGED
|
@@ -26,11 +26,23 @@ export declare class ChatBackend extends ChatBackendBase {
|
|
|
26
26
|
*/
|
|
27
27
|
getSourceCountForTopic(topicId: string): Promise<number>;
|
|
28
28
|
/**
|
|
29
|
-
* Get the count of the given
|
|
30
|
-
* @param topicId
|
|
29
|
+
* Get the count of the given topics.
|
|
30
|
+
* @param topicId Topics to count messages on. Maximum of 1000.
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
33
|
-
|
|
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[]>;
|
|
34
46
|
/**
|
|
35
47
|
* Get a set of messages from the given topic.
|
|
36
48
|
* @param topicId
|
package/lib/chat-source.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMessage, ChatPermissions,
|
|
1
|
+
import { ChatMessage, ChatPermissions, DurableSocket } from "@banta/common";
|
|
2
2
|
import { SocketRPC } from "@banta/common";
|
|
3
3
|
import { ChatSourceBase } from "./chat-source-base";
|
|
4
4
|
import { ChatBackend } from "./chat-backend";
|
|
@@ -17,13 +17,13 @@ export declare class ChatSource extends SocketRPC implements ChatSourceBase {
|
|
|
17
17
|
ready: Promise<void>;
|
|
18
18
|
permissions: ChatPermissions;
|
|
19
19
|
private _state;
|
|
20
|
-
get sortOrder():
|
|
21
|
-
get filterMode():
|
|
22
|
-
get state(): "
|
|
23
|
-
set state(value: "
|
|
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
24
|
private _connectionStateChanged;
|
|
25
25
|
private _connectionStateChanged$;
|
|
26
|
-
get connectionStateChanged(): import("rxjs").Observable<"
|
|
26
|
+
get connectionStateChanged(): import("rxjs").Observable<"connected" | "connecting" | "lost" | "restored">;
|
|
27
27
|
private wasRestored;
|
|
28
28
|
bind(socket: DurableSocket): Promise<this>;
|
|
29
29
|
private mapOrUpdateMessages;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, NgZone, QueryList } from '@angular/core';
|
|
2
|
-
import { User, ChatMessage
|
|
2
|
+
import { User, ChatMessage } from '@banta/common';
|
|
3
3
|
import { HashTag } from '../comment-field/comment-field.component';
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { ActivatedRoute } from '@angular/router';
|
|
@@ -147,19 +147,19 @@ export declare class BantaCommentsComponent {
|
|
|
147
147
|
private _reloadSourceTimeout;
|
|
148
148
|
private reloadSource;
|
|
149
149
|
private _sortOrder;
|
|
150
|
-
get sortOrder():
|
|
151
|
-
set sortOrder(value:
|
|
150
|
+
get sortOrder(): "newest" | "oldest" | "likes";
|
|
151
|
+
set sortOrder(value: "newest" | "oldest" | "likes");
|
|
152
152
|
private _filterMode;
|
|
153
|
-
get filterMode():
|
|
154
|
-
set filterMode(value:
|
|
155
|
-
get filterModes():
|
|
153
|
+
get filterMode(): string;
|
|
154
|
+
set filterMode(value: string);
|
|
155
|
+
get filterModes(): string[];
|
|
156
156
|
get filterModeLabels(): {
|
|
157
157
|
all: string;
|
|
158
158
|
mine: string;
|
|
159
159
|
threads: string;
|
|
160
160
|
"my-likes": string;
|
|
161
161
|
};
|
|
162
|
-
get sortOrders():
|
|
162
|
+
get sortOrders(): readonly ["newest", "oldest", "likes"];
|
|
163
163
|
get sortOrderLabels(): {
|
|
164
164
|
newest: string;
|
|
165
165
|
oldest: string;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { CommentsOrder } from "@banta/common";
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export declare class CommentSortComponent {
|
|
4
|
-
commentsOrder:
|
|
3
|
+
commentsOrder: {
|
|
4
|
+
readonly NEWEST: "newest";
|
|
5
|
+
readonly OLDEST: "oldest";
|
|
6
|
+
readonly LIKES: "likes";
|
|
7
|
+
readonly options: readonly ["newest", "oldest", "likes"];
|
|
8
|
+
};
|
|
5
9
|
private _sortChange;
|
|
6
10
|
private _sort;
|
|
7
|
-
get sort():
|
|
8
|
-
set sort(value:
|
|
9
|
-
get sortChange(): import("rxjs").Observable<
|
|
11
|
+
get sort(): "newest" | "oldest" | "likes";
|
|
12
|
+
set sort(value: "newest" | "oldest" | "likes");
|
|
13
|
+
get sortChange(): import("rxjs").Observable<"newest" | "oldest" | "likes">;
|
|
10
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommentSortComponent, never>;
|
|
11
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<CommentSortComponent, "banta-comment-sort", never, { "sort": { "alias": "sort"; "required": false; }; }, { "sortChange": "sortChange"; }, never, never, false, never>;
|
|
12
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, QueryList } from "@angular/core";
|
|
2
|
-
import { User, ChatMessage
|
|
2
|
+
import { User, ChatMessage } from '@banta/common';
|
|
3
3
|
import { ChatBackendBase } from "../../chat-backend-base";
|
|
4
4
|
import { ChatSourceBase } from "../../chat-source-base";
|
|
5
5
|
import { MessageMenuItem } from "../../message-menu-item";
|
|
@@ -62,8 +62,8 @@ export declare class CommentViewComponent {
|
|
|
62
62
|
readonly deleted: import("rxjs").Observable<ChatMessage>;
|
|
63
63
|
readonly selected: import("rxjs").Observable<ChatMessage>;
|
|
64
64
|
readonly messageEdited: import("rxjs").Observable<EditEvent>;
|
|
65
|
-
readonly sortOrderChanged: import("rxjs").Observable<
|
|
66
|
-
readonly filterModeChanged: import("rxjs").Observable<
|
|
65
|
+
readonly sortOrderChanged: import("rxjs").Observable<"newest" | "oldest" | "likes">;
|
|
66
|
+
readonly filterModeChanged: import("rxjs").Observable<string>;
|
|
67
67
|
commentsQuery: QueryList<CommentComponent>;
|
|
68
68
|
messageContainer: ElementRef<HTMLElement>;
|
|
69
69
|
get comments(): CommentComponent[];
|
|
@@ -36,7 +36,7 @@ export declare class StaticChatSource implements ChatSourceBase {
|
|
|
36
36
|
unlikeMessage(messageId: string): Promise<void>;
|
|
37
37
|
editMessage(messageId: string, text: string): Promise<void>;
|
|
38
38
|
deleteMessage(messageId: string): Promise<void>;
|
|
39
|
-
connectionStateChanged: Subject<"
|
|
39
|
+
connectionStateChanged: Subject<"connected" | "connecting" | "lost" | "restored">;
|
|
40
40
|
state: 'connecting' | 'connected' | 'lost' | 'restored';
|
|
41
41
|
get errorState(): any;
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@banta/sdk",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@angular/router": "^16 || ^17",
|
|
18
18
|
"@astronautlabs/datastore": "^3.1.2",
|
|
19
19
|
"@astronautlabs/datastore-firestore": "^3.1.2",
|
|
20
|
-
"@banta/common": "^2.3.
|
|
20
|
+
"@banta/common": "^2.3.3",
|
|
21
21
|
"@types/marked": "^4.0.3",
|
|
22
22
|
"@types/dompurify": "^2.3.3",
|
|
23
23
|
"dompurify": "^2.3.10",
|