@senior-gestao-empresarial/angular-components 4.22.2 → 4.23.2
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.
- package/bundles/senior-gestao-empresarial-angular-components.umd.js +244 -99
- package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +2 -2
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
- package/components/lookups/entities/beneficio-fiscal-lookup.d.ts +8 -0
- package/components/lookups/index.d.ts +1 -0
- package/components/websocket/websocket.service.d.ts +23 -14
- package/esm2015/components/lookups/entities/beneficio-fiscal-lookup.js +73 -0
- package/esm2015/components/lookups/erp-lookups.module.js +4 -2
- package/esm2015/components/lookups/index.js +2 -1
- package/esm2015/components/websocket/websocket.service.js +106 -76
- package/esm5/components/lookups/entities/beneficio-fiscal-lookup.js +76 -0
- package/esm5/components/lookups/erp-lookups.module.js +4 -2
- package/esm5/components/lookups/index.js +2 -1
- package/esm5/components/websocket/websocket.service.js +170 -98
- package/fesm2015/senior-gestao-empresarial-angular-components.js +174 -76
- package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-angular-components.js +241 -98
- package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-angular-components.metadata.json +1 -1
|
@@ -4,7 +4,7 @@ import { CommonModule } from '@angular/common';
|
|
|
4
4
|
import { BreadcrumbModule as BreadcrumbModule$1 } from 'primeng/breadcrumb';
|
|
5
5
|
import { NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
6
6
|
import { Subject, throwError, interval, of, ReplaySubject } from 'rxjs';
|
|
7
|
-
import { takeUntil, filter, catchError, map, takeWhile, switchMap, first, take } from 'rxjs/operators';
|
|
7
|
+
import { takeUntil, filter, catchError, map, takeWhile, switchMap, first, finalize, take } from 'rxjs/operators';
|
|
8
8
|
import * as moment_ from 'moment';
|
|
9
9
|
import { FormField, FieldType } from '@seniorsistemas/angular-components';
|
|
10
10
|
import { HttpParams, HttpClient } from '@angular/common/http';
|
|
@@ -15,7 +15,6 @@ import { user } from '@seniorsistemas/senior-platform-data';
|
|
|
15
15
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
16
16
|
import { get } from 'js-cookie';
|
|
17
17
|
import { Stomp } from '@stomp/stompjs';
|
|
18
|
-
import { CookieService } from 'ngx-cookie-service';
|
|
19
18
|
import * as SockJS from 'sockjs-client';
|
|
20
19
|
|
|
21
20
|
var BreadcrumbComponent = /** @class */ (function () {
|
|
@@ -5630,6 +5629,75 @@ var ParametersLookup = /** @class */ (function (_super) {
|
|
|
5630
5629
|
return ParametersLookup;
|
|
5631
5630
|
}(ErpLookups));
|
|
5632
5631
|
|
|
5632
|
+
var BeneficioFiscalLookup = /** @class */ (function (_super) {
|
|
5633
|
+
__extends(BeneficioFiscalLookup, _super);
|
|
5634
|
+
function BeneficioFiscalLookup(lookupService, translate) {
|
|
5635
|
+
var _this = _super.call(this, lookupService, translate, "beneficioFiscal", [
|
|
5636
|
+
{
|
|
5637
|
+
name: "codigo",
|
|
5638
|
+
type: FieldType.String
|
|
5639
|
+
},
|
|
5640
|
+
{
|
|
5641
|
+
name: "descricao",
|
|
5642
|
+
type: FieldType.String
|
|
5643
|
+
},
|
|
5644
|
+
], [
|
|
5645
|
+
{
|
|
5646
|
+
name: "codigo",
|
|
5647
|
+
type: FieldType.String
|
|
5648
|
+
},
|
|
5649
|
+
{
|
|
5650
|
+
name: "descricao",
|
|
5651
|
+
type: FieldType.String
|
|
5652
|
+
},
|
|
5653
|
+
{
|
|
5654
|
+
name: "abreviatura",
|
|
5655
|
+
type: FieldType.String
|
|
5656
|
+
},
|
|
5657
|
+
{
|
|
5658
|
+
name: "vigenciaInicial",
|
|
5659
|
+
type: FieldType.Date
|
|
5660
|
+
},
|
|
5661
|
+
{
|
|
5662
|
+
name: "vigenciaFinal",
|
|
5663
|
+
type: FieldType.Date
|
|
5664
|
+
},
|
|
5665
|
+
], [
|
|
5666
|
+
{
|
|
5667
|
+
name: "codigo",
|
|
5668
|
+
type: FieldType.String
|
|
5669
|
+
},
|
|
5670
|
+
{
|
|
5671
|
+
name: "descricao",
|
|
5672
|
+
type: FieldType.String
|
|
5673
|
+
},
|
|
5674
|
+
{
|
|
5675
|
+
name: "abreviatura",
|
|
5676
|
+
type: FieldType.String
|
|
5677
|
+
},
|
|
5678
|
+
{
|
|
5679
|
+
name: "vigenciaInicial",
|
|
5680
|
+
type: FieldType.Date
|
|
5681
|
+
},
|
|
5682
|
+
{
|
|
5683
|
+
name: "vigenciaFinal",
|
|
5684
|
+
type: FieldType.Date
|
|
5685
|
+
},
|
|
5686
|
+
], "erpx_cpl_imp", "impostos") || this;
|
|
5687
|
+
_this.lookupService = lookupService;
|
|
5688
|
+
_this.translate = translate;
|
|
5689
|
+
return _this;
|
|
5690
|
+
}
|
|
5691
|
+
BeneficioFiscalLookup.ctorParameters = function () { return [
|
|
5692
|
+
{ type: ErpLookupsService },
|
|
5693
|
+
{ type: TranslateService }
|
|
5694
|
+
]; };
|
|
5695
|
+
BeneficioFiscalLookup = __decorate([
|
|
5696
|
+
Injectable()
|
|
5697
|
+
], BeneficioFiscalLookup);
|
|
5698
|
+
return BeneficioFiscalLookup;
|
|
5699
|
+
}(ErpLookups));
|
|
5700
|
+
|
|
5633
5701
|
var ErpLookupsModule = /** @class */ (function () {
|
|
5634
5702
|
function ErpLookupsModule() {
|
|
5635
5703
|
}
|
|
@@ -5734,7 +5802,8 @@ var ErpLookupsModule = /** @class */ (function () {
|
|
|
5734
5802
|
CountryLookup,
|
|
5735
5803
|
BankLookup,
|
|
5736
5804
|
TypeTaxesLookup,
|
|
5737
|
-
ParametersLookup
|
|
5805
|
+
ParametersLookup,
|
|
5806
|
+
BeneficioFiscalLookup
|
|
5738
5807
|
],
|
|
5739
5808
|
declarations: [],
|
|
5740
5809
|
exports: [],
|
|
@@ -6404,17 +6473,16 @@ var NpsService = /** @class */ (function () {
|
|
|
6404
6473
|
}());
|
|
6405
6474
|
|
|
6406
6475
|
var WebsocketService = /** @class */ (function () {
|
|
6407
|
-
function WebsocketService(
|
|
6408
|
-
this.cookieService = cookieService;
|
|
6409
|
-
this.baseUrl = null;
|
|
6410
|
-
this.username = null;
|
|
6476
|
+
function WebsocketService() {
|
|
6411
6477
|
this.focused = true;
|
|
6478
|
+
this.wasConnected = false;
|
|
6412
6479
|
this.connected = false;
|
|
6413
6480
|
this.isConnecting = false;
|
|
6414
|
-
this.stompSubscriptions = new Map();
|
|
6415
6481
|
this.primitiveManagers = new Map();
|
|
6416
|
-
this.disconnectSubject = new Subject();
|
|
6417
6482
|
this.connect$ = new Subject();
|
|
6483
|
+
this.disconnect$ = new Subject();
|
|
6484
|
+
this.reconnect$ = new Subject();
|
|
6485
|
+
this.error$ = new Subject();
|
|
6418
6486
|
window.onfocus = this.onFocus;
|
|
6419
6487
|
window.onblur = this.onBlur;
|
|
6420
6488
|
this.connect();
|
|
@@ -6428,22 +6496,36 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6428
6496
|
var _this = this;
|
|
6429
6497
|
setTimeout(function () {
|
|
6430
6498
|
if (_this.isConnected()) {
|
|
6431
|
-
_this.
|
|
6499
|
+
_this.connect$.next();
|
|
6432
6500
|
}
|
|
6433
6501
|
}, 0);
|
|
6434
|
-
return this.connect$.
|
|
6502
|
+
return this.connect$.pipe(first());
|
|
6435
6503
|
};
|
|
6436
6504
|
/**
|
|
6437
|
-
* Observable responsável por emitir uma notificação quando a conexão é
|
|
6438
|
-
* @return Um `Observable<void>` que emite uma notificação quando a conexão é
|
|
6505
|
+
* Observable responsável por emitir uma notificação quando a conexão é desconectada.
|
|
6506
|
+
* @return Um `Observable<void>` que emite uma notificação quando a conexão é desconectada.
|
|
6439
6507
|
*/
|
|
6440
6508
|
WebsocketService.prototype.onDisconnect = function () {
|
|
6441
|
-
return this.
|
|
6509
|
+
return this.disconnect$.asObservable();
|
|
6510
|
+
};
|
|
6511
|
+
/**
|
|
6512
|
+
* Observable responsável por emitir uma notificação quando a conexão é reconectada.
|
|
6513
|
+
* @return Um `Observable<void>` que emite uma notificação quando a conexão é reconectada.
|
|
6514
|
+
*/
|
|
6515
|
+
WebsocketService.prototype.onReconnect = function () {
|
|
6516
|
+
return this.reconnect$.asObservable();
|
|
6517
|
+
};
|
|
6518
|
+
/**
|
|
6519
|
+
* Observable responsável por emitir uma notificação quando ocorre algum erro.
|
|
6520
|
+
* @return Um `Observable<FrameImpl>` que emite uma notificação quando ocorre algum erro.
|
|
6521
|
+
*/
|
|
6522
|
+
WebsocketService.prototype.onError = function () {
|
|
6523
|
+
return this.error$.asObservable();
|
|
6442
6524
|
};
|
|
6443
6525
|
/**
|
|
6444
6526
|
* Observable responsável por emitir uma notificação quando um evento é publicado.
|
|
6445
6527
|
* @typeParam `<T>` Tipo do objeto que o retorno do `observable` vai devolver.
|
|
6446
|
-
* @param domain Dominio da
|
|
6528
|
+
* @param domain Dominio da primitiva.
|
|
6447
6529
|
* @param service Service da primitiva.
|
|
6448
6530
|
* @param primitive Primitiva que será "observada" pelo client.
|
|
6449
6531
|
* @param identifierPath Caminho até a propriedade considerada o identificador do registro.
|
|
@@ -6455,25 +6537,27 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6455
6537
|
return this.primitiveManagers.get(primitive).subject.asObservable();
|
|
6456
6538
|
}
|
|
6457
6539
|
var primitiveManager = {
|
|
6540
|
+
domain: domain,
|
|
6541
|
+
service: service,
|
|
6542
|
+
primitive: primitive,
|
|
6543
|
+
stompSubscriptions: [],
|
|
6458
6544
|
subject: new Subject(),
|
|
6459
6545
|
identifierPath: identifierPath,
|
|
6460
6546
|
publishedEvents: [],
|
|
6461
6547
|
};
|
|
6462
6548
|
this.primitiveManagers.set(primitive, primitiveManager);
|
|
6463
6549
|
if (this.isConnected()) {
|
|
6464
|
-
this.createStompSubscriptions(
|
|
6465
|
-
return primitiveManager.subject.
|
|
6550
|
+
this.createStompSubscriptions(primitiveManager);
|
|
6551
|
+
return primitiveManager.subject.pipe(finalize(function () { return _this.disconnectPrimitiveOnFinalize(primitive); }));
|
|
6466
6552
|
}
|
|
6467
6553
|
else {
|
|
6468
6554
|
if (!this.isConnecting) {
|
|
6469
6555
|
this.connect();
|
|
6470
6556
|
}
|
|
6471
|
-
this.
|
|
6472
|
-
.
|
|
6473
|
-
.subscribe(function () {
|
|
6474
|
-
_this.createStompSubscriptions(domain, service, primitive, primitiveManager);
|
|
6557
|
+
this.connect$.pipe(first()).subscribe(function () {
|
|
6558
|
+
_this.createStompSubscriptions(primitiveManager);
|
|
6475
6559
|
});
|
|
6476
|
-
return primitiveManager.subject.
|
|
6560
|
+
return primitiveManager.subject.pipe(finalize(function () { return _this.disconnectPrimitiveOnFinalize(primitive); }));
|
|
6477
6561
|
}
|
|
6478
6562
|
};
|
|
6479
6563
|
/**
|
|
@@ -6520,12 +6604,12 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6520
6604
|
primitiveManager.publishedEvents.push(event);
|
|
6521
6605
|
}
|
|
6522
6606
|
};
|
|
6523
|
-
WebsocketService.prototype.createStompSubscriptions = function (
|
|
6524
|
-
var withTokenUrl = this.getSubscriptionUrlWithToken(domain, service, primitive);
|
|
6607
|
+
WebsocketService.prototype.createStompSubscriptions = function (primitiveManager) {
|
|
6608
|
+
var withTokenUrl = this.getSubscriptionUrlWithToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
|
|
6525
6609
|
var stompSubscriptionWithToken = this.createStompSubscription(withTokenUrl, primitiveManager);
|
|
6526
|
-
var withoutTokenUrl = this.getSubscriptionUrlWithoutToken(domain, service, primitive);
|
|
6610
|
+
var withoutTokenUrl = this.getSubscriptionUrlWithoutToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
|
|
6527
6611
|
var stompSubscriptionWithoutToken = this.createStompSubscription(withoutTokenUrl, primitiveManager);
|
|
6528
|
-
|
|
6612
|
+
primitiveManager.stompSubscriptions = [stompSubscriptionWithToken, stompSubscriptionWithoutToken];
|
|
6529
6613
|
};
|
|
6530
6614
|
WebsocketService.prototype.getIdentifierFromEvent = function (identifierPath, event) {
|
|
6531
6615
|
var e_2, _a;
|
|
@@ -6550,19 +6634,24 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6550
6634
|
var _this = this;
|
|
6551
6635
|
this.createStompClient();
|
|
6552
6636
|
this.isConnecting = true;
|
|
6637
|
+
this._stompClient.activate();
|
|
6553
6638
|
this._stompClient.connect({}, function () {
|
|
6554
|
-
_this.setConnected(true);
|
|
6555
6639
|
_this.isConnecting = false;
|
|
6556
|
-
_this.
|
|
6557
|
-
|
|
6640
|
+
_this.setConnected(true);
|
|
6641
|
+
if (_this.wasConnected) {
|
|
6642
|
+
_this.reconnectPrimitives();
|
|
6643
|
+
_this.reconnect$.next();
|
|
6644
|
+
}
|
|
6645
|
+
else {
|
|
6646
|
+
_this.wasConnected = true;
|
|
6647
|
+
_this.connect$.next();
|
|
6648
|
+
}
|
|
6649
|
+
}, function (error) {
|
|
6558
6650
|
_this.setConnected(false);
|
|
6559
|
-
|
|
6651
|
+
_this.error$.next(error);
|
|
6652
|
+
_this.reconnect();
|
|
6560
6653
|
});
|
|
6561
6654
|
};
|
|
6562
|
-
WebsocketService.prototype.publishOnConnect = function () {
|
|
6563
|
-
this.connect$.next();
|
|
6564
|
-
this.connect$.observers = [];
|
|
6565
|
-
};
|
|
6566
6655
|
WebsocketService.prototype.onFocus = function () {
|
|
6567
6656
|
this.focused = true;
|
|
6568
6657
|
};
|
|
@@ -6570,59 +6659,55 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6570
6659
|
this.focused = false;
|
|
6571
6660
|
};
|
|
6572
6661
|
WebsocketService.prototype.disconnect = function () {
|
|
6573
|
-
var e_3, _a, e_4, _b;
|
|
6574
|
-
var observersCount =
|
|
6662
|
+
var e_3, _a, e_4, _b, e_5, _c;
|
|
6663
|
+
var observersCount = this.getObserversCount();
|
|
6664
|
+
if (observersCount > 0)
|
|
6665
|
+
return;
|
|
6575
6666
|
try {
|
|
6576
|
-
for (var
|
|
6577
|
-
var primitiveManager =
|
|
6578
|
-
observersCount += primitiveManager.subject.observers.length;
|
|
6579
|
-
}
|
|
6580
|
-
}
|
|
6581
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
6582
|
-
finally {
|
|
6583
|
-
try {
|
|
6584
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
6585
|
-
}
|
|
6586
|
-
finally { if (e_3) throw e_3.error; }
|
|
6587
|
-
}
|
|
6588
|
-
if (observersCount === 0) {
|
|
6589
|
-
this.stompSubscriptions.forEach(function (stompSubscriptions) {
|
|
6590
|
-
var e_5, _a;
|
|
6667
|
+
for (var _d = __values(this.primitiveManagers.values()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
6668
|
+
var primitiveManager = _e.value;
|
|
6591
6669
|
try {
|
|
6592
|
-
for (var
|
|
6593
|
-
var stompSubscription =
|
|
6670
|
+
for (var _f = (e_4 = void 0, __values(primitiveManager.stompSubscriptions)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
6671
|
+
var stompSubscription = _g.value;
|
|
6594
6672
|
stompSubscription.unsubscribe();
|
|
6595
6673
|
}
|
|
6596
6674
|
}
|
|
6597
|
-
catch (
|
|
6675
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
6598
6676
|
finally {
|
|
6599
6677
|
try {
|
|
6600
|
-
if (
|
|
6678
|
+
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
6601
6679
|
}
|
|
6602
|
-
finally { if (
|
|
6680
|
+
finally { if (e_4) throw e_4.error; }
|
|
6603
6681
|
}
|
|
6604
|
-
}
|
|
6682
|
+
}
|
|
6683
|
+
}
|
|
6684
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
6685
|
+
finally {
|
|
6605
6686
|
try {
|
|
6606
|
-
|
|
6607
|
-
var primitiveManager = _f.value;
|
|
6608
|
-
primitiveManager.subject.complete();
|
|
6609
|
-
}
|
|
6687
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
6610
6688
|
}
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6689
|
+
finally { if (e_3) throw e_3.error; }
|
|
6690
|
+
}
|
|
6691
|
+
try {
|
|
6692
|
+
for (var _h = __values(this.primitiveManagers.values()), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
6693
|
+
var primitiveManager = _j.value;
|
|
6694
|
+
primitiveManager.subject.complete();
|
|
6617
6695
|
}
|
|
6618
|
-
this.stompSubscriptions.clear();
|
|
6619
|
-
this.primitiveManagers.clear();
|
|
6620
|
-
this._stompClient.disconnect();
|
|
6621
|
-
this._stompClient.deactivate();
|
|
6622
|
-
this.setConnected(false);
|
|
6623
|
-
this.isConnecting = false;
|
|
6624
|
-
this.disconnectSubject.next();
|
|
6625
6696
|
}
|
|
6697
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
6698
|
+
finally {
|
|
6699
|
+
try {
|
|
6700
|
+
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
6701
|
+
}
|
|
6702
|
+
finally { if (e_5) throw e_5.error; }
|
|
6703
|
+
}
|
|
6704
|
+
this.primitiveManagers.clear();
|
|
6705
|
+
this._stompClient.disconnect();
|
|
6706
|
+
this._stompClient.deactivate();
|
|
6707
|
+
this.setConnected(false);
|
|
6708
|
+
this.isConnecting = false;
|
|
6709
|
+
this.wasConnected = false;
|
|
6710
|
+
this.disconnect$.next();
|
|
6626
6711
|
};
|
|
6627
6712
|
WebsocketService.prototype.isConnected = function () {
|
|
6628
6713
|
return this.connected;
|
|
@@ -6650,46 +6735,104 @@ var WebsocketService = /** @class */ (function () {
|
|
|
6650
6735
|
WebsocketService.prototype.createStompClient = function () {
|
|
6651
6736
|
var ws = new SockJS(WebsocketService_1.WEBSOCKET_URL + "subscription", null, { timeout: WebsocketService_1.CONNECTION_TIMEOUT });
|
|
6652
6737
|
this._stompClient = Stomp.over(ws);
|
|
6738
|
+
// this._stompClient.debug = (str) => console.log(new Date().toISOString(), str);
|
|
6653
6739
|
this._stompClient.debug = function () { }; // Para remover os logs.
|
|
6654
6740
|
};
|
|
6655
|
-
WebsocketService.prototype.
|
|
6656
|
-
return this.cookieService.get("com.senior.base.url");
|
|
6657
|
-
};
|
|
6658
|
-
WebsocketService.prototype.getUserName = function () {
|
|
6659
|
-
var token = this.cookieService.get("com.senior.token");
|
|
6660
|
-
return token && JSON.parse(token).username;
|
|
6661
|
-
};
|
|
6662
|
-
WebsocketService.prototype.reconnectWebSocket = function () {
|
|
6741
|
+
WebsocketService.prototype.reconnect = function () {
|
|
6663
6742
|
var _this = this;
|
|
6664
|
-
this.
|
|
6665
|
-
|
|
6666
|
-
if (this.baseUrl !== null && baseUrl != this.baseUrl) {
|
|
6667
|
-
return;
|
|
6668
|
-
}
|
|
6669
|
-
var username = this.getUserName();
|
|
6670
|
-
if (this.username !== null && username != this.username) {
|
|
6671
|
-
return;
|
|
6672
|
-
}
|
|
6743
|
+
if (this.connected)
|
|
6744
|
+
this._stompClient.disconnect();
|
|
6673
6745
|
setTimeout(function () {
|
|
6746
|
+
if (_this.getObserversCount() === 0)
|
|
6747
|
+
return;
|
|
6674
6748
|
if (_this.focused) {
|
|
6675
6749
|
_this.connect();
|
|
6676
6750
|
}
|
|
6677
6751
|
else {
|
|
6678
|
-
_this.
|
|
6752
|
+
_this.reconnect();
|
|
6679
6753
|
}
|
|
6680
6754
|
}, WebsocketService_1.RECONNECT_TIMER);
|
|
6681
6755
|
};
|
|
6756
|
+
WebsocketService.prototype.reconnectPrimitives = function () {
|
|
6757
|
+
var e_6, _a, e_7, _b;
|
|
6758
|
+
try {
|
|
6759
|
+
for (var _c = __values(this.primitiveManagers.values()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
6760
|
+
var primitiveManager = _d.value;
|
|
6761
|
+
try {
|
|
6762
|
+
for (var _e = (e_7 = void 0, __values(primitiveManager.stompSubscriptions)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
6763
|
+
var stompSubscription = _f.value;
|
|
6764
|
+
stompSubscription.unsubscribe();
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6767
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
6768
|
+
finally {
|
|
6769
|
+
try {
|
|
6770
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
6771
|
+
}
|
|
6772
|
+
finally { if (e_7) throw e_7.error; }
|
|
6773
|
+
}
|
|
6774
|
+
this.createStompSubscriptions(primitiveManager);
|
|
6775
|
+
}
|
|
6776
|
+
}
|
|
6777
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
6778
|
+
finally {
|
|
6779
|
+
try {
|
|
6780
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
6781
|
+
}
|
|
6782
|
+
finally { if (e_6) throw e_6.error; }
|
|
6783
|
+
}
|
|
6784
|
+
};
|
|
6785
|
+
WebsocketService.prototype.getObserversCount = function () {
|
|
6786
|
+
var e_8, _a;
|
|
6787
|
+
var observersCount = 0;
|
|
6788
|
+
try {
|
|
6789
|
+
for (var _b = __values(this.primitiveManagers.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
6790
|
+
var primitiveManager = _c.value;
|
|
6791
|
+
observersCount += primitiveManager.subject.observers.length;
|
|
6792
|
+
}
|
|
6793
|
+
}
|
|
6794
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
6795
|
+
finally {
|
|
6796
|
+
try {
|
|
6797
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6798
|
+
}
|
|
6799
|
+
finally { if (e_8) throw e_8.error; }
|
|
6800
|
+
}
|
|
6801
|
+
return observersCount;
|
|
6802
|
+
};
|
|
6803
|
+
WebsocketService.prototype.disconnectPrimitiveOnFinalize = function (primitive) {
|
|
6804
|
+
var e_9, _a;
|
|
6805
|
+
var primitiveManager = this.primitiveManagers.get(primitive);
|
|
6806
|
+
if (!primitiveManager)
|
|
6807
|
+
return;
|
|
6808
|
+
// @IMPORTANT: Replace .observers.length with .observed in rxjs 7.0+
|
|
6809
|
+
var hasObservers = !(primitiveManager.subject.observers.length === 1);
|
|
6810
|
+
if (hasObservers)
|
|
6811
|
+
return;
|
|
6812
|
+
try {
|
|
6813
|
+
for (var _b = __values(primitiveManager.stompSubscriptions), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
6814
|
+
var stompSubscription = _c.value;
|
|
6815
|
+
stompSubscription.unsubscribe();
|
|
6816
|
+
}
|
|
6817
|
+
}
|
|
6818
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
6819
|
+
finally {
|
|
6820
|
+
try {
|
|
6821
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
6822
|
+
}
|
|
6823
|
+
finally { if (e_9) throw e_9.error; }
|
|
6824
|
+
}
|
|
6825
|
+
this.primitiveManagers.delete(primitive);
|
|
6826
|
+
this.disconnect();
|
|
6827
|
+
};
|
|
6682
6828
|
var WebsocketService_1;
|
|
6683
6829
|
WebsocketService.RECONNECT_TIMER = 3000;
|
|
6684
|
-
WebsocketService.CONNECTION_TIMEOUT =
|
|
6830
|
+
WebsocketService.CONNECTION_TIMEOUT = 15000;
|
|
6685
6831
|
WebsocketService.BASE_URL_COOKIE = "com.senior.base.url";
|
|
6686
6832
|
WebsocketService.TOKEN_COOKIE = "com.senior.token";
|
|
6687
6833
|
WebsocketService.TOKEN = JSON.parse(get(WebsocketService_1.TOKEN_COOKIE) || "{}");
|
|
6688
6834
|
WebsocketService.WEBSOCKET_URL = get(WebsocketService_1.BASE_URL_COOKIE) + "/websocket/";
|
|
6689
|
-
WebsocketService
|
|
6690
|
-
{ type: CookieService }
|
|
6691
|
-
]; };
|
|
6692
|
-
WebsocketService.ɵprov = ɵɵdefineInjectable({ factory: function WebsocketService_Factory() { return new WebsocketService(ɵɵinject(CookieService)); }, token: WebsocketService, providedIn: "root" });
|
|
6835
|
+
WebsocketService.ɵprov = ɵɵdefineInjectable({ factory: function WebsocketService_Factory() { return new WebsocketService(); }, token: WebsocketService, providedIn: "root" });
|
|
6693
6836
|
WebsocketService = WebsocketService_1 = __decorate([
|
|
6694
6837
|
Injectable({
|
|
6695
6838
|
providedIn: "root",
|
|
@@ -6776,5 +6919,5 @@ var ModulesEnum;
|
|
|
6776
6919
|
* Generated bundle index. Do not edit.
|
|
6777
6920
|
*/
|
|
6778
6921
|
|
|
6779
|
-
export { BankLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E082TprLookup, E085PesLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E600CcoLookup, E640LotLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NpsService, ParametersLookup, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, WebsocketService, naturezaReceitaPisCofins, ErpLookupsService as ɵa, StorageService as ɵb, VerifyModulePermissionService as ɵc };
|
|
6922
|
+
export { BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E082TprLookup, E085PesLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E600CcoLookup, E640LotLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NpsService, ParametersLookup, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, WebsocketService, naturezaReceitaPisCofins, ErpLookupsService as ɵa, StorageService as ɵb, VerifyModulePermissionService as ɵc };
|
|
6780
6923
|
//# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map
|