@datarailsshared/datarailsshared 1.4.100 → 1.4.102
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/datarailsshared-datarailsshared.umd.js +10 -5
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.102.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-chat/chat.component.js +9 -5
- package/esm2015/lib/dr-tooltip/components/tooltip-info/tooltip-info.component.js +4 -3
- package/fesm2015/datarailsshared-datarailsshared.js +10 -5
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-chat/chat.component.d.ts +3 -1
- package/lib/dr-tooltip/components/tooltip-info/tooltip-info.component.d.ts +1 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.100.tgz +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Component, Input, ViewChild, ContentChildren, ContentChild, ChangeDetectorRef, } from '@angular/core';
|
|
1
|
+
import { Component, Input, ViewChild, ContentChildren, ContentChild, ChangeDetectorRef, Output, EventEmitter, } 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 { DrChatCustomMessageService } from './dr-chat-message/dr-chat-message-custom/chat-custom-message.service';
|
|
5
5
|
export class DrChatComponent {
|
|
6
6
|
constructor(cdr) {
|
|
7
7
|
this.cdr = cdr;
|
|
8
|
+
this.showClearButton = true;
|
|
8
9
|
this.noMessagesPlaceholder = 'No messages yet.';
|
|
9
10
|
this._scrollBottom = true;
|
|
11
|
+
this.clear = new EventEmitter();
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Scroll chat to the bottom of the list when a new message arrives
|
|
@@ -39,9 +41,9 @@ export class DrChatComponent {
|
|
|
39
41
|
DrChatComponent.decorators = [
|
|
40
42
|
{ type: Component, args: [{
|
|
41
43
|
selector: 'dr-chat',
|
|
42
|
-
template: "<div class=\"header\">\n {{ title }}\n</div>\n\n<div class=\"scrollable\">\n <div class=\"messages\" #messagesContainer>\n <ng-content select=\"dr-chat-message\"></ng-content>\n <p class=\"no-messages\" *ngIf=\"!messages?.length\">{{ noMessagesPlaceholder }}</p>\n </div>\n</div>\n\n<div class=\"form\">\n <ng-content select=\"dr-chat-form\"></ng-content>\n</div>\n",
|
|
44
|
+
template: "<div class=\"header\">\n {{ title }}\n <dr-button *ngIf=\"showClearButton\"\n (click)=\"clear.emit($event)\"\n theme=\"icon\"\n icon=\"dr-icon-trash\"\n class=\"ml-auto\"\n title=\"Clear the history\">\n </dr-button>\n</div>\n\n<div class=\"scrollable\">\n <div class=\"messages\" #messagesContainer>\n <ng-content select=\"dr-chat-message\"></ng-content>\n <p class=\"no-messages\" *ngIf=\"!messages?.length\">{{ noMessagesPlaceholder }}</p>\n </div>\n</div>\n\n<div class=\"form\">\n <ng-content select=\"dr-chat-form\"></ng-content>\n</div>\n",
|
|
43
45
|
providers: [DrChatCustomMessageService],
|
|
44
|
-
styles: [":host{display:flex;flex-grow:1;flex-direction:column;position:relative;height:100%;background-color:#fff;border:1px solid #e5e6ea;border-radius:8px;box-shadow:0 4px 8px 1px #00000040;color:#151b3f;font-family:\"Poppins\",sans-serif;font-size:14px;font-weight:400;line-height:22px}:host .header{border-bottom:1px solid #e5e6ea;padding:16px 32px;font-weight:bold}:host .scrollable{display:flex;flex-grow:1;overflow-x:hidden;overflow-y:auto;height:100%;width:100%}:host .scrollable .messages{padding:16px;overflow-y:auto;overflow-x:hidden;display:flex;flex-shrink:0;flex-direction:column;width:100%}:host .scrollable .no-messages{text-align:center}\n"]
|
|
46
|
+
styles: [":host{display:flex;flex-grow:1;flex-direction:column;position:relative;height:100%;background-color:#fff;border:1px solid #e5e6ea;border-radius:8px;box-shadow:0 4px 8px 1px #00000040;color:#151b3f;font-family:\"Poppins\",sans-serif;font-size:14px;font-weight:400;line-height:22px}:host .header{display:flex;align-items:center;border-bottom:1px solid #e5e6ea;padding:16px 32px;font-weight:bold}:host .scrollable{display:flex;flex-grow:1;overflow-x:hidden;overflow-y:auto;height:100%;width:100%}:host .scrollable .messages{padding:16px;overflow-y:auto;overflow-x:hidden;display:flex;flex-shrink:0;flex-direction:column;width:100%}:host .scrollable .no-messages{text-align:center}\n"]
|
|
45
47
|
},] }
|
|
46
48
|
];
|
|
47
49
|
DrChatComponent.ctorParameters = () => [
|
|
@@ -49,10 +51,12 @@ DrChatComponent.ctorParameters = () => [
|
|
|
49
51
|
];
|
|
50
52
|
DrChatComponent.propDecorators = {
|
|
51
53
|
title: [{ type: Input }],
|
|
54
|
+
showClearButton: [{ type: Input }],
|
|
52
55
|
noMessagesPlaceholder: [{ type: Input }],
|
|
53
56
|
scrollBottom: [{ type: Input }],
|
|
54
57
|
messagesContainer: [{ type: ViewChild, args: ['messagesContainer',] }],
|
|
55
58
|
messages: [{ type: ContentChildren, args: [DrChatMessageComponent,] }],
|
|
56
|
-
chatForm: [{ type: ContentChild, args: [DrChatFormComponent,] }]
|
|
59
|
+
chatForm: [{ type: ContentChild, args: [DrChatFormComponent,] }],
|
|
60
|
+
clear: [{ type: Output }]
|
|
57
61
|
};
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kYXRhcmFpbHNzaGFyZWQvc3JjL2xpYi9kci1jaGF0L2NoYXQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDSCxTQUFTLEVBQ1QsS0FBSyxFQUNMLFNBQVMsRUFFVCxlQUFlLEVBR2YsWUFBWSxF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9tKCkge1xuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgIHRoaXMubWVzc2FnZXNDb250YWluZXIubmF0aXZlRWxlbWVudC5zY3JvbGxUbyh7IHRvcDogdGhpcy5tZXNzYWdlc0NvbnRhaW5lci5uYXRpdmVFbGVtZW50LnNjcm9sbEhlaWdodCwgYmVoYXZpb3I6ICdzbW9vdGgnIH0pO1xuICAgICAgICAgICAgdGhpcy5jZHIubWFya0ZvckNoZWNrKCk7XG4gICAgICAgIH0pO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -6,13 +6,14 @@ export class TooltipInfoComponent {
|
|
|
6
6
|
TooltipInfoComponent.decorators = [
|
|
7
7
|
{ type: Component, args: [{
|
|
8
8
|
selector: 'dr-tooltip-info',
|
|
9
|
-
template: "<div class=\"tooltip-info\">\n <i *ngIf=\"data?.icon else defaultIcon\" class=\"fa\" [class]=\"data.icon\" [style.fontSize.px]=\"14\"\n [style.margin.px]=\"12\" [style.color]=\"data?.iconColor || '#7B61FF'\"></i>\n <div class=\"tooltip-info-content-wrapper\">\n <div *ngIf=\"data?.title\" class=\"tooltip-info_header\">\n <span>{{data.title}}</span>\n </div>\n <div *ngIf=\"data?.description\" class=\"tooltip-info_description\"\n [class.tooltip-info_description-no-border]=\"!data.title\">\n <ng-container *ngIf=\"!data.title\"></ng-container>\n <span>{{data.description}}</span>\n </div>\n </div>\n</div>\n\n<ng-template #defaultIcon>\n <ng-container *ngIf=\"!data.icon\">\n <div class=\"default-icon\"></div>\n </ng-container>\n</ng-template>\n",
|
|
9
|
+
template: "<div class=\"tooltip-info\">\n <i *ngIf=\"data?.icon else defaultIcon\" class=\"fa\" [class]=\"data.icon\" [style.fontSize.px]=\"14\"\n [style.margin.px]=\"12\" [style.color]=\"data?.iconColor || '#7B61FF'\"></i>\n <div class=\"tooltip-info-content-wrapper\">\n <div *ngIf=\"data?.title\" class=\"tooltip-info_header\">\n <span>{{data.title}}</span>\n </div>\n <div *ngIf=\"data?.description\" class=\"tooltip-info_description\"\n [class.tooltip-info_description-no-border]=\"!data.title\">\n <ng-container *ngIf=\"!data.title\"></ng-container>\n <span *ngIf=\"!useDescriptionAsHTML\">{{data.description}}</span>\n <div *ngIf=\"useDescriptionAsHTML\" [innerHTML]=\"data.description\"></div>\n </div>\n </div>\n</div>\n\n<ng-template #defaultIcon>\n <ng-container *ngIf=\"!data.icon\">\n <div class=\"default-icon\"></div>\n </ng-container>\n</ng-template>\n",
|
|
10
10
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
11
|
styles: [".tooltip-info{width:316px;display:flex}.tooltip-info-content-wrapper{display:flex;flex-direction:column;padding-top:10px}.tooltip-info_header{padding:0 16px 6px 0;font-weight:bold;font-size:14px;line-height:16px;letter-spacing:.25px;display:flex;justify-content:flex-start}.tooltip-info_header>i{margin-right:10px}.tooltip-info-content-wrapper{padding-top:10px}.tooltip-info_description{display:flex;align-items:flex-start;border-top:1px solid #aeb5bb;padding:12px 10px 10px 0;text-align:left;font-weight:normal;font-size:14px;line-height:22px}.tooltip-info_description-no-border{padding-top:0;border-top:none}.tooltip-info_description>i{margin-right:10px}:host.tooltip-info-medium .tooltip-info{max-width:272px}:host.tooltip-info-medium .tooltip-info-content-wrapper{padding-top:10px}:host.tooltip-info-medium .tooltip-info_header,:host.tooltip-info-medium .tooltip-info_description{min-height:unset;border-top:none;font-size:14px;line-height:22px}:host.tooltip-info-medium .tooltip-info_header{padding:10px 10px 0 0}:host.tooltip-info-medium .tooltip-info_description{padding:10px 12px 10px 0}:host.tooltip-info-medium .tooltip-info .default-icon:before{background:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M8.00008 2.66669C5.05341 2.66669 2.66675 5.05335 2.66675 8.00002C2.66675 10.9467 5.05341 13.3334 8.00008 13.3334C10.9467 13.3334 13.3334 10.9467 13.3334 8.00002C13.3334 5.05335 10.9467 2.66669 8.00008 2.66669ZM8.53341 10.6667H7.46675V7.46669H8.53341V10.6667ZM8.53341 6.40002H7.46675V5.33335H8.53341V6.40002Z%22 fill%3D%22%237B61FF%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%;display:inline-block;height:20px;width:20px;content:\"\"}:host.tooltip-info-small .tooltip-info{width:auto}:host.tooltip-info-small .tooltip-info-content-wrapper{padding-top:10px}:host.tooltip-info-small .tooltip-info_header,:host.tooltip-info-small .tooltip-info_description{min-height:unset;border-top:none;font-size:14px;line-height:22px}:host.tooltip-info-small .tooltip-info_header{padding:0 10px 0 0}:host.tooltip-info-small .tooltip-info_description{padding:0 12px 10px 0}:host.tooltip-info-small .tooltip-info .default-icon:before{background:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M8.00008 2.66669C5.05341 2.66669 2.66675 5.05335 2.66675 8.00002C2.66675 10.9467 5.05341 13.3334 8.00008 13.3334C10.9467 13.3334 13.3334 10.9467 13.3334 8.00002C13.3334 5.05335 10.9467 2.66669 8.00008 2.66669ZM8.53341 10.6667H7.46675V7.46669H8.53341V10.6667ZM8.53341 6.40002H7.46675V5.33335H8.53341V6.40002Z%22 fill%3D%22%237B61FF%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%;display:inline-block;height:20px;width:20px;content:\"\"}.default-icon{position:relative;width:18px;height:18px;margin:10px}.default-icon:before{background:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M8.00008 2.66669C5.05341 2.66669 2.66675 5.05335 2.66675 8.00002C2.66675 10.9467 5.05341 13.3334 8.00008 13.3334C10.9467 13.3334 13.3334 10.9467 13.3334 8.00002C13.3334 5.05335 10.9467 2.66669 8.00008 2.66669ZM8.53341 10.6667H7.46675V7.46669H8.53341V10.6667ZM8.53341 6.40002H7.46675V5.33335H8.53341V6.40002Z%22 fill%3D%22%237B61FF%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%;display:inline-block;height:18px;width:18px;content:\"\"}\n"]
|
|
12
12
|
},] }
|
|
13
13
|
];
|
|
14
14
|
TooltipInfoComponent.ctorParameters = () => [];
|
|
15
15
|
TooltipInfoComponent.propDecorators = {
|
|
16
|
-
data: [{ type: Input }]
|
|
16
|
+
data: [{ type: Input }],
|
|
17
|
+
useDescriptionAsHTML: [{ type: Input }]
|
|
17
18
|
};
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbHRpcC1pbmZvLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2RhdGFyYWlsc3NoYXJlZC9zcmMvbGliL2RyLXRvb2x0aXAvY29tcG9uZW50cy90b29sdGlwLWluZm8vdG9vbHRpcC1pbmZvLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQVMxRSxNQUFNLE9BQU8sb0JBQW9CO0lBSzdCO0lBQ0EsQ0FBQzs7O1lBWkosU0FBUyxTQUFDO2dCQUNQLFFBQVEsRUFBRSxpQkFBaUI7Z0JBQzNCLHE5QkFBNEM7Z0JBRTVDLGVBQWUsRUFBRSx1QkFBdUIsQ0FBQyxNQUFNOzthQUNsRDs7OzttQkFHSSxLQUFLO21DQUNMLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneSwgQ29tcG9uZW50LCBJbnB1dCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVG9vbHRpcEluZm9Db250ZXh0IH0gZnJvbSAnLi4vLi4vaW50ZXJmYWNlcy90b29sdGlwLWNvbXBvbmVudC1jb250ZXh0JztcblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICdkci10b29sdGlwLWluZm8nLFxuICAgIHRlbXBsYXRlVXJsOiAnLi90b29sdGlwLWluZm8uY29tcG9uZW50Lmh0bWwnLFxuICAgIHN0eWxlVXJsczogWycuL3Rvb2x0aXAtaW5mby5jb21wb25lbnQuc2NzcyddLFxuICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoXG59KVxuZXhwb3J0IGNsYXNzIFRvb2x0aXBJbmZvQ29tcG9uZW50IHtcblxuICAgIEBJbnB1dCgpIGRhdGE6IFRvb2x0aXBJbmZvQ29udGV4dDtcbiAgICBASW5wdXQoKSB1c2VEZXNjcmlwdGlvbkFzSFRNTDogYm9vbGVhbjtcblxuICAgIGNvbnN0cnVjdG9yKCkge1xuICAgIH1cblxufVxuIl19
|
|
@@ -4143,14 +4143,15 @@ class TooltipInfoComponent {
|
|
|
4143
4143
|
TooltipInfoComponent.decorators = [
|
|
4144
4144
|
{ type: Component, args: [{
|
|
4145
4145
|
selector: 'dr-tooltip-info',
|
|
4146
|
-
template: "<div class=\"tooltip-info\">\n <i *ngIf=\"data?.icon else defaultIcon\" class=\"fa\" [class]=\"data.icon\" [style.fontSize.px]=\"14\"\n [style.margin.px]=\"12\" [style.color]=\"data?.iconColor || '#7B61FF'\"></i>\n <div class=\"tooltip-info-content-wrapper\">\n <div *ngIf=\"data?.title\" class=\"tooltip-info_header\">\n <span>{{data.title}}</span>\n </div>\n <div *ngIf=\"data?.description\" class=\"tooltip-info_description\"\n [class.tooltip-info_description-no-border]=\"!data.title\">\n <ng-container *ngIf=\"!data.title\"></ng-container>\n <span>{{data.description}}</span>\n </div>\n </div>\n</div>\n\n<ng-template #defaultIcon>\n <ng-container *ngIf=\"!data.icon\">\n <div class=\"default-icon\"></div>\n </ng-container>\n</ng-template>\n",
|
|
4146
|
+
template: "<div class=\"tooltip-info\">\n <i *ngIf=\"data?.icon else defaultIcon\" class=\"fa\" [class]=\"data.icon\" [style.fontSize.px]=\"14\"\n [style.margin.px]=\"12\" [style.color]=\"data?.iconColor || '#7B61FF'\"></i>\n <div class=\"tooltip-info-content-wrapper\">\n <div *ngIf=\"data?.title\" class=\"tooltip-info_header\">\n <span>{{data.title}}</span>\n </div>\n <div *ngIf=\"data?.description\" class=\"tooltip-info_description\"\n [class.tooltip-info_description-no-border]=\"!data.title\">\n <ng-container *ngIf=\"!data.title\"></ng-container>\n <span *ngIf=\"!useDescriptionAsHTML\">{{data.description}}</span>\n <div *ngIf=\"useDescriptionAsHTML\" [innerHTML]=\"data.description\"></div>\n </div>\n </div>\n</div>\n\n<ng-template #defaultIcon>\n <ng-container *ngIf=\"!data.icon\">\n <div class=\"default-icon\"></div>\n </ng-container>\n</ng-template>\n",
|
|
4147
4147
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4148
4148
|
styles: [".tooltip-info{width:316px;display:flex}.tooltip-info-content-wrapper{display:flex;flex-direction:column;padding-top:10px}.tooltip-info_header{padding:0 16px 6px 0;font-weight:bold;font-size:14px;line-height:16px;letter-spacing:.25px;display:flex;justify-content:flex-start}.tooltip-info_header>i{margin-right:10px}.tooltip-info-content-wrapper{padding-top:10px}.tooltip-info_description{display:flex;align-items:flex-start;border-top:1px solid #aeb5bb;padding:12px 10px 10px 0;text-align:left;font-weight:normal;font-size:14px;line-height:22px}.tooltip-info_description-no-border{padding-top:0;border-top:none}.tooltip-info_description>i{margin-right:10px}:host.tooltip-info-medium .tooltip-info{max-width:272px}:host.tooltip-info-medium .tooltip-info-content-wrapper{padding-top:10px}:host.tooltip-info-medium .tooltip-info_header,:host.tooltip-info-medium .tooltip-info_description{min-height:unset;border-top:none;font-size:14px;line-height:22px}:host.tooltip-info-medium .tooltip-info_header{padding:10px 10px 0 0}:host.tooltip-info-medium .tooltip-info_description{padding:10px 12px 10px 0}:host.tooltip-info-medium .tooltip-info .default-icon:before{background:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M8.00008 2.66669C5.05341 2.66669 2.66675 5.05335 2.66675 8.00002C2.66675 10.9467 5.05341 13.3334 8.00008 13.3334C10.9467 13.3334 13.3334 10.9467 13.3334 8.00002C13.3334 5.05335 10.9467 2.66669 8.00008 2.66669ZM8.53341 10.6667H7.46675V7.46669H8.53341V10.6667ZM8.53341 6.40002H7.46675V5.33335H8.53341V6.40002Z%22 fill%3D%22%237B61FF%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%;display:inline-block;height:20px;width:20px;content:\"\"}:host.tooltip-info-small .tooltip-info{width:auto}:host.tooltip-info-small .tooltip-info-content-wrapper{padding-top:10px}:host.tooltip-info-small .tooltip-info_header,:host.tooltip-info-small .tooltip-info_description{min-height:unset;border-top:none;font-size:14px;line-height:22px}:host.tooltip-info-small .tooltip-info_header{padding:0 10px 0 0}:host.tooltip-info-small .tooltip-info_description{padding:0 12px 10px 0}:host.tooltip-info-small .tooltip-info .default-icon:before{background:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M8.00008 2.66669C5.05341 2.66669 2.66675 5.05335 2.66675 8.00002C2.66675 10.9467 5.05341 13.3334 8.00008 13.3334C10.9467 13.3334 13.3334 10.9467 13.3334 8.00002C13.3334 5.05335 10.9467 2.66669 8.00008 2.66669ZM8.53341 10.6667H7.46675V7.46669H8.53341V10.6667ZM8.53341 6.40002H7.46675V5.33335H8.53341V6.40002Z%22 fill%3D%22%237B61FF%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%;display:inline-block;height:20px;width:20px;content:\"\"}.default-icon{position:relative;width:18px;height:18px;margin:10px}.default-icon:before{background:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M8.00008 2.66669C5.05341 2.66669 2.66675 5.05335 2.66675 8.00002C2.66675 10.9467 5.05341 13.3334 8.00008 13.3334C10.9467 13.3334 13.3334 10.9467 13.3334 8.00002C13.3334 5.05335 10.9467 2.66669 8.00008 2.66669ZM8.53341 10.6667H7.46675V7.46669H8.53341V10.6667ZM8.53341 6.40002H7.46675V5.33335H8.53341V6.40002Z%22 fill%3D%22%237B61FF%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%;display:inline-block;height:18px;width:18px;content:\"\"}\n"]
|
|
4149
4149
|
},] }
|
|
4150
4150
|
];
|
|
4151
4151
|
TooltipInfoComponent.ctorParameters = () => [];
|
|
4152
4152
|
TooltipInfoComponent.propDecorators = {
|
|
4153
|
-
data: [{ type: Input }]
|
|
4153
|
+
data: [{ type: Input }],
|
|
4154
|
+
useDescriptionAsHTML: [{ type: Input }]
|
|
4154
4155
|
};
|
|
4155
4156
|
|
|
4156
4157
|
class TooltipInfoSimpleComponent {
|
|
@@ -4704,8 +4705,10 @@ DrChatMessageComponent.propDecorators = {
|
|
|
4704
4705
|
class DrChatComponent {
|
|
4705
4706
|
constructor(cdr) {
|
|
4706
4707
|
this.cdr = cdr;
|
|
4708
|
+
this.showClearButton = true;
|
|
4707
4709
|
this.noMessagesPlaceholder = 'No messages yet.';
|
|
4708
4710
|
this._scrollBottom = true;
|
|
4711
|
+
this.clear = new EventEmitter();
|
|
4709
4712
|
}
|
|
4710
4713
|
/**
|
|
4711
4714
|
* Scroll chat to the bottom of the list when a new message arrives
|
|
@@ -4738,9 +4741,9 @@ class DrChatComponent {
|
|
|
4738
4741
|
DrChatComponent.decorators = [
|
|
4739
4742
|
{ type: Component, args: [{
|
|
4740
4743
|
selector: 'dr-chat',
|
|
4741
|
-
template: "<div class=\"header\">\n {{ title }}\n</div>\n\n<div class=\"scrollable\">\n <div class=\"messages\" #messagesContainer>\n <ng-content select=\"dr-chat-message\"></ng-content>\n <p class=\"no-messages\" *ngIf=\"!messages?.length\">{{ noMessagesPlaceholder }}</p>\n </div>\n</div>\n\n<div class=\"form\">\n <ng-content select=\"dr-chat-form\"></ng-content>\n</div>\n",
|
|
4744
|
+
template: "<div class=\"header\">\n {{ title }}\n <dr-button *ngIf=\"showClearButton\"\n (click)=\"clear.emit($event)\"\n theme=\"icon\"\n icon=\"dr-icon-trash\"\n class=\"ml-auto\"\n title=\"Clear the history\">\n </dr-button>\n</div>\n\n<div class=\"scrollable\">\n <div class=\"messages\" #messagesContainer>\n <ng-content select=\"dr-chat-message\"></ng-content>\n <p class=\"no-messages\" *ngIf=\"!messages?.length\">{{ noMessagesPlaceholder }}</p>\n </div>\n</div>\n\n<div class=\"form\">\n <ng-content select=\"dr-chat-form\"></ng-content>\n</div>\n",
|
|
4742
4745
|
providers: [DrChatCustomMessageService],
|
|
4743
|
-
styles: [":host{display:flex;flex-grow:1;flex-direction:column;position:relative;height:100%;background-color:#fff;border:1px solid #e5e6ea;border-radius:8px;box-shadow:0 4px 8px 1px #00000040;color:#151b3f;font-family:\"Poppins\",sans-serif;font-size:14px;font-weight:400;line-height:22px}:host .header{border-bottom:1px solid #e5e6ea;padding:16px 32px;font-weight:bold}:host .scrollable{display:flex;flex-grow:1;overflow-x:hidden;overflow-y:auto;height:100%;width:100%}:host .scrollable .messages{padding:16px;overflow-y:auto;overflow-x:hidden;display:flex;flex-shrink:0;flex-direction:column;width:100%}:host .scrollable .no-messages{text-align:center}\n"]
|
|
4746
|
+
styles: [":host{display:flex;flex-grow:1;flex-direction:column;position:relative;height:100%;background-color:#fff;border:1px solid #e5e6ea;border-radius:8px;box-shadow:0 4px 8px 1px #00000040;color:#151b3f;font-family:\"Poppins\",sans-serif;font-size:14px;font-weight:400;line-height:22px}:host .header{display:flex;align-items:center;border-bottom:1px solid #e5e6ea;padding:16px 32px;font-weight:bold}:host .scrollable{display:flex;flex-grow:1;overflow-x:hidden;overflow-y:auto;height:100%;width:100%}:host .scrollable .messages{padding:16px;overflow-y:auto;overflow-x:hidden;display:flex;flex-shrink:0;flex-direction:column;width:100%}:host .scrollable .no-messages{text-align:center}\n"]
|
|
4744
4747
|
},] }
|
|
4745
4748
|
];
|
|
4746
4749
|
DrChatComponent.ctorParameters = () => [
|
|
@@ -4748,11 +4751,13 @@ DrChatComponent.ctorParameters = () => [
|
|
|
4748
4751
|
];
|
|
4749
4752
|
DrChatComponent.propDecorators = {
|
|
4750
4753
|
title: [{ type: Input }],
|
|
4754
|
+
showClearButton: [{ type: Input }],
|
|
4751
4755
|
noMessagesPlaceholder: [{ type: Input }],
|
|
4752
4756
|
scrollBottom: [{ type: Input }],
|
|
4753
4757
|
messagesContainer: [{ type: ViewChild, args: ['messagesContainer',] }],
|
|
4754
4758
|
messages: [{ type: ContentChildren, args: [DrChatMessageComponent,] }],
|
|
4755
|
-
chatForm: [{ type: ContentChild, args: [DrChatFormComponent,] }]
|
|
4759
|
+
chatForm: [{ type: ContentChild, args: [DrChatFormComponent,] }],
|
|
4760
|
+
clear: [{ type: Output }]
|
|
4756
4761
|
};
|
|
4757
4762
|
|
|
4758
4763
|
/**
|