@banta/sdk 4.0.4 → 4.0.5
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 +140 -14
- 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/comments/attachment/attachment.component.js +45 -0
- package/esm2015/lib/comments/banta-comments/banta-comments.component.js +4 -2
- package/esm2015/lib/comments/comment/comment.component.js +12 -5
- package/esm2015/lib/comments/comment-field/comment-field.component.js +14 -4
- package/esm2015/lib/comments/comments.module.js +6 -2
- package/esm2015/lib/comments/index.js +2 -1
- package/esm2015/lib/common/common.module.js +7 -3
- package/esm2015/lib/common/lightbox/lightbox.component.js +28 -0
- package/esm2015/lib/common/safe-url.pipe.js +19 -0
- package/fesm2015/banta-sdk.js +121 -14
- package/fesm2015/banta-sdk.js.map +1 -1
- package/lib/comments/attachment/attachment.component.d.ts +12 -0
- package/lib/comments/banta-comments/banta-comments.component.d.ts +1 -0
- package/lib/comments/comment/comment.component.d.ts +4 -1
- package/lib/comments/comment-field/comment-field.component.d.ts +5 -1
- package/lib/comments/index.d.ts +1 -0
- package/lib/common/lightbox/lightbox.component.d.ts +11 -0
- package/lib/common/safe-url.pipe.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { CDNProvider, ChatMessageAttachment } from '@banta/common';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
export declare class AttachmentComponent {
|
|
5
|
+
private cdnProvider;
|
|
6
|
+
constructor(cdnProvider: CDNProvider);
|
|
7
|
+
fileInput: ElementRef;
|
|
8
|
+
_addedAttachment: Subject<ChatMessageAttachment>;
|
|
9
|
+
get addedAttachment(): import("rxjs").Observable<ChatMessageAttachment>;
|
|
10
|
+
show(): void;
|
|
11
|
+
fileChange(event: Event): Promise<void>;
|
|
12
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ChatMessage, ChatPermissions, User } from '@banta/common';
|
|
1
|
+
import { ChatMessage, ChatMessageAttachment, ChatPermissions, User } from '@banta/common';
|
|
2
|
+
import { LightboxComponent } from "../../common/lightbox/lightbox.component";
|
|
2
3
|
export declare class CommentComponent {
|
|
3
4
|
private _reported;
|
|
4
5
|
private _selected;
|
|
@@ -47,5 +48,7 @@ export declare class CommentComponent {
|
|
|
47
48
|
selectUser(): void;
|
|
48
49
|
selectUsername(user: User): void;
|
|
49
50
|
selectAvatar(user: User): void;
|
|
51
|
+
lightbox: LightboxComponent;
|
|
52
|
+
showLightbox(image: ChatMessageAttachment): void;
|
|
50
53
|
avatarForUser(user: User): string;
|
|
51
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef } from "@angular/core";
|
|
2
|
-
import { ChatMessage, User } from "@banta/common";
|
|
2
|
+
import { ChatMessage, ChatMessageAttachment, User } from "@banta/common";
|
|
3
3
|
import { Observable, Subject } from "rxjs";
|
|
4
4
|
import { ChatSourceBase } from "../../chat-source-base";
|
|
5
5
|
export interface AutoCompleteOption {
|
|
@@ -14,6 +14,7 @@ export declare class CommentFieldComponent {
|
|
|
14
14
|
source: ChatSourceBase;
|
|
15
15
|
user: User;
|
|
16
16
|
canComment: boolean;
|
|
17
|
+
allowAttachments: boolean;
|
|
17
18
|
signInSelected: Subject<void>;
|
|
18
19
|
editAvatarSelected: Subject<void>;
|
|
19
20
|
sending: boolean;
|
|
@@ -57,4 +58,7 @@ export declare class CommentFieldComponent {
|
|
|
57
58
|
showEditAvatar(): void;
|
|
58
59
|
submit: (message: ChatMessage) => boolean;
|
|
59
60
|
sendMessage(): Promise<void>;
|
|
61
|
+
chatMessageAttachments: ChatMessageAttachment[];
|
|
62
|
+
addedAttachment(file: ChatMessageAttachment): void;
|
|
63
|
+
removeAttachment(index: number): void;
|
|
60
64
|
}
|
package/lib/comments/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export * from './banta-comments/banta-comments.component';
|
|
|
4
4
|
export * from './live-comment.component';
|
|
5
5
|
export * from './comment-field/comment-field.component';
|
|
6
6
|
export * from './comment-sort/comment-sort.component';
|
|
7
|
+
export * from './attachment/attachment.component';
|
|
7
8
|
export * from './comments.module';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
export declare class LightboxComponent {
|
|
3
|
+
containerElement: ElementRef<HTMLDivElement>;
|
|
4
|
+
ngAfterViewInit(): void;
|
|
5
|
+
ngOnDestroy(): void;
|
|
6
|
+
images: string[];
|
|
7
|
+
currentImage: string;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
close(): void;
|
|
10
|
+
open(currentImage: string, images: string[]): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
export declare class SafeURLPipe implements PipeTransform {
|
|
4
|
+
private sanitizer;
|
|
5
|
+
constructor(sanitizer: DomSanitizer);
|
|
6
|
+
transform(value: string): unknown;
|
|
7
|
+
}
|