@senior-gestao-empresarial/angular-components 6.11.5 → 6.12.0-bea9aaec-b4b5-4e5b-b8eb-155b7aa8d5aa

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 (37) hide show
  1. package/bundles/senior-gestao-empresarial-angular-components.umd.js +414 -251
  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/websocket/models/primitive-manager.d.ts +19 -0
  9. package/components/websocket/protocols/on-event-options.d.ts +8 -0
  10. package/components/websocket/protocols/primitive-event.d.ts +10 -0
  11. package/components/websocket/user-information.service.d.ts +7 -0
  12. package/components/websocket/websocket.service.d.ts +78 -74
  13. package/esm2015/components/permissions/index.js +2 -1
  14. package/esm2015/components/permissions/verify-module-permissions-service.js +26 -0
  15. package/esm2015/components/permissions/verify-module-permissions.js +51 -0
  16. package/esm2015/components/websocket/models/primitive-manager.js +39 -0
  17. package/esm2015/components/websocket/protocols/on-event-options.js +1 -0
  18. package/esm2015/components/websocket/protocols/primitive-event.js +1 -0
  19. package/esm2015/components/websocket/user-information.service.js +34 -0
  20. package/esm2015/components/websocket/websocket.service.js +233 -191
  21. package/esm2015/senior-gestao-empresarial-angular-components.js +4 -2
  22. package/esm5/components/permissions/index.js +2 -1
  23. package/esm5/components/permissions/verify-module-permissions-service.js +28 -0
  24. package/esm5/components/permissions/verify-module-permissions.js +53 -0
  25. package/esm5/components/websocket/models/primitive-manager.js +58 -0
  26. package/esm5/components/websocket/protocols/on-event-options.js +1 -0
  27. package/esm5/components/websocket/protocols/primitive-event.js +1 -0
  28. package/esm5/components/websocket/user-information.service.js +38 -0
  29. package/esm5/components/websocket/websocket.service.js +259 -252
  30. package/esm5/senior-gestao-empresarial-angular-components.js +4 -2
  31. package/fesm2015/senior-gestao-empresarial-angular-components.js +360 -190
  32. package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
  33. package/fesm5/senior-gestao-empresarial-angular-components.js +411 -251
  34. package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
  35. package/package.json +3 -3
  36. package/senior-gestao-empresarial-angular-components.d.ts +3 -1
  37. 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,413 @@ var NpsService = /** @class */ (function () {
7206
7206
  return NpsService;
7207
7207
  }());
7208
7208
 
