vc-error-handlers 0.5.1 → 0.5.3

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 (25) hide show
  1. package/esm2022/lib/configuration.mjs +2 -1
  2. package/esm2022/lib/shared/components/page-not-found/page-not-found.component.mjs +52 -42
  3. package/esm2022/lib/shared/components/server-error/server-error.component.mjs +2 -2
  4. package/esm2022/lib/shared/components/unauthorized/unauthorized.component.mjs +55 -26
  5. package/esm2022/lib/shared/constants/api-config.constants.mjs +8 -1
  6. package/esm2022/lib/shared/constants/error-handling.constants.mjs +5 -2
  7. package/esm2022/lib/shared/interceptors/http.interceptor.mjs +14 -21
  8. package/esm2022/lib/shared/services/global-error.service.mjs +9 -10
  9. package/esm2022/lib/shared/services/router.service.mjs +31 -2
  10. package/esm2022/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.mjs +2 -2
  11. package/esm2022/lib/ui-kit/tooltip/tooltip.directive.mjs +156 -0
  12. package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +18 -0
  13. package/esm2022/lib/vc-error-handlers.module.mjs +34 -13
  14. package/fesm2022/vc-error-handlers.mjs +396 -143
  15. package/fesm2022/vc-error-handlers.mjs.map +1 -1
  16. package/lib/configuration.d.ts +1 -0
  17. package/lib/shared/components/page-not-found/page-not-found.component.d.ts +5 -8
  18. package/lib/shared/components/unauthorized/unauthorized.component.d.ts +7 -1
  19. package/lib/shared/constants/error-handling.constants.d.ts +3 -0
  20. package/lib/shared/interceptors/http.interceptor.d.ts +1 -3
  21. package/lib/shared/services/router.service.d.ts +4 -0
  22. package/lib/ui-kit/tooltip/tooltip.directive.d.ts +27 -0
  23. package/lib/ui-kit/tooltip/tooltip.module.d.ts +8 -0
  24. package/lib/vc-error-handlers.module.d.ts +4 -3
  25. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Optional, Component, Input, Directive, ViewChild, NgModule, EventEmitter, Output, InjectionToken, ErrorHandler } from '@angular/core';
2
+ import { Injectable, Optional, Component, Directive, Input, HostListener, ViewChild, NgModule, EventEmitter, Output, InjectionToken, ErrorHandler } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
3
5
  import { Subject, throwError } from 'rxjs';
4
6
  import * as i3 from '@angular/router';
5
7
  import { NavigationStart, NavigationEnd, NavigationError } from '@angular/router';
6
8
  import { retry, timeout, tap, catchError } from 'rxjs/operators';
7
- import * as i1 from '@angular/common/http';
8
- import { HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
9
9
  import * as i1$1 from '@vcomply/authorizer';
10
- import * as i1$2 from '@angular/common';
10
+ import * as i4 from '@angular/common';
11
11
  import { CommonModule, NgOptimizedImage } from '@angular/common';
12
12
  import * as Sentry from '@sentry/angular-ivy';
13
13
 
@@ -47,6 +47,13 @@ const PAGE_LEVEL_API_CONFIG = [
47
47
  body: null,
48
48
  pageCodes: ['SAP'],
49
49
  },
50
+ {
51
+ method: 'GET',
52
+ path: 'compliance/?mode=reports/reportDetailsById',
53
+ query: null,
54
+ body: null,
55
+ pageCodes: ['SAP'],
56
+ },
50
57
  ];
51
58
  const COMPONENT_LEVEL_API_CONFIG = [
52
59
  {
@@ -1125,17 +1132,15 @@ class GlobalErrorService {
1125
1132
  this.excludeApiConfig = EXCLUDE_API_CONFIG;
1126
1133
  }
1127
1134
  handleSoftErrors(event) {
1128
- if (!event.headers?.get) {
1135
+ if (!(event instanceof HttpResponse)) {
1129
1136
  return;
1130
1137
  }
1131
- const xData = event?.headers?.get('X-Data');
1132
- if (xData) {
1133
- const parsedData = JSON.parse(xData);
1134
- const statusCode = parsedData.statusCode;
1135
- const statusMessage = parsedData.message;
1136
- if (statusCode && statusCode !== 0) {
1137
- this.snackBarService.show(statusMessage || 'Error occurred', 'error');
1138
- }
1138
+ const responseBody = event?.body;
1139
+ const success = responseBody?.success;
1140
+ const message = responseBody?.message;
1141
+ const statusCode = event?.status;
1142
+ if (success === false && statusCode && statusCode !== 0) {
1143
+ this.snackBarService.show(message || 'Error occurred', 'alert');
1139
1144
  }
1140
1145
  }
1141
1146
  handleError(error, request) {
@@ -1233,23 +1238,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1233
1238
  }]
1234
1239
  }], ctorParameters: function () { return [{ type: SnackBarService }, { type: UtilsService }, { type: i3.Router }]; } });
1235
1240
 
1236
- class RouterService {
1237
- redirectToLogin() {
1238
- window.location.href =
1239
- `https://${window.location.host}/` +
1240
- 'signin?redirectURL=' +
1241
- encodeURIComponent(window.location.href);
1242
- }
1243
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1244
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, providedIn: 'root' }); }
1245
- }
1246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, decorators: [{
1247
- type: Injectable,
1248
- args: [{
1249
- providedIn: 'root',
1250
- }]
1251
- }] });
1252
-
1253
1241
  const BASE_URL = 'https://cdn.v-comply.com';
