@banta/sdk 4.0.12 → 4.0.15

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/common'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/forms'), require('@angular/material/dialog'), require('@banta/common'), require('@angular/router'), require('@angular/material/menu'), require('@angular/material/progress-spinner'), require('@angular/cdk/text-field'), require('@angular/material/tooltip'), require('@angular/material/select')) :
3
- typeof define === 'function' && define.amd ? define('@banta/sdk', ['exports', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/common', '@angular/material/icon', '@angular/platform-browser', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/forms', '@angular/material/dialog', '@banta/common', '@angular/router', '@angular/material/menu', '@angular/material/progress-spinner', '@angular/cdk/text-field', '@angular/material/tooltip', '@angular/material/select'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.banta = global.banta || {}, global.banta.sdk = {}), global.rxjs, global.rxjs.operators, global.ng.core, global.ng.common, global.ng.material.icon, global.ng.platformBrowser, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.forms, global.ng.material.dialog, global.common$1, global.ng.router, global.ng.material.menu, global.ng.material.progressSpinner, global.ng.cdk.textField, global.ng.material.tooltip, global.ng.material.select));
5
- }(this, (function (exports, rxjs, operators, core, common, icon, platformBrowser, button, formField, input, forms, dialog, common$1, router, menu, progressSpinner, textField, tooltip, select) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/common'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/forms'), require('@angular/material/dialog'), require('@banta/common'), require('@angular/router'), require('@angular/material/snack-bar'), require('@angular/material/menu'), require('@angular/material/progress-spinner'), require('@angular/cdk/text-field'), require('@angular/material/tooltip'), require('@angular/material/select')) :
3
+ typeof define === 'function' && define.amd ? define('@banta/sdk', ['exports', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/common', '@angular/material/icon', '@angular/platform-browser', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/forms', '@angular/material/dialog', '@banta/common', '@angular/router', '@angular/material/snack-bar', '@angular/material/menu', '@angular/material/progress-spinner', '@angular/cdk/text-field', '@angular/material/tooltip', '@angular/material/select'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.banta = global.banta || {}, global.banta.sdk = {}), global.rxjs, global.rxjs.operators, global.ng.core, global.ng.common, global.ng.material.icon, global.ng.platformBrowser, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.forms, global.ng.material.dialog, global.common$1, global.ng.router, global.ng.material.snackBar, global.ng.material.menu, global.ng.material.progressSpinner, global.ng.cdk.textField, global.ng.material.tooltip, global.ng.material.select));
5
+ }(this, (function (exports, rxjs, operators, core, common, icon, platformBrowser, button, formField, input, forms, dialog, common$1, router, snackBar, menu, progressSpinner, textField, tooltip, select) { 'use strict';
6
6
 
7
7
  function lazyConnection(options) {
8
8
  var obs = new rxjs.Observable(function (observer) {
@@ -7108,7 +7108,8 @@
7108
7108
  };
7109
7109
 
7110
7110
  var EmojiSelectorButtonComponent = /** @class */ (function () {
7111
- function EmojiSelectorButtonComponent() {
7111
+ function EmojiSelectorButtonComponent(elementRef) {
7112
+ this.elementRef = elementRef;
7112
7113
  this._selected = new rxjs.Subject();
7113
7114
  this.showEmojiPanel = false;
7114
7115
  }
@@ -7124,7 +7125,12 @@
7124
7125
  this.panelElement.nativeElement.remove();
7125
7126
  };
7126
7127
  EmojiSelectorButtonComponent.prototype.ngAfterViewInit = function () {
7127
- var root = document.body.querySelector('[ng-version]') || document.body;
7128
+ };
7129
+ EmojiSelectorButtonComponent.prototype.putPanelAtRoot = function () {
7130
+ // If we are in full-screen, placing the panel outside of the full-screen element will result in it
7131
+ // always being behind said full-screen element, so we need to ensure we never place it further up the
7132
+ // stack.
7133
+ var root = document.fullscreenElement || document.body.querySelector('[ng-version]') || document.body;
7128
7134
  root.appendChild(this.panelElement.nativeElement);
7129
7135
  };
7130
7136
  EmojiSelectorButtonComponent.prototype.removeListener = function () {
@@ -7132,11 +7138,17 @@
7132
7138
  window.removeEventListener('resize', this.resizeListener);
7133
7139
  };
7134
7140
  EmojiSelectorButtonComponent.prototype.place = function () {
7141
+ // Not currently used as it can't be easily done handling all
7142
+ // scrolling corner cases.
7143
+ this.putPanelAtRoot();
7135
7144
  var pos = this.buttonElement.nativeElement.getBoundingClientRect();
7136
7145
  var size = this.panelElement.nativeElement.getBoundingClientRect();
7137
7146
  var left = window.scrollX + pos.left + pos.width - size.width;
7138
7147
  if (left < 0)
7139
7148
  left = (window.scrollX + window.innerWidth) / 2 - size.width / 2;
7149
+ var scrollY = window.scrollY;
7150
+ if (document.fullscreenElement) {
7151
+ }
7140
7152
  Object.assign(this.panelElement.nativeElement.style, {
7141
7153
  top: window.scrollY + pos.top + pos.height + "px",
7142
7154
  left: Math.max(0, left) + "px"
@@ -7149,7 +7161,7 @@
7149
7161
  return;
7150
7162
  }
7151
7163
  this.showEmojiPanel = true;
7152
- this.place();
7164
+ //this.place();
7153
7165
  setTimeout(function () {
7154
7166
  _this.resizeListener = function () {
7155
7167
  if (!_this.showEmojiPanel)
@@ -7182,9 +7194,12 @@
7182
7194
  { type: core.Component, args: [{
7183
7195
  selector: 'emoji-selector-button',
7184
7196
  template: "\n <button #button type=\"button\" mat-icon-button (click)=\"show()\">\n <mat-icon>emoji_emotions</mat-icon>\n </button>\n <emoji-selector-panel \n #panel\n (selected)=\"insert($event)\"\n [class.visible]=\"showEmojiPanel\"\n ></emoji-selector-panel>\n ",
7185
- styles: ["\n :host {\n display: block;\n position: relative;\n }\n\n emoji-selector-panel {\n position: absolute;\n /* bottom: 2.5em;\n right: 0; */\n opacity: 0;\n pointer-events: none;\n z-index: 10;\n }\n\n emoji-selector-panel.visible {\n pointer-events: initial;\n opacity: 1;\n }\n\n button {\n color: #666\n }\n\n /* :host.bottom-left emoji-selector-panel {\n right: auto;\n left: 0;\n }\n\n :host.top-right emoji-selector-panel {\n top: 2.4em;\n bottom: auto;\n }\n\n :host.top-left emoji-selector-panel {\n top: 2.4em;\n bottom: auto;\n left: 0;\n right: auto;\n } */\n "]
7197
+ styles: ["\n :host {\n display: block;\n position: relative;\n }\n\n emoji-selector-panel {\n position: absolute;\n top: 2.5em;\n right: 0;\n opacity: 0;\n pointer-events: none;\n z-index: 10;\n }\n\n emoji-selector-panel.visible {\n pointer-events: initial;\n opacity: 1;\n }\n\n button {\n color: #666\n }\n\n /* :host.bottom-left emoji-selector-panel {\n right: auto;\n left: 0;\n }\n\n :host.top-right emoji-selector-panel {\n top: 2.4em;\n bottom: auto;\n }\n\n :host.top-left emoji-selector-panel {\n top: 2.4em;\n bottom: auto;\n left: 0;\n right: auto;\n } */\n "]
7186
7198
  },] }
7187
7199
  ];
7200
+ EmojiSelectorButtonComponent.ctorParameters = function () { return [
7201
+ { type: core.ElementRef }
7202
+ ]; };
7188
7203
  EmojiSelectorButtonComponent.propDecorators = {
7189
7204
  selected: [{ type: core.Output }],
7190
7205
  panelElement: [{ type: core.ViewChild, args: ['panel', { read: core.ElementRef },] }],
@@ -8294,7 +8309,6 @@
8294
8309
  };
8295
8310
  CommentComponent.prototype.avatarForUser = function (user) {
8296
8311
  var url = this.genericAvatarUrl;
8297
- console.log("GENERIC: " + this.genericAvatarUrl);
8298
8312
  if (user && user.avatarUrl) {
8299
8313
  url = user.avatarUrl;
8300
8314
  }
@@ -8650,11 +8664,12 @@
8650
8664
  * Comments component
8651
8665
  */
8652
8666
  var BantaCommentsComponent = /** @class */ (function () {
8653
- function BantaCommentsComponent(backend, elementRef, activatedRoute) {
8667
+ function BantaCommentsComponent(backend, elementRef, activatedRoute, matSnackBar) {
8654
8668
  var _this = this;
8655
8669
  this.backend = backend;
8656
8670
  this.elementRef = elementRef;
8657
8671
  this.activatedRoute = activatedRoute;
8672
+ this.matSnackBar = matSnackBar;
8658
8673
  // Loading Screen
8659
8674
  this._loadingMessage = '';
8660
8675
  this.loadingMessageVisible = false;
@@ -8680,6 +8695,12 @@
8680
8695
  this._shared = new rxjs.Subject();
8681
8696
  this._usernameSelected = new rxjs.Subject();
8682
8697
  this._avatarSelected = new rxjs.Subject();
8698
+ /**
8699
+ * Track whether we created this source. If we did not (ie it was passed in from the caller),
8700
+ * then we are not responsible for calling close(). If we do own it though, we will call close()
8701
+ * when we are done with it.
8702
+ */
8703
+ this._sourceIsOwned = false;
8683
8704
  this._subs = new rxjs.Subscription();
8684
8705
  this._sortOrder = common$1.CommentsOrder.NEWEST;
8685
8706
  this.selectedMessageVisible = false;
@@ -8799,13 +8820,8 @@
8799
8820
  return __awaiter(this, void 0, void 0, function () {
8800
8821
  var _this = this;
8801
8822
  return __generator(this, function (_d) {
8802
- if (this._source) {
8803
- this._source.close();
8804
- this._source = null;
8805
- }
8806
8823
  setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
8807
8824
  var _d;
8808
- var _this = this;
8809
8825
  return __generator(this, function (_e) {
8810
8826
  switch (_e.label) {
8811
8827
  case 0:
@@ -8813,14 +8829,8 @@
8813
8829
  _d = this;
8814
8830
  return [4 /*yield*/, this.backend.getSourceForTopic(topicID, { sortOrder: this.sortOrder })];
8815
8831
  case 1:
8816
- _d._source = _e.sent();
8817
- if (this.sharedCommentID) {
8818
- this.navigateToSharedComment(this.sharedCommentID);
8819
- this.sharedCommentID = null;
8820
- }
8821
- this._source.messageReceived.subscribe(function (m) { return _this.addParticipant(m); });
8822
- this._source.messageSent.subscribe(function (m) { return _this.addParticipant(m); });
8823
- this._source.messages.forEach(function (m) { return _this.addParticipant(m); });
8832
+ _d.source = _e.sent();
8833
+ this._sourceIsOwned = true;
8824
8834
  return [2 /*return*/];
8825
8835
  }
8826
8836
  });
@@ -8903,10 +8913,35 @@
8903
8913
  Object.defineProperty(BantaCommentsComponent.prototype, "source", {
8904
8914
  get: function () { return this._source; },
8905
8915
  set: function (value) {
8916
+ var _this = this;
8917
+ var _a;
8918
+ if (this._source && this._sourceIsOwned) {
8919
+ this._source.close();
8920
+ (_a = this._sourceSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
8921
+ this._source = null;
8922
+ this.participants = [];
8923
+ }
8906
8924
  this._source = value;
8907
- if (value && this.sharedCommentID) {
8908
- this.navigateToSharedComment(this.sharedCommentID);
8909
- this.sharedCommentID = null;
8925
+ this._sourceIsOwned = false; // Assume we don't own this source.
8926
+ this._sourceSubscription = new rxjs.Subscription();
8927
+ if (value) {
8928
+ if (this.sharedCommentID) {
8929
+ this.navigateToSharedComment(this.sharedCommentID);
8930
+ this.sharedCommentID = null;
8931
+ }
8932
+ this._source.messages.forEach(function (m) { return _this.addParticipant(m); });
8933
+ this._sourceSubscription.add(this._source.messageReceived.subscribe(function (m) { return _this.addParticipant(m); }));
8934
+ this._sourceSubscription.add(this._source.messageSent.subscribe(function (m) { return _this.addParticipant(m); }));
8935
+ this._sourceSubscription.add(this._source.messageUpdated.subscribe(function (msg) {
8936
+ var _a;
8937
+ console.log("comments received message: ", msg);
8938
+ if (msg.id === ((_a = _this.selectedMessage) === null || _a === void 0 ? void 0 : _a.id) && msg.hidden) {
8939
+ _this.unselectMessage();
8940
+ _this.matSnackBar.open("The thread you were viewing was removed.", undefined, {
8941
+ duration: 2500
8942
+ });
8943
+ }
8944
+ }));
8910
8945
  }
8911
8946
  },
8912
8947
  enumerable: false,
@@ -9337,7 +9372,8 @@
9337
9372
  BantaCommentsComponent.ctorParameters = function () { return [
9338
9373
  { type: ChatBackendBase },
9339
9374
  { type: core.ElementRef },
9340
- { type: router.ActivatedRoute }
9375
+ { type: router.ActivatedRoute },
9376
+ { type: snackBar.MatSnackBar }
9341
9377
  ]; };
9342
9378
  BantaCommentsComponent.propDecorators = {
9343
9379
  loadingMessages: [{ type: core.Input }],
@@ -9733,7 +9769,7 @@
9733
9769
  { type: core.Component, args: [{
9734
9770
  selector: 'banta-comment-field',
9735
9771
  template: "<form class=\"new-message\" (submit)=\"sendMessage()\">\r\n <div class=\"avatar-container\">\r\n <a href=\"javascript:;\"\r\n class=\"avatar\"\r\n (click)=\"showEditAvatar()\"\r\n [style.background-image]=\"'url(' + userAvatarUrl + ')'\"\r\n ></a>\r\n </div>\r\n <div class=\"text-container\">\r\n <div class=\"field-container\">\r\n <div class=\"field-row\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\">\r\n <mat-label>{{label}}</mat-label>\r\n <textarea\r\n #textarea\r\n name=\"message\"\r\n [placeholder]=\"placeholder\"\r\n matInput\r\n cdkTextareaAutosize\r\n (keydown)=\"onKeyDown($event)\"\r\n (blur)=\"onBlur()\"\r\n [disabled]=\"sending\"\r\n [(ngModel)]=\"text\"></textarea>\r\n </mat-form-field>\r\n <div class=\"options-line\">\r\n <mat-spinner *ngIf=\"sending\" class=\"icon loading\" diameter=\"18\" strokeWidth=\"2\"></mat-spinner>\r\n <div *ngIf=\"sendError\" class=\"error-message\" [class.expanded]=\"expandError\" [matTooltip]=\"sendError.message\" (click)=\"alertError()\">\r\n <mat-icon *ngIf=\"sendError\">error</mat-icon>\r\n {{sendError.message}}\r\n </div>\r\n <div class=\"spacer\"></div>\r\n <div class=\"custom\">\r\n <ng-content></ng-content>\r\n </div>\r\n <banta-attachment-button (addedAttachment)=\"addedAttachment($event)\" *ngIf=\"allowAttachments\"></banta-attachment-button>\r\n <emoji-selector-button (selected)=\"insertEmoji($event)\"></emoji-selector-button>\r\n </div>\r\n \r\n </div>\r\n <div #autocompleteContainer class=\"autocomplete-container\">\r\n <div #autocomplete class=\"autocomplete\" [class.visible]=\"autocompleteVisible\">\r\n\r\n <div>\r\n <strong>{{completionPrefix}}</strong>...\r\n </div>\r\n <a\r\n mat-button\r\n *ngFor=\"let option of autocompleteOptions; index as index\"\r\n (click)=\"activateAutoComplete(option)\"\r\n [class.active]=\"autoCompleteSelected === index\"\r\n >\r\n {{option.label}}\r\n </a>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"chatMessageAttachments && chatMessageAttachments.length\" class=\"message-attachments-container\">\r\n <div *ngFor=\"let attachment of chatMessageAttachments; index as attachmentIndex\"\r\n class=\"message-attachment\">\r\n <button (click)=\"removeAttachment(attachmentIndex)\" mat-mini-fab color=\"primary\" class=\"remove-img\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <img [src]=\"attachment.url\" alt=\"Message Attachment\">\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"actions\">\r\n <ng-container *ngIf=\"!user\">\r\n <button\r\n mat-raised-button\r\n color=\"primary\"\r\n type=\"button\"\r\n (click)=\"showSignIn()\"\r\n >{{signInLabel}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"user\">\r\n <button\r\n mat-raised-button\r\n class=\"send\"\r\n color=\"primary\"\r\n [disabled]=\"canComment && ((!text && !chatMessageAttachments.length) || sending)\"\r\n >\r\n <ng-container *ngIf=\"canComment\">\r\n <mat-icon *ngIf=\"!sending\">chevron_right</mat-icon>\r\n <mat-spinner *ngIf=\"sending\" class=\"icon\" diameter=\"18\" strokeWidth=\"2\"></mat-spinner>\r\n </ng-container>\r\n <span class=\"label\">\r\n <ng-container *ngIf=\"!canComment\">\r\n {{permissionDeniedLabel}}\r\n </ng-container>\r\n <ng-container *ngIf=\"canComment\">\r\n <ng-container *ngIf=\"!sending\">\r\n {{sendLabel}}\r\n </ng-container>\r\n <ng-container *ngIf=\"sending\">\r\n {{sendingLabel}}\r\n </ng-container>\r\n </ng-container>\r\n </span>\r\n </button>\r\n </ng-container>\r\n </div>\r\n</form>",
9736
- styles: ["@-webkit-keyframes comment-field-appear{0%{transform:translateY(128px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes comment-field-appear{0%{transform:translateY(128px);opacity:0}to{transform:translate(0);opacity:1}}:host{margin:0 2em 0 0;display:block;-webkit-animation-name:comment-field-appear;animation-name:comment-field-appear;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-delay:.4s;animation-delay:.4s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.avatar-container{width:calc(48px + 1.75em);display:flex;justify-content:flex-end;flex-shrink:0}.avatar-container .avatar{width:48px;height:48px;background:#000;border-radius:100%;background-size:cover;background-repeat:no-repeat;background-position:50%;margin-top:.75em;margin-right:.75em}form{display:flex;padding:.5em;align-items:center}form .text-container{position:relative;display:flex;flex-grow:1;min-width:0}form .text-container textarea{font-size:14pt;width:100%}form .text-container textarea[disabled]{opacity:.5}form .text-container mat-spinner.loading{position:absolute;left:.5em;bottom:.5em}form .text-container .options-line{display:flex;align-items:center}form .text-container .options-line>*{flex-shrink:0}form .text-container .options-line .error-message{left:.5em;bottom:.5em;color:#683333;overflow-x:hidden;max-width:1.5em;white-space:nowrap;transition:max-width 2s ease-in-out;text-overflow:ellipsis;overflow:hidden;flex-shrink:1}form .text-container .options-line .error-message.expanded,form .text-container .options-line .error-message:hover{max-width:100%}form .text-container .options-line .error-message mat-icon{vertical-align:middle}form input[type=text]{background:#000;color:#fff;border:1px solid #333;width:100%;height:1em}form .actions{margin-left:1em;flex-shrink:0}form button{display:block;margin:0 0 0 auto}form.new-message{display:flex;align-items:flex-start;min-width:0}form.new-message .field-container{flex-grow:1;display:flex;flex-direction:column;min-width:0}form.new-message mat-form-field{width:100%}form.new-message mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:0}form.new-message button{margin:1.25em 0 0}button.send{min-width:9em}textarea{max-height:7em}.autocomplete-container{width:calc(100% - 2em);position:relative;pointer-events:none;top:-2em}.autocomplete{visibility:hidden;pointer-events:none;position:absolute;background:#333;padding:.5em;display:flex;flex-direction:column;z-index:100}.autocomplete.visible{visibility:visible;pointer-events:auto}.autocomplete a{width:100%;text-align:left}.autocomplete a.active{background:#555}@media (max-width:500px){:host{margin:0}.avatar-container{width:auto;flex-shrink:0}.avatar-container .avatar{width:32px;height:32px;margin-top:1.5em}button.send{min-width:auto;margin-top:1.5em}button.send .label{display:none}}.message-attachments-container{display:flex;gap:20px}.message-attachments-container .message-attachment{width:300px;position:relative}.message-attachments-container .message-attachment img{width:300px;border-radius:10px}.message-attachments-container .message-attachment .remove-img{position:absolute;right:10px;top:10px;margin:0}.field-row{position:relative}"]
9772
+ styles: ["@-webkit-keyframes comment-field-appear{0%{transform:translateY(128px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes comment-field-appear{0%{transform:translateY(128px);opacity:0}to{transform:translate(0);opacity:1}}:host{margin:0 2em 0 0;display:block;-webkit-animation-name:comment-field-appear;animation-name:comment-field-appear;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-delay:.4s;animation-delay:.4s;-webkit-animation-fill-mode:both;animation-fill-mode:both;position:relative;z-index:1}.avatar-container{width:calc(48px + 1.75em);display:flex;justify-content:flex-end;flex-shrink:0}.avatar-container .avatar{width:48px;height:48px;background:#000;border-radius:100%;background-size:cover;background-repeat:no-repeat;background-position:50%;margin-top:.75em;margin-right:.75em}form{display:flex;padding:.5em;align-items:center}form .text-container{position:relative;display:flex;flex-grow:1;min-width:0}form .text-container textarea{font-size:14pt;width:100%}form .text-container textarea[disabled]{opacity:.5}form .text-container mat-spinner.loading{position:absolute;left:.5em;bottom:.5em}form .text-container .options-line{display:flex;align-items:center}form .text-container .options-line>*{flex-shrink:0}form .text-container .options-line .error-message{left:.5em;bottom:.5em;color:#683333;overflow-x:hidden;max-width:1.5em;white-space:nowrap;transition:max-width 2s ease-in-out;text-overflow:ellipsis;overflow:hidden;flex-shrink:1}form .text-container .options-line .error-message.expanded,form .text-container .options-line .error-message:hover{max-width:100%}form .text-container .options-line .error-message mat-icon{vertical-align:middle}form input[type=text]{background:#000;color:#fff;border:1px solid #333;width:100%;height:1em}form .actions{margin-left:1em;flex-shrink:0}form button{display:block;margin:0 0 0 auto}form.new-message{display:flex;align-items:flex-start;min-width:0}form.new-message .field-container{flex-grow:1;display:flex;flex-direction:column;min-width:0}form.new-message mat-form-field{width:100%}form.new-message mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:0}form.new-message button{margin:1.25em 0 0}button.send{min-width:9em}textarea{max-height:7em}.autocomplete-container{width:calc(100% - 2em);position:relative;pointer-events:none;top:-2em}.autocomplete{visibility:hidden;pointer-events:none;position:absolute;background:#333;padding:.5em;display:flex;flex-direction:column;z-index:100}.autocomplete.visible{visibility:visible;pointer-events:auto}.autocomplete a{width:100%;text-align:left}.autocomplete a.active{background:#555}@media (max-width:500px){:host{margin:0}.avatar-container{width:auto;flex-shrink:0}.avatar-container .avatar{width:32px;height:32px;margin-top:1.5em}button.send{min-width:auto;margin-top:1.5em}button.send .label{display:none}}.message-attachments-container{display:flex;gap:20px}.message-attachments-container .message-attachment{width:300px;position:relative}.message-attachments-container .message-attachment img{width:300px;border-radius:10px}.message-attachments-container .message-attachment .remove-img{position:absolute;right:10px;top:10px;margin:0}.field-row{position:relative}"]
9737
9773
  },] }
9738
9774
  ];
9739
9775
  CommentFieldComponent.propDecorators = {
@@ -9921,6 +9957,7 @@
9921
9957
  _this.state = 'connecting';
9922
9958
  _this.messageMap = new Map();
9923
9959
  _this._messageReceived = new rxjs.Subject();
9960
+ _this._messageUpdated = new rxjs.Subject();
9924
9961
  _this._messageSent = new rxjs.Subject();
9925
9962
  _this.messages = [];
9926
9963
  _this.ready = new Promise(function (resolve) { return _this.markReady = resolve; });
@@ -10043,6 +10080,7 @@
10043
10080
  ChatSource.prototype.onChatMessage = function (message) {
10044
10081
  if (this.messageMap.has(message.id)) {
10045
10082
  Object.assign(this.messageMap.get(message.id), message);
10083
+ this._messageUpdated.next(message);
10046
10084
  }
10047
10085
  else if (!message.hidden) {
10048
10086
  // Only process non-hidden messages through here.
@@ -10057,6 +10095,11 @@
10057
10095
  enumerable: false,
10058
10096
  configurable: true
10059
10097
  });
10098
+ Object.defineProperty(ChatSource.prototype, "messageUpdated", {
10099
+ get: function () { return this._messageUpdated.asObservable(); },
10100
+ enumerable: false,
10101
+ configurable: true
10102
+ });
10060
10103
  Object.defineProperty(ChatSource.prototype, "messageSent", {
10061
10104
  get: function () { return this._messageSent.asObservable(); },
10062
10105
  enumerable: false,
@@ -10300,7 +10343,8 @@
10300
10343
  dialog.MatDialogModule,
10301
10344
  formField.MatFormFieldModule,
10302
10345
  input.MatInputModule,
10303
- progressSpinner.MatProgressSpinnerModule
10346
+ progressSpinner.MatProgressSpinnerModule,
10347
+ snackBar.MatSnackBarModule
10304
10348
  ],
10305
10349
  declarations: [
10306
10350
  BantaComponent,