@banta/sdk 4.6.20 → 4.6.21

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.
@@ -8039,9 +8039,15 @@
8039
8039
  this.elementRef = elementRef;
8040
8040
  this._sourceSubs = new rxjs.Subscription();
8041
8041
  this._selected = new rxjs.Subject();
8042
+ this._selected$ = this._selected.asObservable();
8042
8043
  this._reported = new rxjs.Subject();
8044
+ this._reported$ = this._reported.asObservable();
8043
8045
  this._upvoted = new rxjs.Subject();
8046
+ this._upvoted$ = this._upvoted.asObservable();
8044
8047
  this._userSelected = new rxjs.Subject();
8048
+ this._userSelected$ = this._userSelected.asObservable();
8049
+ this._received = new rxjs.Subject();
8050
+ this._received$ = this._received.asObservable();
8045
8051
  this.messages = [];
8046
8052
  this.maxMessages = 200;
8047
8053
  }
@@ -8075,30 +8081,27 @@
8075
8081
  configurable: true
8076
8082
  });
8077
8083
  Object.defineProperty(ChatViewComponent.prototype, "selected", {
8078
- get: function () {
8079
- return this._selected;
8080
- },
8084
+ get: function () { return this._selected$; },
8081
8085
  enumerable: false,
8082
8086
  configurable: true
8083
8087
  });
8084
8088
  Object.defineProperty(ChatViewComponent.prototype, "userSelected", {
8085
- get: function () {
8086
- return this._userSelected;
8087
- },
8089
+ get: function () { return this._userSelected$; },
8088
8090
  enumerable: false,
8089
8091
  configurable: true
8090
8092
  });
8091
8093
  Object.defineProperty(ChatViewComponent.prototype, "reported", {
8092
- get: function () {
8093
- return this._reported;
8094
- },
8094
+ get: function () { return this._reported$; },
8095
8095
  enumerable: false,
8096
8096
  configurable: true
8097
8097
  });
8098
8098
  Object.defineProperty(ChatViewComponent.prototype, "upvoted", {
8099
- get: function () {
8100
- return this._upvoted;
8101
- },
8099
+ get: function () { return this._upvoted$; },
8100
+ enumerable: false,
8101
+ configurable: true
8102
+ });
8103
+ Object.defineProperty(ChatViewComponent.prototype, "received", {
8104
+ get: function () { return this._received$; },
8102
8105
  enumerable: false,
8103
8106
  configurable: true
8104
8107
  });
@@ -8136,6 +8139,7 @@
8136
8139
  ChatViewComponent.prototype.messageReceived = function (message) {
8137
8140
  var _this = this;
8138
8141
  this.addMessage(message);
8142
+ this._received.next(message);
8139
8143
  if (this.isScrolledToLatest())
8140
8144
  setTimeout(function () { return _this.scrollToLatest(); });
8141
8145
  };
@@ -8221,6 +8225,7 @@
8221
8225
  userSelected: [{ type: core.Output }],
8222
8226
  reported: [{ type: core.Output }],
8223
8227
  upvoted: [{ type: core.Output }],
8228
+ received: [{ type: core.Output }],
8224
8229
  messageContainer: [{ type: core.ViewChild, args: ['messageContainer',] }],
8225
8230
  maxMessages: [{ type: core.Input }]
8226
8231
  };
@@ -8237,11 +8242,19 @@
8237
8242
  this.sendLabel = 'Send';
8238
8243
  this.permissionDeniedLabel = 'Send';
8239
8244
  this._selected = new rxjs.Subject();
8245
+ this._selected$ = this._selected.asObservable();
8240
8246
  this._reported = new rxjs.Subject();
8247
+ this._reported$ = this._reported.asObservable();
8241
8248
  this._upvoted = new rxjs.Subject();
8249
+ this._upvoted$ = this._upvoted.asObservable();
8242
8250
  this._userSelected = new rxjs.Subject();
8243
- this._signInSelected = new rxjs.Subject();
8251
+ this._userSelected$ = this._userSelected.asObservable();
8244
8252
  this._permissionDeniedError = new rxjs.Subject();
