vc-error-handlers 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/constants/exclude-api-config.constants.mjs +8 -2
  8. package/esm2022/lib/shared/interceptors/http.interceptor.mjs +14 -21
  9. package/esm2022/lib/shared/services/global-error.service.mjs +9 -10
  10. package/esm2022/lib/shared/services/router.service.mjs +31 -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 +402 -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
  {
@@ -1029,7 +1036,13 @@ const EXCLUDE_API_CONFIG = [
1029
1036
  path: 'fileupload/?destination=uploads',
1030
1037
  query: null,
1031
1038
  body: null,
1032
- }
1039
+ },
1040
+ {
1041
+ method: 'POST',
1042
+ path: '/ImportDocument',
1043
+ query: null,
1044
+ body: null,
1045
+ },
1033
1046
  ];
1034
1047
 
1035
1048
  class SnackBarService {
@@ -1119,17 +1132,15 @@ class GlobalErrorService {
1119
1132
  this.excludeApiConfig = EXCLUDE_API_CONFIG;
1120
1133
  }
1121
1134
  handleSoftErrors(event) {
1122
- if (!event.headers?.get) {
1135
+ if (!(event instanceof HttpResponse)) {
1123
1136
  return;
1124
1137
  }
1125
- const xData = event?.headers?.get('X-Data');
1126
- if (xData) {
1127
- const parsedData = JSON.parse(xData);
1128
- const statusCode = parsedData.statusCode;
1129
- const statusMessage = parsedData.message;
1130
- if (statusCode && statusCode !== 0) {
1131
- this.snackBarService.show(statusMessage || 'Error occurred', 'error');
1132
- }
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');
1133
1144
  }
1134
1145
  }
1135
1146
  handleError(error, request) {
@@ -1227,23 +1238,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1227
1238
  }]
1228
1239
  }], ctorParameters: function () { return [{ type: SnackBarService }, { type: UtilsService }, { type: i3.Router }]; } });
1229
1240
 
1230
- class RouterService {
1231
- redirectToLogin() {
1232
- window.location.href =
1233
- `https://${window.location.host}/` +
1234
- 'signin?redirectURL=' +
1235
- encodeURIComponent(window.location.href);
1236
- }
1237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1238
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, providedIn: 'root' }); }
1239
- }
1240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, decorators: [{
1241
- type: Injectable,
1242
- args: [{
1243
- providedIn: 'root',
1244
- }]
1245
- }] });
1246
-
1247
1241
  const BASE_URL = 'https://cdn.v-comply.com';
1248
1242
  const ASSETS = {
1249
1243
  VCOMPLY_LOGO: `${BASE_URL}/logo/prod/v-logo.svg`,
@@ -1270,7 +1264,7 @@ const ERROR_CONFIG = {
1270
1264
  details: 'If you believe this is an error, please contact',
1271
1265
  email: 'help@v-comply.com',
1272
1266
  support: 'for support',
1273
- buttonText: 'CONTACT SUPPORT',
1267
+ buttonText: 'Go To Dashboard',
1274
1268
  mail: 'mailto:help@v-comply.com',
1275
1269
  },
1276
1270
  SESSION_EXPIRED: {
@@ -1307,11 +1301,14 @@ const REDIRECTION_URL = {
1307
1301
  RISK_DASHBOARD: '/global-dashboard/risk_dashboard?module=risk',
1308
1302
  POLICY_DASHBOARD: '/global-dashboard/policy_dashboard?module=policy',
1309
1303
  ISSUE_DASHBOARD: '/global-dashboard/issue_dashboard?module=issue',
1304
+ CASEOPS_DASHBOARD: '/global-dashboard/case_dashboard?module=caseops',
1305
+ DEFAULT: '/global-dashboard',
1310
1306
  };
1311
1307
  const MODULE_NAMES = {
1312
1308
  RISK: 'risk',
1313
1309
  POLICY: 'policy',
1314
1310
  ISSUE: 'issue',
1311
+ CASEOPS: 'caseops',
1315
1312
  };
1316
1313
  const MODAL_ERROR_TYPES = {
1317
1314
  CHUNK_NOT_FOUND: 'chunk_not_found',
@@ -1322,10 +1319,56 @@ const ALT_IMAGE_TEXT = {
1322
1319
  VCOMPLY_LOGO: 'VComply',
1323
1320
  };
1324
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
+
1325
1367
  class Configurations {
1326
1368
  constructor() {
1327
1369
  this.sentryConfig = {};
1328
1370
  this.envConfig = {};
1371
+ this.isErrorInterceptorEnabled = false;
1329
1372
  }
1330
1373
  }
1331
1374
 
@@ -1460,34 +1503,203 @@ class SnackBarComponent {
1460
1503
  this.snackbarSubscription.unsubscribe();
1461
1504
  }
1462
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 }); }
1463
- 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: ["::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"] }] }); }
1464
1507
  }