7209
+ var UserInformationService = /** @class */ (function () {
7210
+ function UserInformationService() {
7211
+ }
7212
+ UserInformationService_1 = UserInformationService;
7213
+ UserInformationService.prototype.getAuthToken = function () {
7214
+ var cookieValue = get(UserInformationService_1.TOKEN_COOKIE_KEY) || '{}';
7215
+ var authToken = JSON.parse(cookieValue);
7216
+ return authToken.access_token;
7217
+ };
7218
+ UserInformationService.prototype.getTenantDomain = function () {
7219
+ var cookieValue = get(UserInformationService_1.TOKEN_COOKIE_KEY) || '{}';
7220
+ var authToken = JSON.parse(cookieValue);
7221
+ return authToken.username.split('@')[1];
7222
+ };
7223
+ UserInformationService.prototype.getWebSocketUrl = function () {
7224
+ var baseUrl = get(UserInformationService_1.BASE_URL_COOKIE_KEY);
7225
+ if (!baseUrl.endsWith('/')) {
7226
+ baseUrl += '/';
7227
+ }
7228
+ return baseUrl + 'websocket';
7229
+ };
7230
+ var UserInformationService_1;
7231
+ UserInformationService.BASE_URL_COOKIE_KEY = 'com.senior.base.url';
7232
+ UserInformationService.TOKEN_COOKIE_KEY = 'com.senior.token';
7233
+ UserInformationService.ɵprov = ɵɵdefineInjectable({ factory: function UserInformationService_Factory() { return new UserInformationService(); }, token: UserInformationService, providedIn: "root" });
7234
+ UserInformationService = UserInformationService_1 = __decorate([
7235
+ Injectable({
7236
+ providedIn: 'root'
7237
+ })
7238
+ ], UserInformationService);
7239
+ return UserInformationService;
7240
+ }());
7241
+
7242
+ var PrimitiveManager = /** @class */ (function () {
7243
+ function PrimitiveManager(domain, service, primitive) {
7244
+ this.domain = domain;
7245
+ this.service = service;
7246
+ this.primitive = primitive;
7247
+ this.stompSubscriptions = [];
7248
+ this.event$ = new Subject();
7249
+ this.subscribed$ = new BehaviorSubject(false);
7250
+ }
7251
+ PrimitiveManager.prototype.unsubscribe = function () {
7252
+ var e_1, _a;
7253
+ this.event$.complete();
7254
+ try {
7255
+ for (var _b = __values(this.stompSubscriptions), _c = _b.next(); !_c.done; _c = _b.next()) {
7256
+ var stompSubscription = _c.value;
7257
+ stompSubscription.unsubscribe();
7258
+ }
7259
+ }
7260
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
7261
+ finally {
7262
+ try {
7263
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7264
+ }
7265
+ finally { if (e_1) throw e_1.error; }
7266
+ }
7267
+ this.subscribed$.complete();
7268
+ };
7269
+ PrimitiveManager.prototype.fireEvent = function (event) {
7270
+ this.event$.next(event);
7271
+ };
7272
+ PrimitiveManager.prototype.subscribe = function () {
7273
+ var _a;
7274
+ var subscriptions = [];
7275
+ for (var _i = 0; _i < arguments.length; _i++) {
7276
+ subscriptions[_i] = arguments[_i];
7277
+ }
7278
+ (_a = this.stompSubscriptions).push.apply(_a, __spread(subscriptions));
7279
+ this.subscribed$.next(true);
7280
+ };
7281
+ PrimitiveManager.prototype.getEventObservable = function () {
7282
+ return this.event$.asObservable();
7283
+ };
7284
+ PrimitiveManager.prototype.getSubscriptionObservable = function () {
7285
+ return this.subscribed$.asObservable();
7286
+ };
7287
+ PrimitiveManager.prototype.hasObservers = function () {
7288
+ // @IMPORTANT: Replace .observers.length === 1 with .observed in rxjs 7.0+
7289
+ return this.event$.observers.length > 1;
7290
+ };
7291
+ PrimitiveManager.prototype.getObserversCount = function () {
7292
+ return this.event$.observers.length;
7293
+ };
7294
+ return PrimitiveManager;
7295
+ }());
7296
+
7297
+ var RECONNECT_INTERVAL_MILLISECONDS = 3000;
7298
+ var CONNECTION_TIMEOUT_MILLISECONDS = 5000;
7209
7299
  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 */
7300
+ function WebsocketService(userInformationService) {
7301
+ this.userInformationService = userInformationService;
7220
7302
  this.connected$ = new BehaviorSubject(false);
7221
- /** @private */
7222
- this.disconnect$ = new Subject();
7223
- /** @private */
7224
- this.reconnect$ = new Subject();
7225
- /** @private */
7303
+ this.disconnected$ = new Subject();
7304
+ this.reconnected$ = new Subject();
7226
7305
  this.error$ = new Subject();
7227
7306
  this.subscribed$ = new Subject();
7307
+ this.primitiveManagers = new Map();
7308
+ this.debugEnable = false;
7309
+ this.lostConnection = false;
7228
7310
  }
7229
- WebsocketService_1 = WebsocketService;
7230
7311
  /**
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.
7312
+ * Enables stompjs debug logs and additional info
7233
7313
  */