1254
1242
  const ASSETS = {
1255
1243
  VCOMPLY_LOGO: `${BASE_URL}/logo/prod/v-logo.svg`,
@@ -1276,7 +1264,7 @@ const ERROR_CONFIG = {
1276
1264
  details: 'If you believe this is an error, please contact',
1277
1265
  email: 'help@v-comply.com',
1278
1266
  support: 'for support',
1279
- buttonText: 'CONTACT SUPPORT',
1267
+ buttonText: 'Go To Dashboard',
1280
1268
  mail: 'mailto:help@v-comply.com',
1281
1269
  },
1282
1270
  SESSION_EXPIRED: {
@@ -1313,11 +1301,14 @@ const REDIRECTION_URL = {
1313
1301
  RISK_DASHBOARD: '/global-dashboard/risk_dashboard?module=risk',
1314
1302
  POLICY_DASHBOARD: '/global-dashboard/policy_dashboard?module=policy',
1315
1303
  ISSUE_DASHBOARD: '/global-dashboard/issue_dashboard?module=issue',
1304
+ CASEOPS_DASHBOARD: '/global-dashboard/case_dashboard?module=caseops',
1305
+ DEFAULT: '/global-dashboard',
1316
1306
  };
1317
1307
  const MODULE_NAMES = {
1318
1308
  RISK: 'risk',
1319
1309
  POLICY: 'policy',
1320
1310
  ISSUE: 'issue',
1311
+ CASEOPS: 'caseops',
1321
1312
  };
1322
1313
  const MODAL_ERROR_TYPES = {
1323
1314
  CHUNK_NOT_FOUND: 'chunk_not_found',
@@ -1328,10 +1319,56 @@ const ALT_IMAGE_TEXT = {
1328
1319
  VCOMPLY_LOGO: 'VComply',
1329
1320
  };
1330
1321
 
1322
+ class RouterService {
1323
+ constructor() {
1324
+ this.baseUrl = '';
1325
+ this.setBaseUrl();
1326
+ }
1327
+ setBaseUrl() {
1328
+ this.baseUrl = window.location.origin;
1329
+ }
1330
+ redirectToLogin() {
1331
+ window.location.href =
1332
+ `https://${window.location.host}/` +
1333
+ 'signin?redirectURL=' +
1334
+ encodeURIComponent(window.location.href);
1335
+ }
1336
+ redirectToHome(module_name) {
1337
+ let targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
1338
+ switch (module_name) {
1339
+ case MODULE_NAMES.RISK:
1340
+ targetPath = REDIRECTION_URL.RISK_DASHBOARD;
1341
+ break;
1342
+ case MODULE_NAMES.POLICY:
1343
+ targetPath = REDIRECTION_URL.POLICY_DASHBOARD;
1344
+ break;
1345
+ case MODULE_NAMES.ISSUE:
1346
+ targetPath = REDIRECTION_URL.ISSUE_DASHBOARD;
1347
+ break;
1348
+ case MODULE_NAMES.CASEOPS:
1349
+ targetPath = REDIRECTION_URL.CASEOPS_DASHBOARD;
1350
+ break;
1351
+ default:
1352
+ targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
1353
+ break;
1354
+ }
1355
+ window.location.replace(targetPath);
1356
+ }
1357
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1358
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, providedIn: 'root' }); }
1359
+ }
1360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, decorators: [{
1361
+ type: Injectable,
1362
+ args: [{
1363
+ providedIn: 'root',
1364
+ }]
1365
+ }], ctorParameters: function () { return []; } });
1366
+
1331
1367
  class Configurations {
1332
1368
  constructor() {
1333
1369
  this.sentryConfig = {};
1334
1370
  this.envConfig = {};
1371
+ this.isErrorInterceptorEnabled = false;
1335
1372
  }
1336
1373
  }
1337
1374
 
@@ -1466,34 +1503,203 @@ class SnackBarComponent {
1466
1503
  this.snackbarSubscription.unsubscribe();
1467
1504
  }
1468
1505
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarComponent, deps: [{ token: SnackBarService }], target: i0.ɵɵFactoryTarget.Component }); }
1469
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SnackBarComponent, selector: "app-snack-bar", ngImport: i0, template: "<div class=\"workflow-snackbar\" *ngIf=\"show\">\n <div class=\"workflow-snackbar-inner\">\n <div class=\"workflow-snackbarText\">\n <!-- &#xe914; -->\n <i class=\"icons\" [class]=\"type\" [innerHTML]=\"icon\"></i> <span [innerHTML]=\"message\">{{ message }}</span>\n </div>\n <button (click)=\"close()\">[ <span>Close</span> ]</button>\n </div>\n </div>", styles: ["::ng-deep .workflow-snackbar{position:fixed;top:20px;left:0;right:0;display:flex;align-items:center;justify-content:center;z-index:2147483647!important;pointer-events:none;animation:slide-top .3s cubic-bezier(.25,.46,.45,.94) both}::ng-deep .workflow-snackbar.white{background-color:#fff;color:#000;z-index:20}::ng-deep .workflow-snackbar.white button{color:#f6882f;font-size:11px;font-weight:400;pointer-events:all}::ng-deep .workflow-snackbar .workflow-snackbar-inner{display:flex;max-width:500px;min-width:450px;align-items:center;justify-content:space-between;padding:10px;background:#fff;border-radius:3px;box-shadow:0 0 10px #0003;min-height:55px;pointer-events:auto}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText{color:#161b2f;font-size:13px;display:flex;align-items:center;width:calc(100% - 70px)}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i{background:#f1f1f1;color:#d93b41;border-radius:50px;font-size:16px;width:30px;height:30px;text-align:center;line-height:28px;margin-right:10px;min-width:30px}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.success{color:#34aa44}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.warning{color:#f0b819}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.info{color:#1e5dd3}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.alert{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.error{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner button{background:transparent;border:none;font-size:11px;padding:0;position:relative;color:#747576;width:65px;text-align:right;cursor:pointer;text-transform:uppercase}::ng-deep .workflow-snackbar .workflow-snackbar-inner button span{color:#1e5dd3;font-weight:500}::ng-deep .workflow-snackbar .workflow-snackbar-inner button:focus{outline:none}@keyframes slide-top{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1506
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SnackBarComponent, selector: "app-snack-bar", ngImport: i0, template: "<div class=\"workflow-snackbar\" *ngIf=\"show\">\n <div class=\"workflow-snackbar-inner\">\n <div class=\"workflow-snackbarText\">\n <!-- &#xe914; -->\n <i class=\"icons\" [class]=\"type\" [innerHTML]=\"icon\"></i> <span [innerHTML]=\"message\">{{ message }}</span>\n </div>\n <button (click)=\"close()\">[ <span>Close</span> ]</button>\n </div>\n </div>", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";::ng-deep .workflow-snackbar{position:fixed;top:20px;left:0;right:0;display:flex;align-items:center;justify-content:center;z-index:2147483647!important;pointer-events:none;animation:slide-top .3s cubic-bezier(.25,.46,.45,.94) both}::ng-deep .workflow-snackbar.white{background-color:#fff;color:#000;z-index:20}::ng-deep .workflow-snackbar.white button{color:#f6882f;font-size:11px;font-weight:400;pointer-events:all}::ng-deep .workflow-snackbar .workflow-snackbar-inner{display:flex;max-width:500px;min-width:450px;align-items:center;justify-content:space-between;padding:10px;background:#fff;border-radius:3px;box-shadow:0 0 10px #0003;min-height:55px;pointer-events:auto}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText{color:#161b2f;font-size:13px;display:flex;align-items:center;width:calc(100% - 70px)}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i{background:#f1f1f1;color:#d93b41;border-radius:50px;font-size:16px;width:30px;height:30px;text-align:center;line-height:28px;margin-right:10px;min-width:30px}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.success{color:#34aa44}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.warning{color:#f0b819}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.info{color:#1e5dd3}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.alert{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.error{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner button{background:transparent;border:none;font-size:11px;padding:0;position:relative;color:#747576;width:65px;text-align:right;cursor:pointer;text-transform:uppercase}::ng-deep .workflow-snackbar .workflow-snackbar-inner button span{color:#1e5dd3;font-weight:500}::ng-deep .workflow-snackbar .workflow-snackbar-inner button:focus{outline:none}@keyframes slide-top{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1470
1507
  }