1465
1508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarComponent, decorators: [{
1466
1509
  type: Component,
1467
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: ["::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"] }]
1468
1511
  }], ctorParameters: function () { return [{ type: SnackBarService }]; } });
1469
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
+
1470
1667
  class UnauthorizedComponent {
1471
- constructor() {
1668
+ constructor(route, routerService) {
1669
+ this.route = route;
1670
+ this.routerService = routerService;
1472
1671
  this.currentYear = new Date().getFullYear();
1473
1672
  this.errorConfig = ERROR_CONFIG.UNAUTHORIZED;
1474
1673
  this.VcomplyLogo = VCOMPLY_LOGO_URL;
1475
1674
  this.altImageText = ALT_IMAGE_TEXT;
1476
1675
  this.organisationName = ORGANISATION_NAME;
1676
+ this.defaultURL = this.routerService.baseUrl + REDIRECTION_URL.DEFAULT;
1477
1677
  }
1478
- redirectToSupport() {
1479
- window.location.href = this.errorConfig.mail;
1678
+ redirectToDashboard() {
1679
+ const module_name = this.route.snapshot.data['page_path'];
1680
+ this.routerService.redirectToHome(module_name);
1480
1681
  }
1481
- 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 }); }
1482
1683
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized", ngImport: i0, template: `
1483
1684
  <div class="errorPage">
1484
- <div class="errorPage-top">
1485
- <img
1486
- [ngSrc]="VcomplyLogo"
1487
- [alt]="altImageText.VCOMPLY_LOGO"
1488
- width="24"
1489
- height="24"
1490
- />
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>
1491
1703
  </div>
1492
1704
  <div class="errorPage-container">
1493
1705
  <div class="errorPage-inner">
@@ -1509,7 +1721,7 @@ class UnauthorizedComponent {
1509
1721
  }}</a>
1510
1722
  {{ errorConfig.support }}.
1511
1723
  </div>
1512
- <button class="errorPage-btn" (click)="redirectToSupport()">
1724
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
1513
1725
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
1514
1726
  </button>
1515
1727
  </div>
@@ -1519,19 +1731,30 @@ class UnauthorizedComponent {
1519
1731
  </div>
1520
1732
  </div>
1521
1733
  </div>
1522
- `, 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"] }] }); }
1523
1735
  }
1524
1736
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnauthorizedComponent, decorators: [{
1525
1737
  type: Component,
1526
1738
  args: [{ selector: 'lib-vc-error-unauthorized', template: `
1527
1739
  <div class="errorPage">
1528
- <div class="errorPage-top">
1529
- <img
1530
- [ngSrc]="VcomplyLogo"
1531
- [alt]="altImageText.VCOMPLY_LOGO"
1532
- width="24"
1533
- height="24"
1534
- />
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>
1535
1758
  </div>
1536
1759
  <div class="errorPage-container">
1537
1760
  <div class="errorPage-inner">
@@ -1553,7 +1776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1553
1776
  }}</a>
