zek 14.2.70 → 14.2.71

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.
@@ -6,22 +6,34 @@ import { AlertService } from './alert.service';
6
6
  import * as i0 from "@angular/core";
7
7
  /** Type of the handleError function returned by HttpErrorHandler.createHandleError */
8
8
  export declare type HandleError = <T = any>(operation?: string, result?: T, show?: boolean) => (error: HttpErrorResponse) => Observable<T>;
9
+ export declare type HandleErrorJson = <T = any>(operation?: string, show?: boolean) => (error: HttpErrorResponse) => Observable<T>;
9
10
  /** Handles HttpClient errors */
10
11
  export declare class HttpErrorHandler {
11
- private readonly alertService;
12
- private readonly translateService;
12
+ private readonly alert;
13
+ private readonly translate;
13
14
  private readonly router;
14
- constructor(alertService: AlertService, translateService: TranslateService, router: Router);
15
+ constructor(alert: AlertService, translate: TranslateService, router: Router);
15
16
  /** Create curried handleError function that already knows the service name */
16
17
  createHandleError: (serviceName?: string) => <T>(operation?: string, result?: T, show?: boolean) => (response: HttpErrorResponse) => Observable<T>;
18
+ createHandleErrorJson: (serviceName?: string) => <T>(operation?: string, show?: boolean) => (response: HttpErrorResponse) => Observable<unknown>;
17
19
  /**
18
20
  * Returns a function that handles Http operation failures.
19
21
  * This error handler lets the app continue to run as if no error occurred.
20
22
  * @param serviceName = name of the data service that attempted the operation
21
23
  * @param operation - name of the operation that failed
22
24
  * @param result - optional value to return as the observable result
25
+ * @param show - optional value to show error
23
26
  */
24
27
  handleError<T>(serviceName?: string, operation?: string, result?: T, show?: boolean): (response: HttpErrorResponse) => Observable<T>;
28
+ private showError;
29
+ /**
30
+ * Returns a function that handles Http operation failures.
31
+ * This error handler lets the app continue to run as if no error occurred.
32
+ * @param serviceName = name of the data service that attempted the operation
33
+ * @param operation - name of the operation that failed
34
+ * @param show - optional value to show error
35
+ */
36
+ handleErrorJson<T>(serviceName?: string, operation?: string, show?: boolean): (response: HttpErrorResponse) => Observable<T>;
25
37
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpErrorHandler, never>;
26
38
  static ɵprov: i0.ɵɵInjectableDeclaration<HttpErrorHandler>;
27
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zek",
3
- "version": "14.2.70",
3
+ "version": "14.2.71",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.0",
6
6
  "@angular/core": "^14.0.0"