7234
- WebsocketService.prototype.onConnect = function () {
7235
- return this.connected$.asObservable().pipe(filter(Boolean), map(function () { return undefined; }), take(1));
7314
+ WebsocketService.prototype.enableDebugLogs = function () {
7315
+ this.debugEnable = true;
7236
7316
  };
7237
7317
  /**
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.
7318
+ * Manually starts the connection
7240
7319
  */
7241
- WebsocketService.prototype.onDisconnect = function () {
7242
- return this.disconnect$.asObservable();
7320
+ WebsocketService.prototype.connect = function () {
7321
+ var _this = this;
7322
+ if (this.isConnected() || this.isConnecting()) {
7323
+ return;
7324
+ }
7325
+ this.lostConnection = false;
7326
+ var stompConfig = {
7327
+ webSocketFactory: function () {
7328
+ return new SockJS(_this.getSubscriptionUrl(), null, {
7329
+ timeout: CONNECTION_TIMEOUT_MILLISECONDS
7330
+ });
7331
+ },
7332
+ connectionTimeout: CONNECTION_TIMEOUT_MILLISECONDS,
7333
+ reconnectDelay: RECONNECT_INTERVAL_MILLISECONDS,
7334
+ debug: this.debug.bind(this),
7335
+ onConnect: this.handleOnConnected.bind(this),
7336
+ onDisconnect: this.handleOnDisconnect.bind(this),
7337
+ onWebSocketClose: this.handleOnWebSocketClose.bind(this),
7338
+ onStompError: this.handleOnStompError.bind(this),
7339
+ onWebSocketError: this.handleOnWebSocketError.bind(this)
7340
+ };
7341
+ this.debug('Connecting the Webscoket');
7342
+ this.stompClient = new Client(stompConfig);
7343
+ this.stompClient.activate();
7243
7344
  };
7244
7345
  /**
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.
7346
+ * Manually disconnect the websocket. The reconnect loop will be stopped.
7247
7347
  */
7248
- WebsocketService.prototype.onReconnect = function () {
7249
- return this.reconnect$.asObservable();
7348
+ WebsocketService.prototype.disconnect = function () {
7349
+ return __awaiter(this, void 0, void 0, function () {
7350
+ var _a, _b, primitiveManager;
7351
+ var e_1, _c;
7352
+ return __generator(this, function (_d) {
7353
+ switch (_d.label) {
7354
+ case 0:
7355
+ try {
7356
+ for (_a = __values(this.primitiveManagers.values()), _b = _a.next(); !_b.done; _b = _a.next()) {
7357
+ primitiveManager = _b.value;
7358
+ primitiveManager.unsubscribe();
7359
+ }
7360
+ }
7361
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
7362
+ finally {
7363
+ try {
7364
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
7365
+ }
7366
+ finally { if (e_1) throw e_1.error; }
7367
+ }
7368
+ this.primitiveManagers.clear();
7369
+ if (!this.stompClient) return [3 /*break*/, 2];
7370
+ return [4 /*yield*/, this.stompClient.deactivate()];
7371
+ case 1:
7372
+ _d.sent();
7373
+ this.stompClient = null;
7374
+ _d.label = 2;
7375
+ case 2:
7376
+ this.connected$.next(false);
7377
+ return [2 /*return*/];
7378
+ }
7379
+ });
7380
+ });
7250
7381
  };
7251
7382
  /**
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.
7383
+ * Check if the websocket is connected
7384
+ * @return `boolean` representing if the websocket is connected
7254
7385
  */
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
- }));
7386
+ WebsocketService.prototype.isConnected = function () {
7387
+ if (!this.stompClient) {
7388
+ return false;
7389
+ }
7390
+ return this.stompClient.connected;
7391
+ };
7392
+ /**
7393
+ * Check if the websocket is tring to connect
7394
+ * @return `boolean` representing if the websocket status
7395
+ */
7396
+ WebsocketService.prototype.isConnecting = function () {
7397
+ if (!this.stompClient) {
7398
+ return false;
7399
+ }
7400
+ return !this.stompClient.connected && this.stompClient.active;
7401
+ };
7402
+ /**
7403
+ * Event responsable to emit an event when the connection is established.
7404
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7405
+ * @return `Observable<boolean>`
7406
+ */
7407
+ WebsocketService.prototype.onConnect = function () {
7408
+ return this.connected$.asObservable()
7409
+ .pipe(filter(function (p) { return p === true; }));
7269
7410
  };