1471
1508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarComponent, decorators: [{
1472
1509
  type: Component,
1473
- args: [{ selector: 'app-snack-bar', template: "<div class=\"workflow-snackbar\" *ngIf=\"show\">\n <div class=\"workflow-snackbar-inner\">\n <div class=\"workflow-snackbarText\">\n <!-- &#xe914; -->\n <i class=\"icons\" [class]=\"type\" [innerHTML]=\"icon\"></i> <span [innerHTML]=\"message\">{{ message }}</span>\n </div>\n <button (click)=\"close()\">[ <span>Close</span> ]</button>\n </div>\n </div>", styles: ["::ng-deep .workflow-snackbar{position:fixed;top:20px;left:0;right:0;display:flex;align-items:center;justify-content:center;z-index:2147483647!important;pointer-events:none;animation:slide-top .3s cubic-bezier(.25,.46,.45,.94) both}::ng-deep .workflow-snackbar.white{background-color:#fff;color:#000;z-index:20}::ng-deep .workflow-snackbar.white button{color:#f6882f;font-size:11px;font-weight:400;pointer-events:all}::ng-deep .workflow-snackbar .workflow-snackbar-inner{display:flex;max-width:500px;min-width:450px;align-items:center;justify-content:space-between;padding:10px;background:#fff;border-radius:3px;box-shadow:0 0 10px #0003;min-height:55px;pointer-events:auto}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText{color:#161b2f;font-size:13px;display:flex;align-items:center;width:calc(100% - 70px)}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i{background:#f1f1f1;color:#d93b41;border-radius:50px;font-size:16px;width:30px;height:30px;text-align:center;line-height:28px;margin-right:10px;min-width:30px}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.success{color:#34aa44}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.warning{color:#f0b819}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.info{color:#1e5dd3}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.alert{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.error{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner button{background:transparent;border:none;font-size:11px;padding:0;position:relative;color:#747576;width:65px;text-align:right;cursor:pointer;text-transform:uppercase}::ng-deep .workflow-snackbar .workflow-snackbar-inner button span{color:#1e5dd3;font-weight:500}::ng-deep .workflow-snackbar .workflow-snackbar-inner button:focus{outline:none}@keyframes slide-top{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
1510
+ args: [{ selector: 'app-snack-bar', template: "<div class=\"workflow-snackbar\" *ngIf=\"show\">\n <div class=\"workflow-snackbar-inner\">\n <div class=\"workflow-snackbarText\">\n <!-- &#xe914; -->\n <i class=\"icons\" [class]=\"type\" [innerHTML]=\"icon\"></i> <span [innerHTML]=\"message\">{{ message }}</span>\n </div>\n <button (click)=\"close()\">[ <span>Close</span> ]</button>\n </div>\n </div>", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";::ng-deep .workflow-snackbar{position:fixed;top:20px;left:0;right:0;display:flex;align-items:center;justify-content:center;z-index:2147483647!important;pointer-events:none;animation:slide-top .3s cubic-bezier(.25,.46,.45,.94) both}::ng-deep .workflow-snackbar.white{background-color:#fff;color:#000;z-index:20}::ng-deep .workflow-snackbar.white button{color:#f6882f;font-size:11px;font-weight:400;pointer-events:all}::ng-deep .workflow-snackbar .workflow-snackbar-inner{display:flex;max-width:500px;min-width:450px;align-items:center;justify-content:space-between;padding:10px;background:#fff;border-radius:3px;box-shadow:0 0 10px #0003;min-height:55px;pointer-events:auto}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText{color:#161b2f;font-size:13px;display:flex;align-items:center;width:calc(100% - 70px)}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i{background:#f1f1f1;color:#d93b41;border-radius:50px;font-size:16px;width:30px;height:30px;text-align:center;line-height:28px;margin-right:10px;min-width:30px}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.success{color:#34aa44}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.warning{color:#f0b819}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.info{color:#1e5dd3}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.alert{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner .workflow-snackbarText i.error{color:#d93b41}::ng-deep .workflow-snackbar .workflow-snackbar-inner button{background:transparent;border:none;font-size:11px;padding:0;position:relative;color:#747576;width:65px;text-align:right;cursor:pointer;text-transform:uppercase}::ng-deep .workflow-snackbar .workflow-snackbar-inner button span{color:#1e5dd3;font-weight:500}::ng-deep .workflow-snackbar .workflow-snackbar-inner button:focus{outline:none}@keyframes slide-top{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
1474
1511
  }], ctorParameters: function () { return [{ type: SnackBarService }]; } });
1475
1512
 
1513
+ class ToolTipDirective {
1514
+ constructor(el, renderer) {
1515
+ this.el = el;
1516
+ this.renderer = renderer;
1517
+ this.showTooltip = true;
1518
+ this.offset = 8;
1519
+ }
1520
+ ngOnInit() { }
1521
+ onMouseEnter() {
1522
+ this.hide();
1523
+ this.show();
1524
+ }
1525
+ onMouseOver() {
1526
+ this.hide();
1527
+ this.show();
1528
+ }
1529
+ onMouseLeave() {
1530
+ this.hide();
1531
+ }
1532
+ onMouseOut() {
1533
+ this.hide();
1534
+ }
1535
+ onClick() {
1536
+ this.hide();
1537
+ }
1538
+ show() {
1539
+ if (!this.showTooltip) {
1540
+ return;
1541
+ }
1542
+ this.create();
1543
+ const element = this.el.nativeElement;
1544
+ if (this.tooltipMandatory === true) {
1545
+ this.setPosition();
1546
+ this.renderer.addClass(this.tooltip, 'fl-tooltip-show');
1547
+ }
1548
+ else {
1549
+ if (element.scrollWidth * element.scrollHeight >
1550
+ element.offsetWidth * element.offsetHeight) {
1551
+ this.setPosition();
1552
+ this.renderer.addClass(this.tooltip, 'fl-tooltip-show');
1553
+ }
1554
+ }
1555
+ }
1556
+ hide() {
1557
+ if (document.body.contains(this.tooltip)) {
1558
+ if (this.renderer) {
1559
+ this.renderer.removeChild(document.body, document.getElementById('tooltip'));
1560
+ }
1561
+ }
1562
+ }
1563
+ create() {
1564
+ this.tooltip = this.renderer.createElement('span');
1565
+ this.tooltip.setAttribute('id', 'tooltip');
1566
+ this.tooltip.innerHTML = this.tooltipTitle;
1567
+ this.renderer.appendChild(document.body, this.tooltip);
1568
+ this.renderer.addClass(this.tooltip, 'fl-tooltip');
1569
+ this.renderer.addClass(this.tooltip, `fl-tooltip-${this.placement}`);
1570
+ this.renderer.addClass(this.tooltip, `${this.type}`);
1571
+ if (this.animate) {
1572
+ this.renderer.addClass(this.tooltip, `animate-${this.placement}`);
1573
+ }
1574
+ }
1575
+ setPosition() {
1576
+ const hostPos = this.el.nativeElement.getBoundingClientRect();
1577
+ const tooltipPos = this.tooltip.getBoundingClientRect();
1578
+ const scrollPos = window.pageYOffset ||
1579
+ document.documentElement.scrollTop ||
1580
+ document.body.scrollTop ||
1581
+ 0;
1582
+ const w = window.innerWidth;
1583
+ const h = window.innerHeight;
1584
+ let top;
1585
+ let left;
1586
+ if (this.placement === 'top') {
1587
+ top = hostPos.top - tooltipPos.height - this.offset;
1588
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
1589
+ }
1590
+ if (this.placement === 'bottom') {
1591
+ if (hostPos.top + tooltipPos.height > h) {
1592
+ top = hostPos.top - tooltipPos.height;
1593
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
1594
+ this.renderer.removeClass(this.tooltip, `fl-tooltip-bottom`);
1595
+ this.renderer.addClass(this.tooltip, `fl-tooltip-top`);
1596
+ }
1597
+ else {
1598
+ top = hostPos.bottom + this.offset;
1599
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
1600
+ }
1601
+ }
1602
+ if (this.placement === 'left') {
1603
+ top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
1604
+ left = hostPos.left - tooltipPos.width - this.offset;
1605
+ }
1606
+ if (this.placement === 'right') {
1607
+ top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
1608
+ left = hostPos.right + this.offset;
1609
+ }
1610
+ if (this.placement === 'bottom-right') {
1611
+ top = hostPos.bottom + this.offset;
1612
+ left = hostPos.left - (tooltipPos.width - 28);
1613
+ }
1614
+ if (this.placement === 'bottom-left') {
1615
+ if (hostPos.top + tooltipPos.height > h - 30) {
1616
+ top = hostPos.top - tooltipPos.height;
1617
+ left = hostPos.left;
1618
+ this.renderer.removeClass(this.tooltip, `fl-tooltip-bottom-left`);
1619
+ this.renderer.addClass(this.tooltip, `fl-tooltip-top-left`);
1620
+ }
1621
+ else {
1622
+ top = hostPos.bottom + this.offset;
1623
+ left = hostPos.left;
1624
+ }
1625
+ }
1626
+ this.renderer.setStyle(this.tooltip, 'top', `${top + scrollPos}px`);
1627
+ this.renderer.setStyle(this.tooltip, 'left', `${left}px`);
1628
+ }
1629
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolTipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1630
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolTipDirective, selector: "[arTooltip]", inputs: { tooltipTitle: ["arTooltip", "tooltipTitle"], placement: "placement", type: "type", tooltipMandatory: "tooltipMandatory", showTooltip: "showTooltip", animate: "animate" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseover": "onMouseOver()", "mouseleave": "onMouseLeave()", "mouseout": "onMouseOut()", "click": "onClick()" } }, ngImport: i0 }); }
1631
+ }
1632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolTipDirective, decorators: [{
1633
+ type: Directive,
1634
+ args: [{
1635
+ selector: '[arTooltip]',
1636
+ }]
1637
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltipTitle: [{
1638
+ type: Input,
1639
+ args: ['arTooltip']
1640
+ }], placement: [{
1641
+ type: Input
1642
+ }], type: [{
1643
+ type: Input
1644
+ }], tooltipMandatory: [{
1645
+ type: Input
1646
+ }], showTooltip: [{
1647
+ type: Input
1648
+ }], animate: [{
1649
+ type: Input
1650
+ }], onMouseEnter: [{
1651
+ type: HostListener,
1652
+ args: ['mouseenter']
1653
+ }], onMouseOver: [{
1654
+ type: HostListener,
1655
+ args: ['mouseover']
1656
+ }], onMouseLeave: [{
1657
+ type: HostListener,
1658
+ args: ['mouseleave']
1659
+ }], onMouseOut: [{
1660
+ type: HostListener,
1661
+ args: ['mouseout']
1662
+ }], onClick: [{
1663
+ type: HostListener,
1664
+ args: ['click']
1665
+ }] } });
1666
+
1476
1667
  class UnauthorizedComponent {
1477
- constructor() {
1668
+ constructor(route, routerService) {
1669
+ this.route = route;
1670
+ this.routerService = routerService;
1478
1671
  this.currentYear = new Date().getFullYear();
1479
1672
  this.errorConfig = ERROR_CONFIG.UNAUTHORIZED;
1480
1673
  this.VcomplyLogo = VCOMPLY_LOGO_URL;
1481
1674
  this.altImageText = ALT_IMAGE_TEXT;
1482
1675
  this.organisationName = ORGANISATION_NAME;
1676
+ this.defaultURL = this.routerService.baseUrl + REDIRECTION_URL.DEFAULT;
1483
1677
  }
1484
- redirectToSupport() {
1485
- window.location.href = this.errorConfig.mail;
1678
+ redirectToDashboard() {
1679
+ const module_name = this.route.snapshot.data['page_path'];
1680
+ this.routerService.redirectToHome(module_name);
1486
1681
  }
1487
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnauthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1682
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnauthorizedComponent, deps: [{ token: i3.ActivatedRoute }, { token: RouterService }], target: i0.ɵɵFactoryTarget.Component }); }
1488
1683
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized", ngImport: i0, template: `
1489
1684
  <div class="errorPage">
1490
- <div class="errorPage-top">
1491
- <img
1492
- [ngSrc]="VcomplyLogo"
1493
- [alt]="altImageText.VCOMPLY_LOGO"
1494
- width="24"
1495
- height="24"
1496
- />
1685
+ <div class="errorPage-top" (click)="redirectToDashboard()">
1686
+ <a
1687
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
1688
+ [arTooltip]="errorConfig.buttonText"
1689
+ placement="right"
1690
+ type="white"
1691
+ delay="0"
1692
+ [tooltipMandatory]="true"
1693
+ [animate]="true"
1694
+ [href]="defaultURL"
1695
+ >
1696
+ <img
1697
+ [ngSrc]="VcomplyLogo"
1698
+ [alt]="altImageText.VCOMPLY_LOGO"
1699
+ width="24"
1700
+ height="24"
1701
+ />
1702
+ </a>
1497
1703
  </div>
1498
1704
  <div class="errorPage-container">
1499
1705
  <div class="errorPage-inner">
@@ -1515,7 +1721,7 @@ class UnauthorizedComponent {
1515
1721
  }}</a>
1516
1722
  {{ errorConfig.support }}.
1517
1723
  </div>
1518
- <button class="errorPage-btn" (click)="redirectToSupport()">
1724
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
1519
1725
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
1520
1726
  </button>
1521
1727
  </div>
@@ -1525,19 +1731,30 @@ class UnauthorizedComponent {
1525
1731
  </div>
1526
1732
  </div>
1527
1733
  </div>
1528
- `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }] }); }
1734
+ `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem;cursor:pointer}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i4.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }, { kind: "directive", type: ToolTipDirective, selector: "[arTooltip]", inputs: ["arTooltip", "placement", "type", "tooltipMandatory", "showTooltip", "animate"] }] }); }
1529
1735
  }
