@senior-gestao-empresarial/angular-components 4.22.0-5b65c0a7-384a-4f22-b4d9-413308f621ab → 4.22.1-706afb94-1b58-4cb7-9006-8d9033881f51

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.
@@ -6627,7 +6627,7 @@
6627
6627
  WebsocketService_1 = WebsocketService;
6628
6628
  /**
6629
6629
  * Observable responsável por emitir uma notificação quando a conexão websocket é estabelecida.
6630
- * @return Um `Observable<void>` que emite uma notificação quando a conexão websocket é estabelecida ou já está em andamento.
6630
+ * @return Um `Observable<void>` que emite uma notificação quando a conexão websocket é estabelecida.
6631
6631
  */
6632
6632
  WebsocketService.prototype.onConnect = function () {
6633
6633
  var _this = this;
@@ -6651,20 +6651,20 @@
6651
6651
  * @param domain Dominio da primitva.
6652
6652
  * @param service Service da primitiva.
6653
6653
  * @param primitive Primitiva que será "observada" pelo client.
6654
- * @param identifierPath Caminho até a propriedade considerada o indentificador do registro.
6654
+ * @param identifierPath Caminho até a propriedade considerada o identificador do registro.
6655
6655
  * @return Um `observable` que emite notificações toda vez que o respectivo evento é publicado no sistema.
6656
6656
  */
6657
6657
  WebsocketService.prototype.onEvent = function (domain, service, primitive, identifierPath) {
6658
6658
  var _this = this;
6659
- var primitiveManager = this.primitiveManagers.get(primitive);
6660
- if (primitiveManager) {
6661
- return primitiveManager.subject.asObservable();
6659
+ if (this.primitiveManagers.has(primitive)) {
6660
+ return this.primitiveManagers.get(primitive).subject.asObservable();
6662
6661
  }
6663
- primitiveManager = {
6662
+ var primitiveManager = {
6664
6663
  subject: new rxjs.Subject(),
6665
6664
  identifierPath: identifierPath,
6666
6665
  publishedEvents: [],
6667
6666
  };
6667
+ this.primitiveManagers.set(primitive, primitiveManager);
6668
6668
  if (this.isConnected()) {
6669
6669
  this.createStompSubscriptions(domain, service, primitive, primitiveManager);
6670
6670
  return primitiveManager.subject.asObservable();
@@ -6685,7 +6685,7 @@
6685
6685
  * Retorna todos os eventos ouvidos pela primitiva com os respectivos identificadores.
6686
6686
  * @typeParam `<T>` Tipo do evento retornado pela primitiva.
6687
6687
  * @param primitive Primitiva que será "observada" pelo client.
6688
- * @param identifiers Array com os indentificadores interessados.
6688
+ * @param identifiers Array com os identificadores interessados.
6689
6689
  * @return Array contendo o último evento recebido de cada identificador fornecido.
6690
6690
  */
6691
6691
  WebsocketService.prototype.getPublishedEvents = function (primitive, identifiers) {
@@ -6727,7 +6727,6 @@
6727
6727
  };
6728
6728
  WebsocketService.prototype.createStompSubscriptions = function (domain, service, primitive, primitiveManager) {
6729
6729
  var withTokenUrl = this.getSubscriptionUrlWithToken(domain, service, primitive);
6730
- this.primitiveManagers.set(primitive, primitiveManager);
6731
6730
  var stompSubscriptionWithToken = this.createStompSubscription(withTokenUrl, primitiveManager);
6732
6731
  var withoutTokenUrl = this.getSubscriptionUrlWithoutToken(domain, service, primitive);
6733
6732
  var stompSubscriptionWithoutToken = this.createStompSubscription(withoutTokenUrl, primitiveManager);