vc-error-handlers 0.1.97 → 0.1.98
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/featureFlag/feature-flag.module.mjs +1 -1
- package/esm2020/lib/shared/components/chunk-unavailable/chunk-unavailable.component.mjs +4 -3
- package/esm2020/lib/shared/components/component-level-server-error/component-level-server-error.component.mjs +5 -4
- package/esm2020/lib/shared/components/error-modal/error-modal.component.mjs +14 -11
- package/esm2020/lib/shared/components/page-not-found/page-not-found.component.mjs +25 -14
- package/esm2020/lib/shared/components/server-error/server-error.component.mjs +17 -6
- package/esm2020/lib/shared/components/session-expired/session-expired.component.mjs +4 -3
- package/esm2020/lib/shared/components/unauthorized/unauthorized.component.mjs +26 -10
- package/esm2020/lib/shared/constants/api-config.constants.mjs +7 -14
- package/esm2020/lib/shared/constants/error-handling.constants.mjs +15 -2
- package/esm2020/lib/shared/errorhandler/sentry-error.handler.mjs +6 -9
- package/esm2020/lib/shared/interceptors/http.interceptor.mjs +3 -3
- package/esm2020/lib/shared/services/global-error.service.mjs +24 -50
- package/esm2020/lib/shared/services/util.service.mjs +29 -2
- package/esm2020/lib/shared/types/global-error.types.mjs +1 -1
- package/esm2020/lib/vc-error-handlers.component.mjs +9 -12
- package/esm2020/public-api.mjs +1 -2
- package/fesm2015/vc-error-handlers.mjs +167 -138
- package/fesm2015/vc-error-handlers.mjs.map +1 -1
- package/fesm2020/vc-error-handlers.mjs +167 -138
- package/fesm2020/vc-error-handlers.mjs.map +1 -1
- package/lib/shared/components/chunk-unavailable/chunk-unavailable.component.d.ts +4 -0
- package/lib/shared/components/component-level-server-error/component-level-server-error.component.d.ts +4 -0
- package/lib/shared/components/error-modal/error-modal.component.d.ts +8 -4
- package/lib/shared/components/page-not-found/page-not-found.component.d.ts +8 -3
- package/lib/shared/components/server-error/server-error.component.d.ts +4 -0
- package/lib/shared/components/session-expired/session-expired.component.d.ts +4 -0
- package/lib/shared/components/unauthorized/unauthorized.component.d.ts +5 -0
- package/lib/shared/constants/api-config.constants.d.ts +2 -6
- package/lib/shared/constants/error-handling.constants.d.ts +13 -0
- package/lib/shared/errorhandler/sentry-error.handler.d.ts +1 -1
- package/lib/shared/services/global-error.service.d.ts +1 -1
- package/lib/shared/services/util.service.d.ts +10 -1
- package/lib/shared/types/global-error.types.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/esm2020/lib/shared/services/auth.service.mjs +0 -20
- package/lib/shared/services/auth.service.d.ts +0 -9
|
@@ -8,7 +8,7 @@ export declare class SentryErrorHandler implements ErrorHandler {
|
|
|
8
8
|
private errorService;
|
|
9
9
|
constructor(authorizerService: AuthorizerService, errorService: GlobalErrorService, config?: Configurations);
|
|
10
10
|
handleError(error: any): void;
|
|
11
|
-
|
|
11
|
+
handleChunkError(error: Error): void;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<SentryErrorHandler, [null, null, { optional: true; }]>;
|
|
13
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<SentryErrorHandler>;
|
|
14
14
|
}
|
|
@@ -24,8 +24,8 @@ export declare class GlobalErrorService {
|
|
|
24
24
|
private publishLocalError;
|
|
25
25
|
private isPageLevelError;
|
|
26
26
|
private isComponentLevelError;
|
|
27
|
-
private parseRequest;
|
|
28
27
|
private getPageCode;
|
|
28
|
+
private isApiConfigMatching;
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalErrorService, never>;
|
|
30
30
|
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalErrorService>;
|
|
31
31
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { HttpParams } from '@angular/common/http';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class UtilsService {
|
|
3
|
-
isJsonSubset
|
|
4
|
+
private isJsonSubset;
|
|
5
|
+
extractQueryParams(params: HttpParams): {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
isStringEqual(apiMethod: string, requestMethod: string): boolean;
|
|
9
|
+
isSubstringInString(apiPath: string, requestPath: string): boolean;
|
|
10
|
+
isSubsetOfObject(apiQuery: any, requestQuery: any): boolean;
|
|
11
|
+
isSubsetOfArray(apiBody: any, requestBody: any): boolean;
|
|
12
|
+
isValueInArray(apiPageCodes: string[], pageCode: string): boolean;
|
|
4
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
|
|
5
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
|
|
6
15
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { MODAL_ERROR_TYPES } from '../constants/error-handling.constants';
|
|
1
2
|
export interface DialogData {
|
|
2
3
|
heading: string;
|
|
3
4
|
description: string;
|
|
4
5
|
buttonText: string;
|
|
5
6
|
}
|
|
7
|
+
export interface RequestDetails {
|
|
8
|
+
method: string;
|
|
9
|
+
path: string;
|
|
10
|
+
query: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
body: any;
|
|
14
|
+
pageCode?: string;
|
|
15
|
+
}
|
|
6
16
|
export declare enum ErrorStatusCode {
|
|
7
17
|
URLNotFound = 404,
|
|
8
18
|
UnauthorizedAccess = 403,
|
|
@@ -14,3 +24,4 @@ export declare enum ErrorStatusCode {
|
|
|
14
24
|
NetworkUnavailable = 0,
|
|
15
25
|
JSChunkUnavailable = 600
|
|
16
26
|
}
|
|
27
|
+
export declare type ModalErrorType = keyof typeof MODAL_ERROR_TYPES;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vc-error-handlers",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.98",
|
|
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"
|
package/public-api.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './lib/vc-error-handlers.service';
|
|
2
2
|
export * from './lib/shared/services/global-error.service';
|
|
3
|
-
export * from './lib/shared/services/auth.service';
|
|
4
3
|
export * from './lib/shared/services/router.service';
|
|
5
4
|
export * from './lib/vc-error-handlers.component';
|
|
6
5
|
export * from './lib/shared/components/page-not-found/page-not-found.component';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Injectable } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@vcomply/authorizer";
|
|
4
|
-
export class AuthService {
|
|
5
|
-
constructor(authorizer) {
|
|
6
|
-
this.authorizer = authorizer;
|
|
7
|
-
}
|
|
8
|
-
logoutUser() {
|
|
9
|
-
this.authorizer.logout();
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AuthService, deps: [{ token: i1.AuthorizerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AuthService, providedIn: "root" });
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AuthService, decorators: [{
|
|
15
|
-
type: Injectable,
|
|
16
|
-
args: [{
|
|
17
|
-
providedIn: "root",
|
|
18
|
-
}]
|
|
19
|
-
}], ctorParameters: function () { return [{ type: i1.AuthorizerService }]; } });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmMtZXJyb3ItaGFuZGxlcnMvc3JjL2xpYi9zaGFyZWQvc2VydmljZXMvYXV0aC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQU8zQyxNQUFNLE9BQU8sV0FBVztJQUN0QixZQUFvQixVQUE2QjtRQUE3QixlQUFVLEdBQVYsVUFBVSxDQUFtQjtJQUFHLENBQUM7SUFFOUMsVUFBVTtRQUNmLElBQUksQ0FBQyxVQUFVLENBQUMsTUFBTSxFQUFFLENBQUM7SUFDM0IsQ0FBQzs7d0dBTFUsV0FBVzs0R0FBWCxXQUFXLGNBRlYsTUFBTTsyRkFFUCxXQUFXO2tCQUh2QixVQUFVO21CQUFDO29CQUNWLFVBQVUsRUFBRSxNQUFNO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tIFwiQGFuZ3VsYXIvY29yZVwiO1xyXG5cclxuaW1wb3J0IHsgQXV0aG9yaXplclNlcnZpY2UgfSBmcm9tIFwiQHZjb21wbHkvYXV0aG9yaXplclwiO1xyXG5cclxuQEluamVjdGFibGUoe1xyXG4gIHByb3ZpZGVkSW46IFwicm9vdFwiLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgQXV0aFNlcnZpY2Uge1xyXG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgYXV0aG9yaXplcjogQXV0aG9yaXplclNlcnZpY2UpIHt9XHJcblxyXG4gIHB1YmxpYyBsb2dvdXRVc2VyKCkge1xyXG4gICAgdGhpcy5hdXRob3JpemVyLmxvZ291dCgpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AuthorizerService } from "@vcomply/authorizer";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AuthService {
|
|
4
|
-
private authorizer;
|
|
5
|
-
constructor(authorizer: AuthorizerService);
|
|
6
|
-
logoutUser(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
9
|
-
}
|