1554
1777
  {{ errorConfig.support }}.
1555
1778
  </div>
1556
- <button class="errorPage-btn" (click)="redirectToSupport()">
1779
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
1557
1780
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
1558
1781
  </button>
1559
1782
  </div>
@@ -1563,8 +1786,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1563
1786
  </div>
1564
1787
  </div>
1565
1788
  </div>
1566
- `, 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"] }]
1567
- }] });
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 }]; } });
1568
1791
 
1569
1792
  class DialogConfig {
1570
1793
  }
@@ -1718,7 +1941,7 @@ class DialogComponent {
1718
1941
  document.body.style.overflow = 'auto';
1719
1942
  }
1720
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 }); }
1721
- 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]" }] }); }
1722
1945
  }
1723
1946
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, decorators: [{
1724
1947
  type: Component,
@@ -1904,7 +2127,7 @@ class ServerErrorComponent {
1904
2127
  </div>
1905
2128
  </div>
1906
2129
  </div>
1907
- `, 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"] }] }); }
1908
2131
  }
1909
2132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServerErrorComponent, decorators: [{
1910
2133
  type: Component,
@@ -1939,7 +2162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1939
2162
  </div>
1940
2163
  </div>
1941
2164
  </div>
1942
- `, 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"] }]
1943
2166
  }] });
1944
2167
 
1945
2168
  class VcErrorHandlersComponent {
@@ -2020,7 +2243,7 @@ class VcErrorHandlersComponent {
2020
2243
  *ngIf="chunkUnavailable"
2021
2244
  ></lib-vc-error-chunk-unavailable>
2022
2245
  <lib-vc-error-server-error *ngIf="serverError"></lib-vc-error-server-error>
2023
- `, 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" }] }); }
2024
2247
  }
2025
2248
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersComponent, decorators: [{
2026
2249
  type: Component,
@@ -2046,44 +2269,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2046
2269
  }] } });
2047
2270
 
2048
2271
  class PageNotFoundComponent {
2049
- constructor(route) {
2272
+ constructor(route, routerService) {
2050
2273
  this.route = route;
2274
+ this.routerService = routerService;
2051
2275
  this.errorConfig = ERROR_CONFIG.PAGE_NOT_FOUND;
2052
2276
  this.VcomplyLogo = VCOMPLY_LOGO_URL;
2053
2277
  this.altImageText = ALT_IMAGE_TEXT;
2054
2278
  this.currentYear = new Date().getFullYear();
2055
- this.redirectionUrl = REDIRECTION_URL;
2056
2279
  this.organisationName = ORGANISATION_NAME;
2280
+ this.defaultURL = this.routerService.baseUrl + REDIRECTION_URL.DEFAULT;
2057
2281
  }
2058
- redirectToHome() {
2282
+ redirectToDashboard() {
2059
2283
  const module_name = this.route.snapshot.data['page_path'];
2060
- let targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
2061
- switch (module_name) {
2062
- case MODULE_NAMES.RISK:
2063
- targetPath = REDIRECTION_URL.RISK_DASHBOARD;
2064
- break;
2065
- case MODULE_NAMES.POLICY:
2066
- targetPath = REDIRECTION_URL.POLICY_DASHBOARD;
2067
- break;
2068
- case MODULE_NAMES.ISSUE:
2069
- targetPath = REDIRECTION_URL.ISSUE_DASHBOARD;
2070
- break;
2071
- default:
2072
- targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
2073
- break;
2074
- }
2075
- window.location.replace(targetPath);
2284
+ this.routerService.redirectToHome(module_name);
2076
2285
  }
2077
- 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 }); }
2078
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: `
2079
2288
  <div class="errorPage">
2080
- <div class="errorPage-top">
2081
- <img
2082
- [ngSrc]="VcomplyLogo"
2083
- [alt]="altImageText.VCOMPLY_LOGO"
2084
- width="24"
2085
- height="24"
2086
- />
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>
2087
2307
  </div>
2088
2308
  <div class="errorPage-container">
2089
2309
  <div class="errorPage-inner">
@@ -2099,7 +2319,7 @@ class PageNotFoundComponent {
2099
2319
  <div class="errorPage-heading">{{ errorConfig.title }}</div>
2100
2320
  <div class="errorPage-text">{{ errorConfig.description }}</div>
2101
2321
  <div class="errorPage-details">{{ errorConfig.details }}</div>
2102
- <button class="errorPage-btn" (click)="redirectToHome()">
2322
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
2103
2323
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
2104
2324
  </button>
2105
2325
  </div>
@@ -2109,19 +2329,30 @@ class PageNotFoundComponent {
2109
2329
  </div>
2110
2330
  </div>
2111
2331
  </div>
2112
- `, 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"] }] }); }
2113
2333
  }