8253
+ this._permissionDeniedError$ = this._permissionDeniedError.asObservable();
8254
+ this._signInSelected = new rxjs.Subject();
8255
+ this._signInSelected$ = this._signInSelected.asObservable();
8256
+ this._received = new rxjs.Subject();
8257
+ this._received$ = this._received.asObservable();
8245
8258
  this.showEmojiPanel = false;
8246
8259
  this.newMessage = {};
8247
8260
  }
@@ -8290,20 +8303,44 @@
8290
8303
  });
8291
8304
  });
8292
8305
  };
8293
- Object.defineProperty(BantaChatComponent.prototype, "signInSelected", {
8294
- get: function () {
8295
- return this._signInSelected;
8296
- },
8306
+ Object.defineProperty(BantaChatComponent.prototype, "selected", {
8307
+ get: function () { return this._selected$; },
8308
+ enumerable: false,
8309
+ configurable: true
8310
+ });
8311
+ Object.defineProperty(BantaChatComponent.prototype, "reported", {
8312
+ get: function () { return this._reported$; },
8313
+ enumerable: false,
8314
+ configurable: true
8315
+ });
8316
+ Object.defineProperty(BantaChatComponent.prototype, "upvoted", {
8317
+ get: function () { return this._upvoted$; },
8318
+ enumerable: false,
8319
+ configurable: true
8320
+ });
8321
+ Object.defineProperty(BantaChatComponent.prototype, "userSelected", {
8322
+ get: function () { return this._userSelected$; },
8297
8323
  enumerable: false,
8298
8324
  configurable: true
8299
8325
  });
8300
8326
  Object.defineProperty(BantaChatComponent.prototype, "permissionDeniedError", {
8301
- get: function () {
8302
- return this._permissionDeniedError;
8303
- },
8327
+ get: function () { return this._permissionDeniedError$; },
8328
+ enumerable: false,
8329
+ configurable: true
8330
+ });
8331
+ Object.defineProperty(BantaChatComponent.prototype, "signInSelected", {
8332
+ get: function () { return this._signInSelected$; },
8333
+ enumerable: false,
8334
+ configurable: true
8335
+ });
8336
+ Object.defineProperty(BantaChatComponent.prototype, "received", {
8337
+ get: function () { return this._received$; },
8304
8338
  enumerable: false,
8305
8339
  configurable: true
8306
8340
  });
8341
+ BantaChatComponent.prototype.onReceived = function (message) {
8342
+ this._received.next(message);
8343
+ };
8307
8344
  BantaChatComponent.prototype.showSignIn = function () {
8308
8345
  this._signInSelected.next();
8309
8346
  };
@@ -8343,34 +8380,6 @@
8343
8380
  });
8344
8381
  });
8345
8382
  };
