@adaskothebeast/angular-date-http-interceptor 1.0.0 → 1.2.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.
- package/esm2022/lib/angular-date-http-interceptor.module.mjs +4 -4
- package/esm2022/lib/hierarchical-date-http-interceptor.mjs +4 -4
- package/fesm2022/adaskothebeast-angular-date-http-interceptor.mjs +7 -7
- package/fesm2022/adaskothebeast-angular-date-http-interceptor.mjs.map +1 -1
- package/lib/hierarchical-date-http-interceptor.d.ts +1 -1
- package/package.json +3 -4
|
@@ -4,9 +4,9 @@ import { NgModule } from '@angular/core';
|
|
|
4
4
|
import { HierarchicalDateHttpInterceptor } from './hierarchical-date-http-interceptor';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class AngularDateHttpInterceptorModule {
|
|
7
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
8
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
|
9
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, imports: [CommonModule] }); }
|
|
9
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, providers: [
|
|
10
10
|
{
|
|
11
11
|
provide: HTTP_INTERCEPTORS,
|
|
12
12
|
useClass: HierarchicalDateHttpInterceptor,
|
|
@@ -14,7 +14,7 @@ export class AngularDateHttpInterceptorModule {
|
|
|
14
14
|
},
|
|
15
15
|
], imports: [CommonModule] }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, decorators: [{
|
|
18
18
|
type: NgModule,
|
|
19
19
|
args: [{
|
|
20
20
|
imports: [CommonModule],
|
|
@@ -41,13 +41,13 @@ export class HierarchicalDateHttpInterceptor {
|
|
|
41
41
|
return event;
|
|
42
42
|
}));
|
|
43
43
|
}
|
|
44
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
45
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HierarchicalDateHttpInterceptor, deps: [{ token: HIERARCHICAL_DATE_ADJUST_FUNCTION }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
45
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HierarchicalDateHttpInterceptor }); }
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HierarchicalDateHttpInterceptor, decorators: [{
|
|
48
48
|
type: Injectable
|
|
49
49
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
50
50
|
type: Inject,
|
|
51
51
|
args: [HIERARCHICAL_DATE_ADJUST_FUNCTION]
|
|
52
52
|
}] }]; } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2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HJvdmlkZXJzLi4uXHJcbiAqICAgXVxyXG4gKiB9KVxyXG4gKiBleHBvcnQgY2xhc3MgQXBwTW9kdWxlIHsgfVxyXG4gKiBgYGBcclxuICovXHJcbkBJbmplY3RhYmxlKClcclxuZXhwb3J0IGNsYXNzIEhpZXJhcmNoaWNhbERhdGVIdHRwSW50ZXJjZXB0b3IgaW1wbGVtZW50cyBIdHRwSW50ZXJjZXB0b3Ige1xyXG4gIGNvbnN0cnVjdG9yKFxyXG4gICAgQEluamVjdChISUVSQVJDSElDQUxfREFURV9BREpVU1RfRlVOQ1RJT04pXHJcbiAgICBwcml2YXRlIGFkanVzdERhdGVzOiAob2JqOiB1bmtub3duKSA9PiB2b2lkXHJcbiAgKSB7fVxyXG5cclxuICBpbnRlcmNlcHQoXHJcbiAgICByZXE6IEh0dHBSZXF1ZXN0PHVua25vd24+LFxyXG4gICAgbmV4dDogSHR0cEhhbmRsZXJcclxuICApOiBPYnNlcnZhYmxlPEh0dHBFdmVudDx1bmtub3duPj4ge1xyXG4gICAgcmV0dXJuIG5leHQuaGFuZGxlKHJlcSkucGlwZShcclxuICAgICAgbWFwKChldmVudDogSHR0cEV2ZW50PHVua25vd24+KSA9PiB7XHJcbiAgICAgICAgaWYgKGV2ZW50IGluc3RhbmNlb2YgSHR0cFJlc3BvbnNlKSB7XHJcbiAgICAgICAgICB0aGlzLmFkanVzdERhdGVzKGV2ZW50LmJvZHkpO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZXZlbnQ7XHJcbiAgICAgIH0pXHJcbiAgICApO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -44,10 +44,10 @@ class HierarchicalDateHttpInterceptor {
|
|
|
44
44
|
return event;
|
|
45
45
|
}));
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
48
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HierarchicalDateHttpInterceptor, deps: [{ token: HIERARCHICAL_DATE_ADJUST_FUNCTION }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HierarchicalDateHttpInterceptor }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HierarchicalDateHttpInterceptor, decorators: [{
|
|
51
51
|
type: Injectable
|
|
52
52
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
53
53
|
type: Inject,
|
|
@@ -55,9 +55,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
55
55
|
}] }]; } });
|
|
56
56
|
|
|
57
57
|
class AngularDateHttpInterceptorModule {
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
59
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
|
60
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
59
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, imports: [CommonModule] }); }
|
|
60
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, providers: [
|
|
61
61
|
{
|
|
62
62
|
provide: HTTP_INTERCEPTORS,
|
|
63
63
|
useClass: HierarchicalDateHttpInterceptor,
|
|
@@ -65,7 +65,7 @@ class AngularDateHttpInterceptorModule {
|
|
|
65
65
|
},
|
|
66
66
|
], imports: [CommonModule] }); }
|
|
67
67
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AngularDateHttpInterceptorModule, decorators: [{
|
|
69
69
|
type: NgModule,
|
|
70
70
|
args: [{
|
|
71
71
|
imports: [CommonModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaskothebeast-angular-date-http-interceptor.mjs","sources":["../../../../packages/angular-date-http-interceptor/src/lib/hierarchical-date-adjust-symbol.ts","../../../../packages/angular-date-http-interceptor/src/lib/hierarchical-date-http-interceptor.ts","../../../../packages/angular-date-http-interceptor/src/lib/angular-date-http-interceptor.module.ts","../../../../packages/angular-date-http-interceptor/src/adaskothebeast-angular-date-http-interceptor.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const HIERARCHICAL_DATE_ADJUST_FUNCTION = new InjectionToken<\r\n (obj: unknown) => void\r\n>('HIERARCHICAL_DATE_ADJUST_FUNCTION');\r\n","import {\r\n HttpEvent,\r\n HttpHandler,\r\n HttpInterceptor,\r\n HttpRequest,\r\n HttpResponse,\r\n} from '@angular/common/http';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\nimport { HIERARCHICAL_DATE_ADJUST_FUNCTION } from './hierarchical-date-adjust-symbol';\r\n\r\n/**\r\n * HttpInterceptor that converts ISO 8601 date strings to Date objects in the response body.\r\n *\r\n * ```ts\r\n * import { HIERARCHICAL_DATE_ADJUST_FUNCTION } from 'my-library'; // Adjust this import as needed\r\n * // choose one function from below depending on library which you use for date manipulation\r\n * import { hierarchicalConvertToDate } from '@adaskothebeast/hierarchical-convert-to-date';\r\n * import { hierarchicalConvertToDateFns } from '@adaskothebeast/hierarchical-convert-to-date-fns';\r\n * import { hierarchicalConvertToDayjs } from '@adaskothebeast/hierarchical-convert-to-dayjs';\r\n * import { hierarchicalConvertToJsJoda } from '@adaskothebeast/hierarchical-convert-to-js-joda';\r\n * import { hierarchicalConvertToLuxon } from '@adaskothebeast/hierarchical-convert-to-luxon';\r\n * import { hierarchicalConvertToMoment } from '@adaskothebeast/hierarchical-convert-to-moment';\r\n *\r\n * @NgModule({\r\n * imports: [\r\n * // ...\r\n * MyLibraryModule,\r\n * ],\r\n * providers: [\r\n * { provide: HIERARCHICAL_DATE_ADJUST_FUNCTION, useValue: hierarchicalConvertToDate },\r\n * // other providers...\r\n * ]\r\n * })\r\n * export class AppModule { }\r\n * ```\r\n */\r\n@Injectable()\r\nexport class HierarchicalDateHttpInterceptor implements HttpInterceptor {\r\n constructor(\r\n @Inject(HIERARCHICAL_DATE_ADJUST_FUNCTION)\r\n private adjustDates: (obj: unknown) => void\r\n ) {}\r\n\r\n intercept(\r\n req: HttpRequest<
|
|
1
|
+
{"version":3,"file":"adaskothebeast-angular-date-http-interceptor.mjs","sources":["../../../../packages/angular-date-http-interceptor/src/lib/hierarchical-date-adjust-symbol.ts","../../../../packages/angular-date-http-interceptor/src/lib/hierarchical-date-http-interceptor.ts","../../../../packages/angular-date-http-interceptor/src/lib/angular-date-http-interceptor.module.ts","../../../../packages/angular-date-http-interceptor/src/adaskothebeast-angular-date-http-interceptor.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const HIERARCHICAL_DATE_ADJUST_FUNCTION = new InjectionToken<\r\n (obj: unknown) => void\r\n>('HIERARCHICAL_DATE_ADJUST_FUNCTION');\r\n","import {\r\n HttpEvent,\r\n HttpHandler,\r\n HttpInterceptor,\r\n HttpRequest,\r\n HttpResponse,\r\n} from '@angular/common/http';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\nimport { HIERARCHICAL_DATE_ADJUST_FUNCTION } from './hierarchical-date-adjust-symbol';\r\n\r\n/**\r\n * HttpInterceptor that converts ISO 8601 date strings to Date objects in the response body.\r\n *\r\n * ```ts\r\n * import { HIERARCHICAL_DATE_ADJUST_FUNCTION } from 'my-library'; // Adjust this import as needed\r\n * // choose one function from below depending on library which you use for date manipulation\r\n * import { hierarchicalConvertToDate } from '@adaskothebeast/hierarchical-convert-to-date';\r\n * import { hierarchicalConvertToDateFns } from '@adaskothebeast/hierarchical-convert-to-date-fns';\r\n * import { hierarchicalConvertToDayjs } from '@adaskothebeast/hierarchical-convert-to-dayjs';\r\n * import { hierarchicalConvertToJsJoda } from '@adaskothebeast/hierarchical-convert-to-js-joda';\r\n * import { hierarchicalConvertToLuxon } from '@adaskothebeast/hierarchical-convert-to-luxon';\r\n * import { hierarchicalConvertToMoment } from '@adaskothebeast/hierarchical-convert-to-moment';\r\n *\r\n * @NgModule({\r\n * imports: [\r\n * // ...\r\n * MyLibraryModule,\r\n * ],\r\n * providers: [\r\n * { provide: HIERARCHICAL_DATE_ADJUST_FUNCTION, useValue: hierarchicalConvertToDate },\r\n * // other providers...\r\n * ]\r\n * })\r\n * export class AppModule { }\r\n * ```\r\n */\r\n@Injectable()\r\nexport class HierarchicalDateHttpInterceptor implements HttpInterceptor {\r\n constructor(\r\n @Inject(HIERARCHICAL_DATE_ADJUST_FUNCTION)\r\n private adjustDates: (obj: unknown) => void\r\n ) {}\r\n\r\n intercept(\r\n req: HttpRequest<unknown>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<unknown>> {\r\n return next.handle(req).pipe(\r\n map((event: HttpEvent<unknown>) => {\r\n if (event instanceof HttpResponse) {\r\n this.adjustDates(event.body);\r\n }\r\n return event;\r\n })\r\n );\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\n\nimport { HierarchicalDateHttpInterceptor } from './hierarchical-date-http-interceptor';\n\n@NgModule({\n imports: [CommonModule],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: HierarchicalDateHttpInterceptor,\n multi: true,\n },\n ],\n})\nexport class AngularDateHttpInterceptorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,iCAAiC,GAAG,IAAI,cAAc,CAEjE,mCAAmC;;ACSrC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;MAEU,+BAA+B,CAAA;AAC1C,IAAA,WAAA,CAEU,WAAmC,EAAA;QAAnC,IAAW,CAAA,WAAA,GAAX,WAAW,CAAwB;KACzC;IAEJ,SAAS,CACP,GAAyB,EACzB,IAAiB,EAAA;AAEjB,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAC1B,GAAG,CAAC,CAAC,KAAyB,KAAI;YAChC,IAAI,KAAK,YAAY,YAAY,EAAE;AACjC,gBAAA,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9B,aAAA;AACD,YAAA,OAAO,KAAK,CAAC;SACd,CAAC,CACH,CAAC;KACH;AAlBU,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,kBAEhC,iCAAiC,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAFhC,+BAA+B,EAAA,CAAA,CAAA,EAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;;0BAGN,MAAM;2BAAC,iCAAiC,CAAA;;;MC1BhC,gCAAgC,CAAA;8GAAhC,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YATjC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AASX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,EARhC,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,QAAQ,EAAE,+BAA+B;AACzC,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,OAAA,EAAA,CAPS,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FASX,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAV5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,+BAA+B;AACzC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -30,7 +30,7 @@ import * as i0 from "@angular/core";
|
|
|
30
30
|
export declare class HierarchicalDateHttpInterceptor implements HttpInterceptor {
|
|
31
31
|
private adjustDates;
|
|
32
32
|
constructor(adjustDates: (obj: unknown) => void);
|
|
33
|
-
intercept(req: HttpRequest<
|
|
33
|
+
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<HierarchicalDateHttpInterceptor, never>;
|
|
35
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<HierarchicalDateHttpInterceptor>;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaskothebeast/angular-date-http-interceptor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.1.0",
|
|
6
6
|
"@angular/core": "^16.1.0",
|
|
7
|
-
"rxjs": "^7.8.0"
|
|
8
|
-
"@adaskothebeast/hierarchical-convert-to-date": "1.0.0"
|
|
7
|
+
"rxjs": "^7.8.0"
|
|
9
8
|
},
|
|
10
9
|
"dependencies": {
|
|
11
10
|
"tslib": "^2.6.0"
|
|
@@ -24,4 +23,4 @@
|
|
|
24
23
|
"default": "./fesm2022/adaskothebeast-angular-date-http-interceptor.mjs"
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
}
|
|
26
|
+
}
|