vc-error-handlers 0.1.7 → 0.1.9

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 (39) hide show
  1. package/esm2020/lib/shared/components/chunk-unavailable/chunk-unavailable.component.mjs +26 -6
  2. package/esm2020/lib/shared/components/error-modal/error-modal.component.mjs +61 -0
  3. package/esm2020/lib/shared/components/page-not-found/page-not-found.component.mjs +27 -25
  4. package/esm2020/lib/shared/components/server-error/server-error.component.mjs +63 -6
  5. package/esm2020/lib/shared/components/session-expired/session-expired.component.mjs +11 -11
  6. package/esm2020/lib/shared/components/unauthorized/unauthorized.component.mjs +21 -22
  7. package/esm2020/lib/shared/constants/api-config.constants.mjs +43 -0
  8. package/esm2020/lib/shared/constants/error-handling.constants.mjs +19 -2
  9. package/esm2020/lib/shared/errorhandler/sentry-error.handler.mjs +15 -10
  10. package/esm2020/lib/shared/interceptors/http.interceptor.mjs +8 -3
  11. package/esm2020/lib/shared/services/global-error.service.mjs +115 -5
  12. package/esm2020/lib/shared/services/util.service.mjs +21 -0
  13. package/esm2020/lib/shared/types/global-error.types.mjs +1 -1
  14. package/esm2020/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.mjs +1 -2
  15. package/esm2020/lib/vc-error-handlers.component.mjs +65 -10
  16. package/esm2020/lib/vc-error-handlers.module.mjs +6 -6
  17. package/esm2020/public-api.mjs +2 -2
  18. package/fesm2015/vc-error-handlers.mjs +552 -223
  19. package/fesm2015/vc-error-handlers.mjs.map +1 -1
  20. package/fesm2020/vc-error-handlers.mjs +550 -223
  21. package/fesm2020/vc-error-handlers.mjs.map +1 -1
  22. package/lib/shared/components/chunk-unavailable/chunk-unavailable.component.d.ts +10 -2
  23. package/lib/shared/components/error-modal/error-modal.component.d.ts +17 -0
  24. package/lib/shared/components/page-not-found/page-not-found.component.d.ts +5 -1
  25. package/lib/shared/components/server-error/server-error.component.d.ts +12 -5
  26. package/lib/shared/components/session-expired/session-expired.component.d.ts +1 -3
  27. package/lib/shared/components/unauthorized/unauthorized.component.d.ts +3 -1
  28. package/lib/shared/constants/api-config.constants.d.ts +19 -0
  29. package/lib/shared/constants/error-handling.constants.d.ts +18 -1
  30. package/lib/shared/errorhandler/sentry-error.handler.d.ts +5 -3
  31. package/lib/shared/services/global-error.service.d.ts +20 -1
  32. package/lib/shared/services/util.service.d.ts +6 -0
  33. package/lib/shared/types/global-error.types.d.ts +1 -1
  34. package/lib/vc-error-handlers.component.d.ts +15 -2
  35. package/lib/vc-error-handlers.module.d.ts +2 -2
  36. package/package.json +1 -1
  37. package/public-api.d.ts +1 -1
  38. package/esm2020/lib/shared/components/session-expired-modal/session-expired-modal.component.mjs +0 -48
  39. package/lib/shared/components/session-expired-modal/session-expired-modal.component.d.ts +0 -18
