vc-error-handlers 0.1.4 → 0.1.6
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.
- package/esm2020/lib/shared/components/page-not-found/page-not-found.component.mjs +6 -6
- package/esm2020/lib/shared/components/session-expired/session-expired.component.mjs +16 -7
- package/esm2020/lib/shared/components/session-expired-modal/session-expired-modal.component.mjs +13 -18
- package/esm2020/lib/shared/components/unauthorized/unauthorized.component.mjs +15 -5
- package/esm2020/lib/shared/constants/error-handling.constants.mjs +1 -2
- package/esm2020/lib/shared/interceptors/http.interceptor.mjs +5 -13
- package/esm2020/lib/shared/services/auth.service.mjs +1 -1
- package/esm2020/lib/shared/services/global-error.service.mjs +13 -5
- package/esm2020/lib/shared/types/global-error.types.mjs +3 -6
- package/esm2020/lib/vc-error-handlers.component.mjs +19 -14
- package/fesm2015/vc-error-handlers.mjs +77 -61
- package/fesm2015/vc-error-handlers.mjs.map +1 -1
- package/fesm2020/vc-error-handlers.mjs +77 -61
- package/fesm2020/vc-error-handlers.mjs.map +1 -1
- package/lib/shared/components/page-not-found/page-not-found.component.d.ts +1 -1
- package/lib/shared/components/session-expired/session-expired.component.d.ts +5 -2
- package/lib/shared/components/session-expired-modal/session-expired-modal.component.d.ts +3 -6
- package/lib/shared/components/unauthorized/unauthorized.component.d.ts +1 -1
- package/lib/shared/constants/error-handling.constants.d.ts +0 -1
- package/lib/shared/interceptors/http.interceptor.d.ts +0 -3
- package/lib/shared/services/global-error.service.d.ts +3 -2
- package/lib/shared/types/global-error.types.d.ts +3 -6
- package/lib/vc-error-handlers.component.d.ts +3 -4
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ import * as i3 from '@angular/router';
|
|
|
8
8
|
import { NavigationStart, NavigationEnd, NavigationError } from '@angular/router';
|
|
9
9
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
10
10
|
import * as Sentry from '@sentry/angular-ivy';
|
|
11
|
-
import { timeout,
|
|
11
|
+
import { timeout, catchError } from 'rxjs/operators';
|
|
12
12
|
|
|
13
13
|
class VcErrorHandlersService {
|
|
14
14
|
constructor() { }
|
|
@@ -26,34 +26,39 @@ var ErrorStatusCode;
|
|
|
26
26
|
(function (ErrorStatusCode) {
|
|
27
27
|
ErrorStatusCode[ErrorStatusCode["URLNotFound"] = 404] = "URLNotFound";
|
|
28
28
|
ErrorStatusCode[ErrorStatusCode["UnauthorizedAccess"] = 403] = "UnauthorizedAccess";
|
|
29
|
-
ErrorStatusCode[ErrorStatusCode["RequestTimeout"] = 408] = "RequestTimeout";
|
|
30
29
|
ErrorStatusCode[ErrorStatusCode["Unauthenticated"] = 401] = "Unauthenticated";
|
|
31
30
|
// Server-side errors
|
|
32
31
|
ErrorStatusCode[ErrorStatusCode["InternalServerError"] = 500] = "InternalServerError";
|
|
33
32
|
ErrorStatusCode[ErrorStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
|
34
|
-
ErrorStatusCode[ErrorStatusCode["
|
|
33
|
+
ErrorStatusCode[ErrorStatusCode["BadGateway"] = 502] = "BadGateway";
|
|
34
|
+
ErrorStatusCode[ErrorStatusCode["RequestTimeout"] = 504] = "RequestTimeout";
|
|
35
35
|
// Network unavailability/offline case
|
|
36
36
|
ErrorStatusCode[ErrorStatusCode["NetworkUnavailable"] = 0] = "NetworkUnavailable";
|
|
37
37
|
// Application-specific errors
|
|
38
38
|
ErrorStatusCode[ErrorStatusCode["JSChunkUnavailable"] = 600] = "JSChunkUnavailable";
|
|
39
|
-
ErrorStatusCode[ErrorStatusCode["SoftError"] = 601] = "SoftError";
|
|
40
|
-
ErrorStatusCode[ErrorStatusCode["NotFoundError"] = 602] = "NotFoundError";
|
|
41
|
-
ErrorStatusCode[ErrorStatusCode["includes"] = 603] = "includes";
|
|
42
39
|
})(ErrorStatusCode || (ErrorStatusCode = {}));
|
|
43
40
|
|
|
44
41
|
class GlobalErrorService {
|
|
45
42
|
constructor() {
|
|
46
|
-
this.errorCodes = ErrorStatusCode;
|
|
47
43
|
this.globalError$ = new Subject();
|
|
48
44
|
this.localError$ = new Subject();
|
|
49
45
|
}
|
|
50
46
|
handleError(error, request) {
|
|
51
|
-
if (this.
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
47
|
+
if (this.isUnauthenticated(error) ||
|
|
48
|
+
this.isUnauthorizedAccess(error) ||
|
|
49
|
+
this.isNetworkUnavailable(error)) {
|
|
54
50
|
this.globalError$.next(error);
|
|
55
51
|
}
|
|
56
52
|
}
|
|
53
|
+
isUnauthenticated(error) {
|
|
54
|
+
return error.status === ErrorStatusCode.Unauthenticated;
|
|
55
|
+
}
|
|
56
|
+
isUnauthorizedAccess(error) {
|
|
57
|
+
return error.status === ErrorStatusCode.UnauthorizedAccess;
|
|
58
|
+
}
|
|
59
|
+
isNetworkUnavailable(error) {
|
|
60
|
+
return error.status === ErrorStatusCode.NetworkUnavailable;
|
|
61
|
+
}
|
|
57
62
|
}
|
|
58
63
|
GlobalErrorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: GlobalErrorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
59
64
|
GlobalErrorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: GlobalErrorService, providedIn: 'root' });
|
|
@@ -100,7 +105,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
100
105
|
|
|
101
106
|
const VCOMPLY_IMAGE_URL = 'https://cdn.v-comply.com/logo/prod/v-logo.svg';
|
|
102
107
|
const API_TIMEOUT_TIME = 1000 * 15;
|
|
103
|
-
const API_RETRY_COUNT = 2;
|
|
104
108
|
const ERROR_CONFIG = {
|
|
105
109
|
PAGE_NOT_FOUND: {
|
|
106
110
|
imageUrl: 'https://cdn.v-comply.com/application/images/Error-page-illustration.svg',
|
|
@@ -129,9 +133,8 @@ class DialogConfig {
|
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
class SessionExpiredModalComponent {
|
|
132
|
-
constructor(dialogConfig,
|
|
136
|
+
constructor(dialogConfig, routerService) {
|
|
133
137
|
this.dialogConfig = dialogConfig;
|
|
134
|
-
this.authService = authService;
|
|
135
138
|
this.routerService = routerService;
|
|
136
139
|
this.errorConfig = ERROR_CONFIG.SESSION_EXPIRED;
|
|
137
140
|
this.animation = false;
|
|
@@ -142,39 +145,36 @@ class SessionExpiredModalComponent {
|
|
|
142
145
|
};
|
|
143
146
|
this.data = this.dialogConfig.data;
|
|
144
147
|
}
|
|
145
|
-
ngOnInit() {
|
|
146
|
-
this.animation = true;
|
|
147
|
-
setTimeout(() => {
|
|
148
|
-
this.animation = false;
|
|
149
|
-
}, 300);
|
|
150
|
-
}
|
|
151
148
|
onContinueAction() {
|
|
152
|
-
this.authService.logoutUser();
|
|
153
149
|
this.routerService.redirectToLogin();
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
|
-
SessionExpiredModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredModalComponent, deps: [{ token: DialogConfig }, { token:
|
|
157
|
-
SessionExpiredModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SessionExpiredModalComponent, selector: "lib-session-expired-modal", ngImport: i0, template: ` <div class="error-dialog-box">
|
|
152
|
+
SessionExpiredModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredModalComponent, deps: [{ token: DialogConfig }, { token: RouterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
+
SessionExpiredModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SessionExpiredModalComponent, selector: "lib-vc-error-session-expired-modal", ngImport: i0, template: ` <div class="error-dialog-box">
|
|
158
154
|
<div class="error-dialog-box-top">{{ errorConfig.heading }}</div>
|
|
159
155
|
<div class="error-dialog-box-mid">
|
|
160
156
|
{{ errorConfig.description }}
|
|
161
157
|
</div>
|
|
162
158
|
<div class="error-dialog-box-bottom">
|
|
163
|
-
<button class="logIn-btn">
|
|
159
|
+
<button (click)="onContinueAction()" class="logIn-btn">
|
|
160
|
+
{{ errorConfig.buttonText }}
|
|
161
|
+
</button>
|
|
164
162
|
</div>
|
|
165
163
|
</div>`, isInline: true, styles: [".error-dialog-box{background:#fff;border-radius:.75rem;box-shadow:0 1px 10px #0003;width:27rem}.error-dialog-box-top{color:#000;font-size:16px;font-weight:500;border-radius:.75rem .75rem 0 0;display:flex;align-items:center;height:3.375rem;padding:0 1rem;margin-bottom:1rem}.error-dialog-box-mid{color:#565a6f;font-size:13px;min-height:5.5rem;padding:0 1rem}.error-dialog-box-bottom{display:flex;justify-content:end;padding:1rem}.error-dialog-box-bottom button.logIn-btn{background:#1e5dd3;border-radius:.125rem;border:none;color:#fff;cursor:pointer;font-size:11px;height:2rem;padding:.5rem .75rem}\n"] });
|
|
166
164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredModalComponent, decorators: [{
|
|
167
165
|
type: Component,
|
|
168
|
-
args: [{ selector: 'lib-session-expired-modal', template: ` <div class="error-dialog-box">
|
|
166
|
+
args: [{ selector: 'lib-vc-error-session-expired-modal', template: ` <div class="error-dialog-box">
|
|
169
167
|
<div class="error-dialog-box-top">{{ errorConfig.heading }}</div>
|
|
170
168
|
<div class="error-dialog-box-mid">
|
|
171
169
|
{{ errorConfig.description }}
|
|
172
170
|
</div>
|
|
173
171
|
<div class="error-dialog-box-bottom">
|
|
174
|
-
<button class="logIn-btn">
|
|
172
|
+
<button (click)="onContinueAction()" class="logIn-btn">
|
|
173
|
+
{{ errorConfig.buttonText }}
|
|
174
|
+
</button>
|
|
175
175
|
</div>
|
|
176
176
|
</div>`, styles: [".error-dialog-box{background:#fff;border-radius:.75rem;box-shadow:0 1px 10px #0003;width:27rem}.error-dialog-box-top{color:#000;font-size:16px;font-weight:500;border-radius:.75rem .75rem 0 0;display:flex;align-items:center;height:3.375rem;padding:0 1rem;margin-bottom:1rem}.error-dialog-box-mid{color:#565a6f;font-size:13px;min-height:5.5rem;padding:0 1rem}.error-dialog-box-bottom{display:flex;justify-content:end;padding:1rem}.error-dialog-box-bottom button.logIn-btn{background:#1e5dd3;border-radius:.125rem;border:none;color:#fff;cursor:pointer;font-size:11px;height:2rem;padding:.5rem .75rem}\n"] }]
|
|
177
|
-
}], ctorParameters: function () { return [{ type: DialogConfig }, { type:
|
|
177
|
+
}], ctorParameters: function () { return [{ type: DialogConfig }, { type: RouterService }]; } });
|
|
178
178
|
|
|
179
179
|
class InsertionDirective {
|
|
180
180
|
constructor(viewContainerRef) {
|
|
@@ -353,11 +353,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
353
353
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }]; } });
|
|
354
354
|
|
|
355
355
|
class SessionExpiredComponent {
|
|
356
|
-
constructor(dialogService) {
|
|
356
|
+
constructor(authService, dialogService) {
|
|
357
|
+
this.authService = authService;
|
|
357
358
|
this.dialogService = dialogService;
|
|
358
359
|
this.errorConfig = ERROR_CONFIG.SESSION_EXPIRED;
|
|
359
360
|
}
|
|
360
361
|
ngOnInit() {
|
|
362
|
+
// this.authService.logoutUser();
|
|
363
|
+
this.openSessionExpiredModal();
|
|
364
|
+
}
|
|
365
|
+
openSessionExpiredModal() {
|
|
361
366
|
this.dialogService.open(SessionExpiredModalComponent, {
|
|
362
367
|
data: this.errorConfig,
|
|
363
368
|
position: 'center',
|
|
@@ -365,12 +370,15 @@ class SessionExpiredComponent {
|
|
|
365
370
|
});
|
|
366
371
|
}
|
|
367
372
|
}
|
|
368
|
-
SessionExpiredComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredComponent, deps: [{ token: DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
369
|
-
SessionExpiredComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SessionExpiredComponent, selector: "lib-session-expired", ngImport: i0, template: ``, isInline: true });
|
|
373
|
+
SessionExpiredComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredComponent, deps: [{ token: AuthService }, { token: DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
374
|
+
SessionExpiredComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SessionExpiredComponent, selector: "lib-vc-error-session-expired", ngImport: i0, template: ``, isInline: true });
|
|
370
375
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredComponent, decorators: [{
|
|
371
376
|
type: Component,
|
|
372
|
-
args: [{
|
|
373
|
-
|
|
377
|
+
args: [{
|
|
378
|
+
selector: 'lib-vc-error-session-expired',
|
|
379
|
+
template: ``,
|
|
380
|
+
}]
|
|
381
|
+
}], ctorParameters: function () { return [{ type: AuthService }, { type: DialogService }]; } });
|
|
374
382
|
|
|
375
383
|
class UnauthorizedComponent {
|
|
376
384
|
constructor() {
|
|
@@ -380,10 +388,15 @@ class UnauthorizedComponent {
|
|
|
380
388
|
redirectToSupport() { }
|
|
381
389
|
}
|
|
382
390
|
UnauthorizedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: UnauthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
383
|
-
UnauthorizedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: UnauthorizedComponent, selector: "lib-unauthorized", ngImport: i0, template: `
|
|
391
|
+
UnauthorizedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized", ngImport: i0, template: `
|
|
384
392
|
<div class="errorPage">
|
|
385
393
|
<div class="errorPage-top">
|
|
386
|
-
<img
|
|
394
|
+
<img
|
|
395
|
+
src="https://cdn.v-comply.com/logo/prod/v-logo.svg"
|
|
396
|
+
alt="VComply"
|
|
397
|
+
width="24"
|
|
398
|
+
height="24"
|
|
399
|
+
/>
|
|
387
400
|
</div>
|
|
388
401
|
<div class="errorPage-container">
|
|
389
402
|
<div class="errorPage-inner">
|
|
@@ -413,10 +426,15 @@ UnauthorizedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
413
426
|
`, 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}.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:bold;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}\n"] });
|
|
414
427
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: UnauthorizedComponent, decorators: [{
|
|
415
428
|
type: Component,
|
|
416
|
-
args: [{ selector: 'lib-unauthorized', template: `
|
|
429
|
+
args: [{ selector: 'lib-vc-error-unauthorized', template: `
|
|
417
430
|
<div class="errorPage">
|
|
418
431
|
<div class="errorPage-top">
|
|
419
|
-
<img
|
|
432
|
+
<img
|
|
433
|
+
src="https://cdn.v-comply.com/logo/prod/v-logo.svg"
|
|
434
|
+
alt="VComply"
|
|
435
|
+
width="24"
|
|
436
|
+
height="24"
|
|
437
|
+
/>
|
|
420
438
|
</div>
|
|
421
439
|
<div class="errorPage-container">
|
|
422
440
|
<div class="errorPage-inner">
|
|
@@ -447,42 +465,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
447
465
|
}] });
|
|
448
466
|
|
|
449
467
|
class VcErrorHandlersComponent {
|
|
450
|
-
constructor(
|
|
451
|
-
this.
|
|
452
|
-
this.errorCodes = ErrorStatusCode;
|
|
468
|
+
constructor(errorService) {
|
|
469
|
+
this.errorService = errorService;
|
|
453
470
|
this.unauthorized = false;
|
|
454
471
|
this.sessionExpired = false;
|
|
455
472
|
this.networkUnavailable = false;
|
|
456
|
-
this.
|
|
473
|
+
this.subscribeGlobalError();
|
|
474
|
+
}
|
|
475
|
+
subscribeGlobalError() {
|
|
476
|
+
this.errorService.globalError$.subscribe((error) => {
|
|
457
477
|
this.handleError(error);
|
|
458
478
|
});
|
|
459
479
|
}
|
|
460
480
|
handleError(error) {
|
|
461
|
-
if (error.status ===
|
|
481
|
+
if (error.status === ErrorStatusCode.Unauthenticated) {
|
|
462
482
|
this.sessionExpired = true;
|
|
463
483
|
}
|
|
464
|
-
else if (error.status ===
|
|
484
|
+
else if (error.status === ErrorStatusCode.UnauthorizedAccess) {
|
|
465
485
|
this.unauthorized = true;
|
|
466
486
|
}
|
|
467
|
-
else if (error.status ===
|
|
487
|
+
else if (error.status === ErrorStatusCode.NetworkUnavailable) {
|
|
468
488
|
this.networkUnavailable = true;
|
|
469
489
|
}
|
|
470
490
|
}
|
|
471
491
|
}
|
|
472
492
|
VcErrorHandlersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: VcErrorHandlersComponent, deps: [{ token: GlobalErrorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
473
493
|
VcErrorHandlersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: VcErrorHandlersComponent, selector: "lib-vc-error-handlers", ngImport: i0, template: `
|
|
474
|
-
<lib-
|
|
475
|
-
|
|
476
|
-
|
|
494
|
+
<lib-vc-error-session-expired
|
|
495
|
+
*ngIf="sessionExpired"
|
|
496
|
+
></lib-vc-error-session-expired>
|
|
497
|
+
<lib-vc-error-unauthorized *ngIf="unauthorized"></lib-vc-error-unauthorized>
|
|
498
|
+
`, isInline: true, components: [{ type: SessionExpiredComponent, selector: "lib-vc-error-session-expired" }, { type: UnauthorizedComponent, selector: "lib-vc-error-unauthorized" }] });
|
|
477
499
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: VcErrorHandlersComponent, decorators: [{
|
|
478
500
|
type: Component,
|
|
479
501
|
args: [{
|
|
480
502
|
selector: 'lib-vc-error-handlers',
|
|
481
503
|
template: `
|
|
482
|
-
<lib-
|
|
483
|
-
|
|
504
|
+
<lib-vc-error-session-expired
|
|
505
|
+
*ngIf="sessionExpired"
|
|
506
|
+
></lib-vc-error-session-expired>
|
|
507
|
+
<lib-vc-error-unauthorized *ngIf="unauthorized"></lib-vc-error-unauthorized>
|
|
484
508
|
`,
|
|
485
|
-
styles: [],
|
|
486
509
|
}]
|
|
487
510
|
}], ctorParameters: function () { return [{ type: GlobalErrorService }]; } });
|
|
488
511
|
|
|
@@ -496,11 +519,11 @@ class PageNotFoundComponent {
|
|
|
496
519
|
}
|
|
497
520
|
}
|
|
498
521
|
PageNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PageNotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
499
|
-
PageNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PageNotFoundComponent, selector: "lib-not-found", ngImport: i0, template: `
|
|
522
|
+
PageNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PageNotFoundComponent, selector: "lib-vc-error-page-not-found", ngImport: i0, template: `
|
|
500
523
|
<div class="errorPage">
|
|
501
524
|
<div class="errorPage-top">
|
|
502
525
|
<img
|
|
503
|
-
src="
|
|
526
|
+
src="https://cdn.v-comply.com/logo/prod/v-logo.svg"
|
|
504
527
|
alt="VComply"
|
|
505
528
|
width="24"
|
|
506
529
|
height="24"
|
|
@@ -530,11 +553,11 @@ PageNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
530
553
|
`, 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}.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:bold;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}\n"] });
|
|
531
554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PageNotFoundComponent, decorators: [{
|
|
532
555
|
type: Component,
|
|
533
|
-
args: [{ selector: 'lib-not-found', template: `
|
|
556
|
+
args: [{ selector: 'lib-vc-error-page-not-found', template: `
|
|
534
557
|
<div class="errorPage">
|
|
535
558
|
<div class="errorPage-top">
|
|
536
559
|
<img
|
|
537
|
-
src="
|
|
560
|
+
src="https://cdn.v-comply.com/logo/prod/v-logo.svg"
|
|
538
561
|
alt="VComply"
|
|
539
562
|
width="24"
|
|
540
563
|
height="24"
|
|
@@ -727,20 +750,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
727
750
|
class HttpReqInterceptor {
|
|
728
751
|
constructor(errorService) {
|
|
729
752
|
this.errorService = errorService;
|
|
730
|
-
this.errorCodes = ErrorStatusCode;
|
|
731
753
|
}
|
|
732
754
|
intercept(req, next) {
|
|
733
|
-
return next.handle(req).pipe(timeout(API_TIMEOUT_TIME),
|
|
734
|
-
|
|
735
|
-
this.errorService.handleError(error, req);
|
|
736
|
-
}
|
|
755
|
+
return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), catchError((error) => {
|
|
756
|
+
this.errorService.handleError(error, req);
|
|
737
757
|
return throwError(error);
|
|
738
758
|
}));
|
|
739
759
|
}
|
|
740
|
-
canNotifyErrorService(statusCode) {
|
|
741
|
-
const manageableCodes = Object.values(ErrorStatusCode).filter((value) => typeof value === 'number');
|
|
742
|
-
return manageableCodes.includes(statusCode);
|
|
743
|
-
}
|
|
744
760
|
}
|
|
745
761
|
HttpReqInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HttpReqInterceptor, deps: [{ token: GlobalErrorService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
746
762
|
HttpReqInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HttpReqInterceptor });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-error-handlers.mjs","sources":["../../../projects/vc-error-handlers/src/lib/vc-error-handlers.service.ts","../../../projects/vc-error-handlers/src/lib/shared/types/global-error.types.ts","../../../projects/vc-error-handlers/src/lib/shared/services/global-error.service.ts","../../../projects/vc-error-handlers/src/lib/shared/services/auth.service.ts","../../../projects/vc-error-handlers/src/lib/shared/services/router.service.ts","../../../projects/vc-error-handlers/src/lib/shared/constants/error-handling.constants.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog-config.ts","../../../projects/vc-error-handlers/src/lib/shared/components/session-expired-modal/session-expired-modal.component.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/insertion.directive.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog-ref.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.component.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.component.html","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.module.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog-injector.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.service.ts","../../../projects/vc-error-handlers/src/lib/shared/components/session-expired/session-expired.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/unauthorized/unauthorized.component.ts","../../../projects/vc-error-handlers/src/lib/vc-error-handlers.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/page-not-found/page-not-found.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/chunk-unavailable/chunk-unavailable.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/chunk-unavailable/chunk-unavailable.component.html","../../../projects/vc-error-handlers/src/lib/shared/components/server-error/server-error.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/server-error/server-error.component.html","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar.service.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.html","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar.module.ts","../../../projects/vc-error-handlers/src/lib/configuration.ts","../../../projects/vc-error-handlers/src/lib/shared/errorhandler/sentry-error.handler.ts","../../../projects/vc-error-handlers/src/lib/shared/interceptors/http.interceptor.ts","../../../projects/vc-error-handlers/src/lib/vc-error-handlers.module.ts","../../../projects/vc-error-handlers/src/public-api.ts","../../../projects/vc-error-handlers/src/vc-error-handlers.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class VcErrorHandlersService {\r\n\r\n constructor() { }\r\n}\r\n","export interface DialogData {\r\n header: string;\r\n description: string;\r\n buttonText: string;\r\n}\r\n\r\nexport enum ErrorStatusCode {\r\n URLNotFound = 404, // URL not found\r\n UnauthorizedAccess = 403, // Unauthorized access\r\n RequestTimeout = 408, // Request timeout\r\n Unauthenticated = 401, // Unauthenticated (forbidden)\r\n\r\n // Server-side errors\r\n InternalServerError = 500, // Internal server error\r\n ServiceUnavailable = 503, // Service unavailable\r\n NetworkError = 502, // Bad gateway/network error\r\n\r\n // Network unavailability/offline case\r\n NetworkUnavailable = 0, // Network unavailability or offline case\r\n\r\n // Application-specific errors\r\n JSChunkUnavailable = 600, // Custom error for JS chunk not available\r\n SoftError = 601, // Custom soft error\r\n NotFoundError = 602,\r\n includes, // Custom not found error\r\n}\r\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\nimport { ErrorStatusCode } from '../types/global-error.types';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class GlobalErrorService {\r\n errorCodes = ErrorStatusCode;\r\n\r\n globalError$: Subject<any> = new Subject();\r\n localError$: Subject<any> = new Subject();\r\n\r\n public handleError(error: HttpErrorResponse, request: HttpRequest<any>) {\r\n if (\r\n this.errorCodes.Unauthenticated ||\r\n this.errorCodes.UnauthorizedAccess ||\r\n this.errorCodes.NetworkUnavailable\r\n ) {\r\n this.globalError$.next(error);\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\nimport { AuthorizerService } from \"@vcomply/authorizer\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class AuthService {\r\n constructor(private authorizer: AuthorizerService) {}\r\n\r\n public logoutUser() {\r\n this.authorizer.logout();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RouterService {\r\n public redirectToLogin() {\r\n window.location.href =\r\n `https://${window.location.host}/` +\r\n 'signin?redirectURL=' +\r\n encodeURIComponent(window.location.href);\r\n }\r\n}\r\n","export const VCOMPLY_IMAGE_URL =\r\n 'https://cdn.v-comply.com/logo/prod/v-logo.svg';\r\n\r\nexport const API_TIMEOUT_TIME = 1000 * 15;\r\nexport const API_RETRY_COUNT = 2;\r\n\r\nexport const ERROR_CONFIG = {\r\n PAGE_NOT_FOUND: {\r\n imageUrl:\r\n 'https://cdn.v-comply.com/application/images/Error-page-illustration.svg',\r\n title: 'Oops!',\r\n description: \"The page you're looking for doesn't exist.\",\r\n details: 'Please check the URL or return to the homepage.',\r\n buttonText: 'GO TO DASHBOARD',\r\n },\r\n\r\n UNAUTHORIZED: {\r\n imageUrl:\r\n 'https://cdn.v-comply.com/application/images/Error-page-illustration.svg',\r\n title: 'Oops!',\r\n description: \"You don't have permission to access this page.\",\r\n details: 'If you believe this is an error, please contact',\r\n email: 'help@v-comply.com',\r\n support: 'for support',\r\n buttonText: 'CONTACT SUPPORT',\r\n },\r\n\r\n SESSION_EXPIRED: {\r\n heading: 'Session Expired!',\r\n description:\r\n 'Your session has expired. Please log in again to continue using the app.',\r\n buttonText: 'LOGIN',\r\n },\r\n};\r\n","export class DialogConfig<D = any> {\r\n data?: D;\r\n position?: any;\r\n background?: any;\r\n pointer?: any;\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\nimport { DialogConfig } from '../../../ui-kit/dialog/dialog-config';\r\nimport { DialogRef } from '../../../ui-kit/dialog/dialog-ref';\r\n\r\nimport { DialogData } from '../../types/global-error.types';\r\n\r\nimport { ERROR_CONFIG } from '../../constants/error-handling.constants';\r\n\r\nimport { AuthService } from '../../services/auth.service';\r\nimport { RouterService } from '../../services/router.service';\r\n\r\n@Component({\r\n selector: 'lib-session-expired-modal',\r\n template: ` <div class=\"error-dialog-box\">\r\n <div class=\"error-dialog-box-top\">{{ errorConfig.heading }}</div>\r\n <div class=\"error-dialog-box-mid\">\r\n {{ errorConfig.description }}\r\n </div>\r\n <div class=\"error-dialog-box-bottom\">\r\n <button class=\"logIn-btn\">{{ errorConfig.buttonText }}</button>\r\n </div>\r\n </div>`,\r\n styleUrls: ['./session-expired-modal.component.less'],\r\n})\r\nexport class SessionExpiredModalComponent {\r\n errorConfig = ERROR_CONFIG.SESSION_EXPIRED;\r\n\r\n animation = false;\r\n data: DialogData = {\r\n header: 'Message',\r\n description: 'Description',\r\n buttonText: 'Click Action',\r\n };\r\n\r\n constructor(\r\n private dialogConfig: DialogConfig,\r\n private authService: AuthService,\r\n private routerService: RouterService\r\n ) {\r\n this.data = this.dialogConfig.data;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.animation = true;\r\n setTimeout(() => {\r\n this.animation = false;\r\n }, 300);\r\n }\r\n\r\n public onContinueAction() {\r\n this.authService.logoutUser();\r\n this.routerService.redirectToLogin();\r\n }\r\n}\r\n","import { Directive, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[appInsertion]',\r\n})\r\nexport class InsertionDirective {\r\n constructor(public viewContainerRef: ViewContainerRef) {}\r\n}\r\n","import { Observable, Subject } from 'rxjs';\r\n\r\nexport class DialogRef {\r\n private readonly afterDialogClosed = new Subject<any>();\r\n afterClosed: Observable<any> = this.afterDialogClosed.asObservable();\r\n constructor() {}\r\n\r\n close(result?: any) {\r\n // debugger\r\n this.afterDialogClosed.next(result);\r\n document.body.style.overflow = 'auto';\r\n }\r\n}\r\n","import { Component, Type, ComponentFactoryResolver, ViewChild, OnDestroy, ComponentRef, AfterViewInit, ChangeDetectorRef, OnInit } from '@angular/core';\r\nimport { InsertionDirective } from './insertion.directive';\r\nimport { Subject } from 'rxjs';\r\nimport { DialogRef } from './dialog-ref';\r\nimport { DialogConfig } from './dialog-config';\r\nimport { NavigationEnd, NavigationError, NavigationStart, Router, ROUTER_CONFIGURATION } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-dialog',\r\n templateUrl: './dialog.component.html',\r\n styleUrls: ['./dialog.component.css'],\r\n})\r\nexport class DialogComponent implements AfterViewInit, OnDestroy, OnInit {\r\n componentRef!: ComponentRef<any>;\r\n position: any;\r\n background: any;\r\n pointer: any;\r\n @ViewChild(InsertionDirective, { static: true })\r\n insertionPoint!: InsertionDirective;\r\n animation = true;\r\n\r\n private readonly onDialogClose = new Subject<any>();\r\n public onClose = this.onDialogClose.asObservable();\r\n\r\n childComponentType!: Type<any>;\r\n\r\n constructor(\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private cd: ChangeDetectorRef,\r\n private dialogRef: DialogRef,\r\n public config: DialogConfig,\r\n private router: Router\r\n ) {\r\n // this.componentRef = this.componentRef;\r\n // this.animate = this.animate;\r\n // this.insertionPoint = this.insertionPoint;\r\n // this.childComponentType = this.childComponentType;\r\n }\r\n ngOnInit() {\r\n this.position = this.config.position;\r\n this.background = this.config.background;\r\n document.body.style.overflow = 'hidden';\r\n setTimeout(() => {\r\n this.animation = false;\r\n }, 200);\r\n this.routeAction();\r\n }\r\n\r\n routeAction() {\r\n this.router.events.subscribe((event: any) => {\r\n if (event instanceof NavigationStart) {\r\n // Show loading indicator\r\n }\r\n if (event instanceof NavigationEnd) {\r\n // Hide loading indicator\r\n this.dialogRef.close();\r\n }\r\n if (event instanceof NavigationError) {\r\n // Hide loading indicator\r\n // Present error to user\r\n }\r\n });\r\n }\r\n ngAfterViewInit() {\r\n this.loadChildComponent(this.childComponentType);\r\n this.cd.detectChanges();\r\n }\r\n\r\n onOverlayClicked(evt: MouseEvent) {\r\n // this.dialogRef.close();\r\n }\r\n\r\n onDialogClicked(evt: MouseEvent) {\r\n evt.stopPropagation();\r\n }\r\n\r\n loadChildComponent(componentType: Type<any>) {\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);\r\n\r\n const viewContainerRef = this.insertionPoint.viewContainerRef;\r\n viewContainerRef.clear();\r\n\r\n this.componentRef = viewContainerRef.createComponent(componentFactory);\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.componentRef) {\r\n this.componentRef.destroy();\r\n }\r\n }\r\n\r\n close(data?: any) {\r\n this.onDialogClose.next(data);\r\n document.body.style.overflow = 'auto';\r\n }\r\n}\r\n","<div\r\n class=\"overlay\"\r\n (click)=\"onOverlayClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER',\r\n black: background === 'black',\r\n whiteBlur: background === 'whiteBlur'\r\n }\" [class.pointer-none]=\"pointer === 'none'\"\r\n>\r\n <div\r\n class=\"dialog\"\r\n [class.animate]=\"animation\"\r\n (click)=\"onDialogClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER'\r\n }\"\r\n >\r\n <ng-template appInsertion></ng-template>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DialogComponent } from './dialog.component';\r\nimport { InsertionDirective } from './insertion.directive';\r\nimport { DialogRef } from './dialog-ref';\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [DialogComponent, InsertionDirective],\r\n providers: [DialogRef],\r\n exports:[DialogComponent]\r\n})\r\nexport class DialogModule {}\r\n","import { Injector, Type, InjectionToken, InjectFlags } from '@angular/core';\r\n\r\nexport class DialogInjector implements Injector {\r\n constructor(private parentDialogInjector: Injector, private dialogAdditionalTokens: WeakMap<any, any>) {}\r\n\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\r\n // get(token: any, notFoundValue?: any){return; }\r\n get(token: any, notFoundValue?: any, flags?: any) {\r\n const value = this.dialogAdditionalTokens.get(token);\r\n if (value) {\r\n return value;\r\n }\r\n return this.parentDialogInjector.get<any>(token, notFoundValue);\r\n }\r\n}\r\n","import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, Type, EmbeddedViewRef, ComponentRef } from '@angular/core';\r\nimport { DialogModule } from './dialog.module';\r\nimport { DialogComponent } from './dialog.component';\r\nimport { DialogInjector } from './dialog-injector';\r\nimport { DialogConfig } from './dialog-config';\r\nimport { DialogRef } from './dialog-ref';\r\n\r\n@Injectable({\r\n providedIn: DialogModule,\r\n})\r\nexport class DialogService {\r\n dialogComponentRef!: ComponentRef<DialogComponent>;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {}\r\n\r\n public open(componentType: Type<any>, config: DialogConfig) {\r\n const dialogRef = this.appendDialogComponentToBody(config);\r\n\r\n this.dialogComponentRef.instance.childComponentType = componentType;\r\n\r\n return dialogRef;\r\n }\r\n\r\n private appendDialogComponentToBody(config: DialogConfig) {\r\n const map = new WeakMap();\r\n map.set(DialogConfig, config);\r\n\r\n const dialogRef = new DialogRef();\r\n map.set(DialogRef, dialogRef);\r\n\r\n const sub = dialogRef.afterClosed.subscribe(() => {\r\n this.removeDialogComponentFromBody();\r\n sub.unsubscribe();\r\n });\r\n\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DialogComponent);\r\n const componentRef = componentFactory.create(new DialogInjector(this.injector, map));\r\n\r\n this.appRef.attachView(componentRef.hostView);\r\n\r\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n document.body.appendChild(domElem);\r\n\r\n this.dialogComponentRef = componentRef;\r\n\r\n this.dialogComponentRef.instance.onClose.subscribe(() => {\r\n this.removeDialogComponentFromBody();\r\n });\r\n\r\n return dialogRef;\r\n }\r\n\r\n private removeDialogComponentFromBody() {\r\n this.appRef.detachView(this.dialogComponentRef.hostView);\r\n this.dialogComponentRef.destroy();\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\nimport { SessionExpiredModalComponent } from '../session-expired-modal/session-expired-modal.component';\r\n\r\nimport { DialogService } from '../../../ui-kit/dialog/dialog.service';\r\n\r\nimport { ERROR_CONFIG } from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-session-expired',\r\n template: ``,\r\n styleUrls: [],\r\n})\r\nexport class SessionExpiredComponent implements OnInit {\r\n errorConfig = ERROR_CONFIG.SESSION_EXPIRED;\r\n\r\n constructor(private dialogService: DialogService) {}\r\n\r\n ngOnInit() {\r\n this.dialogService.open(SessionExpiredModalComponent, {\r\n data: this.errorConfig,\r\n position: 'center',\r\n background: 'whiteBlur',\r\n });\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\nimport {\r\n ERROR_CONFIG,\r\n VCOMPLY_IMAGE_URL,\r\n} from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-unauthorized',\r\n template: `\r\n <div class=\"errorPage\">\r\n <div class=\"errorPage-top\">\r\n <img src=\"VcomplyImage\" alt=\"VComply\" width=\"24\" height=\"24\" />\r\n </div>\r\n <div class=\"errorPage-container\">\r\n <div class=\"errorPage-inner\">\r\n <div class=\"errorPage-inner-image\">\r\n <img\r\n [src]=\"errorConfig.imageUrl\"\r\n alt=\"Error Image\"\r\n width=\"256\"\r\n height=\"256\"\r\n />\r\n </div>\r\n <div class=\"errorPage-inner-right\">\r\n <div class=\"errorPage-heading\">{{ errorConfig.title }}</div>\r\n <div class=\"errorPage-text\">{{ errorConfig.description }}</div>\r\n <div class=\"errorPage-details\">\r\n {{ errorConfig.details }}\r\n <a href=\"mailto:{help@v-comply.com}\">{{ errorConfig.email }}</a>\r\n {{ errorConfig.support }}.\r\n </div>\r\n <button class=\"errorPage-btn\" (click)=\"redirectToSupport()\">\r\n {{ errorConfig.buttonText }} <i class=\"icons\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n styleUrls: ['./unauthorized.component.less'],\r\n})\r\n\r\nexport class UnauthorizedComponent {\r\n errorConfig = ERROR_CONFIG.UNAUTHORIZED;\r\n VcomplyImage = VCOMPLY_IMAGE_URL;\r\n\r\n redirectToSupport() {}\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\nimport { GlobalErrorService } from './shared/services/global-error.service';\r\n\r\nimport { ErrorStatusCode } from './shared/types/global-error.types';\r\n\r\n@Component({\r\n selector: 'lib-vc-error-handlers',\r\n template: `\r\n <lib-session-expired *ngIf=\"sessionExpired\"></lib-session-expired>\r\n <lib-unauthorized *ngIf=\"unauthorized\"></lib-unauthorized>\r\n `,\r\n styles: [],\r\n})\r\nexport class VcErrorHandlersComponent {\r\n errorCodes = ErrorStatusCode;\r\n\r\n unauthorized: boolean = false;\r\n sessionExpired: boolean = false;\r\n networkUnavailable: boolean = false;\r\n\r\n constructor(private globalErrorService: GlobalErrorService) {\r\n this.globalErrorService.globalError$.subscribe((error) => {\r\n this.handleError(error);\r\n });\r\n }\r\n\r\n private handleError(error: any) {\r\n if (error.status === this.errorCodes.Unauthenticated) {\r\n this.sessionExpired = true;\r\n } else if (error.status === this.errorCodes.UnauthorizedAccess) {\r\n this.unauthorized = true;\r\n } else if (error.status === this.errorCodes.NetworkUnavailable) {\r\n this.networkUnavailable = true;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ERROR_CONFIG, VCOMPLY_IMAGE_URL } from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-not-found',\r\n template: `\r\n <div class=\"errorPage\">\r\n <div class=\"errorPage-top\">\r\n <img\r\n src=\"VcomplyImage\"\r\n alt=\"VComply\"\r\n width=\"24\"\r\n height=\"24\"\r\n />\r\n </div>\r\n <div class=\"errorPage-container\">\r\n <div class=\"errorPage-inner\">\r\n <div class=\"errorPage-inner-image\">\r\n <img\r\n [src]=\"errorConfig.imageUrl\"\r\n alt=\"Error Image\"\r\n width=\"256\"\r\n height=\"256\"\r\n />\r\n </div>\r\n <div class=\"errorPage-inner-right\">\r\n <div class=\"errorPage-heading\">{{ errorConfig.title }}</div>\r\n <div class=\"errorPage-text\">{{ errorConfig.description }}</div>\r\n <div class=\"errorPage-details\">{{ errorConfig.details }}</div>\r\n <button class=\"errorPage-btn\" (click)=\"redirectToHome()\">\r\n {{ errorConfig.buttonText }} <i class=\"icons\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n styleUrls: ['./page-not-found.component.less'],\r\n})\r\n\r\nexport class PageNotFoundComponent {\r\n errorConfig = ERROR_CONFIG.PAGE_NOT_FOUND;\r\n VcomplyImage= VCOMPLY_IMAGE_URL;\r\n\r\n redirectToHome() {\r\n // Redirect to home page\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-chunk-unavailable',\r\n templateUrl: './chunk-unavailable.component.html',\r\n styleUrls: ['./chunk-unavailable.component.css']\r\n})\r\nexport class ChunkUnavailableComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<p>chunk-unavailable works!</p>\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-server-error',\r\n templateUrl: './server-error.component.html',\r\n styleUrls: ['./server-error.component.css']\r\n})\r\nexport class ServerErrorComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<p>server-error works!</p>\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SnackBarService {\r\n public snackbarSubject = new Subject <any>();\r\n public snackbarState = this.snackbarSubject.asObservable();\r\n constructor() {}\r\n\r\n show(message: string, type?:'success'|'warning'|'info'|'alert'|'error') {\r\n this.snackbarSubject.next({\r\n show: true,\r\n message,\r\n icon:type,\r\n });\r\n }\r\n\r\n hide(){\r\n this.snackbarSubject.next({\r\n show: false,\r\n message: '',\r\n icon: '',\r\n });\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { SnackBarService } from '../snack-bar.service';\r\n\r\n@Component({\r\n selector: 'app-snack-bar',\r\n templateUrl: './snack-bar.component.html',\r\n styleUrls: ['./snack-bar.component.less'],\r\n})\r\nexport class SnackBarComponent implements OnInit, OnDestroy {\r\n show = false;\r\n message = '--';\r\n icon = '';\r\n type = 'alert';\r\n icons: any = {\r\n success: '',\r\n warning: '',\r\n info: '',\r\n alert: '',\r\n error: '',\r\n };\r\n snackbarSubscription!: Subscription;\r\n constructor(private snackbarService: SnackBarService) {}\r\n\r\n ngOnInit(): void {\r\n this.snackbarSubscription = this.snackbarService.snackbarState.subscribe(\r\n (state) => {\r\n if (state.icon && Object.keys(this.icons).includes(state?.icon)) {\r\n this.icon = this.icons[state.icon];\r\n this.type = state?.icon;\r\n }\r\n this.message = state.message;\r\n this.show = state.show;\r\n this.setAutoClose();\r\n }\r\n );\r\n }\r\n\r\n setAutoClose() {\r\n setTimeout(() => {\r\n this.show = false;\r\n this.close();\r\n }, 3000);\r\n }\r\n close() {\r\n this.show = false;\r\n this.snackbarService.hide();\r\n }\r\n ngOnDestroy() {\r\n this.snackbarSubscription.unsubscribe();\r\n }\r\n}\r\n","<div class=\"workflow-snackbar\" *ngIf=\"show\">\r\n <div class=\"workflow-snackbar-inner\">\r\n <div class=\"workflow-snackbarText\">\r\n <!--  -->\r\n <i class=\"icons\" [class]=\"type\" [innerHTML]=\"icon\"></i> <span [innerHTML]=\"message\">{{ message }}</span>\r\n </div>\r\n <button (click)=\"close()\">[ <span>Close</span> ]</button>\r\n </div>\r\n </div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SnackBarComponent } from './snack-bar/snack-bar.component';\r\n\r\n@NgModule({\r\n declarations: [SnackBarComponent],\r\n imports: [CommonModule],\r\n exports: [SnackBarComponent],\r\n})\r\nexport class SnackBarModule {}\r\n","export class Configurations {\r\n public sentryConfig: any;\r\n\r\n constructor() {\r\n this.sentryConfig = {};\r\n }\r\n}\r\n","import { ErrorHandler, Injectable, Optional } from '@angular/core';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport { Configurations } from '../../configuration';\r\nimport { AuthorizerService } from '@vcomply/authorizer';\r\n\r\n@Injectable()\r\nexport class SentryErrorHandler implements ErrorHandler {\r\n constructor(\r\n private authorizerService: AuthorizerService,\r\n @Optional() config?: Configurations\r\n ) {\r\n if (config?.sentryConfig) {\r\n const SENTRY_CONFIG = config.sentryConfig;\r\n Sentry.init({\r\n dsn: SENTRY_CONFIG?.DSN,\r\n integrations: [\r\n new Sentry.BrowserTracing({\r\n tracePropagationTargets: SENTRY_CONFIG.ALLOW_ORIGIN,\r\n routingInstrumentation: Sentry.routingInstrumentation,\r\n }),\r\n ],\r\n tracesSampleRate: SENTRY_CONFIG.TRACES_SAMPLE_RATE,\r\n replaysSessionSampleRate: SENTRY_CONFIG.REPLAY_SESSION_SAMPLE_RATE,\r\n replaysOnErrorSampleRate: SENTRY_CONFIG.REPLAY_ON_ERROR_SAMPLE_RATE,\r\n });\r\n Sentry.setUser({ userDetails: this.authorizerService.getUser() });\r\n }\r\n }\r\n\r\n handleError(error: any) {\r\n const ERROR = error?.originalError || error;\r\n this.handleChunkError(ERROR);\r\n Sentry.captureException(ERROR);\r\n }\r\n\r\n handleChunkError(error: Error) {\r\n const chunkFailedMessage = /Loading chunk [\\d]+ failed/;\r\n if (chunkFailedMessage.test(error?.message)) {\r\n window.location.reload();\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpErrorResponse,\r\n} from '@angular/common/http';\r\n\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError, timeout, retry } from 'rxjs/operators';\r\n\r\nimport {\r\n API_RETRY_COUNT,\r\n API_TIMEOUT_TIME,\r\n} from '../constants/error-handling.constants';\r\nimport { ErrorStatusCode } from '../types/global-error.types';\r\n\r\nimport { GlobalErrorService } from '../services/global-error.service';\r\n\r\n@Injectable()\r\nexport class HttpReqInterceptor implements HttpInterceptor {\r\n errorCodes = ErrorStatusCode;\r\n\r\n constructor(private errorService: GlobalErrorService) {}\r\n\r\n intercept(\r\n req: HttpRequest<any>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<any>> {\r\n return next.handle(req).pipe(\r\n timeout(API_TIMEOUT_TIME),\r\n retry(API_RETRY_COUNT),\r\n catchError((error: HttpErrorResponse) => {\r\n if (this.canNotifyErrorService(error.status)) {\r\n this.errorService.handleError(error, req);\r\n }\r\n return throwError(error);\r\n })\r\n );\r\n }\r\n\r\n private canNotifyErrorService(statusCode: number): boolean {\r\n const manageableCodes = Object.values(ErrorStatusCode).filter(\r\n (value) => typeof value === 'number'\r\n ) as number[];\r\n return manageableCodes.includes(statusCode);\r\n }\r\n}\r\n","import {\r\n ErrorHandler,\r\n InjectionToken,\r\n ModuleWithProviders,\r\n NgModule,\r\n} from '@angular/core';\r\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\r\n\r\nimport { PageNotFoundComponent } from './shared/components/page-not-found/page-not-found.component';\r\nimport { VcErrorHandlersComponent } from './vc-error-handlers.component';\r\n\r\nimport { DialogModule } from './ui-kit/dialog/dialog.module';\r\nimport { SnackBarModule } from './ui-kit/snack-bar/snack-bar.module';\r\n\r\nimport { BrowserOptions } from '@sentry/browser';\r\nimport { GlobalErrorHandler } from './shared/errorhandler/chunk-error.handler';\r\nimport { SentryErrorHandler } from './shared/errorhandler/sentry-error.handler';\r\nimport { Configurations } from './configuration';\r\nimport { UnauthorizedComponent } from './shared/components/unauthorized/unauthorized.component';\r\nimport { SessionExpiredComponent } from './shared/components/session-expired/session-expired.component';\r\nimport { ChunkUnavailableComponent } from './shared/components/chunk-unavailable/chunk-unavailable.component';\r\nimport { ServerErrorComponent } from './shared/components/server-error/server-error.component';\r\nimport { SessionExpiredModalComponent } from './shared/components/session-expired-modal/session-expired-modal.component';\r\n\r\nimport { HttpReqInterceptor } from './shared/interceptors/http.interceptor';\r\n\r\nexport const FOR_ROOT_SENTRY_OPTIONS_TOKEN = new InjectionToken<BrowserOptions>(\r\n 'forRoot() SentryErrorHandler options'\r\n);\r\n\r\n@NgModule({\r\n declarations: [\r\n VcErrorHandlersComponent,\r\n PageNotFoundComponent,\r\n UnauthorizedComponent,\r\n SessionExpiredComponent,\r\n ChunkUnavailableComponent,\r\n ServerErrorComponent,\r\n SessionExpiredModalComponent,\r\n ],\r\n imports: [DialogModule, SnackBarModule],\r\n exports: [\r\n VcErrorHandlersComponent,\r\n PageNotFoundComponent,\r\n UnauthorizedComponent,\r\n SessionExpiredComponent,\r\n ChunkUnavailableComponent,\r\n ServerErrorComponent,\r\n SessionExpiredModalComponent,\r\n ],\r\n providers: [\r\n { provide: ErrorHandler, useClass: SentryErrorHandler },\r\n { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },\r\n ],\r\n bootstrap: [VcErrorHandlersComponent],\r\n})\r\nexport class VcErrorHandlersModule {\r\n public static forRoot(\r\n environmentConfig: Configurations\r\n ): ModuleWithProviders<VcErrorHandlersModule> {\r\n return {\r\n ngModule: VcErrorHandlersModule,\r\n providers: [{ provide: Configurations, useValue: environmentConfig }],\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of vc-error-handlers\r\n */\r\n\r\nexport * from './lib/vc-error-handlers.service';\r\nexport * from './lib/shared/services/global-error.service';\r\nexport * from './lib/shared/services/auth.service';\r\nexport * from './lib/shared/services/router.service';\r\nexport * from './lib/vc-error-handlers.component';\r\nexport * from './lib/shared/components/page-not-found/page-not-found.component';\r\nexport * from './lib/shared/components/unauthorized/unauthorized.component';\r\nexport * from './lib/shared/components/chunk-unavailable/chunk-unavailable.component';\r\nexport * from './lib/shared/components/server-error/server-error.component';\r\nexport * from './lib/shared/components/session-expired/session-expired.component';\r\nexport * from './lib/shared/components/session-expired-modal/session-expired-modal.component';\r\nexport * from './lib/vc-error-handlers.module';\r\nexport * from './lib/shared/interceptors/http.interceptor';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,sBAAsB;IAEjC,iBAAiB;;mHAFN,sBAAsB;uHAAtB,sBAAsB,cAFrB,MAAM;2FAEP,sBAAsB;kBAHlC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;ACED,IAAY,eAmBX;AAnBD,WAAY,eAAe;IACzB,qEAAiB,CAAA;IACjB,mFAAwB,CA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C,YAAY,EAAE,cAAc,CAAC;2FAgB5B,qBAAqB;kBA1BjC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,qBAAqB;wBACrB,qBAAqB;wBACrB,uBAAuB;wBACvB,yBAAyB;wBACzB,oBAAoB;wBACpB,4BAA4B;qBAC7B;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE;wBACP,wBAAwB;wBACxB,qBAAqB;wBACrB,qBAAqB;wBACrB,uBAAuB;wBACvB,yBAAyB;wBACzB,oBAAoB;wBACpB,4BAA4B;qBAC7B;oBACD,SAAS,EAAE;wBACT,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE;wBACvD,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;qBAC1E;oBACD,SAAS,EAAE,CAAC,wBAAwB,CAAC;iBACtC;;;ACvDD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"vc-error-handlers.mjs","sources":["../../../projects/vc-error-handlers/src/lib/vc-error-handlers.service.ts","../../../projects/vc-error-handlers/src/lib/shared/types/global-error.types.ts","../../../projects/vc-error-handlers/src/lib/shared/services/global-error.service.ts","../../../projects/vc-error-handlers/src/lib/shared/services/auth.service.ts","../../../projects/vc-error-handlers/src/lib/shared/services/router.service.ts","../../../projects/vc-error-handlers/src/lib/shared/constants/error-handling.constants.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog-config.ts","../../../projects/vc-error-handlers/src/lib/shared/components/session-expired-modal/session-expired-modal.component.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/insertion.directive.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog-ref.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.component.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.component.html","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.module.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog-injector.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/dialog/dialog.service.ts","../../../projects/vc-error-handlers/src/lib/shared/components/session-expired/session-expired.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/unauthorized/unauthorized.component.ts","../../../projects/vc-error-handlers/src/lib/vc-error-handlers.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/page-not-found/page-not-found.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/chunk-unavailable/chunk-unavailable.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/chunk-unavailable/chunk-unavailable.component.html","../../../projects/vc-error-handlers/src/lib/shared/components/server-error/server-error.component.ts","../../../projects/vc-error-handlers/src/lib/shared/components/server-error/server-error.component.html","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar.service.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.ts","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.html","../../../projects/vc-error-handlers/src/lib/ui-kit/snack-bar/snack-bar.module.ts","../../../projects/vc-error-handlers/src/lib/configuration.ts","../../../projects/vc-error-handlers/src/lib/shared/errorhandler/sentry-error.handler.ts","../../../projects/vc-error-handlers/src/lib/shared/interceptors/http.interceptor.ts","../../../projects/vc-error-handlers/src/lib/vc-error-handlers.module.ts","../../../projects/vc-error-handlers/src/public-api.ts","../../../projects/vc-error-handlers/src/vc-error-handlers.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class VcErrorHandlersService {\r\n\r\n constructor() { }\r\n}\r\n","export interface DialogData {\r\n header: string;\r\n description: string;\r\n buttonText: string;\r\n}\r\n\r\nexport enum ErrorStatusCode {\r\n URLNotFound = 404,\r\n UnauthorizedAccess = 403,\r\n Unauthenticated = 401,\r\n\r\n // Server-side errors\r\n InternalServerError = 500,\r\n ServiceUnavailable = 503,\r\n BadGateway = 502,\r\n RequestTimeout=504,\r\n\r\n // Network unavailability/offline case\r\n NetworkUnavailable = 0,\r\n\r\n // Application-specific errors\r\n JSChunkUnavailable = 600,\r\n}\r\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\nimport { ErrorStatusCode } from '../types/global-error.types';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class GlobalErrorService {\r\n public globalError$: Subject<any> = new Subject();\r\n public localError$: Subject<any> = new Subject();\r\n\r\n public handleError(error: HttpErrorResponse, request: HttpRequest<any>) {\r\n if (\r\n this.isUnauthenticated(error) ||\r\n this.isUnauthorizedAccess(error) ||\r\n this.isNetworkUnavailable(error)\r\n ) {\r\n this.globalError$.next(error);\r\n }\r\n }\r\n\r\n private isUnauthenticated(error: HttpErrorResponse): boolean {\r\n return error.status === ErrorStatusCode.Unauthenticated;\r\n }\r\n\r\n private isUnauthorizedAccess(error: HttpErrorResponse): boolean {\r\n return error.status === ErrorStatusCode.UnauthorizedAccess;\r\n }\r\n\r\n private isNetworkUnavailable(error: HttpErrorResponse): boolean {\r\n return error.status === ErrorStatusCode.NetworkUnavailable;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\nimport { AuthorizerService } from \"@vcomply/authorizer\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class AuthService {\r\n constructor(private authorizer: AuthorizerService) {}\r\n\r\n public logoutUser() {\r\n this.authorizer.logout();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RouterService {\r\n public redirectToLogin() {\r\n window.location.href =\r\n `https://${window.location.host}/` +\r\n 'signin?redirectURL=' +\r\n encodeURIComponent(window.location.href);\r\n }\r\n}\r\n","export const VCOMPLY_IMAGE_URL =\r\n 'https://cdn.v-comply.com/logo/prod/v-logo.svg';\r\n\r\nexport const API_TIMEOUT_TIME = 1000 * 15;\r\n\r\nexport const ERROR_CONFIG = {\r\n PAGE_NOT_FOUND: {\r\n imageUrl:\r\n 'https://cdn.v-comply.com/application/images/Error-page-illustration.svg',\r\n title: 'Oops!',\r\n description: \"The page you're looking for doesn't exist.\",\r\n details: 'Please check the URL or return to the homepage.',\r\n buttonText: 'GO TO DASHBOARD',\r\n },\r\n\r\n UNAUTHORIZED: {\r\n imageUrl:\r\n 'https://cdn.v-comply.com/application/images/Error-page-illustration.svg',\r\n title: 'Oops!',\r\n description: \"You don't have permission to access this page.\",\r\n details: 'If you believe this is an error, please contact',\r\n email: 'help@v-comply.com',\r\n support: 'for support',\r\n buttonText: 'CONTACT SUPPORT',\r\n },\r\n\r\n SESSION_EXPIRED: {\r\n heading: 'Session Expired!',\r\n description:\r\n 'Your session has expired. Please log in again to continue using the app.',\r\n buttonText: 'LOGIN',\r\n },\r\n};\r\n","export class DialogConfig<D = any> {\r\n data?: D;\r\n position?: any;\r\n background?: any;\r\n pointer?: any;\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\nimport { DialogConfig } from '../../../ui-kit/dialog/dialog-config';\r\n\r\nimport { RouterService } from '../../services/router.service';\r\n\r\nimport { DialogData } from '../../types/global-error.types';\r\nimport { ERROR_CONFIG } from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-vc-error-session-expired-modal',\r\n template: ` <div class=\"error-dialog-box\">\r\n <div class=\"error-dialog-box-top\">{{ errorConfig.heading }}</div>\r\n <div class=\"error-dialog-box-mid\">\r\n {{ errorConfig.description }}\r\n </div>\r\n <div class=\"error-dialog-box-bottom\">\r\n <button (click)=\"onContinueAction()\" class=\"logIn-btn\">\r\n {{ errorConfig.buttonText }}\r\n </button>\r\n </div>\r\n </div>`,\r\n styleUrls: ['./session-expired-modal.component.less'],\r\n})\r\nexport class SessionExpiredModalComponent {\r\n errorConfig = ERROR_CONFIG.SESSION_EXPIRED;\r\n\r\n animation = false;\r\n data: DialogData = {\r\n header: 'Message',\r\n description: 'Description',\r\n buttonText: 'Click Action',\r\n };\r\n\r\n constructor(\r\n private dialogConfig: DialogConfig,\r\n private routerService: RouterService\r\n ) {\r\n this.data = this.dialogConfig.data;\r\n }\r\n\r\n public onContinueAction() {\r\n this.routerService.redirectToLogin();\r\n }\r\n}\r\n","import { Directive, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[appInsertion]',\r\n})\r\nexport class InsertionDirective {\r\n constructor(public viewContainerRef: ViewContainerRef) {}\r\n}\r\n","import { Observable, Subject } from 'rxjs';\r\n\r\nexport class DialogRef {\r\n private readonly afterDialogClosed = new Subject<any>();\r\n afterClosed: Observable<any> = this.afterDialogClosed.asObservable();\r\n constructor() {}\r\n\r\n close(result?: any) {\r\n // debugger\r\n this.afterDialogClosed.next(result);\r\n document.body.style.overflow = 'auto';\r\n }\r\n}\r\n","import { Component, Type, ComponentFactoryResolver, ViewChild, OnDestroy, ComponentRef, AfterViewInit, ChangeDetectorRef, OnInit } from '@angular/core';\r\nimport { InsertionDirective } from './insertion.directive';\r\nimport { Subject } from 'rxjs';\r\nimport { DialogRef } from './dialog-ref';\r\nimport { DialogConfig } from './dialog-config';\r\nimport { NavigationEnd, NavigationError, NavigationStart, Router, ROUTER_CONFIGURATION } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-dialog',\r\n templateUrl: './dialog.component.html',\r\n styleUrls: ['./dialog.component.css'],\r\n})\r\nexport class DialogComponent implements AfterViewInit, OnDestroy, OnInit {\r\n componentRef!: ComponentRef<any>;\r\n position: any;\r\n background: any;\r\n pointer: any;\r\n @ViewChild(InsertionDirective, { static: true })\r\n insertionPoint!: InsertionDirective;\r\n animation = true;\r\n\r\n private readonly onDialogClose = new Subject<any>();\r\n public onClose = this.onDialogClose.asObservable();\r\n\r\n childComponentType!: Type<any>;\r\n\r\n constructor(\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private cd: ChangeDetectorRef,\r\n private dialogRef: DialogRef,\r\n public config: DialogConfig,\r\n private router: Router\r\n ) {\r\n // this.componentRef = this.componentRef;\r\n // this.animate = this.animate;\r\n // this.insertionPoint = this.insertionPoint;\r\n // this.childComponentType = this.childComponentType;\r\n }\r\n ngOnInit() {\r\n this.position = this.config.position;\r\n this.background = this.config.background;\r\n document.body.style.overflow = 'hidden';\r\n setTimeout(() => {\r\n this.animation = false;\r\n }, 200);\r\n this.routeAction();\r\n }\r\n\r\n routeAction() {\r\n this.router.events.subscribe((event: any) => {\r\n if (event instanceof NavigationStart) {\r\n // Show loading indicator\r\n }\r\n if (event instanceof NavigationEnd) {\r\n // Hide loading indicator\r\n this.dialogRef.close();\r\n }\r\n if (event instanceof NavigationError) {\r\n // Hide loading indicator\r\n // Present error to user\r\n }\r\n });\r\n }\r\n ngAfterViewInit() {\r\n this.loadChildComponent(this.childComponentType);\r\n this.cd.detectChanges();\r\n }\r\n\r\n onOverlayClicked(evt: MouseEvent) {\r\n // this.dialogRef.close();\r\n }\r\n\r\n onDialogClicked(evt: MouseEvent) {\r\n evt.stopPropagation();\r\n }\r\n\r\n loadChildComponent(componentType: Type<any>) {\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);\r\n\r\n const viewContainerRef = this.insertionPoint.viewContainerRef;\r\n viewContainerRef.clear();\r\n\r\n this.componentRef = viewContainerRef.createComponent(componentFactory);\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.componentRef) {\r\n this.componentRef.destroy();\r\n }\r\n }\r\n\r\n close(data?: any) {\r\n this.onDialogClose.next(data);\r\n document.body.style.overflow = 'auto';\r\n }\r\n}\r\n","<div\r\n class=\"overlay\"\r\n (click)=\"onOverlayClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER',\r\n black: background === 'black',\r\n whiteBlur: background === 'whiteBlur'\r\n }\" [class.pointer-none]=\"pointer === 'none'\"\r\n>\r\n <div\r\n class=\"dialog\"\r\n [class.animate]=\"animation\"\r\n (click)=\"onDialogClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER'\r\n }\"\r\n >\r\n <ng-template appInsertion></ng-template>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DialogComponent } from './dialog.component';\r\nimport { InsertionDirective } from './insertion.directive';\r\nimport { DialogRef } from './dialog-ref';\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [DialogComponent, InsertionDirective],\r\n providers: [DialogRef],\r\n exports:[DialogComponent]\r\n})\r\nexport class DialogModule {}\r\n","import { Injector, Type, InjectionToken, InjectFlags } from '@angular/core';\r\n\r\nexport class DialogInjector implements Injector {\r\n constructor(private parentDialogInjector: Injector, private dialogAdditionalTokens: WeakMap<any, any>) {}\r\n\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\r\n // get(token: any, notFoundValue?: any){return; }\r\n get(token: any, notFoundValue?: any, flags?: any) {\r\n const value = this.dialogAdditionalTokens.get(token);\r\n if (value) {\r\n return value;\r\n }\r\n return this.parentDialogInjector.get<any>(token, notFoundValue);\r\n }\r\n}\r\n","import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, Type, EmbeddedViewRef, ComponentRef } from '@angular/core';\r\nimport { DialogModule } from './dialog.module';\r\nimport { DialogComponent } from './dialog.component';\r\nimport { DialogInjector } from './dialog-injector';\r\nimport { DialogConfig } from './dialog-config';\r\nimport { DialogRef } from './dialog-ref';\r\n\r\n@Injectable({\r\n providedIn: DialogModule,\r\n})\r\nexport class DialogService {\r\n dialogComponentRef!: ComponentRef<DialogComponent>;\r\n\r\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {}\r\n\r\n public open(componentType: Type<any>, config: DialogConfig) {\r\n const dialogRef = this.appendDialogComponentToBody(config);\r\n\r\n this.dialogComponentRef.instance.childComponentType = componentType;\r\n\r\n return dialogRef;\r\n }\r\n\r\n private appendDialogComponentToBody(config: DialogConfig) {\r\n const map = new WeakMap();\r\n map.set(DialogConfig, config);\r\n\r\n const dialogRef = new DialogRef();\r\n map.set(DialogRef, dialogRef);\r\n\r\n const sub = dialogRef.afterClosed.subscribe(() => {\r\n this.removeDialogComponentFromBody();\r\n sub.unsubscribe();\r\n });\r\n\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DialogComponent);\r\n const componentRef = componentFactory.create(new DialogInjector(this.injector, map));\r\n\r\n this.appRef.attachView(componentRef.hostView);\r\n\r\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n document.body.appendChild(domElem);\r\n\r\n this.dialogComponentRef = componentRef;\r\n\r\n this.dialogComponentRef.instance.onClose.subscribe(() => {\r\n this.removeDialogComponentFromBody();\r\n });\r\n\r\n return dialogRef;\r\n }\r\n\r\n private removeDialogComponentFromBody() {\r\n this.appRef.detachView(this.dialogComponentRef.hostView);\r\n this.dialogComponentRef.destroy();\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\nimport { SessionExpiredModalComponent } from '../session-expired-modal/session-expired-modal.component';\r\n\r\nimport { AuthService } from '../../services/auth.service';\r\nimport { DialogService } from '../../../ui-kit/dialog/dialog.service';\r\n\r\nimport { ERROR_CONFIG } from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-vc-error-session-expired',\r\n template: ``,\r\n})\r\nexport class SessionExpiredComponent implements OnInit {\r\n errorConfig = ERROR_CONFIG.SESSION_EXPIRED;\r\n\r\n constructor(\r\n private authService: AuthService,\r\n private dialogService: DialogService\r\n ) {}\r\n\r\n ngOnInit() {\r\n // this.authService.logoutUser();\r\n this.openSessionExpiredModal();\r\n }\r\n\r\n private openSessionExpiredModal() {\r\n this.dialogService.open(SessionExpiredModalComponent, {\r\n data: this.errorConfig,\r\n position: 'center',\r\n background: 'whiteBlur',\r\n });\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\nimport {\r\n ERROR_CONFIG,\r\n VCOMPLY_IMAGE_URL,\r\n} from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-vc-error-unauthorized',\r\n template: `\r\n <div class=\"errorPage\">\r\n <div class=\"errorPage-top\">\r\n <img\r\n src=\"https://cdn.v-comply.com/logo/prod/v-logo.svg\"\r\n alt=\"VComply\"\r\n width=\"24\"\r\n height=\"24\"\r\n />\r\n </div>\r\n <div class=\"errorPage-container\">\r\n <div class=\"errorPage-inner\">\r\n <div class=\"errorPage-inner-image\">\r\n <img\r\n [src]=\"errorConfig.imageUrl\"\r\n alt=\"Error Image\"\r\n width=\"256\"\r\n height=\"256\"\r\n />\r\n </div>\r\n <div class=\"errorPage-inner-right\">\r\n <div class=\"errorPage-heading\">{{ errorConfig.title }}</div>\r\n <div class=\"errorPage-text\">{{ errorConfig.description }}</div>\r\n <div class=\"errorPage-details\">\r\n {{ errorConfig.details }}\r\n <a href=\"mailto:{help@v-comply.com}\">{{ errorConfig.email }}</a>\r\n {{ errorConfig.support }}.\r\n </div>\r\n <button class=\"errorPage-btn\" (click)=\"redirectToSupport()\">\r\n {{ errorConfig.buttonText }} <i class=\"icons\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n styleUrls: ['./unauthorized.component.less'],\r\n})\r\nexport class UnauthorizedComponent {\r\n errorConfig = ERROR_CONFIG.UNAUTHORIZED;\r\n VcomplyImage = VCOMPLY_IMAGE_URL;\r\n\r\n redirectToSupport() {}\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\n\r\nimport { GlobalErrorService } from './shared/services/global-error.service';\r\n\r\nimport { ErrorStatusCode } from './shared/types/global-error.types';\r\n\r\n@Component({\r\n selector: 'lib-vc-error-handlers',\r\n template: `\r\n <lib-vc-error-session-expired\r\n *ngIf=\"sessionExpired\"\r\n ></lib-vc-error-session-expired>\r\n <lib-vc-error-unauthorized *ngIf=\"unauthorized\"></lib-vc-error-unauthorized>\r\n `,\r\n})\r\nexport class VcErrorHandlersComponent {\r\n unauthorized: boolean = false;\r\n sessionExpired: boolean = false;\r\n networkUnavailable: boolean = false;\r\n\r\n constructor(private errorService: GlobalErrorService) {\r\n this.subscribeGlobalError();\r\n }\r\n\r\n private subscribeGlobalError() {\r\n this.errorService.globalError$.subscribe((error: HttpErrorResponse) => {\r\n this.handleError(error);\r\n });\r\n }\r\n\r\n private handleError(error: HttpErrorResponse) {\r\n if (error.status === ErrorStatusCode.Unauthenticated) {\r\n this.sessionExpired = true;\r\n } else if (error.status === ErrorStatusCode.UnauthorizedAccess) {\r\n this.unauthorized = true;\r\n } else if (error.status === ErrorStatusCode.NetworkUnavailable) {\r\n this.networkUnavailable = true;\r\n }\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport {\r\n ERROR_CONFIG,\r\n VCOMPLY_IMAGE_URL,\r\n} from '../../constants/error-handling.constants';\r\n\r\n@Component({\r\n selector: 'lib-vc-error-page-not-found',\r\n template: `\r\n <div class=\"errorPage\">\r\n <div class=\"errorPage-top\">\r\n <img\r\n src=\"https://cdn.v-comply.com/logo/prod/v-logo.svg\"\r\n alt=\"VComply\"\r\n width=\"24\"\r\n height=\"24\"\r\n />\r\n </div>\r\n <div class=\"errorPage-container\">\r\n <div class=\"errorPage-inner\">\r\n <div class=\"errorPage-inner-image\">\r\n <img\r\n [src]=\"errorConfig.imageUrl\"\r\n alt=\"Error Image\"\r\n width=\"256\"\r\n height=\"256\"\r\n />\r\n </div>\r\n <div class=\"errorPage-inner-right\">\r\n <div class=\"errorPage-heading\">{{ errorConfig.title }}</div>\r\n <div class=\"errorPage-text\">{{ errorConfig.description }}</div>\r\n <div class=\"errorPage-details\">{{ errorConfig.details }}</div>\r\n <button class=\"errorPage-btn\" (click)=\"redirectToHome()\">\r\n {{ errorConfig.buttonText }} <i class=\"icons\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n styleUrls: ['./page-not-found.component.less'],\r\n})\r\nexport class PageNotFoundComponent {\r\n errorConfig = ERROR_CONFIG.PAGE_NOT_FOUND;\r\n VcomplyImage = VCOMPLY_IMAGE_URL;\r\n\r\n redirectToHome() {\r\n // Redirect to home page\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-chunk-unavailable',\r\n templateUrl: './chunk-unavailable.component.html',\r\n styleUrls: ['./chunk-unavailable.component.css']\r\n})\r\nexport class ChunkUnavailableComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<p>chunk-unavailable works!</p>\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-server-error',\r\n templateUrl: './server-error.component.html',\r\n styleUrls: ['./server-error.component.css']\r\n})\r\nexport class ServerErrorComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<p>server-error works!</p>\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SnackBarService {\r\n public snackbarSubject = new Subject <any>();\r\n public snackbarState = this.snackbarSubject.asObservable();\r\n constructor() {}\r\n\r\n show(message: string, type?:'success'|'warning'|'info'|'alert'|'error') {\r\n this.snackbarSubject.next({\r\n show: true,\r\n message,\r\n icon:type,\r\n });\r\n }\r\n\r\n hide(){\r\n this.snackbarSubject.next({\r\n show: false,\r\n message: '',\r\n icon: '',\r\n });\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { SnackBarService } from '../snack-bar.service';\r\n\r\n@Component({\r\n selector: 'app-snack-bar',\r\n templateUrl: './snack-bar.component.html',\r\n styleUrls: ['./snack-bar.component.less'],\r\n})\r\nexport class SnackBarComponent implements OnInit, OnDestroy {\r\n show = false;\r\n message = '--';\r\n icon = '';\r\n type = 'alert';\r\n icons: any = {\r\n success: '',\r\n warning: '',\r\n info: '',\r\n alert: '',\r\n error: '',\r\n };\r\n snackbarSubscription!: Subscription;\r\n constructor(private snackbarService: SnackBarService) {}\r\n\r\n ngOnInit(): void {\r\n this.snackbarSubscription = this.snackbarService.snackbarState.subscribe(\r\n (state) => {\r\n if (state.icon && Object.keys(this.icons).includes(state?.icon)) {\r\n this.icon = this.icons[state.icon];\r\n this.type = state?.icon;\r\n }\r\n this.message = state.message;\r\n this.show = state.show;\r\n this.setAutoClose();\r\n }\r\n );\r\n }\r\n\r\n setAutoClose() {\r\n setTimeout(() => {\r\n this.show = false;\r\n this.close();\r\n }, 3000);\r\n }\r\n close() {\r\n this.show = false;\r\n this.snackbarService.hide();\r\n }\r\n ngOnDestroy() {\r\n this.snackbarSubscription.unsubscribe();\r\n }\r\n}\r\n","<div class=\"workflow-snackbar\" *ngIf=\"show\">\r\n <div class=\"workflow-snackbar-inner\">\r\n <div class=\"workflow-snackbarText\">\r\n <!--  -->\r\n <i class=\"icons\" [class]=\"type\" [innerHTML]=\"icon\"></i> <span [innerHTML]=\"message\">{{ message }}</span>\r\n </div>\r\n <button (click)=\"close()\">[ <span>Close</span> ]</button>\r\n </div>\r\n </div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SnackBarComponent } from './snack-bar/snack-bar.component';\r\n\r\n@NgModule({\r\n declarations: [SnackBarComponent],\r\n imports: [CommonModule],\r\n exports: [SnackBarComponent],\r\n})\r\nexport class SnackBarModule {}\r\n","export class Configurations {\r\n public sentryConfig: any;\r\n\r\n constructor() {\r\n this.sentryConfig = {};\r\n }\r\n}\r\n","import { ErrorHandler, Injectable, Optional } from '@angular/core';\r\nimport * as Sentry from '@sentry/angular-ivy';\r\nimport { Configurations } from '../../configuration';\r\nimport { AuthorizerService } from '@vcomply/authorizer';\r\n\r\n@Injectable()\r\nexport class SentryErrorHandler implements ErrorHandler {\r\n constructor(\r\n private authorizerService: AuthorizerService,\r\n @Optional() config?: Configurations\r\n ) {\r\n if (config?.sentryConfig) {\r\n const SENTRY_CONFIG = config.sentryConfig;\r\n Sentry.init({\r\n dsn: SENTRY_CONFIG?.DSN,\r\n integrations: [\r\n new Sentry.BrowserTracing({\r\n tracePropagationTargets: SENTRY_CONFIG.ALLOW_ORIGIN,\r\n routingInstrumentation: Sentry.routingInstrumentation,\r\n }),\r\n ],\r\n tracesSampleRate: SENTRY_CONFIG.TRACES_SAMPLE_RATE,\r\n replaysSessionSampleRate: SENTRY_CONFIG.REPLAY_SESSION_SAMPLE_RATE,\r\n replaysOnErrorSampleRate: SENTRY_CONFIG.REPLAY_ON_ERROR_SAMPLE_RATE,\r\n });\r\n Sentry.setUser({ userDetails: this.authorizerService.getUser() });\r\n }\r\n }\r\n\r\n handleError(error: any) {\r\n const ERROR = error?.originalError || error;\r\n this.handleChunkError(ERROR);\r\n Sentry.captureException(ERROR);\r\n }\r\n\r\n handleChunkError(error: Error) {\r\n const chunkFailedMessage = /Loading chunk [\\d]+ failed/;\r\n if (chunkFailedMessage.test(error?.message)) {\r\n window.location.reload();\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpErrorResponse,\r\n} from '@angular/common/http';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError, timeout } from 'rxjs/operators';\r\n\r\nimport { GlobalErrorService } from '../services/global-error.service';\r\n\r\nimport { API_TIMEOUT_TIME } from '../constants/error-handling.constants';\r\n\r\n@Injectable()\r\nexport class HttpReqInterceptor implements HttpInterceptor {\r\n constructor(private errorService: GlobalErrorService) {}\r\n\r\n intercept(\r\n req: HttpRequest<any>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<any>> {\r\n return next.handle(req).pipe(\r\n timeout(API_TIMEOUT_TIME),\r\n catchError((error: HttpErrorResponse) => {\r\n this.errorService.handleError(error, req);\r\n\r\n return throwError(error);\r\n })\r\n );\r\n }\r\n}\r\n","import {\r\n ErrorHandler,\r\n InjectionToken,\r\n ModuleWithProviders,\r\n NgModule,\r\n} from '@angular/core';\r\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\r\n\r\nimport { PageNotFoundComponent } from './shared/components/page-not-found/page-not-found.component';\r\nimport { VcErrorHandlersComponent } from './vc-error-handlers.component';\r\n\r\nimport { DialogModule } from './ui-kit/dialog/dialog.module';\r\nimport { SnackBarModule } from './ui-kit/snack-bar/snack-bar.module';\r\n\r\nimport { BrowserOptions } from '@sentry/browser';\r\nimport { GlobalErrorHandler } from './shared/errorhandler/chunk-error.handler';\r\nimport { SentryErrorHandler } from './shared/errorhandler/sentry-error.handler';\r\nimport { Configurations } from './configuration';\r\nimport { UnauthorizedComponent } from './shared/components/unauthorized/unauthorized.component';\r\nimport { SessionExpiredComponent } from './shared/components/session-expired/session-expired.component';\r\nimport { ChunkUnavailableComponent } from './shared/components/chunk-unavailable/chunk-unavailable.component';\r\nimport { ServerErrorComponent } from './shared/components/server-error/server-error.component';\r\nimport { SessionExpiredModalComponent } from './shared/components/session-expired-modal/session-expired-modal.component';\r\n\r\nimport { HttpReqInterceptor } from './shared/interceptors/http.interceptor';\r\n\r\nexport const FOR_ROOT_SENTRY_OPTIONS_TOKEN = new InjectionToken<BrowserOptions>(\r\n 'forRoot() SentryErrorHandler options'\r\n);\r\n\r\n@NgModule({\r\n declarations: [\r\n VcErrorHandlersComponent,\r\n PageNotFoundComponent,\r\n UnauthorizedComponent,\r\n SessionExpiredComponent,\r\n ChunkUnavailableComponent,\r\n ServerErrorComponent,\r\n SessionExpiredModalComponent,\r\n ],\r\n imports: [DialogModule, SnackBarModule],\r\n exports: [\r\n VcErrorHandlersComponent,\r\n PageNotFoundComponent,\r\n UnauthorizedComponent,\r\n SessionExpiredComponent,\r\n ChunkUnavailableComponent,\r\n ServerErrorComponent,\r\n SessionExpiredModalComponent,\r\n ],\r\n providers: [\r\n { provide: ErrorHandler, useClass: SentryErrorHandler },\r\n { provide: HTTP_INTERCEPTORS, useClass: HttpReqInterceptor, multi: true },\r\n ],\r\n bootstrap: [VcErrorHandlersComponent],\r\n})\r\nexport class VcErrorHandlersModule {\r\n public static forRoot(\r\n environmentConfig: Configurations\r\n ): ModuleWithProviders<VcErrorHandlersModule> {\r\n return {\r\n ngModule: VcErrorHandlersModule,\r\n providers: [{ provide: Configurations, useValue: environmentConfig }],\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of vc-error-handlers\r\n */\r\n\r\nexport * from './lib/vc-error-handlers.service';\r\nexport * from './lib/shared/services/global-error.service';\r\nexport * from './lib/shared/services/auth.service';\r\nexport * from './lib/shared/services/router.service';\r\nexport * from './lib/vc-error-handlers.component';\r\nexport * from './lib/shared/components/page-not-found/page-not-found.component';\r\nexport * from './lib/shared/components/unauthorized/unauthorized.component';\r\nexport * from './lib/shared/components/chunk-unavailable/chunk-unavailable.component';\r\nexport * from './lib/shared/components/server-error/server-error.component';\r\nexport * from './lib/shared/components/session-expired/session-expired.component';\r\nexport * from './lib/shared/components/session-expired-modal/session-expired-modal.component';\r\nexport * from './lib/vc-error-handlers.module';\r\nexport * from './lib/shared/interceptors/http.interceptor';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,sBAAsB;IAEjC,iBAAiB;;mHAFN,sBAAsB;uHAAtB,sBAAsB,cAFrB,MAAM;2FAEP,sBAAsB;kBAHlC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;ACED,IAAY,eAgBX;AAhBD,WAAY,eAAe;I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AE,cAAc,CAAC;oBACvC,OAAO,EAAE;wBACP,wBAAwB;wBACxB,qBAAqB;wBACrB,qBAAqB;wBACrB,uBAAuB;wBACvB,yBAAyB;wBACzB,oBAAoB;wBACpB,4BAA4B;qBAC7B;oBACD,SAAS,EAAE;wBACT,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE;wBACvD,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;qBAC1E;oBACD,SAAS,EAAE,CAAC,wBAAwB,CAAC;iBACtC;;;ACvDD;;;;ACAA;;;;;;"}
|
|
@@ -10,5 +10,5 @@ export declare class PageNotFoundComponent {
|
|
|
10
10
|
VcomplyImage: string;
|
|
11
11
|
redirectToHome(): void;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<PageNotFoundComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PageNotFoundComponent, "lib-not-found", never, {}, {}, never, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageNotFoundComponent, "lib-vc-error-page-not-found", never, {}, {}, never, never>;
|
|
14
14
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AuthService } from '../../services/auth.service';
|
|
2
3
|
import { DialogService } from '../../../ui-kit/dialog/dialog.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class SessionExpiredComponent implements OnInit {
|
|
6
|
+
private authService;
|
|
5
7
|
private dialogService;
|
|
6
8
|
errorConfig: {
|
|
7
9
|
heading: string;
|
|
8
10
|
description: string;
|
|
9
11
|
buttonText: string;
|
|
10
12
|
};
|
|
11
|
-
constructor(dialogService: DialogService);
|
|
13
|
+
constructor(authService: AuthService, dialogService: DialogService);
|
|
12
14
|
ngOnInit(): void;
|
|
15
|
+
private openSessionExpiredModal;
|
|
13
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SessionExpiredComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SessionExpiredComponent, "lib-session-expired", never, {}, {}, never, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SessionExpiredComponent, "lib-vc-error-session-expired", never, {}, {}, never, never>;
|
|
15
18
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { DialogConfig } from '../../../ui-kit/dialog/dialog-config';
|
|
2
|
-
import { DialogData } from '../../types/global-error.types';
|
|
3
|
-
import { AuthService } from '../../services/auth.service';
|
|
4
2
|
import { RouterService } from '../../services/router.service';
|
|
3
|
+
import { DialogData } from '../../types/global-error.types';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class SessionExpiredModalComponent {
|
|
7
6
|
private dialogConfig;
|
|
8
|
-
private authService;
|
|
9
7
|
private routerService;
|
|
10
8
|
errorConfig: {
|
|
11
9
|
heading: string;
|
|
@@ -14,9 +12,8 @@ export declare class SessionExpiredModalComponent {
|
|
|
14
12
|
};
|
|
15
13
|
animation: boolean;
|
|
16
14
|
data: DialogData;
|
|
17
|
-
constructor(dialogConfig: DialogConfig,
|
|
18
|
-
ngOnInit(): void;
|
|
15
|
+
constructor(dialogConfig: DialogConfig, routerService: RouterService);
|
|
19
16
|
onContinueAction(): void;
|
|
20
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<SessionExpiredModalComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SessionExpiredModalComponent, "lib-session-expired-modal", never, {}, {}, never, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SessionExpiredModalComponent, "lib-vc-error-session-expired-modal", never, {}, {}, never, never>;
|
|
22
19
|
}
|
|
@@ -12,5 +12,5 @@ export declare class UnauthorizedComponent {
|
|
|
12
12
|
VcomplyImage: string;
|
|
13
13
|
redirectToSupport(): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "lib-unauthorized", never, {}, {}, never, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "lib-vc-error-unauthorized", never, {}, {}, never, never>;
|
|
16
16
|
}
|