8346
- Object.defineProperty(BantaChatComponent.prototype, "selected", {
8347
- get: function () {
8348
- return this._selected;
8349
- },
8350
- enumerable: false,
8351
- configurable: true
8352
- });
8353
- Object.defineProperty(BantaChatComponent.prototype, "reported", {
8354
- get: function () {
8355
- return this._reported;
8356
- },
8357
- enumerable: false,
8358
- configurable: true
8359
- });
8360
- Object.defineProperty(BantaChatComponent.prototype, "upvoted", {
8361
- get: function () {
8362
- return this._upvoted;
8363
- },
8364
- enumerable: false,
8365
- configurable: true
8366
- });
8367
- Object.defineProperty(BantaChatComponent.prototype, "userSelected", {
8368
- get: function () {
8369
- return this._userSelected;
8370
- },
8371
- enumerable: false,
8372
- configurable: true
8373
- });
8374
8383
  Object.defineProperty(BantaChatComponent.prototype, "canChat", {
8375
8384
  get: function () {
8376
8385
  if (!this.user)
@@ -8433,8 +8442,8 @@
8433
8442
  BantaChatComponent.decorators = [
8434
8443
  { type: core.Component, args: [{
8435
8444
  selector: 'banta-chat',
8436
- 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>",
8437
- styles: [":host{flex-direction:column;border-radius:5px;padding:10px;font-size:10pt}.entry-container,:host{display:flex;flex-grow:1}.entry-container{flex-direction:row;position:relative}.entry-container emoji-selector-button{position:absolute;right:0;top:.15em}.entry-container input{height:2.6em;font-size:12pt;padding-left:1em}.entry-container input:-webkit-autofill,.entry-container input:-webkit-autofill:focus,.entry-container input:-webkit-autofill:hover{outline:1px solid #9da302;-webkit-text-fill-color:#9da302;-webkit-box-shadow:0 0 0 1000px #211e07 inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;caret-color:#9da302}.entry-container emoji-selector-panel{pointer-events:none;opacity:0;position:absolute;bottom:3.5em;right:0}.entry-container emoji-selector-panel.visible{opacity:1;pointer-events:auto}form{display:flex;padding:.5em 0;align-items:center}form textarea{font-size:14pt;background:#000;color:#fff;border:1px solid #333;min-height:6em;width:100%}form input[type=text]{background:#fff;color:#000;border:1px solid #ccc;width:100%;height:2.5em}form .actions{margin-left:1em}form button{display:block;margin:0 0 0 auto}:host-context(.mat-dark-theme) form input[type=text]{background:#000;color:#fff;border:1px solid #333}"]
8445
+ 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 (received)=\"onMessageReceived($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>",
8446
+ styles: [":host{flex-direction:column;border-radius:5px;padding:10px;font-size:10pt;min-height:1px}.entry-container,:host{display:flex;flex-grow:1}.entry-container{flex-direction:row;position:relative}.entry-container emoji-selector-button{position:absolute;right:0;top:.15em}.entry-container input{height:2.6em;font-size:12pt;padding-left:1em}.entry-container input:-webkit-autofill,.entry-container input:-webkit-autofill:focus,.entry-container input:-webkit-autofill:hover{outline:1px solid #9da302;-webkit-text-fill-color:#9da302;-webkit-box-shadow:0 0 0 1000px #211e07 inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;caret-color:#9da302}.entry-container emoji-selector-panel{pointer-events:none;opacity:0;position:absolute;bottom:3.5em;right:0}.entry-container emoji-selector-panel.visible{opacity:1;pointer-events:auto}form{display:flex;padding:.5em 0;align-items:center}form textarea{font-size:14pt;background:#000;color:#fff;border:1px solid #333;min-height:6em;width:100%}form input[type=text]{background:#fff;color:#000;border:1px solid #ccc;width:100%;height:2.5em}form .actions{margin-left:1em}form button{display:block;margin:0 0 0 auto}:host-context(.mat-dark-theme) form input[type=text]{background:#000;color:#fff;border:1px solid #333}"]
8438
8447
  },] }
8439
8448
  ];
8440
8449
  BantaChatComponent.ctorParameters = function () { return [
@@ -8447,13 +8456,14 @@
8447
8456
  signInLabel: [{ type: core.Input }],
8448
8457
  sendLabel: [{ type: core.Input }],
8449
8458
  permissionDeniedLabel: [{ type: core.Input }],
8450
- signInSelected: [{ type: core.Output }],
8451
- permissionDeniedError: [{ type: core.Output }],
8452
- chatView: [{ type: core.ViewChild, args: ['chatView', { static: true },] }],
8453
8459
  selected: [{ type: core.Output }],
8454
8460
  reported: [{ type: core.Output }],
8455
8461
  upvoted: [{ type: core.Output }],
8456
- userSelected: [{ type: core.Output }]
8462
+ userSelected: [{ type: core.Output }],
8463
+ permissionDeniedError: [{ type: core.Output }],
8464
+ signInSelected: [{ type: core.Output }],
8465
+ received: [{ type: core.Output }],
8466
+ chatView: [{ type: core.ViewChild, args: ['chatView', { static: true },] }]
8457
8467
  };
8458
8468
 
8459
8469
  var COMPONENTS$2 = [