@@ -1,48 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { ERROR_CONFIG } from '../../constants/error-handling.constants';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "../../../ui-kit/dialog/dialog-config";
5
- import * as i2 from "../../services/router.service";
6
- export class SessionExpiredModalComponent {
7
- constructor(dialogConfig, routerService) {
8
- this.dialogConfig = dialogConfig;
9
- this.routerService = routerService;
10
- this.errorConfig = ERROR_CONFIG.SESSION_EXPIRED;
11
- this.data = {
12
- header: 'Message',
13
- description: 'Description',
14
- buttonText: 'Click Action',
15
- };
16
- this.data = this.dialogConfig.data;
17
- }
18
- onContinueAction() {
19
- this.routerService.redirectToLogin();
20
- }
21
- }
22
- SessionExpiredModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredModalComponent, deps: [{ token: i1.DialogConfig }, { token: i2.RouterService }], target: i0.ɵɵFactoryTarget.Component });
23
- 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">
24
- <div class="error-dialog-box-top">{{ errorConfig.heading }}</div>
25
- <div class="error-dialog-box-mid">
26
- {{ errorConfig.description }}
27
- </div>
28
- <div class="error-dialog-box-bottom">
29
- <button (click)="onContinueAction()" class="logIn-btn">
30
- {{ errorConfig.buttonText }}
31
- </button>
32
- </div>
33
- </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"] });
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SessionExpiredModalComponent, decorators: [{
35
- type: Component,
36
- args: [{ selector: 'lib-vc-error-session-expired-modal', template: ` <div class="error-dialog-box">
37
- <div class="error-dialog-box-top">{{ errorConfig.heading }}</div>
38
- <div class="error-dialog-box-mid">
39
- {{ errorConfig.description }}
40
- </div>
41
- <div class="error-dialog-box-bottom">
42
- <button (click)="onContinueAction()" class="logIn-btn">
43
- {{ errorConfig.buttonText }}
44
- </button>
45
- </div>
46
- </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"] }]
47
- }], ctorParameters: function () { return [{ type: i1.DialogConfig }, { type: i2.RouterService }]; } });
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi1leHBpcmVkLW1vZGFsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZjLWVycm9yLWhhbmRsZXJzL3NyYy9saWIvc2hhcmVkL2NvbXBvbmVudHMvc2Vzc2lvbi1leHBpcmVkLW1vZGFsL3Nlc3Npb24tZXhwaXJlZC1tb2RhbC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQU8xQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sMENBQTBDLENBQUM7Ozs7QUFpQnhFLE1BQU0sT0FBTyw0QkFBNEI7SUFTdkMsWUFDVSxZQUEwQixFQUMxQixhQUE0QjtRQUQ1QixpQkFBWSxHQUFaLFlBQVksQ0FBYztRQUMxQixrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQVZ0QyxnQkFBVyxHQUFHLFlBQVksQ0FBQyxlQUFlLENBQUM7UUFFM0MsU0FBSSxHQUFlO1lBQ2pCLE1BQU0sRUFBRSxTQUFTO1lBQ2pCLFdBQVcsRUFBRSxhQUFhO1lBQzFCLFVBQVUsRUFBRSxjQUFjO1NBQzNCLENBQUM7UUFNQSxJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDO0lBQ3JDLENBQUM7SUFFTSxnQkFBZ0I7UUFDckIsSUFBSSxDQUFDLGFBQWEsQ0FBQyxlQUFlLEVBQUUsQ0FBQztJQUN2Qy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21cIj5cclxuICAgICAgPGJ1dHRvbiAoY2xpY2spPVwib25Db250aW51ZUFjdGlvbigpXCIgY2xhc3M9XCJsb2dJbi1idG5cIj5cclxuICAgICAgICB7eyBlcnJvckNvbmZpZy5idXR0b25UZXh0IH19XHJcbiAgICAgIDwvYnV0dG9uPlxyXG4gICAgPC9kaXY+XHJcbiAgPC9kaXY+YCxcclxuICBzdHlsZVVybHM6IFsnLi9zZXNzaW9uLWV4cGlyZWQtbW9kYWwuY29tcG9uZW50Lmxlc3MnXSxcclxufSlcclxuZXhwb3J0IGNsYXNzIFNlc3Npb25FeHBpcmVkTW9kYWxDb21wb25lbnQge1xyXG4gIGVycm9yQ29uZmlnID0gRVJST1JfQ09ORklHLlNFU1NJT05fRVhQSVJFRDtcclxuXHJcbiAgZGF0YTogRGlhbG9nRGF0YSA9IHtcclxuICAgIGhlYWRlcjogJ01lc3NhZ2UnLFxyXG4gICAgZGVzY3JpcHRpb246ICdEZXNjcmlwdGlvbicsXHJcbiAgICBidXR0b25UZXh0OiAnQ2xpY2sgQWN0aW9uJyxcclxuICB9O1xyXG5cclxuICBjb25zdHJ1Y3RvcihcclxuICAgIHByaXZhdGUgZGlhbG9nQ29uZmlnOiBEaWFsb2dDb25maWcsXHJcbiAgICBwcml2YXRlIHJvdXRlclNlcnZpY2U6IFJvdXRlclNlcnZpY2VcclxuICApIHtcclxuICAgIHRoaXMuZGF0YSA9IHRoaXMuZGlhbG9nQ29uZmlnLmRhdGE7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgb25Db250aW51ZUFjdGlvbigpIHtcclxuICAgIHRoaXMucm91dGVyU2VydmljZS5yZWRpcmVjdFRvTG9naW4oKTtcclxuICB9XHJcbn1cclxuIl19
@@ -1,18 +0,0 @@
1
- import { DialogConfig } from '../../../ui-kit/dialog/dialog-config';
2
- import { RouterService } from '../../services/router.service';
3
- import { DialogData } from '../../types/global-error.types';
4
- import * as i0 from "@angular/core";
5
- export declare class SessionExpiredModalComponent {
6
- private dialogConfig;
7
- private routerService;
8
- errorConfig: {
9
- heading: string;
10
- description: string;
11
- buttonText: string;
12
- };
13
- data: DialogData;
14
- constructor(dialogConfig: DialogConfig, routerService: RouterService);
15
- onContinueAction(): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<SessionExpiredModalComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<SessionExpiredModalComponent, "lib-vc-error-session-expired-modal", never, {}, {}, never, never>;
18
- }