7270
7411
  /**
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.
7412
+ * Event responsable to emit an event when the connection is closed.
7413
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7414
+ * @return `Observable<void>`
7415
+ */
7416
+ WebsocketService.prototype.onDisconnect = function () {
7417
+ return this.disconnected$.asObservable();
7418
+ };
7419
+ /**
7420
+ * Event responsable to emit an event when the connection is reestablished.
7421
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7422
+ * @return `Observable<void>`
7423
+ */
7424
+ WebsocketService.prototype.onReconnect = function () {
7425
+ return this.reconnected$.asObservable();
7426
+ };
7427
+ /**
7428
+ * Event responsable to emit an event when an error ocurred.
7429
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7430
+ * @return `Observable<FrameImpl>`
7273
7431
  */
7274
7432
  WebsocketService.prototype.onError = function () {
7275
7433
  return this.error$.asObservable();
7276
7434
  };
7277
7435
  /**
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.
7436
+ * Event responsible to emit an event when a primitive is called.
7437
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7438
+ * @typeParam `<T>` Object type that will be used in the observable for the `data` property.
7439
+ * @param {OnEventOptions} options Configurations for the event.
7440
+ * @return `Observable<PrimitiveEvent<T>>` Observable that emits an event when the service calls the primitive.
7284
7441
  */
7285
7442
  WebsocketService.prototype.onEvent = function (options) {
7286
7443
  var _this = this;
7287
- this.connect();
7288
7444
  var domain = options.domain, service = options.service, primitive = options.primitive;
7289
- var key = this.getPrimitiveManagerKey(domain, service, primitive);
7445
+ var key = this.buildPrimitiveManagerKey(domain, service, primitive);
7290
7446
  if (this.primitiveManagers.has(key)) {
7291
- return this.primitiveManagers.get(key).event$.asObservable();
7447
+ return this.primitiveManagers.get(key).getEventObservable();
7292
7448
  }
7293
- var primitiveManager = {
7294
- domain: domain,
7295
- service: service,
7296
- primitive: primitive,
7297
- stompSubscriptions: [],
7298
- event$: new Subject(),
7299
- subscribed$: new BehaviorSubject(false)
7300
- };
7449
+ var primitiveManager = new PrimitiveManager(domain, service, primitive);
7301
7450
  this.primitiveManagers.set(key, primitiveManager);
7451
+ this.connect();
7302
7452
  this.onConnect()
7303
7453
  .pipe(take(1))
7304
7454
  .subscribe(function () {
7305
7455
  _this.createStompSubscriptions(primitiveManager);
7306
7456
  });
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);
7457
+ return primitiveManager
7458
+ .getEventObservable()
7459
+ .pipe(finalize(function () { return _this.unsubscribePrimitiveOnFinalize(primitiveManager); }));
7323
7460
  };
7324
- /** @private */
7325
- WebsocketService.prototype.connect = function () {
7461
+ /**
7462
+ * Event responsible to emit an event when a subscription is created for the primitive.
7463
+ * Do not forget to unsubscribe the observable when you don't need it anymore.
7464
+ * @param {OnEventOptions} options Configurations for the event.
7465
+ * Observable responsável por emitir uma notificação após o subscribe do evento pela primeira vez.
7466
+ * @return `Observable<boolean>` Observable that emits an event when the service calls the primitive.
7467
+ */
7468
+ WebsocketService.prototype.onSubscribe = function (options) {
7326
7469
  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();
7470
+ var domain = options.domain, service = options.service, primitive = options.primitive;
7471
+ var key = this.buildPrimitiveManagerKey(domain, service, primitive);
7472
+ this.connect();
7473
+ return this.onConnect().pipe(take(1), switchMap(function () {
7474
+ if (_this.primitiveManagers.has(key)) {
7475
+ return _this.primitiveManagers
7476
+ .get(key)
7477
+ .getSubscriptionObservable()
7478
+ .pipe(take(1));
7338
7479
  }
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
- });
7480
+ return _this.subscribed$.asObservable().pipe(filter(function (primitiveManager) {
7481
+ return _this.buildPrimitiveManagerKey(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive) === key;
7482
+ }), map(function () { return true; }), take(1));
7483
+ }));
7361
7484
  };
