@banta/sdk 4.6.24 → 4.6.25

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.
@@ -7461,6 +7461,8 @@
7461
7461
  this.showEmojiPanel = false;
7462
7462
  this.overlayX = 'end';
7463
7463
  this.overlayY = 'top';
7464
+ this.originX = 'end';
7465
+ this.originY = 'bottom';
7464
7466
  }
7465
7467
  Object.defineProperty(EmojiSelectorButtonComponent.prototype, "selected", {
7466
7468
  get: function () {
@@ -7482,12 +7484,12 @@
7482
7484
  */
7483
7485
  EmojiSelectorButtonComponent.prototype.insert = function (str) {
7484
7486
  this._selected.next(str);
7487
+ this.close();
7485
7488
  };
7486
7489
  EmojiSelectorButtonComponent.prototype.close = function () {
7487
7490
  if (this.overlayRef) {
7488
7491
  this.overlayRef.dispose();
7489
7492
  this.overlayRef = null;
7490
- return;
7491
7493
  }
7492
7494
  };
7493
7495
  EmojiSelectorButtonComponent.prototype.show = function () {
@@ -7500,8 +7502,8 @@
7500
7502
  .flexibleConnectedTo(this.elementRef)
7501
7503
  .withPositions([
7502
7504
  {
7503
- originX: 'end',
7504
- originY: 'bottom',
7505
+ originX: this.originX,
7506
+ originY: this.originY,
7505
7507
  overlayX: this.overlayX,
7506
7508
  overlayY: this.overlayY
7507
7509
  }
@@ -7540,7 +7542,9 @@
7540
7542
  selectorPanelTemplate: [{ type: core.ViewChild, args: ['selectorPanelTemplate',] }],
7541
7543
  selected: [{ type: core.Output }],
7542
7544
  overlayX: [{ type: core.Input }],
7543
- overlayY: [{ type: core.Input }]
7545
+ overlayY: [{ type: core.Input }],
7546
+ originX: [{ type: core.Input }],
7547
+ originY: [{ type: core.Input }]
7544
7548
  };
7545
7549
 
7546
7550
  var COMPONENTS$1 = [
@@ -8430,7 +8434,10 @@
8430
8434
  case 3:
8431
8435
  _b.sent();
8432
8436
  _b.label = 4;
8433
- case 4: return [3 /*break*/, 6];
8437
+ case 4:
8438
+ this.chatView.scrollToLatest();
8439
+ this.inputElementRef.nativeElement.focus();
8440
+ return [3 /*break*/, 6];
8434
8441
  case 5:
8435
8442
  e_1 = _b.sent();
8436
8443
  console.error("Failed to send message: ", message);
@@ -8446,7 +8453,7 @@
8446
8453
  BantaChatComponent.decorators = [
8447
8454
  { type: core.Component, args: [{
8448
8455
  selector: 'banta-chat',
8449
- template: "<banta-chat-view \r\n #chatView\r\n [source]=\"source\"\r\n [emptyLabel]=\"emptyLabel\"\r\n (upvoted)=\"upvote($event)\"\r\n (reported)=\"report($event)\"\r\n (selected)=\"select($event)\"\r\n (received)=\"onReceived($event)\"\r\n (userSelected)=\"selectUser($event)\"\r\n ></banta-chat-view>\r\n\r\n<form class=\"new-message\" (submit)=\"sendMessage()\">\r\n \r\n <div class=\"entry-container\">\r\n <input\r\n type=\"text\"\r\n name=\"message\" \r\n autocomplete=\"off\"\r\n [placeholder]=\"messageFieldPlaceholder\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [(ngModel)]=\"newMessage.message\" />\r\n \r\n <emoji-selector-button\r\n (selected)=\"insertEmoji($event)\"\r\n ></emoji-selector-button>\r\n </div>\r\n\r\n <div class=\"actions\">\r\n\r\n <ng-container *ngIf=\"!user\">\r\n <button type=\"button\" (click)=\"showSignIn()\" mat-raised-button color=\"primary\">{{signInLabel}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"user\">\r\n <button *ngIf=\"canChat\" [disabled]=\"!newMessage.message\" mat-raised-button color=\"primary\">{{sendLabel}}</button>\r\n <button *ngIf=\"!canChat\" type=\"button\" (click)=\"sendPermissionError()\" mat-raised-button color=\"primary\">{{permissionDeniedLabel}}</button>\r\n </ng-container>\r\n </div>\r\n</form>",
8456
+ template: "<banta-chat-view \r\n #chatView\r\n [source]=\"source\"\r\n [emptyLabel]=\"emptyLabel\"\r\n (upvoted)=\"upvote($event)\"\r\n (reported)=\"report($event)\"\r\n (selected)=\"select($event)\"\r\n (received)=\"onReceived($event)\"\r\n (userSelected)=\"selectUser($event)\"\r\n ></banta-chat-view>\r\n\r\n<form class=\"new-message\" (submit)=\"sendMessage()\">\r\n \r\n <div class=\"entry-container\">\r\n <input\r\n #input\r\n type=\"text\"\r\n name=\"message\" \r\n autocomplete=\"off\"\r\n [placeholder]=\"messageFieldPlaceholder\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [(ngModel)]=\"newMessage.message\" />\r\n \r\n <emoji-selector-button\r\n (selected)=\"insertEmoji($event)\"\r\n overlayY=\"bottom\"\r\n overlayX=\"end\"\r\n originY=\"top\"\r\n ></emoji-selector-button>\r\n </div>\r\n\r\n <div class=\"actions\">\r\n\r\n <ng-container *ngIf=\"!user\">\r\n <button type=\"button\" (click)=\"showSignIn()\" mat-raised-button color=\"primary\">{{signInLabel}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"user\">\r\n <button *ngIf=\"canChat\" [disabled]=\"!newMessage.message\" mat-raised-button color=\"primary\">{{sendLabel}}</button>\r\n <button *ngIf=\"!canChat\" type=\"button\" (click)=\"sendPermissionError()\" mat-raised-button color=\"primary\">{{permissionDeniedLabel}}</button>\r\n </ng-container>\r\n </div>\r\n</form>",
8450
8457
  styles: [":host{flex-direction:column;border-radius:5px;padding:10px;font-size:10pt;min-height:1px}.entry-container,:host{display:flex;flex-grow:1}.entry-container{flex-direction:row;position:relative}.entry-container emoji-selector-button{position:absolute;right:0;top:.15em}.entry-container input{height:2.6em;font-size:12pt;padding-left:1em}.entry-container input:-webkit-autofill,.entry-container input:-webkit-autofill:focus,.entry-container input:-webkit-autofill:hover{outline:1px solid #9da302;-webkit-text-fill-color:#9da302;-webkit-box-shadow:0 0 0 1000px #211e07 inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;caret-color:#9da302}.entry-container emoji-selector-panel{pointer-events:none;opacity:0;position:absolute;bottom:3.5em;right:0}.entry-container emoji-selector-panel.visible{opacity:1;pointer-events:auto}form{display:flex;padding:.5em 0;align-items:center}form textarea{font-size:14pt;background:#000;color:#fff;border:1px solid #333;min-height:6em;width:100%}form input[type=text]{background:#fff;color:#000;border:1px solid #ccc;width:100%;height:2.5em}form .actions{margin-left:1em}form button{display:block;margin:0 0 0 auto}:host-context(.mat-dark-theme) form input[type=text]{background:#000;color:#fff;border:1px solid #333}"]
8451
8458
  },] }
8452
8459
  ];
@@ -8469,7 +8476,8 @@
8469
8476
  permissionDeniedError: [{ type: core.Output }],
8470
8477
  signInSelected: [{ type: core.Output }],
8471
8478
  received: [{ type: core.Output }],
8472
- chatView: [{ type: core.ViewChild, args: ['chatView', { static: true },] }]
8479
+ chatView: [{ type: core.ViewChild, args: ['chatView',] }],
8480
+ inputElementRef: [{ type: core.ViewChild, args: ['input',] }]
8473
8481
  };
8474
8482
 
8475
8483
  var COMPONENTS$2 = [