ngx-techlify-core 14.13.0 → 14.13.2
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/error-handler.interceptor.mjs +29 -17
- package/esm2020/lib/entity-files/entity-file-form/entity-file-form.component.mjs +2 -2
- package/esm2020/lib/entity-files/entity-file.service.mjs +3 -1
- package/esm2020/lib/user/current-user.service.mjs +2 -2
- package/fesm2015/ngx-techlify-core.mjs +32 -21
- package/fesm2015/ngx-techlify-core.mjs.map +1 -1
- package/fesm2020/ngx-techlify-core.mjs +32 -20
- package/fesm2020/ngx-techlify-core.mjs.map +1 -1
- package/lib/core/error-handler.interceptor.d.ts +10 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/c
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ConfigService } from './config.service';
|
|
4
4
|
import { ErrorHandlerService } from './error-handler.service';
|
|
5
|
+
import { AlertService } from './alert.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Adds a default error handler to all requests.
|
|
@@ -9,9 +10,17 @@ import * as i0 from "@angular/core";
|
|
|
9
10
|
export declare class ErrorHandlerInterceptor implements HttpInterceptor {
|
|
10
11
|
private configService;
|
|
11
12
|
private errorHandler;
|
|
12
|
-
|
|
13
|
+
private alertService;
|
|
14
|
+
constructor(configService: ConfigService, errorHandler: ErrorHandlerService, alertService: AlertService);
|
|
13
15
|
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
14
16
|
private handleError;
|
|
17
|
+
/**
|
|
18
|
+
* Helper function to check if an error is likely due to a network connection issue.
|
|
19
|
+
*
|
|
20
|
+
* @param error The error object to check.
|
|
21
|
+
* @returns `true` if it's likely a network error, `false` otherwise.
|
|
22
|
+
*/
|
|
23
|
+
checkNoNetworkConnection(error: any): boolean;
|
|
15
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlerInterceptor, never>;
|
|
16
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorHandlerInterceptor>;
|
|
17
26
|
}
|