2114
2334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotFoundComponent, decorators: [{
2115
2335
  type: Component,
2116
2336
  args: [{ selector: 'lib-vc-error-page-not-found', template: `
2117
2337
  <div class="errorPage">
2118
- <div class="errorPage-top">
2119
- <img
2120
- [ngSrc]="VcomplyLogo"
2121
- [alt]="altImageText.VCOMPLY_LOGO"
2122
- width="24"
2123
- height="24"
2124
- />
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>
2125
2356
  </div>
2126
2357
  <div class="errorPage-container">
2127
2358
  <div class="errorPage-inner">
@@ -2137,7 +2368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2137
2368
  <div class="errorPage-heading">{{ errorConfig.title }}</div>
2138
2369
  <div class="errorPage-text">{{ errorConfig.description }}</div>
2139
2370
  <div class="errorPage-details">{{ errorConfig.details }}</div>
2140
- <button class="errorPage-btn" (click)="redirectToHome()">
2371
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
2141
2372
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
2142
2373
  </button>
2143
2374
  </div>
@@ -2147,8 +2378,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2147
2378
  </div>
2148
2379
  </div>
2149
2380
  </div>
2150
- `, 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"] }]
2151
- }], 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 }]; } });
2152
2383
 
2153
2384
  class ComponentLevelServerErrorComponent {
2154
2385
  constructor() {
@@ -2179,7 +2410,7 @@ class ComponentLevelServerErrorComponent {
2179
2410
  </div>
2180
2411
  </div>
2181
2412
  </div>
2182
- `, 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"] }] }); }
2183
2414
  }
2184
2415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentLevelServerErrorComponent, decorators: [{
2185
2416
  type: Component,
@@ -2210,20 +2441,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2210
2441
  type: Output
2211
2442
  }] } });
2212
2443
 
2213
- class SnackBarModule {
2214
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2215
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, declarations: [SnackBarComponent], imports: [CommonModule], exports: [SnackBarComponent] }); }
2216
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, imports: [CommonModule] }); }
2217
- }
2218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, decorators: [{
2219
- type: NgModule,
2220
- args: [{
2221
- declarations: [SnackBarComponent],
2222
- imports: [CommonModule],
2223
- exports: [SnackBarComponent],
2224
- }]
2225
- }] });
2226
-
2227
2444
  class FeatureFlagDirective {
2228
2445
  constructor(tpl, vcr, featureFlagService) {
2229
2446
  this.tpl = tpl;
@@ -2264,6 +2481,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2264
2481
  }]
2265
2482
  }] });
2266
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
+
2267
2512
  class SentryErrorHandler {
2268
2513
  constructor(authorizerService, errorService, config) {
2269
2514
  this.authorizerService = authorizerService;
@@ -2306,34 +2551,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2306
2551
  }] }]; } });
2307
2552
 
2308
2553
  class HttpReqInterceptor {
2309
- constructor(errorService, featureFlagService) {
2554
+ constructor(errorService) {
2310
2555
  this.errorService = errorService;
2311
- this.featureFlagService = featureFlagService;
2312
2556
  }
2313
2557
  intercept(req, next) {
2314
- if (this.featureFlagService.isFeatureEnabled(ERROR_FEATURE_FLAG)) {
2315
- if (this.errorService.isExcludeErrorHandling(req)) {
2316
- return next.handle(req);
2317
- }
2318
- return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), tap((event) => {
2319
- if (event instanceof HttpResponse) {
2320
- this.errorService.handleSoftErrors(event);
2321
- }
2322
- }), catchError((error) => {
2323
- this.errorService.handleError(error, req);
2324
- return throwError(error);
2325
- }));
2326
- }
2327
- else {
2558
+ if (this.errorService.isExcludeErrorHandling(req)) {
2328
2559
  return next.handle(req);
2329
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
+ }));
2330
2569
  }
2331
- 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 }); }
2332
2571
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor }); }
2333
2572
  }
2334
2573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor, decorators: [{
2335
2574
  type: Injectable
2336
- }], ctorParameters: function () { return [{ type: GlobalErrorService }, { type: FeatureFlagService }]; } });
2575
+ }], ctorParameters: function () { return [{ type: GlobalErrorService }]; } });
2337
2576
 
2338
2577
  const FOR_ROOT_SENTRY_OPTIONS_TOKEN = new InjectionToken('forRoot() SentryErrorHandler options');
2339
2578
  class VcErrorHandlersModule {
@@ -2342,9 +2581,20 @@ class VcErrorHandlersModule {
2342
2581
  // this.loadConfig.loadConfig();
2343
2582
  }
2344
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
+ }
2345
2595
  return {
2346
2596
  ngModule: VcErrorHandlersModule,
2347
- providers: [{ provide: Configurations, useValue: environmentConfig }],
2597
+ providers: providers,
2348
2598
  };
2349
2599
  }
2350
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 }); }
@@ -2355,7 +2605,12 @@ class VcErrorHandlersModule {
2355
2605
  ChunkUnavailableComponent,
2356
2606
  ServerErrorComponent,
2357
2607
  ErrorModalComponent,
2358
- 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,
2359
2614
  PageNotFoundComponent,
2360
2615
  UnauthorizedComponent,
2361
2616
  SessionExpiredComponent,
@@ -2363,10 +2618,11 @@ class VcErrorHandlersModule {
2363
2618
  ServerErrorComponent,
2364
2619
  ErrorModalComponent,
2365
2620
  ComponentLevelServerErrorComponent] }); }
2366
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, providers: [
2367
- { provide: ErrorHandler, useClass: SentryErrorHandler },
2368
- { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },
2369
- ], 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] }); }
2370
2626
  }
2371
2627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, decorators: [{
2372
2628
  type: NgModule,
@@ -2381,7 +2637,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2381
2637
  ErrorModalComponent,
2382
2638
  ComponentLevelServerErrorComponent,
2383
2639
  ],
2384
- imports: [CommonModule, DialogModule, SnackBarModule, FeatureFlagModule, NgOptimizedImage],
2640
+ imports: [
2641
+ CommonModule,
2642
+ DialogModule,
2643
+ FeatureFlagModule,
2644
+ NgOptimizedImage,
2645
+ SnackBarModule,
2646
+ TooltipModule,
2647
+ ],
2385
2648
  exports: [
2386
2649
  VcErrorHandlersComponent,
2387
2650
  PageNotFoundComponent,
@@ -2392,10 +2655,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2392
2655
  ErrorModalComponent,
2393
2656
  ComponentLevelServerErrorComponent,
2394
2657
  ],
2395
- providers: [
2396
- { provide: ErrorHandler, useClass: SentryErrorHandler },
2397
- { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },
2398
- ],
2399
2658
  bootstrap: [VcErrorHandlersComponent],
2400
2659
  }]
2401
2660
  }], ctorParameters: function () { return [{ type: FeatureFlagService }]; } });