vc-error-handlers 0.5.0 → 0.5.12

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 (24) 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/error-handling.constants.mjs +5 -2
  6. package/esm2022/lib/shared/constants/exclude-api-config.constants.mjs +8 -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/tooltip/tooltip.directive.mjs +156 -0
  11. package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +18 -0
  12. package/esm2022/lib/vc-error-handlers.module.mjs +34 -13
  13. package/fesm2022/vc-error-handlers.mjs +395 -143
  14. package/fesm2022/vc-error-handlers.mjs.map +1 -1
  15. package/lib/configuration.d.ts +1 -0
  16. package/lib/shared/components/page-not-found/page-not-found.component.d.ts +5 -8
  17. package/lib/shared/components/unauthorized/unauthorized.component.d.ts +7 -1
  18. package/lib/shared/constants/error-handling.constants.d.ts +3 -0
  19. package/lib/shared/interceptors/http.interceptor.d.ts +1 -3
  20. package/lib/shared/services/router.service.d.ts +4 -0
  21. package/lib/ui-kit/tooltip/tooltip.directive.d.ts +27 -0
  22. package/lib/ui-kit/tooltip/tooltip.module.d.ts +8 -0
  23. package/lib/vc-error-handlers.module.d.ts +4 -3
  24. 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
 
@@ -1029,7 +1029,13 @@ const EXCLUDE_API_CONFIG = [
1029
1029
  path: 'fileupload/?destination=uploads',
1030
1030
  query: null,
1031
1031
  body: null,
1032
- }
1032
+ },
1033
+ {
1034
+ method: 'POST',
1035
+ path: '/ImportDocument',
1036
+ query: null,
1037
+ body: null,
1038
+ },
1033
1039
  ];
1034
1040
 
1035
1041
  class SnackBarService {
@@ -1119,17 +1125,15 @@ class GlobalErrorService {
1119
1125
  this.excludeApiConfig = EXCLUDE_API_CONFIG;
1120
1126
  }
1121
1127
  handleSoftErrors(event) {
1122
- if (!event.headers?.get) {
1128
+ if (!(event instanceof HttpResponse)) {
1123
1129
  return;
1124
1130
  }
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
- }
1131
+ const responseBody = event?.body;
1132
+ const success = responseBody?.success;
1133
+ const message = responseBody?.message;
1134
+ const statusCode = event?.status;
1135
+ if (success === false && statusCode && statusCode !== 0) {
1136
+ this.snackBarService.show(message || 'Error occurred', 'error');
1133
1137
  }
1134
1138
  }
1135
1139
  handleError(error, request) {
@@ -1227,23 +1231,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1227
1231
  }]
1228
1232
  }], ctorParameters: function () { return [{ type: SnackBarService }, { type: UtilsService }, { type: i3.Router }]; } });
1229
1233
 
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
1234
  const BASE_URL = 'https://cdn.v-comply.com';
