@banta/sdk 4.0.12 → 4.0.13
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 +53 -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/banta-sdk.module.js +4 -2
- package/esm2015/lib/chat-source-base.js +1 -1
- package/esm2015/lib/chat-source.js +4 -1
- package/esm2015/lib/comments/banta-comments/banta-comments.component.js +41 -18
- package/esm2015/lib/comments/comment/comment.component.js +1 -2
- package/fesm2015/banta-sdk.js +45 -19
- package/fesm2015/banta-sdk.js.map +1 -1
- package/lib/chat-source-base.d.ts +1 -0
- package/lib/chat-source.d.ts +2 -0
- package/lib/comments/banta-comments/banta-comments.component.d.ts +10 -1
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ export interface ChatSourceBase {
|
|
|
15
15
|
parentIdentifier?: string;
|
|
16
16
|
sortOrder?: CommentsOrder;
|
|
17
17
|
messageReceived: Observable<ChatMessage>;
|
|
18
|
+
messageUpdated: Observable<ChatMessage>;
|
|
18
19
|
messageSent: Observable<ChatMessage>;
|
|
19
20
|
messages: ChatMessage[];
|
|
20
21
|
send(message: ChatMessage): Promise<ChatMessage>;
|
package/lib/chat-source.d.ts
CHANGED
|
@@ -24,8 +24,10 @@ export declare class ChatSource extends SocketRPC implements ChatSourceBase {
|
|
|
24
24
|
onChatMessage(message: ChatMessage): void;
|
|
25
25
|
private messageMap;
|
|
26
26
|
private _messageReceived;
|
|
27
|
+
private _messageUpdated;
|
|
27
28
|
private _messageSent;
|
|
28
29
|
get messageReceived(): Observable<ChatMessage>;
|
|
30
|
+
get messageUpdated(): Observable<ChatMessage>;
|
|
29
31
|
get messageSent(): Observable<ChatMessage>;
|
|
30
32
|
messages: ChatMessage[];
|
|
31
33
|
send(message: ChatMessage): Promise<ChatMessage>;
|
|
@@ -5,6 +5,7 @@ import { Subject, Observable } from 'rxjs';
|
|
|
5
5
|
import { ActivatedRoute } from '@angular/router';
|
|
6
6
|
import { ChatBackendBase } from '../../chat-backend-base';
|
|
7
7
|
import { ChatSourceBase } from '../../chat-source-base';
|
|
8
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
8
9
|
/**
|
|
9
10
|
* Comments component
|
|
10
11
|
*/
|
|
@@ -12,7 +13,8 @@ export declare class BantaCommentsComponent {
|
|
|
12
13
|
private backend;
|
|
13
14
|
private elementRef;
|
|
14
15
|
private activatedRoute;
|
|
15
|
-
|
|
16
|
+
private matSnackBar;
|
|
17
|
+
constructor(backend: ChatBackendBase, elementRef: ElementRef<HTMLElement>, activatedRoute: ActivatedRoute, matSnackBar: MatSnackBar);
|
|
16
18
|
private handleBackendExceptionAsAlert;
|
|
17
19
|
private handleBackendException;
|
|
18
20
|
ngOnInit(): void;
|
|
@@ -43,6 +45,12 @@ export declare class BantaCommentsComponent {
|
|
|
43
45
|
private _usernameSelected;
|
|
44
46
|
private _avatarSelected;
|
|
45
47
|
private _source;
|
|
48
|
+
/**
|
|
49
|
+
* Track whether we created this source. If we did not (ie it was passed in from the caller),
|
|
50
|
+
* then we are not responsible for calling close(). If we do own it though, we will call close()
|
|
51
|
+
* when we are done with it.
|
|
52
|
+
*/
|
|
53
|
+
private _sourceIsOwned;
|
|
46
54
|
private _subs;
|
|
47
55
|
private _sortOrder;
|
|
48
56
|
private _topicID;
|
|
@@ -64,6 +72,7 @@ export declare class BantaCommentsComponent {
|
|
|
64
72
|
genericAvatarUrl: string;
|
|
65
73
|
shouldInterceptMessageSend?: (message: ChatMessage, source: ChatSourceBase) => boolean | Promise<boolean>;
|
|
66
74
|
participants: User[];
|
|
75
|
+
private _sourceSubscription;
|
|
67
76
|
get source(): ChatSourceBase;
|
|
68
77
|
set source(value: ChatSourceBase);
|
|
69
78
|
hashtags: HashTag[];
|