vc-error-handlers 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/esm2022/lib/configuration.mjs +2 -1
  2. package/esm2022/lib/shared/components/page-not-found/page-not-found.component.mjs +52 -42
  3. package/esm2022/lib/shared/components/server-error/server-error.component.mjs +2 -2
  4. package/esm2022/lib/shared/components/unauthorized/unauthorized.component.mjs +55 -26
  5. package/esm2022/lib/shared/constants/api-config.constants.mjs +8 -1
  6. package/esm2022/lib/shared/constants/error-handling.constants.mjs +5 -2
  7. package/esm2022/lib/shared/interceptors/http.interceptor.mjs +14 -21
  8. package/esm2022/lib/shared/services/global-error.service.mjs +9 -10
  9. package/esm2022/lib/shared/services/router.service.mjs +31 -2
  10. package/esm2022/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.mjs +2 -2
  11. package/esm2022/lib/ui-kit/tooltip/tooltip.directive.mjs +156 -0
  12. package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +18 -0
  13. package/esm2022/lib/vc-error-handlers.module.mjs +34 -13
  14. package/fesm2022/vc-error-handlers.mjs +396 -143
  15. package/fesm2022/vc-error-handlers.mjs.map +1 -1
  16. package/lib/configuration.d.ts +1 -0
  17. package/lib/shared/components/page-not-found/page-not-found.component.d.ts +5 -8
  18. package/lib/shared/components/unauthorized/unauthorized.component.d.ts +7 -1
  19. package/lib/shared/constants/error-handling.constants.d.ts +3 -0
  20. package/lib/shared/interceptors/http.interceptor.d.ts +1 -3
  21. package/lib/shared/services/router.service.d.ts +4 -0
  22. package/lib/ui-kit/tooltip/tooltip.directive.d.ts +27 -0
  23. package/lib/ui-kit/tooltip/tooltip.module.d.ts +8 -0
  24. package/lib/vc-error-handlers.module.d.ts +4 -3
  25. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  export declare class Configurations {
2
2
  sentryConfig: any;
3
3
  envConfig: any;
4
+ isErrorInterceptorEnabled?: boolean;
4
5
  constructor();
5
6
  }
@@ -1,7 +1,9 @@
1
1
  import { ActivatedRoute } from '@angular/router';