1530
1736
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnauthorizedComponent, decorators: [{
1531
1737
  type: Component,
1532
1738
  args: [{ selector: 'lib-vc-error-unauthorized', template: `
1533
1739
  <div class="errorPage">
1534
- <div class="errorPage-top">
1535
- <img
1536
- [ngSrc]="VcomplyLogo"
1537
- [alt]="altImageText.VCOMPLY_LOGO"
1538
- width="24"
1539
- height="24"
1540
- />
1740
+ <div class="errorPage-top" (click)="redirectToDashboard()">
1741
+ <a
1742
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
1743
+ [arTooltip]="errorConfig.buttonText"
1744
+ placement="right"
1745
+ type="white"
1746
+ delay="0"
1747
+ [tooltipMandatory]="true"
1748
+ [animate]="true"
1749
+ [href]="defaultURL"
1750
+ >
1751
+ <img
1752
+ [ngSrc]="VcomplyLogo"
1753
+ [alt]="altImageText.VCOMPLY_LOGO"
1754
+ width="24"
1755
+ height="24"
1756
+ />
1757
+ </a>
1541
1758
  </div>
1542
1759
  <div class="errorPage-container">
1543
1760
  <div class="errorPage-inner">
@@ -1559,7 +1776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1559
1776
  }}</a>
1560
1777
  {{ errorConfig.support }}.
1561
1778
  </div>
1562
- <button class="errorPage-btn" (click)="redirectToSupport()">
1779
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
1563
1780
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
1564
1781
  </button>
1565
1782
  </div>
@@ -1569,8 +1786,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1569
1786
  </div>
1570
1787
  </div>
1571
1788
  </div>
1572
- `, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"] }]
1573
- }] });
1789
+ `, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem;cursor:pointer}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"] }]
1790
+ }], ctorParameters: function () { return [{ type: i3.ActivatedRoute }, { type: RouterService }]; } });
1574
1791
 
1575
1792
  class DialogConfig {
1576
1793
  }
@@ -1724,7 +1941,7 @@ class DialogComponent {
1724
1941
  document.body.style.overflow = 'auto';
1725
1942
  }
1726
1943
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: DialogRef }, { token: DialogConfig }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1727
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DialogComponent, selector: "app-dialog", viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: InsertionDirective, descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"overlay\"\n (click)=\"onOverlayClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER',\n black: background === 'black',\n whiteBlur: background === 'whiteBlur'\n }\" [class.pointer-none]=\"pointer === 'none'\"\n>\n <div\n class=\"dialog\"\n [class.animate]=\"animation\"\n (click)=\"onDialogClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER'\n }\"\n >\n <ng-template appInsertion></ng-template>\n </div>\n</div>\n", styles: [".overlay{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;z-index:2147483009!important}.overlay.low{z-index:1}.overlay.black{background:#161b2fcc}.overlay.whiteBlur{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.overlay.top{align-items:flex-start}.overlay.right{justify-content:flex-end}.overlay.bottom{align-items:flex-end}.overlay.left{justify-content:flex-start}.dialog{position:relative}.dialog.animate.top{animation:animate-top .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-top{0%{transform:translateY(-100px)}to{transform:translateY(0)}}.dialog.animate.right{animation:animate-right .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-right{0%{transform:translate(100%)}to{transform:translate(0)}}.pointer-none{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: InsertionDirective, selector: "[appInsertion]" }] }); }
1944
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DialogComponent, selector: "app-dialog", viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: InsertionDirective, descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"overlay\"\n (click)=\"onOverlayClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER',\n black: background === 'black',\n whiteBlur: background === 'whiteBlur'\n }\" [class.pointer-none]=\"pointer === 'none'\"\n>\n <div\n class=\"dialog\"\n [class.animate]=\"animation\"\n (click)=\"onDialogClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER'\n }\"\n >\n <ng-template appInsertion></ng-template>\n </div>\n</div>\n", styles: [".overlay{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;z-index:2147483009!important}.overlay.low{z-index:1}.overlay.black{background:#161b2fcc}.overlay.whiteBlur{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.overlay.top{align-items:flex-start}.overlay.right{justify-content:flex-end}.overlay.bottom{align-items:flex-end}.overlay.left{justify-content:flex-start}.dialog{position:relative}.dialog.animate.top{animation:animate-top .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-top{0%{transform:translateY(-100px)}to{transform:translateY(0)}}.dialog.animate.right{animation:animate-right .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-right{0%{transform:translate(100%)}to{transform:translate(0)}}.pointer-none{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: InsertionDirective, selector: "[appInsertion]" }] }); }
1728
1945
  }
1729
1946
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, decorators: [{
1730
1947
  type: Component,
@@ -1910,7 +2127,7 @@ class ServerErrorComponent {
1910
2127
  </div>
1911
2128
  </div>
1912
2129
  </div>
1913
- `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }] }); }
2130
+ `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem;cursor:pointer}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i4.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }] }); }
1914
2131
  }
1915
2132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServerErrorComponent, decorators: [{
1916
2133
  type: Component,
@@ -1945,7 +2162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1945
2162
  </div>
1946
2163
  </div>
1947
2164
  </div>
1948
- `, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"] }]
2165
+ `, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem;cursor:pointer}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"] }]
1949
2166
  }] });
1950
2167
 
1951
2168
  class VcErrorHandlersComponent {
@@ -2026,7 +2243,7 @@ class VcErrorHandlersComponent {
2026
2243
  *ngIf="chunkUnavailable"
2027
2244
  ></lib-vc-error-chunk-unavailable>
2028
2245
  <lib-vc-error-server-error *ngIf="serverError"></lib-vc-error-server-error>
2029
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SnackBarComponent, selector: "app-snack-bar" }, { kind: "component", type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized" }, { kind: "component", type: SessionExpiredComponent, selector: "lib-vc-error-session-expired" }, { kind: "component", type: ChunkUnavailableComponent, selector: "lib-vc-error-chunk-unavailable" }, { kind: "component", type: ServerErrorComponent, selector: "lib-vc-error-server-error" }] }); }
2246
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SnackBarComponent, selector: "app-snack-bar" }, { kind: "component", type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized" }, { kind: "component", type: SessionExpiredComponent, selector: "lib-vc-error-session-expired" }, { kind: "component", type: ChunkUnavailableComponent, selector: "lib-vc-error-chunk-unavailable" }, { kind: "component", type: ServerErrorComponent, selector: "lib-vc-error-server-error" }] }); }
2030
2247
  }
2031
2248
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersComponent, decorators: [{
2032
2249
  type: Component,
@@ -2052,44 +2269,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2052
2269
  }] } });
2053
2270
 
2054
2271
  class PageNotFoundComponent {
2055
- constructor(route) {
2272
+ constructor(route, routerService) {
2056
2273
  this.route = route;
2274
+ this.routerService = routerService;
2057
2275
  this.errorConfig = ERROR_CONFIG.PAGE_NOT_FOUND;
2058
2276
  this.VcomplyLogo = VCOMPLY_LOGO_URL;
2059
2277
  this.altImageText = ALT_IMAGE_TEXT;
2060
2278
  this.currentYear = new Date().getFullYear();
2061
- this.redirectionUrl = REDIRECTION_URL;
2062
2279
  this.organisationName = ORGANISATION_NAME;
2280
+ this.defaultURL = this.routerService.baseUrl + REDIRECTION_URL.DEFAULT;
2063
2281
  }
2064
- redirectToHome() {
2282
+ redirectToDashboard() {
2065
2283
  const module_name = this.route.snapshot.data['page_path'];
2066
- let targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
2067
- switch (module_name) {
2068
- case MODULE_NAMES.RISK:
2069
- targetPath = REDIRECTION_URL.RISK_DASHBOARD;
2070
- break;
2071
- case MODULE_NAMES.POLICY:
2072
- targetPath = REDIRECTION_URL.POLICY_DASHBOARD;
2073
- break;
2074
- case MODULE_NAMES.ISSUE:
2075
- targetPath = REDIRECTION_URL.ISSUE_DASHBOARD;
2076
- break;
2077
- default:
2078
- targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
2079
- break;
2080
- }
2081
- window.location.replace(targetPath);
2284
+ this.routerService.redirectToHome(module_name);
2082
2285
  }
2083
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotFoundComponent, deps: [{ token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2286
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotFoundComponent, deps: [{ token: i3.ActivatedRoute }, { token: RouterService }], target: i0.ɵɵFactoryTarget.Component }); }
2084
2287
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PageNotFoundComponent, selector: "lib-vc-error-page-not-found", ngImport: i0, template: `
2085
2288
  <div class="errorPage">
