@banta/sdk 4.4.2 → 4.4.3
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/bundles/banta-sdk.umd.js +115 -24
- package/bundles/banta-sdk.umd.js.map +1 -1
- package/bundles/banta-sdk.umd.min.js +1 -1
- package/bundles/banta-sdk.umd.min.js.map +1 -1
- package/esm2015/lib/chat-source-base.js +1 -1
- package/esm2015/lib/chat-source.js +31 -3
- package/esm2015/lib/comments/banta-comments/banta-comments.component.js +6 -7
- package/esm2015/lib/comments/comment/comment.component.js +2 -2
- package/esm2015/lib/comments/comment-field/comment-field.component.js +37 -6
- package/fesm2015/banta-sdk.js +70 -12
- package/fesm2015/banta-sdk.js.map +1 -1
- package/lib/chat-source-base.d.ts +1 -0
- package/lib/chat-source.d.ts +8 -3
- package/lib/comments/comment-field/comment-field.component.d.ts +5 -1
- package/package.json +1 -1
|
@@ -28,5 +28,6 @@ export interface ChatSourceBase {
|
|
|
28
28
|
unlikeMessage(messageId: string): Promise<void>;
|
|
29
29
|
editMessage(messageId: string, text: string): Promise<void>;
|
|
30
30
|
deleteMessage(messageId: string): Promise<void>;
|
|
31
|
+
connectionStateChanged?: Observable<'connected' | 'connecting' | 'lost' | 'restored'>;
|
|
31
32
|
state?: 'connecting' | 'connected' | 'lost' | 'restored';
|
|
32
33
|
}
|
package/lib/chat-source.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMessage, ChatPermissions, CommentsOrder } from "@banta/common";
|
|
1
|
+
import { ChatMessage, ChatPermissions, CommentsOrder, DurableSocket } from "@banta/common";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { SocketRPC } from "@banta/common";
|
|
4
4
|
import { ChatSourceBase } from "./chat-source-base";
|
|
@@ -13,9 +13,14 @@ export declare class ChatSource extends SocketRPC implements ChatSourceBase {
|
|
|
13
13
|
private markReady;
|
|
14
14
|
ready: Promise<void>;
|
|
15
15
|
permissions: ChatPermissions;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
private _state;
|
|
17
|
+
get state(): "connecting" | "connected" | "lost" | "restored";
|
|
18
|
+
set state(value: "connecting" | "connected" | "lost" | "restored");
|
|
19
|
+
private _connectionStateChanged;
|
|
20
|
+
get connectionStateChanged(): Observable<"connecting" | "connected" | "lost" | "restored">;
|
|
21
|
+
bind(socket: DurableSocket): Promise<this>;
|
|
18
22
|
getExistingMessages(): Promise<ChatMessage[]>;
|
|
23
|
+
private ensureConnection;
|
|
19
24
|
editMessage(messageId: string, text: string): Promise<void>;
|
|
20
25
|
subscribeToTopic(): Promise<void>;
|
|
21
26
|
authenticate(): Promise<void>;
|
|
@@ -14,7 +14,10 @@ export interface HashTag {
|
|
|
14
14
|
export declare class CommentFieldComponent {
|
|
15
15
|
private chatBackend;
|
|
16
16
|
constructor(chatBackend: ChatBackendBase);
|
|
17
|
-
|
|
17
|
+
private _source;
|
|
18
|
+
get source(): ChatSourceBase;
|
|
19
|
+
set source(value: ChatSourceBase);
|
|
20
|
+
private _subs;
|
|
18
21
|
user: User;
|
|
19
22
|
canComment: boolean;
|
|
20
23
|
allowAttachments: boolean;
|
|
@@ -23,6 +26,7 @@ export declare class CommentFieldComponent {
|
|
|
23
26
|
sending: boolean;
|
|
24
27
|
sendError: Error;
|
|
25
28
|
expandError: boolean;
|
|
29
|
+
transientMessage: string;
|
|
26
30
|
private _text;
|
|
27
31
|
get text(): string;
|
|
28
32
|
set text(value: string);
|