1248
1235
  const ASSETS = {
1249
1236
  VCOMPLY_LOGO: `${BASE_URL}/logo/prod/v-logo.svg`,
@@ -1270,7 +1257,7 @@ const ERROR_CONFIG = {
1270
1257
  details: 'If you believe this is an error, please contact',
1271
1258
  email: 'help@v-comply.com',
1272
1259
  support: 'for support',
1273
- buttonText: 'CONTACT SUPPORT',
1260
+ buttonText: 'Go To Dashboard',
1274
1261
  mail: 'mailto:help@v-comply.com',
1275
1262
  },
1276
1263
  SESSION_EXPIRED: {
@@ -1307,11 +1294,14 @@ const REDIRECTION_URL = {
1307
1294
  RISK_DASHBOARD: '/global-dashboard/risk_dashboard?module=risk',
1308
1295
  POLICY_DASHBOARD: '/global-dashboard/policy_dashboard?module=policy',
1309
1296
  ISSUE_DASHBOARD: '/global-dashboard/issue_dashboard?module=issue',
1297
+ CASEOPS_DASHBOARD: '/global-dashboard/case_dashboard?module=caseops',
1298
+ DEFAULT: '/global-dashboard',
1310
1299
  };
1311
1300
  const MODULE_NAMES = {
1312
1301
  RISK: 'risk',
1313
1302
  POLICY: 'policy',
1314
1303
  ISSUE: 'issue',
1304
+ CASEOPS: 'caseops',
1315
1305
  };
1316
1306
  const MODAL_ERROR_TYPES = {
1317
1307
  CHUNK_NOT_FOUND: 'chunk_not_found',
@@ -1322,10 +1312,56 @@ const ALT_IMAGE_TEXT = {
1322
1312
  VCOMPLY_LOGO: 'VComply',
1323
1313
  };
1324
1314
 
1315
+ class RouterService {
1316
+ constructor() {
1317
+ this.baseUrl = '';
1318
+ this.setBaseUrl();
1319
+ }
1320
+ setBaseUrl() {
1321
+ this.baseUrl = window.location.origin;
1322
+ }
1323
+ redirectToLogin() {
1324
+ window.location.href =
1325
+ `https://${window.location.host}/` +
1326
+ 'signin?redirectURL=' +
1327
+ encodeURIComponent(window.location.href);
1328
+ }
1329
+ redirectToHome(module_name) {
1330
+ let targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
1331
+ switch (module_name) {
1332
+ case MODULE_NAMES.RISK:
1333
+ targetPath = REDIRECTION_URL.RISK_DASHBOARD;
1334
+ break;
1335
+ case MODULE_NAMES.POLICY:
1336
+ targetPath = REDIRECTION_URL.POLICY_DASHBOARD;
1337
+ break;
1338
+ case MODULE_NAMES.ISSUE:
1339
+ targetPath = REDIRECTION_URL.ISSUE_DASHBOARD;
1340
+ break;
1341
+ case MODULE_NAMES.CASEOPS:
1342
+ targetPath = REDIRECTION_URL.CASEOPS_DASHBOARD;
1343
+ break;
1344
+ default:
1345
+ targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
1346
+ break;
1347
+ }
1348
+ window.location.replace(targetPath);
1349
+ }
1350
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1351
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, providedIn: 'root' }); }
1352
+ }
1353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RouterService, decorators: [{
1354
+ type: Injectable,
1355
+ args: [{
1356
+ providedIn: 'root',
1357
+ }]
1358
+ }], ctorParameters: function () { return []; } });
1359
+
1325
1360
  class Configurations {
1326
1361
  constructor() {
1327
1362
  this.sentryConfig = {};
1328
1363
  this.envConfig = {};
1364
+ this.enableInterceptor = false;
1329
1365
  }
1330
1366
  }
1331
1367
 
@@ -1460,34 +1496,203 @@ class SnackBarComponent {
1460
1496
  this.snackbarSubscription.unsubscribe();
1461
1497
  }
1462
1498
  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"] }] }); }
1499
+ 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
1500
  }
1465
1501
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarComponent, decorators: [{
1466
1502
  type: Component,
1467
1503
  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
1504
  }], ctorParameters: function () { return [{ type: SnackBarService }]; } });
1469
1505
 
