@datarailsshared/datarailsshared 1.4.102 → 1.4.106
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/assets/styles/img/default-chat-avatar.svg +13 -0
- package/bundles/datarailsshared-datarailsshared.umd.js +59 -11
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.106.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-chat/chat.component.js +22 -4
- package/esm2015/lib/dr-chat/dr-chat-form/chat-form.component.js +7 -3
- package/esm2015/lib/dr-chat/dr-chat-message/chat-message.component.js +17 -4
- package/esm2015/lib/dr-popover/dr-popover.service.js +7 -2
- package/esm2015/lib/models/chat.js +4 -3
- package/esm2015/lib/models/popover.js +1 -1
- package/fesm2015/datarailsshared-datarailsshared.js +50 -11
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-chat/chat.component.d.ts +7 -2
- package/lib/dr-chat/dr-chat-form/chat-form.component.d.ts +1 -0
- package/lib/dr-chat/dr-chat-message/chat-message.component.d.ts +8 -0
- package/lib/models/chat.d.ts +4 -1
- package/lib/models/popover.d.ts +1 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.102.tgz +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { ElementRef, QueryList, AfterViewInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, QueryList, AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { DrChatFormComponent } from './dr-chat-form/chat-form.component';
|
|
3
3
|
import { DrChatMessageComponent } from './dr-chat-message/chat-message.component';
|
|
4
|
-
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
export declare class DrChatComponent implements AfterViewInit, OnDestroy {
|
|
5
6
|
private cdr;
|
|
7
|
+
private destroy$;
|
|
6
8
|
title: string;
|
|
7
9
|
showClearButton: boolean;
|
|
8
10
|
noMessagesPlaceholder: string;
|
|
11
|
+
set contentUpdateSubject(value: Subject<any>);
|
|
9
12
|
/**
|
|
10
13
|
* Scroll chat to the bottom of the list when a new message arrives
|
|
11
14
|
*/
|
|
@@ -16,8 +19,10 @@ export declare class DrChatComponent implements AfterViewInit {
|
|
|
16
19
|
messages: QueryList<DrChatMessageComponent>;
|
|
17
20
|
chatForm: DrChatFormComponent;
|
|
18
21
|
clear: EventEmitter<any>;
|
|
22
|
+
close: EventEmitter<any>;
|
|
19
23
|
constructor(cdr: ChangeDetectorRef);
|
|
20
24
|
ngAfterViewInit(): void;
|
|
21
25
|
updateView(): void;
|
|
22
26
|
scrollListBottom(): void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
23
28
|
}
|
|
@@ -27,6 +27,14 @@ export declare class DrChatMessageComponent {
|
|
|
27
27
|
* @type {any}
|
|
28
28
|
*/
|
|
29
29
|
customMessageData: any;
|
|
30
|
+
/**
|
|
31
|
+
* The outer flag is whether the message is empty. Needed if it is impossible to calculate it inside.
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
*/
|
|
35
|
+
get isEmpty(): boolean;
|
|
36
|
+
set isEmpty(value: boolean);
|
|
37
|
+
protected _isEmpty: boolean;
|
|
30
38
|
customMessage: boolean;
|
|
31
39
|
constructor(customMessageService: DrChatCustomMessageService);
|
|
32
40
|
getTemplate(): TemplateRef<any>;
|
package/lib/models/chat.d.ts
CHANGED
|
@@ -28,7 +28,6 @@ export declare enum CHAT_MESSAGE_TYPE {
|
|
|
28
28
|
DOWNLOAD_FILE = "download-file",
|
|
29
29
|
MAILTO = "mailto",
|
|
30
30
|
EMBED = "embed",
|
|
31
|
-
WIDGET = "widget",
|
|
32
31
|
INPUT = "input",
|
|
33
32
|
CODE = "code"
|
|
34
33
|
}
|
|
@@ -40,6 +39,8 @@ export interface IChatMessageBase {
|
|
|
40
39
|
reply: boolean;
|
|
41
40
|
senderId: string;
|
|
42
41
|
parentId?: string;
|
|
42
|
+
useDefaultAvatar?: boolean;
|
|
43
|
+
avatarUrl?: string;
|
|
43
44
|
}
|
|
44
45
|
export interface IChatTextMessage extends IChatMessageBase {
|
|
45
46
|
kind: string | CHAT_MESSAGE_TYPE.TEXT;
|
|
@@ -102,5 +103,7 @@ export declare class ChatMessage implements IChatMessageBase, IChatTextMessage,
|
|
|
102
103
|
body?: any;
|
|
103
104
|
form?: any;
|
|
104
105
|
parameters?: any;
|
|
106
|
+
useDefaultAvatar?: boolean;
|
|
107
|
+
avatarUrl?: string;
|
|
105
108
|
constructor(obj: any, user: IChatAccount);
|
|
106
109
|
}
|
package/lib/models/popover.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export interface IDrPopoverComponentModel {
|
|
|
21
21
|
}
|
|
22
22
|
export interface DrPopoverConfig extends OverlayConfig {
|
|
23
23
|
closeOnBackdropClick?: boolean;
|
|
24
|
+
noPadding?: boolean;
|
|
24
25
|
}
|
|
25
26
|
export declare type DrPopoverAlignment = 'host';
|
|
26
27
|
export declare enum DrPopoverAlignmentDimension {
|
package/package.json
CHANGED
|
Binary file
|