@datarailsshared/datarailsshared 1.4.101 → 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.
@@ -5410,8 +5410,10 @@
5410
5410
  var DrChatComponent = /** @class */ (function () {
5411
5411
  function DrChatComponent(cdr) {
5412
5412
  this.cdr = cdr;
5413
+ this.showClearButton = true;
5413
5414
  this.noMessagesPlaceholder = 'No messages yet.';
5414
5415
  this._scrollBottom = true;
5416
+ this.clear = new i0.EventEmitter();
5415
5417
  }
5416
5418
  Object.defineProperty(DrChatComponent.prototype, "scrollBottom", {
5417
5419
  /**
@@ -5451,9 +5453,9 @@
5451
5453
  DrChatComponent.decorators = [
5452
5454
  { type: i0.Component, args: [{
5453
5455
  selector: 'dr-chat',
5454
- 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",
5456
+ 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",
5455
5457
  providers: [DrChatCustomMessageService],
5456
- 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"]
5458
+ 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"]
5457
5459
  },] }
5458
5460
  ];
5459
5461
  DrChatComponent.ctorParameters = function () { return [
@@ -5461,11 +5463,13 @@
5461
5463
  ]; };
5462
5464
  DrChatComponent.propDecorators = {
5463
5465
  title: [{ type: i0.Input }],
5466
+ showClearButton: [{ type: i0.Input }],
5464
5467
  noMessagesPlaceholder: [{ type: i0.Input }],
5465
5468
  scrollBottom: [{ type: i0.Input }],
5466
5469
  messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer',] }],
5467
5470
  messages: [{ type: i0.ContentChildren, args: [DrChatMessageComponent,] }],
5468
- chatForm: [{ type: i0.ContentChild, args: [DrChatFormComponent,] }]
5471
+ chatForm: [{ type: i0.ContentChild, args: [DrChatFormComponent,] }],
5472
+ clear: [{ type: i0.Output }]
5469
5473
  };
5470
5474
 
5471
5475
  /**