@ecodev/natural 42.2.0 → 42.3.0

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.
@@ -0,0 +1,19 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ErrorHandler, InjectionToken } from '@angular/core';
3
+ import { Literal } from '../../types/types';
4
+ import * as i0 from "@angular/core";
5
+ export interface LoggerExtra {
6
+ getExtras(error: unknown): Literal;
7
+ }
8
+ export declare const NaturalLoggerConfigUrl: InjectionToken<string>;
9
+ export declare const NaturalLoggerConfigExtra: InjectionToken<LoggerExtra>;
10
+ export declare class NaturalErrorHandler extends ErrorHandler {
11
+ private http;
12
+ private readonly document;
13
+ private readonly url;
14
+ private readonly loggerExtra?;
15
+ constructor(http: HttpClient, document: Document, url: string, loggerExtra?: LoggerExtra | undefined);
16
+ handleError(error: any): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<NaturalErrorHandler, [null, null, { optional: true; }, { optional: true; }]>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<NaturalErrorHandler>;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { ModuleWithProviders, Type } from '@angular/core';
2
+ import { LoggerExtra } from './error-handler';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@angular/common/http";
5
+ export declare class NaturalErrorModule {
6
+ static forRoot(url: string | null, extraService?: Type<LoggerExtra>): ModuleWithProviders<NaturalErrorModule>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<NaturalErrorModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NaturalErrorModule, never, [typeof i1.HttpClientModule], never>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<NaturalErrorModule>;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './error.module';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "42.2.0",
3
+ "version": "42.3.0",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,
package/public-api.d.ts CHANGED
@@ -37,4 +37,5 @@ export * from './lib/modules/table-button/public-api';
37
37
  export * from './lib/modules/dialog-trigger/public-api';
38
38
  export * from './lib/modules/avatar/public-api';
39
39
  export * from './lib/modules/matomo/public-api';
40
+ export * from './lib/modules/logger/public-api';
40
41
  export * from './lib/directives/http-prefix.directive';