@senior-gestao-empresarial/angular-components 6.11.5-f1ae0f56-eaa0-41bd-bf14-efca8153a452 → 6.12.0-29fe646c-2d98-4822-8690-597195a76ad7

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 (49) hide show
  1. package/bundles/senior-gestao-empresarial-angular-components.umd.js +514 -255
  2. package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
  3. package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +2 -2
  4. package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
  5. package/components/permissions/index.d.ts +1 -0
  6. package/components/permissions/verify-module-permissions-service.d.ts +18 -0
  7. package/components/permissions/verify-module-permissions.d.ts +16 -0
  8. package/components/utils/async-lock.d.ts +6 -0
  9. package/components/websocket/index.d.ts +2 -0
  10. package/components/websocket/models/index.d.ts +1 -0
  11. package/components/websocket/models/primitive-manager.d.ts +19 -0
  12. package/components/websocket/protocols/index.d.ts +2 -0
  13. package/components/websocket/protocols/on-event-options.d.ts +8 -0
  14. package/components/websocket/protocols/primitive-event.d.ts +10 -0
  15. package/components/websocket/user-information.service.d.ts +7 -0
  16. package/components/websocket/websocket.service.d.ts +78 -74
  17. package/esm2015/components/permissions/index.js +2 -1
  18. package/esm2015/components/permissions/verify-module-permissions-service.js +26 -0
  19. package/esm2015/components/permissions/verify-module-permissions.js +51 -0
  20. package/esm2015/components/utils/async-lock.js +34 -0
  21. package/esm2015/components/websocket/index.js +2 -1
  22. package/esm2015/components/websocket/models/index.js +2 -0
  23. package/esm2015/components/websocket/models/primitive-manager.js +39 -0
  24. package/esm2015/components/websocket/protocols/index.js +1 -0
  25. package/esm2015/components/websocket/protocols/on-event-options.js +1 -0
  26. package/esm2015/components/websocket/protocols/primitive-event.js +1 -0
  27. package/esm2015/components/websocket/user-information.service.js +34 -0
  28. package/esm2015/components/websocket/websocket.service.js +260 -195
  29. package/esm2015/senior-gestao-empresarial-angular-components.js +4 -2
  30. package/esm5/components/permissions/index.js +2 -1
  31. package/esm5/components/permissions/verify-module-permissions-service.js +28 -0
  32. package/esm5/components/permissions/verify-module-permissions.js +53 -0
  33. package/esm5/components/utils/async-lock.js +43 -0
  34. package/esm5/components/websocket/index.js +2 -1
  35. package/esm5/components/websocket/models/index.js +2 -0
  36. package/esm5/components/websocket/models/primitive-manager.js +58 -0
  37. package/esm5/components/websocket/protocols/index.js +1 -0
  38. package/esm5/components/websocket/protocols/on-event-options.js +1 -0
  39. package/esm5/components/websocket/protocols/primitive-event.js +1 -0
  40. package/esm5/components/websocket/user-information.service.js +38 -0
  41. package/esm5/components/websocket/websocket.service.js +318 -256
  42. package/esm5/senior-gestao-empresarial-angular-components.js +4 -2
  43. package/fesm2015/senior-gestao-empresarial-angular-components.js +418 -193
  44. package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
  45. package/fesm5/senior-gestao-empresarial-angular-components.js +510 -255
  46. package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
  47. package/package.json +3 -3
  48. package/senior-gestao-empresarial-angular-components.d.ts +3 -1
  49. package/senior-gestao-empresarial-angular-components.metadata.json +1 -1