1506
+ class ToolTipDirective {
1507
+ constructor(el, renderer) {
1508
+ this.el = el;
1509
+ this.renderer = renderer;
1510
+ this.showTooltip = true;
1511
+ this.offset = 8;
1512
+ }
1513
+ ngOnInit() { }
1514
+ onMouseEnter() {
1515
+ this.hide();
1516
+ this.show();
1517
+ }
1518
+ onMouseOver() {
1519
+ this.hide();
1520
+ this.show();
1521
+ }
1522
+ onMouseLeave() {
1523
+ this.hide();
1524
+ }
1525
+ onMouseOut() {
1526
+ this.hide();
1527
+ }
1528
+ onClick() {
1529
+ this.hide();
1530
+ }
1531
+ show() {
1532
+ if (!this.showTooltip) {
1533
+ return;
1534
+ }
1535
+ this.create();
1536
+ const element = this.el.nativeElement;
1537
+ if (this.tooltipMandatory === true) {
1538
+ this.setPosition();
1539
+ this.renderer.addClass(this.tooltip, 'fl-tooltip-show');
1540
+ }
1541
+ else {
1542
+ if (element.scrollWidth * element.scrollHeight >
1543
+ element.offsetWidth * element.offsetHeight) {
1544
+ this.setPosition();
1545
+ this.renderer.addClass(this.tooltip, 'fl-tooltip-show');
1546
+ }
1547
+ }
1548
+ }
1549
+ hide() {
1550
+ if (document.body.contains(this.tooltip)) {
1551
+ if (this.renderer) {
1552
+ this.renderer.removeChild(document.body, document.getElementById('tooltip'));
1553
+ }
1554
+ }
1555
+ }
1556
+ create() {
1557
+ this.tooltip = this.renderer.createElement('span');
1558
+ this.tooltip.setAttribute('id', 'tooltip');
1559
+ this.tooltip.innerHTML = this.tooltipTitle;
1560
+ this.renderer.appendChild(document.body, this.tooltip);
1561
+ this.renderer.addClass(this.tooltip, 'fl-tooltip');
1562
+ this.renderer.addClass(this.tooltip, `fl-tooltip-${this.placement}`);
1563
+ this.renderer.addClass(this.tooltip, `${this.type}`);
1564
+ if (this.animate) {
1565
+ this.renderer.addClass(this.tooltip, `animate-${this.placement}`);
1566
+ }
1567
+ }
1568
+ setPosition() {
1569
+ const hostPos = this.el.nativeElement.getBoundingClientRect();
1570
+ const tooltipPos = this.tooltip.getBoundingClientRect();
1571
+ const scrollPos = window.pageYOffset ||
1572
+ document.documentElement.scrollTop ||
1573
+ document.body.scrollTop ||
1574
+ 0;
1575
+ const w = window.innerWidth;
1576
+ const h = window.innerHeight;
1577
+ let top;
1578
+ let left;
1579
+ if (this.placement === 'top') {
1580
+ top = hostPos.top - tooltipPos.height - this.offset;
1581
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
1582
+ }
1583
+ if (this.placement === 'bottom') {
1584
+ if (hostPos.top + tooltipPos.height > h) {
1585
+ top = hostPos.top - tooltipPos.height;
1586
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
1587
+ this.renderer.removeClass(this.tooltip, `fl-tooltip-bottom`);
1588
+ this.renderer.addClass(this.tooltip, `fl-tooltip-top`);
1589
+ }
1590
+ else {
1591
+ top = hostPos.bottom + this.offset;
1592
+ left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
1593
+ }
1594
+ }
1595
+ if (this.placement === 'left') {
1596
+ top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
1597
+ left = hostPos.left - tooltipPos.width - this.offset;
1598
+ }
1599
+ if (this.placement === 'right') {
1600
+ top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
1601
+ left = hostPos.right + this.offset;
1602
+ }
1603
+ if (this.placement === 'bottom-right') {
1604
+ top = hostPos.bottom + this.offset;
1605
+ left = hostPos.left - (tooltipPos.width - 28);
1606
+ }
1607
+ if (this.placement === 'bottom-left') {
1608
+ if (hostPos.top + tooltipPos.height > h - 30) {
1609
+ top = hostPos.top - tooltipPos.height;
1610
+ left = hostPos.left;
1611
+ this.renderer.removeClass(this.tooltip, `fl-tooltip-bottom-left`);
1612
+ this.renderer.addClass(this.tooltip, `fl-tooltip-top-left`);
1613
+ }
1614
+ else {
1615
+ top = hostPos.bottom + this.offset;
1616
+ left = hostPos.left;
1617
+ }
1618
+ }
1619
+ this.renderer.setStyle(this.tooltip, 'top', `${top + scrollPos}px`);
1620
+ this.renderer.setStyle(this.tooltip, 'left', `${left}px`);
1621
+ }
1622
+ 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 }); }
1623
+ 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 }); }
1624
+ }
1625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolTipDirective, decorators: [{
1626
+ type: Directive,
1627
+ args: [{
1628
+ selector: '[arTooltip]',
1629
+ }]
1630
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltipTitle: [{
1631
+ type: Input,
1632
+ args: ['arTooltip']
1633
+ }], placement: [{
1634
+ type: Input
1635
+ }], type: [{
1636
+ type: Input
1637
+ }], tooltipMandatory: [{
1638
+ type: Input
1639
+ }], showTooltip: [{
1640
+ type: Input
1641
+ }], animate: [{
1642
+ type: Input
1643
+ }], onMouseEnter: [{
1644
+ type: HostListener,
1645
+ args: ['mouseenter']
1646
+ }], onMouseOver: [{
1647
+ type: HostListener,
1648
+ args: ['mouseover']
1649
+ }], onMouseLeave: [{
1650
+ type: HostListener,
1651
+ args: ['mouseleave']
1652
+ }], onMouseOut: [{
1653
+ type: HostListener,
1654
+ args: ['mouseout']
1655
+ }], onClick: [{
1656
+ type: HostListener,
1657
+ args: ['click']
1658
+ }] } });
1659
+
1470
1660
  class UnauthorizedComponent {
1471
- constructor() {
1661
+ constructor(route, routerService) {
1662
+ this.route = route;
1663
+ this.routerService = routerService;
1472
1664
  this.currentYear = new Date().getFullYear();
1473
1665
  this.errorConfig = ERROR_CONFIG.UNAUTHORIZED;
1474
1666
  this.VcomplyLogo = VCOMPLY_LOGO_URL;
1475
1667
  this.altImageText = ALT_IMAGE_TEXT;
1476
1668
  this.organisationName = ORGANISATION_NAME;
1669
+ this.defaultURL = this.routerService.baseUrl + REDIRECTION_URL.DEFAULT;
1477
1670
  }
1478
- redirectToSupport() {
1479
- window.location.href = this.errorConfig.mail;
1671
+ redirectToDashboard() {
1672
+ const module_name = this.route.snapshot.data['page_path'];
1673
+ this.routerService.redirectToHome(module_name);
1480
1674
  }
1481
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnauthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1675
+ 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
1676
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized", ngImport: i0, template: `
1483
1677
  <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
- />
1678
+ <div class="errorPage-top" (click)="redirectToDashboard()">
1679
+ <a
1680
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
1681
+ [arTooltip]="'Go to Dashboard'"
1682
+ placement="right"
1683
+ type="white"
1684
+ delay="0"
1685
+ [tooltipMandatory]="true"
1686
+ [animate]="true"
1687
+ [href]="defaultURL"
1688
+ >
1689
+ <img
1690
+ [ngSrc]="VcomplyLogo"
1691
+ [alt]="altImageText.VCOMPLY_LOGO"
1692
+ width="24"
1693
+ height="24"
1694
+ />
1695
+ </a>
1491
1696
  </div>
1492
1697
  <div class="errorPage-container">
1493
1698
  <div class="errorPage-inner">
@@ -1509,7 +1714,7 @@ class UnauthorizedComponent {
1509
1714
  }}</a>
1510
1715
  {{ errorConfig.support }}.
1511
1716
  </div>
1512
- <button class="errorPage-btn" (click)="redirectToSupport()">
1717
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
1513
1718
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
1514
1719
  </button>
1515
1720
  </div>
@@ -1519,19 +1724,30 @@ class UnauthorizedComponent {
1519
1724
  </div>
1520
1725
  </div>
1521
1726
  </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"] }] }); }
1727
+ `, 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
1728
  }
1524
1729
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnauthorizedComponent, decorators: [{
1525
1730
  type: Component,
1526
1731
  args: [{ selector: 'lib-vc-error-unauthorized', template: `
1527
1732
  <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
- />
1733
+ <div class="errorPage-top" (click)="redirectToDashboard()">
1734
+ <a
1735
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
1736
+ [arTooltip]="'Go to Dashboard'"
1737
+ placement="right"
1738
+ type="white"
1739
+ delay="0"
1740
+ [tooltipMandatory]="true"
1741
+ [animate]="true"
1742
+ [href]="defaultURL"
1743
+ >
1744
+ <img
1745
+ [ngSrc]="VcomplyLogo"
1746
+ [alt]="altImageText.VCOMPLY_LOGO"
1747
+ width="24"
1748
+ height="24"
1749
+ />
1750
+ </a>
1535
1751
  </div>
1536
1752
  <div class="errorPage-container">
1537
1753
  <div class="errorPage-inner">
@@ -1553,7 +1769,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1553
1769
  }}</a>
1554
1770
  {{ errorConfig.support }}.
1555
1771
  </div>
1556
- <button class="errorPage-btn" (click)="redirectToSupport()">
1772
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
1557
1773
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
1558
1774
  </button>
1559
1775
  </div>
@@ -1563,8 +1779,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1563
1779
  </div>
1564
1780
  </div>
1565
1781
  </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
- }] });
1782
+ `, 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"] }]
1783
+ }], ctorParameters: function () { return [{ type: i3.ActivatedRoute }, { type: RouterService }]; } });
1568
1784
 
1569
1785
  class DialogConfig {
1570
1786
  }
@@ -1718,7 +1934,7 @@ class DialogComponent {
1718
1934
  document.body.style.overflow = 'auto';
1719
1935
  }
1720
1936
  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]" }] }); }
1937
+ 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
1938
  }
1723
1939
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, decorators: [{
1724
1940
  type: Component,
@@ -1904,7 +2120,7 @@ class ServerErrorComponent {
1904
2120
  </div>
1905
2121
  </div>
1906
2122
  </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"] }] }); }
2123
+ `, 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
2124
  }
