ng-ipa-library 1.4.7 → 1.4.10
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/core/interceptors/error.interceptor.mjs +6 -43
- package/esm2020/lib/core/services/error.service.mjs +38 -5
- package/esm2020/lib/services/common.service.mjs +15 -6
- package/esm2020/lib/share-button/share-button.component.mjs +3 -3
- package/fesm2015/ng-ipa-library.mjs +115 -112
- package/fesm2015/ng-ipa-library.mjs.map +1 -1
- package/fesm2020/ng-ipa-library.mjs +113 -110
- package/fesm2020/ng-ipa-library.mjs.map +1 -1
- package/lib/core/interceptors/error.interceptor.d.ts +1 -7
- package/lib/core/services/error.service.d.ts +10 -1
- package/lib/services/common.service.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ErrorService } from '../services/error.service';
|
|
4
|
-
import { ToastrService } from 'ngx-toastr';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class ErrorInterceptor implements HttpInterceptor {
|
|
7
6
|
private errorService;
|
|
8
|
-
|
|
9
|
-
constructor(errorService: ErrorService, toastrService: ToastrService);
|
|
7
|
+
constructor(errorService: ErrorService);
|
|
10
8
|
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
11
9
|
private isException;
|
|
12
|
-
private showErrorMsg;
|
|
13
|
-
private show500ErrorMsg;
|
|
14
|
-
private addCopyButton;
|
|
15
|
-
private copyToClipboard;
|
|
16
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorInterceptor, never>;
|
|
17
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorInterceptor>;
|
|
18
12
|
}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
import { IndividualConfig, ToastrService } from 'ngx-toastr';
|
|
2
|
+
import { ApiException } from '../../models/apiException';
|
|
3
|
+
import { ApiResponse } from '../../models/apiResponse';
|
|
1
4
|
import { ExceptionUrl } from '../../models/exceptionUrl.model';
|
|
5
|
+
import { CommonService } from '../../services/common.service';
|
|
2
6
|
import * as i0 from "@angular/core";
|
|
3
7
|
export declare class ErrorService {
|
|
8
|
+
private toastrService;
|
|
9
|
+
private commonService;
|
|
4
10
|
urls: ExceptionUrl[];
|
|
5
|
-
constructor();
|
|
11
|
+
constructor(toastrService: ToastrService, commonService: CommonService);
|
|
6
12
|
setExceptionUrls(urls: ExceptionUrl[]): void;
|
|
7
13
|
addExceptionUrl(url: ExceptionUrl): void;
|
|
14
|
+
showErrorMsg(response: ApiResponse, toastrConfig: Partial<IndividualConfig>): void;
|
|
15
|
+
show500ErrorMsg(response: ApiException, toastrConfig: Partial<IndividualConfig>): void;
|
|
16
|
+
private addCopyButton;
|
|
8
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorService, never>;
|
|
9
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorService>;
|
|
10
19
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { ToastrService } from 'ngx-toastr';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class CommonService {
|
|
3
|
-
|
|
4
|
+
private toastrService;
|
|
5
|
+
constructor(toastrService: ToastrService);
|
|
6
|
+
copyToClipboard(copyText: any, message: string): void;
|
|
4
7
|
print(element: string, title: string, classes?: string): void;
|
|
5
8
|
private getElementTag;
|
|
6
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommonService, never>;
|