2
+ import { RouterService } from '../../services/router.service';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class PageNotFoundComponent {
4
5
  private route;
6
+ private routerService;
5
7
  errorConfig: {
6
8
  imageUrl: string;
7
9
  title: string;
@@ -15,15 +17,10 @@ export declare class PageNotFoundComponent {
15
17
  VCOMPLY_LOGO: string;
16
18
  };
17
19
  currentYear: number;
18
- redirectionUrl: {
19
- COMPLIANCE_DASHBOARD: string;
20
- RISK_DASHBOARD: string;
21
- POLICY_DASHBOARD: string;
22
- ISSUE_DASHBOARD: string;
23
- };
24
20
  organisationName: string;
25
- constructor(route: ActivatedRoute);
26
- redirectToHome(): void;
21
+ defaultURL: string;
22
+ constructor(route: ActivatedRoute, routerService: RouterService);
23
+ redirectToDashboard(): void;
27
24
  static ɵfac: i0.ɵɵFactoryDeclaration<PageNotFoundComponent, never>;
28
25
  static ɵcmp: i0.ɵɵComponentDeclaration<PageNotFoundComponent, "lib-vc-error-page-not-found", never, {}, {}, never, never, false, never>;
29
26
  }
@@ -1,5 +1,10 @@
1
+ import { ActivatedRoute } from '@angular/router';
2
+ import { RouterService } from '../../services/router.service';
1
3
  import * as i0 from "@angular/core";
2
4
  export declare class UnauthorizedComponent {
5
+ private route;
6
+ private routerService;
7
+ constructor(route: ActivatedRoute, routerService: RouterService);
3
8
  currentYear: number;
4
9
  errorConfig: {
5
10
  imageUrl: string;
@@ -17,7 +22,8 @@ export declare class UnauthorizedComponent {
17
22
  VCOMPLY_LOGO: string;
18
23
  };
19
24
  organisationName: string;
20
- redirectToSupport(): void;
25
+ defaultURL: string;
26
+ redirectToDashboard(): void;
21
27
  static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
22
28
  static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "lib-vc-error-unauthorized", never, {}, {}, never, never, false, never>;
23
29
  }
@@ -54,11 +54,14 @@ export declare const REDIRECTION_URL: {
54
54
  RISK_DASHBOARD: string;
55
55
  POLICY_DASHBOARD: string;
56
56
  ISSUE_DASHBOARD: string;
57
+ CASEOPS_DASHBOARD: string;
58
+ DEFAULT: string;
57
59
  };
58
60
  export declare const MODULE_NAMES: {
59
61
  RISK: string;
60
62
  POLICY: string;
61
63
  ISSUE: string;
64
+ CASEOPS: string;
62
65
  };
63
66
  export declare const MODAL_ERROR_TYPES: {
64
67
  CHUNK_NOT_FOUND: string;
@@ -1,12 +1,10 @@
1
1
  import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { GlobalErrorService } from '../services/global-error.service';
4
- import { FeatureFlagService } from '../../featureFlag/feature-flag.service';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class HttpReqInterceptor implements HttpInterceptor {
7
6
  private errorService;
8
- private featureFlagService;
9
- constructor(errorService: GlobalErrorService, featureFlagService: FeatureFlagService);
7
+ constructor(errorService: GlobalErrorService);
10
8
  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
11
9
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpReqInterceptor, never>;
12
10
  static ɵprov: i0.ɵɵInjectableDeclaration<HttpReqInterceptor>;
@@ -1,6 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class RouterService {
3
+ baseUrl: string;
4
+ constructor();
5
+ private setBaseUrl;
3
6
  redirectToLogin(): void;
7
+ redirectToHome(module_name: string): void;
4
8
  static ɵfac: i0.ɵɵFactoryDeclaration<RouterService, never>;
5
9
  static ɵprov: i0.ɵɵInjectableDeclaration<RouterService>;
6
10
  }
@@ -0,0 +1,27 @@
1
+ import { ElementRef, Renderer2, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ToolTipDirective implements OnInit {
4
+ private el;
5
+ private renderer;
6
+ tooltipTitle: string;
7
+ placement: string;
8
+ type: any;
9
+ tooltipMandatory: boolean;
10
+ showTooltip: boolean;
11
+ animate: boolean;
12
+ tooltip: HTMLElement;
13
+ offset: number;
14
+ constructor(el: ElementRef, renderer: Renderer2);
15
+ ngOnInit(): void;
16
+ onMouseEnter(): void;
17
+ onMouseOver(): void;
18
+ onMouseLeave(): void;
19
+ onMouseOut(): void;
20
+ onClick(): void;
21
+ show(): void;
22
+ hide(): void;
23
+ create(): void;
24
+ setPosition(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToolTipDirective, never>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToolTipDirective, "[arTooltip]", never, { "tooltipTitle": { "alias": "arTooltip"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "type": { "alias": "type"; "required": false; }; "tooltipMandatory": { "alias": "tooltipMandatory"; "required": false; }; "showTooltip": { "alias": "showTooltip"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, {}, never, never, false, never>;
27
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tooltip.directive";
3
+ import * as i2 from "@angular/common";
4
+ export declare class TooltipModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TooltipModule, [typeof i1.ToolTipDirective], [typeof i2.CommonModule], [typeof i1.ToolTipDirective]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<TooltipModule>;
8
+ }
@@ -13,14 +13,15 @@ import * as i7 from "./shared/components/error-modal/error-modal.component";
13
13
  import * as i8 from "./shared/components/component-level-server-error/component-level-server-error.component";
14
14
  import * as i9 from "@angular/common";
15
15
  import * as i10 from "./ui-kit/dialog/dialog.module";
16
- import * as i11 from "./ui-kit/snack-bar/snack-bar.module";
17
- import * as i12 from "./featureFlag/feature-flag.module";
16
+ import * as i11 from "./featureFlag/feature-flag.module";
17
+ import * as i12 from "./ui-kit/snack-bar/snack-bar.module";
18
+ import * as i13 from "./ui-kit/tooltip/tooltip.module";
18
19
  export declare const FOR_ROOT_SENTRY_OPTIONS_TOKEN: InjectionToken<BrowserOptions>;
19
20
  export declare class VcErrorHandlersModule {
20
21
  private loadConfig;
21
22
  constructor(loadConfig: FeatureFlagService);
22
23
  static forRoot(environmentConfig: Configurations): ModuleWithProviders<VcErrorHandlersModule>;
23
24
  static ɵfac: i0.ɵɵFactoryDeclaration<VcErrorHandlersModule, never>;
24
- static ɵmod: i0.ɵɵNgModuleDeclaration<VcErrorHandlersModule, [typeof i1.VcErrorHandlersComponent, typeof i2.PageNotFoundComponent, typeof i3.UnauthorizedComponent, typeof i4.SessionExpiredComponent, typeof i5.ChunkUnavailableComponent, typeof i6.ServerErrorComponent, typeof i7.ErrorModalComponent, typeof i8.ComponentLevelServerErrorComponent], [typeof i9.CommonModule, typeof i10.DialogModule, typeof i11.SnackBarModule, typeof i12.FeatureFlagModule, typeof i9.NgOptimizedImage], [typeof i1.VcErrorHandlersComponent, typeof i2.PageNotFoundComponent, typeof i3.UnauthorizedComponent, typeof i4.SessionExpiredComponent, typeof i5.ChunkUnavailableComponent, typeof i6.ServerErrorComponent, typeof i7.ErrorModalComponent, typeof i8.ComponentLevelServerErrorComponent]>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VcErrorHandlersModule, [typeof i1.VcErrorHandlersComponent, typeof i2.PageNotFoundComponent, typeof i3.UnauthorizedComponent, typeof i4.SessionExpiredComponent, typeof i5.ChunkUnavailableComponent, typeof i6.ServerErrorComponent, typeof i7.ErrorModalComponent, typeof i8.ComponentLevelServerErrorComponent], [typeof i9.CommonModule, typeof i10.DialogModule, typeof i11.FeatureFlagModule, typeof i9.NgOptimizedImage, typeof i12.SnackBarModule, typeof i13.TooltipModule], [typeof i1.VcErrorHandlersComponent, typeof i2.PageNotFoundComponent, typeof i3.UnauthorizedComponent, typeof i4.SessionExpiredComponent, typeof i5.ChunkUnavailableComponent, typeof i6.ServerErrorComponent, typeof i7.ErrorModalComponent, typeof i8.ComponentLevelServerErrorComponent]>;
25
26
  static ɵinj: i0.ɵɵInjectorDeclaration<VcErrorHandlersModule>;
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vc-error-handlers",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": " 13.x || 14.x || 15.x || 16.x || 17.x || 18.x || 19.x || 20.x",
6
6
  "@angular/core": "13.x || 14.x || 15.x || 16.x || 17.x || 18.x || 19.x || 20.x"