1909
2125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ServerErrorComponent, decorators: [{
1910
2126
  type: Component,
@@ -1939,7 +2155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1939
2155
  </div>
1940
2156
  </div>
1941
2157
  </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"] }]
2158
+ `, 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
2159
  }] });
1944
2160
 
1945
2161
  class VcErrorHandlersComponent {
@@ -2020,7 +2236,7 @@ class VcErrorHandlersComponent {
2020
2236
  *ngIf="chunkUnavailable"
2021
2237
  ></lib-vc-error-chunk-unavailable>
2022
2238
  <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" }] }); }
2239
+ `, 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
2240
  }
2025
2241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersComponent, decorators: [{
2026
2242
  type: Component,
@@ -2046,44 +2262,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2046
2262
  }] } });
2047
2263
 
2048
2264
  class PageNotFoundComponent {
2049
- constructor(route) {
2265
+ constructor(route, routerService) {
2050
2266
  this.route = route;
2267
+ this.routerService = routerService;
2051
2268
  this.errorConfig = ERROR_CONFIG.PAGE_NOT_FOUND;
2052
2269
  this.VcomplyLogo = VCOMPLY_LOGO_URL;
2053
2270
  this.altImageText = ALT_IMAGE_TEXT;
2054
2271
  this.currentYear = new Date().getFullYear();
2055
- this.redirectionUrl = REDIRECTION_URL;
2056
2272
  this.organisationName = ORGANISATION_NAME;
2273
+ this.defaultURL = this.routerService.baseUrl + REDIRECTION_URL.DEFAULT;
2057
2274
  }
2058
- redirectToHome() {
2275
+ redirectToDashboard() {
2059
2276
  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);
2277
+ this.routerService.redirectToHome(module_name);
2076
2278
  }
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 }); }
2279
+ 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
2280
  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