2086
- <div class="errorPage-top">
2087
- <img
2088
- [ngSrc]="VcomplyLogo"
2089
- [alt]="altImageText.VCOMPLY_LOGO"
2090
- width="24"
2091
- height="24"
2092
- />
2289
+ <div class="errorPage-top" (click)="redirectToDashboard()">
2290
+ <a
2291
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
2292
+ [arTooltip]="errorConfig.buttonText"
2293
+ placement="right"
2294
+ type="white"
2295
+ delay="0"
2296
+ [tooltipMandatory]="true"
2297
+ [animate]="true"
2298
+ [href]="defaultURL"
2299
+ >
2300
+ <img
2301
+ [ngSrc]="VcomplyLogo"
2302
+ [alt]="altImageText.VCOMPLY_LOGO"
2303
+ width="24"
2304
+ height="24"
2305
+ />
2306
+ </a>
2093
2307
  </div>
2094
2308
  <div class="errorPage-container">
2095
2309
  <div class="errorPage-inner">
@@ -2105,7 +2319,7 @@ class PageNotFoundComponent {
2105
2319
  <div class="errorPage-heading">{{ errorConfig.title }}</div>
2106
2320
  <div class="errorPage-text">{{ errorConfig.description }}</div>
2107
2321
  <div class="errorPage-details">{{ errorConfig.details }}</div>
2108
- <button class="errorPage-btn" (click)="redirectToHome()">
2322
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
2109
2323
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
2110
2324
  </button>
2111
2325
  </div>
@@ -2115,19 +2329,30 @@ class PageNotFoundComponent {
2115
2329
  </div>
2116
2330
  </div>
2117
2331
  </div>
2118
- `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }] }); }
2332
+ `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem;cursor:pointer}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i4.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }, { kind: "directive", type: ToolTipDirective, selector: "[arTooltip]", inputs: ["arTooltip", "placement", "type", "tooltipMandatory", "showTooltip", "animate"] }] }); }
2119
2333
  }
