@banta/sdk 0.0.35 → 1.0.1

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.
Files changed (66) hide show
  1. package/banta-sdk.metadata.json +1 -1
  2. package/bundles/banta-sdk.umd.js +238 -509
  3. package/bundles/banta-sdk.umd.js.map +1 -1
  4. package/bundles/banta-sdk.umd.min.js +2 -2
  5. package/bundles/banta-sdk.umd.min.js.map +1 -1
  6. package/esm2015/lib/banta/banta.component.js +217 -0
  7. package/esm2015/lib/banta-logo.component.js +22 -0
  8. package/esm2015/lib/banta-sdk.module.js +17 -12
  9. package/esm2015/lib/chat/banta-chat/banta-chat.component.js +197 -0
  10. package/esm2015/lib/chat/chat-message/chat-message.component.js +2 -2
  11. package/esm2015/lib/chat/chat-view/chat-view.component.js +5 -5
  12. package/esm2015/lib/chat/chat.module.js +3 -3
  13. package/esm2015/lib/chat/index.js +2 -2
  14. package/esm2015/lib/chat/live-chat-message.component.js +4 -4
  15. package/esm2015/lib/comments/banta-comments/banta-comments.component.js +180 -0
  16. package/esm2015/lib/comments/comment/comment.component.js +4 -4
  17. package/esm2015/lib/comments/comment-view/comment-view.component.js +3 -3
  18. package/esm2015/lib/comments/comments.module.js +5 -5
  19. package/esm2015/lib/comments/index.js +2 -2
  20. package/esm2015/lib/comments/live-comment.component.js +4 -4
  21. package/esm2015/lib/common/common.module.js +7 -7
  22. package/esm2015/lib/common/timestamp.component.js +2 -2
  23. package/esm2015/lib/index.js +3 -3
  24. package/esm2015/lib/live-message.component.js +6 -6
  25. package/esm5/lib/banta/banta.component.js +283 -0
  26. package/esm5/lib/banta-logo.component.js +16 -0
  27. package/esm5/lib/banta-sdk.module.js +17 -12
  28. package/esm5/lib/chat/banta-chat/banta-chat.component.js +245 -0
  29. package/esm5/lib/chat/chat-message/chat-message.component.js +2 -2
  30. package/esm5/lib/chat/chat-view/chat-view.component.js +5 -5
  31. package/esm5/lib/chat/chat.module.js +3 -3
  32. package/esm5/lib/chat/index.js +2 -2
  33. package/esm5/lib/chat/live-chat-message.component.js +3 -3
  34. package/esm5/lib/comments/banta-comments/banta-comments.component.js +228 -0
  35. package/esm5/lib/comments/comment/comment.component.js +4 -4
  36. package/esm5/lib/comments/comment-view/comment-view.component.js +3 -3
  37. package/esm5/lib/comments/comments.module.js +5 -5
  38. package/esm5/lib/comments/index.js +2 -2
  39. package/esm5/lib/comments/live-comment.component.js +3 -3
  40. package/esm5/lib/common/common.module.js +11 -11
  41. package/esm5/lib/common/timestamp.component.js +2 -2
  42. package/esm5/lib/index.js +3 -3
  43. package/esm5/lib/live-message.component.js +3 -3
  44. package/fesm2015/banta-sdk.js +143 -387
  45. package/fesm2015/banta-sdk.js.map +1 -1
  46. package/fesm5/banta-sdk.js +234 -502
  47. package/fesm5/banta-sdk.js.map +1 -1
  48. package/lib/banta/banta.component.d.ts +55 -0
  49. package/lib/banta-logo.component.d.ts +2 -0
  50. package/lib/chat/{firehose-chat/firehose-chat.component.d.ts → banta-chat/banta-chat.component.d.ts} +7 -1
  51. package/lib/chat/index.d.ts +1 -1
  52. package/lib/comments/{comments-box/comments-box.component.d.ts → banta-comments/banta-comments.component.d.ts} +8 -2
  53. package/lib/comments/index.d.ts +1 -1
  54. package/lib/common/common.module.d.ts +2 -2
  55. package/lib/index.d.ts +2 -2
  56. package/package.json +2 -3
  57. package/esm2015/lib/chat/firehose-chat/firehose-chat.component.js +0 -175
  58. package/esm2015/lib/comments/comments-box/comments-box.component.js +0 -158
  59. package/esm2015/lib/engage/engage.component.js +0 -510
  60. package/esm2015/lib/engage-logo.component.js +0 -22
  61. package/esm5/lib/chat/firehose-chat/firehose-chat.component.js +0 -209
  62. package/esm5/lib/comments/comments-box/comments-box.component.js +0 -192
  63. package/esm5/lib/engage/engage.component.js +0 -631
  64. package/esm5/lib/engage-logo.component.js +0 -16
  65. package/lib/engage/engage.component.d.ts +0 -98
  66. package/lib/engage-logo.component.d.ts +0 -2
@@ -153,7 +153,7 @@ var TimestampComponent = /** @class */ (function () {
153
153
  ], TimestampComponent.prototype, "value", null);