2281
  <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
- />
2282
+ <div class="errorPage-top" (click)="redirectToDashboard()">
2283
+ <a
2284
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
2285
+ [arTooltip]="'Go to Dashboard'"
2286
+ placement="right"
2287
+ type="white"
2288
+ delay="0"
2289
+ [tooltipMandatory]="true"
2290
+ [animate]="true"
2291
+ [href]="defaultURL"
2292
+ >
2293
+ <img
2294
+ [ngSrc]="VcomplyLogo"
2295
+ [alt]="altImageText.VCOMPLY_LOGO"
2296
+ width="24"
2297
+ height="24"
2298
+ />
2299
+ </a>
2087
2300
  </div>
2088
2301
  <div class="errorPage-container">
2089
2302
  <div class="errorPage-inner">
@@ -2099,7 +2312,7 @@ class PageNotFoundComponent {
2099
2312
  <div class="errorPage-heading">{{ errorConfig.title }}</div>
2100
2313
  <div class="errorPage-text">{{ errorConfig.description }}</div>
2101
2314
  <div class="errorPage-details">{{ errorConfig.details }}</div>
2102
- <button class="errorPage-btn" (click)="redirectToHome()">
2315
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
2103
2316
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
2104
2317
  </button>
2105
2318
  </div>
@@ -2109,19 +2322,30 @@ class PageNotFoundComponent {
2109
2322
  </div>
2110
2323
  </div>
2111
2324
  </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"] }] }); }
2325
+ `, 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
2326
  }
2114
2327
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotFoundComponent, decorators: [{
2115
2328
  type: Component,
2116
2329
  args: [{ selector: 'lib-vc-error-page-not-found', template: `
2117
2330
  <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
- />
2331
+ <div class="errorPage-top" (click)="redirectToDashboard()">
2332
+ <a
2333
+ class="product-logo vx-d-flex vx-align-center vx-justify-center vx-mr-3"
2334
+ [arTooltip]="'Go to Dashboard'"
2335
+ placement="right"
2336
+ type="white"
2337
+ delay="0"
2338
+ [tooltipMandatory]="true"
2339
+ [animate]="true"
2340
+ [href]="defaultURL"
2341
+ >
2342
+ <img
2343
+ [ngSrc]="VcomplyLogo"
2344
+ [alt]="altImageText.VCOMPLY_LOGO"
2345
+ width="24"
2346
+ height="24"
2347
+ />
2348
+ </a>
2125
2349
  </div>
2126
2350
  <div class="errorPage-container">
2127
2351
  <div class="errorPage-inner">
@@ -2137,7 +2361,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2137
2361
  <div class="errorPage-heading">{{ errorConfig.title }}</div>
2138
2362
  <div class="errorPage-text">{{ errorConfig.description }}</div>
2139
2363
  <div class="errorPage-details">{{ errorConfig.details }}</div>
2140
- <button class="errorPage-btn" (click)="redirectToHome()">
2364
+ <button class="errorPage-btn" (click)="redirectToDashboard()">
2141
2365
  {{ errorConfig.buttonText }} <i class="icons">&#xe96a;</i>
2142
2366
  </button>
2143
2367
  </div>
@@ -2147,8 +2371,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2147
2371
  </div>
2148
2372
  </div>
2149
2373
  </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 }]; } });