2120
2334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotFoundComponent, decorators: [{
2121
2335
  type: Component,
2122
2336
  args: [{ selector: 'lib-vc-error-page-not-found', template: `
2123
2337
  <div class="errorPage">
2124
- <div class="errorPage-top">
2125
- <img
2126
- [ngSrc]="VcomplyLogo"
2127
- [alt]="altImageText.VCOMPLY_LOGO"
2128
- width="24"
2129
- height="24"
2130
- />
2338
+ <div class="errorPage-top" (click)="redirectToDashboard()">
2339
+ <a
2340
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
2341
+ [arTooltip]="errorConfig.buttonText"
2342
+ placement="right"
2343
+ type="white"
2344
+ delay="0"
2345
+ [tooltipMandatory]="true"
2346
+ [animate]="true"
2347
+ [href]="defaultURL"
2348
+ >
2349
+ <img
2350
+ [ngSrc]="VcomplyLogo"
2351
+ [alt]="altImageText.VCOMPLY_LOGO"
2352
+ width="24"
2353
+ height="24"
2354
+ />
2355
+ </a>
2131
2356
  </div>
2132
2357
  <div class="errorPage-container">
2133
2358
  <div class="errorPage-inner">
@@ -2143,7 +2368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2143
2368
  <div class="errorPage-heading">{{ errorConfig.title }}</div>
2144
2369
  <div class="errorPage-text">{{ errorConfig.description }}</div>
2145
2370
  <div class="errorPage-details">{{ errorConfig.details }}</div>
2146
- <button class="errorPage-btn" (click)="redirectToHome()">
2371
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
2147
2372
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
2148
2373
  </button>
2149
2374
  </div>
@@ -2153,8 +2378,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2153
2378
  </div>
2154
2379
  </div>
2155
2380
  </div>
2156
- `, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"] }]
2157
- }], ctorParameters: function () { return [{ type: i3.ActivatedRoute }]; } });
2381
+ `, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.errorPage{background:#161b2f;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999}.errorPage-top{width:100%;height:3rem;display:flex;align-items:center;padding-left:.75rem;cursor:pointer}.errorPage-container{background:#f2f2f5;border-radius:.75rem;border:1px solid #e3e3e9;box-shadow:0 4px 8px #1d5dd31a;height:calc(100vh - 3.75rem);display:flex;align-items:center;justify-content:center;padding:0 4rem;margin:0 .75rem;position:relative}.errorPage-inner{display:flex;align-items:center}.errorPage-inner-image{width:16rem}.errorPage-inner-right{margin-left:2rem;width:calc(100% - 18rem)}.errorPage-inner-right .errorPage-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:78px;font-weight:700;line-height:110px;margin-bottom:1.5rem}.errorPage-inner-right .errorPage-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.errorPage-inner-right .errorPage-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:1.75rem}.errorPage-inner-right .errorPage-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.errorPage-inner-right .errorPage-btn i{font-size:14px;margin-left:.25rem}.errorPage-copyright{font-size:11px;color:#787a8c;font-weight:500;position:absolute;bottom:8px;right:16px;line-height:16px}\n"] }]
2382
+ }], ctorParameters: function () { return [{ type: i3.ActivatedRoute }, { type: RouterService }]; } });
2158
2383
 
2159
2384
  class ComponentLevelServerErrorComponent {
2160
2385
  constructor() {
@@ -2185,7 +2410,7 @@ class ComponentLevelServerErrorComponent {
2185
2410
  </div>
2186
2411
  </div>
2187
2412
  </div>
2188
- `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.serverError{background:#fff;display:flex;align-items:center;justify-content:center;border-radius:2px;width:100%;height:100%}.serverError-inner{text-align:center}.serverError-inner-image{width:16rem;margin:0 auto}.serverError-inner-bottom{margin-top:1rem}.serverError-inner-bottom .serverError-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:40px;font-weight:700;line-height:56px;margin-bottom:1.5rem}.serverError-inner-bottom .serverError-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.serverError-inner-bottom .serverError-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:2rem}.serverError-inner-bottom .serverError-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.serverError-inner-bottom .serverError-btn i{font-size:12px;margin-left:8px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }] }); }
2413
+ `, isInline: true, styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";.serverError{background:#fff;display:flex;align-items:center;justify-content:center;border-radius:2px;width:100%;height:100%}.serverError-inner{text-align:center}.serverError-inner-image{width:16rem;margin:0 auto}.serverError-inner-bottom{margin-top:1rem}.serverError-inner-bottom .serverError-heading{-webkit-text-fill-color:#e3e3e9;-webkit-text-stroke-color:#a9aab6;-webkit-text-stroke-width:1px;color:#e3e3e9;font-size:40px;font-weight:700;line-height:56px;margin-bottom:1.5rem}.serverError-inner-bottom .serverError-text{color:#141724;font-size:19px;font-weight:500;line-height:1.75rem;margin-bottom:.5rem}.serverError-inner-bottom .serverError-details{color:#565a6f;font-size:13px;line-height:20px;margin-bottom:2rem}.serverError-inner-bottom .serverError-btn{background:#1e5dd3;border-radius:.25rem;border:none;color:#fff;display:inline-flex;align-items:center;font-size:11px;font-weight:500;line-height:2rem;padding:0 1rem}.serverError-inner-bottom .serverError-btn i{font-size:12px;margin-left:8px}\n"], dependencies: [{ kind: "directive", type: i4.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }] }); }
2189
2414
  }
2190
2415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentLevelServerErrorComponent, decorators: [{
2191
2416
  type: Component,
@@ -2216,20 +2441,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2216
2441
  type: Output
2217
2442
  }] } });
2218
2443
 
2219
- class SnackBarModule {
2220
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2221
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, declarations: [SnackBarComponent], imports: [CommonModule], exports: [SnackBarComponent] }); }
2222
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, imports: [CommonModule] }); }
2223
- }
2224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, decorators: [{
2225
- type: NgModule,
2226
- args: [{
2227
- declarations: [SnackBarComponent],
2228
- imports: [CommonModule],
2229
- exports: [SnackBarComponent],
2230
- }]
2231
- }] });
2232
-
2233
2444
  class FeatureFlagDirective {
2234
2445
  constructor(tpl, vcr, featureFlagService) {
2235
2446
  this.tpl = tpl;
@@ -2270,6 +2481,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2270
2481
  }]
2271
2482
  }] });
2272
2483
 
2484
+ class SnackBarModule {
2485
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2486
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, declarations: [SnackBarComponent], imports: [CommonModule], exports: [SnackBarComponent] }); }
2487
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, imports: [CommonModule] }); }
2488
+ }
2489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, decorators: [{
2490
+ type: NgModule,
2491
+ args: [{
2492
+ declarations: [SnackBarComponent],
2493
+ imports: [CommonModule],
2494
+ exports: [SnackBarComponent],
2495
+ }]
2496
+ }] });
2497
+
2498
+ class TooltipModule {
2499
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2500
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, declarations: [ToolTipDirective], imports: [CommonModule], exports: [ToolTipDirective] }); }
2501
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, imports: [CommonModule] }); }
2502
+ }
2503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, decorators: [{
2504
+ type: NgModule,
2505
+ args: [{
2506
+ declarations: [ToolTipDirective],
2507
+ imports: [CommonModule],
2508
+ exports: [ToolTipDirective],
2509
+ }]
2510
+ }] });
2511
+
2273
2512
  class SentryErrorHandler {
2274
2513
  constructor(authorizerService, errorService, config) {
2275
2514
  this.authorizerService = authorizerService;
@@ -2312,34 +2551,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2312
2551
  }] }]; } });
2313
2552
 
2314
2553
  class HttpReqInterceptor {
2315
- constructor(errorService, featureFlagService) {
2554
+ constructor(errorService) {
2316
2555
  this.errorService = errorService;
2317
- this.featureFlagService = featureFlagService;
2318
2556
  }
2319
2557
  intercept(req, next) {
2320
- if (this.featureFlagService.isFeatureEnabled(ERROR_FEATURE_FLAG)) {
2321
- if (this.errorService.isExcludeErrorHandling(req)) {
2322
- return next.handle(req);
2323
- }
2324
- return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), tap((event) => {
2325
- if (event instanceof HttpResponse) {
2326
- this.errorService.handleSoftErrors(event);
2327
- }
2328
- }), catchError((error) => {
2329
- this.errorService.handleError(error, req);
2330
- return throwError(error);
2331
- }));
2332
- }
2333
- else {
2558
+ if (this.errorService.isExcludeErrorHandling(req)) {
2334
2559
  return next.handle(req);
2335
2560
  }
2561
+ return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), tap((event) => {
2562
+ if (event instanceof HttpResponse) {
2563
+ this.errorService.handleSoftErrors(event);
2564
+ }
2565
+ }), catchError((error) => {
2566
+ this.errorService.handleError(error, req);
2567
+ return throwError(error);
2568
+ }));
2336
2569
  }
2337
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor, deps: [{ token: GlobalErrorService }, { token: FeatureFlagService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2570
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor, deps: [{ token: GlobalErrorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2338
2571
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor }); }
2339
2572
  }
2340
2573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor, decorators: [{
2341
2574
  type: Injectable
2342
- }], ctorParameters: function () { return [{ type: GlobalErrorService }, { type: FeatureFlagService }]; } });
2575
+ }], ctorParameters: function () { return [{ type: GlobalErrorService }]; } });
2343
2576
 
2344
2577
  const FOR_ROOT_SENTRY_OPTIONS_TOKEN = new InjectionToken('forRoot() SentryErrorHandler options');
2345
2578
  class VcErrorHandlersModule {
@@ -2348,9 +2581,20 @@ class VcErrorHandlersModule {
2348
2581
  // this.loadConfig.loadConfig();
2349
2582
  }
2350
2583
  static forRoot(environmentConfig) {
2584
+ const providers = [
2585
+ { provide: Configurations, useValue: environmentConfig },
2586
+ { provide: ErrorHandler, useClass: SentryErrorHandler },
2587
+ ];
2588
+ if (environmentConfig.isErrorInterceptorEnabled) {
2589
+ providers.push({
2590
+ provide: HTTP_INTERCEPTORS,
2591
+ useClass: HttpReqInterceptor,
2592
+ multi: true,
2593
+ });
2594
+ }
2351
2595
  return {
2352
2596
  ngModule: VcErrorHandlersModule,
2353
- providers: [{ provide: Configurations, useValue: environmentConfig }],
2597
+ providers: providers,
2354
2598
  };
2355
2599
  }
2356
2600
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, deps: [{ token: FeatureFlagService }], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -2361,7 +2605,12 @@ class VcErrorHandlersModule {
2361
2605
  ChunkUnavailableComponent,
2362
2606
  ServerErrorComponent,
2363
2607
  ErrorModalComponent,
2364
- ComponentLevelServerErrorComponent], imports: [CommonModule, DialogModule, SnackBarModule, FeatureFlagModule, NgOptimizedImage], exports: [VcErrorHandlersComponent,
2608
+ ComponentLevelServerErrorComponent], imports: [CommonModule,
2609
+ DialogModule,
2610
+ FeatureFlagModule,
2611
+ NgOptimizedImage,
2612
+ SnackBarModule,
2613
+ TooltipModule], exports: [VcErrorHandlersComponent,
2365
2614
  PageNotFoundComponent,
2366
2615
  UnauthorizedComponent,
2367
2616
  SessionExpiredComponent,
@@ -2369,10 +2618,11 @@ class VcErrorHandlersModule {
2369
2618
  ServerErrorComponent,
2370
2619
  ErrorModalComponent,
2371
2620
  ComponentLevelServerErrorComponent] }); }
2372
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, providers: [
2373
- { provide: ErrorHandler, useClass: SentryErrorHandler },
2374
- { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },
2375
- ], imports: [CommonModule, DialogModule, SnackBarModule, FeatureFlagModule] }); }
2621
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, imports: [CommonModule,
2622
+ DialogModule,
2623
+ FeatureFlagModule,
2624
+ SnackBarModule,
2625
+ TooltipModule] }); }
2376
2626
  }
2377
2627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, decorators: [{
2378
2628
  type: NgModule,
@@ -2387,7 +2637,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2387
2637
  ErrorModalComponent,
2388
2638
  ComponentLevelServerErrorComponent,
2389
2639
  ],
2390
- imports: [CommonModule, DialogModule, SnackBarModule, FeatureFlagModule, NgOptimizedImage],
2640
+ imports: [
2641
+ CommonModule,
2642
+ DialogModule,
2643
+ FeatureFlagModule,
2644
+ NgOptimizedImage,
2645
+ SnackBarModule,
2646
+ TooltipModule,
2647
+ ],
2391
2648
  exports: [
2392
2649
  VcErrorHandlersComponent,
2393
2650
  PageNotFoundComponent,
@@ -2398,10 +2655,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2398
2655
  ErrorModalComponent,
2399
2656
  ComponentLevelServerErrorComponent,
2400
2657
  ],
2401
- providers: [
2402
- { provide: ErrorHandler, useClass: SentryErrorHandler },
2403
- { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },
2404
- ],
2405
2658
  bootstrap: [VcErrorHandlersComponent],
2406
2659
  }]
2407
2660
  }], ctorParameters: function () { return [{ type: FeatureFlagService }]; } });