@@ -3,8 +3,8 @@ import { Input, Component, NgModule, Injectable, Inject, ɵɵdefineInjectable,
3
3
  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
- import { Subject, throwError, interval, of, BehaviorSubject, race, timer, iif, fromEvent, ReplaySubject } from 'rxjs';
7
- import { takeUntil, filter, catchError, map, takeWhile, switchMap, take, finalize, first } from 'rxjs/operators';
6
+ import { Subject, throwError, interval, of, BehaviorSubject, ReplaySubject } from 'rxjs';
7
+ import { takeUntil, filter, catchError, map, takeWhile, switchMap, take, finalize } 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';
@@ -13,9 +13,9 @@ import { TranslateService } from '@ngx-translate/core';
13
13
  import { HttpInterceptorModule } from '@seniorsistemas/platform-components';
14
14
  import { user } from '@seniorsistemas/senior-platform-data';
15
15
  import { FormControl, FormGroup } from '@angular/forms';
16
- import { Stomp } from '@stomp/stompjs';
17
- import { get } from 'js-cookie';
16
+ import { Client } from '@stomp/stompjs';
18
17
  import * as SockJS from 'sockjs-client';
18
+ import { get } from 'js-cookie';
19
19
 
20
20
  var BreadcrumbComponent = /** @class */ (function () {
21
21
  function BreadcrumbComponent(activatedRoute, router) {
@@ -7206,320 +7206,508 @@ var NpsService = /** @class */ (function () {
7206
7206
  return NpsService;
7207
7207
  }());
7208
7208
 
7209
+ var AsyncLock = /** @class */ (function () {
7210
+ function AsyncLock() {
7211
+ this.queue = [];
7212
+ this.acquired = false;
7213
+ }
7214
+ AsyncLock.prototype.acquire = function () {
7215
+ return __awaiter(this, void 0, void 0, function () {
7216
+ var _this = this;
7217
+ return __generator(this, function (_a) {
7218
+ if (!this.acquired) {
7219
+ this.acquired = true;
7220
+ return [2 /*return*/, Promise.resolve()];
7221
+ }
7222
+ else {
7223
+ return [2 /*return*/, new Promise(function (resolve, _) {
7224
+ _this.queue.push(resolve);
7225
+ })];
7226
+ }
7227
+ return [2 /*return*/];
7228
+ });
7229
+ });
7230
+ };
7231
+ AsyncLock.prototype.release = function () {
7232
+ return __awaiter(this, void 0, void 0, function () {
7233
+ var continuation;
7234
+ return __generator(this, function (_a) {
7235
+ if (this.queue.length === 0 && this.acquired) {
7236
+ this.acquired = false;
7237
+ return [2 /*return*/, Promise.resolve()];
7238
+ }
7239
+ continuation = this.queue.shift();
7240
+ return [2 /*return*/, new Promise(function (res) {
7241
+ continuation();
7242
+ res();
7243
+ })];
7244
+ });
7245
+ });
7246
+ };
7247
+ return AsyncLock;
7248
+ }());
7249
+
7250
+ var UserInformationService = /** @class */ (function () {
7251
+ function UserInformationService() {
7252
+ }
7253
+ UserInformationService_1 = UserInformationService;
7254
+ UserInformationService.prototype.getAuthToken = function () {
7255
+ var cookieValue = get(UserInformationService_1.TOKEN_COOKIE_KEY) || '{}';
7256
+ var authToken = JSON.parse(cookieValue);
7257
+ return authToken.access_token;
7258
+ };
7259
+ UserInformationService.prototype.getTenantDomain = function () {
7260
+ var cookieValue = get(UserInformationService_1.TOKEN_COOKIE_KEY) || '{}';
7261
+ var authToken = JSON.parse(cookieValue);
7262
+ return authToken.username.split('@')[1];
7263
+ };
7264
+ UserInformationService.prototype.getWebSocketUrl = function () {
7265
+ var baseUrl = get(UserInformationService_1.BASE_URL_COOKIE_KEY);
7266
+ if (!baseUrl.endsWith('/')) {
7267
+ baseUrl += '/';
7268
+ }
7269
+ return baseUrl + 'websocket';
7270
+ };
7271
+ var UserInformationService_1;
7272
+ UserInformationService.BASE_URL_COOKIE_KEY = 'com.senior.base.url';
7273
+ UserInformationService.TOKEN_COOKIE_KEY = 'com.senior.token';
7274
+ UserInformationService.ɵprov = ɵɵdefineInjectable({ factory: function UserInformationService_Factory() { return new UserInformationService(); }, token: UserInformationService, providedIn: "root" });
7275
+ UserInformationService = UserInformationService_1 = __decorate([
7276
+ Injectable({
7277
+ providedIn: 'root'
7278
+ })
7279
+ ], UserInformationService);
7280
+ return UserInformationService;
7281
+ }());
7282
+
7283
+ var PrimitiveManager = /** @class */ (function () {
7284
+ function PrimitiveManager(domain, service, primitive) {
7285
+ this.domain = domain;
7286
+ this.service = service;
7287
+ this.primitive = primitive;
7288
+ this.stompSubscriptions = [];
7289
+ this.event$ = new Subject();
7290
+ this.subscribed$ = new BehaviorSubject(false);
7291
+ }
7292
+ PrimitiveManager.prototype.unsubscribe = function () {
7293
+ var e_1, _a;
7294
+ this.event$.complete();
7295
+ try {
7296
+ for (var _b = __values(this.stompSubscriptions), _c = _b.next(); !_c.done; _c = _b.next()) {
7297
+ var stompSubscription = _c.value;
7298
+ stompSubscription.unsubscribe();
7299
+ }
7300
+ }
7301
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
7302
+ finally {
7303
+ try {
7304
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7305
+ }
7306
+ finally { if (e_1) throw e_1.error; }
7307
+ }
7308
+ this.subscribed$.complete();
7309
+ };
7310
+ PrimitiveManager.prototype.fireEvent = function (event) {
7311
+ this.event$.next(event);
7312
+ };
7313
+ PrimitiveManager.prototype.subscribe = function () {
7314
+ var _a;
7315
+ var subscriptions = [];
7316
+ for (var _i = 0; _i < arguments.length; _i++) {
7317
+ subscriptions[_i] = arguments[_i];
7318
+ }
7319
+ (_a = this.stompSubscriptions).push.apply(_a, __spread(subscriptions));
7320
+ this.subscribed$.next(true);
7321
+ };
7322
+ PrimitiveManager.prototype.getEventObservable = function () {
7323
+ return this.event$.asObservable();
7324
+ };
7325
+ PrimitiveManager.prototype.getSubscriptionObservable = function () {
7326
+ return this.subscribed$.asObservable();
7327
+ };
7328
+ PrimitiveManager.prototype.hasObservers = function () {
7329
+ // @IMPORTANT: Replace .observers.length === 1 with .observed in rxjs 7.0+
7330
+ return this.event$.observers.length !== 1;
7331
+ };
7332
+ PrimitiveManager.prototype.getObserversCount = function () {
7333
+ return this.event$.observers.length;
7334
+ };
7335
+ return PrimitiveManager;
7336
+ }());
7337
+
7338
+ var RECONNECT_INTERVAL_MILLISECONDS = 3000;
7339
+ var CONNECTION_TIMEOUT_MILLISECONDS = 5000;
7209
7340
  var WebsocketService = /** @class */ (function () {
7210
- function WebsocketService() {
7211
- /** @private */
7212
- this.wasConnected = false;
7213
- /** @private */
7214
- this.isConnected = false;
7215
- /** @private */
7216
- this.isConnecting = false;
7217
- /** @private */
7218
- this.primitiveManagers = new Map();
7219
- /** @private */
7341
+ function WebsocketService(userInformationService) {
7342
+ this.userInformationService = userInformationService;
7220
7343
  this.connected$ = new BehaviorSubject(false);
7221
- /** @private */
7222
- this.disconnect$ = new Subject();
7223
- /** @private */
7224
- this.reconnect$ = new Subject();
7225
- /** @private */
7344
+ this.disconnected$ = new Subject();
7345
+ this.reconnected$ = new Subject();
7226
7346
  this.error$ = new Subject();
7227
7347
  this.subscribed$ = new Subject();
7348
+ this.primitiveManagers = new Map();
7349
+ this.connectionLock = new AsyncLock();
7350
+ this.debugEnable = false;
7351
+ this.lostConnection = false;
7228
7352
  }
7229
- WebsocketService_1 = WebsocketService;
7230
7353
  /**
7231
- * Observable responsável por emitir uma notificação quando a conexão websocket é estabelecida pela primeira vez.
7232
- * @return Um `Observable<void>` que emite uma notificação quando a conexão websocket é estabelecida pela primeira vez.
7354
+ * Enables stompjs debug logs and additional info
7233
7355
  */
7234
- WebsocketService.prototype.onConnect = function () {
7235
- return this.connected$.asObservable().pipe(filter(Boolean), map(function () { return undefined; }), take(1));
7356
+ WebsocketService.prototype.enableDebugLogs = function () {
7357
+ this.debugEnable = true;
7236
7358
  };
7237
7359
  /**
7238
- * Observable responsável por emitir uma notificação quando a conexão é desconectada.
7239
- * @return Um `Observable<void>` que emite uma notificação quando a conexão é desconectada.
7360
+ * Manually starts the connection
7240
7361
  */
7241
- WebsocketService.prototype.onDisconnect = function () {
7242
- return this.disconnect$.asObservable();
7362
+ WebsocketService.prototype.connect = function () {
7363
+ return __awaiter(this, void 0, void 0, function () {
7364
+ var stompConfig;
7365
+ var _this = this;
7366
+ return __generator(this, function (_a) {
7367
+ switch (_a.label) {
7368
+ case 0: return [4 /*yield*/, this.connectionLock.acquire()];
7369
+ case 1:
7370
+ _a.sent();
7371
+ _a.label = 2;
7372
+ case 2:
7373
+ _a.trys.push([2, , 3, 5]);
7374
+ if (this.isConnected() || this.isConnecting()) {
7375
+ return [2 /*return*/];
7376
+ }
7377
+ this.lostConnection = false;
7378
+ stompConfig = {
7379
+ webSocketFactory: function () {
7380
+ return new SockJS(_this.getSubscriptionUrl(), null, {
7381
+ timeout: CONNECTION_TIMEOUT_MILLISECONDS
7382
+ });
7383
+ },
7384
+ connectionTimeout: CONNECTION_TIMEOUT_MILLISECONDS,
7385
+ reconnectDelay: RECONNECT_INTERVAL_MILLISECONDS,
7386
+ debug: this.debug.bind(this),
7387
+ onConnect: this.handleOnConnected.bind(this),
7388
+ onDisconnect: this.handleOnDisconnect.bind(this),
7389
+ onWebSocketClose: this.handleOnWebSocketClose.bind(this),
7390
+ onStompError: this.handleOnStompError.bind(this),
7391
+ onWebSocketError: this.handleOnWebSocketError.bind(this)
7392
+ };
7393
+ this.debug('Connecting the Webscoket');
7394
+ this.stompClient = new Client(stompConfig);
7395
+ this.stompClient.activate();
7396
+ return [3 /*break*/, 5];
7397
+ case 3: return [4 /*yield*/, this.connectionLock.release()];
7398
+ case 4:
7399
+ _a.sent();
7400
+ return [7 /*endfinally*/];
7401
+ case 5: return [2 /*return*/];
7402
+ }
7403
+ });
7404
+ });
7243
7405
  };
7244
7406
  /**
7245
- * Observable responsável por emitir uma notificação quando a conexão é reconectada.
7246
- * @return Um `Observable<void>` que emite uma notificação quando a conexão é reconectada.
7407
+ * Manually disconnect the websocket. The reconnect loop will be stopped.
7247
7408
  */
7248
- WebsocketService.prototype.onReconnect = function () {
7249
- return this.reconnect$.asObservable();
7409
+ WebsocketService.prototype.disconnect = function () {
7410
+ return __awaiter(this, void 0, void 0, function () {
7411
+ var _a, _b, primitiveManager;
7412
+ var e_1, _c;
7413
+ return __generator(this, function (_d) {
7414
+ switch (_d.label) {
7415
+ case 0:
7416
+ if (!this.isConnected()) {
7417
+ return [2 /*return*/];
7418
+ }
7419
+ return [4 /*yield*/, this.connectionLock.acquire()];
7420
+ case 1:
7421
+ _d.sent();
7422
+ _d.label = 2;
7423
+ case 2:
7424
+ _d.trys.push([2, , 5, 7]);
7425
+ try {
7426
+ for (_a = __values(this.primitiveManagers.values()), _b = _a.next(); !_b.done; _b = _a.next()) {
7427
+ primitiveManager = _b.value;
7428
+ primitiveManager.unsubscribe();
7429
+ }
7430
+ }
7431
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
7432
+ finally {
7433
+ try {
7434
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
7435
+ }
7436
+ finally { if (e_1) throw e_1.error; }
7437
+ }
7438
+ this.primitiveManagers.clear();
7439
+ this.connected$.next(false);
7440
+ if (!this.stompClient) return [3 /*break*/, 4];
7441
+ this.stompClient.forceDisconnect();
7442
+ return [4 /*yield*/, this.stompClient.deactivate()];
7443
+ case 3:
7444
+ _d.sent();
7445
+ _d.label = 4;
7446
+ case 4: return [3 /*break*/, 7];
7447
+ case 5: return [4 /*yield*/, this.connectionLock.release()];
7448
+ case 6:
7449
+ _d.sent();
7450
+ return [7 /*endfinally*/];
7451
+ case 7: return [2 /*return*/];
7452
+ }
7453
+ });
7454
+ });
7250
7455
  };
7251
7456
  /**
7252
- * Observable responsável por emitir uma notificação após o subscribe do evento pela primeira vez.
7253
- * @return Um `Observable<void>` que emite uma notificação após o subscribe do evento pela primeira vez.
7457
+ * Check if the websocket is connected
7458
+ * @return `boolean` representing if the websocket is connected
7254
7459
  */
7255
- WebsocketService.prototype.onSubscribe = function (_a) {
7256
- var _this = this;
7257
- var domain = _a.domain, service = _a.service, primitive = _a.primitive;
7258
- var key = this.getPrimitiveManagerKey(domain, service, primitive);
7259
- return this.onConnect().pipe(switchMap(function () {
7260
- if (_this.primitiveManagers.has(key))
7261
- return _this.primitiveManagers
7262
- .get(key)
7263
- .subscribed$.asObservable()
7264
- .pipe(map(function () { return undefined; }), take(1));
7265
- return _this.subscribed$.asObservable().pipe(filter(function (primitiveManager) {
7266
- return _this.getPrimitiveManagerKey(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive) === key;
7267
- }), map(function () { return undefined; }), take(1));
7268
- }));
7460
+ WebsocketService.prototype.isConnected = function () {
7461
+ if (!this.stompClient) {
7462
+ return false;
7463
+ }
7464
+ return this.stompClient.connected;
7465
+ };
7466
+ /**
7467
+ * Check if the websocket is tring to connect
7468
+ * @return `boolean` representing if the websocket status
7469
+ */
7470
+ WebsocketService.prototype.isConnecting = function () {
7471
+ if (!this.stompClient) {
7472
+ return false;
7473
+ }
7474
+ return !this.stompClient.connected && this.stompClient.active;
7269
7475
  };
7270
7476
  /**
7271
- * Observable responsável por emitir uma notificação quando ocorre algum erro.
7272
- * @return Um `Observable<FrameImpl>` que emite uma notificação quando ocorre algum erro.
7477
+ * Event responsable to emit an event when the connection is established.
7478
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7479
+ * @return `Observable<boolean>`
7480
+ */
7481
+ WebsocketService.prototype.onConnect = function () {
7482
+ return this.connected$.asObservable()
7483
+ .pipe(filter(function (p) { return p === true; }));
7484
+ };
7485
+ /**
7486
+ * Event responsable to emit an event when the connection is closed.
7487
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7488
+ * @return `Observable<void>`
7489
+ */
7490
+ WebsocketService.prototype.onDisconnect = function () {
7491
+ return this.disconnected$.asObservable();
7492
+ };
7493
+ /**
7494
+ * Event responsable to emit an event when the connection is reestablished.
7495
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7496
+ * @return `Observable<void>`
7497
+ */
7498
+ WebsocketService.prototype.onReconnect = function () {
7499
+ return this.reconnected$.asObservable();
7500
+ };
7501
+ /**
7502
+ * Event responsable to emit an event when an error ocurred.
7503
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7504
+ * @return `Observable<FrameImpl>`
7273
7505
  */
7274
7506
  WebsocketService.prototype.onError = function () {
7275
7507
  return this.error$.asObservable();
7276
7508
  };
7277
7509
  /**
7278
- * @typeParam `<T>` Tipo do objeto que o retorno do `observable` vai devolver.
7279
- * @param {Object} options Objeto de configuração do evento.
7280
- * @param {string} options.domain Domínio da primitiva.
7281
- * @param {string} options.service Serviço da primitiva.
7282
- * @param {string} options.primitive Primitiva que será "observada".
7283
- * @return Um Observable<T> que emite notificações toda vez que o respectivo evento é publicado.
7510
+ * Event responsible to emit an event when a primitive is called.
7511
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7512
+ * @typeParam `<T>` Object type that will be used in the observable for the `data` property.
7513
+ * @param {OnEventOptions} options Configurations for the event.
7514
+ * @return `Observable<PrimitiveEvent<T>>` Observable that emits an event when the service calls the primitive.
7284
7515
  */
7285
7516
  WebsocketService.prototype.onEvent = function (options) {
7286
7517
  var _this = this;
7287
- this.connect();
7288
7518
  var domain = options.domain, service = options.service, primitive = options.primitive;
7289
- var key = this.getPrimitiveManagerKey(domain, service, primitive);
7519
+ var key = this.buildPrimitiveManagerKey(domain, service, primitive);
7290
7520
  if (this.primitiveManagers.has(key)) {
7291
- return this.primitiveManagers.get(key).event$.asObservable();
7521
+ return this.primitiveManagers.get(key).getEventObservable();
7292
7522
  }
7293
- var primitiveManager = {
7294
- domain: domain,
7295
- service: service,
7296
- primitive: primitive,
7297
- stompSubscriptions: [],
7298
- event$: new Subject(),
7299
- subscribed$: new BehaviorSubject(false)
7300
- };
7523
+ var primitiveManager = new PrimitiveManager(domain, service, primitive);
7301
7524
  this.primitiveManagers.set(key, primitiveManager);
7302
- this.onConnect()
7303
- .pipe(take(1))
7304
- .subscribe(function () {
7305
- _this.createStompSubscriptions(primitiveManager);
7525
+ this.connect().then(function () {
7526
+ _this.onConnect()
7527
+ .pipe(take(1))
7528
+ .subscribe(function () {
7529
+ _this.createStompSubscriptions(primitiveManager);
7530
+ });
7306
7531
  });
7307
- return primitiveManager.event$
7308
- .asObservable()
7309
- .pipe(finalize(function () { return _this.disconnectPrimitiveOnFinalize(primitiveManager); }));
7310
- };
7311
- /** @private */
7312
- WebsocketService.prototype.createStompSubscriptions = function (primitiveManager) {
7313
- var withTokenUrl = this.getSubscriptionUrlWithToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7314
- var stompSubscriptionWithToken = this.createStompSubscription(withTokenUrl, primitiveManager);
7315
- var withoutTokenUrl = this.getSubscriptionUrlWithoutToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7316
- var stompSubscriptionWithoutToken = this.createStompSubscription(withoutTokenUrl, primitiveManager);
7317
- primitiveManager.stompSubscriptions = [
7318
- stompSubscriptionWithToken,
7319
- stompSubscriptionWithoutToken
7320
- ];
7321
- primitiveManager.subscribed$.next(true);
7322
- this.subscribed$.next(primitiveManager);
7532
+ return primitiveManager
7533
+ .getEventObservable()
7534
+ .pipe(finalize(function () { return _this.unsubscribePrimitiveOnFinalize(primitiveManager); }));
7323
7535
  };
7324
- /** @private */
7325
- WebsocketService.prototype.connect = function () {
7536
+ /**
7537
+ * Event responsible to emit an event when a subscription is created for the primitive.
7538
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7539
+ * @param {OnEventOptions} options Configurations for the event.
7540
+ * Observable responsável por emitir uma notificação após o subscribe do evento pela primeira vez.
7541
+ * @return `Observable<boolean>` Observable that emits an event when the service calls the primitive.
7542
+ */
7543
+ WebsocketService.prototype.onSubscribe = function (options) {
7326
7544
  var _this = this;
7327
- if (this.isConnected || this.isConnecting)
7328
- return;
7329
- this.createStompClient();
7330
- this.isConnecting = true;
7331
- this._stompClient.connect({}, function () {
7332
- _this.isConnecting = false;
7333
- _this.isConnected = true;
7334
- if (_this.wasConnected) {
7335
- _this.reconnectPrimitives();
7336
- _this.connected$.next(true);
7337
- _this.reconnect$.next();
7545
+ var domain = options.domain, service = options.service, primitive = options.primitive;
7546
+ var key = this.buildPrimitiveManagerKey(domain, service, primitive);
7547
+ return this.onConnect().pipe(take(1), switchMap(function () {
7548
+ if (_this.primitiveManagers.has(key)) {
7549
+ return _this.primitiveManagers
7550
+ .get(key)
7551
+ .getSubscriptionObservable()
7552
+ .pipe(take(1));
7338
7553
  }
7339
- else {
7340
- _this.wasConnected = true;
7341
- _this.connected$.next(true);
7342
- }
7343
- }, function (error) {
7344
- _this.isConnected = false;
7345
- _this.connected$.next(false);
7346
- _this.error$.next(error);
7347
- race(_this.disconnect$.pipe(take(1), map(function () { return ({ wasDisconnected: true }); })), timer(WebsocketService_1.RECONNECT_INTERVAL).pipe(take(1), switchMap(function () {
7348
- return iif(function () { return document.hidden; }, fromEvent(document, 'visibilitychange').pipe(first()), of(void 0));
7349
- }), map(function () { return ({ wasDisconnected: false }); })))
7350
- .pipe(take(1))
7351
- .subscribe({
7352
- next: function (_a) {
7353
- var wasDisconnected = _a.wasDisconnected;
7354
- if (!wasDisconnected &&
7355
- !(_this.isConnected || _this.isConnecting)) {
7356
- _this.connect();
7357
- }
7358
- }
7359
- });
7360
- });
7554
+ return _this.subscribed$.asObservable().pipe(filter(function (primitiveManager) {
7555
+ return _this.buildPrimitiveManagerKey(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive) === key;
7556
+ }), map(function () { return true; }), take(1));
7557
+ }));
7361
7558
  };
7362
- WebsocketService.prototype.disconnect = function () {
7363
- var e_1, _a, e_2, _b, e_3, _c;
7364
- if (!this.isConnected || this.getObserversCount() > 0) {
7559
+ WebsocketService.prototype.debug = function (message) {
7560
+ var optionalParams = [];
7561
+ for (var _i = 1; _i < arguments.length; _i++) {
7562
+ optionalParams[_i - 1] = arguments[_i];
7563
+ }
7564
+ if (!this.debugEnable) {
7365
7565
  return;
7366
7566
  }
7367
- try {
7368
- for (var _d = __values(this.primitiveManagers.values()), _e = _d.next(); !_e.done; _e = _d.next()) {
7369
- var primitiveManager = _e.value;
7370
- try {
7371
- for (var _f = (e_2 = void 0, __values(primitiveManager.stompSubscriptions)), _g = _f.next(); !_g.done; _g = _f.next()) {
7372
- var stompSubscription = _g.value;
7373
- stompSubscription.unsubscribe();
7374
- }
7375
- }
7376
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
7377
- finally {
7378
- try {
7379
- if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
7380
- }
7381
- finally { if (e_2) throw e_2.error; }
7382
- }
7383
- }
7567
+ console.log.apply(console, __spread(['WS debug: ' + message], optionalParams));
7568
+ };
7569
+ WebsocketService.prototype.info = function (message) {
7570
+ console.info('WS info: ' + message);
7571
+ };
7572
+ WebsocketService.prototype.handleOnConnected = function () {
7573
+ this.info('Webscoket connected');
7574
+ this.connected$.next(true);
7575
+ if (this.lostConnection) {
7576
+ this.info('Webscoket reconnected, recriating subscriptions');
7577
+ this.handleReconnection();
7384
7578
  }
7385
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
7386
- finally {
7387
- try {
7388
- if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
7389
- }
7390
- finally { if (e_1) throw e_1.error; }
7579
+ };
7580
+ WebsocketService.prototype.handleOnDisconnect = function () {
7581
+ this.info('Webscoket disconnected');
7582
+ this.connected$.next(false);
7583
+ this.disconnected$.next();
7584
+ };
7585
+ WebsocketService.prototype.handleOnWebSocketClose = function (data) {
7586
+ if (data.wasClean) {
7587
+ return;
7391
7588
  }
7392
- try {
7393
- for (var _h = __values(this.primitiveManagers.values()), _j = _h.next(); !_j.done; _j = _h.next()) {
7394
- var primitiveManager = _j.value;
7395
- primitiveManager.event$.complete();
7396
- }
7589
+ this.lostConnection = true;
7590
+ };
7591
+ WebsocketService.prototype.handleOnStompError = function (data) {
7592
+ this.handleError('StompError', data);
7593
+ if (this.isAuthenticationError(data)) {
7594
+ this.info('Authentication error, recriating subscriptions');
7595
+ this.handleReconnection();
7397
7596
  }
7398
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
7399
- finally {
7400
- try {
7401
- if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
7402
- }
7403
- finally { if (e_3) throw e_3.error; }
7597
+ };
7598
+ WebsocketService.prototype.isAuthenticationError = function (data) {
7599
+ var _a;
7600
+ var errorMessage = (_a = data === null || data === void 0 ? void 0 : data.headers) === null || _a === void 0 ? void 0 : _a.message;
7601
+ if (!errorMessage) {
7602
+ return false;
7404
7603
  }
7405
- this.primitiveManagers.clear();
7406
- this._stompClient.disconnect();
7407
- this._stompClient.deactivate();
7408
- this.isConnected = false;
7409
- this.isConnecting = false;
7410
- this.wasConnected = false;
7411
- this.connected$.next(false);
7412
- this.disconnect$.next();
7604
+ return errorMessage.toLowerCase().indexOf('forbiddenexception') !== -1;
7413
7605
  };
7414
- /** @private */
7415
- WebsocketService.prototype.getSubscriptionUrlWithToken = function (domain, service, primitive) {
7416
- var tenant = WebsocketService_1.TOKEN
7417
- ? WebsocketService_1.TOKEN.username.split('@')[1]
7418
- : null;
7419
- var token = WebsocketService_1.TOKEN
7420
- ? WebsocketService_1.TOKEN.access_token
7421
- : null;
7422
- return "/topic/" + tenant + "/" + token + "/" + domain + "/" + service + "/" + primitive;
7606
+ WebsocketService.prototype.handleOnWebSocketError = function (data) {
7607
+ this.handleError('WebSocketError', data);
7423
7608
  };
7424
- /** @private */
7425
- WebsocketService.prototype.getSubscriptionUrlWithoutToken = function (domain, service, primitive) {
7426
- var tenant = WebsocketService_1.TOKEN
7427
- ? WebsocketService_1.TOKEN.username.split('@')[1]
7428
- : null;
7429
- return "/topic/" + tenant + "/" + domain + "/" + service + "/" + primitive;
7609
+ WebsocketService.prototype.handleError = function (origin, data) {
7610
+ console.error(origin, data);
7611
+ this.error$.next(data);
7430
7612
  };
7431
- /** @private */
7432
- WebsocketService.prototype.createStompSubscription = function (destination, primitiveManager) {
7433
- return this._stompClient.subscribe(destination, function (message) {
7434
- var event = JSON.parse(message.body || '{}');
7435
- primitiveManager.event$.next(event);
7436
- });
7613
+ WebsocketService.prototype.handleReconnection = function () {
7614
+ this.lostConnection = false;
7615
+ this.reconnectPrimitives();
7616
+ this.reconnected$.next();
7437
7617
  };
7438
- /** @private */
7439
- WebsocketService.prototype.createStompClient = function () {
7440
- var ws = new SockJS(WebsocketService_1.WEBSOCKET_URL + "subscription", null, { timeout: WebsocketService_1.CONNECTION_TIMEOUT });
7441
- this._stompClient = Stomp.over(ws);
7442
- this._stompClient.debug = function () { return null; };
7443
- };
7444
- /** @private */
7445
7618
  WebsocketService.prototype.reconnectPrimitives = function () {
7446
- var e_4, _a;
7619
+ var e_2, _a;
7447
7620
  try {
7448
7621
  for (var _b = __values(this.primitiveManagers.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
7449
7622
  var primitiveManager = _c.value;
7450
7623
  this.createStompSubscriptions(primitiveManager);
7451
7624
  }
7452
7625
  }
7453
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
7626
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
7454
7627
  finally {
7455
7628
  try {
7456
7629
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7457
7630
  }
7458
- finally { if (e_4) throw e_4.error; }
7631
+ finally { if (e_2) throw e_2.error; }
7459
7632
  }
7460
7633
  };
7461
- /** @private */
7634
+ WebsocketService.prototype.buildSubscriptionUrlWithToken = function (domain, service, primitive) {
7635
+ var authToken = this.userInformationService.getAuthToken();
7636
+ var tenant = this.userInformationService.getTenantDomain();
7637
+ return "/topic/" + tenant + "/" + authToken + "/" + domain + "/" + service + "/" + primitive;
7638
+ };
7639
+ WebsocketService.prototype.getSubscriptionUrlWithoutToken = function (domain, service, primitive) {
7640
+ var tenant = this.userInformationService.getTenantDomain();
7641
+ return "/topic/" + tenant + "/" + domain + "/" + service + "/" + primitive;
7642
+ };
7643
+ WebsocketService.prototype.buildPrimitiveManagerKey = function (domain, service, primitive) {
7644
+ return domain + "/" + service + "/" + primitive;
7645
+ };
7646
+ WebsocketService.prototype.unsubscribePrimitiveOnFinalize = function (primitiveManager) {
7647
+ return __awaiter(this, void 0, void 0, function () {
7648
+ var key;
7649
+ return __generator(this, function (_a) {
7650
+ switch (_a.label) {
7651
+ case 0:
7652
+ if (primitiveManager.hasObservers()) {
7653
+ return [2 /*return*/];
7654
+ }
7655
+ primitiveManager.unsubscribe();
7656
+ key = this.buildPrimitiveManagerKey(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7657
+ this.primitiveManagers.delete(key);
7658
+ return [4 /*yield*/, this.disconnectIfNoMoreObservables()];
7659
+ case 1:
7660
+ _a.sent();
7661
+ return [2 /*return*/];
7662
+ }
7663
+ });
7664
+ });
7665
+ };
7666
+ WebsocketService.prototype.disconnectIfNoMoreObservables = function () {
7667
+ return __awaiter(this, void 0, void 0, function () {
7668
+ return __generator(this, function (_a) {
7669
+ switch (_a.label) {
7670
+ case 0:
7671
+ if (!(this.getObserversCount() === 0)) return [3 /*break*/, 2];
7672
+ this.debug('Manually disconnecting because there are no more observers');
7673
+ return [4 /*yield*/, this.disconnect()];
7674
+ case 1:
7675
+ _a.sent();
7676
+ _a.label = 2;
7677
+ case 2: return [2 /*return*/];
7678
+ }
7679
+ });
7680
+ });
7681
+ };
7462
7682
  WebsocketService.prototype.getObserversCount = function () {
7463
- var e_5, _a;
7464
7683
  var observersCount = 0;
7465
- try {
7466
- for (var _b = __values(this.primitiveManagers.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
7467
- var primitiveManager = _c.value;
7468
- observersCount += primitiveManager.event$.observers.length;
7469
- }
7470
- }
7471
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
7472
- finally {
7473
- try {
7474
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7475
- }
7476
- finally { if (e_5) throw e_5.error; }
7477
- }
7684
+ this.primitiveManagers.forEach(function (primitiveManager) {
7685
+ observersCount += primitiveManager.getObserversCount();
7686
+ });
7478
7687
  return observersCount;
7479
7688
  };
7480
- /** @private */
7481
- WebsocketService.prototype.disconnectPrimitiveOnFinalize = function (primitiveManager) {
7482
- var e_6, _a;
7483
- // @IMPORTANT: Replace .observers.length === 1 with .observed in rxjs 7.0+
7484
- var hasObservers = !(primitiveManager.event$.observers.length === 1);
7485
- if (hasObservers)
7486
- return;
7487
- primitiveManager.event$.complete();
7488
- try {
7489
- for (var _b = __values(primitiveManager.stompSubscriptions), _c = _b.next(); !_c.done; _c = _b.next()) {
7490
- var stompSubscription = _c.value;
7491
- stompSubscription.unsubscribe();
7492
- }
7493
- }
7494
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
7495
- finally {
7496
- try {
7497
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7498
- }
7499
- finally { if (e_6) throw e_6.error; }
7500
- }
7501
- primitiveManager.subscribed$.complete();
7502
- var key = this.getPrimitiveManagerKey(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7503
- this.primitiveManagers.delete(key);
7504
- this.disconnect();
7689
+ WebsocketService.prototype.createStompSubscription = function (destination, primitiveManager) {
7690
+ return this.stompClient.subscribe(destination, function (message) {
7691
+ var event = JSON.parse(message.body || '{}');
7692
+ primitiveManager.fireEvent(event);
7693
+ });
7505
7694
  };
7506
- /** @private */
7507
- WebsocketService.prototype.getPrimitiveManagerKey = function (domain, service, primitive) {
7508
- return domain + "/" + service + "/" + primitive;
7695
+ WebsocketService.prototype.createStompSubscriptions = function (primitiveManager) {
7696
+ var subscriptionUrlWithToken = this.buildSubscriptionUrlWithToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7697
+ var subscriptionUrlWithoutToken = this.getSubscriptionUrlWithoutToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7698
+ var stompSubscriptionWithToken = this.createStompSubscription(subscriptionUrlWithToken, primitiveManager);
7699
+ var stompSubscriptionWithoutToken = this.createStompSubscription(subscriptionUrlWithoutToken, primitiveManager);
7700
+ primitiveManager.subscribe(stompSubscriptionWithToken, stompSubscriptionWithoutToken);
7701
+ this.subscribed$.next(primitiveManager);
7509
7702
  };
7510
- var WebsocketService_1;
7511
- WebsocketService.RECONNECT_INTERVAL = 3000;
7512
- WebsocketService.CONNECTION_TIMEOUT = 15000;
7513
- /** @private */
7514
- WebsocketService.BASE_URL_COOKIE = 'com.senior.base.url';
7515
- /** @private */
7516
- WebsocketService.TOKEN_COOKIE = 'com.senior.token';
7517
- /** @private */
7518
- WebsocketService.TOKEN = JSON.parse(get(WebsocketService_1.TOKEN_COOKIE) || '{}');
7519
- /** @private */
7520
- WebsocketService.WEBSOCKET_URL = get(WebsocketService_1.BASE_URL_COOKIE) + '/websocket/';
7521
- WebsocketService.ɵprov = ɵɵdefineInjectable({ factory: function WebsocketService_Factory() { return new WebsocketService(); }, token: WebsocketService, providedIn: "root" });
7522
- WebsocketService = WebsocketService_1 = __decorate([
7703
+ WebsocketService.prototype.getSubscriptionUrl = function () {
7704
+ return this.userInformationService.getWebSocketUrl() + "/subscription";
7705
+ };
7706
+ WebsocketService.ctorParameters = function () { return [
7707
+ { type: UserInformationService }
7708
+ ]; };
7709
+ WebsocketService.ɵprov = ɵɵdefineInjectable({ factory: function WebsocketService_Factory() { return new WebsocketService(ɵɵinject(UserInformationService)); }, token: WebsocketService, providedIn: "root" });
7710
+ WebsocketService = __decorate([
7523
7711
  Injectable({
7524
7712
  providedIn: 'root'
7525
7713
  })
@@ -7595,6 +7783,73 @@ var VerifyModulePermission = /** @class */ (function () {
7595
7783
  return VerifyModulePermission;
7596
7784
  }());
7597
7785
 
7786
+ var VerifyModulePermissionsService = /** @class */ (function () {
7787
+ function VerifyModulePermissionsService(http) {
7788
+ this.http = http;
7789
+ }
7790
+ VerifyModulePermissionsService_1 = VerifyModulePermissionsService;
7791
+ VerifyModulePermissionsService.prototype.consultaModulos = function (request) {
7792
+ return this.http.post(VerifyModulePermissionsService_1.QUERY_MODULES_URL, request);
7793
+ };
7794
+ var VerifyModulePermissionsService_1;
7795
+ VerifyModulePermissionsService.QUERY_MODULES_URL = "erpx_fnd/empresa/queries/consultaModulos";
7796
+ VerifyModulePermissionsService.ctorParameters = function () { return [
7797
+ { type: HttpClient }
7798
+ ]; };
7799
+ VerifyModulePermissionsService.ɵprov = ɵɵdefineInjectable({ factory: function VerifyModulePermissionsService_Factory() { return new VerifyModulePermissionsService(ɵɵinject(HttpClient)); }, token: VerifyModulePermissionsService, providedIn: "any" });
7800
+ VerifyModulePermissionsService = VerifyModulePermissionsService_1 = __decorate([
7801
+ Injectable({
7802
+ providedIn: "any"
7803
+ })
7804
+ ], VerifyModulePermissionsService);
7805
+ return VerifyModulePermissionsService;
7806
+ }());
7807
+
7808
+ var VerifyModulePermissions = /** @class */ (function () {
7809
+ function VerifyModulePermissions(verifyModulePermissionsService) {
7810
+ this.verifyModulePermissionsService = verifyModulePermissionsService;
7811
+ }
7812
+ VerifyModulePermissions_1 = VerifyModulePermissions;
7813
+ /**
7814
+ * Method to verify if user has permission on a specific module
7815
+ * @param modules Modules to verify the permission
7816
+ * @param requestPermission Indicative if must be call the primitive
7817
+ * @returns An boolean Observable
7818
+ */
7819
+ VerifyModulePermissions.prototype.hasPermissions = function (modules, requestPermission) {
7820
+ var moduleSubject = VerifyModulePermissions_1.subjectsPerModuleMap.get(modules);
7821
+ if (!moduleSubject || requestPermission) {
7822
+ var newModuleSubject_1 = new ReplaySubject(1);
7823
+ VerifyModulePermissions_1.subjectsPerModuleMap.set(modules, newModuleSubject_1);
7824
+ this.verifyModulePermissionsService
7825
+ .consultaModulos({ modulo: modules, somenteAtivo: true })
7826
+ .pipe(take(1))
7827
+ .subscribe(function (response) {
7828
+ var hasPermissions = (response === null || response === void 0 ? void 0 : response.modulos) || [];
7829
+ newModuleSubject_1.next(hasPermissions);
7830
+ }, function (err) {
7831
+ VerifyModulePermissions_1.subjectsPerModuleMap.delete(modules);
7832
+ newModuleSubject_1.error(err);
7833
+ newModuleSubject_1.unsubscribe();
7834
+ });
7835
+ return newModuleSubject_1.asObservable();
7836
+ }
7837
+ return moduleSubject.asObservable();
7838
+ };
7839
+ var VerifyModulePermissions_1;
7840
+ VerifyModulePermissions.ctorParameters = function () { return [
7841
+ { type: VerifyModulePermissionsService }
7842
+ ]; };
7843
+ VerifyModulePermissions.subjectsPerModuleMap = new Map();
7844
+ VerifyModulePermissions.ɵprov = ɵɵdefineInjectable({ factory: function VerifyModulePermissions_Factory() { return new VerifyModulePermissions(ɵɵinject(VerifyModulePermissionsService)); }, token: VerifyModulePermissions, providedIn: "root" });
7845
+ VerifyModulePermissions = VerifyModulePermissions_1 = __decorate([
7846
+ Injectable({
7847
+ providedIn: "root"
7848
+ })
7849
+ ], VerifyModulePermissions);
7850
+ return VerifyModulePermissions;
7851
+ }());
7852
+
7598
7853
  var ModulesEnum;
7599
7854
  (function (ModulesEnum) {
7600
7855
  ModulesEnum["CONTROLADORIA"] = "CONTROLADORIA";
@@ -7613,5 +7868,5 @@ var ModulesEnum;
7613
7868
  * Generated bundle index. Do not edit.
7614
7869
  */
7615
7870
 
7616
- export { AgreementLookup, BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ContaInternaFilialLookup, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, DocumentoLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E043MpcLookup, E043PcmLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E069GreLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E089DocLookup, E090HrpComGerLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E099UsuSupCprLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E501TcpLookup, E600CcoLookup, E640LotLookup, EntityPersonProductLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, HTTP_STATUS_CODE, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NotaFiscalEntradaLookup, NpsService, ParametersLookup, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, SegmentoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, WebsocketService, naturezaReceitaPisCofins, ɵ0, ErpLookupsService as ɵa, EnumAnaSin as ɵb, EnumNatCtb as ɵc, StorageService as ɵd, VerifyModulePermissionService as ɵe };
7871
+ export { AgreementLookup, BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ContaInternaFilialLookup, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, DocumentoLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E043MpcLookup, E043PcmLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E069GreLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E089DocLookup, E090HrpComGerLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E099UsuSupCprLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E501TcpLookup, E600CcoLookup, E640LotLookup, EntityPersonProductLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, HTTP_STATUS_CODE, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NotaFiscalEntradaLookup, NpsService, ParametersLookup, PrimitiveManager, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, SegmentoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, VerifyModulePermissions, WebsocketService, naturezaReceitaPisCofins, ɵ0, ErpLookupsService as ɵa, EnumAnaSin as ɵb, EnumNatCtb as ɵc, StorageService as ɵd, UserInformationService as ɵe, VerifyModulePermissionService as ɵf, VerifyModulePermissionsService as ɵg };
7617
7872
  //# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map