2374
+ `, 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"] }]
2375
+ }], ctorParameters: function () { return [{ type: i3.ActivatedRoute }, { type: RouterService }]; } });
2152
2376
 
2153
2377
  class ComponentLevelServerErrorComponent {
2154
2378
  constructor() {
@@ -2179,7 +2403,7 @@ class ComponentLevelServerErrorComponent {
2179
2403
  </div>
2180
2404
  </div>
2181
2405
  </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"] }] }); }
2406
+ `, 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
2407
  }
2184
2408
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentLevelServerErrorComponent, decorators: [{
2185
2409
  type: Component,
@@ -2210,20 +2434,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2210
2434
  type: Output
2211
2435
  }] } });
2212
2436
 
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
2437
  class FeatureFlagDirective {
2228
2438
  constructor(tpl, vcr, featureFlagService) {
2229
2439
  this.tpl = tpl;
@@ -2264,6 +2474,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2264
2474
  }]
2265
2475
  }] });
2266
2476
 
2477
+ class SnackBarModule {
2478
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2479
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, declarations: [SnackBarComponent], imports: [CommonModule], exports: [SnackBarComponent] }); }
2480
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, imports: [CommonModule] }); }
2481
+ }
2482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SnackBarModule, decorators: [{
2483
+ type: NgModule,
2484
+ args: [{
2485
+ declarations: [SnackBarComponent],
2486
+ imports: [CommonModule],
2487
+ exports: [SnackBarComponent],
2488
+ }]
2489
+ }] });
2490
+
2491
+ class TooltipModule {
2492
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2493
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, declarations: [ToolTipDirective], imports: [CommonModule], exports: [ToolTipDirective] }); }
2494
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, imports: [CommonModule] }); }
2495
+ }
2496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, decorators: [{
2497
+ type: NgModule,
2498
+ args: [{
2499
+ declarations: [ToolTipDirective],
2500
+ imports: [CommonModule],
2501
+ exports: [ToolTipDirective],
2502
+ }]
2503
+ }] });
2504
+
2267
2505
  class SentryErrorHandler {
2268
2506
  constructor(authorizerService, errorService, config) {
2269
2507
  this.authorizerService = authorizerService;
@@ -2306,34 +2544,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2306
2544
  }] }]; } });
2307
2545
 
2308
2546
  class HttpReqInterceptor {
2309
- constructor(errorService, featureFlagService) {
2547
+ constructor(errorService) {
2310
2548
  this.errorService = errorService;
2311
- this.featureFlagService = featureFlagService;
2312
2549
  }
2313
2550
  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 {
2551
+ if (this.errorService.isExcludeErrorHandling(req)) {
2328
2552
  return next.handle(req);
2329
2553
  }
2554
+ return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), tap((event) => {
2555
+ if (event instanceof HttpResponse) {
2556
+ this.errorService.handleSoftErrors(event);
2557
+ }
2558
+ }), catchError((error) => {
2559
+ this.errorService.handleError(error, req);
2560
+ return throwError(error);
2561
+ }));
2330
2562
  }
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 }); }
2563
+ 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
2564
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor }); }
2333
2565
  }