154
154
  TimestampComponent = __decorate([
155
155
  Component({
156
- selector: 'engage-timestamp',
156
+ selector: 'banta-timestamp',
157
157
  template: "\n <span *ngIf=\"showAbsolute\" [title]=\"value | date : 'short'\">\n {{value | date : 'shortDate'}}\n </span>\n <span *ngIf=\"!showAbsolute\" [title]=\"value | date : 'short'\">\n {{relative}}\n </span>\n ",
158
158
  styles: [""]
159
159
  })
@@ -164,20 +164,20 @@ var TimestampComponent = /** @class */ (function () {
164
164
  var COMPONENTS = [
165
165
  TimestampComponent
166
166
  ];
167
- var EngageCommonModule = /** @class */ (function () {
168
- function EngageCommonModule() {
167
+ var BantaCommonModule = /** @class */ (function () {
168
+ function BantaCommonModule() {
169
169
  }
170
- EngageCommonModule_1 = EngageCommonModule;
171
- EngageCommonModule.forRoot = function () {
170
+ BantaCommonModule_1 = BantaCommonModule;
171
+ BantaCommonModule.forRoot = function () {
172
172
  return {
173
- ngModule: EngageCommonModule_1,
173
+ ngModule: BantaCommonModule_1,
174
174
  providers: [
175
175
  BantaService
176
176
  ]
177
177
  };
178
178
  };
179
- var EngageCommonModule_1;
180
- EngageCommonModule = EngageCommonModule_1 = __decorate([
179
+ var BantaCommonModule_1;
180
+ BantaCommonModule = BantaCommonModule_1 = __decorate([
181
181
  NgModule({
182
182
  declarations: COMPONENTS,
183
183
  imports: [
@@ -185,8 +185,8 @@ var EngageCommonModule = /** @class */ (function () {
185
185
  ],
186
186
  exports: COMPONENTS
187
187
  })
188
- ], EngageCommonModule);
189
- return EngageCommonModule;
188
+ ], BantaCommonModule);
189
+ return BantaCommonModule;
190
190
  }());
191
191
 
192
192
  var EMOJIS = {
@@ -6926,7 +6926,7 @@ var ChatMessageComponent = /** @class */ (function () {
6926
6926
  ], ChatMessageComponent.prototype, "upvoted", null);
6927
6927
  ChatMessageComponent = __decorate([
6928
6928
  Component({
6929
- selector: 'engage-chat-message',
6929
+ selector: 'banta-chat-message',
6930
6930
  template: "<div class=\"message-content\">\r\n <div class=\"user\" (click)=\"selectUser()\">\r\n <div class=\"avatar\" [style.background-image]=\"avatarForUser(message.user)\"></div>\r\n <label>{{message.user.username}}</label>\r\n </div>\r\n <div class=\"content\">\r\n <div (click)=\"select()\">\r\n {{message.message}}\r\n </div>\r\n <div class=\"status\">\r\n <div class=\"count-indicator\" *ngIf=\"message.upvotes > 0\">\r\n {{message.upvotes}} <mat-icon [inline]=\"true\">star</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"actions\">\r\n <button mat-icon-button matTooltip=\"Upvote\" matTooltipPosition=\"below\" (click)=\"upvote()\">\r\n <mat-icon [inline]=\"true\">thumb_up</mat-icon>\r\n </button>\r\n <button mat-icon-button matTooltip=\"Report\" matTooltipPosition=\"below\" (click)=\"report()\">\r\n <mat-icon [inline]=\"true\">report</mat-icon>\r\n </button>\r\n</div>",
6931
6931
  styles: [":host{display:flex;flex-direction:row;align-items:center;padding:0 1em;background-color:#fff;color:#000;transition:background-color .4s ease-out}:host:hover{background-color:#ddd}:host.highlight{background:#00121b}:host.highlight:hover{background:#01324d}:host:nth-child(2n){background-color:#eee}:host:nth-child(2n):hover{background:#ddd}:host:nth-child(2n) .message-content .content{color:#222}:host:nth-child(2n).highlight{background:#001a2a}:host:nth-child(2n).highlight:hover{background:#002b44}:host .message-content{display:flex;flex-direction:row;flex-grow:1;align-items:center}:host .message-content .content{color:#111;display:flex;flex-direction:row;padding:5px 0}:host .message-content .content .status{display:flex;flex-direction:row;align-items:center;margin-left:1em}:host .message-content .content .status mat-icon{margin-left:.5em}:host .user{color:#999;font-weight:400;text-align:right;margin-right:.25em;flex-shrink:0;display:flex;align-items:center}:host .user .avatar{background-position:center;background-size:cover;background-color:#333;border-radius:100%;flex-shrink:0;flex-grow:0;margin-right:1em;width:2em;height:2em}:host .user:after{content:\":\";margin-right:1em}:host .content{flex-grow:1}:host .actions{flex-shrink:0;white-space:nowrap;opacity:0;transition:opacity .4s ease-out}:host:hover .actions{opacity:1}.count-indicator{white-space:nowrap}:host-context(.mat-dark-theme){background-color:#000;color:#fff}:host-context(.mat-dark-theme) .message-content .content{color:#ddd}:host-context(.mat-dark-theme):hover{background-color:#111}:host-context(.mat-dark-theme):nth-child(2n).highlight{background:#001a2a}:host-context(.mat-dark-theme):nth-child(2n).highlight:hover{background:#002b44}:host-context(.mat-dark-theme):nth-child(2n):hover{background-color:#111}:host-context(.mat-dark-theme):nth-child(2n){background-color:#080808}:host-context(.mat-dark-theme):nth-child(2n) .message-content .content{color:#eee}label{margin:0}"]
6932
6932
  })
@@ -7027,8 +7027,8 @@ var LiveChatMessageComponent = /** @class */ (function () {
7027
7027
  ], LiveChatMessageComponent.prototype, "message", null);
7028
7028
  LiveChatMessageComponent = __decorate([
7029
7029
  Component({
7030
- selector: 'engage-live-chat-message',
7031
- template: "\n <engage-chat-message \n *ngIf=\"message\"\n [message]=\"message\"\n (upvoted)=\"upvote()\"\n (reported)=\"report()\"\n (selected)=\"select()\"\n ></engage-chat-message>\n ",
7030
+ selector: 'banta-live-chat-message',
7031
+ template: "\n <banta-chat-message \n *ngIf=\"message\"\n [message]=\"message\"\n (upvoted)=\"upvote()\"\n (reported)=\"report()\"\n (selected)=\"select()\"\n ></banta-chat-message>\n ",
7032
7032
  styles: [""]
7033
7033
  }),
7034
7034
  __metadata("design:paramtypes", [ChatBackendService])
@@ -7142,7 +7142,7 @@ var ChatViewComponent = /** @class */ (function () {
7142
7142
  };
7143
7143
  ChatViewComponent.prototype.jumpTo = function (message) {
7144
7144
  var element = this.elementRef.nativeElement;
7145
- var messageElement = element.querySelector("engage-chat-message[data-id=\"" + message.id + "\"]");
7145
+ var messageElement = element.querySelector("banta-chat-message[data-id=\"" + message.id + "\"]");
7146
7146
  if (!messageElement) {
7147
7147
  alert("could not find message " + message.id);
7148
7148
  return;
@@ -7220,17 +7220,20 @@ var ChatViewComponent = /** @class */ (function () {
7220
7220
  ], ChatViewComponent.prototype, "maxMessages", void 0);
7221
7221
  ChatViewComponent = __decorate([
7222
7222
  Component({
7223
- selector: 'engage-chat-view',
7224
- template: "<div class=\"message-container\" #messageContainer>\r\n <ng-content select=\"[data-before]\"></ng-content>\r\n <engage-chat-message \r\n *ngFor=\"let message of messages\"\r\n [message]=\"message\"\r\n [class.highlight]=\"mentionsMe(message)\" \r\n [class.flash]=\"message.id === flashedMessageId\"\r\n (selected)=\"selectMessage(message)\"\r\n (upvoted)=\"upvoteMessage(message)\"\r\n (reported)=\"reportMessage(message)\"\r\n (userSelected)=\"selectMessageUser(message)\"\r\n [attr.data-id]=\"message.id\"\r\n >\r\n </engage-chat-message>\r\n <ng-content select=\":not([data-before])\"></ng-content>\r\n</div>",
7225
- styles: [":host{display:flex;flex-direction:column;flex-grow:1}.message-container{flex-grow:1;overflow-y:auto;overflow-x:hidden;height:10em;color:#000;background:#fff;padding:.5em 1em .5em .5em}.message-container.no-scroll{height:auto;overflow-y:visible}:host-context(.mat-dark-theme) .message-container{color:#fff;background:#000}engage-chat-message.flash{-webkit-animation:2.5s flash;animation:2.5s flash}@-webkit-keyframes flash{0%{transform:scale(1);background:#425700}25%,75%{transform:scale(1.05)}100%,50%{transform:scale(1)}}@keyframes flash{0%{transform:scale(1);background:#425700}25%,75%{transform:scale(1.05)}100%,50%{transform:scale(1)}}"]
7223
+ selector: 'banta-chat-view',
7224
+ template: "<div class=\"message-container\" #messageContainer>\r\n <ng-content select=\"[data-before]\"></ng-content>\r\n <banta-chat-message \r\n *ngFor=\"let message of messages\"\r\n [message]=\"message\"\r\n [class.highlight]=\"mentionsMe(message)\" \r\n [class.flash]=\"message.id === flashedMessageId\"\r\n (selected)=\"selectMessage(message)\"\r\n (upvoted)=\"upvoteMessage(message)\"\r\n (reported)=\"reportMessage(message)\"\r\n (userSelected)=\"selectMessageUser(message)\"\r\n [attr.data-id]=\"message.id\"\r\n >\r\n </banta-chat-message>\r\n <ng-content select=\":not([data-before])\"></ng-content>\r\n</div>",
7225
+ styles: [":host{display:flex;flex-direction:column;flex-grow:1}.message-container{flex-grow:1;overflow-y:auto;overflow-x:hidden;height:10em;color:#000;background:#fff;padding:.5em 1em .5em .5em}.message-container.no-scroll{height:auto;overflow-y:visible}:host-context(.mat-dark-theme) .message-container{color:#fff;background:#000}banta-chat-message.flash{-webkit-animation:2.5s flash;animation:2.5s flash}@-webkit-keyframes flash{0%{transform:scale(1);background:#425700}25%,75%{transform:scale(1.05)}100%,50%{transform:scale(1)}}@keyframes flash{0%{transform:scale(1);background:#425700}25%,75%{transform:scale(1.05)}100%,50%{transform:scale(1)}}"]
7226
7226
  }),
7227
7227
  __metadata("design:paramtypes", [ElementRef])
7228
7228
  ], ChatViewComponent);
7229
7229
  return ChatViewComponent;
7230
7230
  }());
7231
7231
 
7232
- var FirehoseChatComponent = /** @class */ (function () {
7233
- function FirehoseChatComponent(banta, backend, elementRef) {
7232
+ /**
7233
+ * Chat component
7234
+ */
7235
+ var BantaChatComponent = /** @class */ (function () {
7236
+ function BantaChatComponent(banta, backend, elementRef) {
7234
7237
  this.banta = banta;
7235
7238
  this.backend = backend;
7236
7239
  this.elementRef = elementRef;
@@ -7248,14 +7251,14 @@ var FirehoseChatComponent = /** @class */ (function () {
7248
7251
  this.showEmojiPanel = false;
7249
7252
  this.newMessage = {};
7250
7253
  }
7251
- FirehoseChatComponent.prototype.ngOnInit = function () {
7254
+ BantaChatComponent.prototype.ngOnInit = function () {
7252
7255
  var _this = this;
7253
7256
  this._subs.add(this.banta.userChanged.subscribe(function (user) { return _this.user = user; }));
7254
7257
  };
7255
- FirehoseChatComponent.prototype.ngOnDestroy = function () {
7258
+ BantaChatComponent.prototype.ngOnDestroy = function () {
7256
7259
  this._subs.unsubscribe();
7257
7260
  };
7258
- Object.defineProperty(FirehoseChatComponent.prototype, "source", {
7261
+ Object.defineProperty(BantaChatComponent.prototype, "source", {
7259
7262
  get: function () {
7260
7263
  return this._source;
7261
7264
  },
@@ -7265,78 +7268,106 @@ var FirehoseChatComponent = /** @class */ (function () {
7265
7268
  enumerable: true,
7266
7269
  configurable: true
7267
7270
  });
7268
- Object.defineProperty(FirehoseChatComponent.prototype, "signInSelected", {
7271
+ Object.defineProperty(BantaChatComponent.prototype, "topicID", {
7272
+ get: function () {
7273
+ return this._source.identifier;
7274
+ },
7275
+ set: function (value) {
7276
+ this.setSourceFromTopicID(value);
7277
+ },
7278
+ enumerable: true,
7279
+ configurable: true
7280
+ });
7281
+ BantaChatComponent.prototype.setSourceFromTopicID = function (topicID) {
7282
+ return __awaiter(this, void 0, void 0, function () {
7283
+ var _a;
7284
+ return __generator(this, function (_b) {
7285
+ switch (_b.label) {
7286
+ case 0:
7287
+ if (this._source && this._source.close)
7288
+ this._source.close();
7289
+ this._source = null;
7290
+ _a = this;
7291
+ return [4 /*yield*/, this.backend.getSourceForTopic(topicID)];
7292
+ case 1:
7293
+ _a._source = _b.sent();
7294
+ return [2 /*return*/];
7295
+ }
7296
+ });
7297
+ });
7298
+ };
7299
+ Object.defineProperty(BantaChatComponent.prototype, "signInSelected", {
7269
7300
  get: function () {
7270
7301
  return this._signInSelected;
7271
7302
  },
7272
7303
  enumerable: true,
7273
7304
  configurable: true
7274
7305
  });
7275
- Object.defineProperty(FirehoseChatComponent.prototype, "permissionDeniedError", {
7306
+ Object.defineProperty(BantaChatComponent.prototype, "permissionDeniedError", {
7276
7307
  get: function () {
7277
7308
  return this._permissionDeniedError;
7278
7309
  },
7279
7310
  enumerable: true,
7280
7311
  configurable: true
7281
7312
  });
7282
- FirehoseChatComponent.prototype.showSignIn = function () {
7313
+ BantaChatComponent.prototype.showSignIn = function () {
7283
7314
  this._signInSelected.next();
7284
7315
  };
7285
- FirehoseChatComponent.prototype.sendPermissionError = function () {
7316
+ BantaChatComponent.prototype.sendPermissionError = function () {
7286
7317
  this._permissionDeniedError.next();
7287
7318
  };
7288
- FirehoseChatComponent.prototype.insertEmoji = function (emoji) {
7319
+ BantaChatComponent.prototype.insertEmoji = function (emoji) {
7289
7320
  var message = this.newMessage.message || '';
7290
7321
  this.newMessage.message = message + emoji;
7291
7322
  };
7292
- FirehoseChatComponent.prototype.onKeyDown = function (event) {
7323
+ BantaChatComponent.prototype.onKeyDown = function (event) {
7293
7324
  // TODO
7294
7325
  };
7295
- FirehoseChatComponent.prototype.jumpToMessage = function (message) {
7326
+ BantaChatComponent.prototype.jumpToMessage = function (message) {
7296
7327
  if (this.chatView)
7297
7328
  this.chatView.jumpTo(message);
7298
7329
  };
7299
- FirehoseChatComponent.prototype.select = function (message) {
7330
+ BantaChatComponent.prototype.select = function (message) {
7300
7331
  this._selected.next(message);
7301
7332
  };
7302
- FirehoseChatComponent.prototype.selectUser = function (message) {
7333
+ BantaChatComponent.prototype.selectUser = function (message) {
7303
7334
  this._userSelected.next(message);
7304
7335
  };
7305
- FirehoseChatComponent.prototype.report = function (message) {
7336
+ BantaChatComponent.prototype.report = function (message) {
7306
7337
  this._reported.next(message);
7307
7338
  };
7308
- FirehoseChatComponent.prototype.upvote = function (message) {
7339
+ BantaChatComponent.prototype.upvote = function (message) {
7309
7340
  this._upvoted.next(message);
7310
7341
  };
7311
- Object.defineProperty(FirehoseChatComponent.prototype, "selected", {
7342
+ Object.defineProperty(BantaChatComponent.prototype, "selected", {
7312
7343
  get: function () {
7313
7344
  return this._selected;
7314
7345
  },
7315
7346
  enumerable: true,
7316
7347
  configurable: true
7317
7348
  });
7318
- Object.defineProperty(FirehoseChatComponent.prototype, "reported", {
7349
+ Object.defineProperty(BantaChatComponent.prototype, "reported", {
7319
7350
  get: function () {
7320
7351
  return this._reported;
7321
7352
  },
7322
7353
  enumerable: true,
7323
7354
  configurable: true
7324
7355
  });
7325
- Object.defineProperty(FirehoseChatComponent.prototype, "upvoted", {
7356
+ Object.defineProperty(BantaChatComponent.prototype, "upvoted", {
7326
7357
  get: function () {
7327
7358
  return this._upvoted;
7328
7359
  },
7329
7360
  enumerable: true,
7330
7361
  configurable: true
7331
7362
  });
7332
- Object.defineProperty(FirehoseChatComponent.prototype, "userSelected", {
7363
+ Object.defineProperty(BantaChatComponent.prototype, "userSelected", {
7333
7364
  get: function () {
7334
7365
  return this._userSelected;
7335
7366
  },
7336
7367
  enumerable: true,
7337
7368
  configurable: true
7338
7369
  });
7339
- Object.defineProperty(FirehoseChatComponent.prototype, "canChat", {
7370
+ Object.defineProperty(BantaChatComponent.prototype, "canChat", {
7340
7371
  get: function () {
7341
7372
  var _a;
7342
7373
  if (!this.user.permissions)
@@ -7346,7 +7377,7 @@ var FirehoseChatComponent = /** @class */ (function () {
7346
7377
  enumerable: true,
7347
7378
  configurable: true
7348
7379
  });
7349
- FirehoseChatComponent.prototype.sendMessage = function () {
7380
+ BantaChatComponent.prototype.sendMessage = function () {
7350
7381
  if (!this.source)
7351
7382
  return;
7352
7383
  var text = (this.newMessage.message || '').trim();
@@ -7361,7 +7392,7 @@ var FirehoseChatComponent = /** @class */ (function () {
7361
7392
  };
7362
7393
  this.source.send(message);
7363
7394
  };
7364
- FirehoseChatComponent.ctorParameters = function () { return [
7395
+ BantaChatComponent.ctorParameters = function () { return [
7365
7396
  { type: BantaService },
7366
7397
  { type: ChatBackendService },
7367
7398
  { type: ElementRef }
@@ -7370,71 +7401,76 @@ var FirehoseChatComponent = /** @class */ (function () {
7370
7401
  Input(),
7371
7402
  __metadata("design:type", Object),
7372
7403
  __metadata("design:paramtypes", [Object])
7373
- ], FirehoseChatComponent.prototype, "source", null);
7404
+ ], BantaChatComponent.prototype, "source", null);
7405
+ __decorate([
7406
+ Input(),
7407
+ __metadata("design:type", String),
7408
+ __metadata("design:paramtypes", [Object])
7409
+ ], BantaChatComponent.prototype, "topicID", null);
7374
7410
  __decorate([
7375
7411
  Input(),
7376
7412
  __metadata("design:type", Object)
7377
- ], FirehoseChatComponent.prototype, "signInLabel", void 0);
7413
+ ], BantaChatComponent.prototype, "signInLabel", void 0);
7378
7414
  __decorate([
7379
7415
  Input(),
7380
7416
  __metadata("design:type", Object)
7381
- ], FirehoseChatComponent.prototype, "sendLabel", void 0);
7417
+ ], BantaChatComponent.prototype, "sendLabel", void 0);
7382
7418
  __decorate([
7383
7419
  Input(),
7384
7420
  __metadata("design:type", Object)
7385
- ], FirehoseChatComponent.prototype, "permissionDeniedLabel", void 0);
7421
+ ], BantaChatComponent.prototype, "permissionDeniedLabel", void 0);
7386
7422
  __decorate([
7387
7423
  Output(),
7388
7424
  __metadata("design:type", Observable),
7389
7425
  __metadata("design:paramtypes", [])
7390
- ], FirehoseChatComponent.prototype, "signInSelected", null);
7426
+ ], BantaChatComponent.prototype, "signInSelected", null);
7391
7427
  __decorate([
7392
7428
  Output(),
7393
7429
  __metadata("design:type", Observable),
7394
7430
  __metadata("design:paramtypes", [])
7395
- ], FirehoseChatComponent.prototype, "permissionDeniedError", null);
7431
+ ], BantaChatComponent.prototype, "permissionDeniedError", null);
7396
7432
  __decorate([
7397
7433
  ViewChild('chatView', { static: true }),
7398
7434
  __metadata("design:type", ChatViewComponent)
7399
- ], FirehoseChatComponent.prototype, "chatView", void 0);
7435
+ ], BantaChatComponent.prototype, "chatView", void 0);
7400
7436
  __decorate([
7401
7437
  Output(),
7402
7438
  __metadata("design:type", Object),
7403
7439
  __metadata("design:paramtypes", [])
7404
- ], FirehoseChatComponent.prototype, "selected", null);
7440
+ ], BantaChatComponent.prototype, "selected", null);
7405
7441
  __decorate([
7406
7442
  Output(),
7407
7443
  __metadata("design:type", Object),
7408
7444
  __metadata("design:paramtypes", [])
7409
- ], FirehoseChatComponent.prototype, "reported", null);
7445
+ ], BantaChatComponent.prototype, "reported", null);
7410
7446
  __decorate([
7411
7447
  Output(),
7412
7448
  __metadata("design:type", Object),
7413
7449
  __metadata("design:paramtypes", [])
7414
- ], FirehoseChatComponent.prototype, "upvoted", null);
7450
+ ], BantaChatComponent.prototype, "upvoted", null);
7415
7451
  __decorate([
7416
7452
  Output(),
7417
7453
  __metadata("design:type", Object),
7418
7454
  __metadata("design:paramtypes", [])
7419
- ], FirehoseChatComponent.prototype, "userSelected", null);
7420
- FirehoseChatComponent = __decorate([
7455
+ ], BantaChatComponent.prototype, "userSelected", null);
7456
+ BantaChatComponent = __decorate([
7421
7457
  Component({
7422
- selector: 'engage-firehose',
7423
- template: "<engage-chat-view \r\n #chatView\r\n [source]=\"source\"\r\n (upvoted)=\"upvote($event)\"\r\n (reported)=\"report($event)\"\r\n (selected)=\"select($event)\"\r\n (userSelected)=\"selectUser($event)\"\r\n ></engage-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 (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>",
7458
+ selector: 'banta-chat',
7459
+ template: "<banta-chat-view \r\n #chatView\r\n [source]=\"source\"\r\n (upvoted)=\"upvote($event)\"\r\n (reported)=\"report($event)\"\r\n (selected)=\"select($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 (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>",
7424
7460
  styles: [":host{display:flex;flex-direction:column;border-radius:5px;padding:10px;flex-grow:1;font-size:10pt}.entry-container{display:flex;flex-direction:row;flex-grow:1;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:#9da302 solid 1px;-webkit-text-fill-color:#9da302;-webkit-box-shadow:0 0 0 1000px #211e07 inset;-webkit-transition:background-color 5000s ease-in-out;transition:background-color 5000s ease-in-out;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:initial}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}"]
7425
7461
  }),
7426
7462
  __metadata("design:paramtypes", [BantaService,
7427
7463
  ChatBackendService,
7428
7464
  ElementRef])
7429
- ], FirehoseChatComponent);
7430
- return FirehoseChatComponent;
7465
+ ], BantaChatComponent);
7466
+ return BantaChatComponent;
7431
7467
  }());
7432
7468
 
7433
7469
  var COMPONENTS$2 = [
7434
7470
  ChatMessageComponent,
7435
7471
  LiveChatMessageComponent,
7436
7472
  ChatViewComponent,
7437
- FirehoseChatComponent
7473
+ BantaChatComponent
7438
7474
  ];
7439
7475
  var ChatModule = /** @class */ (function () {
7440
7476
  function ChatModule() {
@@ -7455,356 +7491,11 @@ var ChatModule = /** @class */ (function () {
7455
7491
  return ChatModule;
7456
7492
  }());
7457
7493
 
7458
- var GENERIC_AVATAR_URL = 'https://gravatar.com/avatar/915c804e0be607a4ad766ddadea5c48a?s=512&d=https://codepen.io/assets/avatars/user-avatar-512x512-6e240cf350d2f1cc07c2bed234c3a3bb5f1b237023c204c782622e80d6b212ba.png';
7459
- var MOCK_USERS = [
7460
- {
7461
- id: 'a',
7462
- avatarUrl: GENERIC_AVATAR_URL,
7463
- displayName: "Tom",
7464
- username: "tom"
7465
- }, {
7466
- id: 'b',
7467
- avatarUrl: GENERIC_AVATAR_URL,
7468
- displayName: "Dick",
7469
- username: "dick"
7470
- }, {
7471
- id: 'c',
7472
- avatarUrl: GENERIC_AVATAR_URL,
7473
- displayName: "Harry",
7474
- username: "harry"
7475
- }, {
7476
- id: 'd',
7477
- avatarUrl: GENERIC_AVATAR_URL,
7478
- displayName: "John",
7479
- username: "john"
7480
- }, {
7481
- id: 'e',
7482
- avatarUrl: GENERIC_AVATAR_URL,
7483
- displayName: "Wayne",
7484
- username: "wayne"
7485
- }, {
7486
- id: 'f',
7487
- avatarUrl: GENERIC_AVATAR_URL,
7488
- displayName: "Heather",
7489
- username: "heather"
7490
- }, {
7491
- id: 'g',
7492
- avatarUrl: GENERIC_AVATAR_URL,
7493
- displayName: "Mary",
7494
- username: "mary"
7495
- }, {
7496
- id: 'h',
7497
- avatarUrl: GENERIC_AVATAR_URL,
7498
- displayName: "Jennifer",
7499
- username: "jennifer"
7500
- }, {
7501
- id: 'i',
7502
- avatarUrl: GENERIC_AVATAR_URL,
7503
- displayName: "Kyle",
7504
- username: "kyle"
7505
- }, {
7506
- id: 'j',
7507
- avatarUrl: GENERIC_AVATAR_URL,
7508
- displayName: "Wanda",
7509
- username: "wanda"
7510
- }, {
7511
- id: 'k',
7512
- avatarUrl: GENERIC_AVATAR_URL,
7513
- displayName: "Josh",
7514
- username: "josh"
7515
- }, {
7516
- id: 'l',
7517
- avatarUrl: GENERIC_AVATAR_URL,
7518
- displayName: "Jane",
7519
- username: "jane"
7520
- }, {
7521
- id: 'm',
7522
- avatarUrl: GENERIC_AVATAR_URL,
7523
- displayName: "Joy",
7524
- username: "joy"
7525
- }, {
7526
- id: 'n',
7527
- avatarUrl: GENERIC_AVATAR_URL,
7528
- displayName: "Jesus",
7529
- username: "jesus"
7530
- }, {
7531
- id: 'o',
7532
- avatarUrl: GENERIC_AVATAR_URL,
7533
- displayName: "I bathe in Bernie's tears of joy",
7534
- username: "landem"
7535
- }, {
7536
- id: 'p',
7537
- avatarUrl: GENERIC_AVATAR_URL,
7538
- displayName: "The thing about socialism is that its the best",
7539
- username: "mangahead"
7540
- }, {
7541
- id: 'q',
7542
- avatarUrl: GENERIC_AVATAR_URL,
7543
- displayName: "If only I knew the first thing about this stuff",
7544
- username: "redstripe"
7545
- }, {
7546
- id: 'r',
7547
- avatarUrl: GENERIC_AVATAR_URL,
7548
- displayName: "Time is not something that should be treated unfairly",
7549
- username: "fantom"
7550
- }, {
7551
- id: 's',
7552
- avatarUrl: GENERIC_AVATAR_URL,
7553
- displayName: "What is the meaning of this capitalism?",
7554
- username: "ganjaking"
7555
- }, {
7556
- id: 't',
7557
- avatarUrl: GENERIC_AVATAR_URL,
7558
- displayName: "The world is not ready for us",
7559
- username: "leggo"
7560
- }, {
7561
- id: 'u',
7562
- avatarUrl: GENERIC_AVATAR_URL,
7563
- displayName: "Make or break, now is our time",
7564
- username: "mako"
7565
- }
7566
- ];
7567
- var MockFirehoseSource = /** @class */ (function () {
7568
- function MockFirehoseSource() {
7569
- var _this = this;
7570
- this.identifier = 'mock';
7571
- this.currentUser = {
7572
- id: 'z',
7573
- username: 'liam',
7574
- displayName: 'Liam',
7575
- avatarUrl: GENERIC_AVATAR_URL
7576
- };
7577
- this._messages = [];
7578
- this._currentUserChanged = new BehaviorSubject(null);
7579
- this._messageReceived = new Subject();
7580
- this._messageSent = new Subject();
7581
- var randomMessages = [
7582
- "Whoa!",
7583
- "Cool!",
7584
- "Nifty!",
7585
- "Sweet!",
7586
- "@liam, awesome!",
7587
- "Crazy!",
7588
- "Wunderbar!",
7589
- "Lasagna!",
7590
- "Tacos!",
7591
- "@liam, Life is a box of chocolates, you never know which one... oh fuck it",
7592
- "Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI!",
7593
- "Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! The orange one makes me dislike oranges. Orange orangutan is obsolete and unoriginal! Monkeys and such. Life is a box of chocolates, you never know which one... oh fuck it. Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI!",
7594
- "The orange one makes me dislike oranges. Orange orangutan is obsolete and unoriginal! Monkeys and such."
7595
- ];
7596
- setInterval(function () {
7597
- var messageText = randomMessages[Math.floor(randomMessages.length * Math.random())];
7598
- var user = MOCK_USERS[Math.floor(MOCK_USERS.length * Math.random())];
7599
- var message = {
7600
- user: user,
7601
- sentAt: Date.now(),
7602
- upvotes: 0,
7603
- message: messageText,
7604
- submessages: []
7605
- };
7606
- _this.addMessage(message);
7607
- _this.messageReceived.next(message);
7608
- }, 1000);
7609
- this._currentUserChanged.next(this.currentUser);
7610
- }
7611
- MockFirehoseSource.prototype.close = function () {
7612
- // TODO
7613
- };
7614
- MockFirehoseSource.prototype.addMessage = function (message) {
7615
- this._messages.push(message);
7616
- };
7617
- MockFirehoseSource.prototype.send = function (message) {
7618
- this.addMessage(message);
7619
- this._messageSent.next(message);
7620
- };
7621
- Object.defineProperty(MockFirehoseSource.prototype, "messages", {
7622
- get: function () {
7623
- return this._messages;
7624
- },
7625
- enumerable: true,
7626
- configurable: true
7627
- });
7628
- Object.defineProperty(MockFirehoseSource.prototype, "currentUserChanged", {
7629
- get: function () {
7630
- return this._currentUserChanged;
7631
- },
7632
- enumerable: true,
7633
- configurable: true
7634
- });
7635
- Object.defineProperty(MockFirehoseSource.prototype, "messageReceived", {
7636
- get: function () {
7637
- return this._messageReceived;
7638
- },
7639
- enumerable: true,
7640
- configurable: true
7641
- });
7642
- Object.defineProperty(MockFirehoseSource.prototype, "messageSent", {
7643
- get: function () {
7644
- return this._messageSent;
7645
- },
7646
- enumerable: true,
7647
- configurable: true
7648
- });
7649
- return MockFirehoseSource;
7650
- }());
7651
- var MockPointSource = /** @class */ (function () {
7652
- function MockPointSource() {
7653
- var _this = this;
7654
- this.identifier = 'mock-point';
7655
- this.currentUser = {
7656
- id: 'z',
7657
- username: 'liam',
7658
- displayName: 'Liam',
7659
- avatarUrl: GENERIC_AVATAR_URL
7660
- };
7661
- this._messages = [];
7662
- this._currentUserChanged = new BehaviorSubject(null);
7663
- this._messageReceived = new Subject();
7664
- this._messageSent = new Subject();
7665
- var randomPoints = [
7666
- "I think that Trump has a specific form of braindead called\n \"Trumpitis\".",
7667
- "Other things that could be said will be said",
7668
- "If only things were as simple as they appear",
7669
- "Life is a box of chocolates, you never know which one... oh fuck it",
7670
- "More things that are done tomorrow may not be done today",
7671
- "Google is a useful tool to find things",
7672
- "Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! The orange one makes me dislike oranges. Orange orangutan is obsolete and unoriginal! Monkeys and such. Life is a box of chocolates, you never know which one... oh fuck it. Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! The orange one makes me dislike oranges. Orange orangutan is obsolete and unoriginal! Monkeys and such. Life is a box of chocolates, you never know which one... oh fuck it. Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! The orange one makes me dislike oranges. Orange orangutan is obsolete and unoriginal! Monkeys and such. Life is a box of chocolates, you never know which one... oh fuck it. Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI! The orange one makes me dislike oranges. Orange orangutan is obsolete and unoriginal! Monkeys and such. Life is a box of chocolates, you never know which one... oh fuck it. Lorem ipsum dolor sit amet! Lorem ipsum dolor sit amet! LOREM IPSUM DOLOR SIT AMET GDI!"
7673
- ];
7674
- setInterval(function () {
7675
- var messageText = randomPoints[Math.floor(randomPoints.length * Math.random())];
7676
- var user = MOCK_USERS[Math.floor(MOCK_USERS.length * Math.random())];
7677
- var message = {
7678
- user: user,
7679
- sentAt: Date.now(),
7680
- upvotes: 0,
7681
- message: messageText,
7682
- submessages: [
7683
- {
7684
- user: _this.currentUser,
7685
- message: "Good point!",
7686
- sentAt: Date.now(),
7687
- upvotes: 0
7688
- },
7689
- {
7690
- user: {
7691
- id: 'aa',
7692
- avatarUrl: GENERIC_AVATAR_URL,
7693
- displayName: 'FunnilyGuy',
7694
- username: 'funnyguy'
7695
- },
7696
- sentAt: Date.now(),
7697
- message: "What would this mean for Buttigieg?",
7698
- upvotes: 0
7699
- },
7700
- {
7701
- user: user,
7702
- sentAt: Date.now(),
7703
- message: "Klobucharino",
7704
- upvotes: 0
7705
- },
7706
- {
7707
- user: _this.currentUser,
7708
- sentAt: Date.now(),
7709
- message: "Good question!",
7710
- upvotes: 0
7711
- },
7712
- {
7713
- user: user,
7714
- sentAt: Date.now(),
7715
- message: "But whyigieg",
7716
- upvotes: 0
7717
- }
7718
- ]
7719
- };
7720
- _this.addMessage(message);
7721
- _this.messageReceived.next(message);
7722
- }, 5000);
7723
- this._currentUserChanged.next(this.currentUser);
7724
- }
7725
- MockPointSource.prototype.addMessage = function (message) {
7726
- this._messages.push(message);
7727
- };
7728
- Object.defineProperty(MockPointSource.prototype, "messages", {
7729
- get: function () {
7730
- return this._messages;
7731
- },
7732
- enumerable: true,
7733
- configurable: true
7734
- });
7735
- Object.defineProperty(MockPointSource.prototype, "currentUserChanged", {
7736
- get: function () {
7737
- return this._currentUserChanged;
7738
- },
7739
- enumerable: true,
7740
- configurable: true
7741
- });
7742
- Object.defineProperty(MockPointSource.prototype, "messageReceived", {
7743
- get: function () {
7744
- return this._messageReceived;
7745
- },
7746
- enumerable: true,
7747
- configurable: true
7748
- });
7749
- Object.defineProperty(MockPointSource.prototype, "messageSent", {
7750
- get: function () {
7751
- return this._messageSent;
7752
- },
7753
- enumerable: true,
7754
- configurable: true
7755
- });
7756
- MockPointSource.prototype.send = function (message) {
7757
- this.addMessage(message);
7758
- this._messageSent.next(message);
7759
- };
7760
- return MockPointSource;
7761
- }());
7762
- var MockSubpointSource = /** @class */ (function () {
7763
- function MockSubpointSource(parentSource, message) {
7764
- this.parentSource = parentSource;
7765
- this.message = message;
7766
- this.identifier = 'mock-subpoint';
7767
- this._messages = [];
7768
- this._messageReceived = new Subject();
7769
- this._messageSent = new Subject();
7770
- this._currentUserChanged = parentSource.currentUserChanged;
7771
- this._messages = message.submessages;
7772
- }
7773
- Object.defineProperty(MockSubpointSource.prototype, "messages", {
7774
- get: function () {
7775
- return this._messages;
7776
- },
7777
- enumerable: true,
7778
- configurable: true
7779
- });
7780
- Object.defineProperty(MockSubpointSource.prototype, "messageReceived", {
7781
- get: function () {
7782
- return this._messageReceived;
7783
- },
7784
- enumerable: true,
7785
- configurable: true
7786
- });
7787
- Object.defineProperty(MockSubpointSource.prototype, "messageSent", {
7788
- get: function () {
7789
- return this._messageSent;
7790
- },
7791
- enumerable: true,
7792
- configurable: true
7793
- });
7794
- Object.defineProperty(MockSubpointSource.prototype, "currentUserChanged", {
7795
- get: function () {
7796
- return this._currentUserChanged;
7797
- },
7798
- enumerable: true,
7799
- configurable: true
7800
- });
7801
- MockSubpointSource.prototype.send = function (message) {
7802
- //throw new Error("Method not implemented.");
7803
- };
7804
- return MockSubpointSource;
7805
- }());
7806
- var EngageComponent = /** @class */ (function () {
7807
- function EngageComponent(banta, backend, matDialog) {
7494
+ /**
7495
+ * Unified chat and comments component
7496
+ */
7497
+ var BantaComponent = /** @class */ (function () {
7498
+ function BantaComponent(banta, backend, matDialog) {
7808
7499
  this.banta = banta;
7809
7500
  this.backend = backend;
7810
7501
  this.matDialog = matDialog;
@@ -7822,16 +7513,16 @@ var EngageComponent = /** @class */ (function () {
7822
7513
  // this.firehoseSource = new MockFirehoseSource();
7823
7514
  // this.pointSource = new MockPointSource();
7824
7515
  }
7825
- EngageComponent.prototype.ngOnInit = function () {
7516
+ BantaComponent.prototype.ngOnInit = function () {
7826
7517
  var _this = this;
7827
7518
  this._subs.add(this.banta.userChanged.subscribe(function (user) { return _this.currentUser = user; }), this.backend.notificationsChanged.subscribe(function (notifs) { return _this.notifications = notifs; }), this.backend.newNotification.subscribe(function (notif) {
7828
7519
  _this.newNotifications = true;
7829
7520
  }));
7830
7521
  };
7831
- EngageComponent.prototype.newPointSubMessageKeyDown = function (event) {
7522
+ BantaComponent.prototype.newPointSubMessageKeyDown = function (event) {
7832
7523
  // TODO
7833
7524
  };
7834
- EngageComponent.prototype.sendPointSubMessage = function () {
7525
+ BantaComponent.prototype.sendPointSubMessage = function () {
7835
7526
  return __awaiter(this, void 0, void 0, function () {
7836
7527
  var text, message, e_1;
7837
7528
  return __generator(this, function (_a) {
@@ -7864,7 +7555,7 @@ var EngageComponent = /** @class */ (function () {
7864
7555
  });
7865
7556
  });
7866
7557
  };
7867
- EngageComponent.prototype.goToMessage = function (message) {
7558
+ BantaComponent.prototype.goToMessage = function (message) {
7868
7559
  return __awaiter(this, void 0, void 0, function () {
7869
7560
  var targetMessage, parentMessage, viewType, _a, _b;
7870
7561
  return __generator(this, function (_c) {
@@ -7914,7 +7605,7 @@ var EngageComponent = /** @class */ (function () {
7914
7605
  });
7915
7606
  });
7916
7607
  };
7917
- EngageComponent.prototype.pointUnfocus = function () {
7608
+ BantaComponent.prototype.pointUnfocus = function () {
7918
7609
  this.pointOpen = null;
7919
7610
  if (this.pointSubChat) {
7920
7611
  if (this.pointSubChat.close)
@@ -7922,19 +7613,19 @@ var EngageComponent = /** @class */ (function () {
7922
7613
  this.pointSubChat = null;
7923
7614
  }
7924
7615
  };
7925
- EngageComponent.prototype.ngOnDestroy = function () {
7616
+ BantaComponent.prototype.ngOnDestroy = function () {
7926
7617
  this._subs.unsubscribe();
7927
7618
  };
7928
- EngageComponent.prototype.showAux = function (title, mode) {
7619
+ BantaComponent.prototype.showAux = function (title, mode) {
7929
7620
  this.auxOpen = true;
7930
7621
  this.auxTitle = title;
7931
7622
  this.auxMode = mode;
7932
7623
  this.mobileFocus = 'aux';
7933
7624
  };
7934
- EngageComponent.prototype.showNotifications = function () {
7625
+ BantaComponent.prototype.showNotifications = function () {
7935
7626
  this.showAux('Notifications', 'notifications');
7936
7627
  };
7937
- Object.defineProperty(EngageComponent.prototype, "topicID", {
7628
+ Object.defineProperty(BantaComponent.prototype, "topicID", {
7938
7629
  get: function () {
7939
7630
  return this._topicID;
7940
7631
  },
@@ -7946,7 +7637,7 @@ var EngageComponent = /** @class */ (function () {
7946
7637
  enumerable: true,
7947
7638
  configurable: true
7948
7639
  });
7949
- EngageComponent.prototype.connectToTopic = function (id) {
7640
+ BantaComponent.prototype.connectToTopic = function (id) {
7950
7641
  return __awaiter(this, void 0, void 0, function () {
7951
7642
  var _a, _b;
7952
7643
  return __generator(this, function (_c) {
@@ -7965,17 +7656,17 @@ var EngageComponent = /** @class */ (function () {
7965
7656
  });
7966
7657
  });
7967
7658
  };
7968
- Object.defineProperty(EngageComponent.prototype, "signInSelected", {
7659
+ Object.defineProperty(BantaComponent.prototype, "signInSelected", {
7969
7660
  get: function () {
7970
7661
  return this._signInSelected;
7971
7662
  },
7972
7663
  enumerable: true,
7973
7664
  configurable: true
7974
7665
  });
7975
- EngageComponent.prototype.showSignIn = function () {
7666
+ BantaComponent.prototype.showSignIn = function () {
7976
7667
  this._signInSelected.next();
7977
7668
  };
7978
- EngageComponent.prototype.close = function () {
7669
+ BantaComponent.prototype.close = function () {
7979
7670
  if (this.firehoseSource) {
7980
7671
  if (this.firehoseSource.close)
7981
7672
  this.firehoseSource.close();
@@ -7987,25 +7678,25 @@ var EngageComponent = /** @class */ (function () {
7987
7678
  this.pointSource = null;
7988
7679
  }
7989
7680
  };
7990
- Object.defineProperty(EngageComponent.prototype, "hasPoint", {
7681
+ Object.defineProperty(BantaComponent.prototype, "hasPoint", {
7991
7682
  get: function () {
7992
7683
  return this.pointOpen != null;
7993
7684
  },
7994
7685
  enumerable: true,
7995
7686
  configurable: true
7996
7687
  });
7997
- EngageComponent.prototype.closeAux = function () {
7688
+ BantaComponent.prototype.closeAux = function () {
7998
7689
  this.auxOpen = false;
7999
7690
  this.mobileFocus = 'firehose';
8000
7691
  };
8001
- EngageComponent.prototype.getViewType = function (message) {
7692
+ BantaComponent.prototype.getViewType = function (message) {
8002
7693
  if (message.topicId.endsWith('_firehose'))
8003
7694
  return 'chat';
8004
7695
  else if (message.topicId.endsWith('_thepoint'))
8005
7696
  return 'comment';
8006
7697
  return 'comment';
8007
7698
  };
8008
- EngageComponent.prototype.upvoteMessage = function (message) {
7699
+ BantaComponent.prototype.upvoteMessage = function (message) {
8009
7700
  return __awaiter(this, void 0, void 0, function () {
8010
7701
  return __generator(this, function (_a) {
8011
7702
  switch (_a.label) {
@@ -8024,66 +7715,66 @@ var EngageComponent = /** @class */ (function () {
8024
7715
  });
8025
7716
  });
8026
7717
  };
8027
- EngageComponent.prototype.showProfile = function (user) {
7718
+ BantaComponent.prototype.showProfile = function (user) {
8028
7719
  this.profileUser = user;
8029
7720
  this.showAux("@" + user.username + "'s Profile", 'profile');
8030
7721
  };
8031
- EngageComponent.prototype.sendReport = function (message) {
7722
+ BantaComponent.prototype.sendReport = function (message) {
8032
7723
  this.auxOpen = false;
8033
7724
  alert('would send report');
8034
7725
  };
8035
- EngageComponent.prototype.reportMessage = function (message) {
7726
+ BantaComponent.prototype.reportMessage = function (message) {
8036
7727
  this.reportedMessage = message;
8037
7728
  this.showAux("Report message from @" + message.user.username, 'report');
8038
7729
  };
8039
- EngageComponent.ctorParameters = function () { return [
7730
+ BantaComponent.ctorParameters = function () { return [
8040
7731
  { type: BantaService },
8041
7732
  { type: ChatBackendService },
8042
7733
  { type: MatDialog }
8043
7734
  ]; };
8044
7735
  __decorate([
8045
7736
  ViewChild('firehose', { static: true }),
8046
- __metadata("design:type", FirehoseChatComponent)
8047
- ], EngageComponent.prototype, "firehose", void 0);
7737
+ __metadata("design:type", BantaChatComponent)
7738
+ ], BantaComponent.prototype, "firehose", void 0);
8048
7739
  __decorate([
8049
7740
  Input(),
8050
7741
  __metadata("design:type", String),
8051
7742
  __metadata("design:paramtypes", [Object])
8052
- ], EngageComponent.prototype, "topicID", null);
7743
+ ], BantaComponent.prototype, "topicID", null);
8053
7744
  __decorate([
8054
7745
  Output(),
8055
7746
  __metadata("design:type", Observable),
8056
7747
  __metadata("design:paramtypes", [])
8057
- ], EngageComponent.prototype, "signInSelected", null);
7748
+ ], BantaComponent.prototype, "signInSelected", null);
8058
7749
  __decorate([
8059
7750
  HostBinding('class.point-focus'),
8060
7751
  __metadata("design:type", Object),
8061
7752
  __metadata("design:paramtypes", [])
8062
- ], EngageComponent.prototype, "hasPoint", null);
8063
- EngageComponent = __decorate([
7753
+ ], BantaComponent.prototype, "hasPoint", null);
7754
+ BantaComponent = __decorate([
8064
7755
  Component({
8065
- selector: "engage-chat",
8066
- template: "\r\n<mat-menu #userMenu=\"matMenu\">\r\n <ng-container *ngIf=\"currentUser\">\r\n <button [disabled]=\"true\" mat-menu-item>{{currentUser.displayName}} (@{{currentUser.username}})</button>\r\n <button mat-menu-item (click)=\"signOut()\">Sign Out</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!currentUser\">\r\n <button mat-menu-item>Sign In</button>\r\n </ng-container>\r\n <button mat-menu-item>Help</button>\r\n</mat-menu>\r\n\r\n<div class=\"tabs\">\r\n <div>\r\n <a mat-button (click)=\"mobileFocus = 'firehose'\">Firehose</a>\r\n <a mat-button (click)=\"mobileFocus = 'points'\">The Point</a>\r\n </div>\r\n <div class=\"spacer\"></div>\r\n <div>\r\n <ng-container *ngIf=\"currentUser\">\r\n <button mat-button [matMenuTriggerFor]=\"userMenu\">\r\n @{{currentUser.username}}\r\n </button>\r\n <button mat-icon-button (click)=\"showNotifications()\">\r\n <mat-icon>notification_important</mat-icon>\r\n </button>\r\n </ng-container>\r\n \r\n <button mat-button *ngIf=\"!currentUser\" (click)=\"showSignIn()\">\r\n Sign In\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<div class=\"firehose\" [class.focus]=\"mobileFocus === 'firehose'\">\r\n <header>\r\n <div>\r\n <label (click)=\"mobileFocus = 'firehose'\">Firehose</label>\r\n <div class=\"spacer\"></div>\r\n\r\n <ng-container *ngIf=\"currentUser\">\r\n <button mat-button [matMenuTriggerFor]=\"userMenu\">\r\n @{{currentUser.username}}\r\n </button>\r\n <button mat-icon-button (click)=\"showNotifications()\">\r\n <mat-icon>notification_important</mat-icon>\r\n </button>\r\n </ng-container>\r\n \r\n <button mat-button *ngIf=\"!currentUser\" (click)=\"showSignIn()\">\r\n Sign In\r\n </button>\r\n </div>\r\n </header>\r\n <engage-firehose \r\n #firehose\r\n [source]=\"firehoseSource\"\r\n (signInSelected)=\"showSignIn()\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (userSelected)=\"showProfile($event.user)\"\r\n (reported)=\"reportMessage($event)\"\r\n ></engage-firehose>\r\n</div>\r\n\r\n<div class=\"aux\" [class.focus]=\"mobileFocus === 'aux'\" [class.open]=\"auxOpen\">\r\n <header>\r\n <div>\r\n <label>{{auxTitle}}</label>\r\n <div class=\"spacer\"></div>\r\n <button mat-icon-button (click)=\"auxOpen = false\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </header>\r\n <div class=\"aux-contents\">\r\n <ng-container *ngIf=\"auxMode === 'profile'\">\r\n <ng-container *ngIf=\"profileUser\">\r\n\r\n <div>\r\n <strong style=\"font-size: 125%;\">\r\n {{profileUser.displayName}}\r\n </strong>\r\n @{{profileUser.username}}\r\n </div>\r\n\r\n <br/>\r\n <strong>Top Messages</strong>\r\n\r\n <div>\r\n <em>Not yet available</em>\r\n </div>\r\n\r\n <br/>\r\n <strong>Recent Messages</strong>\r\n\r\n <div>\r\n <em>Not yet available</em>\r\n </div>\r\n\r\n <pre>{{profileUser | json}}</pre>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"auxMode === 'report'\">\r\n <p>Are you sure you want to report this message?</p>\r\n\r\n <engage-live-message [message]=\"reportedMessage\"></engage-live-message>\r\n\r\n <div style=\"text-align: center;\">\r\n <button mat-raised-button color=\"primary\" (click)=\"sendReport(reportedMessage)\">Yes, Report</button>\r\n &nbsp;\r\n <button mat-raised-button color=\"secondary\" (click)=\"auxOpen = false\">No, Cancel</button>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"auxMode === 'notifications'\">\r\n\r\n <div *ngIf=\"!notifications || notifications.length === 0\">\r\n <em>You do not have any notifications yet</em>\r\n </div>\r\n \r\n <div class=\"notifications\">\r\n <div class=\"notification\" *ngFor=\"let notif of notifications\">\r\n <div>\r\n <ng-container *ngIf=\"notif.type === 'upvote'\">\r\n @{{notif.message?.user?.username}} upvoted your post\r\n \r\n <engage-live-message\r\n [message]=\"notif.message\"\r\n (upvoted)=\"upvoteMessage(notif.message)\"\r\n (reported)=\"reportMessage(notif.message)\"\r\n (selected)=\"goToMessage(notif.message)\">\r\n </engage-live-message>\r\n\r\n </ng-container>\r\n <ng-container *ngIf=\"notif.type === 'notice'\">\r\n <div>\r\n {{notif.message}}\r\n </div>\r\n <a mat-button target=\"_blank\" href=\"{{notif.actionUrl}}\">\r\n {{notif.actionLabel}}\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"notif.type === 'mention'\">\r\n You were mentioned by @{{notif.message?.user?.username}}\r\n\r\n <engage-live-message\r\n [message]=\"notif.message\"\r\n (upvoted)=\"upvoteMessage(notif.message)\"\r\n (reported)=\"reportMessage(notif.message)\"\r\n (selected)=\"goToMessage(notif.message)\">\r\n </engage-live-message>\r\n\r\n </ng-container>\r\n <ng-container *ngIf=\"notif.type === 'reply'\">\r\n @{{notif.replyMessage?.user?.username}} replied to your post\r\n \r\n <engage-live-message\r\n [message]=\"notif.replyMessage\"\r\n (upvoted)=\"upvoteMessage(notif.replyMessage)\"\r\n (reported)=\"reportMessage(notif.replyMessage)\"\r\n (selected)=\"goToMessage(notif.replyMessage)\">\r\n </engage-live-message>\r\n </ng-container>\r\n </div>\r\n\r\n <engage-timestamp [value]=\"notif.sentAt\"></engage-timestamp>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n<div class=\"points\" [class.focus]=\"mobileFocus === 'points'\">\r\n <header>\r\n <div>\r\n <label>The Point</label>\r\n </div>\r\n </header>\r\n <div class=\"point-focus\">\r\n <div class=\"actions\">\r\n <button mat-button (click)=\"pointUnfocus()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n Back\r\n </button>\r\n\r\n <div class=\"spacer\"></div>\r\n \r\n <ng-container *ngIf=\"pointOpen\">\r\n <div class=\"counted-action\">\r\n <div class=\"count-indicator\"> \r\n {{pointOpen.upvotes}}\r\n </div>\r\n <button mat-icon-button>\r\n <mat-icon>thumb_up</mat-icon>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"!pointSubChat\">\r\n Error: No subchat\r\n </div>\r\n \r\n <engage-comment-view\r\n class=\"subcomments\"\r\n *ngIf=\"pointSubChat\"\r\n [newestLast]=\"true\"\r\n [allowReplies]=\"false\"\r\n [source]=\"pointSubChat\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (reported)=\"reportMessage($event)\"\r\n (userSelected)=\"showProfile($event.user)\"\r\n >\r\n \r\n <engage-comment\r\n class=\"focused-comment\"\r\n data-before\r\n *ngIf=\"pointOpen\"\r\n (upvoted)=\"upvoteMessage(pointOpen)\"\r\n (userSelected)=\"showProfile(pointOpen.user)\"\r\n (reported)=\"reportMessage(pointOpen)\"\r\n [showReplyAction]=\"false\"\r\n [message]=\"pointOpen\"\r\n ></engage-comment>\r\n \r\n <div class=\"message reply\">\r\n Reply:\r\n <form class=\"new-message\" (submit)=\"sendPointSubMessage()\">\r\n <textarea \r\n name=\"message\" \r\n (keydown)=\"newPointSubMessageKeyDown($event)\"\r\n [(ngModel)]=\"newPointSubMessage.message\"></textarea>\r\n \r\n <div class=\"actions\">\r\n <button [disabled]=\"!newPointSubMessage.message\" \r\n mat-raised-button color=\"primary\">Send</button>\r\n </div>\r\n </form>\r\n </div>\r\n </engage-comment-view>\r\n </div>\r\n <div class=\"points-section\">\r\n <engage-comments\r\n [source]=\"pointSource\"\r\n (signInSelected)=\"showSignIn()\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (reported)=\"reportMessage($event)\"\r\n (selected)=\"goToMessage($event)\"\r\n (userSelected)=\"showProfile($event.user)\"\r\n ></engage-comments>\r\n </div>\r\n</div>",
8067
- styles: [":host{display:flex;flex-direction:row;padding:.5em;height:40em;position:relative}.counted-action{display:flex;align-items:center}.count-indicator{font-size:9pt;padding:0 3px;border-radius:3px;border:1px solid #333}header{position:relative;margin-bottom:1em}header div{display:flex;align-items:center;height:30px}header button{color:#666}header label{text-transform:uppercase;z-index:1;font-size:12pt;letter-spacing:2px;font-weight:100;color:#333;margin:0 auto 0 0;display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis}header:after{content:\"\";border:1px solid #ccc;height:0;width:100%;display:block;position:relative;z-index:0}.points{max-width:50em;display:flex;flex-direction:column}:host.point-focus .points{width:66%;max-width:50em}:host.point-focus .points .points-section{opacity:0;pointer-events:none}:host.point-focus .points .point-focus{opacity:1;pointer-events:initial}:host.point-focus .points .point-focus .actions{display:flex}engage-comments{flex-grow:1}.points{width:33%;margin-left:.5em;font-size:12pt;flex-shrink:0;max-width:30em;transition:width .2s ease-in,max-width .2s ease-in;position:relative}.points .points-section{flex-grow:1;display:flex;flex-direction:column;opacity:1;transition:opacity .2s ease-in;z-index:2}.points .point-focus{position:absolute;width:100%;bottom:0;top:1.75em;right:0;left:0;padding:.5em;opacity:0;transition:opacity .2s ease-in;flex-grow:1;display:flex;flex-direction:column}.firehose{flex-grow:1;font-size:10pt;display:flex;flex-direction:column}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:#000;color:#fff;border:1px solid #333;width:100%;height:1em}form .actions{margin-left:1em}form button{display:block;margin:0 0 0 auto}.subcomments ::ng-deep engage-comment{font-size:10pt}.subcomments ::ng-deep engage-comment.focused-comment{background:#001321;color:#fff;font-size:12pt}.aux{width:0;min-width:0;overflow-x:hidden;transition:width .4s ease-out,min-width .4s ease-out;display:flex;flex-direction:column}.aux.open{width:30em;min-width:18em}.aux .aux-contents{width:30em;min-width:10em;max-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1}.notifications .notification{border-bottom:1px solid #333;padding:1em}.notifications .notification engage-timestamp{display:block;text-align:right;font-size:9pt;color:#999}.message.reply{padding:1em}.tabs{display:none}@media (max-width:1015px){:host{flex-direction:column}.tabs{display:flex;position:absolute;top:0;left:0;right:0;width:100%;z-index:10;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:rgba(0,0,0,.5)}.points{width:100%;max-width:100%;margin-left:0}header{display:none}:host.point-focus .points{width:100%;max-width:100%}.aux{width:100%;min-width:initial;max-width:100%}.aux,.firehose,.points{position:absolute;top:2em;left:0;right:0;bottom:0;z-index:0;background:#000}.aux.focus,.firehose.focus,.points.focus{z-index:2}}:host-context(.mat-dark-theme) :host{background:#090909;color:#fff}:host-context(.mat-dark-theme) form textarea{background:#ccc;color:#333}:host-context(.mat-dark-theme) header:after{border-color:#222}:host-context(.mat-dark-theme) header label{color:#aaa}"]
7756
+ selector: "banta",
7757
+ template: "\r\n<mat-menu #userMenu=\"matMenu\">\r\n <ng-container *ngIf=\"currentUser\">\r\n <button [disabled]=\"true\" mat-menu-item>{{currentUser.displayName}} (@{{currentUser.username}})</button>\r\n <button mat-menu-item (click)=\"signOut()\">Sign Out</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!currentUser\">\r\n <button mat-menu-item>Sign In</button>\r\n </ng-container>\r\n <button mat-menu-item>Help</button>\r\n</mat-menu>\r\n\r\n<div class=\"tabs\">\r\n <div>\r\n <a mat-button (click)=\"mobileFocus = 'firehose'\">Firehose</a>\r\n <a mat-button (click)=\"mobileFocus = 'points'\">The Point</a>\r\n </div>\r\n <div class=\"spacer\"></div>\r\n <div>\r\n <ng-container *ngIf=\"currentUser\">\r\n <button mat-button [matMenuTriggerFor]=\"userMenu\">\r\n @{{currentUser.username}}\r\n </button>\r\n <button mat-icon-button (click)=\"showNotifications()\">\r\n <mat-icon>notification_important</mat-icon>\r\n </button>\r\n </ng-container>\r\n \r\n <button mat-button *ngIf=\"!currentUser\" (click)=\"showSignIn()\">\r\n Sign In\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<div class=\"firehose\" [class.focus]=\"mobileFocus === 'firehose'\">\r\n <header>\r\n <div>\r\n <label (click)=\"mobileFocus = 'firehose'\">Firehose</label>\r\n <div class=\"spacer\"></div>\r\n\r\n <ng-container *ngIf=\"currentUser\">\r\n <button mat-button [matMenuTriggerFor]=\"userMenu\">\r\n @{{currentUser.username}}\r\n </button>\r\n <button mat-icon-button (click)=\"showNotifications()\">\r\n <mat-icon>notification_important</mat-icon>\r\n </button>\r\n </ng-container>\r\n \r\n <button mat-button *ngIf=\"!currentUser\" (click)=\"showSignIn()\">\r\n Sign In\r\n </button>\r\n </div>\r\n </header>\r\n <banta-chat \r\n #firehose\r\n [source]=\"firehoseSource\"\r\n (signInSelected)=\"showSignIn()\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (userSelected)=\"showProfile($event.user)\"\r\n (reported)=\"reportMessage($event)\"\r\n ></banta-chat>\r\n</div>\r\n\r\n<div class=\"aux\" [class.focus]=\"mobileFocus === 'aux'\" [class.open]=\"auxOpen\">\r\n <header>\r\n <div>\r\n <label>{{auxTitle}}</label>\r\n <div class=\"spacer\"></div>\r\n <button mat-icon-button (click)=\"auxOpen = false\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </header>\r\n <div class=\"aux-contents\">\r\n <ng-container *ngIf=\"auxMode === 'profile'\">\r\n <ng-container *ngIf=\"profileUser\">\r\n\r\n <div>\r\n <strong style=\"font-size: 125%;\">\r\n {{profileUser.displayName}}\r\n </strong>\r\n @{{profileUser.username}}\r\n </div>\r\n\r\n <br/>\r\n <strong>Top Messages</strong>\r\n\r\n <div>\r\n <em>Not yet available</em>\r\n </div>\r\n\r\n <br/>\r\n <strong>Recent Messages</strong>\r\n\r\n <div>\r\n <em>Not yet available</em>\r\n </div>\r\n\r\n <pre>{{profileUser | json}}</pre>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"auxMode === 'report'\">\r\n <p>Are you sure you want to report this message?</p>\r\n\r\n <banta-live-message [message]=\"reportedMessage\"></banta-live-message>\r\n\r\n <div style=\"text-align: center;\">\r\n <button mat-raised-button color=\"primary\" (click)=\"sendReport(reportedMessage)\">Yes, Report</button>\r\n &nbsp;\r\n <button mat-raised-button color=\"secondary\" (click)=\"auxOpen = false\">No, Cancel</button>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"auxMode === 'notifications'\">\r\n\r\n <div *ngIf=\"!notifications || notifications.length === 0\">\r\n <em>You do not have any notifications yet</em>\r\n </div>\r\n \r\n <div class=\"notifications\">\r\n <div class=\"notification\" *ngFor=\"let notif of notifications\">\r\n <div>\r\n <ng-container *ngIf=\"notif.type === 'upvote'\">\r\n @{{notif.message?.user?.username}} upvoted your post\r\n \r\n <banta-live-message\r\n [message]=\"notif.message\"\r\n (upvoted)=\"upvoteMessage(notif.message)\"\r\n (reported)=\"reportMessage(notif.message)\"\r\n (selected)=\"goToMessage(notif.message)\">\r\n </banta-live-message>\r\n\r\n </ng-container>\r\n <ng-container *ngIf=\"notif.type === 'notice'\">\r\n <div>\r\n {{notif.message}}\r\n </div>\r\n <a mat-button target=\"_blank\" href=\"{{notif.actionUrl}}\">\r\n {{notif.actionLabel}}\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"notif.type === 'mention'\">\r\n You were mentioned by @{{notif.message?.user?.username}}\r\n\r\n <banta-live-message\r\n [message]=\"notif.message\"\r\n (upvoted)=\"upvoteMessage(notif.message)\"\r\n (reported)=\"reportMessage(notif.message)\"\r\n (selected)=\"goToMessage(notif.message)\">\r\n </banta-live-message>\r\n\r\n </ng-container>\r\n <ng-container *ngIf=\"notif.type === 'reply'\">\r\n @{{notif.replyMessage?.user?.username}} replied to your post\r\n \r\n <banta-live-message\r\n [message]=\"notif.replyMessage\"\r\n (upvoted)=\"upvoteMessage(notif.replyMessage)\"\r\n (reported)=\"reportMessage(notif.replyMessage)\"\r\n (selected)=\"goToMessage(notif.replyMessage)\">\r\n </banta-live-message>\r\n </ng-container>\r\n </div>\r\n\r\n <banta-timestamp [value]=\"notif.sentAt\"></banta-timestamp>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n<div class=\"points\" [class.focus]=\"mobileFocus === 'points'\">\r\n <header>\r\n <div>\r\n <label>The Point</label>\r\n </div>\r\n </header>\r\n <div class=\"point-focus\">\r\n <div class=\"actions\">\r\n <button mat-button (click)=\"pointUnfocus()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n Back\r\n </button>\r\n\r\n <div class=\"spacer\"></div>\r\n \r\n <ng-container *ngIf=\"pointOpen\">\r\n <div class=\"counted-action\">\r\n <div class=\"count-indicator\"> \r\n {{pointOpen.upvotes}}\r\n </div>\r\n <button mat-icon-button>\r\n <mat-icon>thumb_up</mat-icon>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"!pointSubChat\">\r\n Error: No subchat\r\n </div>\r\n \r\n <banta-comment-view\r\n class=\"subcomments\"\r\n *ngIf=\"pointSubChat\"\r\n [newestLast]=\"true\"\r\n [allowReplies]=\"false\"\r\n [source]=\"pointSubChat\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (reported)=\"reportMessage($event)\"\r\n (userSelected)=\"showProfile($event.user)\"\r\n >\r\n \r\n <banta-comment\r\n class=\"focused-comment\"\r\n data-before\r\n *ngIf=\"pointOpen\"\r\n (upvoted)=\"upvoteMessage(pointOpen)\"\r\n (userSelected)=\"showProfile(pointOpen.user)\"\r\n (reported)=\"reportMessage(pointOpen)\"\r\n [showReplyAction]=\"false\"\r\n [message]=\"pointOpen\"\r\n ></banta-comment>\r\n \r\n <div class=\"message reply\">\r\n Reply:\r\n <form class=\"new-message\" (submit)=\"sendPointSubMessage()\">\r\n <textarea \r\n name=\"message\" \r\n (keydown)=\"newPointSubMessageKeyDown($event)\"\r\n [(ngModel)]=\"newPointSubMessage.message\"></textarea>\r\n \r\n <div class=\"actions\">\r\n <button [disabled]=\"!newPointSubMessage.message\" \r\n mat-raised-button color=\"primary\">Send</button>\r\n </div>\r\n </form>\r\n </div>\r\n </banta-comment-view>\r\n </div>\r\n <div class=\"points-section\">\r\n <banta-comments\r\n [source]=\"pointSource\"\r\n (signInSelected)=\"showSignIn()\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (reported)=\"reportMessage($event)\"\r\n (selected)=\"goToMessage($event)\"\r\n (userSelected)=\"showProfile($event.user)\"\r\n ></banta-comments>\r\n </div>\r\n</div>",
7758
+ styles: [":host{display:flex;flex-direction:row;padding:.5em;height:40em;position:relative}.counted-action{display:flex;align-items:center}.count-indicator{font-size:9pt;padding:0 3px;border-radius:3px;border:1px solid #333}header{position:relative;margin-bottom:1em}header div{display:flex;align-items:center;height:30px}header button{color:#666}header label{text-transform:uppercase;z-index:1;font-size:12pt;letter-spacing:2px;font-weight:100;color:#333;margin:0 auto 0 0;display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis}header:after{content:\"\";border:1px solid #ccc;height:0;width:100%;display:block;position:relative;z-index:0}.points{max-width:50em;display:flex;flex-direction:column}:host.point-focus .points{width:66%;max-width:50em}:host.point-focus .points .points-section{opacity:0;pointer-events:none}:host.point-focus .points .point-focus{opacity:1;pointer-events:initial}:host.point-focus .points .point-focus .actions{display:flex}banta-comments{flex-grow:1}.points{width:33%;margin-left:.5em;font-size:12pt;flex-shrink:0;max-width:30em;transition:width .2s ease-in,max-width .2s ease-in;position:relative}.points .points-section{flex-grow:1;display:flex;flex-direction:column;opacity:1;transition:opacity .2s ease-in;z-index:2}.points .point-focus{position:absolute;width:100%;bottom:0;top:1.75em;right:0;left:0;padding:.5em;opacity:0;transition:opacity .2s ease-in;flex-grow:1;display:flex;flex-direction:column}.firehose{flex-grow:1;font-size:10pt;display:flex;flex-direction:column}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:#000;color:#fff;border:1px solid #333;width:100%;height:1em}form .actions{margin-left:1em}form button{display:block;margin:0 0 0 auto}.subcomments ::ng-deep banta-comment{font-size:10pt}.subcomments ::ng-deep banta-comment.focused-comment{background:#001321;color:#fff;font-size:12pt}.aux{width:0;min-width:0;overflow-x:hidden;transition:width .4s ease-out,min-width .4s ease-out;display:flex;flex-direction:column}.aux.open{width:30em;min-width:18em}.aux .aux-contents{width:30em;min-width:10em;max-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1}.notifications .notification{border-bottom:1px solid #333;padding:1em}.notifications .notification banta-timestamp{display:block;text-align:right;font-size:9pt;color:#999}.message.reply{padding:1em}.tabs{display:none}@media (max-width:1015px){:host{flex-direction:column}.tabs{display:flex;position:absolute;top:0;left:0;right:0;width:100%;z-index:10;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:rgba(0,0,0,.5)}.points{width:100%;max-width:100%;margin-left:0}header{display:none}:host.point-focus .points{width:100%;max-width:100%}.aux{width:100%;min-width:initial;max-width:100%}.aux,.firehose,.points{position:absolute;top:2em;left:0;right:0;bottom:0;z-index:0;background:#000}.aux.focus,.firehose.focus,.points.focus{z-index:2}}:host-context(.mat-dark-theme) :host{background:#090909;color:#fff}:host-context(.mat-dark-theme) form textarea{background:#ccc;color:#333}:host-context(.mat-dark-theme) header:after{border-color:#222}:host-context(.mat-dark-theme) header label{color:#aaa}"]
8068
7759
  }),
8069
7760
  __metadata("design:paramtypes", [BantaService,
8070
7761
  ChatBackendService,
8071
7762
  MatDialog])
8072
- ], EngageComponent);
8073
- return EngageComponent;
7763
+ ], BantaComponent);
7764
+ return BantaComponent;
8074
7765
  }());
8075
7766
 
8076
- var EngageLogoComponent = /** @class */ (function () {
8077
- function EngageLogoComponent() {
7767
+ var BantaLogoComponent = /** @class */ (function () {
7768
+ function BantaLogoComponent() {
8078
7769
  }
8079
- EngageLogoComponent = __decorate([
7770
+ BantaLogoComponent = __decorate([
8080
7771
  Component({
8081
- selector: 'engage-logo',
7772
+ selector: 'banta-logo',
8082
7773
  template: "banta",
8083
7774
  styles: ["\n :host {\n font-family: 'Odibee Sans', sans-serif;\n font-size: 40pt;\n }\n\n :host.small {\n font-size: 30pt;\n }\n "]
8084
7775
  })
8085
- ], EngageLogoComponent);
8086
- return EngageLogoComponent;
7776
+ ], BantaLogoComponent);
7777
+ return BantaLogoComponent;
8087
7778
  }());
8088
7779
 
8089
7780
  var LiveMessageComponent = /** @class */ (function () {
@@ -8162,8 +7853,8 @@ var LiveMessageComponent = /** @class */ (function () {
8162
7853
  ], LiveMessageComponent.prototype, "message", null);
8163
7854
  LiveMessageComponent = __decorate([
8164
7855
  Component({
8165
- selector: 'engage-live-message',
8166
- template: "\n <ng-container *ngIf=\"message\">\n <engage-live-chat-message\n *ngIf=\"viewType === 'chat'\"\n [message]=\"message\"\n (upvoted)=\"upvote(message)\"\n (reported)=\"report(message)\"\n (selected)=\"select(message)\">\n </engage-live-chat-message>\n\n <engage-live-comment \n *ngIf=\"viewType === 'comment'\"\n [message]=\"message\"\n (upvoted)=\"upvote(message)\"\n (reported)=\"report(message)\"\n (selected)=\"select(message)\">\n </engage-live-comment>\n </ng-container>\n ",
7856
+ selector: 'banta-live-message',
7857
+ template: "\n <ng-container *ngIf=\"message\">\n <banta-live-chat-message\n *ngIf=\"viewType === 'chat'\"\n [message]=\"message\"\n (upvoted)=\"upvote(message)\"\n (reported)=\"report(message)\"\n (selected)=\"select(message)\">\n </banta-live-chat-message>\n\n <banta-live-comment \n *ngIf=\"viewType === 'comment'\"\n [message]=\"message\"\n (upvoted)=\"upvote(message)\"\n (reported)=\"report(message)\"\n (selected)=\"select(message)\">\n </banta-live-comment>\n </ng-container>\n ",
8167
7858
  styles: [""]
8168
7859
  }),
8169
7860
  __metadata("design:paramtypes", [])
@@ -8256,9 +7947,9 @@ var CommentComponent = /** @class */ (function () {
8256
7947
  ], CommentComponent.prototype, "selected", null);
8257
7948
  CommentComponent = __decorate([
8258
7949
  Component({
8259
- selector: 'engage-comment',
8260
- template: "\r\n<mat-menu #pointItemMenu=\"matMenu\">\r\n <button mat-menu-item (click)=\"report()\">Report</button>\r\n <button mat-menu-item>Help</button>\r\n</mat-menu>\r\n\r\n<div class=\"message-content\">\r\n <div class=\"user\">\r\n <div class=\"avatar\" \r\n (click)=\"selectUser()\"\r\n [style.background-image]=\"avatarForUser(message.user)\"></div>\r\n <label class=\"display-name\" (click)=\"selectUser()\">{{message.user.displayName}}</label>\r\n <label class=\"username\" (click)=\"selectUser()\">@{{message.user.username}}</label>\r\n\r\n <button mat-icon-button [matMenuTriggerFor]=\"pointItemMenu\">\r\n <mat-icon [inline]=\"true\">more_vert</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"content\" (click)=\"select()\">\r\n {{message.message}}\r\n </div>\r\n \r\n <div class=\"actions\">\r\n <engage-timestamp [value]=\"message.sentAt\"></engage-timestamp>\r\n <div class=\"spacer\"></div>\r\n <div class=\"counted-action\" *ngIf=\"showReplyAction\">\r\n <div class=\"count-indicator\">\r\n {{message.submessages?.length || 0}}\r\n </div>\r\n <button mat-icon-button matTooltip=\"Comment\" matTooltipPosition=\"below\" (click)=\"select()\">\r\n <mat-icon [inline]=\"true\">comment</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"counted-action\">\r\n <div class=\"count-indicator\"> \r\n {{message.upvotes}}\r\n </div>\r\n <button mat-icon-button matTooltip=\"Upvote\" matTooltipPosition=\"below\" (click)=\"upvote()\">\r\n <mat-icon [inline]=\"true\">thumb_up</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n",
8261
- styles: [":host{display:flex;flex-direction:column;position:relative;padding:.5em}:host:hover{background:#eee}:host .message-content .content{margin-left:4em;margin-right:3em}:host.abbreviated .message-content .content{max-height:8.5em;text-overflow:ellipsis;overflow-y:hidden}:host .actions{display:flex;padding-right:10px;margin-left:4em;align-items:center}:host .actions button{color:#666}:host .actions engage-timestamp{color:#666;font-size:10pt}.user{position:relative;margin:1em 0 0;display:flex;align-items:center}.user label{z-index:1;position:relative;padding:0 0 0 1em;font-size:10pt;color:#000;margin:0 auto 0 0;display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:1;flex-grow:0}.user label.username{color:#666;flex-shrink:0;flex-grow:1}.avatar{height:3em;width:3em;background-position:center;background-size:cover;background-color:#333;border-radius:100%;flex-shrink:0;flex-grow:0}.counted-action{display:flex;align-items:center}.count-indicator{font-size:9pt;padding:0 3px;border-radius:3px;border:1px solid #ccc;color:#666}:host-context(.mat-dark-theme) .count-indicator{border-color:#333}:host-context(.mat-dark-theme):hover{background:#060606}:host-context(.mat-dark-theme) .user label{color:#fff}"]
7950
+ selector: 'banta-comment',
7951
+ template: "\r\n<mat-menu #pointItemMenu=\"matMenu\">\r\n <button mat-menu-item (click)=\"report()\">Report</button>\r\n <button mat-menu-item>Help</button>\r\n</mat-menu>\r\n\r\n<div class=\"message-content\">\r\n <div class=\"user\">\r\n <div class=\"avatar\" \r\n (click)=\"selectUser()\"\r\n [style.background-image]=\"avatarForUser(message.user)\"></div>\r\n <label class=\"display-name\" (click)=\"selectUser()\">{{message.user.displayName}}</label>\r\n <label class=\"username\" (click)=\"selectUser()\">@{{message.user.username}}</label>\r\n\r\n <button mat-icon-button [matMenuTriggerFor]=\"pointItemMenu\">\r\n <mat-icon [inline]=\"true\">more_vert</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"content\" (click)=\"select()\">\r\n {{message.message}}\r\n </div>\r\n \r\n <div class=\"actions\">\r\n <banta-timestamp [value]=\"message.sentAt\"></banta-timestamp>\r\n <div class=\"spacer\"></div>\r\n <div class=\"counted-action\" *ngIf=\"showReplyAction\">\r\n <div class=\"count-indicator\">\r\n {{message.submessages?.length || 0}}\r\n </div>\r\n <button mat-icon-button matTooltip=\"Comment\" matTooltipPosition=\"below\" (click)=\"select()\">\r\n <mat-icon [inline]=\"true\">comment</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"counted-action\">\r\n <div class=\"count-indicator\"> \r\n {{message.upvotes}}\r\n </div>\r\n <button mat-icon-button matTooltip=\"Upvote\" matTooltipPosition=\"below\" (click)=\"upvote()\">\r\n <mat-icon [inline]=\"true\">thumb_up</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n",
7952
+ styles: [":host{display:flex;flex-direction:column;position:relative;padding:.5em}:host:hover{background:#eee}:host .message-content .content{margin-left:4em;margin-right:3em}:host.abbreviated .message-content .content{max-height:8.5em;text-overflow:ellipsis;overflow-y:hidden}:host .actions{display:flex;padding-right:10px;margin-left:4em;align-items:center}:host .actions button{color:#666}:host .actions banta-timestamp{color:#666;font-size:10pt}.user{position:relative;margin:1em 0 0;display:flex;align-items:center}.user label{z-index:1;position:relative;padding:0 0 0 1em;font-size:10pt;color:#000;margin:0 auto 0 0;display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:1;flex-grow:0}.user label.username{color:#666;flex-shrink:0;flex-grow:1}.avatar{height:3em;width:3em;background-position:center;background-size:cover;background-color:#333;border-radius:100%;flex-shrink:0;flex-grow:0}.counted-action{display:flex;align-items:center}.count-indicator{font-size:9pt;padding:0 3px;border-radius:3px;border:1px solid #ccc;color:#666}:host-context(.mat-dark-theme) .count-indicator{border-color:#333}:host-context(.mat-dark-theme):hover{background:#060606}:host-context(.mat-dark-theme) .user label{color:#fff}"]
8262
7953
  })
8263
7954
  ], CommentComponent);
8264
7955
  return CommentComponent;
@@ -8441,8 +8132,8 @@ var CommentViewComponent = /** @class */ (function () {
8441
8132
  ], CommentViewComponent.prototype, "newestLast", void 0);
8442
8133
  CommentViewComponent = __decorate([
8443
8134
  Component({
8444
- selector: 'engage-comment-view',
8445
- template: "<div class=\"message-container\">\r\n <ng-content select=\"[data-before]\"></ng-content>\r\n <engage-comment \r\n *ngFor=\"let message of messages\"\r\n class=\"abbreviated\"\r\n [message]=\"message\"\r\n [showReplyAction]=\"allowReplies\"\r\n (userSelected)=\"selectMessageUser(message)\"\r\n (upvoted)=\"upvoteMessage(message)\"\r\n (reported)=\"reportMessage(message)\"\r\n (selected)=\"selectMessage(message)\"\r\n ></engage-comment>\r\n <ng-content select=\":not([data-before])\"></ng-content>\r\n</div>",
8135
+ selector: 'banta-comment-view',
8136
+ template: "<div class=\"message-container\">\r\n <ng-content select=\"[data-before]\"></ng-content>\r\n <banta-comment \r\n *ngFor=\"let message of messages\"\r\n class=\"abbreviated\"\r\n [message]=\"message\"\r\n [showReplyAction]=\"allowReplies\"\r\n (userSelected)=\"selectMessageUser(message)\"\r\n (upvoted)=\"upvoteMessage(message)\"\r\n (reported)=\"reportMessage(message)\"\r\n (selected)=\"selectMessage(message)\"\r\n ></banta-comment>\r\n <ng-content select=\":not([data-before])\"></ng-content>\r\n</div>",
8446
8137
  styles: [":host{flex-grow:1;display:flex;flex-direction:column;opacity:1;transition:opacity .2s ease-in}.message-container{flex-grow:1;overflow-y:auto;overflow-x:hidden;height:10em;color:#000;background:#fff;padding:.5em 1em .5em .5em}.message-container.no-scroll{height:auto;overflow-y:visible}:host-context(.mat-dark-theme) .message-container{color:#fff;background:#000}"]
8447
8138
  }),
8448
8139
  __metadata("design:paramtypes", [])
@@ -8450,8 +8141,11 @@ var CommentViewComponent = /** @class */ (function () {
8450
8141
  return CommentViewComponent;
8451
8142
  }());
8452
8143
 
8453
- var CommentsBoxComponent = /** @class */ (function () {
8454
- function CommentsBoxComponent(banta, backend) {
8144
+ /**
8145
+ * Comments component
8146
+ */
8147
+ var BantaCommentsComponent = /** @class */ (function () {
8148
+ function BantaCommentsComponent(banta, backend) {
8455
8149
  this.banta = banta;
8456
8150
  this.backend = backend;
8457
8151
  this._upvoted = new Subject();
@@ -8465,14 +8159,14 @@ var CommentsBoxComponent = /** @class */ (function () {
8465
8159
  this._signInSelected = new Subject();
8466
8160
  this._permissionDeniedError = new Subject();
8467
8161
  }
8468
- CommentsBoxComponent.prototype.ngOnInit = function () {
8162
+ BantaCommentsComponent.prototype.ngOnInit = function () {
8469
8163
  var _this = this;
8470
8164
  this._subs.add(this.banta.userChanged.subscribe(function (user) { return _this.user = user; }));
8471
8165
  };
8472
- CommentsBoxComponent.prototype.ngOnDestroy = function () {
8166
+ BantaCommentsComponent.prototype.ngOnDestroy = function () {
8473
8167
  this._subs.unsubscribe();
8474
8168
  };
8475
- Object.defineProperty(CommentsBoxComponent.prototype, "source", {
8169
+ Object.defineProperty(BantaCommentsComponent.prototype, "source", {
8476
8170
  get: function () {
8477
8171
  return this._source;
8478
8172
  },
@@ -8482,27 +8176,55 @@ var CommentsBoxComponent = /** @class */ (function () {
8482
8176
  enumerable: true,
8483
8177
  configurable: true
8484
8178
  });
8485
- CommentsBoxComponent.prototype.showSignIn = function () {
8179
+ Object.defineProperty(BantaCommentsComponent.prototype, "topicID", {
8180
+ get: function () {
8181
+ return this._source.identifier;
8182
+ },
8183
+ set: function (value) {
8184
+ this.setSourceFromTopicID(value);
8185
+ },
8186
+ enumerable: true,
8187
+ configurable: true
8188
+ });
8189
+ BantaCommentsComponent.prototype.setSourceFromTopicID = function (topicID) {
8190
+ return __awaiter(this, void 0, void 0, function () {
8191
+ var _a;
8192
+ return __generator(this, function (_b) {
8193
+ switch (_b.label) {
8194
+ case 0:
8195
+ if (this._source && this._source.close)
8196
+ this._source.close();
8197
+ this._source = null;
8198
+ _a = this;
8199
+ return [4 /*yield*/, this.backend.getSourceForTopic(topicID)];
8200
+ case 1:
8201
+ _a._source = _b.sent();
8202
+ return [2 /*return*/];
8203
+ }
8204
+ });
8205
+ });
8206
+ };
8207
+ BantaCommentsComponent.prototype.showSignIn = function () {
8486
8208
  this._signInSelected.next();
8487
8209
  };
8488
- Object.defineProperty(CommentsBoxComponent.prototype, "signInSelected", {
8210
+ Object.defineProperty(BantaCommentsComponent.prototype, "signInSelected", {
8489
8211
  get: function () {
8490
8212
  return this._signInSelected;
8491
8213
  },
8492
8214
  enumerable: true,
8493
8215
  configurable: true
8494
8216
  });
8495
- Object.defineProperty(CommentsBoxComponent.prototype, "permissionDeniedError", {
8217
+ Object.defineProperty(BantaCommentsComponent.prototype, "permissionDeniedError", {
8496
8218
  get: function () {
8497
8219
  return this._permissionDeniedError;
8498
8220
  },
8499
8221
  enumerable: true,
8500
8222
  configurable: true
8501
8223
  });
8502
- CommentsBoxComponent.prototype.showPermissionDenied = function () {
8224
+ BantaCommentsComponent.prototype.showPermissionDenied = function () {
8503
8225
  this._permissionDeniedError.next();
8504
8226
  };
8505
- Object.defineProperty(CommentsBoxComponent.prototype, "canComment", {
8227
+ Object.defineProperty(BantaCommentsComponent.prototype, "canComment", {
8506
8228
  get: function () {
8507
8229
  var _a;
8508
8230
  if (!this.user.permissions)
@@ -8512,40 +8234,40 @@ var CommentsBoxComponent = /** @class */ (function () {
8512
8234
  enumerable: true,
8513
8235
  configurable: true
8514
8236
  });
8515
- Object.defineProperty(CommentsBoxComponent.prototype, "upvoted", {
8237
+ Object.defineProperty(BantaCommentsComponent.prototype, "upvoted", {
8516
8238
  get: function () {
8517
8239
  return this._upvoted;
8518
8240
  },
8519
8241
  enumerable: true,
8520
8242
  configurable: true
8521
8243
  });
8522
- Object.defineProperty(CommentsBoxComponent.prototype, "reported", {
8244
+ Object.defineProperty(BantaCommentsComponent.prototype, "reported", {
8523
8245
  get: function () {
8524
8246
  return this._reported;
8525
8247
  },
8526
8248
  enumerable: true,
8527
8249
  configurable: true
8528
8250
  });
8529
- Object.defineProperty(CommentsBoxComponent.prototype, "selected", {
8251
+ Object.defineProperty(BantaCommentsComponent.prototype, "selected", {
8530
8252
  get: function () {
8531
8253
  return this._selected;
8532
8254
  },
8533
8255
  enumerable: true,
8534
8256
  configurable: true
8535
8257
  });
8536
- Object.defineProperty(CommentsBoxComponent.prototype, "userSelected", {
8258
+ Object.defineProperty(BantaCommentsComponent.prototype, "userSelected", {
8537
8259
  get: function () {
8538
8260
  return this._userSelected;
8539
8261
  },
8540
8262
  enumerable: true,
8541
8263
  configurable: true
8542
8264
  });
8543
- CommentsBoxComponent.prototype.onKeyDown = function (event) {
8265
+ BantaCommentsComponent.prototype.onKeyDown = function (event) {
8544
8266
  };
8545
- CommentsBoxComponent.prototype.insertEmoji = function (text) {
8267
+ BantaCommentsComponent.prototype.insertEmoji = function (text) {
8546
8268
  this.newMessageText += text;
8547
8269
  };
8548
- CommentsBoxComponent.prototype.sendMessage = function () {
8270
+ BantaCommentsComponent.prototype.sendMessage = function () {
8549
8271
  if (!this.source)
8550
8272
  return;
8551
8273
  var text = (this.newMessageText || '').trim();
@@ -8560,19 +8282,19 @@ var CommentsBoxComponent = /** @class */ (function () {
8560
8282
  };
8561
8283
  this.source.send(message);
8562
8284
  };
8563
- CommentsBoxComponent.prototype.upvoteMessage = function (message) {
8285
+ BantaCommentsComponent.prototype.upvoteMessage = function (message) {
8564
8286
  this._upvoted.next(message);
8565
8287
  };
8566
- CommentsBoxComponent.prototype.reportMessage = function (message) {
8288
+ BantaCommentsComponent.prototype.reportMessage = function (message) {
8567
8289
  this._reported.next(message);
8568
8290
  };
8569
- CommentsBoxComponent.prototype.selectMessage = function (message) {
8291
+ BantaCommentsComponent.prototype.selectMessage = function (message) {
8570
8292
  this._selected.next(message);
8571
8293
  };
8572
- CommentsBoxComponent.prototype.selectMessageUser = function (message) {
8294
+ BantaCommentsComponent.prototype.selectMessageUser = function (message) {
8573
8295
  this._userSelected.next(message);
8574
8296
  };
8575
- CommentsBoxComponent.ctorParameters = function () { return [
8297
+ BantaCommentsComponent.ctorParameters = function () { return [
8576
8298
  { type: BantaService },
8577
8299
  { type: ChatBackendService }
8578
8300
  ]; };
@@ -8580,59 +8302,64 @@ var CommentsBoxComponent = /** @class */ (function () {
8580
8302
  Input(),
8581
8303
  __metadata("design:type", Object),
8582
8304
  __metadata("design:paramtypes", [Object])
8583
- ], CommentsBoxComponent.prototype, "source", null);
8305
+ ], BantaCommentsComponent.prototype, "source", null);
8306
+ __decorate([
8307
+ Input(),
8308
+ __metadata("design:type", String),
8309
+ __metadata("design:paramtypes", [Object])
8310
+ ], BantaCommentsComponent.prototype, "topicID", null);
8584
8311
  __decorate([
8585
8312
  Input(),
8586
8313
  __metadata("design:type", Object)
8587
- ], CommentsBoxComponent.prototype, "signInLabel", void 0);
8314
+ ], BantaCommentsComponent.prototype, "signInLabel", void 0);
8588
8315
  __decorate([
8589
8316
  Input(),
8590
8317
  __metadata("design:type", Object)
8591
- ], CommentsBoxComponent.prototype, "sendLabel", void 0);
8318
+ ], BantaCommentsComponent.prototype, "sendLabel", void 0);
8592
8319
  __decorate([
8593
8320
  Input(),
8594
8321
  __metadata("design:type", Object)
8595
- ], CommentsBoxComponent.prototype, "permissionDeniedLabel", void 0);
8322
+ ], BantaCommentsComponent.prototype, "permissionDeniedLabel", void 0);
8596
8323
  __decorate([
8597
8324
  Output(),
8598
8325
  __metadata("design:type", Observable),
8599
8326
  __metadata("design:paramtypes", [])
8600
- ], CommentsBoxComponent.prototype, "signInSelected", null);
8327
+ ], BantaCommentsComponent.prototype, "signInSelected", null);
8601
8328
  __decorate([
8602
8329
  Output(),
8603
8330
  __metadata("design:type", Observable),
8604
8331
  __metadata("design:paramtypes", [])
8605
- ], CommentsBoxComponent.prototype, "permissionDeniedError", null);
8332
+ ], BantaCommentsComponent.prototype, "permissionDeniedError", null);
8606
8333
  __decorate([
8607
8334
  Output(),
8608
8335
  __metadata("design:type", Object),
8609
8336
  __metadata("design:paramtypes", [])
8610
- ], CommentsBoxComponent.prototype, "upvoted", null);
8337
+ ], BantaCommentsComponent.prototype, "upvoted", null);
8611
8338
  __decorate([
8612
8339
  Output(),
8613
8340
  __metadata("design:type", Object),
8614
8341
  __metadata("design:paramtypes", [])
8615
- ], CommentsBoxComponent.prototype, "reported", null);
8342
+ ], BantaCommentsComponent.prototype, "reported", null);
8616
8343
  __decorate([
8617
8344
  Output(),
8618
8345
  __metadata("design:type", Object),
8619
8346
  __metadata("design:paramtypes", [])
8620
- ], CommentsBoxComponent.prototype, "selected", null);
8347
+ ], BantaCommentsComponent.prototype, "selected", null);
8621
8348
  __decorate([
8622
8349
  Output(),
8623
8350
  __metadata("design:type", Object),
8624
8351
  __metadata("design:paramtypes", [])
8625
- ], CommentsBoxComponent.prototype, "userSelected", null);
8626
- CommentsBoxComponent = __decorate([
8352
+ ], BantaCommentsComponent.prototype, "userSelected", null);
8353
+ BantaCommentsComponent = __decorate([
8627
8354
  Component({
8628
- selector: 'engage-comments',
8629
- template: "\r\n<form class=\"new-message\" (submit)=\"sendMessage()\">\r\n <div class=\"text-container\">\r\n <textarea \r\n name=\"message\" \r\n (keydown)=\"onKeyDown($event)\"\r\n [(ngModel)]=\"newMessageText\"></textarea>\r\n <emoji-selector-button \r\n class=\"top-right\"\r\n (selected)=\"insertEmoji($event)\"\r\n ></emoji-selector-button>\r\n </div>\r\n <div class=\"actions\">\r\n\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 *ngIf=\"canComment\"\r\n mat-raised-button \r\n color=\"primary\"\r\n [disabled]=\"!newMessageText\" \r\n >{{sendLabel}}</button>\r\n <button \r\n *ngIf=\"!canComment\"\r\n type=\"button\"\r\n (click)=\"showPermissionDenied()\"\r\n mat-raised-button \r\n color=\"primary\"\r\n >{{permissionDeniedLabel}</button>\r\n </ng-container>\r\n </div>\r\n</form>\r\n\r\n<engage-comment-view \r\n [source]=\"source\"\r\n (userSelected)=\"selectMessageUser($event)\"\r\n (selected)=\"selectMessage($event)\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (reported)=\"reportMessage($event)\"\r\n ></engage-comment-view>",
8355
+ selector: 'banta-comments',
8356
+ template: "\r\n<form class=\"new-message\" (submit)=\"sendMessage()\">\r\n <div class=\"text-container\">\r\n <textarea \r\n name=\"message\" \r\n (keydown)=\"onKeyDown($event)\"\r\n [(ngModel)]=\"newMessageText\"></textarea>\r\n <emoji-selector-button \r\n class=\"top-right\"\r\n (selected)=\"insertEmoji($event)\"\r\n ></emoji-selector-button>\r\n </div>\r\n <div class=\"actions\">\r\n\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 *ngIf=\"canComment\"\r\n mat-raised-button \r\n color=\"primary\"\r\n [disabled]=\"!newMessageText\" \r\n >{{sendLabel}}</button>\r\n <button \r\n *ngIf=\"!canComment\"\r\n type=\"button\"\r\n (click)=\"showPermissionDenied()\"\r\n mat-raised-button \r\n color=\"primary\"\r\n >{{permissionDeniedLabel}</button>\r\n </ng-container>\r\n </div>\r\n</form>\r\n\r\n<banta-comment-view \r\n [source]=\"source\"\r\n (userSelected)=\"selectMessageUser($event)\"\r\n (selected)=\"selectMessage($event)\"\r\n (upvoted)=\"upvoteMessage($event)\"\r\n (reported)=\"reportMessage($event)\"\r\n ></banta-comment-view>",
8630
8357
  styles: [":host{display:flex;flex-direction:column}form{display:flex;padding:.5em 0;align-items:center}form .text-container{position:relative;display:flex;flex-grow:1}form .text-container textarea{font-size:14pt;background-color:#fff;color:#333;border:1px solid #ccc;min-height:6em;width:100%}form .text-container emoji-selector-button{bottom:0;right:0;position:absolute}form input[type=text]{background:#000;color:#fff;border:1px solid #333;width:100%;height:1em}form .actions{margin-left:1em}form button{display:block;margin:0 0 0 auto}:host-context(.mat-dark-theme) form .text-container textarea{background:#000;color:#fff;border-color:#333}"]
8631
8358
  }),
8632
8359
  __metadata("design:paramtypes", [BantaService,
8633
8360
  ChatBackendService])
8634
- ], CommentsBoxComponent);
8635
- return CommentsBoxComponent;
8361
+ ], BantaCommentsComponent);
8362
+ return BantaCommentsComponent;
8636
8363
  }());
8637
8364
 
8638
8365
  var LiveCommentComponent = /** @class */ (function () {
@@ -8719,8 +8446,8 @@ var LiveCommentComponent = /** @class */ (function () {
8719
8446
  ], LiveCommentComponent.prototype, "message", null);
8720
8447
  LiveCommentComponent = __decorate([
8721
8448
  Component({
8722
- selector: 'engage-live-comment',
8723
- template: "\n <engage-comment \n *ngIf=\"message\"\n [message]=\"message\"\n (upvoted)=\"upvote()\"\n (reported)=\"report()\"\n (selected)=\"select()\"\n ></engage-comment>\n ",
8449
+ selector: 'banta-live-comment',
8450
+ template: "\n <banta-comment \n *ngIf=\"message\"\n [message]=\"message\"\n (upvoted)=\"upvote()\"\n (reported)=\"report()\"\n (selected)=\"select()\"\n ></banta-comment>\n ",
8724
8451
  styles: [""]
8725
8452
  }),
8726
8453
  __metadata("design:paramtypes", [ChatBackendService])
@@ -8731,7 +8458,7 @@ var LiveCommentComponent = /** @class */ (function () {
8731
8458
  var COMPONENTS$3 = [
8732
8459
  CommentComponent,
8733
8460
  CommentViewComponent,
8734
- CommentsBoxComponent,
8461
+ BantaCommentsComponent,
8735
8462
  LiveCommentComponent
8736
8463
  ];
8737
8464
  var CommentsModule = /** @class */ (function () {
@@ -8746,7 +8473,7 @@ var CommentsModule = /** @class */ (function () {
8746
8473
  MatIconModule,
8747
8474
  MatButtonModule,
8748
8475
  MatMenuModule,
8749
- EngageCommonModule,
8476
+ BantaCommonModule,
8750
8477
  EmojiModule
8751
8478
  ],
8752
8479
  exports: COMPONENTS$3
@@ -8755,11 +8482,6 @@ var CommentsModule = /** @class */ (function () {
8755
8482
  return CommentsModule;
8756
8483
  }());
8757
8484
 
8758
- var COMPONENTS$4 = [
8759
- EngageComponent,
8760
- EngageLogoComponent,
8761
- LiveMessageComponent
8762
- ];
8763
8485
  var BantaSdkModule = /** @class */ (function () {
8764
8486
  function BantaSdkModule() {
8765
8487
  }
@@ -8768,7 +8490,7 @@ var BantaSdkModule = /** @class */ (function () {
8768
8490
  imports: [
8769
8491
  CommonModule,
8770
8492
  FormsModule,
8771
- EngageCommonModule.forRoot(),
8493
+ BantaCommonModule.forRoot(),
8772
8494
  CommentsModule,
8773
8495
  ChatModule,
8774
8496
  EmojiModule,
@@ -8780,8 +8502,18 @@ var BantaSdkModule = /** @class */ (function () {
8780
8502
  MatFormFieldModule,
8781
8503
  MatInputModule
8782
8504
  ],
8783
- declarations: COMPONENTS$4,
8784
- exports: COMPONENTS$4
8505
+ declarations: [
8506
+ BantaComponent,
8507
+ BantaLogoComponent,
8508
+ LiveMessageComponent
8509
+ ],
8510
+ exports: [
8511
+ BantaComponent,
8512
+ BantaLogoComponent,
8513
+ LiveMessageComponent,
8514
+ ChatModule,
8515
+ CommentsModule
8516
+ ]
8785
8517
  })
8786
8518
  ], BantaSdkModule);
8787
8519
  return BantaSdkModule;
@@ -8795,5 +8527,5 @@ var BantaSdkModule = /** @class */ (function () {
8795
8527
  * Generated bundle index. Do not edit.
8796
8528
  */
8797
8529
 
8798
- export { BantaSdkModule, BantaService, ChatBackendService, ChatMessageComponent, ChatModule, ChatViewComponent, CommentComponent, CommentViewComponent, CommentsBoxComponent, CommentsModule, EMOJIS, EmojiModule, EmojiSelectorButtonComponent, EmojiSelectorPanelComponent, EngageCommonModule, EngageComponent, EngageLogoComponent, FirehoseChatComponent, LiveChatMessageComponent, LiveCommentComponent, LiveMessageComponent, MockFirehoseSource, MockPointSource, MockSubpointSource, TimestampComponent, lazyConnection };
8530
+ export { BantaChatComponent, BantaCommentsComponent, BantaCommonModule, BantaComponent, BantaLogoComponent, BantaSdkModule, BantaService, ChatBackendService, ChatMessageComponent, ChatModule, ChatViewComponent, CommentComponent, CommentViewComponent, CommentsModule, EMOJIS, EmojiModule, EmojiSelectorButtonComponent, EmojiSelectorPanelComponent, LiveChatMessageComponent, LiveCommentComponent, LiveMessageComponent, TimestampComponent, lazyConnection };
8799
8531
  //# sourceMappingURL=banta-sdk.js.map