7362
- WebsocketService.prototype.disconnect = function () {
7363
- var e_1, _a, e_2, _b, e_3, _c;
7364
- if (!this.isConnected || this.getObserversCount() > 0) {
7485
+ WebsocketService.prototype.debug = function (message) {
7486
+ var optionalParams = [];
7487
+ for (var _i = 1; _i < arguments.length; _i++) {
7488
+ optionalParams[_i - 1] = arguments[_i];
7489
+ }
7490
+ if (!this.debugEnable) {
7365
7491
  return;
7366
7492
  }
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
- }
7493
+ console.log.apply(console, __spread(['WS debug: ' + message], optionalParams));
7494
+ };
7495
+ WebsocketService.prototype.info = function (message) {
7496
+ console.info('WS info: ' + message);
7497
+ };
7498
+ WebsocketService.prototype.handleOnConnected = function (data) {
7499
+ this.debug('Webscoket connected', data);
7500
+ this.connected$.next(true);
7501
+ if (this.lostConnection) {
7502
+ this.info('Webscoket reconnected, recriating subscriptions');
7503
+ this.handleReconnection();
7384
7504
  }
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; }
7505
+ };
7506
+ WebsocketService.prototype.handleOnDisconnect = function (data) {
7507
+ this.debug('Webscoket disconnected', data);
7508
+ this.disconnected$.next();
7509
+ };
7510
+ WebsocketService.prototype.handleOnWebSocketClose = function (data) {
7511
+ if (data.wasClean) {
7512
+ return;
7391
7513
  }
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
- }
7514
+ this.lostConnection = true;
7515
+ };
7516
+ WebsocketService.prototype.handleOnStompError = function (data) {
7517
+ debugger;
7518
+ this.handleError('StompError', data);
7519
+ if (this.isAuthenticationError(data)) {
7520
+ this.info('Authentication error, recriating subscriptions');
7521
+ this.handleReconnection();
7397
7522
  }
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; }
7523
+ };
7524
+ WebsocketService.prototype.isAuthenticationError = function (data) {
7525
+ var _a;
7526
+ var errorMessage = (_a = data === null || data === void 0 ? void 0 : data.headers) === null || _a === void 0 ? void 0 : _a.message;
7527
+ if (!errorMessage) {
7528
+ return false;
7404
7529
  }
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();
7530
+ return errorMessage.toLowerCase().indexOf('forbiddenexception') !== -1;
7413
7531
  };
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;
7532
+ WebsocketService.prototype.handleOnWebSocketError = function (data) {
7533
+ this.handleError('WebSocketError', data);
7423
7534
  };
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;
7535
+ WebsocketService.prototype.handleError = function (origin, data) {
7536
+ console.error(origin, data);
7537
+ this.error$.next(data);
7430
7538
  };
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
- });
7437
- };
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; };
7539
+ WebsocketService.prototype.handleReconnection = function () {
7540
+ this.lostConnection = false;
7541
+ this.reconnectPrimitives();
7542
+ this.reconnected$.next();
7443
7543
  };
7444
- /** @private */
7445
7544
  WebsocketService.prototype.reconnectPrimitives = function () {
7446
- var e_4, _a;
7545
+ var e_2, _a;
7447
7546
  try {
7448
7547
  for (var _b = __values(this.primitiveManagers.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
7449
7548
  var primitiveManager = _c.value;
7450
7549
  this.createStompSubscriptions(primitiveManager);
7451
7550
  }
7452
7551
  }
7453
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
7552
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
7454
7553
  finally {
7455
7554
  try {
7456
7555
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7457
7556
  }
7458
- finally { if (e_4) throw e_4.error; }
7557
+ finally { if (e_2) throw e_2.error; }
7459
7558
  }
7460
7559
  };
7461
- /** @private */
7462
- WebsocketService.prototype.getObserversCount = function () {
7463
- var e_5, _a;
7464
- 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
- }
7478
- return observersCount;
7560
+ WebsocketService.prototype.buildSubscriptionUrlWithToken = function (domain, service, primitive) {
7561
+ var authToken = this.userInformationService.getAuthToken();
7562
+ var tenant = this.userInformationService.getTenantDomain();
7563
+ return "/topic/" + tenant + "/" + authToken + "/" + domain + "/" + service + "/" + primitive;
7479
7564
  };
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)
7565
+ WebsocketService.prototype.getSubscriptionUrlWithoutToken = function (domain, service, primitive) {
7566
+ var tenant = this.userInformationService.getTenantDomain();
7567
+ return "/topic/" + tenant + "/" + domain + "/" + service + "/" + primitive;
7568
+ };
7569
+ WebsocketService.prototype.buildPrimitiveManagerKey = function (domain, service, primitive) {
7570
+ return domain + "/" + service + "/" + primitive;
7571
+ };
7572
+ WebsocketService.prototype.unsubscribePrimitiveOnFinalize = function (primitiveManager) {
7573
+ if (primitiveManager.hasObservers()) {
7486
7574
  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
7575
  }
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);
7576
+ primitiveManager.unsubscribe();
7577
+ var key = this.buildPrimitiveManagerKey(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7503
7578
  this.primitiveManagers.delete(key);
7504
- this.disconnect();
7579
+ this.disconnectIfNoMoreObservables();
7505
7580
  };