2334
2566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor, decorators: [{
2335
2567
  type: Injectable
2336
- }], ctorParameters: function () { return [{ type: GlobalErrorService }, { type: FeatureFlagService }]; } });
2568
+ }], ctorParameters: function () { return [{ type: GlobalErrorService }]; } });
2337
2569
 
2338
2570
  const FOR_ROOT_SENTRY_OPTIONS_TOKEN = new InjectionToken('forRoot() SentryErrorHandler options');
2339
2571
  class VcErrorHandlersModule {
@@ -2342,9 +2574,20 @@ class VcErrorHandlersModule {
2342
2574
  // this.loadConfig.loadConfig();
2343
2575
  }
2344
2576
  static forRoot(environmentConfig) {
2577
+ const providers = [
2578
+ { provide: Configurations, useValue: environmentConfig },
2579
+ { provide: ErrorHandler, useClass: SentryErrorHandler },
2580
+ ];
2581
+ if (environmentConfig.enableInterceptor) {
2582
+ providers.push({
2583
+ provide: HTTP_INTERCEPTORS,
2584
+ useClass: HttpReqInterceptor,
2585
+ multi: true,
2586
+ });
2587
+ }
2345
2588
  return {
2346
2589
  ngModule: VcErrorHandlersModule,
2347
- providers: [{ provide: Configurations, useValue: environmentConfig }],
2590
+ providers: providers,
2348
2591
  };
2349
2592
  }
2350
2593
  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 +2598,12 @@ class VcErrorHandlersModule {
2355
2598
  ChunkUnavailableComponent,
2356
2599
  ServerErrorComponent,
2357
2600
  ErrorModalComponent,
2358
- ComponentLevelServerErrorComponent], imports: [CommonModule, DialogModule, SnackBarModule, FeatureFlagModule, NgOptimizedImage], exports: [VcErrorHandlersComponent,
2601
+ ComponentLevelServerErrorComponent], imports: [CommonModule,
2602
+ DialogModule,
2603
+ FeatureFlagModule,
2604
+ NgOptimizedImage,
2605
+ SnackBarModule,
2606
+ TooltipModule], exports: [VcErrorHandlersComponent,
2359
2607
  PageNotFoundComponent,
2360
2608
  UnauthorizedComponent,
2361
2609
  SessionExpiredComponent,
@@ -2363,10 +2611,11 @@ class VcErrorHandlersModule {
2363
2611
  ServerErrorComponent,
2364
2612
  ErrorModalComponent,
2365
2613
  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] }); }
2614
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, imports: [CommonModule,
2615
+ DialogModule,
2616
+ FeatureFlagModule,
2617
+ SnackBarModule,
2618
+ TooltipModule] }); }
2370
2619
  }
2371
2620
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: VcErrorHandlersModule, decorators: [{
2372
2621
  type: NgModule,
@@ -2381,7 +2630,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2381
2630
  ErrorModalComponent,
2382
2631
  ComponentLevelServerErrorComponent,
2383
2632
  ],
2384
- imports: [CommonModule, DialogModule, SnackBarModule, FeatureFlagModule, NgOptimizedImage],
2633
+ imports: [
2634
+ CommonModule,
2635
+ DialogModule,
2636
+ FeatureFlagModule,
2637
+ NgOptimizedImage,
2638
+ SnackBarModule,
2639
+ TooltipModule,
2640
+ ],
2385
2641
  exports: [
2386
2642
  VcErrorHandlersComponent,
2387
2643
  PageNotFoundComponent,
@@ -2392,10 +2648,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2392
2648
  ErrorModalComponent,
2393
2649
  ComponentLevelServerErrorComponent,
2394
2650
  ],
2395
- providers: [
2396
- { provide: ErrorHandler, useClass: SentryErrorHandler },
2397
- { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },
2398
- ],
2399
2651
  bootstrap: [VcErrorHandlersComponent],
2400
2652
  }]
2401
2653
  }], ctorParameters: function () { return [{ type: FeatureFlagService }]; } });