@banta/sdk 4.6.3 → 4.6.4

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.
@@ -9443,6 +9443,7 @@
9443
9443
  this._source.messages.forEach(function (m) { return _this.addParticipant(m); });
9444
9444
  this._sourceSubscription.add(this._source.messageReceived.subscribe(function (m) { return _this.addParticipant(m); }));
9445
9445
  this._sourceSubscription.add(this._source.messageSent.subscribe(function (m) { return _this.addParticipant(m); }));
9446
+ this._sourceSubscription.add(this._source.messageObserved.subscribe(function (m) { return _this.addParticipant(m); }));
9446
9447
  this._sourceSubscription.add(this._source.messageUpdated.subscribe(function (msg) {
9447
9448
  var _a;
9448
9449
  console.log("comments received message: ", msg);
@@ -10413,10 +10414,12 @@
10413
10414
  return [2 /*return*/];
10414
10415
  }
10415
10416
  if (event.key === 'Enter') {
10416
- this.activateAutoComplete(this.autocompleteOptions[this.autoCompleteSelected]);
10417
- event.stopPropagation();
10418
- event.preventDefault();
10419
- return [2 /*return*/];
10417
+ if (this.autocompleteOptions[this.autoCompleteSelected]) {
10418
+ this.activateAutoComplete(this.autocompleteOptions[this.autoCompleteSelected]);
10419
+ event.stopPropagation();
10420
+ event.preventDefault();
10421
+ return [2 /*return*/];
10422
+ }
10420
10423
  }
10421
10424
  if (event.key === 'ArrowUp') {
10422
10425
  if (this.autoCompleteSelected === 0)
@@ -10808,6 +10811,7 @@
10808
10811
  _this._messageReceived = new rxjs.Subject();
10809
10812
  _this._messageUpdated = new rxjs.Subject();
10810
10813
  _this._messageSent = new rxjs.Subject();
10814
+ _this._messageObserved = new rxjs.Subject();
10811
10815
  _this.messages = [];
10812
10816
  _this.ready = new Promise(function (resolve) { return _this.markReady = resolve; });
10813
10817
  return _this;
@@ -10885,10 +10889,13 @@
10885
10889
  };
10886
10890
  ChatSource.prototype.mapOrUpdateMessage = function (message) {
10887
10891
  var existingMessage = this.messageMap.get(message.id);
10888
- if (existingMessage)
10892
+ if (existingMessage) {
10889
10893
  message = Object.assign(existingMessage, message);
10890
- else
10894
+ }
10895
+ else {
10891
10896
  this.messageMap.set(message.id, message);
10897
+ this._messageObserved.next(message);
10898
+ }
10892
10899
  return message;
10893
10900
  };
10894
10901
  ChatSource.prototype.getExistingMessages = function () {
@@ -11007,6 +11014,11 @@
11007
11014
  enumerable: false,
11008
11015
  configurable: true
11009
11016
  });
11017
+ Object.defineProperty(ChatSource.prototype, "messageObserved", {
11018
+ get: function () { return this._messageObserved.asObservable(); },
11019
+ enumerable: false,
11020
+ configurable: true
11021
+ });
11010
11022
  ChatSource.prototype.send = function (message) {
11011
11023
  return __awaiter(this, void 0, void 0, function () {
11012
11024
  return __generator(this, function (_b) {