7506
- /** @private */
7507
- WebsocketService.prototype.getPrimitiveManagerKey = function (domain, service, primitive) {
7508
- return domain + "/" + service + "/" + primitive;
7581
+ WebsocketService.prototype.disconnectIfNoMoreObservables = function () {
7582
+ if (this.getObserversCount() === 0) {
7583
+ this.debug('Manually disconnecting because there are no more observers');
7584
+ this.disconnect();
7585
+ }
7586
+ };
7587
+ WebsocketService.prototype.getObserversCount = function () {
7588
+ var observersCount = 0;
7589
+ this.primitiveManagers.forEach(function (primitiveManager) {
7590
+ observersCount += primitiveManager.getObserversCount();
7591
+ });
7592
+ return observersCount;
7593
+ };
7594
+ WebsocketService.prototype.createStompSubscription = function (destination, primitiveManager) {
7595
+ return this.stompClient.subscribe(destination, function (message) {
7596
+ var event = JSON.parse(message.body || '{}');
7597
+ primitiveManager.fireEvent(event);
7598
+ });
7509
7599
  };
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([
7600
+ WebsocketService.prototype.createStompSubscriptions = function (primitiveManager) {
7601
+ var subscriptionUrlWithToken = this.buildSubscriptionUrlWithToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7602
+ var subscriptionUrlWithoutToken = this.getSubscriptionUrlWithoutToken(primitiveManager.domain, primitiveManager.service, primitiveManager.primitive);
7603
+ var stompSubscriptionWithToken = this.createStompSubscription(subscriptionUrlWithToken, primitiveManager);
7604
+ var stompSubscriptionWithoutToken = this.createStompSubscription(subscriptionUrlWithoutToken, primitiveManager);
7605
+ primitiveManager.subscribe(stompSubscriptionWithToken, stompSubscriptionWithoutToken);
7606
+ this.subscribed$.next(primitiveManager);
7607
+ };
7608
+ WebsocketService.prototype.getSubscriptionUrl = function () {
7609
+ return this.userInformationService.getWebSocketUrl() + "/subscription";
7610
+ };
7611
+ WebsocketService.ctorParameters = function () { return [
7612
+ { type: UserInformationService }
7613
+ ]; };
7614
+ WebsocketService.ɵprov = ɵɵdefineInjectable({ factory: function WebsocketService_Factory() { return new WebsocketService(ɵɵinject(UserInformationService)); }, token: WebsocketService, providedIn: "root" });
7615
+ WebsocketService = __decorate([
7523
7616
  Injectable({
7524
7617
  providedIn: 'root'
7525
7618
  })
@@ -7595,6 +7688,73 @@ var VerifyModulePermission = /** @class */ (function () {
7595
7688
  return VerifyModulePermission;
7596
7689
  }());
7597
7690
 
7691
+ var VerifyModulePermissionsService = /** @class */ (function () {
7692
+ function VerifyModulePermissionsService(http) {
7693
+ this.http = http;
7694
+ }
7695
+ VerifyModulePermissionsService_1 = VerifyModulePermissionsService;
7696
+ VerifyModulePermissionsService.prototype.consultaModulos = function (request) {
7697
+ return this.http.post(VerifyModulePermissionsService_1.QUERY_MODULES_URL, request);
7698
+ };
7699
+ var VerifyModulePermissionsService_1;
7700
+ VerifyModulePermissionsService.QUERY_MODULES_URL = "erpx_fnd/empresa/queries/consultaModulos";
7701
+ VerifyModulePermissionsService.ctorParameters = function () { return [
7702
+ { type: HttpClient }
7703
+ ]; };
7704
+ VerifyModulePermissionsService.ɵprov = ɵɵdefineInjectable({ factory: function VerifyModulePermissionsService_Factory() { return new VerifyModulePermissionsService(ɵɵinject(HttpClient)); }, token: VerifyModulePermissionsService, providedIn: "any" });
7705
+ VerifyModulePermissionsService = VerifyModulePermissionsService_1 = __decorate([
7706
+ Injectable({
7707
+ providedIn: "any"
7708
+ })
7709
+ ], VerifyModulePermissionsService);
7710
+ return VerifyModulePermissionsService;
7711
+ }());
7712
+
7713
+ var VerifyModulePermissions = /** @class */ (function () {
7714
+ function VerifyModulePermissions(verifyModulePermissionsService) {
7715
+ this.verifyModulePermissionsService = verifyModulePermissionsService;
7716
+ }
7717
+ VerifyModulePermissions_1 = VerifyModulePermissions;
7718
+ /**
7719
+ * Method to verify if user has permission on a specific module
7720
+ * @param modules Modules to verify the permission
7721
+ * @param requestPermission Indicative if must be call the primitive
7722
+ * @returns An boolean Observable
7723
+ */
7724
+ VerifyModulePermissions.prototype.hasPermissions = function (modules, requestPermission) {
7725
+ var moduleSubject = VerifyModulePermissions_1.subjectsPerModuleMap.get(modules);
7726
+ if (!moduleSubject || requestPermission) {
7727
+ var newModuleSubject_1 = new ReplaySubject(1);
7728
+ VerifyModulePermissions_1.subjectsPerModuleMap.set(modules, newModuleSubject_1);
7729
+ this.verifyModulePermissionsService
7730
+ .consultaModulos({ modulo: modules, somenteAtivo: true })
7731
+ .pipe(take(1))
7732
+ .subscribe(function (response) {
7733
+ var hasPermissions = (response === null || response === void 0 ? void 0 : response.modulos) || [];
7734
+ newModuleSubject_1.next(hasPermissions);
7735
+ }, function (err) {
7736
+ VerifyModulePermissions_1.subjectsPerModuleMap.delete(modules);
7737
+ newModuleSubject_1.error(err);
7738
+ newModuleSubject_1.unsubscribe();
7739
+ });
7740
+ return newModuleSubject_1.asObservable();
7741
+ }
7742
+ return moduleSubject.asObservable();
7743
+ };
7744
+ var VerifyModulePermissions_1;
7745
+ VerifyModulePermissions.ctorParameters = function () { return [
7746
+ { type: VerifyModulePermissionsService }
7747
+ ]; };
7748
+ VerifyModulePermissions.subjectsPerModuleMap = new Map();
7749
+ VerifyModulePermissions.ɵprov = ɵɵdefineInjectable({ factory: function VerifyModulePermissions_Factory() { return new VerifyModulePermissions(ɵɵinject(VerifyModulePermissionsService)); }, token: VerifyModulePermissions, providedIn: "root" });
7750
+ VerifyModulePermissions = VerifyModulePermissions_1 = __decorate([
7751
+ Injectable({
7752
+ providedIn: "root"
7753
+ })
7754
+ ], VerifyModulePermissions);
7755
+ return VerifyModulePermissions;
7756
+ }());
7757
+
7598
7758
  var ModulesEnum;
7599
7759
  (function (ModulesEnum) {
7600
7760
  ModulesEnum["CONTROLADORIA"] = "CONTROLADORIA";
@@ -7613,5 +7773,5 @@ var ModulesEnum;
7613
7773
  * Generated bundle index. Do not edit.
7614
7774
  */
7615
7775
 
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 };
7776
+ 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, 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
7777
  //# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map